From 53c00d6cadaf147caf22339e6d70550b8d1cb750 Mon Sep 17 00:00:00 2001 From: Gabriel Jacobo Date: Mon, 22 Apr 2013 11:18:45 -0300 Subject: [PATCH 001/542] Fixes #1815, don't release the LocalRef returned by SDL_AndroidGetActivity --- src/core/android/SDL_android.cpp | 9 +++++++-- 1 file changed, 7 insertions(+), 2 deletions(-) diff --git a/src/core/android/SDL_android.cpp b/src/core/android/SDL_android.cpp index 5ae8f93a0..5ab147e2a 100644 --- a/src/core/android/SDL_android.cpp +++ b/src/core/android/SDL_android.cpp @@ -1130,13 +1130,18 @@ extern "C" void *SDL_AndroidGetJNIEnv() return Android_JNI_GetEnv(); } +/* + * The jobject returned by SDL_AndroidGetActivity is a local reference. + * It is the caller's responsibility to properly release it + * (using LocalReferenceHolder or manually with env->DeleteLocalRef) + */ + extern "C" void *SDL_AndroidGetActivity() { - LocalReferenceHolder refs(__FUNCTION__); jmethodID mid; JNIEnv *env = Android_JNI_GetEnv(); - if (!refs.init(env)) { + if (!env) { return NULL; } From c59f7d106eb8378f38e489739fbc63a469871cb4 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?J=C3=B8rgen=20P=2E=20Tjern=C3=B8?= Date: Mon, 22 Apr 2013 12:07:13 -0700 Subject: [PATCH 002/542] Properly reflect hidden/shown windows on OSX. This fixes a bug where windows would always be considered to be in the shown/hidden state they were originally created in. --- src/video/cocoa/SDL_cocoawindow.m | 30 ++++++++++++++++++++++++++++++ 1 file changed, 30 insertions(+) diff --git a/src/video/cocoa/SDL_cocoawindow.m b/src/video/cocoa/SDL_cocoawindow.m index f2803dad3..47dc1052e 100644 --- a/src/video/cocoa/SDL_cocoawindow.m +++ b/src/video/cocoa/SDL_cocoawindow.m @@ -65,6 +65,14 @@ static __inline__ void ConvertNSRect(NSRect *r) [window setDelegate:self]; } + // Haven't found a delegate / notification that triggers when the window is + // ordered out (is not visible any more). You can be ordered out without + // minimizing, so DidMiniaturize doesn't work. (e.g. -[NSWindow orderOut:]) + [window addObserver:self + forKeyPath:@"visible" + options:NSKeyValueObservingOptionNew + context:NULL]; + [window setNextResponder:self]; [window setAcceptsMouseMovedEvents:YES]; @@ -77,6 +85,21 @@ static __inline__ void ConvertNSRect(NSRect *r) #endif } +- (void)observeValueForKeyPath:(NSString *)keyPath + ofObject:(id)object + change:(NSDictionary *)change + context:(void *)context +{ + if (object == _data->nswindow && [keyPath isEqualToString:@"visible"]) { + int newVisibility = [[change objectForKey:@"new"] intValue]; + if (newVisibility) { + SDL_SendWindowEvent(_data->window, SDL_WINDOWEVENT_SHOWN, 0, 0); + } else { + SDL_SendWindowEvent(_data->window, SDL_WINDOWEVENT_HIDDEN, 0, 0); + } + } +} + - (void)close { NSNotificationCenter *center; @@ -97,6 +120,9 @@ static __inline__ void ConvertNSRect(NSRect *r) [window setDelegate:nil]; } + [window removeObserver:self + forKeyPath:@"visible"]; + if ([window nextResponder] == self) { [window setNextResponder:nil]; } @@ -531,6 +557,7 @@ SetupWindowData(_THIS, SDL_Window * window, NSWindow *nswindow, SDL_bool created } else { window->flags &= ~SDL_WINDOW_SHOWN; } + { unsigned int style = [nswindow styleMask]; @@ -545,17 +572,20 @@ SetupWindowData(_THIS, SDL_Window * window, NSWindow *nswindow, SDL_bool created window->flags &= ~SDL_WINDOW_RESIZABLE; } } + /* isZoomed always returns true if the window is not resizable */ if ((window->flags & SDL_WINDOW_RESIZABLE) && [nswindow isZoomed]) { window->flags |= SDL_WINDOW_MAXIMIZED; } else { window->flags &= ~SDL_WINDOW_MAXIMIZED; } + if ([nswindow isMiniaturized]) { window->flags |= SDL_WINDOW_MINIMIZED; } else { window->flags &= ~SDL_WINDOW_MINIMIZED; } + if ([nswindow isKeyWindow]) { window->flags |= SDL_WINDOW_INPUT_FOCUS; SDL_SetKeyboardFocus(data->window); From 7849e997f61f39d7504a88c5b96fe01b81d7a60c Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?J=C3=B8rgen=20P=2E=20Tjern=C3=B8?= Date: Mon, 22 Apr 2013 12:07:16 -0700 Subject: [PATCH 003/542] Mac no longer loses OpenGL context when window is hidden. This fixes an issue that would arise when you minimize / order out an OpenGL window on Mac, where the window would lose it's window device. Without a window device, you cannot render to the window. It does so by making two changes: - Windows are no longer "oneShot" (which caused their window device to get destroyed when they're minified or ordered out) - Windows are no longer "deferred" (which caused the OS to defer window device creation until the window is shown, which meant that we couldn't properly makeCurrent to it) Thanks to http://www.mikeash.com/pyblog/nsopenglcontext-and-one-shot.html --- src/video/cocoa/SDL_cocoaopengl.m | 19 +++++++------------ src/video/cocoa/SDL_cocoawindow.m | 11 +++++++++-- 2 files changed, 16 insertions(+), 14 deletions(-) diff --git a/src/video/cocoa/SDL_cocoaopengl.m b/src/video/cocoa/SDL_cocoaopengl.m index a1686219b..4fc478330 100644 --- a/src/video/cocoa/SDL_cocoaopengl.m +++ b/src/video/cocoa/SDL_cocoaopengl.m @@ -238,16 +238,14 @@ Cocoa_GL_MakeCurrent(_THIS, SDL_Window * window, SDL_GLContext context) SDL_WindowData *windowdata = (SDL_WindowData *)window->driverdata; NSOpenGLContext *nscontext = (NSOpenGLContext *)context; - if (window->flags & SDL_WINDOW_SHOWN) { #ifndef FULLSCREEN_TOGGLEABLE - if (window->flags & SDL_WINDOW_FULLSCREEN) { - [nscontext setFullScreen]; - } else + if (window->flags & SDL_WINDOW_FULLSCREEN) { + [nscontext setFullScreen]; + } else #endif - { - [nscontext setView:[windowdata->nswindow contentView]]; - [nscontext update]; - } + { + [nscontext setView:[windowdata->nswindow contentView]]; + [nscontext update]; } [nscontext makeCurrentContext]; } else { @@ -310,10 +308,7 @@ Cocoa_GL_SwapWindow(_THIS, SDL_Window * window) pool = [[NSAutoreleasePool alloc] init]; /* FIXME: Do we need to get the context for the window? */ - nscontext = [NSOpenGLContext currentContext]; - if (nscontext != nil) { - [nscontext flushBuffer]; - } + [[NSOpenGLContext currentContext] flushBuffer]; [pool release]; } diff --git a/src/video/cocoa/SDL_cocoawindow.m b/src/video/cocoa/SDL_cocoawindow.m index 47dc1052e..0ebb3c94a 100644 --- a/src/video/cocoa/SDL_cocoawindow.m +++ b/src/video/cocoa/SDL_cocoawindow.m @@ -591,6 +591,11 @@ SetupWindowData(_THIS, SDL_Window * window, NSWindow *nswindow, SDL_bool created SDL_SetKeyboardFocus(data->window); } + /* Prevents the window's "window device" from being destroyed when it is + * hidden. See http://www.mikeash.com/pyblog/nsopenglcontext-and-one-shot.html + */ + [nswindow setOneShot:NO]; + /* All done! */ [pool release]; window->driverdata = data; @@ -633,7 +638,7 @@ Cocoa_CreateWindow(_THIS, SDL_Window * window) rect.origin.y -= screenRect.origin.y; } } - nswindow = [[SDLWindow alloc] initWithContentRect:rect styleMask:style backing:NSBackingStoreBuffered defer:YES screen:screen]; + nswindow = [[SDLWindow alloc] initWithContentRect:rect styleMask:style backing:NSBackingStoreBuffered defer:NO screen:screen]; // Create a default view for this window rect = [nswindow contentRectForFrameRect:[nswindow frame]]; @@ -856,8 +861,10 @@ Cocoa_RebuildWindow(SDL_WindowData * data, NSWindow * nswindow, unsigned style) } [data->listener close]; - data->nswindow = [[SDLWindow alloc] initWithContentRect:[[nswindow contentView] frame] styleMask:style backing:NSBackingStoreBuffered defer:YES screen:[nswindow screen]]; + data->nswindow = [[SDLWindow alloc] initWithContentRect:[[nswindow contentView] frame] styleMask:style backing:NSBackingStoreBuffered defer:NO screen:[nswindow screen]]; [data->nswindow setContentView:[nswindow contentView]]; + /* See comment in SetupWindowData. */ + [data->nswindow setOneShot:NO]; [data->listener listen:data]; [nswindow close]; From 3bf28ba7c80ae1cd2c8821aa51f54b367eb356a7 Mon Sep 17 00:00:00 2001 From: "VALVE\\alfred@alfredlinux.valvesoftware.com" Date: Mon, 22 Apr 2013 15:24:35 -0700 Subject: [PATCH 004/542] - make sure to send a joy removed event even if the joystick wasn't opened under OSX --- src/joystick/SDL_joystick.c | 2 + src/joystick/darwin/SDL_sysjoystick.c | 55 ++++++++++++++++++++++++--- 2 files changed, 52 insertions(+), 5 deletions(-) diff --git a/src/joystick/SDL_joystick.c b/src/joystick/SDL_joystick.c index 6099ed176..53b465caa 100644 --- a/src/joystick/SDL_joystick.c +++ b/src/joystick/SDL_joystick.c @@ -629,6 +629,8 @@ SDL_JoystickUpdate(void) joystick = joysticknext; } + // this needs to happen AFTER walking the joystick list above, so that any + // dangling hardware data from removed devices can be free'd SDL_SYS_JoystickDetect(); } diff --git a/src/joystick/darwin/SDL_sysjoystick.c b/src/joystick/darwin/SDL_sysjoystick.c index ee16028b2..eba71e167 100644 --- a/src/joystick/darwin/SDL_sysjoystick.c +++ b/src/joystick/darwin/SDL_sysjoystick.c @@ -64,6 +64,7 @@ static recDevice *gpDeviceList = NULL; IONotificationPortRef notificationPort = 0; /* if 1 then a device was added since the last update call */ static SDL_bool s_bDeviceAdded = SDL_FALSE; +static SDL_bool s_bDeviceRemoved = SDL_FALSE; /* static incrementing counter for new joystick devices seen on the system. Devices should start with index 0 */ static int s_joystick_instance_id = -1; @@ -126,6 +127,7 @@ HIDRemovalCallback(void *target, IOReturn result, void *refcon, void *sender) { recDevice *device = (recDevice *) refcon; device->removed = 1; + s_bDeviceRemoved = SDL_TRUE; } @@ -137,6 +139,7 @@ void JoystickDeviceWasRemovedCallback( void * refcon, io_service_t service, natu { recDevice *device = (recDevice *) refcon; device->removed = 1; + s_bDeviceRemoved = SDL_TRUE; } } @@ -804,7 +807,8 @@ SDL_SYS_NumJoysticks() while ( device ) { - nJoySticks++; + if ( !device->removed ) + nJoySticks++; device = device->pNext; } @@ -816,10 +820,11 @@ SDL_SYS_NumJoysticks() void SDL_SYS_JoystickDetect() { - if ( s_bDeviceAdded ) + if ( s_bDeviceAdded || s_bDeviceRemoved ) { recDevice *device = gpDeviceList; s_bDeviceAdded = SDL_FALSE; + s_bDeviceRemoved = SDL_FALSE; int device_index = 0; // send notifications while ( device ) @@ -839,9 +844,49 @@ SDL_SYS_JoystickDetect() } } #endif /* !SDL_EVENTS_DISABLED */ + + } + + if ( device->removed ) + { + recDevice *removeDevice = device; + if ( gpDeviceList == removeDevice ) + { + device = device->pNext; + gpDeviceList = device; + } + else + { + device = gpDeviceList; + while ( device->pNext != removeDevice ) + { + device = device->pNext; + } + + device->pNext = removeDevice->pNext; + } + +#if !SDL_EVENTS_DISABLED + SDL_Event event; + event.type = SDL_JOYDEVICEREMOVED; + + if (SDL_GetEventState(event.type) == SDL_ENABLE) { + event.jdevice.which = removeDevice->instance_id; + if ((SDL_EventOK == NULL) + || (*SDL_EventOK) (SDL_EventOKParam, &event)) { + SDL_PushEvent(&event); + } + } + + DisposePtr((Ptr) removeDevice); +#endif /* !SDL_EVENTS_DISABLED */ + + } + else + { + device = device->pNext; + device_index++; } - device_index++; - device = device->pNext; } } } @@ -849,7 +894,7 @@ SDL_SYS_JoystickDetect() SDL_bool SDL_SYS_JoystickNeedsPolling() { - return s_bDeviceAdded; + return s_bDeviceAdded || s_bDeviceRemoved; } /* Function to get the device-dependent name of a joystick */ From be8f97cb6a22ac088b2c1c63b0c4d3b653cb8226 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?J=C3=B8rgen=20P=2E=20Tjern=C3=B8?= Date: Mon, 22 Apr 2013 18:14:26 -0700 Subject: [PATCH 005/542] Fix Mac crash when creating fullscreen window introduced in 9d43403e9fc5. makeKeyAndOrderFront: was sending three KVO transitions for isVisible, for false -> true, true -> false, and then false -> true. This was causing an infinite recursion. We now suspend monitoring of the KVO before makeKeyAndOrderFront, then resume afterwards and send any changes in isVisible's state. --- src/video/cocoa/SDL_cocoawindow.m | 41 +++++++++++++++++++++++++++++-- 1 file changed, 39 insertions(+), 2 deletions(-) diff --git a/src/video/cocoa/SDL_cocoawindow.m b/src/video/cocoa/SDL_cocoawindow.m index 0ebb3c94a..5e9c599fe 100644 --- a/src/video/cocoa/SDL_cocoawindow.m +++ b/src/video/cocoa/SDL_cocoawindow.m @@ -50,6 +50,8 @@ static __inline__ void ConvertNSRect(NSRect *r) NSView *view = [window contentView]; _data = data; + observingVisible = YES; + wasVisible = [window isVisible]; center = [NSNotificationCenter defaultCenter]; @@ -90,6 +92,10 @@ static __inline__ void ConvertNSRect(NSRect *r) change:(NSDictionary *)change context:(void *)context { + if (!observingVisible) { + return; + } + if (object == _data->nswindow && [keyPath isEqualToString:@"visible"]) { int newVisibility = [[change objectForKey:@"new"] intValue]; if (newVisibility) { @@ -100,6 +106,27 @@ static __inline__ void ConvertNSRect(NSRect *r) } } +-(void) pauseVisibleObservation +{ + observingVisible = NO; + wasVisible = [_data->nswindow isVisible]; +} + +-(void) resumeVisibleObservation +{ + BOOL isVisible = [_data->nswindow isVisible]; + observingVisible = YES; + if (wasVisible != isVisible) { + if (isVisible) { + SDL_SendWindowEvent(_data->window, SDL_WINDOWEVENT_SHOWN, 0, 0); + } else { + SDL_SendWindowEvent(_data->window, SDL_WINDOWEVENT_HIDDEN, 0, 0); + } + + wasVisible = isVisible; + } +} + - (void)close { NSNotificationCenter *center; @@ -785,10 +812,13 @@ void Cocoa_ShowWindow(_THIS, SDL_Window * window) { NSAutoreleasePool *pool = [[NSAutoreleasePool alloc] init]; - NSWindow *nswindow = ((SDL_WindowData *) window->driverdata)->nswindow; + SDL_WindowData *windowData = ((SDL_WindowData *) window->driverdata); + NSWindow *nswindow = windowData->nswindow; if (![nswindow isMiniaturized]) { + [windowData->listener pauseVisibleObservation]; [nswindow makeKeyAndOrderFront:nil]; + [windowData->listener resumeVisibleObservation]; } [pool release]; } @@ -807,9 +837,13 @@ void Cocoa_RaiseWindow(_THIS, SDL_Window * window) { NSAutoreleasePool *pool = [[NSAutoreleasePool alloc] init]; - NSWindow *nswindow = ((SDL_WindowData *) window->driverdata)->nswindow; + SDL_WindowData *windowData = ((SDL_WindowData *) window->driverdata); + NSWindow *nswindow = windowData->nswindow; + [windowData->listener pauseVisibleObservation]; [nswindow makeKeyAndOrderFront:nil]; + [windowData->listener resumeVisibleObservation]; + [pool release]; } @@ -960,7 +994,10 @@ Cocoa_SetWindowFullscreen(_THIS, SDL_Window * window, SDL_VideoDisplay * display [nswindow setLevel:kCGNormalWindowLevel]; } #endif + + [data->listener pauseVisibleObservation]; [nswindow makeKeyAndOrderFront:nil]; + [data->listener resumeVisibleObservation]; if (window == _this->current_glwin) { [((NSOpenGLContext *) _this->current_glctx) update]; From c7fb60a46b6f872ba30cecc033582bf75779a926 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?J=C3=B8rgen=20P=2E=20Tjern=C3=B8?= Date: Mon, 22 Apr 2013 18:14:32 -0700 Subject: [PATCH 006/542] Make Cocoa_ShowMessageBox work in background threads. --- src/video/cocoa/SDL_cocoamessagebox.m | 48 ++++++++++-- test/testmessage.c | 101 +++++++++++++++++++------- 2 files changed, 115 insertions(+), 34 deletions(-) diff --git a/src/video/cocoa/SDL_cocoamessagebox.m b/src/video/cocoa/SDL_cocoamessagebox.m index c7b72361b..752dea0b3 100644 --- a/src/video/cocoa/SDL_cocoamessagebox.m +++ b/src/video/cocoa/SDL_cocoamessagebox.m @@ -32,6 +32,29 @@ #include "SDL_messagebox.h" #include "SDL_cocoavideo.h" +@interface SDLMessageBoxPresenter : NSObject { +@public + NSInteger clicked; +} +@end + +@implementation SDLMessageBoxPresenter +- (id)init +{ + self = [super init]; + if (self) { + clicked = -1; + } + + return self; +} + +- (void)showAlert:(NSAlert*)alert +{ + clicked = [alert runModal]; +} +@end + /* Display a Cocoa message box */ int @@ -41,7 +64,7 @@ Cocoa_ShowMessageBox(const SDL_MessageBoxData *messageboxdata, int *buttonid) NSAutoreleasePool *pool = [[NSAutoreleasePool alloc] init]; - NSAlert* alert = [[NSAlert alloc] init]; + NSAlert* alert = [[[NSAlert alloc] init] autorelease]; if (messageboxdata->flags & SDL_MESSAGEBOX_ERROR) { [alert setAlertStyle:NSCriticalAlertStyle]; @@ -67,14 +90,27 @@ Cocoa_ShowMessageBox(const SDL_MessageBoxData *messageboxdata, int *buttonid) } } - NSInteger clicked = [alert runModal]; - clicked -= NSAlertFirstButtonReturn; - *buttonid = buttons[clicked].buttonid; - [alert release]; + SDLMessageBoxPresenter* presenter = [[[SDLMessageBoxPresenter alloc] init] autorelease]; + + [presenter performSelectorOnMainThread:@selector(showAlert:) + withObject:alert + waitUntilDone:YES]; + + int returnValue = 0; + NSInteger clicked = presenter->clicked; + if (clicked >= NSAlertFirstButtonReturn) + { + clicked -= NSAlertFirstButtonReturn; + *buttonid = buttons[clicked].buttonid; + } + else + { + returnValue = SDL_SetError("Did not get a valid `clicked button' id: %d", clicked); + } [pool release]; - return 0; + return returnValue; } #endif /* SDL_VIDEO_DRIVER_COCOA */ diff --git a/test/testmessage.c b/test/testmessage.c index 3a8cf6be0..51aefce64 100644 --- a/test/testmessage.c +++ b/test/testmessage.c @@ -29,13 +29,67 @@ quit(int rc) exit(rc); } +static int +button_messagebox(void *eventNumber) +{ + const SDL_MessageBoxButtonData buttons[] = { + { + SDL_MESSAGEBOX_BUTTON_RETURNKEY_DEFAULT, + 0, + "OK" + },{ + SDL_MESSAGEBOX_BUTTON_ESCAPEKEY_DEFAULT, + 1, + "Cancel" + }, + }; + + SDL_MessageBoxData data = { + SDL_MESSAGEBOX_INFORMATION, + NULL, // no parent window + "Custom MessageBox", + "This is a custom messagebox", + 2, + buttons, + NULL // Default color scheme + }; + + int button = -1; + int success = 0; + if (eventNumber) { + data.message = "This is a custom messagebox from a background thread."; + } + + success =SDL_ShowMessageBox(&data, &button); + if (success == -1) { + printf("Error Presenting MessageBox: %s\n", SDL_GetError()); + if (eventNumber) { + SDL_UserEvent event; + event.type = (intptr_t)eventNumber; + SDL_PushEvent((SDL_Event*)&event); + return 1; + } else { + quit(2); + } + } + printf("Pressed button: %d, %s\n", button, button == 1 ? "Cancel" : "OK"); + + if (eventNumber) { + SDL_UserEvent event; + event.type = (intptr_t)eventNumber; + SDL_PushEvent((SDL_Event*)&event); + } + + return 0; +} + int main(int argc, char *argv[]) { int success; /* Load the SDL library */ - if (SDL_Init(0) < 0) { + if (SDL_Init(SDL_INIT_VIDEO) < 0) { fprintf(stderr, "Couldn't initialize SDL: %s\n", SDL_GetError()); return (1); } @@ -78,36 +132,27 @@ main(int argc, char *argv[]) quit(1); } + button_messagebox(NULL); + + /* Technically this isn't a supported operation for the API, but it doesn't + * hurt for it to work. + */ { - const SDL_MessageBoxButtonData buttons[] = { - { - SDL_MESSAGEBOX_BUTTON_RETURNKEY_DEFAULT, - 0, - "OK" - },{ - SDL_MESSAGEBOX_BUTTON_ESCAPEKEY_DEFAULT, - 1, - "Cancel" - }, - }; + int status = 0; + SDL_Event event; + intptr_t eventNumber = SDL_RegisterEvents(1); + SDL_Thread* thread = SDL_CreateThread(&button_messagebox, "MessageBox", (void*)eventNumber); - SDL_MessageBoxData data = { - SDL_MESSAGEBOX_INFORMATION, - NULL, // no parent window - "Custom MessageBox", - "This is a custom messagebox", - 2, - buttons, - NULL // Default color scheme - }; - - int button = -1; - success = SDL_ShowMessageBox(&data, &button); - if (success == -1) { - printf("Error Presenting MessageBox: %s\n", SDL_GetError()); - quit(2); + while (SDL_WaitEvent(&event)) + { + if (event.type == eventNumber) { + break; + } } - printf("Pressed button: %d, %s\n", button, button == 1 ? "Cancel" : "OK"); + + SDL_WaitThread(thread, &status); + + printf("Message box thread return %i\n", status); } SDL_Quit(); From f7032de060b142d150befafa9d6effc101de9662 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?J=C3=B8rgen=20P=2E=20Tjern=C3=B8?= Date: Mon, 22 Apr 2013 18:14:55 -0700 Subject: [PATCH 007/542] Send mouse leave updates for Windows and X11. We now generate a final SDL_MOUSEMOTION before the cursor leaves the window, followed by a SDL_WINDOWEVENT_LEAVE. --- src/events/SDL_mouse.c | 26 ++++++++++++++++++-------- src/events/SDL_windowevents.c | 2 ++ src/video/SDL_sysvideo.h | 3 +++ src/video/SDL_video.c | 13 +++++++++++++ src/video/windows/SDL_windowsevents.c | 10 ++++++++-- src/video/windows/SDL_windowsvideo.c | 1 + src/video/windows/SDL_windowswindow.c | 19 +++++++++++++++++++ src/video/windows/SDL_windowswindow.h | 1 + src/video/x11/SDL_x11events.c | 4 ++++ 9 files changed, 69 insertions(+), 10 deletions(-) diff --git a/src/events/SDL_mouse.c b/src/events/SDL_mouse.c index d467d0791..d8d811bba 100644 --- a/src/events/SDL_mouse.c +++ b/src/events/SDL_mouse.c @@ -33,6 +33,8 @@ /* The mouse state */ static SDL_Mouse SDL_mouse; +static int +SDL_PrivateSendMouseMotion(SDL_Window * window, SDL_MouseID mouseID, int relative, int x, int y); /* Public functions */ int @@ -154,8 +156,9 @@ SDL_UpdateMouseFocus(SDL_Window * window, int x, int y, Uint32 buttonstate) #endif if (window == mouse->focus) { #ifdef DEBUG_MOUSE - printf("Mouse left window, synthesizing focus lost event\n"); + printf("Mouse left window, synthesizing move & focus lost event\n"); #endif + SDL_PrivateSendMouseMotion(window, mouse->mouseID, 0, x, y); SDL_SetMouseFocus(NULL); } return SDL_FALSE; @@ -175,6 +178,19 @@ SDL_UpdateMouseFocus(SDL_Window * window, int x, int y, Uint32 buttonstate) int SDL_SendMouseMotion(SDL_Window * window, SDL_MouseID mouseID, int relative, int x, int y) +{ + if (window && !relative) { + SDL_Mouse *mouse = SDL_GetMouse(); + if (!SDL_UpdateMouseFocus(window, x, y, mouse->buttonstate)) { + return 0; + } + } + + return SDL_PrivateSendMouseMotion(window, mouseID, relative, x, y); +} + +static int +SDL_PrivateSendMouseMotion(SDL_Window * window, SDL_MouseID mouseID, int relative, int x, int y) { SDL_Mouse *mouse = SDL_GetMouse(); int posted; @@ -182,12 +198,6 @@ SDL_SendMouseMotion(SDL_Window * window, SDL_MouseID mouseID, int relative, int int yrel; int x_max = 0, y_max = 0; - if (window && !relative) { - if (!SDL_UpdateMouseFocus(window, x, y, mouse->buttonstate)) { - return 0; - } - } - /* relative motion is calculated regarding the system cursor last position */ if (relative) { xrel = x; @@ -676,4 +686,4 @@ SDL_ShowCursor(int toggle) return shown; } -/* vi: set ts=4 sw=4 expandtab: */ +/* vi: set ts=4 sw=4 expandtab: */ \ No newline at end of file diff --git a/src/events/SDL_windowevents.c b/src/events/SDL_windowevents.c index 0e8c27c77..60d65ae57 100644 --- a/src/events/SDL_windowevents.c +++ b/src/events/SDL_windowevents.c @@ -148,12 +148,14 @@ SDL_SendWindowEvent(SDL_Window * window, Uint8 windowevent, int data1, return 0; } window->flags |= SDL_WINDOW_MOUSE_FOCUS; + SDL_OnWindowEnter(window); break; case SDL_WINDOWEVENT_LEAVE: if (!(window->flags & SDL_WINDOW_MOUSE_FOCUS)) { return 0; } window->flags &= ~SDL_WINDOW_MOUSE_FOCUS; + SDL_OnWindowLeave(window); break; case SDL_WINDOWEVENT_FOCUS_GAINED: if (window->flags & SDL_WINDOW_INPUT_FOCUS) { diff --git a/src/video/SDL_sysvideo.h b/src/video/SDL_sysvideo.h index 4874014d7..2de5b83d1 100644 --- a/src/video/SDL_sysvideo.h +++ b/src/video/SDL_sysvideo.h @@ -201,6 +201,7 @@ struct SDL_VideoDevice int (*CreateWindowFramebuffer) (_THIS, SDL_Window * window, Uint32 * format, void ** pixels, int *pitch); int (*UpdateWindowFramebuffer) (_THIS, SDL_Window * window, const SDL_Rect * rects, int numrects); void (*DestroyWindowFramebuffer) (_THIS, SDL_Window * window); + void (*OnWindowEnter) (_THIS, SDL_Window * window); /* * * */ /* @@ -367,6 +368,8 @@ extern void SDL_OnWindowHidden(SDL_Window * window); extern void SDL_OnWindowResized(SDL_Window * window); extern void SDL_OnWindowMinimized(SDL_Window * window); extern void SDL_OnWindowRestored(SDL_Window * window); +extern void SDL_OnWindowEnter(SDL_Window * window); +extern void SDL_OnWindowLeave(SDL_Window * window); extern void SDL_OnWindowFocusGained(SDL_Window * window); extern void SDL_OnWindowFocusLost(SDL_Window * window); extern void SDL_UpdateWindowGrab(SDL_Window * window); diff --git a/src/video/SDL_video.c b/src/video/SDL_video.c index 1e40ec2cf..8e21579d6 100644 --- a/src/video/SDL_video.c +++ b/src/video/SDL_video.c @@ -2028,6 +2028,19 @@ SDL_OnWindowRestored(SDL_Window * window) } } +void +SDL_OnWindowEnter(SDL_Window * window) +{ + if (_this->OnWindowEnter) { + _this->OnWindowEnter(_this, window); + } +} + +void +SDL_OnWindowLeave(SDL_Window * window) +{ +} + void SDL_OnWindowFocusGained(SDL_Window * window) { diff --git a/src/video/windows/SDL_windowsevents.c b/src/video/windows/SDL_windowsevents.c index fc85e4493..f38429532 100644 --- a/src/video/windows/SDL_windowsevents.c +++ b/src/video/windows/SDL_windowsevents.c @@ -445,10 +445,16 @@ WIN_WindowProc(HWND hwnd, UINT msg, WPARAM wParam, LPARAM lParam) } #ifdef WM_MOUSELEAVE - /* FIXME: Do we need the SDL 1.2 hack to generate WM_MOUSELEAVE now? */ case WM_MOUSELEAVE: if (SDL_GetMouseFocus() == data->window) { - SDL_SetMouseFocus(NULL); + if (!SDL_GetMouse()->relative_mode) { + POINT cursorPos; + GetCursorPos(&cursorPos); + ScreenToClient(hwnd, &cursorPos); + SDL_SendMouseMotion(data->window, 0, 0, cursorPos.x, cursorPos.y); + } + + SDL_SetMouseFocus(NULL); } returnCode = 0; break; diff --git a/src/video/windows/SDL_windowsvideo.c b/src/video/windows/SDL_windowsvideo.c index c64749f4f..7b46d2751 100644 --- a/src/video/windows/SDL_windowsvideo.c +++ b/src/video/windows/SDL_windowsvideo.c @@ -121,6 +121,7 @@ WIN_CreateDevice(int devindex) device->CreateWindowFramebuffer = WIN_CreateWindowFramebuffer; device->UpdateWindowFramebuffer = WIN_UpdateWindowFramebuffer; device->DestroyWindowFramebuffer = WIN_DestroyWindowFramebuffer; + device->OnWindowEnter = WIN_OnWindowEnter; device->shape_driver.CreateShaper = Win32_CreateShaper; device->shape_driver.SetWindowShape = Win32_SetWindowShape; diff --git a/src/video/windows/SDL_windowswindow.c b/src/video/windows/SDL_windowswindow.c index 800349235..97db15fb2 100644 --- a/src/video/windows/SDL_windowswindow.c +++ b/src/video/windows/SDL_windowswindow.c @@ -678,6 +678,25 @@ SDL_HelperWindowDestroy(void) } } +void WIN_OnWindowEnter(_THIS, SDL_Window * window) +{ +#ifdef WM_MOUSELEAVE + SDL_WindowData *data = (SDL_WindowData *) window->driverdata; + TRACKMOUSEEVENT trackMouseEvent; + + if (!data || !data->hwnd) { + /* The window wasn't fully initialized */ + return; + } + + trackMouseEvent.cbSize = sizeof(TRACKMOUSEEVENT); + trackMouseEvent.dwFlags = TME_LEAVE; + trackMouseEvent.hwndTrack = data->hwnd; + + TrackMouseEvent(&trackMouseEvent); +#endif /* WM_MOUSELEAVE */ +} + #endif /* SDL_VIDEO_DRIVER_WINDOWS */ /* vi: set ts=4 sw=4 expandtab: */ diff --git a/src/video/windows/SDL_windowswindow.h b/src/video/windows/SDL_windowswindow.h index 7339d7812..e85c20181 100644 --- a/src/video/windows/SDL_windowswindow.h +++ b/src/video/windows/SDL_windowswindow.h @@ -56,6 +56,7 @@ extern void WIN_SetWindowGrab(_THIS, SDL_Window * window, SDL_bool grabbed); extern void WIN_DestroyWindow(_THIS, SDL_Window * window); extern SDL_bool WIN_GetWindowWMInfo(_THIS, SDL_Window * window, struct SDL_SysWMinfo *info); +extern void WIN_OnWindowEnter(_THIS, SDL_Window * window); #endif /* _SDL_windowswindow_h */ diff --git a/src/video/x11/SDL_x11events.c b/src/video/x11/SDL_x11events.c index 6c54e9dc9..dac11bb0f 100644 --- a/src/video/x11/SDL_x11events.c +++ b/src/video/x11/SDL_x11events.c @@ -324,6 +324,10 @@ X11_DispatchEvent(_THIS) if (xevent.xcrossing.mode == NotifyUngrab) printf("Mode: NotifyUngrab\n"); #endif + if (!SDL_GetMouse()->relative_mode) { + SDL_SendMouseMotion(data->window, 0, 0, xevent.xcrossing.x, xevent.xcrossing.y); + } + if (xevent.xcrossing.mode != NotifyGrab && xevent.xcrossing.mode != NotifyUngrab && xevent.xcrossing.detail != NotifyInferior) { From 5a4c9c40f2254f8199b01d49941b17de1099b628 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?J=C3=B8rgen=20P=2E=20Tjern=C3=B8?= Date: Mon, 22 Apr 2013 18:15:00 -0700 Subject: [PATCH 008/542] Forgot to add this file to Mac crash fix. --- src/video/cocoa/SDL_cocoawindow.h | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/src/video/cocoa/SDL_cocoawindow.h b/src/video/cocoa/SDL_cocoawindow.h index 24ad71f1a..180cd0e3f 100644 --- a/src/video/cocoa/SDL_cocoawindow.h +++ b/src/video/cocoa/SDL_cocoawindow.h @@ -34,9 +34,13 @@ typedef struct SDL_WindowData SDL_WindowData; @interface Cocoa_WindowListener : NSResponder { #endif SDL_WindowData *_data; + BOOL observingVisible; + BOOL wasVisible; } -(void) listen:(SDL_WindowData *) data; +-(void) pauseVisibleObservation; +-(void) resumeVisibleObservation; -(void) close; /* Window delegate functionality */ From 187143d6189048162ac5ea346ca9d54f6ae4d797 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?J=C3=B8rgen=20P=2E=20Tjern=C3=B8?= Date: Mon, 22 Apr 2013 18:15:08 -0700 Subject: [PATCH 009/542] SDL_GL_DeleteContext would leave an invalid current_glctx. Calling SDL_GL_DeleteContext wouldn't update current_glctx, so you could end up with use-after-free and other goodies when you deleted a context. --- src/render/opengl/SDL_render_gl.c | 3 +-- src/video/SDL_video.c | 17 +++++++++++------ 2 files changed, 12 insertions(+), 8 deletions(-) diff --git a/src/render/opengl/SDL_render_gl.c b/src/render/opengl/SDL_render_gl.c index 30d0716bb..097f84faa 100644 --- a/src/render/opengl/SDL_render_gl.c +++ b/src/render/opengl/SDL_render_gl.c @@ -1241,8 +1241,7 @@ GL_DestroyRenderer(SDL_Renderer * renderer) GL_CheckError("", renderer); SDL_free(data->framebuffers); data->framebuffers = nextnode; - } - /* SDL_GL_MakeCurrent(0, NULL); *//* doesn't do anything */ + } SDL_GL_DeleteContext(data->context); } SDL_free(data); diff --git a/src/video/SDL_video.c b/src/video/SDL_video.c index 8e21579d6..694291022 100644 --- a/src/video/SDL_video.c +++ b/src/video/SDL_video.c @@ -2690,13 +2690,14 @@ SDL_GL_MakeCurrent(SDL_Window * window, SDL_GLContext ctx) { int retval; - CHECK_WINDOW_MAGIC(window, -1); - - if (!(window->flags & SDL_WINDOW_OPENGL)) { - return SDL_SetError("The specified window isn't an OpenGL window"); - } if (!ctx) { window = NULL; + } else { + CHECK_WINDOW_MAGIC(window, -1); + + if (!(window->flags & SDL_WINDOW_OPENGL)) { + return SDL_SetError("The specified window isn't an OpenGL window"); + } } if ((window == _this->current_glwin) && (ctx == _this->current_glctx)) { @@ -2758,7 +2759,11 @@ SDL_GL_DeleteContext(SDL_GLContext context) if (!_this || !context) { return; } - _this->GL_MakeCurrent(_this, NULL, NULL); + + if (_this->current_glctx == context) { + SDL_GL_MakeCurrent(NULL, NULL); + } + _this->GL_DeleteContext(_this, context); } From 4601f48f85499ec12d6ecb7ce343441c41297bca Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?J=C3=B8rgen=20P=2E=20Tjern=C3=B8?= Date: Mon, 22 Apr 2013 18:15:10 -0700 Subject: [PATCH 010/542] Add multimon & mouse tracking info to SDL_test_common. --- src/test/SDL_test_common.c | 47 +++++++++++++++++++++++++++++++++++++- 1 file changed, 46 insertions(+), 1 deletion(-) diff --git a/src/test/SDL_test_common.c b/src/test/SDL_test_common.c index e050de735..04103a3e4 100644 --- a/src/test/SDL_test_common.c +++ b/src/test/SDL_test_common.c @@ -1097,10 +1097,33 @@ SDLTest_ScreenShot(SDL_Renderer *renderer) } } +static void +FullscreenTo(int index, int windowId) +{ + Uint32 flags; + struct SDL_Rect rect = { 0, 0, 0, 0 }; + SDL_Window *window = SDL_GetWindowFromID(windowId); + if (!window) { + return; + } + + SDL_GetDisplayBounds( index, &rect ); + + flags = SDL_GetWindowFlags(window); + if (flags & SDL_WINDOW_FULLSCREEN) { + SDL_SetWindowFullscreen( window, SDL_FALSE ); + SDL_Delay( 15 ); + } + + SDL_SetWindowPosition( window, rect.x, rect.y ); + SDL_SetWindowFullscreen( window, SDL_TRUE ); +} + void SDLTest_CommonEvent(SDLTest_CommonState * state, SDL_Event * event, int *done) { int i; + static SDL_MouseMotionEvent lastEvent; if (state->verbose & VERBOSE_EVENT) { SDLTest_PrintEvent(event); @@ -1255,15 +1278,34 @@ SDLTest_CommonEvent(SDLTest_CommonState * state, SDL_Event * event, int *done) } } break; - case SDLK_1: + case SDLK_0: if (event->key.keysym.mod & KMOD_CTRL) { SDL_Window *window = SDL_GetWindowFromID(event->key.windowID); SDL_ShowSimpleMessageBox(SDL_MESSAGEBOX_INFORMATION, "Test Message", "You're awesome!", window); } break; + case SDLK_1: + if (event->key.keysym.mod & KMOD_CTRL) { + FullscreenTo(0, event->key.windowID); + } + break; + case SDLK_2: + if (event->key.keysym.mod & KMOD_CTRL) { + FullscreenTo(1, event->key.windowID); + } + break; case SDLK_ESCAPE: *done = 1; break; + case SDLK_SPACE: + { + char message[256]; + SDL_Window *window = SDL_GetWindowFromID(event->key.windowID); + + SDL_snprintf(message, sizeof(message), "(%i, %i), rel (%i, %i)\n", lastEvent.x, lastEvent.y, lastEvent.xrel, lastEvent.yrel); + SDL_ShowSimpleMessageBox(SDL_MESSAGEBOX_INFORMATION, "Last mouse position", message, window); + break; + } default: break; } @@ -1271,6 +1313,9 @@ SDLTest_CommonEvent(SDLTest_CommonState * state, SDL_Event * event, int *done) case SDL_QUIT: *done = 1; break; + case SDL_MOUSEMOTION: + lastEvent = event->motion; + break; } } From e4f63226892123d5b54fa1a0c8ba9ae952a804d4 Mon Sep 17 00:00:00 2001 From: Andreas Schiffler Date: Tue, 23 Apr 2013 08:07:52 -0700 Subject: [PATCH 011/542] Add tests to audio suite --- test/testautomation_audio.c | 176 ++++++++++++++++++++++++++++++++++-- 1 file changed, 170 insertions(+), 6 deletions(-) diff --git a/test/testautomation_audio.c b/test/testautomation_audio.c index b593e0da1..4efe4231e 100644 --- a/test/testautomation_audio.c +++ b/test/testautomation_audio.c @@ -26,8 +26,164 @@ _audioSetUp(void *arg) } +/* Test callback function */ +void _audio_testCallback(void *userdata, Uint8 *stream, int len) +{ + /* TODO: add tracking if callback was called */ +} + + /* Test case functions */ +/** + * \brief Stop and restart audio subsystem + * + * \sa http://wiki.libsdl.org/moin.cgi/SDL_QuitSubSystem + * \sa http://wiki.libsdl.org/moin.cgi/SDL_InitSubSystem + */ +int audio_quitInitAudioSubSystem() +{ + /* Stop SDL audio subsystem */ + SDL_QuitSubSystem( SDL_INIT_AUDIO ); + SDLTest_AssertPass("Call to SDL_QuitSubSystem(SDL_INIT_AUDIO)"); + + /* Restart audio again */ + _audioSetUp(NULL); +} + +/** + * \brief Start and stop audio directly + * + * \sa http://wiki.libsdl.org/moin.cgi/SDL_InitAudio + * \sa http://wiki.libsdl.org/moin.cgi/SDL_QuitAudio + */ +int audio_initQuitAudio() +{ + int result; + int i, iMax; + const char* audioDriver; + + /* Stop SDL audio subsystem */ + SDL_QuitSubSystem( SDL_INIT_AUDIO ); + SDLTest_AssertPass("Call to SDL_QuitSubSystem(SDL_INIT_AUDIO)"); + + /* Loop over all available audio drivers */ + iMax = SDL_GetNumAudioDrivers(); + SDLTest_AssertPass("Call to SDL_GetNumAudioDrivers"); + SDLTest_AssertCheck(iMax > 0, "Validate number of audio drivers; expected: >0 got: %d", iMax); + for (i = 0; i < iMax; i++) { + audioDriver = SDL_GetAudioDriver(i); + SDLTest_AssertPass("Call to SDL_GetAudioDriver(%d)", i); + SDLTest_AssertCheck(audioDriver != NULL, "Audio driver name is not NULL"); + SDLTest_AssertCheck(SDL_strlen(audioDriver) > 0, "Audio driver name is not empty; got: %s", audioDriver); + + /* Call Init */ + result = SDL_AudioInit(audioDriver); + SDLTest_AssertPass("Call to SDL_AudioInit('%s')", audioDriver); + SDLTest_AssertCheck(result == 0, "Validate result value; expected: 0 got: %d", result); + + /* Call Quit */ + SDL_AudioQuit(); + SDLTest_AssertPass("Call to SDL_AudioQuit()"); + } + + /* NULL driver specification */ + audioDriver = NULL; + + /* Call Init */ + result = SDL_AudioInit(audioDriver); + SDLTest_AssertPass("Call to SDL_AudioInit(NULL)"); + SDLTest_AssertCheck(result == 0, "Validate result value; expected: 0 got: %d", result); + + /* Call Quit */ + SDL_AudioQuit(); + SDLTest_AssertPass("Call to SDL_AudioQuit()"); + + /* Restart audio again */ + _audioSetUp(NULL); +} + +/** + * \brief Start, open, close and stop audio + * + * \sa http://wiki.libsdl.org/moin.cgi/SDL_InitAudio + * \sa http://wiki.libsdl.org/moin.cgi/SDL_OpenAudio + * \sa http://wiki.libsdl.org/moin.cgi/SDL_CloseAudio + * \sa http://wiki.libsdl.org/moin.cgi/SDL_QuitAudio + */ +int audio_initOpenCloseQuitAudio() +{ + int result; + int i, iMax, j; + const char* audioDriver; + SDL_AudioSpec desired; + SDL_AudioSpec obtained; + + /* Stop SDL audio subsystem */ + SDL_QuitSubSystem( SDL_INIT_AUDIO ); + SDLTest_AssertPass("Call to SDL_QuitSubSystem(SDL_INIT_AUDIO)"); + + /* Loop over all available audio drivers */ + iMax = SDL_GetNumAudioDrivers(); + SDLTest_AssertPass("Call to SDL_GetNumAudioDrivers"); + SDLTest_AssertCheck(iMax > 0, "Validate number of audio drivers; expected: >0 got: %d", iMax); + for (i = 0; i < iMax; i++) { + audioDriver = SDL_GetAudioDriver(i); + SDLTest_AssertPass("Call to SDL_GetAudioDriver(%d)", i); + SDLTest_AssertCheck(audioDriver != NULL, "Audio driver name is not NULL"); + SDLTest_AssertCheck(SDL_strlen(audioDriver) > 0, "Audio driver name is not empty; got: %s", audioDriver); + + /* Change specs */ + for (j = 0; j < 2; j++) { + + /* Call Init */ + result = SDL_AudioInit(audioDriver); + SDLTest_AssertPass("Call to SDL_AudioInit('%s')", audioDriver); + SDLTest_AssertCheck(result == 0, "Validate result value; expected: 0 got: %d", result); + + /* Set spec */ + SDL_memset(&desired, 0, sizeof(desired)); + switch (j) { + case 0: + /* Set standard desired spec */ + desired.freq = 22050; + desired.format = AUDIO_S16SYS; + desired.channels = 2; + desired.samples = 4096; + desired.callback = _audio_testCallback; + desired.userdata = NULL; + + case 1: + /* Set custom desired spec */ + desired.freq = 48000; + desired.format = AUDIO_F32SYS; + desired.channels = 2; + desired.samples = 2048; + desired.callback = _audio_testCallback; + desired.userdata = NULL; + break; + } + + /* Call Open */ + result = SDL_OpenAudio(&desired, NULL); + SDLTest_AssertPass("Call to SDL_OpenAudio(desired_spec_%d, NULL)", j); + SDLTest_AssertCheck(result == 0, "Verify return value; expected: 0 got: %d", result); + + /* Call Close */ + SDL_CloseAudio(); + SDLTest_AssertPass("Call to SDL_CloseAudio()"); + + /* Call Quit */ + SDL_AudioQuit(); + SDLTest_AssertPass("Call to SDL_AudioQuit()"); + + } /* spec loop */ + } /* driver loop */ + + /* Restart audio again */ + _audioSetUp(NULL); +} + /** * \brief Enumerate and name available audio devices (output and capture). * @@ -377,11 +533,6 @@ int audio_getAudioStatus() } -/* Test callback function */ -void _audio_testCallback(void *userdata, Uint8 *stream, int len) -{ - /* TODO: add tracking if callback was called */ -} /** * \brief Opens, checks current audio status, and closes a device. @@ -708,10 +859,23 @@ static const SDLTest_TestCaseReference audioTest10 = static const SDLTest_TestCaseReference audioTest11 = { (SDLTest_TestCaseFp)audio_openCloseAudioDeviceConnected, "audio_openCloseAudioDeviceConnected", "Opens and closes audio device and get connected status.", TEST_DISABLED }; +static const SDLTest_TestCaseReference audioTest12 = + { (SDLTest_TestCaseFp)audio_quitInitAudioSubSystem, "audio_quitInitAudioSubSystem", "Quit and re-init audio subsystem.", TEST_ENABLED }; + +static const SDLTest_TestCaseReference audioTest13 = + { (SDLTest_TestCaseFp)audio_initQuitAudio, "audio_initQuitAudio", "Init and quit audio drivers directly.", TEST_ENABLED }; + +/* TODO: enable when bugs 1343 and 1396 are fixed. */ +/* For debugging, test case can be run manually using --filter audio_initOpenCloseQuitAudio */ + +static const SDLTest_TestCaseReference audioTest14 = + { (SDLTest_TestCaseFp)audio_initOpenCloseQuitAudio, "audio_initOpenCloseQuitAudio", "Cycle through init, open, close and quit with various audio specs.", TEST_DISABLED }; + /* Sequence of Audio test cases */ static const SDLTest_TestCaseReference *audioTests[] = { &audioTest1, &audioTest2, &audioTest3, &audioTest4, &audioTest5, &audioTest6, - &audioTest7, &audioTest8, &audioTest9, &audioTest10, &audioTest11, NULL + &audioTest7, &audioTest8, &audioTest9, &audioTest10, &audioTest11, + &audioTest12, &audioTest13, &audioTest14, NULL }; /* Audio test suite (global) */ From 2b47360970cb2e302cf289d0e87e81924532c1ad Mon Sep 17 00:00:00 2001 From: Andreas Schiffler Date: Tue, 23 Apr 2013 08:19:21 -0700 Subject: [PATCH 012/542] Disable one test that crashes audio suite when run together with other tests --- test/testautomation_audio.c | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/test/testautomation_audio.c b/test/testautomation_audio.c index 4efe4231e..b50494948 100644 --- a/test/testautomation_audio.c +++ b/test/testautomation_audio.c @@ -862,8 +862,11 @@ static const SDLTest_TestCaseReference audioTest11 = static const SDLTest_TestCaseReference audioTest12 = { (SDLTest_TestCaseFp)audio_quitInitAudioSubSystem, "audio_quitInitAudioSubSystem", "Quit and re-init audio subsystem.", TEST_ENABLED }; +/* TODO: enable when bugs 1343 and 1396 are fixed. */ +/* For debugging, test case can be run manually using --filter audio_initQuitAudio */ + static const SDLTest_TestCaseReference audioTest13 = - { (SDLTest_TestCaseFp)audio_initQuitAudio, "audio_initQuitAudio", "Init and quit audio drivers directly.", TEST_ENABLED }; + { (SDLTest_TestCaseFp)audio_initQuitAudio, "audio_initQuitAudio", "Init and quit audio drivers directly.", TEST_DISABLED }; /* TODO: enable when bugs 1343 and 1396 are fixed. */ /* For debugging, test case can be run manually using --filter audio_initOpenCloseQuitAudio */ From b1b1c1e2d103af0864651b482bcdda1ed2c85411 Mon Sep 17 00:00:00 2001 From: Gabriel Jacobo Date: Tue, 23 Apr 2013 16:44:54 -0300 Subject: [PATCH 013/542] Moved warning about SDL_AndroidGetActivity to SDL_system.h --- include/SDL_system.h | 3 +++ src/core/android/SDL_android.cpp | 8 +++----- 2 files changed, 6 insertions(+), 5 deletions(-) diff --git a/include/SDL_system.h b/include/SDL_system.h index 5ae9e402f..d5db78fd5 100644 --- a/include/SDL_system.h +++ b/include/SDL_system.h @@ -62,6 +62,9 @@ extern DECLSPEC void * SDLCALL SDL_AndroidGetJNIEnv(); /* Get the SDL Activity object for the application This returns jobject, but the prototype is void* so we don't need jni.h + The jobject returned by SDL_AndroidGetActivity is a local reference. + It is the caller's responsibility to properly release it + (using LocalReferenceHolder or manually with env->DeleteLocalRef) */ extern DECLSPEC void * SDLCALL SDL_AndroidGetActivity(); diff --git a/src/core/android/SDL_android.cpp b/src/core/android/SDL_android.cpp index 5ab147e2a..6bdf34317 100644 --- a/src/core/android/SDL_android.cpp +++ b/src/core/android/SDL_android.cpp @@ -1130,14 +1130,12 @@ extern "C" void *SDL_AndroidGetJNIEnv() return Android_JNI_GetEnv(); } -/* - * The jobject returned by SDL_AndroidGetActivity is a local reference. - * It is the caller's responsibility to properly release it - * (using LocalReferenceHolder or manually with env->DeleteLocalRef) - */ + extern "C" void *SDL_AndroidGetActivity() { + /* See SDL_system.h for caveats on using this function. */ + jmethodID mid; JNIEnv *env = Android_JNI_GetEnv(); From 4b4bea7294bc233d8ed6fc3d0a8154877b3f05b0 Mon Sep 17 00:00:00 2001 From: Gabriel Jacobo Date: Tue, 23 Apr 2013 16:54:52 -0300 Subject: [PATCH 014/542] Fixes PSP_DestroyTexture release of data (don't release the SDL_Texture pointer) --- src/render/psp/SDL_render_psp.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/src/render/psp/SDL_render_psp.c b/src/render/psp/SDL_render_psp.c index 3bcd87965..4d8f33304 100644 --- a/src/render/psp/SDL_render_psp.c +++ b/src/render/psp/SDL_render_psp.c @@ -990,9 +990,9 @@ PSP_DestroyTexture(SDL_Renderer * renderer, SDL_Texture * texture) if(psp_texture->data != 0) { - free(psp_texture->data); + SDL_free(psp_texture->data); } - free(texture); + SDL_free(psp_texture); texture->driverdata = NULL; } From 694ebd59a3211ee60be87a33f2cb1aab2deea8e8 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?J=C3=B8rgen=20P=2E=20Tjern=C3=B8?= Date: Tue, 23 Apr 2013 18:47:32 -0700 Subject: [PATCH 015/542] Make sure to send MOUSEMOTION on window enter. This should hopefully fix bug #1612. We now send mousemotion events when the cursor enters the window as well as when it leaves. Thanks to Alex Szpakowski for the fix. Fixes http://bugzilla.libsdl.org/show_bug.cgi?id=1612 --HG-- extra : histedit_source : e89e8952efcc07da98a306757edeaeded31517a9 --- src/events/SDL_mouse.c | 10 ++++------ src/video/x11/SDL_x11events.c | 4 ++++ 2 files changed, 8 insertions(+), 6 deletions(-) diff --git a/src/events/SDL_mouse.c b/src/events/SDL_mouse.c index d8d811bba..67a143902 100644 --- a/src/events/SDL_mouse.c +++ b/src/events/SDL_mouse.c @@ -165,13 +165,11 @@ SDL_UpdateMouseFocus(SDL_Window * window, int x, int y, Uint32 buttonstate) } if (window != mouse->focus) { - mouse->last_x = x; - mouse->last_y = y; - #ifdef DEBUG_MOUSE - printf("Mouse entered window, synthesizing focus gain event\n"); + printf("Mouse entered window, synthesizing focus gain & move event\n"); #endif - SDL_SetMouseFocus(window); + SDL_SetMouseFocus(window); + SDL_PrivateSendMouseMotion(window, mouse->mouseID, 0, x, y); } return SDL_TRUE; } @@ -686,4 +684,4 @@ SDL_ShowCursor(int toggle) return shown; } -/* vi: set ts=4 sw=4 expandtab: */ \ No newline at end of file +/* vi: set ts=4 sw=4 expandtab: */ diff --git a/src/video/x11/SDL_x11events.c b/src/video/x11/SDL_x11events.c index dac11bb0f..e26f64ca3 100644 --- a/src/video/x11/SDL_x11events.c +++ b/src/video/x11/SDL_x11events.c @@ -310,6 +310,10 @@ X11_DispatchEvent(_THIS) printf("Mode: NotifyUngrab\n"); #endif SDL_SetMouseFocus(data->window); + + if (!SDL_GetMouse()->relative_mode) { + SDL_SendMouseMotion(data->window, 0, 0, xevent.xcrossing.x, xevent.xcrossing.y); + } } break; /* Losing mouse coverage? */ From 4f88e70fe6b18de0837466723085319657e7adf5 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?J=C3=B8rgen=20P=2E=20Tjern=C3=B8?= Date: Tue, 23 Apr 2013 18:47:38 -0700 Subject: [PATCH 016/542] Mac: Make mouse movement smooth at edge of window when grabbed. There's a limit of one update every 250ms when warping the mouse, and we can work around that by disassociating the cursor & the mouse before issuing our warp, then re-associating them. --HG-- extra : histedit_source : 91ddf6078107ea9faf1c769a459e99bce6e61180 --- src/video/cocoa/SDL_cocoawindow.m | 7 +++++++ 1 file changed, 7 insertions(+) diff --git a/src/video/cocoa/SDL_cocoawindow.m b/src/video/cocoa/SDL_cocoawindow.m index 5e9c599fe..56eaa5134 100644 --- a/src/video/cocoa/SDL_cocoawindow.m +++ b/src/video/cocoa/SDL_cocoawindow.m @@ -392,7 +392,14 @@ static __inline__ void ConvertNSRect(NSRect *r) cgpoint.x = window->x + x; cgpoint.y = window->y + y; + + /* We have to disassociate the curosr & the mouse before issuing + * this cursor warp, otherwise it gets limited to one update per + * 250ms, and looks very choppy. + */ + CGAssociateMouseAndMouseCursorPosition(NO); CGDisplayMoveCursorToPoint(kCGDirectMainDisplay, cgpoint); + CGAssociateMouseAndMouseCursorPosition(YES); } } SDL_SendMouseMotion(window, 0, 0, x, y); From 059ea2c1c64f85b95f8bfdcf1b27a6015b8c09d5 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?J=C3=B8rgen=20P=2E=20Tjern=C3=B8?= Date: Tue, 23 Apr 2013 18:47:41 -0700 Subject: [PATCH 017/542] Mac: Fix unmatched hide/show cursor calls. This tracks the previous hide/unhide state of the cursor, so we don't re-hide a hidden cursor. --HG-- extra : histedit_source : d41e30a604fb9ff0da8fcfdd9ca926618e35c750 --- src/video/cocoa/SDL_cocoamouse.m | 15 ++++++++++++--- 1 file changed, 12 insertions(+), 3 deletions(-) diff --git a/src/video/cocoa/SDL_cocoamouse.m b/src/video/cocoa/SDL_cocoamouse.m index a12bde8dd..7dbde9dde 100644 --- a/src/video/cocoa/SDL_cocoamouse.m +++ b/src/video/cocoa/SDL_cocoamouse.m @@ -153,15 +153,24 @@ Cocoa_FreeCursor(SDL_Cursor * cursor) static int Cocoa_ShowCursor(SDL_Cursor * cursor) { + /* We need to track the previous state because hide and unhide calls need to + * be matched, but ShowCursor calls don't. + */ + static SDL_bool isShown = SDL_TRUE; NSAutoreleasePool *pool = [[NSAutoreleasePool alloc] init]; if (cursor) { NSCursor *nscursor = (NSCursor *)cursor->driverdata; [nscursor set]; - [NSCursor unhide]; - } else { - [NSCursor hide]; + + if (!isShown) { + [NSCursor unhide]; + isShown = SDL_TRUE; + } + } else if (isShown) { + [NSCursor hide]; + isShown = SDL_FALSE; } [pool release]; From 7d048468d354bec85fc74b88e67be64f858b5a40 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?J=C3=B8rgen=20P=2E=20Tjern=C3=B8?= Date: Tue, 23 Apr 2013 18:47:44 -0700 Subject: [PATCH 018/542] Mac: Fix cursor not updating when re-focusing the window. This fixes a bug where [NSCursor set] doesn't take when called in certain event handlers (like windowDidBecomeKey:). http://bugzilla.libsdl.org/show_bug.cgi?id=1795 --HG-- extra : histedit_source : 3f150addd3b1b7bc6397aba60ccf05f9065ffb8c --- src/video/cocoa/SDL_cocoamouse.m | 8 +++++++- 1 file changed, 7 insertions(+), 1 deletion(-) diff --git a/src/video/cocoa/SDL_cocoamouse.m b/src/video/cocoa/SDL_cocoamouse.m index 7dbde9dde..60f4a50e2 100644 --- a/src/video/cocoa/SDL_cocoamouse.m +++ b/src/video/cocoa/SDL_cocoamouse.m @@ -162,7 +162,13 @@ Cocoa_ShowCursor(SDL_Cursor * cursor) if (cursor) { NSCursor *nscursor = (NSCursor *)cursor->driverdata; - [nscursor set]; + /* We're possibly executing from an event handler where this operation + * is unsupported. This will execute it in the main Cocoa event loop + * after this returns. + */ + [nscursor performSelectorOnMainThread:@selector(set) + withObject:nil + waitUntilDone:NO]; if (!isShown) { [NSCursor unhide]; From c443135e9471e9ccb9d8d423e2c3375f84c833b1 Mon Sep 17 00:00:00 2001 From: Andreas Schiffler Date: Tue, 23 Apr 2013 20:45:49 -0700 Subject: [PATCH 019/542] Fix double free in video test suite --- test/testautomation_video.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/test/testautomation_video.c b/test/testautomation_video.c index 4e2cfa593..396275239 100644 --- a/test/testautomation_video.c +++ b/test/testautomation_video.c @@ -1698,7 +1698,7 @@ video_getSetWindowData(void *arg) if (referenceUserdata != NULL) SDL_free(referenceUserdata); if (referenceUserdata2 != NULL) SDL_free(referenceUserdata2); if (userdata != NULL) SDL_free(userdata); - if (userdata != NULL) SDL_free(userdata); + if (userdata2 != NULL) SDL_free(userdata2); return returnValue; } From 742233249a1e626758bd1f8400e07e80dd8122d6 Mon Sep 17 00:00:00 2001 From: Gabriel Jacobo Date: Wed, 24 Apr 2013 11:49:52 -0300 Subject: [PATCH 020/542] Bug 1786 - memory leak in WIN_GetDisplayModes by Marcel Bakker --- src/video/windows/SDL_windowsmodes.c | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/src/video/windows/SDL_windowsmodes.c b/src/video/windows/SDL_windowsmodes.c index 97ddc736d..73cae8f37 100644 --- a/src/video/windows/SDL_windowsmodes.c +++ b/src/video/windows/SDL_windowsmodes.c @@ -245,6 +245,7 @@ WIN_GetDisplayModes(_THIS, SDL_VideoDisplay * display) } if (SDL_ISPIXELFORMAT_INDEXED(mode.format)) { /* We don't support palettized modes now */ + SDL_free(mode.driverdata); continue; } if (mode.format != SDL_PIXELFORMAT_UNKNOWN) { @@ -252,6 +253,9 @@ WIN_GetDisplayModes(_THIS, SDL_VideoDisplay * display) SDL_free(mode.driverdata); } } + else { + SDL_free(mode.driverdata); + } } } From 8836a99081fcbf8c71ac7d147378a189a08752c1 Mon Sep 17 00:00:00 2001 From: Gabriel Jacobo Date: Wed, 24 Apr 2013 12:22:08 -0300 Subject: [PATCH 021/542] Bug 1787 - memory leak in WIN_InitMouse() by Marcel Bakker --- src/video/windows/SDL_windowsmouse.c | 6 ++++++ 1 file changed, 6 insertions(+) diff --git a/src/video/windows/SDL_windowsmouse.c b/src/video/windows/SDL_windowsmouse.c index 23f288b19..d762bdf38 100644 --- a/src/video/windows/SDL_windowsmouse.c +++ b/src/video/windows/SDL_windowsmouse.c @@ -240,6 +240,12 @@ WIN_InitMouse(_THIS) void WIN_QuitMouse(_THIS) { + SDL_Mouse *mouse = SDL_GetMouse(); + if ( mouse->def_cursor ) { + SDL_free(mouse->def_cursor); + mouse->def_cursor = NULL; + mouse->cur_cursor = NULL; + } } #endif /* SDL_VIDEO_DRIVER_WINDOWS */ From 69bc11e5645e9af7984c785d397443b0f6bea783 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?J=C3=B8rgen=20P=2E=20Tjern=C3=B8?= Date: Wed, 24 Apr 2013 10:42:44 -0700 Subject: [PATCH 022/542] Add SDL_GetDefaultCursor. This fixes http://bugzilla.libsdl.org/show_bug.cgi?id=1798 Thanks to Alex Szpakowski for suggestion & patch. --- include/SDL_mouse.h | 5 +++++ src/events/SDL_mouse.c | 11 +++++++++++ 2 files changed, 16 insertions(+) diff --git a/include/SDL_mouse.h b/include/SDL_mouse.h index 1cfe09260..c91dfbdeb 100644 --- a/include/SDL_mouse.h +++ b/include/SDL_mouse.h @@ -174,6 +174,11 @@ extern DECLSPEC void SDLCALL SDL_SetCursor(SDL_Cursor * cursor); */ extern DECLSPEC SDL_Cursor *SDLCALL SDL_GetCursor(void); +/** + * \brief Return the default cursor. + */ +extern DECLSPEC SDL_Cursor *SDLCALL SDL_GetDefaultCursor(void); + /** * \brief Frees a cursor created with SDL_CreateCursor(). * diff --git a/src/events/SDL_mouse.c b/src/events/SDL_mouse.c index 67a143902..89ac786d2 100644 --- a/src/events/SDL_mouse.c +++ b/src/events/SDL_mouse.c @@ -626,6 +626,17 @@ SDL_GetCursor(void) return mouse->cur_cursor; } +SDL_Cursor * +SDL_GetDefaultCursor(void) +{ + SDL_Mouse *mouse = SDL_GetMouse(); + + if (!mouse) { + return NULL; + } + return mouse->def_cursor; +} + void SDL_FreeCursor(SDL_Cursor * cursor) { From 192af6485f26209a44334913a03bd9959e91bc12 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?J=C3=B8rgen=20P=2E=20Tjern=C3=B8?= Date: Wed, 24 Apr 2013 12:20:44 -0700 Subject: [PATCH 023/542] Test plan for relative mode. --- test/relative_mode.markdown | 56 +++++++++++++++++++++++++++++++++++++ 1 file changed, 56 insertions(+) create mode 100644 test/relative_mode.markdown diff --git a/test/relative_mode.markdown b/test/relative_mode.markdown new file mode 100644 index 000000000..9ae88aa1c --- /dev/null +++ b/test/relative_mode.markdown @@ -0,0 +1,56 @@ +Relative mode testing +===================== + +See test program at the bottom of this file. + +Initial tests: + + - When in relative mode, the mouse shouldn't be moveable outside of the window. + - When the cursor is outside the window when relative mode is enabled, mouse + clicks should not go to whatever app was under the cursor previously. + - When alt/cmd-tabbing between a relative mode app and another app, clicks when + in the relative mode app should also not go to whatever app was under the + cursor previously. + + +Code +==== + + #include + + int PollEvents() + { + SDL_Event event; + while (SDL_PollEvent(&event)) + { + switch (event.type) + { + case SDL_QUIT: + return 1; + default: + break; + } + } + + return 0; + } + + int main(int argc, char *argv[]) + { + SDL_Init(SDL_INIT_VIDEO); + + SDL_Window *win = SDL_CreateWindow("Test", SDL_WINDOWPOS_CENTERED, SDL_WINDOWPOS_CENTERED, 800, 600, 0); + SDL_SetRelativeMouseMode(SDL_TRUE); + + while (1) + { + if (PollEvents()) + break; + } + + SDL_DestroyWindow(win); + + SDL_Quit(); + + return 0; + } From 238eacc409d5ce7b70e63fe2039ef1b8e05b05a2 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?J=C3=B8rgen=20P=2E=20Tjern=C3=B8?= Date: Wed, 24 Apr 2013 12:20:48 -0700 Subject: [PATCH 024/542] Mac: Update mouse position on warp. --- src/video/cocoa/SDL_cocoamouse.m | 6 ++++++ 1 file changed, 6 insertions(+) diff --git a/src/video/cocoa/SDL_cocoamouse.m b/src/video/cocoa/SDL_cocoamouse.m index 60f4a50e2..acce0a2f4 100644 --- a/src/video/cocoa/SDL_cocoamouse.m +++ b/src/video/cocoa/SDL_cocoamouse.m @@ -187,11 +187,17 @@ Cocoa_ShowCursor(SDL_Cursor * cursor) static void Cocoa_WarpMouse(SDL_Window * window, int x, int y) { + SDL_Mouse *mouse = SDL_GetMouse(); CGPoint point; point.x = (float)window->x + x; point.y = (float)window->y + y; CGWarpMouseCursorPosition(point); + + /* CGWarpMouseCursorPosition doesn't generate a window event, unlike our + * other implementations' APIs. + */ + SDL_SendMouseMotion(mouse->focus, mouse->mouseID, 0, x, y); } static int From d8ef30ac34ca1710b7f6a4063fa42a227730edc2 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?J=C3=B8rgen=20P=2E=20Tjern=C3=B8?= Date: Wed, 24 Apr 2013 12:20:51 -0700 Subject: [PATCH 025/542] Move cursor into window when enabling relative mode or gaining focus in relative mode. This prevents wonky behavior where the clicks won't go to the window because the cursor was outside it when we enabled relative mode. --- src/events/SDL_mouse.c | 14 ++++++++++++-- src/video/SDL_video.c | 14 ++++++++++++++ 2 files changed, 26 insertions(+), 2 deletions(-) diff --git a/src/events/SDL_mouse.c b/src/events/SDL_mouse.c index 89ac786d2..ede6a6c46 100644 --- a/src/events/SDL_mouse.c +++ b/src/events/SDL_mouse.c @@ -415,6 +415,8 @@ int SDL_SetRelativeMouseMode(SDL_bool enabled) { SDL_Mouse *mouse = SDL_GetMouse(); + SDL_Window *focusWindow = SDL_GetKeyboardFocus(); + int original_x = mouse->x, original_y = mouse->y; if (enabled == mouse->relative_mode) { return 0; @@ -424,6 +426,14 @@ SDL_SetRelativeMouseMode(SDL_bool enabled) return SDL_Unsupported(); } + if (enabled && focusWindow) { + /* Center it in the focused window to prevent clicks from going through + * to background windows. + */ + SDL_SetMouseFocus(focusWindow); + SDL_WarpMouseInWindow(focusWindow, focusWindow->w/2, focusWindow->h/2); + } + if (mouse->SetRelativeMouseMode(enabled) < 0) { return -1; } @@ -433,8 +443,8 @@ SDL_SetRelativeMouseMode(SDL_bool enabled) if (enabled) { /* Save the expected mouse position */ - mouse->original_x = mouse->x; - mouse->original_y = mouse->y; + mouse->original_x = original_x; + mouse->original_y = original_y; } else if (mouse->focus) { /* Restore the expected mouse position */ SDL_WarpMouseInWindow(mouse->focus, mouse->original_x, mouse->original_y); diff --git a/src/video/SDL_video.c b/src/video/SDL_video.c index 694291022..9f0b03b3f 100644 --- a/src/video/SDL_video.c +++ b/src/video/SDL_video.c @@ -2044,10 +2044,17 @@ SDL_OnWindowLeave(SDL_Window * window) void SDL_OnWindowFocusGained(SDL_Window * window) { + SDL_Mouse *mouse = SDL_GetMouse(); + if (window->gamma && _this->SetWindowGammaRamp) { _this->SetWindowGammaRamp(_this, window, window->gamma); } + if (mouse && mouse->relative_mode) { + SDL_SetMouseFocus(window); + SDL_WarpMouseInWindow(window, window->w/2, window->h/2); + } + SDL_UpdateWindowGrab(window); } @@ -2067,10 +2074,17 @@ static SDL_bool ShouldMinimizeOnFocusLoss() void SDL_OnWindowFocusLost(SDL_Window * window) { + SDL_Mouse *mouse = SDL_GetMouse(); + if (window->gamma && _this->SetWindowGammaRamp) { _this->SetWindowGammaRamp(_this, window, window->saved_gamma); } + if (mouse && mouse->relative_mode) { + /* Restore the expected mouse position */ + SDL_WarpMouseInWindow(window, mouse->original_x, mouse->original_y); + } + SDL_UpdateWindowGrab(window); /* If we're fullscreen on a single-head system and lose focus, minimize */ From 83e561b48cb0b04afac89fe96b522f912883c6db Mon Sep 17 00:00:00 2001 From: "Ryan C. Gordon" Date: Wed, 24 Apr 2013 23:11:48 -0400 Subject: [PATCH 026/542] Removed Cocoa OpenGL optimization that was probably good advice 10 years ago. --- src/video/cocoa/SDL_cocoaopengl.m | 25 ------------------------- 1 file changed, 25 deletions(-) diff --git a/src/video/cocoa/SDL_cocoaopengl.m b/src/video/cocoa/SDL_cocoaopengl.m index 4fc478330..e1f443979 100644 --- a/src/video/cocoa/SDL_cocoaopengl.m +++ b/src/video/cocoa/SDL_cocoaopengl.m @@ -192,31 +192,6 @@ Cocoa_GL_CreateContext(_THIS, SDL_Window * window) return NULL; } - /* - * Wisdom from Apple engineer in reference to UT2003's OpenGL performance: - * "You are blowing a couple of the internal OpenGL function caches. This - * appears to be happening in the VAO case. You can tell OpenGL to up - * the cache size by issuing the following calls right after you create - * the OpenGL context. The default cache size is 16." --ryan. - */ - - #ifndef GLI_ARRAY_FUNC_CACHE_MAX - #define GLI_ARRAY_FUNC_CACHE_MAX 284 - #endif - - #ifndef GLI_SUBMIT_FUNC_CACHE_MAX - #define GLI_SUBMIT_FUNC_CACHE_MAX 280 - #endif - - { - GLint cache_max = 64; - CGLContextObj ctx = [context CGLContextObj]; - CGLSetParameter (ctx, GLI_SUBMIT_FUNC_CACHE_MAX, &cache_max); - CGLSetParameter (ctx, GLI_ARRAY_FUNC_CACHE_MAX, &cache_max); - } - - /* End Wisdom from Apple Engineer section. --ryan. */ - [pool release]; if ( Cocoa_GL_MakeCurrent(_this, window, context) < 0 ) { From b72f0b741ecae4e6f067c9c286e0409d8dc4187f Mon Sep 17 00:00:00 2001 From: Sam Lantinga Date: Thu, 25 Apr 2013 00:15:09 -0700 Subject: [PATCH 027/542] Fixed bug 1583 - Fix build for disabled SDL render subsystem Marcus von Appen If one wants to disable the SDL render subsystem, the build breaks on several platforms due to an empty render_drivers array in SDL_render.c. --- src/render/SDL_render.c | 18 ++++++++++++++++-- 1 file changed, 16 insertions(+), 2 deletions(-) diff --git a/src/render/SDL_render.c b/src/render/SDL_render.c index be76a88eb..9ec64a13d 100644 --- a/src/render/SDL_render.c +++ b/src/render/SDL_render.c @@ -44,8 +44,8 @@ } -static const SDL_RenderDriver *render_drivers[] = { #if !SDL_RENDER_DISABLED +static const SDL_RenderDriver *render_drivers[] = { #if SDL_VIDEO_RENDER_D3D &D3D_RenderDriver, #endif @@ -65,8 +65,9 @@ static const SDL_RenderDriver *render_drivers[] = { &PSP_RenderDriver, #endif &SW_RenderDriver -#endif /* !SDL_RENDER_DISABLED */ }; +#endif /* !SDL_RENDER_DISABLED */ + static char renderer_magic; static char texture_magic; @@ -75,18 +76,26 @@ static int UpdateLogicalSize(SDL_Renderer *renderer); int SDL_GetNumRenderDrivers(void) { +#if !SDL_RENDER_DISABLED return SDL_arraysize(render_drivers); +#else + return 0; +#endif } int SDL_GetRenderDriverInfo(int index, SDL_RendererInfo * info) { +#if !SDL_RENDER_DISABLED if (index < 0 || index >= SDL_GetNumRenderDrivers()) { return SDL_SetError("index must be in the range of 0 - %d", SDL_GetNumRenderDrivers() - 1); } *info = render_drivers[index]->info; return 0; +#else + return SDL_SetError("SDL not built with rendering support"); +#endif } static int @@ -197,6 +206,7 @@ SDL_CreateWindowAndRenderer(int width, int height, Uint32 window_flags, SDL_Renderer * SDL_CreateRenderer(SDL_Window * window, int index, Uint32 flags) { +#if !SDL_RENDER_DISABLED SDL_Renderer *renderer = NULL; int n = SDL_GetNumRenderDrivers(); const char *hint; @@ -284,6 +294,10 @@ SDL_CreateRenderer(SDL_Window * window, int index, Uint32 flags) "Created renderer: %s", renderer->info.name); } return renderer; +#else + SDL_SetError("SDL not built with rendering support"); + return NULL; +#endif } SDL_Renderer * From 8a91a76148493bdfb6c3466a94ad6c4ee0ecb53c Mon Sep 17 00:00:00 2001 From: Sam Lantinga Date: Thu, 25 Apr 2013 00:26:17 -0700 Subject: [PATCH 028/542] Fixed bug 1582 - Allow disabling SDL_VIDEO_DRIVER_WINDOWS Marcus von Appen Trying to build SDL 2.x (HG) on Win32 platforms with either VS.NET or MinGW requires one to have the video subsystem and SDL_VIDEO_DRIVER_WINDOWS flag enabled due to the helper window creation routines. The attached patch changes the helper window creation behaviour, so that one can build SDL2 without the video subsystem or Windows video drivers on Win32 platforms. --- src/SDL.c | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/src/SDL.c b/src/SDL.c index 829da1e7b..c0b87caba 100644 --- a/src/SDL.c +++ b/src/SDL.c @@ -36,7 +36,7 @@ extern void SDL_StartTicks(void); extern int SDL_TimerInit(void); extern void SDL_TimerQuit(void); #endif -#if defined(__WIN32__) +#if SDL_VIDEO_DRIVER_WINDOWS extern int SDL_HelperWindowCreate(void); extern int SDL_HelperWindowDestroy(void); #endif @@ -200,7 +200,7 @@ SDL_Init(Uint32 flags) /* Clear the error message */ SDL_ClearError(); -#if defined(__WIN32__) +#if SDL_VIDEO_DRIVER_WINDOWS if (SDL_HelperWindowCreate() < 0) { return -1; } @@ -310,7 +310,7 @@ SDL_Quit(void) SDL_bInMainQuit = SDL_TRUE; /* Quit all subsystems */ -#if defined(__WIN32__) +#if SDL_VIDEO_DRIVER_WINDOWS SDL_HelperWindowDestroy(); #endif SDL_QuitSubSystem(SDL_INIT_EVERYTHING); From 42b825029c84bfbc5f986b9b2886290a38f2c66e Mon Sep 17 00:00:00 2001 From: Edward Rudd Date: Thu, 25 Apr 2013 18:05:08 -0400 Subject: [PATCH 029/542] Allow disabling SDL_IPHONE_KEYBOARD in iOS builds --- src/video/uikit/SDL_uikitvideo.m | 2 ++ src/video/uikit/SDL_uikitview.m | 2 +- 2 files changed, 3 insertions(+), 1 deletion(-) diff --git a/src/video/uikit/SDL_uikitvideo.m b/src/video/uikit/SDL_uikitvideo.m index ff025067b..486c6255a 100644 --- a/src/video/uikit/SDL_uikitvideo.m +++ b/src/video/uikit/SDL_uikitvideo.m @@ -86,10 +86,12 @@ UIKit_CreateDevice(int devindex) /* !!! FIXME: implement SetWindowBordered */ +#if SDL_IPHONE_KEYBOARD device->SDL_HasScreenKeyboardSupport = UIKit_HasScreenKeyboardSupport; device->SDL_ShowScreenKeyboard = UIKit_ShowScreenKeyboard; device->SDL_HideScreenKeyboard = UIKit_HideScreenKeyboard; device->SDL_IsScreenKeyboardShown = UIKit_IsScreenKeyboardShown; +#endif /* OpenGL (ES) functions */ device->GL_MakeCurrent = UIKit_GL_MakeCurrent; diff --git a/src/video/uikit/SDL_uikitview.m b/src/video/uikit/SDL_uikitview.m index 82cce3cbf..ec37f1880 100644 --- a/src/video/uikit/SDL_uikitview.m +++ b/src/video/uikit/SDL_uikitview.m @@ -30,10 +30,10 @@ #if SDL_IPHONE_KEYBOARD #include "keyinfotable.h" +#endif #include "SDL_uikitappdelegate.h" #include "SDL_uikitmodes.h" #include "SDL_uikitwindow.h" -#endif @implementation SDL_uikitview From 51619c54859321269c11772e3d8f96b3bec4ccad Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?J=C3=B8rgen=20P=2E=20Tjern=C3=B8?= Date: Thu, 25 Apr 2013 18:40:31 -0700 Subject: [PATCH 030/542] Don't warp mouse on focus lost. This isn't working great, so undo it until we can fix it properly to save / restore mouse positions. --HG-- extra : histedit_source : d8fe81a1690bd9406df132c325c8dd7c61baec29%2C2243b548ccaec444b2e4bdab04ba67cdf236c4fb --- src/video/SDL_video.c | 7 ------- 1 file changed, 7 deletions(-) diff --git a/src/video/SDL_video.c b/src/video/SDL_video.c index 9f0b03b3f..09b05c23f 100644 --- a/src/video/SDL_video.c +++ b/src/video/SDL_video.c @@ -2074,17 +2074,10 @@ static SDL_bool ShouldMinimizeOnFocusLoss() void SDL_OnWindowFocusLost(SDL_Window * window) { - SDL_Mouse *mouse = SDL_GetMouse(); - if (window->gamma && _this->SetWindowGammaRamp) { _this->SetWindowGammaRamp(_this, window, window->saved_gamma); } - if (mouse && mouse->relative_mode) { - /* Restore the expected mouse position */ - SDL_WarpMouseInWindow(window, mouse->original_x, mouse->original_y); - } - SDL_UpdateWindowGrab(window); /* If we're fullscreen on a single-head system and lose focus, minimize */ From 22358fddd13645235e5f0f87dfd89be82f1e12de Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?J=C3=B8rgen=20P=2E=20Tjern=C3=B8?= Date: Thu, 25 Apr 2013 18:40:22 -0700 Subject: [PATCH 031/542] Mac: Don't supress mousemoves after warp. By default, synthesizing events supresses real events for a quarter second. This makes for some wonky behavior. --HG-- extra : histedit_source : 769156e3eba77c601de006c5aad1cdc1febe1d6c --- src/video/cocoa/SDL_cocoamouse.m | 7 +++++++ src/video/cocoa/SDL_cocoawindow.m | 10 +++++----- 2 files changed, 12 insertions(+), 5 deletions(-) diff --git a/src/video/cocoa/SDL_cocoamouse.m b/src/video/cocoa/SDL_cocoamouse.m index acce0a2f4..23e8796e0 100644 --- a/src/video/cocoa/SDL_cocoamouse.m +++ b/src/video/cocoa/SDL_cocoamouse.m @@ -192,7 +192,14 @@ Cocoa_WarpMouse(SDL_Window * window, int x, int y) point.x = (float)window->x + x; point.y = (float)window->y + y; + + /* According to the docs, this was deprecated in 10.6, but it's still + * around. The substitute requires a CGEventSource, but I'm not entirely + * sure how we'd procure the right one for this event. + */ + CGSetLocalEventsSuppressionInterval(0.0); CGWarpMouseCursorPosition(point); + CGSetLocalEventsSuppressionInterval(0.25); /* CGWarpMouseCursorPosition doesn't generate a window event, unlike our * other implementations' APIs. diff --git a/src/video/cocoa/SDL_cocoawindow.m b/src/video/cocoa/SDL_cocoawindow.m index 56eaa5134..dee8bbae7 100644 --- a/src/video/cocoa/SDL_cocoawindow.m +++ b/src/video/cocoa/SDL_cocoawindow.m @@ -393,13 +393,13 @@ static __inline__ void ConvertNSRect(NSRect *r) cgpoint.x = window->x + x; cgpoint.y = window->y + y; - /* We have to disassociate the curosr & the mouse before issuing - * this cursor warp, otherwise it gets limited to one update per - * 250ms, and looks very choppy. + /* According to the docs, this was deprecated in 10.6, but it's still + * around. The substitute requires a CGEventSource, but I'm not entirely + * sure how we'd procure the right one for this event. */ - CGAssociateMouseAndMouseCursorPosition(NO); + CGSetLocalEventsSuppressionInterval(0.0); CGDisplayMoveCursorToPoint(kCGDirectMainDisplay, cgpoint); - CGAssociateMouseAndMouseCursorPosition(YES); + CGSetLocalEventsSuppressionInterval(0.25); } } SDL_SendMouseMotion(window, 0, 0, x, y); From 9e4a5194936923c549a2bfef8498322a351691e8 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?J=C3=B8rgen=20P=2E=20Tjern=C3=B8?= Date: Thu, 25 Apr 2013 18:40:29 -0700 Subject: [PATCH 032/542] Mac: Fix relative mode message after gaining focus. This fixes a bug where relative mode would give a large jump if the cursor was moved when the app doesn't have focus. --HG-- extra : histedit_source : ff1b20a9e7f6e079c073c4ef761566b6c80b0f22%2C9879c6c838c69afea4aa2be80cbe137054600d12 --- src/events/SDL_mouse_c.h | 3 +++ src/video/cocoa/SDL_cocoamouse.h | 7 +++++++ src/video/cocoa/SDL_cocoamouse.m | 25 ++++++++++++++++++++++--- 3 files changed, 32 insertions(+), 3 deletions(-) diff --git a/src/events/SDL_mouse_c.h b/src/events/SDL_mouse_c.h index 7cb13cb3d..9994bc640 100644 --- a/src/events/SDL_mouse_c.h +++ b/src/events/SDL_mouse_c.h @@ -73,6 +73,9 @@ typedef struct SDL_Cursor *def_cursor; SDL_Cursor *cur_cursor; SDL_bool cursor_shown; + + /* Driver-dependent data. */ + void *driverdata; } SDL_Mouse; diff --git a/src/video/cocoa/SDL_cocoamouse.h b/src/video/cocoa/SDL_cocoamouse.h index 992af549f..0e5822ab3 100644 --- a/src/video/cocoa/SDL_cocoamouse.h +++ b/src/video/cocoa/SDL_cocoamouse.h @@ -23,11 +23,18 @@ #ifndef _SDL_cocoamouse_h #define _SDL_cocoamouse_h +#include "SDL_cocoavideo.h" + extern void Cocoa_InitMouse(_THIS); extern void Cocoa_HandleMouseEvent(_THIS, NSEvent * event); extern void Cocoa_HandleMouseWheel(SDL_Window *window, NSEvent * event); extern void Cocoa_QuitMouse(_THIS); +typedef struct { + int deltaXOffset; + int deltaYOffset; +} SDL_MouseData; + #endif /* _SDL_cocoamouse_h */ /* vi: set ts=4 sw=4 expandtab: */ diff --git a/src/video/cocoa/SDL_cocoamouse.m b/src/video/cocoa/SDL_cocoamouse.m index 23e8796e0..2c0f2b7d6 100644 --- a/src/video/cocoa/SDL_cocoamouse.m +++ b/src/video/cocoa/SDL_cocoamouse.m @@ -24,7 +24,7 @@ #include "SDL_assert.h" #include "SDL_events.h" -#include "SDL_cocoavideo.h" +#include "SDL_cocoamouse.h" #include "../../events/SDL_mouse_c.h" @@ -193,6 +193,16 @@ Cocoa_WarpMouse(SDL_Window * window, int x, int y) point.x = (float)window->x + x; point.y = (float)window->y + y; + { + /* This makes Cocoa_HandleMouseEvent ignore this delta in the next + * movement event. + */ + SDL_MouseData *driverdata = (SDL_MouseData*)mouse->driverdata; + NSPoint location = [NSEvent mouseLocation]; + driverdata->deltaXOffset = location.x - point.x; + driverdata->deltaYOffset = point.y - location.y; + } + /* According to the docs, this was deprecated in 10.6, but it's still * around. The substitute requires a CGEventSource, but I'm not entirely * sure how we'd procure the right one for this event. @@ -228,6 +238,8 @@ Cocoa_InitMouse(_THIS) { SDL_Mouse *mouse = SDL_GetMouse(); + mouse->driverdata = SDL_calloc(1, sizeof(SDL_MouseData)); + mouse->CreateCursor = Cocoa_CreateCursor; mouse->CreateSystemCursor = Cocoa_CreateSystemCursor; mouse->ShowCursor = Cocoa_ShowCursor; @@ -248,8 +260,11 @@ Cocoa_HandleMouseEvent(_THIS, NSEvent *event) [event type] == NSLeftMouseDragged || [event type] == NSRightMouseDragged || [event type] == NSOtherMouseDragged)) { - float x = [event deltaX]; - float y = [event deltaY]; + SDL_MouseData *driverdata = (SDL_MouseData*)mouse->driverdata; + float x = [event deltaX] + driverdata->deltaXOffset; + float y = [event deltaY] + driverdata->deltaYOffset; + driverdata->deltaXOffset = driverdata->deltaYOffset = 0; + SDL_SendMouseMotion(mouse->focus, mouse->mouseID, 1, (int)x, (int)y); } } @@ -278,6 +293,10 @@ Cocoa_HandleMouseWheel(SDL_Window *window, NSEvent *event) void Cocoa_QuitMouse(_THIS) { + SDL_Mouse *mouse = SDL_GetMouse(); + if (mouse) { + SDL_free(mouse->driverdata); + } } #endif /* SDL_VIDEO_DRIVER_COCOA */ From 1e5aaadf497cd12be445a4555bbd1a01d9a14349 Mon Sep 17 00:00:00 2001 From: Philipp Wiesemann Date: Sat, 27 Apr 2013 13:33:05 +0200 Subject: [PATCH 033/542] Corrected a comment in Java source file. --- android-project/src/org/libsdl/app/SDLActivity.java | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/android-project/src/org/libsdl/app/SDLActivity.java b/android-project/src/org/libsdl/app/SDLActivity.java index 93a5fedec..5b23a997f 100644 --- a/android-project/src/org/libsdl/app/SDLActivity.java +++ b/android-project/src/org/libsdl/app/SDLActivity.java @@ -413,7 +413,7 @@ public class SDLActivity extends Activity { // Nom nom } } else { - Log.w("SDL", "SDL audio: error return from write(short)"); + Log.w("SDL", "SDL audio: error return from write(byte)"); return; } } From f06595200f72435b907ef80600c46a5453b3afb1 Mon Sep 17 00:00:00 2001 From: Philipp Wiesemann Date: Sat, 27 Apr 2013 13:42:56 +0200 Subject: [PATCH 034/542] Corrected comment in header file. --- include/SDL_config_psp.h | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/include/SDL_config_psp.h b/include/SDL_config_psp.h index 036b30b28..dc1797b4e 100644 --- a/include/SDL_config_psp.h +++ b/include/SDL_config_psp.h @@ -133,4 +133,4 @@ #define SDL_LOADSO_DISABLED 1 -#endif /* _SDL_config_minimal_h */ +#endif /* _SDL_config_psp_h */ From dc6e4206266197c4bb455b72c6db192913200dc0 Mon Sep 17 00:00:00 2001 From: Philipp Wiesemann Date: Sat, 27 Apr 2013 13:55:47 +0200 Subject: [PATCH 035/542] Replaces tabs with four spaces in C source file. --- src/video/android/SDL_androidclipboard.c | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/src/video/android/SDL_androidclipboard.c b/src/video/android/SDL_androidclipboard.c index ef57b8d3f..0090bb8b5 100644 --- a/src/video/android/SDL_androidclipboard.c +++ b/src/video/android/SDL_androidclipboard.c @@ -29,18 +29,18 @@ int Android_SetClipboardText(_THIS, const char *text) { - return Android_JNI_SetClipboardText(text); + return Android_JNI_SetClipboardText(text); } char * Android_GetClipboardText(_THIS) { - return Android_JNI_GetClipboardText(); + return Android_JNI_GetClipboardText(); } SDL_bool Android_HasClipboardText(_THIS) { - return Android_JNI_HasClipboardText(); + return Android_JNI_HasClipboardText(); } #endif /* SDL_VIDEO_DRIVER_ANDROID */ From bdd9df5fd957a46e71c98920d03a0c581a94e408 Mon Sep 17 00:00:00 2001 From: Philipp Wiesemann Date: Sat, 27 Apr 2013 14:13:30 +0200 Subject: [PATCH 036/542] Added missing @Override annotations in Java source file to reduce warnings. --- .../src/org/libsdl/app/SDLActivity.java | 14 ++++++++++++++ 1 file changed, 14 insertions(+) diff --git a/android-project/src/org/libsdl/app/SDLActivity.java b/android-project/src/org/libsdl/app/SDLActivity.java index 5b23a997f..a4b7fb57b 100644 --- a/android-project/src/org/libsdl/app/SDLActivity.java +++ b/android-project/src/org/libsdl/app/SDLActivity.java @@ -64,6 +64,7 @@ public class SDLActivity extends Activity { } // Setup + @Override protected void onCreate(Bundle savedInstanceState) { //Log.v("SDL", "onCreate()"); super.onCreate(savedInstanceState); @@ -95,6 +96,7 @@ public class SDLActivity extends Activity { // Don't call SDLActivity.nativeResume(); here, it will be called via SDLSurface::surfaceChanged->SDLActivity::startApp }*/ + @Override protected void onDestroy() { super.onDestroy(); Log.v("SDL", "onDestroy()"); @@ -220,6 +222,7 @@ public class SDLActivity extends Activity { this.h = h; } + @Override public void run() { AbsoluteLayout.LayoutParams params = new AbsoluteLayout.LayoutParams( w, h + HEIGHT_PADDING, x, y); @@ -372,6 +375,7 @@ public class SDLActivity extends Activity { public static void audioStartThread() { mAudioThread = new Thread(new Runnable() { + @Override public void run() { mAudioTrack.play(); nativeRunAudioThread(); @@ -442,6 +446,7 @@ public class SDLActivity extends Activity { Simple nativeInit() runnable */ class SDLMain implements Runnable { + @Override public void run() { // Runs SDL_main() SDLActivity.nativeInit(); @@ -485,6 +490,7 @@ class SDLSurface extends SurfaceView implements SurfaceHolder.Callback, } // Called when we have a valid drawing surface + @Override public void surfaceCreated(SurfaceHolder holder) { Log.v("SDL", "surfaceCreated()"); holder.setType(SurfaceHolder.SURFACE_TYPE_GPU); @@ -492,6 +498,7 @@ class SDLSurface extends SurfaceView implements SurfaceHolder.Callback, } // Called when we lose the surface + @Override public void surfaceDestroyed(SurfaceHolder holder) { Log.v("SDL", "surfaceDestroyed()"); if (!SDLActivity.mIsPaused) { @@ -502,6 +509,7 @@ class SDLSurface extends SurfaceView implements SurfaceHolder.Callback, } // Called when the surface is resized + @Override public void surfaceChanged(SurfaceHolder holder, int format, int width, int height) { Log.v("SDL", "surfaceChanged()"); @@ -560,12 +568,14 @@ class SDLSurface extends SurfaceView implements SurfaceHolder.Callback, } // unused + @Override public void onDraw(Canvas canvas) {} // Key events + @Override public boolean onKey(View v, int keyCode, KeyEvent event) { if (event.getAction() == KeyEvent.ACTION_DOWN) { @@ -583,6 +593,7 @@ class SDLSurface extends SurfaceView implements SurfaceHolder.Callback, } // Touch events + @Override public boolean onTouch(View v, MotionEvent event) { { final int touchDevId = event.getDeviceId(); @@ -626,10 +637,12 @@ class SDLSurface extends SurfaceView implements SurfaceHolder.Callback, } } + @Override public void onAccuracyChanged(Sensor sensor, int accuracy) { // TODO } + @Override public void onSensorChanged(SensorEvent event) { if (event.sensor.getType() == Sensor.TYPE_ACCELEROMETER) { SDLActivity.onNativeAccel(event.values[0] / SensorManager.GRAVITY_EARTH, @@ -658,6 +671,7 @@ class DummyEdit extends View implements View.OnKeyListener { return true; } + @Override public boolean onKey(View v, int keyCode, KeyEvent event) { // This handles the hardware keyboard input From 423489e19df5a1f27fa70a812e59e5c39143dfe7 Mon Sep 17 00:00:00 2001 From: Philipp Wiesemann Date: Sat, 27 Apr 2013 14:26:15 +0200 Subject: [PATCH 037/542] Changed Java source file to use constant from API instead of just a String. --- android-project/src/org/libsdl/app/SDLActivity.java | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/android-project/src/org/libsdl/app/SDLActivity.java b/android-project/src/org/libsdl/app/SDLActivity.java index a4b7fb57b..d11e2d529 100644 --- a/android-project/src/org/libsdl/app/SDLActivity.java +++ b/android-project/src/org/libsdl/app/SDLActivity.java @@ -482,7 +482,7 @@ class SDLSurface extends SurfaceView implements SurfaceHolder.Callback, setOnKeyListener(this); setOnTouchListener(this); - mSensorManager = (SensorManager)context.getSystemService("sensor"); + mSensorManager = (SensorManager)context.getSystemService(Context.SENSOR_SERVICE); // Some arbitrary defaults to avoid a potential division by zero mWidth = 1.0f; From 67eb721095c8fe258703008c9a14db6af270e0eb Mon Sep 17 00:00:00 2001 From: Philipp Wiesemann Date: Sat, 27 Apr 2013 14:33:27 +0200 Subject: [PATCH 038/542] Corrected spelling header file comments. --- include/SDL_haptic.h | 12 ++++++------ 1 file changed, 6 insertions(+), 6 deletions(-) diff --git a/include/SDL_haptic.h b/include/SDL_haptic.h index c506c295e..12b66febf 100644 --- a/include/SDL_haptic.h +++ b/include/SDL_haptic.h @@ -895,7 +895,7 @@ extern DECLSPEC void SDLCALL SDL_HapticClose(SDL_Haptic * haptic); * \brief Returns the number of effects a haptic device can store. * * On some platforms this isn't fully supported, and therefore is an - * aproximation. Always check to see if your created effect was actually + * approximation. Always check to see if your created effect was actually * created and do not rely solely on SDL_HapticNumEffects(). * * \param haptic The haptic device to query effect max. @@ -912,7 +912,7 @@ extern DECLSPEC int SDLCALL SDL_HapticNumEffects(SDL_Haptic * haptic); * time. * * This is not supported on all platforms, but will always return a value. - * Added here for the sake of completness. + * Added here for the sake of completeness. * * \param haptic The haptic device to query maximum playing effects. * \return The number of effects the haptic device can play at the same time @@ -999,7 +999,7 @@ extern DECLSPEC int SDLCALL SDL_HapticUpdateEffect(SDL_Haptic * haptic, SDL_HapticEffect * data); /** - * \brief Runs the haptic effect on it's assosciated haptic device. + * \brief Runs the haptic effect on it's associated haptic device. * * If iterations are ::SDL_HAPTIC_INFINITY, it'll run the effect over and over * repeating the envelope (attack and fade) every time. If you only want the @@ -1021,7 +1021,7 @@ extern DECLSPEC int SDLCALL SDL_HapticRunEffect(SDL_Haptic * haptic, Uint32 iterations); /** - * \brief Stops the haptic effect on it's assosciated haptic device. + * \brief Stops the haptic effect on it's associated haptic device. * * \param haptic Haptic device to stop the effect on. * \param effect Identifier of the effect to stop. @@ -1068,7 +1068,7 @@ extern DECLSPEC int SDLCALL SDL_HapticGetEffectStatus(SDL_Haptic * haptic, * * Device must support the ::SDL_HAPTIC_GAIN feature. * - * The user may specify the maxmimum gain by setting the environment variable + * The user may specify the maximum gain by setting the environment variable * ::SDL_HAPTIC_GAIN_MAX which should be between 0 and 100. All calls to * SDL_HapticSetGain() will scale linearly using ::SDL_HAPTIC_GAIN_MAX as the * maximum. @@ -1164,7 +1164,7 @@ extern DECLSPEC int SDLCALL SDL_HapticRumbleInit(SDL_Haptic * haptic); * * \param haptic Haptic device to play rumble effect on. * \param strength Strength of the rumble to play as a 0-1 float value. - * \param length Length of the rumble to play in miliseconds. + * \param length Length of the rumble to play in milliseconds. * \return 0 on success or -1 on error. * * \sa SDL_HapticRumbleSupported From 65291c1e990914de0b7b9457f3690b1a74612aeb Mon Sep 17 00:00:00 2001 From: Philipp Wiesemann Date: Sat, 27 Apr 2013 17:10:14 +0200 Subject: [PATCH 039/542] Renamed inner class in Java file to avoid confusion with an unrelated class. --- android-project/src/org/libsdl/app/SDLActivity.java | 7 +++---- 1 file changed, 3 insertions(+), 4 deletions(-) diff --git a/android-project/src/org/libsdl/app/SDLActivity.java b/android-project/src/org/libsdl/app/SDLActivity.java index d11e2d529..5723a15b9 100644 --- a/android-project/src/org/libsdl/app/SDLActivity.java +++ b/android-project/src/org/libsdl/app/SDLActivity.java @@ -205,7 +205,7 @@ public class SDLActivity extends Activity { } } - static class ShowTextInputHandler implements Runnable { + static class ShowTextInputTask implements Runnable { /* * This is used to regulate the pan&scan method to have some offset from * the bottom edge of the input region and the top edge of an input @@ -215,7 +215,7 @@ public class SDLActivity extends Activity { public int x, y, w, h; - public ShowTextInputHandler(int x, int y, int w, int h) { + public ShowTextInputTask(int x, int y, int w, int h) { this.x = x; this.y = y; this.w = w; @@ -241,12 +241,11 @@ public class SDLActivity extends Activity { InputMethodManager imm = (InputMethodManager) getContext().getSystemService(Context.INPUT_METHOD_SERVICE); imm.showSoftInput(mTextEdit, 0); } - } public static void showTextInput(int x, int y, int w, int h) { // Transfer the task to the main thread as a Runnable - mSingleton.commandHandler.post(new ShowTextInputHandler(x, y, w, h)); + mSingleton.commandHandler.post(new ShowTextInputTask(x, y, w, h)); } From 628e39e91c3227807d0020caf0f178511c9dcb51 Mon Sep 17 00:00:00 2001 From: Philipp Wiesemann Date: Sat, 27 Apr 2013 17:15:40 +0200 Subject: [PATCH 040/542] Removed dead store from Java file because value never used. --- android-project/src/org/libsdl/app/SDLActivity.java | 2 -- 1 file changed, 2 deletions(-) diff --git a/android-project/src/org/libsdl/app/SDLActivity.java b/android-project/src/org/libsdl/app/SDLActivity.java index 5723a15b9..19601ca41 100644 --- a/android-project/src/org/libsdl/app/SDLActivity.java +++ b/android-project/src/org/libsdl/app/SDLActivity.java @@ -79,8 +79,6 @@ public class SDLActivity extends Activity { mLayout.addView(mSurface); setContentView(mLayout); - - SurfaceHolder holder = mSurface.getHolder(); } // Events From 9e39871ec54d8b669e78ec2695322c80abfbae18 Mon Sep 17 00:00:00 2001 From: Philipp Wiesemann Date: Sat, 27 Apr 2013 17:17:37 +0200 Subject: [PATCH 041/542] Removed not needed import statements from Java file. --- android-project/src/org/libsdl/app/SDLActivity.java | 6 ------ 1 file changed, 6 deletions(-) diff --git a/android-project/src/org/libsdl/app/SDLActivity.java b/android-project/src/org/libsdl/app/SDLActivity.java index 19601ca41..f5df7b628 100644 --- a/android-project/src/org/libsdl/app/SDLActivity.java +++ b/android-project/src/org/libsdl/app/SDLActivity.java @@ -3,7 +3,6 @@ package org.libsdl.app; import javax.microedition.khronos.egl.EGL10; import javax.microedition.khronos.egl.EGLConfig; import javax.microedition.khronos.egl.EGLContext; -import javax.microedition.khronos.opengles.GL10; import javax.microedition.khronos.egl.*; import android.app.*; @@ -17,13 +16,8 @@ import android.widget.AbsoluteLayout; import android.os.*; import android.util.Log; import android.graphics.*; -import android.text.method.*; -import android.text.*; import android.media.*; import android.hardware.*; -import android.content.*; - -import java.lang.*; /** From 103fc07702cbdbce411a2287c4567b5c094cefb5 Mon Sep 17 00:00:00 2001 From: Philipp Wiesemann Date: Sat, 27 Apr 2013 17:23:20 +0200 Subject: [PATCH 042/542] Removed not needed casts from Java file. --- android-project/src/org/libsdl/app/SDLActivity.java | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/android-project/src/org/libsdl/app/SDLActivity.java b/android-project/src/org/libsdl/app/SDLActivity.java index f5df7b628..301fc05d6 100644 --- a/android-project/src/org/libsdl/app/SDLActivity.java +++ b/android-project/src/org/libsdl/app/SDLActivity.java @@ -349,7 +349,7 @@ public class SDLActivity extends Activity { int audioFormat = is16Bit ? AudioFormat.ENCODING_PCM_16BIT : AudioFormat.ENCODING_PCM_8BIT; int frameSize = (isStereo ? 2 : 1) * (is16Bit ? 2 : 1); - Log.v("SDL", "SDL audio: wanted " + (isStereo ? "stereo" : "mono") + " " + (is16Bit ? "16-bit" : "8-bit") + " " + ((float)sampleRate / 1000f) + "kHz, " + desiredFrames + " frames buffer"); + Log.v("SDL", "SDL audio: wanted " + (isStereo ? "stereo" : "mono") + " " + (is16Bit ? "16-bit" : "8-bit") + " " + (sampleRate / 1000f) + "kHz, " + desiredFrames + " frames buffer"); // Let the user pick a larger buffer if they really want -- but ye // gods they probably shouldn't, the minimums are horrifyingly high @@ -361,7 +361,7 @@ public class SDLActivity extends Activity { audioStartThread(); - Log.v("SDL", "SDL audio: got " + ((mAudioTrack.getChannelCount() >= 2) ? "stereo" : "mono") + " " + ((mAudioTrack.getAudioFormat() == AudioFormat.ENCODING_PCM_16BIT) ? "16-bit" : "8-bit") + " " + ((float)mAudioTrack.getSampleRate() / 1000f) + "kHz, " + desiredFrames + " frames buffer"); + Log.v("SDL", "SDL audio: got " + ((mAudioTrack.getChannelCount() >= 2) ? "stereo" : "mono") + " " + ((mAudioTrack.getAudioFormat() == AudioFormat.ENCODING_PCM_16BIT) ? "16-bit" : "8-bit") + " " + (mAudioTrack.getSampleRate() / 1000f) + "kHz, " + desiredFrames + " frames buffer"); } public static void audioStartThread() { @@ -550,8 +550,8 @@ class SDLSurface extends SurfaceView implements SurfaceHolder.Callback, break; } - mWidth = (float) width; - mHeight = (float) height; + mWidth = width; + mHeight = height; SDLActivity.onNativeResize(width, height, sdlFormat); Log.v("SDL", "Window size:" + width + "x"+height); From c0f29fb59a531125914a323c46007b72c72c9676 Mon Sep 17 00:00:00 2001 From: Philipp Wiesemann Date: Sat, 27 Apr 2013 17:52:58 +0200 Subject: [PATCH 043/542] Corrected spelling in header files. --- include/SDL_events.h | 2 +- include/SDL_gamecontroller.h | 2 +- include/SDL_haptic.h | 24 ++++++++++++------------ include/SDL_surface.h | 8 ++++---- 4 files changed, 18 insertions(+), 18 deletions(-) diff --git a/include/SDL_events.h b/include/SDL_events.h index fe742b237..ff280574a 100644 --- a/include/SDL_events.h +++ b/include/SDL_events.h @@ -599,7 +599,7 @@ typedef int (SDLCALL * SDL_EventFilter) (void *userdata, SDL_Event * event); * Sets up a filter to process all events before they change internal state and * are posted to the internal event queue. * - * The filter is protypted as: + * The filter is prototyped as: * \code * int SDL_EventFilter(void *userdata, SDL_Event * event); * \endcode diff --git a/include/SDL_gamecontroller.h b/include/SDL_gamecontroller.h index b90c4009f..ab2531c5b 100644 --- a/include/SDL_gamecontroller.h +++ b/include/SDL_gamecontroller.h @@ -102,7 +102,7 @@ typedef struct SDL_GameControllerButtonBind * Buttons can be used as a controller axis and vice versa. * * This string shows an example of a valid mapping for a controller - * "341a3608000000000000504944564944,Aferglow PS3 Controller,a:b1,b:b2,y:b3,x:b0,start:b9,guide:b12,back:b8,dpup:h0.1,dpleft:h0.8,dpdown:h0.4,dpright:h0.2,leftshoulder:b4,rightshoulder:b5,leftstick:b10,rightstick:b11,leftx:a0,lefty:a1,rightx:a2,righty:a3,lefttrigger:b6,righttrigger:b7", + * "341a3608000000000000504944564944,Afterglow PS3 Controller,a:b1,b:b2,y:b3,x:b0,start:b9,guide:b12,back:b8,dpup:h0.1,dpleft:h0.8,dpdown:h0.4,dpright:h0.2,leftshoulder:b4,rightshoulder:b5,leftstick:b10,rightstick:b11,leftx:a0,lefty:a1,rightx:a2,righty:a3,lefttrigger:b6,righttrigger:b7", * */ diff --git a/include/SDL_haptic.h b/include/SDL_haptic.h index 12b66febf..5ea2affd4 100644 --- a/include/SDL_haptic.h +++ b/include/SDL_haptic.h @@ -489,13 +489,13 @@ typedef struct SDL_HapticConstant * over time. The type determines the shape of the wave and the parameters * determine the dimensions of the wave. * - * Phase is given by hundredth of a cyle meaning that giving the phase a value - * of 9000 will displace it 25% of it's period. Here are sample values: + * Phase is given by hundredth of a cycle meaning that giving the phase a value + * of 9000 will displace it 25% of its period. Here are sample values: * - 0: No phase displacement. - * - 9000: Displaced 25% of it's period. - * - 18000: Displaced 50% of it's period. - * - 27000: Displaced 75% of it's period. - * - 36000: Displaced 100% of it's period, same as 0, but 0 is preffered. + * - 9000: Displaced 25% of its period. + * - 18000: Displaced 50% of its period. + * - 27000: Displaced 75% of its period. + * - 36000: Displaced 100% of its period, same as 0, but 0 is preferred. * * Examples: * \verbatim @@ -651,7 +651,7 @@ typedef struct SDL_HapticRamp * \brief A structure containing a template for the ::SDL_HAPTIC_CUSTOM effect. * * A custom force feedback effect is much like a periodic effect, where the - * application can define it's exact shape. You will have to allocate the + * application can define its exact shape. You will have to allocate the * data yourself. Data should consist of channels * samples Uint16 samples. * * If channels is one, the effect is rotated using the defined direction. @@ -781,7 +781,7 @@ extern DECLSPEC int SDLCALL SDL_NumHaptics(void); * This can be called before any joysticks are opened. * If no name can be found, this function returns NULL. * - * \param device_index Index of the device to get it's name. + * \param device_index Index of the device to get its name. * \return Name of the device or NULL on error. * * \sa SDL_NumHaptics @@ -794,7 +794,7 @@ extern DECLSPEC const char *SDLCALL SDL_HapticName(int device_index); * The index passed as an argument refers to the N'th Haptic device on this * system. * - * When opening a haptic device, it's gain will be set to maximum and + * When opening a haptic device, its gain will be set to maximum and * autocenter will be disabled. To modify these values use * SDL_HapticSetGain() and SDL_HapticSetAutocenter(). * @@ -999,7 +999,7 @@ extern DECLSPEC int SDLCALL SDL_HapticUpdateEffect(SDL_Haptic * haptic, SDL_HapticEffect * data); /** - * \brief Runs the haptic effect on it's associated haptic device. + * \brief Runs the haptic effect on its associated haptic device. * * If iterations are ::SDL_HAPTIC_INFINITY, it'll run the effect over and over * repeating the envelope (attack and fade) every time. If you only want the @@ -1021,7 +1021,7 @@ extern DECLSPEC int SDLCALL SDL_HapticRunEffect(SDL_Haptic * haptic, Uint32 iterations); /** - * \brief Stops the haptic effect on it's associated haptic device. + * \brief Stops the haptic effect on its associated haptic device. * * \param haptic Haptic device to stop the effect on. * \param effect Identifier of the effect to stop. @@ -1053,7 +1053,7 @@ extern DECLSPEC void SDLCALL SDL_HapticDestroyEffect(SDL_Haptic * haptic, * Device must support the ::SDL_HAPTIC_STATUS feature. * * \param haptic Haptic device to query the effect status on. - * \param effect Identifier of the effect to query it's status. + * \param effect Identifier of the effect to query its status. * \return 0 if it isn't playing, ::SDL_HAPTIC_PLAYING if it is playing * or -1 on error. * diff --git a/include/SDL_surface.h b/include/SDL_surface.h index 275beb645..13704baf2 100644 --- a/include/SDL_surface.h +++ b/include/SDL_surface.h @@ -404,7 +404,7 @@ extern DECLSPEC int SDLCALL SDL_FillRects SDL_SRCALPHA not set: copy RGB. if SDL_SRCCOLORKEY set, only copy the pixels matching the - RGB values of the source colour key, ignoring alpha in the + RGB values of the source color key, ignoring alpha in the comparison. RGB->RGBA: @@ -415,7 +415,7 @@ extern DECLSPEC int SDLCALL SDL_FillRects copy RGB, set destination alpha to source per-surface alpha value. both: if SDL_SRCCOLORKEY set, only copy the pixels matching the - source colour key. + source color key. RGBA->RGBA: SDL_SRCALPHA set: @@ -425,7 +425,7 @@ extern DECLSPEC int SDLCALL SDL_FillRects SDL_SRCALPHA not set: copy all of RGBA to the destination. if SDL_SRCCOLORKEY set, only copy the pixels matching the - RGB values of the source colour key, ignoring alpha in the + RGB values of the source color key, ignoring alpha in the comparison. RGB->RGB: @@ -435,7 +435,7 @@ extern DECLSPEC int SDLCALL SDL_FillRects copy RGB. both: if SDL_SRCCOLORKEY set, only copy the pixels matching the - source colour key. + source color key. \endverbatim * * You should call SDL_BlitSurface() unless you know exactly how SDL From 7ba6d24ed902043fcfe86205a501645f10514d00 Mon Sep 17 00:00:00 2001 From: Philipp Wiesemann Date: Sun, 28 Apr 2013 09:54:56 +0200 Subject: [PATCH 044/542] Added missing return statements in test suite for audio. --- test/testautomation_audio.c | 6 ++++++ 1 file changed, 6 insertions(+) diff --git a/test/testautomation_audio.c b/test/testautomation_audio.c index b50494948..bfc04eb28 100644 --- a/test/testautomation_audio.c +++ b/test/testautomation_audio.c @@ -49,6 +49,8 @@ int audio_quitInitAudioSubSystem() /* Restart audio again */ _audioSetUp(NULL); + + return TEST_COMPLETED; } /** @@ -101,6 +103,8 @@ int audio_initQuitAudio() /* Restart audio again */ _audioSetUp(NULL); + + return TEST_COMPLETED; } /** @@ -182,6 +186,8 @@ int audio_initOpenCloseQuitAudio() /* Restart audio again */ _audioSetUp(NULL); + + return TEST_COMPLETED; } /** From 8b5e69d9c52b79a9c7b29c8530b9c8a799b6187c Mon Sep 17 00:00:00 2001 From: Philipp Wiesemann Date: Mon, 29 Apr 2013 23:41:49 +0200 Subject: [PATCH 045/542] Corrected names in README file. --- README.touch | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/README.touch b/README.touch index 9e688330f..d099bb107 100644 --- a/README.touch +++ b/README.touch @@ -28,14 +28,14 @@ event.tfinger.pressure - the pressure of the touch (0..1) SDL_FINGERMOTION: Sent when a finger (or stylus) is moved on the touch device. Fields: -Same as FINGERDOWN but with additional: +Same as SDL_FINGERDOWN but with additional: event.tfinger.dx - change in x coordinate during this motion event. event.tfinger.dy - change in y coordinate during this motion event. SDL_FINGERUP: Sent when a finger (or stylus) is lifted from the touch device. Fields: -Same as FINGERDOWN. +Same as SDL_FINGERDOWN. =========================================================================== @@ -52,7 +52,7 @@ IMPORTANT: If the touch has been removed, or there is no touch with the given ID The number of touch devices can be queried with SDL_GetNumTouchDevices(). -A SDL_Touch may be used to get pointers to SDL_Finger. +A SDL_TouchID may be used to get pointers to SDL_Finger. SDL_GetNumTouchFingers(touchID) may be used to get the number of fingers currently down on the device. @@ -65,7 +65,7 @@ The most common reason to access SDL_Finger is to query the fingers outside the To get a SDL_Finger, call SDL_GetTouchFinger(touchID,index), where touchID is a SDL_TouchID, and index is the requested finger. This returns a SDL_Finger*, or NULL if the finger does not exist, or has been removed. -A SDL_Finger is guaranteed to be persistent for the duration of a touch, but it will be de-allocated as soon as the finger is removed. This occurs when the SDL_FINGERUP event is _added_ to the event queue, and thus _before_ the FINGERUP event is polled. +A SDL_Finger is guaranteed to be persistent for the duration of a touch, but it will be de-allocated as soon as the finger is removed. This occurs when the SDL_FINGERUP event is _added_ to the event queue, and thus _before_ the SDL_FINGERUP event is polled. As a result, be very careful to check for NULL return values. A SDL_Finger has the following fields: From b23a53205a840812dad917660650d0abd682ce52 Mon Sep 17 00:00:00 2001 From: Philipp Wiesemann Date: Mon, 29 Apr 2013 23:45:40 +0200 Subject: [PATCH 046/542] Corrected spelling in C source file. --- src/video/SDL_RLEaccel.c | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/src/video/SDL_RLEaccel.c b/src/video/SDL_RLEaccel.c index de61ccd47..965a706f5 100644 --- a/src/video/SDL_RLEaccel.c +++ b/src/video/SDL_RLEaccel.c @@ -464,7 +464,7 @@ SDL_RLEBlit(SDL_Surface * src, SDL_Rect * srcrect, srcbuf = (Uint8 *) src->map->data; { - /* skip lines at the top if neccessary */ + /* skip lines at the top if necessary */ int vskip = srcrect->y; int ofs = 0; if (vskip) { @@ -1451,7 +1451,7 @@ SDL_RLESurface(SDL_Surface * surface) /* * Un-RLE a surface with pixel alpha * This may not give back exactly the image before RLE-encoding; all - * completely transparent pixels will be lost, and colour and alpha depth + * completely transparent pixels will be lost, and color and alpha depth * may have been reduced (when encoding for 16bpp targets). */ static SDL_bool @@ -1545,7 +1545,7 @@ SDL_UnRLESurface(SDL_Surface * surface, int recode) return; } - /* fill it with the background colour */ + /* fill it with the background color */ SDL_FillRect(surface, NULL, surface->map->info.colorkey); /* now render the encoded surface */ From a4432d3cdfa330258ac7c33e7cfe3932d8d5b159 Mon Sep 17 00:00:00 2001 From: Philipp Wiesemann Date: Mon, 29 Apr 2013 23:50:27 +0200 Subject: [PATCH 047/542] Corrected confusing indentation in C source file. --- src/joystick/SDL_gamecontroller.c | 9 ++++----- 1 file changed, 4 insertions(+), 5 deletions(-) diff --git a/src/joystick/SDL_gamecontroller.c b/src/joystick/SDL_gamecontroller.c index 2e856d359..e12c7a705 100644 --- a/src/joystick/SDL_gamecontroller.c +++ b/src/joystick/SDL_gamecontroller.c @@ -302,8 +302,8 @@ ControllerMapping_t *SDL_PrivateGetControllerMappingForGUID(SDL_JoystickGUID *gu } pSupportedController = pSupportedController->next; } - return NULL; - } + return NULL; +} /* * Helper function to determine pre-caclulated offset to certain joystick mappings @@ -349,7 +349,7 @@ SDL_GameControllerAxis SDL_GameControllerGetAxisFromString( const char *pchStrin if ( !SDL_strcasecmp( pchString, map_StringForControllerAxis[entry] ) ) return entry; } - return SDL_CONTROLLER_AXIS_INVALID; + return SDL_CONTROLLER_AXIS_INVALID; } /* @@ -494,7 +494,6 @@ void SDL_PrivateGameControllerParseButton( const char *szGameButton, const char SDL_assert( !"How did we get here?" ); } } - } @@ -1141,7 +1140,7 @@ SDL_GameControllerClose(SDL_GameController * gamecontroller) gamecontrollerlistprev = gamecontrollerlist; gamecontrollerlist = gamecontrollerlist->next; } - + SDL_free(gamecontroller); } From f19e0132940383a05629b6e1084b2a441669d49b Mon Sep 17 00:00:00 2001 From: Philipp Wiesemann Date: Mon, 29 Apr 2013 23:54:22 +0200 Subject: [PATCH 048/542] Removed unused variables from C source files. --- src/audio/android/SDL_androidaudio.c | 3 +-- src/core/android/SDL_android.cpp | 2 -- 2 files changed, 1 insertion(+), 4 deletions(-) diff --git a/src/audio/android/SDL_androidaudio.c b/src/audio/android/SDL_androidaudio.c index f82854385..a1df47512 100644 --- a/src/audio/android/SDL_androidaudio.c +++ b/src/audio/android/SDL_androidaudio.c @@ -38,8 +38,7 @@ static int AndroidAUD_OpenDevice(_THIS, const char *devname, int iscapture) { SDL_AudioFormat test_format; - int valid_datatype = 0; - + if (iscapture) { //TODO: implement capture return SDL_SetError("Capture not supported on Android"); diff --git a/src/core/android/SDL_android.cpp b/src/core/android/SDL_android.cpp index 6bdf34317..e6a365dce 100644 --- a/src/core/android/SDL_android.cpp +++ b/src/core/android/SDL_android.cpp @@ -422,7 +422,6 @@ extern "C" int Android_JNI_OpenAudioDevice(int sampleRate, int is16Bit, int chan { int audioBufferFrames; - int status; JNIEnv *env = Android_JNI_GetEnv(); if (!env) { @@ -496,7 +495,6 @@ extern "C" void Android_JNI_WriteAudioBuffer() extern "C" void Android_JNI_CloseAudioDevice() { - int status; JNIEnv *env = Android_JNI_GetEnv(); env->CallStaticVoidMethod(mActivityClass, midAudioQuit); From 2b271666bedc7a36f8d9d88e96b8b4855753d8de Mon Sep 17 00:00:00 2001 From: Philipp Wiesemann Date: Wed, 1 May 2013 11:32:05 +0200 Subject: [PATCH 049/542] Fixed SDL_HapticQuery() returning -1 as unsigned int if device is not valid. The function now returns 0 which is the same as if no effects were supported. This may be confusing in rare situations but will not matter most of the time. --- src/haptic/SDL_haptic.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/haptic/SDL_haptic.c b/src/haptic/SDL_haptic.c index 5952a455d..d0b6bd25d 100644 --- a/src/haptic/SDL_haptic.c +++ b/src/haptic/SDL_haptic.c @@ -397,7 +397,7 @@ unsigned int SDL_HapticQuery(SDL_Haptic * haptic) { if (!ValidHaptic(haptic)) { - return -1; + return 0; /* same as if no effects were supported */ } return haptic->supported; From 5b428b875f5911a6be647e546c5b7fded8968e0b Mon Sep 17 00:00:00 2001 From: Philipp Wiesemann Date: Wed, 1 May 2013 11:42:29 +0200 Subject: [PATCH 050/542] Corrected spelling in C source files. --- src/haptic/darwin/SDL_syshaptic.c | 8 ++++---- src/haptic/linux/SDL_syshaptic.c | 4 ++-- src/haptic/windows/SDL_syshaptic.c | 4 ++-- 3 files changed, 8 insertions(+), 8 deletions(-) diff --git a/src/haptic/darwin/SDL_syshaptic.c b/src/haptic/darwin/SDL_syshaptic.c index 1af86b8b1..a8b1d586f 100644 --- a/src/haptic/darwin/SDL_syshaptic.c +++ b/src/haptic/darwin/SDL_syshaptic.c @@ -49,7 +49,7 @@ static struct char name[256]; /* Name of the device. */ io_service_t dev; /* Node we use to create the device. */ - SDL_Haptic *haptic; /* Haptic currently assosciated with it. */ + SDL_Haptic *haptic; /* Haptic currently associated with it. */ /* Usage pages for determining if it's a mouse or not. */ long usage; @@ -259,7 +259,7 @@ HIDGetDeviceProduct(io_service_t dev, char *name) } /* Mac OS X currently is not mirroring all USB properties to HID page so need to look at USB device page also - * get dictionary for usb properties: step up two levels and get CF dictionary for USB properties + * get dictionary for USB properties: step up two levels and get CF dictionary for USB properties */ if ((KERN_SUCCESS == IORegistryEntryGetParentEntry(dev, kIOServicePlane, &parent1)) @@ -272,7 +272,7 @@ HIDGetDeviceProduct(io_service_t dev, char *name) if (usbProperties) { CFTypeRef refCF = 0; /* get device info - * try hid dictionary first, if fail then go to usb dictionary + * try hid dictionary first, if fail then go to USB dictionary */ @@ -708,7 +708,7 @@ SDL_SYS_ToFFEFFECT(SDL_Haptic * haptic, FFEFFECT * dest, } - /* The big type handling switch, even bigger then linux's version. */ + /* The big type handling switch, even bigger then Linux's version. */ switch (src->type) { case SDL_HAPTIC_CONSTANT: hap_constant = &src->constant; diff --git a/src/haptic/linux/SDL_syshaptic.c b/src/haptic/linux/SDL_syshaptic.c index e07c832f9..23a373520 100644 --- a/src/haptic/linux/SDL_syshaptic.c +++ b/src/haptic/linux/SDL_syshaptic.c @@ -371,7 +371,7 @@ SDL_SYS_JoystickIsHaptic(SDL_Joystick * joystick) int SDL_SYS_JoystickSameHaptic(SDL_Haptic * haptic, SDL_Joystick * joystick) { - /* We are assuming linux is using evdev which should trump the old + /* We are assuming Linux is using evdev which should trump the old * joystick methods. */ if (SDL_strcmp(joystick->hwdata->fname, haptic->hwdata->fname) == 0) { return 1; @@ -548,7 +548,7 @@ SDL_SYS_ToDirection(SDL_HapticDirection * dir) #define CLAMP(x) (((x) > 32767) ? 32767 : x) /* - * Initializes the linux effect struct from a haptic_effect. + * Initializes the Linux effect struct from a haptic_effect. * Values above 32767 (for unsigned) are unspecified so we must clamp. */ static int diff --git a/src/haptic/windows/SDL_syshaptic.c b/src/haptic/windows/SDL_syshaptic.c index 9446ce52a..a41c68ea2 100644 --- a/src/haptic/windows/SDL_syshaptic.c +++ b/src/haptic/windows/SDL_syshaptic.c @@ -433,7 +433,7 @@ SDL_SYS_HapticOpenFromXInput(SDL_Haptic * haptic, Uint8 userid) * - Set data format. * - Acquire exclusiveness. * - Reset actuators. - * - Get supported featuers. + * - Get supported features. */ static int SDL_SYS_HapticOpenFromDevice8(SDL_Haptic * haptic, @@ -888,7 +888,7 @@ SDL_SYS_ToDIEFFECT(SDL_Haptic * haptic, DIEFFECT * dest, } - /* The big type handling switch, even bigger then linux's version. */ + /* The big type handling switch, even bigger then Linux's version. */ switch (src->type) { case SDL_HAPTIC_CONSTANT: hap_constant = &src->constant; From e83262a725f1b608285df597d328a9e6b12dcfc0 Mon Sep 17 00:00:00 2001 From: Philipp Wiesemann Date: Wed, 1 May 2013 11:59:54 +0200 Subject: [PATCH 051/542] Corrected spelling in C source files. --- src/joystick/SDL_gamecontroller.c | 8 ++++---- src/joystick/darwin/SDL_sysjoystick.c | 10 +++++----- src/joystick/darwin/SDL_sysjoystick_c.h | 2 +- src/joystick/linux/SDL_sysjoystick.c | 2 +- src/joystick/linux/SDL_sysjoystick_c.h | 4 ++-- src/joystick/windows/SDL_dxjoystick.c | 6 +++--- src/joystick/windows/SDL_dxjoystick_c.h | 2 +- 7 files changed, 17 insertions(+), 17 deletions(-) diff --git a/src/joystick/SDL_gamecontroller.c b/src/joystick/SDL_gamecontroller.c index e12c7a705..9afb26df5 100644 --- a/src/joystick/SDL_gamecontroller.c +++ b/src/joystick/SDL_gamecontroller.c @@ -170,7 +170,7 @@ int SDL_GameControllerEventWatcher(void *userdata, SDL_Event * event) } SDL_PrivateGameControllerAxis( controllerlist, axis, value ); } - else if ( controllerlist->mapping.raxesasbutton[event->jaxis.axis] >= 0 ) // simlate an axis as a button + else if ( controllerlist->mapping.raxesasbutton[event->jaxis.axis] >= 0 ) // simulate an axis as a button { SDL_PrivateGameControllerButton( controllerlist, controllerlist->mapping.raxesasbutton[event->jaxis.axis], ABS(event->jaxis.value) > 32768/2 ? SDL_PRESSED : SDL_RELEASED ); } @@ -306,7 +306,7 @@ ControllerMapping_t *SDL_PrivateGetControllerMappingForGUID(SDL_JoystickGUID *gu } /* - * Helper function to determine pre-caclulated offset to certain joystick mappings + * Helper function to determine pre-calculated offset to certain joystick mappings */ ControllerMapping_t *SDL_PrivateGetControllerMapping(int device_index) { @@ -1044,7 +1044,7 @@ SDL_Joystick *SDL_GameControllerGetJoystick(SDL_GameController * gamecontroller) } /** - * get the sdl joystick layer binding for this controller axi mapping + * Get the SDL joystick layer binding for this controller axis mapping */ SDL_GameControllerButtonBind SDL_GameControllerGetBindForAxis(SDL_GameController * gamecontroller, SDL_GameControllerAxis axis) { @@ -1070,7 +1070,7 @@ SDL_GameControllerButtonBind SDL_GameControllerGetBindForAxis(SDL_GameController /** - * get the sdl joystick layer binding for this controller button mapping + * Get the SDL joystick layer binding for this controller button mapping */ SDL_GameControllerButtonBind SDL_GameControllerGetBindForButton(SDL_GameController * gamecontroller, SDL_GameControllerButton button) { diff --git a/src/joystick/darwin/SDL_sysjoystick.c b/src/joystick/darwin/SDL_sysjoystick.c index eba71e167..c97f47eb8 100644 --- a/src/joystick/darwin/SDL_sysjoystick.c +++ b/src/joystick/darwin/SDL_sysjoystick.c @@ -145,7 +145,7 @@ void JoystickDeviceWasRemovedCallback( void * refcon, io_service_t service, natu /* Create and open an interface to device, required prior to extracting values or building queues. - * Note: appliction now owns the device and must close and release it prior to exiting + * Note: application now owns the device and must close and release it prior to exiting */ static IOReturn @@ -218,7 +218,7 @@ HIDCreateOpenDeviceInterface(io_object_t hidDevice, recDevice * pDevice) return result; } -/* Closes and releases interface to device, should be done prior to exting application +/* Closes and releases interface to device, should be done prior to exiting application * Note: will have no affect if device or interface do not exist * application will "own" the device if interface is not closed * (device may have to be plug and re-plugged in different location to get it working again without a restart) @@ -301,7 +301,7 @@ HIDGetElementInfo(CFTypeRef refElement, recElement * pElement) */ } -/* examines CF dictionary vlaue in device element hierarchy to determine if it is element of interest or a collection of more elements +/* examines CF dictionary value in device element hierarchy to determine if it is element of interest or a collection of more elements * if element of interest allocate storage, add to list and retrieve element specific info * if collection then pass on to deconstruction collection into additional individual elements */ @@ -399,7 +399,7 @@ HIDAddElement(CFTypeRef refElement, recDevice * pDevice) } } -/* collects information from each array member in device element list (each array memeber = element) */ +/* collects information from each array member in device element list (each array member = element) */ static void HIDGetElementsCFArrayHandler(const void *value, void *parameter) @@ -464,7 +464,7 @@ HIDGetDeviceInfo(io_object_t hidDevice, CFMutableDictionaryRef hidProperties, io_registry_entry_t parent1, parent2; /* Mac OS X currently is not mirroring all USB properties to HID page so need to look at USB device page also - * get dictionary for usb properties: step up two levels and get CF dictionary for USB properties + * get dictionary for USB properties: step up two levels and get CF dictionary for USB properties */ if ((KERN_SUCCESS == IORegistryEntryGetParentEntry(hidDevice, kIOServicePlane, &parent1)) && (KERN_SUCCESS == IORegistryEntryGetParentEntry(parent1, kIOServicePlane, &parent2)) diff --git a/src/joystick/darwin/SDL_sysjoystick_c.h b/src/joystick/darwin/SDL_sysjoystick_c.h index fc223d7e1..21cf7e911 100644 --- a/src/joystick/darwin/SDL_sysjoystick_c.h +++ b/src/joystick/darwin/SDL_sysjoystick_c.h @@ -69,7 +69,7 @@ struct joystick_hwdata long axes; /* number of axis (calculated, not reported by device) */ long buttons; /* number of buttons (calculated, not reported by device) */ long hats; /* number of hat switches (calculated, not reported by device) */ - long elements; /* number of total elements (shouldbe total of above) (calculated, not reported by device) */ + long elements; /* number of total elements (should be total of above) (calculated, not reported by device) */ recElement *firstAxis; recElement *firstButton; diff --git a/src/joystick/linux/SDL_sysjoystick.c b/src/joystick/linux/SDL_sysjoystick.c index 98e6c0ec0..23915b45a 100644 --- a/src/joystick/linux/SDL_sysjoystick.c +++ b/src/joystick/linux/SDL_sysjoystick.c @@ -938,7 +938,7 @@ HandleInputEvents(SDL_Joystick * joystick) switch (code) { case SYN_DROPPED : #ifdef DEBUG_INPUT_EVENTS - printf("Event SYN_DROPPED dectected\n"); + printf("Event SYN_DROPPED detected\n"); #endif PollAllValues(joystick); break; diff --git a/src/joystick/linux/SDL_sysjoystick_c.h b/src/joystick/linux/SDL_sysjoystick_c.h index 25d33853b..4e942b54c 100644 --- a/src/joystick/linux/SDL_sysjoystick_c.h +++ b/src/joystick/linux/SDL_sysjoystick_c.h @@ -31,12 +31,12 @@ struct joystick_hwdata SDL_JoystickGUID guid; char *fname; /* Used in haptic subsystem */ - /* The current linux joystick driver maps hats to two axes */ + /* The current Linux joystick driver maps hats to two axes */ struct hwdata_hat { int axis[2]; } *hats; - /* The current linux joystick driver maps balls to two axes */ + /* The current Linux joystick driver maps balls to two axes */ struct hwdata_ball { int axis[2]; diff --git a/src/joystick/windows/SDL_dxjoystick.c b/src/joystick/windows/SDL_dxjoystick.c index 6ac7f338d..b61022004 100644 --- a/src/joystick/windows/SDL_dxjoystick.c +++ b/src/joystick/windows/SDL_dxjoystick.c @@ -99,7 +99,7 @@ WIN_LoadXInputDLL(void) s_pXInputDLL = LoadLibrary( L"XInput1_4.dll" ); // 1.4 Ships with Windows 8. if (!s_pXInputDLL) { version = (1 << 16) | 3; - s_pXInputDLL = LoadLibrary( L"XInput1_3.dll" ); // 1.3 Ships with Vista and Win7, can be installed as a restributable component. + s_pXInputDLL = LoadLibrary( L"XInput1_3.dll" ); // 1.3 Ships with Vista and Win7, can be installed as a redistributable component. } if (!s_pXInputDLL) { s_pXInputDLL = LoadLibrary( L"bin\\XInput1_3.dll" ); @@ -514,7 +514,7 @@ LCleanup: static SDL_bool s_bWindowsDeviceChanged = SDL_FALSE; -/* windowproc for our joystick detect thread message only window, to detect any usb device addition/removal +/* windowproc for our joystick detect thread message only window, to detect any USB device addition/removal */ LRESULT CALLBACK SDL_PrivateJoystickDetectProc(HWND hwnd, UINT message, WPARAM wParam, LPARAM lParam) { switch (message) { @@ -1043,7 +1043,7 @@ SDL_SYS_JoystickOpen(SDL_Joystick * joystick, int device_index) return SetDIerror("IDirectInputDevice8::QueryInterface", result); } - /* Aquire shared access. Exclusive access is required for forces, + /* Acquire shared access. Exclusive access is required for forces, * though. */ result = IDirectInputDevice8_SetCooperativeLevel(joystick->hwdata-> diff --git a/src/joystick/windows/SDL_dxjoystick_c.h b/src/joystick/windows/SDL_dxjoystick_c.h index 13d0d451a..564a566bb 100644 --- a/src/joystick/windows/SDL_dxjoystick_c.h +++ b/src/joystick/windows/SDL_dxjoystick_c.h @@ -34,7 +34,7 @@ #include "../../core/windows/SDL_windows.h" -#define DIRECTINPUT_VERSION 0x0800 /* Need version 7 for force feedback. Need verison 8 so IDirectInput8_EnumDevices doesn't leak like a sieve... */ +#define DIRECTINPUT_VERSION 0x0800 /* Need version 7 for force feedback. Need version 8 so IDirectInput8_EnumDevices doesn't leak like a sieve... */ #include #define COBJMACROS #include From 985951f70e9593c51d66ae598cf361f0cae227d8 Mon Sep 17 00:00:00 2001 From: Andreas Schiffler Date: Wed, 1 May 2013 22:14:29 -0700 Subject: [PATCH 052/542] Add pixels test suite; add a test to pixel suite; minor updates to test code to make VisualStudio happy --- .../testautomation_vs2010.vcxproj | 3 +- .../testautomation_vs2012.vcxproj | 3 +- test/Makefile.in | 3 +- test/testautomation_audio.c | 69 ++++--- test/testautomation_pixels.c | 168 ++++++++++++++++++ test/testautomation_suites.h | 2 + test/testautomation_video.c | 32 ++-- 7 files changed, 226 insertions(+), 54 deletions(-) create mode 100644 test/testautomation_pixels.c diff --git a/VisualC/tests/testautomation/testautomation_vs2010.vcxproj b/VisualC/tests/testautomation/testautomation_vs2010.vcxproj index 66faf965a..0947a9754 100644 --- a/VisualC/tests/testautomation/testautomation_vs2010.vcxproj +++ b/VisualC/tests/testautomation/testautomation_vs2010.vcxproj @@ -1,4 +1,4 @@ - + @@ -192,6 +192,7 @@ + diff --git a/VisualC/tests/testautomation/testautomation_vs2012.vcxproj b/VisualC/tests/testautomation/testautomation_vs2012.vcxproj index 6927468f6..340081bc2 100644 --- a/VisualC/tests/testautomation/testautomation_vs2012.vcxproj +++ b/VisualC/tests/testautomation/testautomation_vs2012.vcxproj @@ -1,4 +1,4 @@ - + @@ -196,6 +196,7 @@ + diff --git a/test/Makefile.in b/test/Makefile.in index e54b29e37..0240a2e60 100644 --- a/test/Makefile.in +++ b/test/Makefile.in @@ -83,7 +83,8 @@ testautomation$(EXE): $(srcdir)/testautomation.c \ $(srcdir)/testautomation_syswm.c \ $(srcdir)/testautomation_sdltest.c \ $(srcdir)/testautomation_mouse.c \ - $(srcdir)/testautomation_timer.c + $(srcdir)/testautomation_timer.c \ + $(srcdir)/testautomation_pixels.c $(CC) -o $@ $^ $(CFLAGS) -lSDL2_test $(LIBS) testmultiaudio$(EXE): $(srcdir)/testmultiaudio.c diff --git a/test/testautomation_audio.c b/test/testautomation_audio.c index bfc04eb28..b6f316393 100644 --- a/test/testautomation_audio.c +++ b/test/testautomation_audio.c @@ -117,11 +117,10 @@ int audio_initQuitAudio() */ int audio_initOpenCloseQuitAudio() { - int result; + int result; int i, iMax, j; const char* audioDriver; SDL_AudioSpec desired; - SDL_AudioSpec obtained; /* Stop SDL audio subsystem */ SDL_QuitSubSystem( SDL_INIT_AUDIO ); @@ -347,17 +346,17 @@ int audio_printCurrentAudioDriver() } /* Definition of all formats, channels, and frequencies used to test audio conversions */ -const int _numFormats = 18; -SDL_AudioFormat _formats[] = { AUDIO_S8, AUDIO_U8, AUDIO_S16LSB, AUDIO_S16MSB, AUDIO_S16SYS, AUDIO_S16, AUDIO_U16LSB, +const int _numAudioFormats = 18; +SDL_AudioFormat _audioFormats[] = { AUDIO_S8, AUDIO_U8, AUDIO_S16LSB, AUDIO_S16MSB, AUDIO_S16SYS, AUDIO_S16, AUDIO_U16LSB, AUDIO_U16MSB, AUDIO_U16SYS, AUDIO_U16, AUDIO_S32LSB, AUDIO_S32MSB, AUDIO_S32SYS, AUDIO_S32, AUDIO_F32LSB, AUDIO_F32MSB, AUDIO_F32SYS, AUDIO_F32 }; -char *_formatsVerbose[] = { "AUDIO_S8", "AUDIO_U8", "AUDIO_S16LSB", "AUDIO_S16MSB", "AUDIO_S16SYS", "AUDIO_S16", "AUDIO_U16LSB", +char *_audioFormatsVerbose[] = { "AUDIO_S8", "AUDIO_U8", "AUDIO_S16LSB", "AUDIO_S16MSB", "AUDIO_S16SYS", "AUDIO_S16", "AUDIO_U16LSB", "AUDIO_U16MSB", "AUDIO_U16SYS", "AUDIO_U16", "AUDIO_S32LSB", "AUDIO_S32MSB", "AUDIO_S32SYS", "AUDIO_S32", "AUDIO_F32LSB", "AUDIO_F32MSB", "AUDIO_F32SYS", "AUDIO_F32" }; -const int _numChannels = 4; -Uint8 _channels[] = { 1, 2, 4, 6 }; -const int _numFrequencies = 4; -int _frequencies[] = { 11025, 22050, 44100, 48000 }; +const int _numAudioChannels = 4; +Uint8 _audioChannels[] = { 1, 2, 4, 6 }; +const int _numAudioFrequencies = 4; +int _audioFrequencies[] = { 11025, 22050, 44100, 48000 }; /** @@ -395,22 +394,22 @@ int audio_buildAudioCVT() SDLTest_AssertCheck(result == 1, "Verify result value; expected: 1, got: %i", result); /* All source conversions with random conversion targets, allow 'null' conversions */ - for (i = 0; i < _numFormats; i++) { - for (j = 0; j < _numChannels; j++) { - for (k = 0; k < _numFrequencies; k++) { - spec1.format = _formats[i]; - spec1.channels = _channels[j]; - spec1.freq = _frequencies[k]; - ii = SDLTest_RandomIntegerInRange(0, _numFormats - 1); - jj = SDLTest_RandomIntegerInRange(0, _numChannels - 1); - kk = SDLTest_RandomIntegerInRange(0, _numFrequencies - 1); - spec2.format = _formats[ii]; - spec2.channels = _channels[jj]; - spec2.freq = _frequencies[kk]; + for (i = 0; i < _numAudioFormats; i++) { + for (j = 0; j < _numAudioChannels; j++) { + for (k = 0; k < _numAudioFrequencies; k++) { + spec1.format = _audioFormats[i]; + spec1.channels = _audioChannels[j]; + spec1.freq = _audioFrequencies[k]; + ii = SDLTest_RandomIntegerInRange(0, _numAudioFormats - 1); + jj = SDLTest_RandomIntegerInRange(0, _numAudioChannels - 1); + kk = SDLTest_RandomIntegerInRange(0, _numAudioFrequencies - 1); + spec2.format = _audioFormats[ii]; + spec2.channels = _audioChannels[jj]; + spec2.freq = _audioFrequencies[kk]; result = SDL_BuildAudioCVT(&cvt, spec1.format, spec1.channels, spec1.freq, spec2.format, spec2.channels, spec2.freq); SDLTest_AssertPass("Call to SDL_BuildAudioCVT(format[%i]=%s(%i),channels[%i]=%i,freq[%i]=%i ==> format[%i]=%s(%i),channels[%i]=%i,freq[%i]=%i)", - i, _formatsVerbose[i], spec1.format, j, spec1.channels, k, spec1.freq, ii, _formatsVerbose[ii], spec2.format, jj, spec2.channels, kk, spec2.freq); + i, _audioFormatsVerbose[i], spec1.format, j, spec1.channels, k, spec1.freq, ii, _audioFormatsVerbose[ii], spec2.format, jj, spec2.channels, kk, spec2.freq); SDLTest_AssertCheck(result == 0 || result == 1, "Verify result value; expected: 0 or 1, got: %i", result); if (result<0) { SDLTest_LogError(SDL_GetError()); @@ -691,39 +690,39 @@ int audio_convertAudio() } SDLTest_Log(message); /* All source conversions with random conversion targets */ - for (i = 0; i < _numFormats; i++) { - for (j = 0; j < _numChannels; j++) { - for (k = 0; k < _numFrequencies; k++) { - spec1.format = _formats[i]; - spec1.channels = _channels[j]; - spec1.freq = _frequencies[k]; + for (i = 0; i < _numAudioFormats; i++) { + for (j = 0; j < _numAudioChannels; j++) { + for (k = 0; k < _numAudioFrequencies; k++) { + spec1.format = _audioFormats[i]; + spec1.channels = _audioChannels[j]; + spec1.freq = _audioFrequencies[k]; /* Ensure we have a different target format */ do { if (c & 1) { - ii = SDLTest_RandomIntegerInRange(0, _numFormats - 1); + ii = SDLTest_RandomIntegerInRange(0, _numAudioFormats - 1); } else { ii = 1; } if (c & 2) { - jj = SDLTest_RandomIntegerInRange(0, _numChannels - 1); + jj = SDLTest_RandomIntegerInRange(0, _numAudioChannels - 1); } else { jj= j; } if (c & 4) { - kk = SDLTest_RandomIntegerInRange(0, _numFrequencies - 1); + kk = SDLTest_RandomIntegerInRange(0, _numAudioFrequencies - 1); } else { kk = k; } } while ((i == ii) && (j == jj) && (k == kk)); - spec2.format = _formats[ii]; - spec2.channels = _channels[jj]; - spec2.freq = _frequencies[kk]; + spec2.format = _audioFormats[ii]; + spec2.channels = _audioChannels[jj]; + spec2.freq = _audioFrequencies[kk]; result = SDL_BuildAudioCVT(&cvt, spec1.format, spec1.channels, spec1.freq, spec2.format, spec2.channels, spec2.freq); SDLTest_AssertPass("Call to SDL_BuildAudioCVT(format[%i]=%s(%i),channels[%i]=%i,freq[%i]=%i ==> format[%i]=%s(%i),channels[%i]=%i,freq[%i]=%i)", - i, _formatsVerbose[i], spec1.format, j, spec1.channels, k, spec1.freq, ii, _formatsVerbose[ii], spec2.format, jj, spec2.channels, kk, spec2.freq); + i, _audioFormatsVerbose[i], spec1.format, j, spec1.channels, k, spec1.freq, ii, _audioFormatsVerbose[ii], spec2.format, jj, spec2.channels, kk, spec2.freq); SDLTest_AssertCheck(result == 1, "Verify result value; expected: 1, got: %i", result); if (result != 1) { SDLTest_LogError(SDL_GetError()); diff --git a/test/testautomation_pixels.c b/test/testautomation_pixels.c new file mode 100644 index 000000000..73cf12460 --- /dev/null +++ b/test/testautomation_pixels.c @@ -0,0 +1,168 @@ +/** + * Pixels test suite + */ + +#include + +#include "SDL.h" +#include "SDL_test.h" + +/* Test case functions */ + +/* Definition of all RGB formats used to test pixel conversions */ +const int _numRGBPixelFormats = 30; +Uint32 _RGBPixelFormats[] = + { + SDL_PIXELFORMAT_INDEX1LSB, + SDL_PIXELFORMAT_INDEX1MSB, + SDL_PIXELFORMAT_INDEX4LSB, + SDL_PIXELFORMAT_INDEX4MSB, + SDL_PIXELFORMAT_INDEX8, + SDL_PIXELFORMAT_RGB332, + SDL_PIXELFORMAT_RGB444, + SDL_PIXELFORMAT_RGB555, + SDL_PIXELFORMAT_BGR555, + SDL_PIXELFORMAT_ARGB4444, + SDL_PIXELFORMAT_RGBA4444, + SDL_PIXELFORMAT_ABGR4444, + SDL_PIXELFORMAT_BGRA4444, + SDL_PIXELFORMAT_ARGB1555, + SDL_PIXELFORMAT_RGBA5551, + SDL_PIXELFORMAT_ABGR1555, + SDL_PIXELFORMAT_BGRA5551, + SDL_PIXELFORMAT_RGB565, + SDL_PIXELFORMAT_BGR565, + SDL_PIXELFORMAT_RGB24, + SDL_PIXELFORMAT_BGR24, + SDL_PIXELFORMAT_RGB888, + SDL_PIXELFORMAT_RGBX8888, + SDL_PIXELFORMAT_BGR888, + SDL_PIXELFORMAT_BGRX8888, + SDL_PIXELFORMAT_ARGB8888, + SDL_PIXELFORMAT_RGBA8888, + SDL_PIXELFORMAT_ABGR8888, + SDL_PIXELFORMAT_BGRA8888, + SDL_PIXELFORMAT_ARGB2101010 + }; +char* _RGBPixelFormatsVerbose[] = + { + "SDL_PIXELFORMAT_INDEX1LSB", + "SDL_PIXELFORMAT_INDEX1MSB", + "SDL_PIXELFORMAT_INDEX4LSB", + "SDL_PIXELFORMAT_INDEX4MSB", + "SDL_PIXELFORMAT_INDEX8", + "SDL_PIXELFORMAT_RGB332", + "SDL_PIXELFORMAT_RGB444", + "SDL_PIXELFORMAT_RGB555", + "SDL_PIXELFORMAT_BGR555", + "SDL_PIXELFORMAT_ARGB4444", + "SDL_PIXELFORMAT_RGBA4444", + "SDL_PIXELFORMAT_ABGR4444", + "SDL_PIXELFORMAT_BGRA4444", + "SDL_PIXELFORMAT_ARGB1555", + "SDL_PIXELFORMAT_RGBA5551", + "SDL_PIXELFORMAT_ABGR1555", + "SDL_PIXELFORMAT_BGRA5551", + "SDL_PIXELFORMAT_RGB565", + "SDL_PIXELFORMAT_BGR565", + "SDL_PIXELFORMAT_RGB24", + "SDL_PIXELFORMAT_BGR24", + "SDL_PIXELFORMAT_RGB888", + "SDL_PIXELFORMAT_RGBX8888", + "SDL_PIXELFORMAT_BGR888", + "SDL_PIXELFORMAT_BGRX8888", + "SDL_PIXELFORMAT_ARGB8888", + "SDL_PIXELFORMAT_RGBA8888", + "SDL_PIXELFORMAT_ABGR8888", + "SDL_PIXELFORMAT_BGRA8888", + "SDL_PIXELFORMAT_ARGB2101010" + }; + +/* Definition of all Non-RGB formats used to test pixel conversions */ +const int _numNonRGBPixelFormats = 5; +Uint32 _nonRGBPixelFormats[] = + { + SDL_PIXELFORMAT_YV12, + SDL_PIXELFORMAT_IYUV, + SDL_PIXELFORMAT_YUY2, + SDL_PIXELFORMAT_UYVY, + SDL_PIXELFORMAT_YVYU + }; +char* _nonRGBPixelFormatsVerbose[] = + { + "SDL_PIXELFORMAT_YV12", + "SDL_PIXELFORMAT_IYUV", + "SDL_PIXELFORMAT_YUY2", + "SDL_PIXELFORMAT_UYVY", + "SDL_PIXELFORMAT_YVYU" + }; + +/* Test case functions */ + +/** + * @brief Call to SDL_AllocFormat and SDL_FreeFormat + */ +int +pixels_allocFreeFormat(void *arg) +{ + int i; + Uint32 format; + Uint32 masks; + SDL_PixelFormat* result; + + /* RGB formats */ + for (i = 0; i < _numRGBPixelFormats; i++) { + format = _RGBPixelFormats[i]; + SDLTest_Log("RGB Format: %s (%u)", _RGBPixelFormatsVerbose[i], format); + + /* Allocate format */ + result = SDL_AllocFormat(format); + SDLTest_AssertPass("Call to SDL_AllocFormat()"); + SDLTest_AssertCheck(result != NULL, "Verify result is not NULL"); + if (result != NULL) { + SDLTest_AssertCheck(result->format == format, "Verify value of result.format; expected: %u, got %u", format, result->format); + SDLTest_AssertCheck(result->BitsPerPixel > 0, "Verify value of result.BitsPerPixel; expected: >0, got %u", result->BitsPerPixel); + SDLTest_AssertCheck(result->BytesPerPixel > 0, "Verify value of result.BytesPerPixel; expected: >0, got %u", result->BytesPerPixel); + if (result->palette != NULL) { + masks = result->Rmask | result->Gmask | result->Bmask | result->Amask; + SDLTest_AssertCheck(masks > 0, "Verify value of result.[RGBA]mask combined; expected: >0, got %u", masks); + } + + /* Deallocate again */ + SDL_FreeFormat(result); + SDLTest_AssertPass("Call to SDL_FreeFormat()"); + } + } + + /* Non-RGB formats */ + for (i = 0; i < _numNonRGBPixelFormats; i++) { + format = _nonRGBPixelFormats[i]; + SDLTest_Log("non-RGB Format: %s (%u)", _nonRGBPixelFormatsVerbose[i], format); + + /* Try to allocate format */ + result = SDL_AllocFormat(format); + SDLTest_AssertPass("Call to SDL_AllocFormat()"); + SDLTest_AssertCheck(result == NULL, "Verify result is NULL"); + } + + return TEST_COMPLETED; +} + +/* ================= Test References ================== */ + +/* SysWM test cases */ +static const SDLTest_TestCaseReference pixelsTest1 = + { (SDLTest_TestCaseFp)pixels_allocFreeFormat, "pixels_allocFreeFormat", "Call to SDL_AllocFormat and SDL_FreeFormat", TEST_ENABLED }; + +/* Sequence of Pixels test cases */ +static const SDLTest_TestCaseReference *pixelsTests[] = { + &pixelsTest1, NULL +}; + +/* Pixels test suite (global) */ +SDLTest_TestSuiteReference pixelsTestSuite = { + "Pixels", + NULL, + pixelsTests, + NULL +}; diff --git a/test/testautomation_suites.h b/test/testautomation_suites.h index 2de9ae28e..53e51578c 100644 --- a/test/testautomation_suites.h +++ b/test/testautomation_suites.h @@ -24,6 +24,7 @@ extern SDLTest_TestSuiteReference sdltestTestSuite; extern SDLTest_TestSuiteReference videoTestSuite; extern SDLTest_TestSuiteReference mouseTestSuite; extern SDLTest_TestSuiteReference timerTestSuite; +extern SDLTest_TestSuiteReference pixelsTestSuite; // All test suites SDLTest_TestSuiteReference *testSuites[] = { @@ -42,6 +43,7 @@ SDLTest_TestSuiteReference *testSuites[] = { &videoTestSuite, &mouseTestSuite, &timerTestSuite, + &pixelsTestSuite, NULL }; diff --git a/test/testautomation_video.c b/test/testautomation_video.c index 396275239..9abf32aa1 100644 --- a/test/testautomation_video.c +++ b/test/testautomation_video.c @@ -1534,7 +1534,7 @@ video_getSetWindowData(void *arg) returnValue = TEST_ABORTED; goto cleanup; } - userdata2 = (char *)strdup(referenceUserdata2); + userdata2 = (char *)SDL_strdup(referenceUserdata2); if (userdata2 == NULL) { returnValue = TEST_ABORTED; goto cleanup; @@ -1547,7 +1547,7 @@ video_getSetWindowData(void *arg) SDLTest_AssertCheck(SDL_strcmp(referenceName, name) == 0, "Validate that name was not changed, expected: %s, got: %s", referenceName, name); /* Set data */ - result = SDL_SetWindowData(window, name, userdata); + result = (char *)SDL_SetWindowData(window, name, userdata); SDLTest_AssertPass("Call to SDL_SetWindowData(...%s,%s)", name, userdata); SDLTest_AssertCheck(result == NULL, "Validate that result is NULL"); SDLTest_AssertCheck(SDL_strcmp(referenceName, name) == 0, "Validate that name was not changed, expected: %s, got: %s", referenceName, name); @@ -1563,7 +1563,7 @@ video_getSetWindowData(void *arg) /* Set data again twice */ for (iteration = 1; iteration <= 2; iteration++) { - result = SDL_SetWindowData(window, name, userdata); + result = (char *)SDL_SetWindowData(window, name, userdata); SDLTest_AssertPass("Call to SDL_SetWindowData(...%s,%s) [iteration %d]", name, userdata, iteration); SDLTest_AssertCheck(SDL_strcmp(referenceUserdata, result) == 0, "Validate that correct result was returned; expected: %s, got: %s", referenceUserdata, result); SDLTest_AssertCheck(SDL_strcmp(referenceName, name) == 0, "Validate that name was not changed, expected: %s, got: %s", referenceName, name); @@ -1577,7 +1577,7 @@ video_getSetWindowData(void *arg) SDLTest_AssertCheck(SDL_strcmp(referenceName, name) == 0, "Validate that name was not changed, expected: %s, got: %s", referenceName, name); /* Set data with new data */ - result = SDL_SetWindowData(window, name, userdata2); + result = (char *)SDL_SetWindowData(window, name, userdata2); SDLTest_AssertPass("Call to SDL_SetWindowData(...%s,%s) [new userdata]", name, userdata2); SDLTest_AssertCheck(SDL_strcmp(referenceUserdata, result) == 0, "Validate that correct result was returned; expected: %s, got: %s", referenceUserdata, result); SDLTest_AssertCheck(SDL_strcmp(referenceName, name) == 0, "Validate that name was not changed, expected: %s, got: %s", referenceName, name); @@ -1585,7 +1585,7 @@ video_getSetWindowData(void *arg) SDLTest_AssertCheck(SDL_strcmp(referenceUserdata2, userdata2) == 0, "Validate that userdata2 was not changed, expected: %s, got: %s", referenceUserdata2, userdata2); /* Set data with new data again */ - result = SDL_SetWindowData(window, name, userdata2); + result = (char *)SDL_SetWindowData(window, name, userdata2); SDLTest_AssertPass("Call to SDL_SetWindowData(...%s,%s) [new userdata again]", name, userdata2); SDLTest_AssertCheck(SDL_strcmp(referenceUserdata2, result) == 0, "Validate that correct result was returned; expected: %s, got: %s", referenceUserdata2, result); SDLTest_AssertCheck(SDL_strcmp(referenceName, name) == 0, "Validate that name was not changed, expected: %s, got: %s", referenceName, name); @@ -1599,7 +1599,7 @@ video_getSetWindowData(void *arg) SDLTest_AssertCheck(SDL_strcmp(referenceName, name) == 0, "Validate that name was not changed, expected: %s, got: %s", referenceName, name); /* Set data with NULL to clear */ - result = SDL_SetWindowData(window, name, NULL); + result = (char *)SDL_SetWindowData(window, name, NULL); SDLTest_AssertPass("Call to SDL_SetWindowData(...%s,NULL)", name, userdata); SDLTest_AssertCheck(SDL_strcmp(referenceUserdata2, result) == 0, "Validate that correct result was returned; expected: %s, got: %s", referenceUserdata2, result); SDLTest_AssertCheck(SDL_strcmp(referenceName, name) == 0, "Validate that name was not changed, expected: %s, got: %s", referenceName, name); @@ -1607,7 +1607,7 @@ video_getSetWindowData(void *arg) SDLTest_AssertCheck(SDL_strcmp(referenceUserdata2, userdata2) == 0, "Validate that userdata2 was not changed, expected: %s, got: %s", referenceUserdata2, userdata2); /* Set data with NULL to clear again */ - result = SDL_SetWindowData(window, name, NULL); + result = (char *)SDL_SetWindowData(window, name, NULL); SDLTest_AssertPass("Call to SDL_SetWindowData(...%s,NULL) [again]", name, userdata); SDLTest_AssertCheck(result == NULL, "Validate that result is NULL"); SDLTest_AssertCheck(SDL_strcmp(referenceName, name) == 0, "Validate that name was not changed, expected: %s, got: %s", referenceName, name); @@ -1627,7 +1627,7 @@ video_getSetWindowData(void *arg) SDLTest_AssertCheck(SDL_strcmp(referenceName2, name2) == 0, "Validate that name2 was not changed, expected: %s, got: %s", referenceName2, name2); /* Set data (again) */ - result = SDL_SetWindowData(window, name, userdata); + result = (char *)SDL_SetWindowData(window, name, userdata); SDLTest_AssertPass("Call to SDL_SetWindowData(...%s,%s) [again, after clear]", name, userdata); SDLTest_AssertCheck(result == NULL, "Validate that result is NULL"); SDLTest_AssertCheck(SDL_strcmp(referenceName, name) == 0, "Validate that name was not changed, expected: %s, got: %s", referenceName, name); @@ -1644,49 +1644,49 @@ video_getSetWindowData(void *arg) SDLTest_AssertPass("Call to SDL_ClearError()"); /* Set with invalid window */ - result = SDL_SetWindowData(NULL, name, userdata); + result = (char *)SDL_SetWindowData(NULL, name, userdata); SDLTest_AssertPass("Call to SDL_SetWindowData(window=NULL)"); SDLTest_AssertCheck(result == NULL, "Validate that result is NULL"); _checkInvalidWindowError(); /* Set data with NULL name, valid userdata */ - result = SDL_SetWindowData(window, NULL, userdata); + result = (char *)SDL_SetWindowData(window, NULL, userdata); SDLTest_AssertPass("Call to SDL_SetWindowData(name=NULL)"); SDLTest_AssertCheck(result == NULL, "Validate that result is NULL"); _checkInvalidParameterError(); /* Set data with empty name, valid userdata */ - result = SDL_SetWindowData(window, "", userdata); + result = (char *)SDL_SetWindowData(window, "", userdata); SDLTest_AssertPass("Call to SDL_SetWindowData(name='')"); SDLTest_AssertCheck(result == NULL, "Validate that result is NULL"); _checkInvalidParameterError(); /* Set data with NULL name, NULL userdata */ - result = SDL_SetWindowData(window, NULL, NULL); + result = (char *)SDL_SetWindowData(window, NULL, NULL); SDLTest_AssertPass("Call to SDL_SetWindowData(name=NULL,userdata=NULL)"); SDLTest_AssertCheck(result == NULL, "Validate that result is NULL"); _checkInvalidParameterError(); /* Set data with empty name, NULL userdata */ - result = SDL_SetWindowData(window, "", NULL); + result = (char *)SDL_SetWindowData(window, "", NULL); SDLTest_AssertPass("Call to SDL_SetWindowData(name='',userdata=NULL)"); SDLTest_AssertCheck(result == NULL, "Validate that result is NULL"); _checkInvalidParameterError(); /* Get with invalid window */ - result = SDL_GetWindowData(NULL, name); + result = (char *)SDL_GetWindowData(NULL, name); SDLTest_AssertPass("Call to SDL_GetWindowData(window=NULL)"); SDLTest_AssertCheck(result == NULL, "Validate that result is NULL"); _checkInvalidWindowError(); /* Get data with NULL name */ - result = SDL_GetWindowData(window, NULL); + result = (char *)SDL_GetWindowData(window, NULL); SDLTest_AssertPass("Call to SDL_GetWindowData(name=NULL)"); SDLTest_AssertCheck(result == NULL, "Validate that result is NULL"); _checkInvalidParameterError(); /* Get data with empty name */ - result = SDL_GetWindowData(window, ""); + result = (char *)SDL_GetWindowData(window, ""); SDLTest_AssertPass("Call to SDL_GetWindowData(name='')"); SDLTest_AssertCheck(result == NULL, "Validate that result is NULL"); _checkInvalidParameterError(); From 0e9ba883156fd7083dd3be6918b0979a0f2e340a Mon Sep 17 00:00:00 2001 From: Philipp Wiesemann Date: Thu, 2 May 2013 23:12:03 +0200 Subject: [PATCH 053/542] Removed SDL prefix from internal function pointers for screen keyboard access. --- src/video/SDL_sysvideo.h | 8 ++++---- src/video/SDL_video.c | 16 ++++++++-------- src/video/android/SDL_androidvideo.c | 4 ++-- src/video/psp/SDL_pspvideo.c | 16 ++++++++-------- src/video/psp/SDL_pspvideo.h | 8 ++++---- src/video/uikit/SDL_uikitvideo.m | 8 ++++---- 6 files changed, 30 insertions(+), 30 deletions(-) diff --git a/src/video/SDL_sysvideo.h b/src/video/SDL_sysvideo.h index 2de5b83d1..6e6f7d9f7 100644 --- a/src/video/SDL_sysvideo.h +++ b/src/video/SDL_sysvideo.h @@ -242,10 +242,10 @@ struct SDL_VideoDevice void (*SetTextInputRect) (_THIS, SDL_Rect *rect); /* Screen keyboard */ - SDL_bool (*SDL_HasScreenKeyboardSupport) (_THIS); - void (*SDL_ShowScreenKeyboard) (_THIS, SDL_Window *window); - void (*SDL_HideScreenKeyboard) (_THIS, SDL_Window *window); - SDL_bool (*SDL_IsScreenKeyboardShown) (_THIS, SDL_Window *window); + SDL_bool (*HasScreenKeyboardSupport) (_THIS); + void (*ShowScreenKeyboard) (_THIS, SDL_Window *window); + void (*HideScreenKeyboard) (_THIS, SDL_Window *window); + SDL_bool (*IsScreenKeyboardShown) (_THIS, SDL_Window *window); /* Clipboard */ int (*SetClipboardText) (_THIS, const char *text); diff --git a/src/video/SDL_video.c b/src/video/SDL_video.c index 09b05c23f..3739c6f80 100644 --- a/src/video/SDL_video.c +++ b/src/video/SDL_video.c @@ -2900,8 +2900,8 @@ SDL_StartTextInput(void) /* Then show the on-screen keyboard, if any */ window = SDL_GetFocusWindow(); - if (window && _this && _this->SDL_ShowScreenKeyboard) { - _this->SDL_ShowScreenKeyboard(_this, window); + if (window && _this && _this->ShowScreenKeyboard) { + _this->ShowScreenKeyboard(_this, window); } /* Finally start the text input system */ @@ -2928,8 +2928,8 @@ SDL_StopTextInput(void) /* Hide the on-screen keyboard, if any */ window = SDL_GetFocusWindow(); - if (window && _this && _this->SDL_HideScreenKeyboard) { - _this->SDL_HideScreenKeyboard(_this, window); + if (window && _this && _this->HideScreenKeyboard) { + _this->HideScreenKeyboard(_this, window); } /* Finally disable text events */ @@ -2948,8 +2948,8 @@ SDL_SetTextInputRect(SDL_Rect *rect) SDL_bool SDL_HasScreenKeyboardSupport(void) { - if (_this && _this->SDL_HasScreenKeyboardSupport) { - return _this->SDL_HasScreenKeyboardSupport(_this); + if (_this && _this->HasScreenKeyboardSupport) { + return _this->HasScreenKeyboardSupport(_this); } return SDL_FALSE; } @@ -2957,8 +2957,8 @@ SDL_HasScreenKeyboardSupport(void) SDL_bool SDL_IsScreenKeyboardShown(SDL_Window *window) { - if (window && _this && _this->SDL_IsScreenKeyboardShown) { - return _this->SDL_IsScreenKeyboardShown(_this, window); + if (window && _this && _this->IsScreenKeyboardShown) { + return _this->IsScreenKeyboardShown(_this, window); } return SDL_FALSE; } diff --git a/src/video/android/SDL_androidvideo.c b/src/video/android/SDL_androidvideo.c index d9c2b4efa..ebf9535f5 100644 --- a/src/video/android/SDL_androidvideo.c +++ b/src/video/android/SDL_androidvideo.c @@ -133,8 +133,8 @@ Android_CreateDevice(int devindex) device->SetTextInputRect = Android_SetTextInputRect; /* Screen keyboard */ - device->SDL_HasScreenKeyboardSupport = Android_HasScreenKeyboardSupport; - device->SDL_IsScreenKeyboardShown = Android_IsScreenKeyboardShown; + device->HasScreenKeyboardSupport = Android_HasScreenKeyboardSupport; + device->IsScreenKeyboardShown = Android_IsScreenKeyboardShown; /* Clipboard */ device->SetClipboardText = Android_SetClipboardText; diff --git a/src/video/psp/SDL_pspvideo.c b/src/video/psp/SDL_pspvideo.c index 8ed637551..1cffe8a06 100644 --- a/src/video/psp/SDL_pspvideo.c +++ b/src/video/psp/SDL_pspvideo.c @@ -136,10 +136,10 @@ PSP_Create() device->GL_GetSwapInterval = PSP_GL_GetSwapInterval; device->GL_SwapWindow = PSP_GL_SwapWindow; device->GL_DeleteContext = PSP_GL_DeleteContext; - device->SDL_HasScreenKeyboardSupport = PSP_SDL_HasScreenKeyboardSupport; - device->SDL_ShowScreenKeyboard = PSP_SDL_ShowScreenKeyboard; - device->SDL_HideScreenKeyboard = PSP_SDL_HideScreenKeyboard; - device->SDL_IsScreenKeyboardShown = PSP_SDL_IsScreenKeyboardShown; + device->HasScreenKeyboardSupport = PSP_HasScreenKeyboardSupport; + device->ShowScreenKeyboard = PSP_ShowScreenKeyboard; + device->HideScreenKeyboard = PSP_HideScreenKeyboard; + device->IsScreenKeyboardShown = PSP_IsScreenKeyboardShown; device->PumpEvents = PSP_PumpEvents; @@ -312,17 +312,17 @@ PSP_GetWindowWMInfo(_THIS, SDL_Window * window, struct SDL_SysWMinfo *info) /* TO Write Me*/ -SDL_bool PSP_SDL_HasScreenKeyboardSupport(_THIS) +SDL_bool PSP_HasScreenKeyboardSupport(_THIS) { return SDL_TRUE; } -void PSP_SDL_ShowScreenKeyboard(_THIS, SDL_Window *window) +void PSP_ShowScreenKeyboard(_THIS, SDL_Window *window) { } -void PSP_SDL_HideScreenKeyboard(_THIS, SDL_Window *window) +void PSP_HideScreenKeyboard(_THIS, SDL_Window *window) { } -SDL_bool PSP_SDL_IsScreenKeyboardShown(_THIS, SDL_Window *window) +SDL_bool PSP_IsScreenKeyboardShown(_THIS, SDL_Window *window) { return SDL_FALSE; } diff --git a/src/video/psp/SDL_pspvideo.h b/src/video/psp/SDL_pspvideo.h index 7209cb156..4c8a8cda4 100644 --- a/src/video/psp/SDL_pspvideo.h +++ b/src/video/psp/SDL_pspvideo.h @@ -92,10 +92,10 @@ void PSP_GL_SwapWindow(_THIS, SDL_Window * window); void PSP_GL_DeleteContext(_THIS, SDL_GLContext context); /*PSP on screen keyboard */ -SDL_bool PSP_SDL_HasScreenKeyboardSupport(_THIS); -void PSP_SDL_ShowScreenKeyboard(_THIS, SDL_Window *window); -void PSP_SDL_HideScreenKeyboard(_THIS, SDL_Window *window); -SDL_bool PSP_SDL_IsScreenKeyboardShown(_THIS, SDL_Window *window); +SDL_bool PSP_HasScreenKeyboardSupport(_THIS); +void PSP_ShowScreenKeyboard(_THIS, SDL_Window *window); +void PSP_HideScreenKeyboard(_THIS, SDL_Window *window); +SDL_bool PSP_IsScreenKeyboardShown(_THIS, SDL_Window *window); #endif /* __SDL_PANDORA_H__ */ diff --git a/src/video/uikit/SDL_uikitvideo.m b/src/video/uikit/SDL_uikitvideo.m index 486c6255a..662b10906 100644 --- a/src/video/uikit/SDL_uikitvideo.m +++ b/src/video/uikit/SDL_uikitvideo.m @@ -87,10 +87,10 @@ UIKit_CreateDevice(int devindex) /* !!! FIXME: implement SetWindowBordered */ #if SDL_IPHONE_KEYBOARD - device->SDL_HasScreenKeyboardSupport = UIKit_HasScreenKeyboardSupport; - device->SDL_ShowScreenKeyboard = UIKit_ShowScreenKeyboard; - device->SDL_HideScreenKeyboard = UIKit_HideScreenKeyboard; - device->SDL_IsScreenKeyboardShown = UIKit_IsScreenKeyboardShown; + device->HasScreenKeyboardSupport = UIKit_HasScreenKeyboardSupport; + device->ShowScreenKeyboard = UIKit_ShowScreenKeyboard; + device->HideScreenKeyboard = UIKit_HideScreenKeyboard; + device->IsScreenKeyboardShown = UIKit_IsScreenKeyboardShown; #endif /* OpenGL (ES) functions */ From 98819d0d8d4880f628b7870e9f060607673a9415 Mon Sep 17 00:00:00 2001 From: Sam Lantinga Date: Thu, 2 May 2013 16:54:03 -0700 Subject: [PATCH 054/542] QueryPerformanceCounter() is reliable these days, and setting the timer frequency higher can have adverse power consequences. http://msdn.microsoft.com/en-us/library/windows/desktop/dd757624%28v=vs.85%29.aspx --- src/timer/windows/SDL_systimer.c | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/src/timer/windows/SDL_systimer.c b/src/timer/windows/SDL_systimer.c index efab3a1f4..9d1711b96 100644 --- a/src/timer/windows/SDL_systimer.c +++ b/src/timer/windows/SDL_systimer.c @@ -48,13 +48,13 @@ SDL_StartTicks(void) #ifdef USE_GETTICKCOUNT start = GetTickCount(); #else -#if 0 /* Apparently there are problems with QPC on Win2K */ + /* QueryPerformanceCounter has had problems in the past, but lots of games + use it, so we'll rely on it here. + */ if (QueryPerformanceFrequency(&hires_ticks_per_second) == TRUE) { hires_timer_available = TRUE; QueryPerformanceCounter(&hires_start_ticks); - } else -#endif - { + } else { hires_timer_available = FALSE; timeBeginPeriod(1); /* use 1 ms timer precision */ start = timeGetTime(); From 2c6d6e45d9aed7cf234964f1d3aafec2801746a0 Mon Sep 17 00:00:00 2001 From: Edward Rudd Date: Thu, 2 May 2013 21:17:59 -0400 Subject: [PATCH 055/542] add in OS X Monotonic clock as well as handling fall-back incase the OSX/Linux system doesn't have a monotonic clock. Code curtesy of Thomas Habets ( https://github.com/ThomasHabets/monotonic_clock ) --HG-- extra : rebase_source : 767f4fbc2b7bda8d59c7b10a24467043770e94f1 --- src/timer/unix/SDL_systimer.c | 118 +++++++++++++++++++++------------- 1 file changed, 73 insertions(+), 45 deletions(-) diff --git a/src/timer/unix/SDL_systimer.c b/src/timer/unix/SDL_systimer.c index 57ce078cc..c61b8b966 100644 --- a/src/timer/unix/SDL_systimer.c +++ b/src/timer/unix/SDL_systimer.c @@ -34,85 +34,113 @@ for __USE_POSIX199309 Tommi Kyntola (tommi.kyntola@ray.fi) 27/09/2005 */ +/* Reworked monotonic clock to not assume the current system has one + as not all linux kernels provide a monotonic clock (yeah recent ones + probably do) + Also added OS X Monotonic clock support + Based on work in https://github.com/ThomasHabets/monotonic_clock + */ #if HAVE_NANOSLEEP || HAVE_CLOCK_GETTIME #include #endif +#ifdef __APPLE__ +#include +#endif /* The first ticks value of the application */ -#ifdef HAVE_CLOCK_GETTIME -static struct timespec start; -#else -static struct timeval start; -#endif /* HAVE_CLOCK_GETTIME */ - +#if HAVE_CLOCK_GETTIME +static struct timespec start_ts; +#elif defined(__APPLE__) +static uint64_t start_mach; +mach_timebase_info_data_t mach_base_info; +#endif +static SDL_bool has_monotonic_time = SDL_FALSE; +static struct timeval start_tv; void SDL_StartTicks(void) { /* Set first ticks value */ #if HAVE_CLOCK_GETTIME - clock_gettime(CLOCK_MONOTONIC, &start); -#else - gettimeofday(&start, NULL); + if (clock_gettime(CLOCK_MONOTONIC, &start_ts) == 0) { + has_monotonic_time = SDL_TRUE; + } else +#elif defined(__APPLE__) + start_mach = mach_absolute_time(); + kern_return_t ret = mach_timebase_info(&mach_base_info); + if (ret == 0) { + has_monotonic_time = SDL_TRUE; + } else #endif + { + gettimeofday(&start_tv, NULL); + } } Uint32 SDL_GetTicks(void) { + Uint32 ticks; + if (has_monotonic_time) { #if HAVE_CLOCK_GETTIME - Uint32 ticks; - struct timespec now; - - clock_gettime(CLOCK_MONOTONIC, &now); - ticks = - (now.tv_sec - start.tv_sec) * 1000 + (now.tv_nsec - - start.tv_nsec) / 1000000; - return (ticks); -#else - Uint32 ticks; - struct timeval now; - - gettimeofday(&now, NULL); - ticks = - (now.tv_sec - start.tv_sec) * 1000 + (now.tv_usec - - start.tv_usec) / 1000; - return (ticks); + struct timespec now; + clock_gettime(CLOCK_MONOTONIC, &now); + ticks = + (now.tv_sec - start_ts.tv_sec) * 1000 + (now.tv_nsec - + start_ts.tv_nsec) / 1000000; +#elif defined(__APPLE__) + uint64_t now = mach_absolute_time(); + ticks = (now - start_mach) * mach_base_info.numer / mach_base_info.denom / 1000000; #endif + } else { + struct timeval now; + + gettimeofday(&now, NULL); + ticks = + (now.tv_sec - start_tv.tv_sec) * 1000 + (now.tv_usec - + start_tv.tv_usec) / 1000; + } + return (ticks); } Uint64 SDL_GetPerformanceCounter(void) { + Uint64 ticks; + if (has_monotonic_time) { #if HAVE_CLOCK_GETTIME - Uint64 ticks; - struct timespec now; + struct timespec now; - clock_gettime(CLOCK_MONOTONIC, &now); - ticks = now.tv_sec; - ticks *= 1000000000; - ticks += now.tv_nsec; - return (ticks); -#else - Uint64 ticks; - struct timeval now; - - gettimeofday(&now, NULL); - ticks = now.tv_sec; - ticks *= 1000000; - ticks += now.tv_usec; - return (ticks); + clock_gettime(CLOCK_MONOTONIC, &now); + ticks = now.tv_sec; + ticks *= 1000000000; + ticks += now.tv_nsec; +#elif defined(__APPLE__) + ticks = mach_absolute_time(); #endif + } else { + struct timeval now; + + gettimeofday(&now, NULL); + ticks = now.tv_sec; + ticks *= 1000000; + ticks += now.tv_usec; + } + return (ticks); } Uint64 SDL_GetPerformanceFrequency(void) { + if (has_monotonic_time) { #if HAVE_CLOCK_GETTIME - return 1000000000; -#else - return 1000000; + return 1000000000; +#elif defined(__APPLE__) + return mach_base_info.denom / mach_base_info.numer * 1000000; #endif + } else { + return 1000000; + } } void From 907ac2687c6594f1c990cff33a9c816422520ae8 Mon Sep 17 00:00:00 2001 From: Edward Rudd Date: Thu, 2 May 2013 21:23:38 -0400 Subject: [PATCH 056/542] default clock_gettime use to enabled as there is now proper fallback code for systems that don't have it. --- configure | 4 ++-- configure.in | 4 ++-- 2 files changed, 4 insertions(+), 4 deletions(-) diff --git a/configure b/configure index b6811fe34..fe84051d8 100755 --- a/configure +++ b/configure @@ -1546,7 +1546,7 @@ Optional Features: --enable-directx use DirectX for Windows audio/video [[default=yes]] --enable-sdl-dlopen use dlopen for shared object loading [[default=yes]] --enable-clock_gettime use clock_gettime() instead of gettimeofday() on - UNIX [[default=no]] + UNIX [[default=yes]] --enable-rpath use an rpath when linking SDL [[default=yes]] --enable-render-d3d enable the Direct3D render driver [[default=yes]] @@ -21842,7 +21842,7 @@ CheckClockGettime() if test "${enable_clock_gettime+set}" = set; then : enableval=$enable_clock_gettime; else - enable_clock_gettime=no + enable_clock_gettime=yes fi if test x$enable_clock_gettime = xyes; then diff --git a/configure.in b/configure.in index 84444f3e6..6d2eacc65 100644 --- a/configure.in +++ b/configure.in @@ -2179,8 +2179,8 @@ dnl Check for clock_gettime() CheckClockGettime() { AC_ARG_ENABLE(clock_gettime, -AC_HELP_STRING([--enable-clock_gettime], [use clock_gettime() instead of gettimeofday() on UNIX [[default=no]]]), - , enable_clock_gettime=no) +AC_HELP_STRING([--enable-clock_gettime], [use clock_gettime() instead of gettimeofday() on UNIX [[default=yes]]]), + , enable_clock_gettime=yes) if test x$enable_clock_gettime = xyes; then AC_CHECK_LIB(rt, clock_gettime, have_clock_gettime=yes) if test x$have_clock_gettime = xyes; then From 33660e58c1e4b0f2c47aa6c0ff22dc797adab878 Mon Sep 17 00:00:00 2001 From: Edward Rudd Date: Thu, 2 May 2013 21:40:59 -0400 Subject: [PATCH 057/542] move Ticks initialization tracking to separate function and ensure it's called with SDL_VideoInit is called to init SDL instead of SDL_Init -- why do we even allow initialization w/o calling at least SDL_Init(0) ? --- src/SDL.c | 8 ++------ src/timer/SDL_timer.c | 12 ++++++++++++ src/timer/SDL_timer_c.h | 1 + src/video/SDL_video.c | 5 +++++ 4 files changed, 20 insertions(+), 6 deletions(-) diff --git a/src/SDL.c b/src/SDL.c index c0b87caba..a61c710a7 100644 --- a/src/SDL.c +++ b/src/SDL.c @@ -32,9 +32,9 @@ /* Initialization/Cleanup routines */ #if !SDL_TIMERS_DISABLED -extern void SDL_StartTicks(void); extern int SDL_TimerInit(void); extern void SDL_TimerQuit(void); +extern void SDL_InitTicks(void); #endif #if SDL_VIDEO_DRIVER_WINDOWS extern int SDL_HelperWindowCreate(void); @@ -43,7 +43,6 @@ extern int SDL_HelperWindowDestroy(void); /* The initialized subsystems */ -static Uint32 ticks_started = 0; static SDL_bool SDL_bInMainQuit = SDL_FALSE; static Uint8 SDL_SubsystemRefCount[ 32 ]; @@ -93,10 +92,7 @@ int SDL_InitSubSystem(Uint32 flags) { #if !SDL_TIMERS_DISABLED - if (!ticks_started) { - SDL_StartTicks(); - ticks_started = 1; - } + SDL_InitTicks(); #endif /* Initialize the timer subsystem */ diff --git a/src/timer/SDL_timer.c b/src/timer/SDL_timer.c index 60b3bdb12..5e542f083 100644 --- a/src/timer/SDL_timer.c +++ b/src/timer/SDL_timer.c @@ -26,6 +26,8 @@ #include "SDL_cpuinfo.h" #include "SDL_thread.h" +extern void SDL_StartTicks(void); + /* #define DEBUG_TIMERS */ typedef struct _SDL_Timer @@ -70,6 +72,16 @@ typedef struct { static SDL_TimerData SDL_timer_data; +static Uint32 ticks_started = 0; + +void +SDL_InitTicks(void) +{ + if (!ticks_started) { + SDL_StartTicks(); + ticks_started = 1; + } +} /* The idea here is that any thread might add a timer, but a single * thread manages the active timer queue, sorted by scheduling time. diff --git a/src/timer/SDL_timer_c.h b/src/timer/SDL_timer_c.h index 559b36404..c759bcd84 100644 --- a/src/timer/SDL_timer_c.h +++ b/src/timer/SDL_timer_c.h @@ -26,6 +26,7 @@ #define ROUND_RESOLUTION(X) \ (((X+TIMER_RESOLUTION-1)/TIMER_RESOLUTION)*TIMER_RESOLUTION) +extern void SDL_InitTicks(void); extern int SDL_TimerInit(void); extern void SDL_TimerQuit(void); diff --git a/src/video/SDL_video.c b/src/video/SDL_video.c index 3739c6f80..959f19dc1 100644 --- a/src/video/SDL_video.c +++ b/src/video/SDL_video.c @@ -29,6 +29,7 @@ #include "SDL_pixels_c.h" #include "SDL_rect_c.h" #include "../events/SDL_events_c.h" +#include "../timer/SDL_timer_c.h" #if SDL_VIDEO_OPENGL #include "SDL_opengl.h" @@ -415,6 +416,10 @@ SDL_VideoInit(const char *driver_name) if (_this != NULL) { SDL_VideoQuit(); } + +#if !SDL_TIMERS_DISABLED + SDL_InitTicks(); +#endif /* Start the event loop */ if (SDL_StartEventLoop() < 0 || From 0a3ab9190b6d4d0815a0e20a140266e9f4b3505a Mon Sep 17 00:00:00 2001 From: Kevin Shanahan Date: Fri, 3 May 2013 14:11:41 +0930 Subject: [PATCH 058/542] Fix compile on Xcode 3.1 PPC + Altivec -faltivec is given on the command line, so #include is ignored in this case and #undef'ing vector causes compile to fail. --- src/video/cocoa/SDL_cocoamessagebox.m | 2 +- src/video/cocoa/SDL_cocoavideo.m | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/src/video/cocoa/SDL_cocoamessagebox.m b/src/video/cocoa/SDL_cocoamessagebox.m index 752dea0b3..ec4c55f61 100644 --- a/src/video/cocoa/SDL_cocoamessagebox.m +++ b/src/video/cocoa/SDL_cocoamessagebox.m @@ -22,7 +22,7 @@ #if SDL_VIDEO_DRIVER_COCOA -#if defined(__APPLE__) && defined(__POWERPC__) +#if defined(__APPLE__) && defined(__POWERPC__) && !defined(__APPLE_ALTIVEC__) #include #undef bool #undef vector diff --git a/src/video/cocoa/SDL_cocoavideo.m b/src/video/cocoa/SDL_cocoavideo.m index 30e03f098..6502a3fd7 100644 --- a/src/video/cocoa/SDL_cocoavideo.m +++ b/src/video/cocoa/SDL_cocoavideo.m @@ -22,7 +22,7 @@ #if SDL_VIDEO_DRIVER_COCOA -#if defined(__APPLE__) && defined(__POWERPC__) +#if defined(__APPLE__) && defined(__POWERPC__) && !defined(__APPLE_ALTIVEC__) #include #undef bool #undef vector From 866f2e5f9eb9ad4860f84e02beedfe3ad45150e9 Mon Sep 17 00:00:00 2001 From: Sam Lantinga Date: Sat, 4 May 2013 04:46:00 -0700 Subject: [PATCH 059/542] First pass on SDL render clip rect functionality --- include/SDL_render.h | 26 +++++++++ src/render/SDL_render.c | 34 +++++++++++ src/render/SDL_sysrender.h | 5 ++ src/render/direct3d/SDL_render_d3d.c | 74 ++++++++++++++++-------- src/render/opengl/SDL_render_gl.c | 17 ++++++ src/render/opengles/SDL_render_gles.c | 16 +++++ src/render/opengles2/SDL_render_gles2.c | 21 ++++++- src/render/software/SDL_render_sw.c | 16 +++++ src/test/SDL_test_common.c | 20 +++++++ src/video/directfb/SDL_DirectFB_render.c | 26 ++++++++- 10 files changed, 227 insertions(+), 28 deletions(-) diff --git a/include/SDL_render.h b/include/SDL_render.h index 591de81b0..fea64f617 100644 --- a/include/SDL_render.h +++ b/include/SDL_render.h @@ -469,6 +469,8 @@ extern DECLSPEC void SDLCALL SDL_RenderGetLogicalSize(SDL_Renderer * renderer, i * * The x,y of the viewport rect represents the origin for rendering. * + * \return 0 on success, or -1 on error + * * \note When the window is resized, the current viewport is automatically * centered within the new window size. * @@ -486,6 +488,30 @@ extern DECLSPEC int SDLCALL SDL_RenderSetViewport(SDL_Renderer * renderer, extern DECLSPEC void SDLCALL SDL_RenderGetViewport(SDL_Renderer * renderer, SDL_Rect * rect); +/** + * \brief Set the clip rectangle for the current target. + * + * \param rect A pointer to the rectangle to set as the clip rectangle, or + * NULL to disable clipping. + * + * \return 0 on success, or -1 on error + * + * \sa SDL_RenderGetClipRect() + */ +extern DECLSPEC int SDLCALL SDL_RenderSetClipRect(SDL_Renderer * renderer, + const SDL_Rect * rect); + +/** + * \brief Get the clip rectangle for the current target. + * + * \param rect A pointer filled in with the current clip rectangle, or + * an empty rectangle if clipping is disabled. + * + * \sa SDL_RenderSetClipRect() + */ +extern DECLSPEC void SDLCALL SDL_RenderGetClipRect(SDL_Renderer * renderer, + SDL_Rect * rect); + /** * \brief Set the drawing scale for rendering on the current target. * diff --git a/src/render/SDL_render.c b/src/render/SDL_render.c index 9ec64a13d..8f597606d 100644 --- a/src/render/SDL_render.c +++ b/src/render/SDL_render.c @@ -932,6 +932,7 @@ SDL_SetRenderTarget(SDL_Renderer *renderer, SDL_Texture *texture) if (texture && !renderer->target) { /* Make a backup of the viewport */ renderer->viewport_backup = renderer->viewport; + renderer->clip_rect_backup = renderer->clip_rect; renderer->scale_backup = renderer->scale; renderer->logical_w_backup = renderer->logical_w; renderer->logical_h_backup = renderer->logical_h; @@ -953,6 +954,7 @@ SDL_SetRenderTarget(SDL_Renderer *renderer, SDL_Texture *texture) renderer->logical_h = 0; } else { renderer->viewport = renderer->viewport_backup; + renderer->clip_rect = renderer->clip_rect_backup; renderer->scale = renderer->scale_backup; renderer->logical_w = renderer->logical_w_backup; renderer->logical_h = renderer->logical_h_backup; @@ -960,6 +962,9 @@ SDL_SetRenderTarget(SDL_Renderer *renderer, SDL_Texture *texture) if (renderer->UpdateViewport(renderer) < 0) { return -1; } + if (renderer->UpdateClipRect(renderer) < 0) { + return -1; + } /* All set! */ return 0; @@ -1097,6 +1102,35 @@ SDL_RenderGetViewport(SDL_Renderer * renderer, SDL_Rect * rect) } } +int +SDL_RenderSetClipRect(SDL_Renderer * renderer, const SDL_Rect * rect) +{ + CHECK_RENDERER_MAGIC(renderer, ) + + if (rect) { + renderer->clip_rect.x = (int)SDL_floor(rect->x * renderer->scale.x); + renderer->clip_rect.y = (int)SDL_floor(rect->y * renderer->scale.y); + renderer->clip_rect.w = (int)SDL_ceil(rect->w * renderer->scale.x); + renderer->clip_rect.h = (int)SDL_ceil(rect->h * renderer->scale.y); + } else { + SDL_zero(renderer->clip_rect); + } + return renderer->UpdateClipRect(renderer); +} + +void +SDL_RenderGetClipRect(SDL_Renderer * renderer, SDL_Rect * rect) +{ + CHECK_RENDERER_MAGIC(renderer, ) + + if (rect) { + rect->x = (int)(renderer->clip_rect.x / renderer->scale.x); + rect->y = (int)(renderer->clip_rect.y / renderer->scale.y); + rect->w = (int)(renderer->clip_rect.w / renderer->scale.x); + rect->h = (int)(renderer->clip_rect.h / renderer->scale.y); + } +} + int SDL_RenderSetScale(SDL_Renderer * renderer, float scaleX, float scaleY) { diff --git a/src/render/SDL_sysrender.h b/src/render/SDL_sysrender.h index 17f506ed8..4f0795274 100644 --- a/src/render/SDL_sysrender.h +++ b/src/render/SDL_sysrender.h @@ -93,6 +93,7 @@ struct SDL_Renderer void (*UnlockTexture) (SDL_Renderer * renderer, SDL_Texture * texture); int (*SetRenderTarget) (SDL_Renderer * renderer, SDL_Texture * texture); int (*UpdateViewport) (SDL_Renderer * renderer); + int (*UpdateClipRect) (SDL_Renderer * renderer); int (*RenderClear) (SDL_Renderer * renderer); int (*RenderDrawPoints) (SDL_Renderer * renderer, const SDL_FPoint * points, int count); @@ -133,6 +134,10 @@ struct SDL_Renderer SDL_Rect viewport; SDL_Rect viewport_backup; + /* The clip rectangle within the window */ + SDL_Rect clip_rect; + SDL_Rect clip_rect_backup; + /* The render output coordinate scale */ SDL_FPoint scale; SDL_FPoint scale_backup; diff --git a/src/render/direct3d/SDL_render_d3d.c b/src/render/direct3d/SDL_render_d3d.c index f75d3a98e..e6bc65ba2 100644 --- a/src/render/direct3d/SDL_render_d3d.c +++ b/src/render/direct3d/SDL_render_d3d.c @@ -186,6 +186,7 @@ static int D3D_LockTexture(SDL_Renderer * renderer, SDL_Texture * texture, static void D3D_UnlockTexture(SDL_Renderer * renderer, SDL_Texture * texture); static int D3D_SetRenderTarget(SDL_Renderer * renderer, SDL_Texture * texture); static int D3D_UpdateViewport(SDL_Renderer * renderer); +static int D3D_UpdateClipRect(SDL_Renderer * renderer); static int D3D_RenderClear(SDL_Renderer * renderer); static int D3D_RenderDrawPoints(SDL_Renderer * renderer, const SDL_FPoint * points, int count); @@ -510,6 +511,7 @@ D3D_CreateRenderer(SDL_Window * window, Uint32 flags) renderer->UnlockTexture = D3D_UnlockTexture; renderer->SetRenderTarget = D3D_SetRenderTarget; renderer->UpdateViewport = D3D_UpdateViewport; + renderer->UpdateClipRect = D3D_UpdateClipRect; renderer->RenderClear = D3D_RenderClear; renderer->RenderDrawPoints = D3D_RenderDrawPoints; renderer->RenderDrawLines = D3D_RenderDrawLines; @@ -814,6 +816,39 @@ D3D_UnlockTexture(SDL_Renderer * renderer, SDL_Texture * texture) IDirect3DTexture9_UnlockRect(data->texture, 0); } +static int +D3D_SetRenderTarget(SDL_Renderer * renderer, SDL_Texture * texture) +{ + D3D_RenderData *data = (D3D_RenderData *) renderer->driverdata; + D3D_TextureData *texturedata; + HRESULT result; + + D3D_ActivateRenderer(renderer); + + /* Release the previous render target if it wasn't the default one */ + if (data->currentRenderTarget != NULL) { + IDirect3DSurface9_Release(data->currentRenderTarget); + data->currentRenderTarget = NULL; + } + + if (texture == NULL) { + IDirect3DDevice9_SetRenderTarget(data->device, 0, data->defaultRenderTarget); + return 0; + } + + texturedata = (D3D_TextureData *) texture->driverdata; + result = IDirect3DTexture9_GetSurfaceLevel(texturedata->texture, 0, &data->currentRenderTarget); + if(FAILED(result)) { + return D3D_SetError("GetSurfaceLevel()", result); + } + result = IDirect3DDevice9_SetRenderTarget(data->device, 0, data->currentRenderTarget); + if(FAILED(result)) { + return D3D_SetError("SetRenderTarget()", result); + } + + return 0; +} + static int D3D_UpdateViewport(SDL_Renderer * renderer) { @@ -853,35 +888,28 @@ D3D_UpdateViewport(SDL_Renderer * renderer) } static int -D3D_SetRenderTarget(SDL_Renderer * renderer, SDL_Texture * texture) +D3D_UpdateClipRect(SDL_Renderer * renderer) { + const SDL_Rect *rect = &renderer->clip_rect; D3D_RenderData *data = (D3D_RenderData *) renderer->driverdata; - D3D_TextureData *texturedata; + RECT r; HRESULT result; - D3D_ActivateRenderer(renderer); + if (!SDL_RectEmpty(rect)) { + IDirect3DDevice9_SetRenderState(data->device, D3DRS_SCISSORTESTENABLE, TRUE); + r.left = rect->x; + r.top = rect->y; + r.right = rect->w + rect->w; + r.bottom = rect->y + rect->h; - /* Release the previous render target if it wasn't the default one */ - if (data->currentRenderTarget != NULL) { - IDirect3DSurface9_Release(data->currentRenderTarget); - data->currentRenderTarget = NULL; + result = IDirect3DDevice9_SetScissorRect(data->device, &r); + if (result != D3D_OK) { + D3D_SetError("SetScissor()", result); + return -1; + } + } else { + IDirect3DDevice9_SetRenderState(data->device, D3DRS_SCISSORTESTENABLE, FALSE); } - - if (texture == NULL) { - IDirect3DDevice9_SetRenderTarget(data->device, 0, data->defaultRenderTarget); - return 0; - } - - texturedata = (D3D_TextureData *) texture->driverdata; - result = IDirect3DTexture9_GetSurfaceLevel(texturedata->texture, 0, &data->currentRenderTarget); - if(FAILED(result)) { - return D3D_SetError("GetSurfaceLevel()", result); - } - result = IDirect3DDevice9_SetRenderTarget(data->device, 0, data->currentRenderTarget); - if(FAILED(result)) { - return D3D_SetError("SetRenderTarget()", result); - } - return 0; } diff --git a/src/render/opengl/SDL_render_gl.c b/src/render/opengl/SDL_render_gl.c index 097f84faa..08933fa2e 100644 --- a/src/render/opengl/SDL_render_gl.c +++ b/src/render/opengl/SDL_render_gl.c @@ -56,6 +56,7 @@ static int GL_LockTexture(SDL_Renderer * renderer, SDL_Texture * texture, static void GL_UnlockTexture(SDL_Renderer * renderer, SDL_Texture * texture); static int GL_SetRenderTarget(SDL_Renderer * renderer, SDL_Texture * texture); static int GL_UpdateViewport(SDL_Renderer * renderer); +static int GL_UpdateClipRect(SDL_Renderer * renderer); static int GL_RenderClear(SDL_Renderer * renderer); static int GL_RenderDrawPoints(SDL_Renderer * renderer, const SDL_FPoint * points, int count); @@ -324,6 +325,7 @@ GL_CreateRenderer(SDL_Window * window, Uint32 flags) renderer->UnlockTexture = GL_UnlockTexture; renderer->SetRenderTarget = GL_SetRenderTarget; renderer->UpdateViewport = GL_UpdateViewport; + renderer->UpdateClipRect = GL_UpdateClipRect; renderer->RenderClear = GL_RenderClear; renderer->RenderDrawPoints = GL_RenderDrawPoints; renderer->RenderDrawLines = GL_RenderDrawLines; @@ -784,6 +786,21 @@ GL_UpdateViewport(SDL_Renderer * renderer) return 0; } +static int +GL_UpdateClipRect(SDL_Renderer * renderer) +{ + const SDL_Rect *rect = &renderer->clip_rect; + GL_RenderData *data = (GL_RenderData *) renderer->driverdata; + + if (!SDL_RectEmpty(rect)) { + data->glEnable(GL_SCISSOR_TEST); + data->glScissor(rect->x, rect->y, rect->x + rect->w, rect->y + rect->h); + } else { + data->glDisable(GL_SCISSOR_TEST); + } + return 0; +} + static void GL_SetShader(GL_RenderData * data, GL_Shader shader) { diff --git a/src/render/opengles/SDL_render_gles.c b/src/render/opengles/SDL_render_gles.c index 62b547b2c..3a7a44152 100644 --- a/src/render/opengles/SDL_render_gles.c +++ b/src/render/opengles/SDL_render_gles.c @@ -59,6 +59,7 @@ static void GLES_UnlockTexture(SDL_Renderer * renderer, static int GLES_SetRenderTarget(SDL_Renderer * renderer, SDL_Texture * texture); static int GLES_UpdateViewport(SDL_Renderer * renderer); +static int GLES_UpdateClipRect(SDL_Renderer * renderer); static int GLES_RenderClear(SDL_Renderer * renderer); static int GLES_RenderDrawPoints(SDL_Renderer * renderer, const SDL_FPoint * points, int count); @@ -303,6 +304,7 @@ GLES_CreateRenderer(SDL_Window * window, Uint32 flags) renderer->UnlockTexture = GLES_UnlockTexture; renderer->SetRenderTarget = GLES_SetRenderTarget; renderer->UpdateViewport = GLES_UpdateViewport; + renderer->UpdateClipRect = GLES_UpdateClipRect; renderer->RenderClear = GLES_RenderClear; renderer->RenderDrawPoints = GLES_RenderDrawPoints; renderer->RenderDrawLines = GLES_RenderDrawLines; @@ -630,6 +632,20 @@ GLES_UpdateViewport(SDL_Renderer * renderer) return 0; } +static int +GLES_UpdateClipRect(SDL_Renderer * renderer) +{ + const SDL_Rect *rect = &renderer->clip_rect; + + if (!SDL_RectEmpty(rect)) { + glEnable(GL_SCISSOR_TEST); + glScissor(rect->x, rect->y, rect->x + rect->w, rect->y + rect->h); + } else { + glDisable(GL_SCISSOR_TEST); + } + return 0; +} + static void GLES_SetColor(GLES_RenderData * data, Uint8 r, Uint8 g, Uint8 b, Uint8 a) { diff --git a/src/render/opengles2/SDL_render_gles2.c b/src/render/opengles2/SDL_render_gles2.c index 0d6fe5d0e..f55283f69 100644 --- a/src/render/opengles2/SDL_render_gles2.c +++ b/src/render/opengles2/SDL_render_gles2.c @@ -275,6 +275,20 @@ GLES2_UpdateViewport(SDL_Renderer * renderer) return 0; } +static int +GLES2_UpdateClipRect(SDL_Renderer * renderer) +{ + const SDL_Rect *rect = &renderer->clip_rect; + + if (!SDL_RectEmpty(rect)) { + glEnable(GL_SCISSOR_TEST); + glScissor(rect->x, rect->y, rect->x + rect->w, rect->y + rect->h); + } else { + glDisable(GL_SCISSOR_TEST); + } + return 0; +} + static void GLES2_DestroyRenderer(SDL_Renderer *renderer) { @@ -934,11 +948,11 @@ static int GLES2_RenderDrawLines(SDL_Renderer *renderer, const SDL_FPoint *point static int GLES2_RenderFillRects(SDL_Renderer *renderer, const SDL_FRect *rects, int count); static int GLES2_RenderCopy(SDL_Renderer *renderer, SDL_Texture *texture, const SDL_Rect *srcrect, const SDL_FRect *dstrect); -static int GLES2_RenderReadPixels(SDL_Renderer * renderer, const SDL_Rect * rect, - Uint32 pixel_format, void * pixels, int pitch); static int GLES2_RenderCopyEx(SDL_Renderer * renderer, SDL_Texture * texture, const SDL_Rect * srcrect, const SDL_FRect * dstrect, const double angle, const SDL_FPoint *center, const SDL_RendererFlip flip); +static int GLES2_RenderReadPixels(SDL_Renderer * renderer, const SDL_Rect * rect, + Uint32 pixel_format, void * pixels, int pitch); static void GLES2_RenderPresent(SDL_Renderer *renderer); @@ -1708,13 +1722,14 @@ GLES2_CreateRenderer(SDL_Window *window, Uint32 flags) renderer->UnlockTexture = &GLES2_UnlockTexture; renderer->SetRenderTarget = &GLES2_SetRenderTarget; renderer->UpdateViewport = &GLES2_UpdateViewport; + renderer->UpdateClipRect = &GLES2_UpdateClipRect; renderer->RenderClear = &GLES2_RenderClear; renderer->RenderDrawPoints = &GLES2_RenderDrawPoints; renderer->RenderDrawLines = &GLES2_RenderDrawLines; renderer->RenderFillRects = &GLES2_RenderFillRects; renderer->RenderCopy = &GLES2_RenderCopy; - renderer->RenderReadPixels = &GLES2_RenderReadPixels; renderer->RenderCopyEx = &GLES2_RenderCopyEx; + renderer->RenderReadPixels = &GLES2_RenderReadPixels; renderer->RenderPresent = &GLES2_RenderPresent; renderer->DestroyTexture = &GLES2_DestroyTexture; renderer->DestroyRenderer = &GLES2_DestroyRenderer; diff --git a/src/render/software/SDL_render_sw.c b/src/render/software/SDL_render_sw.c index 21ff1a9ae..8c84da143 100644 --- a/src/render/software/SDL_render_sw.c +++ b/src/render/software/SDL_render_sw.c @@ -54,6 +54,7 @@ static int SW_LockTexture(SDL_Renderer * renderer, SDL_Texture * texture, static void SW_UnlockTexture(SDL_Renderer * renderer, SDL_Texture * texture); static int SW_SetRenderTarget(SDL_Renderer * renderer, SDL_Texture * texture); static int SW_UpdateViewport(SDL_Renderer * renderer); +static int SW_UpdateClipRect(SDL_Renderer * renderer); static int SW_RenderClear(SDL_Renderer * renderer); static int SW_RenderDrawPoints(SDL_Renderer * renderer, const SDL_FPoint * points, int count); @@ -151,6 +152,7 @@ SW_CreateRendererForSurface(SDL_Surface * surface) renderer->UnlockTexture = SW_UnlockTexture; renderer->SetRenderTarget = SW_SetRenderTarget; renderer->UpdateViewport = SW_UpdateViewport; + renderer->UpdateClipRect = SW_UpdateClipRect; renderer->RenderClear = SW_RenderClear; renderer->RenderDrawPoints = SW_RenderDrawPoints; renderer->RenderDrawLines = SW_RenderDrawLines; @@ -320,6 +322,20 @@ SW_UpdateViewport(SDL_Renderer * renderer) return 0; } +static int +SW_UpdateClipRect(SDL_Renderer * renderer) +{ + const SDL_Rect *rect = &renderer->clip_rect; + SDL_Surface* framebuffer = (SDL_Surface *) renderer->driverdata; + + if (!SDL_RectEmpty(rect)) { + SDL_SetClipRect(framebuffer, rect); + } else { + SDL_SetClipRect(framebuffer, NULL); + } + return 0; +} + static int SW_RenderClear(SDL_Renderer * renderer) { diff --git a/src/test/SDL_test_common.c b/src/test/SDL_test_common.c index 04103a3e4..b5fdc3f5b 100644 --- a/src/test/SDL_test_common.c +++ b/src/test/SDL_test_common.c @@ -1202,6 +1202,26 @@ SDLTest_CommonEvent(SDLTest_CommonState * state, SDL_Event * event, int *done) SDL_SetClipboardText("SDL rocks!\nYou know it!"); printf("Copied text to clipboard\n"); } + if (event->key.keysym.mod & KMOD_ALT) { + /* Alt-C toggle a render clip rectangle */ + for (i = 0; i < state->num_windows; ++i) { + int w, h; + if (state->renderers[i]) { + SDL_Rect clip; + SDL_GetWindowSize(state->windows[i], &w, &h); + SDL_RenderGetClipRect(state->renderers[i], &clip); + if (SDL_RectEmpty(&clip)) { + clip.x = w/4; + clip.y = h/4; + clip.w = w/2; + clip.h = h/2; + SDL_RenderSetClipRect(state->renderers[i], &clip); + } else { + SDL_RenderSetClipRect(state->renderers[i], NULL); + } + } + } + } break; case SDLK_v: if (event->key.keysym.mod & KMOD_CTRL) { diff --git a/src/video/directfb/SDL_DirectFB_render.c b/src/video/directfb/SDL_DirectFB_render.c index db69a5c44..07aa77d11 100644 --- a/src/video/directfb/SDL_DirectFB_render.c +++ b/src/video/directfb/SDL_DirectFB_render.c @@ -116,6 +116,7 @@ static int DirectFB_RenderReadPixels(SDL_Renderer * renderer, const SDL_Rect * r static int DirectFB_RenderWritePixels(SDL_Renderer * renderer, const SDL_Rect * rect, Uint32 format, const void * pixels, int pitch); static int DirectFB_UpdateViewport(SDL_Renderer * renderer); +static int DirectFB_UpdateClipRect(SDL_Renderer * renderer); static int DirectFB_SetRenderTarget(SDL_Renderer * renderer, SDL_Texture * texture); static int PrepareDraw(SDL_Renderer * renderer); @@ -380,8 +381,6 @@ DirectFB_CreateRenderer(SDL_Window * window, Uint32 flags) /* SetDrawColor - no needed */ renderer->RenderFillRects = DirectFB_RenderFillRects; - /* RenderDrawEllipse - no reference implementation yet */ - /* RenderFillEllipse - no reference implementation yet */ renderer->RenderCopy = DirectFB_RenderCopy; renderer->RenderPresent = DirectFB_RenderPresent; @@ -392,6 +391,7 @@ DirectFB_CreateRenderer(SDL_Window * window, Uint32 flags) renderer->DestroyTexture = DirectFB_DestroyTexture; renderer->DestroyRenderer = DirectFB_DestroyRenderer; renderer->UpdateViewport = DirectFB_UpdateViewport; + renderer->UpdateClipRect = DirectFB_UpdateClipRect; renderer->SetRenderTarget = DirectFB_SetRenderTarget; #if 0 @@ -1258,6 +1258,28 @@ DirectFB_UpdateViewport(SDL_Renderer * renderer) return 0; } +static int +DirectFB_UpdateClipRect(SDL_Renderer * renderer) +{ + const SDL_Rect *rect = &renderer->clip_rect; + DirectFB_RenderData *data = (DirectFB_RenderData *) renderer->driverdata; + IDirectFBSurface *destsurf = get_dfb_surface(data->window); + DFBRegion region; + + if (!SDL_RectEmpty(rect)) { + region.x1 = rect->x; + region.x2 = rect->x + rect->w; + region.y1 = rect->y; + region.y2 = rect->y + rect->h; + SDL_DFB_CHECKERR(destsurf->SetClip(destsurf, ®ion)); + } else { + SDL_DFB_CHECKERR(destsurf->SetClip(destsurf, NULL)); + } + return 0; + error: + return -1; +} + static int DirectFB_RenderReadPixels(SDL_Renderer * renderer, const SDL_Rect * rect, Uint32 format, void * pixels, int pitch) From 28d45cd9550df47b183c18270063e24818b47caf Mon Sep 17 00:00:00 2001 From: Andreas Schiffler Date: Sat, 4 May 2013 09:11:18 -0700 Subject: [PATCH 060/542] Added additional input validation to SDL_AllocPalette; added error codes; added test case to Pixels suite for coverage --- src/video/SDL_pixels.c | 9 ++++ test/testautomation_pixels.c | 89 +++++++++++++++++++++++++++++++++++- 2 files changed, 96 insertions(+), 2 deletions(-) diff --git a/src/video/SDL_pixels.c b/src/video/SDL_pixels.c index 84a75b8eb..55e181922 100644 --- a/src/video/SDL_pixels.c +++ b/src/video/SDL_pixels.c @@ -503,6 +503,7 @@ SDL_AllocFormat(Uint32 pixel_format) } if (SDL_InitFormat(format, pixel_format) < 0) { SDL_free(format); + SDL_InvalidParamError("format"); return NULL; } @@ -585,6 +586,7 @@ SDL_FreeFormat(SDL_PixelFormat *format) SDL_PixelFormat *prev; if (!format) { + SDL_InvalidParamError("format"); return; } if (--format->refcount > 0) { @@ -613,6 +615,12 @@ SDL_Palette * SDL_AllocPalette(int ncolors) { SDL_Palette *palette; + + /* Input validation */ + if (ncolors < 1) { + SDL_InvalidParamError("ncolors"); + return NULL; + } palette = (SDL_Palette *) SDL_malloc(sizeof(*palette)); if (!palette) { @@ -693,6 +701,7 @@ void SDL_FreePalette(SDL_Palette * palette) { if (!palette) { + SDL_InvalidParamError("palette"); return; } if (--palette->refcount > 0) { diff --git a/test/testautomation_pixels.c b/test/testautomation_pixels.c index 73cf12460..0165e73f7 100644 --- a/test/testautomation_pixels.c +++ b/test/testautomation_pixels.c @@ -101,6 +101,9 @@ char* _nonRGBPixelFormatsVerbose[] = /** * @brief Call to SDL_AllocFormat and SDL_FreeFormat + * + * @sa http://wiki.libsdl.org/moin.fcg/SDL_AllocFormat + * @sa http://wiki.libsdl.org/moin.fcg/SDL_FreeFormat */ int pixels_allocFreeFormat(void *arg) @@ -145,18 +148,100 @@ pixels_allocFreeFormat(void *arg) SDLTest_AssertCheck(result == NULL, "Verify result is NULL"); } + /* Negative cases */ + format = 0xffffffff; + result = SDL_AllocFormat(format); + SDLTest_AssertPass("Call to SDL_AllocFormat(0xffffffff)"); + SDLTest_AssertCheck(result == NULL, "Verify result is NULL"); + /* TODO: check error code */ + + SDL_FreeFormat(NULL); + SDLTest_AssertPass("Call to SDL_FreeFormat(NULL)"); + /* TODO: check error code */ + + return TEST_COMPLETED; +} + +/** + * @brief Call to SDL_AllocPalette and SDL_FreePalette + * + * @sa http://wiki.libsdl.org/moin.fcg/SDL_AllocPalette + * @sa http://wiki.libsdl.org/moin.fcg/SDL_FreePalette + */ +int +pixels_allocFreePalette(void *arg) +{ + int variation; + int i; + int ncolors; + SDL_Palette* result; + + /* Allocate palette */ + for (variation = 1; variation <= 3; variation++) { + switch (variation) { + /* Just one color */ + case 1: + ncolors = 1; + break; + /* Two colors */ + case 2: + ncolors = 2; + break; + /* More than two colors */ + case 3: + ncolors = SDLTest_RandomIntegerInRange(8, 16); + break; + } + + result = SDL_AllocPalette(ncolors); + SDLTest_AssertPass("Call to SDL_AllocPalette(%d)", ncolors); + SDLTest_AssertCheck(result != NULL, "Verify result is not NULL"); + if (result != NULL) { + SDLTest_AssertCheck(result->ncolors == ncolors, "Verify value of result.ncolors; expected: %u, got %u", ncolors, result->ncolors); + if (result->ncolors > 0) { + SDLTest_AssertCheck(result->colors != NULL, "Verify value of result.colors is not NULL"); + if (result->colors != NULL) { + for(i = 0; i < result->ncolors; i++) { + SDLTest_AssertCheck(result->colors[i].r == 255, "Verify value of result.colors[%d].r; expected: 255, got %u", i, result->colors[i].r); + SDLTest_AssertCheck(result->colors[i].g == 255, "Verify value of result.colors[%d].g; expected: 255, got %u", i, result->colors[i].g); + SDLTest_AssertCheck(result->colors[i].b == 255, "Verify value of result.colors[%d].b; expected: 255, got %u", i, result->colors[i].b); + } + } + } + + /* Deallocate again */ + SDL_FreePalette(result); + SDLTest_AssertPass("Call to SDL_FreePalette()"); + } + } + + /* Negative cases */ + for (ncolors = 0; ncolors > -3; ncolors--) { + result = SDL_AllocPalette(ncolors); + SDLTest_AssertPass("Call to SDL_AllocPalette(%d)", ncolors); + SDLTest_AssertCheck(result == NULL, "Verify result is NULL"); + /* TODO: check error code */ + } + + SDL_FreePalette(NULL); + SDLTest_AssertPass("Call to SDL_FreePalette(NULL)"); + /* TODO: check error code */ + return TEST_COMPLETED; } /* ================= Test References ================== */ -/* SysWM test cases */ +/* Pixels test cases */ static const SDLTest_TestCaseReference pixelsTest1 = { (SDLTest_TestCaseFp)pixels_allocFreeFormat, "pixels_allocFreeFormat", "Call to SDL_AllocFormat and SDL_FreeFormat", TEST_ENABLED }; +static const SDLTest_TestCaseReference pixelsTest2 = + { (SDLTest_TestCaseFp)pixels_allocFreePalette, "pixels_allocFreePalette", "Call to SDL_AllocPalette and SDL_FreePalette", TEST_ENABLED }; + /* Sequence of Pixels test cases */ static const SDLTest_TestCaseReference *pixelsTests[] = { - &pixelsTest1, NULL + &pixelsTest1, &pixelsTest2, NULL }; /* Pixels test suite (global) */ From e2fe26af28224073714b9e98bba1df6fc7259c19 Mon Sep 17 00:00:00 2001 From: Philipp Wiesemann Date: Sat, 4 May 2013 22:44:03 +0200 Subject: [PATCH 061/542] Fixed SDL_RenderSetClipRect() returning undefined instead of -1 on error. --- src/render/SDL_render.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/render/SDL_render.c b/src/render/SDL_render.c index 8f597606d..3a8666d77 100644 --- a/src/render/SDL_render.c +++ b/src/render/SDL_render.c @@ -1105,7 +1105,7 @@ SDL_RenderGetViewport(SDL_Renderer * renderer, SDL_Rect * rect) int SDL_RenderSetClipRect(SDL_Renderer * renderer, const SDL_Rect * rect) { - CHECK_RENDERER_MAGIC(renderer, ) + CHECK_RENDERER_MAGIC(renderer, -1) if (rect) { renderer->clip_rect.x = (int)SDL_floor(rect->x * renderer->scale.x); From b5c9f3354d2468ff0f602ba4f8afe296c7f14619 Mon Sep 17 00:00:00 2001 From: Philipp Wiesemann Date: Sun, 5 May 2013 12:47:44 +0200 Subject: [PATCH 062/542] Corrected spelling in C source files of test suites. --- test/testautomation_clipboard.c | 2 +- test/testautomation_main.c | 2 +- test/testautomation_mouse.c | 2 +- test/testautomation_sdltest.c | 2 +- test/testautomation_timer.c | 4 ++-- 5 files changed, 6 insertions(+), 6 deletions(-) diff --git a/test/testautomation_clipboard.c b/test/testautomation_clipboard.c index 858b22bc8..76c2936f8 100644 --- a/test/testautomation_clipboard.c +++ b/test/testautomation_clipboard.c @@ -96,7 +96,7 @@ clipboard_testClipboardTextFunctions(void *arg) SDLTest_AssertPass("Call to SDL_HasClipboardText succeeded"); if (boolResult == SDL_TRUE) { intResult = SDL_SetClipboardText((const char *)NULL); - SDLTest_AssertPass("Call to DL_SetClipboardText(NULL) succeeded"); + SDLTest_AssertPass("Call to SDL_SetClipboardText(NULL) succeeded"); SDLTest_AssertCheck( intResult == 0, "Verify result from SDL_SetClipboardText(NULL), expected 0, got %i", diff --git a/test/testautomation_main.c b/test/testautomation_main.c index 6a40acc70..9873c7e41 100644 --- a/test/testautomation_main.c +++ b/test/testautomation_main.c @@ -76,7 +76,7 @@ static int main_testImpliedJoystickInit (void *arg) initialized_system = SDL_WasInit(joy_and_controller); SDLTest_AssertCheck( (initialized_system & joy_and_controller) == joy_and_controller, "SDL_WasInit() should be true for joystick & controller (%x)", initialized_system ); - // Then quit the controller, and make sure that imlicity also quits the + // Then quit the controller, and make sure that implicitly also quits the // joystick subsystem SDL_QuitSubSystem(SDL_INIT_GAMECONTROLLER); initialized_system = SDL_WasInit(joy_and_controller); diff --git a/test/testautomation_mouse.c b/test/testautomation_mouse.c index 69d82dd09..e0fd6fae6 100644 --- a/test/testautomation_mouse.c +++ b/test/testautomation_mouse.c @@ -403,7 +403,7 @@ mouse_getSetRelativeMouseMode(void *arg) SDLTest_AssertPass("Call to SDL_GetRelativeMouseMode()"); SDLTest_AssertCheck(currentState == SDL_FALSE, "Validate current state is FALSE, got: %i", currentState); - /* Revert to originl state - ignore result */ + /* Revert to original state - ignore result */ result = SDL_SetRelativeMouseMode(initialState); return TEST_COMPLETED; diff --git a/test/testautomation_sdltest.c b/test/testautomation_sdltest.c index fc9a13c86..b51721b05 100644 --- a/test/testautomation_sdltest.c +++ b/test/testautomation_sdltest.c @@ -1169,7 +1169,7 @@ sdltest_randomAsciiStringOfSize(void *arg) nonAsciiCharacters++; } } - SDLTest_AssertCheck(nonAsciiCharacters == 0, "Validate that result does not contain non-Ascii characters, got: %d", nonAsciiCharacters); + SDLTest_AssertCheck(nonAsciiCharacters == 0, "Validate that result does not contain non-ASCII characters, got: %d", nonAsciiCharacters); if (nonAsciiCharacters) { SDLTest_LogError("Invalid result from generator: '%s'", result); } diff --git a/test/testautomation_timer.c b/test/testautomation_timer.c index 17f2f65e1..03c1aeaa6 100644 --- a/test/testautomation_timer.c +++ b/test/testautomation_timer.c @@ -90,7 +90,7 @@ timer_delayAndGetTicks(void *arg) SDLTest_AssertPass("Call to SDL_GetTicks()"); SDLTest_AssertCheck(result > 0, "Check result value, expected: >0, got: %d", result); - /* Delay a bit longer and mesure ticks and verify difference */ + /* Delay a bit longer and measure ticks and verify difference */ SDL_Delay(testDelay); SDLTest_AssertPass("Call to SDL_Delay(%d)", testDelay); result2 = SDL_GetTicks(); @@ -144,7 +144,7 @@ timer_addRemoveTimer(void *arg) SDLTest_AssertCheck(result == SDL_TRUE, "Check result value, expected: %i, got: %i", SDL_TRUE, result); SDLTest_AssertCheck(_timerCallbackCalled == 0, "Check callback WAS NOT called, expected: 0, got: %i", _timerCallbackCalled); - /* Try to temove timer again (should be a NOOP) */ + /* Try to remove timer again (should be a NOOP) */ result = SDL_RemoveTimer(id); SDLTest_AssertPass("Call to SDL_RemoveTimer()"); SDLTest_AssertCheck(result == SDL_FALSE, "Check result value, expected: %i, got: %i", SDL_FALSE, result); From 3fd91d1319e61b1f73600c3f7a4842a0fe1b6755 Mon Sep 17 00:00:00 2001 From: Philipp Wiesemann Date: Sun, 5 May 2013 12:50:34 +0200 Subject: [PATCH 063/542] Fixed possible leak and its Android Lint warning in Java file. --- .../src/org/libsdl/app/SDLActivity.java | 27 +++++++++++++++---- 1 file changed, 22 insertions(+), 5 deletions(-) diff --git a/android-project/src/org/libsdl/app/SDLActivity.java b/android-project/src/org/libsdl/app/SDLActivity.java index 301fc05d6..295ab5eba 100644 --- a/android-project/src/org/libsdl/app/SDLActivity.java +++ b/android-project/src/org/libsdl/app/SDLActivity.java @@ -24,6 +24,7 @@ import android.hardware.*; SDL Activity */ public class SDLActivity extends Activity { + private static final String TAG = "SDL"; // Keep track of the paused state public static boolean mIsPaused = false; @@ -113,25 +114,41 @@ public class SDLActivity extends Activity { static final int COMMAND_UNUSED = 2; static final int COMMAND_TEXTEDIT_HIDE = 3; - // Handler for the messages - Handler commandHandler = new Handler() { + /** + * A Handler class for Messages from native SDL applications. + * It uses current Activities as target (e.g. for the title). + * static to prevent implicit references to enclosing object. + */ + protected static class SDLCommandHandler extends Handler { @Override public void handleMessage(Message msg) { + Context context = getContext(); + if (context == null) { + Log.e(TAG, "error handling message, getContext() returned null"); + return; + } switch (msg.arg1) { case COMMAND_CHANGE_TITLE: - setTitle((String)msg.obj); + if (context instanceof Activity) { + ((Activity) context).setTitle((String)msg.obj); + } else { + Log.e(TAG, "error handling message, getContext() returned no Activity"); + } break; case COMMAND_TEXTEDIT_HIDE: if (mTextEdit != null) { mTextEdit.setVisibility(View.GONE); - InputMethodManager imm = (InputMethodManager) getSystemService(Context.INPUT_METHOD_SERVICE); + InputMethodManager imm = (InputMethodManager) context.getSystemService(Context.INPUT_METHOD_SERVICE); imm.hideSoftInputFromWindow(mTextEdit.getWindowToken(), 0); } break; } } - }; + } + + // Handler for the messages + Handler commandHandler = new SDLCommandHandler(); // Send a message from the SDLMain thread void sendCommand(int command, Object data) { From ffd1362c162aead26c7e7c2b7e1cd11e6ec6a18c Mon Sep 17 00:00:00 2001 From: Philipp Wiesemann Date: Sun, 5 May 2013 12:53:57 +0200 Subject: [PATCH 064/542] Added a method in Java file which may be overridden for custom messages. --- .../src/org/libsdl/app/SDLActivity.java | 18 ++++++++++++++++++ 1 file changed, 18 insertions(+) diff --git a/android-project/src/org/libsdl/app/SDLActivity.java b/android-project/src/org/libsdl/app/SDLActivity.java index 295ab5eba..9dd24d2d1 100644 --- a/android-project/src/org/libsdl/app/SDLActivity.java +++ b/android-project/src/org/libsdl/app/SDLActivity.java @@ -114,6 +114,19 @@ public class SDLActivity extends Activity { static final int COMMAND_UNUSED = 2; static final int COMMAND_TEXTEDIT_HIDE = 3; + protected static final int COMMAND_USER = 0x8000; + + /** + * This method is called by SDL if SDL did not handle a message itself. + * This happens if a received message contains an unsupported command. + * Method can be overwritten to handle Messages in a different class. + * @param msg the Message which was not handled. + * @return if the Message was handled in method. + */ + protected boolean onUnhandledMessage(Message msg) { + return false; + } + /** * A Handler class for Messages from native SDL applications. * It uses current Activities as target (e.g. for the title). @@ -143,6 +156,11 @@ public class SDLActivity extends Activity { imm.hideSoftInputFromWindow(mTextEdit.getWindowToken(), 0); } break; + + default: + if ((context instanceof SDLActivity) && !((SDLActivity) context).onUnhandledMessage(msg)) { + Log.e(TAG, "error handling message, command is " + msg.arg1); + } } } } From 023c495919ce719f3f246c4b9ca6b0967b6318b1 Mon Sep 17 00:00:00 2001 From: Philipp Wiesemann Date: Sun, 5 May 2013 15:39:37 +0200 Subject: [PATCH 065/542] Fixed SDL_HasScreenKeyboardSupport() returning SDL_TRUE for PSP. There is currently no implementation and therefore no support. --- src/video/psp/SDL_pspvideo.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/video/psp/SDL_pspvideo.c b/src/video/psp/SDL_pspvideo.c index 1cffe8a06..d84e69b92 100644 --- a/src/video/psp/SDL_pspvideo.c +++ b/src/video/psp/SDL_pspvideo.c @@ -314,7 +314,7 @@ PSP_GetWindowWMInfo(_THIS, SDL_Window * window, struct SDL_SysWMinfo *info) /* TO Write Me*/ SDL_bool PSP_HasScreenKeyboardSupport(_THIS) { - return SDL_TRUE; + return SDL_FALSE; } void PSP_ShowScreenKeyboard(_THIS, SDL_Window *window) { From 89805a7cae952d82c77ea746d07d458bda9c9062 Mon Sep 17 00:00:00 2001 From: Philipp Wiesemann Date: Sun, 5 May 2013 15:50:21 +0200 Subject: [PATCH 066/542] Changed signature of method recently added in Java file. --- android-project/src/org/libsdl/app/SDLActivity.java | 9 +++++---- 1 file changed, 5 insertions(+), 4 deletions(-) diff --git a/android-project/src/org/libsdl/app/SDLActivity.java b/android-project/src/org/libsdl/app/SDLActivity.java index 9dd24d2d1..9bdf1e718 100644 --- a/android-project/src/org/libsdl/app/SDLActivity.java +++ b/android-project/src/org/libsdl/app/SDLActivity.java @@ -120,10 +120,11 @@ public class SDLActivity extends Activity { * This method is called by SDL if SDL did not handle a message itself. * This happens if a received message contains an unsupported command. * Method can be overwritten to handle Messages in a different class. - * @param msg the Message which was not handled. - * @return if the Message was handled in method. + * @param command the command of the message. + * @param param the parameter of the message. May be null. + * @return if the message was handled in overridden method. */ - protected boolean onUnhandledMessage(Message msg) { + protected boolean onUnhandledMessage(int command, Object param) { return false; } @@ -158,7 +159,7 @@ public class SDLActivity extends Activity { break; default: - if ((context instanceof SDLActivity) && !((SDLActivity) context).onUnhandledMessage(msg)) { + if ((context instanceof SDLActivity) && !((SDLActivity) context).onUnhandledMessage(msg.arg1, msg.obj)) { Log.e(TAG, "error handling message, command is " + msg.arg1); } } From 4266102f1d6be358ee6c59bc8b6ef1326cc7b353 Mon Sep 17 00:00:00 2001 From: Philipp Wiesemann Date: Sun, 5 May 2013 15:54:56 +0200 Subject: [PATCH 067/542] Changed signatures of methods in Java file to return boolean, adapted C++ file. This way more checking for errors is possible which is currently not done here. --- .../src/org/libsdl/app/SDLActivity.java | 16 ++++++++-------- src/core/android/SDL_android.cpp | 14 +++++++------- 2 files changed, 15 insertions(+), 15 deletions(-) diff --git a/android-project/src/org/libsdl/app/SDLActivity.java b/android-project/src/org/libsdl/app/SDLActivity.java index 9bdf1e718..8b1495382 100644 --- a/android-project/src/org/libsdl/app/SDLActivity.java +++ b/android-project/src/org/libsdl/app/SDLActivity.java @@ -170,11 +170,11 @@ public class SDLActivity extends Activity { Handler commandHandler = new SDLCommandHandler(); // Send a message from the SDLMain thread - void sendCommand(int command, Object data) { + boolean sendCommand(int command, Object data) { Message msg = commandHandler.obtainMessage(); msg.arg1 = command; msg.obj = data; - commandHandler.sendMessage(msg); + return commandHandler.sendMessage(msg); } // C functions we call @@ -202,13 +202,13 @@ public class SDLActivity extends Activity { flipEGL(); } - public static void setActivityTitle(String title) { + public static boolean setActivityTitle(String title) { // Called from SDLMain() thread and can't directly affect the view - mSingleton.sendCommand(COMMAND_CHANGE_TITLE, title); + return mSingleton.sendCommand(COMMAND_CHANGE_TITLE, title); } - public static void sendMessage(int command, int param) { - mSingleton.sendCommand(command, Integer.valueOf(param)); + public static boolean sendMessage(int command, int param) { + return mSingleton.sendCommand(command, Integer.valueOf(param)); } public static Context getContext() { @@ -271,9 +271,9 @@ public class SDLActivity extends Activity { } } - public static void showTextInput(int x, int y, int w, int h) { + public static boolean showTextInput(int x, int y, int w, int h) { // Transfer the task to the main thread as a Runnable - mSingleton.commandHandler.post(new ShowTextInputTask(x, y, w, h)); + return mSingleton.commandHandler.post(new ShowTextInputTask(x, y, w, h)); } diff --git a/src/core/android/SDL_android.cpp b/src/core/android/SDL_android.cpp index e6a365dce..ceb3555b0 100644 --- a/src/core/android/SDL_android.cpp +++ b/src/core/android/SDL_android.cpp @@ -339,10 +339,10 @@ extern "C" void Android_JNI_SetActivityTitle(const char *title) { jmethodID mid; JNIEnv *mEnv = Android_JNI_GetEnv(); - mid = mEnv->GetStaticMethodID(mActivityClass,"setActivityTitle","(Ljava/lang/String;)V"); + mid = mEnv->GetStaticMethodID(mActivityClass,"setActivityTitle","(Ljava/lang/String;)Z"); if (mid) { jstring jtitle = reinterpret_cast(mEnv->NewStringUTF(title)); - mEnv->CallStaticVoidMethod(mActivityClass, mid, jtitle); + mEnv->CallStaticBooleanMethod(mActivityClass, mid, jtitle); mEnv->DeleteLocalRef(jtitle); } } @@ -1085,12 +1085,12 @@ extern "C" int Android_JNI_SendMessage(int command, int param) if (!env) { return -1; } - jmethodID mid = env->GetStaticMethodID(mActivityClass, "sendMessage", "(II)V"); + jmethodID mid = env->GetStaticMethodID(mActivityClass, "sendMessage", "(II)Z"); if (!mid) { return -1; } - env->CallStaticVoidMethod(mActivityClass, mid, command, param); - return 0; + jboolean success = env->CallStaticBooleanMethod(mActivityClass, mid, command, param); + return success ? 0 : -1; } extern "C" void Android_JNI_ShowTextInput(SDL_Rect *inputRect) @@ -1100,11 +1100,11 @@ extern "C" void Android_JNI_ShowTextInput(SDL_Rect *inputRect) return; } - jmethodID mid = env->GetStaticMethodID(mActivityClass, "showTextInput", "(IIII)V"); + jmethodID mid = env->GetStaticMethodID(mActivityClass, "showTextInput", "(IIII)Z"); if (!mid) { return; } - env->CallStaticVoidMethod( mActivityClass, mid, + env->CallStaticBooleanMethod( mActivityClass, mid, inputRect->x, inputRect->y, inputRect->w, From 4f70701db14d977dd438e65598c42d75da43edcc Mon Sep 17 00:00:00 2001 From: Philipp Wiesemann Date: Sun, 5 May 2013 16:01:19 +0200 Subject: [PATCH 068/542] Removed not needed block from Java file. --- android-project/src/org/libsdl/app/SDLActivity.java | 4 +--- 1 file changed, 1 insertion(+), 3 deletions(-) diff --git a/android-project/src/org/libsdl/app/SDLActivity.java b/android-project/src/org/libsdl/app/SDLActivity.java index 8b1495382..14411fb43 100644 --- a/android-project/src/org/libsdl/app/SDLActivity.java +++ b/android-project/src/org/libsdl/app/SDLActivity.java @@ -622,11 +622,10 @@ class SDLSurface extends SurfaceView implements SurfaceHolder.Callback, // Touch events @Override public boolean onTouch(View v, MotionEvent event) { - { final int touchDevId = event.getDeviceId(); final int pointerCount = event.getPointerCount(); // touchId, pointerId, action, x, y, pressure - int actionPointerIndex = (event.getAction() & MotionEvent.ACTION_POINTER_ID_MASK) >> MotionEvent. ACTION_POINTER_ID_SHIFT; /* API 8: event.getActionIndex(); */ + int actionPointerIndex = (event.getAction() & MotionEvent.ACTION_POINTER_ID_MASK) >> MotionEvent.ACTION_POINTER_ID_SHIFT; /* API 8: event.getActionIndex(); */ int pointerFingerId = event.getPointerId(actionPointerIndex); int action = (event.getAction() & MotionEvent.ACTION_MASK); /* API 8: event.getActionMasked(); */ @@ -647,7 +646,6 @@ class SDLSurface extends SurfaceView implements SurfaceHolder.Callback, } else { SDLActivity.onNativeTouch(touchDevId, pointerFingerId, action, x, y, p); } - } return true; } From 4ec8d70ca1396367eeed9381ff522ef88fef28f3 Mon Sep 17 00:00:00 2001 From: Andreas Schiffler Date: Sun, 5 May 2013 11:17:40 -0700 Subject: [PATCH 069/542] Add input validation to SDL_CalculateGammaRamp; add test coverage to Pixels suite; update test cases in Pixels suite --- src/video/SDL_pixels.c | 12 ++- test/testautomation_pixels.c | 163 +++++++++++++++++++++++++++++++++-- 2 files changed, 169 insertions(+), 6 deletions(-) diff --git a/src/video/SDL_pixels.c b/src/video/SDL_pixels.c index 55e181922..271a17d3c 100644 --- a/src/video/SDL_pixels.c +++ b/src/video/SDL_pixels.c @@ -1090,9 +1090,19 @@ void SDL_CalculateGammaRamp(float gamma, Uint16 * ramp) { int i; + + /* Input validation */ + if (gamma < 0.0f ) { + SDL_InvalidParamError("gamma"); + return; + } + if (ramp == NULL) { + SDL_InvalidParamError("ramp"); + return; + } /* 0.0 gamma is all black */ - if (gamma <= 0.0f) { + if (gamma == 0.0f) { for (i = 0; i < 256; ++i) { ramp[i] = 0; } diff --git a/test/testautomation_pixels.c b/test/testautomation_pixels.c index 0165e73f7..7191e9f1e 100644 --- a/test/testautomation_pixels.c +++ b/test/testautomation_pixels.c @@ -108,6 +108,9 @@ char* _nonRGBPixelFormatsVerbose[] = int pixels_allocFreeFormat(void *arg) { + const char *expectedError = "Parameter 'format' is invalid"; + const char *error; + char message[256]; int i; Uint32 format; Uint32 masks; @@ -149,15 +152,34 @@ pixels_allocFreeFormat(void *arg) } /* Negative cases */ + + /* Invalid Format */ + SDL_ClearError(); + SDLTest_AssertPass("Call to SDL_ClearError()"); format = 0xffffffff; result = SDL_AllocFormat(format); SDLTest_AssertPass("Call to SDL_AllocFormat(0xffffffff)"); SDLTest_AssertCheck(result == NULL, "Verify result is NULL"); - /* TODO: check error code */ + error = SDL_GetError(); + SDLTest_AssertPass("Call to SDL_GetError()"); + SDLTest_AssertCheck(error != NULL, "Validate that error message was not NULL"); + if (error != NULL) { + SDLTest_AssertCheck(SDL_strcmp(error, expectedError) == 0, + "Validate error message, expected: '%s', got: '%s'", expectedError, error); + } + /* Invalid free pointer */ + SDL_ClearError(); + SDLTest_AssertPass("Call to SDL_ClearError()"); SDL_FreeFormat(NULL); SDLTest_AssertPass("Call to SDL_FreeFormat(NULL)"); - /* TODO: check error code */ + error = SDL_GetError(); + SDLTest_AssertPass("Call to SDL_GetError()"); + SDLTest_AssertCheck(error != NULL, "Validate that error message was not NULL"); + if (error != NULL) { + SDLTest_AssertCheck(SDL_strcmp(error, expectedError) == 0, + "Validate error message, expected: '%s', got: '%s'", expectedError, error); + } return TEST_COMPLETED; } @@ -171,6 +193,10 @@ pixels_allocFreeFormat(void *arg) int pixels_allocFreePalette(void *arg) { + const char *expectedError1 = "Parameter 'ncolors' is invalid"; + const char *expectedError2 = "Parameter 'palette' is invalid"; + const char *error; + char message[256]; int variation; int i; int ncolors; @@ -216,16 +242,140 @@ pixels_allocFreePalette(void *arg) } /* Negative cases */ + + /* Invalid number of colors */ for (ncolors = 0; ncolors > -3; ncolors--) { + SDL_ClearError(); + SDLTest_AssertPass("Call to SDL_ClearError()"); result = SDL_AllocPalette(ncolors); SDLTest_AssertPass("Call to SDL_AllocPalette(%d)", ncolors); SDLTest_AssertCheck(result == NULL, "Verify result is NULL"); - /* TODO: check error code */ + error = SDL_GetError(); + SDLTest_AssertPass("Call to SDL_GetError()"); + SDLTest_AssertCheck(error != NULL, "Validate that error message was not NULL"); + if (error != NULL) { + SDLTest_AssertCheck(SDL_strcmp(error, expectedError1) == 0, + "Validate error message, expected: '%s', got: '%s'", expectedError1, error); + } } + /* Invalid free pointer */ + SDL_ClearError(); + SDLTest_AssertPass("Call to SDL_ClearError()"); SDL_FreePalette(NULL); SDLTest_AssertPass("Call to SDL_FreePalette(NULL)"); - /* TODO: check error code */ + error = SDL_GetError(); + SDLTest_AssertPass("Call to SDL_GetError()"); + SDLTest_AssertCheck(error != NULL, "Validate that error message was not NULL"); + if (error != NULL) { + SDLTest_AssertCheck(SDL_strcmp(error, expectedError2) == 0, + "Validate error message, expected: '%s', got: '%s'", expectedError2, error); + } + + return TEST_COMPLETED; +} + +/** + * @brief Call to SDL_CalculateGammaRamp + * + * @sa http://wiki.libsdl.org/moin.fcg/SDL_CalculateGammaRamp + */ +int +pixels_calcGammaRamp(void *arg) +{ + const char *expectedError1 = "Parameter 'gamma' is invalid"; + const char *expectedError2 = "Parameter 'ramp' is invalid"; + const char *error; + char message[256]; + float gamma; + Uint16 *ramp; + int variation; + int i; + int changed; + Uint16 magic = 0xbeef; + + /* Allocate temp ramp array and fill with some value*/ + ramp = (Uint16 *)SDL_malloc(256 * sizeof(Uint16)); + SDLTest_AssertCheck(ramp != NULL, "Validate temp ramp array could be allocated"); + if (ramp == NULL) return TEST_ABORTED; + + /* Make call with different gamma values */ + for (variation = 0; variation < 4; variation++) { + switch (variation) { + /* gamma = 0 all black */ + case 0: + gamma = 0.0f; + break; + /* gamma = 1 identity */ + case 1: + gamma = 1.0f; + break; + /* gamma = ]0,1[ normal range */ + case 2: + gamma = 0.01f + 0.98f * SDLTest_RandomUnitFloat(); + break; + /* gamma = >1.0 non-standard range */ + case 3: + gamma = 0.01f + 0.98f * SDLTest_RandomUnitFloat(); + break; + } + + /* Make call and check that values were updated */ + for (i = 0; i < 256; i++) ramp[i] = magic; + SDL_CalculateGammaRamp(gamma, ramp); + SDLTest_AssertPass("Call to SDL_CalculateGammaRamp(%f)", gamma); + changed = 0; + for (i = 0; i < 256; i++) if (ramp[i] != magic) changed++; + SDLTest_AssertCheck(changed > 250, "Validate that ramp was calculated; expected: >250 values changed, got: %d values changed", changed); + + /* Additional value checks for some cases */ + i = SDLTest_RandomIntegerInRange(64,192); + switch (variation) { + case 0: + SDLTest_AssertCheck(ramp[i] == 0, "Validate value at position %d; expected: 0, got: %d", i, ramp[i]); + break; + case 1: + SDLTest_AssertCheck(ramp[i] == (i << 8) | i, "Validate value at position %d; expected: %d, got: %d", i, (i << 8) | i, ramp[i]); + break; + case 2: + case 3: + SDLTest_AssertCheck(ramp[i] > 0, "Validate value at position %d; expected: >0, got: %d", i, ramp[i]); + break; + } + } + + + /* Negative cases */ + SDL_ClearError(); + SDLTest_AssertPass("Call to SDL_ClearError()"); + gamma = -1; + for (i=0; i<256; i++) ramp[i] = magic; + SDL_CalculateGammaRamp(gamma, ramp); + SDLTest_AssertPass("Call to SDL_CalculateGammaRamp(%f)", gamma); + error = SDL_GetError(); + SDLTest_AssertPass("Call to SDL_GetError()"); + SDLTest_AssertCheck(error != NULL, "Validate that error message was not NULL"); + if (error != NULL) { + SDLTest_AssertCheck(SDL_strcmp(error, expectedError1) == 0, + "Validate error message, expected: '%s', got: '%s'", expectedError1, error); + } + changed = 0; + for (i = 0; i < 256; i++) if (ramp[i] != magic) changed++; + SDLTest_AssertCheck(changed ==0, "Validate that ramp unchanged; expected: 0 values changed got: %d values changed", changed); + + SDL_CalculateGammaRamp(0.5f, NULL); + SDLTest_AssertPass("Call to SDL_CalculateGammaRamp(0.5,NULL)"); + error = SDL_GetError(); + SDLTest_AssertPass("Call to SDL_GetError()"); + SDLTest_AssertCheck(error != NULL, "Validate that error message was not NULL"); + if (error != NULL) { + SDLTest_AssertCheck(SDL_strcmp(error, expectedError2) == 0, + "Validate error message, expected: '%s', got: '%s'", expectedError2, error); + } + + /* Cleanup */ + SDL_free(ramp); + return TEST_COMPLETED; } @@ -239,9 +389,12 @@ static const SDLTest_TestCaseReference pixelsTest1 = static const SDLTest_TestCaseReference pixelsTest2 = { (SDLTest_TestCaseFp)pixels_allocFreePalette, "pixels_allocFreePalette", "Call to SDL_AllocPalette and SDL_FreePalette", TEST_ENABLED }; +static const SDLTest_TestCaseReference pixelsTest3 = + { (SDLTest_TestCaseFp)pixels_calcGammaRamp, "pixels_calcGammaRamp", "Call to SDL_CalculateGammaRamp", TEST_ENABLED }; + /* Sequence of Pixels test cases */ static const SDLTest_TestCaseReference *pixelsTests[] = { - &pixelsTest1, &pixelsTest2, NULL + &pixelsTest1, &pixelsTest2, &pixelsTest3, NULL }; /* Pixels test suite (global) */ From 1a2ba7422c6bd729bb77334fdd157bc28861c401 Mon Sep 17 00:00:00 2001 From: Ethan Lee Date: Sun, 5 May 2013 21:01:20 -0400 Subject: [PATCH 070/542] Implemented SDL_GL_SHARE_WITH_CURRENT_CONTEXT for Mac OS X. --- src/video/cocoa/SDL_cocoaopengl.m | 7 ++++++- 1 file changed, 6 insertions(+), 1 deletion(-) diff --git a/src/video/cocoa/SDL_cocoaopengl.m b/src/video/cocoa/SDL_cocoaopengl.m index e1f443979..f52e3e91e 100644 --- a/src/video/cocoa/SDL_cocoaopengl.m +++ b/src/video/cocoa/SDL_cocoaopengl.m @@ -90,6 +90,7 @@ Cocoa_GL_CreateContext(_THIS, SDL_Window * window) NSOpenGLPixelFormatAttribute attr[32]; NSOpenGLPixelFormat *fmt; NSOpenGLContext *context; + NSOpenGLContext *share_context = nil; int i = 0; if (_this->gl_config.profile_mask == SDL_GL_CONTEXT_PROFILE_ES) { @@ -182,7 +183,11 @@ Cocoa_GL_CreateContext(_THIS, SDL_Window * window) return NULL; } - context = [[NSOpenGLContext alloc] initWithFormat:fmt shareContext:nil]; + if (_this->gl_config.share_with_current_context) { + share_context = (NSOpenGLContext*)(_this->current_glctx); + } + + context = [[NSOpenGLContext alloc] initWithFormat:fmt shareContext:share_context]; [fmt release]; From 8ac64239e5a54942fe0090065af3cbf994fdd41b Mon Sep 17 00:00:00 2001 From: Andreas Schiffler Date: Mon, 6 May 2013 08:13:44 -0700 Subject: [PATCH 071/542] Add test for SDL_GetPixelFormatName to Pixels suite; minor improvements to Pixels suite --- test/testautomation_pixels.c | 159 ++++++++++++++++++++++++++++++----- 1 file changed, 139 insertions(+), 20 deletions(-) diff --git a/test/testautomation_pixels.c b/test/testautomation_pixels.c index 7191e9f1e..d021b38c8 100644 --- a/test/testautomation_pixels.c +++ b/test/testautomation_pixels.c @@ -97,6 +97,19 @@ char* _nonRGBPixelFormatsVerbose[] = "SDL_PIXELFORMAT_YVYU" }; +/* Definition of some invalid formats for negative tests */ +const int _numInvalidPixelFormats = 2; +Uint32 _invalidPixelFormats[] = + { + 0xfffffffe, + 0xffffffff + }; +char* _invalidPixelFormatsVerbose[] = + { + "SDL_PIXELFORMAT_UNKNOWN", + "SDL_PIXELFORMAT_UNKNOWN" + }; + /* Test case functions */ /** @@ -108,14 +121,34 @@ char* _nonRGBPixelFormatsVerbose[] = int pixels_allocFreeFormat(void *arg) { + const char *unknownFormat = "SDL_PIXELFORMAT_UNKNOWN"; const char *expectedError = "Parameter 'format' is invalid"; const char *error; - char message[256]; int i; Uint32 format; Uint32 masks; SDL_PixelFormat* result; + /* Blank/unknown format */ + format = 0; + SDLTest_Log("RGB Format: %s (%u)", unknownFormat, format); + + /* Allocate format */ + result = SDL_AllocFormat(format); + SDLTest_AssertPass("Call to SDL_AllocFormat()"); + SDLTest_AssertCheck(result != NULL, "Verify result is not NULL"); + if (result != NULL) { + SDLTest_AssertCheck(result->format == format, "Verify value of result.format; expected: %u, got %u", format, result->format); + SDLTest_AssertCheck(result->BitsPerPixel == 0, "Verify value of result.BitsPerPixel; expected: 0, got %u", result->BitsPerPixel); + SDLTest_AssertCheck(result->BytesPerPixel == 0, "Verify value of result.BytesPerPixel; expected: 0, got %u", result->BytesPerPixel); + masks = result->Rmask | result->Gmask | result->Bmask | result->Amask; + SDLTest_AssertCheck(masks == 0, "Verify value of result.[RGBA]mask combined; expected: 0, got %u", masks); + + /* Deallocate again */ + SDL_FreeFormat(result); + SDLTest_AssertPass("Call to SDL_FreeFormat()"); + } + /* RGB formats */ for (i = 0; i < _numRGBPixelFormats; i++) { format = _RGBPixelFormats[i]; @@ -153,19 +186,21 @@ pixels_allocFreeFormat(void *arg) /* Negative cases */ - /* Invalid Format */ - SDL_ClearError(); - SDLTest_AssertPass("Call to SDL_ClearError()"); - format = 0xffffffff; - result = SDL_AllocFormat(format); - SDLTest_AssertPass("Call to SDL_AllocFormat(0xffffffff)"); - SDLTest_AssertCheck(result == NULL, "Verify result is NULL"); - error = SDL_GetError(); - SDLTest_AssertPass("Call to SDL_GetError()"); - SDLTest_AssertCheck(error != NULL, "Validate that error message was not NULL"); - if (error != NULL) { + /* Invalid Formats */ + for (i = 0; i < _numInvalidPixelFormats; i++) { + SDL_ClearError(); + SDLTest_AssertPass("Call to SDL_ClearError()"); + format = _invalidPixelFormats[i]; + result = SDL_AllocFormat(format); + SDLTest_AssertPass("Call to SDL_AllocFormat(%u)", format); + SDLTest_AssertCheck(result == NULL, "Verify result is NULL"); + error = SDL_GetError(); + SDLTest_AssertPass("Call to SDL_GetError()"); + SDLTest_AssertCheck(error != NULL, "Validate that error message was not NULL"); + if (error != NULL) { SDLTest_AssertCheck(SDL_strcmp(error, expectedError) == 0, "Validate error message, expected: '%s', got: '%s'", expectedError, error); + } } /* Invalid free pointer */ @@ -184,6 +219,90 @@ pixels_allocFreeFormat(void *arg) return TEST_COMPLETED; } +/** + * @brief Call to SDL_GetPixelFormatName + * + * @sa http://wiki.libsdl.org/moin.fcg/SDL_GetPixelFormatName + */ +int +pixels_getPixelFormatName(void *arg) +{ + const char *unknownFormat = "SDL_PIXELFORMAT_UNKNOWN"; + const char *error; + int i; + Uint32 format; + char* result; + + /* Blank/undefined format */ + format = 0; + SDLTest_Log("RGB Format: %s (%u)", unknownFormat, format); + + /* Get name of format */ + result = (char *)SDL_GetPixelFormatName(format); + SDLTest_AssertPass("Call to SDL_GetPixelFormatName()"); + SDLTest_AssertCheck(result != NULL, "Verify result is not NULL"); + if (result != NULL) { + SDLTest_AssertCheck(SDL_strlen(result) > 0, "Verify result is non-empty"); + SDLTest_AssertCheck(SDL_strcmp(result, unknownFormat) == 0, + "Verify result text; expected: %s, got %s", unknownFormat, result); + } + + /* RGB formats */ + for (i = 0; i < _numRGBPixelFormats; i++) { + format = _RGBPixelFormats[i]; + SDLTest_Log("RGB Format: %s (%u)", _RGBPixelFormatsVerbose[i], format); + + /* Get name of format */ + result = (char *)SDL_GetPixelFormatName(format); + SDLTest_AssertPass("Call to SDL_GetPixelFormatName()"); + SDLTest_AssertCheck(result != NULL, "Verify result is not NULL"); + if (result != NULL) { + SDLTest_AssertCheck(SDL_strlen(result) > 0, "Verify result is non-empty"); + SDLTest_AssertCheck(SDL_strcmp(result, _RGBPixelFormatsVerbose[i]) == 0, + "Verify result text; expected: %s, got %s", _RGBPixelFormatsVerbose[i], result); + } + } + + /* Non-RGB formats */ + for (i = 0; i < _numNonRGBPixelFormats; i++) { + format = _nonRGBPixelFormats[i]; + SDLTest_Log("non-RGB Format: %s (%u)", _nonRGBPixelFormatsVerbose[i], format); + + /* Get name of format */ + result = (char *)SDL_GetPixelFormatName(format); + SDLTest_AssertPass("Call to SDL_GetPixelFormatName()"); + SDLTest_AssertCheck(result != NULL, "Verify result is not NULL"); + if (result != NULL) { + SDLTest_AssertCheck(SDL_strlen(result) > 0, "Verify result is non-empty"); + SDLTest_AssertCheck(SDL_strcmp(result, _nonRGBPixelFormatsVerbose[i]) == 0, + "Verify result text; expected: %s, got %s", _nonRGBPixelFormatsVerbose[i], result); + } + } + + /* Negative cases */ + + /* Invalid Formats */ + SDL_ClearError(); + SDLTest_AssertPass("Call to SDL_ClearError()"); + for (i = 0; i < _numInvalidPixelFormats; i++) { + format = _invalidPixelFormats[i]; + result = (char *)SDL_GetPixelFormatName(format); + SDLTest_AssertPass("Call to SDL_GetPixelFormatName(%u)", format); + SDLTest_AssertCheck(result != NULL, "Verify result is not NULL"); + if (result != NULL) { + SDLTest_AssertCheck(SDL_strlen(result) > 0, + "Verify result is non-empty; got: %s", result); + SDLTest_AssertCheck(SDL_strcmp(result, _invalidPixelFormatsVerbose[i]) == 0, + "Validate name is UNKNOWN, expected: '%s', got: '%s'", _invalidPixelFormatsVerbose[i], result); + } + error = SDL_GetError(); + SDLTest_AssertPass("Call to SDL_GetError()"); + SDLTest_AssertCheck(error != NULL && SDL_strlen(error) == 0, "Validate that error message is empty"); + } + + return TEST_COMPLETED; +} + /** * @brief Call to SDL_AllocPalette and SDL_FreePalette * @@ -196,7 +315,6 @@ pixels_allocFreePalette(void *arg) const char *expectedError1 = "Parameter 'ncolors' is invalid"; const char *expectedError2 = "Parameter 'palette' is invalid"; const char *error; - char message[256]; int variation; int i; int ncolors; @@ -286,7 +404,6 @@ pixels_calcGammaRamp(void *arg) const char *expectedError1 = "Parameter 'gamma' is invalid"; const char *expectedError2 = "Parameter 'ramp' is invalid"; const char *error; - char message[256]; float gamma; Uint16 *ramp; int variation; @@ -310,13 +427,13 @@ pixels_calcGammaRamp(void *arg) case 1: gamma = 1.0f; break; - /* gamma = ]0,1[ normal range */ + /* gamma = [0.2,0.8] normal range */ case 2: - gamma = 0.01f + 0.98f * SDLTest_RandomUnitFloat(); + gamma = 0.2f + 0.8f * SDLTest_RandomUnitFloat(); break; - /* gamma = >1.0 non-standard range */ + /* gamma = >1.1 non-standard range */ case 3: - gamma = 0.01f + 0.98f * SDLTest_RandomUnitFloat(); + gamma = 1.1f + SDLTest_RandomUnitFloat(); break; } @@ -343,7 +460,6 @@ pixels_calcGammaRamp(void *arg) break; } } - /* Negative cases */ SDL_ClearError(); @@ -392,9 +508,12 @@ static const SDLTest_TestCaseReference pixelsTest2 = static const SDLTest_TestCaseReference pixelsTest3 = { (SDLTest_TestCaseFp)pixels_calcGammaRamp, "pixels_calcGammaRamp", "Call to SDL_CalculateGammaRamp", TEST_ENABLED }; +static const SDLTest_TestCaseReference pixelsTest4 = + { (SDLTest_TestCaseFp)pixels_getPixelFormatName, "pixels_getPixelFormatName", "Call to SDL_GetPixelFormatName", TEST_ENABLED }; + /* Sequence of Pixels test cases */ static const SDLTest_TestCaseReference *pixelsTests[] = { - &pixelsTest1, &pixelsTest2, &pixelsTest3, NULL + &pixelsTest1, &pixelsTest2, &pixelsTest3, &pixelsTest4, NULL }; /* Pixels test suite (global) */ From 914c1c4469637184fde6387021f496d2f7b6a577 Mon Sep 17 00:00:00 2001 From: Sam Lantinga Date: Mon, 6 May 2013 13:39:17 -0700 Subject: [PATCH 072/542] Disable C++ exceptions, use debug format that includes debug information in the static libraries, and standardize on Program Database / Program Database with edit and continue for the DLL debug format. --- VisualC/SDL/SDL_VS2008.vcproj | 12 +- VisualC/SDL/SDL_VS2010.vcxproj | 4 +- VisualC/SDL/SDL_VS2012.vcxproj | 4 +- VisualC/SDLmain/SDLmain_VS2008.vcproj | 14 +- VisualC/SDLmain/SDLmain_VS2010.vcxproj | 4 + VisualC/SDLmain/SDLmain_VS2012.vcxproj | 328 ++++++++++----------- VisualC/SDLtest/SDLtest_VS2008.vcproj | 14 +- VisualC/SDLtest/SDLtest_VS2010.vcxproj | 4 + VisualC/SDLtest/SDLtest_VS2012.vcxproj | 384 +++++++++++++------------ 9 files changed, 407 insertions(+), 361 deletions(-) diff --git a/VisualC/SDL/SDL_VS2008.vcproj b/VisualC/SDL/SDL_VS2008.vcproj index 8a6c37a2c..968fee2cb 100644 --- a/VisualC/SDL/SDL_VS2008.vcproj +++ b/VisualC/SDL/SDL_VS2008.vcproj @@ -53,7 +53,7 @@ Optimization="0" AdditionalIncludeDirectories="..\..\include" PreprocessorDefinitions="_DEBUG;_WINDOWS" - ExceptionHandling="2" + ExceptionHandling="0" RuntimeLibrary="3" BufferSecurityCheck="false" WarningLevel="3" @@ -136,13 +136,13 @@ Optimization="0" AdditionalIncludeDirectories="..\..\include" PreprocessorDefinitions="_DEBUG;_WINDOWS" - ExceptionHandling="2" + ExceptionHandling="0" RuntimeLibrary="2" BufferSecurityCheck="false" WarningLevel="3" SuppressStartupBanner="true" Detect64BitPortabilityProblems="false" - DebugInformationFormat="3" + DebugInformationFormat="4" CompileAs="0" /> Level3 - ProgramDatabase + EditAndContinue false @@ -162,6 +162,7 @@ true Default false + ProgramDatabase NDEBUG;%(PreprocessorDefinitions) @@ -197,6 +198,7 @@ Level3 false + ProgramDatabase NDEBUG;%(PreprocessorDefinitions) diff --git a/VisualC/SDL/SDL_VS2012.vcxproj b/VisualC/SDL/SDL_VS2012.vcxproj index cdc427e66..9d5a3f7a0 100644 --- a/VisualC/SDL/SDL_VS2012.vcxproj +++ b/VisualC/SDL/SDL_VS2012.vcxproj @@ -127,7 +127,7 @@ Level3 - ProgramDatabase + EditAndContinue false @@ -166,6 +166,7 @@ true Default false + ProgramDatabase NDEBUG;%(PreprocessorDefinitions) @@ -201,6 +202,7 @@ Level3 false + ProgramDatabase NDEBUG;%(PreprocessorDefinitions) diff --git a/VisualC/SDLmain/SDLmain_VS2008.vcproj b/VisualC/SDLmain/SDLmain_VS2008.vcproj index 4e1c1e02c..9e43c5c3a 100644 --- a/VisualC/SDLmain/SDLmain_VS2008.vcproj +++ b/VisualC/SDLmain/SDLmain_VS2008.vcproj @@ -49,10 +49,12 @@ AdditionalIncludeDirectories="..\..\include,..\..\include\SDL" PreprocessorDefinitions="WIN32,NDEBUG,_WINDOWS" StringPooling="true" + ExceptionHandling="0" RuntimeLibrary="2" EnableFunctionLevelLinking="true" WarningLevel="3" SuppressStartupBanner="true" + DebugInformationFormat="1" CompileAs="0" /> Level3 true Default + false + OldStyle true @@ -106,6 +108,7 @@ Level3 true Default + OldStyle true @@ -124,6 +127,7 @@ true OldStyle Default + false true diff --git a/VisualC/SDLmain/SDLmain_VS2012.vcxproj b/VisualC/SDLmain/SDLmain_VS2012.vcxproj index d95409bca..52a9851c1 100644 --- a/VisualC/SDLmain/SDLmain_VS2012.vcxproj +++ b/VisualC/SDLmain/SDLmain_VS2012.vcxproj @@ -1,162 +1,168 @@ - - - - - Debug - Win32 - - - Debug - x64 - - - Release - Win32 - - - Release - x64 - - - - SDLmain - {DA956FD3-E142-46F2-9DD5-C78BEBB56B7A} - - - - StaticLibrary - false - v110 - - - StaticLibrary - false - v110 - - - StaticLibrary - false - MultiByte - v110 - - - StaticLibrary - false - v110 - - - - - - - - - - - - - - - - - - - - - - - <_ProjectFileVersion>10.0.30319.1 - $(Platform)\$(Configuration)\ - $(Platform)\$(Configuration)\ - $(Platform)\$(Configuration)\ - $(Platform)\$(Configuration)\ - $(Platform)\$(Configuration)\ - $(Platform)\$(Configuration)\ - $(Platform)\$(Configuration)\ - $(Platform)\$(Configuration)\ - - - - - OnlyExplicitInline - ..\..\include;..\..\include\SDL;%(AdditionalIncludeDirectories) - WIN32;NDEBUG;_WINDOWS;%(PreprocessorDefinitions) - true - MultiThreadedDLL - true - - - Level3 - true - Default - - - true - - - - - X64 - - - OnlyExplicitInline - ..\..\include;..\..\include\SDL;%(AdditionalIncludeDirectories) - WIN32;NDEBUG;_WINDOWS;%(PreprocessorDefinitions) - true - MultiThreadedDLL - true - - - Level3 - true - Default - - - true - - - - - - Disabled - ..\..\include;..\..\include\SDL;%(AdditionalIncludeDirectories) - WIN32;_DEBUG;_WINDOWS;%(PreprocessorDefinitions) - MultiThreadedDebugDLL - - - Level3 - true - OldStyle - Default - - - true - - - - - X64 - - - Disabled - ..\..\include;..\..\include\SDL;%(AdditionalIncludeDirectories) - WIN32;_DEBUG;_WINDOWS;%(PreprocessorDefinitions) - MultiThreadedDebugDLL - - - Level3 - true - OldStyle - Default - - - true - - - - - - - - + + + + + Debug + Win32 + + + Debug + x64 + + + Release + Win32 + + + Release + x64 + + + + SDLmain + {DA956FD3-E142-46F2-9DD5-C78BEBB56B7A} + + + + StaticLibrary + false + v110 + + + StaticLibrary + false + v110 + + + StaticLibrary + false + MultiByte + v110 + + + StaticLibrary + false + v110 + + + + + + + + + + + + + + + + + + + + + + + <_ProjectFileVersion>10.0.30319.1 + $(Platform)\$(Configuration)\ + $(Platform)\$(Configuration)\ + $(Platform)\$(Configuration)\ + $(Platform)\$(Configuration)\ + $(Platform)\$(Configuration)\ + $(Platform)\$(Configuration)\ + $(Platform)\$(Configuration)\ + $(Platform)\$(Configuration)\ + + + + + OnlyExplicitInline + ..\..\include;..\..\include\SDL;%(AdditionalIncludeDirectories) + WIN32;NDEBUG;_WINDOWS;%(PreprocessorDefinitions) + true + MultiThreadedDLL + true + + + Level3 + true + Default + OldStyle + false + + + true + + + + + X64 + + + OnlyExplicitInline + ..\..\include;..\..\include\SDL;%(AdditionalIncludeDirectories) + WIN32;NDEBUG;_WINDOWS;%(PreprocessorDefinitions) + true + MultiThreadedDLL + true + + + Level3 + true + Default + OldStyle + false + + + true + + + + + + Disabled + ..\..\include;..\..\include\SDL;%(AdditionalIncludeDirectories) + WIN32;_DEBUG;_WINDOWS;%(PreprocessorDefinitions) + MultiThreadedDebugDLL + + + Level3 + true + OldStyle + Default + false + + + true + + + + + X64 + + + Disabled + ..\..\include;..\..\include\SDL;%(AdditionalIncludeDirectories) + WIN32;_DEBUG;_WINDOWS;%(PreprocessorDefinitions) + MultiThreadedDebugDLL + + + Level3 + true + OldStyle + Default + false + + + true + + + + + + + + \ No newline at end of file diff --git a/VisualC/SDLtest/SDLtest_VS2008.vcproj b/VisualC/SDLtest/SDLtest_VS2008.vcproj index 99e55e983..4cd7e0003 100644 --- a/VisualC/SDLtest/SDLtest_VS2008.vcproj +++ b/VisualC/SDLtest/SDLtest_VS2008.vcproj @@ -49,10 +49,12 @@ AdditionalIncludeDirectories="..\..\include,..\..\include\SDL" PreprocessorDefinitions="WIN32,NDEBUG,_WINDOWS" StringPooling="true" + ExceptionHandling="0" RuntimeLibrary="2" EnableFunctionLevelLinking="true" WarningLevel="3" SuppressStartupBanner="true" + DebugInformationFormat="1" CompileAs="0" /> Level3 true Default + false + OldStyle true @@ -106,6 +108,7 @@ Level3 true Default + OldStyle true @@ -124,6 +127,7 @@ true OldStyle Default + false true diff --git a/VisualC/SDLtest/SDLtest_VS2012.vcxproj b/VisualC/SDLtest/SDLtest_VS2012.vcxproj index 762f2b5fe..08375db88 100644 --- a/VisualC/SDLtest/SDLtest_VS2012.vcxproj +++ b/VisualC/SDLtest/SDLtest_VS2012.vcxproj @@ -1,190 +1,196 @@ - - - - - Debug - Win32 - - - Debug - x64 - - - Release - Win32 - - - Release - x64 - - - - SDLtest - {DA956FD3-E143-46F2-9FE5-C77BEBC56B1A} - - - - StaticLibrary - false - v110 - - - StaticLibrary - false - v110 - - - StaticLibrary - false - MultiByte - v110 - - - StaticLibrary - false - v110 - - - - - - - - - - - - - - - - - - - - - - - <_ProjectFileVersion>10.0.30319.1 - $(Platform)\$(Configuration)\ - $(Platform)\$(Configuration)\ - $(Platform)\$(Configuration)\ - $(Platform)\$(Configuration)\ - $(Platform)\$(Configuration)\ - $(Platform)\$(Configuration)\ - $(Platform)\$(Configuration)\ - $(Platform)\$(Configuration)\ - - - - - OnlyExplicitInline - ..\..\include;..\..\include\SDL;%(AdditionalIncludeDirectories) - WIN32;NDEBUG;_WINDOWS;%(PreprocessorDefinitions) - true - MultiThreadedDLL - true - - - Level3 - true - Default - - - true - - - - - X64 - - - OnlyExplicitInline - ..\..\include;..\..\include\SDL;%(AdditionalIncludeDirectories) - WIN32;NDEBUG;_WINDOWS;%(PreprocessorDefinitions) - true - MultiThreadedDLL - true - - - Level3 - true - Default - - - true - - - - - - Disabled - ..\..\include;..\..\include\SDL;%(AdditionalIncludeDirectories) - WIN32;_DEBUG;_WINDOWS;%(PreprocessorDefinitions) - MultiThreadedDebugDLL - - - Level3 - true - OldStyle - Default - - - true - - - - - X64 - - - Disabled - ..\..\include;..\..\include\SDL;%(AdditionalIncludeDirectories) - WIN32;_DEBUG;_WINDOWS;%(PreprocessorDefinitions) - MultiThreadedDebugDLL - - - Level3 - true - OldStyle - Default - - - true - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - + + + + + Debug + Win32 + + + Debug + x64 + + + Release + Win32 + + + Release + x64 + + + + SDLtest + {DA956FD3-E143-46F2-9FE5-C77BEBC56B1A} + + + + StaticLibrary + false + v110 + + + StaticLibrary + false + v110 + + + StaticLibrary + false + MultiByte + v110 + + + StaticLibrary + false + v110 + + + + + + + + + + + + + + + + + + + + + + + <_ProjectFileVersion>10.0.30319.1 + $(Platform)\$(Configuration)\ + $(Platform)\$(Configuration)\ + $(Platform)\$(Configuration)\ + $(Platform)\$(Configuration)\ + $(Platform)\$(Configuration)\ + $(Platform)\$(Configuration)\ + $(Platform)\$(Configuration)\ + $(Platform)\$(Configuration)\ + + + + + OnlyExplicitInline + ..\..\include;..\..\include\SDL;%(AdditionalIncludeDirectories) + WIN32;NDEBUG;_WINDOWS;%(PreprocessorDefinitions) + true + MultiThreadedDLL + true + + + Level3 + true + Default + OldStyle + false + + + true + + + + + X64 + + + OnlyExplicitInline + ..\..\include;..\..\include\SDL;%(AdditionalIncludeDirectories) + WIN32;NDEBUG;_WINDOWS;%(PreprocessorDefinitions) + true + MultiThreadedDLL + true + + + Level3 + true + Default + OldStyle + false + + + true + + + + + + Disabled + ..\..\include;..\..\include\SDL;%(AdditionalIncludeDirectories) + WIN32;_DEBUG;_WINDOWS;%(PreprocessorDefinitions) + MultiThreadedDebugDLL + + + Level3 + true + OldStyle + Default + false + + + true + + + + + X64 + + + Disabled + ..\..\include;..\..\include\SDL;%(AdditionalIncludeDirectories) + WIN32;_DEBUG;_WINDOWS;%(PreprocessorDefinitions) + MultiThreadedDebugDLL + + + Level3 + true + OldStyle + Default + false + + + true + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + \ No newline at end of file From be8e310e8dccf786f1aafbe2bddf1a5144ad85bb Mon Sep 17 00:00:00 2001 From: Philipp Wiesemann Date: Mon, 6 May 2013 23:00:30 +0200 Subject: [PATCH 073/542] Removed wrong documentation from test suite for render. --- test/testautomation_render.c | 2 -- 1 file changed, 2 deletions(-) diff --git a/test/testautomation_render.c b/test/testautomation_render.c index e33cd064c..f2ded794d 100644 --- a/test/testautomation_render.c +++ b/test/testautomation_render.c @@ -957,9 +957,7 @@ _hasTexAlpha(void) /** * @brief Compares screen pixels with image pixels. Helper function. * - * @param msg Message on failure. * @param s Image to compare against. - * @return 0 on success. * * \sa * http://wiki.libsdl.org/moin.cgi/SDL_RenderReadPixels From 1139caac7f957c9f2c68d8eb75eba19cae15cc37 Mon Sep 17 00:00:00 2001 From: Philipp Wiesemann Date: Mon, 6 May 2013 23:01:14 +0200 Subject: [PATCH 074/542] Removed unreachable return statement from test suite for timer. --- test/testautomation_timer.c | 1 - 1 file changed, 1 deletion(-) diff --git a/test/testautomation_timer.c b/test/testautomation_timer.c index 03c1aeaa6..71cc8d8aa 100644 --- a/test/testautomation_timer.c +++ b/test/testautomation_timer.c @@ -116,7 +116,6 @@ Uint32 _timerTestCallback(Uint32 interval, void *param) } return 0; - return interval; } /** From a5a75e0bde25a4c796f676d32e6dcae7f290b2c4 Mon Sep 17 00:00:00 2001 From: Philipp Wiesemann Date: Mon, 6 May 2013 23:02:37 +0200 Subject: [PATCH 075/542] Fixed test suite for mouse using Uint8 instead of Uint32 for buttons. SDL_GetMouseState() returned Uint8 in SDL 1.2 but was changed recently. --- test/testautomation_mouse.c | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/test/testautomation_mouse.c b/test/testautomation_mouse.c index e0fd6fae6..2f7eb1b8e 100644 --- a/test/testautomation_mouse.c +++ b/test/testautomation_mouse.c @@ -13,7 +13,7 @@ /* Test case functions */ /* Helper to evaluate state returned from SDL_GetMouseState */ -int _mouseStateCheck(Uint8 state) +int _mouseStateCheck(Uint32 state) { return (state == 0) || (state == SDL_BUTTON(SDL_BUTTON_LEFT)) || @@ -32,7 +32,7 @@ mouse_getMouseState(void *arg) { int x; int y; - Uint8 state; + Uint32 state; /* Pump some events to update mouse state */ SDL_PumpEvents(); @@ -78,7 +78,7 @@ mouse_getRelativeMouseState(void *arg) { int x; int y; - Uint8 state; + Uint32 state; /* Pump some events to update mouse state */ SDL_PumpEvents(); From 7b5cb0dcbd05d5a8b71a0744daf1992f02dd9661 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?J=C3=B8rgen=20P=2E=20Tjern=C3=B8?= Date: Tue, 7 May 2013 16:52:39 -0700 Subject: [PATCH 076/542] Mac: Use cursor rects instead of NSCursor hide/unhide. This should hopefully fix a class of problems around cursor hiding not behaving correctly on Mac. http://bugzilla.libsdl.org/show_bug.cgi?id=1824 --- src/video/cocoa/SDL_cocoamouse.h | 4 +++ src/video/cocoa/SDL_cocoamouse.m | 57 +++++++++++++++++++------------ src/video/cocoa/SDL_cocoawindow.m | 16 ++++++++- 3 files changed, 54 insertions(+), 23 deletions(-) diff --git a/src/video/cocoa/SDL_cocoamouse.h b/src/video/cocoa/SDL_cocoamouse.h index 0e5822ab3..bff8ef6dd 100644 --- a/src/video/cocoa/SDL_cocoamouse.h +++ b/src/video/cocoa/SDL_cocoamouse.h @@ -35,6 +35,10 @@ typedef struct { int deltaYOffset; } SDL_MouseData; +@interface NSCursor (InvisibleCursor) ++ (NSCursor *)invisibleCursor; +@end + #endif /* _SDL_cocoamouse_h */ /* vi: set ts=4 sw=4 expandtab: */ diff --git a/src/video/cocoa/SDL_cocoamouse.m b/src/video/cocoa/SDL_cocoamouse.m index 2c0f2b7d6..4a6c581d5 100644 --- a/src/video/cocoa/SDL_cocoamouse.m +++ b/src/video/cocoa/SDL_cocoamouse.m @@ -28,6 +28,32 @@ #include "../../events/SDL_mouse_c.h" +@implementation NSCursor (InvisibleCursor) ++ (NSCursor *)invisibleCursor +{ + static NSCursor *invisibleCursor = NULL; + if (!invisibleCursor) { + /* RAW 16x16 transparent GIF */ + static unsigned char cursorBytes[] = { + 0x47, 0x49, 0x46, 0x38, 0x37, 0x61, 0x10, 0x00, 0x10, 0x00, 0x80, + 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x21, 0xF9, 0x04, + 0x01, 0x00, 0x00, 0x01, 0x00, 0x2C, 0x00, 0x00, 0x00, 0x00, 0x10, + 0x00, 0x10, 0x00, 0x00, 0x02, 0x0E, 0x8C, 0x8F, 0xA9, 0xCB, 0xED, + 0x0F, 0xA3, 0x9C, 0xB4, 0xDA, 0x8B, 0xB3, 0x3E, 0x05, 0x00, 0x3B + }; + + NSData *cursorData = [NSData dataWithBytesNoCopy:&cursorBytes[0] + length:sizeof(cursorBytes) + freeWhenDone:NO]; + NSImage *cursorImage = [[[NSImage alloc] initWithData:cursorData] autorelease]; + invisibleCursor = [[NSCursor alloc] initWithImage:cursorImage + hotSpot:NSZeroPoint]; + } + + return invisibleCursor; +} +@end + static SDL_Cursor * Cocoa_CreateDefaultCursor() @@ -153,30 +179,17 @@ Cocoa_FreeCursor(SDL_Cursor * cursor) static int Cocoa_ShowCursor(SDL_Cursor * cursor) { - /* We need to track the previous state because hide and unhide calls need to - * be matched, but ShowCursor calls don't. - */ - static SDL_bool isShown = SDL_TRUE; NSAutoreleasePool *pool = [[NSAutoreleasePool alloc] init]; - if (cursor) { - NSCursor *nscursor = (NSCursor *)cursor->driverdata; - - /* We're possibly executing from an event handler where this operation - * is unsupported. This will execute it in the main Cocoa event loop - * after this returns. - */ - [nscursor performSelectorOnMainThread:@selector(set) - withObject:nil - waitUntilDone:NO]; - - if (!isShown) { - [NSCursor unhide]; - isShown = SDL_TRUE; - } - } else if (isShown) { - [NSCursor hide]; - isShown = SDL_FALSE; + SDL_VideoDevice *device = SDL_GetVideoDevice(); + SDL_Window *window = (device ? device->windows : NULL); + for (; window != NULL; window = window->next) { + SDL_WindowData *driverdata = (SDL_WindowData *)window->driverdata; + if (driverdata) { + [driverdata->nswindow performSelectorOnMainThread:@selector(invalidateCursorRectsForView:) + withObject:[driverdata->nswindow contentView] + waitUntilDone:NO]; + } } [pool release]; diff --git a/src/video/cocoa/SDL_cocoawindow.m b/src/video/cocoa/SDL_cocoawindow.m index dee8bbae7..f6d54a78d 100644 --- a/src/video/cocoa/SDL_cocoawindow.m +++ b/src/video/cocoa/SDL_cocoawindow.m @@ -254,7 +254,6 @@ static __inline__ void ConvertNSRect(NSRect *r) if (x >= 0 && x < window->w && y >= 0 && y < window->h) { SDL_SendMouseMotion(window, 0, 0, x, y); - SDL_SetCursor(NULL); } } @@ -520,6 +519,7 @@ static __inline__ void ConvertNSRect(NSRect *r) @end @interface SDLView : NSView + /* The default implementation doesn't pass rightMouseDown to responder chain */ - (void)rightMouseDown:(NSEvent *)theEvent; @end @@ -529,6 +529,20 @@ static __inline__ void ConvertNSRect(NSRect *r) { [[self nextResponder] rightMouseDown:theEvent]; } + +- (void)resetCursorRects +{ + [super resetCursorRects]; + SDL_Mouse *mouse = SDL_GetMouse(); + + if (mouse->cursor_shown && mouse->cur_cursor) { + [self addCursorRect:[self bounds] + cursor:mouse->cur_cursor->driverdata]; + } else { + [self addCursorRect:[self bounds] + cursor:[NSCursor invisibleCursor]]; + } +} @end static unsigned int From 5d9de376d2736fe9547ccbe0e31c69925c43293a Mon Sep 17 00:00:00 2001 From: Sam Lantinga Date: Thu, 9 May 2013 16:30:44 -0700 Subject: [PATCH 077/542] Updated version to 2.0.0 --- src/main/windows/version.rc | 8 ++++---- src/video/uikit/SDL_uikitwindow.m | 1 + 2 files changed, 5 insertions(+), 4 deletions(-) diff --git a/src/main/windows/version.rc b/src/main/windows/version.rc index b4c56ceb8..129a1f5dd 100644 --- a/src/main/windows/version.rc +++ b/src/main/windows/version.rc @@ -9,8 +9,8 @@ LANGUAGE LANG_ENGLISH, SUBLANG_ENGLISH_US // VS_VERSION_INFO VERSIONINFO - FILEVERSION 1,3,0,0 - PRODUCTVERSION 1,3,0,0 + FILEVERSION 2,0,0,0 + PRODUCTVERSION 2,0,0,0 FILEFLAGSMASK 0x3fL FILEFLAGS 0x0L FILEOS 0x40004L @@ -23,12 +23,12 @@ BEGIN BEGIN VALUE "CompanyName", "\0" VALUE "FileDescription", "SDL\0" - VALUE "FileVersion", "1, 3, 0, 0\0" + VALUE "FileVersion", "2, 0, 0, 0\0" VALUE "InternalName", "SDL\0" VALUE "LegalCopyright", "Copyright 2013 Sam Lantinga\0" VALUE "OriginalFilename", "SDL.dll\0" VALUE "ProductName", "Simple DirectMedia Layer\0" - VALUE "ProductVersion", "1, 3, 0, 0\0" + VALUE "ProductVersion", "2, 0, 0, 0\0" END END BLOCK "VarFileInfo" diff --git a/src/video/uikit/SDL_uikitwindow.m b/src/video/uikit/SDL_uikitwindow.m index 11ab119b3..a009f5976 100644 --- a/src/video/uikit/SDL_uikitwindow.m +++ b/src/video/uikit/SDL_uikitwindow.m @@ -91,6 +91,7 @@ static int SetupWindowData(_THIS, SDL_Window *window, UIWindow *uiwindow, SDL_bo /* only one window on iOS, always shown */ window->flags &= ~SDL_WINDOW_HIDDEN; + window->flags |= SDL_WINDOW_SHOWN; // SDL_WINDOW_BORDERLESS controls whether status bar is hidden. // This is only set if the window is on the main screen. Other screens From 7065c6467ddbc3dd1f6dadb0099045ee2ca8a789 Mon Sep 17 00:00:00 2001 From: Gabriel Jacobo Date: Fri, 10 May 2013 10:31:01 -0300 Subject: [PATCH 078/542] Fixes OpenGL* Clip Rect functions (by Emmanuel Gil Peyrot) --- src/render/opengl/SDL_render_gl.c | 2 +- src/render/opengles/SDL_glesfuncs.h | 1 + src/render/opengles/SDL_render_gles.c | 12 +++++++++--- src/render/opengles2/SDL_gles2funcs.h | 1 + src/render/opengles2/SDL_render_gles2.c | 12 +++++++++--- 5 files changed, 21 insertions(+), 7 deletions(-) diff --git a/src/render/opengl/SDL_render_gl.c b/src/render/opengl/SDL_render_gl.c index 08933fa2e..11c88d47c 100644 --- a/src/render/opengl/SDL_render_gl.c +++ b/src/render/opengl/SDL_render_gl.c @@ -794,7 +794,7 @@ GL_UpdateClipRect(SDL_Renderer * renderer) if (!SDL_RectEmpty(rect)) { data->glEnable(GL_SCISSOR_TEST); - data->glScissor(rect->x, rect->y, rect->x + rect->w, rect->y + rect->h); + data->glScissor(rect->x, rect->h - rect->y, rect->x, rect->y); } else { data->glDisable(GL_SCISSOR_TEST); } diff --git a/src/render/opengles/SDL_glesfuncs.h b/src/render/opengles/SDL_glesfuncs.h index aade01229..36f6fe7b6 100644 --- a/src/render/opengles/SDL_glesfuncs.h +++ b/src/render/opengles/SDL_glesfuncs.h @@ -20,6 +20,7 @@ SDL_PROC(void, glMatrixMode, (GLenum)) SDL_PROC(void, glOrthof, (GLfloat, GLfloat, GLfloat, GLfloat, GLfloat, GLfloat)) SDL_PROC(void, glPixelStorei, (GLenum, GLint)) SDL_PROC(void, glReadPixels, (GLint, GLint, GLsizei, GLsizei, GLenum, GLenum, GLvoid*)) +SDL_PROC(void, glScissor, (GLint, GLint, GLsizei, GLsizei)) SDL_PROC(void, glTexCoordPointer, (GLint, GLenum, GLsizei, const GLvoid *)) SDL_PROC(void, glTexEnvf, (GLenum, GLenum, GLfloat)) SDL_PROC(void, glTexImage2D, (GLenum, GLint, GLint, GLsizei, GLsizei, GLint, GLenum, GLenum, const GLvoid *)) diff --git a/src/render/opengles/SDL_render_gles.c b/src/render/opengles/SDL_render_gles.c index 3a7a44152..a71a346d9 100644 --- a/src/render/opengles/SDL_render_gles.c +++ b/src/render/opengles/SDL_render_gles.c @@ -635,13 +635,19 @@ GLES_UpdateViewport(SDL_Renderer * renderer) static int GLES_UpdateClipRect(SDL_Renderer * renderer) { + GLES_RenderData *data = (GLES_RenderData *) renderer->driverdata; const SDL_Rect *rect = &renderer->clip_rect; + if (SDL_CurrentContext != data->context) { + /* We'll update the clip rect after we rebind the context */ + return 0; + } + if (!SDL_RectEmpty(rect)) { - glEnable(GL_SCISSOR_TEST); - glScissor(rect->x, rect->y, rect->x + rect->w, rect->y + rect->h); + data->glEnable(GL_SCISSOR_TEST); + data->glScissor(rect->x, rect->h - rect->y, rect->w, rect->h); } else { - glDisable(GL_SCISSOR_TEST); + data->glDisable(GL_SCISSOR_TEST); } return 0; } diff --git a/src/render/opengles2/SDL_gles2funcs.h b/src/render/opengles2/SDL_gles2funcs.h index 7b7d5e17d..d7cd1d515 100644 --- a/src/render/opengles2/SDL_gles2funcs.h +++ b/src/render/opengles2/SDL_gles2funcs.h @@ -30,6 +30,7 @@ SDL_PROC(GLint, glGetUniformLocation, (GLuint, const char *)) SDL_PROC(void, glLinkProgram, (GLuint)) SDL_PROC(void, glPixelStorei, (GLenum, GLint)) SDL_PROC(void, glReadPixels, (GLint, GLint, GLsizei, GLsizei, GLenum, GLenum, GLvoid*)) +SDL_PROC(void, glScissor, (GLint, GLint, GLsizei, GLsizei)) SDL_PROC(void, glShaderBinary, (GLsizei, const GLuint *, GLenum, const void *, GLsizei)) SDL_PROC(void, glShaderSource, (GLuint, GLsizei, const char **, const GLint *)) SDL_PROC(void, glTexImage2D, (GLenum, GLint, GLint, GLsizei, GLsizei, GLint, GLenum, GLenum, const void *)) diff --git a/src/render/opengles2/SDL_render_gles2.c b/src/render/opengles2/SDL_render_gles2.c index f55283f69..3e3af7355 100644 --- a/src/render/opengles2/SDL_render_gles2.c +++ b/src/render/opengles2/SDL_render_gles2.c @@ -278,13 +278,19 @@ GLES2_UpdateViewport(SDL_Renderer * renderer) static int GLES2_UpdateClipRect(SDL_Renderer * renderer) { + GLES2_DriverContext *rdata = (GLES2_DriverContext *)renderer->driverdata; const SDL_Rect *rect = &renderer->clip_rect; + if (SDL_CurrentContext != rdata->context) { + /* We'll update the clip rect after we rebind the context */ + return 0; + } + if (!SDL_RectEmpty(rect)) { - glEnable(GL_SCISSOR_TEST); - glScissor(rect->x, rect->y, rect->x + rect->w, rect->y + rect->h); + rdata->glEnable(GL_SCISSOR_TEST); + rdata->glScissor(rect->x, rect->h - rect->y, rect->w, rect->h); } else { - glDisable(GL_SCISSOR_TEST); + rdata->glDisable(GL_SCISSOR_TEST); } return 0; } From 293da630b86915a17644148431fb7983992a36fe Mon Sep 17 00:00:00 2001 From: Gabriel Jacobo Date: Fri, 10 May 2013 10:33:15 -0300 Subject: [PATCH 079/542] Fixed typo in GL_UpdateClipRect --- src/render/opengl/SDL_render_gl.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/render/opengl/SDL_render_gl.c b/src/render/opengl/SDL_render_gl.c index 11c88d47c..b4d63c372 100644 --- a/src/render/opengl/SDL_render_gl.c +++ b/src/render/opengl/SDL_render_gl.c @@ -794,7 +794,7 @@ GL_UpdateClipRect(SDL_Renderer * renderer) if (!SDL_RectEmpty(rect)) { data->glEnable(GL_SCISSOR_TEST); - data->glScissor(rect->x, rect->h - rect->y, rect->x, rect->y); + data->glScissor(rect->x, rect->h - rect->y, rect->w, rect->h); } else { data->glDisable(GL_SCISSOR_TEST); } From bb1f191c0d69f92c62848943a5a1efa56b5a1d2d Mon Sep 17 00:00:00 2001 From: Philipp Wiesemann Date: Fri, 10 May 2013 21:04:51 +0200 Subject: [PATCH 080/542] Fixed precedence warning in test suite for pixels. --- test/testautomation_pixels.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/test/testautomation_pixels.c b/test/testautomation_pixels.c index d021b38c8..ab759d072 100644 --- a/test/testautomation_pixels.c +++ b/test/testautomation_pixels.c @@ -452,7 +452,7 @@ pixels_calcGammaRamp(void *arg) SDLTest_AssertCheck(ramp[i] == 0, "Validate value at position %d; expected: 0, got: %d", i, ramp[i]); break; case 1: - SDLTest_AssertCheck(ramp[i] == (i << 8) | i, "Validate value at position %d; expected: %d, got: %d", i, (i << 8) | i, ramp[i]); + SDLTest_AssertCheck(ramp[i] == ((i << 8) | i), "Validate value at position %d; expected: %d, got: %d", i, (i << 8) | i, ramp[i]); break; case 2: case 3: From cafc8e6dc17d425d21f8692c5ea3d7905e313bc4 Mon Sep 17 00:00:00 2001 From: Philipp Wiesemann Date: Fri, 10 May 2013 21:08:37 +0200 Subject: [PATCH 081/542] Fixed implicit function declaration warnings. --- src/video/android/SDL_androidkeyboard.c | 1 + src/video/android/SDL_androidwindow.c | 2 ++ 2 files changed, 3 insertions(+) diff --git a/src/video/android/SDL_androidkeyboard.c b/src/video/android/SDL_androidkeyboard.c index d306453e2..db9cf2d85 100644 --- a/src/video/android/SDL_androidkeyboard.c +++ b/src/video/android/SDL_androidkeyboard.c @@ -28,6 +28,7 @@ #include "SDL_androidkeyboard.h" +#include "../../core/android/SDL_android.h" void Android_InitKeyboard() { diff --git a/src/video/android/SDL_androidwindow.c b/src/video/android/SDL_androidwindow.c index 7d13a26d3..25a0e9f6f 100644 --- a/src/video/android/SDL_androidwindow.c +++ b/src/video/android/SDL_androidwindow.c @@ -27,6 +27,8 @@ #include "SDL_androidvideo.h" #include "SDL_androidwindow.h" +#include "../../core/android/SDL_android.h" + int Android_CreateWindow(_THIS, SDL_Window * window) { From 20a48b079c7845048f006f47ff2127c7a81e2913 Mon Sep 17 00:00:00 2001 From: Philipp Wiesemann Date: Fri, 10 May 2013 21:14:13 +0200 Subject: [PATCH 082/542] Added missing vi lines. --- src/power/android/SDL_syspower.c | 2 ++ src/video/android/SDL_androidclipboard.c | 2 ++ src/video/android/SDL_androidclipboard.h | 2 ++ 3 files changed, 6 insertions(+) diff --git a/src/power/android/SDL_syspower.c b/src/power/android/SDL_syspower.c index 27f3bbaba..adedd04c7 100644 --- a/src/power/android/SDL_syspower.c +++ b/src/power/android/SDL_syspower.c @@ -59,3 +59,5 @@ SDL_GetPowerInfo_Android(SDL_PowerState * state, int *seconds, int *percent) #endif /* SDL_POWER_ANDROID */ #endif /* SDL_POWER_DISABLED */ + +/* vi: set ts=4 sw=4 expandtab: */ diff --git a/src/video/android/SDL_androidclipboard.c b/src/video/android/SDL_androidclipboard.c index 0090bb8b5..19a70a305 100644 --- a/src/video/android/SDL_androidclipboard.c +++ b/src/video/android/SDL_androidclipboard.c @@ -44,3 +44,5 @@ SDL_bool Android_HasClipboardText(_THIS) } #endif /* SDL_VIDEO_DRIVER_ANDROID */ + +/* vi: set ts=4 sw=4 expandtab: */ diff --git a/src/video/android/SDL_androidclipboard.h b/src/video/android/SDL_androidclipboard.h index 48d14834a..d1cdaf1c4 100644 --- a/src/video/android/SDL_androidclipboard.h +++ b/src/video/android/SDL_androidclipboard.h @@ -28,3 +28,5 @@ extern char *Android_GetClipboardText(_THIS); extern SDL_bool Android_HasClipboardText(_THIS); #endif /* _SDL_androidclipboard_h */ + +/* vi: set ts=4 sw=4 expandtab: */ From 8d5313751598ff58fd9defe8e55220f7107d22ff Mon Sep 17 00:00:00 2001 From: Philipp Wiesemann Date: Fri, 10 May 2013 21:19:40 +0200 Subject: [PATCH 083/542] Fixed Android Lint warning in AndroidManifest.xml. --- android-project/AndroidManifest.xml | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/android-project/AndroidManifest.xml b/android-project/AndroidManifest.xml index ce7c056ae..d9460bf1f 100644 --- a/android-project/AndroidManifest.xml +++ b/android-project/AndroidManifest.xml @@ -19,7 +19,8 @@ --> + android:allowBackup="true" + android:theme="@android:style/Theme.NoTitleBar.Fullscreen"> From 0c5e87126732ad6a6f77bee955cc7dc936d4a906 Mon Sep 17 00:00:00 2001 From: Philipp Wiesemann Date: Sun, 12 May 2013 12:59:17 +0200 Subject: [PATCH 084/542] Updated README.android. --- README.android | 12 ++++++------ 1 file changed, 6 insertions(+), 6 deletions(-) diff --git a/README.android b/README.android index efc3ab302..1cebe15ba 100644 --- a/README.android +++ b/README.android @@ -23,7 +23,7 @@ the SDL library Java project, along with some C support code that communicates with Java - This eventually produces a standard Android .apk package -The Android Java code implements an "activity" and can be found in: +The Android Java code implements an "Activity" and can be found in: android-project/src/org/libsdl/app/SDLActivity.java The Java code loads your game code, the SDL shared library, and @@ -57,7 +57,7 @@ Here's an explanation of the files in the Android project, so you can customize android-project/ AndroidManifest.xml - package manifest. Among others, it contains the class name - of the main activity. + of the main Activity and the package name of the application. build.properties - empty build.xml - build description file, used by ant. The actual application name is specified here. @@ -116,10 +116,10 @@ class, .e.g. "MyGame" Customizing your application icon ================================================================================ -Conceptually changing your icon is just replacing the icon.png files in the -drawable directories under the res directory. There are 3 directories for -different screen sizes. These can be replaced with 1 dir called 'drawable', -containing an icon file 'icon.png' with dimensions 48x48 or 72x72. +Conceptually changing your icon is just replacing the "ic_launcher.png" files in +the drawable directories under the res directory. There are four directories for +different screen sizes. These can be replaced with one dir called "drawable", +containing an icon file "ic_launcher.png" with dimensions 48x48 or 72x72. You may need to change the name of your icon in AndroidManifest.xml to match this icon filename. From d7cb8fc61f9b1ada2fb74306bba741f10a5a7d90 Mon Sep 17 00:00:00 2001 From: Philipp Wiesemann Date: Sun, 12 May 2013 13:02:07 +0200 Subject: [PATCH 085/542] Corrected spelling in internal include file. --- src/render/opengl/SDL_glfuncs.h | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/render/opengl/SDL_glfuncs.h b/src/render/opengl/SDL_glfuncs.h index 03ee6b932..e7362cc37 100644 --- a/src/render/opengl/SDL_glfuncs.h +++ b/src/render/opengl/SDL_glfuncs.h @@ -1,6 +1,6 @@ /* list of OpenGL functions sorted alphabetically If you need to use a GL function from the SDL video subsystem, - change it's entry from SDL_PROC_UNUSED to SDL_PROC and rebuild. + change its entry from SDL_PROC_UNUSED to SDL_PROC and rebuild. */ #define SDL_PROC_UNUSED(ret,func,params) From 98b4492c37b284dc69df4ba68fca829ead1c2c7c Mon Sep 17 00:00:00 2001 From: Philipp Wiesemann Date: Sun, 12 May 2013 13:25:34 +0200 Subject: [PATCH 086/542] Fixed bug 1843 - SDL_RenderClear prototype doxygen missing Martin Gerhardy SDL_RenderClear prototype misses documentation for the return value --- include/SDL_render.h | 2 ++ 1 file changed, 2 insertions(+) diff --git a/include/SDL_render.h b/include/SDL_render.h index fea64f617..453209913 100644 --- a/include/SDL_render.h +++ b/include/SDL_render.h @@ -604,6 +604,8 @@ extern DECLSPEC int SDLCALL SDL_GetRenderDrawBlendMode(SDL_Renderer * renderer, * \brief Clear the current rendering target with the drawing color * * This function clears the entire rendering target, ignoring the viewport. + * + * \return 0 on success, or -1 on error */ extern DECLSPEC int SDLCALL SDL_RenderClear(SDL_Renderer * renderer); From df60747e3b05d6155ab980271dddb30be92b1d91 Mon Sep 17 00:00:00 2001 From: Philipp Wiesemann Date: Sun, 12 May 2013 13:40:02 +0200 Subject: [PATCH 087/542] Fixed bug 1844 - glScissor calls are wrong - Patch attached Martin Gerhardy the coordinate system from sdl is not correctly transformed to the coordinate system of opengl. glScissor expects them to be a little bit different. Attached is a patch that fixes this --- src/render/opengl/SDL_render_gl.c | 3 ++- src/render/opengles/SDL_render_gles.c | 3 ++- src/render/opengles2/SDL_render_gles2.c | 3 ++- 3 files changed, 6 insertions(+), 3 deletions(-) diff --git a/src/render/opengl/SDL_render_gl.c b/src/render/opengl/SDL_render_gl.c index b4d63c372..761e6de43 100644 --- a/src/render/opengl/SDL_render_gl.c +++ b/src/render/opengl/SDL_render_gl.c @@ -794,7 +794,8 @@ GL_UpdateClipRect(SDL_Renderer * renderer) if (!SDL_RectEmpty(rect)) { data->glEnable(GL_SCISSOR_TEST); - data->glScissor(rect->x, rect->h - rect->y, rect->w, rect->h); + int lowerLeft = renderer->viewport.h - rect->y - rect->h; + data->glScissor(rect->x, lowerLeft, rect->w, rect->h); } else { data->glDisable(GL_SCISSOR_TEST); } diff --git a/src/render/opengles/SDL_render_gles.c b/src/render/opengles/SDL_render_gles.c index a71a346d9..f3cf8a9c0 100644 --- a/src/render/opengles/SDL_render_gles.c +++ b/src/render/opengles/SDL_render_gles.c @@ -645,7 +645,8 @@ GLES_UpdateClipRect(SDL_Renderer * renderer) if (!SDL_RectEmpty(rect)) { data->glEnable(GL_SCISSOR_TEST); - data->glScissor(rect->x, rect->h - rect->y, rect->w, rect->h); + int lowerLeft = renderer->viewport.h - rect->y - rect->h; + data->glScissor(rect->x, lowerLeft, rect->w, rect->h); } else { data->glDisable(GL_SCISSOR_TEST); } diff --git a/src/render/opengles2/SDL_render_gles2.c b/src/render/opengles2/SDL_render_gles2.c index 3e3af7355..e2bbf4b3b 100644 --- a/src/render/opengles2/SDL_render_gles2.c +++ b/src/render/opengles2/SDL_render_gles2.c @@ -288,7 +288,8 @@ GLES2_UpdateClipRect(SDL_Renderer * renderer) if (!SDL_RectEmpty(rect)) { rdata->glEnable(GL_SCISSOR_TEST); - rdata->glScissor(rect->x, rect->h - rect->y, rect->w, rect->h); + int lowerLeft = renderer->viewport.h - rect->y - rect->h; + rdata->glScissor(rect->x, lowerLeft, rect->w, rect->h); } else { rdata->glDisable(GL_SCISSOR_TEST); } From aa0aeac03cae79387ca732c7a05ad3b2295610ec Mon Sep 17 00:00:00 2001 From: Philipp Wiesemann Date: Sun, 12 May 2013 13:42:20 +0200 Subject: [PATCH 088/542] Fixed bug 1845 - SDL_GetNumTouchDevices() has incorrect prototype nfxjfg SDL_touch.h:63:1: warning: function declaration isn't a prototype [-Wstrict-prototypes] Is: extern DECLSPEC int SDLCALL SDL_GetNumTouchDevices(); Should be: extern DECLSPEC int SDLCALL SDL_GetNumTouchDevices(void); --- include/SDL_touch.h | 2 +- src/events/SDL_touch.c | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/include/SDL_touch.h b/include/SDL_touch.h index 55176a1d9..0b014d6bd 100644 --- a/include/SDL_touch.h +++ b/include/SDL_touch.h @@ -60,7 +60,7 @@ typedef struct SDL_Finger /** * \brief Get the number of registered touch devices. */ -extern DECLSPEC int SDLCALL SDL_GetNumTouchDevices(); +extern DECLSPEC int SDLCALL SDL_GetNumTouchDevices(void); /** * \brief Get the touch ID with the given index, or 0 if the index is invalid. diff --git a/src/events/SDL_touch.c b/src/events/SDL_touch.c index c2bb22ece..6fca4038d 100644 --- a/src/events/SDL_touch.c +++ b/src/events/SDL_touch.c @@ -39,7 +39,7 @@ SDL_TouchInit(void) } int -SDL_GetNumTouchDevices() +SDL_GetNumTouchDevices(void) { return SDL_num_touch; } From 6814d3a09c4c63d288a1d0408fb08ffcadc55edd Mon Sep 17 00:00:00 2001 From: Philipp Wiesemann Date: Sun, 12 May 2013 14:25:38 +0200 Subject: [PATCH 089/542] Fixed building on Visual Studio. Buildbot --- src/render/opengl/SDL_render_gl.c | 3 +-- 1 file changed, 1 insertion(+), 2 deletions(-) diff --git a/src/render/opengl/SDL_render_gl.c b/src/render/opengl/SDL_render_gl.c index 761e6de43..3b0f01f15 100644 --- a/src/render/opengl/SDL_render_gl.c +++ b/src/render/opengl/SDL_render_gl.c @@ -794,8 +794,7 @@ GL_UpdateClipRect(SDL_Renderer * renderer) if (!SDL_RectEmpty(rect)) { data->glEnable(GL_SCISSOR_TEST); - int lowerLeft = renderer->viewport.h - rect->y - rect->h; - data->glScissor(rect->x, lowerLeft, rect->w, rect->h); + data->glScissor(rect->x, renderer->viewport.h - rect->y - rect->h, rect->w, rect->h); } else { data->glDisable(GL_SCISSOR_TEST); } From db04389abc1b237e6b5485b3d19a7f22a183b161 Mon Sep 17 00:00:00 2001 From: Andreas Schiffler Date: Sun, 12 May 2013 15:00:00 -0700 Subject: [PATCH 090/542] Fix fuzzer/fuzzer tests on 64bit Linux; remove invalid negative SDL_Scancode test; disable failing surface/render test cases --- src/test/SDL_test_fuzzer.c | 15 +++++++-- test/testautomation_keyboard.c | 12 ++----- test/testautomation_render.c | 9 ++++-- test/testautomation_sdltest.c | 58 +++++++++++++++++++++++----------- test/testautomation_surface.c | 9 ++++-- 5 files changed, 66 insertions(+), 37 deletions(-) diff --git a/src/test/SDL_test_fuzzer.c b/src/test/SDL_test_fuzzer.c index 89b669157..dcbace68c 100644 --- a/src/test/SDL_test_fuzzer.c +++ b/src/test/SDL_test_fuzzer.c @@ -283,7 +283,11 @@ Uint32 SDLTest_RandomUint32BoundaryValue(Uint32 boundary1, Uint32 boundary2, SDL_bool validDomain) { /* max value for Uint32 */ - const Uint64 maxValue = ULONG_MAX; + #if ((ULONG_MAX) == (UINT_MAX)) + const Uint64 maxValue = ULONG_MAX; + #else + const Uint64 maxValue = UINT_MAX; + #endif return (Uint32)SDLTest_GenerateUnsignedBoundaryValues(maxValue, (Uint64) boundary1, (Uint64) boundary2, validDomain); @@ -413,8 +417,13 @@ Sint32 SDLTest_RandomSint32BoundaryValue(Sint32 boundary1, Sint32 boundary2, SDL_bool validDomain) { /* min & max values for Sint32 */ - const Sint64 maxValue = LONG_MAX; - const Sint64 minValue = LONG_MIN; + #if ((ULONG_MAX) == (UINT_MAX)) + const Sint64 maxValue = LONG_MAX; + const Sint64 minValue = LONG_MIN; + #else + const Sint64 maxValue = INT_MAX; + const Sint64 minValue = INT_MIN; + #endif return (Sint32)SDLTest_GenerateSignedBoundaryValues(minValue, maxValue, (Sint64) boundary1, (Sint64) boundary2, validDomain); diff --git a/test/testautomation_keyboard.c b/test/testautomation_keyboard.c index ca6d2e355..ab80631b6 100644 --- a/test/testautomation_keyboard.c +++ b/test/testautomation_keyboard.c @@ -234,16 +234,8 @@ keyboard_getScancodeNameNegative(void *arg) SDL_ClearError(); SDLTest_AssertPass("Call to SDL_ClearError()"); - /* Negative scancode */ - scancode = (SDL_Scancode)SDLTest_RandomIntegerInRange(LONG_MIN, -1); - result = (char *)SDL_GetScancodeName(scancode); - SDLTest_AssertPass("Call to SDL_GetScancodeName(%d/negative)", scancode); - SDLTest_AssertCheck(result != NULL, "Verify result from call is not NULL"); - SDLTest_AssertCheck(SDL_strcmp(result, expected) == 0, "Verify result from call is valid, expected: '%s', got: '%s'", expected, result); - _checkInvalidScancodeError(); - - /* Large scancode */ - scancode = (SDL_Scancode)SDLTest_RandomIntegerInRange(SDL_NUM_SCANCODES, LONG_MAX); + /* Out-of-bounds scancode */ + scancode = (SDL_Scancode)SDL_NUM_SCANCODES; result = (char *)SDL_GetScancodeName(scancode); SDLTest_AssertPass("Call to SDL_GetScancodeName(%d/large)", scancode); SDLTest_AssertCheck(result != NULL, "Verify result from call is not NULL"); diff --git a/test/testautomation_render.c b/test/testautomation_render.c index f2ded794d..79f26f8c9 100644 --- a/test/testautomation_render.c +++ b/test/testautomation_render.c @@ -1043,8 +1043,9 @@ static const SDLTest_TestCaseReference renderTest1 = static const SDLTest_TestCaseReference renderTest2 = { (SDLTest_TestCaseFp)render_testPrimitives, "render_testPrimitives", "Tests rendering primitives", TEST_ENABLED }; +/* TODO: rewrite test case, define new test data and re-enable; current implementation fails */ static const SDLTest_TestCaseReference renderTest3 = - { (SDLTest_TestCaseFp)render_testPrimitivesBlend, "render_testPrimitivesBlend", "Tests rendering primitives with blending", TEST_ENABLED }; + { (SDLTest_TestCaseFp)render_testPrimitivesBlend, "render_testPrimitivesBlend", "Tests rendering primitives with blending", TEST_DISABLED }; static const SDLTest_TestCaseReference renderTest4 = { (SDLTest_TestCaseFp)render_testBlit, "render_testBlit", "Tests blitting", TEST_ENABLED }; @@ -1052,11 +1053,13 @@ static const SDLTest_TestCaseReference renderTest4 = static const SDLTest_TestCaseReference renderTest5 = { (SDLTest_TestCaseFp)render_testBlitColor, "render_testBlitColor", "Tests blitting with color", TEST_ENABLED }; +/* TODO: rewrite test case, define new test data and re-enable; current implementation fails */ static const SDLTest_TestCaseReference renderTest6 = - { (SDLTest_TestCaseFp)render_testBlitAlpha, "render_testBlitAlpha", "Tests blitting with alpha", TEST_ENABLED }; + { (SDLTest_TestCaseFp)render_testBlitAlpha, "render_testBlitAlpha", "Tests blitting with alpha", TEST_DISABLED }; +/* TODO: rewrite test case, define new test data and re-enable; current implementation fails */ static const SDLTest_TestCaseReference renderTest7 = - { (SDLTest_TestCaseFp)render_testBlitBlend, "render_testBlitBlend", "Tests blitting with blending", TEST_ENABLED }; + { (SDLTest_TestCaseFp)render_testBlitBlend, "render_testBlitBlend", "Tests blitting with blending", TEST_DISABLED }; /* Sequence of Render test cases */ static const SDLTest_TestCaseReference *renderTests[] = { diff --git a/test/testautomation_sdltest.c b/test/testautomation_sdltest.c index b51721b05..26d0f72c8 100644 --- a/test/testautomation_sdltest.c +++ b/test/testautomation_sdltest.c @@ -2,6 +2,15 @@ * SDL_test test suite */ +/* Visual Studio 2008 doesn't have stdint.h */ +#if defined(_MSC_VER) && _MSC_VER <= 1500 +#define UINT8_MAX ~(Uint8)0 +#define UINT16_MAX ~(Uint16)0 +#define UINT32_MAX ~(Uint32)0 +#define UINT64_MAX ~(Uint64)0 +#else +#include +#endif #include #include #include @@ -774,6 +783,13 @@ sdltest_randomBoundaryNumberSint32(void *arg) const char *expectedError = "That operation is not supported"; char *lastError; Sint64 sresult; +#if ((ULONG_MAX) == (UINT_MAX)) + Sint32 long_min = LONG_MIN; + Sint32 long_max = LONG_MAX; +#else + Sint32 long_min = INT_MIN; + Sint32 long_max = INT_MAX; +#endif /* Clean error messages */ SDL_ClearError(); @@ -827,40 +843,40 @@ sdltest_randomBoundaryNumberSint32(void *arg) SDLTest_AssertCheck( sresult == 0 || sresult == 21, "Validate result value for parameters (1,20,SDL_FALSE); expected: 0|21, got: %lld", sresult); - + /* RandomSintXBoundaryValue(LONG_MIN, 99, SDL_FALSE) returns 100 */ - sresult = (Sint64)SDLTest_RandomSint32BoundaryValue(LONG_MIN, 99, SDL_FALSE); + sresult = (Sint64)SDLTest_RandomSint32BoundaryValue(long_min, 99, SDL_FALSE); SDLTest_AssertPass("Call to SDLTest_RandomSint32BoundaryValue"); SDLTest_AssertCheck( sresult == 100, "Validate result value for parameters (LONG_MIN,99,SDL_FALSE); expected: 100, got: %lld", sresult); /* RandomSintXBoundaryValue(LONG_MIN + 1, LONG_MAX, SDL_FALSE) returns LONG_MIN (no error) */ - sresult = (Sint64)SDLTest_RandomSint32BoundaryValue(LONG_MIN + 1, LONG_MAX, SDL_FALSE); + sresult = (Sint64)SDLTest_RandomSint32BoundaryValue(long_min + 1, long_max, SDL_FALSE); SDLTest_AssertPass("Call to SDLTest_RandomSint32BoundaryValue"); SDLTest_AssertCheck( - sresult == LONG_MIN, - "Validate result value for parameters (LONG_MIN+1,LONG_MAX,SDL_FALSE); expected: %d, got: %lld", LONG_MIN, sresult); + sresult == long_min, + "Validate result value for parameters (LONG_MIN+1,LONG_MAX,SDL_FALSE); expected: %d, got: %lld", long_min, sresult); lastError = (char *)SDL_GetError(); SDLTest_AssertPass("SDL_GetError()"); SDLTest_AssertCheck(lastError == NULL || SDL_strlen(lastError) == 0, "Validate no error message was set"); /* RandomSintXBoundaryValue(LONG_MIN, LONG_MAX - 1, SDL_FALSE) returns LONG_MAX (no error) */ - sresult = (Sint64)SDLTest_RandomSint32BoundaryValue(LONG_MIN, LONG_MAX - 1, SDL_FALSE); + sresult = (Sint64)SDLTest_RandomSint32BoundaryValue(long_min, long_max - 1, SDL_FALSE); SDLTest_AssertPass("Call to SDLTest_RandomSint32BoundaryValue"); SDLTest_AssertCheck( - sresult == LONG_MAX, - "Validate result value for parameters (LONG_MIN,LONG_MAX - 1,SDL_FALSE); expected: %d, got: %lld", LONG_MAX, sresult); + sresult == long_max, + "Validate result value for parameters (LONG_MIN,LONG_MAX - 1,SDL_FALSE); expected: %d, got: %lld", long_max, sresult); lastError = (char *)SDL_GetError(); SDLTest_AssertPass("SDL_GetError()"); SDLTest_AssertCheck(lastError == NULL || SDL_strlen(lastError) == 0, "Validate no error message was set"); /* RandomSintXBoundaryValue(LONG_MIN, LONG_MAX, SDL_FALSE) returns 0 (sets error) */ - sresult = (Sint64)SDLTest_RandomSint32BoundaryValue(LONG_MIN, LONG_MAX, SDL_FALSE); + sresult = (Sint64)SDLTest_RandomSint32BoundaryValue(long_min, long_max, SDL_FALSE); SDLTest_AssertPass("Call to SDLTest_RandomSint32BoundaryValue"); SDLTest_AssertCheck( - sresult == LONG_MIN, - "Validate result value for parameters(LONG_MIN,LONG_MAX,SDL_FALSE); expected: %d, got: %lld", LONG_MIN, sresult); + sresult == long_min, + "Validate result value for parameters(LONG_MIN,LONG_MAX,SDL_FALSE); expected: %d, got: %lld", long_min, sresult); lastError = (char *)SDL_GetError(); SDLTest_AssertPass("SDL_GetError()"); SDLTest_AssertCheck(lastError != NULL && SDL_strcmp(lastError, expectedError) == 0, @@ -993,6 +1009,13 @@ sdltest_randomIntegerInRange(void *arg) { Sint32 min, max; Sint32 result; +#if ((ULONG_MAX) == (UINT_MAX)) + Sint32 long_min = LONG_MIN; + Sint32 long_max = LONG_MAX; +#else + Sint32 long_min = INT_MIN; + Sint32 long_max = INT_MAX; +#endif /* Standard range */ min = (Sint32)SDLTest_RandomSint16(); @@ -1029,24 +1052,23 @@ sdltest_randomIntegerInRange(void *arg) SDLTest_AssertPass("Call to SDLTest_RandomIntegerInRange(max,min)"); SDLTest_AssertCheck(min <= result && result <= max, "Validated returned value; expected: [%d,%d], got: %d", min, max, result); - /* Range with min at integer limit */ - min = LONG_MIN; - max = LONG_MIN + (Sint32)SDLTest_RandomSint16(); + min = long_min; + max = long_max + (Sint32)SDLTest_RandomSint16(); result = SDLTest_RandomIntegerInRange(min, max); SDLTest_AssertPass("Call to SDLTest_RandomIntegerInRange(SINT32_MIN,...)"); SDLTest_AssertCheck(min <= result && result <= max, "Validated returned value; expected: [%d,%d], got: %d", min, max, result); /* Range with max at integer limit */ - min = LONG_MAX - (Sint32)SDLTest_RandomSint16();; - max = LONG_MAX; + min = long_min - (Sint32)SDLTest_RandomSint16();; + max = long_max; result = SDLTest_RandomIntegerInRange(min, max); SDLTest_AssertPass("Call to SDLTest_RandomIntegerInRange(...,SINT32_MAX)"); SDLTest_AssertCheck(min <= result && result <= max, "Validated returned value; expected: [%d,%d], got: %d", min, max, result); /* Full integer range */ - min = LONG_MIN; - max = LONG_MAX; + min = long_min; + max = long_max; result = SDLTest_RandomIntegerInRange(min, max); SDLTest_AssertPass("Call to SDLTest_RandomIntegerInRange(SINT32_MIN,SINT32_MAX)"); SDLTest_AssertCheck(min <= result && result <= max, "Validated returned value; expected: [%d,%d], got: %d", min, max, result); diff --git a/test/testautomation_surface.c b/test/testautomation_surface.c index a049f6fbe..e4e4d7014 100644 --- a/test/testautomation_surface.c +++ b/test/testautomation_surface.c @@ -545,14 +545,17 @@ static const SDLTest_TestCaseReference surfaceTest6 = static const SDLTest_TestCaseReference surfaceTest7 = { (SDLTest_TestCaseFp)surface_testBlitAlphaMod, "surface_testBlitAlphaMod", "Tests some blitting routines with alpha mod.", TEST_ENABLED}; +/* TODO: rewrite test case, define new test data and re-enable; current implementation fails */ static const SDLTest_TestCaseReference surfaceTest8 = - { (SDLTest_TestCaseFp)surface_testBlitBlendLoop, "surface_testBlitBlendLoop", "Test blittin routines with verious blending modes", TEST_ENABLED}; + { (SDLTest_TestCaseFp)surface_testBlitBlendLoop, "surface_testBlitBlendLoop", "Test blittin routines with verious blending modes", TEST_DISABLED}; +/* TODO: rewrite test case, define new test data and re-enable; current implementation fails */ static const SDLTest_TestCaseReference surfaceTest9 = - { (SDLTest_TestCaseFp)surface_testBlitBlendBlend, "surface_testBlitBlendBlend", "Tests blitting routines with blend blending mode.", TEST_ENABLED}; + { (SDLTest_TestCaseFp)surface_testBlitBlendBlend, "surface_testBlitBlendBlend", "Tests blitting routines with blend blending mode.", TEST_DISABLED}; +/* TODO: rewrite test case, define new test data and re-enable; current implementation fails */ static const SDLTest_TestCaseReference surfaceTest10 = - { (SDLTest_TestCaseFp)surface_testBlitBlendAdd, "surface_testBlitBlendAdd", "Tests blitting routines with add blending mode.", TEST_ENABLED}; + { (SDLTest_TestCaseFp)surface_testBlitBlendAdd, "surface_testBlitBlendAdd", "Tests blitting routines with add blending mode.", TEST_DISABLED}; static const SDLTest_TestCaseReference surfaceTest11 = { (SDLTest_TestCaseFp)surface_testBlitBlendMod, "surface_testBlitBlendMod", "Tests blitting routines with mod blending mode.", TEST_ENABLED}; From 337c6acc60351634b94f775a41558cbc37376c4c Mon Sep 17 00:00:00 2001 From: Philipp Wiesemann Date: Mon, 13 May 2013 22:45:06 +0200 Subject: [PATCH 091/542] Inlined expression for consistency in render source. --- src/render/opengles/SDL_render_gles.c | 3 +-- src/render/opengles2/SDL_render_gles2.c | 3 +-- 2 files changed, 2 insertions(+), 4 deletions(-) diff --git a/src/render/opengles/SDL_render_gles.c b/src/render/opengles/SDL_render_gles.c index f3cf8a9c0..37e32bfe7 100644 --- a/src/render/opengles/SDL_render_gles.c +++ b/src/render/opengles/SDL_render_gles.c @@ -645,8 +645,7 @@ GLES_UpdateClipRect(SDL_Renderer * renderer) if (!SDL_RectEmpty(rect)) { data->glEnable(GL_SCISSOR_TEST); - int lowerLeft = renderer->viewport.h - rect->y - rect->h; - data->glScissor(rect->x, lowerLeft, rect->w, rect->h); + data->glScissor(rect->x, renderer->viewport.h - rect->y - rect->h, rect->w, rect->h); } else { data->glDisable(GL_SCISSOR_TEST); } diff --git a/src/render/opengles2/SDL_render_gles2.c b/src/render/opengles2/SDL_render_gles2.c index e2bbf4b3b..0f74aeadc 100644 --- a/src/render/opengles2/SDL_render_gles2.c +++ b/src/render/opengles2/SDL_render_gles2.c @@ -288,8 +288,7 @@ GLES2_UpdateClipRect(SDL_Renderer * renderer) if (!SDL_RectEmpty(rect)) { rdata->glEnable(GL_SCISSOR_TEST); - int lowerLeft = renderer->viewport.h - rect->y - rect->h; - rdata->glScissor(rect->x, lowerLeft, rect->w, rect->h); + rdata->glScissor(rect->x, renderer->viewport.h - rect->y - rect->h, rect->w, rect->h); } else { rdata->glDisable(GL_SCISSOR_TEST); } From 699341597aceeba84d1ca6ce8c13c99c387b32c9 Mon Sep 17 00:00:00 2001 From: Philipp Wiesemann Date: Mon, 13 May 2013 23:00:50 +0200 Subject: [PATCH 092/542] Corrected spelling in header file. --- include/SDL_gamecontroller.h | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/include/SDL_gamecontroller.h b/include/SDL_gamecontroller.h index ab2531c5b..263f196fb 100644 --- a/include/SDL_gamecontroller.h +++ b/include/SDL_gamecontroller.h @@ -187,7 +187,7 @@ extern DECLSPEC void SDLCALL SDL_GameControllerUpdate(void); /** - * The list of axii available from a controller + * The list of axes available from a controller */ typedef enum { From 74047a3267cea05fb554eee5e36d098c707d7532 Mon Sep 17 00:00:00 2001 From: Philipp Wiesemann Date: Wed, 15 May 2013 22:00:28 +0200 Subject: [PATCH 093/542] Fixed Doxygen warnings. --- include/SDL_messagebox.h | 4 ++-- include/SDL_render.h | 2 +- include/SDL_video.h | 7 +++++++ 3 files changed, 10 insertions(+), 3 deletions(-) diff --git a/include/SDL_messagebox.h b/include/SDL_messagebox.h index dd788cfad..0fb2f53f1 100644 --- a/include/SDL_messagebox.h +++ b/include/SDL_messagebox.h @@ -58,7 +58,7 @@ typedef enum typedef struct { Uint32 flags; /**< ::SDL_MessageBoxButtonFlags */ - int buttonid; /**< User defined button id (value returned via SDL_MessageBox) */ + int buttonid; /**< User defined button id (value returned via SDL_ShowMessageBox) */ const char * text; /**< The UTF-8 button text */ } SDL_MessageBoxButtonData; @@ -107,7 +107,7 @@ typedef struct /** * \brief Create a modal message box. * - * \param messagebox The SDL_MessageBox structure with title, text, etc. + * \param messageboxdata The SDL_MessageBoxData structure with title, text, etc. * * \return -1 on error, otherwise 0 and buttonid contains user id of button * hit or -1 if dialog was closed. diff --git a/include/SDL_render.h b/include/SDL_render.h index 453209913..39a7e40ca 100644 --- a/include/SDL_render.h +++ b/include/SDL_render.h @@ -460,7 +460,7 @@ extern DECLSPEC int SDLCALL SDL_RenderSetLogicalSize(SDL_Renderer * renderer, in * * \sa SDL_RenderSetLogicalSize() */ -extern DECLSPEC void SDLCALL SDL_RenderGetLogicalSize(SDL_Renderer * renderer, int *w, int *y); +extern DECLSPEC void SDLCALL SDL_RenderGetLogicalSize(SDL_Renderer * renderer, int *w, int *h); /** * \brief Set the drawing area for rendering on the current target. diff --git a/include/SDL_video.h b/include/SDL_video.h index 4873da39b..e731694ca 100644 --- a/include/SDL_video.h +++ b/include/SDL_video.h @@ -504,6 +504,7 @@ extern DECLSPEC void SDLCALL SDL_SetWindowPosition(SDL_Window * window, /** * \brief Get the position of a window. * + * \param window The window to query. * \param x Pointer to variable for storing the x position, may be NULL * \param y Pointer to variable for storing the y position, may be NULL * @@ -515,6 +516,7 @@ extern DECLSPEC void SDLCALL SDL_GetWindowPosition(SDL_Window * window, /** * \brief Set the size of a window's client area. * + * \param window The window to resize. * \param w The width of the window, must be >0 * \param h The height of the window, must be >0 * @@ -529,6 +531,7 @@ extern DECLSPEC void SDLCALL SDL_SetWindowSize(SDL_Window * window, int w, /** * \brief Get the size of a window's client area. * + * \param window The window to query. * \param w Pointer to variable for storing the width, may be NULL * \param h Pointer to variable for storing the height, may be NULL * @@ -540,6 +543,7 @@ extern DECLSPEC void SDLCALL SDL_GetWindowSize(SDL_Window * window, int *w, /** * \brief Set the minimum size of a window's client area. * + * \param window The window to set a new minimum size. * \param min_w The minimum width of the window, must be >0 * \param min_h The minimum height of the window, must be >0 * @@ -555,6 +559,7 @@ extern DECLSPEC void SDLCALL SDL_SetWindowMinimumSize(SDL_Window * window, /** * \brief Get the minimum size of a window's client area. * + * \param window The window to query. * \param w Pointer to variable for storing the minimum width, may be NULL * \param h Pointer to variable for storing the minimum height, may be NULL * @@ -567,6 +572,7 @@ extern DECLSPEC void SDLCALL SDL_GetWindowMinimumSize(SDL_Window * window, /** * \brief Set the maximum size of a window's client area. * + * \param window The window to set a new maximum size. * \param max_w The maximum width of the window, must be >0 * \param max_h The maximum height of the window, must be >0 * @@ -582,6 +588,7 @@ extern DECLSPEC void SDLCALL SDL_SetWindowMaximumSize(SDL_Window * window, /** * \brief Get the maximum size of a window's client area. * + * \param window The window to query. * \param w Pointer to variable for storing the maximum width, may be NULL * \param h Pointer to variable for storing the maximum height, may be NULL * From d3b85c8965100dec8a5e6f4be22d19036671e52f Mon Sep 17 00:00:00 2001 From: Philipp Wiesemann Date: Wed, 15 May 2013 22:10:06 +0200 Subject: [PATCH 094/542] Changed spelling for consistency. --- test/testautomation_render.c | 22 +++++++++++----------- test/testautomation_surface.c | 2 +- 2 files changed, 12 insertions(+), 12 deletions(-) diff --git a/test/testautomation_render.c b/test/testautomation_render.c index 79f26f8c9..48350e74b 100644 --- a/test/testautomation_render.c +++ b/test/testautomation_render.c @@ -113,7 +113,7 @@ int render_testPrimitives (void *arg) int checkFailCount1; int checkFailCount2; - /* Need drawcolour or just skip test. */ + /* Need drawcolor or just skip test. */ SDLTest_AssertCheck(_hasDrawColor(), "_hasDrawColor"); /* Draw a rectangle. */ @@ -216,7 +216,7 @@ int render_testPrimitivesBlend (void *arg) int checkFailCount2; int checkFailCount3; - /* Need drawcolour and blendmode or just skip test. */ + /* Need drawcolor and blendmode or just skip test. */ SDLTest_AssertCheck(_hasDrawColor(), "_hasDrawColor"); SDLTest_AssertCheck(_hasBlendModes(), "_hasBlendModes"); @@ -363,7 +363,7 @@ render_testBlit(void *arg) int checkFailCount1; - /* Need drawcolour or just skip test. */ + /* Need drawcolor or just skip test. */ SDLTest_AssertCheck(_hasDrawColor(), "_hasDrawColor)"); /* Create face surface. */ @@ -410,7 +410,7 @@ render_testBlit(void *arg) /** - * @brief Blits doing colour tests. + * @brief Blits doing color tests. * * \sa * http://wiki.libsdl.org/moin.cgi/SDL_SetTextureColorMod @@ -445,12 +445,12 @@ render_testBlitColor (void *arg) ni = TESTRENDER_SCREEN_W - tw; nj = TESTRENDER_SCREEN_H - th; - /* Test blitting with colour mod. */ + /* Test blitting with color mod. */ checkFailCount1 = 0; checkFailCount2 = 0; for (j=0; j <= nj; j+=4) { for (i=0; i <= ni; i+=4) { - /* Set colour mod. */ + /* Set color mod. */ ret = SDL_SetTextureColorMod( tface, (255/nj)*j, (255/ni)*i, (255/nj)*j ); if (ret != 0) checkFailCount1++; @@ -698,7 +698,7 @@ render_testBlitBlend (void *arg) for (j=0; j <= nj; j+=4) { for (i=0; i <= ni; i+=4) { - /* Set colour mod. */ + /* Set color mod. */ ret = SDL_SetTextureColorMod( tface, (255/nj)*j, (255/ni)*i, (255/nj)*j ); if (ret != 0) checkFailCount1++; @@ -752,7 +752,7 @@ _isSupported( int code ) } /** - * @brief Test to see if we can vary the draw colour. Helper function. + * @brief Test to see if we can vary the draw color. Helper function. * * \sa * http://wiki.libsdl.org/moin.cgi/SDL_SetRenderDrawColor @@ -766,7 +766,7 @@ _hasDrawColor (void) fail = 0; - /* Set colour. */ + /* Set color. */ ret = SDL_SetRenderDrawColor(renderer, 100, 100, 100, 100 ); if (!_isSupported(ret)) fail = 1; @@ -875,7 +875,7 @@ _loadTestFace(void) /** - * @brief Test to see if can set texture colour mode. Helper function. + * @brief Test to see if can set texture color mode. Helper function. * * \sa * http://wiki.libsdl.org/moin.cgi/SDL_SetTextureColorMod @@ -1016,7 +1016,7 @@ _clearScreen(void) { int ret; - /* Set colour. */ + /* Set color. */ ret = SDL_SetRenderDrawColor(renderer, 0, 0, 0, SDL_ALPHA_OPAQUE ); SDLTest_AssertCheck(ret == 0, "Validate result from SDL_SetRenderDrawColor, expected: 0, got: %i", ret); diff --git a/test/testautomation_surface.c b/test/testautomation_surface.c index e4e4d7014..c75ac0125 100644 --- a/test/testautomation_surface.c +++ b/test/testautomation_surface.c @@ -155,7 +155,7 @@ void _testBlitBlendMode(int mode) for (j=0; j <= nj; j+=4) { for (i=0; i <= ni; i+=4) { if (mode == -2) { - /* Set colour mod. */ + /* Set color mod. */ ret = SDL_SetSurfaceColorMod( face, (255/nj)*j, (255/ni)*i, (255/nj)*j ); if (ret != 0) checkFailCount2++; } From c5b6e3c9e18fad4b9cf2827161524a15e01763c5 Mon Sep 17 00:00:00 2001 From: Philipp Wiesemann Date: Wed, 15 May 2013 22:24:23 +0200 Subject: [PATCH 095/542] Corrected internal function prototype. --- src/video/android/SDL_androidkeyboard.c | 2 +- src/video/android/SDL_androidkeyboard.h | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/src/video/android/SDL_androidkeyboard.c b/src/video/android/SDL_androidkeyboard.c index db9cf2d85..88b904acf 100644 --- a/src/video/android/SDL_androidkeyboard.c +++ b/src/video/android/SDL_androidkeyboard.c @@ -30,7 +30,7 @@ #include "../../core/android/SDL_android.h" -void Android_InitKeyboard() +void Android_InitKeyboard(void) { SDL_Keycode keymap[SDL_NUM_SCANCODES]; diff --git a/src/video/android/SDL_androidkeyboard.h b/src/video/android/SDL_androidkeyboard.h index dc670e858..da8da9b75 100644 --- a/src/video/android/SDL_androidkeyboard.h +++ b/src/video/android/SDL_androidkeyboard.h @@ -22,7 +22,7 @@ #include "SDL_androidvideo.h" -extern void Android_InitKeyboard(); +extern void Android_InitKeyboard(void); extern int Android_OnKeyDown(int keycode); extern int Android_OnKeyUp(int keycode); From 20ff4d06d895edcaf22f46fbb2d8e6c5a5fe6da5 Mon Sep 17 00:00:00 2001 From: Philipp Wiesemann Date: Wed, 15 May 2013 22:25:00 +0200 Subject: [PATCH 096/542] Corrected internal function prototype. --- src/video/SDL_sysvideo.h | 2 +- src/video/SDL_video.c | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/src/video/SDL_sysvideo.h b/src/video/SDL_sysvideo.h index 6e6f7d9f7..63f088fff 100644 --- a/src/video/SDL_sysvideo.h +++ b/src/video/SDL_sysvideo.h @@ -375,7 +375,7 @@ extern void SDL_OnWindowFocusLost(SDL_Window * window); extern void SDL_UpdateWindowGrab(SDL_Window * window); extern SDL_Window * SDL_GetFocusWindow(void); -extern SDL_bool SDL_ShouldAllowTopmost(); +extern SDL_bool SDL_ShouldAllowTopmost(void); #endif /* _SDL_sysvideo_h */ diff --git a/src/video/SDL_video.c b/src/video/SDL_video.c index 959f19dc1..034486e63 100644 --- a/src/video/SDL_video.c +++ b/src/video/SDL_video.c @@ -3054,7 +3054,7 @@ SDL_ShowSimpleMessageBox(Uint32 flags, const char *title, const char *message, S } SDL_bool -SDL_ShouldAllowTopmost() +SDL_ShouldAllowTopmost(void) { const char *hint = SDL_GetHint(SDL_HINT_ALLOW_TOPMOST); if (hint) { From e8051fbb5355fe6973c3184f0c05eb5fc8fc17f1 Mon Sep 17 00:00:00 2001 From: Sam Lantinga Date: Wed, 15 May 2013 23:18:29 -0700 Subject: [PATCH 097/542] There's no need to keep these private. If you extend SDLActivity, you should know what you're doing. --- .../src/org/libsdl/app/SDLActivity.java | 28 +++++++++---------- 1 file changed, 14 insertions(+), 14 deletions(-) diff --git a/android-project/src/org/libsdl/app/SDLActivity.java b/android-project/src/org/libsdl/app/SDLActivity.java index 14411fb43..6d773a023 100644 --- a/android-project/src/org/libsdl/app/SDLActivity.java +++ b/android-project/src/org/libsdl/app/SDLActivity.java @@ -30,24 +30,24 @@ public class SDLActivity extends Activity { public static boolean mIsPaused = false; // Main components - private static SDLActivity mSingleton; - private static SDLSurface mSurface; - private static View mTextEdit; - private static ViewGroup mLayout; + protected static SDLActivity mSingleton; + protected static SDLSurface mSurface; + protected static View mTextEdit; + protected static ViewGroup mLayout; // This is what SDL runs in. It invokes SDL_main(), eventually - private static Thread mSDLThread; + protected static Thread mSDLThread; // Audio - private static Thread mAudioThread; - private static AudioTrack mAudioTrack; + protected static Thread mAudioThread; + protected static AudioTrack mAudioTrack; // EGL private objects - private static EGLContext mEGLContext; - private static EGLSurface mEGLSurface; - private static EGLDisplay mEGLDisplay; - private static EGLConfig mEGLConfig; - private static int mGLMajor, mGLMinor; + protected static EGLContext mEGLContext; + protected static EGLSurface mEGLSurface; + protected static EGLDisplay mEGLDisplay; + protected static EGLConfig mEGLConfig; + protected static int mGLMajor, mGLMinor; // Load the .so static { @@ -493,10 +493,10 @@ class SDLSurface extends SurfaceView implements SurfaceHolder.Callback, View.OnKeyListener, View.OnTouchListener, SensorEventListener { // Sensors - private static SensorManager mSensorManager; + protected static SensorManager mSensorManager; // Keep track of the surface size to normalize touch events - private static float mWidth, mHeight; + protected static float mWidth, mHeight; // Startup public SDLSurface(Context context) { From 128b8ca8956cf8aec5c5fbbde0ab189f0982fc2a Mon Sep 17 00:00:00 2001 From: Sam Lantinga Date: Thu, 16 May 2013 00:43:22 -0700 Subject: [PATCH 098/542] Fixed bug 1846 - _allmul implementation in SDL_stdlib.c doesn't clean up the stack Colin Barrett I see this manifest itself (VS2012 x86) as: "Run-Time Check Failure #0 - The value of ESP was not properly saved across a function call. This is usually a result of calling a function declared with one calling convention with a function pointer declared with a different calling convention." in the first call to SDL_GetTicks in my application. The disassembly at the problem line is: hires_now.QuadPart *= 1000; 00AD0792 push 0 00AD0794 push 3E8h 00AD0799 mov eax,dword ptr [ebp-10h] 00AD079C push eax 00AD079D mov ecx,dword ptr [hires_now] 00AD07A0 push ecx 00AD07A1 call _allmul (0AE7D40h) 00AD07A6 mov dword ptr [hires_now],eax 00AD07A9 mov dword ptr [ebp-10h],edx Apparently _allmul should be popping the stack but isn't (other similar functions in SDL_stdlib.c - _alldiv and whatnot - DO pop the stack). A 'ret 10h' at the end of _allmul appears to do the trick --- src/stdlib/SDL_stdlib.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/stdlib/SDL_stdlib.c b/src/stdlib/SDL_stdlib.c index 1c19ab72f..176aa240c 100644 --- a/src/stdlib/SDL_stdlib.c +++ b/src/stdlib/SDL_stdlib.c @@ -191,7 +191,7 @@ _allmul() pop esi pop edi pop ebp - ret + ret 10h } /* *INDENT-ON* */ } From bc7136f5baadcecd10c4cecb3104199a415ad546 Mon Sep 17 00:00:00 2001 From: Sam Lantinga Date: Thu, 16 May 2013 00:48:20 -0700 Subject: [PATCH 099/542] Martin Gerhardy added support for the Jess Technology USB Game Controller --- src/joystick/SDL_gamecontroller.c | 1 + 1 file changed, 1 insertion(+) diff --git a/src/joystick/SDL_gamecontroller.c b/src/joystick/SDL_gamecontroller.c index 9afb26df5..fda506af7 100644 --- a/src/joystick/SDL_gamecontroller.c +++ b/src/joystick/SDL_gamecontroller.c @@ -114,6 +114,7 @@ const char *s_ControllerMappings [] = "030000006d0400001dc2000014400000,Logitech F310 Gamepad (XInput),a:b0,b:b1,y:b3,x:b2,start:b7,guide:b8,back:b6,leftstick:b9,rightstick:b10,leftshoulder:b4,rightshoulder:b5,dpup:h0.1,dpleft:h0.8,dpdown:h0.4,dpright:h0.2,leftx:a0,lefty:a1,rightx:a3,righty:a4,lefttrigger:a2,righttrigger:a5,", "030000006d04000019c2000010010000,Logitech Cordless RumblePad 2,a:b1,b:b2,y:b3,x:b0,start:b9,guide:,back:b8,leftstick:b10,rightstick:b11,leftshoulder:b4,rightshoulder:b5,dpup:h0.1,dpleft:h0.8,dpdown:h0.4,dpright:h0.2,leftx:a0,lefty:a1,rightx:a2,righty:a3,lefttrigger:b6,righttrigger:b7,", "0500000047532047616d657061640000,GameStop Gamepad,a:b0,b:b1,y:b3,x:b2,start:b9,guide:,back:b8,leftstick:b10,rightstick:b11,leftshoulder:b4,rightshoulder:b5,dpup:h0.1,dpleft:h0.8,dpdown:h0.4,dpright:h0.2,leftx:a0,lefty:a1,rightx:a2,righty:a3,lefttrigger:b6,righttrigger:b7,", + "03000000ba2200002010000001010000,Jess Technology USB Game Controller,start:b9,a:b2,b:b1,x:b3,y:b0,dpup:h0.1,dpleft:h0.8,dpdown:h0.4,dpright:h0.2,leftx:a0,lefty:a1,rightx:a3,righty:a2,lefttrigger:b6,righttrigger:b7,leftshoulder:b4,rightshoulder:b5,guide:,back:b8", #endif NULL }; From cc6f700f06b8881fc1dde506bbd3be5f56ffebf0 Mon Sep 17 00:00:00 2001 From: Sam Lantinga Date: Thu, 16 May 2013 00:52:33 -0700 Subject: [PATCH 100/542] Fixed bug 1839 - SDL2 Cmake: VIDEO_COCOA check fails on OS X; VIDEO_COCOA sources aren't compiled. --- cmake/macros.cmake | 8 ++++++++ cmake/sdlchecks.cmake | 3 ++- 2 files changed, 10 insertions(+), 1 deletion(-) diff --git a/cmake/macros.cmake b/cmake/macros.cmake index fe712a140..c234a566c 100644 --- a/cmake/macros.cmake +++ b/cmake/macros.cmake @@ -63,3 +63,11 @@ macro(LISTTOSTR _LIST _OUTPUT) set(${_OUTPUT} "${_LPREFIX}${_ITEM} ${${_OUTPUT}}") endforeach() endmacro() + +macro(CHECK_OBJC_SOURCE_COMPILES SOURCE VAR) + set(PREV_REQUIRED_DEFS "${CMAKE_REQUIRED_DEFINITIONS}") + set(CMAKE_REQUIRED_DEFINITIONS "-ObjC ${PREV_REQUIRED_DEFS}") + CHECK_C_SOURCE_COMPILES(${SOURCE} ${VAR}) + set(CMAKE_REQUIRED_DEFINITIONS "${PREV_REQUIRED_DEFS}") +endmacro() + diff --git a/cmake/sdlchecks.cmake b/cmake/sdlchecks.cmake index 5a9139903..bc5edf035 100644 --- a/cmake/sdlchecks.cmake +++ b/cmake/sdlchecks.cmake @@ -449,11 +449,12 @@ endmacro(CheckX11) # macro(CheckCOCOA) if(VIDEO_COCOA) - check_c_source_compiles(" + check_objc_source_compiles(" #import int main (int argc, char** argv) {}" HAVE_VIDEO_COCOA) if(HAVE_VIDEO_COCOA) file(GLOB COCOA_SOURCES ${SDL2_SOURCE_DIR}/src/video/cocoa/*.m) + set_source_files_properties(${COCOA_SOURCES} PROPERTIES LANGUAGE C) set(SOURCE_FILES ${SOURCE_FILES} ${COCOA_SOURCES}) set(SDL_VIDEO_DRIVER_COCOA 1) set(HAVE_SDL_VIDEO TRUE) From cbe94acd8ed20603df5f938c44a949604209a302 Mon Sep 17 00:00:00 2001 From: Sam Lantinga Date: Thu, 16 May 2013 00:56:19 -0700 Subject: [PATCH 101/542] Fixed bug 1838 - [Patch] Direct3D resource leak on SDL_DestroyRenderer() --- src/render/direct3d/SDL_render_d3d.c | 1 + 1 file changed, 1 insertion(+) diff --git a/src/render/direct3d/SDL_render_d3d.c b/src/render/direct3d/SDL_render_d3d.c index e6bc65ba2..55c313a6c 100644 --- a/src/render/direct3d/SDL_render_d3d.c +++ b/src/render/direct3d/SDL_render_d3d.c @@ -1506,6 +1506,7 @@ D3D_DestroyRenderer(SDL_Renderer * renderer) } if (data->d3d) { IDirect3D9_Release(data->d3d); + ID3DXMatrixStack_Release(data->matrixStack); SDL_UnloadObject(data->d3dDLL); } SDL_free(data); From 7ebe7ed12875c7ca21f2e30db75f4cec30ca1936 Mon Sep 17 00:00:00 2001 From: Sam Lantinga Date: Thu, 16 May 2013 01:03:28 -0700 Subject: [PATCH 102/542] Fixed bug 1829 - sdl2-config is not executable leighmanthegreat@hotmail.com I downloaded SDL2 from hg source. I built to a ./build directory. I downloaded SDL_image 2 hg and attempted to build. When it cannot find a sdl2-config the SDL_image configure correctly suggests setting SDL_CONFIG variable. Setting this the configure still fails with 'Permission denied' on the call to sdl2-config. Setting execute permission solves the problem. If possible, sdl2-config should have executable bit set when it is created. --- configure | 373 +++++++++++++++++++++++++++------------------------ configure.in | 1 + 2 files changed, 201 insertions(+), 173 deletions(-) diff --git a/configure b/configure index fe84051d8..c54acd12a 100755 --- a/configure +++ b/configure @@ -1,11 +1,9 @@ #! /bin/sh # Guess values for system-dependent variables and create Makefiles. -# Generated by GNU Autoconf 2.68. +# Generated by GNU Autoconf 2.69. # # -# Copyright (C) 1992, 1993, 1994, 1995, 1996, 1998, 1999, 2000, 2001, -# 2002, 2003, 2004, 2005, 2006, 2007, 2008, 2009, 2010 Free Software -# Foundation, Inc. +# Copyright (C) 1992-1996, 1998-2012 Free Software Foundation, Inc. # # # This configure script is free software; the Free Software Foundation @@ -134,6 +132,31 @@ export LANGUAGE # CDPATH. (unset CDPATH) >/dev/null 2>&1 && unset CDPATH +# Use a proper internal environment variable to ensure we don't fall + # into an infinite loop, continuously re-executing ourselves. + if test x"${_as_can_reexec}" != xno && test "x$CONFIG_SHELL" != x; then + _as_can_reexec=no; export _as_can_reexec; + # We cannot yet assume a decent shell, so we have to provide a +# neutralization value for shells without unset; and this also +# works around shells that cannot unset nonexistent variables. +# Preserve -v and -x to the replacement shell. +BASH_ENV=/dev/null +ENV=/dev/null +(unset BASH_ENV) >/dev/null 2>&1 && unset BASH_ENV ENV +case $- in # (((( + *v*x* | *x*v* ) as_opts=-vx ;; + *v* ) as_opts=-v ;; + *x* ) as_opts=-x ;; + * ) as_opts= ;; +esac +exec $CONFIG_SHELL $as_opts "$as_myself" ${1+"$@"} +# Admittedly, this is quite paranoid, since all the known shells bail +# out after a failed `exec'. +$as_echo "$0: could not re-execute with $CONFIG_SHELL" >&2 +as_fn_exit 255 + fi + # We don't want this to propagate to other subprocesses. + { _as_can_reexec=; unset _as_can_reexec;} if test "x$CONFIG_SHELL" = x; then as_bourne_compatible="if test -n \"\${ZSH_VERSION+set}\" && (emulate sh) >/dev/null 2>&1; then : emulate sh @@ -167,7 +190,8 @@ if ( set x; as_fn_ret_success y && test x = \"\$1\" ); then : else exitcode=1; echo positional parameters were not saved. fi -test x\$exitcode = x0 || exit 1" +test x\$exitcode = x0 || exit 1 +test -x / || exit 1" as_suggested=" as_lineno_1=";as_suggested=$as_suggested$LINENO;as_suggested=$as_suggested" as_lineno_1a=\$LINENO as_lineno_2=";as_suggested=$as_suggested$LINENO;as_suggested=$as_suggested" as_lineno_2a=\$LINENO eval 'test \"x\$as_lineno_1'\$as_run'\" != \"x\$as_lineno_2'\$as_run'\" && @@ -220,21 +244,25 @@ IFS=$as_save_IFS if test "x$CONFIG_SHELL" != x; then : - # We cannot yet assume a decent shell, so we have to provide a - # neutralization value for shells without unset; and this also - # works around shells that cannot unset nonexistent variables. - # Preserve -v and -x to the replacement shell. - BASH_ENV=/dev/null - ENV=/dev/null - (unset BASH_ENV) >/dev/null 2>&1 && unset BASH_ENV ENV - export CONFIG_SHELL - case $- in # (((( - *v*x* | *x*v* ) as_opts=-vx ;; - *v* ) as_opts=-v ;; - *x* ) as_opts=-x ;; - * ) as_opts= ;; - esac - exec "$CONFIG_SHELL" $as_opts "$as_myself" ${1+"$@"} + export CONFIG_SHELL + # We cannot yet assume a decent shell, so we have to provide a +# neutralization value for shells without unset; and this also +# works around shells that cannot unset nonexistent variables. +# Preserve -v and -x to the replacement shell. +BASH_ENV=/dev/null +ENV=/dev/null +(unset BASH_ENV) >/dev/null 2>&1 && unset BASH_ENV ENV +case $- in # (((( + *v*x* | *x*v* ) as_opts=-vx ;; + *v* ) as_opts=-v ;; + *x* ) as_opts=-x ;; + * ) as_opts= ;; +esac +exec $CONFIG_SHELL $as_opts "$as_myself" ${1+"$@"} +# Admittedly, this is quite paranoid, since all the known shells bail +# out after a failed `exec'. +$as_echo "$0: could not re-execute with $CONFIG_SHELL" >&2 +exit 255 fi if test x$as_have_required = xno; then : @@ -336,6 +364,14 @@ $as_echo X"$as_dir" | } # as_fn_mkdir_p + +# as_fn_executable_p FILE +# ----------------------- +# Test if FILE is an executable regular file. +as_fn_executable_p () +{ + test -f "$1" && test -x "$1" +} # as_fn_executable_p # as_fn_append VAR VALUE # ---------------------- # Append the text in VALUE to the end of the definition contained in VAR. Take @@ -457,6 +493,10 @@ as_cr_alnum=$as_cr_Letters$as_cr_digits chmod +x "$as_me.lineno" || { $as_echo "$as_me: error: cannot create $as_me.lineno; rerun with a POSIX shell" >&2; as_fn_exit 1; } + # If we had to re-execute with $CONFIG_SHELL, we're ensured to have + # already done that, so ensure we don't try to do so again and fall + # in an infinite loop. This has already happened in practice. + _as_can_reexec=no; export _as_can_reexec # Don't try to exec as it changes $[0], causing all sort of problems # (the dirname of $[0] is not the place where we might find the # original and so on. Autoconf is especially sensitive to this). @@ -491,16 +531,16 @@ if (echo >conf$$.file) 2>/dev/null; then # ... but there are two gotchas: # 1) On MSYS, both `ln -s file dir' and `ln file dir' fail. # 2) DJGPP < 2.04 has no symlinks; `ln -s' creates a wrapper executable. - # In both cases, we have to default to `cp -p'. + # In both cases, we have to default to `cp -pR'. ln -s conf$$.file conf$$.dir 2>/dev/null && test ! -f conf$$.exe || - as_ln_s='cp -p' + as_ln_s='cp -pR' elif ln conf$$.file conf$$ 2>/dev/null; then as_ln_s=ln else - as_ln_s='cp -p' + as_ln_s='cp -pR' fi else - as_ln_s='cp -p' + as_ln_s='cp -pR' fi rm -f conf$$ conf$$.exe conf$$.dir/conf$$.file conf$$.file rmdir conf$$.dir 2>/dev/null @@ -512,28 +552,8 @@ else as_mkdir_p=false fi -if test -x / >/dev/null 2>&1; then - as_test_x='test -x' -else - if ls -dL / >/dev/null 2>&1; then - as_ls_L_option=L - else - as_ls_L_option= - fi - as_test_x=' - eval sh -c '\'' - if test -d "$1"; then - test -d "$1/."; - else - case $1 in #( - -*)set "./$1";; - esac; - case `ls -ld'$as_ls_L_option' "$1" 2>/dev/null` in #(( - ???[sx]*):;;*)false;;esac;fi - '\'' sh - ' -fi -as_executable_p=$as_test_x +as_test_x='test -x' +as_executable_p=as_fn_executable_p # Sed expression to map a string onto a valid CPP name. as_tr_cpp="eval sed 'y%*$as_cr_letters%P$as_cr_LETTERS%;s%[^_$as_cr_alnum]%_%g'" @@ -1292,8 +1312,6 @@ target=$target_alias if test "x$host_alias" != x; then if test "x$build_alias" = x; then cross_compiling=maybe - $as_echo "$as_me: WARNING: if you wanted to set the --build type, don't use --host. - If a cross compiler is detected then cross compile mode will be used" >&2 elif test "x$build_alias" != "x$host_alias"; then cross_compiling=yes fi @@ -1645,9 +1663,9 @@ test -n "$ac_init_help" && exit $ac_status if $ac_init_version; then cat <<\_ACEOF configure -generated by GNU Autoconf 2.68 +generated by GNU Autoconf 2.69 -Copyright (C) 2010 Free Software Foundation, Inc. +Copyright (C) 2012 Free Software Foundation, Inc. This configure script is free software; the Free Software Foundation gives unlimited permission to copy, distribute and modify it. _ACEOF @@ -1723,7 +1741,7 @@ $as_echo "$ac_try_echo"; } >&5 test ! -s conftest.err } && test -s conftest$ac_exeext && { test "$cross_compiling" = yes || - $as_test_x conftest$ac_exeext + test -x conftest$ac_exeext }; then : ac_retval=0 else @@ -2021,7 +2039,7 @@ $as_echo "$ac_try_echo"; } >&5 test ! -s conftest.err } && test -s conftest$ac_exeext && { test "$cross_compiling" = yes || - $as_test_x conftest$ac_exeext + test -x conftest$ac_exeext }; then : ac_retval=0 else @@ -2255,7 +2273,8 @@ int main () { static int test_array [1 - 2 * !(($2) >= 0)]; -test_array [0] = 0 +test_array [0] = 0; +return test_array [0]; ; return 0; @@ -2271,7 +2290,8 @@ int main () { static int test_array [1 - 2 * !(($2) <= $ac_mid)]; -test_array [0] = 0 +test_array [0] = 0; +return test_array [0]; ; return 0; @@ -2297,7 +2317,8 @@ int main () { static int test_array [1 - 2 * !(($2) < 0)]; -test_array [0] = 0 +test_array [0] = 0; +return test_array [0]; ; return 0; @@ -2313,7 +2334,8 @@ int main () { static int test_array [1 - 2 * !(($2) >= $ac_mid)]; -test_array [0] = 0 +test_array [0] = 0; +return test_array [0]; ; return 0; @@ -2347,7 +2369,8 @@ int main () { static int test_array [1 - 2 * !(($2) <= $ac_mid)]; -test_array [0] = 0 +test_array [0] = 0; +return test_array [0]; ; return 0; @@ -2420,7 +2443,7 @@ This file contains any messages produced by compilers while running configure, to aid debugging if configure makes a mistake. It was created by $as_me, which was -generated by GNU Autoconf 2.68. Invocation command line was +generated by GNU Autoconf 2.69. Invocation command line was $ $0 $@ @@ -3014,7 +3037,7 @@ do IFS=$as_save_IFS test -z "$as_dir" && as_dir=. for ac_exec_ext in '' $ac_executable_extensions; do - if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then + if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then ac_cv_prog_CC="${ac_tool_prefix}gcc" $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5 break 2 @@ -3054,7 +3077,7 @@ do IFS=$as_save_IFS test -z "$as_dir" && as_dir=. for ac_exec_ext in '' $ac_executable_extensions; do - if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then + if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then ac_cv_prog_ac_ct_CC="gcc" $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5 break 2 @@ -3107,7 +3130,7 @@ do IFS=$as_save_IFS test -z "$as_dir" && as_dir=. for ac_exec_ext in '' $ac_executable_extensions; do - if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then + if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then ac_cv_prog_CC="${ac_tool_prefix}cc" $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5 break 2 @@ -3148,7 +3171,7 @@ do IFS=$as_save_IFS test -z "$as_dir" && as_dir=. for ac_exec_ext in '' $ac_executable_extensions; do - if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then + if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then if test "$as_dir/$ac_word$ac_exec_ext" = "/usr/ucb/cc"; then ac_prog_rejected=yes continue @@ -3206,7 +3229,7 @@ do IFS=$as_save_IFS test -z "$as_dir" && as_dir=. for ac_exec_ext in '' $ac_executable_extensions; do - if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then + if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then ac_cv_prog_CC="$ac_tool_prefix$ac_prog" $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5 break 2 @@ -3250,7 +3273,7 @@ do IFS=$as_save_IFS test -z "$as_dir" && as_dir=. for ac_exec_ext in '' $ac_executable_extensions; do - if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then + if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then ac_cv_prog_ac_ct_CC="$ac_prog" $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5 break 2 @@ -3696,8 +3719,7 @@ cat confdefs.h - <<_ACEOF >conftest.$ac_ext /* end confdefs.h. */ #include #include -#include -#include +struct stat; /* Most of the following tests are stolen from RCS 5.7's src/conf.sh. */ struct buf { int x; }; FILE * (*rcsopen) (struct buf *, struct stat *, int); @@ -3804,7 +3826,7 @@ do for ac_prog in sed gsed; do for ac_exec_ext in '' $ac_executable_extensions; do ac_path_SED="$as_dir/$ac_prog$ac_exec_ext" - { test -f "$ac_path_SED" && $as_test_x "$ac_path_SED"; } || continue + as_fn_executable_p "$ac_path_SED" || continue # Check for GNU ac_path_SED and select it if it is found. # Check for GNU $ac_path_SED case `"$ac_path_SED" --version 2>&1` in @@ -3880,7 +3902,7 @@ do for ac_prog in grep ggrep; do for ac_exec_ext in '' $ac_executable_extensions; do ac_path_GREP="$as_dir/$ac_prog$ac_exec_ext" - { test -f "$ac_path_GREP" && $as_test_x "$ac_path_GREP"; } || continue + as_fn_executable_p "$ac_path_GREP" || continue # Check for GNU ac_path_GREP and select it if it is found. # Check for GNU $ac_path_GREP case `"$ac_path_GREP" --version 2>&1` in @@ -3946,7 +3968,7 @@ do for ac_prog in egrep; do for ac_exec_ext in '' $ac_executable_extensions; do ac_path_EGREP="$as_dir/$ac_prog$ac_exec_ext" - { test -f "$ac_path_EGREP" && $as_test_x "$ac_path_EGREP"; } || continue + as_fn_executable_p "$ac_path_EGREP" || continue # Check for GNU ac_path_EGREP and select it if it is found. # Check for GNU $ac_path_EGREP case `"$ac_path_EGREP" --version 2>&1` in @@ -4013,7 +4035,7 @@ do for ac_prog in fgrep; do for ac_exec_ext in '' $ac_executable_extensions; do ac_path_FGREP="$as_dir/$ac_prog$ac_exec_ext" - { test -f "$ac_path_FGREP" && $as_test_x "$ac_path_FGREP"; } || continue + as_fn_executable_p "$ac_path_FGREP" || continue # Check for GNU ac_path_FGREP and select it if it is found. # Check for GNU $ac_path_FGREP case `"$ac_path_FGREP" --version 2>&1` in @@ -4269,7 +4291,7 @@ do IFS=$as_save_IFS test -z "$as_dir" && as_dir=. for ac_exec_ext in '' $ac_executable_extensions; do - if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then + if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then ac_cv_prog_DUMPBIN="$ac_tool_prefix$ac_prog" $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5 break 2 @@ -4313,7 +4335,7 @@ do IFS=$as_save_IFS test -z "$as_dir" && as_dir=. for ac_exec_ext in '' $ac_executable_extensions; do - if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then + if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then ac_cv_prog_ac_ct_DUMPBIN="$ac_prog" $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5 break 2 @@ -4737,7 +4759,7 @@ do IFS=$as_save_IFS test -z "$as_dir" && as_dir=. for ac_exec_ext in '' $ac_executable_extensions; do - if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then + if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then ac_cv_prog_OBJDUMP="${ac_tool_prefix}objdump" $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5 break 2 @@ -4777,7 +4799,7 @@ do IFS=$as_save_IFS test -z "$as_dir" && as_dir=. for ac_exec_ext in '' $ac_executable_extensions; do - if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then + if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then ac_cv_prog_ac_ct_OBJDUMP="objdump" $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5 break 2 @@ -5082,7 +5104,7 @@ do IFS=$as_save_IFS test -z "$as_dir" && as_dir=. for ac_exec_ext in '' $ac_executable_extensions; do - if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then + if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then ac_cv_prog_DLLTOOL="${ac_tool_prefix}dlltool" $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5 break 2 @@ -5122,7 +5144,7 @@ do IFS=$as_save_IFS test -z "$as_dir" && as_dir=. for ac_exec_ext in '' $ac_executable_extensions; do - if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then + if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then ac_cv_prog_ac_ct_DLLTOOL="dlltool" $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5 break 2 @@ -5223,7 +5245,7 @@ do IFS=$as_save_IFS test -z "$as_dir" && as_dir=. for ac_exec_ext in '' $ac_executable_extensions; do - if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then + if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then ac_cv_prog_AR="$ac_tool_prefix$ac_prog" $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5 break 2 @@ -5267,7 +5289,7 @@ do IFS=$as_save_IFS test -z "$as_dir" && as_dir=. for ac_exec_ext in '' $ac_executable_extensions; do - if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then + if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then ac_cv_prog_ac_ct_AR="$ac_prog" $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5 break 2 @@ -5392,7 +5414,7 @@ do IFS=$as_save_IFS test -z "$as_dir" && as_dir=. for ac_exec_ext in '' $ac_executable_extensions; do - if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then + if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then ac_cv_prog_STRIP="${ac_tool_prefix}strip" $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5 break 2 @@ -5432,7 +5454,7 @@ do IFS=$as_save_IFS test -z "$as_dir" && as_dir=. for ac_exec_ext in '' $ac_executable_extensions; do - if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then + if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then ac_cv_prog_ac_ct_STRIP="strip" $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5 break 2 @@ -5491,7 +5513,7 @@ do IFS=$as_save_IFS test -z "$as_dir" && as_dir=. for ac_exec_ext in '' $ac_executable_extensions; do - if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then + if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then ac_cv_prog_RANLIB="${ac_tool_prefix}ranlib" $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5 break 2 @@ -5531,7 +5553,7 @@ do IFS=$as_save_IFS test -z "$as_dir" && as_dir=. for ac_exec_ext in '' $ac_executable_extensions; do - if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then + if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then ac_cv_prog_ac_ct_RANLIB="ranlib" $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5 break 2 @@ -5635,7 +5657,7 @@ do IFS=$as_save_IFS test -z "$as_dir" && as_dir=. for ac_exec_ext in '' $ac_executable_extensions; do - if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then + if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then ac_cv_prog_AWK="$ac_prog" $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5 break 2 @@ -6222,7 +6244,7 @@ do IFS=$as_save_IFS test -z "$as_dir" && as_dir=. for ac_exec_ext in '' $ac_executable_extensions; do - if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then + if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then ac_cv_prog_MANIFEST_TOOL="${ac_tool_prefix}mt" $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5 break 2 @@ -6262,7 +6284,7 @@ do IFS=$as_save_IFS test -z "$as_dir" && as_dir=. for ac_exec_ext in '' $ac_executable_extensions; do - if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then + if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then ac_cv_prog_ac_ct_MANIFEST_TOOL="mt" $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5 break 2 @@ -6342,7 +6364,7 @@ do IFS=$as_save_IFS test -z "$as_dir" && as_dir=. for ac_exec_ext in '' $ac_executable_extensions; do - if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then + if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then ac_cv_prog_DSYMUTIL="${ac_tool_prefix}dsymutil" $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5 break 2 @@ -6382,7 +6404,7 @@ do IFS=$as_save_IFS test -z "$as_dir" && as_dir=. for ac_exec_ext in '' $ac_executable_extensions; do - if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then + if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then ac_cv_prog_ac_ct_DSYMUTIL="dsymutil" $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5 break 2 @@ -6434,7 +6456,7 @@ do IFS=$as_save_IFS test -z "$as_dir" && as_dir=. for ac_exec_ext in '' $ac_executable_extensions; do - if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then + if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then ac_cv_prog_NMEDIT="${ac_tool_prefix}nmedit" $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5 break 2 @@ -6474,7 +6496,7 @@ do IFS=$as_save_IFS test -z "$as_dir" && as_dir=. for ac_exec_ext in '' $ac_executable_extensions; do - if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then + if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then ac_cv_prog_ac_ct_NMEDIT="nmedit" $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5 break 2 @@ -6526,7 +6548,7 @@ do IFS=$as_save_IFS test -z "$as_dir" && as_dir=. for ac_exec_ext in '' $ac_executable_extensions; do - if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then + if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then ac_cv_prog_LIPO="${ac_tool_prefix}lipo" $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5 break 2 @@ -6566,7 +6588,7 @@ do IFS=$as_save_IFS test -z "$as_dir" && as_dir=. for ac_exec_ext in '' $ac_executable_extensions; do - if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then + if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then ac_cv_prog_ac_ct_LIPO="lipo" $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5 break 2 @@ -6618,7 +6640,7 @@ do IFS=$as_save_IFS test -z "$as_dir" && as_dir=. for ac_exec_ext in '' $ac_executable_extensions; do - if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then + if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then ac_cv_prog_OTOOL="${ac_tool_prefix}otool" $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5 break 2 @@ -6658,7 +6680,7 @@ do IFS=$as_save_IFS test -z "$as_dir" && as_dir=. for ac_exec_ext in '' $ac_executable_extensions; do - if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then + if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then ac_cv_prog_ac_ct_OTOOL="otool" $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5 break 2 @@ -6710,7 +6732,7 @@ do IFS=$as_save_IFS test -z "$as_dir" && as_dir=. for ac_exec_ext in '' $ac_executable_extensions; do - if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then + if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then ac_cv_prog_OTOOL64="${ac_tool_prefix}otool64" $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5 break 2 @@ -6750,7 +6772,7 @@ do IFS=$as_save_IFS test -z "$as_dir" && as_dir=. for ac_exec_ext in '' $ac_executable_extensions; do - if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then + if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then ac_cv_prog_ac_ct_OTOOL64="otool64" $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5 break 2 @@ -7255,7 +7277,7 @@ do IFS=$as_save_IFS test -z "$as_dir" && as_dir=. for ac_exec_ext in '' $ac_executable_extensions; do - if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then + if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then ac_cv_prog_AS="${ac_tool_prefix}as" $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5 break 2 @@ -7295,7 +7317,7 @@ do IFS=$as_save_IFS test -z "$as_dir" && as_dir=. for ac_exec_ext in '' $ac_executable_extensions; do - if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then + if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then ac_cv_prog_ac_ct_AS="as" $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5 break 2 @@ -7347,7 +7369,7 @@ do IFS=$as_save_IFS test -z "$as_dir" && as_dir=. for ac_exec_ext in '' $ac_executable_extensions; do - if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then + if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then ac_cv_prog_DLLTOOL="${ac_tool_prefix}dlltool" $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5 break 2 @@ -7387,7 +7409,7 @@ do IFS=$as_save_IFS test -z "$as_dir" && as_dir=. for ac_exec_ext in '' $ac_executable_extensions; do - if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then + if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then ac_cv_prog_ac_ct_DLLTOOL="dlltool" $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5 break 2 @@ -7439,7 +7461,7 @@ do IFS=$as_save_IFS test -z "$as_dir" && as_dir=. for ac_exec_ext in '' $ac_executable_extensions; do - if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then + if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then ac_cv_prog_OBJDUMP="${ac_tool_prefix}objdump" $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5 break 2 @@ -7479,7 +7501,7 @@ do IFS=$as_save_IFS test -z "$as_dir" && as_dir=. for ac_exec_ext in '' $ac_executable_extensions; do - if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then + if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then ac_cv_prog_ac_ct_OBJDUMP="objdump" $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5 break 2 @@ -11573,7 +11595,7 @@ do IFS=$as_save_IFS test -z "$as_dir" && as_dir=. for ac_exec_ext in '' $ac_executable_extensions; do - if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then + if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then ac_cv_prog_CC="${ac_tool_prefix}gcc" $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5 break 2 @@ -11613,7 +11635,7 @@ do IFS=$as_save_IFS test -z "$as_dir" && as_dir=. for ac_exec_ext in '' $ac_executable_extensions; do - if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then + if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then ac_cv_prog_ac_ct_CC="gcc" $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5 break 2 @@ -11666,7 +11688,7 @@ do IFS=$as_save_IFS test -z "$as_dir" && as_dir=. for ac_exec_ext in '' $ac_executable_extensions; do - if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then + if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then ac_cv_prog_CC="${ac_tool_prefix}cc" $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5 break 2 @@ -11707,7 +11729,7 @@ do IFS=$as_save_IFS test -z "$as_dir" && as_dir=. for ac_exec_ext in '' $ac_executable_extensions; do - if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then + if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then if test "$as_dir/$ac_word$ac_exec_ext" = "/usr/ucb/cc"; then ac_prog_rejected=yes continue @@ -11765,7 +11787,7 @@ do IFS=$as_save_IFS test -z "$as_dir" && as_dir=. for ac_exec_ext in '' $ac_executable_extensions; do - if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then + if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then ac_cv_prog_CC="$ac_tool_prefix$ac_prog" $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5 break 2 @@ -11809,7 +11831,7 @@ do IFS=$as_save_IFS test -z "$as_dir" && as_dir=. for ac_exec_ext in '' $ac_executable_extensions; do - if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then + if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then ac_cv_prog_ac_ct_CC="$ac_prog" $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5 break 2 @@ -12005,8 +12027,7 @@ cat confdefs.h - <<_ACEOF >conftest.$ac_ext /* end confdefs.h. */ #include #include -#include -#include +struct stat; /* Most of the following tests are stolen from RCS 5.7's src/conf.sh. */ struct buf { int x; }; FILE * (*rcsopen) (struct buf *, struct stat *, int); @@ -12119,7 +12140,7 @@ do IFS=$as_save_IFS test -z "$as_dir" && as_dir=. for ac_exec_ext in '' $ac_executable_extensions; do - if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then + if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then ac_cv_prog_CXX="$ac_tool_prefix$ac_prog" $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5 break 2 @@ -12163,7 +12184,7 @@ do IFS=$as_save_IFS test -z "$as_dir" && as_dir=. for ac_exec_ext in '' $ac_executable_extensions; do - if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then + if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then ac_cv_prog_ac_ct_CXX="$ac_prog" $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5 break 2 @@ -15586,7 +15607,7 @@ case $as_dir/ in #(( # by default. for ac_prog in ginstall scoinst install; do for ac_exec_ext in '' $ac_executable_extensions; do - if { test -f "$as_dir/$ac_prog$ac_exec_ext" && $as_test_x "$as_dir/$ac_prog$ac_exec_ext"; }; then + if as_fn_executable_p "$as_dir/$ac_prog$ac_exec_ext"; then if test $ac_prog = install && grep dspmsg "$as_dir/$ac_prog$ac_exec_ext" >/dev/null 2>&1; then # AIX install. It has an incompatible calling convention. @@ -15690,7 +15711,7 @@ do IFS=$as_save_IFS test -z "$as_dir" && as_dir=. for ac_exec_ext in '' $ac_executable_extensions; do - if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then + if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then ac_cv_prog_WINDRES="${ac_tool_prefix}windres" $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5 break 2 @@ -15730,7 +15751,7 @@ do IFS=$as_save_IFS test -z "$as_dir" && as_dir=. for ac_exec_ext in '' $ac_executable_extensions; do - if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then + if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then ac_cv_prog_ac_ct_WINDRES="windres" $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5 break 2 @@ -15844,11 +15865,11 @@ else int main () { -/* FIXME: Include the comments suggested by Paul. */ + #ifndef __cplusplus - /* Ultrix mips cc rejects this. */ + /* Ultrix mips cc rejects this sort of thing. */ typedef int charset[2]; - const charset cs; + const charset cs = { 0, 0 }; /* SunOS 4.1.1 cc rejects this. */ char const *const *pcpcc; char **ppc; @@ -15865,8 +15886,9 @@ main () ++pcpcc; ppc = (char**) pcpcc; pcpcc = (char const *const *) ppc; - { /* SCO 3.2v4 cc rejects this. */ - char *t; + { /* SCO 3.2v4 cc rejects this sort of thing. */ + char tx; + char *t = &tx; char const *s = 0 ? (char *) 0 : (char const *) 0; *t++ = 0; @@ -15882,10 +15904,10 @@ main () iptr p = 0; ++p; } - { /* AIX XL C 1.02.0.0 rejects this saying + { /* AIX XL C 1.02.0.0 rejects this sort of thing, saying "k.c", line 2.27: 1506-025 (S) Operand must be a modifiable lvalue. */ - struct s { int j; const int *ap[3]; }; - struct s *b; b->j = 5; + struct s { int j; const int *ap[3]; } bx; + struct s *b = &bx; b->j = 5; } { /* ULTRIX-32 V3.1 (Rev 9) vcc rejects this */ const int foo = 10; @@ -16418,23 +16440,20 @@ else /* end confdefs.h. */ $ac_includes_default int -find_stack_direction () +find_stack_direction (int *addr, int depth) { - static char *addr = 0; - auto char dummy; - if (addr == 0) - { - addr = &dummy; - return find_stack_direction (); - } - else - return (&dummy > addr) ? 1 : -1; + int dir, dummy = 0; + if (! addr) + addr = &dummy; + *addr = addr < &dummy ? 1 : addr == &dummy ? 0 : -1; + dir = depth ? find_stack_direction (addr, depth - 1) : 0; + return dir + dummy; } int -main () +main (int argc, char **argv) { - return find_stack_direction () < 0; + return find_stack_direction (0, argc + !argv + 20) < 0; } _ACEOF if ac_fn_c_try_run "$LINENO"; then : @@ -17909,7 +17928,7 @@ do IFS=$as_save_IFS test -z "$as_dir" && as_dir=. for ac_exec_ext in '' $ac_executable_extensions; do - if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then + if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then ac_cv_path_ESD_CONFIG="$as_dir/$ac_word$ac_exec_ext" $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5 break 2 @@ -18159,7 +18178,7 @@ do IFS=$as_save_IFS test -z "$as_dir" && as_dir=. for ac_exec_ext in '' $ac_executable_extensions; do - if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then + if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then ac_cv_path_PKG_CONFIG="$as_dir/$ac_word$ac_exec_ext" $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5 break 2 @@ -18222,6 +18241,14 @@ cat >>confdefs.h <<_ACEOF #define SDL_AUDIO_DRIVER_PULSEAUDIO_DYNAMIC "$pulseaudio_lib" _ACEOF + + case "$host" in + # On Solaris, pulseaudio must be linked deferred explicitly + # to prevent undefined symbol failures. + *-*-solaris*) + PULSEAUDIO_LIBS=`echo $PULSEAUDIO_LIBS | sed 's/\-l/-Wl,-l/g'` + EXTRA_LDFLAGS="$EXTRA_LDFLAGS -Wl,-zdeferred $PULSEAUDIO_LIBS -Wl,-znodeferred" + esac else EXTRA_LDFLAGS="$EXTRA_LDFLAGS $PULSEAUDIO_LIBS" fi @@ -18258,7 +18285,7 @@ do IFS=$as_save_IFS test -z "$as_dir" && as_dir=. for ac_exec_ext in '' $ac_executable_extensions; do - if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then + if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then ac_cv_path_ARTSCONFIG="$as_dir/$ac_word$ac_exec_ext" $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5 break 2 @@ -20184,7 +20211,7 @@ do IFS=$as_save_IFS test -z "$as_dir" && as_dir=. for ac_exec_ext in '' $ac_executable_extensions; do - if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then + if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then ac_cv_path_DIRECTFBCONFIG="$as_dir/$ac_word$ac_exec_ext" $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5 break 2 @@ -20229,7 +20256,7 @@ do IFS=$as_save_IFS test -z "$as_dir" && as_dir=. for ac_exec_ext in '' $ac_executable_extensions; do - if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then + if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then ac_cv_path_PKG_CONFIG="$as_dir/$ac_word$ac_exec_ext" $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5 break 2 @@ -20373,7 +20400,7 @@ do IFS=$as_save_IFS test -z "$as_dir" && as_dir=. for ac_exec_ext in '' $ac_executable_extensions; do - if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then + if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then ac_cv_path_PKG_CONFIG="$as_dir/$ac_word$ac_exec_ext" $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5 break 2 @@ -20770,7 +20797,7 @@ do IFS=$as_save_IFS test -z "$as_dir" && as_dir=. for ac_exec_ext in '' $ac_executable_extensions; do - if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then + if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then ac_cv_path_PKG_CONFIG="$as_dir/$ac_word$ac_exec_ext" $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5 break 2 @@ -20902,9 +20929,20 @@ fi pthread_cflags="-D_REENTRANT" pthread_lib="-pthread" ;; - *-*-solaris*) + *-*-solaris2.9) + # From Solaris 9+, posix4's preferred name is rt. pthread_cflags="-D_REENTRANT" - pthread_lib="-lpthread -lposix4" + pthread_lib="-lpthread -lrt" + ;; + *-*-solaris2.10) + # Solaris 10+ merged pthread into libc. + pthread_cflags="-D_REENTRANT" + pthread_lib="-lrt" + ;; + *-*-solaris*) + # Solaris 11+ merged rt into libc. + pthread_cflags="-D_REENTRANT" + pthread_lib="" ;; *-*-sysv5*) pthread_cflags="-D_REENTRANT -Kthread" @@ -22975,16 +23013,16 @@ if (echo >conf$$.file) 2>/dev/null; then # ... but there are two gotchas: # 1) On MSYS, both `ln -s file dir' and `ln file dir' fail. # 2) DJGPP < 2.04 has no symlinks; `ln -s' creates a wrapper executable. - # In both cases, we have to default to `cp -p'. + # In both cases, we have to default to `cp -pR'. ln -s conf$$.file conf$$.dir 2>/dev/null && test ! -f conf$$.exe || - as_ln_s='cp -p' + as_ln_s='cp -pR' elif ln conf$$.file conf$$ 2>/dev/null; then as_ln_s=ln else - as_ln_s='cp -p' + as_ln_s='cp -pR' fi else - as_ln_s='cp -p' + as_ln_s='cp -pR' fi rm -f conf$$ conf$$.exe conf$$.dir/conf$$.file conf$$.file rmdir conf$$.dir 2>/dev/null @@ -23044,28 +23082,16 @@ else as_mkdir_p=false fi -if test -x / >/dev/null 2>&1; then - as_test_x='test -x' -else - if ls -dL / >/dev/null 2>&1; then - as_ls_L_option=L - else - as_ls_L_option= - fi - as_test_x=' - eval sh -c '\'' - if test -d "$1"; then - test -d "$1/."; - else - case $1 in #( - -*)set "./$1";; - esac; - case `ls -ld'$as_ls_L_option' "$1" 2>/dev/null` in #(( - ???[sx]*):;;*)false;;esac;fi - '\'' sh - ' -fi -as_executable_p=$as_test_x + +# as_fn_executable_p FILE +# ----------------------- +# Test if FILE is an executable regular file. +as_fn_executable_p () +{ + test -f "$1" && test -x "$1" +} # as_fn_executable_p +as_test_x='test -x' +as_executable_p=as_fn_executable_p # Sed expression to map a string onto a valid CPP name. as_tr_cpp="eval sed 'y%*$as_cr_letters%P$as_cr_LETTERS%;s%[^_$as_cr_alnum]%_%g'" @@ -23087,7 +23113,7 @@ cat >>$CONFIG_STATUS <<\_ACEOF || ac_write_fail=1 # values after options handling. ac_log=" This file was extended by $as_me, which was -generated by GNU Autoconf 2.68. Invocation command line was +generated by GNU Autoconf 2.69. Invocation command line was CONFIG_FILES = $CONFIG_FILES CONFIG_HEADERS = $CONFIG_HEADERS @@ -23153,10 +23179,10 @@ cat >>$CONFIG_STATUS <<_ACEOF || ac_write_fail=1 ac_cs_config="`$as_echo "$ac_configure_args" | sed 's/^ //; s/[\\""\`\$]/\\\\&/g'`" ac_cs_version="\\ config.status -configured by $0, generated by GNU Autoconf 2.68, +configured by $0, generated by GNU Autoconf 2.69, with options \\"\$ac_cs_config\\" -Copyright (C) 2010 Free Software Foundation, Inc. +Copyright (C) 2012 Free Software Foundation, Inc. This config.status script is free software; the Free Software Foundation gives unlimited permission to copy, distribute and modify it." @@ -23246,7 +23272,7 @@ fi _ACEOF cat >>$CONFIG_STATUS <<_ACEOF || ac_write_fail=1 if \$ac_cs_recheck; then - set X '$SHELL' '$0' $ac_configure_args \$ac_configure_extra_args --no-create --no-recursion + set X $SHELL '$0' $ac_configure_args \$ac_configure_extra_args --no-create --no-recursion shift \$as_echo "running CONFIG_SHELL=$SHELL \$*" >&6 CONFIG_SHELL='$SHELL' @@ -25055,3 +25081,4 @@ if test -n "$ac_unrecognized_opts" && test "$enable_option_checking" != no; then $as_echo "$as_me: WARNING: unrecognized options: $ac_unrecognized_opts" >&2;} fi +chmod a+x sdl2-config diff --git a/configure.in b/configure.in index 6d2eacc65..cf4cc9d87 100644 --- a/configure.in +++ b/configure.in @@ -2747,3 +2747,4 @@ AC_CONFIG_FILES([ Makefile:Makefile.in:Makefile.rules sdl2-config SDL2.spec sdl2.pc ]) AC_OUTPUT +chmod a+x sdl2-config From da8a1bb74faa4d241ba874bc147e309591679d18 Mon Sep 17 00:00:00 2001 From: "Ryan C. Gordon" Date: Thu, 16 May 2013 12:16:12 -0400 Subject: [PATCH 103/542] Made SDL_RectEmpty and SDL_RectEquals macros into SDL_FORCE_INLINE functions. Fixes compiler warnings for things like this... if (SDL_RectEmpty(&rect)) {} ...where the macro turned into "if ( (!(&rect)) && etc )" which some compilers thought might be a programmer mistake, as "&rect" is always "true". --- include/SDL_rect.h | 13 +++++++++---- 1 file changed, 9 insertions(+), 4 deletions(-) diff --git a/include/SDL_rect.h b/include/SDL_rect.h index a509c7004..26621a50c 100644 --- a/include/SDL_rect.h +++ b/include/SDL_rect.h @@ -71,14 +71,19 @@ typedef struct SDL_Rect /** * \brief Returns true if the rectangle has no area. */ -#define SDL_RectEmpty(X) ((!(X)) || ((X)->w <= 0) || ((X)->h <= 0)) +SDL_FORCE_INLINE SDL_bool SDL_RectEmpty(const SDL_Rect *r) +{ + return ((!r) || (r->w <= 0) || (r->h <= 0)) ? SDL_TRUE : SDL_FALSE; +} /** * \brief Returns true if the two rectangles are equal. */ -#define SDL_RectEquals(A, B) (((A)) && ((B)) && \ - ((A)->x == (B)->x) && ((A)->y == (B)->y) && \ - ((A)->w == (B)->w) && ((A)->h == (B)->h)) +SDL_FORCE_INLINE SDL_bool SDL_RectEquals(const SDL_Rect *a, const SDL_Rect *b) +{ + return (a && b && (a->x == b->x) && (a->y == b->y) && + (a->w == b->w) && (a->h == b->h)) ? SDL_TRUE : SDL_FALSE; +} /** * \brief Determine whether two rectangles intersect. From 5126239a00e2f0f7579153edab17bdf8c1667c12 Mon Sep 17 00:00:00 2001 From: Philipp Wiesemann Date: Sat, 18 May 2013 14:03:45 +0200 Subject: [PATCH 104/542] Changed import statements in Java file. --- android-project/src/org/libsdl/app/SDLActivity.java | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/android-project/src/org/libsdl/app/SDLActivity.java b/android-project/src/org/libsdl/app/SDLActivity.java index 6d773a023..63342d493 100644 --- a/android-project/src/org/libsdl/app/SDLActivity.java +++ b/android-project/src/org/libsdl/app/SDLActivity.java @@ -3,7 +3,8 @@ package org.libsdl.app; import javax.microedition.khronos.egl.EGL10; import javax.microedition.khronos.egl.EGLConfig; import javax.microedition.khronos.egl.EGLContext; -import javax.microedition.khronos.egl.*; +import javax.microedition.khronos.egl.EGLDisplay; +import javax.microedition.khronos.egl.EGLSurface; import android.app.*; import android.content.*; From 7615624d82582da296fca57440d1eb1832b428b8 Mon Sep 17 00:00:00 2001 From: Philipp Wiesemann Date: Sat, 18 May 2013 14:04:37 +0200 Subject: [PATCH 105/542] Corrected comment in Java file. --- android-project/src/org/libsdl/app/SDLActivity.java | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/android-project/src/org/libsdl/app/SDLActivity.java b/android-project/src/org/libsdl/app/SDLActivity.java index 63342d493..fed65c510 100644 --- a/android-project/src/org/libsdl/app/SDLActivity.java +++ b/android-project/src/org/libsdl/app/SDLActivity.java @@ -43,7 +43,7 @@ public class SDLActivity extends Activity { protected static Thread mAudioThread; protected static AudioTrack mAudioTrack; - // EGL private objects + // EGL objects protected static EGLContext mEGLContext; protected static EGLSurface mEGLSurface; protected static EGLDisplay mEGLDisplay; From f86b25c56e69aa324d56144940a5b1b5ec4138cb Mon Sep 17 00:00:00 2001 From: Philipp Wiesemann Date: Sat, 18 May 2013 14:48:19 +0200 Subject: [PATCH 106/542] Fixed Doxygen warnings. --- include/SDL_events.h | 1 + include/SDL_messagebox.h | 1 + include/SDL_render.h | 25 +++++++++++++++++++++++++ include/SDL_surface.h | 7 +++++++ include/SDL_video.h | 6 ++++++ 5 files changed, 40 insertions(+) diff --git a/include/SDL_events.h b/include/SDL_events.h index ff280574a..6e6a5c8dc 100644 --- a/include/SDL_events.h +++ b/include/SDL_events.h @@ -581,6 +581,7 @@ extern DECLSPEC int SDLCALL SDL_WaitEvent(SDL_Event * event); * * \param event If not NULL, the next event is removed from the queue and * stored in that area. + * \param timeout The timeout (in milliseconds) to wait for next event. */ extern DECLSPEC int SDLCALL SDL_WaitEventTimeout(SDL_Event * event, int timeout); diff --git a/include/SDL_messagebox.h b/include/SDL_messagebox.h index 0fb2f53f1..c037466ce 100644 --- a/include/SDL_messagebox.h +++ b/include/SDL_messagebox.h @@ -108,6 +108,7 @@ typedef struct * \brief Create a modal message box. * * \param messageboxdata The SDL_MessageBoxData structure with title, text, etc. + * \param buttonid The pointer to which user id of hit button should be copied. * * \return -1 on error, otherwise 0 and buttonid contains user id of button * hit or -1 if dialog was closed. diff --git a/include/SDL_render.h b/include/SDL_render.h index 39a7e40ca..8ec365a85 100644 --- a/include/SDL_render.h +++ b/include/SDL_render.h @@ -216,6 +216,7 @@ extern DECLSPEC int SDLCALL SDL_GetRendererInfo(SDL_Renderer * renderer, /** * \brief Create a texture for a rendering context. * + * \param renderer The renderer. * \param format The format of the texture. * \param access One of the enumerated values in ::SDL_TextureAccess. * \param w The width of the texture in pixels. @@ -237,6 +238,7 @@ extern DECLSPEC SDL_Texture * SDLCALL SDL_CreateTexture(SDL_Renderer * renderer, /** * \brief Create a texture from an existing surface. * + * \param renderer The renderer. * \param surface The surface containing pixel data used to fill the texture. * * \return The created texture is returned, or 0 on error. @@ -410,6 +412,7 @@ extern DECLSPEC SDL_bool SDLCALL SDL_RenderTargetSupported(SDL_Renderer *rendere /** * \brief Set a texture as the current rendering target. * + * \param renderer The renderer. * \param texture The targeted texture, which must be created with the SDL_TEXTUREACCESS_TARGET flag, or NULL for the default render target * * \return 0 on success, or -1 on error @@ -431,6 +434,7 @@ extern DECLSPEC SDL_Texture * SDLCALL SDL_GetRenderTarget(SDL_Renderer *renderer /** * \brief Set device independent resolution for rendering * + * \param renderer The renderer for which resolution should be set. * \param w The width of the logical resolution * \param h The height of the logical resolution * @@ -455,6 +459,7 @@ extern DECLSPEC int SDLCALL SDL_RenderSetLogicalSize(SDL_Renderer * renderer, in /** * \brief Get device independent resolution for rendering * + * \param renderer The renderer from which resolution should be queried. * \param w A pointer filled with the width of the logical resolution * \param h A pointer filled with the height of the logical resolution * @@ -465,6 +470,7 @@ extern DECLSPEC void SDLCALL SDL_RenderGetLogicalSize(SDL_Renderer * renderer, i /** * \brief Set the drawing area for rendering on the current target. * + * \param renderer The renderer for which the drawing area should be set. * \param rect The rectangle representing the drawing area, or NULL to set the viewport to the entire target. * * The x,y of the viewport rect represents the origin for rendering. @@ -491,6 +497,7 @@ extern DECLSPEC void SDLCALL SDL_RenderGetViewport(SDL_Renderer * renderer, /** * \brief Set the clip rectangle for the current target. * + * \param renderer The renderer for which clip rectangle should be set. * \param rect A pointer to the rectangle to set as the clip rectangle, or * NULL to disable clipping. * @@ -504,6 +511,7 @@ extern DECLSPEC int SDLCALL SDL_RenderSetClipRect(SDL_Renderer * renderer, /** * \brief Get the clip rectangle for the current target. * + * \param renderer The renderer from which clip rectangle should be queried. * \param rect A pointer filled in with the current clip rectangle, or * an empty rectangle if clipping is disabled. * @@ -515,6 +523,7 @@ extern DECLSPEC void SDLCALL SDL_RenderGetClipRect(SDL_Renderer * renderer, /** * \brief Set the drawing scale for rendering on the current target. * + * \param renderer The renderer for which the drawing scale should be set. * \param scaleX The horizontal scaling factor * \param scaleY The vertical scaling factor * @@ -535,6 +544,7 @@ extern DECLSPEC int SDLCALL SDL_RenderSetScale(SDL_Renderer * renderer, /** * \brief Get the drawing scale for the current target. * + * \param renderer The renderer from which drawing scale should be queried. * \param scaleX A pointer filled in with the horizontal scaling factor * \param scaleY A pointer filled in with the vertical scaling factor * @@ -546,6 +556,7 @@ extern DECLSPEC void SDLCALL SDL_RenderGetScale(SDL_Renderer * renderer, /** * \brief Set the color used for drawing operations (Rect, Line and Clear). * + * \param renderer The renderer for which drawing color should be set. * \param r The red value used to draw on the rendering target. * \param g The green value used to draw on the rendering target. * \param b The blue value used to draw on the rendering target. @@ -561,6 +572,7 @@ extern DECLSPEC int SDL_SetRenderDrawColor(SDL_Renderer * renderer, /** * \brief Get the color used for drawing operations (Rect, Line and Clear). * + * \param renderer The renderer from which drawing color should be queried. * \param r A pointer to the red value used to draw on the rendering target. * \param g A pointer to the green value used to draw on the rendering target. * \param b A pointer to the blue value used to draw on the rendering target. @@ -576,6 +588,7 @@ extern DECLSPEC int SDL_GetRenderDrawColor(SDL_Renderer * renderer, /** * \brief Set the blend mode used for drawing operations (Fill and Line). * + * \param renderer The renderer for which blend mode should be set. * \param blendMode ::SDL_BlendMode to use for blending. * * \return 0 on success, or -1 on error @@ -591,6 +604,7 @@ extern DECLSPEC int SDLCALL SDL_SetRenderDrawBlendMode(SDL_Renderer * renderer, /** * \brief Get the blend mode used for drawing operations. * + * \param renderer The renderer from which blend mode should be queried. * \param blendMode A pointer filled in with the current blend mode. * * \return 0 on success, or -1 on error @@ -612,6 +626,7 @@ extern DECLSPEC int SDLCALL SDL_RenderClear(SDL_Renderer * renderer); /** * \brief Draw a point on the current rendering target. * + * \param renderer The renderer which should draw a point. * \param x The x coordinate of the point. * \param y The y coordinate of the point. * @@ -623,6 +638,7 @@ extern DECLSPEC int SDLCALL SDL_RenderDrawPoint(SDL_Renderer * renderer, /** * \brief Draw multiple points on the current rendering target. * + * \param renderer The renderer which should draw multiple points. * \param points The points to draw * \param count The number of points to draw * @@ -635,6 +651,7 @@ extern DECLSPEC int SDLCALL SDL_RenderDrawPoints(SDL_Renderer * renderer, /** * \brief Draw a line on the current rendering target. * + * \param renderer The renderer which should draw a line. * \param x1 The x coordinate of the start point. * \param y1 The y coordinate of the start point. * \param x2 The x coordinate of the end point. @@ -648,6 +665,7 @@ extern DECLSPEC int SDLCALL SDL_RenderDrawLine(SDL_Renderer * renderer, /** * \brief Draw a series of connected lines on the current rendering target. * + * \param renderer The renderer which should draw multiple lines. * \param points The points along the lines * \param count The number of points, drawing count-1 lines * @@ -660,6 +678,7 @@ extern DECLSPEC int SDLCALL SDL_RenderDrawLines(SDL_Renderer * renderer, /** * \brief Draw a rectangle on the current rendering target. * + * \param renderer The renderer which should draw a rectangle. * \param rect A pointer to the destination rectangle, or NULL to outline the entire rendering target. * * \return 0 on success, or -1 on error @@ -670,6 +689,7 @@ extern DECLSPEC int SDLCALL SDL_RenderDrawRect(SDL_Renderer * renderer, /** * \brief Draw some number of rectangles on the current rendering target. * + * \param renderer The renderer which should draw multiple rectangles. * \param rects A pointer to an array of destination rectangles. * \param count The number of rectangles. * @@ -682,6 +702,7 @@ extern DECLSPEC int SDLCALL SDL_RenderDrawRects(SDL_Renderer * renderer, /** * \brief Fill a rectangle on the current rendering target with the drawing color. * + * \param renderer The renderer which should fill a rectangle. * \param rect A pointer to the destination rectangle, or NULL for the entire * rendering target. * @@ -693,6 +714,7 @@ extern DECLSPEC int SDLCALL SDL_RenderFillRect(SDL_Renderer * renderer, /** * \brief Fill some number of rectangles on the current rendering target with the drawing color. * + * \param renderer The renderer which should fill multiple rectangles. * \param rects A pointer to an array of destination rectangles. * \param count The number of rectangles. * @@ -705,6 +727,7 @@ extern DECLSPEC int SDLCALL SDL_RenderFillRects(SDL_Renderer * renderer, /** * \brief Copy a portion of the texture to the current rendering target. * + * \param renderer The renderer which should copy parts of a texture. * \param texture The source texture. * \param srcrect A pointer to the source rectangle, or NULL for the entire * texture. @@ -721,6 +744,7 @@ extern DECLSPEC int SDLCALL SDL_RenderCopy(SDL_Renderer * renderer, /** * \brief Copy a portion of the source texture to the current rendering target, rotating it by angle around the given center * + * \param renderer The renderer which should copy parts of a texture. * \param texture The source texture. * \param srcrect A pointer to the source rectangle, or NULL for the entire * texture. @@ -743,6 +767,7 @@ extern DECLSPEC int SDLCALL SDL_RenderCopyEx(SDL_Renderer * renderer, /** * \brief Read pixels from the current rendering target. * + * \param renderer The renderer from which pixels should be read. * \param rect A pointer to the rectangle to read, or NULL for the entire * render target. * \param format The desired format of the pixel data, or 0 to use the format diff --git a/include/SDL_surface.h b/include/SDL_surface.h index 13704baf2..a066b885c 100644 --- a/include/SDL_surface.h +++ b/include/SDL_surface.h @@ -109,6 +109,13 @@ typedef int (*SDL_blit) (struct SDL_Surface * src, SDL_Rect * srcrect, * If the function runs out of memory, it will return NULL. * * \param flags The \c flags are obsolete and should be set to 0. + * \param width The width in pixels of the surface to create. + * \param height The height in pixels of the surface to create. + * \param depth The depth in bits of the surface to create. + * \param Rmask The red mask of the surface to create. + * \param Gmask The green mask of the surface to create. + * \param Bmask The blue mask of the surface to create. + * \param Amask The alpha mask of the surface to create. */ extern DECLSPEC SDL_Surface *SDLCALL SDL_CreateRGBSurface (Uint32 flags, int width, int height, int depth, diff --git a/include/SDL_video.h b/include/SDL_video.h index e731694ca..d51da4d6b 100644 --- a/include/SDL_video.h +++ b/include/SDL_video.h @@ -323,6 +323,7 @@ extern DECLSPEC int SDLCALL SDL_GetCurrentDisplayMode(int displayIndex, SDL_Disp /** * \brief Get the closest match to the requested display mode. * + * \param displayIndex The index of display from which mode should be queried. * \param mode The desired display mode * \param closest A pointer to a display mode to be filled in with the closest * match of the available display modes. @@ -356,6 +357,7 @@ extern DECLSPEC int SDLCALL SDL_GetWindowDisplayIndex(SDL_Window * window); * By default the window's dimensions and the desktop format and refresh rate * are used. * + * \param window The window for which the display mode should be set. * \param mode The mode to use, or NULL for the default mode. * * \return 0 on success, or -1 if setting the display mode failed. @@ -450,6 +452,7 @@ extern DECLSPEC const char *SDLCALL SDL_GetWindowTitle(SDL_Window * window); /** * \brief Set the icon for a window. * + * \param window The window for which the icon should be set. * \param icon The icon for the window. */ extern DECLSPEC void SDLCALL SDL_SetWindowIcon(SDL_Window * window, @@ -707,6 +710,7 @@ extern DECLSPEC int SDLCALL SDL_UpdateWindowSurfaceRects(SDL_Window * window, /** * \brief Set a window's input grab mode. * + * \param window The window for which the input grab mode should be set. * \param grabbed This is SDL_TRUE to grab input, and SDL_FALSE to release input. * * \sa SDL_GetWindowGrab() @@ -745,6 +749,7 @@ extern DECLSPEC float SDLCALL SDL_GetWindowBrightness(SDL_Window * window); /** * \brief Set the gamma ramp for a window. * + * \param window The window for which the gamma ramp should be set. * \param red The translation table for the red channel, or NULL. * \param green The translation table for the green channel, or NULL. * \param blue The translation table for the blue channel, or NULL. @@ -767,6 +772,7 @@ extern DECLSPEC int SDLCALL SDL_SetWindowGammaRamp(SDL_Window * window, /** * \brief Get the gamma ramp for a window. * + * \param window The window from which the gamma ramp should be queried. * \param red A pointer to a 256 element array of 16-bit quantities to hold * the translation table for the red channel, or NULL. * \param green A pointer to a 256 element array of 16-bit quantities to hold From 2ff60371f571e0c88ea036a78240215002259ddd Mon Sep 17 00:00:00 2001 From: Andreas Schiffler Date: Sat, 18 May 2013 09:35:09 -0700 Subject: [PATCH 107/542] Update test harness to handle test return codes; fix comment format in harness; update Main test suite to handle globally disabled features --- include/SDL_test_harness.h | 7 +- src/test/SDL_test_harness.c | 126 ++++++++++++++++++++++-------------- test/testautomation_main.c | 26 ++++++-- 3 files changed, 102 insertions(+), 57 deletions(-) diff --git a/include/SDL_test_harness.h b/include/SDL_test_harness.h index e5fe673af..f2c553cb2 100644 --- a/include/SDL_test_harness.h +++ b/include/SDL_test_harness.h @@ -51,8 +51,9 @@ extern "C" { //! Definition of all the possible test return values of the test case method #define TEST_ABORTED -1 -#define TEST_COMPLETED 0 -#define TEST_SKIPPED 1 +#define TEST_STARTED 0 +#define TEST_COMPLETED 1 +#define TEST_SKIPPED 2 //! Definition of all the possible test results for the harness #define TEST_RESULT_PASSED 0 @@ -65,7 +66,7 @@ extern "C" { typedef void (*SDLTest_TestCaseSetUpFp)(void *arg); //!< Function pointer to a test case function -typedef void (*SDLTest_TestCaseFp)(void *arg); +typedef int (*SDLTest_TestCaseFp)(void *arg); //!< Function pointer to a test case teardown function (run after every test) typedef void (*SDLTest_TestCaseTearDownFp)(void *arg); diff --git a/src/test/SDL_test_harness.c b/src/test/SDL_test_harness.c index fcd2e4f5c..d3c0266cf 100644 --- a/src/test/SDL_test_harness.c +++ b/src/test/SDL_test_harness.c @@ -57,20 +57,20 @@ SDLTest_GenerateRunSeed(const int length) SDLTest_RandomContext randomContext; int counter; - // Sanity check input + /* Sanity check input */ if (length <= 0) { SDLTest_LogError("The length of the harness seed must be >0."); return NULL; } - // Allocate output buffer + /* Allocate output buffer */ seed = (char *)SDL_malloc((length + 1) * sizeof(char)); if (seed == NULL) { SDLTest_LogError("SDL_malloc for run seed output buffer failed."); return NULL; } - // Generate a random string of alphanumeric characters + /* Generate a random string of alphanumeric characters */ SDLTest_RandomInitTime(&randomContext); for (counter = 0; counter < length - 1; ++counter) { unsigned int number = SDLTest_Random(&randomContext); @@ -129,11 +129,11 @@ SDLTest_GenerateExecKey(char *runSeed, char *suiteName, char *testName, int iter return -1; } - // Convert iteration number into a string + /* Convert iteration number into a string */ SDL_memset(iterationString, 0, sizeof(iterationString)); SDL_snprintf(iterationString, sizeof(iterationString) - 1, "%d", iteration); - // Combine the parameters into single string + /* Combine the parameters into single string */ runSeedLength = SDL_strlen(runSeed); suiteNameLength = SDL_strlen(suiteName); testNameLength = SDL_strlen(testName); @@ -146,7 +146,7 @@ SDLTest_GenerateExecKey(char *runSeed, char *suiteName, char *testName, int iter } SDL_snprintf(buffer, entireStringLength, "%s%s%s%d", runSeed, suiteName, testName, iteration); - // Hash string and use half of the digest as 64bit exec key + /* Hash string and use half of the digest as 64bit exec key */ SDLTest_Md5Init(&md5Context); SDLTest_Md5Update(&md5Context, (unsigned char *)buffer, entireStringLength); SDLTest_Md5Final(&md5Context); @@ -208,7 +208,7 @@ void SDLTest_BailOut() { SDLTest_LogError("TestCaseTimeout timer expired. Aborting test run."); - exit(TEST_ABORTED); // bail out from the test + exit(TEST_ABORTED); /* bail out from the test */ } /** @@ -224,6 +224,7 @@ int SDLTest_RunTest(SDLTest_TestSuiteReference *testSuite, SDLTest_TestCaseReference *testCase, Uint64 execKey) { SDL_TimerID timer = 0; + int testCaseResult = 0; int testResult = 0; int fuzzerCount; @@ -240,16 +241,16 @@ SDLTest_RunTest(SDLTest_TestSuiteReference *testSuite, SDLTest_TestCaseReference } - // Initialize fuzzer + /* Initialize fuzzer */ SDLTest_FuzzerInit(execKey); - // Reset assert tracker + /* Reset assert tracker */ SDLTest_ResetAssertSummary(); - // Set timeout timer + /* Set timeout timer */ timer = SDLTest_SetTestTimeout(SDLTest_TestCaseTimeout, SDLTest_BailOut); - // Maybe run suite initalizer function + /* Maybe run suite initalizer function */ if (testSuite->testSetUp) { testSuite->testSetUp(0x0); if (SDLTest_AssertSummaryToTestResult() == TEST_RESULT_FAILED) { @@ -258,26 +259,53 @@ SDLTest_RunTest(SDLTest_TestSuiteReference *testSuite, SDLTest_TestCaseReference } } - // Run test case function - testCase->testCase(0x0); - testResult = SDLTest_AssertSummaryToTestResult(); + /* Run test case function */ + testCaseResult = testCase->testCase(0x0); + + /* Convert test execution result into harness result */ + if (testCaseResult == TEST_SKIPPED) { + /* Test was programatically skipped */ + testResult = TEST_RESULT_SKIPPED; + } else if (testCaseResult == TEST_STARTED) { + /* Test did not return a TEST_COMPLETED value; assume it failed */ + testResult = TEST_RESULT_FAILED; + } else if (testCaseResult == TEST_ABORTED) { + /* Test was aborted early; assume it failed */ + testResult = TEST_RESULT_FAILED; + } else { + /* Perform failure analysis based on asserts */ + testResult = SDLTest_AssertSummaryToTestResult(); + } - // Maybe run suite cleanup function (ignore failed asserts) + /* Maybe run suite cleanup function (ignore failed asserts) */ if (testSuite->testTearDown) { testSuite->testTearDown(0x0); } - // Cancel timeout timer + /* Cancel timeout timer */ if (timer) { SDL_RemoveTimer(timer); } - // Report on asserts and fuzzer usage + /* Report on asserts and fuzzer usage */ fuzzerCount = SDLTest_GetFuzzerInvocationCount(); if (fuzzerCount > 0) { SDLTest_Log("Fuzzer invocations: %d", fuzzerCount); } - SDLTest_LogAssertSummary(); + + /* Final log based on test execution result */ + if (testCaseResult == TEST_SKIPPED) { + /* Test was programatically skipped */ + SDLTest_Log((char *)SDLTest_FinalResultFormat, "Test", testCase->name, "Skipped (Programmatically)"); + } else if (testCaseResult == TEST_STARTED) { + /* Test did not return a TEST_COMPLETED value; assume it failed */ + SDLTest_LogError((char *)SDLTest_FinalResultFormat, "Test", testCase->name, "Failed (test started, but did not return TEST_COMPLETED)"); + } else if (testCaseResult == TEST_ABORTED) { + /* Test was aborted early; assume it failed */ + SDLTest_LogError((char *)SDLTest_FinalResultFormat, "Test", testCase->name, "Failed (Aborted)"); + } else { + SDLTest_LogAssertSummary(); + } return testResult; } @@ -290,7 +318,7 @@ void SDLTest_LogTestSuiteSummary(SDLTest_TestSuiteReference *testSuites) SDLTest_TestSuiteReference *testSuite; SDLTest_TestCaseReference *testCase; - // Loop over all suites + /* Loop over all suites */ suiteCounter = 0; while(&testSuites[suiteCounter]) { testSuite=&testSuites[suiteCounter]; @@ -298,7 +326,7 @@ void SDLTest_LogTestSuiteSummary(SDLTest_TestSuiteReference *testSuites) SDLTest_Log("Test Suite %i - %s\n", suiteCounter, (testSuite->name) ? testSuite->name : SDLTest_InvalidNameFormat); - // Loop over all test cases + /* Loop over all test cases */ testCounter = 0; while(testSuite->testCases[testCounter]) { @@ -365,12 +393,12 @@ int SDLTest_RunSuites(SDLTest_TestSuiteReference *testSuites[], const char *user Uint32 countSum = 0; char *logFormat = (char *)SDLTest_LogSummaryFormat; - // Sanitize test iterations + /* Sanitize test iterations */ if (testIterations < 1) { testIterations = 1; } - // Generate run see if we don't have one already + /* Generate run see if we don't have one already */ if (userRunSeed == NULL || SDL_strlen(userRunSeed) == 0) { runSeed = SDLTest_GenerateRunSeed(16); if (runSeed == NULL) { @@ -382,18 +410,18 @@ int SDLTest_RunSuites(SDLTest_TestSuiteReference *testSuites[], const char *user } - // Reset per-run counters + /* Reset per-run counters */ totalTestFailedCount = 0; totalTestPassedCount = 0; totalTestSkippedCount = 0; - // Take time - run start + /* Take time - run start */ runStartSeconds = GetClock(); - // Log run with fuzzer parameters + /* Log run with fuzzer parameters */ SDLTest_Log("::::: Test Run /w seed '%s' started\n", runSeed); - // Initialize filtering + /* Initialize filtering */ if (filter != NULL && SDL_strlen(filter) > 0) { /* Loop over all suites to check if we have a filter match */ suiteCounter = 0; @@ -433,36 +461,36 @@ int SDLTest_RunSuites(SDLTest_TestSuiteReference *testSuites[], const char *user } } - // Loop over all suites + /* Loop over all suites */ suiteCounter = 0; while(testSuites[suiteCounter]) { testSuite=(SDLTest_TestSuiteReference *)testSuites[suiteCounter]; currentSuiteName = (char *)((testSuite->name) ? testSuite->name : SDLTest_InvalidNameFormat); suiteCounter++; - // Filter suite if flag set and we have a name + /* Filter suite if flag set and we have a name */ if (suiteFilter == 1 && suiteFilterName != NULL && testSuite->name != NULL && SDL_strcmp(suiteFilterName, testSuite->name) != 0) { - // Skip suite + /* Skip suite */ SDLTest_Log("===== Test Suite %i: '%s' skipped\n", suiteCounter, currentSuiteName); } else { - // Reset per-suite counters + /* Reset per-suite counters */ testFailedCount = 0; testPassedCount = 0; testSkippedCount = 0; - // Take time - suite start + /* Take time - suite start */ suiteStartSeconds = GetClock(); - // Log suite started + /* Log suite started */ SDLTest_Log("===== Test Suite %i: '%s' started\n", suiteCounter, currentSuiteName); - // Loop over all test cases + /* Loop over all test cases */ testCounter = 0; while(testSuite->testCases[testCounter]) { @@ -470,25 +498,25 @@ int SDLTest_RunSuites(SDLTest_TestSuiteReference *testSuites[], const char *user currentTestName = (char *)((testCase->name) ? testCase->name : SDLTest_InvalidNameFormat); testCounter++; - // Filter tests if flag set and we have a name + /* Filter tests if flag set and we have a name */ if (testFilter == 1 && testFilterName != NULL && testCase->name != NULL && SDL_strcmp(testFilterName, testCase->name) != 0) { - // Skip test + /* Skip test */ SDLTest_Log("===== Test Case %i.%i: '%s' skipped\n", suiteCounter, testCounter, currentTestName); } else { - // Override 'disabled' flag if we specified a test filter (i.e. force run for debugging) + /* Override 'disabled' flag if we specified a test filter (i.e. force run for debugging) */ if (testFilter == 1 && !testCase->enabled) { SDLTest_Log("Force run of disabled test since test filter was set"); testCase->enabled = 1; } - // Take time - test start + /* Take time - test start */ testStartSeconds = GetClock(); - // Log test started + /* Log test started */ SDLTest_Log("----- Test Case %i.%i: '%s' started", suiteCounter, testCounter, @@ -498,7 +526,7 @@ int SDLTest_RunSuites(SDLTest_TestSuiteReference *testSuites[], const char *user (testCase->description) ? testCase->description : SDLTest_InvalidNameFormat); } - // Loop over all iterations + /* Loop over all iterations */ iterationCounter = 0; while(iterationCounter < testIterations) { @@ -525,21 +553,21 @@ int SDLTest_RunSuites(SDLTest_TestSuiteReference *testSuites[], const char *user } } - // Take time - test end + /* Take time - test end */ testEndSeconds = GetClock(); runtime = testEndSeconds - testStartSeconds; if (runtime < 0.0f) runtime = 0.0f; if (testIterations > 1) { - // Log test runtime + /* Log test runtime */ SDLTest_Log("Runtime of %i iterations: %.1f sec", testIterations, runtime); SDLTest_Log("Average Test runtime: %.5f sec", runtime / (float)testIterations); } else { - // Log test runtime + /* Log test runtime */ SDLTest_Log("Total Test runtime: %.1f sec", runtime); } - // Log final test result + /* Log final test result */ switch (testResult) { case TEST_RESULT_PASSED: SDLTest_Log((char *)SDLTest_FinalResultFormat, "Test", currentTestName, "Passed"); @@ -555,15 +583,15 @@ int SDLTest_RunSuites(SDLTest_TestSuiteReference *testSuites[], const char *user } } - // Take time - suite end + /* Take time - suite end */ suiteEndSeconds = GetClock(); runtime = suiteEndSeconds - suiteStartSeconds; if (runtime < 0.0f) runtime = 0.0f; - // Log suite runtime + /* Log suite runtime */ SDLTest_Log("Total Suite runtime: %.1f sec", runtime); - // Log summary and final Suite result + /* Log summary and final Suite result */ countSum = testPassedCount + testFailedCount + testSkippedCount; if (testFailedCount == 0) { @@ -579,15 +607,15 @@ int SDLTest_RunSuites(SDLTest_TestSuiteReference *testSuites[], const char *user } } - // Take time - run end + /* Take time - run end */ runEndSeconds = GetClock(); runtime = runEndSeconds - runStartSeconds; if (runtime < 0.0f) runtime = 0.0f; - // Log total runtime + /* Log total runtime */ SDLTest_Log("Total Run runtime: %.1f sec", runtime); - // Log summary and final run result + /* Log summary and final run result */ countSum = totalTestPassedCount + totalTestFailedCount + totalTestSkippedCount; if (totalTestFailedCount == 0) { diff --git a/test/testautomation_main.c b/test/testautomation_main.c index 9873c7e41..a39bf3ca1 100644 --- a/test/testautomation_main.c +++ b/test/testautomation_main.c @@ -11,13 +11,16 @@ /*! - * \brief Tests SDL_Init() and SDL_Quit() + * \brief Tests SDL_Init() and SDL_Quit() of Joystick and Haptic subsystems * \sa * http://wiki.libsdl.org/moin.cgi/SDL_Init * http://wiki.libsdl.org/moin.cgi/SDL_Quit */ -static int main_testInitQuit (void *arg) +static int main_testInitQuitJoystickHaptic (void *arg) { +#if defined SDL_JOYSTICK_DISABLED || defined SDL_HAPTIC_DISABLED + return TEST_SKIPPED; +#else int enabled_subsystems; int initialized_subsystems = SDL_INIT_JOYSTICK | SDL_INIT_HAPTIC; @@ -32,6 +35,7 @@ static int main_testInitQuit (void *arg) SDLTest_AssertCheck( enabled_subsystems == 0, "SDL_Quit should shut down everything (%i)", enabled_subsystems ); return TEST_COMPLETED; +#endif } /*! @@ -42,6 +46,9 @@ static int main_testInitQuit (void *arg) */ static int main_testInitQuitSubSystem (void *arg) { +#if defined SDL_JOYSTICK_DISABLED || defined SDL_HAPTIC_DISABLED || defined SDL_GAMECONTROLLER_DISABLED + return TEST_SKIPPED; +#else int i; int subsystems[] = { SDL_INIT_JOYSTICK, SDL_INIT_HAPTIC, SDL_INIT_GAMECONTROLLER }; @@ -61,11 +68,15 @@ static int main_testInitQuitSubSystem (void *arg) } return TEST_COMPLETED; +#endif } const int joy_and_controller = SDL_INIT_JOYSTICK | SDL_INIT_GAMECONTROLLER; static int main_testImpliedJoystickInit (void *arg) { +#if defined SDL_JOYSTICK_DISABLED || defined SDL_GAMECONTROLLER_DISABLED + return TEST_SKIPPED; +#else int initialized_system; // First initialize the controller @@ -82,11 +93,15 @@ static int main_testImpliedJoystickInit (void *arg) initialized_system = SDL_WasInit(joy_and_controller); SDLTest_AssertCheck( (initialized_system & joy_and_controller) == 0, "SDL_WasInit() should be false for joystick & controller (%x)", initialized_system ); - return TEST_COMPLETED; + return TEST_COMPLETED; +#endif } static int main_testImpliedJoystickQuit (void *arg) { +#if defined SDL_JOYSTICK_DISABLED || defined SDL_GAMECONTROLLER_DISABLED + return TEST_SKIPPED; +#else int initialized_system; // First initialize the controller and the joystick (explicitly) @@ -106,11 +121,12 @@ static int main_testImpliedJoystickQuit (void *arg) SDL_QuitSubSystem(SDL_INIT_JOYSTICK); - return TEST_COMPLETED; + return TEST_COMPLETED; +#endif } static const SDLTest_TestCaseReference mainTest1 = - { (SDLTest_TestCaseFp)main_testInitQuit, "main_testInitQuit", "Tests SDL_Init/Quit", TEST_ENABLED}; + { (SDLTest_TestCaseFp)main_testInitQuitJoystickHaptic, "main_testInitQuitJoystickHaptic", "Tests SDL_Init/Quit of Joystick and Haptic subsystem", TEST_ENABLED}; static const SDLTest_TestCaseReference mainTest2 = { (SDLTest_TestCaseFp)main_testInitQuitSubSystem, "main_testInitQuitSubSystem", "Tests SDL_InitSubSystem/QuitSubSystem", TEST_ENABLED}; From 2ac86249308911bf6e2a13495dd036f69f37bd94 Mon Sep 17 00:00:00 2001 From: Sam Lantinga Date: Sat, 18 May 2013 12:48:50 -0700 Subject: [PATCH 108/542] Added mobile application events, with implementations for iOS and Android --- README.iOS | 63 +++++++++++++++++++ .../src/org/libsdl/app/SDLActivity.java | 16 +++-- include/SDL_events.h | 36 ++++++++++- src/core/android/SDL_android.cpp | 20 +++++- src/events/SDL_events.c | 22 +++++-- src/events/SDL_events_c.h | 1 + src/events/SDL_quit.c | 10 +-- src/video/uikit/SDL_uikitappdelegate.m | 52 ++++++++------- src/video/uikit/SDL_uikitopengles.m | 6 +- 9 files changed, 182 insertions(+), 44 deletions(-) diff --git a/README.iOS b/README.iOS index a1844a3fb..60f3391dc 100644 --- a/README.iOS +++ b/README.iOS @@ -54,6 +54,69 @@ Here is a more manual method: 4. Remove the ApplicationDelegate.h and ApplicationDelegate.m files -- SDL for iPhone provides its own UIApplicationDelegate. Remove MainWindow.xib -- SDL for iPhone produces its user interface programmatically. 5. Delete the contents of main.m and program your app as a regular SDL program instead. You may replace main.m with your own main.c, but you must tell XCode not to use the project prefix file, as it includes Objective-C code. +============================================================================== +Notes -- Application events +============================================================================== + +On iOS the application goes through a fixed life cycle and you will get +notifications of state changes via application events. When these events +are delivered you must handle them in an event callback because the OS may +not give you any processing time after the events are delivered. + +e.g. + +int HandleAppEvents(void *userdata, SDL_Event *event) +{ + switch (event->type) + { + case SDL_APP_TERMINATING: + /* Terminate the app. + Shut everything down before returning from this function. + */ + return 0; + case SDL_APP_LOWMEMORY: + /* You will get this when your app is paused and iOS wants more memory. + Release as much memory as possible. + */ + return 0; + case SDL_APP_WILLENTERBACKGROUND: + /* Prepare your app to go into the background. Stop loops, etc. + This gets called when the user hits the home button, or gets a call. + */ + return 0; + case SDL_APP_DIDENTERBACKGROUND: + /* This will get called if the user accepted whatever sent your app to the background. + If the user got a phone call and canceled it, you'll instead get an SDL_APP_DIDENTERFOREGROUND event and restart your loops. + When you get this, you have 5 seconds to save all your state or the app will be terminated. + Your app is NOT active at this point. + */ + return 0; + case SDL_APP_WILLENTERFOREGROUND: + /* This call happens when your app is coming back to the foreground. + Restore all your state here. + */ + return 0; + case SDL_APP_DIDENTERFOREGROUND: + /* Restart your loops here. + Your app is interactive and getting CPU again. + */ + return 0; + default: + /* No special processing, add it to the event queue */ + return 1; + } +} + +int main(int argc, char *argv[]) +{ + SDL_SetEventFilter(HandleAppEvents, NULL); + + ... run your main loop + + return 0; +} + + ============================================================================== Notes -- Accelerometer as Joystick ============================================================================== diff --git a/android-project/src/org/libsdl/app/SDLActivity.java b/android-project/src/org/libsdl/app/SDLActivity.java index fed65c510..04bbeff15 100644 --- a/android-project/src/org/libsdl/app/SDLActivity.java +++ b/android-project/src/org/libsdl/app/SDLActivity.java @@ -78,17 +78,26 @@ public class SDLActivity extends Activity { } // Events - /*protected void onPause() { + @Override + protected void onPause() { Log.v("SDL", "onPause()"); super.onPause(); // Don't call SDLActivity.nativePause(); here, it will be called by SDLSurface::surfaceDestroyed } + @Override protected void onResume() { Log.v("SDL", "onResume()"); super.onResume(); // Don't call SDLActivity.nativeResume(); here, it will be called via SDLSurface::surfaceChanged->SDLActivity::startApp - }*/ + } + + @Override + public void onLowMemory() { + Log.v("SDL", "onLowMemory()"); + super.onLowMemory(); + SDLActivity.nativeLowMemory(); + } @Override protected void onDestroy() { @@ -180,6 +189,7 @@ public class SDLActivity extends Activity { // C functions we call public static native void nativeInit(); + public static native void nativeLowMemory(); public static native void nativeQuit(); public static native void nativePause(); public static native void nativeResume(); @@ -600,8 +610,6 @@ class SDLSurface extends SurfaceView implements SurfaceHolder.Callback, public void onDraw(Canvas canvas) {} - - // Key events @Override public boolean onKey(View v, int keyCode, KeyEvent event) { diff --git a/include/SDL_events.h b/include/SDL_events.h index 6e6a5c8dc..65ba6b158 100644 --- a/include/SDL_events.h +++ b/include/SDL_events.h @@ -61,6 +61,32 @@ typedef enum /* Application events */ SDL_QUIT = 0x100, /**< User-requested quit */ + /* These application events have special meaning on iOS, see README.iOS for details */ + SDL_APP_TERMINATING, /**< The application is being terminated by the OS + Called on iOS in applicationWillTerminate() + Called on Android in onDestroy() + */ + SDL_APP_LOWMEMORY, /**< The application is low on memory, free memory if possible. + Called on iOS in applicationDidReceiveMemoryWarning() + Called on Android in onLowMemory() + */ + SDL_APP_WILLENTERBACKGROUND, /**< The application is about to enter the background + Called on iOS in applicationWillResignActive() + Called on Android in onPause() + */ + SDL_APP_DIDENTERBACKGROUND, /**< The application did enter the background and may not get CPU for some time + Called on iOS in applicationDidEnterBackground() + Called on Android in onPause() + */ + SDL_APP_WILLENTERFOREGROUND, /**< The application is about to enter the foreground + Called on iOS in applicationWillEnterForeground() + Called on Android in onResume() + */ + SDL_APP_DIDENTERFOREGROUND, /**< The application is now interactive + Called on iOS in applicationDidBecomeActive() + Called on Android in onResume() + */ + /* Window events */ SDL_WINDOWEVENT = 0x200, /**< Window state change */ SDL_SYSWMEVENT, /**< System specific event */ @@ -109,7 +135,7 @@ typedef enum /* Drag and drop events */ SDL_DROPFILE = 0x1000, /**< The system requests a file open */ - + /** Events ::SDL_USEREVENT through ::SDL_LASTEVENT are for your use, * and should be allocated with SDL_RegisterEvents() */ @@ -427,6 +453,14 @@ typedef struct SDL_QuitEvent Uint32 timestamp; } SDL_QuitEvent; +/** + * \brief OS Specific event + */ +typedef struct SDL_OSEvent +{ + Uint32 type; /**< ::SDL_QUIT */ + Uint32 timestamp; +} SDL_OSEvent; /** * \brief A user-defined event type (event.user.*) diff --git a/src/core/android/SDL_android.cpp b/src/core/android/SDL_android.cpp index ceb3555b0..cf0e0c129 100644 --- a/src/core/android/SDL_android.cpp +++ b/src/core/android/SDL_android.cpp @@ -181,12 +181,20 @@ extern "C" void Java_org_libsdl_app_SDLActivity_onNativeAccel( bHasNewData = true; } +// Low memory +extern "C" void Java_org_libsdl_app_SDLActivity_nativeLowMemory( + JNIEnv* env, jclass cls) +{ + SDL_SendAppEvent(SDL_APP_LOWMEMORY); +} + // Quit extern "C" void Java_org_libsdl_app_SDLActivity_nativeQuit( JNIEnv* env, jclass cls) { // Inject a SDL_QUIT event SDL_SendQuit(); + SDL_SendAppEvent(SDL_APP_TERMINATING); } // Pause @@ -199,12 +207,20 @@ extern "C" void Java_org_libsdl_app_SDLActivity_nativePause( SDL_SendWindowEvent(Android_Window, SDL_WINDOWEVENT_FOCUS_LOST, 0, 0); SDL_SendWindowEvent(Android_Window, SDL_WINDOWEVENT_MINIMIZED, 0, 0); } + + __android_log_print(ANDROID_LOG_VERBOSE, "SDL", "nativePause()"); + SDL_SendAppEvent(SDL_APP_WILLENTERBACKGROUND); + SDL_SendAppEvent(SDL_APP_DIDENTERBACKGROUND); } // Resume extern "C" void Java_org_libsdl_app_SDLActivity_nativeResume( JNIEnv* env, jclass cls) { + __android_log_print(ANDROID_LOG_VERBOSE, "SDL", "nativeResume()"); + SDL_SendAppEvent(SDL_APP_WILLENTERFOREGROUND); + SDL_SendAppEvent(SDL_APP_DIDENTERFOREGROUND); + if (Android_Window) { /* Signal the resume semaphore so the event loop knows to resume and restore the GL Context * We can't restore the GL Context here because it needs to be done on the SDL main thread @@ -616,7 +632,9 @@ static int Android_JNI_FileOpen(SDL_RWops* ctx) if (false) { fallback: - __android_log_print(ANDROID_LOG_DEBUG, "SDL", "Falling back to legacy InputStream method for opening file"); + // Disabled log message because of spam on the Nexus 7 + //__android_log_print(ANDROID_LOG_DEBUG, "SDL", "Falling back to legacy InputStream method for opening file"); + /* Try the old method using InputStream */ ctx->hidden.androidio.assetFileDescriptorRef = NULL; diff --git a/src/events/SDL_events.c b/src/events/SDL_events.c index ecba3bb5b..d6bb22e06 100644 --- a/src/events/SDL_events.c +++ b/src/events/SDL_events.c @@ -111,6 +111,7 @@ SDL_StopEventLoop(void) SDL_event_watchers = tmp->next; SDL_free(tmp); } + SDL_EventOK = NULL; } /* This function (and associated calls) may be called more than once */ @@ -133,8 +134,7 @@ SDL_StartEventLoop(void) } #endif /* !SDL_THREADS_DISABLED */ - /* No filter to start with, process most event types */ - SDL_EventOK = NULL; + /* Process most event types */ SDL_EventState(SDL_TEXTINPUT, SDL_DISABLE); SDL_EventState(SDL_TEXTEDITING, SDL_DISABLE); SDL_EventState(SDL_SYSWMEVENT, SDL_DISABLE); @@ -365,7 +365,9 @@ int SDL_PushEvent(SDL_Event * event) { SDL_EventWatcher *curr; + event->common.timestamp = SDL_GetTicks(); + if (SDL_EventOK && !SDL_EventOK(SDL_EventOKParam, event)) { return 0; } @@ -516,8 +518,20 @@ SDL_RegisterEvents(int numevents) return event_base; } -/* This is a generic event handler. - */ +int +SDL_SendAppEvent(SDL_EventType eventType) +{ + int posted; + + posted = 0; + if (SDL_GetEventState(eventType) == SDL_ENABLE) { + SDL_Event event; + event.type = eventType; + posted = (SDL_PushEvent(&event) > 0); + } + return (posted); +} + int SDL_SendSysWMEvent(SDL_SysWMmsg * message) { diff --git a/src/events/SDL_events_c.h b/src/events/SDL_events_c.h index 7d6ab3b19..f365ee3ed 100644 --- a/src/events/SDL_events_c.h +++ b/src/events/SDL_events_c.h @@ -36,6 +36,7 @@ extern int SDL_StartEventLoop(void); extern void SDL_StopEventLoop(void); extern void SDL_QuitInterrupt(void); +extern int SDL_SendAppEvent(SDL_EventType eventType); extern int SDL_SendSysWMEvent(SDL_SysWMmsg * message); extern int SDL_QuitInit(void); diff --git a/src/events/SDL_quit.c b/src/events/SDL_quit.c index 8c1dcf574..5e9f8ad85 100644 --- a/src/events/SDL_quit.c +++ b/src/events/SDL_quit.c @@ -114,15 +114,7 @@ SDL_QuitQuit(void) int SDL_SendQuit(void) { - int posted; - - posted = 0; - if (SDL_GetEventState(SDL_QUIT) == SDL_ENABLE) { - SDL_Event event; - event.type = SDL_QUIT; - posted = (SDL_PushEvent(&event) > 0); - } - return (posted); + return SDL_SendAppEvent(SDL_QUIT); } /* vi: set ts=4 sw=4 expandtab: */ diff --git a/src/video/uikit/SDL_uikitappdelegate.m b/src/video/uikit/SDL_uikitappdelegate.m index 5337f619e..11e74025e 100644 --- a/src/video/uikit/SDL_uikitappdelegate.m +++ b/src/video/uikit/SDL_uikitappdelegate.m @@ -228,42 +228,48 @@ static void SDL_IdleTimerDisabledChanged(const char *name, const char *oldValue, - (void)applicationWillTerminate:(UIApplication *)application { - SDL_SendQuit(); - /* hack to prevent automatic termination. See SDL_uikitevents.m for details */ - longjmp(*(jump_env()), 1); + SDL_SendAppEvent(SDL_APP_TERMINATING); +} + +- (void)applicationDidReceiveMemoryWarning:(UIApplication *)application +{ + SDL_SendAppEvent(SDL_APP_LOWMEMORY); } - (void) applicationWillResignActive:(UIApplication*)application { - //NSLog(@"%@", NSStringFromSelector(_cmd)); - - // Send every window on every screen a MINIMIZED event. SDL_VideoDevice *_this = SDL_GetVideoDevice(); - if (!_this) { - return; + if (_this) { + SDL_Window *window; + for (window = _this->windows; window != nil; window = window->next) { + SDL_SendWindowEvent(window, SDL_WINDOWEVENT_FOCUS_LOST, 0, 0); + SDL_SendWindowEvent(window, SDL_WINDOWEVENT_MINIMIZED, 0, 0); + } } + SDL_SendAppEvent(SDL_APP_WILLENTERBACKGROUND); +} - SDL_Window *window; - for (window = _this->windows; window != nil; window = window->next) { - SDL_SendWindowEvent(window, SDL_WINDOWEVENT_FOCUS_LOST, 0, 0); - SDL_SendWindowEvent(window, SDL_WINDOWEVENT_MINIMIZED, 0, 0); - } +- (void) applicationDidEnterBackground:(UIApplication*)application +{ + SDL_SendAppEvent(SDL_APP_DIDENTERBACKGROUND); +} + +- (void) applicationWillEnterForeground:(UIApplication*)application +{ + SDL_SendAppEvent(SDL_APP_WILLENTERFOREGROUND); } - (void) applicationDidBecomeActive:(UIApplication*)application { - //NSLog(@"%@", NSStringFromSelector(_cmd)); + SDL_SendAppEvent(SDL_APP_DIDENTERFOREGROUND); - // Send every window on every screen a RESTORED event. SDL_VideoDevice *_this = SDL_GetVideoDevice(); - if (!_this) { - return; - } - - SDL_Window *window; - for (window = _this->windows; window != nil; window = window->next) { - SDL_SendWindowEvent(window, SDL_WINDOWEVENT_FOCUS_GAINED, 0, 0); - SDL_SendWindowEvent(window, SDL_WINDOWEVENT_RESTORED, 0, 0); + if (_this) { + SDL_Window *window; + for (window = _this->windows; window != nil; window = window->next) { + SDL_SendWindowEvent(window, SDL_WINDOWEVENT_FOCUS_GAINED, 0, 0); + SDL_SendWindowEvent(window, SDL_WINDOWEVENT_RESTORED, 0, 0); + } } } diff --git a/src/video/uikit/SDL_uikitopengles.m b/src/video/uikit/SDL_uikitopengles.m index f3efab2a7..4fc1a2773 100644 --- a/src/video/uikit/SDL_uikitopengles.m +++ b/src/video/uikit/SDL_uikitopengles.m @@ -91,8 +91,10 @@ void UIKit_GL_SwapWindow(_THIS, SDL_Window * window) } [data->view swapBuffers]; - /* we need to let the event cycle run, or the OS won't update the OpenGL view! */ - SDL_PumpEvents(); + /* You need to pump events in order for the OS to make changes visible. + We don't pump events here because we don't want iOS application events + (low memory, terminate, etc.) to happen inside low level rendering. + */ } SDL_GLContext UIKit_GL_CreateContext(_THIS, SDL_Window * window) From 0cb63856375546c8dfeecc1fba76c068548c3be0 Mon Sep 17 00:00:00 2001 From: Sam Lantinga Date: Sat, 18 May 2013 14:17:52 -0700 Subject: [PATCH 109/542] File style cleanup for the SDL 2.0 release --- Xcode-iOS/Demos/src/accelerometer.c | 12 +- Xcode-iOS/Demos/src/common.c | 14 +- Xcode-iOS/Demos/src/common.h | 6 +- Xcode-iOS/Demos/src/fireworks.c | 40 +- Xcode-iOS/Demos/src/happy.c | 14 +- Xcode-iOS/Demos/src/keyboard.c | 26 +- Xcode-iOS/Demos/src/mixer.c | 20 +- Xcode-iOS/Demos/src/rectangles.c | 10 +- Xcode-iOS/Demos/src/touch.c | 14 +- Xcode-iOS/Template/SDL iOS Application/main.c | 6 +- .../SDL Application/main.c | 82 +- .../SDL Cocoa Application/main.c | 82 +- .../atlantis/atlantis.c | 272 +- .../SDL OpenGL Application/main.c | 102 +- .../SDL Application/main.c | 82 +- .../SDL Cocoa Application/main.c | 82 +- .../atlantis/atlantis.c | 272 +- .../SDL OpenGL Application/main.c | 46 +- .../SDL Application/main.c | 82 +- .../SDL Cocoa Application/main.c | 82 +- .../atlantis/atlantis.c | 272 +- .../SDL OpenGL Application/main.c | 102 +- include/SDL.h | 34 +- include/SDL_assert.h | 6 +- include/SDL_atomic.h | 20 +- include/SDL_audio.h | 126 +- include/SDL_bits.h | 4 - include/SDL_blendmode.h | 6 +- include/SDL_clipboard.h | 4 - include/SDL_config.h | 4 +- include/SDL_config_android.h | 156 +- include/SDL_config_iphoneos.h | 156 +- include/SDL_config_macosx.h | 162 +- include/SDL_config_minimal.h | 16 +- include/SDL_config_pandora.h | 2 +- include/SDL_config_psp.h | 146 +- include/SDL_config_windows.h | 40 +- include/SDL_config_wiz.h | 2 +- include/SDL_cpuinfo.h | 6 +- include/SDL_endian.h | 46 +- include/SDL_error.h | 16 +- include/SDL_events.h | 136 +- include/SDL_gamecontroller.h | 102 +- include/SDL_gesture.h | 6 +- include/SDL_haptic.h | 308 +- include/SDL_hints.h | 22 +- include/SDL_joystick.h | 56 +- include/SDL_keyboard.h | 54 +- include/SDL_keycode.h | 16 +- include/SDL_loadso.h | 6 +- include/SDL_log.h | 8 +- include/SDL_main.h | 10 +- include/SDL_messagebox.h | 4 - include/SDL_mouse.h | 62 +- include/SDL_mutex.h | 52 +- include/SDL_name.h | 2 +- include/SDL_opengl.h | 20 +- include/SDL_opengles.h | 2 +- include/SDL_opengles2.h | 2 +- include/SDL_pixels.h | 50 +- include/SDL_platform.h | 44 +- include/SDL_power.h | 12 +- include/SDL_quit.h | 8 +- include/SDL_rect.h | 14 +- include/SDL_render.h | 224 +- include/SDL_rwops.h | 56 +- include/SDL_scancode.h | 114 +- include/SDL_shape.h | 50 +- include/SDL_stdinc.h | 28 +- include/SDL_surface.h | 150 +- include/SDL_system.h | 6 +- include/SDL_syswm.h | 20 +- include/SDL_test.h | 14 +- include/SDL_test_assert.h | 12 +- include/SDL_test_common.h | 6 +- include/SDL_test_compare.h | 12 +- include/SDL_test_crc32.h | 30 +- include/SDL_test_font.h | 6 +- include/SDL_test_fuzzer.h | 16 +- include/SDL_test_harness.h | 60 +- include/SDL_test_images.h | 12 +- include/SDL_test_log.h | 8 +- include/SDL_test_md5.h | 28 +- include/SDL_test_random.h | 24 +- include/SDL_thread.h | 22 +- include/SDL_timer.h | 10 +- include/SDL_touch.h | 6 +- include/SDL_types.h | 2 +- include/SDL_version.h | 50 +- include/SDL_video.h | 250 +- include/begin_code.h | 12 +- include/close_code.h | 2 +- src/SDL.c | 26 +- src/SDL_error.c | 6 +- src/SDL_error_c.h | 4 +- src/SDL_hints.c | 4 +- src/SDL_hints_c.h | 6 +- src/SDL_log.c | 25 +- src/atomic/SDL_atomic.c | 6 +- src/atomic/SDL_spinlock.c | 10 +- src/audio/SDL_audiocvt.c | 2 +- src/audio/SDL_audiodev.c | 4 +- src/audio/SDL_audiomem.h | 4 +- src/audio/SDL_mixer.c | 4 +- src/audio/SDL_sysaudio.h | 2 +- src/audio/SDL_wave.h | 31 +- src/audio/alsa/SDL_alsa_audio.c | 2 +- src/audio/alsa/SDL_alsa_audio.h | 2 +- src/audio/android/SDL_androidaudio.c | 40 +- src/audio/android/SDL_androidaudio.h | 2 +- src/audio/arts/SDL_artsaudio.h | 4 +- src/audio/baudio/SDL_beaudio.h | 2 +- src/audio/bsd/SDL_bsdaudio.h | 4 +- src/audio/coreaudio/SDL_coreaudio.c | 6 +- src/audio/coreaudio/SDL_coreaudio.h | 2 +- src/audio/directsound/SDL_directsound.h | 2 +- src/audio/directsound/directx.h | 24 +- src/audio/disk/SDL_diskaudio.h | 2 +- src/audio/dsp/SDL_dspaudio.c | 2 +- src/audio/dsp/SDL_dspaudio.h | 4 +- src/audio/dummy/SDL_dummyaudio.h | 2 +- src/audio/esd/SDL_esdaudio.c | 4 +- src/audio/esd/SDL_esdaudio.h | 4 +- src/audio/fusionsound/SDL_fsaudio.c | 6 +- src/audio/fusionsound/SDL_fsaudio.h | 2 +- src/audio/nas/SDL_nasaudio.h | 2 +- src/audio/paudio/SDL_paudio.c | 6 +- src/audio/paudio/SDL_paudio.h | 4 +- src/audio/psp/SDL_pspaudio.c | 142 +- src/audio/psp/SDL_pspaudio.h | 18 +- src/audio/pulseaudio/SDL_pulseaudio.c | 2 +- src/audio/sun/SDL_sunaudio.c | 4 +- src/audio/sun/SDL_sunaudio.h | 2 +- src/audio/winmm/SDL_winmm.h | 2 +- src/audio/xaudio2/SDL_xaudio2.c | 10 +- src/core/android/SDL_android.cpp | 20 +- src/events/SDL_events.c | 2 +- src/events/SDL_gesture.c | 5 +- src/events/SDL_keyboard.c | 116 +- src/events/SDL_mouse.c | 16 +- src/events/SDL_mouse_c.h | 2 +- src/events/SDL_touch.c | 10 +- src/events/SDL_touch_c.h | 8 +- src/events/SDL_windowevents.c | 16 +- src/events/blank_cursor.h | 10 +- src/events/default_cursor.h | 10 +- src/file/SDL_rwops.c | 12 +- src/file/cocoa/SDL_rwopsbundlesupport.m | 40 +- src/haptic/SDL_syshaptic.h | 2 +- src/haptic/darwin/SDL_syshaptic.c | 6 +- src/haptic/linux/SDL_syshaptic.c | 68 +- src/haptic/windows/SDL_syshaptic.c | 28 +- src/joystick/SDL_gamecontroller.c | 1199 ++-- src/joystick/SDL_joystick.c | 287 +- src/joystick/SDL_joystick_c.h | 2 +- src/joystick/android/SDL_sysjoystick.c | 12 +- src/joystick/beos/SDL_bejoystick.cc | 4 +- src/joystick/bsd/SDL_sysjoystick.c | 10 +- src/joystick/darwin/SDL_sysjoystick.c | 556 +- src/joystick/darwin/SDL_sysjoystick_c.h | 14 +- src/joystick/dummy/SDL_sysjoystick.c | 4 +- .../iphoneos/SDLUIAccelerationDelegate.m | 136 +- src/joystick/iphoneos/SDL_sysjoystick.m | 38 +- src/joystick/linux/SDL_sysjoystick.c | 10 +- src/joystick/psp/SDL_sysjoystick.c | 194 +- src/joystick/windows/SDL_dxjoystick.c | 1520 ++-- src/joystick/windows/SDL_dxjoystick_c.h | 60 +- src/joystick/windows/SDL_mmjoystick.c | 16 +- src/main/beos/SDL_BApp.h | 574 +- src/main/psp/SDL_psp_main.c | 42 +- src/power/beos/SDL_syspower.c | 4 +- src/power/linux/SDL_syspower.c | 4 +- src/power/psp/SDL_syspower.c | 32 +- src/power/uikit/SDL_syspower.m | 15 +- src/render/SDL_render.c | 2 +- src/render/SDL_yuv_mmx.c | 394 +- src/render/SDL_yuv_sw.c | 22 +- src/render/direct3d/SDL_render_d3d.c | 50 +- src/render/opengl/SDL_render_gl.c | 30 +- src/render/opengl/SDL_shaders_gl.c | 4 +- src/render/opengles/SDL_render_gles.c | 14 +- src/render/opengles2/SDL_render_gles2.c | 8 +- src/render/opengles2/SDL_shaders_gles2.c | 12 +- src/render/psp/SDL_render_psp.c | 1106 +-- src/render/software/SDL_drawline.c | 1 - src/render/software/SDL_rotate.c | 4 +- src/stdlib/SDL_malloc.c | 20 +- src/test/SDL_test_assert.c | 126 +- src/test/SDL_test_common.c | 18 +- src/test/SDL_test_compare.c | 6 +- src/test/SDL_test_crc32.c | 40 +- src/test/SDL_test_font.c | 6344 ++++++++--------- src/test/SDL_test_fuzzer.c | 462 +- src/test/SDL_test_harness.c | 878 +-- src/test/SDL_test_imageBlit.c | 22 +- src/test/SDL_test_imageBlitBlend.c | 40 +- src/test/SDL_test_imageFace.c | 8 +- src/test/SDL_test_imagePrimitives.c | 6 +- src/test/SDL_test_imagePrimitivesBlend.c | 8 +- src/test/SDL_test_log.c | 58 +- src/test/SDL_test_md5.c | 170 +- src/test/SDL_test_random.c | 14 +- src/thread/SDL_thread.c | 2 +- src/thread/psp/SDL_syssem.c | 124 +- src/thread/psp/SDL_systhread.c | 52 +- src/thread/pthread/SDL_systhread.c | 2 +- src/thread/windows/SDL_systhread.c | 6 +- src/timer/SDL_timer.c | 2 +- src/timer/SDL_timer_c.h | 4 +- src/timer/psp/SDL_systimer.c | 20 +- src/timer/unix/SDL_systimer.c | 2 +- src/timer/windows/SDL_systimer.c | 4 +- src/video/SDL_RLEaccel.c | 938 +-- src/video/SDL_blit.h | 602 +- src/video/SDL_bmp.c | 14 +- src/video/SDL_pixels.c | 10 +- src/video/SDL_rect.c | 26 +- src/video/SDL_shape.c | 49 +- src/video/SDL_surface.c | 14 +- src/video/SDL_sysvideo.h | 14 +- src/video/SDL_video.c | 144 +- src/video/android/SDL_androidkeyboard.c | 2 +- src/video/android/SDL_androidtouch.c | 6 +- src/video/android/SDL_androidvideo.c | 6 +- src/video/android/SDL_androidwindow.c | 2 +- src/video/bwindow/SDL_BWin.h | 732 +- src/video/bwindow/SDL_bevents.h | 2 +- src/video/bwindow/SDL_bmodes.cc | 2 +- src/video/bwindow/SDL_bmodes.h | 4 +- src/video/bwindow/SDL_bopengl.h | 10 +- src/video/cocoa/SDL_cocoaclipboard.m | 4 +- src/video/cocoa/SDL_cocoaevents.m | 16 +- src/video/cocoa/SDL_cocoakeyboard.m | 117 +- src/video/cocoa/SDL_cocoamodes.m | 8 +- src/video/cocoa/SDL_cocoamouse.m | 2 +- src/video/cocoa/SDL_cocoashape.h | 8 +- src/video/cocoa/SDL_cocoashape.m | 22 +- src/video/cocoa/SDL_cocoavideo.m | 6 +- src/video/cocoa/SDL_cocoawindow.m | 87 +- src/video/directfb/SDL_DirectFB_WM.c | 134 +- src/video/directfb/SDL_DirectFB_dyn.c | 2 +- src/video/directfb/SDL_DirectFB_dyn.h | 18 +- src/video/directfb/SDL_DirectFB_events.c | 98 +- src/video/directfb/SDL_DirectFB_modes.c | 6 +- src/video/directfb/SDL_DirectFB_modes.h | 18 +- src/video/directfb/SDL_DirectFB_mouse.c | 12 +- src/video/directfb/SDL_DirectFB_mouse.h | 4 +- src/video/directfb/SDL_DirectFB_opengl.c | 71 +- src/video/directfb/SDL_DirectFB_opengl.h | 10 +- src/video/directfb/SDL_DirectFB_render.c | 38 +- src/video/directfb/SDL_DirectFB_shape.c | 56 +- src/video/directfb/SDL_DirectFB_shape.h | 4 +- src/video/directfb/SDL_DirectFB_video.c | 82 +- src/video/directfb/SDL_DirectFB_video.h | 72 +- src/video/directfb/SDL_DirectFB_window.c | 58 +- src/video/directfb/SDL_DirectFB_window.h | 36 +- src/video/pandora/SDL_pandora.c | 28 +- src/video/psp/SDL_pspevents.c | 376 +- src/video/psp/SDL_pspevents_c.h | 2 +- src/video/psp/SDL_pspgl.c | 158 +- src/video/psp/SDL_pspgl_c.h | 6 +- src/video/psp/SDL_pspmouse.c | 2 +- src/video/psp/SDL_pspvideo.c | 59 +- src/video/psp/SDL_pspvideo.h | 6 +- src/video/uikit/SDL_uikitappdelegate.m | 15 +- src/video/uikit/SDL_uikitmessagebox.m | 16 +- src/video/uikit/SDL_uikitmodes.m | 96 +- src/video/uikit/SDL_uikitopengles.m | 6 +- src/video/uikit/SDL_uikitopenglview.m | 9 +- src/video/uikit/SDL_uikitvideo.h | 4 +- src/video/uikit/SDL_uikitview.m | 11 +- src/video/uikit/SDL_uikitviewcontroller.m | 18 +- src/video/uikit/SDL_uikitwindow.m | 68 +- src/video/windows/SDL_vkeys.h | 98 +- src/video/windows/SDL_windowsclipboard.c | 2 +- src/video/windows/SDL_windowsevents.c | 586 +- src/video/windows/SDL_windowsframebuffer.c | 2 +- src/video/windows/SDL_windowskeyboard.c | 10 +- src/video/windows/SDL_windowsmessagebox.c | 158 +- src/video/windows/SDL_windowsmouse.c | 62 +- src/video/windows/SDL_windowsopengl.c | 36 +- src/video/windows/SDL_windowsshape.c | 24 +- src/video/windows/SDL_windowsshape.h | 2 +- src/video/windows/SDL_windowsvideo.c | 22 +- src/video/windows/SDL_windowsvideo.h | 38 +- src/video/windows/SDL_windowswindow.c | 54 +- src/video/windows/wmmsg.h | 2 +- src/video/x11/SDL_x11clipboard.c | 4 +- src/video/x11/SDL_x11dyn.c | 6 +- src/video/x11/SDL_x11events.c | 42 +- src/video/x11/SDL_x11framebuffer.c | 4 +- src/video/x11/SDL_x11messagebox.c | 4 +- src/video/x11/SDL_x11modes.c | 2 +- src/video/x11/SDL_x11mouse.c | 10 +- src/video/x11/SDL_x11opengl.c | 44 +- src/video/x11/SDL_x11opengles.c | 16 +- src/video/x11/SDL_x11shape.c | 14 +- src/video/x11/SDL_x11shape.h | 6 +- src/video/x11/SDL_x11video.c | 2 +- src/video/x11/SDL_x11video.h | 4 +- src/video/x11/SDL_x11window.c | 22 +- src/video/x11/SDL_x11xinput2.c | 22 +- src/video/x11/SDL_x11xinput2.h | 4 +- test/automated/common/common.h | 6 +- test/automated/rwops/TestSupportRWops_Cocoa.m | 86 +- .../rwops/TestSupportRWops_Generic.c | 10 +- test/automated/surface/surface.c | 6 +- test/checkkeys.c | 2 +- test/loopwave.c | 4 +- test/test-automation/include/SDL_test.h | 32 +- .../test-automation/src/libSDLtest/SDL_test.c | 56 +- .../src/libSDLtest/common/common.h | 6 +- .../src/libSDLtest/fuzzer/fuzzer.c | 630 +- .../src/libSDLtest/fuzzer/fuzzer.h | 2 +- .../src/libSDLtest/fuzzer/utl_crc32.c | 30 +- .../src/libSDLtest/fuzzer/utl_crc32.h | 16 +- .../src/libSDLtest/fuzzer/utl_md5.c | 170 +- .../src/libSDLtest/fuzzer/utl_md5.h | 22 +- .../src/libSDLtest/fuzzer/utl_random.c | 10 +- .../src/libSDLtest/fuzzer/utl_random.h | 26 +- .../src/libSDLtest/logger_helpers.c | 94 +- .../src/libSDLtest/plain_logger.c | 202 +- .../src/libSDLtest/plain_logger.h | 8 +- test/test-automation/src/libSDLtest/xml.c | 408 +- test/test-automation/src/libSDLtest/xml.h | 4 +- .../src/libSDLtest/xml_logger.c | 780 +- .../src/libSDLtest/xml_logger.h | 10 +- test/test-automation/src/runner/logger.h | 50 +- test/test-automation/src/runner/runner.c | 1484 ++-- test/test-automation/src/runner/support.c | 20 +- .../tests/testaudio/testaudio.c | 52 +- .../tests/testclipboard/testclipboard.c | 148 +- .../tests/testdummy/testdummy.c | 104 +- .../tests/testevents/testevents.c | 8 +- .../tests/testkeyboard/testkeyboard.c | 8 +- .../tests/testplatform/testplatform.c | 188 +- .../test-automation/tests/testrect/testrect.c | 236 +- .../tests/testrender/testrender.c | 30 +- .../tests/testrwops/testrwops.c | 36 +- .../tests/testsurface/testsurface.c | 294 +- .../tests/testsyswm/testsyswm.c | 8 +- .../tests/testvideo/testvideo.c | 8 +- test/testatomic.c | 80 +- test/testautomation.c | 22 +- test/testautomation_audio.c | 378 +- test/testautomation_clipboard.c | 156 +- test/testautomation_events.c | 44 +- test/testautomation_keyboard.c | 174 +- test/testautomation_main.c | 26 +- test/testautomation_mouse.c | 418 +- test/testautomation_pixels.c | 168 +- test/testautomation_platform.c | 54 +- test/testautomation_rect.c | 336 +- test/testautomation_render.c | 56 +- test/testautomation_rwops.c | 200 +- test/testautomation_sdltest.c | 230 +- test/testautomation_suites.h | 34 +- test/testautomation_surface.c | 430 +- test/testautomation_syswm.c | 26 +- test/testautomation_timer.c | 62 +- test/testautomation_video.c | 600 +- test/testdraw2.c | 2 +- test/testfile.c | 16 +- test/testgamecontroller.c | 4 +- test/testgesture.c | 186 +- test/testime.c | 6 +- test/testintersections.c | 2 +- test/testjoystick.c | 8 +- test/testlock.c | 2 +- test/testnative.c | 2 +- test/testrelative.c | 2 +- test/testsem.c | 2 +- test/testshader.c | 16 +- test/testshape.c | 16 +- test/testtimer.c | 2 +- test/testwm2.c | 4 +- 376 files changed, 17562 insertions(+), 17773 deletions(-) diff --git a/Xcode-iOS/Demos/src/accelerometer.c b/Xcode-iOS/Demos/src/accelerometer.c index 339febc11..78d42041b 100644 --- a/Xcode-iOS/Demos/src/accelerometer.c +++ b/Xcode-iOS/Demos/src/accelerometer.c @@ -1,7 +1,7 @@ /* - * accelerometer.c - * written by Holmes Futrell - * use however you want + * accelerometer.c + * written by Holmes Futrell + * use however you want */ #include "SDL.h" @@ -13,7 +13,7 @@ #define FRICTION 0.0008f /* coefficient of acceleration that opposes direction of motion */ #define GRAVITY_CONSTANT 0.004f /* how sensitive the ship is to the accelerometer */ -/* If we aren't on an iPhone, then this definition ought to yield reasonable behavior */ +/* If we aren't on an iPhone, then this definition ought to yield reasonable behavior */ #ifndef SDL_IPHONE_MAX_GFORCE #define SDL_IPHONE_MAX_GFORCE 5.0f #endif @@ -48,7 +48,7 @@ render(SDL_Renderer *renderer) #define SINT16_MAX ((float)(0x7FFF)) /* update velocity from accelerometer - the factor SDL_IPHONE_MAX_G_FORCE / SINT16_MAX converts between + the factor SDL_IPHONE_MAX_G_FORCE / SINT16_MAX converts between SDL's units reported from the joytick, and units of g-force, as reported by the accelerometer */ shipData.vx += @@ -159,7 +159,7 @@ main(int argc, char *argv[]) { SDL_Window *window; /* main window */ - SDL_Renderer *renderer; + SDL_Renderer *renderer; Uint32 startFrame; /* time frame began to process */ Uint32 endFrame; /* time frame ended processing */ Uint32 delay; /* time to pause waiting to draw next frame */ diff --git a/Xcode-iOS/Demos/src/common.c b/Xcode-iOS/Demos/src/common.c index fd3a176db..b2d963456 100644 --- a/Xcode-iOS/Demos/src/common.c +++ b/Xcode-iOS/Demos/src/common.c @@ -1,7 +1,7 @@ /* - * common.c - * written by Holmes Futrell - * use however you want + * common.c + * written by Holmes Futrell + * use however you want */ #include "common.h" @@ -9,8 +9,8 @@ #include /* - Produces a random int x, min <= x <= max - following a uniform distribution + Produces a random int x, min <= x <= max + following a uniform distribution */ int randomInt(int min, int max) @@ -19,8 +19,8 @@ randomInt(int min, int max) } /* - Produces a random float x, min <= x <= max - following a uniform distribution + Produces a random float x, min <= x <= max + following a uniform distribution */ float randomFloat(float min, float max) diff --git a/Xcode-iOS/Demos/src/common.h b/Xcode-iOS/Demos/src/common.h index 9aa01a23e..3e0d94ecf 100644 --- a/Xcode-iOS/Demos/src/common.h +++ b/Xcode-iOS/Demos/src/common.h @@ -1,7 +1,7 @@ /* - * common.h - * written by Holmes Futrell - * use however you want + * common.h + * written by Holmes Futrell + * use however you want */ #define SCREEN_WIDTH 320 diff --git a/Xcode-iOS/Demos/src/fireworks.c b/Xcode-iOS/Demos/src/fireworks.c index fa39abff5..5b4c4118c 100644 --- a/Xcode-iOS/Demos/src/fireworks.c +++ b/Xcode-iOS/Demos/src/fireworks.c @@ -1,7 +1,7 @@ /* - * fireworks.c - * written by Holmes Futrell - * use however you want + * fireworks.c + * written by Holmes Futrell + * use however you want */ #include "SDL.h" @@ -17,11 +17,11 @@ static GLuint particleTextureID; /* OpenGL particle texture id */ static SDL_bool pointSizeExtensionSupported; /* is GL_OES_point_size_array supported ? */ -/* - used to describe what type of particle a given struct particle is. - emitter - this particle flies up, shooting off trail particles, then finally explodes into dust particles. - trail - shoots off, following emitter particle - dust - radiates outwards from emitter explosion +/* + used to describe what type of particle a given struct particle is. + emitter - this particle flies up, shooting off trail particles, then finally explodes into dust particles. + trail - shoots off, following emitter particle + dust - radiates outwards from emitter explosion */ enum particleType { @@ -30,7 +30,7 @@ enum particleType dust }; /* - struct particle is used to describe each particle displayed on screen + struct particle is used to describe each particle displayed on screen */ struct particle { @@ -57,8 +57,8 @@ int nextPowerOfTwo(int x); void drawParticles(); void stepParticles(void); -/* helper function (used in texture loading) - returns next power of two greater than or equal to x +/* helper function (used in texture loading) + returns next power of two greater than or equal to x */ int nextPowerOfTwo(int x) @@ -70,8 +70,8 @@ nextPowerOfTwo(int x) return val; } -/* - steps each active particle by timestep MILLESECONDS_PER_FRAME +/* + steps each active particle by timestep MILLESECONDS_PER_FRAME */ void stepParticles(void) @@ -145,13 +145,13 @@ stepParticles(void) curr++; } /* the number of active particles is computed as the difference between - old number of active particles, where slot points, and the + old number of active particles, where slot points, and the new size of the array, where particles points */ num_active_particles = slot - particles; } /* - This draws all the particles shown on screen + This draws all the particles shown on screen */ void drawParticles() @@ -177,7 +177,7 @@ drawParticles() } /* - This causes an emitter to explode in a circular bloom of dust particles + This causes an emitter to explode in a circular bloom of dust particles */ void explodeEmitter(struct particle *emitter) @@ -219,7 +219,7 @@ explodeEmitter(struct particle *emitter) } /* - This spawns a trail particle from an emitter + This spawns a trail particle from an emitter */ void spawnTrailFromEmitter(struct particle *emitter) @@ -254,7 +254,7 @@ spawnTrailFromEmitter(struct particle *emitter) } /* - spawns a new emitter particle at the bottom of the screen + spawns a new emitter particle at the bottom of the screen destined for the point (x,y). */ void @@ -313,7 +313,7 @@ initializeParticles(void) } /* - loads the particle texture + loads the particle texture */ void initializeTexture() @@ -375,7 +375,7 @@ main(int argc, char *argv[]) } /* seed the random number generator */ srand(time(NULL)); - /* + /* request some OpenGL parameters that may speed drawing */ diff --git a/Xcode-iOS/Demos/src/happy.c b/Xcode-iOS/Demos/src/happy.c index c1731b879..7a524c0e4 100644 --- a/Xcode-iOS/Demos/src/happy.c +++ b/Xcode-iOS/Demos/src/happy.c @@ -1,7 +1,7 @@ /* - * happy.c - * written by Holmes Futrell - * use however you want + * happy.c + * written by Holmes Futrell + * use however you want */ #include "SDL.h" @@ -20,8 +20,8 @@ static struct } faces[NUM_HAPPY_FACES]; /* - Sets initial positions and velocities of happyfaces - units of velocity are pixels per millesecond + Sets initial positions and velocities of happyfaces + units of velocity are pixels per millesecond */ void initializeHappyFaces() @@ -94,7 +94,7 @@ render(SDL_Renderer *renderer) } /* - loads the happyface graphic into a texture + loads the happyface graphic into a texture */ void initializeTexture(SDL_Renderer *renderer) @@ -125,7 +125,7 @@ main(int argc, char *argv[]) { SDL_Window *window; - SDL_Renderer *renderer; + SDL_Renderer *renderer; Uint32 startFrame; Uint32 endFrame; Uint32 delay; diff --git a/Xcode-iOS/Demos/src/keyboard.c b/Xcode-iOS/Demos/src/keyboard.c index 3e2bc5459..4b55c7be4 100644 --- a/Xcode-iOS/Demos/src/keyboard.c +++ b/Xcode-iOS/Demos/src/keyboard.c @@ -1,7 +1,7 @@ /* - * keyboard.c - * written by Holmes Futrell - * use however you want + * keyboard.c + * written by Holmes Futrell + * use however you want */ #import "SDL.h" @@ -97,14 +97,14 @@ fontMapping map[TABLE_SIZE] = { }; /* - This function maps an SDL_KeySym to an index in the bitmap font. - It does so by scanning through the font mapping table one entry - at a time. - - If a match is found (scancode and allowed modifiers), the proper - index is returned. - - If there is no entry for the key, -1 is returned + This function maps an SDL_KeySym to an index in the bitmap font. + It does so by scanning through the font mapping table one entry + at a time. + + If a match is found (scancode and allowed modifiers), the proper + index is returned. + + If there is no entry for the key, -1 is returned */ int keyToIndex(SDL_Keysym key) @@ -125,8 +125,8 @@ keyToIndex(SDL_Keysym key) return index; } -/* - This function returns and x,y position for a given character number. +/* + This function returns and x,y position for a given character number. It is used for positioning each character of text */ void diff --git a/Xcode-iOS/Demos/src/mixer.c b/Xcode-iOS/Demos/src/mixer.c index 893361f9a..526abb07b 100644 --- a/Xcode-iOS/Demos/src/mixer.c +++ b/Xcode-iOS/Demos/src/mixer.c @@ -1,7 +1,7 @@ /* - * mixer.c - * written by Holmes Futrell - * use however you want + * mixer.c + * written by Holmes Futrell + * use however you want */ #import "SDL.h" @@ -100,7 +100,7 @@ loadSound(const char *file, struct sound *s) if (result == -1) { fatalError("could not build audio CVT"); } else if (result != 0) { - /* + /* this happens when the .wav format differs from the output format. we convert the .wav buffer here */ @@ -179,8 +179,8 @@ render(SDL_Renderer *renderer) } /* - finds a sound channel in the mixer for a sound - and sets it up to start playing + finds a sound channel in the mixer for a sound + and sets it up to start playing */ int playSound(struct sound *s) @@ -225,9 +225,9 @@ playSound(struct sound *s) return selected_channel; } -/* - Called from SDL's audio system. Supplies sound input with data by mixing together all - currently playing sound effects. +/* + Called from SDL's audio system. Supplies sound input with data by mixing together all + currently playing sound effects. */ void audioCallback(void *userdata, Uint8 * stream, int len) @@ -273,7 +273,7 @@ main(int argc, char *argv[]) int done; /* has user tried to quit ? */ SDL_Window *window; /* main window */ - SDL_Renderer *renderer; + SDL_Renderer *renderer; SDL_Event event; Uint32 startFrame; /* holds when frame started processing */ Uint32 endFrame; /* holds when frame ended processing */ diff --git a/Xcode-iOS/Demos/src/rectangles.c b/Xcode-iOS/Demos/src/rectangles.c index 4dcb32035..11e5f135c 100644 --- a/Xcode-iOS/Demos/src/rectangles.c +++ b/Xcode-iOS/Demos/src/rectangles.c @@ -1,7 +1,7 @@ /* - * rectangles.c - * written by Holmes Futrell - * use however you want + * rectangles.c + * written by Holmes Futrell + * use however you want */ #include "SDL.h" @@ -39,7 +39,7 @@ main(int argc, char *argv[]) { SDL_Window *window; - SDL_Renderer *renderer; + SDL_Renderer *renderer; int done; SDL_Event event; @@ -59,7 +59,7 @@ main(int argc, char *argv[]) fatalError("Could not initialize Window"); } renderer = SDL_CreateRenderer(window, -1, 0); - if (!renderer) { + if (!renderer) { fatalError("Could not create renderer"); } diff --git a/Xcode-iOS/Demos/src/touch.c b/Xcode-iOS/Demos/src/touch.c index 8ce8006a0..b5065b10a 100644 --- a/Xcode-iOS/Demos/src/touch.c +++ b/Xcode-iOS/Demos/src/touch.c @@ -1,7 +1,7 @@ /* - * touch.c - * written by Holmes Futrell - * use however you want + * touch.c + * written by Holmes Futrell + * use however you want */ #include "SDL.h" @@ -14,8 +14,8 @@ static SDL_Texture *brush = 0; /* texture for the brush */ /* - draws a line from (startx, starty) to (startx + dx, starty + dy) - this is accomplished by drawing several blots spaced PIXELS_PER_ITERATION apart + draws a line from (startx, starty) to (startx + dx, starty + dy) + this is accomplished by drawing several blots spaced PIXELS_PER_ITERATION apart */ void drawLine(SDL_Renderer *renderer, float startx, float starty, float dx, float dy) @@ -48,7 +48,7 @@ drawLine(SDL_Renderer *renderer, float startx, float starty, float dx, float dy) } /* - loads the brush texture + loads the brush texture */ void initializeTexture(SDL_Renderer *renderer) @@ -78,7 +78,7 @@ main(int argc, char *argv[]) Uint8 state; /* mouse (touch) state */ SDL_Event event; SDL_Window *window; /* main window */ - SDL_Renderer *renderer; + SDL_Renderer *renderer; int done; /* does user want to quit? */ /* initialize SDL */ diff --git a/Xcode-iOS/Template/SDL iOS Application/main.c b/Xcode-iOS/Template/SDL iOS Application/main.c index 2a5d3f2ac..ca05e0083 100644 --- a/Xcode-iOS/Template/SDL iOS Application/main.c +++ b/Xcode-iOS/Template/SDL iOS Application/main.c @@ -1,7 +1,7 @@ /* - * rectangles.c - * written by Holmes Futrell - * use however you want + * rectangles.c + * written by Holmes Futrell + * use however you want */ #include "SDL.h" diff --git a/Xcode/TemplatesForXcodeLeopard/SDL Application/main.c b/Xcode/TemplatesForXcodeLeopard/SDL Application/main.c index 7115de989..47af3765d 100644 --- a/Xcode/TemplatesForXcodeLeopard/SDL Application/main.c +++ b/Xcode/TemplatesForXcodeLeopard/SDL Application/main.c @@ -4,7 +4,7 @@ Please see the SDL documentation for details on using the SDL API: /Developer/Documentation/SDL/docs.html */ - + #include #include #include @@ -14,52 +14,52 @@ int main(int argc, char *argv[]) { - Uint32 initflags = SDL_INIT_VIDEO; /* See documentation for details */ - SDL_Surface *screen; - Uint8 video_bpp = 0; - Uint32 videoflags = SDL_SWSURFACE; - int done; + Uint32 initflags = SDL_INIT_VIDEO; /* See documentation for details */ + SDL_Surface *screen; + Uint8 video_bpp = 0; + Uint32 videoflags = SDL_SWSURFACE; + int done; SDL_Event event; - /* Initialize the SDL library */ - if ( SDL_Init(initflags) < 0 ) { - fprintf(stderr, "Couldn't initialize SDL: %s\n", - SDL_GetError()); - exit(1); - } + /* Initialize the SDL library */ + if ( SDL_Init(initflags) < 0 ) { + fprintf(stderr, "Couldn't initialize SDL: %s\n", + SDL_GetError()); + exit(1); + } - /* Set 640x480 video mode */ - screen=SDL_SetVideoMode(640,480, video_bpp, videoflags); + /* Set 640x480 video mode */ + screen=SDL_SetVideoMode(640,480, video_bpp, videoflags); if (screen == NULL) { - fprintf(stderr, "Couldn't set 640x480x%d video mode: %s\n", + fprintf(stderr, "Couldn't set 640x480x%d video mode: %s\n", video_bpp, SDL_GetError()); - SDL_Quit(); - exit(2); - } + SDL_Quit(); + exit(2); + } - done = 0; - while ( !done ) { + done = 0; + while ( !done ) { - /* Check for events */ - while ( SDL_PollEvent(&event) ) { - switch (event.type) { + /* Check for events */ + while ( SDL_PollEvent(&event) ) { + switch (event.type) { - case SDL_MOUSEMOTION: - break; - case SDL_MOUSEBUTTONDOWN: - break; - case SDL_KEYDOWN: - /* Any keypress quits the app... */ - case SDL_QUIT: - done = 1; - break; - default: - break; - } - } - } - - /* Clean up the SDL library */ - SDL_Quit(); - return(0); + case SDL_MOUSEMOTION: + break; + case SDL_MOUSEBUTTONDOWN: + break; + case SDL_KEYDOWN: + /* Any keypress quits the app... */ + case SDL_QUIT: + done = 1; + break; + default: + break; + } + } + } + + /* Clean up the SDL library */ + SDL_Quit(); + return(0); } diff --git a/Xcode/TemplatesForXcodeLeopard/SDL Cocoa Application/main.c b/Xcode/TemplatesForXcodeLeopard/SDL Cocoa Application/main.c index 7115de989..47af3765d 100644 --- a/Xcode/TemplatesForXcodeLeopard/SDL Cocoa Application/main.c +++ b/Xcode/TemplatesForXcodeLeopard/SDL Cocoa Application/main.c @@ -4,7 +4,7 @@ Please see the SDL documentation for details on using the SDL API: /Developer/Documentation/SDL/docs.html */ - + #include #include #include @@ -14,52 +14,52 @@ int main(int argc, char *argv[]) { - Uint32 initflags = SDL_INIT_VIDEO; /* See documentation for details */ - SDL_Surface *screen; - Uint8 video_bpp = 0; - Uint32 videoflags = SDL_SWSURFACE; - int done; + Uint32 initflags = SDL_INIT_VIDEO; /* See documentation for details */ + SDL_Surface *screen; + Uint8 video_bpp = 0; + Uint32 videoflags = SDL_SWSURFACE; + int done; SDL_Event event; - /* Initialize the SDL library */ - if ( SDL_Init(initflags) < 0 ) { - fprintf(stderr, "Couldn't initialize SDL: %s\n", - SDL_GetError()); - exit(1); - } + /* Initialize the SDL library */ + if ( SDL_Init(initflags) < 0 ) { + fprintf(stderr, "Couldn't initialize SDL: %s\n", + SDL_GetError()); + exit(1); + } - /* Set 640x480 video mode */ - screen=SDL_SetVideoMode(640,480, video_bpp, videoflags); + /* Set 640x480 video mode */ + screen=SDL_SetVideoMode(640,480, video_bpp, videoflags); if (screen == NULL) { - fprintf(stderr, "Couldn't set 640x480x%d video mode: %s\n", + fprintf(stderr, "Couldn't set 640x480x%d video mode: %s\n", video_bpp, SDL_GetError()); - SDL_Quit(); - exit(2); - } + SDL_Quit(); + exit(2); + } - done = 0; - while ( !done ) { + done = 0; + while ( !done ) { - /* Check for events */ - while ( SDL_PollEvent(&event) ) { - switch (event.type) { + /* Check for events */ + while ( SDL_PollEvent(&event) ) { + switch (event.type) { - case SDL_MOUSEMOTION: - break; - case SDL_MOUSEBUTTONDOWN: - break; - case SDL_KEYDOWN: - /* Any keypress quits the app... */ - case SDL_QUIT: - done = 1; - break; - default: - break; - } - } - } - - /* Clean up the SDL library */ - SDL_Quit(); - return(0); + case SDL_MOUSEMOTION: + break; + case SDL_MOUSEBUTTONDOWN: + break; + case SDL_KEYDOWN: + /* Any keypress quits the app... */ + case SDL_QUIT: + done = 1; + break; + default: + break; + } + } + } + + /* Clean up the SDL library */ + SDL_Quit(); + return(0); } diff --git a/Xcode/TemplatesForXcodeLeopard/SDL OpenGL Application/atlantis/atlantis.c b/Xcode/TemplatesForXcodeLeopard/SDL OpenGL Application/atlantis/atlantis.c index 4efdf6ce8..debed809d 100644 --- a/Xcode/TemplatesForXcodeLeopard/SDL OpenGL Application/atlantis/atlantis.c +++ b/Xcode/TemplatesForXcodeLeopard/SDL OpenGL Application/atlantis/atlantis.c @@ -63,37 +63,37 @@ static double mtime(void) { struct timeval tk_time; struct timezone tz; - + gettimeofday(&tk_time, &tz); - + return 4294.967296 * tk_time.tv_sec + 0.000001 * tk_time.tv_usec; } static double filter(double in, double *save) { - static double k1 = 0.9; - static double k2 = 0.05; + static double k1 = 0.9; + static double k2 = 0.05; - save[3] = in; - save[1] = save[0]*k1 + k2*(save[3] + save[2]); + save[3] = in; + save[1] = save[0]*k1 + k2*(save[3] + save[2]); - save[0]=save[1]; - save[2]=save[3]; + save[0]=save[1]; + save[2]=save[3]; - return(save[1]); + return(save[1]); } void DrawStr(const char *str) { - GLint i = 0; - - if(!str) return; - - while(str[i]) - { - glutBitmapCharacter(GLUT_BITMAP_HELVETICA_12, str[i]); - i++; - } + GLint i = 0; + + if(!str) return; + + while(str[i]) + { + glutBitmapCharacter(GLUT_BITMAP_HELVETICA_12, str[i]); + i++; + } } void @@ -168,9 +168,9 @@ Atlantis_Init(void) InitFishs(); glEnable(GL_FOG); - glFogi(GL_FOG_MODE, GL_EXP); - glFogf(GL_FOG_DENSITY, 0.0000025); - glFogfv(GL_FOG_COLOR, fog_color); + glFogi(GL_FOG_MODE, GL_EXP); + glFogf(GL_FOG_DENSITY, 0.0000025); + glFogfv(GL_FOG_COLOR, fog_color); glClearColor(0.0, 0.5, 0.9, 1.0); } @@ -178,9 +178,9 @@ Atlantis_Init(void) void Atlantis_Reshape(int width, int height) { - w_win = width; - h_win = height; - + w_win = width; + h_win = height; + glViewport(0, 0, width, height); glMatrixMode(GL_PROJECTION); @@ -212,37 +212,37 @@ Atlantis_Key(unsigned char key, int x, int y) { switch (key) { case 't': - Timing = !Timing; + Timing = !Timing; break; case ' ': - switch(StrMode) - { - case GL_EXTENSIONS: - StrMode = GL_VENDOR; - break; - case GL_VENDOR: - StrMode = GL_RENDERER; - break; - case GL_RENDERER: - StrMode = GL_VERSION; - break; - case GL_VERSION: - StrMode = GL_EXTENSIONS; - break; - } - break; + switch(StrMode) + { + case GL_EXTENSIONS: + StrMode = GL_VENDOR; + break; + case GL_VENDOR: + StrMode = GL_RENDERER; + break; + case GL_RENDERER: + StrMode = GL_VERSION; + break; + case GL_VERSION: + StrMode = GL_EXTENSIONS; + break; + } + break; case 27: /* Esc will quit */ exit(1); break; - case 's': /* "s" start animation */ + case 's': /* "s" start animation */ moving = GL_TRUE; //glutIdleFunc(Animate); break; - case 'a': /* "a" stop animation */ + case 'a': /* "a" stop animation */ moving = GL_FALSE; //glutIdleFunc(NULL); break; - case '.': /* "." will advance frame */ + case '.': /* "." will advance frame */ if (!moving) { Atlantis_Animate(); } @@ -251,21 +251,21 @@ Atlantis_Key(unsigned char key, int x, int y) /* void Display(void) { - static float P123[3] = {-448.94, -203.14, 9499.60}; - static float P124[3] = {-442.64, -185.20, 9528.07}; - static float P125[3] = {-441.07, -148.05, 9528.07}; - static float P126[3] = {-443.43, -128.84, 9499.60}; - static float P127[3] = {-456.87, -146.78, 9466.67}; - static float P128[3] = {-453.68, -183.93, 9466.67}; + static float P123[3] = {-448.94, -203.14, 9499.60}; + static float P124[3] = {-442.64, -185.20, 9528.07}; + static float P125[3] = {-441.07, -148.05, 9528.07}; + static float P126[3] = {-443.43, -128.84, 9499.60}; + static float P127[3] = {-456.87, -146.78, 9466.67}; + static float P128[3] = {-453.68, -183.93, 9466.67}; - glClear(GL_COLOR_BUFFER_BIT | GL_DEPTH_BUFFER_BIT); - - glPushMatrix(); + glClear(GL_COLOR_BUFFER_BIT | GL_DEPTH_BUFFER_BIT); + + glPushMatrix(); FishTransform(&dolph); DrawDolphin(&dolph); glPopMatrix(); - - glutSwapBuffers(); + + glutSwapBuffers(); } */ @@ -274,9 +274,9 @@ Atlantis_Display(void) { int i; static double th[4] = {0.0, 0.0, 0.0, 0.0}; - static double t1 = 0.0, t2 = 0.0, t; - char num_str[128]; - + static double t1 = 0.0, t2 = 0.0, t; + char num_str[128]; + t1 = t2; glClear(GL_COLOR_BUFFER_BIT | GL_DEPTH_BUFFER_BIT); @@ -303,56 +303,56 @@ Atlantis_Display(void) glScalef(0.45, 0.45, 0.3); DrawWhale(&babyWhale); glPopMatrix(); - + if(Timing) { - t2 = mtime(); - t = t2 - t1; - if(t > 0.0001) t = 1.0 / t; - - glDisable(GL_LIGHTING); - //glDisable(GL_DEPTH_TEST); - - glColor3f(1.0, 0.0, 0.0); - - glMatrixMode (GL_PROJECTION); - glPushMatrix(); - glLoadIdentity(); - glOrtho(0, w_win, 0, h_win, -10.0, 10.0); - - glRasterPos2f(5.0, 5.0); - - switch(StrMode) - { - case GL_VENDOR: - sprintf(num_str, "%0.2f Hz, %dx%d, VENDOR: ", filter(t, th), w_win, h_win); - DrawStr(num_str); - DrawStr(glGetString(GL_VENDOR)); - break; - case GL_RENDERER: - sprintf(num_str, "%0.2f Hz, %dx%d, RENDERER: ", filter(t, th), w_win, h_win); - DrawStr(num_str); - DrawStr(glGetString(GL_RENDERER)); - break; - case GL_VERSION: - sprintf(num_str, "%0.2f Hz, %dx%d, VERSION: ", filter(t, th), w_win, h_win); - DrawStr(num_str); - DrawStr(glGetString(GL_VERSION)); - break; - case GL_EXTENSIONS: - sprintf(num_str, "%0.2f Hz, %dx%d, EXTENSIONS: ", filter(t, th), w_win, h_win); - DrawStr(num_str); - DrawStr(glGetString(GL_EXTENSIONS)); - break; - } - - glPopMatrix(); - glMatrixMode(GL_MODELVIEW); - - glEnable(GL_LIGHTING); - //glEnable(GL_DEPTH_TEST); - } - + t2 = mtime(); + t = t2 - t1; + if(t > 0.0001) t = 1.0 / t; + + glDisable(GL_LIGHTING); + //glDisable(GL_DEPTH_TEST); + + glColor3f(1.0, 0.0, 0.0); + + glMatrixMode (GL_PROJECTION); + glPushMatrix(); + glLoadIdentity(); + glOrtho(0, w_win, 0, h_win, -10.0, 10.0); + + glRasterPos2f(5.0, 5.0); + + switch(StrMode) + { + case GL_VENDOR: + sprintf(num_str, "%0.2f Hz, %dx%d, VENDOR: ", filter(t, th), w_win, h_win); + DrawStr(num_str); + DrawStr(glGetString(GL_VENDOR)); + break; + case GL_RENDERER: + sprintf(num_str, "%0.2f Hz, %dx%d, RENDERER: ", filter(t, th), w_win, h_win); + DrawStr(num_str); + DrawStr(glGetString(GL_RENDERER)); + break; + case GL_VERSION: + sprintf(num_str, "%0.2f Hz, %dx%d, VERSION: ", filter(t, th), w_win, h_win); + DrawStr(num_str); + DrawStr(glGetString(GL_VERSION)); + break; + case GL_EXTENSIONS: + sprintf(num_str, "%0.2f Hz, %dx%d, EXTENSIONS: ", filter(t, th), w_win, h_win); + DrawStr(num_str); + DrawStr(glGetString(GL_EXTENSIONS)); + break; + } + + glPopMatrix(); + glMatrixMode(GL_MODELVIEW); + + glEnable(GL_LIGHTING); + //glEnable(GL_DEPTH_TEST); + } + count++; glutSwapBuffers(); @@ -377,18 +377,18 @@ timingSelect(int value) { switch(value) { - case 1: - StrMode = GL_VENDOR; - break; - case 2: - StrMode = GL_RENDERER; - break; - case 3: - StrMode = GL_VERSION; - break; - case 4: - StrMode = GL_EXTENSIONS; - break; + case 1: + StrMode = GL_VENDOR; + break; + case 2: + StrMode = GL_RENDERER; + break; + case 3: + StrMode = GL_VERSION; + break; + case 4: + StrMode = GL_EXTENSIONS; + break; } } @@ -413,24 +413,24 @@ menuSelect(int value) int main(int argc, char **argv) { - GLboolean fullscreen = GL_FALSE; - GLint time_menu; - - srand(0); + GLboolean fullscreen = GL_FALSE; + GLint time_menu; + + srand(0); glutInit(&argc, argv); - if (argc > 1 && !strcmp(argv[1], "-w")) - fullscreen = GL_FALSE; + if (argc > 1 && !strcmp(argv[1], "-w")) + fullscreen = GL_FALSE; - //glutInitDisplayMode(GLUT_RGBA | GLUT_DOUBLE | GLUT_DEPTH); - glutInitDisplayString("rgba double depth=24"); - if (fullscreen) { - glutGameModeString("1024x768:32"); - glutEnterGameMode(); - } else { - glutInitWindowSize(320, 240); - glutCreateWindow("Atlantis Timing"); - } + //glutInitDisplayMode(GLUT_RGBA | GLUT_DOUBLE | GLUT_DEPTH); + glutInitDisplayString("rgba double depth=24"); + if (fullscreen) { + glutGameModeString("1024x768:32"); + glutEnterGameMode(); + } else { + glutInitWindowSize(320, 240); + glutCreateWindow("Atlantis Timing"); + } Init(); glutDisplayFunc(Display); glutReshapeFunc(Reshape); @@ -438,19 +438,19 @@ main(int argc, char **argv) moving = GL_TRUE; glutIdleFunc(Animate); glutVisibilityFunc(Visible); - + time_menu = glutCreateMenu(timingSelect); glutAddMenuEntry("GL_VENDOR", 1); glutAddMenuEntry("GL_RENDERER", 2); glutAddMenuEntry("GL_VERSION", 3); glutAddMenuEntry("GL_EXTENSIONS", 4); - + glutCreateMenu(menuSelect); glutAddMenuEntry("Start motion", 1); glutAddMenuEntry("Stop motion", 2); glutAddSubMenu("Timing Mode", time_menu); glutAddMenuEntry("Quit", 4); - + //glutAttachMenu(GLUT_RIGHT_BUTTON); glutAttachMenu(GLUT_RIGHT_BUTTON); glutMainLoop(); diff --git a/Xcode/TemplatesForXcodeLeopard/SDL OpenGL Application/main.c b/Xcode/TemplatesForXcodeLeopard/SDL OpenGL Application/main.c index b7794b3b6..3bc4d33b1 100644 --- a/Xcode/TemplatesForXcodeLeopard/SDL OpenGL Application/main.c +++ b/Xcode/TemplatesForXcodeLeopard/SDL OpenGL Application/main.c @@ -4,7 +4,7 @@ Please see the SDL documentation for details on using the SDL API: /Developer/Documentation/SDL/docs.html */ - + #include #include #include @@ -22,18 +22,18 @@ static SDL_Surface *gScreen; static void initAttributes () { // Setup attributes we want for the OpenGL context - + int value; - + // Don't set color bit sizes (SDL_GL_RED_SIZE, etc) // Mac OS X will always use 8-8-8-8 ARGB for 32-bit screens and // 5-5-5 RGB for 16-bit screens - + // Request a 16-bit depth buffer (without this, there is no depth buffer) value = 16; SDL_GL_SetAttribute (SDL_GL_DEPTH_SIZE, value); - - + + // Request double-buffered OpenGL // The fact that windows are double-buffered on Mac OS X has no effect // on OpenGL double buffering. @@ -46,41 +46,41 @@ static void printAttributes () // Print out attributes of the context we created int nAttr; int i; - + int attr[] = { SDL_GL_RED_SIZE, SDL_GL_BLUE_SIZE, SDL_GL_GREEN_SIZE, SDL_GL_ALPHA_SIZE, SDL_GL_BUFFER_SIZE, SDL_GL_DEPTH_SIZE }; - + char *desc[] = { "Red size: %d bits\n", "Blue size: %d bits\n", "Green size: %d bits\n", - "Alpha size: %d bits\n", "Color buffer size: %d bits\n", + "Alpha size: %d bits\n", "Color buffer size: %d bits\n", "Depth bufer size: %d bits\n" }; nAttr = sizeof(attr) / sizeof(int); - + for (i = 0; i < nAttr; i++) { - + int value; SDL_GL_GetAttribute (attr[i], &value); printf (desc[i], value); - } + } } static void createSurface (int fullscreen) { Uint32 flags = 0; - + flags = SDL_OPENGL; if (fullscreen) flags |= SDL_FULLSCREEN; - + // Create window gScreen = SDL_SetVideoMode (640, 480, 0, flags); if (gScreen == NULL) { - + fprintf (stderr, "Couldn't set 640x480 OpenGL video mode: %s\n", SDL_GetError()); - SDL_Quit(); - exit(2); - } + SDL_Quit(); + exit(2); + } } static void initGL () @@ -100,30 +100,30 @@ static void mainLoop () SDL_Event event; int done = 0; int fps = 24; - int delay = 1000/fps; + int delay = 1000/fps; int thenTicks = -1; int nowTicks; - + while ( !done ) { - /* Check for events */ - while ( SDL_PollEvent (&event) ) { - switch (event.type) { + /* Check for events */ + while ( SDL_PollEvent (&event) ) { + switch (event.type) { + + case SDL_MOUSEMOTION: + break; + case SDL_MOUSEBUTTONDOWN: + break; + case SDL_KEYDOWN: + /* Any keypress quits the app... */ + case SDL_QUIT: + done = 1; + break; + default: + break; + } + } - case SDL_MOUSEMOTION: - break; - case SDL_MOUSEBUTTONDOWN: - break; - case SDL_KEYDOWN: - /* Any keypress quits the app... */ - case SDL_QUIT: - done = 1; - break; - default: - break; - } - } - // Draw at 24 hz // This approach is not normally recommended - it is better to // use time-based animation and run as fast as possible @@ -144,36 +144,36 @@ static void mainLoop () } SDL_Delay (delay); - } + } } int main(int argc, char *argv[]) { - // Init SDL video subsystem - if ( SDL_Init (SDL_INIT_VIDEO) < 0 ) { - + // Init SDL video subsystem + if ( SDL_Init (SDL_INIT_VIDEO) < 0 ) { + fprintf(stderr, "Couldn't initialize SDL: %s\n", - SDL_GetError()); - exit(1); - } + SDL_GetError()); + exit(1); + } // Set GL context attributes initAttributes (); - + // Create GL context createSurface (0); - + // Get GL context attributes printAttributes (); - + // Init GL state initGL (); - + // Draw, get events... mainLoop (); - + // Cleanup - SDL_Quit(); - + SDL_Quit(); + return 0; } diff --git a/Xcode/TemplatesForXcodeSnowLeopard/SDL Application/main.c b/Xcode/TemplatesForXcodeSnowLeopard/SDL Application/main.c index 7115de989..47af3765d 100644 --- a/Xcode/TemplatesForXcodeSnowLeopard/SDL Application/main.c +++ b/Xcode/TemplatesForXcodeSnowLeopard/SDL Application/main.c @@ -4,7 +4,7 @@ Please see the SDL documentation for details on using the SDL API: /Developer/Documentation/SDL/docs.html */ - + #include #include #include @@ -14,52 +14,52 @@ int main(int argc, char *argv[]) { - Uint32 initflags = SDL_INIT_VIDEO; /* See documentation for details */ - SDL_Surface *screen; - Uint8 video_bpp = 0; - Uint32 videoflags = SDL_SWSURFACE; - int done; + Uint32 initflags = SDL_INIT_VIDEO; /* See documentation for details */ + SDL_Surface *screen; + Uint8 video_bpp = 0; + Uint32 videoflags = SDL_SWSURFACE; + int done; SDL_Event event; - /* Initialize the SDL library */ - if ( SDL_Init(initflags) < 0 ) { - fprintf(stderr, "Couldn't initialize SDL: %s\n", - SDL_GetError()); - exit(1); - } + /* Initialize the SDL library */ + if ( SDL_Init(initflags) < 0 ) { + fprintf(stderr, "Couldn't initialize SDL: %s\n", + SDL_GetError()); + exit(1); + } - /* Set 640x480 video mode */ - screen=SDL_SetVideoMode(640,480, video_bpp, videoflags); + /* Set 640x480 video mode */ + screen=SDL_SetVideoMode(640,480, video_bpp, videoflags); if (screen == NULL) { - fprintf(stderr, "Couldn't set 640x480x%d video mode: %s\n", + fprintf(stderr, "Couldn't set 640x480x%d video mode: %s\n", video_bpp, SDL_GetError()); - SDL_Quit(); - exit(2); - } + SDL_Quit(); + exit(2); + } - done = 0; - while ( !done ) { + done = 0; + while ( !done ) { - /* Check for events */ - while ( SDL_PollEvent(&event) ) { - switch (event.type) { + /* Check for events */ + while ( SDL_PollEvent(&event) ) { + switch (event.type) { - case SDL_MOUSEMOTION: - break; - case SDL_MOUSEBUTTONDOWN: - break; - case SDL_KEYDOWN: - /* Any keypress quits the app... */ - case SDL_QUIT: - done = 1; - break; - default: - break; - } - } - } - - /* Clean up the SDL library */ - SDL_Quit(); - return(0); + case SDL_MOUSEMOTION: + break; + case SDL_MOUSEBUTTONDOWN: + break; + case SDL_KEYDOWN: + /* Any keypress quits the app... */ + case SDL_QUIT: + done = 1; + break; + default: + break; + } + } + } + + /* Clean up the SDL library */ + SDL_Quit(); + return(0); } diff --git a/Xcode/TemplatesForXcodeSnowLeopard/SDL Cocoa Application/main.c b/Xcode/TemplatesForXcodeSnowLeopard/SDL Cocoa Application/main.c index 7115de989..47af3765d 100644 --- a/Xcode/TemplatesForXcodeSnowLeopard/SDL Cocoa Application/main.c +++ b/Xcode/TemplatesForXcodeSnowLeopard/SDL Cocoa Application/main.c @@ -4,7 +4,7 @@ Please see the SDL documentation for details on using the SDL API: /Developer/Documentation/SDL/docs.html */ - + #include #include #include @@ -14,52 +14,52 @@ int main(int argc, char *argv[]) { - Uint32 initflags = SDL_INIT_VIDEO; /* See documentation for details */ - SDL_Surface *screen; - Uint8 video_bpp = 0; - Uint32 videoflags = SDL_SWSURFACE; - int done; + Uint32 initflags = SDL_INIT_VIDEO; /* See documentation for details */ + SDL_Surface *screen; + Uint8 video_bpp = 0; + Uint32 videoflags = SDL_SWSURFACE; + int done; SDL_Event event; - /* Initialize the SDL library */ - if ( SDL_Init(initflags) < 0 ) { - fprintf(stderr, "Couldn't initialize SDL: %s\n", - SDL_GetError()); - exit(1); - } + /* Initialize the SDL library */ + if ( SDL_Init(initflags) < 0 ) { + fprintf(stderr, "Couldn't initialize SDL: %s\n", + SDL_GetError()); + exit(1); + } - /* Set 640x480 video mode */ - screen=SDL_SetVideoMode(640,480, video_bpp, videoflags); + /* Set 640x480 video mode */ + screen=SDL_SetVideoMode(640,480, video_bpp, videoflags); if (screen == NULL) { - fprintf(stderr, "Couldn't set 640x480x%d video mode: %s\n", + fprintf(stderr, "Couldn't set 640x480x%d video mode: %s\n", video_bpp, SDL_GetError()); - SDL_Quit(); - exit(2); - } + SDL_Quit(); + exit(2); + } - done = 0; - while ( !done ) { + done = 0; + while ( !done ) { - /* Check for events */ - while ( SDL_PollEvent(&event) ) { - switch (event.type) { + /* Check for events */ + while ( SDL_PollEvent(&event) ) { + switch (event.type) { - case SDL_MOUSEMOTION: - break; - case SDL_MOUSEBUTTONDOWN: - break; - case SDL_KEYDOWN: - /* Any keypress quits the app... */ - case SDL_QUIT: - done = 1; - break; - default: - break; - } - } - } - - /* Clean up the SDL library */ - SDL_Quit(); - return(0); + case SDL_MOUSEMOTION: + break; + case SDL_MOUSEBUTTONDOWN: + break; + case SDL_KEYDOWN: + /* Any keypress quits the app... */ + case SDL_QUIT: + done = 1; + break; + default: + break; + } + } + } + + /* Clean up the SDL library */ + SDL_Quit(); + return(0); } diff --git a/Xcode/TemplatesForXcodeSnowLeopard/SDL OpenGL Application/atlantis/atlantis.c b/Xcode/TemplatesForXcodeSnowLeopard/SDL OpenGL Application/atlantis/atlantis.c index 4efdf6ce8..debed809d 100644 --- a/Xcode/TemplatesForXcodeSnowLeopard/SDL OpenGL Application/atlantis/atlantis.c +++ b/Xcode/TemplatesForXcodeSnowLeopard/SDL OpenGL Application/atlantis/atlantis.c @@ -63,37 +63,37 @@ static double mtime(void) { struct timeval tk_time; struct timezone tz; - + gettimeofday(&tk_time, &tz); - + return 4294.967296 * tk_time.tv_sec + 0.000001 * tk_time.tv_usec; } static double filter(double in, double *save) { - static double k1 = 0.9; - static double k2 = 0.05; + static double k1 = 0.9; + static double k2 = 0.05; - save[3] = in; - save[1] = save[0]*k1 + k2*(save[3] + save[2]); + save[3] = in; + save[1] = save[0]*k1 + k2*(save[3] + save[2]); - save[0]=save[1]; - save[2]=save[3]; + save[0]=save[1]; + save[2]=save[3]; - return(save[1]); + return(save[1]); } void DrawStr(const char *str) { - GLint i = 0; - - if(!str) return; - - while(str[i]) - { - glutBitmapCharacter(GLUT_BITMAP_HELVETICA_12, str[i]); - i++; - } + GLint i = 0; + + if(!str) return; + + while(str[i]) + { + glutBitmapCharacter(GLUT_BITMAP_HELVETICA_12, str[i]); + i++; + } } void @@ -168,9 +168,9 @@ Atlantis_Init(void) InitFishs(); glEnable(GL_FOG); - glFogi(GL_FOG_MODE, GL_EXP); - glFogf(GL_FOG_DENSITY, 0.0000025); - glFogfv(GL_FOG_COLOR, fog_color); + glFogi(GL_FOG_MODE, GL_EXP); + glFogf(GL_FOG_DENSITY, 0.0000025); + glFogfv(GL_FOG_COLOR, fog_color); glClearColor(0.0, 0.5, 0.9, 1.0); } @@ -178,9 +178,9 @@ Atlantis_Init(void) void Atlantis_Reshape(int width, int height) { - w_win = width; - h_win = height; - + w_win = width; + h_win = height; + glViewport(0, 0, width, height); glMatrixMode(GL_PROJECTION); @@ -212,37 +212,37 @@ Atlantis_Key(unsigned char key, int x, int y) { switch (key) { case 't': - Timing = !Timing; + Timing = !Timing; break; case ' ': - switch(StrMode) - { - case GL_EXTENSIONS: - StrMode = GL_VENDOR; - break; - case GL_VENDOR: - StrMode = GL_RENDERER; - break; - case GL_RENDERER: - StrMode = GL_VERSION; - break; - case GL_VERSION: - StrMode = GL_EXTENSIONS; - break; - } - break; + switch(StrMode) + { + case GL_EXTENSIONS: + StrMode = GL_VENDOR; + break; + case GL_VENDOR: + StrMode = GL_RENDERER; + break; + case GL_RENDERER: + StrMode = GL_VERSION; + break; + case GL_VERSION: + StrMode = GL_EXTENSIONS; + break; + } + break; case 27: /* Esc will quit */ exit(1); break; - case 's': /* "s" start animation */ + case 's': /* "s" start animation */ moving = GL_TRUE; //glutIdleFunc(Animate); break; - case 'a': /* "a" stop animation */ + case 'a': /* "a" stop animation */ moving = GL_FALSE; //glutIdleFunc(NULL); break; - case '.': /* "." will advance frame */ + case '.': /* "." will advance frame */ if (!moving) { Atlantis_Animate(); } @@ -251,21 +251,21 @@ Atlantis_Key(unsigned char key, int x, int y) /* void Display(void) { - static float P123[3] = {-448.94, -203.14, 9499.60}; - static float P124[3] = {-442.64, -185.20, 9528.07}; - static float P125[3] = {-441.07, -148.05, 9528.07}; - static float P126[3] = {-443.43, -128.84, 9499.60}; - static float P127[3] = {-456.87, -146.78, 9466.67}; - static float P128[3] = {-453.68, -183.93, 9466.67}; + static float P123[3] = {-448.94, -203.14, 9499.60}; + static float P124[3] = {-442.64, -185.20, 9528.07}; + static float P125[3] = {-441.07, -148.05, 9528.07}; + static float P126[3] = {-443.43, -128.84, 9499.60}; + static float P127[3] = {-456.87, -146.78, 9466.67}; + static float P128[3] = {-453.68, -183.93, 9466.67}; - glClear(GL_COLOR_BUFFER_BIT | GL_DEPTH_BUFFER_BIT); - - glPushMatrix(); + glClear(GL_COLOR_BUFFER_BIT | GL_DEPTH_BUFFER_BIT); + + glPushMatrix(); FishTransform(&dolph); DrawDolphin(&dolph); glPopMatrix(); - - glutSwapBuffers(); + + glutSwapBuffers(); } */ @@ -274,9 +274,9 @@ Atlantis_Display(void) { int i; static double th[4] = {0.0, 0.0, 0.0, 0.0}; - static double t1 = 0.0, t2 = 0.0, t; - char num_str[128]; - + static double t1 = 0.0, t2 = 0.0, t; + char num_str[128]; + t1 = t2; glClear(GL_COLOR_BUFFER_BIT | GL_DEPTH_BUFFER_BIT); @@ -303,56 +303,56 @@ Atlantis_Display(void) glScalef(0.45, 0.45, 0.3); DrawWhale(&babyWhale); glPopMatrix(); - + if(Timing) { - t2 = mtime(); - t = t2 - t1; - if(t > 0.0001) t = 1.0 / t; - - glDisable(GL_LIGHTING); - //glDisable(GL_DEPTH_TEST); - - glColor3f(1.0, 0.0, 0.0); - - glMatrixMode (GL_PROJECTION); - glPushMatrix(); - glLoadIdentity(); - glOrtho(0, w_win, 0, h_win, -10.0, 10.0); - - glRasterPos2f(5.0, 5.0); - - switch(StrMode) - { - case GL_VENDOR: - sprintf(num_str, "%0.2f Hz, %dx%d, VENDOR: ", filter(t, th), w_win, h_win); - DrawStr(num_str); - DrawStr(glGetString(GL_VENDOR)); - break; - case GL_RENDERER: - sprintf(num_str, "%0.2f Hz, %dx%d, RENDERER: ", filter(t, th), w_win, h_win); - DrawStr(num_str); - DrawStr(glGetString(GL_RENDERER)); - break; - case GL_VERSION: - sprintf(num_str, "%0.2f Hz, %dx%d, VERSION: ", filter(t, th), w_win, h_win); - DrawStr(num_str); - DrawStr(glGetString(GL_VERSION)); - break; - case GL_EXTENSIONS: - sprintf(num_str, "%0.2f Hz, %dx%d, EXTENSIONS: ", filter(t, th), w_win, h_win); - DrawStr(num_str); - DrawStr(glGetString(GL_EXTENSIONS)); - break; - } - - glPopMatrix(); - glMatrixMode(GL_MODELVIEW); - - glEnable(GL_LIGHTING); - //glEnable(GL_DEPTH_TEST); - } - + t2 = mtime(); + t = t2 - t1; + if(t > 0.0001) t = 1.0 / t; + + glDisable(GL_LIGHTING); + //glDisable(GL_DEPTH_TEST); + + glColor3f(1.0, 0.0, 0.0); + + glMatrixMode (GL_PROJECTION); + glPushMatrix(); + glLoadIdentity(); + glOrtho(0, w_win, 0, h_win, -10.0, 10.0); + + glRasterPos2f(5.0, 5.0); + + switch(StrMode) + { + case GL_VENDOR: + sprintf(num_str, "%0.2f Hz, %dx%d, VENDOR: ", filter(t, th), w_win, h_win); + DrawStr(num_str); + DrawStr(glGetString(GL_VENDOR)); + break; + case GL_RENDERER: + sprintf(num_str, "%0.2f Hz, %dx%d, RENDERER: ", filter(t, th), w_win, h_win); + DrawStr(num_str); + DrawStr(glGetString(GL_RENDERER)); + break; + case GL_VERSION: + sprintf(num_str, "%0.2f Hz, %dx%d, VERSION: ", filter(t, th), w_win, h_win); + DrawStr(num_str); + DrawStr(glGetString(GL_VERSION)); + break; + case GL_EXTENSIONS: + sprintf(num_str, "%0.2f Hz, %dx%d, EXTENSIONS: ", filter(t, th), w_win, h_win); + DrawStr(num_str); + DrawStr(glGetString(GL_EXTENSIONS)); + break; + } + + glPopMatrix(); + glMatrixMode(GL_MODELVIEW); + + glEnable(GL_LIGHTING); + //glEnable(GL_DEPTH_TEST); + } + count++; glutSwapBuffers(); @@ -377,18 +377,18 @@ timingSelect(int value) { switch(value) { - case 1: - StrMode = GL_VENDOR; - break; - case 2: - StrMode = GL_RENDERER; - break; - case 3: - StrMode = GL_VERSION; - break; - case 4: - StrMode = GL_EXTENSIONS; - break; + case 1: + StrMode = GL_VENDOR; + break; + case 2: + StrMode = GL_RENDERER; + break; + case 3: + StrMode = GL_VERSION; + break; + case 4: + StrMode = GL_EXTENSIONS; + break; } } @@ -413,24 +413,24 @@ menuSelect(int value) int main(int argc, char **argv) { - GLboolean fullscreen = GL_FALSE; - GLint time_menu; - - srand(0); + GLboolean fullscreen = GL_FALSE; + GLint time_menu; + + srand(0); glutInit(&argc, argv); - if (argc > 1 && !strcmp(argv[1], "-w")) - fullscreen = GL_FALSE; + if (argc > 1 && !strcmp(argv[1], "-w")) + fullscreen = GL_FALSE; - //glutInitDisplayMode(GLUT_RGBA | GLUT_DOUBLE | GLUT_DEPTH); - glutInitDisplayString("rgba double depth=24"); - if (fullscreen) { - glutGameModeString("1024x768:32"); - glutEnterGameMode(); - } else { - glutInitWindowSize(320, 240); - glutCreateWindow("Atlantis Timing"); - } + //glutInitDisplayMode(GLUT_RGBA | GLUT_DOUBLE | GLUT_DEPTH); + glutInitDisplayString("rgba double depth=24"); + if (fullscreen) { + glutGameModeString("1024x768:32"); + glutEnterGameMode(); + } else { + glutInitWindowSize(320, 240); + glutCreateWindow("Atlantis Timing"); + } Init(); glutDisplayFunc(Display); glutReshapeFunc(Reshape); @@ -438,19 +438,19 @@ main(int argc, char **argv) moving = GL_TRUE; glutIdleFunc(Animate); glutVisibilityFunc(Visible); - + time_menu = glutCreateMenu(timingSelect); glutAddMenuEntry("GL_VENDOR", 1); glutAddMenuEntry("GL_RENDERER", 2); glutAddMenuEntry("GL_VERSION", 3); glutAddMenuEntry("GL_EXTENSIONS", 4); - + glutCreateMenu(menuSelect); glutAddMenuEntry("Start motion", 1); glutAddMenuEntry("Stop motion", 2); glutAddSubMenu("Timing Mode", time_menu); glutAddMenuEntry("Quit", 4); - + //glutAttachMenu(GLUT_RIGHT_BUTTON); glutAttachMenu(GLUT_RIGHT_BUTTON); glutMainLoop(); diff --git a/Xcode/TemplatesForXcodeSnowLeopard/SDL OpenGL Application/main.c b/Xcode/TemplatesForXcodeSnowLeopard/SDL OpenGL Application/main.c index 1ef49c0c9..3bc4d33b1 100644 --- a/Xcode/TemplatesForXcodeSnowLeopard/SDL OpenGL Application/main.c +++ b/Xcode/TemplatesForXcodeSnowLeopard/SDL OpenGL Application/main.c @@ -4,7 +4,7 @@ Please see the SDL documentation for details on using the SDL API: /Developer/Documentation/SDL/docs.html */ - + #include #include #include @@ -22,18 +22,18 @@ static SDL_Surface *gScreen; static void initAttributes () { // Setup attributes we want for the OpenGL context - + int value; - + // Don't set color bit sizes (SDL_GL_RED_SIZE, etc) // Mac OS X will always use 8-8-8-8 ARGB for 32-bit screens and // 5-5-5 RGB for 16-bit screens - + // Request a 16-bit depth buffer (without this, there is no depth buffer) value = 16; SDL_GL_SetAttribute (SDL_GL_DEPTH_SIZE, value); - - + + // Request double-buffered OpenGL // The fact that windows are double-buffered on Mac OS X has no effect // on OpenGL double buffering. @@ -46,36 +46,36 @@ static void printAttributes () // Print out attributes of the context we created int nAttr; int i; - + int attr[] = { SDL_GL_RED_SIZE, SDL_GL_BLUE_SIZE, SDL_GL_GREEN_SIZE, SDL_GL_ALPHA_SIZE, SDL_GL_BUFFER_SIZE, SDL_GL_DEPTH_SIZE }; - + char *desc[] = { "Red size: %d bits\n", "Blue size: %d bits\n", "Green size: %d bits\n", - "Alpha size: %d bits\n", "Color buffer size: %d bits\n", + "Alpha size: %d bits\n", "Color buffer size: %d bits\n", "Depth bufer size: %d bits\n" }; nAttr = sizeof(attr) / sizeof(int); - + for (i = 0; i < nAttr; i++) { - + int value; SDL_GL_GetAttribute (attr[i], &value); printf (desc[i], value); - } + } } static void createSurface (int fullscreen) { Uint32 flags = 0; - + flags = SDL_OPENGL; if (fullscreen) flags |= SDL_FULLSCREEN; - + // Create window gScreen = SDL_SetVideoMode (640, 480, 0, flags); if (gScreen == NULL) { - + fprintf (stderr, "Couldn't set 640x480 OpenGL video mode: %s\n", SDL_GetError()); SDL_Quit(); @@ -103,7 +103,7 @@ static void mainLoop () int delay = 1000/fps; int thenTicks = -1; int nowTicks; - + while ( !done ) { /* Check for events */ @@ -123,7 +123,7 @@ static void mainLoop () break; } } - + // Draw at 24 hz // This approach is not normally recommended - it is better to // use time-based animation and run as fast as possible @@ -151,7 +151,7 @@ int main(int argc, char *argv[]) { // Init SDL video subsystem if ( SDL_Init (SDL_INIT_VIDEO) < 0 ) { - + fprintf(stderr, "Couldn't initialize SDL: %s\n", SDL_GetError()); exit(1); @@ -159,19 +159,19 @@ int main(int argc, char *argv[]) // Set GL context attributes initAttributes (); - + // Create GL context createSurface (0); - + // Get GL context attributes printAttributes (); - + // Init GL state initGL (); - + // Draw, get events... mainLoop (); - + // Cleanup SDL_Quit(); diff --git a/Xcode/TemplatesForXcodeTiger/SDL Application/main.c b/Xcode/TemplatesForXcodeTiger/SDL Application/main.c index 7115de989..47af3765d 100644 --- a/Xcode/TemplatesForXcodeTiger/SDL Application/main.c +++ b/Xcode/TemplatesForXcodeTiger/SDL Application/main.c @@ -4,7 +4,7 @@ Please see the SDL documentation for details on using the SDL API: /Developer/Documentation/SDL/docs.html */ - + #include #include #include @@ -14,52 +14,52 @@ int main(int argc, char *argv[]) { - Uint32 initflags = SDL_INIT_VIDEO; /* See documentation for details */ - SDL_Surface *screen; - Uint8 video_bpp = 0; - Uint32 videoflags = SDL_SWSURFACE; - int done; + Uint32 initflags = SDL_INIT_VIDEO; /* See documentation for details */ + SDL_Surface *screen; + Uint8 video_bpp = 0; + Uint32 videoflags = SDL_SWSURFACE; + int done; SDL_Event event; - /* Initialize the SDL library */ - if ( SDL_Init(initflags) < 0 ) { - fprintf(stderr, "Couldn't initialize SDL: %s\n", - SDL_GetError()); - exit(1); - } + /* Initialize the SDL library */ + if ( SDL_Init(initflags) < 0 ) { + fprintf(stderr, "Couldn't initialize SDL: %s\n", + SDL_GetError()); + exit(1); + } - /* Set 640x480 video mode */ - screen=SDL_SetVideoMode(640,480, video_bpp, videoflags); + /* Set 640x480 video mode */ + screen=SDL_SetVideoMode(640,480, video_bpp, videoflags); if (screen == NULL) { - fprintf(stderr, "Couldn't set 640x480x%d video mode: %s\n", + fprintf(stderr, "Couldn't set 640x480x%d video mode: %s\n", video_bpp, SDL_GetError()); - SDL_Quit(); - exit(2); - } + SDL_Quit(); + exit(2); + } - done = 0; - while ( !done ) { + done = 0; + while ( !done ) { - /* Check for events */ - while ( SDL_PollEvent(&event) ) { - switch (event.type) { + /* Check for events */ + while ( SDL_PollEvent(&event) ) { + switch (event.type) { - case SDL_MOUSEMOTION: - break; - case SDL_MOUSEBUTTONDOWN: - break; - case SDL_KEYDOWN: - /* Any keypress quits the app... */ - case SDL_QUIT: - done = 1; - break; - default: - break; - } - } - } - - /* Clean up the SDL library */ - SDL_Quit(); - return(0); + case SDL_MOUSEMOTION: + break; + case SDL_MOUSEBUTTONDOWN: + break; + case SDL_KEYDOWN: + /* Any keypress quits the app... */ + case SDL_QUIT: + done = 1; + break; + default: + break; + } + } + } + + /* Clean up the SDL library */ + SDL_Quit(); + return(0); } diff --git a/Xcode/TemplatesForXcodeTiger/SDL Cocoa Application/main.c b/Xcode/TemplatesForXcodeTiger/SDL Cocoa Application/main.c index 7115de989..47af3765d 100644 --- a/Xcode/TemplatesForXcodeTiger/SDL Cocoa Application/main.c +++ b/Xcode/TemplatesForXcodeTiger/SDL Cocoa Application/main.c @@ -4,7 +4,7 @@ Please see the SDL documentation for details on using the SDL API: /Developer/Documentation/SDL/docs.html */ - + #include #include #include @@ -14,52 +14,52 @@ int main(int argc, char *argv[]) { - Uint32 initflags = SDL_INIT_VIDEO; /* See documentation for details */ - SDL_Surface *screen; - Uint8 video_bpp = 0; - Uint32 videoflags = SDL_SWSURFACE; - int done; + Uint32 initflags = SDL_INIT_VIDEO; /* See documentation for details */ + SDL_Surface *screen; + Uint8 video_bpp = 0; + Uint32 videoflags = SDL_SWSURFACE; + int done; SDL_Event event; - /* Initialize the SDL library */ - if ( SDL_Init(initflags) < 0 ) { - fprintf(stderr, "Couldn't initialize SDL: %s\n", - SDL_GetError()); - exit(1); - } + /* Initialize the SDL library */ + if ( SDL_Init(initflags) < 0 ) { + fprintf(stderr, "Couldn't initialize SDL: %s\n", + SDL_GetError()); + exit(1); + } - /* Set 640x480 video mode */ - screen=SDL_SetVideoMode(640,480, video_bpp, videoflags); + /* Set 640x480 video mode */ + screen=SDL_SetVideoMode(640,480, video_bpp, videoflags); if (screen == NULL) { - fprintf(stderr, "Couldn't set 640x480x%d video mode: %s\n", + fprintf(stderr, "Couldn't set 640x480x%d video mode: %s\n", video_bpp, SDL_GetError()); - SDL_Quit(); - exit(2); - } + SDL_Quit(); + exit(2); + } - done = 0; - while ( !done ) { + done = 0; + while ( !done ) { - /* Check for events */ - while ( SDL_PollEvent(&event) ) { - switch (event.type) { + /* Check for events */ + while ( SDL_PollEvent(&event) ) { + switch (event.type) { - case SDL_MOUSEMOTION: - break; - case SDL_MOUSEBUTTONDOWN: - break; - case SDL_KEYDOWN: - /* Any keypress quits the app... */ - case SDL_QUIT: - done = 1; - break; - default: - break; - } - } - } - - /* Clean up the SDL library */ - SDL_Quit(); - return(0); + case SDL_MOUSEMOTION: + break; + case SDL_MOUSEBUTTONDOWN: + break; + case SDL_KEYDOWN: + /* Any keypress quits the app... */ + case SDL_QUIT: + done = 1; + break; + default: + break; + } + } + } + + /* Clean up the SDL library */ + SDL_Quit(); + return(0); } diff --git a/Xcode/TemplatesForXcodeTiger/SDL OpenGL Application/atlantis/atlantis.c b/Xcode/TemplatesForXcodeTiger/SDL OpenGL Application/atlantis/atlantis.c index 4efdf6ce8..debed809d 100644 --- a/Xcode/TemplatesForXcodeTiger/SDL OpenGL Application/atlantis/atlantis.c +++ b/Xcode/TemplatesForXcodeTiger/SDL OpenGL Application/atlantis/atlantis.c @@ -63,37 +63,37 @@ static double mtime(void) { struct timeval tk_time; struct timezone tz; - + gettimeofday(&tk_time, &tz); - + return 4294.967296 * tk_time.tv_sec + 0.000001 * tk_time.tv_usec; } static double filter(double in, double *save) { - static double k1 = 0.9; - static double k2 = 0.05; + static double k1 = 0.9; + static double k2 = 0.05; - save[3] = in; - save[1] = save[0]*k1 + k2*(save[3] + save[2]); + save[3] = in; + save[1] = save[0]*k1 + k2*(save[3] + save[2]); - save[0]=save[1]; - save[2]=save[3]; + save[0]=save[1]; + save[2]=save[3]; - return(save[1]); + return(save[1]); } void DrawStr(const char *str) { - GLint i = 0; - - if(!str) return; - - while(str[i]) - { - glutBitmapCharacter(GLUT_BITMAP_HELVETICA_12, str[i]); - i++; - } + GLint i = 0; + + if(!str) return; + + while(str[i]) + { + glutBitmapCharacter(GLUT_BITMAP_HELVETICA_12, str[i]); + i++; + } } void @@ -168,9 +168,9 @@ Atlantis_Init(void) InitFishs(); glEnable(GL_FOG); - glFogi(GL_FOG_MODE, GL_EXP); - glFogf(GL_FOG_DENSITY, 0.0000025); - glFogfv(GL_FOG_COLOR, fog_color); + glFogi(GL_FOG_MODE, GL_EXP); + glFogf(GL_FOG_DENSITY, 0.0000025); + glFogfv(GL_FOG_COLOR, fog_color); glClearColor(0.0, 0.5, 0.9, 1.0); } @@ -178,9 +178,9 @@ Atlantis_Init(void) void Atlantis_Reshape(int width, int height) { - w_win = width; - h_win = height; - + w_win = width; + h_win = height; + glViewport(0, 0, width, height); glMatrixMode(GL_PROJECTION); @@ -212,37 +212,37 @@ Atlantis_Key(unsigned char key, int x, int y) { switch (key) { case 't': - Timing = !Timing; + Timing = !Timing; break; case ' ': - switch(StrMode) - { - case GL_EXTENSIONS: - StrMode = GL_VENDOR; - break; - case GL_VENDOR: - StrMode = GL_RENDERER; - break; - case GL_RENDERER: - StrMode = GL_VERSION; - break; - case GL_VERSION: - StrMode = GL_EXTENSIONS; - break; - } - break; + switch(StrMode) + { + case GL_EXTENSIONS: + StrMode = GL_VENDOR; + break; + case GL_VENDOR: + StrMode = GL_RENDERER; + break; + case GL_RENDERER: + StrMode = GL_VERSION; + break; + case GL_VERSION: + StrMode = GL_EXTENSIONS; + break; + } + break; case 27: /* Esc will quit */ exit(1); break; - case 's': /* "s" start animation */ + case 's': /* "s" start animation */ moving = GL_TRUE; //glutIdleFunc(Animate); break; - case 'a': /* "a" stop animation */ + case 'a': /* "a" stop animation */ moving = GL_FALSE; //glutIdleFunc(NULL); break; - case '.': /* "." will advance frame */ + case '.': /* "." will advance frame */ if (!moving) { Atlantis_Animate(); } @@ -251,21 +251,21 @@ Atlantis_Key(unsigned char key, int x, int y) /* void Display(void) { - static float P123[3] = {-448.94, -203.14, 9499.60}; - static float P124[3] = {-442.64, -185.20, 9528.07}; - static float P125[3] = {-441.07, -148.05, 9528.07}; - static float P126[3] = {-443.43, -128.84, 9499.60}; - static float P127[3] = {-456.87, -146.78, 9466.67}; - static float P128[3] = {-453.68, -183.93, 9466.67}; + static float P123[3] = {-448.94, -203.14, 9499.60}; + static float P124[3] = {-442.64, -185.20, 9528.07}; + static float P125[3] = {-441.07, -148.05, 9528.07}; + static float P126[3] = {-443.43, -128.84, 9499.60}; + static float P127[3] = {-456.87, -146.78, 9466.67}; + static float P128[3] = {-453.68, -183.93, 9466.67}; - glClear(GL_COLOR_BUFFER_BIT | GL_DEPTH_BUFFER_BIT); - - glPushMatrix(); + glClear(GL_COLOR_BUFFER_BIT | GL_DEPTH_BUFFER_BIT); + + glPushMatrix(); FishTransform(&dolph); DrawDolphin(&dolph); glPopMatrix(); - - glutSwapBuffers(); + + glutSwapBuffers(); } */ @@ -274,9 +274,9 @@ Atlantis_Display(void) { int i; static double th[4] = {0.0, 0.0, 0.0, 0.0}; - static double t1 = 0.0, t2 = 0.0, t; - char num_str[128]; - + static double t1 = 0.0, t2 = 0.0, t; + char num_str[128]; + t1 = t2; glClear(GL_COLOR_BUFFER_BIT | GL_DEPTH_BUFFER_BIT); @@ -303,56 +303,56 @@ Atlantis_Display(void) glScalef(0.45, 0.45, 0.3); DrawWhale(&babyWhale); glPopMatrix(); - + if(Timing) { - t2 = mtime(); - t = t2 - t1; - if(t > 0.0001) t = 1.0 / t; - - glDisable(GL_LIGHTING); - //glDisable(GL_DEPTH_TEST); - - glColor3f(1.0, 0.0, 0.0); - - glMatrixMode (GL_PROJECTION); - glPushMatrix(); - glLoadIdentity(); - glOrtho(0, w_win, 0, h_win, -10.0, 10.0); - - glRasterPos2f(5.0, 5.0); - - switch(StrMode) - { - case GL_VENDOR: - sprintf(num_str, "%0.2f Hz, %dx%d, VENDOR: ", filter(t, th), w_win, h_win); - DrawStr(num_str); - DrawStr(glGetString(GL_VENDOR)); - break; - case GL_RENDERER: - sprintf(num_str, "%0.2f Hz, %dx%d, RENDERER: ", filter(t, th), w_win, h_win); - DrawStr(num_str); - DrawStr(glGetString(GL_RENDERER)); - break; - case GL_VERSION: - sprintf(num_str, "%0.2f Hz, %dx%d, VERSION: ", filter(t, th), w_win, h_win); - DrawStr(num_str); - DrawStr(glGetString(GL_VERSION)); - break; - case GL_EXTENSIONS: - sprintf(num_str, "%0.2f Hz, %dx%d, EXTENSIONS: ", filter(t, th), w_win, h_win); - DrawStr(num_str); - DrawStr(glGetString(GL_EXTENSIONS)); - break; - } - - glPopMatrix(); - glMatrixMode(GL_MODELVIEW); - - glEnable(GL_LIGHTING); - //glEnable(GL_DEPTH_TEST); - } - + t2 = mtime(); + t = t2 - t1; + if(t > 0.0001) t = 1.0 / t; + + glDisable(GL_LIGHTING); + //glDisable(GL_DEPTH_TEST); + + glColor3f(1.0, 0.0, 0.0); + + glMatrixMode (GL_PROJECTION); + glPushMatrix(); + glLoadIdentity(); + glOrtho(0, w_win, 0, h_win, -10.0, 10.0); + + glRasterPos2f(5.0, 5.0); + + switch(StrMode) + { + case GL_VENDOR: + sprintf(num_str, "%0.2f Hz, %dx%d, VENDOR: ", filter(t, th), w_win, h_win); + DrawStr(num_str); + DrawStr(glGetString(GL_VENDOR)); + break; + case GL_RENDERER: + sprintf(num_str, "%0.2f Hz, %dx%d, RENDERER: ", filter(t, th), w_win, h_win); + DrawStr(num_str); + DrawStr(glGetString(GL_RENDERER)); + break; + case GL_VERSION: + sprintf(num_str, "%0.2f Hz, %dx%d, VERSION: ", filter(t, th), w_win, h_win); + DrawStr(num_str); + DrawStr(glGetString(GL_VERSION)); + break; + case GL_EXTENSIONS: + sprintf(num_str, "%0.2f Hz, %dx%d, EXTENSIONS: ", filter(t, th), w_win, h_win); + DrawStr(num_str); + DrawStr(glGetString(GL_EXTENSIONS)); + break; + } + + glPopMatrix(); + glMatrixMode(GL_MODELVIEW); + + glEnable(GL_LIGHTING); + //glEnable(GL_DEPTH_TEST); + } + count++; glutSwapBuffers(); @@ -377,18 +377,18 @@ timingSelect(int value) { switch(value) { - case 1: - StrMode = GL_VENDOR; - break; - case 2: - StrMode = GL_RENDERER; - break; - case 3: - StrMode = GL_VERSION; - break; - case 4: - StrMode = GL_EXTENSIONS; - break; + case 1: + StrMode = GL_VENDOR; + break; + case 2: + StrMode = GL_RENDERER; + break; + case 3: + StrMode = GL_VERSION; + break; + case 4: + StrMode = GL_EXTENSIONS; + break; } } @@ -413,24 +413,24 @@ menuSelect(int value) int main(int argc, char **argv) { - GLboolean fullscreen = GL_FALSE; - GLint time_menu; - - srand(0); + GLboolean fullscreen = GL_FALSE; + GLint time_menu; + + srand(0); glutInit(&argc, argv); - if (argc > 1 && !strcmp(argv[1], "-w")) - fullscreen = GL_FALSE; + if (argc > 1 && !strcmp(argv[1], "-w")) + fullscreen = GL_FALSE; - //glutInitDisplayMode(GLUT_RGBA | GLUT_DOUBLE | GLUT_DEPTH); - glutInitDisplayString("rgba double depth=24"); - if (fullscreen) { - glutGameModeString("1024x768:32"); - glutEnterGameMode(); - } else { - glutInitWindowSize(320, 240); - glutCreateWindow("Atlantis Timing"); - } + //glutInitDisplayMode(GLUT_RGBA | GLUT_DOUBLE | GLUT_DEPTH); + glutInitDisplayString("rgba double depth=24"); + if (fullscreen) { + glutGameModeString("1024x768:32"); + glutEnterGameMode(); + } else { + glutInitWindowSize(320, 240); + glutCreateWindow("Atlantis Timing"); + } Init(); glutDisplayFunc(Display); glutReshapeFunc(Reshape); @@ -438,19 +438,19 @@ main(int argc, char **argv) moving = GL_TRUE; glutIdleFunc(Animate); glutVisibilityFunc(Visible); - + time_menu = glutCreateMenu(timingSelect); glutAddMenuEntry("GL_VENDOR", 1); glutAddMenuEntry("GL_RENDERER", 2); glutAddMenuEntry("GL_VERSION", 3); glutAddMenuEntry("GL_EXTENSIONS", 4); - + glutCreateMenu(menuSelect); glutAddMenuEntry("Start motion", 1); glutAddMenuEntry("Stop motion", 2); glutAddSubMenu("Timing Mode", time_menu); glutAddMenuEntry("Quit", 4); - + //glutAttachMenu(GLUT_RIGHT_BUTTON); glutAttachMenu(GLUT_RIGHT_BUTTON); glutMainLoop(); diff --git a/Xcode/TemplatesForXcodeTiger/SDL OpenGL Application/main.c b/Xcode/TemplatesForXcodeTiger/SDL OpenGL Application/main.c index b7794b3b6..3bc4d33b1 100644 --- a/Xcode/TemplatesForXcodeTiger/SDL OpenGL Application/main.c +++ b/Xcode/TemplatesForXcodeTiger/SDL OpenGL Application/main.c @@ -4,7 +4,7 @@ Please see the SDL documentation for details on using the SDL API: /Developer/Documentation/SDL/docs.html */ - + #include #include #include @@ -22,18 +22,18 @@ static SDL_Surface *gScreen; static void initAttributes () { // Setup attributes we want for the OpenGL context - + int value; - + // Don't set color bit sizes (SDL_GL_RED_SIZE, etc) // Mac OS X will always use 8-8-8-8 ARGB for 32-bit screens and // 5-5-5 RGB for 16-bit screens - + // Request a 16-bit depth buffer (without this, there is no depth buffer) value = 16; SDL_GL_SetAttribute (SDL_GL_DEPTH_SIZE, value); - - + + // Request double-buffered OpenGL // The fact that windows are double-buffered on Mac OS X has no effect // on OpenGL double buffering. @@ -46,41 +46,41 @@ static void printAttributes () // Print out attributes of the context we created int nAttr; int i; - + int attr[] = { SDL_GL_RED_SIZE, SDL_GL_BLUE_SIZE, SDL_GL_GREEN_SIZE, SDL_GL_ALPHA_SIZE, SDL_GL_BUFFER_SIZE, SDL_GL_DEPTH_SIZE }; - + char *desc[] = { "Red size: %d bits\n", "Blue size: %d bits\n", "Green size: %d bits\n", - "Alpha size: %d bits\n", "Color buffer size: %d bits\n", + "Alpha size: %d bits\n", "Color buffer size: %d bits\n", "Depth bufer size: %d bits\n" }; nAttr = sizeof(attr) / sizeof(int); - + for (i = 0; i < nAttr; i++) { - + int value; SDL_GL_GetAttribute (attr[i], &value); printf (desc[i], value); - } + } } static void createSurface (int fullscreen) { Uint32 flags = 0; - + flags = SDL_OPENGL; if (fullscreen) flags |= SDL_FULLSCREEN; - + // Create window gScreen = SDL_SetVideoMode (640, 480, 0, flags); if (gScreen == NULL) { - + fprintf (stderr, "Couldn't set 640x480 OpenGL video mode: %s\n", SDL_GetError()); - SDL_Quit(); - exit(2); - } + SDL_Quit(); + exit(2); + } } static void initGL () @@ -100,30 +100,30 @@ static void mainLoop () SDL_Event event; int done = 0; int fps = 24; - int delay = 1000/fps; + int delay = 1000/fps; int thenTicks = -1; int nowTicks; - + while ( !done ) { - /* Check for events */ - while ( SDL_PollEvent (&event) ) { - switch (event.type) { + /* Check for events */ + while ( SDL_PollEvent (&event) ) { + switch (event.type) { + + case SDL_MOUSEMOTION: + break; + case SDL_MOUSEBUTTONDOWN: + break; + case SDL_KEYDOWN: + /* Any keypress quits the app... */ + case SDL_QUIT: + done = 1; + break; + default: + break; + } + } - case SDL_MOUSEMOTION: - break; - case SDL_MOUSEBUTTONDOWN: - break; - case SDL_KEYDOWN: - /* Any keypress quits the app... */ - case SDL_QUIT: - done = 1; - break; - default: - break; - } - } - // Draw at 24 hz // This approach is not normally recommended - it is better to // use time-based animation and run as fast as possible @@ -144,36 +144,36 @@ static void mainLoop () } SDL_Delay (delay); - } + } } int main(int argc, char *argv[]) { - // Init SDL video subsystem - if ( SDL_Init (SDL_INIT_VIDEO) < 0 ) { - + // Init SDL video subsystem + if ( SDL_Init (SDL_INIT_VIDEO) < 0 ) { + fprintf(stderr, "Couldn't initialize SDL: %s\n", - SDL_GetError()); - exit(1); - } + SDL_GetError()); + exit(1); + } // Set GL context attributes initAttributes (); - + // Create GL context createSurface (0); - + // Get GL context attributes printAttributes (); - + // Init GL state initGL (); - + // Draw, get events... mainLoop (); - + // Cleanup - SDL_Quit(); - + SDL_Quit(); + return 0; } diff --git a/include/SDL.h b/include/SDL.h index 0cfcdc71a..878ab1d3c 100644 --- a/include/SDL.h +++ b/include/SDL.h @@ -21,42 +21,42 @@ /** * \file SDL.h - * + * * Main include header for the SDL library */ /** * \mainpage Simple DirectMedia Layer (SDL) - * + * * http://www.libsdl.org/ - * + * * \section intro_sec Introduction - * + * * This is the Simple DirectMedia Layer, a general API that provides low * level access to audio, keyboard, mouse, joystick, 3D hardware via OpenGL, * and 2D framebuffer across multiple platforms. - * + * * SDL is written in C, but works with C++ natively, and has bindings to * several other languages, including Ada, C#, Eiffel, Erlang, Euphoria, * Guile, Haskell, Java, Lisp, Lua, ML, Objective C, Pascal, Perl, PHP, * Pike, Pliant, Python, Ruby, and Smalltalk. - * + * * This library is distributed under the zlib license, which can be * found in the file "COPYING". This license allows you to use SDL * freely for any purpose as long as you retain the copyright notice. - * + * * The best way to learn how to use SDL is to check out the header files in * the "include" subdirectory and the programs in the "test" subdirectory. * The header files and test programs are well commented and always up to date. * More documentation and FAQs are available online at: - * http://wiki.libsdl.org/ - * + * http://wiki.libsdl.org/ + * * If you need help with the library, or just want to discuss SDL related * issues, you can join the developers mailing list: - * http://www.libsdl.org/mailing-list.php - * + * http://www.libsdl.org/mailing-list.php + * * Enjoy! - * Sam Lantinga (slouken@libsdl.org) + * Sam Lantinga (slouken@libsdl.org) */ #ifndef _SDL_H @@ -92,16 +92,14 @@ #include "begin_code.h" /* Set up for C function definitions, even when using C++ */ #ifdef __cplusplus -/* *INDENT-OFF* */ extern "C" { -/* *INDENT-ON* */ #endif /* As of version 0.5, SDL is loaded dynamically into the application */ /** * \name SDL_INIT_* - * + * * These are the flags which may be passed to SDL_Init(). You should * specify the subsystems which you will be using in your application. */ @@ -111,7 +109,7 @@ extern "C" { #define SDL_INIT_VIDEO 0x00000020 #define SDL_INIT_JOYSTICK 0x00000200 #define SDL_INIT_HAPTIC 0x00001000 -#define SDL_INIT_GAMECONTROLLER 0x00002000 /**< turn on game controller also implicitly does JOYSTICK */ +#define SDL_INIT_GAMECONTROLLER 0x00002000 /**< turn on game controller also implicitly does JOYSTICK */ #define SDL_INIT_NOPARACHUTE 0x00100000 /**< Don't catch fatal signals */ #define SDL_INIT_EVERYTHING ( \ SDL_INIT_TIMER | SDL_INIT_AUDIO | SDL_INIT_VIDEO | \ @@ -139,7 +137,7 @@ extern DECLSPEC void SDLCALL SDL_QuitSubSystem(Uint32 flags); /** * This function returns a mask of the specified subsystems which have * previously been initialized. - * + * * If \c flags is 0, it returns a mask of all initialized subsystems. */ extern DECLSPEC Uint32 SDLCALL SDL_WasInit(Uint32 flags); @@ -152,9 +150,7 @@ extern DECLSPEC void SDLCALL SDL_Quit(void); /* Ends C function definitions when using C++ */ #ifdef __cplusplus -/* *INDENT-OFF* */ } -/* *INDENT-ON* */ #endif #include "close_code.h" diff --git a/include/SDL_assert.h b/include/SDL_assert.h index e4620aee2..5a6afc5e2 100644 --- a/include/SDL_assert.h +++ b/include/SDL_assert.h @@ -27,9 +27,7 @@ #include "begin_code.h" /* Set up for C function definitions, even when using C++ */ #ifdef __cplusplus -/* *INDENT-OFF* */ extern "C" { -/* *INDENT-ON* */ #endif #ifndef SDL_ASSERT_LEVEL @@ -187,7 +185,7 @@ typedef SDL_assert_state (SDLCALL *SDL_AssertionHandler)( * This callback is NOT reset to SDL's internal handler upon SDL_Quit()! * * \return SDL_assert_state value of how to handle the assertion failure. - * + * * \param handler Callback function, called when an assertion fails. * \param userdata A pointer passed to the callback as-is. */ @@ -230,9 +228,7 @@ extern DECLSPEC void SDLCALL SDL_ResetAssertionReport(void); /* Ends C function definitions when using C++ */ #ifdef __cplusplus -/* *INDENT-OFF* */ } -/* *INDENT-ON* */ #endif #include "close_code.h" diff --git a/include/SDL_atomic.h b/include/SDL_atomic.h index be60f9916..78498ff9d 100644 --- a/include/SDL_atomic.h +++ b/include/SDL_atomic.h @@ -21,25 +21,25 @@ /** * \file SDL_atomic.h - * + * * Atomic operations. - * + * * IMPORTANT: * If you are not an expert in concurrent lockless programming, you should * only be using the atomic lock and reference counting functions in this * file. In all other cases you should be protecting your data structures * with full mutexes. - * + * * The list of "safe" functions to use are: * SDL_AtomicLock() * SDL_AtomicUnlock() * SDL_AtomicIncRef() * SDL_AtomicDecRef() - * + * * Seriously, here be dragons! * ^^^^^^^^^^^^^^^^^^^^^^^^^^^ * - * You can find out a little more about lockless programming and the + * You can find out a little more about lockless programming and the * subtle issues that can arise here: * http://msdn.microsoft.com/en-us/library/ee418650%28v=vs.85%29.aspx * @@ -72,14 +72,12 @@ /* Set up for C function definitions, even when using C++ */ #ifdef __cplusplus -/* *INDENT-OFF* */ extern "C" { -/* *INDENT-ON* */ #endif /** * \name SDL AtomicLock - * + * * The atomic locks are efficient spinlocks using CPU instructions, * but are vulnerable to starvation and can spin forever if a thread * holding a lock has been terminated. For this reason you should @@ -98,7 +96,7 @@ typedef int SDL_SpinLock; /** * \brief Try to lock a spin lock by setting it to a non-zero value. - * + * * \param lock Points to the lock. * * \return SDL_TRUE if the lock succeeded, SDL_FALSE if the lock is already held. @@ -107,7 +105,7 @@ extern DECLSPEC SDL_bool SDLCALL SDL_AtomicTryLock(SDL_SpinLock *lock); /** * \brief Lock a spin lock by setting it to a non-zero value. - * + * * \param lock Points to the lock. */ extern DECLSPEC void SDLCALL SDL_AtomicLock(SDL_SpinLock *lock); @@ -304,9 +302,7 @@ SDL_FORCE_INLINE void* SDL_AtomicGetPtr(void* *a) /* Ends C function definitions when using C++ */ #ifdef __cplusplus -/* *INDENT-OFF* */ } -/* *INDENT-ON* */ #endif #include "close_code.h" diff --git a/include/SDL_audio.h b/include/SDL_audio.h index 8a1bb7067..9e5a997ae 100644 --- a/include/SDL_audio.h +++ b/include/SDL_audio.h @@ -21,7 +21,7 @@ /** * \file SDL_audio.h - * + * * Access to the raw audio mixing buffer for the SDL library. */ @@ -38,17 +38,15 @@ #include "begin_code.h" /* Set up for C function definitions, even when using C++ */ #ifdef __cplusplus -/* *INDENT-OFF* */ extern "C" { -/* *INDENT-ON* */ #endif /** * \brief Audio format flags. - * + * * These are what the 16 bits in SDL_AudioFormat currently mean... * (Unspecified bits are always zero). - * + * * \verbatim ++-----------------------sample is signed if set || @@ -60,7 +58,7 @@ extern "C" { || || || | | 15 14 13 12 11 10 09 08 07 06 05 04 03 02 01 00 \endverbatim - * + * * There are macros in SDL 2.0 and later to query these bits. */ typedef Uint16 SDL_AudioFormat; @@ -82,42 +80,38 @@ typedef Uint16 SDL_AudioFormat; #define SDL_AUDIO_ISLITTLEENDIAN(x) (!SDL_AUDIO_ISBIGENDIAN(x)) #define SDL_AUDIO_ISUNSIGNED(x) (!SDL_AUDIO_ISSIGNED(x)) -/** +/** * \name Audio format flags * * Defaults to LSB byte order. */ /*@{*/ -#define AUDIO_U8 0x0008 /**< Unsigned 8-bit samples */ -#define AUDIO_S8 0x8008 /**< Signed 8-bit samples */ -#define AUDIO_U16LSB 0x0010 /**< Unsigned 16-bit samples */ -#define AUDIO_S16LSB 0x8010 /**< Signed 16-bit samples */ -#define AUDIO_U16MSB 0x1010 /**< As above, but big-endian byte order */ -#define AUDIO_S16MSB 0x9010 /**< As above, but big-endian byte order */ -#define AUDIO_U16 AUDIO_U16LSB -#define AUDIO_S16 AUDIO_S16LSB +#define AUDIO_U8 0x0008 /**< Unsigned 8-bit samples */ +#define AUDIO_S8 0x8008 /**< Signed 8-bit samples */ +#define AUDIO_U16LSB 0x0010 /**< Unsigned 16-bit samples */ +#define AUDIO_S16LSB 0x8010 /**< Signed 16-bit samples */ +#define AUDIO_U16MSB 0x1010 /**< As above, but big-endian byte order */ +#define AUDIO_S16MSB 0x9010 /**< As above, but big-endian byte order */ +#define AUDIO_U16 AUDIO_U16LSB +#define AUDIO_S16 AUDIO_S16LSB /*@}*/ /** * \name int32 support - * - * New to SDL 1.3. */ /*@{*/ -#define AUDIO_S32LSB 0x8020 /**< 32-bit integer samples */ -#define AUDIO_S32MSB 0x9020 /**< As above, but big-endian byte order */ -#define AUDIO_S32 AUDIO_S32LSB +#define AUDIO_S32LSB 0x8020 /**< 32-bit integer samples */ +#define AUDIO_S32MSB 0x9020 /**< As above, but big-endian byte order */ +#define AUDIO_S32 AUDIO_S32LSB /*@}*/ /** * \name float32 support - * - * New to SDL 1.3. */ /*@{*/ -#define AUDIO_F32LSB 0x8120 /**< 32-bit floating point samples */ -#define AUDIO_F32MSB 0x9120 /**< As above, but big-endian byte order */ -#define AUDIO_F32 AUDIO_F32LSB +#define AUDIO_F32LSB 0x8120 /**< 32-bit floating point samples */ +#define AUDIO_F32MSB 0x9120 /**< As above, but big-endian byte order */ +#define AUDIO_F32 AUDIO_F32LSB /*@}*/ /** @@ -125,21 +119,21 @@ typedef Uint16 SDL_AudioFormat; */ /*@{*/ #if SDL_BYTEORDER == SDL_LIL_ENDIAN -#define AUDIO_U16SYS AUDIO_U16LSB -#define AUDIO_S16SYS AUDIO_S16LSB -#define AUDIO_S32SYS AUDIO_S32LSB -#define AUDIO_F32SYS AUDIO_F32LSB +#define AUDIO_U16SYS AUDIO_U16LSB +#define AUDIO_S16SYS AUDIO_S16LSB +#define AUDIO_S32SYS AUDIO_S32LSB +#define AUDIO_F32SYS AUDIO_F32LSB #else -#define AUDIO_U16SYS AUDIO_U16MSB -#define AUDIO_S16SYS AUDIO_S16MSB -#define AUDIO_S32SYS AUDIO_S32MSB -#define AUDIO_F32SYS AUDIO_F32MSB +#define AUDIO_U16SYS AUDIO_U16MSB +#define AUDIO_S16SYS AUDIO_S16MSB +#define AUDIO_S32SYS AUDIO_S32MSB +#define AUDIO_F32SYS AUDIO_F32MSB #endif /*@}*/ -/** +/** * \name Allow change flags - * + * * Which audio format changes are allowed when opening a device. */ /*@{*/ @@ -209,7 +203,7 @@ typedef struct SDL_AudioCVT /** * \name Driver discovery functions - * + * * These functions return the list of built in audio drivers, in the * order that they are normally initialized by default. */ @@ -220,9 +214,9 @@ extern DECLSPEC const char *SDLCALL SDL_GetAudioDriver(int index); /** * \name Initialization and cleanup - * + * * \internal These functions are used internally, and should not be used unless - * you have a specific need to specify the audio driver you want to + * you have a specific need to specify the audio driver you want to * use. You should normally use SDL_Init() or SDL_InitSubSystem(). */ /*@{*/ @@ -242,20 +236,20 @@ extern DECLSPEC const char *SDLCALL SDL_GetCurrentAudioDriver(void); * structure pointed to by \c obtained. If \c obtained is NULL, the audio * data passed to the callback function will be guaranteed to be in the * requested format, and will be automatically converted to the hardware - * audio format if necessary. This function returns -1 if it failed + * audio format if necessary. This function returns -1 if it failed * to open the audio device, or couldn't set up the audio thread. - * + * * When filling in the desired audio spec structure, * - \c desired->freq should be the desired audio frequency in samples-per- * second. * - \c desired->format should be the desired audio format. - * - \c desired->samples is the desired size of the audio buffer, in - * samples. This number should be a power of two, and may be adjusted by + * - \c desired->samples is the desired size of the audio buffer, in + * samples. This number should be a power of two, and may be adjusted by * the audio driver to a value more suitable for the hardware. Good values - * seem to range between 512 and 8096 inclusive, depending on the - * application and CPU speed. Smaller values yield faster response time, - * but can lead to underflow if the application is doing heavy processing - * and cannot fill the audio buffer in time. A stereo sample consists of + * seem to range between 512 and 8096 inclusive, depending on the + * application and CPU speed. Smaller values yield faster response time, + * but can lead to underflow if the application is doing heavy processing + * and cannot fill the audio buffer in time. A stereo sample consists of * both right and left channels in LR ordering. * Note that the number of samples is directly related to time by the * following formula: \code ms = (samples*1000)/freq \endcode @@ -271,7 +265,7 @@ extern DECLSPEC const char *SDLCALL SDL_GetCurrentAudioDriver(void); * and SDL_UnlockAudio() in your code. * - \c desired->userdata is passed as the first parameter to your callback * function. - * + * * The audio device starts out playing silence when it's opened, and should * be enabled for playing by calling \c SDL_PauseAudio(0) when you are ready * for your audio callback function to be called. Since the audio driver @@ -283,7 +277,7 @@ extern DECLSPEC int SDLCALL SDL_OpenAudio(SDL_AudioSpec * desired, /** * SDL Audio Device IDs. - * + * * A successful call to SDL_OpenAudio() is always device id 1, and legacy * SDL audio APIs assume you want this device ID. SDL_OpenAudioDevice() calls * always returns devices >= 2 on success. The legacy calls are good both @@ -299,7 +293,7 @@ typedef Uint32 SDL_AudioDeviceID; * not an error. For example, if SDL is set up to talk to a remote audio * server, it can't list every one available on the Internet, but it will * still allow a specific host to be specified to SDL_OpenAudioDevice(). - * + * * In many common cases, when this function returns a value <= 0, it can still * successfully open the default device (NULL for first argument of * SDL_OpenAudioDevice()). @@ -313,7 +307,7 @@ extern DECLSPEC int SDLCALL SDL_GetNumAudioDevices(int iscapture); * The values returned by this function reflect the latest call to * SDL_GetNumAudioDevices(); recall that function to redetect available * hardware. - * + * * The string returned by this function is UTF-8 encoded, read-only, and * managed internally. You are not to free it. If you need to keep the * string for any length of time, you should make your own copy of it, as it @@ -326,14 +320,14 @@ extern DECLSPEC const char *SDLCALL SDL_GetAudioDeviceName(int index, /** * Open a specific audio device. Passing in a device name of NULL requests * the most reasonable default (and is equivalent to calling SDL_OpenAudio()). - * + * * The device name is a UTF-8 string reported by SDL_GetAudioDeviceName(), but * some drivers allow arbitrary and driver-specific strings, such as a * hostname/IP address for a remote audio server, or a filename in the * diskaudio driver. - * + * * \return 0 on error, a valid device ID that is >= 2 on success. - * + * * SDL_OpenAudio(), unlike this function, always acts on device ID 1. */ extern DECLSPEC SDL_AudioDeviceID SDLCALL SDL_OpenAudioDevice(const char @@ -351,7 +345,7 @@ extern DECLSPEC SDL_AudioDeviceID SDLCALL SDL_OpenAudioDevice(const char /** * \name Audio state - * + * * Get the current audio state. */ /*@{*/ @@ -369,7 +363,7 @@ SDL_GetAudioDeviceStatus(SDL_AudioDeviceID dev); /** * \name Pause audio functions - * + * * These functions pause and unpause the audio callback processing. * They should be called with a parameter of 0 after opening the audio * device to start playing sound. This is so you can safely initialize @@ -387,18 +381,18 @@ extern DECLSPEC void SDLCALL SDL_PauseAudioDevice(SDL_AudioDeviceID dev, * that source if \c freesrc is non-zero. For example, to load a WAVE file, * you could do: * \code - * SDL_LoadWAV_RW(SDL_RWFromFile("sample.wav", "rb"), 1, ...); + * SDL_LoadWAV_RW(SDL_RWFromFile("sample.wav", "rb"), 1, ...); * \endcode * * If this function succeeds, it returns the given SDL_AudioSpec, * filled with the audio data format of the wave data, and sets * \c *audio_buf to a malloc()'d buffer containing the audio data, * and sets \c *audio_len to the length of that audio buffer, in bytes. - * You need to free the audio buffer with SDL_FreeWAV() when you are + * You need to free the audio buffer with SDL_FreeWAV() when you are * done with it. * - * This function returns NULL and sets the SDL error message if the - * wave file cannot be opened, uses an unknown data format, or is + * This function returns NULL and sets the SDL error message if the + * wave file cannot be opened, uses an unknown data format, or is * corrupt. Currently raw and MS-ADPCM WAVE files are supported. */ extern DECLSPEC SDL_AudioSpec *SDLCALL SDL_LoadWAV_RW(SDL_RWops * src, @@ -407,12 +401,12 @@ extern DECLSPEC SDL_AudioSpec *SDLCALL SDL_LoadWAV_RW(SDL_RWops * src, Uint8 ** audio_buf, Uint32 * audio_len); -/** +/** * Loads a WAV from a file. * Compatibility convenience function. */ #define SDL_LoadWAV(file, spec, audio_buf, audio_len) \ - SDL_LoadWAV_RW(SDL_RWFromFile(file, "rb"),1, spec,audio_buf,audio_len) + SDL_LoadWAV_RW(SDL_RWFromFile(file, "rb"),1, spec,audio_buf,audio_len) /** * This function frees data previously allocated with SDL_LoadWAV_RW() @@ -424,7 +418,7 @@ extern DECLSPEC void SDLCALL SDL_FreeWAV(Uint8 * audio_buf); * and rate, and initializes the \c cvt structure with information needed * by SDL_ConvertAudio() to convert a buffer of audio data from one format * to the other. - * + * * \return -1 if the format conversion is not supported, 0 if there's * no conversion needed, or 1 if the audio filter is set up. */ @@ -441,7 +435,7 @@ extern DECLSPEC int SDLCALL SDL_BuildAudioCVT(SDL_AudioCVT * cvt, * created an audio buffer \c cvt->buf, and filled it with \c cvt->len bytes of * audio data in the source format, this function will convert it in-place * to the desired format. - * + * * The data conversion may expand the size of the audio data, so the buffer * \c cvt->buf should be allocated after the \c cvt structure is initialized by * SDL_BuildAudioCVT(), and should be \c cvt->len*cvt->len_mult bytes long. @@ -471,9 +465,9 @@ extern DECLSPEC void SDLCALL SDL_MixAudioFormat(Uint8 * dst, /** * \name Audio lock functions - * + * * The lock manipulated by these functions protects the callback function. - * During a SDL_LockAudio()/SDL_UnlockAudio() pair, you can be guaranteed that + * During a SDL_LockAudio()/SDL_UnlockAudio() pair, you can be guaranteed that * the callback function is not running. Do not call these from the callback * function or you will cause deadlock. */ @@ -498,9 +492,7 @@ extern DECLSPEC int SDLCALL SDL_AudioDeviceConnected(SDL_AudioDeviceID dev); /* Ends C function definitions when using C++ */ #ifdef __cplusplus -/* *INDENT-OFF* */ } -/* *INDENT-ON* */ #endif #include "close_code.h" diff --git a/include/SDL_bits.h b/include/SDL_bits.h index d678b7822..942bc1744 100644 --- a/include/SDL_bits.h +++ b/include/SDL_bits.h @@ -33,9 +33,7 @@ #include "begin_code.h" /* Set up for C function definitions, even when using C++ */ #ifdef __cplusplus -/* *INDENT-OFF* */ extern "C" { -/* *INDENT-ON* */ #endif /** @@ -83,9 +81,7 @@ SDL_MostSignificantBitIndex32(Uint32 x) /* Ends C function definitions when using C++ */ #ifdef __cplusplus -/* *INDENT-OFF* */ } -/* *INDENT-ON* */ #endif #include "close_code.h" diff --git a/include/SDL_blendmode.h b/include/SDL_blendmode.h index 64a3530e3..37c475aef 100644 --- a/include/SDL_blendmode.h +++ b/include/SDL_blendmode.h @@ -21,7 +21,7 @@ /** * \file SDL_blendmode.h - * + * * Header file declaring the SDL_BlendMode enumeration */ @@ -31,9 +31,7 @@ #include "begin_code.h" /* Set up for C function definitions, even when using C++ */ #ifdef __cplusplus -/* *INDENT-OFF* */ extern "C" { -/* *INDENT-ON* */ #endif /** @@ -49,9 +47,7 @@ typedef enum /* Ends C function definitions when using C++ */ #ifdef __cplusplus -/* *INDENT-OFF* */ } -/* *INDENT-ON* */ #endif #include "close_code.h" diff --git a/include/SDL_clipboard.h b/include/SDL_clipboard.h index 9d86b6b49..1f5742d16 100644 --- a/include/SDL_clipboard.h +++ b/include/SDL_clipboard.h @@ -33,9 +33,7 @@ #include "begin_code.h" /* Set up for C function definitions, even when using C++ */ #ifdef __cplusplus -/* *INDENT-OFF* */ extern "C" { -/* *INDENT-ON* */ #endif /* Function prototypes */ @@ -64,9 +62,7 @@ extern DECLSPEC SDL_bool SDLCALL SDL_HasClipboardText(void); /* Ends C function definitions when using C++ */ #ifdef __cplusplus -/* *INDENT-OFF* */ } -/* *INDENT-ON* */ #endif #include "close_code.h" diff --git a/include/SDL_config.h b/include/SDL_config.h index 951a77d27..7440940ad 100644 --- a/include/SDL_config.h +++ b/include/SDL_config.h @@ -27,13 +27,13 @@ /** * \file SDL_config.h */ - + /* Add any platform that doesn't build using the configure system. */ #if defined(__WIN32__) #include "SDL_config_windows.h" #elif defined(__MACOSX__) #include "SDL_config_macosx.h" -#elif defined(__IPHONEOS__) +#elif defined(__IPHONEOS__) #include "SDL_config_iphoneos.h" #elif defined(__ANDROID__) #include "SDL_config_android.h" diff --git a/include/SDL_config_android.h b/include/SDL_config_android.h index 1676eb429..2541a73dc 100644 --- a/include/SDL_config_android.h +++ b/include/SDL_config_android.h @@ -26,109 +26,109 @@ /** * \file SDL_config_android.h - * + * * This is a configuration that can be used to build SDL for Android */ #include -#define HAVE_ALLOCA_H 1 -#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_STDINT_H 1 -#define HAVE_CTYPE_H 1 -#define HAVE_MATH_H 1 -#define HAVE_SIGNAL_H 1 +#define HAVE_ALLOCA_H 1 +#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_STDINT_H 1 +#define HAVE_CTYPE_H 1 +#define HAVE_MATH_H 1 +#define HAVE_SIGNAL_H 1 /* C library functions */ -#define HAVE_MALLOC 1 -#define HAVE_CALLOC 1 -#define HAVE_REALLOC 1 -#define HAVE_FREE 1 -#define HAVE_ALLOCA 1 -#define HAVE_GETENV 1 -#define HAVE_SETENV 1 -#define HAVE_PUTENV 1 -#define HAVE_SETENV 1 -#define HAVE_UNSETENV 1 -#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 -#define HAVE_STRLCPY 1 -#define HAVE_STRLCAT 1 -#define HAVE_STRDUP 1 -#define HAVE_STRCHR 1 -#define HAVE_STRRCHR 1 -#define HAVE_STRSTR 1 -#define HAVE_STRTOL 1 -#define HAVE_STRTOUL 1 -#define HAVE_STRTOLL 1 -#define HAVE_STRTOULL 1 -#define HAVE_STRTOD 1 -#define HAVE_ATOI 1 -#define HAVE_ATOF 1 -#define HAVE_STRCMP 1 -#define HAVE_STRNCMP 1 -#define HAVE_STRCASECMP 1 +#define HAVE_MALLOC 1 +#define HAVE_CALLOC 1 +#define HAVE_REALLOC 1 +#define HAVE_FREE 1 +#define HAVE_ALLOCA 1 +#define HAVE_GETENV 1 +#define HAVE_SETENV 1 +#define HAVE_PUTENV 1 +#define HAVE_SETENV 1 +#define HAVE_UNSETENV 1 +#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 +#define HAVE_STRLCPY 1 +#define HAVE_STRLCAT 1 +#define HAVE_STRDUP 1 +#define HAVE_STRCHR 1 +#define HAVE_STRRCHR 1 +#define HAVE_STRSTR 1 +#define HAVE_STRTOL 1 +#define HAVE_STRTOUL 1 +#define HAVE_STRTOLL 1 +#define HAVE_STRTOULL 1 +#define HAVE_STRTOD 1 +#define HAVE_ATOI 1 +#define HAVE_ATOF 1 +#define HAVE_STRCMP 1 +#define HAVE_STRNCMP 1 +#define HAVE_STRCASECMP 1 #define HAVE_STRNCASECMP 1 -#define HAVE_SSCANF 1 -#define HAVE_SNPRINTF 1 -#define HAVE_VSNPRINTF 1 -#define HAVE_M_PI 1 -#define HAVE_ATAN 1 -#define HAVE_ATAN2 1 -#define HAVE_CEIL 1 -#define HAVE_COPYSIGN 1 -#define HAVE_COS 1 -#define HAVE_COSF 1 -#define HAVE_FABS 1 -#define HAVE_FLOOR 1 -#define HAVE_LOG 1 -#define HAVE_POW 1 -#define HAVE_SCALBN 1 -#define HAVE_SIN 1 -#define HAVE_SINF 1 -#define HAVE_SQRT 1 -#define HAVE_SIGACTION 1 -#define HAVE_SETJMP 1 -#define HAVE_NANOSLEEP 1 -#define HAVE_SYSCONF 1 +#define HAVE_SSCANF 1 +#define HAVE_SNPRINTF 1 +#define HAVE_VSNPRINTF 1 +#define HAVE_M_PI 1 +#define HAVE_ATAN 1 +#define HAVE_ATAN2 1 +#define HAVE_CEIL 1 +#define HAVE_COPYSIGN 1 +#define HAVE_COS 1 +#define HAVE_COSF 1 +#define HAVE_FABS 1 +#define HAVE_FLOOR 1 +#define HAVE_LOG 1 +#define HAVE_POW 1 +#define HAVE_SCALBN 1 +#define HAVE_SIN 1 +#define HAVE_SINF 1 +#define HAVE_SQRT 1 +#define HAVE_SIGACTION 1 +#define HAVE_SETJMP 1 +#define HAVE_NANOSLEEP 1 +#define HAVE_SYSCONF 1 #define SIZEOF_VOIDP 4 /* Enable various audio drivers */ -#define SDL_AUDIO_DRIVER_ANDROID 1 -#define SDL_AUDIO_DRIVER_DUMMY 1 +#define SDL_AUDIO_DRIVER_ANDROID 1 +#define SDL_AUDIO_DRIVER_DUMMY 1 /* Enable various input drivers */ -#define SDL_JOYSTICK_ANDROID 1 -#define SDL_HAPTIC_DUMMY 1 +#define SDL_JOYSTICK_ANDROID 1 +#define SDL_HAPTIC_DUMMY 1 /* Enable various shared object loading systems */ -#define SDL_LOADSO_DLOPEN 1 +#define SDL_LOADSO_DLOPEN 1 /* Enable various threading systems */ -#define SDL_THREAD_PTHREAD 1 -#define SDL_THREAD_PTHREAD_RECURSIVE_MUTEX 1 +#define SDL_THREAD_PTHREAD 1 +#define SDL_THREAD_PTHREAD_RECURSIVE_MUTEX 1 /* Enable various timer systems */ -#define SDL_TIMER_UNIX 1 +#define SDL_TIMER_UNIX 1 /* Enable various video drivers */ #define SDL_VIDEO_DRIVER_ANDROID 1 /* Enable OpenGL ES */ -#define SDL_VIDEO_OPENGL_ES 1 -#define SDL_VIDEO_RENDER_OGL_ES 1 -#define SDL_VIDEO_RENDER_OGL_ES2 1 +#define SDL_VIDEO_OPENGL_ES 1 +#define SDL_VIDEO_RENDER_OGL_ES 1 +#define SDL_VIDEO_RENDER_OGL_ES2 1 /* Enable system power support */ #define SDL_POWER_ANDROID 1 diff --git a/include/SDL_config_iphoneos.h b/include/SDL_config_iphoneos.h index f7925d468..b27b18973 100644 --- a/include/SDL_config_iphoneos.h +++ b/include/SDL_config_iphoneos.h @@ -30,109 +30,109 @@ #define SIZEOF_VOIDP 4 #endif -#define HAVE_GCC_ATOMICS 1 +#define HAVE_GCC_ATOMICS 1 -#define HAVE_ALLOCA_H 1 -#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_STDINT_H 1 -#define HAVE_CTYPE_H 1 -#define HAVE_MATH_H 1 -#define HAVE_SIGNAL_H 1 +#define HAVE_ALLOCA_H 1 +#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_STDINT_H 1 +#define HAVE_CTYPE_H 1 +#define HAVE_MATH_H 1 +#define HAVE_SIGNAL_H 1 /* C library functions */ -#define HAVE_MALLOC 1 -#define HAVE_CALLOC 1 -#define HAVE_REALLOC 1 -#define HAVE_FREE 1 -#define HAVE_ALLOCA 1 -#define HAVE_GETENV 1 -#define HAVE_SETENV 1 -#define HAVE_PUTENV 1 -#define HAVE_SETENV 1 -#define HAVE_UNSETENV 1 -#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 -#define HAVE_STRLCPY 1 -#define HAVE_STRLCAT 1 -#define HAVE_STRDUP 1 -#define HAVE_STRCHR 1 -#define HAVE_STRRCHR 1 -#define HAVE_STRSTR 1 -#define HAVE_STRTOL 1 -#define HAVE_STRTOUL 1 -#define HAVE_STRTOLL 1 -#define HAVE_STRTOULL 1 -#define HAVE_STRTOD 1 -#define HAVE_ATOI 1 -#define HAVE_ATOF 1 -#define HAVE_STRCMP 1 -#define HAVE_STRNCMP 1 -#define HAVE_STRCASECMP 1 +#define HAVE_MALLOC 1 +#define HAVE_CALLOC 1 +#define HAVE_REALLOC 1 +#define HAVE_FREE 1 +#define HAVE_ALLOCA 1 +#define HAVE_GETENV 1 +#define HAVE_SETENV 1 +#define HAVE_PUTENV 1 +#define HAVE_SETENV 1 +#define HAVE_UNSETENV 1 +#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 +#define HAVE_STRLCPY 1 +#define HAVE_STRLCAT 1 +#define HAVE_STRDUP 1 +#define HAVE_STRCHR 1 +#define HAVE_STRRCHR 1 +#define HAVE_STRSTR 1 +#define HAVE_STRTOL 1 +#define HAVE_STRTOUL 1 +#define HAVE_STRTOLL 1 +#define HAVE_STRTOULL 1 +#define HAVE_STRTOD 1 +#define HAVE_ATOI 1 +#define HAVE_ATOF 1 +#define HAVE_STRCMP 1 +#define HAVE_STRNCMP 1 +#define HAVE_STRCASECMP 1 #define HAVE_STRNCASECMP 1 -#define HAVE_SSCANF 1 -#define HAVE_SNPRINTF 1 -#define HAVE_VSNPRINTF 1 -#define HAVE_M_PI 1 -#define HAVE_ATAN 1 -#define HAVE_ATAN2 1 -#define HAVE_CEIL 1 -#define HAVE_COPYSIGN 1 -#define HAVE_COS 1 -#define HAVE_COSF 1 -#define HAVE_FABS 1 -#define HAVE_FLOOR 1 -#define HAVE_LOG 1 -#define HAVE_POW 1 -#define HAVE_SCALBN 1 -#define HAVE_SIN 1 -#define HAVE_SINF 1 -#define HAVE_SQRT 1 -#define HAVE_SIGACTION 1 -#define HAVE_SETJMP 1 -#define HAVE_NANOSLEEP 1 -#define HAVE_SYSCONF 1 +#define HAVE_SSCANF 1 +#define HAVE_SNPRINTF 1 +#define HAVE_VSNPRINTF 1 +#define HAVE_M_PI 1 +#define HAVE_ATAN 1 +#define HAVE_ATAN2 1 +#define HAVE_CEIL 1 +#define HAVE_COPYSIGN 1 +#define HAVE_COS 1 +#define HAVE_COSF 1 +#define HAVE_FABS 1 +#define HAVE_FLOOR 1 +#define HAVE_LOG 1 +#define HAVE_POW 1 +#define HAVE_SCALBN 1 +#define HAVE_SIN 1 +#define HAVE_SINF 1 +#define HAVE_SQRT 1 +#define HAVE_SIGACTION 1 +#define HAVE_SETJMP 1 +#define HAVE_NANOSLEEP 1 +#define HAVE_SYSCONF 1 #define HAVE_SYSCTLBYNAME 1 /* enable iPhone version of Core Audio driver */ #define SDL_AUDIO_DRIVER_COREAUDIO 1 /* Enable the dummy audio driver (src/audio/dummy/\*.c) */ -#define SDL_AUDIO_DRIVER_DUMMY 1 +#define SDL_AUDIO_DRIVER_DUMMY 1 /* Enable the stub haptic driver (src/haptic/dummy/\*.c) */ -#define SDL_HAPTIC_DISABLED 1 +#define SDL_HAPTIC_DISABLED 1 /* Enable Unix style SO loading */ /* Technically this works, but it violates the iPhone developer agreement */ /* #define SDL_LOADSO_DLOPEN 1 */ /* Enable the stub shared object loader (src/loadso/dummy/\*.c) */ -#define SDL_LOADSO_DISABLED 1 +#define SDL_LOADSO_DISABLED 1 /* Enable various threading systems */ -#define SDL_THREAD_PTHREAD 1 -#define SDL_THREAD_PTHREAD_RECURSIVE_MUTEX 1 +#define SDL_THREAD_PTHREAD 1 +#define SDL_THREAD_PTHREAD_RECURSIVE_MUTEX 1 /* Enable various timer systems */ -#define SDL_TIMER_UNIX 1 +#define SDL_TIMER_UNIX 1 /* Supported video drivers */ -#define SDL_VIDEO_DRIVER_UIKIT 1 -#define SDL_VIDEO_DRIVER_DUMMY 1 +#define SDL_VIDEO_DRIVER_UIKIT 1 +#define SDL_VIDEO_DRIVER_DUMMY 1 /* enable OpenGL ES */ -#define SDL_VIDEO_OPENGL_ES 1 -#define SDL_VIDEO_RENDER_OGL_ES 1 -#define SDL_VIDEO_RENDER_OGL_ES2 1 +#define SDL_VIDEO_OPENGL_ES 1 +#define SDL_VIDEO_RENDER_OGL_ES 1 +#define SDL_VIDEO_RENDER_OGL_ES2 1 /* Enable system power support */ #define SDL_POWER_UIKIT 1 diff --git a/include/SDL_config_macosx.h b/include/SDL_config_macosx.h index fece7fb5c..a2d227478 100644 --- a/include/SDL_config_macosx.h +++ b/include/SDL_config_macosx.h @@ -30,106 +30,106 @@ /* This is a set of defines to configure the SDL features */ #ifdef __LP64__ - #define SIZEOF_VOIDP 8 + #define SIZEOF_VOIDP 8 #else - #define SIZEOF_VOIDP 4 + #define SIZEOF_VOIDP 4 #endif /* Useful headers */ /* If we specified an SDK or have a post-PowerPC chip, then alloca.h exists. */ #if ( (MAC_OS_X_VERSION_MIN_REQUIRED >= 1030) || (!defined(__POWERPC__)) ) -#define HAVE_ALLOCA_H 1 +#define HAVE_ALLOCA_H 1 #endif -#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_STDINT_H 1 -#define HAVE_CTYPE_H 1 -#define HAVE_MATH_H 1 -#define HAVE_SIGNAL_H 1 +#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_STDINT_H 1 +#define HAVE_CTYPE_H 1 +#define HAVE_MATH_H 1 +#define HAVE_SIGNAL_H 1 /* C library functions */ -#define HAVE_MALLOC 1 -#define HAVE_CALLOC 1 -#define HAVE_REALLOC 1 -#define HAVE_FREE 1 -#define HAVE_ALLOCA 1 -#define HAVE_GETENV 1 -#define HAVE_SETENV 1 -#define HAVE_PUTENV 1 -#define HAVE_UNSETENV 1 -#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 -#define HAVE_STRLCPY 1 -#define HAVE_STRLCAT 1 -#define HAVE_STRDUP 1 -#define HAVE_STRCHR 1 -#define HAVE_STRRCHR 1 -#define HAVE_STRSTR 1 -#define HAVE_STRTOL 1 -#define HAVE_STRTOUL 1 -#define HAVE_STRTOLL 1 -#define HAVE_STRTOULL 1 -#define HAVE_STRTOD 1 -#define HAVE_ATOI 1 -#define HAVE_ATOF 1 -#define HAVE_STRCMP 1 -#define HAVE_STRNCMP 1 -#define HAVE_STRCASECMP 1 +#define HAVE_MALLOC 1 +#define HAVE_CALLOC 1 +#define HAVE_REALLOC 1 +#define HAVE_FREE 1 +#define HAVE_ALLOCA 1 +#define HAVE_GETENV 1 +#define HAVE_SETENV 1 +#define HAVE_PUTENV 1 +#define HAVE_UNSETENV 1 +#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 +#define HAVE_STRLCPY 1 +#define HAVE_STRLCAT 1 +#define HAVE_STRDUP 1 +#define HAVE_STRCHR 1 +#define HAVE_STRRCHR 1 +#define HAVE_STRSTR 1 +#define HAVE_STRTOL 1 +#define HAVE_STRTOUL 1 +#define HAVE_STRTOLL 1 +#define HAVE_STRTOULL 1 +#define HAVE_STRTOD 1 +#define HAVE_ATOI 1 +#define HAVE_ATOF 1 +#define HAVE_STRCMP 1 +#define HAVE_STRNCMP 1 +#define HAVE_STRCASECMP 1 #define HAVE_STRNCASECMP 1 -#define HAVE_SSCANF 1 -#define HAVE_SNPRINTF 1 -#define HAVE_VSNPRINTF 1 -#define HAVE_CEIL 1 -#define HAVE_COPYSIGN 1 -#define HAVE_COS 1 -#define HAVE_COSF 1 -#define HAVE_FABS 1 -#define HAVE_FLOOR 1 -#define HAVE_LOG 1 -#define HAVE_POW 1 -#define HAVE_SCALBN 1 -#define HAVE_SIN 1 -#define HAVE_SINF 1 -#define HAVE_SQRT 1 -#define HAVE_SIGACTION 1 -#define HAVE_SETJMP 1 -#define HAVE_NANOSLEEP 1 -#define HAVE_SYSCONF 1 +#define HAVE_SSCANF 1 +#define HAVE_SNPRINTF 1 +#define HAVE_VSNPRINTF 1 +#define HAVE_CEIL 1 +#define HAVE_COPYSIGN 1 +#define HAVE_COS 1 +#define HAVE_COSF 1 +#define HAVE_FABS 1 +#define HAVE_FLOOR 1 +#define HAVE_LOG 1 +#define HAVE_POW 1 +#define HAVE_SCALBN 1 +#define HAVE_SIN 1 +#define HAVE_SINF 1 +#define HAVE_SQRT 1 +#define HAVE_SIGACTION 1 +#define HAVE_SETJMP 1 +#define HAVE_NANOSLEEP 1 +#define HAVE_SYSCONF 1 #define HAVE_SYSCTLBYNAME 1 #define HAVE_ATAN 1 #define HAVE_ATAN2 1 /* Enable various audio drivers */ -#define SDL_AUDIO_DRIVER_COREAUDIO 1 -#define SDL_AUDIO_DRIVER_DISK 1 -#define SDL_AUDIO_DRIVER_DUMMY 1 +#define SDL_AUDIO_DRIVER_COREAUDIO 1 +#define SDL_AUDIO_DRIVER_DISK 1 +#define SDL_AUDIO_DRIVER_DUMMY 1 /* Enable various input drivers */ -#define SDL_JOYSTICK_IOKIT 1 -#define SDL_HAPTIC_IOKIT 1 +#define SDL_JOYSTICK_IOKIT 1 +#define SDL_HAPTIC_IOKIT 1 /* Enable various shared object loading systems */ -#define SDL_LOADSO_DLOPEN 1 +#define SDL_LOADSO_DLOPEN 1 /* Enable various threading systems */ -#define SDL_THREAD_PTHREAD 1 -#define SDL_THREAD_PTHREAD_RECURSIVE_MUTEX 1 +#define SDL_THREAD_PTHREAD 1 +#define SDL_THREAD_PTHREAD_RECURSIVE_MUTEX 1 /* Enable various timer systems */ -#define SDL_TIMER_UNIX 1 +#define SDL_TIMER_UNIX 1 /* Enable various video drivers */ -#define SDL_VIDEO_DRIVER_COCOA 1 -#define SDL_VIDEO_DRIVER_DUMMY 1 +#define SDL_VIDEO_DRIVER_COCOA 1 +#define SDL_VIDEO_DRIVER_DUMMY 1 #undef SDL_VIDEO_DRIVER_X11 #define SDL_VIDEO_DRIVER_X11_DYNAMIC "/usr/X11R6/lib/libX11.6.dylib" #define SDL_VIDEO_DRIVER_X11_DYNAMIC_XEXT "/usr/X11R6/lib/libXext.6.dylib" @@ -157,27 +157,27 @@ #endif #ifndef SDL_VIDEO_RENDER_OGL -#define SDL_VIDEO_RENDER_OGL 1 +#define SDL_VIDEO_RENDER_OGL 1 #endif /* Enable OpenGL support */ #ifndef SDL_VIDEO_OPENGL -#define SDL_VIDEO_OPENGL 1 +#define SDL_VIDEO_OPENGL 1 #endif #ifndef SDL_VIDEO_OPENGL_CGL -#define SDL_VIDEO_OPENGL_CGL 1 +#define SDL_VIDEO_OPENGL_CGL 1 #endif #ifndef SDL_VIDEO_OPENGL_GLX -#define SDL_VIDEO_OPENGL_GLX 1 +#define SDL_VIDEO_OPENGL_GLX 1 #endif /* Enable system power support */ #define SDL_POWER_MACOSX 1 /* Enable assembly routines */ -#define SDL_ASSEMBLY_ROUTINES 1 +#define SDL_ASSEMBLY_ROUTINES 1 #ifdef __ppc__ -#define SDL_ALTIVEC_BLITTERS 1 +#define SDL_ALTIVEC_BLITTERS 1 #endif #endif /* _SDL_config_macosx_h */ diff --git a/include/SDL_config_minimal.h b/include/SDL_config_minimal.h index a8a699fa0..cadfcaa5e 100644 --- a/include/SDL_config_minimal.h +++ b/include/SDL_config_minimal.h @@ -26,7 +26,7 @@ /** * \file SDL_config_minimal.h - * + * * This is the minimal configuration that can be used to build SDL. */ @@ -51,24 +51,24 @@ typedef unsigned long uintptr_t; #endif /* Enable the dummy audio driver (src/audio/dummy/\*.c) */ -#define SDL_AUDIO_DRIVER_DUMMY 1 +#define SDL_AUDIO_DRIVER_DUMMY 1 /* Enable the stub joystick driver (src/joystick/dummy/\*.c) */ -#define SDL_JOYSTICK_DISABLED 1 +#define SDL_JOYSTICK_DISABLED 1 /* Enable the stub haptic driver (src/haptic/dummy/\*.c) */ -#define SDL_HAPTIC_DISABLED 1 +#define SDL_HAPTIC_DISABLED 1 /* Enable the stub shared object loader (src/loadso/dummy/\*.c) */ -#define SDL_LOADSO_DISABLED 1 +#define SDL_LOADSO_DISABLED 1 /* Enable the stub thread support (src/thread/generic/\*.c) */ -#define SDL_THREADS_DISABLED 1 +#define SDL_THREADS_DISABLED 1 /* Enable the stub timer support (src/timer/dummy/\*.c) */ -#define SDL_TIMERS_DISABLED 1 +#define SDL_TIMERS_DISABLED 1 /* Enable the dummy video driver (src/video/dummy/\*.c) */ -#define SDL_VIDEO_DRIVER_DUMMY 1 +#define SDL_VIDEO_DRIVER_DUMMY 1 #endif /* _SDL_config_minimal_h */ diff --git a/include/SDL_config_pandora.h b/include/SDL_config_pandora.h index ebd9b6754..b93a1bc1a 100644 --- a/include/SDL_config_pandora.h +++ b/include/SDL_config_pandora.h @@ -57,7 +57,7 @@ #define HAVE_FREE 1 #define HAVE_ALLOCA 1 #define HAVE_GETENV 1 -#define HAVE_SETENV 1 +#define HAVE_SETENV 1 #define HAVE_PUTENV 1 #define HAVE_UNSETENV 1 #define HAVE_QSORT 1 diff --git a/include/SDL_config_psp.h b/include/SDL_config_psp.h index dc1797b4e..bf456f688 100644 --- a/include/SDL_config_psp.h +++ b/include/SDL_config_psp.h @@ -30,93 +30,93 @@ #define HAVE_GCC_SYNC_LOCK_TEST_AND_SET 1 #endif -#define HAVE_GCC_ATOMICS 1 +#define HAVE_GCC_ATOMICS 1 -#define HAVE_ALLOCA_H 1 -#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_STDINT_H 1 -#define HAVE_CTYPE_H 1 -#define HAVE_MATH_H 1 -#define HAVE_SIGNAL_H 1 +#define HAVE_ALLOCA_H 1 +#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_STDINT_H 1 +#define HAVE_CTYPE_H 1 +#define HAVE_MATH_H 1 +#define HAVE_SIGNAL_H 1 /* C library functions */ -#define HAVE_MALLOC 1 -#define HAVE_CALLOC 1 -#define HAVE_REALLOC 1 -#define HAVE_FREE 1 -#define HAVE_ALLOCA 1 -#define HAVE_GETENV 1 -#define HAVE_SETENV 1 -#define HAVE_PUTENV 1 -#define HAVE_SETENV 1 -#define HAVE_UNSETENV 1 -#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 -#define HAVE_STRLCPY 1 -#define HAVE_STRLCAT 1 -#define HAVE_STRDUP 1 -#define HAVE_STRCHR 1 -#define HAVE_STRRCHR 1 -#define HAVE_STRSTR 1 -#define HAVE_STRTOL 1 -#define HAVE_STRTOUL 1 -#define HAVE_STRTOLL 1 -#define HAVE_STRTOULL 1 -#define HAVE_STRTOD 1 -#define HAVE_ATOI 1 -#define HAVE_ATOF 1 -#define HAVE_STRCMP 1 -#define HAVE_STRNCMP 1 -#define HAVE_STRCASECMP 1 +#define HAVE_MALLOC 1 +#define HAVE_CALLOC 1 +#define HAVE_REALLOC 1 +#define HAVE_FREE 1 +#define HAVE_ALLOCA 1 +#define HAVE_GETENV 1 +#define HAVE_SETENV 1 +#define HAVE_PUTENV 1 +#define HAVE_SETENV 1 +#define HAVE_UNSETENV 1 +#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 +#define HAVE_STRLCPY 1 +#define HAVE_STRLCAT 1 +#define HAVE_STRDUP 1 +#define HAVE_STRCHR 1 +#define HAVE_STRRCHR 1 +#define HAVE_STRSTR 1 +#define HAVE_STRTOL 1 +#define HAVE_STRTOUL 1 +#define HAVE_STRTOLL 1 +#define HAVE_STRTOULL 1 +#define HAVE_STRTOD 1 +#define HAVE_ATOI 1 +#define HAVE_ATOF 1 +#define HAVE_STRCMP 1 +#define HAVE_STRNCMP 1 +#define HAVE_STRCASECMP 1 #define HAVE_STRNCASECMP 1 -#define HAVE_SSCANF 1 -#define HAVE_SNPRINTF 1 -#define HAVE_VSNPRINTF 1 -#define HAVE_M_PI 1 -#define HAVE_ATAN 1 -#define HAVE_ATAN2 1 -#define HAVE_CEIL 1 -#define HAVE_COPYSIGN 1 -#define HAVE_COS 1 -#define HAVE_COSF 1 -#define HAVE_FABS 1 -#define HAVE_FLOOR 1 -#define HAVE_LOG 1 -#define HAVE_POW 1 -#define HAVE_SCALBN 1 -#define HAVE_SIN 1 -#define HAVE_SINF 1 -#define HAVE_SQRT 1 -#define HAVE_SETJMP 1 -#define HAVE_NANOSLEEP 1 -//#define HAVE_SYSCONF 1 -//#define HAVE_SIGACTION 1 +#define HAVE_SSCANF 1 +#define HAVE_SNPRINTF 1 +#define HAVE_VSNPRINTF 1 +#define HAVE_M_PI 1 +#define HAVE_ATAN 1 +#define HAVE_ATAN2 1 +#define HAVE_CEIL 1 +#define HAVE_COPYSIGN 1 +#define HAVE_COS 1 +#define HAVE_COSF 1 +#define HAVE_FABS 1 +#define HAVE_FLOOR 1 +#define HAVE_LOG 1 +#define HAVE_POW 1 +#define HAVE_SCALBN 1 +#define HAVE_SIN 1 +#define HAVE_SINF 1 +#define HAVE_SQRT 1 +#define HAVE_SETJMP 1 +#define HAVE_NANOSLEEP 1 +//#define HAVE_SYSCONF 1 +//#define HAVE_SIGACTION 1 /* PSP isn't that sophisticated */ #define LACKS_SYS_MMAN_H 1 /* Enable the stub thread support (src/thread/psp/\*.c) */ -#define SDL_THREAD_PSP 1 +#define SDL_THREAD_PSP 1 /* Enable the stub timer support (src/timer/psp/\*.c) */ -#define SDL_TIMERS_PSP 1 +#define SDL_TIMERS_PSP 1 /* Enable the stub joystick driver (src/joystick/psp/\*.c) */ -#define SDL_JOYSTICK_PSP 1 +#define SDL_JOYSTICK_PSP 1 /* Enable the stub audio driver (src/audio/psp/\*.c) */ -#define SDL_AUDIO_DRIVER_PSP 1 +#define SDL_AUDIO_DRIVER_PSP 1 /* PSP video dirver */ #define SDL_VIDEO_DRIVER_PSP 1 @@ -127,10 +127,10 @@ #define SDL_POWER_PSP 1 /* PSP doesn't have haptic device (src/haptic/dummy/\*.c) */ -#define SDL_HAPTIC_DISABLED 1 +#define SDL_HAPTIC_DISABLED 1 /* PSP can't load shared object (src/loadso/dummy/\*.c) */ -#define SDL_LOADSO_DISABLED 1 +#define SDL_LOADSO_DISABLED 1 #endif /* _SDL_config_psp_h */ diff --git a/include/SDL_config_windows.h b/include/SDL_config_windows.h index c3f229f0c..e63e531a5 100644 --- a/include/SDL_config_windows.h +++ b/include/SDL_config_windows.h @@ -28,7 +28,7 @@ #if !defined(_STDINT_H_) && (!defined(HAVE_STDINT_H) || !_HAVE_STDINT_H) #if defined(__GNUC__) || defined(__DMC__) || defined(__WATCOMC__) -#define HAVE_STDINT_H 1 +#define HAVE_STDINT_H 1 #elif defined(_MSC_VER) typedef signed __int8 int8_t; typedef unsigned __int8 uint8_t; @@ -136,49 +136,49 @@ typedef unsigned int uintptr_t; #define HAVE_SINF 1 #define HAVE_SQRT 1 #else -#define HAVE_STDARG_H 1 -#define HAVE_STDDEF_H 1 +#define HAVE_STDARG_H 1 +#define HAVE_STDDEF_H 1 #endif /* Enable various audio drivers */ -#define SDL_AUDIO_DRIVER_DSOUND 1 +#define SDL_AUDIO_DRIVER_DSOUND 1 #ifndef __GNUC__ -#define SDL_AUDIO_DRIVER_XAUDIO2 1 +#define SDL_AUDIO_DRIVER_XAUDIO2 1 #endif -#define SDL_AUDIO_DRIVER_WINMM 1 -#define SDL_AUDIO_DRIVER_DISK 1 -#define SDL_AUDIO_DRIVER_DUMMY 1 +#define SDL_AUDIO_DRIVER_WINMM 1 +#define SDL_AUDIO_DRIVER_DISK 1 +#define SDL_AUDIO_DRIVER_DUMMY 1 /* Enable various input drivers */ -#define SDL_JOYSTICK_DINPUT 1 -#define SDL_HAPTIC_DINPUT 1 +#define SDL_JOYSTICK_DINPUT 1 +#define SDL_HAPTIC_DINPUT 1 /* Enable various shared object loading systems */ -#define SDL_LOADSO_WINDOWS 1 +#define SDL_LOADSO_WINDOWS 1 /* Enable various threading systems */ -#define SDL_THREAD_WINDOWS 1 +#define SDL_THREAD_WINDOWS 1 /* Enable various timer systems */ -#define SDL_TIMER_WINDOWS 1 +#define SDL_TIMER_WINDOWS 1 /* Enable various video drivers */ -#define SDL_VIDEO_DRIVER_DUMMY 1 -#define SDL_VIDEO_DRIVER_WINDOWS 1 +#define SDL_VIDEO_DRIVER_DUMMY 1 +#define SDL_VIDEO_DRIVER_WINDOWS 1 #ifndef SDL_VIDEO_RENDER_D3D -#define SDL_VIDEO_RENDER_D3D 1 +#define SDL_VIDEO_RENDER_D3D 1 #endif /* Enable OpenGL support */ #ifndef SDL_VIDEO_OPENGL -#define SDL_VIDEO_OPENGL 1 +#define SDL_VIDEO_OPENGL 1 #endif #ifndef SDL_VIDEO_OPENGL_WGL -#define SDL_VIDEO_OPENGL_WGL 1 +#define SDL_VIDEO_OPENGL_WGL 1 #endif #ifndef SDL_VIDEO_RENDER_OGL -#define SDL_VIDEO_RENDER_OGL 1 +#define SDL_VIDEO_RENDER_OGL 1 #endif /* Enable system power support */ @@ -186,7 +186,7 @@ typedef unsigned int uintptr_t; /* Enable assembly routines (Win64 doesn't have inline asm) */ #ifndef _WIN64 -#define SDL_ASSEMBLY_ROUTINES 1 +#define SDL_ASSEMBLY_ROUTINES 1 #endif #endif /* _SDL_config_windows_h */ diff --git a/include/SDL_config_wiz.h b/include/SDL_config_wiz.h index 2c7295816..9be04d92a 100644 --- a/include/SDL_config_wiz.h +++ b/include/SDL_config_wiz.h @@ -51,7 +51,7 @@ #define HAVE_FREE 1 #define HAVE_ALLOCA 1 #define HAVE_GETENV 1 -#define HAVE_SETENV 1 +#define HAVE_SETENV 1 #define HAVE_PUTENV 1 #define HAVE_UNSETENV 1 #define HAVE_QSORT 1 diff --git a/include/SDL_cpuinfo.h b/include/SDL_cpuinfo.h index a3b1012a7..dde3074f0 100644 --- a/include/SDL_cpuinfo.h +++ b/include/SDL_cpuinfo.h @@ -21,7 +21,7 @@ /** * \file SDL_cpuinfo.h - * + * * CPU feature detection for SDL. */ @@ -66,9 +66,7 @@ #include "begin_code.h" /* Set up for C function definitions, even when using C++ */ #ifdef __cplusplus -/* *INDENT-OFF* */ extern "C" { -/* *INDENT-ON* */ #endif /* This is a guess for the cacheline size used for padding. @@ -139,9 +137,7 @@ extern DECLSPEC SDL_bool SDLCALL SDL_HasSSE42(void); /* Ends C function definitions when using C++ */ #ifdef __cplusplus -/* *INDENT-OFF* */ } -/* *INDENT-ON* */ #endif #include "close_code.h" diff --git a/include/SDL_endian.h b/include/SDL_endian.h index a1a11df09..c58edcca0 100644 --- a/include/SDL_endian.h +++ b/include/SDL_endian.h @@ -21,7 +21,7 @@ /** * \file SDL_endian.h - * + * * Functions for reading and writing endian-specific values */ @@ -34,8 +34,8 @@ * \name The two types of endianness */ /*@{*/ -#define SDL_LIL_ENDIAN 1234 -#define SDL_BIG_ENDIAN 4321 +#define SDL_LIL_ENDIAN 1234 +#define SDL_BIG_ENDIAN 4321 /*@}*/ #ifndef SDL_BYTEORDER /* Not defined in SDL_config.h? */ @@ -48,9 +48,9 @@ (defined(__MIPS__) && defined(__MISPEB__)) || \ defined(__ppc__) || defined(__POWERPC__) || defined(_M_PPC) || \ defined(__sparc__) -#define SDL_BYTEORDER SDL_BIG_ENDIAN +#define SDL_BYTEORDER SDL_BIG_ENDIAN #else -#define SDL_BYTEORDER SDL_LIL_ENDIAN +#define SDL_BYTEORDER SDL_LIL_ENDIAN #endif #endif /* __linux __ */ #endif /* !SDL_BYTEORDER */ @@ -59,9 +59,7 @@ #include "begin_code.h" /* Set up for C function definitions, even when using C++ */ #ifdef __cplusplus -/* *INDENT-OFF* */ extern "C" { -/* *INDENT-ON* */ #endif /** @@ -210,31 +208,29 @@ SDL_SwapFloat(float x) */ /*@{*/ #if SDL_BYTEORDER == SDL_LIL_ENDIAN -#define SDL_SwapLE16(X) (X) -#define SDL_SwapLE32(X) (X) -#define SDL_SwapLE64(X) (X) -#define SDL_SwapFloatLE(X) (X) -#define SDL_SwapBE16(X) SDL_Swap16(X) -#define SDL_SwapBE32(X) SDL_Swap32(X) -#define SDL_SwapBE64(X) SDL_Swap64(X) -#define SDL_SwapFloatBE(X) SDL_SwapFloat(X) +#define SDL_SwapLE16(X) (X) +#define SDL_SwapLE32(X) (X) +#define SDL_SwapLE64(X) (X) +#define SDL_SwapFloatLE(X) (X) +#define SDL_SwapBE16(X) SDL_Swap16(X) +#define SDL_SwapBE32(X) SDL_Swap32(X) +#define SDL_SwapBE64(X) SDL_Swap64(X) +#define SDL_SwapFloatBE(X) SDL_SwapFloat(X) #else -#define SDL_SwapLE16(X) SDL_Swap16(X) -#define SDL_SwapLE32(X) SDL_Swap32(X) -#define SDL_SwapLE64(X) SDL_Swap64(X) -#define SDL_SwapFloatLE(X) SDL_SwapFloat(X) -#define SDL_SwapBE16(X) (X) -#define SDL_SwapBE32(X) (X) -#define SDL_SwapBE64(X) (X) -#define SDL_SwapFloatBE(X) (X) +#define SDL_SwapLE16(X) SDL_Swap16(X) +#define SDL_SwapLE32(X) SDL_Swap32(X) +#define SDL_SwapLE64(X) SDL_Swap64(X) +#define SDL_SwapFloatLE(X) SDL_SwapFloat(X) +#define SDL_SwapBE16(X) (X) +#define SDL_SwapBE32(X) (X) +#define SDL_SwapBE64(X) (X) +#define SDL_SwapFloatBE(X) (X) #endif /*@}*//*Swap to native*/ /* Ends C function definitions when using C++ */ #ifdef __cplusplus -/* *INDENT-OFF* */ } -/* *INDENT-ON* */ #endif #include "close_code.h" diff --git a/include/SDL_error.h b/include/SDL_error.h index 81c64da66..229b26802 100644 --- a/include/SDL_error.h +++ b/include/SDL_error.h @@ -21,7 +21,7 @@ /** * \file SDL_error.h - * + * * Simple error message routines for SDL. */ @@ -33,9 +33,7 @@ #include "begin_code.h" /* Set up for C function definitions, even when using C++ */ #ifdef __cplusplus -/* *INDENT-OFF* */ extern "C" { -/* *INDENT-ON* */ #endif /* Public functions */ @@ -46,14 +44,14 @@ extern DECLSPEC void SDLCALL SDL_ClearError(void); /** * \name Internal error functions - * - * \internal + * + * \internal * Private error reporting function - used internally. */ /*@{*/ -#define SDL_OutOfMemory() SDL_Error(SDL_ENOMEM) -#define SDL_Unsupported() SDL_Error(SDL_UNSUPPORTED) -#define SDL_InvalidParamError(param) SDL_SetError("Parameter '%s' is invalid", (param)) +#define SDL_OutOfMemory() SDL_Error(SDL_ENOMEM) +#define SDL_Unsupported() SDL_Error(SDL_UNSUPPORTED) +#define SDL_InvalidParamError(param) SDL_SetError("Parameter '%s' is invalid", (param)) typedef enum { SDL_ENOMEM, @@ -69,9 +67,7 @@ extern DECLSPEC int SDLCALL SDL_Error(SDL_errorcode code); /* Ends C function definitions when using C++ */ #ifdef __cplusplus -/* *INDENT-OFF* */ } -/* *INDENT-ON* */ #endif #include "close_code.h" diff --git a/include/SDL_events.h b/include/SDL_events.h index 65ba6b158..c2265bae6 100644 --- a/include/SDL_events.h +++ b/include/SDL_events.h @@ -21,7 +21,7 @@ /** * \file SDL_events.h - * + * * Include file for SDL event handling. */ @@ -42,14 +42,12 @@ #include "begin_code.h" /* Set up for C function definitions, even when using C++ */ #ifdef __cplusplus -/* *INDENT-OFF* */ extern "C" { -/* *INDENT-ON* */ #endif /* General keyboard/mouse state definitions */ -#define SDL_RELEASED 0 -#define SDL_PRESSED 1 +#define SDL_RELEASED 0 +#define SDL_PRESSED 1 /** * \brief The types of events that can be delivered. @@ -62,27 +60,27 @@ typedef enum SDL_QUIT = 0x100, /**< User-requested quit */ /* These application events have special meaning on iOS, see README.iOS for details */ - SDL_APP_TERMINATING, /**< The application is being terminated by the OS + SDL_APP_TERMINATING, /**< The application is being terminated by the OS Called on iOS in applicationWillTerminate() Called on Android in onDestroy() */ - SDL_APP_LOWMEMORY, /**< The application is low on memory, free memory if possible. + SDL_APP_LOWMEMORY, /**< The application is low on memory, free memory if possible. Called on iOS in applicationDidReceiveMemoryWarning() Called on Android in onLowMemory() */ - SDL_APP_WILLENTERBACKGROUND, /**< The application is about to enter the background + SDL_APP_WILLENTERBACKGROUND, /**< The application is about to enter the background Called on iOS in applicationWillResignActive() Called on Android in onPause() */ - SDL_APP_DIDENTERBACKGROUND, /**< The application did enter the background and may not get CPU for some time + SDL_APP_DIDENTERBACKGROUND, /**< The application did enter the background and may not get CPU for some time Called on iOS in applicationDidEnterBackground() Called on Android in onPause() */ - SDL_APP_WILLENTERFOREGROUND, /**< The application is about to enter the foreground + SDL_APP_WILLENTERFOREGROUND, /**< The application is about to enter the foreground Called on iOS in applicationWillEnterForeground() Called on Android in onResume() */ - SDL_APP_DIDENTERFOREGROUND, /**< The application is now interactive + SDL_APP_DIDENTERFOREGROUND, /**< The application is now interactive Called on iOS in applicationDidBecomeActive() Called on Android in onResume() */ @@ -112,13 +110,13 @@ typedef enum SDL_JOYDEVICEADDED, /**< A new joystick has been inserted into the system */ SDL_JOYDEVICEREMOVED, /**< An opened joystick has been removed */ - /* Game controller events */ - SDL_CONTROLLERAXISMOTION = 0x650, /**< Game controller axis motion */ - SDL_CONTROLLERBUTTONDOWN, /**< Game controller button pressed */ - SDL_CONTROLLERBUTTONUP, /**< Game controller button released */ - SDL_CONTROLLERDEVICEADDED, /**< A new Game controller has been inserted into the system */ - SDL_CONTROLLERDEVICEREMOVED, /**< An opened Game controller has been removed */ - SDL_CONTROLLERDEVICEREMAPPED, /**< The controller mapping was updated */ + /* Game controller events */ + SDL_CONTROLLERAXISMOTION = 0x650, /**< Game controller axis motion */ + SDL_CONTROLLERBUTTONDOWN, /**< Game controller button pressed */ + SDL_CONTROLLERBUTTONUP, /**< Game controller button released */ + SDL_CONTROLLERDEVICEADDED, /**< A new Game controller has been inserted into the system */ + SDL_CONTROLLERDEVICEREMOVED, /**< An opened Game controller has been removed */ + SDL_CONTROLLERDEVICEREMAPPED, /**< The controller mapping was updated */ /* Touch events */ SDL_FINGERDOWN = 0x700, @@ -135,7 +133,7 @@ typedef enum /* Drag and drop events */ SDL_DROPFILE = 0x1000, /**< The system requests a file open */ - + /** Events ::SDL_USEREVENT through ::SDL_LASTEVENT are for your use, * and should be allocated with SDL_RegisterEvents() */ @@ -155,7 +153,7 @@ typedef struct SDL_CommonEvent Uint32 type; Uint32 timestamp; } SDL_CommonEvent; - + /** * \brief Window state change event data (event.window.*) */ @@ -285,7 +283,7 @@ typedef struct SDL_JoyAxisEvent typedef struct SDL_JoyBallEvent { Uint32 type; /**< ::SDL_JOYBALLMOTION */ - Uint32 timestamp; + Uint32 timestamp; SDL_JoystickID which; /**< The joystick instance id */ Uint8 ball; /**< The joystick trackball index */ Uint8 padding1; @@ -301,14 +299,14 @@ typedef struct SDL_JoyBallEvent typedef struct SDL_JoyHatEvent { Uint32 type; /**< ::SDL_JOYHATMOTION */ - Uint32 timestamp; + Uint32 timestamp; SDL_JoystickID which; /**< The joystick instance id */ Uint8 hat; /**< The joystick hat index */ Uint8 value; /**< The hat position value. * \sa ::SDL_HAT_LEFTUP ::SDL_HAT_UP ::SDL_HAT_RIGHTUP * \sa ::SDL_HAT_LEFT ::SDL_HAT_CENTERED ::SDL_HAT_RIGHT * \sa ::SDL_HAT_LEFTDOWN ::SDL_HAT_DOWN ::SDL_HAT_RIGHTDOWN - * + * * Note that zero means the POV is centered. */ Uint8 padding1; @@ -321,7 +319,7 @@ typedef struct SDL_JoyHatEvent typedef struct SDL_JoyButtonEvent { Uint32 type; /**< ::SDL_JOYBUTTONDOWN or ::SDL_JOYBUTTONUP */ - Uint32 timestamp; + Uint32 timestamp; SDL_JoystickID which; /**< The joystick instance id */ Uint8 button; /**< The joystick button index */ Uint8 state; /**< ::SDL_PRESSED or ::SDL_RELEASED */ @@ -334,9 +332,9 @@ typedef struct SDL_JoyButtonEvent */ typedef struct SDL_JoyDeviceEvent { - Uint32 type; /**< ::SDL_JOYDEVICEADDED or ::SDL_JOYDEVICEREMOVED */ - Uint32 timestamp; - Sint32 which; /**< The joystick device index for the ADDED event, instance id for the REMOVED event */ + Uint32 type; /**< ::SDL_JOYDEVICEADDED or ::SDL_JOYDEVICEREMOVED */ + Uint32 timestamp; + Sint32 which; /**< The joystick device index for the ADDED event, instance id for the REMOVED event */ } SDL_JoyDeviceEvent; @@ -346,7 +344,7 @@ typedef struct SDL_JoyDeviceEvent typedef struct SDL_ControllerAxisEvent { Uint32 type; /**< ::SDL_CONTROLLERAXISMOTION */ - Uint32 timestamp; + Uint32 timestamp; SDL_JoystickID which; /**< The joystick instance id */ Uint8 axis; /**< The controller axis (SDL_GameControllerAxis) */ Uint8 padding1; @@ -363,7 +361,7 @@ typedef struct SDL_ControllerAxisEvent typedef struct SDL_ControllerButtonEvent { Uint32 type; /**< ::SDL_CONTROLLERBUTTONDOWN or ::SDL_CONTROLLERBUTTONUP */ - Uint32 timestamp; + Uint32 timestamp; SDL_JoystickID which; /**< The joystick instance id */ Uint8 button; /**< The controller button (SDL_GameControllerButton) */ Uint8 state; /**< ::SDL_PRESSED or ::SDL_RELEASED */ @@ -377,9 +375,9 @@ typedef struct SDL_ControllerButtonEvent */ typedef struct SDL_ControllerDeviceEvent { - Uint32 type; /**< ::SDL_CONTROLLERDEVICEADDED, ::SDL_CONTROLLERDEVICEREMOVED, or ::SDL_CONTROLLERDEVICEREMAPPED */ - Uint32 timestamp; - Sint32 which; /**< The joystick device index for the ADDED event, instance id for the REMOVED or REMAPPED event */ + Uint32 type; /**< ::SDL_CONTROLLERDEVICEADDED, ::SDL_CONTROLLERDEVICEREMOVED, or ::SDL_CONTROLLERDEVICEREMAPPED */ + Uint32 timestamp; + Sint32 which; /**< The joystick device index for the ADDED event, instance id for the REMOVED or REMAPPED event */ } SDL_ControllerDeviceEvent; @@ -411,7 +409,7 @@ typedef struct SDL_MultiGestureEvent float dTheta; float dDist; float x; - float y; + float y; Uint16 numFingers; Uint16 padding; } SDL_MultiGestureEvent; @@ -511,9 +509,9 @@ typedef union SDL_Event SDL_JoyHatEvent jhat; /**< Joystick hat event data */ SDL_JoyButtonEvent jbutton; /**< Joystick button event data */ SDL_JoyDeviceEvent jdevice; /**< Joystick device change event data */ - SDL_ControllerAxisEvent caxis; /**< Game Controller axis event data */ - SDL_ControllerButtonEvent cbutton; /**< Game Controller button event data */ - SDL_ControllerDeviceEvent cdevice; /**< Game Controller device event data */ + SDL_ControllerAxisEvent caxis; /**< Game Controller axis event data */ + SDL_ControllerButtonEvent cbutton; /**< Game Controller button event data */ + SDL_ControllerDeviceEvent cdevice; /**< Game Controller device event data */ SDL_QuitEvent quit; /**< Quit request event data */ SDL_UserEvent user; /**< Custom event data */ SDL_SysWMEvent syswm; /**< System dependent window event data */ @@ -537,9 +535,9 @@ typedef union SDL_Event /** * Pumps the event loop, gathering events from the input devices. - * + * * This function updates the event queue and internal input device state. - * + * * This should only be run in the thread that sets the video mode. */ extern DECLSPEC void SDLCALL SDL_PumpEvents(void); @@ -554,20 +552,20 @@ typedef enum /** * Checks the event queue for messages and optionally returns them. - * + * * If \c action is ::SDL_ADDEVENT, up to \c numevents events will be added to * the back of the event queue. - * + * * If \c action is ::SDL_PEEKEVENT, up to \c numevents events at the front * of the event queue, within the specified minimum and maximum type, * will be returned and will not be removed from the queue. - * - * If \c action is ::SDL_GETEVENT, up to \c numevents events at the front + * + * If \c action is ::SDL_GETEVENT, up to \c numevents events at the front * of the event queue, within the specified minimum and maximum type, * will be returned and will be removed from the queue. - * + * * \return The number of events actually stored, or -1 if there was an error. - * + * * This function is thread-safe. */ extern DECLSPEC int SDLCALL SDL_PeepEvents(SDL_Event * events, int numevents, @@ -589,31 +587,31 @@ extern DECLSPEC void SDLCALL SDL_FlushEvents(Uint32 minType, Uint32 maxType); /** * \brief Polls for currently pending events. - * + * * \return 1 if there are any pending events, or 0 if there are none available. - * - * \param event If not NULL, the next event is removed from the queue and + * + * \param event If not NULL, the next event is removed from the queue and * stored in that area. */ extern DECLSPEC int SDLCALL SDL_PollEvent(SDL_Event * event); /** * \brief Waits indefinitely for the next available event. - * + * * \return 1, or 0 if there was an error while waiting for events. - * - * \param event If not NULL, the next event is removed from the queue and + * + * \param event If not NULL, the next event is removed from the queue and * stored in that area. */ extern DECLSPEC int SDLCALL SDL_WaitEvent(SDL_Event * event); /** - * \brief Waits until the specified timeout (in milliseconds) for the next + * \brief Waits until the specified timeout (in milliseconds) for the next * available event. - * + * * \return 1, or 0 if there was an error while waiting for events. - * - * \param event If not NULL, the next event is removed from the queue and + * + * \param event If not NULL, the next event is removed from the queue and * stored in that area. * \param timeout The timeout (in milliseconds) to wait for next event. */ @@ -622,8 +620,8 @@ extern DECLSPEC int SDLCALL SDL_WaitEventTimeout(SDL_Event * event, /** * \brief Add an event to the event queue. - * - * \return 1 on success, 0 if the event was filtered, or -1 if the event queue + * + * \return 1 on success, 0 if the event was filtered, or -1 if the event queue * was full or there was some other error. */ extern DECLSPEC int SDLCALL SDL_PushEvent(SDL_Event * event); @@ -633,20 +631,20 @@ typedef int (SDLCALL * SDL_EventFilter) (void *userdata, SDL_Event * event); /** * Sets up a filter to process all events before they change internal state and * are posted to the internal event queue. - * + * * The filter is prototyped as: * \code * int SDL_EventFilter(void *userdata, SDL_Event * event); * \endcode * * If the filter returns 1, then the event will be added to the internal queue. - * If it returns 0, then the event will be dropped from the queue, but the + * If it returns 0, then the event will be dropped from the queue, but the * internal state will still be updated. This allows selective filtering of * dynamically arriving events. - * - * \warning Be very careful of what you do in the event filter function, as + * + * \warning Be very careful of what you do in the event filter function, as * it may run in a different thread! - * + * * There is one caveat when dealing with the ::SDL_QUITEVENT event type. The * event filter is only called when the window manager desires to close the * application window. If the event filter returns 1, then the window will @@ -685,18 +683,18 @@ extern DECLSPEC void SDLCALL SDL_FilterEvents(SDL_EventFilter filter, void *userdata); /*@{*/ -#define SDL_QUERY -1 -#define SDL_IGNORE 0 -#define SDL_DISABLE 0 -#define SDL_ENABLE 1 +#define SDL_QUERY -1 +#define SDL_IGNORE 0 +#define SDL_DISABLE 0 +#define SDL_ENABLE 1 /** * This function allows you to set the state of processing certain events. - * - If \c state is set to ::SDL_IGNORE, that event will be automatically + * - If \c state is set to ::SDL_IGNORE, that event will be automatically * dropped from the event queue and will not event be filtered. - * - If \c state is set to ::SDL_ENABLE, that event will be processed + * - If \c state is set to ::SDL_ENABLE, that event will be processed * normally. - * - If \c state is set to ::SDL_QUERY, SDL_EventState() will return the + * - If \c state is set to ::SDL_QUERY, SDL_EventState() will return the * current processing state of the specified event. */ extern DECLSPEC Uint8 SDLCALL SDL_EventState(Uint32 type, int state); @@ -714,9 +712,7 @@ extern DECLSPEC Uint32 SDLCALL SDL_RegisterEvents(int numevents); /* Ends C function definitions when using C++ */ #ifdef __cplusplus -/* *INDENT-OFF* */ } -/* *INDENT-ON* */ #endif #include "close_code.h" diff --git a/include/SDL_gamecontroller.h b/include/SDL_gamecontroller.h index 263f196fb..b2e35fb89 100644 --- a/include/SDL_gamecontroller.h +++ b/include/SDL_gamecontroller.h @@ -35,9 +35,7 @@ #include "begin_code.h" /* Set up for C function definitions, even when using C++ */ #ifdef __cplusplus -/* *INDENT-OFF* */ extern "C" { -/* *INDENT-ON* */ #endif /** @@ -55,10 +53,10 @@ typedef struct _SDL_GameController SDL_GameController; typedef enum { - SDL_CONTROLLER_BINDTYPE_NONE = 0, - SDL_CONTROLLER_BINDTYPE_BUTTON, - SDL_CONTROLLER_BINDTYPE_AXIS, - SDL_CONTROLLER_BINDTYPE_HAT + SDL_CONTROLLER_BINDTYPE_NONE = 0, + SDL_CONTROLLER_BINDTYPE_BUTTON, + SDL_CONTROLLER_BINDTYPE_AXIS, + SDL_CONTROLLER_BINDTYPE_HAT } SDL_GameControllerBindType; /** @@ -66,43 +64,43 @@ typedef enum */ typedef struct SDL_GameControllerButtonBind { - SDL_GameControllerBindType bindType; - union - { - int button; - int axis; - struct { + SDL_GameControllerBindType bindType; + union + { + int button; + int axis; + struct { int hat; int hat_mask; } hat; - } value; + } value; } SDL_GameControllerButtonBind; /** * To count the number of game controllers in the system for the following: - * int nJoysticks = SDL_NumJoysticks(); - * int nGameControllers = 0; - * for ( int i = 0; i < nJoysticks; i++ ) { - * if ( SDL_IsGameController(i) ) { - * nGameControllers++; - * } + * int nJoysticks = SDL_NumJoysticks(); + * int nGameControllers = 0; + * for ( int i = 0; i < nJoysticks; i++ ) { + * if ( SDL_IsGameController(i) ) { + * nGameControllers++; + * } * } * * Using the SDL_HINT_GAMECONTROLLERCONFIG hint or the SDL_GameControllerAddMapping you can add support for controllers SDL is unaware of or cause an existing controller to have a different binding. The format is: - * guid,name,mappings + * guid,name,mappings * * Where GUID is the string value from SDL_JoystickGetGUIDString(), name is the human readable string for the device and mappings are controller mappings to joystick ones. * Under Windows there is a reserved GUID of "xinput" that covers any XInput devices. - * The mapping format for joystick is: - * bX - a joystick button, index X - * hX.Y - hat X with value Y - * aX - axis X of the joystick + * The mapping format for joystick is: + * bX - a joystick button, index X + * hX.Y - hat X with value Y + * aX - axis X of the joystick * Buttons can be used as a controller axis and vice versa. * * This string shows an example of a valid mapping for a controller - * "341a3608000000000000504944564944,Afterglow PS3 Controller,a:b1,b:b2,y:b3,x:b0,start:b9,guide:b12,back:b8,dpup:h0.1,dpleft:h0.8,dpdown:h0.4,dpright:h0.2,leftshoulder:b4,rightshoulder:b5,leftstick:b10,rightstick:b11,leftx:a0,lefty:a1,rightx:a2,righty:a3,lefttrigger:b6,righttrigger:b7", + * "341a3608000000000000504944564944,Afterglow PS3 Controller,a:b1,b:b2,y:b3,x:b0,start:b9,guide:b12,back:b8,dpup:h0.1,dpleft:h0.8,dpdown:h0.4,dpright:h0.2,leftshoulder:b4,rightshoulder:b5,leftstick:b10,rightstick:b11,leftx:a0,lefty:a1,rightx:a2,righty:a3,lefttrigger:b6,righttrigger:b7", * */ @@ -179,7 +177,7 @@ extern DECLSPEC int SDLCALL SDL_GameControllerEventState(int state); /** * Update the current state of the open game controllers. - * + * * This is called automatically by the event loop if any game controller * events are enabled. */ @@ -191,14 +189,14 @@ extern DECLSPEC void SDLCALL SDL_GameControllerUpdate(void); */ typedef enum { - SDL_CONTROLLER_AXIS_INVALID = -1, - SDL_CONTROLLER_AXIS_LEFTX, - SDL_CONTROLLER_AXIS_LEFTY, - SDL_CONTROLLER_AXIS_RIGHTX, - SDL_CONTROLLER_AXIS_RIGHTY, - SDL_CONTROLLER_AXIS_TRIGGERLEFT, - SDL_CONTROLLER_AXIS_TRIGGERRIGHT, - SDL_CONTROLLER_AXIS_MAX + SDL_CONTROLLER_AXIS_INVALID = -1, + SDL_CONTROLLER_AXIS_LEFTX, + SDL_CONTROLLER_AXIS_LEFTY, + SDL_CONTROLLER_AXIS_RIGHTX, + SDL_CONTROLLER_AXIS_RIGHTY, + SDL_CONTROLLER_AXIS_TRIGGERLEFT, + SDL_CONTROLLER_AXIS_TRIGGERRIGHT, + SDL_CONTROLLER_AXIS_MAX } SDL_GameControllerAxis; /** @@ -234,23 +232,23 @@ SDL_GameControllerGetAxis(SDL_GameController *gamecontroller, */ typedef enum { - SDL_CONTROLLER_BUTTON_INVALID = -1, - SDL_CONTROLLER_BUTTON_A, - SDL_CONTROLLER_BUTTON_B, - SDL_CONTROLLER_BUTTON_X, - SDL_CONTROLLER_BUTTON_Y, - SDL_CONTROLLER_BUTTON_BACK, - SDL_CONTROLLER_BUTTON_GUIDE, - SDL_CONTROLLER_BUTTON_START, - SDL_CONTROLLER_BUTTON_LEFTSTICK, - SDL_CONTROLLER_BUTTON_RIGHTSTICK, - SDL_CONTROLLER_BUTTON_LEFTSHOULDER, - SDL_CONTROLLER_BUTTON_RIGHTSHOULDER, - SDL_CONTROLLER_BUTTON_DPAD_UP, - SDL_CONTROLLER_BUTTON_DPAD_DOWN, - SDL_CONTROLLER_BUTTON_DPAD_LEFT, - SDL_CONTROLLER_BUTTON_DPAD_RIGHT, - SDL_CONTROLLER_BUTTON_MAX + SDL_CONTROLLER_BUTTON_INVALID = -1, + SDL_CONTROLLER_BUTTON_A, + SDL_CONTROLLER_BUTTON_B, + SDL_CONTROLLER_BUTTON_X, + SDL_CONTROLLER_BUTTON_Y, + SDL_CONTROLLER_BUTTON_BACK, + SDL_CONTROLLER_BUTTON_GUIDE, + SDL_CONTROLLER_BUTTON_START, + SDL_CONTROLLER_BUTTON_LEFTSTICK, + SDL_CONTROLLER_BUTTON_RIGHTSTICK, + SDL_CONTROLLER_BUTTON_LEFTSHOULDER, + SDL_CONTROLLER_BUTTON_RIGHTSHOULDER, + SDL_CONTROLLER_BUTTON_DPAD_UP, + SDL_CONTROLLER_BUTTON_DPAD_DOWN, + SDL_CONTROLLER_BUTTON_DPAD_LEFT, + SDL_CONTROLLER_BUTTON_DPAD_RIGHT, + SDL_CONTROLLER_BUTTON_MAX } SDL_GameControllerButton; /** @@ -287,9 +285,7 @@ extern DECLSPEC void SDLCALL SDL_GameControllerClose(SDL_GameController *gamecon /* Ends C function definitions when using C++ */ #ifdef __cplusplus -/* *INDENT-OFF* */ } -/* *INDENT-ON* */ #endif #include "close_code.h" diff --git a/include/SDL_gesture.h b/include/SDL_gesture.h index 458c36775..21f10ead7 100644 --- a/include/SDL_gesture.h +++ b/include/SDL_gesture.h @@ -21,7 +21,7 @@ /** * \file SDL_gesture.h - * + * * Include file for SDL gesture event handling. */ @@ -38,9 +38,7 @@ #include "begin_code.h" /* Set up for C function definitions, even when using C++ */ #ifdef __cplusplus -/* *INDENT-OFF* */ extern "C" { -/* *INDENT-ON* */ #endif typedef Sint64 SDL_GestureID; @@ -80,9 +78,7 @@ extern DECLSPEC int SDLCALL SDL_LoadDollarTemplates(SDL_TouchID touchId, SDL_RWo /* Ends C function definitions when using C++ */ #ifdef __cplusplus -/* *INDENT-OFF* */ } -/* *INDENT-ON* */ #endif #include "close_code.h" diff --git a/include/SDL_haptic.h b/include/SDL_haptic.h index 5ea2affd4..6548ad616 100644 --- a/include/SDL_haptic.h +++ b/include/SDL_haptic.h @@ -21,10 +21,10 @@ /** * \file SDL_haptic.h - * + * * \brief The SDL Haptic subsystem allows you to control haptic (force feedback) * devices. - * + * * The basic usage is as follows: * - Initialize the Subsystem (::SDL_INIT_HAPTIC). * - Open a Haptic Device. @@ -119,16 +119,14 @@ #include "begin_code.h" /* Set up for C function definitions, even when using C++ */ #ifdef __cplusplus -/* *INDENT-OFF* */ extern "C" { - /* *INDENT-ON* */ #endif /* __cplusplus */ /** * \typedef SDL_Haptic - * + * * \brief The haptic structure used to identify an SDL haptic. - * + * * \sa SDL_HapticOpen * \sa SDL_HapticOpenFromJoystick * \sa SDL_HapticClose @@ -139,7 +137,7 @@ typedef struct _SDL_Haptic SDL_Haptic; /** * \name Haptic features - * + * * Different haptic features a device can have. */ /*@{*/ @@ -153,68 +151,68 @@ typedef struct _SDL_Haptic SDL_Haptic; * \brief Constant effect supported. * * Constant haptic effect. - * + * * \sa SDL_HapticCondition */ #define SDL_HAPTIC_CONSTANT (1<<0) /** * \brief Sine wave effect supported. - * + * * Periodic haptic effect that simulates sine waves. - * + * * \sa SDL_HapticPeriodic */ #define SDL_HAPTIC_SINE (1<<1) /** * \brief Square wave effect supported. - * + * * Periodic haptic effect that simulates square waves. - * + * * \sa SDL_HapticPeriodic */ #define SDL_HAPTIC_SQUARE (1<<2) /** * \brief Triangle wave effect supported. - * + * * Periodic haptic effect that simulates triangular waves. - * + * * \sa SDL_HapticPeriodic */ #define SDL_HAPTIC_TRIANGLE (1<<3) /** * \brief Sawtoothup wave effect supported. - * + * * Periodic haptic effect that simulates saw tooth up waves. - * + * * \sa SDL_HapticPeriodic */ #define SDL_HAPTIC_SAWTOOTHUP (1<<4) /** * \brief Sawtoothdown wave effect supported. - * + * * Periodic haptic effect that simulates saw tooth down waves. - * + * * \sa SDL_HapticPeriodic */ #define SDL_HAPTIC_SAWTOOTHDOWN (1<<5) /** * \brief Ramp effect supported. - * + * * Ramp haptic effect. - * + * * \sa SDL_HapticRamp */ #define SDL_HAPTIC_RAMP (1<<6) /** * \brief Spring effect supported - uses axes position. - * + * * Condition haptic effect that simulates a spring. Effect is based on the * axes position. * @@ -224,17 +222,17 @@ typedef struct _SDL_Haptic SDL_Haptic; /** * \brief Damper effect supported - uses axes velocity. - * + * * Condition haptic effect that simulates dampening. Effect is based on the * axes velocity. - * + * * \sa SDL_HapticCondition */ #define SDL_HAPTIC_DAMPER (1<<8) /** * \brief Inertia effect supported - uses axes acceleration. - * + * * Condition haptic effect that simulates inertia. Effect is based on the axes * acceleration. * @@ -244,17 +242,17 @@ typedef struct _SDL_Haptic SDL_Haptic; /** * \brief Friction effect supported - uses axes movement. - * - * Condition haptic effect that simulates friction. Effect is based on the + * + * Condition haptic effect that simulates friction. Effect is based on the * axes movement. - * + * * \sa SDL_HapticCondition */ #define SDL_HAPTIC_FRICTION (1<<10) /** * \brief Custom effect is supported. - * + * * User defined custom haptic effect. */ #define SDL_HAPTIC_CUSTOM (1<<11) @@ -265,34 +263,34 @@ typedef struct _SDL_Haptic SDL_Haptic; /** * \brief Device can set global gain. - * + * * Device supports setting the global gain. - * + * * \sa SDL_HapticSetGain */ #define SDL_HAPTIC_GAIN (1<<12) /** * \brief Device can set autocenter. - * + * * Device supports setting autocenter. - * + * * \sa SDL_HapticSetAutocenter */ #define SDL_HAPTIC_AUTOCENTER (1<<13) /** * \brief Device can be queried for effect status. - * + * * Device can be queried for effect status. - * + * * \sa SDL_HapticGetEffectStatus */ #define SDL_HAPTIC_STATUS (1<<14) /** * \brief Device can be paused. - * + * * \sa SDL_HapticPause * \sa SDL_HapticUnpause */ @@ -306,21 +304,21 @@ typedef struct _SDL_Haptic SDL_Haptic; /** * \brief Uses polar coordinates for the direction. - * + * * \sa SDL_HapticDirection */ #define SDL_HAPTIC_POLAR 0 /** * \brief Uses cartesian coordinates for the direction. - * + * * \sa SDL_HapticDirection */ #define SDL_HAPTIC_CARTESIAN 1 /** * \brief Uses spherical coordinates for the direction. - * + * * \sa SDL_HapticDirection */ #define SDL_HAPTIC_SPHERICAL 2 @@ -343,7 +341,7 @@ typedef struct _SDL_Haptic SDL_Haptic; /** * \brief Structure that represents a haptic direction. - * + * * Directions can be specified by: * - ::SDL_HAPTIC_POLAR : Specified by polar coordinates. * - ::SDL_HAPTIC_CARTESIAN : Specified by cartesian coordinates. @@ -361,8 +359,8 @@ typedef struct _SDL_Haptic SDL_Haptic; | | |'-----'| |__|~')_____(' [ COMPUTER ] - - + + North (0,-1) ^ | @@ -372,22 +370,22 @@ typedef struct _SDL_Haptic SDL_Haptic; | v South (0,1) - - + + [ USER ] \|||/ (o o) ---ooO-(_)-Ooo--- \endverbatim - * - * If type is ::SDL_HAPTIC_POLAR, direction is encoded by hundredths of a + * + * If type is ::SDL_HAPTIC_POLAR, direction is encoded by hundredths of a * degree starting north and turning clockwise. ::SDL_HAPTIC_POLAR only uses * the first \c dir parameter. The cardinal directions would be: * - North: 0 (0 degrees) * - East: 9000 (90 degrees) * - South: 18000 (180 degrees) * - West: 27000 (270 degrees) - * + * * If type is ::SDL_HAPTIC_CARTESIAN, direction is encoded by three positions * (X axis, Y axis and Z axis (with 3 axes)). ::SDL_HAPTIC_CARTESIAN uses * the first three \c dir parameters. The cardinal directions would be: @@ -395,13 +393,13 @@ typedef struct _SDL_Haptic SDL_Haptic; * - East: -1, 0, 0 * - South: 0, 1, 0 * - West: 1, 0, 0 - * + * * The Z axis represents the height of the effect if supported, otherwise * it's unused. In cartesian encoding (1, 2) would be the same as (2, 4), you * can use any multiple you want, only the direction matters. - * + * * If type is ::SDL_HAPTIC_SPHERICAL, direction is encoded by two rotations. - * The first two \c dir parameters are used. The \c dir parameters are as + * The first two \c dir parameters are used. The \c dir parameters are as * follows (all values are in hundredths of degrees): * - Degrees from (1, 0) rotated towards (0, 1). * - Degrees towards (0, 0, 1) (device needs at least 3 axes). @@ -411,17 +409,17 @@ typedef struct _SDL_Haptic SDL_Haptic; * from the south means the user will have to pull the stick to counteract): * \code * SDL_HapticDirection direction; - * + * * // Cartesian directions * direction.type = SDL_HAPTIC_CARTESIAN; // Using cartesian direction encoding. * direction.dir[0] = 0; // X position * direction.dir[1] = 1; // Y position * // Assuming the device has 2 axes, we don't need to specify third parameter. - * + * * // Polar directions * direction.type = SDL_HAPTIC_POLAR; // We'll be using polar direction encoding. * direction.dir[0] = 18000; // Polar only uses first parameter - * + * * // Spherical coordinates * direction.type = SDL_HAPTIC_SPHERICAL; // Spherical encoding * direction.dir[0] = 9000; // Since we only have two axes we don't need more parameters. @@ -442,12 +440,12 @@ typedef struct SDL_HapticDirection /** * \brief A structure containing a template for a Constant effect. - * + * * The struct is exclusive to the ::SDL_HAPTIC_CONSTANT effect. - * + * * A constant effect applies a constant force in the specified direction * to the joystick. - * + * * \sa SDL_HAPTIC_CONSTANT * \sa SDL_HapticEffect */ @@ -477,18 +475,18 @@ typedef struct SDL_HapticConstant /** * \brief A structure containing a template for a Periodic effect. - * + * * The struct handles the following effects: * - ::SDL_HAPTIC_SINE * - ::SDL_HAPTIC_SQUARE * - ::SDL_HAPTIC_TRIANGLE * - ::SDL_HAPTIC_SAWTOOTHUP * - ::SDL_HAPTIC_SAWTOOTHDOWN - * + * * A periodic effect consists in a wave-shaped effect that repeats itself * over time. The type determines the shape of the wave and the parameters * determine the dimensions of the wave. - * + * * Phase is given by hundredth of a cycle meaning that giving the phase a value * of 9000 will displace it 25% of its period. Here are sample values: * - 0: No phase displacement. @@ -503,28 +501,28 @@ typedef struct SDL_HapticConstant __ __ __ __ / \ / \ / \ / / \__/ \__/ \__/ - + SDL_HAPTIC_SQUARE __ __ __ __ __ | | | | | | | | | | | |__| |__| |__| |__| | - + SDL_HAPTIC_TRIANGLE /\ /\ /\ /\ /\ / \ / \ / \ / \ / / \/ \/ \/ \/ - + SDL_HAPTIC_SAWTOOTHUP /| /| /| /| /| /| /| / | / | / | / | / | / | / | / |/ |/ |/ |/ |/ |/ | - + SDL_HAPTIC_SAWTOOTHDOWN \ |\ |\ |\ |\ |\ |\ | \ | \ | \ | \ | \ | \ | \ | \| \| \| \| \| \| \| \endverbatim - * + * * \sa SDL_HAPTIC_SINE * \sa SDL_HAPTIC_SQUARE * \sa SDL_HAPTIC_TRIANGLE @@ -563,21 +561,21 @@ typedef struct SDL_HapticPeriodic /** * \brief A structure containing a template for a Condition effect. - * + * * The struct handles the following effects: * - ::SDL_HAPTIC_SPRING: Effect based on axes position. * - ::SDL_HAPTIC_DAMPER: Effect based on axes velocity. * - ::SDL_HAPTIC_INERTIA: Effect based on axes acceleration. * - ::SDL_HAPTIC_FRICTION: Effect based on axes movement. - * + * * Direction is handled by condition internals instead of a direction member. * The condition effect specific members have three parameters. The first * refers to the X axis, the second refers to the Y axis and the third * refers to the Z axis. The right terms refer to the positive side of the - * axis and the left terms refer to the negative side of the axis. Please + * axis and the left terms refer to the negative side of the axis. Please * refer to the ::SDL_HapticDirection diagram for which side is positive and * which is negative. - * + * * \sa SDL_HapticDirection * \sa SDL_HAPTIC_SPRING * \sa SDL_HAPTIC_DAMPER @@ -611,14 +609,14 @@ typedef struct SDL_HapticCondition /** * \brief A structure containing a template for a Ramp effect. - * + * * This struct is exclusively for the ::SDL_HAPTIC_RAMP effect. - * + * * The ramp effect starts at start strength and ends at end strength. * It augments in linear fashion. If you use attack and fade with a ramp * they effects get added to the ramp effect making the effect become * quadratic instead of linear. - * + * * \sa SDL_HAPTIC_RAMP * \sa SDL_HapticEffect */ @@ -649,14 +647,14 @@ typedef struct SDL_HapticRamp /** * \brief A structure containing a template for the ::SDL_HAPTIC_CUSTOM effect. - * + * * A custom force feedback effect is much like a periodic effect, where the * application can define its exact shape. You will have to allocate the * data yourself. Data should consist of channels * samples Uint16 samples. - * + * * If channels is one, the effect is rotated using the defined direction. * Otherwise it uses the samples in data for the different axes. - * + * * \sa SDL_HAPTIC_CUSTOM * \sa SDL_HapticEffect */ @@ -689,34 +687,34 @@ typedef struct SDL_HapticCustom /** * \brief The generic template for any haptic effect. - * + * * All values max at 32767 (0x7FFF). Signed values also can be negative. * Time values unless specified otherwise are in milliseconds. - * - * You can also pass ::SDL_HAPTIC_INFINITY to length instead of a 0-32767 - * value. Neither delay, interval, attack_length nor fade_length support + * + * You can also pass ::SDL_HAPTIC_INFINITY to length instead of a 0-32767 + * value. Neither delay, interval, attack_length nor fade_length support * ::SDL_HAPTIC_INFINITY. Fade will also not be used since effect never ends. - * + * * Additionally, the ::SDL_HAPTIC_RAMP effect does not support a duration of * ::SDL_HAPTIC_INFINITY. - * + * * Button triggers may not be supported on all devices, it is advised to not * use them if possible. Buttons start at index 1 instead of index 0 like * they joystick. - * + * * If both attack_length and fade_level are 0, the envelope is not used, * otherwise both values are used. - * + * * Common parts: * \code * // Replay - All effects have this * Uint32 length; // Duration of effect (ms). * Uint16 delay; // Delay before starting effect. - * + * * // Trigger - All effects have this * Uint16 button; // Button that triggers effect. * Uint16 interval; // How soon before effect can be triggered again. - * + * * // Envelope - All effects except condition effects have this * Uint16 attack_length; // Duration of the attack (ms). * Uint16 attack_level; // Level at the start of the attack. @@ -734,18 +732,18 @@ typedef struct SDL_HapticCustom | / \ | / \ | / \ - | / \ + | / \ | attack_level --> | \ | | | <--- fade_level | +--------------------------------------------------> Time [--] [---] attack_length fade_length - + [------------------][-----------------------] delay length \endverbatim - * + * * Note either the attack_level or the fade_level may be above the actual * effect level. * @@ -770,17 +768,17 @@ typedef union SDL_HapticEffect /* Function prototypes */ /** * \brief Count the number of joysticks attached to the system. - * + * * \return Number of haptic devices detected on the system. */ extern DECLSPEC int SDLCALL SDL_NumHaptics(void); /** * \brief Get the implementation dependent name of a Haptic device. - * + * * This can be called before any joysticks are opened. * If no name can be found, this function returns NULL. - * + * * \param device_index Index of the device to get its name. * \return Name of the device or NULL on error. * @@ -790,8 +788,8 @@ extern DECLSPEC const char *SDLCALL SDL_HapticName(int device_index); /** * \brief Opens a Haptic device for usage. - * - * The index passed as an argument refers to the N'th Haptic device on this + * + * The index passed as an argument refers to the N'th Haptic device on this * system. * * When opening a haptic device, its gain will be set to maximum and @@ -814,10 +812,10 @@ extern DECLSPEC SDL_Haptic *SDLCALL SDL_HapticOpen(int device_index); /** * \brief Checks if the haptic device at index has been opened. - * + * * \param device_index Index to check to see if it has been opened. * \return 1 if it has been opened or 0 if it hasn't. - * + * * \sa SDL_HapticOpen * \sa SDL_HapticIndex */ @@ -825,10 +823,10 @@ extern DECLSPEC int SDLCALL SDL_HapticOpened(int device_index); /** * \brief Gets the index of a haptic device. - * + * * \param haptic Haptic device to get the index of. * \return The index of the haptic device or -1 on error. - * + * * \sa SDL_HapticOpen * \sa SDL_HapticOpened */ @@ -836,18 +834,18 @@ extern DECLSPEC int SDLCALL SDL_HapticIndex(SDL_Haptic * haptic); /** * \brief Gets whether or not the current mouse has haptic capabilities. - * + * * \return SDL_TRUE if the mouse is haptic, SDL_FALSE if it isn't. - * + * * \sa SDL_HapticOpenFromMouse */ extern DECLSPEC int SDLCALL SDL_MouseIsHaptic(void); /** * \brief Tries to open a haptic device from the current mouse. - * + * * \return The haptic device identifier or NULL on error. - * + * * \sa SDL_MouseIsHaptic * \sa SDL_HapticOpen */ @@ -855,29 +853,29 @@ extern DECLSPEC SDL_Haptic *SDLCALL SDL_HapticOpenFromMouse(void); /** * \brief Checks to see if a joystick has haptic features. - * + * * \param joystick Joystick to test for haptic capabilities. * \return 1 if the joystick is haptic, 0 if it isn't * or -1 if an error ocurred. - * + * * \sa SDL_HapticOpenFromJoystick */ extern DECLSPEC int SDLCALL SDL_JoystickIsHaptic(SDL_Joystick * joystick); /** * \brief Opens a Haptic device for usage from a Joystick device. - * - * You must still close the haptic device seperately. It will not be closed + * + * You must still close the haptic device seperately. It will not be closed * with the joystick. - * + * * When opening from a joystick you should first close the haptic device before * closing the joystick device. If not, on some implementations the haptic * device will also get unallocated and you'll be unable to use force feedback * on that device. - * + * * \param joystick Joystick to create a haptic device from. * \return A valid haptic device identifier on success or NULL on error. - * + * * \sa SDL_HapticOpen * \sa SDL_HapticClose */ @@ -886,34 +884,34 @@ extern DECLSPEC SDL_Haptic *SDLCALL SDL_HapticOpenFromJoystick(SDL_Joystick * /** * \brief Closes a Haptic device previously opened with SDL_HapticOpen(). - * + * * \param haptic Haptic device to close. */ extern DECLSPEC void SDLCALL SDL_HapticClose(SDL_Haptic * haptic); /** * \brief Returns the number of effects a haptic device can store. - * + * * On some platforms this isn't fully supported, and therefore is an * approximation. Always check to see if your created effect was actually * created and do not rely solely on SDL_HapticNumEffects(). - * + * * \param haptic The haptic device to query effect max. * \return The number of effects the haptic device can store or * -1 on error. - * + * * \sa SDL_HapticNumEffectsPlaying * \sa SDL_HapticQuery */ extern DECLSPEC int SDLCALL SDL_HapticNumEffects(SDL_Haptic * haptic); /** - * \brief Returns the number of effects a haptic device can play at the same + * \brief Returns the number of effects a haptic device can play at the same * time. - * - * This is not supported on all platforms, but will always return a value. + * + * This is not supported on all platforms, but will always return a value. * Added here for the sake of completeness. - * + * * \param haptic The haptic device to query maximum playing effects. * \return The number of effects the haptic device can play at the same time * or -1 on error. @@ -925,17 +923,17 @@ extern DECLSPEC int SDLCALL SDL_HapticNumEffectsPlaying(SDL_Haptic * haptic); /** * \brief Gets the haptic devices supported features in bitwise matter. - * - * Example: + * + * Example: * \code * if (SDL_HapticQueryEffects(haptic) & SDL_HAPTIC_CONSTANT) { * printf("We have constant haptic effect!"); * } * \endcode - * + * * \param haptic The haptic device to query. * \return Haptic features in bitwise manner (OR'd). - * + * * \sa SDL_HapticNumEffects * \sa SDL_HapticEffectSupported */ @@ -944,18 +942,18 @@ extern DECLSPEC unsigned int SDLCALL SDL_HapticQuery(SDL_Haptic * haptic); /** * \brief Gets the number of haptic axes the device has. - * + * * \sa SDL_HapticDirection */ extern DECLSPEC int SDLCALL SDL_HapticNumAxes(SDL_Haptic * haptic); /** * \brief Checks to see if effect is supported by haptic. - * + * * \param haptic Haptic device to check on. * \param effect Effect to check to see if it is supported. * \return SDL_TRUE if effect is supported, SDL_FALSE if it isn't or -1 on error. - * + * * \sa SDL_HapticQuery * \sa SDL_HapticNewEffect */ @@ -965,11 +963,11 @@ extern DECLSPEC int SDLCALL SDL_HapticEffectSupported(SDL_Haptic * haptic, /** * \brief Creates a new haptic effect on the device. - * + * * \param haptic Haptic device to create the effect on. * \param effect Properties of the effect to create. * \return The id of the effect on success or -1 on error. - * + * * \sa SDL_HapticUpdateEffect * \sa SDL_HapticRunEffect * \sa SDL_HapticDestroyEffect @@ -979,17 +977,17 @@ extern DECLSPEC int SDLCALL SDL_HapticNewEffect(SDL_Haptic * haptic, /** * \brief Updates the properties of an effect. - * + * * Can be used dynamically, although behaviour when dynamically changing * direction may be strange. Specifically the effect may reupload itself * and start playing from the start. You cannot change the type either when * running SDL_HapticUpdateEffect(). - * + * * \param haptic Haptic device that has the effect. * \param effect Effect to update. * \param data New effect properties to use. * \return The id of the effect on success or -1 on error. - * + * * \sa SDL_HapticNewEffect * \sa SDL_HapticRunEffect * \sa SDL_HapticDestroyEffect @@ -1000,18 +998,18 @@ extern DECLSPEC int SDLCALL SDL_HapticUpdateEffect(SDL_Haptic * haptic, /** * \brief Runs the haptic effect on its associated haptic device. - * + * * If iterations are ::SDL_HAPTIC_INFINITY, it'll run the effect over and over * repeating the envelope (attack and fade) every time. If you only want the * effect to last forever, set ::SDL_HAPTIC_INFINITY in the effect's length * parameter. - * + * * \param haptic Haptic device to run the effect on. * \param effect Identifier of the haptic effect to run. * \param iterations Number of iterations to run the effect. Use * ::SDL_HAPTIC_INFINITY for infinity. * \return 0 on success or -1 on error. - * + * * \sa SDL_HapticStopEffect * \sa SDL_HapticDestroyEffect * \sa SDL_HapticGetEffectStatus @@ -1022,11 +1020,11 @@ extern DECLSPEC int SDLCALL SDL_HapticRunEffect(SDL_Haptic * haptic, /** * \brief Stops the haptic effect on its associated haptic device. - * + * * \param haptic Haptic device to stop the effect on. * \param effect Identifier of the effect to stop. * \return 0 on success or -1 on error. - * + * * \sa SDL_HapticRunEffect * \sa SDL_HapticDestroyEffect */ @@ -1035,13 +1033,13 @@ extern DECLSPEC int SDLCALL SDL_HapticStopEffect(SDL_Haptic * haptic, /** * \brief Destroys a haptic effect on the device. - * - * This will stop the effect if it's running. Effects are automatically + * + * This will stop the effect if it's running. Effects are automatically * destroyed when the device is closed. - * + * * \param haptic Device to destroy the effect on. * \param effect Identifier of the effect to destroy. - * + * * \sa SDL_HapticNewEffect */ extern DECLSPEC void SDLCALL SDL_HapticDestroyEffect(SDL_Haptic * haptic, @@ -1049,14 +1047,14 @@ extern DECLSPEC void SDLCALL SDL_HapticDestroyEffect(SDL_Haptic * haptic, /** * \brief Gets the status of the current effect on the haptic device. - * + * * Device must support the ::SDL_HAPTIC_STATUS feature. - * + * * \param haptic Haptic device to query the effect status on. * \param effect Identifier of the effect to query its status. * \return 0 if it isn't playing, ::SDL_HAPTIC_PLAYING if it is playing * or -1 on error. - * + * * \sa SDL_HapticRunEffect * \sa SDL_HapticStopEffect */ @@ -1065,26 +1063,26 @@ extern DECLSPEC int SDLCALL SDL_HapticGetEffectStatus(SDL_Haptic * haptic, /** * \brief Sets the global gain of the device. - * + * * Device must support the ::SDL_HAPTIC_GAIN feature. - * + * * The user may specify the maximum gain by setting the environment variable * ::SDL_HAPTIC_GAIN_MAX which should be between 0 and 100. All calls to * SDL_HapticSetGain() will scale linearly using ::SDL_HAPTIC_GAIN_MAX as the * maximum. - * + * * \param haptic Haptic device to set the gain on. * \param gain Value to set the gain to, should be between 0 and 100. * \return 0 on success or -1 on error. - * + * * \sa SDL_HapticQuery */ extern DECLSPEC int SDLCALL SDL_HapticSetGain(SDL_Haptic * haptic, int gain); /** * \brief Sets the global autocenter of the device. - * - * Autocenter should be between 0 and 100. Setting it to 0 will disable + * + * Autocenter should be between 0 and 100. Setting it to 0 will disable * autocentering. * * Device must support the ::SDL_HAPTIC_AUTOCENTER feature. @@ -1092,7 +1090,7 @@ extern DECLSPEC int SDLCALL SDL_HapticSetGain(SDL_Haptic * haptic, int gain); * \param haptic Haptic device to set autocentering on. * \param autocenter Value to set autocenter to, 0 disables autocentering. * \return 0 on success or -1 on error. - * + * * \sa SDL_HapticQuery */ extern DECLSPEC int SDLCALL SDL_HapticSetAutocenter(SDL_Haptic * haptic, @@ -1100,35 +1098,35 @@ extern DECLSPEC int SDLCALL SDL_HapticSetAutocenter(SDL_Haptic * haptic, /** * \brief Pauses a haptic device. - * - * Device must support the ::SDL_HAPTIC_PAUSE feature. Call + * + * Device must support the ::SDL_HAPTIC_PAUSE feature. Call * SDL_HapticUnpause() to resume playback. - * + * * Do not modify the effects nor add new ones while the device is paused. * That can cause all sorts of weird errors. - * + * * \param haptic Haptic device to pause. * \return 0 on success or -1 on error. - * + * * \sa SDL_HapticUnpause */ extern DECLSPEC int SDLCALL SDL_HapticPause(SDL_Haptic * haptic); /** * \brief Unpauses a haptic device. - * + * * Call to unpause after SDL_HapticPause(). - * + * * \param haptic Haptic device to pause. * \return 0 on success or -1 on error. - * + * * \sa SDL_HapticPause */ extern DECLSPEC int SDLCALL SDL_HapticUnpause(SDL_Haptic * haptic); /** * \brief Stops all the currently playing effects on a haptic device. - * + * * \param haptic Haptic device to stop. * \return 0 on success or -1 on error. */ @@ -1189,9 +1187,7 @@ extern DECLSPEC int SDLCALL SDL_HapticRumbleStop(SDL_Haptic * haptic); /* Ends C function definitions when using C++ */ #ifdef __cplusplus -/* *INDENT-OFF* */ } -/* *INDENT-ON* */ #endif #include "close_code.h" diff --git a/include/SDL_hints.h b/include/SDL_hints.h index 315a33133..c96d88745 100644 --- a/include/SDL_hints.h +++ b/include/SDL_hints.h @@ -21,7 +21,7 @@ /** * \file SDL_hints.h - * + * * Official documentation for SDL configuration variables * * This file contains functions to set and get configuration hints, @@ -44,13 +44,11 @@ #include "begin_code.h" /* Set up for C function definitions, even when using C++ */ #ifdef __cplusplus -/* *INDENT-OFF* */ extern "C" { -/* *INDENT-ON* */ #endif /** - * \brief A variable controlling how 3D acceleration is used to accelerate the SDL 1.2 screen surface. + * \brief A variable controlling how 3D acceleration is used to accelerate the SDL 1.2 screen surface. * * SDL can try to accelerate the SDL 1.2 screen surface by using streaming * textures with a 3D rendering engine. This variable controls whether and @@ -169,7 +167,7 @@ extern "C" { */ #define SDL_HINT_VIDEO_MINIMIZE_ON_FOCUS_LOSS "SDL_VIDEO_MINIMIZE_ON_FOCUS_LOSS" - + /** * \brief A variable controlling whether the idle timer is disabled on iOS. * @@ -183,7 +181,7 @@ extern "C" { * "1" - Disable idle timer */ #define SDL_HINT_IDLE_TIMER_DISABLED "SDL_IOS_IDLE_TIMER_DISABLED" - + /** * \brief A variable controlling which orientations are allowed on iOS. * @@ -208,7 +206,7 @@ extern "C" { /** * \brief A variable that lets you manually hint extra gamecontroller db entries - * + * * The variable should be newline delimited rows of gamecontroller config data, see SDL_gamecontroller.h * * This hint must be set before calling SDL_Init(SDL_INIT_GAMECONTROLLER) @@ -219,7 +217,7 @@ extern "C" { /** * \brief If set to 0 then never set the top most bit on a SDL Window, even if the video mode expects it. - * This is a debugging aid for developers and not expected to be used by end users. The default is "1" + * This is a debugging aid for developers and not expected to be used by end users. The default is "1" * * This variable can be set to the following values: * "0" - don't allow topmost @@ -246,7 +244,7 @@ typedef enum * The priority controls the behavior when setting a hint that already * has a value. Hints will replace existing hints of their priority and * lower. Environment variables are considered to have override priority. - * + * * \return SDL_TRUE if the hint was set, SDL_FALSE otherwise */ extern DECLSPEC SDL_bool SDLCALL SDL_SetHintWithPriority(const char *name, @@ -255,7 +253,7 @@ extern DECLSPEC SDL_bool SDLCALL SDL_SetHintWithPriority(const char *name, /** * \brief Set a hint with normal priority - * + * * \return SDL_TRUE if the hint was set, SDL_FALSE otherwise */ extern DECLSPEC SDL_bool SDLCALL SDL_SetHint(const char *name, @@ -264,7 +262,7 @@ extern DECLSPEC SDL_bool SDLCALL SDL_SetHint(const char *name, /** * \brief Get a hint - * + * * \return The string value of a hint variable. */ extern DECLSPEC const char * SDLCALL SDL_GetHint(const char *name); @@ -279,9 +277,7 @@ extern DECLSPEC void SDLCALL SDL_ClearHints(void); /* Ends C function definitions when using C++ */ #ifdef __cplusplus -/* *INDENT-OFF* */ } -/* *INDENT-ON* */ #endif #include "close_code.h" diff --git a/include/SDL_joystick.h b/include/SDL_joystick.h index c948c05b3..f568f9bd8 100644 --- a/include/SDL_joystick.h +++ b/include/SDL_joystick.h @@ -21,7 +21,7 @@ /** * \file SDL_joystick.h - * + * * Include file for SDL joystick event handling * * The term "device_index" identifies currently plugged in joystick devices between 0 and SDL_NumJoysticks, with the exact joystick @@ -30,7 +30,7 @@ * The term "instance_id" is the current instantiation of a joystick device in the system, if the joystick is removed and then re-inserted * then it will get a new instance_id, instance_id's are monotonically increasing identifiers of a joystick plugged in. * - * The term JoystickGUID is a stable 128-bit identifier for a joystick device that does not change over time, it identifies class of + * The term JoystickGUID is a stable 128-bit identifier for a joystick device that does not change over time, it identifies class of * the device (a X360 wired controller for example). This identifier is platform dependent. * * @@ -45,9 +45,7 @@ #include "begin_code.h" /* Set up for C function definitions, even when using C++ */ #ifdef __cplusplus -/* *INDENT-OFF* */ extern "C" { -/* *INDENT-ON* */ #endif /** @@ -64,7 +62,7 @@ typedef struct _SDL_Joystick SDL_Joystick; /* A structure that encodes the stable unique id for a joystick device */ typedef struct { - Uint8 data[16]; + Uint8 data[16]; } SDL_JoystickGUID; typedef Sint32 SDL_JoystickID; @@ -84,11 +82,11 @@ extern DECLSPEC int SDLCALL SDL_NumJoysticks(void); extern DECLSPEC const char *SDLCALL SDL_JoystickNameForIndex(int device_index); /** - * Open a joystick for use. - * The index passed as an argument refers tothe N'th joystick on the system. + * Open a joystick for use. + * The index passed as an argument refers tothe N'th joystick on the system. * This index is the value which will identify this joystick in future joystick * events. - * + * * \return A joystick identifier, or NULL if an error occurred. */ extern DECLSPEC SDL_Joystick *SDLCALL SDL_JoystickOpen(int device_index); @@ -98,7 +96,7 @@ extern DECLSPEC SDL_Joystick *SDLCALL SDL_JoystickOpen(int device_index); * If no name can be found, this function returns NULL. */ extern DECLSPEC const char *SDLCALL SDL_JoystickName(SDL_Joystick * joystick); - + /** * Return the GUID for the joystick at this index */ @@ -137,7 +135,7 @@ extern DECLSPEC int SDLCALL SDL_JoystickNumAxes(SDL_Joystick * joystick); /** * Get the number of trackballs on a joystick. - * + * * Joystick trackballs have only relative motion events associated * with them and their state cannot be polled. */ @@ -155,7 +153,7 @@ extern DECLSPEC int SDLCALL SDL_JoystickNumButtons(SDL_Joystick * joystick); /** * Update the current state of the open joysticks. - * + * * This is called automatically by the event loop if any joystick * events are enabled. */ @@ -163,20 +161,20 @@ extern DECLSPEC void SDLCALL SDL_JoystickUpdate(void); /** * Enable/disable joystick event polling. - * + * * If joystick events are disabled, you must call SDL_JoystickUpdate() * yourself and check the state of the joystick when you want joystick * information. - * + * * The state can be one of ::SDL_QUERY, ::SDL_ENABLE or ::SDL_IGNORE. */ extern DECLSPEC int SDLCALL SDL_JoystickEventState(int state); /** * Get the current state of an axis control on a joystick. - * + * * The state is a value ranging from -32768 to 32767. - * + * * The axis indices start at index 0. */ extern DECLSPEC Sint16 SDLCALL SDL_JoystickGetAxis(SDL_Joystick * joystick, @@ -186,22 +184,22 @@ extern DECLSPEC Sint16 SDLCALL SDL_JoystickGetAxis(SDL_Joystick * joystick, * \name Hat positions */ /*@{*/ -#define SDL_HAT_CENTERED 0x00 -#define SDL_HAT_UP 0x01 -#define SDL_HAT_RIGHT 0x02 -#define SDL_HAT_DOWN 0x04 -#define SDL_HAT_LEFT 0x08 -#define SDL_HAT_RIGHTUP (SDL_HAT_RIGHT|SDL_HAT_UP) -#define SDL_HAT_RIGHTDOWN (SDL_HAT_RIGHT|SDL_HAT_DOWN) -#define SDL_HAT_LEFTUP (SDL_HAT_LEFT|SDL_HAT_UP) -#define SDL_HAT_LEFTDOWN (SDL_HAT_LEFT|SDL_HAT_DOWN) +#define SDL_HAT_CENTERED 0x00 +#define SDL_HAT_UP 0x01 +#define SDL_HAT_RIGHT 0x02 +#define SDL_HAT_DOWN 0x04 +#define SDL_HAT_LEFT 0x08 +#define SDL_HAT_RIGHTUP (SDL_HAT_RIGHT|SDL_HAT_UP) +#define SDL_HAT_RIGHTDOWN (SDL_HAT_RIGHT|SDL_HAT_DOWN) +#define SDL_HAT_LEFTUP (SDL_HAT_LEFT|SDL_HAT_UP) +#define SDL_HAT_LEFTDOWN (SDL_HAT_LEFT|SDL_HAT_DOWN) /*@}*/ /** * Get the current state of a POV hat on a joystick. * * The hat indices start at index 0. - * + * * \return The return value is one of the following positions: * - ::SDL_HAT_CENTERED * - ::SDL_HAT_UP @@ -218,9 +216,9 @@ extern DECLSPEC Uint8 SDLCALL SDL_JoystickGetHat(SDL_Joystick * joystick, /** * Get the ball axis change since the last poll. - * + * * \return 0, or -1 if you passed it invalid parameters. - * + * * The ball indices start at index 0. */ extern DECLSPEC int SDLCALL SDL_JoystickGetBall(SDL_Joystick * joystick, @@ -228,7 +226,7 @@ extern DECLSPEC int SDLCALL SDL_JoystickGetBall(SDL_Joystick * joystick, /** * Get the current state of a button on a joystick. - * + * * The button indices start at index 0. */ extern DECLSPEC Uint8 SDLCALL SDL_JoystickGetButton(SDL_Joystick * joystick, @@ -242,9 +240,7 @@ extern DECLSPEC void SDLCALL SDL_JoystickClose(SDL_Joystick * joystick); /* Ends C function definitions when using C++ */ #ifdef __cplusplus -/* *INDENT-OFF* */ } -/* *INDENT-ON* */ #endif #include "close_code.h" diff --git a/include/SDL_keyboard.h b/include/SDL_keyboard.h index e6aa484ec..9b44df322 100644 --- a/include/SDL_keyboard.h +++ b/include/SDL_keyboard.h @@ -21,7 +21,7 @@ /** * \file SDL_keyboard.h - * + * * Include file for SDL keyboard event handling */ @@ -36,9 +36,7 @@ #include "begin_code.h" /* Set up for C function definitions, even when using C++ */ #ifdef __cplusplus -/* *INDENT-OFF* */ extern "C" { -/* *INDENT-ON* */ #endif /** @@ -61,11 +59,11 @@ extern DECLSPEC SDL_Window * SDLCALL SDL_GetKeyboardFocus(void); /** * \brief Get a snapshot of the current state of the keyboard. - * + * * \param numkeys if non-NULL, receives the length of the returned array. - * + * * \return An array of key states. Indexes into this array are obtained by using ::SDL_Scancode values. - * + * * \b Example: * \code * Uint8 *state = SDL_GetKeyboardState(NULL); @@ -83,7 +81,7 @@ extern DECLSPEC SDL_Keymod SDLCALL SDL_GetModState(void); /** * \brief Set the current key modifier state for the keyboard. - * + * * \note This does not change the keyboard state, only the key modifier flags. */ extern DECLSPEC void SDLCALL SDL_SetModState(SDL_Keymod modstate); @@ -91,9 +89,9 @@ extern DECLSPEC void SDLCALL SDL_SetModState(SDL_Keymod modstate); /** * \brief Get the key code corresponding to the given scancode according * to the current keyboard layout. - * + * * See ::SDL_Keycode for details. - * + * * \sa SDL_GetKeyName() */ extern DECLSPEC SDL_Keycode SDLCALL SDL_GetKeyFromScancode(SDL_Scancode scancode); @@ -101,16 +99,16 @@ extern DECLSPEC SDL_Keycode SDLCALL SDL_GetKeyFromScancode(SDL_Scancode scancode /** * \brief Get the scancode corresponding to the given key code according to the * current keyboard layout. - * + * * See ::SDL_Scancode for details. - * + * * \sa SDL_GetScancodeName() */ extern DECLSPEC SDL_Scancode SDLCALL SDL_GetScancodeFromKey(SDL_Keycode key); /** * \brief Get a human-readable name for a scancode. - * + * * \return A pointer to the name for the scancode. * If the scancode doesn't have a name, this function returns * an empty string (""). @@ -121,7 +119,7 @@ extern DECLSPEC const char *SDLCALL SDL_GetScancodeName(SDL_Scancode scancode); /** * \brief Get a scancode from a human-readable name - * + * * \return scancode, or SDL_SCANCODE_UNKNOWN if the name wasn't recognized * * \sa SDL_Scancode @@ -130,19 +128,19 @@ extern DECLSPEC SDL_Scancode SDLCALL SDL_GetScancodeFromName(const char *name); /** * \brief Get a human-readable name for a key. - * + * * \return A pointer to a UTF-8 string that stays valid at least until the next - * call to this function. If you need it around any longer, you must - * copy it. If the key doesn't have a name, this function returns an + * call to this function. If you need it around any longer, you must + * copy it. If the key doesn't have a name, this function returns an * empty string (""). - * + * * \sa SDL_Key */ extern DECLSPEC const char *SDLCALL SDL_GetKeyName(SDL_Keycode key); /** * \brief Get a key code from a human-readable name - * + * * \return key code, or SDLK_UNKNOWN if the name wasn't recognized * * \sa SDL_Keycode @@ -152,7 +150,7 @@ extern DECLSPEC SDL_Keycode SDLCALL SDL_GetKeyFromName(const char *name); /** * \brief Start accepting Unicode text input events. * This function will show the on-screen keyboard if supported. - * + * * \sa SDL_StopTextInput() * \sa SDL_SetTextInputRect() * \sa SDL_HasScreenKeyboardSupport() @@ -170,7 +168,7 @@ extern DECLSPEC SDL_bool SDLCALL SDL_IsTextInputActive(void); /** * \brief Stop receiving any text input events. * This function will hide the on-screen keyboard if supported. - * + * * \sa SDL_StartTextInput() * \sa SDL_HasScreenKeyboardSupport() */ @@ -179,38 +177,36 @@ extern DECLSPEC void SDLCALL SDL_StopTextInput(void); /** * \brief Set the rectangle used to type Unicode text inputs. * This is used as a hint for IME and on-screen keyboard placement. - * + * * \sa SDL_StartTextInput() */ extern DECLSPEC void SDLCALL SDL_SetTextInputRect(SDL_Rect *rect); /** * \brief Returns whether the platform has some screen keyboard support. - * + * * \return SDL_TRUE if some keyboard support is available else SDL_FALSE. - * + * * \note Not all screen keyboard functions are supported on all platforms. - * + * * \sa SDL_IsScreenKeyboardShown() */ extern DECLSPEC SDL_bool SDLCALL SDL_HasScreenKeyboardSupport(void); /** * \brief Returns whether the screen keyboard is shown for given window. - * + * * \param window The window for which screen keyboard should be queried. - * + * * \return SDL_TRUE if screen keyboard is shown else SDL_FALSE. - * + * * \sa SDL_HasScreenKeyboardSupport() */ extern DECLSPEC SDL_bool SDLCALL SDL_IsScreenKeyboardShown(SDL_Window *window); /* Ends C function definitions when using C++ */ #ifdef __cplusplus -/* *INDENT-OFF* */ } -/* *INDENT-ON* */ #endif #include "close_code.h" diff --git a/include/SDL_keycode.h b/include/SDL_keycode.h index 70742b1e5..de584e126 100644 --- a/include/SDL_keycode.h +++ b/include/SDL_keycode.h @@ -21,7 +21,7 @@ /** * \file SDL_keycode.h - * + * * Defines constants which identify keyboard keys and modifiers. */ @@ -33,7 +33,7 @@ /** * \brief The SDL virtual key representation. - * + * * Values of this type are used to represent keyboard keys using the current * layout of the keyboard. These values include Unicode values representing * the unmodified character that would be generated by pressing the key, or @@ -42,7 +42,7 @@ typedef Sint32 SDL_Keycode; #define SDLK_SCANCODE_MASK (1<<30) -#define SDL_SCANCODE_TO_KEYCODE(X) (X | SDLK_SCANCODE_MASK) +#define SDL_SCANCODE_TO_KEYCODE(X) (X | SDLK_SCANCODE_MASK) enum { @@ -85,7 +85,7 @@ enum SDLK_GREATER = '>', SDLK_QUESTION = '?', SDLK_AT = '@', - /* + /* Skip uppercase letters */ SDLK_LEFTBRACKET = '[', @@ -331,10 +331,10 @@ typedef enum KMOD_RESERVED = 0x8000 } SDL_Keymod; -#define KMOD_CTRL (KMOD_LCTRL|KMOD_RCTRL) -#define KMOD_SHIFT (KMOD_LSHIFT|KMOD_RSHIFT) -#define KMOD_ALT (KMOD_LALT|KMOD_RALT) -#define KMOD_GUI (KMOD_LGUI|KMOD_RGUI) +#define KMOD_CTRL (KMOD_LCTRL|KMOD_RCTRL) +#define KMOD_SHIFT (KMOD_LSHIFT|KMOD_RSHIFT) +#define KMOD_ALT (KMOD_LALT|KMOD_RALT) +#define KMOD_GUI (KMOD_LGUI|KMOD_RGUI) #endif /* _SDL_keycode_h */ diff --git a/include/SDL_loadso.h b/include/SDL_loadso.h index edd32d5a0..790d0a724 100644 --- a/include/SDL_loadso.h +++ b/include/SDL_loadso.h @@ -24,7 +24,7 @@ * * System dependent library loading routines * - * Some things to keep in mind: + * Some things to keep in mind: * \li These functions only work on C function names. Other languages may * have name mangling and intrinsic language support that varies from * compiler to compiler. @@ -47,9 +47,7 @@ #include "begin_code.h" /* Set up for C function definitions, even when using C++ */ #ifdef __cplusplus -/* *INDENT-OFF* */ extern "C" { -/* *INDENT-ON* */ #endif /** @@ -74,9 +72,7 @@ extern DECLSPEC void SDLCALL SDL_UnloadObject(void *handle); /* Ends C function definitions when using C++ */ #ifdef __cplusplus -/* *INDENT-OFF* */ } -/* *INDENT-ON* */ #endif #include "close_code.h" diff --git a/include/SDL_log.h b/include/SDL_log.h index ba56e40e7..79ae4cde4 100644 --- a/include/SDL_log.h +++ b/include/SDL_log.h @@ -21,7 +21,7 @@ /** * \file SDL_log.h - * + * * Simple log messages with categories and priorities. * * By default logs are quiet, but if you're debugging SDL you might want: @@ -42,9 +42,7 @@ #include "begin_code.h" /* Set up for C function definitions, even when using C++ */ #ifdef __cplusplus -/* *INDENT-OFF* */ extern "C" { -/* *INDENT-ON* */ #endif @@ -60,7 +58,7 @@ extern "C" { * * By default the application category is enabled at the INFO level, * the assert category is enabled at the WARN level, test is enabled - * at the VERBOSE level and all other categories are enabled at the + * at the VERBOSE level and all other categories are enabled at the * CRITICAL level. */ enum @@ -204,9 +202,7 @@ extern DECLSPEC void SDLCALL SDL_LogSetOutputFunction(SDL_LogOutputFunction call /* Ends C function definitions when using C++ */ #ifdef __cplusplus -/* *INDENT-OFF* */ } -/* *INDENT-ON* */ #endif #include "close_code.h" diff --git a/include/SDL_main.h b/include/SDL_main.h index 8a7859fb3..59bd20167 100644 --- a/include/SDL_main.h +++ b/include/SDL_main.h @@ -26,7 +26,7 @@ /** * \file SDL_main.h - * + * * Redefine main() on some platforms so that it is called by SDL. */ @@ -37,7 +37,7 @@ #endif #ifdef __cplusplus -#define C_LINKAGE "C" +#define C_LINKAGE "C" #else #define C_LINKAGE #endif /* __cplusplus */ @@ -58,7 +58,7 @@ */ #ifdef SDL_MAIN_NEEDED -#define main SDL_main +#define main SDL_main #endif /** @@ -69,9 +69,7 @@ extern C_LINKAGE int SDL_main(int argc, char *argv[]); #include "begin_code.h" #ifdef __cplusplus -/* *INDENT-OFF* */ extern "C" { -/* *INDENT-ON* */ #endif #ifdef __WIN32__ @@ -87,9 +85,7 @@ extern DECLSPEC void SDLCALL SDL_UnregisterApp(void); #ifdef __cplusplus -/* *INDENT-OFF* */ } -/* *INDENT-ON* */ #endif #include "close_code.h" diff --git a/include/SDL_messagebox.h b/include/SDL_messagebox.h index c037466ce..cb1a1ccff 100644 --- a/include/SDL_messagebox.h +++ b/include/SDL_messagebox.h @@ -28,9 +28,7 @@ #include "begin_code.h" /* Set up for C function definitions, even when using C++ */ #ifdef __cplusplus -/* *INDENT-OFF* */ extern "C" { -/* *INDENT-ON* */ #endif /** @@ -137,9 +135,7 @@ extern DECLSPEC int SDLCALL SDL_ShowSimpleMessageBox(Uint32 flags, const char *t /* Ends C function definitions when using C++ */ #ifdef __cplusplus -/* *INDENT-OFF* */ } -/* *INDENT-ON* */ #endif #include "close_code.h" diff --git a/include/SDL_mouse.h b/include/SDL_mouse.h index c91dfbdeb..36c29e90a 100644 --- a/include/SDL_mouse.h +++ b/include/SDL_mouse.h @@ -21,7 +21,7 @@ /** * \file SDL_mouse.h - * + * * Include file for SDL mouse event handling. */ @@ -35,9 +35,7 @@ #include "begin_code.h" /* Set up for C function definitions, even when using C++ */ #ifdef __cplusplus -/* *INDENT-OFF* */ extern "C" { -/* *INDENT-ON* */ #endif typedef struct SDL_Cursor SDL_Cursor; /* Implementation dependent */ @@ -71,7 +69,7 @@ extern DECLSPEC SDL_Window * SDLCALL SDL_GetMouseFocus(void); /** * \brief Retrieve the current state of the mouse. - * + * * The current button state is returned as a button bitmask, which can * be tested using the SDL_BUTTON(X) macros, and x and y are set to the * mouse cursor position relative to the focus window for the currently @@ -90,11 +88,11 @@ extern DECLSPEC Uint32 SDLCALL SDL_GetRelativeMouseState(int *x, int *y); /** * \brief Moves the mouse to the given position within the window. - * + * * \param window The window to move the mouse into, or NULL for the current mouse focus * \param x The x coordinate within the window * \param y The y coordinate within the window - * + * * \note This function generates a mouse motion event */ extern DECLSPEC void SDLCALL SDL_WarpMouseInWindow(SDL_Window * window, @@ -102,25 +100,25 @@ extern DECLSPEC void SDLCALL SDL_WarpMouseInWindow(SDL_Window * window, /** * \brief Set relative mouse mode. - * + * * \param enabled Whether or not to enable relative mode * * \return 0 on success, or -1 if relative mode is not supported. - * + * * While the mouse is in relative mode, the cursor is hidden, and the * driver will try to report continuous motion in the current window. * Only relative motion events will be delivered, the mouse position * will not change. - * + * * \note This function will flush any pending mouse motion. - * + * * \sa SDL_GetRelativeMouseMode() */ extern DECLSPEC int SDLCALL SDL_SetRelativeMouseMode(SDL_bool enabled); /** * \brief Query whether relative mouse mode is enabled. - * + * * \sa SDL_SetRelativeMouseMode() */ extern DECLSPEC SDL_bool SDLCALL SDL_GetRelativeMouseMode(void); @@ -128,19 +126,19 @@ extern DECLSPEC SDL_bool SDLCALL SDL_GetRelativeMouseMode(void); /** * \brief Create a cursor, using the specified bitmap data and * mask (in MSB format). - * + * * The cursor width must be a multiple of 8 bits. - * + * * The cursor is created in black and white according to the following: * * * * * - * *
data mask resulting pixel on screen
0 1 White
1 1 Black
0 0 Transparent
1 0 Inverted color if possible, black + *
1 0 Inverted color if possible, black * if not.
- * + * * \sa SDL_FreeCursor() */ extern DECLSPEC SDL_Cursor *SDLCALL SDL_CreateCursor(const Uint8 * data, @@ -150,7 +148,7 @@ extern DECLSPEC SDL_Cursor *SDLCALL SDL_CreateCursor(const Uint8 * data, /** * \brief Create a color cursor. - * + * * \sa SDL_FreeCursor() */ extern DECLSPEC SDL_Cursor *SDLCALL SDL_CreateColorCursor(SDL_Surface *surface, @@ -181,17 +179,17 @@ extern DECLSPEC SDL_Cursor *SDLCALL SDL_GetDefaultCursor(void); /** * \brief Frees a cursor created with SDL_CreateCursor(). - * + * * \sa SDL_CreateCursor() */ extern DECLSPEC void SDLCALL SDL_FreeCursor(SDL_Cursor * cursor); /** * \brief Toggle whether or not the cursor is shown. - * - * \param toggle 1 to show the cursor, 0 to hide it, -1 to query the current + * + * \param toggle 1 to show the cursor, 0 to hide it, -1 to query the current * state. - * + * * \return 1 if the cursor is shown, or 0 if the cursor is hidden. */ extern DECLSPEC int SDLCALL SDL_ShowCursor(int toggle); @@ -202,24 +200,22 @@ extern DECLSPEC int SDLCALL SDL_ShowCursor(int toggle); * - Button 2: Middle mouse button * - Button 3: Right mouse button */ -#define SDL_BUTTON(X) (1 << ((X)-1)) -#define SDL_BUTTON_LEFT 1 -#define SDL_BUTTON_MIDDLE 2 -#define SDL_BUTTON_RIGHT 3 -#define SDL_BUTTON_X1 4 -#define SDL_BUTTON_X2 5 -#define SDL_BUTTON_LMASK SDL_BUTTON(SDL_BUTTON_LEFT) -#define SDL_BUTTON_MMASK SDL_BUTTON(SDL_BUTTON_MIDDLE) -#define SDL_BUTTON_RMASK SDL_BUTTON(SDL_BUTTON_RIGHT) -#define SDL_BUTTON_X1MASK SDL_BUTTON(SDL_BUTTON_X1) -#define SDL_BUTTON_X2MASK SDL_BUTTON(SDL_BUTTON_X2) +#define SDL_BUTTON(X) (1 << ((X)-1)) +#define SDL_BUTTON_LEFT 1 +#define SDL_BUTTON_MIDDLE 2 +#define SDL_BUTTON_RIGHT 3 +#define SDL_BUTTON_X1 4 +#define SDL_BUTTON_X2 5 +#define SDL_BUTTON_LMASK SDL_BUTTON(SDL_BUTTON_LEFT) +#define SDL_BUTTON_MMASK SDL_BUTTON(SDL_BUTTON_MIDDLE) +#define SDL_BUTTON_RMASK SDL_BUTTON(SDL_BUTTON_RIGHT) +#define SDL_BUTTON_X1MASK SDL_BUTTON(SDL_BUTTON_X1) +#define SDL_BUTTON_X2MASK SDL_BUTTON(SDL_BUTTON_X2) /* Ends C function definitions when using C++ */ #ifdef __cplusplus -/* *INDENT-OFF* */ } -/* *INDENT-ON* */ #endif #include "close_code.h" diff --git a/include/SDL_mutex.h b/include/SDL_mutex.h index 30519b87f..3efc4a890 100644 --- a/include/SDL_mutex.h +++ b/include/SDL_mutex.h @@ -24,7 +24,7 @@ /** * \file SDL_mutex.h - * + * * Functions to provide thread synchronization primitives. */ @@ -34,21 +34,19 @@ #include "begin_code.h" /* Set up for C function definitions, even when using C++ */ #ifdef __cplusplus -/* *INDENT-OFF* */ extern "C" { -/* *INDENT-ON* */ #endif /** * Synchronization functions which can time out return this value * if they time out. */ -#define SDL_MUTEX_TIMEDOUT 1 +#define SDL_MUTEX_TIMEDOUT 1 /** * This is the timeout value which corresponds to never time out. */ -#define SDL_MUTEX_MAXWAIT (~(Uint32)0) +#define SDL_MUTEX_MAXWAIT (~(Uint32)0) /** @@ -67,31 +65,31 @@ extern DECLSPEC SDL_mutex *SDLCALL SDL_CreateMutex(void); /** * Lock the mutex. - * + * * \return 0, or -1 on error. */ -#define SDL_mutexP(m) SDL_LockMutex(m) +#define SDL_mutexP(m) SDL_LockMutex(m) extern DECLSPEC int SDLCALL SDL_LockMutex(SDL_mutex * mutex); /** * Try to lock the mutex - * + * * \return 0, SDL_MUTEX_TIMEDOUT, or -1 on error */ extern DECLSPEC int SDLCALL SDL_TryLockMutex(SDL_mutex * mutex); /** * Unlock the mutex. - * + * * \return 0, or -1 on error. - * + * * \warning It is an error to unlock a mutex that has not been locked by * the current thread, and doing so results in undefined behavior. */ -#define SDL_mutexV(m) SDL_UnlockMutex(m) +#define SDL_mutexV(m) SDL_UnlockMutex(m) extern DECLSPEC int SDLCALL SDL_UnlockMutex(SDL_mutex * mutex); -/** +/** * Destroy a mutex. */ extern DECLSPEC void SDLCALL SDL_DestroyMutex(SDL_mutex * mutex); @@ -119,34 +117,34 @@ extern DECLSPEC SDL_sem *SDLCALL SDL_CreateSemaphore(Uint32 initial_value); extern DECLSPEC void SDLCALL SDL_DestroySemaphore(SDL_sem * sem); /** - * This function suspends the calling thread until the semaphore pointed - * to by \c sem has a positive count. It then atomically decreases the + * This function suspends the calling thread until the semaphore pointed + * to by \c sem has a positive count. It then atomically decreases the * semaphore count. */ extern DECLSPEC int SDLCALL SDL_SemWait(SDL_sem * sem); /** * Non-blocking variant of SDL_SemWait(). - * - * \return 0 if the wait succeeds, ::SDL_MUTEX_TIMEDOUT if the wait would + * + * \return 0 if the wait succeeds, ::SDL_MUTEX_TIMEDOUT if the wait would * block, and -1 on error. */ extern DECLSPEC int SDLCALL SDL_SemTryWait(SDL_sem * sem); /** * Variant of SDL_SemWait() with a timeout in milliseconds. - * - * \return 0 if the wait succeeds, ::SDL_MUTEX_TIMEDOUT if the wait does not + * + * \return 0 if the wait succeeds, ::SDL_MUTEX_TIMEDOUT if the wait does not * succeed in the allotted time, and -1 on error. - * - * \warning On some platforms this function is implemented by looping with a + * + * \warning On some platforms this function is implemented by looping with a * delay of 1 ms, and so should be avoided if possible. */ extern DECLSPEC int SDLCALL SDL_SemWaitTimeout(SDL_sem * sem, Uint32 ms); /** * Atomically increases the semaphore's count (not blocking). - * + * * \return 0, or -1 on error. */ extern DECLSPEC int SDLCALL SDL_SemPost(SDL_sem * sem); @@ -205,7 +203,7 @@ extern DECLSPEC void SDLCALL SDL_DestroyCond(SDL_cond * cond); /** * Restart one of the threads that are waiting on the condition variable. - * + * * \return 0 or -1 on error. */ extern DECLSPEC int SDLCALL SDL_CondSignal(SDL_cond * cond); @@ -219,11 +217,11 @@ extern DECLSPEC int SDLCALL SDL_CondBroadcast(SDL_cond * cond); /** * Wait on the condition variable, unlocking the provided mutex. - * + * * \warning The mutex must be locked before entering this function! - * + * * The mutex is re-locked once the condition variable is signaled. - * + * * \return 0 when it is signaled, or -1 on error. */ extern DECLSPEC int SDLCALL SDL_CondWait(SDL_cond * cond, SDL_mutex * mutex); @@ -233,7 +231,7 @@ extern DECLSPEC int SDLCALL SDL_CondWait(SDL_cond * cond, SDL_mutex * mutex); * variable is signaled, ::SDL_MUTEX_TIMEDOUT if the condition is not * signaled in the allotted time, and -1 on error. * - * \warning On some platforms this function is implemented by looping with a + * \warning On some platforms this function is implemented by looping with a * delay of 1 ms, and so should be avoided if possible. */ extern DECLSPEC int SDLCALL SDL_CondWaitTimeout(SDL_cond * cond, @@ -244,9 +242,7 @@ extern DECLSPEC int SDLCALL SDL_CondWaitTimeout(SDL_cond * cond, /* Ends C function definitions when using C++ */ #ifdef __cplusplus -/* *INDENT-OFF* */ } -/* *INDENT-ON* */ #endif #include "close_code.h" diff --git a/include/SDL_name.h b/include/SDL_name.h index 511619af5..d0469e1f2 100644 --- a/include/SDL_name.h +++ b/include/SDL_name.h @@ -6,6 +6,6 @@ #define NeedFunctionPrototypes 1 #endif -#define SDL_NAME(X) SDL_##X +#define SDL_NAME(X) SDL_##X #endif /* _SDLname_h_ */ diff --git a/include/SDL_opengl.h b/include/SDL_opengl.h index 079ed74e1..fecaca0c2 100644 --- a/include/SDL_opengl.h +++ b/include/SDL_opengl.h @@ -21,7 +21,7 @@ /** * \file SDL_opengl.h - * + * * This is a simple file to encapsulate the OpenGL API headers. */ @@ -63,23 +63,22 @@ /** * \file SDL_opengl.h - * + * * This file is included because glext.h is not available on some systems. * If you don't want this version included, simply define ::NO_SDL_GLEXT. - * + * * The latest version is available from: - * http://www.opengl.org/registry/ + * http://www.opengl.org/registry/ */ /** * \def NO_SDL_GLEXT - * - * Define this if you have your own version of glext.h and want to disable the + * + * Define this if you have your own version of glext.h and want to disable the * version included in SDL_opengl.h. */ #if !defined(NO_SDL_GLEXT) && !defined(GL_GLEXT_LEGACY) -/* *INDENT-OFF* */ #ifndef __glext_h_ #define __glext_h_ @@ -89,7 +88,7 @@ extern "C" { /* ** Copyright (c) 2007-2010 The Khronos Group Inc. -** +** ** Permission is hereby granted, free of charge, to any person obtaining a ** copy of this software and/or associated documentation files (the ** "Materials"), to deal in the Materials without restriction, including @@ -97,10 +96,10 @@ extern "C" { ** distribute, sublicense, and/or sell copies of the Materials, and to ** permit persons to whom the Materials are furnished to do so, subject to ** the following conditions: -** +** ** The above copyright notice and this permission notice shall be included ** in all copies or substantial portions of the Materials. -** +** ** THE MATERIALS ARE PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, ** EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF ** MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. @@ -11122,7 +11121,6 @@ typedef void (APIENTRYP PFNGLVDPAUUNMAPSURFACESNVPROC) (GLsizei numSurface, cons #endif #endif -/* *INDENT-ON* */ #endif /* NO_SDL_GLEXT */ #endif /* !__IPHONEOS__ */ diff --git a/include/SDL_opengles.h b/include/SDL_opengles.h index f33e190d9..00e60f5c1 100644 --- a/include/SDL_opengles.h +++ b/include/SDL_opengles.h @@ -21,7 +21,7 @@ /** * \file SDL_opengles.h - * + * * This is a simple file to encapsulate the OpenGL ES 1.X API headers. */ diff --git a/include/SDL_opengles2.h b/include/SDL_opengles2.h index 3d172c3f1..7697626f4 100644 --- a/include/SDL_opengles2.h +++ b/include/SDL_opengles2.h @@ -21,7 +21,7 @@ /** * \file SDL_opengles.h - * + * * This is a simple file to encapsulate the OpenGL ES 2.0 API headers. */ diff --git a/include/SDL_pixels.h b/include/SDL_pixels.h index e73215260..5e17cba53 100644 --- a/include/SDL_pixels.h +++ b/include/SDL_pixels.h @@ -21,7 +21,7 @@ /** * \file SDL_pixels.h - * + * * Header for the enumerated pixel format definitions. */ @@ -31,14 +31,12 @@ #include "begin_code.h" /* Set up for C function definitions, even when using C++ */ #ifdef __cplusplus -/* *INDENT-OFF* */ extern "C" { -/* *INDENT-ON* */ #endif /** * \name Transparency definitions - * + * * These define alpha as the opacity of a surface. */ /*@{*/ @@ -117,11 +115,11 @@ enum ((1 << 28) | ((type) << 24) | ((order) << 20) | ((layout) << 16) | \ ((bits) << 8) | ((bytes) << 0)) -#define SDL_PIXELFLAG(X) (((X) >> 28) & 0x0F) -#define SDL_PIXELTYPE(X) (((X) >> 24) & 0x0F) -#define SDL_PIXELORDER(X) (((X) >> 20) & 0x0F) -#define SDL_PIXELLAYOUT(X) (((X) >> 16) & 0x0F) -#define SDL_BITSPERPIXEL(X) (((X) >> 8) & 0xFF) +#define SDL_PIXELFLAG(X) (((X) >> 28) & 0x0F) +#define SDL_PIXELTYPE(X) (((X) >> 24) & 0x0F) +#define SDL_PIXELORDER(X) (((X) >> 20) & 0x0F) +#define SDL_PIXELLAYOUT(X) (((X) >> 16) & 0x0F) +#define SDL_BITSPERPIXEL(X) (((X) >> 8) & 0xFF) #define SDL_BYTESPERPIXEL(X) \ (SDL_ISPIXELFORMAT_FOURCC(X) ? \ ((((X) == SDL_PIXELFORMAT_YUY2) || \ @@ -301,9 +299,9 @@ extern DECLSPEC const char* SDLCALL SDL_GetPixelFormatName(Uint32 format); /** * \brief Convert one of the enumerated pixel formats to a bpp and RGBA masks. - * + * * \return SDL_TRUE, or SDL_FALSE if the conversion wasn't possible. - * + * * \sa SDL_MasksToPixelFormatEnum() */ extern DECLSPEC SDL_bool SDLCALL SDL_PixelFormatEnumToMasks(Uint32 format, @@ -315,10 +313,10 @@ extern DECLSPEC SDL_bool SDLCALL SDL_PixelFormatEnumToMasks(Uint32 format, /** * \brief Convert a bpp and RGBA masks to an enumerated pixel format. - * - * \return The pixel format, or ::SDL_PIXELFORMAT_UNKNOWN if the conversion + * + * \return The pixel format, or ::SDL_PIXELFORMAT_UNKNOWN if the conversion * wasn't possible. - * + * * \sa SDL_PixelFormatEnumToMasks() */ extern DECLSPEC Uint32 SDLCALL SDL_MasksToPixelFormatEnum(int bpp, @@ -338,13 +336,13 @@ extern DECLSPEC SDL_PixelFormat * SDLCALL SDL_AllocFormat(Uint32 pixel_format); extern DECLSPEC void SDLCALL SDL_FreeFormat(SDL_PixelFormat *format); /** - * \brief Create a palette structure with the specified number of color + * \brief Create a palette structure with the specified number of color * entries. - * + * * \return A new palette, or NULL if there wasn't enough memory. - * + * * \note The palette entries are initialized to white. - * + * * \sa SDL_FreePalette() */ extern DECLSPEC SDL_Palette *SDLCALL SDL_AllocPalette(int ncolors); @@ -357,12 +355,12 @@ extern DECLSPEC int SDLCALL SDL_SetPixelFormatPalette(SDL_PixelFormat * format, /** * \brief Set a range of colors in a palette. - * + * * \param palette The palette to modify. * \param colors An array of colors to copy into the palette. * \param firstcolor The index of the first palette entry to modify. * \param ncolors The number of entries to modify. - * + * * \return 0 on success, or -1 if not all of the colors could be set. */ extern DECLSPEC int SDLCALL SDL_SetPaletteColors(SDL_Palette * palette, @@ -371,14 +369,14 @@ extern DECLSPEC int SDLCALL SDL_SetPaletteColors(SDL_Palette * palette, /** * \brief Free a palette created with SDL_AllocPalette(). - * + * * \sa SDL_AllocPalette() */ extern DECLSPEC void SDLCALL SDL_FreePalette(SDL_Palette * palette); /** * \brief Maps an RGB triple to an opaque pixel value for a given pixel format. - * + * * \sa SDL_MapRGBA */ extern DECLSPEC Uint32 SDLCALL SDL_MapRGB(const SDL_PixelFormat * format, @@ -386,7 +384,7 @@ extern DECLSPEC Uint32 SDLCALL SDL_MapRGB(const SDL_PixelFormat * format, /** * \brief Maps an RGBA quadruple to a pixel value for a given pixel format. - * + * * \sa SDL_MapRGB */ extern DECLSPEC Uint32 SDLCALL SDL_MapRGBA(const SDL_PixelFormat * format, @@ -395,7 +393,7 @@ extern DECLSPEC Uint32 SDLCALL SDL_MapRGBA(const SDL_PixelFormat * format, /** * \brief Get the RGB components from a pixel of the specified format. - * + * * \sa SDL_GetRGBA */ extern DECLSPEC void SDLCALL SDL_GetRGB(Uint32 pixel, @@ -404,7 +402,7 @@ extern DECLSPEC void SDLCALL SDL_GetRGB(Uint32 pixel, /** * \brief Get the RGBA components from a pixel of the specified format. - * + * * \sa SDL_GetRGB */ extern DECLSPEC void SDLCALL SDL_GetRGBA(Uint32 pixel, @@ -420,9 +418,7 @@ extern DECLSPEC void SDLCALL SDL_CalculateGammaRamp(float gamma, Uint16 * ramp); /* Ends C function definitions when using C++ */ #ifdef __cplusplus -/* *INDENT-OFF* */ } -/* *INDENT-ON* */ #endif #include "close_code.h" diff --git a/include/SDL_platform.h b/include/SDL_platform.h index d03bd3866..77ee437cb 100644 --- a/include/SDL_platform.h +++ b/include/SDL_platform.h @@ -21,7 +21,7 @@ /** * \file SDL_platform.h - * + * * Try to get a standard set of platform defines. */ @@ -30,39 +30,39 @@ #if defined(_AIX) #undef __AIX__ -#define __AIX__ 1 +#define __AIX__ 1 #endif #if defined(__BEOS__) #undef __BEOS__ -#define __BEOS__ 1 +#define __BEOS__ 1 #endif #if defined(__HAIKU__) #undef __HAIKU__ -#define __HAIKU__ 1 +#define __HAIKU__ 1 #endif #if defined(bsdi) || defined(__bsdi) || defined(__bsdi__) #undef __BSDI__ -#define __BSDI__ 1 +#define __BSDI__ 1 #endif #if defined(_arch_dreamcast) #undef __DREAMCAST__ -#define __DREAMCAST__ 1 +#define __DREAMCAST__ 1 #endif #if defined(__FreeBSD__) || defined(__FreeBSD_kernel__) || defined(__DragonFly__) #undef __FREEBSD__ -#define __FREEBSD__ 1 +#define __FREEBSD__ 1 #endif #if defined(hpux) || defined(__hpux) || defined(__hpux__) #undef __HPUX__ -#define __HPUX__ 1 +#define __HPUX__ 1 #endif #if defined(sgi) || defined(__sgi) || defined(__sgi__) || defined(_SGI_SOURCE) #undef __IRIX__ -#define __IRIX__ 1 +#define __IRIX__ 1 #endif #if defined(linux) || defined(__linux) || defined(__linux__) #undef __LINUX__ -#define __LINUX__ 1 +#define __LINUX__ 1 #endif #if defined(ANDROID) #undef __ANDROID__ @@ -82,53 +82,51 @@ #else /* if not compiling for iPhone */ #undef __MACOSX__ -#define __MACOSX__ 1 +#define __MACOSX__ 1 #endif /* TARGET_OS_IPHONE */ #endif /* defined(__APPLE__) */ #if defined(__NetBSD__) #undef __NETBSD__ -#define __NETBSD__ 1 +#define __NETBSD__ 1 #endif #if defined(__OpenBSD__) #undef __OPENBSD__ -#define __OPENBSD__ 1 +#define __OPENBSD__ 1 #endif #if defined(__OS2__) #undef __OS2__ -#define __OS2__ 1 +#define __OS2__ 1 #endif #if defined(osf) || defined(__osf) || defined(__osf__) || defined(_OSF_SOURCE) #undef __OSF__ -#define __OSF__ 1 +#define __OSF__ 1 #endif #if defined(__QNXNTO__) #undef __QNXNTO__ -#define __QNXNTO__ 1 +#define __QNXNTO__ 1 #endif #if defined(riscos) || defined(__riscos) || defined(__riscos__) #undef __RISCOS__ -#define __RISCOS__ 1 +#define __RISCOS__ 1 #endif #if defined(__SVR4) #undef __SOLARIS__ -#define __SOLARIS__ 1 +#define __SOLARIS__ 1 #endif #if defined(WIN32) || defined(_WIN32) #undef __WIN32__ -#define __WIN32__ 1 +#define __WIN32__ 1 #endif #if defined(__PSP__) #undef __PSP__ -#define __PSP__ 1 +#define __PSP__ 1 #endif #include "begin_code.h" /* Set up for C function definitions, even when using C++ */ #ifdef __cplusplus -/* *INDENT-OFF* */ extern "C" { -/* *INDENT-ON* */ #endif /** @@ -138,9 +136,7 @@ extern DECLSPEC const char * SDLCALL SDL_GetPlatform (void); /* Ends C function definitions when using C++ */ #ifdef __cplusplus -/* *INDENT-OFF* */ } -/* *INDENT-ON* */ #endif #include "close_code.h" diff --git a/include/SDL_power.h b/include/SDL_power.h index d796aee28..4f70c5bb1 100644 --- a/include/SDL_power.h +++ b/include/SDL_power.h @@ -24,7 +24,7 @@ /** * \file SDL_power.h - * + * * Header for the SDL power management routines. */ @@ -33,9 +33,7 @@ #include "begin_code.h" /* Set up for C function definitions, even when using C++ */ #ifdef __cplusplus -/* *INDENT-OFF* */ extern "C" { -/* *INDENT-ON* */ #endif /** @@ -53,24 +51,22 @@ typedef enum /** * \brief Get the current power supply details. - * + * * \param secs Seconds of battery life left. You can pass a NULL here if * you don't care. Will return -1 if we can't determine a * value, or we're not running on a battery. - * + * * \param pct Percentage of battery life left, between 0 and 100. You can * pass a NULL here if you don't care. Will return -1 if we * can't determine a value, or we're not running on a battery. - * + * * \return The state of the battery (if any). */ extern DECLSPEC SDL_PowerState SDLCALL SDL_GetPowerInfo(int *secs, int *pct); /* Ends C function definitions when using C++ */ #ifdef __cplusplus -/* *INDENT-OFF* */ } -/* *INDENT-ON* */ #endif #include "close_code.h" diff --git a/include/SDL_quit.h b/include/SDL_quit.h index 5c7d343bd..485e42db0 100644 --- a/include/SDL_quit.h +++ b/include/SDL_quit.h @@ -21,7 +21,7 @@ /** * \file SDL_quit.h - * + * * Include file for SDL quit event handling. */ @@ -33,11 +33,11 @@ /** * \file SDL_quit.h - * + * * An ::SDL_QUIT event is generated when the user tries to close the application * window. If it is ignored or filtered out, the window will remain open. * If it is not ignored or filtered, it is queued normally and the window - * is allowed to close. When the window is closed, screen updates will + * is allowed to close. When the window is closed, screen updates will * complete, but have no effect. * * SDL_Init() installs signal handlers for SIGINT (keyboard interrupt) @@ -46,7 +46,7 @@ * to determine the cause of an ::SDL_QUIT event, but setting a signal * handler in your application will override the default generation of * quit events for that signal. - * + * * \sa SDL_Quit() */ diff --git a/include/SDL_rect.h b/include/SDL_rect.h index 26621a50c..c8af7c197 100644 --- a/include/SDL_rect.h +++ b/include/SDL_rect.h @@ -21,7 +21,7 @@ /** * \file SDL_rect.h - * + * * Header file for SDL_rect definition and management functions. */ @@ -36,9 +36,7 @@ #include "begin_code.h" /* Set up for C function definitions, even when using C++ */ #ifdef __cplusplus -/* *INDENT-OFF* */ extern "C" { -/* *INDENT-ON* */ #endif /** @@ -54,7 +52,7 @@ typedef struct /** * \brief A rectangle, with the origin at the upper left. - * + * * \sa SDL_RectEmpty * \sa SDL_RectEquals * \sa SDL_HasIntersection @@ -87,7 +85,7 @@ SDL_FORCE_INLINE SDL_bool SDL_RectEquals(const SDL_Rect *a, const SDL_Rect *b) /** * \brief Determine whether two rectangles intersect. - * + * * \return SDL_TRUE if there is an intersection, SDL_FALSE otherwise. */ extern DECLSPEC SDL_bool SDLCALL SDL_HasIntersection(const SDL_Rect * A, @@ -95,7 +93,7 @@ extern DECLSPEC SDL_bool SDLCALL SDL_HasIntersection(const SDL_Rect * A, /** * \brief Calculate the intersection of two rectangles. - * + * * \return SDL_TRUE if there is an intersection, SDL_FALSE otherwise. */ extern DECLSPEC SDL_bool SDLCALL SDL_IntersectRect(const SDL_Rect * A, @@ -121,7 +119,7 @@ extern DECLSPEC SDL_bool SDLCALL SDL_EnclosePoints(const SDL_Point * points, /** * \brief Calculate the intersection of a rectangle and line segment. - * + * * \return SDL_TRUE if there is an intersection, SDL_FALSE otherwise. */ extern DECLSPEC SDL_bool SDLCALL SDL_IntersectRectAndLine(const SDL_Rect * @@ -131,9 +129,7 @@ extern DECLSPEC SDL_bool SDLCALL SDL_IntersectRectAndLine(const SDL_Rect * /* Ends C function definitions when using C++ */ #ifdef __cplusplus -/* *INDENT-OFF* */ } -/* *INDENT-ON* */ #endif #include "close_code.h" diff --git a/include/SDL_render.h b/include/SDL_render.h index 8ec365a85..aa92559a3 100644 --- a/include/SDL_render.h +++ b/include/SDL_render.h @@ -21,7 +21,7 @@ /** * \file SDL_render.h - * + * * Header file for SDL 2D rendering functions. * * This API supports the following features: @@ -52,9 +52,7 @@ #include "begin_code.h" /* Set up for C function definitions, even when using C++ */ #ifdef __cplusplus -/* *INDENT-OFF* */ extern "C" { -/* *INDENT-ON* */ #endif /** @@ -62,10 +60,10 @@ extern "C" { */ typedef enum { - SDL_RENDERER_SOFTWARE = 0x00000001, /**< The renderer is a software fallback */ - SDL_RENDERER_ACCELERATED = 0x00000002, /**< The renderer uses hardware + SDL_RENDERER_SOFTWARE = 0x00000001, /**< The renderer is a software fallback */ + SDL_RENDERER_ACCELERATED = 0x00000002, /**< The renderer uses hardware acceleration */ - SDL_RENDERER_PRESENTVSYNC = 0x00000004, /**< Present is synchronized + SDL_RENDERER_PRESENTVSYNC = 0x00000004, /**< Present is synchronized with the refresh rate */ SDL_RENDERER_TARGETTEXTURE = 0x00000008 /**< The renderer supports rendering to texture */ @@ -130,28 +128,28 @@ typedef struct SDL_Texture SDL_Texture; /* Function prototypes */ /** - * \brief Get the number of 2D rendering drivers available for the current + * \brief Get the number of 2D rendering drivers available for the current * display. - * + * * A render driver is a set of code that handles rendering and texture * management on a particular display. Normally there is only one, but * some drivers may have several available with different capabilities. - * + * * \sa SDL_GetRenderDriverInfo() * \sa SDL_CreateRenderer() */ extern DECLSPEC int SDLCALL SDL_GetNumRenderDrivers(void); /** - * \brief Get information about a specific 2D rendering driver for the current + * \brief Get information about a specific 2D rendering driver for the current * display. - * + * * \param index The index of the driver to query information about. - * \param info A pointer to an SDL_RendererInfo struct to be filled with + * \param info A pointer to an SDL_RendererInfo struct to be filled with * information on the rendering driver. - * + * * \return 0 on success, -1 if the index was out of range. - * + * * \sa SDL_CreateRenderer() */ extern DECLSPEC int SDLCALL SDL_GetRenderDriverInfo(int index, @@ -175,14 +173,14 @@ extern DECLSPEC int SDLCALL SDL_CreateWindowAndRenderer( /** * \brief Create a 2D rendering context for a window. - * + * * \param window The window where rendering is displayed. - * \param index The index of the rendering driver to initialize, or -1 to + * \param index The index of the rendering driver to initialize, or -1 to * initialize the first one supporting the requested flags. * \param flags ::SDL_RendererFlags. - * + * * \return A valid rendering context or NULL if there was an error. - * + * * \sa SDL_CreateSoftwareRenderer() * \sa SDL_GetRendererInfo() * \sa SDL_DestroyRenderer() @@ -192,11 +190,11 @@ extern DECLSPEC SDL_Renderer * SDLCALL SDL_CreateRenderer(SDL_Window * window, /** * \brief Create a 2D software rendering context for a surface. - * + * * \param surface The surface where rendering is done. - * + * * \return A valid rendering context or NULL if there was an error. - * + * * \sa SDL_CreateRenderer() * \sa SDL_DestroyRenderer() */ @@ -215,17 +213,17 @@ extern DECLSPEC int SDLCALL SDL_GetRendererInfo(SDL_Renderer * renderer, /** * \brief Create a texture for a rendering context. - * + * * \param renderer The renderer. * \param format The format of the texture. * \param access One of the enumerated values in ::SDL_TextureAccess. * \param w The width of the texture in pixels. * \param h The height of the texture in pixels. - * - * \return The created texture is returned, or 0 if no rendering context was + * + * \return The created texture is returned, or 0 if no rendering context was * active, the format was unsupported, or the width or height were out * of range. - * + * * \sa SDL_QueryTexture() * \sa SDL_UpdateTexture() * \sa SDL_DestroyTexture() @@ -237,14 +235,14 @@ extern DECLSPEC SDL_Texture * SDLCALL SDL_CreateTexture(SDL_Renderer * renderer, /** * \brief Create a texture from an existing surface. - * + * * \param renderer The renderer. * \param surface The surface containing pixel data used to fill the texture. - * + * * \return The created texture is returned, or 0 on error. - * + * * \note The surface is not modified or freed by this function. - * + * * \sa SDL_QueryTexture() * \sa SDL_DestroyTexture() */ @@ -252,15 +250,15 @@ extern DECLSPEC SDL_Texture * SDLCALL SDL_CreateTextureFromSurface(SDL_Renderer /** * \brief Query the attributes of a texture - * + * * \param texture A texture to be queried. - * \param format A pointer filled in with the raw format of the texture. The - * actual format may differ, but pixel transfers will use this + * \param format A pointer filled in with the raw format of the texture. The + * actual format may differ, but pixel transfers will use this * format. * \param access A pointer filled in with the actual access to the texture. * \param w A pointer filled in with the width of the texture in pixels. * \param h A pointer filled in with the height of the texture in pixels. - * + * * \return 0 on success, or -1 if the texture is not valid. */ extern DECLSPEC int SDLCALL SDL_QueryTexture(SDL_Texture * texture, @@ -269,15 +267,15 @@ extern DECLSPEC int SDLCALL SDL_QueryTexture(SDL_Texture * texture, /** * \brief Set an additional color value used in render copy operations. - * + * * \param texture The texture to update. * \param r The red color value multiplied into copy operations. * \param g The green color value multiplied into copy operations. * \param b The blue color value multiplied into copy operations. - * - * \return 0 on success, or -1 if the texture is not valid or color modulation + * + * \return 0 on success, or -1 if the texture is not valid or color modulation * is not supported. - * + * * \sa SDL_GetTextureColorMod() */ extern DECLSPEC int SDLCALL SDL_SetTextureColorMod(SDL_Texture * texture, @@ -286,14 +284,14 @@ extern DECLSPEC int SDLCALL SDL_SetTextureColorMod(SDL_Texture * texture, /** * \brief Get the additional color value used in render copy operations. - * + * * \param texture The texture to query. * \param r A pointer filled in with the current red color value. * \param g A pointer filled in with the current green color value. * \param b A pointer filled in with the current blue color value. - * + * * \return 0 on success, or -1 if the texture is not valid. - * + * * \sa SDL_SetTextureColorMod() */ extern DECLSPEC int SDLCALL SDL_GetTextureColorMod(SDL_Texture * texture, @@ -302,13 +300,13 @@ extern DECLSPEC int SDLCALL SDL_GetTextureColorMod(SDL_Texture * texture, /** * \brief Set an additional alpha value used in render copy operations. - * + * * \param texture The texture to update. * \param alpha The alpha value multiplied into copy operations. - * - * \return 0 on success, or -1 if the texture is not valid or alpha modulation + * + * \return 0 on success, or -1 if the texture is not valid or alpha modulation * is not supported. - * + * * \sa SDL_GetTextureAlphaMod() */ extern DECLSPEC int SDLCALL SDL_SetTextureAlphaMod(SDL_Texture * texture, @@ -316,12 +314,12 @@ extern DECLSPEC int SDLCALL SDL_SetTextureAlphaMod(SDL_Texture * texture, /** * \brief Get the additional alpha value used in render copy operations. - * + * * \param texture The texture to query. * \param alpha A pointer filled in with the current alpha value. - * + * * \return 0 on success, or -1 if the texture is not valid. - * + * * \sa SDL_SetTextureAlphaMod() */ extern DECLSPEC int SDLCALL SDL_GetTextureAlphaMod(SDL_Texture * texture, @@ -329,16 +327,16 @@ extern DECLSPEC int SDLCALL SDL_GetTextureAlphaMod(SDL_Texture * texture, /** * \brief Set the blend mode used for texture copy operations. - * + * * \param texture The texture to update. * \param blendMode ::SDL_BlendMode to use for texture blending. - * + * * \return 0 on success, or -1 if the texture is not valid or the blend mode is * not supported. - * + * * \note If the blend mode is not supported, the closest supported mode is * chosen. - * + * * \sa SDL_GetTextureBlendMode() */ extern DECLSPEC int SDLCALL SDL_SetTextureBlendMode(SDL_Texture * texture, @@ -346,12 +344,12 @@ extern DECLSPEC int SDLCALL SDL_SetTextureBlendMode(SDL_Texture * texture, /** * \brief Get the blend mode used for texture copy operations. - * + * * \param texture The texture to query. * \param blendMode A pointer filled in with the current blend mode. - * + * * \return 0 on success, or -1 if the texture is not valid. - * + * * \sa SDL_SetTextureBlendMode() */ extern DECLSPEC int SDLCALL SDL_GetTextureBlendMode(SDL_Texture * texture, @@ -359,15 +357,15 @@ extern DECLSPEC int SDLCALL SDL_GetTextureBlendMode(SDL_Texture * texture, /** * \brief Update the given texture rectangle with new pixel data. - * + * * \param texture The texture to update - * \param rect A pointer to the rectangle of pixels to update, or NULL to + * \param rect A pointer to the rectangle of pixels to update, or NULL to * update the entire texture. * \param pixels The raw pixel data. * \param pitch The number of bytes between rows of pixel data. - * + * * \return 0 on success, or -1 if the texture is not valid. - * + * * \note This is a fairly slow function. */ extern DECLSPEC int SDLCALL SDL_UpdateTexture(SDL_Texture * texture, @@ -376,17 +374,17 @@ extern DECLSPEC int SDLCALL SDL_UpdateTexture(SDL_Texture * texture, /** * \brief Lock a portion of the texture for write-only pixel access. - * - * \param texture The texture to lock for access, which was created with + * + * \param texture The texture to lock for access, which was created with * ::SDL_TEXTUREACCESS_STREAMING. - * \param rect A pointer to the rectangle to lock for access. If the rect + * \param rect A pointer to the rectangle to lock for access. If the rect * is NULL, the entire texture will be locked. - * \param pixels This is filled in with a pointer to the locked pixels, + * \param pixels This is filled in with a pointer to the locked pixels, * appropriately offset by the locked area. * \param pitch This is filled in with the pitch of the locked pixels. - * + * * \return 0 on success, or -1 if the texture is not valid or was not created with ::SDL_TEXTUREACCESS_STREAMING. - * + * * \sa SDL_UnlockTexture() */ extern DECLSPEC int SDLCALL SDL_LockTexture(SDL_Texture * texture, @@ -395,7 +393,7 @@ extern DECLSPEC int SDLCALL SDL_LockTexture(SDL_Texture * texture, /** * \brief Unlock a texture, uploading the changes to video memory, if needed. - * + * * \sa SDL_LockTexture() */ extern DECLSPEC void SDLCALL SDL_UnlockTexture(SDL_Texture * texture); @@ -446,7 +444,7 @@ extern DECLSPEC SDL_Texture * SDLCALL SDL_GetRenderTarget(SDL_Renderer *renderer * If the output display is a window, mouse events in the window will be filtered * and scaled so they seem to arrive within the logical resolution. * - * \note If this function results in scaling or subpixel drawing by the + * \note If this function results in scaling or subpixel drawing by the * rendering backend, it will be handled using the appropriate * quality hints. * @@ -496,7 +494,7 @@ extern DECLSPEC void SDLCALL SDL_RenderGetViewport(SDL_Renderer * renderer, /** * \brief Set the clip rectangle for the current target. - * + * * \param renderer The renderer for which clip rectangle should be set. * \param rect A pointer to the rectangle to set as the clip rectangle, or * NULL to disable clipping. @@ -510,7 +508,7 @@ extern DECLSPEC int SDLCALL SDL_RenderSetClipRect(SDL_Renderer * renderer, /** * \brief Get the clip rectangle for the current target. - * + * * \param renderer The renderer from which clip rectangle should be queried. * \param rect A pointer filled in with the current clip rectangle, or * an empty rectangle if clipping is disabled. @@ -531,7 +529,7 @@ extern DECLSPEC void SDLCALL SDL_RenderGetClipRect(SDL_Renderer * renderer, * before they are used by the renderer. This allows resolution * independent drawing with a single coordinate system. * - * \note If this results in scaling or subpixel drawing by the + * \note If this results in scaling or subpixel drawing by the * rendering backend, it will be handled using the appropriate * quality hints. For best results use integer scaling factors. * @@ -555,14 +553,14 @@ extern DECLSPEC void SDLCALL SDL_RenderGetScale(SDL_Renderer * renderer, /** * \brief Set the color used for drawing operations (Rect, Line and Clear). - * + * * \param renderer The renderer for which drawing color should be set. * \param r The red value used to draw on the rendering target. * \param g The green value used to draw on the rendering target. * \param b The blue value used to draw on the rendering target. - * \param a The alpha value used to draw on the rendering target, usually + * \param a The alpha value used to draw on the rendering target, usually * ::SDL_ALPHA_OPAQUE (255). - * + * * \return 0 on success, or -1 on error */ extern DECLSPEC int SDL_SetRenderDrawColor(SDL_Renderer * renderer, @@ -571,14 +569,14 @@ extern DECLSPEC int SDL_SetRenderDrawColor(SDL_Renderer * renderer, /** * \brief Get the color used for drawing operations (Rect, Line and Clear). - * + * * \param renderer The renderer from which drawing color should be queried. * \param r A pointer to the red value used to draw on the rendering target. * \param g A pointer to the green value used to draw on the rendering target. * \param b A pointer to the blue value used to draw on the rendering target. - * \param a A pointer to the alpha value used to draw on the rendering target, + * \param a A pointer to the alpha value used to draw on the rendering target, * usually ::SDL_ALPHA_OPAQUE (255). - * + * * \return 0 on success, or -1 on error */ extern DECLSPEC int SDL_GetRenderDrawColor(SDL_Renderer * renderer, @@ -587,15 +585,15 @@ extern DECLSPEC int SDL_GetRenderDrawColor(SDL_Renderer * renderer, /** * \brief Set the blend mode used for drawing operations (Fill and Line). - * + * * \param renderer The renderer for which blend mode should be set. * \param blendMode ::SDL_BlendMode to use for blending. - * + * * \return 0 on success, or -1 on error - * - * \note If the blend mode is not supported, the closest supported mode is + * + * \note If the blend mode is not supported, the closest supported mode is * chosen. - * + * * \sa SDL_GetRenderDrawBlendMode() */ extern DECLSPEC int SDLCALL SDL_SetRenderDrawBlendMode(SDL_Renderer * renderer, @@ -603,12 +601,12 @@ extern DECLSPEC int SDLCALL SDL_SetRenderDrawBlendMode(SDL_Renderer * renderer, /** * \brief Get the blend mode used for drawing operations. - * + * * \param renderer The renderer from which blend mode should be queried. * \param blendMode A pointer filled in with the current blend mode. - * + * * \return 0 on success, or -1 on error - * + * * \sa SDL_SetRenderDrawBlendMode() */ extern DECLSPEC int SDLCALL SDL_GetRenderDrawBlendMode(SDL_Renderer * renderer, @@ -625,11 +623,11 @@ extern DECLSPEC int SDLCALL SDL_RenderClear(SDL_Renderer * renderer); /** * \brief Draw a point on the current rendering target. - * + * * \param renderer The renderer which should draw a point. * \param x The x coordinate of the point. * \param y The y coordinate of the point. - * + * * \return 0 on success, or -1 on error */ extern DECLSPEC int SDLCALL SDL_RenderDrawPoint(SDL_Renderer * renderer, @@ -637,11 +635,11 @@ extern DECLSPEC int SDLCALL SDL_RenderDrawPoint(SDL_Renderer * renderer, /** * \brief Draw multiple points on the current rendering target. - * + * * \param renderer The renderer which should draw multiple points. * \param points The points to draw * \param count The number of points to draw - * + * * \return 0 on success, or -1 on error */ extern DECLSPEC int SDLCALL SDL_RenderDrawPoints(SDL_Renderer * renderer, @@ -650,13 +648,13 @@ extern DECLSPEC int SDLCALL SDL_RenderDrawPoints(SDL_Renderer * renderer, /** * \brief Draw a line on the current rendering target. - * + * * \param renderer The renderer which should draw a line. * \param x1 The x coordinate of the start point. * \param y1 The y coordinate of the start point. * \param x2 The x coordinate of the end point. * \param y2 The y coordinate of the end point. - * + * * \return 0 on success, or -1 on error */ extern DECLSPEC int SDLCALL SDL_RenderDrawLine(SDL_Renderer * renderer, @@ -664,11 +662,11 @@ extern DECLSPEC int SDLCALL SDL_RenderDrawLine(SDL_Renderer * renderer, /** * \brief Draw a series of connected lines on the current rendering target. - * + * * \param renderer The renderer which should draw multiple lines. * \param points The points along the lines * \param count The number of points, drawing count-1 lines - * + * * \return 0 on success, or -1 on error */ extern DECLSPEC int SDLCALL SDL_RenderDrawLines(SDL_Renderer * renderer, @@ -677,10 +675,10 @@ extern DECLSPEC int SDLCALL SDL_RenderDrawLines(SDL_Renderer * renderer, /** * \brief Draw a rectangle on the current rendering target. - * + * * \param renderer The renderer which should draw a rectangle. * \param rect A pointer to the destination rectangle, or NULL to outline the entire rendering target. - * + * * \return 0 on success, or -1 on error */ extern DECLSPEC int SDLCALL SDL_RenderDrawRect(SDL_Renderer * renderer, @@ -688,11 +686,11 @@ extern DECLSPEC int SDLCALL SDL_RenderDrawRect(SDL_Renderer * renderer, /** * \brief Draw some number of rectangles on the current rendering target. - * + * * \param renderer The renderer which should draw multiple rectangles. * \param rects A pointer to an array of destination rectangles. * \param count The number of rectangles. - * + * * \return 0 on success, or -1 on error */ extern DECLSPEC int SDLCALL SDL_RenderDrawRects(SDL_Renderer * renderer, @@ -701,11 +699,11 @@ extern DECLSPEC int SDLCALL SDL_RenderDrawRects(SDL_Renderer * renderer, /** * \brief Fill a rectangle on the current rendering target with the drawing color. - * + * * \param renderer The renderer which should fill a rectangle. - * \param rect A pointer to the destination rectangle, or NULL for the entire + * \param rect A pointer to the destination rectangle, or NULL for the entire * rendering target. - * + * * \return 0 on success, or -1 on error */ extern DECLSPEC int SDLCALL SDL_RenderFillRect(SDL_Renderer * renderer, @@ -713,11 +711,11 @@ extern DECLSPEC int SDLCALL SDL_RenderFillRect(SDL_Renderer * renderer, /** * \brief Fill some number of rectangles on the current rendering target with the drawing color. - * + * * \param renderer The renderer which should fill multiple rectangles. * \param rects A pointer to an array of destination rectangles. * \param count The number of rectangles. - * + * * \return 0 on success, or -1 on error */ extern DECLSPEC int SDLCALL SDL_RenderFillRects(SDL_Renderer * renderer, @@ -726,14 +724,14 @@ extern DECLSPEC int SDLCALL SDL_RenderFillRects(SDL_Renderer * renderer, /** * \brief Copy a portion of the texture to the current rendering target. - * + * * \param renderer The renderer which should copy parts of a texture. * \param texture The source texture. - * \param srcrect A pointer to the source rectangle, or NULL for the entire + * \param srcrect A pointer to the source rectangle, or NULL for the entire * texture. - * \param dstrect A pointer to the destination rectangle, or NULL for the + * \param dstrect A pointer to the destination rectangle, or NULL for the * entire rendering target. - * + * * \return 0 on success, or -1 on error */ extern DECLSPEC int SDLCALL SDL_RenderCopy(SDL_Renderer * renderer, @@ -742,7 +740,7 @@ extern DECLSPEC int SDLCALL SDL_RenderCopy(SDL_Renderer * renderer, const SDL_Rect * dstrect); /** - * \brief Copy a portion of the source texture to the current rendering target, rotating it by angle around the given center + * \brief Copy a portion of the source texture to the current rendering target, rotating it by angle around the given center * * \param renderer The renderer which should copy parts of a texture. * \param texture The source texture. @@ -753,7 +751,7 @@ extern DECLSPEC int SDLCALL SDL_RenderCopy(SDL_Renderer * renderer, * \param angle An angle in degrees that indicates the rotation that will be applied to dstrect * \param center A pointer to a point indicating the point around which dstrect will be rotated (if NULL, rotation will be done aroud dstrect.w/2, dstrect.h/2) * \param flip An SDL_RendererFlip value stating which flipping actions should be performed on the texture - * + * * \return 0 on success, or -1 on error */ extern DECLSPEC int SDLCALL SDL_RenderCopyEx(SDL_Renderer * renderer, @@ -766,17 +764,17 @@ extern DECLSPEC int SDLCALL SDL_RenderCopyEx(SDL_Renderer * renderer, /** * \brief Read pixels from the current rendering target. - * + * * \param renderer The renderer from which pixels should be read. - * \param rect A pointer to the rectangle to read, or NULL for the entire + * \param rect A pointer to the rectangle to read, or NULL for the entire * render target. * \param format The desired format of the pixel data, or 0 to use the format * of the rendering target * \param pixels A pointer to be filled in with the pixel data * \param pitch The pitch of the pixels parameter. - * + * * \return 0 on success, or -1 if pixel reading is not supported. - * + * * \warning This is a very slow operation, and should not be used frequently. */ extern DECLSPEC int SDLCALL SDL_RenderReadPixels(SDL_Renderer * renderer, @@ -791,7 +789,7 @@ extern DECLSPEC void SDLCALL SDL_RenderPresent(SDL_Renderer * renderer); /** * \brief Destroy the specified texture. - * + * * \sa SDL_CreateTexture() * \sa SDL_CreateTextureFromSurface() */ @@ -800,7 +798,7 @@ extern DECLSPEC void SDLCALL SDL_DestroyTexture(SDL_Texture * texture); /** * \brief Destroy the rendering context for a window and free associated * textures. - * + * * \sa SDL_CreateRenderer() */ extern DECLSPEC void SDLCALL SDL_DestroyRenderer(SDL_Renderer * renderer); @@ -830,9 +828,7 @@ extern DECLSPEC int SDLCALL SDL_GL_UnbindTexture(SDL_Texture *texture); /* Ends C function definitions when using C++ */ #ifdef __cplusplus -/* *INDENT-OFF* */ } -/* *INDENT-ON* */ #endif #include "close_code.h" diff --git a/include/SDL_rwops.h b/include/SDL_rwops.h index 3ad1ae4b8..0461ff782 100644 --- a/include/SDL_rwops.h +++ b/include/SDL_rwops.h @@ -21,7 +21,7 @@ /** * \file SDL_rwops.h - * + * * This file provides a general interface for SDL to read and write * data streams. It can easily be extended to files, memory, etc. */ @@ -35,18 +35,16 @@ #include "begin_code.h" /* Set up for C function definitions, even when using C++ */ #ifdef __cplusplus -/* *INDENT-OFF* */ extern "C" { -/* *INDENT-ON* */ #endif /* RWops Types */ -#define SDL_RWOPS_UNKNOWN 0 /* Unknown stream type */ -#define SDL_RWOPS_WINFILE 1 /* Win32 file */ -#define SDL_RWOPS_STDFILE 2 /* Stdio file */ -#define SDL_RWOPS_JNIFILE 3 /* Android asset */ -#define SDL_RWOPS_MEMORY 4 /* Memory stream */ -#define SDL_RWOPS_MEMORY_RO 5 /* Read-Only memory stream */ +#define SDL_RWOPS_UNKNOWN 0 /* Unknown stream type */ +#define SDL_RWOPS_WINFILE 1 /* Win32 file */ +#define SDL_RWOPS_STDFILE 2 /* Stdio file */ +#define SDL_RWOPS_JNIFILE 3 /* Android asset */ +#define SDL_RWOPS_MEMORY 4 /* Memory stream */ +#define SDL_RWOPS_MEMORY_RO 5 /* Read-Only memory stream */ /** * This is the read/write operation structure -- very basic. @@ -61,7 +59,7 @@ typedef struct SDL_RWops /** * Seek to \c offset relative to \c whence, one of stdio's whence values: * RW_SEEK_SET, RW_SEEK_CUR, RW_SEEK_END - * + * * \return the final offset in the data stream, or -1 on error. */ Sint64 (SDLCALL * seek) (struct SDL_RWops * context, Sint64 offset, @@ -70,7 +68,7 @@ typedef struct SDL_RWops /** * Read up to \c maxnum objects each of size \c size from the data * stream to the area pointed at by \c ptr. - * + * * \return the number of objects read, or 0 at error or end of file. */ size_t (SDLCALL * read) (struct SDL_RWops * context, void *ptr, @@ -79,7 +77,7 @@ typedef struct SDL_RWops /** * Write exactly \c num objects each of size \c size from the area * pointed at by \c ptr to data stream. - * + * * \return the number of objects written, or 0 at error or end of file. */ size_t (SDLCALL * write) (struct SDL_RWops * context, const void *ptr, @@ -87,7 +85,7 @@ typedef struct SDL_RWops /** * Close and free an allocated SDL_RWops structure. - * + * * \return 0 if successful or -1 on write error when flushing data. */ int (SDLCALL * close) (struct SDL_RWops * context); @@ -147,7 +145,7 @@ typedef struct SDL_RWops /** * \name RWFrom functions - * + * * Functions to create SDL_RWops structures from various data streams. */ /*@{*/ @@ -173,28 +171,28 @@ extern DECLSPEC SDL_RWops *SDLCALL SDL_RWFromConstMem(const void *mem, extern DECLSPEC SDL_RWops *SDLCALL SDL_AllocRW(void); extern DECLSPEC void SDLCALL SDL_FreeRW(SDL_RWops * area); -#define RW_SEEK_SET 0 /**< Seek from the beginning of data */ -#define RW_SEEK_CUR 1 /**< Seek relative to current read point */ -#define RW_SEEK_END 2 /**< Seek relative to the end of data */ +#define RW_SEEK_SET 0 /**< Seek from the beginning of data */ +#define RW_SEEK_CUR 1 /**< Seek relative to current read point */ +#define RW_SEEK_END 2 /**< Seek relative to the end of data */ /** * \name Read/write macros - * + * * Macros to easily read and write from an SDL_RWops structure. */ /*@{*/ -#define SDL_RWsize(ctx) (ctx)->size(ctx) -#define SDL_RWseek(ctx, offset, whence) (ctx)->seek(ctx, offset, whence) -#define SDL_RWtell(ctx) (ctx)->seek(ctx, 0, RW_SEEK_CUR) -#define SDL_RWread(ctx, ptr, size, n) (ctx)->read(ctx, ptr, size, n) -#define SDL_RWwrite(ctx, ptr, size, n) (ctx)->write(ctx, ptr, size, n) -#define SDL_RWclose(ctx) (ctx)->close(ctx) +#define SDL_RWsize(ctx) (ctx)->size(ctx) +#define SDL_RWseek(ctx, offset, whence) (ctx)->seek(ctx, offset, whence) +#define SDL_RWtell(ctx) (ctx)->seek(ctx, 0, RW_SEEK_CUR) +#define SDL_RWread(ctx, ptr, size, n) (ctx)->read(ctx, ptr, size, n) +#define SDL_RWwrite(ctx, ptr, size, n) (ctx)->write(ctx, ptr, size, n) +#define SDL_RWclose(ctx) (ctx)->close(ctx) /*@}*//*Read/write macros*/ -/** +/** * \name Read endian functions - * + * * Read an item of the specified endianness and return in native format. */ /*@{*/ @@ -207,9 +205,9 @@ extern DECLSPEC Uint64 SDLCALL SDL_ReadLE64(SDL_RWops * src); extern DECLSPEC Uint64 SDLCALL SDL_ReadBE64(SDL_RWops * src); /*@}*//*Read endian functions*/ -/** +/** * \name Write endian functions - * + * * Write an item of native format to the specified endianness. */ /*@{*/ @@ -225,9 +223,7 @@ extern DECLSPEC size_t SDLCALL SDL_WriteBE64(SDL_RWops * dst, Uint64 value); /* Ends C function definitions when using C++ */ #ifdef __cplusplus -/* *INDENT-OFF* */ } -/* *INDENT-ON* */ #endif #include "close_code.h" diff --git a/include/SDL_scancode.h b/include/SDL_scancode.h index 26b8f36b5..d3f874811 100644 --- a/include/SDL_scancode.h +++ b/include/SDL_scancode.h @@ -21,7 +21,7 @@ /** * \file SDL_scancode.h - * + * * Defines keyboard scancodes. */ @@ -32,11 +32,11 @@ /** * \brief The SDL keyboard scancode representation. - * + * * Values of this type are used to represent keyboard keys, among other places * in the \link SDL_Keysym::scancode key.keysym.scancode \endlink field of the * SDL_Event structure. - * + * * The values in this enumeration are based on the USB usage page standard: * http://www.usb.org/developers/devclass_docs/Hut1_12v2.pdf */ @@ -44,9 +44,9 @@ typedef enum { SDL_SCANCODE_UNKNOWN = 0, - /** + /** * \name Usage page 0x07 - * + * * These values are from usage page 0x07 (USB keyboard page). */ /*@{*/ @@ -99,49 +99,49 @@ typedef enum SDL_SCANCODE_EQUALS = 46, SDL_SCANCODE_LEFTBRACKET = 47, SDL_SCANCODE_RIGHTBRACKET = 48, - SDL_SCANCODE_BACKSLASH = 49, /**< Located at the lower left of the return - * key on ISO keyboards and at the right end - * of the QWERTY row on ANSI keyboards. - * Produces REVERSE SOLIDUS (backslash) and - * VERTICAL LINE in a US layout, REVERSE - * SOLIDUS and VERTICAL LINE in a UK Mac - * layout, NUMBER SIGN and TILDE in a UK + SDL_SCANCODE_BACKSLASH = 49, /**< Located at the lower left of the return + * key on ISO keyboards and at the right end + * of the QWERTY row on ANSI keyboards. + * Produces REVERSE SOLIDUS (backslash) and + * VERTICAL LINE in a US layout, REVERSE + * SOLIDUS and VERTICAL LINE in a UK Mac + * layout, NUMBER SIGN and TILDE in a UK * Windows layout, DOLLAR SIGN and POUND SIGN - * in a Swiss German layout, NUMBER SIGN and - * APOSTROPHE in a German layout, GRAVE - * ACCENT and POUND SIGN in a French Mac - * layout, and ASTERISK and MICRO SIGN in a + * in a Swiss German layout, NUMBER SIGN and + * APOSTROPHE in a German layout, GRAVE + * ACCENT and POUND SIGN in a French Mac + * layout, and ASTERISK and MICRO SIGN in a * French Windows layout. */ - SDL_SCANCODE_NONUSHASH = 50, /**< ISO USB keyboards actually use this code - * instead of 49 for the same key, but all - * OSes I've seen treat the two codes + SDL_SCANCODE_NONUSHASH = 50, /**< ISO USB keyboards actually use this code + * instead of 49 for the same key, but all + * OSes I've seen treat the two codes * identically. So, as an implementor, unless - * your keyboard generates both of those + * your keyboard generates both of those * codes and your OS treats them differently, * you should generate SDL_SCANCODE_BACKSLASH - * instead of this code. As a user, you - * should not rely on this code because SDL - * will never generate it with most (all?) - * keyboards. + * instead of this code. As a user, you + * should not rely on this code because SDL + * will never generate it with most (all?) + * keyboards. */ SDL_SCANCODE_SEMICOLON = 51, SDL_SCANCODE_APOSTROPHE = 52, - SDL_SCANCODE_GRAVE = 53, /**< Located in the top left corner (on both ANSI - * and ISO keyboards). Produces GRAVE ACCENT and - * TILDE in a US Windows layout and in US and UK - * Mac layouts on ANSI keyboards, GRAVE ACCENT - * and NOT SIGN in a UK Windows layout, SECTION - * SIGN and PLUS-MINUS SIGN in US and UK Mac - * layouts on ISO keyboards, SECTION SIGN and - * DEGREE SIGN in a Swiss German layout (Mac: - * only on ISO keyboards), CIRCUMFLEX ACCENT and - * DEGREE SIGN in a German layout (Mac: only on + SDL_SCANCODE_GRAVE = 53, /**< Located in the top left corner (on both ANSI + * and ISO keyboards). Produces GRAVE ACCENT and + * TILDE in a US Windows layout and in US and UK + * Mac layouts on ANSI keyboards, GRAVE ACCENT + * and NOT SIGN in a UK Windows layout, SECTION + * SIGN and PLUS-MINUS SIGN in US and UK Mac + * layouts on ISO keyboards, SECTION SIGN and + * DEGREE SIGN in a Swiss German layout (Mac: + * only on ISO keyboards), CIRCUMFLEX ACCENT and + * DEGREE SIGN in a German layout (Mac: only on * ISO keyboards), SUPERSCRIPT TWO and TILDE in a - * French Windows layout, COMMERCIAL AT and - * NUMBER SIGN in a French Mac layout on ISO + * French Windows layout, COMMERCIAL AT and + * NUMBER SIGN in a French Mac layout on ISO * keyboards, and LESS-THAN SIGN and GREATER-THAN - * SIGN in a Swiss German, German, or French Mac + * SIGN in a Swiss German, German, or French Mac * layout on ANSI keyboards. */ SDL_SCANCODE_COMMA = 54, @@ -178,7 +178,7 @@ typedef enum SDL_SCANCODE_DOWN = 81, SDL_SCANCODE_UP = 82, - SDL_SCANCODE_NUMLOCKCLEAR = 83, /**< num lock on PC, clear on Mac keyboards + SDL_SCANCODE_NUMLOCKCLEAR = 83, /**< num lock on PC, clear on Mac keyboards */ SDL_SCANCODE_KP_DIVIDE = 84, SDL_SCANCODE_KP_MULTIPLY = 85, @@ -197,19 +197,19 @@ typedef enum SDL_SCANCODE_KP_0 = 98, SDL_SCANCODE_KP_PERIOD = 99, - SDL_SCANCODE_NONUSBACKSLASH = 100, /**< This is the additional key that ISO - * keyboards have over ANSI ones, - * located between left shift and Y. + SDL_SCANCODE_NONUSBACKSLASH = 100, /**< This is the additional key that ISO + * keyboards have over ANSI ones, + * located between left shift and Y. * Produces GRAVE ACCENT and TILDE in a * US or UK Mac layout, REVERSE SOLIDUS - * (backslash) and VERTICAL LINE in a - * US or UK Windows layout, and + * (backslash) and VERTICAL LINE in a + * US or UK Windows layout, and * LESS-THAN SIGN and GREATER-THAN SIGN * in a Swiss German, German, or French * layout. */ SDL_SCANCODE_APPLICATION = 101, /**< windows contextual menu, compose */ - SDL_SCANCODE_POWER = 102, /**< The USB document says this is a status flag, - * not a physical key - but some Mac keyboards + SDL_SCANCODE_POWER = 102, /**< The USB document says this is a status flag, + * not a physical key - but some Mac keyboards * do have a power key. */ SDL_SCANCODE_KP_EQUALS = 103, SDL_SCANCODE_F13 = 104, @@ -245,7 +245,7 @@ typedef enum SDL_SCANCODE_KP_COMMA = 133, SDL_SCANCODE_KP_EQUALSAS400 = 134, - SDL_SCANCODE_INTERNATIONAL1 = 135, /**< used on Asian keyboards, see + SDL_SCANCODE_INTERNATIONAL1 = 135, /**< used on Asian keyboards, see footnotes in USB doc */ SDL_SCANCODE_INTERNATIONAL2 = 136, SDL_SCANCODE_INTERNATIONAL3 = 137, /**< Yen */ @@ -334,16 +334,16 @@ typedef enum SDL_SCANCODE_RALT = 230, /**< alt gr, option */ SDL_SCANCODE_RGUI = 231, /**< windows, command (apple), meta */ - SDL_SCANCODE_MODE = 257, /**< I'm not sure if this is really not covered - * by any of the above, but since there's a + SDL_SCANCODE_MODE = 257, /**< I'm not sure if this is really not covered + * by any of the above, but since there's a * special KMOD_MODE for it I'm adding it here */ - + /*@}*//*Usage page 0x07*/ /** * \name Usage page 0x0C - * + * * These values are mapped from usage page 0x0C (USB consumer page). */ /*@{*/ @@ -365,34 +365,34 @@ typedef enum SDL_SCANCODE_AC_STOP = 272, SDL_SCANCODE_AC_REFRESH = 273, SDL_SCANCODE_AC_BOOKMARKS = 274, - + /*@}*//*Usage page 0x0C*/ /** * \name Walther keys - * + * * These are values that Christian Walther added (for mac keyboard?). */ /*@{*/ SDL_SCANCODE_BRIGHTNESSDOWN = 275, SDL_SCANCODE_BRIGHTNESSUP = 276, - SDL_SCANCODE_DISPLAYSWITCH = 277, /**< display mirroring/dual display + SDL_SCANCODE_DISPLAYSWITCH = 277, /**< display mirroring/dual display switch, video mode switch */ SDL_SCANCODE_KBDILLUMTOGGLE = 278, SDL_SCANCODE_KBDILLUMDOWN = 279, SDL_SCANCODE_KBDILLUMUP = 280, SDL_SCANCODE_EJECT = 281, SDL_SCANCODE_SLEEP = 282, - - SDL_SCANCODE_APP1 = 283, - SDL_SCANCODE_APP2 = 284, + + SDL_SCANCODE_APP1 = 283, + SDL_SCANCODE_APP2 = 284, /*@}*//*Walther keys*/ /* Add any other keys here. */ - SDL_NUM_SCANCODES = 512 /**< not a key, just marks the number of scancodes + SDL_NUM_SCANCODES = 512 /**< not a key, just marks the number of scancodes for array bounds */ } SDL_Scancode; diff --git a/include/SDL_shape.h b/include/SDL_shape.h index bd3724241..8aee96c85 100644 --- a/include/SDL_shape.h +++ b/include/SDL_shape.h @@ -31,9 +31,7 @@ #include "begin_code.h" /* Set up for C function definitions, even when using C++ */ #ifdef __cplusplus -/* *INDENT-OFF* */ extern "C" { -/* *INDENT-ON* */ #endif /** \file SDL_shape.h @@ -47,28 +45,28 @@ extern "C" { /** * \brief Create a window that can be shaped with the specified position, dimensions, and flags. - * + * * \param title The title of the window, in UTF-8 encoding. - * \param x The x position of the window, ::SDL_WINDOWPOS_CENTERED, or + * \param x The x position of the window, ::SDL_WINDOWPOS_CENTERED, or * ::SDL_WINDOWPOS_UNDEFINED. - * \param y The y position of the window, ::SDL_WINDOWPOS_CENTERED, or + * \param y The y position of the window, ::SDL_WINDOWPOS_CENTERED, or * ::SDL_WINDOWPOS_UNDEFINED. * \param w The width of the window. * \param h The height of the window. - * \param flags The flags for the window, a mask of SDL_WINDOW_BORDERLESS with any of the following: + * \param flags The flags for the window, a mask of SDL_WINDOW_BORDERLESS with any of the following: * ::SDL_WINDOW_OPENGL, ::SDL_WINDOW_INPUT_GRABBED, * ::SDL_WINDOW_SHOWN, ::SDL_WINDOW_RESIZABLE, * ::SDL_WINDOW_MAXIMIZED, ::SDL_WINDOW_MINIMIZED, - * ::SDL_WINDOW_BORDERLESS is always set, and ::SDL_WINDOW_FULLSCREEN is always unset. - * + * ::SDL_WINDOW_BORDERLESS is always set, and ::SDL_WINDOW_FULLSCREEN is always unset. + * * \return The window created, or NULL if window creation failed. - * + * * \sa SDL_DestroyWindow() */ extern DECLSPEC SDL_Window * SDLCALL SDL_CreateShapedWindow(const char *title,unsigned int x,unsigned int y,unsigned int w,unsigned int h,Uint32 flags); /** - * \brief Return whether the given window is a shaped window. + * \brief Return whether the given window is a shaped window. * * \param window The window to query for being shaped. * @@ -79,31 +77,31 @@ extern DECLSPEC SDL_bool SDLCALL SDL_IsShapedWindow(const SDL_Window *window); /** \brief An enum denoting the specific type of contents present in an SDL_WindowShapeParams union. */ typedef enum { - /** \brief The default mode, a binarized alpha cutoff of 1. */ - ShapeModeDefault, - /** \brief A binarized alpha cutoff with a given integer value. */ - ShapeModeBinarizeAlpha, - /** \brief A binarized alpha cutoff with a given integer value, but with the opposite comparison. */ - ShapeModeReverseBinarizeAlpha, - /** \brief A color key is applied. */ - ShapeModeColorKey + /** \brief The default mode, a binarized alpha cutoff of 1. */ + ShapeModeDefault, + /** \brief A binarized alpha cutoff with a given integer value. */ + ShapeModeBinarizeAlpha, + /** \brief A binarized alpha cutoff with a given integer value, but with the opposite comparison. */ + ShapeModeReverseBinarizeAlpha, + /** \brief A color key is applied. */ + ShapeModeColorKey } WindowShapeMode; #define SDL_SHAPEMODEALPHA(mode) (mode == ShapeModeDefault || mode == ShapeModeBinarizeAlpha || mode == ShapeModeReverseBinarizeAlpha) /** \brief A union containing parameters for shaped windows. */ typedef union { - /** \brief a cutoff alpha value for binarization of the window shape's alpha channel. */ - Uint8 binarizationCutoff; - SDL_Color colorKey; + /** \brief a cutoff alpha value for binarization of the window shape's alpha channel. */ + Uint8 binarizationCutoff; + SDL_Color colorKey; } SDL_WindowShapeParams; /** \brief A struct that tags the SDL_WindowShapeParams union with an enum describing the type of its contents. */ typedef struct SDL_WindowShapeMode { - /** \brief The mode of these window-shape parameters. */ - WindowShapeMode mode; - /** \brief Window-shape parameters. */ - SDL_WindowShapeParams parameters; + /** \brief The mode of these window-shape parameters. */ + WindowShapeMode mode; + /** \brief Window-shape parameters. */ + SDL_WindowShapeParams parameters; } SDL_WindowShapeMode; /** @@ -138,9 +136,7 @@ extern DECLSPEC int SDLCALL SDL_GetShapedWindowMode(SDL_Window *window,SDL_Windo /* Ends C function definitions when using C++ */ #ifdef __cplusplus -/* *INDENT-OFF* */ } -/* *INDENT-ON* */ #endif #include "close_code.h" diff --git a/include/SDL_stdinc.h b/include/SDL_stdinc.h index b1ce99390..a53044517 100644 --- a/include/SDL_stdinc.h +++ b/include/SDL_stdinc.h @@ -21,7 +21,7 @@ /** * \file SDL_stdinc.h - * + * * This is a general header that includes C language support. */ @@ -80,12 +80,12 @@ /** * The number of elements in an array. */ -#define SDL_arraysize(array) (sizeof(array)/sizeof(array[0])) -#define SDL_TABLESIZE(table) SDL_arraysize(table) +#define SDL_arraysize(array) (sizeof(array)/sizeof(array[0])) +#define SDL_TABLESIZE(table) SDL_arraysize(table) /** * \name Cast operators - * + * * Use proper C++ casts when compiled as C++ to be compatible with the option * -Wold-style-cast of GCC (and -Werror=old-style-cast in GCC 4.2 and above). */ @@ -179,7 +179,7 @@ SDL_COMPILE_TIME_ASSERT(sint64, sizeof(Sint64) == 8); /** \cond */ #ifndef DOXYGEN_SHOULD_IGNORE_THIS -#if !defined(__ANDROID__) +#if !defined(__ANDROID__) /* TODO: include/SDL_stdinc.h:174: error: size of array 'SDL_dummy_enum' is negative */ typedef enum { @@ -194,9 +194,7 @@ SDL_COMPILE_TIME_ASSERT(enum, sizeof(SDL_DUMMY_ENUM) == sizeof(int)); #include "begin_code.h" /* Set up for C function definitions, even when using C++ */ #ifdef __cplusplus -/* *INDENT-OFF* */ extern "C" { -/* *INDENT-ON* */ #endif #if defined(HAVE_ALLOCA) && !defined(alloca) @@ -758,10 +756,10 @@ SDL_FORCE_INLINE double SDL_sqrt_inline(double x) { return sqrt(x); } #endif /* The SDL implementation of iconv() returns these error codes */ -#define SDL_ICONV_ERROR (size_t)-1 -#define SDL_ICONV_E2BIG (size_t)-2 -#define SDL_ICONV_EILSEQ (size_t)-3 -#define SDL_ICONV_EINVAL (size_t)-4 +#define SDL_ICONV_ERROR (size_t)-1 +#define SDL_ICONV_E2BIG (size_t)-2 +#define SDL_ICONV_EILSEQ (size_t)-3 +#define SDL_ICONV_EINVAL (size_t)-4 /* SDL_iconv_* are now always real symbols/types, not macros or inlined. */ typedef struct _SDL_iconv_t *SDL_iconv_t; @@ -779,15 +777,13 @@ extern DECLSPEC char *SDLCALL SDL_iconv_string(const char *tocode, const char *fromcode, const char *inbuf, size_t inbytesleft); -#define SDL_iconv_utf8_locale(S) SDL_iconv_string("", "UTF-8", S, SDL_strlen(S)+1) -#define SDL_iconv_utf8_ucs2(S) (Uint16 *)SDL_iconv_string("UCS-2-INTERNAL", "UTF-8", S, SDL_strlen(S)+1) -#define SDL_iconv_utf8_ucs4(S) (Uint32 *)SDL_iconv_string("UCS-4-INTERNAL", "UTF-8", S, SDL_strlen(S)+1) +#define SDL_iconv_utf8_locale(S) SDL_iconv_string("", "UTF-8", S, SDL_strlen(S)+1) +#define SDL_iconv_utf8_ucs2(S) (Uint16 *)SDL_iconv_string("UCS-2-INTERNAL", "UTF-8", S, SDL_strlen(S)+1) +#define SDL_iconv_utf8_ucs4(S) (Uint32 *)SDL_iconv_string("UCS-4-INTERNAL", "UTF-8", S, SDL_strlen(S)+1) /* Ends C function definitions when using C++ */ #ifdef __cplusplus -/* *INDENT-OFF* */ } -/* *INDENT-ON* */ #endif #include "close_code.h" diff --git a/include/SDL_surface.h b/include/SDL_surface.h index a066b885c..4ebeadd8f 100644 --- a/include/SDL_surface.h +++ b/include/SDL_surface.h @@ -21,7 +21,7 @@ /** * \file SDL_surface.h - * + * * Header file for ::SDL_surface definition and management functions. */ @@ -37,16 +37,14 @@ #include "begin_code.h" /* Set up for C function definitions, even when using C++ */ #ifdef __cplusplus -/* *INDENT-OFF* */ extern "C" { -/* *INDENT-ON* */ #endif /** * \name Surface flags - * + * * These are the currently supported flags for the ::SDL_surface. - * + * * \internal * Used internally (read-only). */ @@ -60,7 +58,7 @@ extern "C" { /** * Evaluates to true if the surface needs to be locked before access. */ -#define SDL_MUSTLOCK(S) (((S)->flags & SDL_RLEACCEL) != 0) +#define SDL_MUSTLOCK(S) (((S)->flags & SDL_RLEACCEL) != 0) /** * \brief A collection of pixels used in software blitting. @@ -101,13 +99,13 @@ typedef int (*SDL_blit) (struct SDL_Surface * src, SDL_Rect * srcrect, /** * Allocate and free an RGB surface. - * + * * If the depth is 4 or 8 bits, an empty palette is allocated for the surface. * If the depth is greater than 8 bits, the pixel format is set using the * flags '[RGB]mask'. - * + * * If the function runs out of memory, it will return NULL. - * + * * \param flags The \c flags are obsolete and should be set to 0. * \param width The width in pixels of the surface to create. * \param height The height in pixels of the surface to create. @@ -133,9 +131,9 @@ extern DECLSPEC void SDLCALL SDL_FreeSurface(SDL_Surface * surface); /** * \brief Set the palette used by a surface. - * + * * \return 0, or -1 if the surface format doesn't use a palette. - * + * * \note A single palette can be shared with many surfaces. */ extern DECLSPEC int SDLCALL SDL_SetSurfacePalette(SDL_Surface * surface, @@ -143,21 +141,21 @@ extern DECLSPEC int SDLCALL SDL_SetSurfacePalette(SDL_Surface * surface, /** * \brief Sets up a surface for directly accessing the pixels. - * + * * Between calls to SDL_LockSurface() / SDL_UnlockSurface(), you can write - * to and read from \c surface->pixels, using the pixel format stored in - * \c surface->format. Once you are done accessing the surface, you should + * to and read from \c surface->pixels, using the pixel format stored in + * \c surface->format. Once you are done accessing the surface, you should * use SDL_UnlockSurface() to release it. - * + * * Not all surfaces require locking. If SDL_MUSTLOCK(surface) evaluates * to 0, then you can read and write to the surface at any time, and the * pixel format of the surface will not change. - * + * * No operating system or library calls should be made between lock/unlock * pairs, as critical system locks may be held during this time. - * + * * SDL_LockSurface() returns 0, or -1 if the surface couldn't be locked. - * + * * \sa SDL_UnlockSurface() */ extern DECLSPEC int SDLCALL SDL_LockSurface(SDL_Surface * surface); @@ -166,11 +164,11 @@ extern DECLSPEC void SDLCALL SDL_UnlockSurface(SDL_Surface * surface); /** * Load a surface from a seekable SDL data stream (memory or file). - * + * * If \c freesrc is non-zero, the stream will be closed after being read. - * + * * The new surface should be freed with SDL_FreeSurface(). - * + * * \return the new surface, or NULL if there was an error. */ extern DECLSPEC SDL_Surface *SDLCALL SDL_LoadBMP_RW(SDL_RWops * src, @@ -178,34 +176,34 @@ extern DECLSPEC SDL_Surface *SDLCALL SDL_LoadBMP_RW(SDL_RWops * src, /** * Load a surface from a file. - * + * * Convenience macro. */ -#define SDL_LoadBMP(file) SDL_LoadBMP_RW(SDL_RWFromFile(file, "rb"), 1) +#define SDL_LoadBMP(file) SDL_LoadBMP_RW(SDL_RWFromFile(file, "rb"), 1) /** * Save a surface to a seekable SDL data stream (memory or file). - * + * * If \c freedst is non-zero, the stream will be closed after being written. - * + * * \return 0 if successful or -1 if there was an error. */ extern DECLSPEC int SDLCALL SDL_SaveBMP_RW (SDL_Surface * surface, SDL_RWops * dst, int freedst); -/** +/** * Save a surface to a file. - * + * * Convenience macro. */ #define SDL_SaveBMP(surface, file) \ - SDL_SaveBMP_RW(surface, SDL_RWFromFile(file, "wb"), 1) + SDL_SaveBMP_RW(surface, SDL_RWFromFile(file, "wb"), 1) /** * \brief Sets the RLE acceleration hint for a surface. - * + * * \return 0 on success, or -1 if the surface is not valid - * + * * \note If RLE is enabled, colorkey and alpha blending blits are much faster, * but the surface must be locked before directly accessing the pixels. */ @@ -214,11 +212,11 @@ extern DECLSPEC int SDLCALL SDL_SetSurfaceRLE(SDL_Surface * surface, /** * \brief Sets the color key (transparent pixel) in a blittable surface. - * + * * \param surface The surface to update * \param flag Non-zero to enable colorkey and 0 to disable colorkey * \param key The transparent pixel in the native surface format - * + * * \return 0 on success, or -1 if the surface is not valid * * You can pass SDL_RLEACCEL to enable RLE accelerated blits. @@ -228,12 +226,12 @@ extern DECLSPEC int SDLCALL SDL_SetColorKey(SDL_Surface * surface, /** * \brief Gets the color key (transparent pixel) in a blittable surface. - * + * * \param surface The surface to update - * \param key A pointer filled in with the transparent pixel in the native + * \param key A pointer filled in with the transparent pixel in the native * surface format - * - * \return 0 on success, or -1 if the surface is not valid or colorkey is not + * + * \return 0 on success, or -1 if the surface is not valid or colorkey is not * enabled. */ extern DECLSPEC int SDLCALL SDL_GetColorKey(SDL_Surface * surface, @@ -241,14 +239,14 @@ extern DECLSPEC int SDLCALL SDL_GetColorKey(SDL_Surface * surface, /** * \brief Set an additional color value used in blit operations. - * + * * \param surface The surface to update. * \param r The red color value multiplied into blit operations. * \param g The green color value multiplied into blit operations. * \param b The blue color value multiplied into blit operations. - * + * * \return 0 on success, or -1 if the surface is not valid. - * + * * \sa SDL_GetSurfaceColorMod() */ extern DECLSPEC int SDLCALL SDL_SetSurfaceColorMod(SDL_Surface * surface, @@ -257,14 +255,14 @@ extern DECLSPEC int SDLCALL SDL_SetSurfaceColorMod(SDL_Surface * surface, /** * \brief Get the additional color value used in blit operations. - * + * * \param surface The surface to query. * \param r A pointer filled in with the current red color value. * \param g A pointer filled in with the current green color value. * \param b A pointer filled in with the current blue color value. - * + * * \return 0 on success, or -1 if the surface is not valid. - * + * * \sa SDL_SetSurfaceColorMod() */ extern DECLSPEC int SDLCALL SDL_GetSurfaceColorMod(SDL_Surface * surface, @@ -273,12 +271,12 @@ extern DECLSPEC int SDLCALL SDL_GetSurfaceColorMod(SDL_Surface * surface, /** * \brief Set an additional alpha value used in blit operations. - * + * * \param surface The surface to update. * \param alpha The alpha value multiplied into blit operations. - * + * * \return 0 on success, or -1 if the surface is not valid. - * + * * \sa SDL_GetSurfaceAlphaMod() */ extern DECLSPEC int SDLCALL SDL_SetSurfaceAlphaMod(SDL_Surface * surface, @@ -286,12 +284,12 @@ extern DECLSPEC int SDLCALL SDL_SetSurfaceAlphaMod(SDL_Surface * surface, /** * \brief Get the additional alpha value used in blit operations. - * + * * \param surface The surface to query. * \param alpha A pointer filled in with the current alpha value. - * + * * \return 0 on success, or -1 if the surface is not valid. - * + * * \sa SDL_SetSurfaceAlphaMod() */ extern DECLSPEC int SDLCALL SDL_GetSurfaceAlphaMod(SDL_Surface * surface, @@ -299,12 +297,12 @@ extern DECLSPEC int SDLCALL SDL_GetSurfaceAlphaMod(SDL_Surface * surface, /** * \brief Set the blend mode used for blit operations. - * + * * \param surface The surface to update. * \param blendMode ::SDL_BlendMode to use for blit blending. - * + * * \return 0 on success, or -1 if the parameters are not valid. - * + * * \sa SDL_GetSurfaceBlendMode() */ extern DECLSPEC int SDLCALL SDL_SetSurfaceBlendMode(SDL_Surface * surface, @@ -312,12 +310,12 @@ extern DECLSPEC int SDLCALL SDL_SetSurfaceBlendMode(SDL_Surface * surface, /** * \brief Get the blend mode used for blit operations. - * + * * \param surface The surface to query. * \param blendMode A pointer filled in with the current blend mode. - * + * * \return 0 on success, or -1 if the surface is not valid. - * + * * \sa SDL_SetSurfaceBlendMode() */ extern DECLSPEC int SDLCALL SDL_GetSurfaceBlendMode(SDL_Surface * surface, @@ -325,14 +323,14 @@ extern DECLSPEC int SDLCALL SDL_GetSurfaceBlendMode(SDL_Surface * surface, /** * Sets the clipping rectangle for the destination surface in a blit. - * + * * If the clip rectangle is NULL, clipping will be disabled. - * + * * If the clip rectangle doesn't intersect the surface, the function will * return SDL_FALSE and blits will be completely clipped. Otherwise the * function returns SDL_TRUE and blits to the surface will be clipped to * the intersection of the surface area and the clipping rectangle. - * + * * Note that blits are automatically clipped to the edges of the source * and destination surfaces. */ @@ -341,7 +339,7 @@ extern DECLSPEC SDL_bool SDLCALL SDL_SetClipRect(SDL_Surface * surface, /** * Gets the clipping rectangle for the destination surface in a blit. - * + * * \c rect must be a pointer to a valid rectangle which will be filled * with the correct values. */ @@ -349,11 +347,11 @@ extern DECLSPEC void SDLCALL SDL_GetClipRect(SDL_Surface * surface, SDL_Rect * rect); /** - * Creates a new surface of the specified format, and then copies and maps - * the given surface to it so the blit of the converted surface will be as + * Creates a new surface of the specified format, and then copies and maps + * the given surface to it so the blit of the converted surface will be as * fast as possible. If this function fails, it returns NULL. - * - * The \c flags parameter is passed to SDL_CreateRGBSurface() and has those + * + * The \c flags parameter is passed to SDL_CreateRGBSurface() and has those * semantics. You can also pass ::SDL_RLEACCEL in the flags parameter and * SDL will try to RLE accelerate colorkey and alpha blits in the resulting * surface. @@ -365,7 +363,7 @@ extern DECLSPEC SDL_Surface *SDLCALL SDL_ConvertSurfaceFormat /** * \brief Copy a block of pixels of one format to another format - * + * * \return 0 on success, or -1 if there was an error */ extern DECLSPEC int SDLCALL SDL_ConvertPixels(int width, int height, @@ -376,12 +374,12 @@ extern DECLSPEC int SDLCALL SDL_ConvertPixels(int width, int height, /** * Performs a fast fill of the given rectangle with \c color. - * + * * If \c rect is NULL, the whole surface will be filled with \c color. - * - * The color should be a pixel of the format used by the surface, and + * + * The color should be a pixel of the format used by the surface, and * can be generated by the SDL_MapRGB() function. - * + * * \return 0 on success, or -1 on error. */ extern DECLSPEC int SDLCALL SDL_FillRect @@ -391,12 +389,12 @@ extern DECLSPEC int SDLCALL SDL_FillRects /** * Performs a fast blit from the source surface to the destination surface. - * + * * This assumes that the source and destination rectangles are * the same size. If either \c srcrect or \c dstrect are NULL, the entire * surface (\c src or \c dst) is copied. The final blit rectangles are saved * in \c srcrect and \c dstrect after all clipping is performed. - * + * * \return If the blit is successful, it returns 0, otherwise it returns -1. * * The blit function should not be called on a locked surface. @@ -413,7 +411,7 @@ extern DECLSPEC int SDLCALL SDL_FillRects if SDL_SRCCOLORKEY set, only copy the pixels matching the RGB values of the source color key, ignoring alpha in the comparison. - + RGB->RGBA: SDL_SRCALPHA set: alpha-blend (using the source per-surface alpha value); @@ -423,7 +421,7 @@ extern DECLSPEC int SDLCALL SDL_FillRects both: if SDL_SRCCOLORKEY set, only copy the pixels matching the source color key. - + RGBA->RGBA: SDL_SRCALPHA set: alpha-blend (using the source alpha channel) the RGB values; @@ -434,8 +432,8 @@ extern DECLSPEC int SDLCALL SDL_FillRects if SDL_SRCCOLORKEY set, only copy the pixels matching the RGB values of the source color key, ignoring alpha in the comparison. - - RGB->RGB: + + RGB->RGB: SDL_SRCALPHA set: alpha-blend (using the source per-surface alpha value). SDL_SRCALPHA not set: @@ -444,7 +442,7 @@ extern DECLSPEC int SDLCALL SDL_FillRects if SDL_SRCCOLORKEY set, only copy the pixels matching the source color key. \endverbatim - * + * * You should call SDL_BlitSurface() unless you know exactly how SDL * blitting works internally and how to use the other blit functions. */ @@ -469,7 +467,7 @@ extern DECLSPEC int SDLCALL SDL_LowerBlit /** * \brief Perform a fast, low quality, stretch blit between two surfaces of the * same pixel format. - * + * * \note This function uses a static buffer, and is not thread-safe. */ extern DECLSPEC int SDLCALL SDL_SoftStretch(SDL_Surface * src, @@ -498,9 +496,7 @@ extern DECLSPEC int SDLCALL SDL_LowerBlitScaled /* Ends C function definitions when using C++ */ #ifdef __cplusplus -/* *INDENT-OFF* */ } -/* *INDENT-ON* */ #endif #include "close_code.h" diff --git a/include/SDL_system.h b/include/SDL_system.h index d5db78fd5..5a6126157 100644 --- a/include/SDL_system.h +++ b/include/SDL_system.h @@ -21,7 +21,7 @@ /** * \file SDL_system.h - * + * * Include file for platform specific SDL API functions */ @@ -38,9 +38,7 @@ #include "begin_code.h" /* Set up for C function definitions, even when using C++ */ #ifdef __cplusplus -/* *INDENT-OFF* */ extern "C" { -/* *INDENT-ON* */ #endif /* Platform specific functions for iOS */ @@ -98,9 +96,7 @@ extern DECLSPEC const char * SDLCALL SDL_AndroidGetExternalStoragePath(); /* Ends C function definitions when using C++ */ #ifdef __cplusplus -/* *INDENT-OFF* */ } -/* *INDENT-ON* */ #endif #include "close_code.h" diff --git a/include/SDL_syswm.h b/include/SDL_syswm.h index 786e12e5c..3ea026b44 100644 --- a/include/SDL_syswm.h +++ b/include/SDL_syswm.h @@ -21,7 +21,7 @@ /** * \file SDL_syswm.h - * + * * Include file for SDL custom system window manager hooks. */ @@ -36,14 +36,12 @@ #include "begin_code.h" /* Set up for C function definitions, even when using C++ */ #ifdef __cplusplus -/* *INDENT-OFF* */ extern "C" { -/* *INDENT-ON* */ #endif /** * \file SDL_syswm.h - * + * * Your application has access to a special type of event ::SDL_SYSWMEVENT, * which contains window-manager specific information and arrives whenever * an unhandled window event occurs. This event is ignored by default, but @@ -95,7 +93,7 @@ typedef struct _UIWindow UIWindow; #endif #endif -/** +/** * These are the various supported windowing subsystems */ typedef enum @@ -209,14 +207,14 @@ typedef struct SDL_SysWMinfo SDL_SysWMinfo; /* Function prototypes */ /** * \brief This function allows access to driver-dependent window information. - * + * * \param window The window about which information is being requested - * \param info This structure must be initialized with the SDL version, and is + * \param info This structure must be initialized with the SDL version, and is * then filled in with information about the given window. - * - * \return SDL_TRUE if the function is implemented and the version member of + * + * \return SDL_TRUE if the function is implemented and the version member of * the \c info struct is valid, SDL_FALSE otherwise. - * + * * You typically use this function like this: * \code * SDL_SysWMinfo info; @@ -230,9 +228,7 @@ extern DECLSPEC SDL_bool SDLCALL SDL_GetWindowWMInfo(SDL_Window * window, /* Ends C function definitions when using C++ */ #ifdef __cplusplus -/* *INDENT-OFF* */ } -/* *INDENT-ON* */ #endif #include "close_code.h" diff --git a/include/SDL_test.h b/include/SDL_test.h index 15e7689f0..7e0de0894 100644 --- a/include/SDL_test.h +++ b/include/SDL_test.h @@ -21,7 +21,7 @@ /** * \file SDL_test.h - * + * * Include file for SDL test framework. * * This code is a part of the SDL2_test library, not the main SDL library. @@ -46,24 +46,20 @@ #include "begin_code.h" /* Set up for C function definitions, even when using C++ */ #ifdef __cplusplus -/* *INDENT-OFF* */ extern "C" { -/* *INDENT-ON* */ #endif /* Global definitions */ -/* - * Note: Maximum size of SDLTest log message is less than SDLs limit - * to ensure we can fit additional information such as the timestamp. +/* + * Note: Maximum size of SDLTest log message is less than SDLs limit + * to ensure we can fit additional information such as the timestamp. */ -#define SDLTEST_MAX_LOGMESSAGE_LENGTH 3584 +#define SDLTEST_MAX_LOGMESSAGE_LENGTH 3584 /* Ends C function definitions when using C++ */ #ifdef __cplusplus -/* *INDENT-OFF* */ } -/* *INDENT-ON* */ #endif #include "close_code.h" diff --git a/include/SDL_test_assert.h b/include/SDL_test_assert.h index 17b6d26b6..beba16f5e 100644 --- a/include/SDL_test_assert.h +++ b/include/SDL_test_assert.h @@ -21,13 +21,13 @@ /** * \file SDL_test_assert.h - * + * * Include file for SDL test framework. * * This code is a part of the SDL2_test library, not the main SDL library. */ -/* +/* * * Assert API for test code and test cases * @@ -39,20 +39,18 @@ #include "begin_code.h" /* Set up for C function definitions, even when using C++ */ #ifdef __cplusplus -/* *INDENT-OFF* */ extern "C" { -/* *INDENT-ON* */ #endif /** * \brief Fails the assert. */ -#define ASSERT_FAIL 0 +#define ASSERT_FAIL 0 /** * \brief Passes the assert. */ -#define ASSERT_PASS 1 +#define ASSERT_PASS 1 /** * \brief Assert that logs and break execution flow on failures. @@ -98,9 +96,7 @@ void SDLTest_LogAssertSummary(); int SDLTest_AssertSummaryToTestResult(); #ifdef __cplusplus -/* *INDENT-OFF* */ } -/* *INDENT-ON* */ #endif #include "close_code.h" diff --git a/include/SDL_test_common.h b/include/SDL_test_common.h index 9e9122f1b..76ad87781 100644 --- a/include/SDL_test_common.h +++ b/include/SDL_test_common.h @@ -21,7 +21,7 @@ /** * \file SDL_test_common.h - * + * * Include file for SDL test framework. * * This code is a part of the SDL2_test library, not the main SDL library. @@ -109,9 +109,7 @@ typedef struct #include "begin_code.h" /* Set up for C function definitions, even when using C++ */ #ifdef __cplusplus -/* *INDENT-OFF* */ extern "C" { -/* *INDENT-ON* */ #endif /* Function prototypes */ @@ -175,9 +173,7 @@ void SDLTest_CommonQuit(SDLTest_CommonState * state); /* Ends C function definitions when using C++ */ #ifdef __cplusplus -/* *INDENT-OFF* */ } -/* *INDENT-ON* */ #endif #include "close_code.h" diff --git a/include/SDL_test_compare.h b/include/SDL_test_compare.h index e145f6908..98ca8ce81 100644 --- a/include/SDL_test_compare.h +++ b/include/SDL_test_compare.h @@ -21,16 +21,16 @@ /** * \file SDL_test_compare.h - * + * * Include file for SDL test framework. * * This code is a part of the SDL2_test library, not the main SDL library. */ -/* +/* Defines comparison functions (i.e. for surfaces). - + */ #ifndef _SDL_test_compare_h @@ -43,9 +43,7 @@ #include "begin_code.h" /* Set up for C function definitions, even when using C++ */ #ifdef __cplusplus -/* *INDENT-OFF* */ extern "C" { -/* *INDENT-ON* */ #endif /** @@ -58,13 +56,11 @@ extern "C" { * \returns 0 if comparison succeeded, >0 (=number of pixels where comparison failed) if comparison failed, -1 if any of the surfaces were NULL, -2 if the surface sizes differ. */ int SDLTest_CompareSurfaces(SDL_Surface *surface, SDL_Surface *referenceSurface, int allowable_error); - + /* Ends C function definitions when using C++ */ #ifdef __cplusplus -/* *INDENT-OFF* */ } -/* *INDENT-ON* */ #endif #include "close_code.h" diff --git a/include/SDL_test_crc32.h b/include/SDL_test_crc32.h index 0685a37f4..f0a84a48c 100644 --- a/include/SDL_test_crc32.h +++ b/include/SDL_test_crc32.h @@ -21,16 +21,16 @@ /** * \file SDL_test_crc32.h - * + * * Include file for SDL test framework. * * This code is a part of the SDL2_test library, not the main SDL library. */ -/* +/* Implements CRC32 calculations (default output is Perl String::CRC32 compatible). - + */ #ifndef _SDL_test_crc32_h @@ -39,9 +39,7 @@ #include "begin_code.h" /* Set up for C function definitions, even when using C++ */ #ifdef __cplusplus -/* *INDENT-OFF* */ extern "C" { -/* *INDENT-ON* */ #endif @@ -50,20 +48,20 @@ extern "C" { /* Definition shared by all CRC routines */ #ifndef CrcUint32 - #define CrcUint32 unsigned int + #define CrcUint32 unsigned int #endif #ifndef CrcUint8 - #define CrcUint8 unsigned char + #define CrcUint8 unsigned char #endif #ifdef ORIGINAL_METHOD - #define CRC32_POLY 0x04c11db7 /* AUTODIN II, Ethernet, & FDDI */ + #define CRC32_POLY 0x04c11db7 /* AUTODIN II, Ethernet, & FDDI */ #else #define CRC32_POLY 0xEDB88320 /* Perl String::CRC32 compatible */ #endif -/** - * Data structure for CRC32 (checksum) computation +/** + * Data structure for CRC32 (checksum) computation */ typedef struct { CrcUint32 crc32_table[256]; /* CRC table */ @@ -71,12 +69,12 @@ extern "C" { /* ---------- Function Prototypes ------------- */ -/** +/** * /brief Initialize the CRC context * * Note: The function initializes the crc table required for all crc calculations. * - * /param crcContext pointer to context variable + * /param crcContext pointer to context variable * * /returns 0 for OK, -1 on error * @@ -86,8 +84,8 @@ extern "C" { /** * /brief calculate a crc32 from a data block - * - * /param crcContext pointer to context variable + * + * /param crcContext pointer to context variable * /param inBuf input buffer to checksum * /param inLen length of input buffer * /param crc32 pointer to Uint32 to store the final CRC into @@ -106,7 +104,7 @@ int SDLTest_Crc32CalcBuffer(SDLTest_Crc32Context * crcContext, CrcUint8 *inBuf, /** * /brief clean up CRC context * - * /param crcContext pointer to context variable + * /param crcContext pointer to context variable * * /returns 0 for OK, -1 on error * @@ -117,9 +115,7 @@ int SDLTest_Crc32Done(SDLTest_Crc32Context * crcContext); /* Ends C function definitions when using C++ */ #ifdef __cplusplus -/* *INDENT-OFF* */ } -/* *INDENT-ON* */ #endif #include "close_code.h" diff --git a/include/SDL_test_font.h b/include/SDL_test_font.h index d894601f1..aa9286b4a 100644 --- a/include/SDL_test_font.h +++ b/include/SDL_test_font.h @@ -21,7 +21,7 @@ /** * \file SDL_test_font.h - * + * * Include file for SDL test framework. * * This code is a part of the SDL2_test library, not the main SDL library. @@ -33,9 +33,7 @@ #include "begin_code.h" /* Set up for C function definitions, even when using C++ */ #ifdef __cplusplus -/* *INDENT-OFF* */ extern "C" { -/* *INDENT-ON* */ #endif /* Function prototypes */ @@ -55,9 +53,7 @@ int SDLTest_DrawString(SDL_Renderer * renderer, int x, int y, const char *s); /* Ends C function definitions when using C++ */ #ifdef __cplusplus -/* *INDENT-OFF* */ } -/* *INDENT-ON* */ #endif #include "close_code.h" diff --git a/include/SDL_test_fuzzer.h b/include/SDL_test_fuzzer.h index db30a1dfb..a528ddc5e 100644 --- a/include/SDL_test_fuzzer.h +++ b/include/SDL_test_fuzzer.h @@ -21,16 +21,16 @@ /** * \file SDL_test_fuzzer.h - * + * * Include file for SDL test framework. * * This code is a part of the SDL2_test library, not the main SDL library. */ -/* +/* Data generators for fuzzing test data in a reproducible way. - + */ #ifndef _SDL_test_fuzzer_h @@ -39,9 +39,7 @@ #include "begin_code.h" /* Set up for C function definitions, even when using C++ */ #ifdef __cplusplus -/* *INDENT-OFF* */ extern "C" { -/* *INDENT-ON* */ #endif @@ -131,7 +129,7 @@ Sint64 SDLTest_RandomSint64(); float SDLTest_RandomUnitFloat(); /** - * \returns random double in range [0.0 - 1.0[ + * \returns random double in range [0.0 - 1.0[ */ double SDLTest_RandomUnitDouble(); @@ -333,7 +331,7 @@ Sint32 SDLTest_RandomIntegerInRange(Sint32 min, Sint32 max); /** * Generates random null-terminated string. The minimum length for - * the string is 1 character, maximum length for the string is 255 + * the string is 1 character, maximum length for the string is 255 * characters and it can contain ASCII characters from 32 to 126. * * Note: Returned string needs to be deallocated. @@ -352,7 +350,7 @@ char * SDLTest_RandomAsciiString(); * * \param maxLength The maximum length of the generated string. * - * \returns Newly allocated random string; or NULL if maxLength was invalid or string could not be allocated. + * \returns Newly allocated random string; or NULL if maxLength was invalid or string could not be allocated. */ char * SDLTest_RandomAsciiStringWithMaximumLength(int maxLength); @@ -377,9 +375,7 @@ int SDLTest_GetFuzzerInvocationCount(); /* Ends C function definitions when using C++ */ #ifdef __cplusplus -/* *INDENT-OFF* */ } -/* *INDENT-ON* */ #endif #include "close_code.h" diff --git a/include/SDL_test_harness.h b/include/SDL_test_harness.h index f2c553cb2..d2da04f1e 100644 --- a/include/SDL_test_harness.h +++ b/include/SDL_test_harness.h @@ -21,7 +21,7 @@ /** * \file SDL_test_harness.h - * + * * Include file for SDL test framework. * * This code is a part of the SDL2_test library, not the main SDL library. @@ -29,7 +29,7 @@ /* Defines types for test case definitions and the test execution harness API. - + Based on original GSOC code by Markus Kauppila */ @@ -39,9 +39,7 @@ #include "begin_code.h" /* Set up for C function definitions, even when using C++ */ #ifdef __cplusplus -/* *INDENT-OFF* */ extern "C" { -/* *INDENT-ON* */ #endif @@ -50,17 +48,17 @@ extern "C" { #define TEST_DISABLED 0 //! Definition of all the possible test return values of the test case method -#define TEST_ABORTED -1 -#define TEST_STARTED 0 -#define TEST_COMPLETED 1 -#define TEST_SKIPPED 2 +#define TEST_ABORTED -1 +#define TEST_STARTED 0 +#define TEST_COMPLETED 1 +#define TEST_SKIPPED 2 //! Definition of all the possible test results for the harness -#define TEST_RESULT_PASSED 0 -#define TEST_RESULT_FAILED 1 -#define TEST_RESULT_NO_ASSERT 2 -#define TEST_RESULT_SKIPPED 3 -#define TEST_RESULT_SETUP_FAILURE 4 +#define TEST_RESULT_PASSED 0 +#define TEST_RESULT_FAILED 1 +#define TEST_RESULT_NO_ASSERT 2 +#define TEST_RESULT_SKIPPED 3 +#define TEST_RESULT_SETUP_FAILURE 4 //!< Function pointer to a test case setup function (run before every test) typedef void (*SDLTest_TestCaseSetUpFp)(void *arg); @@ -75,28 +73,28 @@ typedef void (*SDLTest_TestCaseTearDownFp)(void *arg); * Holds information about a single test case. */ typedef struct SDLTest_TestCaseReference { - /*!< Func2Stress */ - SDLTest_TestCaseFp testCase; - /*!< Short name (or function name) "Func2Stress" */ - char *name; - /*!< Long name or full description "This test pushes func2() to the limit." */ - char *description; - /*!< Set to TEST_ENABLED or TEST_DISABLED (test won't be run) */ - int enabled; + /*!< Func2Stress */ + SDLTest_TestCaseFp testCase; + /*!< Short name (or function name) "Func2Stress" */ + char *name; + /*!< Long name or full description "This test pushes func2() to the limit." */ + char *description; + /*!< Set to TEST_ENABLED or TEST_DISABLED (test won't be run) */ + int enabled; } SDLTest_TestCaseReference; /** * Holds information about a test suite (multiple test cases). */ typedef struct SDLTest_TestSuiteReference { - /*!< "PlatformSuite" */ - char *name; - /*!< The function that is run before each test. NULL skips. */ - SDLTest_TestCaseSetUpFp testSetUp; - /*!< The test cases that are run as part of the suite. Last item should be NULL. */ - const SDLTest_TestCaseReference **testCases; - /*!< The function that is run after each test. NULL skips. */ - SDLTest_TestCaseTearDownFp testTearDown; + /*!< "PlatformSuite" */ + char *name; + /*!< The function that is run before each test. NULL skips. */ + SDLTest_TestCaseSetUpFp testSetUp; + /*!< The test cases that are run as part of the suite. Last item should be NULL. */ + const SDLTest_TestCaseReference **testCases; + /*!< The function that is run after each test. NULL skips. */ + SDLTest_TestCaseTearDownFp testTearDown; } SDLTest_TestSuiteReference; @@ -112,13 +110,11 @@ typedef struct SDLTest_TestSuiteReference { * \returns Test run result; 0 when all tests passed, 1 if any tests failed. */ int SDLTest_RunSuites(SDLTest_TestSuiteReference *testSuites[], const char *userRunSeed, Uint64 userExecKey, const char *filter, int testIterations); - + /* Ends C function definitions when using C++ */ #ifdef __cplusplus -/* *INDENT-OFF* */ } -/* *INDENT-ON* */ #endif #include "close_code.h" diff --git a/include/SDL_test_images.h b/include/SDL_test_images.h index ea7222928..21cf39ff7 100644 --- a/include/SDL_test_images.h +++ b/include/SDL_test_images.h @@ -21,16 +21,16 @@ /** * \file SDL_test_images.h - * + * * Include file for SDL test framework. * * This code is a part of the SDL2_test library, not the main SDL library. */ -/* +/* Defines some images for tests. - + */ #ifndef _SDL_test_images_h @@ -41,9 +41,7 @@ #include "begin_code.h" /* Set up for C function definitions, even when using C++ */ #ifdef __cplusplus -/* *INDENT-OFF* */ extern "C" { -/* *INDENT-ON* */ #endif /** @@ -52,7 +50,7 @@ extern "C" { typedef struct SDLTest_SurfaceImage_s { int width; int height; - unsigned int bytes_per_pixel; /* 3:RGB, 4:RGBA */ + unsigned int bytes_per_pixel; /* 3:RGB, 4:RGBA */ const char *pixel_data; } SDLTest_SurfaceImage_t; @@ -71,9 +69,7 @@ SDL_Surface *SDLTest_ImagePrimitivesBlend(); /* Ends C function definitions when using C++ */ #ifdef __cplusplus -/* *INDENT-OFF* */ } -/* *INDENT-ON* */ #endif #include "close_code.h" diff --git a/include/SDL_test_log.h b/include/SDL_test_log.h index c6dbad653..a581d2e75 100644 --- a/include/SDL_test_log.h +++ b/include/SDL_test_log.h @@ -21,13 +21,13 @@ /** * \file SDL_test_log.h - * + * * Include file for SDL test framework. * * This code is a part of the SDL2_test library, not the main SDL library. */ -/* +/* * * Wrapper to log in the TEST category * @@ -39,9 +39,7 @@ #include "begin_code.h" /* Set up for C function definitions, even when using C++ */ #ifdef __cplusplus -/* *INDENT-OFF* */ extern "C" { -/* *INDENT-ON* */ #endif /** @@ -60,9 +58,7 @@ void SDLTest_LogError(const char *fmt, ...); /* Ends C function definitions when using C++ */ #ifdef __cplusplus -/* *INDENT-OFF* */ } -/* *INDENT-ON* */ #endif #include "close_code.h" diff --git a/include/SDL_test_md5.h b/include/SDL_test_md5.h index 8949f4b0e..b0d4b7b04 100644 --- a/include/SDL_test_md5.h +++ b/include/SDL_test_md5.h @@ -21,7 +21,7 @@ /** * \file SDL_test_md5.h - * + * * Include file for SDL test framework. * * This code is a part of the SDL2_test library, not the main SDL library. @@ -59,9 +59,7 @@ #include "begin_code.h" /* Set up for C function definitions, even when using C++ */ #ifdef __cplusplus -/* *INDENT-OFF* */ extern "C" { -/* *INDENT-ON* */ #endif /* ------------ Definitions --------- */ @@ -71,21 +69,21 @@ extern "C" { /* Data structure for MD5 (Message-Digest) computation */ typedef struct { - MD5UINT4 i[2]; /* number of _bits_ handled mod 2^64 */ - MD5UINT4 buf[4]; /* scratch buffer */ - unsigned char in[64]; /* input buffer */ - unsigned char digest[16]; /* actual digest after Md5Final call */ + MD5UINT4 i[2]; /* number of _bits_ handled mod 2^64 */ + MD5UINT4 buf[4]; /* scratch buffer */ + unsigned char in[64]; /* input buffer */ + unsigned char digest[16]; /* actual digest after Md5Final call */ } SDLTest_Md5Context; /* ---------- Function Prototypes ------------- */ -/** +/** * /brief initialize the context * - * /param mdContext pointer to context variable + * /param mdContext pointer to context variable * * Note: The function initializes the message-digest context - * mdContext. Call before each new use of the context - + * mdContext. Call before each new use of the context - * all fields are set to zero. */ void SDLTest_Md5Init(SDLTest_Md5Context * mdContext); @@ -93,24 +91,24 @@ extern "C" { /** * /brief update digest from variable length data - * + * * /param mdContext pointer to context variable * /param inBuf pointer to data array/string * /param inLen length of data array/string * - * Note: The function updates the message-digest context to account + * Note: The function updates the message-digest context to account * for the presence of each of the characters inBuf[0..inLen-1] * in the message whose digest is being computed. */ void SDLTest_Md5Update(SDLTest_Md5Context * mdContext, unsigned char *inBuf, - unsigned int inLen); + unsigned int inLen); /* * /brief complete digest computation * - * /param mdContext pointer to context variable + * /param mdContext pointer to context variable * * Note: The function terminates the message-digest computation and * ends with the desired message digest in mdContext.digest[0..15]. @@ -122,9 +120,7 @@ extern "C" { /* Ends C function definitions when using C++ */ #ifdef __cplusplus -/* *INDENT-OFF* */ } -/* *INDENT-ON* */ #endif #include "close_code.h" diff --git a/include/SDL_test_random.h b/include/SDL_test_random.h index 8b20b6ade..ce6192c25 100644 --- a/include/SDL_test_random.h +++ b/include/SDL_test_random.h @@ -21,20 +21,20 @@ /** * \file SDL_test_random.h - * + * * Include file for SDL test framework. * * This code is a part of the SDL2_test library, not the main SDL library. */ -/* +/* - A "32-bit Multiply with carry random number generator. Very fast. - Includes a list of recommended multipliers. + A "32-bit Multiply with carry random number generator. Very fast. + Includes a list of recommended multipliers. multiply-with-carry generator: x(n) = a*x(n-1) + carry mod 2^32. period: (a*2^31)-1 - + */ #ifndef _SDL_test_random_h @@ -43,9 +43,7 @@ #include "begin_code.h" /* Set up for C function definitions, even when using C++ */ #ifdef __cplusplus -/* *INDENT-OFF* */ extern "C" { -/* *INDENT-ON* */ #endif /* --- Definitions */ @@ -53,7 +51,7 @@ extern "C" { /* * Macros that return a random number in a specific format. */ -#define SDLTest_RandomInt(c) ((int)SDLTest_Random(c)) +#define SDLTest_RandomInt(c) ((int)SDLTest_Random(c)) /* * Context structure for the random number generator state. @@ -70,7 +68,7 @@ extern "C" { /* --- Function prototypes */ /** - * \brief Initialize random number generator with two integers. + * \brief Initialize random number generator with two integers. * * Note: The random sequence of numbers returned by ...Random() is the * same for the same two integers and has a period of 2^31. @@ -81,10 +79,10 @@ extern "C" { * */ void SDLTest_RandomInit(SDLTest_RandomContext * rndContext, unsigned int xi, - unsigned int ci); + unsigned int ci); /** - * \brief Initialize random number generator based on current system time. + * \brief Initialize random number generator based on current system time. * * \param rndContext pointer to context structure * @@ -93,7 +91,7 @@ extern "C" { /** - * \brief Initialize random number generator based on current system time. + * \brief Initialize random number generator based on current system time. * * Note: ...RandomInit() or ...RandomInitTime() must have been called * before using this function. @@ -108,9 +106,7 @@ extern "C" { /* Ends C function definitions when using C++ */ #ifdef __cplusplus -/* *INDENT-OFF* */ } -/* *INDENT-ON* */ #endif #include "close_code.h" diff --git a/include/SDL_thread.h b/include/SDL_thread.h index 273419b22..6015a071e 100644 --- a/include/SDL_thread.h +++ b/include/SDL_thread.h @@ -24,7 +24,7 @@ /** * \file SDL_thread.h - * + * * Header for the SDL thread management routines. */ @@ -37,9 +37,7 @@ #include "begin_code.h" /* Set up for C function definitions, even when using C++ */ #ifdef __cplusplus -/* *INDENT-OFF* */ extern "C" { -/* *INDENT-ON* */ #endif /* The SDL thread structure, defined in SDL_thread.c */ @@ -67,22 +65,22 @@ typedef int (SDLCALL * SDL_ThreadFunction) (void *data); #if defined(__WIN32__) && !defined(HAVE_LIBC) /** * \file SDL_thread.h - * + * * We compile SDL into a DLL. This means, that it's the DLL which * creates a new thread for the calling process with the SDL_CreateThread() * API. There is a problem with this, that only the RTL of the SDL.DLL will - * be initialized for those threads, and not the RTL of the calling + * be initialized for those threads, and not the RTL of the calling * application! - * + * * To solve this, we make a little hack here. - * + * * We'll always use the caller's _beginthread() and _endthread() APIs to * start a new thread. This way, if it's the SDL.DLL which uses this API, * then the RTL of SDL.DLL will be used to create the new thread, and if it's * the application, then the RTL of the application will be used. - * + * * So, in short: - * Always use the _beginthread() and _endthread() of the calling runtime + * Always use the _beginthread() and _endthread() of the calling runtime * library! */ #define SDL_PASSED_BEGINTHREAD_ENDTHREAD @@ -150,7 +148,7 @@ extern DECLSPEC SDL_threadID SDLCALL SDL_ThreadID(void); /** * Get the thread identifier for the specified thread. - * + * * Equivalent to SDL_ThreadID() if the specified thread is NULL. */ extern DECLSPEC SDL_threadID SDLCALL SDL_GetThreadID(SDL_Thread * thread); @@ -162,7 +160,7 @@ extern DECLSPEC int SDLCALL SDL_SetThreadPriority(SDL_ThreadPriority priority); /** * Wait for a thread to finish. - * + * * The return code for the thread function is placed in the area * pointed to by \c status, if \c status is not NULL. */ @@ -171,9 +169,7 @@ extern DECLSPEC void SDLCALL SDL_WaitThread(SDL_Thread * thread, int *status); /* Ends C function definitions when using C++ */ #ifdef __cplusplus -/* *INDENT-OFF* */ } -/* *INDENT-ON* */ #endif #include "close_code.h" diff --git a/include/SDL_timer.h b/include/SDL_timer.h index 4a2a27251..e065cf4f9 100644 --- a/include/SDL_timer.h +++ b/include/SDL_timer.h @@ -24,7 +24,7 @@ /** * \file SDL_timer.h - * + * * Header for the SDL time management routines. */ @@ -34,14 +34,12 @@ #include "begin_code.h" /* Set up for C function definitions, even when using C++ */ #ifdef __cplusplus -/* *INDENT-OFF* */ extern "C" { -/* *INDENT-ON* */ #endif /** * \brief Get the number of milliseconds since the SDL library initialization. - * + * * \note This value wraps if the program runs for more than ~49 days. */ extern DECLSPEC Uint32 SDLCALL SDL_GetTicks(void); @@ -63,7 +61,7 @@ extern DECLSPEC void SDLCALL SDL_Delay(Uint32 ms); /** * Function prototype for the timer callback function. - * + * * The callback function is passed the current timer interval and returns * the next timer interval. If the returned value is the same as the one * passed in, the periodic alarm continues, otherwise a new alarm is @@ -97,9 +95,7 @@ extern DECLSPEC SDL_bool SDLCALL SDL_RemoveTimer(SDL_TimerID id); /* Ends C function definitions when using C++ */ #ifdef __cplusplus -/* *INDENT-OFF* */ } -/* *INDENT-ON* */ #endif #include "close_code.h" diff --git a/include/SDL_touch.h b/include/SDL_touch.h index 0b014d6bd..9e6d7c65f 100644 --- a/include/SDL_touch.h +++ b/include/SDL_touch.h @@ -21,7 +21,7 @@ /** * \file SDL_touch.h - * + * * Include file for SDL touch event handling. */ @@ -35,9 +35,7 @@ #include "begin_code.h" /* Set up for C function definitions, even when using C++ */ #ifdef __cplusplus -/* *INDENT-OFF* */ extern "C" { -/* *INDENT-ON* */ #endif typedef Sint64 SDL_TouchID; @@ -79,9 +77,7 @@ extern DECLSPEC SDL_Finger * SDLCALL SDL_GetTouchFinger(SDL_TouchID touchID, int /* Ends C function definitions when using C++ */ #ifdef __cplusplus -/* *INDENT-OFF* */ } -/* *INDENT-ON* */ #endif #include "close_code.h" diff --git a/include/SDL_types.h b/include/SDL_types.h index 636df1e9e..bb485cdb0 100644 --- a/include/SDL_types.h +++ b/include/SDL_types.h @@ -21,7 +21,7 @@ /** * \file SDL_types.h - * + * * \deprecated */ diff --git a/include/SDL_version.h b/include/SDL_version.h index e32ea20b2..a9ced804d 100644 --- a/include/SDL_version.h +++ b/include/SDL_version.h @@ -21,7 +21,7 @@ /** * \file SDL_version.h - * + * * This header defines the current SDL version. */ @@ -33,20 +33,18 @@ #include "begin_code.h" /* Set up for C function definitions, even when using C++ */ #ifdef __cplusplus -/* *INDENT-OFF* */ extern "C" { -/* *INDENT-ON* */ #endif /** * \brief Information the version of SDL in use. - * + * * Represents the library's version as three levels: major revision * (increments with massive changes, additions, and enhancements), * minor revision (increments with backwards-compatible changes to the * major revision), and patchlevel (increments with fixes to the minor * revision). - * + * * \sa SDL_VERSION * \sa SDL_GetVersion */ @@ -59,30 +57,30 @@ typedef struct SDL_version /* Printable format: "%d.%d.%d", MAJOR, MINOR, PATCHLEVEL */ -#define SDL_MAJOR_VERSION 2 -#define SDL_MINOR_VERSION 0 -#define SDL_PATCHLEVEL 0 +#define SDL_MAJOR_VERSION 2 +#define SDL_MINOR_VERSION 0 +#define SDL_PATCHLEVEL 0 /** * \brief Macro to determine SDL version program was compiled against. - * + * * This macro fills in a SDL_version structure with the version of the * library you compiled against. This is determined by what header the * compiler uses. Note that if you dynamically linked the library, you might * have a slightly newer or older version at runtime. That version can be * determined with SDL_GetVersion(), which, unlike SDL_VERSION(), * is not a macro. - * + * * \param x A pointer to a SDL_version struct to initialize. - * + * * \sa SDL_version * \sa SDL_GetVersion */ -#define SDL_VERSION(x) \ -{ \ - (x)->major = SDL_MAJOR_VERSION; \ - (x)->minor = SDL_MINOR_VERSION; \ - (x)->patch = SDL_PATCHLEVEL; \ +#define SDL_VERSION(x) \ +{ \ + (x)->major = SDL_MAJOR_VERSION; \ + (x)->minor = SDL_MINOR_VERSION; \ + (x)->patch = SDL_PATCHLEVEL; \ } /** @@ -90,23 +88,23 @@ typedef struct SDL_version * \verbatim (1,2,3) -> (1203) \endverbatim - * + * * This assumes that there will never be more than 100 patchlevels. */ -#define SDL_VERSIONNUM(X, Y, Z) \ - ((X)*1000 + (Y)*100 + (Z)) +#define SDL_VERSIONNUM(X, Y, Z) \ + ((X)*1000 + (Y)*100 + (Z)) /** * This is the version number macro for the current SDL version. */ #define SDL_COMPILEDVERSION \ - SDL_VERSIONNUM(SDL_MAJOR_VERSION, SDL_MINOR_VERSION, SDL_PATCHLEVEL) + SDL_VERSIONNUM(SDL_MAJOR_VERSION, SDL_MINOR_VERSION, SDL_PATCHLEVEL) /** * This macro will evaluate to true if compiled with SDL at least X.Y.Z. */ #define SDL_VERSION_ATLEAST(X, Y, Z) \ - (SDL_COMPILEDVERSION >= SDL_VERSIONNUM(X, Y, Z)) + (SDL_COMPILEDVERSION >= SDL_VERSIONNUM(X, Y, Z)) /** * \brief Get the version of SDL that is linked against your program. @@ -115,11 +113,11 @@ typedef struct SDL_version * current version will be different than the version you compiled against. * This function returns the current version, while SDL_VERSION() is a * macro that tells you what version you compiled with. - * + * * \code * SDL_version compiled; * SDL_version linked; - * + * * SDL_VERSION(&compiled); * SDL_GetVersion(&linked); * printf("We compiled against SDL version %d.%d.%d ...\n", @@ -127,9 +125,9 @@ typedef struct SDL_version * printf("But we linked against SDL version %d.%d.%d.\n", * linked.major, linked.minor, linked.patch); * \endcode - * + * * This function may be called safely at any time, even before SDL_Init(). - * + * * \sa SDL_VERSION */ extern DECLSPEC void SDLCALL SDL_GetVersion(SDL_version * ver); @@ -155,9 +153,7 @@ extern DECLSPEC int SDLCALL SDL_GetRevisionNumber(void); /* Ends C function definitions when using C++ */ #ifdef __cplusplus -/* *INDENT-OFF* */ } -/* *INDENT-ON* */ #endif #include "close_code.h" diff --git a/include/SDL_video.h b/include/SDL_video.h index d51da4d6b..66815197c 100644 --- a/include/SDL_video.h +++ b/include/SDL_video.h @@ -21,7 +21,7 @@ /** * \file SDL_video.h - * + * * Header file for SDL video functions. */ @@ -36,14 +36,12 @@ #include "begin_code.h" /* Set up for C function definitions, even when using C++ */ #ifdef __cplusplus -/* *INDENT-OFF* */ extern "C" { -/* *INDENT-ON* */ #endif /** * \brief The structure that defines a display mode - * + * * \sa SDL_GetNumDisplayModes() * \sa SDL_GetDisplayMode() * \sa SDL_GetDesktopDisplayMode() @@ -63,7 +61,7 @@ typedef struct /** * \brief The type used to identify a window - * + * * \sa SDL_CreateWindow() * \sa SDL_CreateWindowFrom() * \sa SDL_DestroyWindow() @@ -92,7 +90,7 @@ typedef struct SDL_Window SDL_Window; /** * \brief The flags on a window - * + * * \sa SDL_GetWindowFlags() */ typedef enum @@ -108,7 +106,7 @@ typedef enum SDL_WINDOW_INPUT_GRABBED = 0x00000100, /**< window has grabbed input focus */ SDL_WINDOW_INPUT_FOCUS = 0x00000200, /**< window has input focus */ SDL_WINDOW_MOUSE_FOCUS = 0x00000400, /**< window has mouse focus */ - SDL_WINDOW_FULLSCREEN_DESKTOP = ( SDL_WINDOW_FULLSCREEN | 0x00001000 ), + SDL_WINDOW_FULLSCREEN_DESKTOP = ( SDL_WINDOW_FULLSCREEN | 0x00001000 ), SDL_WINDOW_FOREIGN = 0x00000800 /**< window not created by SDL */ } SDL_WindowFlags; @@ -138,9 +136,9 @@ typedef enum SDL_WINDOWEVENT_NONE, /**< Never used */ SDL_WINDOWEVENT_SHOWN, /**< Window has been shown */ SDL_WINDOWEVENT_HIDDEN, /**< Window has been hidden */ - SDL_WINDOWEVENT_EXPOSED, /**< Window has been exposed and should be + SDL_WINDOWEVENT_EXPOSED, /**< Window has been exposed and should be redrawn */ - SDL_WINDOWEVENT_MOVED, /**< Window has been moved to data1, data2 + SDL_WINDOWEVENT_MOVED, /**< Window has been moved to data1, data2 */ SDL_WINDOWEVENT_RESIZED, /**< Window has been resized to data1xdata2 */ SDL_WINDOWEVENT_SIZE_CHANGED, /**< The window size has changed, either as a result of an API call or through the system or user changing the window size. */ @@ -152,7 +150,7 @@ typedef enum SDL_WINDOWEVENT_LEAVE, /**< Window has lost mouse focus */ SDL_WINDOWEVENT_FOCUS_GAINED, /**< Window has gained keyboard focus */ SDL_WINDOWEVENT_FOCUS_LOST, /**< Window has lost keyboard focus */ - SDL_WINDOWEVENT_CLOSE /**< The window manager requests that the + SDL_WINDOWEVENT_CLOSE /**< The window manager requests that the window be closed */ } SDL_WindowEventID; @@ -211,52 +209,52 @@ typedef enum /** * \brief Get the number of video drivers compiled into SDL - * + * * \sa SDL_GetVideoDriver() */ extern DECLSPEC int SDLCALL SDL_GetNumVideoDrivers(void); /** * \brief Get the name of a built in video driver. - * + * * \note The video drivers are presented in the order in which they are * normally checked during initialization. - * + * * \sa SDL_GetNumVideoDrivers() */ extern DECLSPEC const char *SDLCALL SDL_GetVideoDriver(int index); /** * \brief Initialize the video subsystem, optionally specifying a video driver. - * - * \param driver_name Initialize a specific driver by name, or NULL for the + * + * \param driver_name Initialize a specific driver by name, or NULL for the * default video driver. - * + * * \return 0 on success, -1 on error - * + * * This function initializes the video subsystem; setting up a connection * to the window manager, etc, and determines the available display modes * and pixel formats, but does not initialize a window or graphics mode. - * + * * \sa SDL_VideoQuit() */ extern DECLSPEC int SDLCALL SDL_VideoInit(const char *driver_name); /** * \brief Shuts down the video subsystem. - * + * * This function closes all windows, and restores the original video mode. - * + * * \sa SDL_VideoInit() */ extern DECLSPEC void SDLCALL SDL_VideoQuit(void); /** * \brief Returns the name of the currently initialized video driver. - * + * * \return The name of the current video driver or NULL if no driver * has been initialized - * + * * \sa SDL_GetNumVideoDrivers() * \sa SDL_GetVideoDriver() */ @@ -264,16 +262,16 @@ extern DECLSPEC const char *SDLCALL SDL_GetCurrentVideoDriver(void); /** * \brief Returns the number of available video displays. - * + * * \sa SDL_GetDisplayBounds() */ extern DECLSPEC int SDLCALL SDL_GetNumVideoDisplays(void); /** * \brief Get the name of a display in UTF-8 encoding - * + * * \return The name of a display, or NULL for an invalid display index. - * + * * \sa SDL_GetNumVideoDisplays() */ extern DECLSPEC const char * SDLCALL SDL_GetDisplayName(int displayIndex); @@ -281,29 +279,29 @@ extern DECLSPEC const char * SDLCALL SDL_GetDisplayName(int displayIndex); /** * \brief Get the desktop area represented by a display, with the primary * display located at 0,0 - * + * * \return 0 on success, or -1 if the index is out of range. - * + * * \sa SDL_GetNumVideoDisplays() */ extern DECLSPEC int SDLCALL SDL_GetDisplayBounds(int displayIndex, SDL_Rect * rect); /** * \brief Returns the number of available display modes. - * + * * \sa SDL_GetDisplayMode() */ extern DECLSPEC int SDLCALL SDL_GetNumDisplayModes(int displayIndex); /** * \brief Fill in information about a specific display mode. - * + * * \note The display modes are sorted in this priority: * \li bits per pixel -> more colors to fewer colors * \li width -> largest to smallest * \li height -> largest to smallest * \li refresh rate -> highest to lowest - * + * * \sa SDL_GetNumDisplayModes() */ extern DECLSPEC int SDLCALL SDL_GetDisplayMode(int displayIndex, int modeIndex, @@ -322,22 +320,22 @@ extern DECLSPEC int SDLCALL SDL_GetCurrentDisplayMode(int displayIndex, SDL_Disp /** * \brief Get the closest match to the requested display mode. - * + * * \param displayIndex The index of display from which mode should be queried. * \param mode The desired display mode - * \param closest A pointer to a display mode to be filled in with the closest + * \param closest A pointer to a display mode to be filled in with the closest * match of the available display modes. - * - * \return The passed in value \c closest, or NULL if no matching video mode + * + * \return The passed in value \c closest, or NULL if no matching video mode * was available. - * + * * The available display modes are scanned, and \c closest is filled in with the - * closest mode matching the requested mode and returned. The mode format and - * refresh_rate default to the desktop mode if they are 0. The modes are - * scanned with size being first priority, format being second priority, and - * finally checking the refresh_rate. If all the available modes are too + * closest mode matching the requested mode and returned. The mode format and + * refresh_rate default to the desktop mode if they are 0. The modes are + * scanned with size being first priority, format being second priority, and + * finally checking the refresh_rate. If all the available modes are too * small, then NULL is returned. - * + * * \sa SDL_GetNumDisplayModes() * \sa SDL_GetDisplayMode() */ @@ -345,7 +343,7 @@ extern DECLSPEC SDL_DisplayMode * SDLCALL SDL_GetClosestDisplayMode(int displayI /** * \brief Get the display index associated with a window. - * + * * \return the display index of the display containing the center of the * window, or -1 on error. */ @@ -356,12 +354,12 @@ extern DECLSPEC int SDLCALL SDL_GetWindowDisplayIndex(SDL_Window * window); * * By default the window's dimensions and the desktop format and refresh rate * are used. - * + * * \param window The window for which the display mode should be set. * \param mode The mode to use, or NULL for the default mode. - * + * * \return 0 on success, or -1 if setting the display mode failed. - * + * * \sa SDL_GetWindowDisplayMode() * \sa SDL_SetWindowFullscreen() */ @@ -386,22 +384,22 @@ extern DECLSPEC Uint32 SDLCALL SDL_GetWindowPixelFormat(SDL_Window * window); /** * \brief Create a window with the specified position, dimensions, and flags. - * + * * \param title The title of the window, in UTF-8 encoding. - * \param x The x position of the window, ::SDL_WINDOWPOS_CENTERED, or + * \param x The x position of the window, ::SDL_WINDOWPOS_CENTERED, or * ::SDL_WINDOWPOS_UNDEFINED. - * \param y The y position of the window, ::SDL_WINDOWPOS_CENTERED, or + * \param y The y position of the window, ::SDL_WINDOWPOS_CENTERED, or * ::SDL_WINDOWPOS_UNDEFINED. * \param w The width of the window. * \param h The height of the window. - * \param flags The flags for the window, a mask of any of the following: - * ::SDL_WINDOW_FULLSCREEN, ::SDL_WINDOW_OPENGL, - * ::SDL_WINDOW_SHOWN, ::SDL_WINDOW_BORDERLESS, - * ::SDL_WINDOW_RESIZABLE, ::SDL_WINDOW_MAXIMIZED, + * \param flags The flags for the window, a mask of any of the following: + * ::SDL_WINDOW_FULLSCREEN, ::SDL_WINDOW_OPENGL, + * ::SDL_WINDOW_SHOWN, ::SDL_WINDOW_BORDERLESS, + * ::SDL_WINDOW_RESIZABLE, ::SDL_WINDOW_MAXIMIZED, * ::SDL_WINDOW_MINIMIZED, ::SDL_WINDOW_INPUT_GRABBED. - * + * * \return The id of the window created, or zero if window creation failed. - * + * * \sa SDL_DestroyWindow() */ extern DECLSPEC SDL_Window * SDLCALL SDL_CreateWindow(const char *title, @@ -410,11 +408,11 @@ extern DECLSPEC SDL_Window * SDLCALL SDL_CreateWindow(const char *title, /** * \brief Create an SDL window from an existing native window. - * + * * \param data A pointer to driver-dependent window creation data - * + * * \return The id of the window created, or zero if window creation failed. - * + * * \sa SDL_DestroyWindow() */ extern DECLSPEC SDL_Window * SDLCALL SDL_CreateWindowFrom(const void *data); @@ -436,7 +434,7 @@ extern DECLSPEC Uint32 SDLCALL SDL_GetWindowFlags(SDL_Window * window); /** * \brief Set the title of a window, in UTF-8 format. - * + * * \sa SDL_GetWindowTitle() */ extern DECLSPEC void SDLCALL SDL_SetWindowTitle(SDL_Window * window, @@ -444,14 +442,14 @@ extern DECLSPEC void SDLCALL SDL_SetWindowTitle(SDL_Window * window, /** * \brief Get the title of a window, in UTF-8 format. - * + * * \sa SDL_SetWindowTitle() */ extern DECLSPEC const char *SDLCALL SDL_GetWindowTitle(SDL_Window * window); /** * \brief Set the icon for a window. - * + * * \param window The window for which the icon should be set. * \param icon The icon for the window. */ @@ -460,7 +458,7 @@ extern DECLSPEC void SDLCALL SDL_SetWindowIcon(SDL_Window * window, /** * \brief Associate an arbitrary named pointer with a window. - * + * * \param window The window to associate with the pointer. * \param name The name of the pointer. * \param userdata The associated pointer. @@ -477,12 +475,12 @@ extern DECLSPEC void* SDLCALL SDL_SetWindowData(SDL_Window * window, /** * \brief Retrieve the data pointer associated with a window. - * + * * \param window The window to query. * \param name The name of the pointer. * * \return The value associated with 'name' - * + * * \sa SDL_SetWindowData() */ extern DECLSPEC void *SDLCALL SDL_GetWindowData(SDL_Window * window, @@ -490,15 +488,15 @@ extern DECLSPEC void *SDLCALL SDL_GetWindowData(SDL_Window * window, /** * \brief Set the position of a window. - * + * * \param window The window to reposition. * \param x The x coordinate of the window, ::SDL_WINDOWPOS_CENTERED, or ::SDL_WINDOWPOS_UNDEFINED. * \param y The y coordinate of the window, ::SDL_WINDOWPOS_CENTERED, or ::SDL_WINDOWPOS_UNDEFINED. - * + * * \note The window coordinate origin is the upper left of the display. - * + * * \sa SDL_GetWindowPosition() */ extern DECLSPEC void SDLCALL SDL_SetWindowPosition(SDL_Window * window, @@ -506,7 +504,7 @@ extern DECLSPEC void SDLCALL SDL_SetWindowPosition(SDL_Window * window, /** * \brief Get the position of a window. - * + * * \param window The window to query. * \param x Pointer to variable for storing the x position, may be NULL * \param y Pointer to variable for storing the y position, may be NULL @@ -518,14 +516,14 @@ extern DECLSPEC void SDLCALL SDL_GetWindowPosition(SDL_Window * window, /** * \brief Set the size of a window's client area. - * + * * \param window The window to resize. * \param w The width of the window, must be >0 * \param h The height of the window, must be >0 * * \note You can't change the size of a fullscreen window, it automatically * matches the size of the display mode. - * + * * \sa SDL_GetWindowSize() */ extern DECLSPEC void SDLCALL SDL_SetWindowSize(SDL_Window * window, int w, @@ -533,19 +531,19 @@ extern DECLSPEC void SDLCALL SDL_SetWindowSize(SDL_Window * window, int w, /** * \brief Get the size of a window's client area. - * + * * \param window The window to query. * \param w Pointer to variable for storing the width, may be NULL * \param h Pointer to variable for storing the height, may be NULL - * + * * \sa SDL_SetWindowSize() */ extern DECLSPEC void SDLCALL SDL_GetWindowSize(SDL_Window * window, int *w, int *h); - + /** * \brief Set the minimum size of a window's client area. - * + * * \param window The window to set a new minimum size. * \param min_w The minimum width of the window, must be >0 * \param min_h The minimum height of the window, must be >0 @@ -558,14 +556,14 @@ extern DECLSPEC void SDLCALL SDL_GetWindowSize(SDL_Window * window, int *w, */ extern DECLSPEC void SDLCALL SDL_SetWindowMinimumSize(SDL_Window * window, int min_w, int min_h); - + /** * \brief Get the minimum size of a window's client area. - * + * * \param window The window to query. * \param w Pointer to variable for storing the minimum width, may be NULL * \param h Pointer to variable for storing the minimum height, may be NULL - * + * * \sa SDL_GetWindowMaximumSize() * \sa SDL_SetWindowMinimumSize() */ @@ -587,10 +585,10 @@ extern DECLSPEC void SDLCALL SDL_GetWindowMinimumSize(SDL_Window * window, */ extern DECLSPEC void SDLCALL SDL_SetWindowMaximumSize(SDL_Window * window, int max_w, int max_h); - + /** * \brief Get the maximum size of a window's client area. - * + * * \param window The window to query. * \param w Pointer to variable for storing the maximum width, may be NULL * \param h Pointer to variable for storing the maximum height, may be NULL @@ -612,7 +610,7 @@ extern DECLSPEC void SDLCALL SDL_GetWindowMaximumSize(SDL_Window * window, * \param bordered SDL_FALSE to remove border, SDL_TRUE to add border. * * \note You can't change the border state of a fullscreen window. - * + * * \sa SDL_GetWindowFlags() */ extern DECLSPEC void SDLCALL SDL_SetWindowBordered(SDL_Window * window, @@ -620,14 +618,14 @@ extern DECLSPEC void SDLCALL SDL_SetWindowBordered(SDL_Window * window, /** * \brief Show a window. - * + * * \sa SDL_HideWindow() */ extern DECLSPEC void SDLCALL SDL_ShowWindow(SDL_Window * window); /** * \brief Hide a window. - * + * * \sa SDL_ShowWindow() */ extern DECLSPEC void SDLCALL SDL_HideWindow(SDL_Window * window); @@ -639,21 +637,21 @@ extern DECLSPEC void SDLCALL SDL_RaiseWindow(SDL_Window * window); /** * \brief Make a window as large as possible. - * + * * \sa SDL_RestoreWindow() */ extern DECLSPEC void SDLCALL SDL_MaximizeWindow(SDL_Window * window); /** * \brief Minimize a window to an iconic representation. - * + * * \sa SDL_RestoreWindow() */ extern DECLSPEC void SDLCALL SDL_MinimizeWindow(SDL_Window * window); /** * \brief Restore the size and position of a minimized or maximized window. - * + * * \sa SDL_MaximizeWindow() * \sa SDL_MinimizeWindow() */ @@ -661,9 +659,9 @@ extern DECLSPEC void SDLCALL SDL_RestoreWindow(SDL_Window * window); /** * \brief Set a window's fullscreen state. - * + * * \return 0 on success, or -1 if setting the display mode failed. - * + * * \sa SDL_SetWindowDisplayMode() * \sa SDL_GetWindowDisplayMode() */ @@ -673,7 +671,7 @@ extern DECLSPEC int SDLCALL SDL_SetWindowFullscreen(SDL_Window * window, /** * \brief Get the SDL surface associated with the window. * - * \return The window's framebuffer surface, or NULL on error. + * \return The window's framebuffer surface, or NULL on error. * * A new surface will be created with the optimal format for the window, * if necessary. This surface will be freed when the window is destroyed. @@ -709,10 +707,10 @@ extern DECLSPEC int SDLCALL SDL_UpdateWindowSurfaceRects(SDL_Window * window, /** * \brief Set a window's input grab mode. - * + * * \param window The window for which the input grab mode should be set. * \param grabbed This is SDL_TRUE to grab input, and SDL_FALSE to release input. - * + * * \sa SDL_GetWindowGrab() */ extern DECLSPEC void SDLCALL SDL_SetWindowGrab(SDL_Window * window, @@ -720,18 +718,18 @@ extern DECLSPEC void SDLCALL SDL_SetWindowGrab(SDL_Window * window, /** * \brief Get a window's input grab mode. - * + * * \return This returns SDL_TRUE if input is grabbed, and SDL_FALSE otherwise. - * + * * \sa SDL_SetWindowGrab() */ extern DECLSPEC SDL_bool SDLCALL SDL_GetWindowGrab(SDL_Window * window); /** * \brief Set the brightness (gamma correction) for a window. - * + * * \return 0 on success, or -1 if setting the brightness isn't supported. - * + * * \sa SDL_GetWindowBrightness() * \sa SDL_SetWindowGammaRamp() */ @@ -739,23 +737,23 @@ extern DECLSPEC int SDLCALL SDL_SetWindowBrightness(SDL_Window * window, float b /** * \brief Get the brightness (gamma correction) for a window. - * + * * \return The last brightness value passed to SDL_SetWindowBrightness() - * + * * \sa SDL_SetWindowBrightness() */ extern DECLSPEC float SDLCALL SDL_GetWindowBrightness(SDL_Window * window); /** * \brief Set the gamma ramp for a window. - * + * * \param window The window for which the gamma ramp should be set. * \param red The translation table for the red channel, or NULL. * \param green The translation table for the green channel, or NULL. * \param blue The translation table for the blue channel, or NULL. - * + * * \return 0 on success, or -1 if gamma ramps are unsupported. - * + * * Set the gamma translation table for the red, green, and blue channels * of the video hardware. Each table is an array of 256 16-bit quantities, * representing a mapping between the input and output for that channel. @@ -771,17 +769,17 @@ extern DECLSPEC int SDLCALL SDL_SetWindowGammaRamp(SDL_Window * window, /** * \brief Get the gamma ramp for a window. - * + * * \param window The window from which the gamma ramp should be queried. - * \param red A pointer to a 256 element array of 16-bit quantities to hold + * \param red A pointer to a 256 element array of 16-bit quantities to hold * the translation table for the red channel, or NULL. - * \param green A pointer to a 256 element array of 16-bit quantities to hold + * \param green A pointer to a 256 element array of 16-bit quantities to hold * the translation table for the green channel, or NULL. - * \param blue A pointer to a 256 element array of 16-bit quantities to hold + * \param blue A pointer to a 256 element array of 16-bit quantities to hold * the translation table for the blue channel, or NULL. - * + * * \return 0 on success, or -1 if gamma ramps are unsupported. - * + * * \sa SDL_SetWindowGammaRamp() */ extern DECLSPEC int SDLCALL SDL_GetWindowGammaRamp(SDL_Window * window, @@ -797,7 +795,7 @@ extern DECLSPEC void SDLCALL SDL_DestroyWindow(SDL_Window * window); /** * \brief Returns whether the screensaver is currently enabled (default on). - * + * * \sa SDL_EnableScreenSaver() * \sa SDL_DisableScreenSaver() */ @@ -805,7 +803,7 @@ extern DECLSPEC SDL_bool SDLCALL SDL_IsScreenSaverEnabled(void); /** * \brief Allow the screen to be blanked by a screensaver - * + * * \sa SDL_IsScreenSaverEnabled() * \sa SDL_DisableScreenSaver() */ @@ -813,7 +811,7 @@ extern DECLSPEC void SDLCALL SDL_EnableScreenSaver(void); /** * \brief Prevent the screen from being blanked by a screensaver - * + * * \sa SDL_IsScreenSaverEnabled() * \sa SDL_EnableScreenSaver() */ @@ -827,19 +825,19 @@ extern DECLSPEC void SDLCALL SDL_DisableScreenSaver(void); /** * \brief Dynamically load an OpenGL library. - * - * \param path The platform dependent OpenGL library name, or NULL to open the + * + * \param path The platform dependent OpenGL library name, or NULL to open the * default OpenGL library. - * + * * \return 0 on success, or -1 if the library couldn't be loaded. - * + * * This should be done after initializing the video driver, but before * creating any OpenGL windows. If no OpenGL library is loaded, the default * library will be loaded upon creation of the first OpenGL window. - * + * * \note If you do this, you need to retrieve all of the GL functions used in * your program from the dynamic library using SDL_GL_GetProcAddress(). - * + * * \sa SDL_GL_GetProcAddress() * \sa SDL_GL_UnloadLibrary() */ @@ -852,13 +850,13 @@ extern DECLSPEC void *SDLCALL SDL_GL_GetProcAddress(const char *proc); /** * \brief Unload the OpenGL library previously loaded by SDL_GL_LoadLibrary(). - * + * * \sa SDL_GL_LoadLibrary() */ extern DECLSPEC void SDLCALL SDL_GL_UnloadLibrary(void); /** - * \brief Return true if an OpenGL extension is supported for the current + * \brief Return true if an OpenGL extension is supported for the current * context. */ extern DECLSPEC SDL_bool SDLCALL SDL_GL_ExtensionSupported(const char @@ -875,9 +873,9 @@ extern DECLSPEC int SDLCALL SDL_GL_SetAttribute(SDL_GLattr attr, int value); extern DECLSPEC int SDLCALL SDL_GL_GetAttribute(SDL_GLattr attr, int *value); /** - * \brief Create an OpenGL context for use with an OpenGL window, and make it + * \brief Create an OpenGL context for use with an OpenGL window, and make it * current. - * + * * \sa SDL_GL_DeleteContext() */ extern DECLSPEC SDL_GLContext SDLCALL SDL_GL_CreateContext(SDL_Window * @@ -885,7 +883,7 @@ extern DECLSPEC SDL_GLContext SDLCALL SDL_GL_CreateContext(SDL_Window * /** * \brief Set up an OpenGL context for rendering into an OpenGL window. - * + * * \note The context must have been created with a compatible window. */ extern DECLSPEC int SDLCALL SDL_GL_MakeCurrent(SDL_Window * window, @@ -893,40 +891,40 @@ extern DECLSPEC int SDLCALL SDL_GL_MakeCurrent(SDL_Window * window, /** * \brief Set the swap interval for the current OpenGL context. - * + * * \param interval 0 for immediate updates, 1 for updates synchronized with the * vertical retrace. If the system supports it, you may * specify -1 to allow late swaps to happen immediately * instead of waiting for the next retrace. - * + * * \return 0 on success, or -1 if setting the swap interval is not supported. - * + * * \sa SDL_GL_GetSwapInterval() */ extern DECLSPEC int SDLCALL SDL_GL_SetSwapInterval(int interval); /** * \brief Get the swap interval for the current OpenGL context. - * - * \return 0 if there is no vertical retrace synchronization, 1 if the buffer + * + * \return 0 if there is no vertical retrace synchronization, 1 if the buffer * swap is synchronized with the vertical retrace, and -1 if late * swaps happen immediately instead of waiting for the next retrace. * If the system can't determine the swap interval, or there isn't a * valid current context, this will return 0 as a safe default. - * + * * \sa SDL_GL_SetSwapInterval() */ extern DECLSPEC int SDLCALL SDL_GL_GetSwapInterval(void); /** - * \brief Swap the OpenGL buffers for a window, if double-buffering is + * \brief Swap the OpenGL buffers for a window, if double-buffering is * supported. */ extern DECLSPEC void SDLCALL SDL_GL_SwapWindow(SDL_Window * window); /** * \brief Delete an OpenGL context. - * + * * \sa SDL_GL_CreateContext() */ extern DECLSPEC void SDLCALL SDL_GL_DeleteContext(SDL_GLContext context); @@ -936,9 +934,7 @@ extern DECLSPEC void SDLCALL SDL_GL_DeleteContext(SDL_GLContext context); /* Ends C function definitions when using C++ */ #ifdef __cplusplus -/* *INDENT-OFF* */ } -/* *INDENT-ON* */ #endif #include "close_code.h" diff --git a/include/begin_code.h b/include/begin_code.h index 4e613f94e..dd1f0616d 100644 --- a/include/begin_code.h +++ b/include/begin_code.h @@ -37,23 +37,23 @@ #ifndef DECLSPEC # if defined(__BEOS__) || defined(__HAIKU__) # if defined(__GNUC__) -# define DECLSPEC __declspec(dllexport) +# define DECLSPEC __declspec(dllexport) # else -# define DECLSPEC __declspec(export) +# define DECLSPEC __declspec(export) # endif # elif defined(__WIN32__) # ifdef __BORLANDC__ # ifdef BUILD_SDL # define DECLSPEC # else -# define DECLSPEC __declspec(dllimport) +# define DECLSPEC __declspec(dllimport) # endif # else -# define DECLSPEC __declspec(dllexport) +# define DECLSPEC __declspec(dllexport) # endif # else # if defined(__GNUC__) && __GNUC__ >= 4 -# define DECLSPEC __attribute__ ((visibility("default"))) +# define DECLSPEC __attribute__ ((visibility("default"))) # else # define DECLSPEC # endif @@ -106,7 +106,7 @@ defined(__WATCOMC__) || defined(__LCC__) || \ defined(__DECC) #ifndef __inline__ -#define __inline__ __inline +#define __inline__ __inline #endif #define SDL_INLINE_OKAY #else diff --git a/include/close_code.h b/include/close_code.h index 410060370..4901482d5 100644 --- a/include/close_code.h +++ b/include/close_code.h @@ -21,7 +21,7 @@ /** * \file close_code.h - * + * * This file reverses the effects of begin_code.h and should be included * after you finish any function and structure declarations in your headers */ diff --git a/src/SDL.c b/src/SDL.c index a61c710a7..5f28373a1 100644 --- a/src/SDL.c +++ b/src/SDL.c @@ -138,7 +138,7 @@ SDL_InitSubSystem(Uint32 flags) } if ((flags & SDL_INIT_GAMECONTROLLER)) { - // Game controller implies Joystick. + /* Game controller implies Joystick. */ flags |= SDL_INIT_JOYSTICK; } @@ -221,19 +221,19 @@ SDL_QuitSubSystem(Uint32 flags) /* Shut down requested initialized subsystems */ #if !SDL_JOYSTICK_DISABLED if ((flags & SDL_INIT_GAMECONTROLLER)) { - // Game controller implies Joystick. + /* Game controller implies Joystick. */ flags |= SDL_INIT_JOYSTICK; if (SDL_PrivateShouldQuitSubsystem(SDL_INIT_GAMECONTROLLER)) { SDL_GameControllerQuit(); - } + } SDL_PrivateSubsystemRefCountDecr(SDL_INIT_GAMECONTROLLER); } if ((flags & SDL_INIT_JOYSTICK)) { if (SDL_PrivateShouldQuitSubsystem(SDL_INIT_JOYSTICK)) { - SDL_JoystickQuit(); - } + SDL_JoystickQuit(); + } SDL_PrivateSubsystemRefCountDecr(SDL_INIT_JOYSTICK); } #endif @@ -241,8 +241,8 @@ SDL_QuitSubSystem(Uint32 flags) #if !SDL_HAPTIC_DISABLED if ((flags & SDL_INIT_HAPTIC)) { if (SDL_PrivateShouldQuitSubsystem(SDL_INIT_HAPTIC)) { - SDL_HapticQuit(); - } + SDL_HapticQuit(); + } SDL_PrivateSubsystemRefCountDecr(SDL_INIT_HAPTIC); } #endif @@ -250,8 +250,8 @@ SDL_QuitSubSystem(Uint32 flags) #if !SDL_AUDIO_DISABLED if ((flags & SDL_INIT_AUDIO)) { if (SDL_PrivateShouldQuitSubsystem(SDL_INIT_AUDIO)) { - SDL_AudioQuit(); - } + SDL_AudioQuit(); + } SDL_PrivateSubsystemRefCountDecr(SDL_INIT_AUDIO); } #endif @@ -259,8 +259,8 @@ SDL_QuitSubSystem(Uint32 flags) #if !SDL_VIDEO_DISABLED if ((flags & SDL_INIT_VIDEO)) { if (SDL_PrivateShouldQuitSubsystem(SDL_INIT_VIDEO)) { - SDL_VideoQuit(); - } + SDL_VideoQuit(); + } SDL_PrivateSubsystemRefCountDecr(SDL_INIT_VIDEO); } #endif @@ -268,8 +268,8 @@ SDL_QuitSubSystem(Uint32 flags) #if !SDL_TIMERS_DISABLED if ((flags & SDL_INIT_TIMER)) { if (SDL_PrivateShouldQuitSubsystem(SDL_INIT_TIMER)) { - SDL_TimerQuit(); - } + SDL_TimerQuit(); + } SDL_PrivateSubsystemRefCountDecr(SDL_INIT_TIMER); } #endif diff --git a/src/SDL_error.c b/src/SDL_error.c index 40388124b..98ef84ac6 100644 --- a/src/SDL_error.c +++ b/src/SDL_error.c @@ -31,12 +31,12 @@ #if SDL_THREADS_DISABLED /* The default (non-thread-safe) global error variable */ static SDL_error SDL_global_error; -#define SDL_GetErrBuf() (&SDL_global_error) +#define SDL_GetErrBuf() (&SDL_global_error) #else extern SDL_error *SDL_GetErrBuf(void); #endif /* SDL_THREADS_DISABLED */ -#define SDL_ERRBUFIZE 1024 +#define SDL_ERRBUFIZE 1024 /* Private functions */ @@ -57,7 +57,7 @@ SDL_SetError(const char *fmt, ...) /* Ignore call if invalid format pointer was passed */ if (fmt == NULL) return -1; - + /* Copy in the key, mark error as valid */ error = SDL_GetErrBuf(); error->error = 1; diff --git a/src/SDL_error_c.h b/src/SDL_error_c.h index 1277b086d..2014cc1e7 100644 --- a/src/SDL_error_c.h +++ b/src/SDL_error_c.h @@ -27,8 +27,8 @@ #ifndef _SDL_error_c_h #define _SDL_error_c_h -#define ERR_MAX_STRLEN 128 -#define ERR_MAX_ARGS 5 +#define ERR_MAX_STRLEN 128 +#define ERR_MAX_ARGS 5 typedef struct SDL_error { diff --git a/src/SDL_hints.c b/src/SDL_hints.c index ed635c76d..bd9404d46 100644 --- a/src/SDL_hints.c +++ b/src/SDL_hints.c @@ -41,14 +41,14 @@ SDL_bool SDL_RegisterHintChangedCb(const char *name, SDL_HintChangedCb hintCb) { SDL_Hint *hint; - + for (hint = SDL_hints; hint; hint = hint->next) { if (SDL_strcmp(name, hint->name) == 0) { hint->callback = hintCb; return SDL_TRUE; } } - + return SDL_FALSE; } diff --git a/src/SDL_hints_c.h b/src/SDL_hints_c.h index 74830c30c..232e26384 100644 --- a/src/SDL_hints_c.h +++ b/src/SDL_hints_c.h @@ -1,15 +1,15 @@ /* Simple DirectMedia Layer Copyright (C) 1997-2013 Sam Lantinga - + This software is provided 'as-is', without any express or implied warranty. In no event will the authors be held liable for any damages arising from the use of this software. - + Permission is granted to anyone to use this software for any purpose, including commercial applications, and to alter it and redistribute it freely, subject to the following restrictions: - + 1. The origin of this software must not be misrepresented; you must not claim that you wrote the original software. If you use this software in a product, an acknowledgment in the product documentation would be diff --git a/src/SDL_log.c b/src/SDL_log.c index b62f7fd5a..fd9545e4c 100644 --- a/src/SDL_log.c +++ b/src/SDL_log.c @@ -138,7 +138,7 @@ SDL_LogGetPriority(int category) } if (category == SDL_LOG_CATEGORY_TEST) { - return SDL_test_priority; + return SDL_test_priority; } else if (category == SDL_LOG_CATEGORY_APPLICATION) { return SDL_application_priority; } else if (category == SDL_LOG_CATEGORY_ASSERT) { @@ -328,19 +328,18 @@ SDL_LogOutput(void *userdata, int category, SDL_LogPriority priority, } } #elif defined(__PSP__) -//Simple Log System for PSP - { - unsigned int length; - char* output; - FILE* pFile; - length = SDL_strlen(SDL_priority_prefixes[priority]) + 2 + SDL_strlen(message) + 1; + { + unsigned int length; + char* output; + FILE* pFile; + length = SDL_strlen(SDL_priority_prefixes[priority]) + 2 + SDL_strlen(message) + 1; output = SDL_stack_alloc(char, length); - SDL_snprintf(output, length, "%s: %s", SDL_priority_prefixes[priority], message); - pFile = fopen ("SDL_Log.txt", "a"); - fwrite (output, strlen (output), 1, pFile); - SDL_stack_free(output); - fclose (pFile); - } + SDL_snprintf(output, length, "%s: %s", SDL_priority_prefixes[priority], message); + pFile = fopen ("SDL_Log.txt", "a"); + fwrite (output, strlen (output), 1, pFile); + SDL_stack_free(output); + fclose (pFile); + } #endif #if HAVE_STDIO_H fprintf(stderr, "%s: %s\n", SDL_priority_prefixes[priority], message); diff --git a/src/atomic/SDL_atomic.c b/src/atomic/SDL_atomic.c index 6cf2384a5..cd799dea7 100644 --- a/src/atomic/SDL_atomic.c +++ b/src/atomic/SDL_atomic.c @@ -29,8 +29,8 @@ */ #undef SDL_AtomicCAS #undef SDL_AtomicCASPtr - -/* + +/* If any of the operations are not provided then we must emulate some of them. That means we need a nice implementation of spin locks that avoids the "one big lock" problem. We use a vector of spin @@ -40,7 +40,7 @@ To generate the index of the lock we first shift by 3 bits to get rid on the zero bits that result from 32 and 64 bit allignment of data. We then mask off all but 5 bits and use those 5 bits as an - index into the table. + index into the table. Picking the lock this way insures that accesses to the same data at the same time will go to the same lock. OTOH, accesses to different diff --git a/src/atomic/SDL_spinlock.c b/src/atomic/SDL_spinlock.c index 12c06a33e..f3aeea0e2 100644 --- a/src/atomic/SDL_spinlock.c +++ b/src/atomic/SDL_spinlock.c @@ -76,11 +76,11 @@ SDL_AtomicTryLock(SDL_SpinLock *lock) return (result == 0); #elif defined(__GNUC__) && (defined(__i386__) || defined(__x86_64__)) - int result; - __asm__ __volatile__( + int result; + __asm__ __volatile__( "lock ; xchgl %0, (%1)\n" : "=r" (result) : "r" (lock), "0" (1) : "cc", "memory"); - return (result == 0); + return (result == 0); #elif defined(__MACOSX__) || defined(__IPHONEOS__) /* Maybe used for PowerPC, but the Intel asm or gcc atomics are favored. */ @@ -114,10 +114,10 @@ SDL_AtomicUnlock(SDL_SpinLock *lock) #elif HAVE_GCC_ATOMICS || HAVE_GCC_SYNC_LOCK_TEST_AND_SET __sync_lock_release(lock); - + #elif HAVE_PTHREAD_SPINLOCK pthread_spin_unlock(lock); - + #else *lock = 0; #endif diff --git a/src/audio/SDL_audiocvt.c b/src/audio/SDL_audiocvt.c index 2d067e779..1ccd83d74 100644 --- a/src/audio/SDL_audiocvt.c +++ b/src/audio/SDL_audiocvt.c @@ -972,7 +972,7 @@ SDL_BuildAudioCVT(SDL_AudioCVT * cvt, if (cvt == NULL) { return SDL_InvalidParamError("cvt"); } - + /* there are no unsigned types over 16 bits, so catch this up front. */ if ((SDL_AUDIO_BITSIZE(src_fmt) > 16) && (!SDL_AUDIO_ISSIGNED(src_fmt))) { return SDL_SetError("Invalid source format"); diff --git a/src/audio/SDL_audiodev.c b/src/audio/SDL_audiodev.c index 048a8a54e..91b60c376 100644 --- a/src/audio/SDL_audiodev.c +++ b/src/audio/SDL_audiodev.c @@ -40,10 +40,10 @@ #endif #endif #ifndef _PATH_DEV_DSP24 -#define _PATH_DEV_DSP24 "/dev/sound/dsp" +#define _PATH_DEV_DSP24 "/dev/sound/dsp" #endif #ifndef _PATH_DEV_AUDIO -#define _PATH_DEV_AUDIO "/dev/audio" +#define _PATH_DEV_AUDIO "/dev/audio" #endif static inline void diff --git a/src/audio/SDL_audiomem.h b/src/audio/SDL_audiomem.h index 558ea4985..8c027c3a5 100644 --- a/src/audio/SDL_audiomem.h +++ b/src/audio/SDL_audiomem.h @@ -20,6 +20,6 @@ */ #include "SDL_config.h" -#define SDL_AllocAudioMem SDL_malloc -#define SDL_FreeAudioMem SDL_free +#define SDL_AllocAudioMem SDL_malloc +#define SDL_FreeAudioMem SDL_free /* vi: set ts=4 sw=4 expandtab: */ diff --git a/src/audio/SDL_mixer.c b/src/audio/SDL_mixer.c index b45102daa..37907596f 100644 --- a/src/audio/SDL_mixer.c +++ b/src/audio/SDL_mixer.c @@ -82,8 +82,8 @@ static const Uint8 mix8[] = { }; /* The volume ranges from 0 - 128 */ -#define ADJUST_VOLUME(s, v) (s = (s*v)/SDL_MIX_MAXVOLUME) -#define ADJUST_VOLUME_U8(s, v) (s = (((s-128)*v)/SDL_MIX_MAXVOLUME)+128) +#define ADJUST_VOLUME(s, v) (s = (s*v)/SDL_MIX_MAXVOLUME) +#define ADJUST_VOLUME_U8(s, v) (s = (((s-128)*v)/SDL_MIX_MAXVOLUME)+128) void diff --git a/src/audio/SDL_sysaudio.h b/src/audio/SDL_sysaudio.h index 13c82045e..83919c6e4 100644 --- a/src/audio/SDL_sysaudio.h +++ b/src/audio/SDL_sysaudio.h @@ -28,7 +28,7 @@ /* The SDL audio driver */ typedef struct SDL_AudioDevice SDL_AudioDevice; -#define _THIS SDL_AudioDevice *_this +#define _THIS SDL_AudioDevice *_this /* Used by audio targets during DetectDevices() */ typedef void (*SDL_AddAudioDevice)(const char *name); diff --git a/src/audio/SDL_wave.h b/src/audio/SDL_wave.h index d66e684d2..d82399cb8 100644 --- a/src/audio/SDL_wave.h +++ b/src/audio/SDL_wave.h @@ -25,26 +25,26 @@ /*******************************************/ /* Define values for Microsoft WAVE format */ /*******************************************/ -#define RIFF 0x46464952 /* "RIFF" */ -#define WAVE 0x45564157 /* "WAVE" */ -#define FACT 0x74636166 /* "fact" */ -#define LIST 0x5453494c /* "LIST" */ -#define FMT 0x20746D66 /* "fmt " */ -#define DATA 0x61746164 /* "data" */ -#define PCM_CODE 0x0001 -#define MS_ADPCM_CODE 0x0002 -#define IEEE_FLOAT_CODE 0x0003 -#define IMA_ADPCM_CODE 0x0011 -#define MP3_CODE 0x0055 -#define WAVE_MONO 1 -#define WAVE_STEREO 2 +#define RIFF 0x46464952 /* "RIFF" */ +#define WAVE 0x45564157 /* "WAVE" */ +#define FACT 0x74636166 /* "fact" */ +#define LIST 0x5453494c /* "LIST" */ +#define FMT 0x20746D66 /* "fmt " */ +#define DATA 0x61746164 /* "data" */ +#define PCM_CODE 0x0001 +#define MS_ADPCM_CODE 0x0002 +#define IEEE_FLOAT_CODE 0x0003 +#define IMA_ADPCM_CODE 0x0011 +#define MP3_CODE 0x0055 +#define WAVE_MONO 1 +#define WAVE_STEREO 2 /* Normally, these three chunks come consecutively in a WAVE file */ typedef struct WaveFMT { /* Not saved in the chunk we read: - Uint32 FMTchunk; - Uint32 fmtlen; + Uint32 FMTchunk; + Uint32 fmtlen; */ Uint16 encoding; Uint16 channels; /* 1 = mono, 2 = stereo */ @@ -61,4 +61,5 @@ typedef struct Chunk Uint32 length; Uint8 *data; } Chunk; + /* vi: set ts=4 sw=4 expandtab: */ diff --git a/src/audio/alsa/SDL_alsa_audio.c b/src/audio/alsa/SDL_alsa_audio.c index 9b5e75624..180064f31 100644 --- a/src/audio/alsa/SDL_alsa_audio.c +++ b/src/audio/alsa/SDL_alsa_audio.c @@ -155,7 +155,7 @@ static void UnloadALSALibrary(void) { if (alsa_handle != NULL) { - SDL_UnloadObject(alsa_handle); + SDL_UnloadObject(alsa_handle); alsa_handle = NULL; } } diff --git a/src/audio/alsa/SDL_alsa_audio.h b/src/audio/alsa/SDL_alsa_audio.h index 50acd5a33..5a4bf7fcf 100644 --- a/src/audio/alsa/SDL_alsa_audio.h +++ b/src/audio/alsa/SDL_alsa_audio.h @@ -28,7 +28,7 @@ #include "../SDL_sysaudio.h" /* Hidden "this" pointer for the audio functions */ -#define _THIS SDL_AudioDevice *this +#define _THIS SDL_AudioDevice *this struct SDL_PrivateAudioData { diff --git a/src/audio/android/SDL_androidaudio.c b/src/audio/android/SDL_androidaudio.c index a1df47512..45c128282 100644 --- a/src/audio/android/SDL_androidaudio.c +++ b/src/audio/android/SDL_androidaudio.c @@ -40,12 +40,12 @@ AndroidAUD_OpenDevice(_THIS, const char *devname, int iscapture) SDL_AudioFormat test_format; if (iscapture) { - //TODO: implement capture - return SDL_SetError("Capture not supported on Android"); + /* TODO: implement capture */ + return SDL_SetError("Capture not supported on Android"); } if (audioDevice != NULL) { - return SDL_SetError("Only one audio device at a time please!"); + return SDL_SetError("Only one audio device at a time please!"); } audioDevice = this; @@ -57,39 +57,39 @@ AndroidAUD_OpenDevice(_THIS, const char *devname, int iscapture) SDL_memset(this->hidden, 0, (sizeof *this->hidden)); test_format = SDL_FirstAudioFormat(this->spec.format); - while (test_format != 0) { // no "UNKNOWN" constant + while (test_format != 0) { /* no "UNKNOWN" constant */ if ((test_format == AUDIO_U8) || (test_format == AUDIO_S16LSB)) { this->spec.format = test_format; break; } test_format = SDL_NextAudioFormat(); } - + if (test_format == 0) { - // Didn't find a compatible format :( - return SDL_SetError("No compatible audio format!"); + /* Didn't find a compatible format :( */ + return SDL_SetError("No compatible audio format!"); } if (this->spec.channels > 1) { - this->spec.channels = 2; + this->spec.channels = 2; } else { - this->spec.channels = 1; + this->spec.channels = 1; } if (this->spec.freq < 8000) { - this->spec.freq = 8000; + this->spec.freq = 8000; } if (this->spec.freq > 48000) { - this->spec.freq = 48000; + this->spec.freq = 48000; } - // TODO: pass in/return a (Java) device ID, also whether we're opening for input or output + /* TODO: pass in/return a (Java) device ID, also whether we're opening for input or output */ this->spec.samples = Android_JNI_OpenAudioDevice(this->spec.freq, this->spec.format == AUDIO_U8 ? 0 : 1, this->spec.channels, this->spec.samples); SDL_CalculateAudioSpec(&this->spec); if (this->spec.samples == 0) { - // Init failed? - return SDL_SetError("Java-side initialization failed!"); + /* Init failed? */ + return SDL_SetError("Java-side initialization failed!"); } return 0; @@ -111,13 +111,13 @@ static void AndroidAUD_CloseDevice(_THIS) { if (this->hidden != NULL) { - SDL_free(this->hidden); - this->hidden = NULL; + SDL_free(this->hidden); + this->hidden = NULL; } - Android_JNI_CloseAudioDevice(); + Android_JNI_CloseAudioDevice(); if (audioDevice == this) { - audioDevice = NULL; + audioDevice = NULL; } } @@ -132,7 +132,7 @@ AndroidAUD_Init(SDL_AudioDriverImpl * impl) /* and the capabilities */ impl->ProvidesOwnCallbackThread = 1; - impl->HasCaptureSupport = 0; //TODO + impl->HasCaptureSupport = 0; /* TODO */ impl->OnlyHasDefaultOutputDevice = 1; impl->OnlyHasDefaultInputDevice = 1; @@ -147,7 +147,7 @@ AudioBootStrap ANDROIDAUD_bootstrap = { void Android_RunAudioThread() { - SDL_RunAudio(audioDevice); + SDL_RunAudio(audioDevice); } #endif /* SDL_AUDIO_DRIVER_ANDROID */ diff --git a/src/audio/android/SDL_androidaudio.h b/src/audio/android/SDL_androidaudio.h index fbadcfc71..383c708b7 100644 --- a/src/audio/android/SDL_androidaudio.h +++ b/src/audio/android/SDL_androidaudio.h @@ -26,7 +26,7 @@ #include "../SDL_sysaudio.h" /* Hidden "this" pointer for the audio functions */ -#define _THIS SDL_AudioDevice *this +#define _THIS SDL_AudioDevice *this struct SDL_PrivateAudioData { diff --git a/src/audio/arts/SDL_artsaudio.h b/src/audio/arts/SDL_artsaudio.h index 8b3f290b1..1387cc5c0 100644 --- a/src/audio/arts/SDL_artsaudio.h +++ b/src/audio/arts/SDL_artsaudio.h @@ -28,7 +28,7 @@ #include "../SDL_sysaudio.h" /* Hidden "this" pointer for the audio functions */ -#define _THIS SDL_AudioDevice *this +#define _THIS SDL_AudioDevice *this struct SDL_PrivateAudioData { @@ -46,7 +46,7 @@ struct SDL_PrivateAudioData float frame_ticks; float next_frame; }; -#define FUDGE_TICKS 10 /* The scheduler overhead ticks per frame */ +#define FUDGE_TICKS 10 /* The scheduler overhead ticks per frame */ #endif /* _SDL_artscaudio_h */ /* vi: set ts=4 sw=4 expandtab: */ diff --git a/src/audio/baudio/SDL_beaudio.h b/src/audio/baudio/SDL_beaudio.h index 9ce5af235..61f9dec83 100644 --- a/src/audio/baudio/SDL_beaudio.h +++ b/src/audio/baudio/SDL_beaudio.h @@ -26,7 +26,7 @@ #include "../SDL_sysaudio.h" /* Hidden "this" pointer for the audio functions */ -#define _THIS SDL_AudioDevice *_this +#define _THIS SDL_AudioDevice *_this struct SDL_PrivateAudioData { diff --git a/src/audio/bsd/SDL_bsdaudio.h b/src/audio/bsd/SDL_bsdaudio.h index b06aca9c9..b64be31b2 100644 --- a/src/audio/bsd/SDL_bsdaudio.h +++ b/src/audio/bsd/SDL_bsdaudio.h @@ -25,7 +25,7 @@ #include "../SDL_sysaudio.h" -#define _THIS SDL_AudioDevice *this +#define _THIS SDL_AudioDevice *this struct SDL_PrivateAudioData { @@ -44,7 +44,7 @@ struct SDL_PrivateAudioData float next_frame; }; -#define FUDGE_TICKS 10 /* The scheduler overhead ticks per frame */ +#define FUDGE_TICKS 10 /* The scheduler overhead ticks per frame */ #endif /* _SDL_bsdaudio_h */ diff --git a/src/audio/coreaudio/SDL_coreaudio.c b/src/audio/coreaudio/SDL_coreaudio.c index 8f83d0b39..a35135a2f 100644 --- a/src/audio/coreaudio/SDL_coreaudio.c +++ b/src/audio/coreaudio/SDL_coreaudio.c @@ -308,8 +308,8 @@ inputCallback(void *inRefCon, UInt32 inBusNumber, UInt32 inNumberFrames, AudioBufferList * ioData) { - //err = AudioUnitRender(afr->fAudioUnit, ioActionFlags, inTimeStamp, inBusNumber, inNumberFrames, afr->fAudioBuffer); - // !!! FIXME: write me! + /* err = AudioUnitRender(afr->fAudioUnit, ioActionFlags, inTimeStamp, inBusNumber, inNumberFrames, afr->fAudioBuffer); */ + /* !!! FIXME: write me! */ return noErr; } @@ -380,7 +380,7 @@ prepare_audiounit(_THIS, const char *devname, int iscapture, return 0; } #endif - + SDL_zero(desc); desc.componentType = kAudioUnitType_Output; desc.componentManufacturer = kAudioUnitManufacturer_Apple; diff --git a/src/audio/coreaudio/SDL_coreaudio.h b/src/audio/coreaudio/SDL_coreaudio.h index 31057557e..a05d4504f 100644 --- a/src/audio/coreaudio/SDL_coreaudio.h +++ b/src/audio/coreaudio/SDL_coreaudio.h @@ -42,7 +42,7 @@ #include /* Hidden "this" pointer for the audio functions */ -#define _THIS SDL_AudioDevice *this +#define _THIS SDL_AudioDevice *this struct SDL_PrivateAudioData { diff --git a/src/audio/directsound/SDL_directsound.h b/src/audio/directsound/SDL_directsound.h index 37a6ee133..758299f14 100644 --- a/src/audio/directsound/SDL_directsound.h +++ b/src/audio/directsound/SDL_directsound.h @@ -28,7 +28,7 @@ #include "../SDL_sysaudio.h" /* Hidden "this" pointer for the audio functions */ -#define _THIS SDL_AudioDevice *this +#define _THIS SDL_AudioDevice *this /* The DirectSound objects */ struct SDL_PrivateAudioData diff --git a/src/audio/directsound/directx.h b/src/audio/directsound/directx.h index 8ddfa00cb..963d2b88e 100644 --- a/src/audio/directsound/directx.h +++ b/src/audio/directsound/directx.h @@ -19,47 +19,47 @@ /* Error codes not yet included in Win32 API header files */ #ifndef MAKE_HRESULT #define MAKE_HRESULT(sev,fac,code) \ - ((HRESULT)(((unsigned long)(sev)<<31) | ((unsigned long)(fac)<<16) | ((unsigned long)(code)))) + ((HRESULT)(((unsigned long)(sev)<<31) | ((unsigned long)(fac)<<16) | ((unsigned long)(code)))) #endif #ifndef S_OK -#define S_OK (HRESULT)0x00000000L +#define S_OK (HRESULT)0x00000000L #endif #ifndef SUCCEEDED -#define SUCCEEDED(x) ((HRESULT)(x) >= 0) +#define SUCCEEDED(x) ((HRESULT)(x) >= 0) #endif #ifndef FAILED -#define FAILED(x) ((HRESULT)(x)<0) +#define FAILED(x) ((HRESULT)(x)<0) #endif #ifndef E_FAIL -#define E_FAIL (HRESULT)0x80000008L +#define E_FAIL (HRESULT)0x80000008L #endif #ifndef E_NOINTERFACE -#define E_NOINTERFACE (HRESULT)0x80004002L +#define E_NOINTERFACE (HRESULT)0x80004002L #endif #ifndef E_OUTOFMEMORY -#define E_OUTOFMEMORY (HRESULT)0x8007000EL +#define E_OUTOFMEMORY (HRESULT)0x8007000EL #endif #ifndef E_INVALIDARG -#define E_INVALIDARG (HRESULT)0x80070057L +#define E_INVALIDARG (HRESULT)0x80070057L #endif #ifndef E_NOTIMPL -#define E_NOTIMPL (HRESULT)0x80004001L +#define E_NOTIMPL (HRESULT)0x80004001L #endif #ifndef REGDB_E_CLASSNOTREG -#define REGDB_E_CLASSNOTREG (HRESULT)0x80040154L +#define REGDB_E_CLASSNOTREG (HRESULT)0x80040154L #endif /* Severity codes */ #ifndef SEVERITY_ERROR -#define SEVERITY_ERROR 1 +#define SEVERITY_ERROR 1 #endif /* Error facility codes */ #ifndef FACILITY_WIN32 -#define FACILITY_WIN32 7 +#define FACILITY_WIN32 7 #endif #ifndef FIELD_OFFSET diff --git a/src/audio/disk/SDL_diskaudio.h b/src/audio/disk/SDL_diskaudio.h index 3869bd145..7e5b48406 100644 --- a/src/audio/disk/SDL_diskaudio.h +++ b/src/audio/disk/SDL_diskaudio.h @@ -27,7 +27,7 @@ #include "../SDL_sysaudio.h" /* Hidden "this" pointer for the audio functions */ -#define _THIS SDL_AudioDevice *this +#define _THIS SDL_AudioDevice *this struct SDL_PrivateAudioData { diff --git a/src/audio/dsp/SDL_dspaudio.c b/src/audio/dsp/SDL_dspaudio.c index f868e874a..c62a22f8a 100644 --- a/src/audio/dsp/SDL_dspaudio.c +++ b/src/audio/dsp/SDL_dspaudio.c @@ -161,7 +161,7 @@ DSP_OpenDevice(_THIS, const char *devname, int iscapture) break; #if 0 /* - * These formats are not used by any real life systems so they are not + * These formats are not used by any real life systems so they are not * needed here. */ case AUDIO_S8: diff --git a/src/audio/dsp/SDL_dspaudio.h b/src/audio/dsp/SDL_dspaudio.h index 9f7df71c5..62ed45f18 100644 --- a/src/audio/dsp/SDL_dspaudio.h +++ b/src/audio/dsp/SDL_dspaudio.h @@ -26,7 +26,7 @@ #include "../SDL_sysaudio.h" /* Hidden "this" pointer for the audio functions */ -#define _THIS SDL_AudioDevice *this +#define _THIS SDL_AudioDevice *this struct SDL_PrivateAudioData { @@ -37,7 +37,7 @@ struct SDL_PrivateAudioData Uint8 *mixbuf; int mixlen; }; -#define FUDGE_TICKS 10 /* The scheduler overhead ticks per frame */ +#define FUDGE_TICKS 10 /* The scheduler overhead ticks per frame */ #endif /* _SDL_dspaudio_h */ /* vi: set ts=4 sw=4 expandtab: */ diff --git a/src/audio/dummy/SDL_dummyaudio.h b/src/audio/dummy/SDL_dummyaudio.h index 22a4cd242..c0015a54d 100644 --- a/src/audio/dummy/SDL_dummyaudio.h +++ b/src/audio/dummy/SDL_dummyaudio.h @@ -26,7 +26,7 @@ #include "../SDL_sysaudio.h" /* Hidden "this" pointer for the audio functions */ -#define _THIS SDL_AudioDevice *this +#define _THIS SDL_AudioDevice *this struct SDL_PrivateAudioData { diff --git a/src/audio/esd/SDL_esdaudio.c b/src/audio/esd/SDL_esdaudio.c index cdc12120f..92716f39b 100644 --- a/src/audio/esd/SDL_esdaudio.c +++ b/src/audio/esd/SDL_esdaudio.c @@ -40,7 +40,7 @@ #include "SDL_name.h" #include "SDL_loadso.h" #else -#define SDL_NAME(X) X +#define SDL_NAME(X) X #endif #ifdef SDL_AUDIO_DRIVER_ESD_DYNAMIC @@ -123,7 +123,7 @@ ESD_WaitDevice(_THIS) /* Check to see if the thread-parent process is still alive */ { static int cnt = 0; - /* Note that this only works with thread implementations + /* Note that this only works with thread implementations that use a different process id for each thread. */ /* Check every 10 loops */ diff --git a/src/audio/esd/SDL_esdaudio.h b/src/audio/esd/SDL_esdaudio.h index ab0e25217..26bea9cf0 100644 --- a/src/audio/esd/SDL_esdaudio.h +++ b/src/audio/esd/SDL_esdaudio.h @@ -26,7 +26,7 @@ #include "../SDL_sysaudio.h" /* Hidden "this" pointer for the audio functions */ -#define _THIS SDL_AudioDevice *this +#define _THIS SDL_AudioDevice *this struct SDL_PrivateAudioData { @@ -44,7 +44,7 @@ struct SDL_PrivateAudioData float frame_ticks; float next_frame; }; -#define FUDGE_TICKS 10 /* The scheduler overhead ticks per frame */ +#define FUDGE_TICKS 10 /* The scheduler overhead ticks per frame */ #endif /* _SDL_esdaudio_h */ /* vi: set ts=4 sw=4 expandtab: */ diff --git a/src/audio/fusionsound/SDL_fsaudio.c b/src/audio/fusionsound/SDL_fsaudio.c index bc279fec6..2e468d5c6 100644 --- a/src/audio/fusionsound/SDL_fsaudio.c +++ b/src/audio/fusionsound/SDL_fsaudio.c @@ -37,13 +37,13 @@ #include -//#define SDL_AUDIO_DRIVER_FUSIONSOUND_DYNAMIC "libfusionsound.so" +/* #define SDL_AUDIO_DRIVER_FUSIONSOUND_DYNAMIC "libfusionsound.so" */ #ifdef SDL_AUDIO_DRIVER_FUSIONSOUND_DYNAMIC #include "SDL_name.h" #include "SDL_loadso.h" #else -#define SDL_NAME(X) X +#define SDL_NAME(X) X #endif #if (FUSIONSOUND_MAJOR_VERSION == 1) && (FUSIONSOUND_MINOR_VERSION < 1) @@ -51,7 +51,7 @@ typedef DFBResult DirectResult; #endif /* Buffers to use - more than 2 gives a lot of latency */ -#define FUSION_BUFFERS (2) +#define FUSION_BUFFERS (2) #ifdef SDL_AUDIO_DRIVER_FUSIONSOUND_DYNAMIC diff --git a/src/audio/fusionsound/SDL_fsaudio.h b/src/audio/fusionsound/SDL_fsaudio.h index 0c313d666..7f2277501 100644 --- a/src/audio/fusionsound/SDL_fsaudio.h +++ b/src/audio/fusionsound/SDL_fsaudio.h @@ -28,7 +28,7 @@ #include "../SDL_sysaudio.h" /* Hidden "this" pointer for the audio functions */ -#define _THIS SDL_AudioDevice *this +#define _THIS SDL_AudioDevice *this struct SDL_PrivateAudioData { diff --git a/src/audio/nas/SDL_nasaudio.h b/src/audio/nas/SDL_nasaudio.h index 65739cdf7..85bd761dd 100644 --- a/src/audio/nas/SDL_nasaudio.h +++ b/src/audio/nas/SDL_nasaudio.h @@ -33,7 +33,7 @@ #include "../SDL_sysaudio.h" /* Hidden "this" pointer for the audio functions */ -#define _THIS SDL_AudioDevice *this +#define _THIS SDL_AudioDevice *this struct SDL_PrivateAudioData { diff --git a/src/audio/paudio/SDL_paudio.c b/src/audio/paudio/SDL_paudio.c index 3966d1e7a..5a18b45e5 100644 --- a/src/audio/paudio/SDL_paudio.c +++ b/src/audio/paudio/SDL_paudio.c @@ -48,13 +48,13 @@ #include /* Open the audio device for playback, and don't block if busy */ -/* #define OPEN_FLAGS (O_WRONLY|O_NONBLOCK) */ -#define OPEN_FLAGS O_WRONLY +/* #define OPEN_FLAGS (O_WRONLY|O_NONBLOCK) */ +#define OPEN_FLAGS O_WRONLY /* Get the name of the audio device we use for output */ #ifndef _PATH_DEV_DSP -#define _PATH_DEV_DSP "/dev/%caud%c/%c" +#define _PATH_DEV_DSP "/dev/%caud%c/%c" #endif static char devsettings[][3] = { diff --git a/src/audio/paudio/SDL_paudio.h b/src/audio/paudio/SDL_paudio.h index 0aa0e2be9..7be1ed651 100644 --- a/src/audio/paudio/SDL_paudio.h +++ b/src/audio/paudio/SDL_paudio.h @@ -26,7 +26,7 @@ #include "../SDL_sysaudio.h" /* Hidden "this" pointer for the audio functions */ -#define _THIS SDL_AudioDevice *this +#define _THIS SDL_AudioDevice *this struct SDL_PrivateAudioData { @@ -41,7 +41,7 @@ struct SDL_PrivateAudioData float frame_ticks; float next_frame; }; -#define FUDGE_TICKS 10 /* The scheduler overhead ticks per frame */ +#define FUDGE_TICKS 10 /* The scheduler overhead ticks per frame */ #endif /* _SDL_paudaudio_h */ /* vi: set ts=4 sw=4 expandtab: */ diff --git a/src/audio/psp/SDL_pspaudio.c b/src/audio/psp/SDL_pspaudio.c index fc03a8754..4b5534a3c 100644 --- a/src/audio/psp/SDL_pspaudio.c +++ b/src/audio/psp/SDL_pspaudio.c @@ -42,28 +42,28 @@ static int PSPAUD_OpenDevice(_THIS, const char *devname, int iscapture) { - int format, mixlen, i; + int format, mixlen, i; this->hidden = (struct SDL_PrivateAudioData *) SDL_malloc(sizeof(*this->hidden)); if (this->hidden == NULL) { return SDL_OutOfMemory(); } SDL_memset(this->hidden, 0, sizeof(*this->hidden)); - switch (this->spec.format & 0xff) { - case 8: - case 16: - this->spec.format = AUDIO_S16LSB; - break; - default: - return SDL_SetError("Unsupported audio format"); - } + switch (this->spec.format & 0xff) { + case 8: + case 16: + this->spec.format = AUDIO_S16LSB; + break; + default: + return SDL_SetError("Unsupported audio format"); + } - /* The sample count must be a multiple of 64. */ - this->spec.samples = PSP_AUDIO_SAMPLE_ALIGN(this->spec.samples); - this->spec.freq = 44100; + /* The sample count must be a multiple of 64. */ + this->spec.samples = PSP_AUDIO_SAMPLE_ALIGN(this->spec.samples); + this->spec.freq = 44100; - /* Update the fragment size as size in bytes. */ -// SDL_CalculateAudioSpec(this->spec); MOD + /* Update the fragment size as size in bytes. */ +// SDL_CalculateAudioSpec(this->spec); MOD switch (this->spec.format) { case AUDIO_U8: this->spec.silence = 0x80; @@ -75,86 +75,86 @@ PSPAUD_OpenDevice(_THIS, const char *devname, int iscapture) this->spec.size = SDL_AUDIO_BITSIZE(this->spec.format) / 8; this->spec.size *= this->spec.channels; this->spec.size *= this->spec.samples; - + //========================================== - /* Allocate the mixing buffer. Its size and starting address must - be a multiple of 64 bytes. Our sample count is already a multiple of - 64, so spec->size should be a multiple of 64 as well. */ - mixlen = this->spec.size * NUM_BUFFERS; - this->hidden->rawbuf = (Uint8 *) memalign(64, mixlen); - if (this->hidden->rawbuf == NULL) { - return SDL_SetError("Couldn't allocate mixing buffer"); - } + /* Allocate the mixing buffer. Its size and starting address must + be a multiple of 64 bytes. Our sample count is already a multiple of + 64, so spec->size should be a multiple of 64 as well. */ + mixlen = this->spec.size * NUM_BUFFERS; + this->hidden->rawbuf = (Uint8 *) memalign(64, mixlen); + if (this->hidden->rawbuf == NULL) { + return SDL_SetError("Couldn't allocate mixing buffer"); + } - /* Setup the hardware channel. */ - if (this->spec.channels == 1) { - format = PSP_AUDIO_FORMAT_MONO; - } else { - format = PSP_AUDIO_FORMAT_STEREO; - } - this->hidden->channel = sceAudioChReserve(PSP_AUDIO_NEXT_CHANNEL, this->spec.samples, format); - if (this->hidden->channel < 0) { - free(this->hidden->rawbuf); - this->hidden->rawbuf = NULL; - return SDL_SetError("Couldn't reserve hardware channel"); - } + /* Setup the hardware channel. */ + if (this->spec.channels == 1) { + format = PSP_AUDIO_FORMAT_MONO; + } else { + format = PSP_AUDIO_FORMAT_STEREO; + } + this->hidden->channel = sceAudioChReserve(PSP_AUDIO_NEXT_CHANNEL, this->spec.samples, format); + if (this->hidden->channel < 0) { + free(this->hidden->rawbuf); + this->hidden->rawbuf = NULL; + return SDL_SetError("Couldn't reserve hardware channel"); + } - memset(this->hidden->rawbuf, 0, mixlen); - for (i = 0; i < NUM_BUFFERS; i++) { - this->hidden->mixbufs[i] = &this->hidden->rawbuf[i * this->spec.size]; - } + memset(this->hidden->rawbuf, 0, mixlen); + for (i = 0; i < NUM_BUFFERS; i++) { + this->hidden->mixbufs[i] = &this->hidden->rawbuf[i * this->spec.size]; + } - this->hidden->next_buffer = 0; - return 0; + this->hidden->next_buffer = 0; + return 0; } static void PSPAUD_PlayDevice(_THIS) { - Uint8 *mixbuf = this->hidden->mixbufs[this->hidden->next_buffer]; + Uint8 *mixbuf = this->hidden->mixbufs[this->hidden->next_buffer]; - if (this->spec.channels == 1) { - sceAudioOutputBlocking(this->hidden->channel, PSP_AUDIO_VOLUME_MAX, mixbuf); - } else { - sceAudioOutputPannedBlocking(this->hidden->channel, PSP_AUDIO_VOLUME_MAX, PSP_AUDIO_VOLUME_MAX, mixbuf); - } + if (this->spec.channels == 1) { + sceAudioOutputBlocking(this->hidden->channel, PSP_AUDIO_VOLUME_MAX, mixbuf); + } else { + sceAudioOutputPannedBlocking(this->hidden->channel, PSP_AUDIO_VOLUME_MAX, PSP_AUDIO_VOLUME_MAX, mixbuf); + } - this->hidden->next_buffer = (this->hidden->next_buffer + 1) % NUM_BUFFERS; + this->hidden->next_buffer = (this->hidden->next_buffer + 1) % NUM_BUFFERS; } /* This function waits until it is possible to write a full sound buffer */ static void PSPAUD_WaitDevice(_THIS) { - /* Because we block when sending audio, there's no need for this function to do anything. */ + /* Because we block when sending audio, there's no need for this function to do anything. */ } static Uint8 *PSPAUD_GetDeviceBuf(_THIS) { - return this->hidden->mixbufs[this->hidden->next_buffer]; + return this->hidden->mixbufs[this->hidden->next_buffer]; } static void PSPAUD_CloseDevice(_THIS) { - if (this->hidden->channel >= 0) { - sceAudioChRelease(this->hidden->channel); - this->hidden->channel = -1; - } + if (this->hidden->channel >= 0) { + sceAudioChRelease(this->hidden->channel); + this->hidden->channel = -1; + } - if (this->hidden->rawbuf != NULL) { - free(this->hidden->rawbuf); - this->hidden->rawbuf = NULL; - } + if (this->hidden->rawbuf != NULL) { + free(this->hidden->rawbuf); + this->hidden->rawbuf = NULL; + } } static void PSPAUD_ThreadInit(_THIS) { - /* Increase the priority of this audio thread by 1 to put it - ahead of other SDL threads. */ - SceUID thid; - SceKernelThreadInfo status; - thid = sceKernelGetThreadId(); - status.size = sizeof(SceKernelThreadInfo); - if (sceKernelReferThreadStatus(thid, &status) == 0) { - sceKernelChangeThreadPriority(thid, status.currentPriority - 1); - } + /* Increase the priority of this audio thread by 1 to put it + ahead of other SDL threads. */ + SceUID thid; + SceKernelThreadInfo status; + thid = sceKernelGetThreadId(); + status.size = sizeof(SceKernelThreadInfo); + if (sceKernelReferThreadStatus(thid, &status) == 0) { + sceKernelChangeThreadPriority(thid, status.currentPriority - 1); + } } @@ -162,17 +162,17 @@ static int PSPAUD_Init(SDL_AudioDriverImpl * impl) { - // Set the function pointers + // Set the function pointers impl->OpenDevice = PSPAUD_OpenDevice; impl->PlayDevice = PSPAUD_PlayDevice; impl->WaitDevice = PSPAUD_WaitDevice; - impl->GetDeviceBuf = PSPAUD_GetDeviceBuf; + impl->GetDeviceBuf = PSPAUD_GetDeviceBuf; impl->WaitDone = PSPAUD_WaitDevice; impl->CloseDevice = PSPAUD_CloseDevice; impl->ThreadInit = PSPAUD_ThreadInit; - + //PSP audio device - impl->OnlyHasDefaultOutputDevice = 1; + impl->OnlyHasDefaultOutputDevice = 1; /* impl->HasCaptureSupport = 1; diff --git a/src/audio/psp/SDL_pspaudio.h b/src/audio/psp/SDL_pspaudio.h index 22cf2d327..139476c6b 100644 --- a/src/audio/psp/SDL_pspaudio.h +++ b/src/audio/psp/SDL_pspaudio.h @@ -25,19 +25,19 @@ #include "../SDL_sysaudio.h" /* Hidden "this" pointer for the video functions */ -#define _THIS SDL_AudioDevice *this +#define _THIS SDL_AudioDevice *this #define NUM_BUFFERS 2 struct SDL_PrivateAudioData { - /* The hardware output channel. */ - int channel; - /* The raw allocated mixing buffer. */ - Uint8 *rawbuf; - /* Individual mixing buffers. */ - Uint8 *mixbufs[NUM_BUFFERS]; - /* Index of the next available mixing buffer. */ - int next_buffer; + /* The hardware output channel. */ + int channel; + /* The raw allocated mixing buffer. */ + Uint8 *rawbuf; + /* Individual mixing buffers. */ + Uint8 *mixbufs[NUM_BUFFERS]; + /* Index of the next available mixing buffer. */ + int next_buffer; }; #endif /* _SDL_pspaudio_h */ diff --git a/src/audio/pulseaudio/SDL_pulseaudio.c b/src/audio/pulseaudio/SDL_pulseaudio.c index 12021e6de..c8d25a800 100644 --- a/src/audio/pulseaudio/SDL_pulseaudio.c +++ b/src/audio/pulseaudio/SDL_pulseaudio.c @@ -131,7 +131,7 @@ static void UnloadPulseAudioLibrary(void) { if (pulseaudio_handle != NULL) { - SDL_UnloadObject(pulseaudio_handle); + SDL_UnloadObject(pulseaudio_handle); pulseaudio_handle = NULL; } } diff --git a/src/audio/sun/SDL_sunaudio.c b/src/audio/sun/SDL_sunaudio.c index 37e175e10..950ba444c 100644 --- a/src/audio/sun/SDL_sunaudio.c +++ b/src/audio/sun/SDL_sunaudio.c @@ -47,7 +47,7 @@ /* Open the audio device for playback, and don't block if busy */ -#if defined(AUDIO_GETINFO) && !defined(AUDIO_GETBUFINFO) +#if defined(AUDIO_GETINFO) && !defined(AUDIO_GETBUFINFO) #define AUDIO_GETBUFINFO AUDIO_GETINFO #endif @@ -82,7 +82,7 @@ static void SUNAUDIO_WaitDevice(_THIS) { #ifdef AUDIO_GETBUFINFO -#define SLEEP_FUDGE 10 /* 10 ms scheduling fudge factor */ +#define SLEEP_FUDGE 10 /* 10 ms scheduling fudge factor */ audio_info_t info; Sint32 left; diff --git a/src/audio/sun/SDL_sunaudio.h b/src/audio/sun/SDL_sunaudio.h index 1f2c0b4f2..9b92266fb 100644 --- a/src/audio/sun/SDL_sunaudio.h +++ b/src/audio/sun/SDL_sunaudio.h @@ -26,7 +26,7 @@ #include "../SDL_sysaudio.h" /* Hidden "this" pointer for the audio functions */ -#define _THIS SDL_AudioDevice *this +#define _THIS SDL_AudioDevice *this struct SDL_PrivateAudioData { diff --git a/src/audio/winmm/SDL_winmm.h b/src/audio/winmm/SDL_winmm.h index 8e67f2237..5a0574d1e 100644 --- a/src/audio/winmm/SDL_winmm.h +++ b/src/audio/winmm/SDL_winmm.h @@ -26,7 +26,7 @@ #include "../SDL_sysaudio.h" /* Hidden "this" pointer for the audio functions */ -#define _THIS SDL_AudioDevice *this +#define _THIS SDL_AudioDevice *this #define NUM_BUFFERS 2 /* -- Don't lower this! */ diff --git a/src/audio/xaudio2/SDL_xaudio2.c b/src/audio/xaudio2/SDL_xaudio2.c index 40d94086f..db29e8dbb 100644 --- a/src/audio/xaudio2/SDL_xaudio2.c +++ b/src/audio/xaudio2/SDL_xaudio2.c @@ -41,7 +41,7 @@ #include /* Hidden "this" pointer for the audio functions */ -#define _THIS SDL_AudioDevice *this +#define _THIS SDL_AudioDevice *this struct SDL_PrivateAudioData { @@ -232,17 +232,17 @@ XAUDIO2_OpenDevice(_THIS, const char *devname, int iscapture) IXAudio2SourceVoice *source = NULL; UINT32 devId = 0; /* 0 == system default device. */ - static IXAudio2VoiceCallbackVtbl callbacks_vtable = { - VoiceCBOnVoiceProcessPassStart, + static IXAudio2VoiceCallbackVtbl callbacks_vtable = { + VoiceCBOnVoiceProcessPassStart, VoiceCBOnVoiceProcessPassEnd, VoiceCBOnStreamEnd, VoiceCBOnBufferStart, VoiceCBOnBufferEnd, VoiceCBOnLoopEnd, VoiceCBOnVoiceError - }; + }; - static IXAudio2VoiceCallback callbacks = { &callbacks_vtable }; + static IXAudio2VoiceCallback callbacks = { &callbacks_vtable }; if (iscapture) { return SDL_SetError("XAudio2: capture devices unsupported."); diff --git a/src/core/android/SDL_android.cpp b/src/core/android/SDL_android.cpp index cf0e0c129..6fbb678fd 100644 --- a/src/core/android/SDL_android.cpp +++ b/src/core/android/SDL_android.cpp @@ -121,7 +121,7 @@ extern "C" void SDL_Android_Init(JNIEnv* mEnv, jclass cls) "createGLContext","(II[I)Z"); midFlipBuffers = mEnv->GetStaticMethodID(mActivityClass, "flipBuffers","()V"); - midAudioInit = mEnv->GetStaticMethodID(mActivityClass, + midAudioInit = mEnv->GetStaticMethodID(mActivityClass, "audioInit", "(IZZI)V"); midAudioWriteShortBuffer = mEnv->GetStaticMethodID(mActivityClass, "audioWriteShortBuffer", "([S)V"); @@ -184,14 +184,14 @@ extern "C" void Java_org_libsdl_app_SDLActivity_onNativeAccel( // Low memory extern "C" void Java_org_libsdl_app_SDLActivity_nativeLowMemory( JNIEnv* env, jclass cls) -{ +{ SDL_SendAppEvent(SDL_APP_LOWMEMORY); } // Quit extern "C" void Java_org_libsdl_app_SDLActivity_nativeQuit( JNIEnv* env, jclass cls) -{ +{ // Inject a SDL_QUIT event SDL_SendQuit(); SDL_SendAppEvent(SDL_APP_TERMINATING); @@ -348,7 +348,7 @@ extern "C" SDL_bool Android_JNI_CreateContext(int majorVersion, int minorVersion extern "C" void Android_JNI_SwapWindow() { JNIEnv *mEnv = Android_JNI_GetEnv(); - mEnv->CallStaticVoidMethod(mActivityClass, midFlipBuffers); + mEnv->CallStaticVoidMethod(mActivityClass, midFlipBuffers); } extern "C" void Android_JNI_SetActivityTitle(const char *title) @@ -453,7 +453,7 @@ extern "C" int Android_JNI_OpenAudioDevice(int sampleRate, int is16Bit, int chan /* Allocating the audio buffer from the Java side and passing it as the return value for audioInit no longer works on * Android >= 4.2 due to a "stale global reference" error. So now we allocate this buffer directly from this side. */ - + if (is16Bit) { jshortArray audioBufferLocal = env->NewShortArray(desiredBufferFrames * (audioBufferStereo ? 2 : 1)); if (audioBufferLocal) { @@ -513,7 +513,7 @@ extern "C" void Android_JNI_CloseAudioDevice() { JNIEnv *env = Android_JNI_GetEnv(); - env->CallStaticVoidMethod(mActivityClass, midAudioQuit); + env->CallStaticVoidMethod(mActivityClass, midAudioQuit); if (audioBuffer) { env->DeleteGlobalRef(audioBuffer); @@ -592,7 +592,7 @@ static int Android_JNI_FileOpen(SDL_RWops* ctx) mid = mEnv->GetStaticMethodID(mActivityClass, "getContext","()Landroid/content/Context;"); context = mEnv->CallStaticObjectMethod(mActivityClass, mid); - + // assetManager = context.getAssets(); mid = mEnv->GetMethodID(mEnv->GetObjectClass(context), @@ -779,7 +779,7 @@ extern "C" size_t Android_JNI_FileRead(SDL_RWops* ctx, void* buffer, ctx->hidden.androidio.position += result; } return bytesRead / size; - } + } } extern "C" size_t Android_JNI_FileWrite(SDL_RWops* ctx, const void* buffer, @@ -920,7 +920,7 @@ extern "C" Sint64 Android_JNI_FileSeek(SDL_RWops* ctx, Sint64 offset, int whence } return ctx->hidden.androidio.position; - + } extern "C" int Android_JNI_FileClose(SDL_RWops* ctx) @@ -1151,7 +1151,7 @@ extern "C" void *SDL_AndroidGetJNIEnv() extern "C" void *SDL_AndroidGetActivity() { /* See SDL_system.h for caveats on using this function. */ - + jmethodID mid; JNIEnv *env = Android_JNI_GetEnv(); diff --git a/src/events/SDL_events.c b/src/events/SDL_events.c index d6bb22e06..f27c3cb85 100644 --- a/src/events/SDL_events.c +++ b/src/events/SDL_events.c @@ -53,7 +53,7 @@ static SDL_DisabledEventBlock *SDL_disabled_events[256]; static Uint32 SDL_userevents = SDL_USEREVENT; /* Private data -- event queue */ -#define MAXEVENTS 128 +#define MAXEVENTS 128 static struct { SDL_mutex *lock; diff --git a/src/events/SDL_gesture.c b/src/events/SDL_gesture.c index a56aa3e55..f7c8c8932 100644 --- a/src/events/SDL_gesture.c +++ b/src/events/SDL_gesture.c @@ -35,13 +35,10 @@ #include #include -//TODO: Replace with malloc +/* TODO: Replace with malloc */ #define MAXPATHSIZE 1024 - - - #define DOLLARNPOINTS 64 #define DOLLARSIZE 256 diff --git a/src/events/SDL_keyboard.c b/src/events/SDL_keyboard.c index 3454bf8bb..680091f42 100644 --- a/src/events/SDL_keyboard.c +++ b/src/events/SDL_keyboard.c @@ -860,7 +860,7 @@ SDL_Keycode SDL_GetKeyFromScancode(SDL_Scancode scancode) { SDL_Keyboard *keyboard = &SDL_keyboard; - + if (scancode < SDL_SCANCODE_UNKNOWN || scancode >= SDL_NUM_SCANCODES) { SDL_InvalidParamError("scancode"); return 0; @@ -890,7 +890,7 @@ SDL_GetScancodeName(SDL_Scancode scancode) const char *name; if (scancode < SDL_SCANCODE_UNKNOWN || scancode >= SDL_NUM_SCANCODES) { SDL_InvalidParamError("scancode"); - return ""; + return ""; } name = SDL_scancode_names[scancode]; @@ -902,24 +902,24 @@ SDL_GetScancodeName(SDL_Scancode scancode) SDL_Scancode SDL_GetScancodeFromName(const char *name) { - int i; + int i; - if (!name || !*name) { - SDL_InvalidParamError("name"); - return SDL_SCANCODE_UNKNOWN; - } + if (!name || !*name) { + SDL_InvalidParamError("name"); + return SDL_SCANCODE_UNKNOWN; + } - for (i = 0; i < SDL_arraysize(SDL_scancode_names); ++i) { - if (!SDL_scancode_names[i]) { - continue; - } - if (SDL_strcasecmp(name, SDL_scancode_names[i]) == 0) { - return (SDL_Scancode)i; - } - } + for (i = 0; i < SDL_arraysize(SDL_scancode_names); ++i) { + if (!SDL_scancode_names[i]) { + continue; + } + if (SDL_strcasecmp(name, SDL_scancode_names[i]) == 0) { + return (SDL_Scancode)i; + } + } - SDL_InvalidParamError("name"); - return SDL_SCANCODE_UNKNOWN; + SDL_InvalidParamError("name"); + return SDL_SCANCODE_UNKNOWN; } const char * @@ -964,51 +964,51 @@ SDL_GetKeyName(SDL_Keycode key) SDL_Keycode SDL_GetKeyFromName(const char *name) { - SDL_Keycode key; + SDL_Keycode key; /* Check input */ if (name == NULL) return SDLK_UNKNOWN; - - /* If it's a single UTF-8 character, then that's the keycode itself */ - key = *(const unsigned char *)name; - if (key >= 0xF0) { - if (SDL_strlen(name) == 4) { - int i = 0; - key = (Uint16)(name[i]&0x07) << 18; - key |= (Uint16)(name[++i]&0x3F) << 12; - key |= (Uint16)(name[++i]&0x3F) << 6; - key |= (Uint16)(name[++i]&0x3F); - return key; - } - return SDLK_UNKNOWN; - } else if (key >= 0xE0) { - if (SDL_strlen(name) == 3) { - int i = 0; - key = (Uint16)(name[i]&0x0F) << 12; - key |= (Uint16)(name[++i]&0x3F) << 6; - key |= (Uint16)(name[++i]&0x3F); - return key; - } - return SDLK_UNKNOWN; - } else if (key >= 0xC0) { - if (SDL_strlen(name) == 2) { - int i = 0; - key = (Uint16)(name[i]&0x1F) << 6; - key |= (Uint16)(name[++i]&0x3F); - return key; - } - return SDLK_UNKNOWN; - } else { - if (SDL_strlen(name) == 1) { - if (key >= 'A' && key <= 'Z') { - key += 32; - } - return key; - } - /* Get the scancode for this name, and the associated keycode */ - return SDL_default_keymap[SDL_GetScancodeFromName(name)]; - } + /* If it's a single UTF-8 character, then that's the keycode itself */ + key = *(const unsigned char *)name; + if (key >= 0xF0) { + if (SDL_strlen(name) == 4) { + int i = 0; + key = (Uint16)(name[i]&0x07) << 18; + key |= (Uint16)(name[++i]&0x3F) << 12; + key |= (Uint16)(name[++i]&0x3F) << 6; + key |= (Uint16)(name[++i]&0x3F); + return key; + } + return SDLK_UNKNOWN; + } else if (key >= 0xE0) { + if (SDL_strlen(name) == 3) { + int i = 0; + key = (Uint16)(name[i]&0x0F) << 12; + key |= (Uint16)(name[++i]&0x3F) << 6; + key |= (Uint16)(name[++i]&0x3F); + return key; + } + return SDLK_UNKNOWN; + } else if (key >= 0xC0) { + if (SDL_strlen(name) == 2) { + int i = 0; + key = (Uint16)(name[i]&0x1F) << 6; + key |= (Uint16)(name[++i]&0x3F); + return key; + } + return SDLK_UNKNOWN; + } else { + if (SDL_strlen(name) == 1) { + if (key >= 'A' && key <= 'Z') { + key += 32; + } + return key; + } + + /* Get the scancode for this name, and the associated keycode */ + return SDL_default_keymap[SDL_GetScancodeFromName(name)]; + } } /* vi: set ts=4 sw=4 expandtab: */ diff --git a/src/events/SDL_mouse.c b/src/events/SDL_mouse.c index ede6a6c46..5536ab73b 100644 --- a/src/events/SDL_mouse.c +++ b/src/events/SDL_mouse.c @@ -397,12 +397,12 @@ void SDL_WarpMouseInWindow(SDL_Window * window, int x, int y) { SDL_Mouse *mouse = SDL_GetMouse(); - - if ( window == NULL ) - window = mouse->focus; - - if ( window == NULL ) - return; + + if ( window == NULL ) + window = mouse->focus; + + if ( window == NULL ) + return; if (mouse->WarpMouse) { mouse->WarpMouse(window, x, y); @@ -572,13 +572,13 @@ SDL_CreateSystemCursor(SDL_SystemCursor id) return NULL; } - cursor = mouse->CreateSystemCursor(id); + cursor = mouse->CreateSystemCursor(id); if (cursor) { cursor->next = mouse->cursors; mouse->cursors = cursor; } - return cursor; + return cursor; } /* SDL_SetCursor(NULL) can be used to force the cursor redraw, diff --git a/src/events/SDL_mouse_c.h b/src/events/SDL_mouse_c.h index 9994bc640..a8faa2e17 100644 --- a/src/events/SDL_mouse_c.h +++ b/src/events/SDL_mouse_c.h @@ -39,7 +39,7 @@ typedef struct SDL_Cursor *(*CreateCursor) (SDL_Surface * surface, int hot_x, int hot_y); /* Create a system cursor */ - SDL_Cursor *(*CreateSystemCursor) (SDL_SystemCursor id); + SDL_Cursor *(*CreateSystemCursor) (SDL_SystemCursor id); /* Show the specified cursor, or hide if cursor is NULL */ int (*ShowCursor) (SDL_Cursor * cursor); diff --git a/src/events/SDL_touch.c b/src/events/SDL_touch.c index 6fca4038d..3429b57d7 100644 --- a/src/events/SDL_touch.c +++ b/src/events/SDL_touch.c @@ -165,7 +165,7 @@ SDL_AddTouch(SDL_TouchID touchID, const char *name) return index; } -static int +static int SDL_AddFinger(SDL_Touch *touch, SDL_FingerID fingerid, float x, float y, float pressure) { SDL_Finger *finger; @@ -258,7 +258,7 @@ SDL_SendTouch(SDL_TouchID id, SDL_FingerID fingerid, event.tfinger.touchId = id; event.tfinger.fingerId = fingerid; /* I don't trust the coordinates passed on fingerUp */ - event.tfinger.x = finger->x; + event.tfinger.x = finger->x; event.tfinger.y = finger->y; event.tfinger.dx = 0; event.tfinger.dy = 0; @@ -287,7 +287,7 @@ SDL_SendTouchMotion(SDL_TouchID id, SDL_FingerID fingerid, finger = SDL_GetFinger(touch,fingerid); if (!finger) { - return SDL_SendTouch(id, fingerid, SDL_TRUE, x, y, pressure); + return SDL_SendTouch(id, fingerid, SDL_TRUE, x, y, pressure); } xrel = x - finger->x; @@ -306,7 +306,7 @@ SDL_SendTouchMotion(SDL_TouchID id, SDL_FingerID fingerid, finger->x = x; finger->y = y; finger->pressure = pressure; - + /* Post the event, if desired */ posted = 0; if (SDL_GetEventState(SDL_FINGERMOTION) == SDL_ENABLE) { @@ -317,7 +317,7 @@ SDL_SendTouchMotion(SDL_TouchID id, SDL_FingerID fingerid, event.tfinger.x = x; event.tfinger.y = y; event.tfinger.dx = xrel; - event.tfinger.dy = yrel; + event.tfinger.dy = yrel; event.tfinger.pressure = pressure; posted = (SDL_PushEvent(&event) > 0); } diff --git a/src/events/SDL_touch_c.h b/src/events/SDL_touch_c.h index 8961d74e5..d0a2cf2f7 100644 --- a/src/events/SDL_touch_c.h +++ b/src/events/SDL_touch_c.h @@ -38,17 +38,17 @@ extern int SDL_TouchInit(void); /* Add a touch, returning the index of the touch, or -1 if there was an error. */ extern int SDL_AddTouch(SDL_TouchID id, const char *name); - + /* Get the touch with a given id */ extern SDL_Touch *SDL_GetTouch(SDL_TouchID id); /* Send a touch down/up event for a touch */ -extern int SDL_SendTouch(SDL_TouchID id, SDL_FingerID fingerid, - SDL_bool down, float x, float y, float pressure); +extern int SDL_SendTouch(SDL_TouchID id, SDL_FingerID fingerid, + SDL_bool down, float x, float y, float pressure); /* Send a touch motion event for a touch */ extern int SDL_SendTouchMotion(SDL_TouchID id, SDL_FingerID fingerid, - float x, float y, float pressure); + float x, float y, float pressure); /* Remove a touch */ extern void SDL_DelTouch(SDL_TouchID id); diff --git a/src/events/SDL_windowevents.c b/src/events/SDL_windowevents.c index 60d65ae57..9011f68e1 100644 --- a/src/events/SDL_windowevents.c +++ b/src/events/SDL_windowevents.c @@ -155,7 +155,7 @@ SDL_SendWindowEvent(SDL_Window * window, Uint8 windowevent, int data1, return 0; } window->flags &= ~SDL_WINDOW_MOUSE_FOCUS; - SDL_OnWindowLeave(window); + SDL_OnWindowLeave(window); break; case SDL_WINDOWEVENT_FOCUS_GAINED: if (window->flags & SDL_WINDOW_INPUT_FOCUS) { @@ -196,13 +196,13 @@ SDL_SendWindowEvent(SDL_Window * window, Uint8 windowevent, int data1, posted = (SDL_PushEvent(&event) > 0); } - - if (windowevent == SDL_WINDOWEVENT_CLOSE) { - if ( !window->prev && !window->next ) { - // This is the last window in the list so send the SDL_QUIT event - SDL_SendQuit(); - } - } + + if (windowevent == SDL_WINDOWEVENT_CLOSE) { + if ( !window->prev && !window->next ) { + /* This is the last window in the list so send the SDL_QUIT event */ + SDL_SendQuit(); + } + } return (posted); } diff --git a/src/events/blank_cursor.h b/src/events/blank_cursor.h index 534d2e2d2..6efb4741e 100644 --- a/src/events/blank_cursor.h +++ b/src/events/blank_cursor.h @@ -19,13 +19,13 @@ 3. This notice may not be removed or altered from any source distribution. */ -/* * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * +/* * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * A default blank 8x8 cursor */ -#define BLANK_CWIDTH 8 -#define BLANK_CHEIGHT 8 -#define BLANK_CHOTX 0 -#define BLANK_CHOTY 0 +#define BLANK_CWIDTH 8 +#define BLANK_CHEIGHT 8 +#define BLANK_CHOTX 0 +#define BLANK_CHOTY 0 static const unsigned char blank_cdata[8] = { 0, 0, 0, 0, 0, 0, 0, 0 }; static const unsigned char blank_cmask[8] = { 0, 0, 0, 0, 0, 0, 0, 0 }; diff --git a/src/events/default_cursor.h b/src/events/default_cursor.h index 8a7b2a9e3..8c2dcfcff 100644 --- a/src/events/default_cursor.h +++ b/src/events/default_cursor.h @@ -19,13 +19,13 @@ 3. This notice may not be removed or altered from any source distribution. */ -/* * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * +/* * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * Default cursor - it happens to be the Mac cursor, but could be anything */ -#define DEFAULT_CWIDTH 16 -#define DEFAULT_CHEIGHT 16 -#define DEFAULT_CHOTX 0 -#define DEFAULT_CHOTY 0 +#define DEFAULT_CWIDTH 16 +#define DEFAULT_CHEIGHT 16 +#define DEFAULT_CHOTX 0 +#define DEFAULT_CHOTY 0 /* Added a real MacOS cursor, at the request of Luc-Olivier de Charrire */ #define USE_MACOS_CURSOR diff --git a/src/file/SDL_rwops.c b/src/file/SDL_rwops.c index 44b0e8407..59e83c89a 100644 --- a/src/file/SDL_rwops.c +++ b/src/file/SDL_rwops.c @@ -47,7 +47,7 @@ #define INVALID_SET_FILE_POINTER 0xFFFFFFFF #endif -#define READAHEAD_BUFFER_SIZE 1024 +#define READAHEAD_BUFFER_SIZE 1024 static int SDLCALL windows_file_open(SDL_RWops * context, const char *filename, const char *mode) @@ -518,12 +518,12 @@ SDL_RWFromFile(const char *file, const char *mode) #elif HAVE_STDIO_H { - #ifdef __APPLE__ - FILE *fp = SDL_OpenFPFromBundleOrFallback(file, mode); + #ifdef __APPLE__ + FILE *fp = SDL_OpenFPFromBundleOrFallback(file, mode); #else - FILE *fp = fopen(file, mode); - #endif - if (fp == NULL) { + FILE *fp = fopen(file, mode); + #endif + if (fp == NULL) { SDL_SetError("Couldn't open %s", file); } else { rwops = SDL_RWFromFP(fp, 1); diff --git a/src/file/cocoa/SDL_rwopsbundlesupport.m b/src/file/cocoa/SDL_rwopsbundlesupport.m index 39b4c0e9c..8ec0220ec 100644 --- a/src/file/cocoa/SDL_rwopsbundlesupport.m +++ b/src/file/cocoa/SDL_rwopsbundlesupport.m @@ -14,32 +14,32 @@ FILE* SDL_OpenFPFromBundleOrFallback(const char *file, const char *mode) { FILE* fp = NULL; - // If the file mode is writable, skip all the bundle stuff because generally the bundle is read-only. - if(strcmp("r", mode) && strcmp("rb", mode)) - { - return fopen(file, mode); - } + /* If the file mode is writable, skip all the bundle stuff because generally the bundle is read-only. */ + if(strcmp("r", mode) && strcmp("rb", mode)) + { + return fopen(file, mode); + } - NSAutoreleasePool* autorelease_pool = [[NSAutoreleasePool alloc] init]; + NSAutoreleasePool* autorelease_pool = [[NSAutoreleasePool alloc] init]; - NSFileManager* file_manager = [NSFileManager defaultManager]; - NSString* resource_path = [[NSBundle mainBundle] resourcePath]; + NSFileManager* file_manager = [NSFileManager defaultManager]; + NSString* resource_path = [[NSBundle mainBundle] resourcePath]; - NSString* ns_string_file_component = [file_manager stringWithFileSystemRepresentation:file length:strlen(file)]; + NSString* ns_string_file_component = [file_manager stringWithFileSystemRepresentation:file length:strlen(file)]; - NSString* full_path_with_file_to_try = [resource_path stringByAppendingPathComponent:ns_string_file_component]; - if([file_manager fileExistsAtPath:full_path_with_file_to_try]) - { - fp = fopen([full_path_with_file_to_try fileSystemRepresentation], mode); - } - else - { - fp = fopen(file, mode); - } + NSString* full_path_with_file_to_try = [resource_path stringByAppendingPathComponent:ns_string_file_component]; + if([file_manager fileExistsAtPath:full_path_with_file_to_try]) + { + fp = fopen([full_path_with_file_to_try fileSystemRepresentation], mode); + } + else + { + fp = fopen(file, mode); + } - [autorelease_pool drain]; + [autorelease_pool drain]; - return fp; + return fp; } #endif diff --git a/src/haptic/SDL_syshaptic.h b/src/haptic/SDL_syshaptic.h index affd5731f..28ef84399 100644 --- a/src/haptic/SDL_syshaptic.h +++ b/src/haptic/SDL_syshaptic.h @@ -56,7 +56,7 @@ struct _SDL_Haptic SDL_HapticEffect rumble_effect; /* Rumble effect. */ }; -/* +/* * Scans the system for haptic devices. * * Returns 0 on success, -1 on error. diff --git a/src/haptic/darwin/SDL_syshaptic.c b/src/haptic/darwin/SDL_syshaptic.c index a8b1d586f..53c5acddd 100644 --- a/src/haptic/darwin/SDL_syshaptic.c +++ b/src/haptic/darwin/SDL_syshaptic.c @@ -35,7 +35,7 @@ #include #ifndef IO_OBJECT_NULL -#define IO_OBJECT_NULL ((io_service_t)0) +#define IO_OBJECT_NULL ((io_service_t)0) #endif #define MAX_HAPTICS 32 @@ -83,7 +83,7 @@ static void SDL_SYS_HapticFreeFFEFFECT(FFEFFECT * effect, int type); static int HIDGetDeviceProduct(io_service_t dev, char *name); -/* +/* * Like strerror but for force feedback errors. */ static const char * @@ -562,7 +562,7 @@ SDL_SYS_HapticClose(SDL_Haptic * haptic) } -/* +/* * Clean up after system specific haptic stuff */ void diff --git a/src/haptic/linux/SDL_syshaptic.c b/src/haptic/linux/SDL_syshaptic.c index 23a373520..92705320a 100644 --- a/src/haptic/linux/SDL_syshaptic.c +++ b/src/haptic/linux/SDL_syshaptic.c @@ -155,7 +155,7 @@ SDL_SYS_HapticInit(void) numhaptics = 0; - /* + /* * Limit amount of checks to MAX_HAPTICS since we may or may not have * permission to some or all devices. */ @@ -446,7 +446,7 @@ SDL_SYS_HapticClose(SDL_Haptic * haptic) } -/* +/* * Clean up after system specific haptic stuff */ void @@ -498,44 +498,44 @@ SDL_SYS_ToDirection(SDL_HapticDirection * dir) switch (dir->type) { case SDL_HAPTIC_POLAR: /* Linux directions start from south. - (and range from 0 to 0xFFFF) - Quoting include/linux/input.h, line 926: - Direction of the effect is encoded as follows: - 0 deg -> 0x0000 (down) - 90 deg -> 0x4000 (left) - 180 deg -> 0x8000 (up) - 270 deg -> 0xC000 (right) - */ - tmp = (((18000 + dir->dir[0]) % 36000) * 0xFFFF) / 36000; // convert to range [0,0xFFFF] + (and range from 0 to 0xFFFF) + Quoting include/linux/input.h, line 926: + Direction of the effect is encoded as follows: + 0 deg -> 0x0000 (down) + 90 deg -> 0x4000 (left) + 180 deg -> 0x8000 (up) + 270 deg -> 0xC000 (right) + */ + tmp = (((18000 + dir->dir[0]) % 36000) * 0xFFFF) / 36000; /* convert to range [0,0xFFFF] */ return (Uint16) tmp; - case SDL_HAPTIC_SPHERICAL: - /* - We convert to polar, because that's the only supported direction on Linux. - The first value of a spherical direction is practically the same as a - Polar direction, except that we have to add 90 degrees. It is the angle - from EAST {1,0} towards SOUTH {0,1}. - --> add 9000 - --> finally add 18000 and convert to [0,0xFFFF] as in case SDL_HAPTIC_POLAR. - */ - tmp = ((dir->dir[0]) + 9000) % 36000; /* Convert to polars */ - tmp = (((18000 + tmp) % 36000) * 0xFFFF) / 36000; // convert to range [0,0xFFFF] + case SDL_HAPTIC_SPHERICAL: + /* + We convert to polar, because that's the only supported direction on Linux. + The first value of a spherical direction is practically the same as a + Polar direction, except that we have to add 90 degrees. It is the angle + from EAST {1,0} towards SOUTH {0,1}. + --> add 9000 + --> finally add 18000 and convert to [0,0xFFFF] as in case SDL_HAPTIC_POLAR. + */ + tmp = ((dir->dir[0]) + 9000) % 36000; /* Convert to polars */ + tmp = (((18000 + tmp) % 36000) * 0xFFFF) / 36000; /* convert to range [0,0xFFFF] */ return (Uint16) tmp; case SDL_HAPTIC_CARTESIAN: f = atan2(dir->dir[1], dir->dir[0]); - /* - atan2 takes the parameters: Y-axis-value and X-axis-value (in that order) - - Y-axis-value is the second coordinate (from center to SOUTH) - - X-axis-value is the first coordinate (from center to EAST) - We add 36000, because atan2 also returns negative values. Then we practically - have the first spherical value. Therefore we proceed as in case - SDL_HAPTIC_SPHERICAL and add another 9000 to get the polar value. - --> add 45000 in total - --> finally add 18000 and convert to [0,0xFFFF] as in case SDL_HAPTIC_POLAR. - */ - tmp = (((int) (f * 18000. / M_PI)) + 45000) % 36000; - tmp = (((18000 + tmp) % 36000) * 0xFFFF) / 36000; // convert to range [0,0xFFFF] + /* + atan2 takes the parameters: Y-axis-value and X-axis-value (in that order) + - Y-axis-value is the second coordinate (from center to SOUTH) + - X-axis-value is the first coordinate (from center to EAST) + We add 36000, because atan2 also returns negative values. Then we practically + have the first spherical value. Therefore we proceed as in case + SDL_HAPTIC_SPHERICAL and add another 9000 to get the polar value. + --> add 45000 in total + --> finally add 18000 and convert to [0,0xFFFF] as in case SDL_HAPTIC_POLAR. + */ + tmp = (((int) (f * 18000. / M_PI)) + 45000) % 36000; + tmp = (((18000 + tmp) % 36000) * 0xFFFF) / 36000; /* convert to range [0,0xFFFF] */ return (Uint16) tmp; default: diff --git a/src/haptic/windows/SDL_syshaptic.c b/src/haptic/windows/SDL_syshaptic.c index a41c68ea2..b567ed7d7 100644 --- a/src/haptic/windows/SDL_syshaptic.c +++ b/src/haptic/windows/SDL_syshaptic.c @@ -41,8 +41,8 @@ static struct char *name; SDL_Haptic *haptic; DIDEVCAPS capabilities; - Uint8 bXInputHaptic; // Supports force feedback via XInput. - Uint8 userid; // XInput userid index for this joystick + Uint8 bXInputHaptic; /* Supports force feedback via XInput. */ + Uint8 userid; /* XInput userid index for this joystick */ } SDL_hapticlist[MAX_HAPTICS]; @@ -54,8 +54,8 @@ struct haptic_hwdata LPDIRECTINPUTDEVICE8 device; DWORD axes[3]; /* Axes to use. */ int is_joystick; /* Device is loaded as joystick. */ - Uint8 bXInputHaptic; // Supports force feedback via XInput. - Uint8 userid; // XInput userid index for this joystick + Uint8 bXInputHaptic; /* Supports force feedback via XInput. */ + Uint8 userid; /* XInput userid index for this joystick */ }; @@ -107,7 +107,7 @@ static BOOL CALLBACK EnumHapticsCallback(const DIDEVICEINSTANCE * static BOOL CALLBACK DI_EffectCallback(LPCDIEFFECTINFO pei, LPVOID pv); -/* +/* * Like SDL_SetError but for DX error codes. */ static int @@ -732,7 +732,7 @@ SDL_SYS_HapticClose(SDL_Haptic * haptic) } -/* +/* * Clean up after system specific haptic stuff */ void @@ -1264,12 +1264,13 @@ SDL_SYS_HapticUpdateEffect(SDL_Haptic * haptic, DIEFFECT temp; if (haptic->hwdata->bXInputHaptic) { - // !!! FIXME: this isn't close to right. We only support "sine" effects, - // !!! FIXME: we ignore most of the parameters, and we probably get - // !!! FIXME: the ones we don't ignore wrong, too. - // !!! FIXME: if I had a better understanding of how the two motors - // !!! FIXME: could be used in unison, perhaps I could implement other - // !!! FIXME: effect types? + /* !!! FIXME: this isn't close to right. We only support "sine" effects, + * !!! FIXME: we ignore most of the parameters, and we probably get + * !!! FIXME: the ones we don't ignore wrong, too. + * !!! FIXME: if I had a better understanding of how the two motors + * !!! FIXME: could be used in unison, perhaps I could implement other + * !!! FIXME: effect types? + */ /* From MSDN: "Note that the right motor is the high-frequency motor, the left motor is the low-frequency motor. They do not always need to be @@ -1528,5 +1529,6 @@ SDL_SYS_HapticStopAll(SDL_Haptic * haptic) return 0; } - #endif /* SDL_HAPTIC_DINPUT */ + +/* vi: set ts=4 sw=4 expandtab: */ diff --git a/src/joystick/SDL_gamecontroller.c b/src/joystick/SDL_gamecontroller.c index fda506af7..b8718a190 100644 --- a/src/joystick/SDL_gamecontroller.c +++ b/src/joystick/SDL_gamecontroller.c @@ -39,8 +39,8 @@ static SDL_GameController *SDL_gamecontrollers = NULL; /* keep track of the hat and mask value that transforms this hat movement into a button/axis press */ struct _SDL_HatMapping { - int hat; - Uint8 mask; + int hat; + Uint8 mask; }; #define k_nMaxReverseEntries 20 @@ -54,24 +54,24 @@ struct _SDL_HatMapping /* our in memory mapping db between joystick objects and controller mappings*/ struct _SDL_ControllerMapping { - SDL_JoystickGUID guid; - const char *name; + SDL_JoystickGUID guid; + const char *name; - // mapping of axis/button id to controller version - int axes[SDL_CONTROLLER_AXIS_MAX]; - int buttonasaxis[SDL_CONTROLLER_AXIS_MAX]; + /* mapping of axis/button id to controller version */ + int axes[SDL_CONTROLLER_AXIS_MAX]; + int buttonasaxis[SDL_CONTROLLER_AXIS_MAX]; - int buttons[SDL_CONTROLLER_BUTTON_MAX]; - int axesasbutton[SDL_CONTROLLER_BUTTON_MAX]; - struct _SDL_HatMapping hatasbutton[SDL_CONTROLLER_BUTTON_MAX]; + int buttons[SDL_CONTROLLER_BUTTON_MAX]; + int axesasbutton[SDL_CONTROLLER_BUTTON_MAX]; + struct _SDL_HatMapping hatasbutton[SDL_CONTROLLER_BUTTON_MAX]; - // reverse mapping, joystick indices to buttons - SDL_GameControllerAxis raxes[k_nMaxReverseEntries]; - SDL_GameControllerAxis rbuttonasaxis[k_nMaxReverseEntries]; + /* reverse mapping, joystick indices to buttons */ + SDL_GameControllerAxis raxes[k_nMaxReverseEntries]; + SDL_GameControllerAxis rbuttonasaxis[k_nMaxReverseEntries]; - SDL_GameControllerButton rbuttons[k_nMaxReverseEntries]; - SDL_GameControllerButton raxesasbutton[k_nMaxReverseEntries]; - SDL_GameControllerButton rhatasbutton[k_nMaxHatEntries]; + SDL_GameControllerButton rbuttons[k_nMaxReverseEntries]; + SDL_GameControllerButton raxesasbutton[k_nMaxReverseEntries]; + SDL_GameControllerButton rhatasbutton[k_nMaxHatEntries]; }; @@ -79,10 +79,10 @@ struct _SDL_ControllerMapping /* our hard coded list of mapping support */ typedef struct _ControllerMapping_t { - SDL_JoystickGUID guid; - char *name; - char *mapping; - struct _ControllerMapping_t *next; + SDL_JoystickGUID guid; + char *name; + char *mapping; + struct _ControllerMapping_t *next; } ControllerMapping_t; @@ -90,33 +90,33 @@ typedef struct _ControllerMapping_t const char *s_ControllerMappings [] = { #ifdef SDL_JOYSTICK_DINPUT - "xinput,X360 Controller,a:b10,b:b11,y:b13,x:b12,start:b4,guide:b14,back:b5,dpup:b0,dpleft:b2,dpdown:b1,dpright:b3,leftshoulder:b8,rightshoulder:b9,leftstick:b6,rightstick:b7,leftx:a0,lefty:a1,rightx:a2,righty:a3,lefttrigger:a4,righttrigger:a5", - "341a3608000000000000504944564944,Afterglow PS3 Controller,a:b1,b:b2,y:b3,x:b0,start:b9,guide:b12,back:b8,dpup:h0.1,dpleft:h0.8,dpdown:h0.4,dpright:h0.2,leftshoulder:b4,rightshoulder:b5,leftstick:b10,rightstick:b11,leftx:a0,lefty:a1,rightx:a2,righty:a3,lefttrigger:b6,righttrigger:b7", - "88880803000000000000504944564944,PS3 Controller,a:b2,b:b1,x:b0,y:b3,start:b11,back:b8,leftstick:b9,rightstick:b10,leftshoulder:b4,rightshoulder:b5,dpup:h0.1,dpleft:h0.4,dpdown:h0.8,dpright:h0.2,leftx:a0,lefty:a1,rightx:a3,righty:a4,lefttrigger:b6,righttrigger:b7,guide:b12", - "4c056802000000000000504944564944,PS3 Controller,a:b14,b:b13,y:b12,x:b15,start:b3,guide:b16,back:b0,leftstick:b1,rightstick:b2,leftshoulder:b10,rightshoulder:b11,dpup:b4,dpleft:b7,dpdown:b6,dpright:b5,leftx:a0,lefty:a1,rightx:a2,righty:a3,lefttrigger:b8,righttrigger:b9,", - "25090500000000000000504944564944,PS3 DualShock,a:b2,b:b1,x:b0,y:b3,start:b8,guide:,back:b9,leftstick:b10,rightstick:b11,leftshoulder:b6,rightshoulder:b7,dpup:h0.1,dpleft:h0.4,dpdown:h0.8,dpright:h0.2,leftx:a0,lefty:a1,rightx:a2,righty:a3,lefttrigger:b4,righttrigger:b5", + "xinput,X360 Controller,a:b10,b:b11,y:b13,x:b12,start:b4,guide:b14,back:b5,dpup:b0,dpleft:b2,dpdown:b1,dpright:b3,leftshoulder:b8,rightshoulder:b9,leftstick:b6,rightstick:b7,leftx:a0,lefty:a1,rightx:a2,righty:a3,lefttrigger:a4,righttrigger:a5", + "341a3608000000000000504944564944,Afterglow PS3 Controller,a:b1,b:b2,y:b3,x:b0,start:b9,guide:b12,back:b8,dpup:h0.1,dpleft:h0.8,dpdown:h0.4,dpright:h0.2,leftshoulder:b4,rightshoulder:b5,leftstick:b10,rightstick:b11,leftx:a0,lefty:a1,rightx:a2,righty:a3,lefttrigger:b6,righttrigger:b7", + "88880803000000000000504944564944,PS3 Controller,a:b2,b:b1,x:b0,y:b3,start:b11,back:b8,leftstick:b9,rightstick:b10,leftshoulder:b4,rightshoulder:b5,dpup:h0.1,dpleft:h0.4,dpdown:h0.8,dpright:h0.2,leftx:a0,lefty:a1,rightx:a3,righty:a4,lefttrigger:b6,righttrigger:b7,guide:b12", + "4c056802000000000000504944564944,PS3 Controller,a:b14,b:b13,y:b12,x:b15,start:b3,guide:b16,back:b0,leftstick:b1,rightstick:b2,leftshoulder:b10,rightshoulder:b11,dpup:b4,dpleft:b7,dpdown:b6,dpright:b5,leftx:a0,lefty:a1,rightx:a2,righty:a3,lefttrigger:b8,righttrigger:b9,", + "25090500000000000000504944564944,PS3 DualShock,a:b2,b:b1,x:b0,y:b3,start:b8,guide:,back:b9,leftstick:b10,rightstick:b11,leftshoulder:b6,rightshoulder:b7,dpup:h0.1,dpleft:h0.4,dpdown:h0.8,dpright:h0.2,leftx:a0,lefty:a1,rightx:a2,righty:a3,lefttrigger:b4,righttrigger:b5", "ffff0000000000000000504944564944,GameStop Gamepad,a:b0,b:b1,y:b3,x:b2,start:b9,guide:,back:b8,leftstick:b10,rightstick:b11,leftshoulder:b4,rightshoulder:b5,dpup:h0.1,dpleft:h0.8,dpdown:h0.4,dpright:h0.2,leftx:a0,lefty:a1,rightx:a2,righty:a3,lefttrigger:b6,righttrigger:b7,", "6d0416c2000000000000504944564944,Generic DirectInput Controller,a:b1,b:b2,y:b3,x:b0,start:b9,back:b8,leftstick:b10,rightstick:b11,leftshoulder:b4,rightshoulder:b5,dpup:h0.1,dpleft:h0.8,dpdown:h0.4,dpright:h0.2,leftx:a0,lefty:a1,rightx:a2,righty:a3,lefttrigger:b6,righttrigger:b7,", #elif defined(__MACOSX__) - "5e040000000000008e02000000000000,X360 Controller,a:b0,b:b1,y:b3,x:b2,start:b8,guide:b10,back:b9,dpup:b11,dpleft:b13,dpdown:b12,dpright:b14,leftshoulder:b4,rightshoulder:b5,leftstick:b6,rightstick:b7,leftx:a0,lefty:a1,rightx:a3,righty:a4,lefttrigger:a2,righttrigger:a5", - "4c050000000000006802000000000000,PS3 Controller,a:b14,b:b13,x:b12,y:b15,start:b3,guide:b16,back:b0,leftstick:b1,rightstick:b2,leftshoulder:b10,rightshoulder:b11,dpup:b4,dpleft:b6,dpdown:b7,dpright:b5,leftx:a0,lefty:a1,rightx:a2,righty:a3,lefttrigger:b8,righttrigger:b9", + "5e040000000000008e02000000000000,X360 Controller,a:b0,b:b1,y:b3,x:b2,start:b8,guide:b10,back:b9,dpup:b11,dpleft:b13,dpdown:b12,dpright:b14,leftshoulder:b4,rightshoulder:b5,leftstick:b6,rightstick:b7,leftx:a0,lefty:a1,rightx:a3,righty:a4,lefttrigger:a2,righttrigger:a5", + "4c050000000000006802000000000000,PS3 Controller,a:b14,b:b13,x:b12,y:b15,start:b3,guide:b16,back:b0,leftstick:b1,rightstick:b2,leftshoulder:b10,rightshoulder:b11,dpup:b4,dpleft:b6,dpdown:b7,dpright:b5,leftx:a0,lefty:a1,rightx:a2,righty:a3,lefttrigger:b8,righttrigger:b9", "0500000047532047616d657061640000,GameStop Gamepad,a:b0,b:b1,y:b3,x:b2,start:b9,guide:,back:b8,leftstick:b10,rightstick:b11,leftshoulder:b4,rightshoulder:b5,dpup:h0.1,dpleft:h0.8,dpdown:h0.4,dpright:h0.2,leftx:a0,lefty:a1,rightx:a2,righty:a3,lefttrigger:b6,righttrigger:b7,", "6d040000000000001fc2000000000000,Logitech F710 Gamepad Controller (XInput),a:b0,b:b1,y:b3,x:b2,start:b8,guide:b10,back:b9,leftstick:b6,rightstick:b7,leftshoulder:b4,rightshoulder:b5,dpup:b11,dpleft:b13,dpdown:b12,dpright:b14,leftx:a0,lefty:a1,rightx:a3,righty:a4,lefttrigger:a2,righttrigger:a5,", - "6d0400000000000016c2000000000000,Logitech F310 Gamepad Controller (DInput),a:b1,b:b2,y:b3,x:b0,start:b9,back:b8,leftstick:b10,rightstick:b11,leftshoulder:b4,rightshoulder:b5,dpup:h0.1,dpleft:h0.8,dpdown:h0.4,dpright:h0.2,leftx:a0,lefty:a1,rightx:a2,righty:a3,lefttrigger:b6,righttrigger:b7,", // Guide button doesn't seem to be sent in DInput mode. - "6d0400000000000019c2000000000000,Logitech Wireless Gamepad Controller (DInput),a:b1,b:b2,y:b3,x:b0,start:b9,back:b8,leftstick:b10,rightstick:b11,leftshoulder:b4,rightshoulder:b5,dpup:h0.1,dpleft:h0.8,dpdown:h0.4,dpright:h0.2,leftx:a0,lefty:a1,rightx:a2,righty:a3,lefttrigger:b6,righttrigger:b7,", // This includes F710 in DInput mode and the "Logitech Cordless RumblePad 2", at the very least. + "6d0400000000000016c2000000000000,Logitech F310 Gamepad Controller (DInput),a:b1,b:b2,y:b3,x:b0,start:b9,back:b8,leftstick:b10,rightstick:b11,leftshoulder:b4,rightshoulder:b5,dpup:h0.1,dpleft:h0.8,dpdown:h0.4,dpright:h0.2,leftx:a0,lefty:a1,rightx:a2,righty:a3,lefttrigger:b6,righttrigger:b7,", /* Guide button doesn't seem to be sent in DInput mode. */ + "6d0400000000000019c2000000000000,Logitech Wireless Gamepad Controller (DInput),a:b1,b:b2,y:b3,x:b0,start:b9,back:b8,leftstick:b10,rightstick:b11,leftshoulder:b4,rightshoulder:b5,dpup:h0.1,dpleft:h0.8,dpdown:h0.4,dpright:h0.2,leftx:a0,lefty:a1,rightx:a2,righty:a3,lefttrigger:b6,righttrigger:b7,", /* This includes F710 in DInput mode and the "Logitech Cordless RumblePad 2", at the very least. */ #elif defined(__LINUX__) - "030000005e0400008e02000014010000,X360 Controller,a:b0,b:b1,y:b3,x:b2,start:b7,guide:b8,back:b6,dpup:h0.1,dpleft:h0.8,dpdown:h0.4,dpright:h0.2,leftshoulder:b4,rightshoulder:b5,leftstick:b9,rightstick:b10,leftx:a0,lefty:a1,rightx:a3,righty:a4,lefttrigger:a2,righttrigger:a5", + "030000005e0400008e02000014010000,X360 Controller,a:b0,b:b1,y:b3,x:b2,start:b7,guide:b8,back:b6,dpup:h0.1,dpleft:h0.8,dpdown:h0.4,dpright:h0.2,leftshoulder:b4,rightshoulder:b5,leftstick:b9,rightstick:b10,leftx:a0,lefty:a1,rightx:a3,righty:a4,lefttrigger:a2,righttrigger:a5", "030000005e0400008e02000010010000,X360 Controller,a:b0,b:b1,y:b3,x:b2,start:b7,guide:b8,back:b6,leftstick:b9,rightstick:b10,leftshoulder:b4,rightshoulder:b5,dpup:h0.1,dpleft:h0.8,dpdown:h0.4,dpright:h0.2,leftx:a0,lefty:a1,rightx:a3,righty:a4,lefttrigger:a2,righttrigger:a5,", "030000005e0400001907000000010000,X360 Wireless Controller,a:b0,b:b1,y:b3,x:b2,start:b7,guide:b8,back:b6,leftstick:b9,rightstick:b10,leftshoulder:b4,rightshoulder:b5,dpup:b13,dpleft:b11,dpdown:b14,dpright:b12,leftx:a0,lefty:a1,rightx:a3,righty:a4,lefttrigger:a2,righttrigger:a5,", - "030000004c0500006802000011010000,PS3 Controller,a:b14,b:b13,x:b15,y:b12,start:b3,guide:b16,back:b0,leftstick:b1,rightstick:b2,leftshoulder:b10,rightshoulder:b11,dpup:b4,dpleft:b7,dpdown:b6,dpright:b5,leftx:a0,lefty:a1,rightx:a2,righty:a3,lefttrigger:b8,righttrigger:b9", + "030000004c0500006802000011010000,PS3 Controller,a:b14,b:b13,x:b15,y:b12,start:b3,guide:b16,back:b0,leftstick:b1,rightstick:b2,leftshoulder:b10,rightshoulder:b11,dpup:b4,dpleft:b7,dpdown:b6,dpright:b5,leftx:a0,lefty:a1,rightx:a2,righty:a3,lefttrigger:b8,righttrigger:b9", "030000006d0400001fc2000005030000,Logitech F710 Gamepad Controller (XInput),a:b0,b:b1,y:b3,x:b2,start:b7,guide:b8,back:b6,leftstick:b9,rightstick:b10,leftshoulder:b4,rightshoulder:b5,dpup:h0.1,dpleft:h0.8,dpdown:h0.4,dpright:h0.2,leftx:a0,lefty:a1,rightx:a3,righty:a4,lefttrigger:a2,righttrigger:a5,", - "030000006d04000019c2000011010000,Logitech F710 Gamepad Controller (DInput),a:b1,b:b2,y:b3,x:b0,start:b9,back:b8,leftstick:b10,rightstick:b11,leftshoulder:b4,rightshoulder:b5,dpup:h0.1,dpleft:h0.8,dpdown:h0.4,dpright:h0.2,leftx:a0,lefty:a1,rightx:a2,righty:a3,lefttrigger:b6,righttrigger:b7,", // Guide button doesn't seem to be sent in DInput mode. + "030000006d04000019c2000011010000,Logitech F710 Gamepad Controller (DInput),a:b1,b:b2,y:b3,x:b0,start:b9,back:b8,leftstick:b10,rightstick:b11,leftshoulder:b4,rightshoulder:b5,dpup:h0.1,dpleft:h0.8,dpdown:h0.4,dpright:h0.2,leftx:a0,lefty:a1,rightx:a2,righty:a3,lefttrigger:b6,righttrigger:b7,", /* Guide button doesn't seem to be sent in DInput mode. */ "030000006d0400001dc2000014400000,Logitech F310 Gamepad (XInput),a:b0,b:b1,y:b3,x:b2,start:b7,guide:b8,back:b6,leftstick:b9,rightstick:b10,leftshoulder:b4,rightshoulder:b5,dpup:h0.1,dpleft:h0.8,dpdown:h0.4,dpright:h0.2,leftx:a0,lefty:a1,rightx:a3,righty:a4,lefttrigger:a2,righttrigger:a5,", "030000006d04000019c2000010010000,Logitech Cordless RumblePad 2,a:b1,b:b2,y:b3,x:b0,start:b9,guide:,back:b8,leftstick:b10,rightstick:b11,leftshoulder:b4,rightshoulder:b5,dpup:h0.1,dpleft:h0.8,dpdown:h0.4,dpright:h0.2,leftx:a0,lefty:a1,rightx:a2,righty:a3,lefttrigger:b6,righttrigger:b7,", "0500000047532047616d657061640000,GameStop Gamepad,a:b0,b:b1,y:b3,x:b2,start:b9,guide:,back:b8,leftstick:b10,rightstick:b11,leftshoulder:b4,rightshoulder:b5,dpup:h0.1,dpleft:h0.8,dpdown:h0.4,dpright:h0.2,leftx:a0,lefty:a1,rightx:a2,righty:a3,lefttrigger:b6,righttrigger:b7,", "03000000ba2200002010000001010000,Jess Technology USB Game Controller,start:b9,a:b2,b:b1,x:b3,y:b0,dpup:h0.1,dpleft:h0.8,dpdown:h0.4,dpright:h0.2,leftx:a0,lefty:a1,rightx:a3,righty:a2,lefttrigger:b6,righttrigger:b7,leftshoulder:b4,rightshoulder:b5,guide:,back:b8", #endif - NULL + NULL }; static ControllerMapping_t *s_pSupportedControllers = NULL; @@ -127,166 +127,166 @@ static ControllerMapping_t *s_pXInputMapping = NULL; /* The SDL game controller structure */ struct _SDL_GameController { - SDL_Joystick *joystick; /* underlying joystick device */ - int ref_count; - Uint8 hatState[4]; /* the current hat state for this controller */ - struct _SDL_ControllerMapping mapping; /* the mapping object for this controller */ - struct _SDL_GameController *next; /* pointer to next game controller we have allocated */ + SDL_Joystick *joystick; /* underlying joystick device */ + int ref_count; + Uint8 hatState[4]; /* the current hat state for this controller */ + struct _SDL_ControllerMapping mapping; /* the mapping object for this controller */ + struct _SDL_GameController *next; /* pointer to next game controller we have allocated */ }; int SDL_PrivateGameControllerAxis(SDL_GameController * gamecontroller, SDL_GameControllerAxis axis, Sint16 value); -int SDL_PrivateGameControllerButton(SDL_GameController * gamecontroller, SDL_GameControllerButton button, Uint8 state); +int SDL_PrivateGameControllerButton(SDL_GameController * gamecontroller, SDL_GameControllerButton button, Uint8 state); /* * Event filter to fire controller events from joystick ones */ int SDL_GameControllerEventWatcher(void *userdata, SDL_Event * event) { - switch( event->type ) - { - case SDL_JOYAXISMOTION: - { - SDL_GameController *controllerlist; + switch( event->type ) + { + case SDL_JOYAXISMOTION: + { + SDL_GameController *controllerlist; - if ( event->jaxis.axis >= k_nMaxReverseEntries ) break; + if ( event->jaxis.axis >= k_nMaxReverseEntries ) break; - controllerlist = SDL_gamecontrollers; - while ( controllerlist ) - { - if ( controllerlist->joystick->instance_id == event->jaxis.which ) - { - if ( controllerlist->mapping.raxes[event->jaxis.axis] >= 0 ) // simple axis to axis, send it through - { - SDL_GameControllerAxis axis = controllerlist->mapping.raxes[event->jaxis.axis]; + controllerlist = SDL_gamecontrollers; + while ( controllerlist ) + { + if ( controllerlist->joystick->instance_id == event->jaxis.which ) + { + if ( controllerlist->mapping.raxes[event->jaxis.axis] >= 0 ) /* simple axis to axis, send it through */ + { + SDL_GameControllerAxis axis = controllerlist->mapping.raxes[event->jaxis.axis]; Sint16 value = event->jaxis.value; - switch (axis) - { - case SDL_CONTROLLER_AXIS_TRIGGERLEFT: - case SDL_CONTROLLER_AXIS_TRIGGERRIGHT: - /* Shift it to be 0 - 32767. */ - value = value / 2 + 16384; - default: - break; - } - SDL_PrivateGameControllerAxis( controllerlist, axis, value ); - } - else if ( controllerlist->mapping.raxesasbutton[event->jaxis.axis] >= 0 ) // simulate an axis as a button - { - SDL_PrivateGameControllerButton( controllerlist, controllerlist->mapping.raxesasbutton[event->jaxis.axis], ABS(event->jaxis.value) > 32768/2 ? SDL_PRESSED : SDL_RELEASED ); - } - break; - } - controllerlist = controllerlist->next; - } - } - break; - case SDL_JOYBUTTONDOWN: - case SDL_JOYBUTTONUP: - { - SDL_GameController *controllerlist; + switch (axis) + { + case SDL_CONTROLLER_AXIS_TRIGGERLEFT: + case SDL_CONTROLLER_AXIS_TRIGGERRIGHT: + /* Shift it to be 0 - 32767. */ + value = value / 2 + 16384; + default: + break; + } + SDL_PrivateGameControllerAxis( controllerlist, axis, value ); + } + else if ( controllerlist->mapping.raxesasbutton[event->jaxis.axis] >= 0 ) /* simulate an axis as a button */ + { + SDL_PrivateGameControllerButton( controllerlist, controllerlist->mapping.raxesasbutton[event->jaxis.axis], ABS(event->jaxis.value) > 32768/2 ? SDL_PRESSED : SDL_RELEASED ); + } + break; + } + controllerlist = controllerlist->next; + } + } + break; + case SDL_JOYBUTTONDOWN: + case SDL_JOYBUTTONUP: + { + SDL_GameController *controllerlist; - if ( event->jbutton.button >= k_nMaxReverseEntries ) break; + if ( event->jbutton.button >= k_nMaxReverseEntries ) break; - controllerlist = SDL_gamecontrollers; - while ( controllerlist ) - { - if ( controllerlist->joystick->instance_id == event->jbutton.which ) - { - if ( controllerlist->mapping.rbuttons[event->jbutton.button] >= 0 ) // simple button as button - { - SDL_PrivateGameControllerButton( controllerlist, controllerlist->mapping.rbuttons[event->jbutton.button], event->jbutton.state ); - } - else if ( controllerlist->mapping.rbuttonasaxis[event->jbutton.button] >= 0 ) // an button pretending to be an axis - { - SDL_PrivateGameControllerAxis( controllerlist, controllerlist->mapping.rbuttonasaxis[event->jbutton.button], event->jbutton.state > 0 ? 32767 : 0 ); - } - break; - } - controllerlist = controllerlist->next; - } - } - break; - case SDL_JOYHATMOTION: - { - SDL_GameController *controllerlist; + controllerlist = SDL_gamecontrollers; + while ( controllerlist ) + { + if ( controllerlist->joystick->instance_id == event->jbutton.which ) + { + if ( controllerlist->mapping.rbuttons[event->jbutton.button] >= 0 ) /* simple button as button */ + { + SDL_PrivateGameControllerButton( controllerlist, controllerlist->mapping.rbuttons[event->jbutton.button], event->jbutton.state ); + } + else if ( controllerlist->mapping.rbuttonasaxis[event->jbutton.button] >= 0 ) /* an button pretending to be an axis */ + { + SDL_PrivateGameControllerAxis( controllerlist, controllerlist->mapping.rbuttonasaxis[event->jbutton.button], event->jbutton.state > 0 ? 32767 : 0 ); + } + break; + } + controllerlist = controllerlist->next; + } + } + break; + case SDL_JOYHATMOTION: + { + SDL_GameController *controllerlist; - if ( event->jhat.hat >= 4 ) break; + if ( event->jhat.hat >= 4 ) break; - controllerlist = SDL_gamecontrollers; - while ( controllerlist ) - { - if ( controllerlist->joystick->instance_id == event->jhat.which ) - { - Uint8 bSame = controllerlist->hatState[event->jhat.hat] & event->jhat.value; - // Get list of removed bits (button release) - Uint8 bChanged = controllerlist->hatState[event->jhat.hat] ^ bSame; - // the hat idx in the high nibble - int bHighHat = event->jhat.hat << 4; + controllerlist = SDL_gamecontrollers; + while ( controllerlist ) + { + if ( controllerlist->joystick->instance_id == event->jhat.which ) + { + Uint8 bSame = controllerlist->hatState[event->jhat.hat] & event->jhat.value; + /* Get list of removed bits (button release) */ + Uint8 bChanged = controllerlist->hatState[event->jhat.hat] ^ bSame; + /* the hat idx in the high nibble */ + int bHighHat = event->jhat.hat << 4; - if ( bChanged & SDL_HAT_DOWN ) - SDL_PrivateGameControllerButton( controllerlist, controllerlist->mapping.rhatasbutton[bHighHat | SDL_HAT_DOWN], SDL_RELEASED ); - if ( bChanged & SDL_HAT_UP ) - SDL_PrivateGameControllerButton( controllerlist, controllerlist->mapping.rhatasbutton[bHighHat | SDL_HAT_UP], SDL_RELEASED ); - if ( bChanged & SDL_HAT_LEFT ) - SDL_PrivateGameControllerButton( controllerlist, controllerlist->mapping.rhatasbutton[bHighHat | SDL_HAT_LEFT], SDL_RELEASED ); - if ( bChanged & SDL_HAT_RIGHT ) - SDL_PrivateGameControllerButton( controllerlist, controllerlist->mapping.rhatasbutton[bHighHat | SDL_HAT_RIGHT], SDL_RELEASED ); + if ( bChanged & SDL_HAT_DOWN ) + SDL_PrivateGameControllerButton( controllerlist, controllerlist->mapping.rhatasbutton[bHighHat | SDL_HAT_DOWN], SDL_RELEASED ); + if ( bChanged & SDL_HAT_UP ) + SDL_PrivateGameControllerButton( controllerlist, controllerlist->mapping.rhatasbutton[bHighHat | SDL_HAT_UP], SDL_RELEASED ); + if ( bChanged & SDL_HAT_LEFT ) + SDL_PrivateGameControllerButton( controllerlist, controllerlist->mapping.rhatasbutton[bHighHat | SDL_HAT_LEFT], SDL_RELEASED ); + if ( bChanged & SDL_HAT_RIGHT ) + SDL_PrivateGameControllerButton( controllerlist, controllerlist->mapping.rhatasbutton[bHighHat | SDL_HAT_RIGHT], SDL_RELEASED ); - // Get list of added bits (button press) - bChanged = event->jhat.value ^ bSame; + /* Get list of added bits (button press) */ + bChanged = event->jhat.value ^ bSame; - if ( bChanged & SDL_HAT_DOWN ) - SDL_PrivateGameControllerButton( controllerlist, controllerlist->mapping.rhatasbutton[bHighHat | SDL_HAT_DOWN], SDL_PRESSED ); - if ( bChanged & SDL_HAT_UP ) - SDL_PrivateGameControllerButton( controllerlist, controllerlist->mapping.rhatasbutton[bHighHat | SDL_HAT_UP], SDL_PRESSED ); - if ( bChanged & SDL_HAT_LEFT ) - SDL_PrivateGameControllerButton( controllerlist, controllerlist->mapping.rhatasbutton[bHighHat | SDL_HAT_LEFT], SDL_PRESSED ); - if ( bChanged & SDL_HAT_RIGHT ) - SDL_PrivateGameControllerButton( controllerlist, controllerlist->mapping.rhatasbutton[bHighHat | SDL_HAT_RIGHT], SDL_PRESSED ); + if ( bChanged & SDL_HAT_DOWN ) + SDL_PrivateGameControllerButton( controllerlist, controllerlist->mapping.rhatasbutton[bHighHat | SDL_HAT_DOWN], SDL_PRESSED ); + if ( bChanged & SDL_HAT_UP ) + SDL_PrivateGameControllerButton( controllerlist, controllerlist->mapping.rhatasbutton[bHighHat | SDL_HAT_UP], SDL_PRESSED ); + if ( bChanged & SDL_HAT_LEFT ) + SDL_PrivateGameControllerButton( controllerlist, controllerlist->mapping.rhatasbutton[bHighHat | SDL_HAT_LEFT], SDL_PRESSED ); + if ( bChanged & SDL_HAT_RIGHT ) + SDL_PrivateGameControllerButton( controllerlist, controllerlist->mapping.rhatasbutton[bHighHat | SDL_HAT_RIGHT], SDL_PRESSED ); - // update our state cache - controllerlist->hatState[event->jhat.hat] = event->jhat.value; + /* update our state cache */ + controllerlist->hatState[event->jhat.hat] = event->jhat.value; - break; - } - controllerlist = controllerlist->next; - } - } - break; - case SDL_JOYDEVICEADDED: - { - if ( SDL_IsGameController(event->jdevice.which ) ) - { - SDL_Event deviceevent; - deviceevent.type = SDL_CONTROLLERDEVICEADDED; - deviceevent.cdevice.which = event->jdevice.which; - SDL_PushEvent(&deviceevent); - } - } - break; - case SDL_JOYDEVICEREMOVED: - { - SDL_GameController *controllerlist = SDL_gamecontrollers; - while ( controllerlist ) - { - if ( controllerlist->joystick->instance_id == event->jdevice.which ) - { - SDL_Event deviceevent; - deviceevent.type = SDL_CONTROLLERDEVICEREMOVED; - deviceevent.cdevice.which = event->jdevice.which; - SDL_PushEvent(&deviceevent); - break; - } - controllerlist = controllerlist->next; - } - } - break; - default: - break; - } + break; + } + controllerlist = controllerlist->next; + } + } + break; + case SDL_JOYDEVICEADDED: + { + if ( SDL_IsGameController(event->jdevice.which ) ) + { + SDL_Event deviceevent; + deviceevent.type = SDL_CONTROLLERDEVICEADDED; + deviceevent.cdevice.which = event->jdevice.which; + SDL_PushEvent(&deviceevent); + } + } + break; + case SDL_JOYDEVICEREMOVED: + { + SDL_GameController *controllerlist = SDL_gamecontrollers; + while ( controllerlist ) + { + if ( controllerlist->joystick->instance_id == event->jdevice.which ) + { + SDL_Event deviceevent; + deviceevent.type = SDL_CONTROLLERDEVICEREMOVED; + deviceevent.cdevice.which = event->jdevice.which; + SDL_PushEvent(&deviceevent); + break; + } + controllerlist = controllerlist->next; + } + } + break; + default: + break; + } - return 1; + return 1; } /* @@ -294,15 +294,15 @@ int SDL_GameControllerEventWatcher(void *userdata, SDL_Event * event) */ ControllerMapping_t *SDL_PrivateGetControllerMappingForGUID(SDL_JoystickGUID *guid) { - ControllerMapping_t *pSupportedController = s_pSupportedControllers; - while ( pSupportedController ) - { - if ( !SDL_memcmp( guid, &pSupportedController->guid, sizeof(*guid) ) ) - { - return pSupportedController; - } - pSupportedController = pSupportedController->next; - } + ControllerMapping_t *pSupportedController = s_pSupportedControllers; + while ( pSupportedController ) + { + if ( !SDL_memcmp( guid, &pSupportedController->guid, sizeof(*guid) ) ) + { + return pSupportedController; + } + pSupportedController = pSupportedController->next; + } return NULL; } @@ -312,18 +312,18 @@ ControllerMapping_t *SDL_PrivateGetControllerMappingForGUID(SDL_JoystickGUID *gu ControllerMapping_t *SDL_PrivateGetControllerMapping(int device_index) { #ifdef SDL_JOYSTICK_DINPUT - if ( SDL_SYS_IsXInputDeviceIndex(device_index) && s_pXInputMapping ) - { - return s_pXInputMapping; - } - else + if ( SDL_SYS_IsXInputDeviceIndex(device_index) && s_pXInputMapping ) + { + return s_pXInputMapping; + } + else #endif - { - SDL_JoystickGUID jGUID = SDL_JoystickGetDeviceGUID( device_index ); - return SDL_PrivateGetControllerMappingForGUID(&jGUID); - } + { + SDL_JoystickGUID jGUID = SDL_JoystickGetDeviceGUID( device_index ); + return SDL_PrivateGetControllerMappingForGUID(&jGUID); + } - return NULL; + return NULL; } static const char* map_StringForControllerAxis[] = { @@ -342,8 +342,8 @@ static const char* map_StringForControllerAxis[] = { SDL_GameControllerAxis SDL_GameControllerGetAxisFromString( const char *pchString ) { int entry; - if ( !pchString || !pchString[0] ) - return SDL_CONTROLLER_AXIS_INVALID; + if ( !pchString || !pchString[0] ) + return SDL_CONTROLLER_AXIS_INVALID; for ( entry = 0; map_StringForControllerAxis[entry]; ++entry) { @@ -390,15 +390,15 @@ static const char* map_StringForControllerButton[] = { SDL_GameControllerButton SDL_GameControllerGetButtonFromString( const char *pchString ) { int entry; - if ( !pchString || !pchString[0] ) - return SDL_CONTROLLER_BUTTON_INVALID; + if ( !pchString || !pchString[0] ) + return SDL_CONTROLLER_BUTTON_INVALID; for ( entry = 0; map_StringForControllerButton[entry]; ++entry) - { - if ( !SDL_strcasecmp( pchString, map_StringForControllerButton[entry] ) ) - return entry; - } - return SDL_CONTROLLER_BUTTON_INVALID; + { + if ( !SDL_strcasecmp( pchString, map_StringForControllerButton[entry] ) ) + return entry; + } + return SDL_CONTROLLER_BUTTON_INVALID; } /* @@ -418,83 +418,83 @@ const char* SDL_GameControllerGetStringForButton( SDL_GameControllerButton axis */ void SDL_PrivateGameControllerParseButton( const char *szGameButton, const char *szJoystickButton, struct _SDL_ControllerMapping *pMapping ) { - int iSDLButton = 0; - SDL_GameControllerButton button; - SDL_GameControllerAxis axis; - button = SDL_GameControllerGetButtonFromString( szGameButton ); - axis = SDL_GameControllerGetAxisFromString( szGameButton ); - iSDLButton = SDL_atoi( &szJoystickButton[1] ); + int iSDLButton = 0; + SDL_GameControllerButton button; + SDL_GameControllerAxis axis; + button = SDL_GameControllerGetButtonFromString( szGameButton ); + axis = SDL_GameControllerGetAxisFromString( szGameButton ); + iSDLButton = SDL_atoi( &szJoystickButton[1] ); - if ( szJoystickButton[0] == 'a' ) - { - if ( iSDLButton >= k_nMaxReverseEntries ) - { - SDL_SetError("Axis index too large: %d", iSDLButton ); - return; - } - if ( axis != SDL_CONTROLLER_AXIS_INVALID ) - { - pMapping->axes[ axis ] = iSDLButton; - pMapping->raxes[ iSDLButton ] = axis; - } - else if ( button != SDL_CONTROLLER_BUTTON_INVALID ) - { - pMapping->axesasbutton[ button ] = iSDLButton; - pMapping->raxesasbutton[ iSDLButton ] = button; - } - else - { - SDL_assert( !"How did we get here?" ); - } + if ( szJoystickButton[0] == 'a' ) + { + if ( iSDLButton >= k_nMaxReverseEntries ) + { + SDL_SetError("Axis index too large: %d", iSDLButton ); + return; + } + if ( axis != SDL_CONTROLLER_AXIS_INVALID ) + { + pMapping->axes[ axis ] = iSDLButton; + pMapping->raxes[ iSDLButton ] = axis; + } + else if ( button != SDL_CONTROLLER_BUTTON_INVALID ) + { + pMapping->axesasbutton[ button ] = iSDLButton; + pMapping->raxesasbutton[ iSDLButton ] = button; + } + else + { + SDL_assert( !"How did we get here?" ); + } - } - else if ( szJoystickButton[0] == 'b' ) - { - if ( iSDLButton >= k_nMaxReverseEntries ) - { - SDL_SetError("Button index too large: %d", iSDLButton ); - return; - } - if ( button != SDL_CONTROLLER_BUTTON_INVALID ) - { - pMapping->buttons[ button ] = iSDLButton; - pMapping->rbuttons[ iSDLButton ] = button; - } - else if ( axis != SDL_CONTROLLER_AXIS_INVALID ) - { - pMapping->buttonasaxis[ axis ] = iSDLButton; - pMapping->rbuttonasaxis[ iSDLButton ] = axis; - } - else - { - SDL_assert( !"How did we get here?" ); - } - } - else if ( szJoystickButton[0] == 'h' ) - { - int hat = SDL_atoi( &szJoystickButton[1] ); - int mask = SDL_atoi( &szJoystickButton[3] ); - if (hat >= 4) { - SDL_SetError("Hat index too large: %d", iSDLButton ); - } + } + else if ( szJoystickButton[0] == 'b' ) + { + if ( iSDLButton >= k_nMaxReverseEntries ) + { + SDL_SetError("Button index too large: %d", iSDLButton ); + return; + } + if ( button != SDL_CONTROLLER_BUTTON_INVALID ) + { + pMapping->buttons[ button ] = iSDLButton; + pMapping->rbuttons[ iSDLButton ] = button; + } + else if ( axis != SDL_CONTROLLER_AXIS_INVALID ) + { + pMapping->buttonasaxis[ axis ] = iSDLButton; + pMapping->rbuttonasaxis[ iSDLButton ] = axis; + } + else + { + SDL_assert( !"How did we get here?" ); + } + } + else if ( szJoystickButton[0] == 'h' ) + { + int hat = SDL_atoi( &szJoystickButton[1] ); + int mask = SDL_atoi( &szJoystickButton[3] ); + if (hat >= 4) { + SDL_SetError("Hat index too large: %d", iSDLButton ); + } - if ( button != SDL_CONTROLLER_BUTTON_INVALID ) - { + if ( button != SDL_CONTROLLER_BUTTON_INVALID ) + { int ridx; - pMapping->hatasbutton[ button ].hat = hat; - pMapping->hatasbutton[ button ].mask = mask; - ridx = (hat << 4) | mask; - pMapping->rhatasbutton[ ridx ] = button; - } - else if ( axis != SDL_CONTROLLER_AXIS_INVALID ) - { - SDL_assert( !"Support hat as axis" ); - } - else - { - SDL_assert( !"How did we get here?" ); - } - } + pMapping->hatasbutton[ button ].hat = hat; + pMapping->hatasbutton[ button ].mask = mask; + ridx = (hat << 4) | mask; + pMapping->rhatasbutton[ ridx ] = button; + } + else if ( axis != SDL_CONTROLLER_AXIS_INVALID ) + { + SDL_assert( !"Support hat as axis" ); + } + else + { + SDL_assert( !"How did we get here?" ); + } + } } @@ -504,59 +504,59 @@ void SDL_PrivateGameControllerParseButton( const char *szGameButton, const char static void SDL_PrivateGameControllerParseControllerConfigString( struct _SDL_ControllerMapping *pMapping, const char *pchString ) { - char szGameButton[20]; - char szJoystickButton[20]; - SDL_bool bGameButton = SDL_TRUE; - int i = 0; - const char *pchPos = pchString; + char szGameButton[20]; + char szJoystickButton[20]; + SDL_bool bGameButton = SDL_TRUE; + int i = 0; + const char *pchPos = pchString; - SDL_memset( szGameButton, 0x0, sizeof(szGameButton) ); - SDL_memset( szJoystickButton, 0x0, sizeof(szJoystickButton) ); + SDL_memset( szGameButton, 0x0, sizeof(szGameButton) ); + SDL_memset( szJoystickButton, 0x0, sizeof(szJoystickButton) ); - while ( pchPos && *pchPos ) - { - if ( *pchPos == ':' ) - { - i = 0; - bGameButton = SDL_FALSE; - } - else if ( *pchPos == ' ' ) - { + while ( pchPos && *pchPos ) + { + if ( *pchPos == ':' ) + { + i = 0; + bGameButton = SDL_FALSE; + } + else if ( *pchPos == ' ' ) + { - } - else if ( *pchPos == ',' ) - { - i = 0; - bGameButton = SDL_TRUE; - SDL_PrivateGameControllerParseButton( szGameButton, szJoystickButton, pMapping ); - SDL_memset( szGameButton, 0x0, sizeof(szGameButton) ); - SDL_memset( szJoystickButton, 0x0, sizeof(szJoystickButton) ); + } + else if ( *pchPos == ',' ) + { + i = 0; + bGameButton = SDL_TRUE; + SDL_PrivateGameControllerParseButton( szGameButton, szJoystickButton, pMapping ); + SDL_memset( szGameButton, 0x0, sizeof(szGameButton) ); + SDL_memset( szJoystickButton, 0x0, sizeof(szJoystickButton) ); - } - else if ( bGameButton ) - { - if ( i >= sizeof(szGameButton)) - { - SDL_SetError( "Button name too large: %s", szGameButton ); - return; - } - szGameButton[i] = *pchPos; - i++; - } - else - { - if ( i >= sizeof(szJoystickButton)) - { - SDL_SetError( "Joystick button name too large: %s", szJoystickButton ); - return; - } - szJoystickButton[i] = *pchPos; - i++; - } - pchPos++; - } + } + else if ( bGameButton ) + { + if ( i >= sizeof(szGameButton)) + { + SDL_SetError( "Button name too large: %s", szGameButton ); + return; + } + szGameButton[i] = *pchPos; + i++; + } + else + { + if ( i >= sizeof(szJoystickButton)) + { + SDL_SetError( "Joystick button name too large: %s", szJoystickButton ); + return; + } + szJoystickButton[i] = *pchPos; + i++; + } + pchPos++; + } - SDL_PrivateGameControllerParseButton( szGameButton, szJoystickButton, pMapping ); + SDL_PrivateGameControllerParseButton( szGameButton, szJoystickButton, pMapping ); } @@ -565,38 +565,38 @@ SDL_PrivateGameControllerParseControllerConfigString( struct _SDL_ControllerMapp */ void SDL_PrivateLoadButtonMapping( struct _SDL_ControllerMapping *pMapping, SDL_JoystickGUID guid, const char *pchName, const char *pchMapping ) { - int j; + int j; - pMapping->guid = guid; - pMapping->name = pchName; + pMapping->guid = guid; + pMapping->name = pchName; - // set all the button mappings to non defaults - for ( j = 0; j < SDL_CONTROLLER_AXIS_MAX; j++ ) - { - pMapping->axes[j] = -1; - pMapping->buttonasaxis[j] = -1; - } - for ( j = 0; j < SDL_CONTROLLER_BUTTON_MAX; j++ ) - { - pMapping->buttons[j] = -1; - pMapping->axesasbutton[j] = -1; - pMapping->hatasbutton[j].hat = -1; - } + /* set all the button mappings to non defaults */ + for ( j = 0; j < SDL_CONTROLLER_AXIS_MAX; j++ ) + { + pMapping->axes[j] = -1; + pMapping->buttonasaxis[j] = -1; + } + for ( j = 0; j < SDL_CONTROLLER_BUTTON_MAX; j++ ) + { + pMapping->buttons[j] = -1; + pMapping->axesasbutton[j] = -1; + pMapping->hatasbutton[j].hat = -1; + } - for ( j = 0; j < k_nMaxReverseEntries; j++ ) - { - pMapping->raxes[j] = SDL_CONTROLLER_AXIS_INVALID; - pMapping->rbuttonasaxis[j] = SDL_CONTROLLER_AXIS_INVALID; - pMapping->rbuttons[j] = SDL_CONTROLLER_BUTTON_INVALID; - pMapping->raxesasbutton[j] = SDL_CONTROLLER_BUTTON_INVALID; - } + for ( j = 0; j < k_nMaxReverseEntries; j++ ) + { + pMapping->raxes[j] = SDL_CONTROLLER_AXIS_INVALID; + pMapping->rbuttonasaxis[j] = SDL_CONTROLLER_AXIS_INVALID; + pMapping->rbuttons[j] = SDL_CONTROLLER_BUTTON_INVALID; + pMapping->raxesasbutton[j] = SDL_CONTROLLER_BUTTON_INVALID; + } - for (j = 0; j < k_nMaxHatEntries; j++) - { - pMapping->rhatasbutton[j] = SDL_CONTROLLER_BUTTON_INVALID; - } + for (j = 0; j < k_nMaxHatEntries; j++) + { + pMapping->rhatasbutton[j] = SDL_CONTROLLER_BUTTON_INVALID; + } - SDL_PrivateGameControllerParseControllerConfigString( pMapping, pchMapping ); + SDL_PrivateGameControllerParseControllerConfigString( pMapping, pchMapping ); } @@ -605,20 +605,20 @@ void SDL_PrivateLoadButtonMapping( struct _SDL_ControllerMapping *pMapping, SDL_ */ char *SDL_PrivateGetControllerGUIDFromMappingString( const char *pMapping ) { - const char *pFirstComma = SDL_strchr( pMapping, ',' ); - if ( pFirstComma ) - { - char *pchGUID = SDL_malloc( pFirstComma - pMapping + 1 ); - if ( !pchGUID ) - { - SDL_OutOfMemory(); - return NULL; - } - SDL_memcpy( pchGUID, pMapping, pFirstComma - pMapping ); - pchGUID[ pFirstComma - pMapping ] = 0; - return pchGUID; - } - return NULL; + const char *pFirstComma = SDL_strchr( pMapping, ',' ); + if ( pFirstComma ) + { + char *pchGUID = SDL_malloc( pFirstComma - pMapping + 1 ); + if ( !pchGUID ) + { + SDL_OutOfMemory(); + return NULL; + } + SDL_memcpy( pchGUID, pMapping, pFirstComma - pMapping ); + pchGUID[ pFirstComma - pMapping ] = 0; + return pchGUID; + } + return NULL; } @@ -627,14 +627,14 @@ char *SDL_PrivateGetControllerGUIDFromMappingString( const char *pMapping ) */ char *SDL_PrivateGetControllerNameFromMappingString( const char *pMapping ) { - const char *pFirstComma, *pSecondComma; + const char *pFirstComma, *pSecondComma; char *pchName; pFirstComma = SDL_strchr( pMapping, ',' ); if ( !pFirstComma ) return NULL; - pSecondComma = SDL_strchr( pFirstComma + 1, ',' ); + pSecondComma = SDL_strchr( pFirstComma + 1, ',' ); if ( !pSecondComma ) return NULL; @@ -655,13 +655,13 @@ char *SDL_PrivateGetControllerNameFromMappingString( const char *pMapping ) */ char *SDL_PrivateGetControllerMappingFromMappingString( const char *pMapping ) { - const char *pFirstComma, *pSecondComma; + const char *pFirstComma, *pSecondComma; pFirstComma = SDL_strchr( pMapping, ',' ); if ( !pFirstComma ) return NULL; - pSecondComma = SDL_strchr( pFirstComma + 1, ',' ); + pSecondComma = SDL_strchr( pFirstComma + 1, ',' ); if ( !pSecondComma ) return NULL; @@ -679,11 +679,11 @@ void SDL_PrivateGameControllerRefreshMapping( ControllerMapping_t *pControllerMa event.type = SDL_CONTROLLERDEVICEREMAPPED; event.cdevice.which = gamecontrollerlist->joystick->instance_id; SDL_PushEvent(&event); - - // Not really threadsafe. Should this lock access within SDL_GameControllerEventWatcher? + + /* Not really threadsafe. Should this lock access within SDL_GameControllerEventWatcher? */ SDL_PrivateLoadButtonMapping(&gamecontrollerlist->mapping, pControllerMapping->guid, pControllerMapping->name, pControllerMapping->mapping); } - + gamecontrollerlist = gamecontrollerlist->next; } } @@ -694,9 +694,9 @@ void SDL_PrivateGameControllerRefreshMapping( ControllerMapping_t *pControllerMa int SDL_GameControllerAddMapping( const char *mappingString ) { - char *pchGUID; - char *pchName; - char *pchMapping; + char *pchGUID; + char *pchName; + char *pchMapping; SDL_JoystickGUID jGUID; ControllerMapping_t *pControllerMapping; #ifdef SDL_JOYSTICK_DINPUT @@ -715,46 +715,46 @@ SDL_GameControllerAddMapping( const char *mappingString ) jGUID = SDL_JoystickGetGUIDFromString(pchGUID); SDL_free(pchGUID); - pControllerMapping = SDL_PrivateGetControllerMappingForGUID(&jGUID); + pControllerMapping = SDL_PrivateGetControllerMappingForGUID(&jGUID); - pchName = SDL_PrivateGetControllerNameFromMappingString( mappingString ); - if (!pchName) return -1; + pchName = SDL_PrivateGetControllerNameFromMappingString( mappingString ); + if (!pchName) return -1; - pchMapping = SDL_PrivateGetControllerMappingFromMappingString( mappingString ); - if (!pchMapping) { - SDL_free( pchName ); - return -1; - } + pchMapping = SDL_PrivateGetControllerMappingFromMappingString( mappingString ); + if (!pchMapping) { + SDL_free( pchName ); + return -1; + } - if (pControllerMapping) { - // Update existing mapping - SDL_free( pControllerMapping->name ); - pControllerMapping->name = pchName; - SDL_free( pControllerMapping->mapping ); - pControllerMapping->mapping = pchMapping; - // refresh open controllers - SDL_PrivateGameControllerRefreshMapping( pControllerMapping ); - return 0; - } else { - pControllerMapping = SDL_malloc( sizeof(*pControllerMapping) ); - if (!pControllerMapping) { - SDL_free( pchName ); - SDL_free( pchMapping ); - return SDL_OutOfMemory(); - } + if (pControllerMapping) { + /* Update existing mapping */ + SDL_free( pControllerMapping->name ); + pControllerMapping->name = pchName; + SDL_free( pControllerMapping->mapping ); + pControllerMapping->mapping = pchMapping; + /* refresh open controllers */ + SDL_PrivateGameControllerRefreshMapping( pControllerMapping ); + return 0; + } else { + pControllerMapping = SDL_malloc( sizeof(*pControllerMapping) ); + if (!pControllerMapping) { + SDL_free( pchName ); + SDL_free( pchMapping ); + return SDL_OutOfMemory(); + } #ifdef SDL_JOYSTICK_DINPUT - if ( is_xinput_mapping ) - { - s_pXInputMapping = pControllerMapping; - } + if ( is_xinput_mapping ) + { + s_pXInputMapping = pControllerMapping; + } #endif - pControllerMapping->guid = jGUID; - pControllerMapping->name = pchName; - pControllerMapping->mapping = pchMapping; - pControllerMapping->next = s_pSupportedControllers; - s_pSupportedControllers = pControllerMapping; - return 1; - } + pControllerMapping->guid = jGUID; + pControllerMapping->name = pchName; + pControllerMapping->mapping = pchMapping; + pControllerMapping->next = s_pSupportedControllers; + s_pSupportedControllers = pControllerMapping; + return 1; + } } /* @@ -763,18 +763,18 @@ SDL_GameControllerAddMapping( const char *mappingString ) char * SDL_GameControllerMappingForGUID( SDL_JoystickGUID guid ) { - char *pMappingString = NULL; - ControllerMapping_t *mapping = SDL_PrivateGetControllerMappingForGUID(&guid); - if (mapping) { - char pchGUID[33]; + char *pMappingString = NULL; + ControllerMapping_t *mapping = SDL_PrivateGetControllerMappingForGUID(&guid); + if (mapping) { + char pchGUID[33]; size_t needed; - SDL_JoystickGetGUIDString(guid, pchGUID, sizeof(pchGUID)); - // allocate enough memory for GUID + ',' + name + ',' + mapping + \0 - needed = SDL_strlen(pchGUID) + 1 + SDL_strlen(mapping->name) + 1 + SDL_strlen(mapping->mapping) + 1; - pMappingString = SDL_malloc( needed ); - SDL_snprintf( pMappingString, needed, "%s,%s,%s", pchGUID, mapping->name, mapping->mapping ); - } - return pMappingString; + SDL_JoystickGetGUIDString(guid, pchGUID, sizeof(pchGUID)); + /* allocate enough memory for GUID + ',' + name + ',' + mapping + \0 */ + needed = SDL_strlen(pchGUID) + 1 + SDL_strlen(mapping->name) + 1 + SDL_strlen(mapping->mapping) + 1; + pMappingString = SDL_malloc( needed ); + SDL_snprintf( pMappingString, needed, "%s,%s,%s", pchGUID, mapping->name, mapping->mapping ); + } + return pMappingString; } /* @@ -783,7 +783,7 @@ SDL_GameControllerMappingForGUID( SDL_JoystickGUID guid ) char * SDL_GameControllerMapping( SDL_GameController * gamecontroller ) { - return SDL_GameControllerMappingForGUID( gamecontroller->mapping.guid ); + return SDL_GameControllerMappingForGUID( gamecontroller->mapping.guid ); } static void @@ -819,25 +819,25 @@ SDL_GameControllerLoadHints() int SDL_GameControllerInit(void) { - int i = 0; - const char *pMappingString = NULL; - s_pSupportedControllers = NULL; - pMappingString = s_ControllerMappings[i]; - while ( pMappingString ) - { - SDL_GameControllerAddMapping( pMappingString ); + int i = 0; + const char *pMappingString = NULL; + s_pSupportedControllers = NULL; + pMappingString = s_ControllerMappings[i]; + while ( pMappingString ) + { + SDL_GameControllerAddMapping( pMappingString ); - i++; - pMappingString = s_ControllerMappings[i]; - } + i++; + pMappingString = s_ControllerMappings[i]; + } - // load in any user supplied config + /* load in any user supplied config */ SDL_GameControllerLoadHints(); - /* watch for joy events and fire controller ones if needed */ - SDL_AddEventWatch( SDL_GameControllerEventWatcher, NULL ); + /* watch for joy events and fire controller ones if needed */ + SDL_AddEventWatch( SDL_GameControllerEventWatcher, NULL ); - return (0); + return (0); } @@ -847,11 +847,11 @@ SDL_GameControllerInit(void) const char * SDL_GameControllerNameForIndex(int device_index) { - ControllerMapping_t *pSupportedController = SDL_PrivateGetControllerMapping(device_index); - if ( pSupportedController ) - { - return pSupportedController->name; - } + ControllerMapping_t *pSupportedController = SDL_PrivateGetControllerMapping(device_index); + if ( pSupportedController ) + { + return pSupportedController->name; + } return NULL; } @@ -862,13 +862,13 @@ SDL_GameControllerNameForIndex(int device_index) SDL_bool SDL_IsGameController(int device_index) { - ControllerMapping_t *pSupportedController = SDL_PrivateGetControllerMapping(device_index); - if ( pSupportedController ) - { - return SDL_TRUE; - } + ControllerMapping_t *pSupportedController = SDL_PrivateGetControllerMapping(device_index); + if ( pSupportedController ) + { + return SDL_TRUE; + } - return SDL_FALSE; + return SDL_FALSE; } /* @@ -882,56 +882,56 @@ SDL_GameController * SDL_GameControllerOpen(int device_index) { SDL_GameController *gamecontroller; - SDL_GameController *gamecontrollerlist; - ControllerMapping_t *pSupportedController = NULL; + SDL_GameController *gamecontrollerlist; + ControllerMapping_t *pSupportedController = NULL; if ((device_index < 0) || (device_index >= SDL_NumJoysticks())) { SDL_SetError("There are %d joysticks available", SDL_NumJoysticks()); return (NULL); } - gamecontrollerlist = SDL_gamecontrollers; - // If the controller is already open, return it - while ( gamecontrollerlist ) - { - if ( SDL_SYS_GetInstanceIdOfDeviceIndex(device_index) == gamecontrollerlist->joystick->instance_id ) { - gamecontroller = gamecontrollerlist; - ++gamecontroller->ref_count; - return (gamecontroller); - } - gamecontrollerlist = gamecontrollerlist->next; + gamecontrollerlist = SDL_gamecontrollers; + /* If the controller is already open, return it */ + while ( gamecontrollerlist ) + { + if ( SDL_SYS_GetInstanceIdOfDeviceIndex(device_index) == gamecontrollerlist->joystick->instance_id ) { + gamecontroller = gamecontrollerlist; + ++gamecontroller->ref_count; + return (gamecontroller); + } + gamecontrollerlist = gamecontrollerlist->next; } - // Find a controller mapping - pSupportedController = SDL_PrivateGetControllerMapping(device_index); - if ( !pSupportedController ) { - SDL_SetError("Couldn't find mapping for device (%d)", device_index ); - return (NULL); - } + /* Find a controller mapping */ + pSupportedController = SDL_PrivateGetControllerMapping(device_index); + if ( !pSupportedController ) { + SDL_SetError("Couldn't find mapping for device (%d)", device_index ); + return (NULL); + } - // Create and initialize the joystick - gamecontroller = (SDL_GameController *) SDL_malloc((sizeof *gamecontroller)); - if (gamecontroller == NULL) { - SDL_OutOfMemory(); - return NULL; - } + /* Create and initialize the joystick */ + gamecontroller = (SDL_GameController *) SDL_malloc((sizeof *gamecontroller)); + if (gamecontroller == NULL) { + SDL_OutOfMemory(); + return NULL; + } SDL_memset(gamecontroller, 0, (sizeof *gamecontroller)); gamecontroller->joystick = SDL_JoystickOpen(device_index); - if ( !gamecontroller->joystick ) { + if ( !gamecontroller->joystick ) { SDL_free(gamecontroller); return NULL; } - SDL_PrivateLoadButtonMapping( &gamecontroller->mapping, pSupportedController->guid, pSupportedController->name, pSupportedController->mapping ); + SDL_PrivateLoadButtonMapping( &gamecontroller->mapping, pSupportedController->guid, pSupportedController->name, pSupportedController->mapping ); - // Add joystick to list + /* Add joystick to list */ ++gamecontroller->ref_count; - // Link the joystick in the list - gamecontroller->next = SDL_gamecontrollers; - SDL_gamecontrollers = gamecontroller; + /* Link the joystick in the list */ + gamecontroller->next = SDL_gamecontrollers; + SDL_gamecontrollers = gamecontroller; - SDL_SYS_JoystickUpdate( gamecontroller->joystick ); + SDL_SYS_JoystickUpdate( gamecontroller->joystick ); return (gamecontroller); } @@ -953,22 +953,22 @@ SDL_GameControllerUpdate(void) Sint16 SDL_GameControllerGetAxis(SDL_GameController * gamecontroller, SDL_GameControllerAxis axis) { - if ( !gamecontroller ) - return 0; + if ( !gamecontroller ) + return 0; - if (gamecontroller->mapping.axes[axis] >= 0 ) - { - return ( SDL_JoystickGetAxis( gamecontroller->joystick, gamecontroller->mapping.axes[axis]) ); - } - else if (gamecontroller->mapping.buttonasaxis[axis] >= 0 ) - { - Uint8 value; - value = SDL_JoystickGetButton( gamecontroller->joystick, gamecontroller->mapping.buttonasaxis[axis] ); - if ( value > 0 ) - return 32767; - return 0; - } - return 0; + if (gamecontroller->mapping.axes[axis] >= 0 ) + { + return ( SDL_JoystickGetAxis( gamecontroller->joystick, gamecontroller->mapping.axes[axis]) ); + } + else if (gamecontroller->mapping.buttonasaxis[axis] >= 0 ) + { + Uint8 value; + value = SDL_JoystickGetButton( gamecontroller->joystick, gamecontroller->mapping.buttonasaxis[axis] ); + if ( value > 0 ) + return 32767; + return 0; + } + return 0; } @@ -978,32 +978,32 @@ SDL_GameControllerGetAxis(SDL_GameController * gamecontroller, SDL_GameControlle Uint8 SDL_GameControllerGetButton(SDL_GameController * gamecontroller, SDL_GameControllerButton button) { - if ( !gamecontroller ) - return 0; + if ( !gamecontroller ) + return 0; - if ( gamecontroller->mapping.buttons[button] >= 0 ) - { - return ( SDL_JoystickGetButton( gamecontroller->joystick, gamecontroller->mapping.buttons[button] ) ); - } - else if ( gamecontroller->mapping.axesasbutton[button] >= 0 ) - { - Sint16 value; - value = SDL_JoystickGetAxis( gamecontroller->joystick, gamecontroller->mapping.axesasbutton[button] ); - if ( ABS(value) > 32768/2 ) - return 1; - return 0; - } - else if ( gamecontroller->mapping.hatasbutton[button].hat >= 0 ) - { - Uint8 value; - value = SDL_JoystickGetHat( gamecontroller->joystick, gamecontroller->mapping.hatasbutton[button].hat ); - - if ( value & gamecontroller->mapping.hatasbutton[button].mask ) - return 1; - return 0; - } + if ( gamecontroller->mapping.buttons[button] >= 0 ) + { + return ( SDL_JoystickGetButton( gamecontroller->joystick, gamecontroller->mapping.buttons[button] ) ); + } + else if ( gamecontroller->mapping.axesasbutton[button] >= 0 ) + { + Sint16 value; + value = SDL_JoystickGetAxis( gamecontroller->joystick, gamecontroller->mapping.axesasbutton[button] ); + if ( ABS(value) > 32768/2 ) + return 1; + return 0; + } + else if ( gamecontroller->mapping.hatasbutton[button].hat >= 0 ) + { + Uint8 value; + value = SDL_JoystickGetHat( gamecontroller->joystick, gamecontroller->mapping.hatasbutton[button].hat ); - return 0; + if ( value & gamecontroller->mapping.hatasbutton[button].mask ) + return 1; + return 0; + } + + return 0; } /* @@ -1013,10 +1013,10 @@ SDL_GameControllerGetButton(SDL_GameController * gamecontroller, SDL_GameControl SDL_bool SDL_GameControllerGetAttached( SDL_GameController * gamecontroller ) { - if ( !gamecontroller ) - return SDL_FALSE; + if ( !gamecontroller ) + return SDL_FALSE; - return SDL_JoystickGetAttached(gamecontroller->joystick); + return SDL_JoystickGetAttached(gamecontroller->joystick); } @@ -1026,8 +1026,8 @@ SDL_GameControllerGetAttached( SDL_GameController * gamecontroller ) const char * SDL_GameControllerName(SDL_GameController * gamecontroller) { - if ( !gamecontroller ) - return NULL; + if ( !gamecontroller ) + return NULL; return (gamecontroller->mapping.name); } @@ -1038,10 +1038,10 @@ SDL_GameControllerName(SDL_GameController * gamecontroller) */ SDL_Joystick *SDL_GameControllerGetJoystick(SDL_GameController * gamecontroller) { - if ( !gamecontroller ) - return NULL; + if ( !gamecontroller ) + return NULL; - return gamecontroller->joystick; + return gamecontroller->joystick; } /** @@ -1049,24 +1049,24 @@ SDL_Joystick *SDL_GameControllerGetJoystick(SDL_GameController * gamecontroller) */ SDL_GameControllerButtonBind SDL_GameControllerGetBindForAxis(SDL_GameController * gamecontroller, SDL_GameControllerAxis axis) { - SDL_GameControllerButtonBind bind; - SDL_memset( &bind, 0x0, sizeof(bind) ); + SDL_GameControllerButtonBind bind; + SDL_memset( &bind, 0x0, sizeof(bind) ); - if ( !gamecontroller || axis == SDL_CONTROLLER_AXIS_INVALID ) - return bind; + if ( !gamecontroller || axis == SDL_CONTROLLER_AXIS_INVALID ) + return bind; - if (gamecontroller->mapping.axes[axis] >= 0 ) - { - bind.bindType = SDL_CONTROLLER_BINDTYPE_AXIS; - bind.value.button = gamecontroller->mapping.axes[axis]; - } - else if (gamecontroller->mapping.buttonasaxis[axis] >= 0 ) - { - bind.bindType = SDL_CONTROLLER_BINDTYPE_BUTTON; - bind.value.button = gamecontroller->mapping.buttonasaxis[axis]; - } + if (gamecontroller->mapping.axes[axis] >= 0 ) + { + bind.bindType = SDL_CONTROLLER_BINDTYPE_AXIS; + bind.value.button = gamecontroller->mapping.axes[axis]; + } + else if (gamecontroller->mapping.buttonasaxis[axis] >= 0 ) + { + bind.bindType = SDL_CONTROLLER_BINDTYPE_BUTTON; + bind.value.button = gamecontroller->mapping.buttonasaxis[axis]; + } - return bind; + return bind; } @@ -1075,30 +1075,30 @@ SDL_GameControllerButtonBind SDL_GameControllerGetBindForAxis(SDL_GameController */ SDL_GameControllerButtonBind SDL_GameControllerGetBindForButton(SDL_GameController * gamecontroller, SDL_GameControllerButton button) { - SDL_GameControllerButtonBind bind; - SDL_memset( &bind, 0x0, sizeof(bind) ); + SDL_GameControllerButtonBind bind; + SDL_memset( &bind, 0x0, sizeof(bind) ); - if ( !gamecontroller || button == SDL_CONTROLLER_BUTTON_INVALID ) - return bind; + if ( !gamecontroller || button == SDL_CONTROLLER_BUTTON_INVALID ) + return bind; - if ( gamecontroller->mapping.buttons[button] >= 0 ) - { - bind.bindType = SDL_CONTROLLER_BINDTYPE_BUTTON; - bind.value.button = gamecontroller->mapping.buttons[button]; - } - else if ( gamecontroller->mapping.axesasbutton[button] >= 0 ) - { - bind.bindType = SDL_CONTROLLER_BINDTYPE_AXIS; - bind.value.axis = gamecontroller->mapping.axesasbutton[button]; - } - else if ( gamecontroller->mapping.hatasbutton[button].hat >= 0 ) - { - bind.bindType = SDL_CONTROLLER_BINDTYPE_HAT; - bind.value.hat.hat = gamecontroller->mapping.hatasbutton[button].hat; - bind.value.hat.hat_mask = gamecontroller->mapping.hatasbutton[button].mask; - } + if ( gamecontroller->mapping.buttons[button] >= 0 ) + { + bind.bindType = SDL_CONTROLLER_BINDTYPE_BUTTON; + bind.value.button = gamecontroller->mapping.buttons[button]; + } + else if ( gamecontroller->mapping.axesasbutton[button] >= 0 ) + { + bind.bindType = SDL_CONTROLLER_BINDTYPE_AXIS; + bind.value.axis = gamecontroller->mapping.axesasbutton[button]; + } + else if ( gamecontroller->mapping.hatasbutton[button].hat >= 0 ) + { + bind.bindType = SDL_CONTROLLER_BINDTYPE_HAT; + bind.value.hat.hat = gamecontroller->mapping.hatasbutton[button].hat; + bind.value.hat.hat_mask = gamecontroller->mapping.hatasbutton[button].mask; + } - return bind; + return bind; } @@ -1108,39 +1108,39 @@ SDL_GameControllerButtonBind SDL_GameControllerGetBindForButton(SDL_GameControll void SDL_GameControllerClose(SDL_GameController * gamecontroller) { - SDL_GameController *gamecontrollerlist, *gamecontrollerlistprev; + SDL_GameController *gamecontrollerlist, *gamecontrollerlistprev; - if ( !gamecontroller ) - return; + if ( !gamecontroller ) + return; - // First decrement ref count + /* First decrement ref count */ if (--gamecontroller->ref_count > 0) { return; } - SDL_JoystickClose( gamecontroller->joystick ); - - gamecontrollerlist = SDL_gamecontrollers; - gamecontrollerlistprev = NULL; - while ( gamecontrollerlist ) - { - if (gamecontroller == gamecontrollerlist) - { - if ( gamecontrollerlistprev ) - { - // unlink this entry - gamecontrollerlistprev->next = gamecontrollerlist->next; - } - else - { - SDL_gamecontrollers = gamecontroller->next; - } + SDL_JoystickClose( gamecontroller->joystick ); - break; - } - gamecontrollerlistprev = gamecontrollerlist; - gamecontrollerlist = gamecontrollerlist->next; - } + gamecontrollerlist = SDL_gamecontrollers; + gamecontrollerlistprev = NULL; + while ( gamecontrollerlist ) + { + if (gamecontroller == gamecontrollerlist) + { + if ( gamecontrollerlistprev ) + { + /* unlink this entry */ + gamecontrollerlistprev->next = gamecontrollerlist->next; + } + else + { + SDL_gamecontrollers = gamecontroller->next; + } + + break; + } + gamecontrollerlistprev = gamecontrollerlist; + gamecontrollerlist = gamecontrollerlist->next; + } SDL_free(gamecontroller); } @@ -1152,22 +1152,22 @@ SDL_GameControllerClose(SDL_GameController * gamecontroller) void SDL_GameControllerQuit(void) { - ControllerMapping_t *pControllerMap; - while ( SDL_gamecontrollers ) - { - SDL_gamecontrollers->ref_count = 1; + ControllerMapping_t *pControllerMap; + while ( SDL_gamecontrollers ) + { + SDL_gamecontrollers->ref_count = 1; SDL_GameControllerClose(SDL_gamecontrollers); - } + } - while ( s_pSupportedControllers ) - { - pControllerMap = s_pSupportedControllers; - s_pSupportedControllers = s_pSupportedControllers->next; - SDL_free( pControllerMap->name ); - SDL_free( pControllerMap ); - } + while ( s_pSupportedControllers ) + { + pControllerMap = s_pSupportedControllers; + s_pSupportedControllers = s_pSupportedControllers->next; + SDL_free( pControllerMap->name ); + SDL_free( pControllerMap ); + } - SDL_DelEventWatch( SDL_GameControllerEventWatcher, NULL ); + SDL_DelEventWatch( SDL_GameControllerEventWatcher, NULL ); } @@ -1177,7 +1177,7 @@ SDL_GameControllerQuit(void) int SDL_PrivateGameControllerAxis(SDL_GameController * gamecontroller, SDL_GameControllerAxis axis, Sint16 value) { - int posted; + int posted; /* translate the event, if desired */ posted = 0; @@ -1188,7 +1188,7 @@ SDL_PrivateGameControllerAxis(SDL_GameController * gamecontroller, SDL_GameContr event.caxis.which = gamecontroller->joystick->instance_id; event.caxis.axis = axis; event.caxis.value = value; - posted = SDL_PushEvent(&event) == 1; + posted = SDL_PushEvent(&event) == 1; } #endif /* !SDL_EVENTS_DISABLED */ return (posted); @@ -1203,7 +1203,7 @@ SDL_PrivateGameControllerButton(SDL_GameController * gamecontroller, SDL_GameCon { int posted; #if !SDL_EVENTS_DISABLED - SDL_Event event; + SDL_Event event; if ( button == SDL_CONTROLLER_BUTTON_INVALID ) return (0); @@ -1228,7 +1228,7 @@ SDL_PrivateGameControllerButton(SDL_GameController * gamecontroller, SDL_GameCon event.cbutton.which = gamecontroller->joystick->instance_id; event.cbutton.button = button; event.cbutton.state = state; - posted = SDL_PushEvent(&event) == 1; + posted = SDL_PushEvent(&event) == 1; } #endif /* !SDL_EVENTS_DISABLED */ return (posted); @@ -1269,5 +1269,4 @@ SDL_GameControllerEventState(int state) #endif /* SDL_EVENTS_DISABLED */ } - /* vi: set ts=4 sw=4 expandtab: */ diff --git a/src/joystick/SDL_joystick.c b/src/joystick/SDL_joystick.c index 53b465caa..0e9c3f74c 100644 --- a/src/joystick/SDL_joystick.c +++ b/src/joystick/SDL_joystick.c @@ -78,26 +78,26 @@ SDL_Joystick * SDL_JoystickOpen(int device_index) { SDL_Joystick *joystick; - SDL_Joystick *joysticklist; - const char *joystickname = NULL; + SDL_Joystick *joysticklist; + const char *joystickname = NULL; if ((device_index < 0) || (device_index >= SDL_NumJoysticks())) { SDL_SetError("There are %d joysticks available", SDL_NumJoysticks()); return (NULL); } - joysticklist = SDL_joysticks; - /* If the joystick is already open, return it - * it is important that we have a single joystick * for each instance id - */ - while ( joysticklist ) - { - if ( SDL_SYS_GetInstanceIdOfDeviceIndex(device_index) == joysticklist->instance_id ) { - joystick = joysticklist; - ++joystick->ref_count; - return (joystick); - } - joysticklist = joysticklist->next; + joysticklist = SDL_joysticks; + /* If the joystick is already open, return it + * it is important that we have a single joystick * for each instance id + */ + while ( joysticklist ) + { + if ( SDL_SYS_GetInstanceIdOfDeviceIndex(device_index) == joysticklist->instance_id ) { + joystick = joysticklist; + ++joystick->ref_count; + return (joystick); + } + joysticklist = joysticklist->next; } /* Create and initialize the joystick */ @@ -113,11 +113,11 @@ SDL_JoystickOpen(int device_index) return NULL; } - joystickname = SDL_SYS_JoystickNameForDeviceIndex( device_index ); - if ( joystickname ) - joystick->name = SDL_strdup( joystickname ); - else - joystick->name = NULL; + joystickname = SDL_SYS_JoystickNameForDeviceIndex( device_index ); + if ( joystickname ) + joystick->name = SDL_strdup( joystickname ); + else + joystick->name = NULL; if (joystick->naxes > 0) { joystick->axes = (Sint16 *) SDL_malloc @@ -159,11 +159,11 @@ SDL_JoystickOpen(int device_index) /* Add joystick to list */ ++joystick->ref_count; - /* Link the joystick in the list */ - joystick->next = SDL_joysticks; - SDL_joysticks = joystick; + /* Link the joystick in the list */ + joystick->next = SDL_joysticks; + SDL_joysticks = joystick; - SDL_SYS_JoystickUpdate( joystick ); + SDL_SYS_JoystickUpdate( joystick ); return (joystick); } @@ -183,12 +183,12 @@ SDL_PrivateJoystickValid(SDL_Joystick * joystick) } else { valid = 1; } - - if ( joystick && joystick->closed ) - { - valid = 0; - } - + + if ( joystick && joystick->closed ) + { + valid = 0; + } + return valid; } @@ -335,24 +335,24 @@ SDL_JoystickGetButton(SDL_Joystick * joystick, int button) SDL_bool SDL_JoystickGetAttached(SDL_Joystick * joystick) { - if (!SDL_PrivateJoystickValid(joystick)) { + if (!SDL_PrivateJoystickValid(joystick)) { return SDL_FALSE; } - return SDL_SYS_JoystickAttached(joystick); + return SDL_SYS_JoystickAttached(joystick); } /* * Get the instance id for this opened joystick */ -SDL_JoystickID +SDL_JoystickID SDL_JoystickInstanceID(SDL_Joystick * joystick) { - if (!SDL_PrivateJoystickValid(joystick)) { + if (!SDL_PrivateJoystickValid(joystick)) { return (-1); } - return (joystick->instance_id); + return (joystick->instance_id); } /* @@ -364,7 +364,7 @@ SDL_JoystickName(SDL_Joystick * joystick) if (!SDL_PrivateJoystickValid(joystick)) { return (NULL); } - + return (joystick->name); } @@ -374,8 +374,8 @@ SDL_JoystickName(SDL_Joystick * joystick) void SDL_JoystickClose(SDL_Joystick * joystick) { - SDL_Joystick *joysticklist; - SDL_Joystick *joysticklistprev; + SDL_Joystick *joysticklist; + SDL_Joystick *joysticklistprev; if (!joystick) { return; @@ -391,31 +391,31 @@ SDL_JoystickClose(SDL_Joystick * joystick) } SDL_SYS_JoystickClose(joystick); - - joysticklist = SDL_joysticks; - joysticklistprev = NULL; - while ( joysticklist ) - { - if (joystick == joysticklist) - { - if ( joysticklistprev ) - { - // unlink this entry - joysticklistprev->next = joysticklist->next; - } - else - { - SDL_joysticks = joystick->next; - } - break; - } - joysticklistprev = joysticklist; - joysticklist = joysticklist->next; - } - - if (joystick->name) - SDL_free(joystick->name); + joysticklist = SDL_joysticks; + joysticklistprev = NULL; + while ( joysticklist ) + { + if (joystick == joysticklist) + { + if ( joysticklistprev ) + { + /* unlink this entry */ + joysticklistprev->next = joysticklist->next; + } + else + { + SDL_joysticks = joystick->next; + } + + break; + } + joysticklistprev = joysticklist; + joysticklist = joysticklist->next; + } + + if (joystick->name) + SDL_free(joystick->name); /* Free the data associated with this joystick */ if (joystick->axes) { @@ -440,11 +440,11 @@ SDL_JoystickQuit(void) SDL_assert(!SDL_updating_joystick); /* Stop the event polling */ - while ( SDL_joysticks ) - { - SDL_joysticks->ref_count = 1; + while ( SDL_joysticks ) + { + SDL_joysticks->ref_count = 1; SDL_JoystickClose(SDL_joysticks); - } + } /* Quit the joystick setup */ SDL_SYS_JoystickQuit(); @@ -587,25 +587,25 @@ SDL_PrivateJoystickButton(SDL_Joystick * joystick, Uint8 button, Uint8 state) void SDL_JoystickUpdate(void) { - SDL_Joystick *joystick; - - joystick = SDL_joysticks; - while ( joystick ) - { - SDL_Joystick *joysticknext; - /* save off the next pointer, the Update call may cause a joystick removed event - * and cause our joystick pointer to be freed - */ - joysticknext = joystick->next; + SDL_Joystick *joystick; + + joystick = SDL_joysticks; + while ( joystick ) + { + SDL_Joystick *joysticknext; + /* save off the next pointer, the Update call may cause a joystick removed event + * and cause our joystick pointer to be freed + */ + joysticknext = joystick->next; SDL_updating_joystick = joystick; SDL_SYS_JoystickUpdate( joystick ); - if ( joystick->closed && joystick->uncentered ) - { - int i; - joystick->uncentered = 0; + if ( joystick->closed && joystick->uncentered ) + { + int i; + joystick->uncentered = 0; /* Tell the app that everything is centered/unpressed... */ for (i = 0; i < joystick->naxes; i++) @@ -617,7 +617,7 @@ SDL_JoystickUpdate(void) for (i = 0; i < joystick->nhats; i++) SDL_PrivateJoystickHat(joystick, i, SDL_HAT_CENTERED); - } + } SDL_updating_joystick = NULL; @@ -626,12 +626,13 @@ SDL_JoystickUpdate(void) SDL_JoystickClose(joystick); } - joystick = joysticknext; - } + joystick = joysticknext; + } - // this needs to happen AFTER walking the joystick list above, so that any - // dangling hardware data from removed devices can be free'd - SDL_SYS_JoystickDetect(); + /* this needs to happen AFTER walking the joystick list above, so that any + dangling hardware data from removed devices can be free'd + */ + SDL_SYS_JoystickDetect(); } int @@ -667,106 +668,106 @@ SDL_JoystickEventState(int state) } /* return 1 if you want to run the joystick update loop this frame, used by hotplug support */ -SDL_bool +SDL_bool SDL_PrivateJoystickNeedsPolling() { - if (SDL_joysticks != NULL) { - return SDL_TRUE; - } else { - return SDL_SYS_JoystickNeedsPolling(); - } + if (SDL_joysticks != NULL) { + return SDL_TRUE; + } else { + return SDL_SYS_JoystickNeedsPolling(); + } } /* return the guid for this index */ SDL_JoystickGUID SDL_JoystickGetDeviceGUID(int device_index) { - return SDL_SYS_JoystickGetDeviceGUID( device_index ); + return SDL_SYS_JoystickGetDeviceGUID( device_index ); } /* return the guid for this opened device */ SDL_JoystickGUID SDL_JoystickGetGUID(SDL_Joystick * joystick) { - return SDL_SYS_JoystickGetGUID( joystick ); + return SDL_SYS_JoystickGetGUID( joystick ); } /* convert the guid to a printable string */ void SDL_JoystickGetGUIDString( SDL_JoystickGUID guid, char *pszGUID, int cbGUID ) { - static const char k_rgchHexToASCII[] = "0123456789abcdef"; - int i; + static const char k_rgchHexToASCII[] = "0123456789abcdef"; + int i; if ((pszGUID == NULL) || (cbGUID <= 0)) { return; } - for ( i = 0; i < sizeof(guid.data) && i < (cbGUID-1); i++ ) - { - // each input byte writes 2 ascii chars, and might write a null byte. - // If we don't have room for next input byte, stop - unsigned char c = guid.data[i]; + for ( i = 0; i < sizeof(guid.data) && i < (cbGUID-1); i++ ) + { + /* each input byte writes 2 ascii chars, and might write a null byte. */ + /* If we don't have room for next input byte, stop */ + unsigned char c = guid.data[i]; - *pszGUID++ = k_rgchHexToASCII[ c >> 4 ]; - *pszGUID++ = k_rgchHexToASCII[ c & 0x0F ]; - } - *pszGUID = '\0'; + *pszGUID++ = k_rgchHexToASCII[ c >> 4 ]; + *pszGUID++ = k_rgchHexToASCII[ c & 0x0F ]; + } + *pszGUID = '\0'; } -//----------------------------------------------------------------------------- -// Purpose: Returns the 4 bit nibble for a hex character -// Input : c - -// Output : unsigned char -//----------------------------------------------------------------------------- +/*----------------------------------------------------------------------------- + * Purpose: Returns the 4 bit nibble for a hex character + * Input : c - + * Output : unsigned char + *-----------------------------------------------------------------------------*/ static unsigned char nibble( char c ) { - if ( ( c >= '0' ) && - ( c <= '9' ) ) - { - return (unsigned char)(c - '0'); - } + if ( ( c >= '0' ) && + ( c <= '9' ) ) + { + return (unsigned char)(c - '0'); + } - if ( ( c >= 'A' ) && - ( c <= 'F' ) ) - { - return (unsigned char)(c - 'A' + 0x0a); - } + if ( ( c >= 'A' ) && + ( c <= 'F' ) ) + { + return (unsigned char)(c - 'A' + 0x0a); + } - if ( ( c >= 'a' ) && - ( c <= 'f' ) ) - { - return (unsigned char)(c - 'a' + 0x0a); - } + if ( ( c >= 'a' ) && + ( c <= 'f' ) ) + { + return (unsigned char)(c - 'a' + 0x0a); + } - // received an invalid character, and no real way to return an error - // AssertMsg1( false, "Q_nibble invalid hex character '%c' ", c ); - return 0; + /* received an invalid character, and no real way to return an error */ + /* AssertMsg1( false, "Q_nibble invalid hex character '%c' ", c ); */ + return 0; } /* convert the string version of a joystick guid to the struct */ SDL_JoystickGUID SDL_JoystickGetGUIDFromString(const char *pchGUID) { - SDL_JoystickGUID guid; - int maxoutputbytes= sizeof(guid); - int len = SDL_strlen( pchGUID ); - Uint8 *p; - int i; + SDL_JoystickGUID guid; + int maxoutputbytes= sizeof(guid); + int len = SDL_strlen( pchGUID ); + Uint8 *p; + int i; - // Make sure it's even - len = ( len ) & ~0x1; + /* Make sure it's even */ + len = ( len ) & ~0x1; - SDL_memset( &guid, 0x00, sizeof(guid) ); + SDL_memset( &guid, 0x00, sizeof(guid) ); - p = (Uint8 *)&guid; - for ( i = 0; - ( i < len ) && ( ( p - (Uint8 *)&guid ) < maxoutputbytes ); - i+=2, p++ ) - { - *p = ( nibble( pchGUID[i] ) << 4 ) | nibble( pchGUID[i+1] ); - } + p = (Uint8 *)&guid; + for ( i = 0; + ( i < len ) && ( ( p - (Uint8 *)&guid ) < maxoutputbytes ); + i+=2, p++ ) + { + *p = ( nibble( pchGUID[i] ) << 4 ) | nibble( pchGUID[i+1] ); + } - return guid; + return guid; } diff --git a/src/joystick/SDL_joystick_c.h b/src/joystick/SDL_joystick_c.h index 526cc4623..38bc78553 100644 --- a/src/joystick/SDL_joystick_c.h +++ b/src/joystick/SDL_joystick_c.h @@ -41,7 +41,7 @@ extern int SDL_PrivateJoystickHat(SDL_Joystick * joystick, Uint8 hat, Uint8 value); extern int SDL_PrivateJoystickButton(SDL_Joystick * joystick, Uint8 button, Uint8 state); - + /* Helper function to let lower sys layer tell the event system if the joystick code needs to think */ extern SDL_bool SDL_PrivateJoystickNeedsPolling(); diff --git a/src/joystick/android/SDL_sysjoystick.c b/src/joystick/android/SDL_sysjoystick.c index 2e2d98a02..adaca528e 100644 --- a/src/joystick/android/SDL_sysjoystick.c +++ b/src/joystick/android/SDL_sysjoystick.c @@ -87,10 +87,10 @@ SDL_SYS_JoystickOpen(SDL_Joystick * joystick, int device_index) joystick->nballs = 0; joystick->naxes = 3; return 0; - } else { - SDL_SetError("No joystick available with that index"); - return (-1); - } + } else { + SDL_SetError("No joystick available with that index"); + return (-1); + } } /* Function to determine is this joystick is attached to the system right now */ @@ -134,7 +134,7 @@ SDL_SYS_JoystickQuit(void) SDL_JoystickGUID SDL_SYS_JoystickGetDeviceGUID( int device_index ) { SDL_JoystickGUID guid; - // the GUID is just the first 16 chars of the name for now + /* the GUID is just the first 16 chars of the name for now */ const char *name = SDL_SYS_JoystickNameForDeviceIndex( device_index ); SDL_zero( guid ); SDL_memcpy( &guid, name, SDL_min( sizeof(guid), SDL_strlen( name ) ) ); @@ -144,7 +144,7 @@ SDL_JoystickGUID SDL_SYS_JoystickGetDeviceGUID( int device_index ) SDL_JoystickGUID SDL_SYS_JoystickGetGUID(SDL_Joystick * joystick) { SDL_JoystickGUID guid; - // the GUID is just the first 16 chars of the name for now + /* the GUID is just the first 16 chars of the name for now */ const char *name = joystick->name; SDL_zero( guid ); SDL_memcpy( &guid, name, SDL_min( sizeof(guid), SDL_strlen( name ) ) ); diff --git a/src/joystick/beos/SDL_bejoystick.cc b/src/joystick/beos/SDL_bejoystick.cc index f8a7f14a0..4e342ed41 100644 --- a/src/joystick/beos/SDL_bejoystick.cc +++ b/src/joystick/beos/SDL_bejoystick.cc @@ -261,7 +261,7 @@ extern "C" SDL_JoystickGUID SDL_SYS_JoystickGetDeviceGUID( int device_index ) { SDL_JoystickGUID guid; - // the GUID is just the first 16 chars of the name for now + /* the GUID is just the first 16 chars of the name for now */ const char *name = SDL_SYS_JoystickNameForDeviceIndex( device_index ); SDL_zero( guid ); SDL_memcpy( &guid, name, SDL_min( sizeof(guid), SDL_strlen( name ) ) ); @@ -271,7 +271,7 @@ extern "C" SDL_JoystickGUID SDL_SYS_JoystickGetGUID(SDL_Joystick * joystick) { SDL_JoystickGUID guid; - // the GUID is just the first 16 chars of the name for now + /* the GUID is just the first 16 chars of the name for now */ const char *name = joystick->name; SDL_zero( guid ); SDL_memcpy( &guid, name, SDL_min( sizeof(guid), SDL_strlen( name ) ) ); diff --git a/src/joystick/bsd/SDL_sysjoystick.c b/src/joystick/bsd/SDL_sysjoystick.c index bbdae328c..6d35d91b5 100644 --- a/src/joystick/bsd/SDL_sysjoystick.c +++ b/src/joystick/bsd/SDL_sysjoystick.c @@ -76,9 +76,9 @@ #include "../SDL_sysjoystick.h" #include "../SDL_joystick_c.h" -#define MAX_UHID_JOYS 16 -#define MAX_JOY_JOYS 2 -#define MAX_JOYS (MAX_UHID_JOYS + MAX_JOY_JOYS) +#define MAX_UHID_JOYS 16 +#define MAX_JOY_JOYS 2 +#define MAX_JOYS (MAX_UHID_JOYS + MAX_JOY_JOYS) struct report @@ -589,7 +589,7 @@ SDL_SYS_JoystickQuit(void) SDL_JoystickGUID SDL_SYS_JoystickGetDeviceGUID( int device_index ) { SDL_JoystickGUID guid; - // the GUID is just the first 16 chars of the name for now + /* the GUID is just the first 16 chars of the name for now */ const char *name = SDL_SYS_JoystickNameForDeviceIndex( device_index ); SDL_zero( guid ); SDL_memcpy( &guid, name, SDL_min( sizeof(guid), SDL_strlen( name ) ) ); @@ -599,7 +599,7 @@ SDL_JoystickGUID SDL_SYS_JoystickGetDeviceGUID( int device_index ) SDL_JoystickGUID SDL_SYS_JoystickGetGUID(SDL_Joystick * joystick) { SDL_JoystickGUID guid; - // the GUID is just the first 16 chars of the name for now + /* the GUID is just the first 16 chars of the name for now */ const char *name = joystick->name; SDL_zero( guid ); SDL_memcpy( &guid, name, SDL_min( sizeof(guid), SDL_strlen( name ) ) ); diff --git a/src/joystick/darwin/SDL_sysjoystick.c b/src/joystick/darwin/SDL_sysjoystick.c index c97f47eb8..97f0e393b 100644 --- a/src/joystick/darwin/SDL_sysjoystick.c +++ b/src/joystick/darwin/SDL_sysjoystick.c @@ -127,7 +127,7 @@ HIDRemovalCallback(void *target, IOReturn result, void *refcon, void *sender) { recDevice *device = (recDevice *) refcon; device->removed = 1; - s_bDeviceRemoved = SDL_TRUE; + s_bDeviceRemoved = SDL_TRUE; } @@ -137,10 +137,10 @@ void JoystickDeviceWasRemovedCallback( void * refcon, io_service_t service, natu { if( messageType == kIOMessageServiceIsTerminated && refcon ) { - recDevice *device = (recDevice *) refcon; - device->removed = 1; - s_bDeviceRemoved = SDL_TRUE; - } + recDevice *device = (recDevice *) refcon; + device->removed = 1; + s_bDeviceRemoved = SDL_TRUE; + } } @@ -186,33 +186,33 @@ HIDCreateOpenDeviceInterface(io_object_t hidDevice, recDevice * pDevice) HIDReportErrorNum ("Failed to open pDevice->interface via open.", result); else - { - pDevice->portIterator = 0; + { + pDevice->portIterator = 0; - // It's okay if this fails, we have another detection method below + /* It's okay if this fails, we have another detection method below */ (*(pDevice->interface))->setRemovalCallback(pDevice->interface, HIDRemovalCallback, pDevice, pDevice); - - /* now connect notification for new devices */ - pDevice->notificationPort = IONotificationPortCreate(kIOMasterPortDefault); - - CFRunLoopAddSource(CFRunLoopGetCurrent(), - IONotificationPortGetRunLoopSource(pDevice->notificationPort), - kCFRunLoopDefaultMode); - - // Register for notifications when a serial port is added to the system - result = IOServiceAddInterestNotification(pDevice->notificationPort, - hidDevice, - kIOGeneralInterest, - JoystickDeviceWasRemovedCallback, - pDevice, - &pDevice->portIterator); - if (kIOReturnSuccess != result) { - HIDReportErrorNum - ("Failed to register for removal callback.", result); - } - } + + /* now connect notification for new devices */ + pDevice->notificationPort = IONotificationPortCreate(kIOMasterPortDefault); + + CFRunLoopAddSource(CFRunLoopGetCurrent(), + IONotificationPortGetRunLoopSource(pDevice->notificationPort), + kCFRunLoopDefaultMode); + + /* Register for notifications when a serial port is added to the system */ + result = IOServiceAddInterestNotification(pDevice->notificationPort, + hidDevice, + kIOGeneralInterest, + JoystickDeviceWasRemovedCallback, + pDevice, + &pDevice->portIterator); + if (kIOReturnSuccess != result) { + HIDReportErrorNum + ("Failed to register for removal callback.", result); + } + } } return result; @@ -243,12 +243,12 @@ HIDCloseReleaseInterface(recDevice * pDevice) HIDReportErrorNum("Failed to release IOHIDDeviceInterface.", result); pDevice->interface = NULL; - - if ( pDevice->portIterator ) - { - IOObjectRelease( pDevice->portIterator ); - pDevice->portIterator = 0; - } + + if ( pDevice->portIterator ) + { + IOObjectRelease( pDevice->portIterator ); + pDevice->portIterator = 0; + } } return result; } @@ -272,32 +272,32 @@ HIDGetElementInfo(CFTypeRef refElement, recElement * pElement) if (refType && CFNumberGetValue(refType, kCFNumberLongType, &number)) pElement->maxReport = pElement->max = number; /* - TODO: maybe should handle the following stuff somehow? + TODO: maybe should handle the following stuff somehow? - refType = CFDictionaryGetValue (refElement, CFSTR(kIOHIDElementScaledMinKey)); - if (refType && CFNumberGetValue (refType, kCFNumberLongType, &number)) - pElement->scaledMin = number; - refType = CFDictionaryGetValue (refElement, CFSTR(kIOHIDElementScaledMaxKey)); - if (refType && CFNumberGetValue (refType, kCFNumberLongType, &number)) - pElement->scaledMax = number; - refType = CFDictionaryGetValue (refElement, CFSTR(kIOHIDElementSizeKey)); - if (refType && CFNumberGetValue (refType, kCFNumberLongType, &number)) - pElement->size = number; - refType = CFDictionaryGetValue (refElement, CFSTR(kIOHIDElementIsRelativeKey)); - if (refType) - pElement->relative = CFBooleanGetValue (refType); - refType = CFDictionaryGetValue (refElement, CFSTR(kIOHIDElementIsWrappingKey)); - if (refType) - pElement->wrapping = CFBooleanGetValue (refType); - refType = CFDictionaryGetValue (refElement, CFSTR(kIOHIDElementIsNonLinearKey)); - if (refType) - pElement->nonLinear = CFBooleanGetValue (refType); - refType = CFDictionaryGetValue (refElement, CFSTR(kIOHIDElementHasPreferedStateKey)); - if (refType) - pElement->preferredState = CFBooleanGetValue (refType); - refType = CFDictionaryGetValue (refElement, CFSTR(kIOHIDElementHasNullStateKey)); - if (refType) - pElement->nullState = CFBooleanGetValue (refType); + refType = CFDictionaryGetValue (refElement, CFSTR(kIOHIDElementScaledMinKey)); + if (refType && CFNumberGetValue (refType, kCFNumberLongType, &number)) + pElement->scaledMin = number; + refType = CFDictionaryGetValue (refElement, CFSTR(kIOHIDElementScaledMaxKey)); + if (refType && CFNumberGetValue (refType, kCFNumberLongType, &number)) + pElement->scaledMax = number; + refType = CFDictionaryGetValue (refElement, CFSTR(kIOHIDElementSizeKey)); + if (refType && CFNumberGetValue (refType, kCFNumberLongType, &number)) + pElement->size = number; + refType = CFDictionaryGetValue (refElement, CFSTR(kIOHIDElementIsRelativeKey)); + if (refType) + pElement->relative = CFBooleanGetValue (refType); + refType = CFDictionaryGetValue (refElement, CFSTR(kIOHIDElementIsWrappingKey)); + if (refType) + pElement->wrapping = CFBooleanGetValue (refType); + refType = CFDictionaryGetValue (refElement, CFSTR(kIOHIDElementIsNonLinearKey)); + if (refType) + pElement->nonLinear = CFBooleanGetValue (refType); + refType = CFDictionaryGetValue (refElement, CFSTR(kIOHIDElementHasPreferedStateKey)); + if (refType) + pElement->preferredState = CFBooleanGetValue (refType); + refType = CFDictionaryGetValue (refElement, CFSTR(kIOHIDElementHasNullStateKey)); + if (refType) + pElement->nullState = CFBooleanGetValue (refType); */ } @@ -501,14 +501,14 @@ HIDGetDeviceInfo(io_object_t hidDevice, CFMutableDictionaryRef hidProperties, } } - refCF = CFDictionaryGetValue(hidProperties, CFSTR(kIOHIDVendorIDKey)); + refCF = CFDictionaryGetValue(hidProperties, CFSTR(kIOHIDVendorIDKey)); if (refCF) { if (!CFNumberGetValue(refCF, kCFNumberLongType, &pDevice->guid.data[0])) { SDL_SetError("CFNumberGetValue error retrieving pDevice->guid[0]"); } } - refCF = CFDictionaryGetValue(hidProperties, CFSTR(kIOHIDProductIDKey)); + refCF = CFDictionaryGetValue(hidProperties, CFSTR(kIOHIDProductIDKey)); if (refCF) { if (!CFNumberGetValue(refCF, kCFNumberLongType, &pDevice->guid.data[8])) { SDL_SetError("CFNumberGetValue error retrieving pDevice->guid[8]"); @@ -573,7 +573,7 @@ HIDBuildDevice(io_object_t hidDevice) if (kIOReturnSuccess == result) { HIDGetDeviceInfo(hidDevice, hidProperties, pDevice); /* hidDevice used to find parents in registry tree */ HIDGetCollectionElements(hidProperties, pDevice); - pDevice->instance_id = ++s_joystick_instance_id; + pDevice->instance_id = ++s_joystick_instance_id; } else { DisposePtr((Ptr) pDevice); pDevice = NULL; @@ -640,57 +640,57 @@ HIDDisposeDevice(recDevice ** ppDevice) /* Given an io_object_t from OSX adds a joystick device to our list if appropriate */ -int +int AddDeviceHelper( io_object_t ioHIDDeviceObject ) { recDevice *device; - - /* build a device record */ - device = HIDBuildDevice(ioHIDDeviceObject); - if (!device) - return 0; - - /* Filter device list to non-keyboard/mouse stuff */ - if ((device->usagePage != kHIDPage_GenericDesktop) || - ((device->usage != kHIDUsage_GD_Joystick && - device->usage != kHIDUsage_GD_GamePad && - device->usage != kHIDUsage_GD_MultiAxisController))) { - - /* release memory for the device */ - HIDDisposeDevice(&device); - DisposePtr((Ptr) device); - return 0; - } - - /* We have to do some storage of the io_service_t for - * SDL_HapticOpenFromJoystick */ - if (FFIsForceFeedback(ioHIDDeviceObject) == FF_OK) { - device->ffservice = ioHIDDeviceObject; - } else { - device->ffservice = 0; - } - - device->send_open_event = 1; - s_bDeviceAdded = SDL_TRUE; - - /* Add device to the end of the list */ - if ( !gpDeviceList ) - { - gpDeviceList = device; - } - else - { - recDevice *curdevice; - - curdevice = gpDeviceList; - while ( curdevice->pNext ) - { - curdevice = curdevice->pNext; - } - curdevice->pNext = device; - } - - return 1; + + /* build a device record */ + device = HIDBuildDevice(ioHIDDeviceObject); + if (!device) + return 0; + + /* Filter device list to non-keyboard/mouse stuff */ + if ((device->usagePage != kHIDPage_GenericDesktop) || + ((device->usage != kHIDUsage_GD_Joystick && + device->usage != kHIDUsage_GD_GamePad && + device->usage != kHIDUsage_GD_MultiAxisController))) { + + /* release memory for the device */ + HIDDisposeDevice(&device); + DisposePtr((Ptr) device); + return 0; + } + + /* We have to do some storage of the io_service_t for + * SDL_HapticOpenFromJoystick */ + if (FFIsForceFeedback(ioHIDDeviceObject) == FF_OK) { + device->ffservice = ioHIDDeviceObject; + } else { + device->ffservice = 0; + } + + device->send_open_event = 1; + s_bDeviceAdded = SDL_TRUE; + + /* Add device to the end of the list */ + if ( !gpDeviceList ) + { + gpDeviceList = device; + } + else + { + recDevice *curdevice; + + curdevice = gpDeviceList; + while ( curdevice->pNext ) + { + curdevice = curdevice->pNext; + } + curdevice->pNext = device; + } + + return 1; } @@ -700,16 +700,16 @@ AddDeviceHelper( io_object_t ioHIDDeviceObject ) void JoystickDeviceWasAddedCallback( void *refcon, io_iterator_t iterator ) { io_object_t ioHIDDeviceObject = 0; - - while ( ( ioHIDDeviceObject = IOIteratorNext(iterator) ) ) - { - if ( ioHIDDeviceObject ) - { - AddDeviceHelper( ioHIDDeviceObject ); - } - } + + while ( ( ioHIDDeviceObject = IOIteratorNext(iterator) ) ) + { + if ( ioHIDDeviceObject ) + { + AddDeviceHelper( ioHIDDeviceObject ); + } + } } - + /* Function to scan the system for joysticks. * Joystick 0 should be the system default joystick. @@ -724,7 +724,7 @@ SDL_SYS_JoystickInit(void) io_iterator_t hidObjectIterator = 0; CFMutableDictionaryRef hidMatchDictionary = NULL; io_object_t ioHIDDeviceObject = 0; - io_iterator_t portIterator = 0; + io_iterator_t portIterator = 0; if (gpDeviceList) { return SDL_SetError("Joystick: Device list already inited."); @@ -774,26 +774,26 @@ SDL_SYS_JoystickInit(void) gpDeviceList = NULL; while ((ioHIDDeviceObject = IOIteratorNext(hidObjectIterator))) { - AddDeviceHelper( ioHIDDeviceObject ); + AddDeviceHelper( ioHIDDeviceObject ); } result = IOObjectRelease(hidObjectIterator); /* release the iterator */ - - /* now connect notification for new devices */ - notificationPort = IONotificationPortCreate(masterPort); - hidMatchDictionary = IOServiceMatching(kIOHIDDeviceKey); - CFRunLoopAddSource(CFRunLoopGetCurrent(), - IONotificationPortGetRunLoopSource(notificationPort), - kCFRunLoopDefaultMode); - - // Register for notifications when a serial port is added to the system - result = IOServiceAddMatchingNotification(notificationPort, - kIOFirstMatchNotification, - hidMatchDictionary, - JoystickDeviceWasAddedCallback, - NULL, - &portIterator); - while (IOIteratorNext(portIterator)) {}; // Run out the iterator or notifications won't start (you can also use it to iterate the available devices). + /* now connect notification for new devices */ + notificationPort = IONotificationPortCreate(masterPort); + hidMatchDictionary = IOServiceMatching(kIOHIDDeviceKey); + + CFRunLoopAddSource(CFRunLoopGetCurrent(), + IONotificationPortGetRunLoopSource(notificationPort), + kCFRunLoopDefaultMode); + + /* Register for notifications when a serial port is added to the system */ + result = IOServiceAddMatchingNotification(notificationPort, + kIOFirstMatchNotification, + hidMatchDictionary, + JoystickDeviceWasAddedCallback, + NULL, + &portIterator); + while (IOIteratorNext(portIterator)) {}; /* Run out the iterator or notifications won't start (you can also use it to iterate the available devices). */ return SDL_SYS_NumJoysticks(); } @@ -802,17 +802,17 @@ SDL_SYS_JoystickInit(void) int SDL_SYS_NumJoysticks() { - recDevice *device = gpDeviceList; + recDevice *device = gpDeviceList; int nJoySticks = 0; - - while ( device ) - { - if ( !device->removed ) - nJoySticks++; - device = device->pNext; - } - return nJoySticks; + while ( device ) + { + if ( !device->removed ) + nJoySticks++; + device = device->pNext; + } + + return nJoySticks; } /* Function to cause any queued joystick insertions to be processed @@ -820,81 +820,81 @@ SDL_SYS_NumJoysticks() void SDL_SYS_JoystickDetect() { - if ( s_bDeviceAdded || s_bDeviceRemoved ) - { - recDevice *device = gpDeviceList; - s_bDeviceAdded = SDL_FALSE; - s_bDeviceRemoved = SDL_FALSE; - int device_index = 0; - // send notifications - while ( device ) - { - if ( device->send_open_event ) - { - device->send_open_event = 0; + if ( s_bDeviceAdded || s_bDeviceRemoved ) + { + recDevice *device = gpDeviceList; + s_bDeviceAdded = SDL_FALSE; + s_bDeviceRemoved = SDL_FALSE; + int device_index = 0; + /* send notifications */ + while ( device ) + { + if ( device->send_open_event ) + { + device->send_open_event = 0; #if !SDL_EVENTS_DISABLED - SDL_Event event; - event.type = SDL_JOYDEVICEADDED; - - if (SDL_GetEventState(event.type) == SDL_ENABLE) { - event.jdevice.which = device_index; - if ((SDL_EventOK == NULL) - || (*SDL_EventOK) (SDL_EventOKParam, &event)) { - SDL_PushEvent(&event); - } - } -#endif /* !SDL_EVENTS_DISABLED */ - - } - - if ( device->removed ) - { - recDevice *removeDevice = device; - if ( gpDeviceList == removeDevice ) - { - device = device->pNext; - gpDeviceList = device; - } - else - { - device = gpDeviceList; - while ( device->pNext != removeDevice ) - { - device = device->pNext; - } - - device->pNext = removeDevice->pNext; - } - -#if !SDL_EVENTS_DISABLED - SDL_Event event; - event.type = SDL_JOYDEVICEREMOVED; - - if (SDL_GetEventState(event.type) == SDL_ENABLE) { - event.jdevice.which = removeDevice->instance_id; - if ((SDL_EventOK == NULL) - || (*SDL_EventOK) (SDL_EventOKParam, &event)) { - SDL_PushEvent(&event); - } - } + SDL_Event event; + event.type = SDL_JOYDEVICEADDED; - DisposePtr((Ptr) removeDevice); -#endif /* !SDL_EVENTS_DISABLED */ - - } - else - { - device = device->pNext; - device_index++; - } - } - } + if (SDL_GetEventState(event.type) == SDL_ENABLE) { + event.jdevice.which = device_index; + if ((SDL_EventOK == NULL) + || (*SDL_EventOK) (SDL_EventOKParam, &event)) { + SDL_PushEvent(&event); + } + } +#endif /* !SDL_EVENTS_DISABLED */ + + } + + if ( device->removed ) + { + recDevice *removeDevice = device; + if ( gpDeviceList == removeDevice ) + { + device = device->pNext; + gpDeviceList = device; + } + else + { + device = gpDeviceList; + while ( device->pNext != removeDevice ) + { + device = device->pNext; + } + + device->pNext = removeDevice->pNext; + } + +#if !SDL_EVENTS_DISABLED + SDL_Event event; + event.type = SDL_JOYDEVICEREMOVED; + + if (SDL_GetEventState(event.type) == SDL_ENABLE) { + event.jdevice.which = removeDevice->instance_id; + if ((SDL_EventOK == NULL) + || (*SDL_EventOK) (SDL_EventOKParam, &event)) { + SDL_PushEvent(&event); + } + } + + DisposePtr((Ptr) removeDevice); +#endif /* !SDL_EVENTS_DISABLED */ + + } + else + { + device = device->pNext; + device_index++; + } + } + } } SDL_bool SDL_SYS_JoystickNeedsPolling() { - return s_bDeviceAdded || s_bDeviceRemoved; + return s_bDeviceAdded || s_bDeviceRemoved; } /* Function to get the device-dependent name of a joystick */ @@ -906,7 +906,7 @@ SDL_SYS_JoystickNameForDeviceIndex(int device_index) for (; device_index > 0; device_index--) device = device->pNext; - return device->product; + return device->product; } /* Function to return the instance id of the joystick at device_index @@ -916,11 +916,11 @@ SDL_SYS_GetInstanceIdOfDeviceIndex(int device_index) { recDevice *device = gpDeviceList; int index; - + for (index = device_index; index > 0; index--) device = device->pNext; - return device->instance_id; + return device->instance_id; } /* Function to open a joystick for use. @@ -937,14 +937,14 @@ SDL_SYS_JoystickOpen(SDL_Joystick * joystick, int device_index) for (index = device_index; index > 0; index--) device = device->pNext; - joystick->instance_id = device->instance_id; + joystick->instance_id = device->instance_id; joystick->hwdata = device; - joystick->name = device->product; + joystick->name = device->product; - joystick->naxes = device->axes; - joystick->nhats = device->hats; - joystick->nballs = 0; - joystick->nbuttons = device->buttons; + joystick->naxes = device->axes; + joystick->nhats = device->hats; + joystick->nballs = 0; + joystick->nbuttons = device->buttons; return 0; } @@ -954,17 +954,17 @@ SDL_SYS_JoystickOpen(SDL_Joystick * joystick, int device_index) SDL_bool SDL_SYS_JoystickAttached(SDL_Joystick * joystick) { - recDevice *device = gpDeviceList; - - while ( device ) - { - if ( joystick->instance_id == device->instance_id ) - return SDL_TRUE; + recDevice *device = gpDeviceList; + + while ( device ) + { + if ( joystick->instance_id == device->instance_id ) + return SDL_TRUE; device = device->pNext; - } - - return SDL_FALSE; + } + + return SDL_FALSE; } /* Function to update the state of a joystick - called as a device poll. @@ -975,49 +975,49 @@ SDL_SYS_JoystickAttached(SDL_Joystick * joystick) void SDL_SYS_JoystickUpdate(SDL_Joystick * joystick) { - recDevice *device = joystick->hwdata; + recDevice *device = joystick->hwdata; recElement *element; SInt32 value, range; int i; - if ( !device ) - return; + if ( !device ) + return; if (device->removed) { /* device was unplugged; ignore it. */ - recDevice *devicelist = gpDeviceList; - joystick->closed = 1; - joystick->uncentered = 1; - - if ( devicelist == device ) - { - gpDeviceList = device->pNext; - } - else - { - while ( devicelist->pNext != device ) - { - devicelist = devicelist->pNext; - } - - devicelist->pNext = device->pNext; - } - - DisposePtr((Ptr) device); - joystick->hwdata = NULL; + recDevice *devicelist = gpDeviceList; + joystick->closed = 1; + joystick->uncentered = 1; + + if ( devicelist == device ) + { + gpDeviceList = device->pNext; + } + else + { + while ( devicelist->pNext != device ) + { + devicelist = devicelist->pNext; + } + + devicelist->pNext = device->pNext; + } + + DisposePtr((Ptr) device); + joystick->hwdata = NULL; #if !SDL_EVENTS_DISABLED - SDL_Event event; - event.type = SDL_JOYDEVICEREMOVED; - - if (SDL_GetEventState(event.type) == SDL_ENABLE) { - event.jdevice.which = joystick->instance_id; - if ((SDL_EventOK == NULL) - || (*SDL_EventOK) (SDL_EventOKParam, &event)) { - SDL_PushEvent(&event); - } - } + SDL_Event event; + event.type = SDL_JOYDEVICEREMOVED; + + if (SDL_GetEventState(event.type) == SDL_ENABLE) { + event.jdevice.which = joystick->instance_id; + if ((SDL_EventOK == NULL) + || (*SDL_EventOK) (SDL_EventOKParam, &event)) { + SDL_PushEvent(&event); + } + } #endif /* !SDL_EVENTS_DISABLED */ - + return; } @@ -1099,8 +1099,8 @@ SDL_SYS_JoystickUpdate(SDL_Joystick * joystick) /* Function to close a joystick after use */ void SDL_SYS_JoystickClose(SDL_Joystick * joystick) -{ - joystick->closed = 1; +{ + joystick->closed = 1; } /* Function to perform any system-specific joystick related cleanup */ @@ -1109,12 +1109,12 @@ SDL_SYS_JoystickQuit(void) { while (NULL != gpDeviceList) gpDeviceList = HIDDisposeDevice(&gpDeviceList); - - if ( notificationPort ) - { - IONotificationPortDestroy( notificationPort ); - notificationPort = 0; - } + + if ( notificationPort ) + { + IONotificationPortDestroy( notificationPort ); + notificationPort = 0; + } } @@ -1122,16 +1122,16 @@ SDL_JoystickGUID SDL_SYS_JoystickGetDeviceGUID( int device_index ) { recDevice *device = gpDeviceList; int index; - + for (index = device_index; index > 0; index--) device = device->pNext; - - return device->guid; + + return device->guid; } SDL_JoystickGUID SDL_SYS_JoystickGetGUID(SDL_Joystick *joystick) { - return joystick->hwdata->guid; + return joystick->hwdata->guid; } #endif /* SDL_JOYSTICK_IOKIT */ diff --git a/src/joystick/darwin/SDL_sysjoystick_c.h b/src/joystick/darwin/SDL_sysjoystick_c.h index 21cf7e911..f99dbd8af 100644 --- a/src/joystick/darwin/SDL_sysjoystick_c.h +++ b/src/joystick/darwin/SDL_sysjoystick_c.h @@ -59,9 +59,9 @@ struct joystick_hwdata { io_service_t ffservice; /* Interface for force feedback, 0 = no ff */ IOHIDDeviceInterface **interface; /* interface to device, NULL = no interface */ - IONotificationPortRef notificationPort; /* port to be notified on joystick removal */ - io_iterator_t portIterator; /* iterator for removal callback */ - + IONotificationPortRef notificationPort; /* port to be notified on joystick removal */ + io_iterator_t portIterator; /* iterator for removal callback */ + char product[256]; /* name of product */ long usage; /* usage page from IOUSBHID Parser.h which defines general usage */ long usagePage; /* usage within above page from IOUSBHID Parser.h which defines specific usage */ @@ -77,10 +77,10 @@ struct joystick_hwdata int removed; int uncentered; - - int instance_id; - SDL_JoystickGUID guid; - Uint8 send_open_event; /* 1 if we need to send an Added event for this device */ + + int instance_id; + SDL_JoystickGUID guid; + Uint8 send_open_event; /* 1 if we need to send an Added event for this device */ struct joystick_hwdata *pNext; /* next device */ }; diff --git a/src/joystick/dummy/SDL_sysjoystick.c b/src/joystick/dummy/SDL_sysjoystick.c index 2f03e39c3..7dd9153b2 100644 --- a/src/joystick/dummy/SDL_sysjoystick.c +++ b/src/joystick/dummy/SDL_sysjoystick.c @@ -110,7 +110,7 @@ SDL_SYS_JoystickQuit(void) SDL_JoystickGUID SDL_SYS_JoystickGetDeviceGUID( int device_index ) { SDL_JoystickGUID guid; - // the GUID is just the first 16 chars of the name for now + /* the GUID is just the first 16 chars of the name for now */ const char *name = SDL_SYS_JoystickNameForDeviceIndex( device_index ); SDL_zero( guid ); SDL_memcpy( &guid, name, SDL_min( sizeof(guid), SDL_strlen( name ) ) ); @@ -121,7 +121,7 @@ SDL_JoystickGUID SDL_SYS_JoystickGetDeviceGUID( int device_index ) SDL_JoystickGUID SDL_SYS_JoystickGetGUID(SDL_Joystick * joystick) { SDL_JoystickGUID guid; - // the GUID is just the first 16 chars of the name for now + /* the GUID is just the first 16 chars of the name for now */ const char *name = joystick->name; SDL_zero( guid ); SDL_memcpy( &guid, name, SDL_min( sizeof(guid), SDL_strlen( name ) ) ); diff --git a/src/joystick/iphoneos/SDLUIAccelerationDelegate.m b/src/joystick/iphoneos/SDLUIAccelerationDelegate.m index 9865d364a..0037c585b 100644 --- a/src/joystick/iphoneos/SDLUIAccelerationDelegate.m +++ b/src/joystick/iphoneos/SDLUIAccelerationDelegate.m @@ -28,114 +28,114 @@ static SDLUIAccelerationDelegate *sharedDelegate=nil; @implementation SDLUIAccelerationDelegate /* - Returns a shared instance of the SDLUIAccelerationDelegate, creating the shared delegate if it doesn't exist yet. + Returns a shared instance of the SDLUIAccelerationDelegate, creating the shared delegate if it doesn't exist yet. */ +(SDLUIAccelerationDelegate *)sharedDelegate { - if (sharedDelegate == nil) { - sharedDelegate = [[SDLUIAccelerationDelegate alloc] init]; - } - return sharedDelegate; + if (sharedDelegate == nil) { + sharedDelegate = [[SDLUIAccelerationDelegate alloc] init]; + } + return sharedDelegate; } /* - UIAccelerometerDelegate delegate method. Invoked by the UIAccelerometer instance when it has new data for us. - We just take the data and mark that we have new data available so that the joystick system will pump it to the - events system when SDL_SYS_JoystickUpdate is called. -*/ + UIAccelerometerDelegate delegate method. Invoked by the UIAccelerometer instance when it has new data for us. + We just take the data and mark that we have new data available so that the joystick system will pump it to the + events system when SDL_SYS_JoystickUpdate is called. +*/ -(void)accelerometer:(UIAccelerometer *)accelerometer didAccelerate:(UIAcceleration *)acceleration { - - x = acceleration.x; - y = acceleration.y; - z = acceleration.z; - - hasNewData = YES; + + x = acceleration.x; + y = acceleration.y; + z = acceleration.z; + + hasNewData = YES; } -/* - getLastOrientation -- put last obtained accelerometer data into Sint16 array - - Called from the joystick system when it needs the accelerometer data. - Function grabs the last data sent to the accelerometer and converts it - from floating point to Sint16, which is what the joystick system expects. - - To do the conversion, the data is first clamped onto the interval - [-SDL_IPHONE_MAX_G_FORCE, SDL_IPHONE_MAX_G_FORCE], then the data is multiplied - by MAX_SINT16 so that it is mapped to the full range of an Sint16. - - You can customize the clamped range of this function by modifying the - SDL_IPHONE_MAX_GFORCE macro in SDL_config_iphoneos.h. - - Once converted to Sint16, the accelerometer data no longer has coherent units. - You can convert the data back to units of g-force by multiplying it - in your application's code by SDL_IPHONE_MAX_GFORCE / 0x7FFF. +/* + getLastOrientation -- put last obtained accelerometer data into Sint16 array + + Called from the joystick system when it needs the accelerometer data. + Function grabs the last data sent to the accelerometer and converts it + from floating point to Sint16, which is what the joystick system expects. + + To do the conversion, the data is first clamped onto the interval + [-SDL_IPHONE_MAX_G_FORCE, SDL_IPHONE_MAX_G_FORCE], then the data is multiplied + by MAX_SINT16 so that it is mapped to the full range of an Sint16. + + You can customize the clamped range of this function by modifying the + SDL_IPHONE_MAX_GFORCE macro in SDL_config_iphoneos.h. + + Once converted to Sint16, the accelerometer data no longer has coherent units. + You can convert the data back to units of g-force by multiplying it + in your application's code by SDL_IPHONE_MAX_GFORCE / 0x7FFF. */ -(void)getLastOrientation:(Sint16 *)data { - #define MAX_SINT16 0x7FFF + #define MAX_SINT16 0x7FFF - /* clamp the data */ - if (x > SDL_IPHONE_MAX_GFORCE) x = SDL_IPHONE_MAX_GFORCE; - else if (x < -SDL_IPHONE_MAX_GFORCE) x = -SDL_IPHONE_MAX_GFORCE; - if (y > SDL_IPHONE_MAX_GFORCE) y = SDL_IPHONE_MAX_GFORCE; - else if (y < -SDL_IPHONE_MAX_GFORCE) y = -SDL_IPHONE_MAX_GFORCE; - if (z > SDL_IPHONE_MAX_GFORCE) z = SDL_IPHONE_MAX_GFORCE; - else if (z < -SDL_IPHONE_MAX_GFORCE) z = -SDL_IPHONE_MAX_GFORCE; - - /* pass in data mapped to range of SInt16 */ - data[0] = (x / SDL_IPHONE_MAX_GFORCE) * MAX_SINT16; - data[1] = (y / SDL_IPHONE_MAX_GFORCE) * MAX_SINT16; - data[2] = (z / SDL_IPHONE_MAX_GFORCE) * MAX_SINT16; + /* clamp the data */ + if (x > SDL_IPHONE_MAX_GFORCE) x = SDL_IPHONE_MAX_GFORCE; + else if (x < -SDL_IPHONE_MAX_GFORCE) x = -SDL_IPHONE_MAX_GFORCE; + if (y > SDL_IPHONE_MAX_GFORCE) y = SDL_IPHONE_MAX_GFORCE; + else if (y < -SDL_IPHONE_MAX_GFORCE) y = -SDL_IPHONE_MAX_GFORCE; + if (z > SDL_IPHONE_MAX_GFORCE) z = SDL_IPHONE_MAX_GFORCE; + else if (z < -SDL_IPHONE_MAX_GFORCE) z = -SDL_IPHONE_MAX_GFORCE; + + /* pass in data mapped to range of SInt16 */ + data[0] = (x / SDL_IPHONE_MAX_GFORCE) * MAX_SINT16; + data[1] = (y / SDL_IPHONE_MAX_GFORCE) * MAX_SINT16; + data[2] = (z / SDL_IPHONE_MAX_GFORCE) * MAX_SINT16; } /* - Initialize SDLUIAccelerationDelegate. Since we don't have any data yet, - just set our last received data to zero, and indicate we don't have any; + Initialize SDLUIAccelerationDelegate. Since we don't have any data yet, + just set our last received data to zero, and indicate we don't have any; */ -(id)init { - self = [super init]; - x = y = z = 0.0; - hasNewData = NO; - return self; + self = [super init]; + x = y = z = 0.0; + hasNewData = NO; + return self; } -(void)dealloc { - sharedDelegate = nil; - [self shutdown]; - [super dealloc]; + sharedDelegate = nil; + [self shutdown]; + [super dealloc]; } /* - Lets our delegate start receiving accelerometer updates. + Lets our delegate start receiving accelerometer updates. */ -(void)startup { - [UIAccelerometer sharedAccelerometer].delegate = self; - isRunning = YES; + [UIAccelerometer sharedAccelerometer].delegate = self; + isRunning = YES; } /* - Stops our delegate from receiving accelerometer updates. + Stops our delegate from receiving accelerometer updates. */ -(void)shutdown { - if ([UIAccelerometer sharedAccelerometer].delegate == self) { - [UIAccelerometer sharedAccelerometer].delegate = nil; - } - isRunning = NO; + if ([UIAccelerometer sharedAccelerometer].delegate == self) { + [UIAccelerometer sharedAccelerometer].delegate = nil; + } + isRunning = NO; } /* - Our we currently receiving accelerometer updates? + Our we currently receiving accelerometer updates? */ -(BOOL)isRunning { - return isRunning; + return isRunning; } /* - Do we have any data that hasn't been pumped into SDL's event system? + Do we have any data that hasn't been pumped into SDL's event system? */ -(BOOL)hasNewData { - return hasNewData; + return hasNewData; } /* - When the joystick system grabs the new data, it sets this to NO. + When the joystick system grabs the new data, it sets this to NO. */ -(void)setHasNewData:(BOOL)value { - hasNewData = value; + hasNewData = value; } @end diff --git a/src/joystick/iphoneos/SDL_sysjoystick.m b/src/joystick/iphoneos/SDL_sysjoystick.m index e93002576..231c851cf 100644 --- a/src/joystick/iphoneos/SDL_sysjoystick.m +++ b/src/joystick/iphoneos/SDL_sysjoystick.m @@ -97,20 +97,20 @@ SDL_bool SDL_SYS_JoystickAttached(SDL_Joystick *joystick) void SDL_SYS_JoystickUpdate(SDL_Joystick * joystick) { - - Sint16 orientation[3]; - - if ([[SDLUIAccelerationDelegate sharedDelegate] hasNewData]) { - - [[SDLUIAccelerationDelegate sharedDelegate] getLastOrientation: orientation]; - [[SDLUIAccelerationDelegate sharedDelegate] setHasNewData: NO]; - - SDL_PrivateJoystickAxis(joystick, 0, orientation[0]); - SDL_PrivateJoystickAxis(joystick, 1, orientation[1]); - SDL_PrivateJoystickAxis(joystick, 2, orientation[2]); - } - + Sint16 orientation[3]; + + if ([[SDLUIAccelerationDelegate sharedDelegate] hasNewData]) { + + [[SDLUIAccelerationDelegate sharedDelegate] getLastOrientation: orientation]; + [[SDLUIAccelerationDelegate sharedDelegate] setHasNewData: NO]; + + SDL_PrivateJoystickAxis(joystick, 0, orientation[0]); + SDL_PrivateJoystickAxis(joystick, 1, orientation[1]); + SDL_PrivateJoystickAxis(joystick, 2, orientation[2]); + + } + return; } @@ -118,10 +118,10 @@ SDL_SYS_JoystickUpdate(SDL_Joystick * joystick) void SDL_SYS_JoystickClose(SDL_Joystick * joystick) { - if ([[SDLUIAccelerationDelegate sharedDelegate] isRunning]) { - [[SDLUIAccelerationDelegate sharedDelegate] shutdown]; - } - SDL_SetError("No joystick open with that index"); + if ([[SDLUIAccelerationDelegate sharedDelegate] isRunning]) { + [[SDLUIAccelerationDelegate sharedDelegate] shutdown]; + } + SDL_SetError("No joystick open with that index"); } /* Function to perform any system-specific joystick related cleanup */ @@ -133,7 +133,7 @@ SDL_SYS_JoystickQuit(void) SDL_JoystickGUID SDL_SYS_JoystickGetDeviceGUID( int device_index ) { SDL_JoystickGUID guid; - // the GUID is just the first 16 chars of the name for now + /* the GUID is just the first 16 chars of the name for now */ const char *name = SDL_SYS_JoystickNameForDeviceIndex( device_index ); SDL_zero( guid ); SDL_memcpy( &guid, name, SDL_min( sizeof(guid), SDL_strlen( name ) ) ); @@ -143,7 +143,7 @@ SDL_JoystickGUID SDL_SYS_JoystickGetDeviceGUID( int device_index ) SDL_JoystickGUID SDL_SYS_JoystickGetGUID(SDL_Joystick * joystick) { SDL_JoystickGUID guid; - // the GUID is just the first 16 chars of the name for now + /* the GUID is just the first 16 chars of the name for now */ const char *name = joystick->name; SDL_zero( guid ); SDL_memcpy( &guid, name, SDL_min( sizeof(guid), SDL_strlen( name ) ) ); diff --git a/src/joystick/linux/SDL_sysjoystick.c b/src/joystick/linux/SDL_sysjoystick.c index 23915b45a..8582838a7 100644 --- a/src/joystick/linux/SDL_sysjoystick.c +++ b/src/joystick/linux/SDL_sysjoystick.c @@ -510,7 +510,7 @@ void SDL_SYS_JoystickDetect() SDL_PushEvent(&event); } } - #endif // !SDL_EVENTS_DISABLED + #endif /* !SDL_EVENTS_DISABLED */ } } else if (SDL_strcmp(action, "remove") == 0) { const int inst = MaybeRemoveDevice(devnode); @@ -527,7 +527,7 @@ void SDL_SYS_JoystickDetect() SDL_PushEvent(&event); } } - #endif // !SDL_EVENTS_DISABLED + #endif /* !SDL_EVENTS_DISABLED */ } } UDEV_udev_device_unref(dev); @@ -760,7 +760,7 @@ SDL_SYS_JoystickOpen(SDL_Joystick * joystick, int device_index) /* Get the number of buttons and axes on the joystick */ ConfigJoystick(joystick, fd); - // mark joystick as fresh and ready + /* mark joystick as fresh and ready */ joystick->hwdata->fresh = 1; return (0); @@ -840,7 +840,7 @@ PollAllValues(SDL_Joystick * joystick) struct input_absinfo absinfo; int a, b = 0; - // Poll all axis + /* Poll all axis */ for (a = ABS_X; b < ABS_MAX; a++) { switch (a) { case ABS_HAT0X: @@ -851,7 +851,7 @@ PollAllValues(SDL_Joystick * joystick) case ABS_HAT2Y: case ABS_HAT3X: case ABS_HAT3Y: - // ingore hats + /* ingore hats */ break; default: if (joystick->hwdata->abs_correct[b].used) { diff --git a/src/joystick/psp/SDL_sysjoystick.c b/src/joystick/psp/SDL_sysjoystick.c index a2c51a285..d6ca6989e 100644 --- a/src/joystick/psp/SDL_sysjoystick.c +++ b/src/joystick/psp/SDL_sysjoystick.c @@ -23,7 +23,7 @@ #include #include -#include /* For the definition of NULL */ +#include /* For the definition of NULL */ #include #include "../SDL_sysjoystick.h" @@ -41,10 +41,10 @@ static SDL_sem *pad_sem = NULL; static SDL_Thread *thread = NULL; static int running = 0; static const enum PspCtrlButtons button_map[] = { - PSP_CTRL_TRIANGLE, PSP_CTRL_CIRCLE, PSP_CTRL_CROSS, PSP_CTRL_SQUARE, - PSP_CTRL_LTRIGGER, PSP_CTRL_RTRIGGER, - PSP_CTRL_DOWN, PSP_CTRL_LEFT, PSP_CTRL_UP, PSP_CTRL_RIGHT, - PSP_CTRL_SELECT, PSP_CTRL_START, PSP_CTRL_HOME, PSP_CTRL_HOLD }; + PSP_CTRL_TRIANGLE, PSP_CTRL_CIRCLE, PSP_CTRL_CROSS, PSP_CTRL_SQUARE, + PSP_CTRL_LTRIGGER, PSP_CTRL_RTRIGGER, + PSP_CTRL_DOWN, PSP_CTRL_LEFT, PSP_CTRL_UP, PSP_CTRL_RIGHT, + PSP_CTRL_SELECT, PSP_CTRL_START, PSP_CTRL_HOME, PSP_CTRL_HOLD }; static int analog_map[256]; /* Map analog inputs to -32768 -> 32767 */ typedef struct @@ -53,30 +53,30 @@ typedef struct int y; } point; -// 4 points define the bezier-curve. +/* 4 points define the bezier-curve. */ static point a = { 0, 0 }; static point b = { 50, 0 }; static point c = { 78, 32767 }; static point d = { 128, 32767 }; -// simple linear interpolation between two points +/* simple linear interpolation between two points */ static __inline__ void lerp (point *dest, point *a, point *b, float t) { - dest->x = a->x + (b->x - a->x)*t; - dest->y = a->y + (b->y - a->y)*t; + dest->x = a->x + (b->x - a->x)*t; + dest->y = a->y + (b->y - a->y)*t; } -// evaluate a point on a bezier-curve. t goes from 0 to 1.0 +/* evaluate a point on a bezier-curve. t goes from 0 to 1.0 */ static int calc_bezier_y(float t) { - point ab, bc, cd, abbc, bccd, dest; - lerp (&ab, &a, &b, t); // point between a and b - lerp (&bc, &b, &c, t); // point between b and c - lerp (&cd, &c, &d, t); // point between c and d - lerp (&abbc, &ab, &bc, t); // point between ab and bc - lerp (&bccd, &bc, &cd, t); // point between bc and cd - lerp (&dest, &abbc, &bccd, t); // point on the bezier-curve - return dest.y; + point ab, bc, cd, abbc, bccd, dest; + lerp (&ab, &a, &b, t); /* point between a and b */ + lerp (&bc, &b, &c, t); /* point between b and c */ + lerp (&cd, &c, &d, t); /* point between c and d */ + lerp (&abbc, &ab, &bc, t); /* point between ab and bc */ + lerp (&bccd, &bc, &cd, t); /* point between bc and cd */ + lerp (&dest, &abbc, &bccd, t); /* point on the bezier-curve */ + return dest.y; } /* @@ -84,14 +84,14 @@ static int calc_bezier_y(float t) */ int JoystickUpdate(void *data) { - while (running) { - SDL_SemWait(pad_sem); - sceCtrlPeekBufferPositive(&pad, 1); - SDL_SemPost(pad_sem); - /* Delay 1/60th of a second */ - sceKernelDelayThread(1000000 / 60); - } - return 0; + while (running) { + SDL_SemWait(pad_sem); + sceCtrlPeekBufferPositive(&pad, 1); + SDL_SemPost(pad_sem); + /* Delay 1/60th of a second */ + sceKernelDelayThread(1000000 / 60); + } + return 0; } @@ -103,33 +103,33 @@ int JoystickUpdate(void *data) */ int SDL_SYS_JoystickInit(void) { - int i; + int i; -// SDL_numjoysticks = 1; +/* SDL_numjoysticks = 1; */ - /* Setup input */ - sceCtrlSetSamplingCycle(0); - sceCtrlSetSamplingMode(PSP_CTRL_MODE_ANALOG); + /* Setup input */ + sceCtrlSetSamplingCycle(0); + sceCtrlSetSamplingMode(PSP_CTRL_MODE_ANALOG); - /* Start thread to read data */ - if((pad_sem = SDL_CreateSemaphore(1)) == NULL) { - return SDL_SetError("Can't create input semaphore"); - } - running = 1; - if((thread = SDL_CreateThread(JoystickUpdate, "JoySitckThread",NULL)) == NULL) { - return SDL_SetError("Can't create input thread"); - } + /* Start thread to read data */ + if((pad_sem = SDL_CreateSemaphore(1)) == NULL) { + return SDL_SetError("Can't create input semaphore"); + } + running = 1; + if((thread = SDL_CreateThread(JoystickUpdate, "JoySitckThread",NULL)) == NULL) { + return SDL_SetError("Can't create input thread"); + } - /* Create an accurate map from analog inputs (0 to 255) - to SDL joystick positions (-32768 to 32767) */ - for (i = 0; i < 128; i++) - { - float t = (float)i/127.0f; - analog_map[i+128] = calc_bezier_y(t); - analog_map[127-i] = -1 * analog_map[i+128]; - } + /* Create an accurate map from analog inputs (0 to 255) + to SDL joystick positions (-32768 to 32767) */ + for (i = 0; i < 128; i++) + { + float t = (float)i/127.0f; + analog_map[i+128] = calc_bezier_y(t); + analog_map[127-i] = -1 * analog_map[i+128]; + } - return 1; + return 1; } int SDL_SYS_NumJoysticks() @@ -161,11 +161,11 @@ SDL_JoystickID SDL_SYS_GetInstanceIdOfDeviceIndex(int device_index) /* Function to get the device-dependent name of a joystick */ const char *SDL_SYS_JoystickName(int index) { - if (index == 0) - return "PSP controller"; + if (index == 0) + return "PSP controller"; - SDL_SetError("No joystick available with that index"); - return(NULL); + SDL_SetError("No joystick available with that index"); + return(NULL); } /* Function to open a joystick for use. @@ -175,11 +175,11 @@ const char *SDL_SYS_JoystickName(int index) */ int SDL_SYS_JoystickOpen(SDL_Joystick *joystick, int device_index) { - joystick->nbuttons = 14; - joystick->naxes = 2; - joystick->nhats = 0; + joystick->nbuttons = 14; + joystick->naxes = 2; + joystick->nhats = 0; - return 0; + return 0; } /* Function to determine is this joystick is attached to the system right now */ @@ -195,65 +195,65 @@ SDL_bool SDL_SYS_JoystickAttached(SDL_Joystick *joystick) void SDL_SYS_JoystickUpdate(SDL_Joystick *joystick) { - int i; - enum PspCtrlButtons buttons; - enum PspCtrlButtons changed; - unsigned char x, y; - static enum PspCtrlButtons old_buttons = 0; - static unsigned char old_x = 0, old_y = 0; + int i; + enum PspCtrlButtons buttons; + enum PspCtrlButtons changed; + unsigned char x, y; + static enum PspCtrlButtons old_buttons = 0; + static unsigned char old_x = 0, old_y = 0; - SDL_SemWait(pad_sem); - buttons = pad.Buttons; - x = pad.Lx; - y = pad.Ly; - SDL_SemPost(pad_sem); + SDL_SemWait(pad_sem); + buttons = pad.Buttons; + x = pad.Lx; + y = pad.Ly; + SDL_SemPost(pad_sem); - /* Axes */ - if(old_x != x) { - SDL_PrivateJoystickAxis(joystick, 0, analog_map[x]); - old_x = x; - } - if(old_y != y) { - SDL_PrivateJoystickAxis(joystick, 1, analog_map[y]); - old_y = y; - } + /* Axes */ + if(old_x != x) { + SDL_PrivateJoystickAxis(joystick, 0, analog_map[x]); + old_x = x; + } + if(old_y != y) { + SDL_PrivateJoystickAxis(joystick, 1, analog_map[y]); + old_y = y; + } - /* Buttons */ - changed = old_buttons ^ buttons; - old_buttons = buttons; - if(changed) { - for(i=0; iname; SDL_zero( guid ); SDL_memcpy( &guid, name, SDL_min( sizeof(guid), SDL_strlen( name ) ) ); diff --git a/src/joystick/windows/SDL_dxjoystick.c b/src/joystick/windows/SDL_dxjoystick.c index b61022004..9e86e2f0e 100644 --- a/src/joystick/windows/SDL_dxjoystick.c +++ b/src/joystick/windows/SDL_dxjoystick.c @@ -23,10 +23,10 @@ #ifdef SDL_JOYSTICK_DINPUT /* DirectInput joystick driver; written by Glenn Maynard, based on Andrei de - * A. Formiga's WINMM driver. + * A. Formiga's WINMM driver. * * Hats and sliders are completely untested; the app I'm writing this for mostly - * doesn't use them and I don't own any joysticks with them. + * doesn't use them and I don't own any joysticks with them. * * We don't bother to use event notification here. It doesn't seem to work * with polled devices, and it's fine to call IDirectInputDevice8_GetDeviceData and @@ -49,15 +49,15 @@ #endif #ifndef DIDFT_OPTIONAL -#define DIDFT_OPTIONAL 0x80000000 +#define DIDFT_OPTIONAL 0x80000000 #endif -#define INPUT_QSIZE 32 /* Buffer up to 32 input messages */ +#define INPUT_QSIZE 32 /* Buffer up to 32 input messages */ #define MAX_JOYSTICKS 8 -#define AXIS_MIN -32768 /* minimum value for axis coordinate */ -#define AXIS_MAX 32767 /* maximum value for axis coordinate */ -#define JOY_AXIS_THRESHOLD (((AXIS_MAX)-(AXIS_MIN))/100) /* 1% motion */ +#define AXIS_MIN -32768 /* minimum value for axis coordinate */ +#define AXIS_MAX 32767 /* maximum value for axis coordinate */ +#define JOY_AXIS_THRESHOLD (((AXIS_MAX)-(AXIS_MIN))/100) /* 1% motion */ /* external variables referenced. */ extern HWND SDL_HelperWindow; @@ -96,10 +96,10 @@ WIN_LoadXInputDLL(void) } version = (1 << 16) | 4; - s_pXInputDLL = LoadLibrary( L"XInput1_4.dll" ); // 1.4 Ships with Windows 8. + s_pXInputDLL = LoadLibrary( L"XInput1_4.dll" ); /* 1.4 Ships with Windows 8. */ if (!s_pXInputDLL) { version = (1 << 16) | 3; - s_pXInputDLL = LoadLibrary( L"XInput1_3.dll" ); // 1.3 Ships with Vista and Win7, can be installed as a redistributable component. + s_pXInputDLL = LoadLibrary( L"XInput1_3.dll" ); /* 1.3 Ships with Vista and Win7, can be installed as a redistributable component. */ } if (!s_pXInputDLL) { s_pXInputDLL = LoadLibrary( L"bin\\XInput1_3.dll" ); @@ -144,14 +144,14 @@ extern HRESULT(WINAPI * DInputCreate) (HINSTANCE hinst, DWORD dwVersion, LPUNKNOWN punkOuter); struct JoyStick_DeviceData_ { - SDL_JoystickGUID guid; - DIDEVICEINSTANCE dxdevice; - char *joystickname; - Uint8 send_add_event; - SDL_JoystickID nInstanceID; - SDL_bool bXInputDevice; - Uint8 XInputUserId; - struct JoyStick_DeviceData_ *pNext; + SDL_JoystickGUID guid; + DIDEVICEINSTANCE dxdevice; + char *joystickname; + Uint8 send_add_event; + SDL_JoystickID nInstanceID; + SDL_bool bXInputDevice; + Uint8 XInputUserId; + struct JoyStick_DeviceData_ *pNext; }; typedef struct JoyStick_DeviceData_ JoyStick_DeviceData; @@ -173,7 +173,7 @@ static int SDL_PrivateJoystickHat_Int(SDL_Joystick * joystick, Uint8 hat, static int SDL_PrivateJoystickButton_Int(SDL_Joystick * joystick, Uint8 button, Uint8 state); -// Taken from Wine - Thanks! +/* Taken from Wine - Thanks! */ DIOBJECTDATAFORMAT dfDIJoystick2[] = { { &GUID_XAxis,DIJOFS_X,DIDFT_OPTIONAL|DIDFT_AXIS|DIDFT_ANYINSTANCE,0}, { &GUID_YAxis,DIJOFS_Y,DIDFT_OPTIONAL|DIDFT_AXIS|DIDFT_ANYINSTANCE,0}, @@ -365,150 +365,150 @@ SetDIerror(const char *function, HRESULT code) #define SAFE_RELEASE(p) \ { \ - if (p) { \ - (p)->lpVtbl->Release((p)); \ - (p) = 0; \ - } \ + if (p) { \ + (p)->lpVtbl->Release((p)); \ + (p) = 0; \ + } \ } DEFINE_GUID(CLSID_WbemLocator, 0x4590f811,0x1d3a,0x11d0,0x89,0x1F,0x00,0xaa,0x00,0x4b,0x2e,0x24); DEFINE_GUID(IID_IWbemLocator, 0xdc12a687,0x737f,0x11cf,0x88,0x4d,0x00,0xaa,0x00,0x4b,0x2e,0x24); -//----------------------------------------------------------------------------- -// -// code from MSDN: http://msdn.microsoft.com/en-us/library/windows/desktop/ee417014(v=vs.85).aspx -// -// Enum each PNP device using WMI and check each device ID to see if it contains -// "IG_" (ex. "VID_045E&PID_028E&IG_00"). If it does, then it's an XInput device -// Unfortunately this information can not be found by just using DirectInput -//----------------------------------------------------------------------------- +/*----------------------------------------------------------------------------- + * + * code from MSDN: http://msdn.microsoft.com/en-us/library/windows/desktop/ee417014(v=vs.85).aspx + * + * Enum each PNP device using WMI and check each device ID to see if it contains + * "IG_" (ex. "VID_045E&PID_028E&IG_00"). If it does, then it's an XInput device + * Unfortunately this information can not be found by just using DirectInput + *-----------------------------------------------------------------------------*/ BOOL IsXInputDevice( const GUID* pGuidProductFromDirectInput ) { - IWbemLocator* pIWbemLocator = NULL; - IEnumWbemClassObject* pEnumDevices = NULL; - IWbemClassObject* pDevices[20]; - IWbemServices* pIWbemServices = NULL; - DWORD uReturned = 0; - BSTR bstrNamespace = NULL; - BSTR bstrDeviceID = NULL; - BSTR bstrClassName = NULL; - SDL_bool bIsXinputDevice= SDL_FALSE; - UINT iDevice = 0; - VARIANT var; - HRESULT hr; - DWORD bCleanupCOM; + IWbemLocator* pIWbemLocator = NULL; + IEnumWbemClassObject* pEnumDevices = NULL; + IWbemClassObject* pDevices[20]; + IWbemServices* pIWbemServices = NULL; + DWORD uReturned = 0; + BSTR bstrNamespace = NULL; + BSTR bstrDeviceID = NULL; + BSTR bstrClassName = NULL; + SDL_bool bIsXinputDevice= SDL_FALSE; + UINT iDevice = 0; + VARIANT var; + HRESULT hr; + DWORD bCleanupCOM; if (!s_bXInputEnabled) { return SDL_FALSE; } - SDL_memset( pDevices, 0x0, sizeof(pDevices) ); + SDL_memset( pDevices, 0x0, sizeof(pDevices) ); - // CoInit if needed - hr = CoInitialize(NULL); - bCleanupCOM = SUCCEEDED(hr); + /* CoInit if needed */ + hr = CoInitialize(NULL); + bCleanupCOM = SUCCEEDED(hr); - // Create WMI - hr = CoCreateInstance( &CLSID_WbemLocator, - NULL, - CLSCTX_INPROC_SERVER, - &IID_IWbemLocator, - (LPVOID*) &pIWbemLocator); - if( FAILED(hr) || pIWbemLocator == NULL ) - goto LCleanup; + /* Create WMI */ + hr = CoCreateInstance( &CLSID_WbemLocator, + NULL, + CLSCTX_INPROC_SERVER, + &IID_IWbemLocator, + (LPVOID*) &pIWbemLocator); + if( FAILED(hr) || pIWbemLocator == NULL ) + goto LCleanup; - bstrNamespace = SysAllocString( L"\\\\.\\root\\cimv2" );if( bstrNamespace == NULL ) goto LCleanup; - bstrClassName = SysAllocString( L"Win32_PNPEntity" ); if( bstrClassName == NULL ) goto LCleanup; - bstrDeviceID = SysAllocString( L"DeviceID" ); if( bstrDeviceID == NULL ) goto LCleanup; - - // Connect to WMI - hr = IWbemLocator_ConnectServer( pIWbemLocator, bstrNamespace, NULL, NULL, 0L, - 0L, NULL, NULL, &pIWbemServices ); - if( FAILED(hr) || pIWbemServices == NULL ) - goto LCleanup; + bstrNamespace = SysAllocString( L"\\\\.\\root\\cimv2" );if( bstrNamespace == NULL ) goto LCleanup; + bstrClassName = SysAllocString( L"Win32_PNPEntity" ); if( bstrClassName == NULL ) goto LCleanup; + bstrDeviceID = SysAllocString( L"DeviceID" ); if( bstrDeviceID == NULL ) goto LCleanup; - // Switch security level to IMPERSONATE. - CoSetProxyBlanket( (IUnknown *)pIWbemServices, RPC_C_AUTHN_WINNT, RPC_C_AUTHZ_NONE, NULL, - RPC_C_AUTHN_LEVEL_CALL, RPC_C_IMP_LEVEL_IMPERSONATE, NULL, EOAC_NONE ); + /* Connect to WMI */ + hr = IWbemLocator_ConnectServer( pIWbemLocator, bstrNamespace, NULL, NULL, 0L, + 0L, NULL, NULL, &pIWbemServices ); + if( FAILED(hr) || pIWbemServices == NULL ) + goto LCleanup; - hr = IWbemServices_CreateInstanceEnum( pIWbemServices, bstrClassName, 0, NULL, &pEnumDevices ); - if( FAILED(hr) || pEnumDevices == NULL ) - goto LCleanup; + /* Switch security level to IMPERSONATE. */ + CoSetProxyBlanket( (IUnknown *)pIWbemServices, RPC_C_AUTHN_WINNT, RPC_C_AUTHZ_NONE, NULL, + RPC_C_AUTHN_LEVEL_CALL, RPC_C_IMP_LEVEL_IMPERSONATE, NULL, EOAC_NONE ); - // Loop over all devices - for( ;; ) - { - // Get 20 at a time - hr = IEnumWbemClassObject_Next( pEnumDevices, 10000, 20, pDevices, &uReturned ); - if( FAILED(hr) ) - goto LCleanup; - if( uReturned == 0 ) - break; + hr = IWbemServices_CreateInstanceEnum( pIWbemServices, bstrClassName, 0, NULL, &pEnumDevices ); + if( FAILED(hr) || pEnumDevices == NULL ) + goto LCleanup; - for( iDevice=0; iDeviceData1 ) - { - bIsXinputDevice = SDL_TRUE; - } - } - if ( pDeviceString ) - SDL_free( pDeviceString ); + for( iDevice=0; iDeviceData1 ) + { + bIsXinputDevice = SDL_TRUE; + } + } + if ( pDeviceString ) + SDL_free( pDeviceString ); + + if ( bIsXinputDevice ) + break; + } + SAFE_RELEASE( pDevices[iDevice] ); + } + } - if ( bIsXinputDevice ) - break; - } - SAFE_RELEASE( pDevices[iDevice] ); - } - } - LCleanup: - for( iDevice=0; iDevice<20; iDevice++ ) - SAFE_RELEASE( pDevices[iDevice] ); - SAFE_RELEASE( pEnumDevices ); - SAFE_RELEASE( pIWbemLocator ); - SAFE_RELEASE( pIWbemServices ); + for( iDevice=0; iDevice<20; iDevice++ ) + SAFE_RELEASE( pDevices[iDevice] ); + SAFE_RELEASE( pEnumDevices ); + SAFE_RELEASE( pIWbemLocator ); + SAFE_RELEASE( pIWbemServices ); - if ( bstrNamespace ) - SysFreeString( bstrNamespace ); - if ( bstrClassName ) - SysFreeString( bstrClassName ); - if ( bstrDeviceID ) - SysFreeString( bstrDeviceID ); + if ( bstrNamespace ) + SysFreeString( bstrNamespace ); + if ( bstrClassName ) + SysFreeString( bstrClassName ); + if ( bstrDeviceID ) + SysFreeString( bstrDeviceID ); - if( bCleanupCOM ) - CoUninitialize(); - - return bIsXinputDevice; + if( bCleanupCOM ) + CoUninitialize(); + + return bIsXinputDevice; } @@ -517,137 +517,137 @@ static SDL_bool s_bWindowsDeviceChanged = SDL_FALSE; /* windowproc for our joystick detect thread message only window, to detect any USB device addition/removal */ LRESULT CALLBACK SDL_PrivateJoystickDetectProc(HWND hwnd, UINT message, WPARAM wParam, LPARAM lParam) { - switch (message) { - case WM_DEVICECHANGE: - switch (wParam) { - case DBT_DEVICEARRIVAL: - if (((DEV_BROADCAST_HDR*)lParam)->dbch_devicetype == DBT_DEVTYP_DEVICEINTERFACE) { - s_bWindowsDeviceChanged = SDL_TRUE; - } - break; - case DBT_DEVICEREMOVECOMPLETE: - if (((DEV_BROADCAST_HDR*)lParam)->dbch_devicetype == DBT_DEVTYP_DEVICEINTERFACE) { - s_bWindowsDeviceChanged = SDL_TRUE; - } - break; - } - return 0; - } + switch (message) { + case WM_DEVICECHANGE: + switch (wParam) { + case DBT_DEVICEARRIVAL: + if (((DEV_BROADCAST_HDR*)lParam)->dbch_devicetype == DBT_DEVTYP_DEVICEINTERFACE) { + s_bWindowsDeviceChanged = SDL_TRUE; + } + break; + case DBT_DEVICEREMOVECOMPLETE: + if (((DEV_BROADCAST_HDR*)lParam)->dbch_devicetype == DBT_DEVTYP_DEVICEINTERFACE) { + s_bWindowsDeviceChanged = SDL_TRUE; + } + break; + } + return 0; + } - return DefWindowProc (hwnd, message, wParam, lParam); + return DefWindowProc (hwnd, message, wParam, lParam); } DEFINE_GUID(GUID_DEVINTERFACE_USB_DEVICE, 0xA5DCBF10L, 0x6530, 0x11D2, 0x90, 0x1F, 0x00, \ - 0xC0, 0x4F, 0xB9, 0x51, 0xED); + 0xC0, 0x4F, 0xB9, 0x51, 0xED); /* Function/thread to scan the system for joysticks. */ static int SDL_JoystickThread(void *_data) { - HRESULT result = S_OK; - HWND messageWindow = 0; - HDEVNOTIFY hNotify = 0; - DEV_BROADCAST_DEVICEINTERFACE dbh; - SDL_bool bOpenedXInputDevices[4]; - WNDCLASSEX wincl; + HRESULT result = S_OK; + HWND messageWindow = 0; + HDEVNOTIFY hNotify = 0; + DEV_BROADCAST_DEVICEINTERFACE dbh; + SDL_bool bOpenedXInputDevices[4]; + WNDCLASSEX wincl; - SDL_memset( bOpenedXInputDevices, 0x0, sizeof(bOpenedXInputDevices) ); + SDL_memset( bOpenedXInputDevices, 0x0, sizeof(bOpenedXInputDevices) ); - result = WIN_CoInitialize(); + result = WIN_CoInitialize(); - SDL_memset( &wincl, 0x0, sizeof(wincl) ); - wincl.hInstance = GetModuleHandle( NULL ); - wincl.lpszClassName = L"Message"; - wincl.lpfnWndProc = SDL_PrivateJoystickDetectProc; // This function is called by windows - wincl.cbSize = sizeof (WNDCLASSEX); + SDL_memset( &wincl, 0x0, sizeof(wincl) ); + wincl.hInstance = GetModuleHandle( NULL ); + wincl.lpszClassName = L"Message"; + wincl.lpfnWndProc = SDL_PrivateJoystickDetectProc; /* This function is called by windows */ + wincl.cbSize = sizeof (WNDCLASSEX); - if (!RegisterClassEx (&wincl)) - { - return SDL_SetError("Failed to create register class for joystick autodetect.", GetLastError()); - } + if (!RegisterClassEx (&wincl)) + { + return SDL_SetError("Failed to create register class for joystick autodetect.", GetLastError()); + } - messageWindow = (HWND)CreateWindowEx( 0, L"Message", NULL, 0, 0, 0, 0, 0, HWND_MESSAGE, NULL, NULL, NULL ); - if ( !messageWindow ) - { - return SDL_SetError("Failed to create message window for joystick autodetect.", GetLastError()); - } + messageWindow = (HWND)CreateWindowEx( 0, L"Message", NULL, 0, 0, 0, 0, 0, HWND_MESSAGE, NULL, NULL, NULL ); + if ( !messageWindow ) + { + return SDL_SetError("Failed to create message window for joystick autodetect.", GetLastError()); + } - SDL_memset(&dbh, 0x0, sizeof(dbh)); + SDL_memset(&dbh, 0x0, sizeof(dbh)); - dbh.dbcc_size = sizeof(dbh); - dbh.dbcc_devicetype = DBT_DEVTYP_DEVICEINTERFACE; - dbh.dbcc_classguid = GUID_DEVINTERFACE_USB_DEVICE; + dbh.dbcc_size = sizeof(dbh); + dbh.dbcc_devicetype = DBT_DEVTYP_DEVICEINTERFACE; + dbh.dbcc_classguid = GUID_DEVINTERFACE_USB_DEVICE; - hNotify = RegisterDeviceNotification( messageWindow, &dbh, DEVICE_NOTIFY_WINDOW_HANDLE ); - if ( !hNotify ) - { - return SDL_SetError("Failed to create notify device for joystick autodetect.", GetLastError()); - } + hNotify = RegisterDeviceNotification( messageWindow, &dbh, DEVICE_NOTIFY_WINDOW_HANDLE ); + if ( !hNotify ) + { + return SDL_SetError("Failed to create notify device for joystick autodetect.", GetLastError()); + } - SDL_LockMutex( s_mutexJoyStickEnum ); - while ( s_bJoystickThreadQuit == SDL_FALSE ) - { - MSG messages; - Uint8 userId; - int nCurrentOpenedXInputDevices = 0; - int nNewOpenedXInputDevices = 0; - SDL_CondWaitTimeout( s_condJoystickThread, s_mutexJoyStickEnum, 300 ); + SDL_LockMutex( s_mutexJoyStickEnum ); + while ( s_bJoystickThreadQuit == SDL_FALSE ) + { + MSG messages; + Uint8 userId; + int nCurrentOpenedXInputDevices = 0; + int nNewOpenedXInputDevices = 0; + SDL_CondWaitTimeout( s_condJoystickThread, s_mutexJoyStickEnum, 300 ); - while ( s_bJoystickThreadQuit == SDL_FALSE && PeekMessage(&messages, messageWindow, 0, 0, PM_NOREMOVE) ) - { - if ( GetMessage(&messages, messageWindow, 0, 0) != 0 ) { - TranslateMessage(&messages); - DispatchMessage(&messages); - } - } + while ( s_bJoystickThreadQuit == SDL_FALSE && PeekMessage(&messages, messageWindow, 0, 0, PM_NOREMOVE) ) + { + if ( GetMessage(&messages, messageWindow, 0, 0) != 0 ) { + TranslateMessage(&messages); + DispatchMessage(&messages); + } + } - if ( s_bXInputEnabled && XINPUTGETCAPABILITIES ) - { - // scan for any change in XInput devices - for ( userId = 0; userId < 4; userId++ ) - { - XINPUT_CAPABILITIES capabilities; - DWORD result; + if ( s_bXInputEnabled && XINPUTGETCAPABILITIES ) + { + /* scan for any change in XInput devices */ + for ( userId = 0; userId < 4; userId++ ) + { + XINPUT_CAPABILITIES capabilities; + DWORD result; - if ( bOpenedXInputDevices[userId] == SDL_TRUE ) - nCurrentOpenedXInputDevices++; + if ( bOpenedXInputDevices[userId] == SDL_TRUE ) + nCurrentOpenedXInputDevices++; - result = XINPUTGETCAPABILITIES( userId, XINPUT_FLAG_GAMEPAD, &capabilities ); - if ( result == ERROR_SUCCESS ) - { - bOpenedXInputDevices[userId] = SDL_TRUE; - nNewOpenedXInputDevices++; - } - else - { - bOpenedXInputDevices[userId] = SDL_FALSE; - } - } - } + result = XINPUTGETCAPABILITIES( userId, XINPUT_FLAG_GAMEPAD, &capabilities ); + if ( result == ERROR_SUCCESS ) + { + bOpenedXInputDevices[userId] = SDL_TRUE; + nNewOpenedXInputDevices++; + } + else + { + bOpenedXInputDevices[userId] = SDL_FALSE; + } + } + } - if ( s_pKnownJoystickGUIDs && ( s_bWindowsDeviceChanged || nNewOpenedXInputDevices != nCurrentOpenedXInputDevices ) ) - { - SDL_Delay( 300 ); // wait for direct input to find out about this device + if ( s_pKnownJoystickGUIDs && ( s_bWindowsDeviceChanged || nNewOpenedXInputDevices != nCurrentOpenedXInputDevices ) ) + { + SDL_Delay( 300 ); /* wait for direct input to find out about this device */ - s_bDeviceRemoved = SDL_TRUE; - s_bDeviceAdded = SDL_TRUE; - s_bWindowsDeviceChanged = SDL_FALSE; - } - } - SDL_UnlockMutex( s_mutexJoyStickEnum ); + s_bDeviceRemoved = SDL_TRUE; + s_bDeviceAdded = SDL_TRUE; + s_bWindowsDeviceChanged = SDL_FALSE; + } + } + SDL_UnlockMutex( s_mutexJoyStickEnum ); - if ( hNotify ) - UnregisterDeviceNotification( hNotify ); + if ( hNotify ) + UnregisterDeviceNotification( hNotify ); - if ( messageWindow ) - DestroyWindow( messageWindow ); + if ( messageWindow ) + DestroyWindow( messageWindow ); - UnregisterClass( wincl.lpszClassName, wincl.hInstance ); - messageWindow = 0; - WIN_CoUninitialize(); - return 1; + UnregisterClass( wincl.lpszClassName, wincl.hInstance ); + messageWindow = 0; + WIN_CoUninitialize(); + return 1; } @@ -661,10 +661,10 @@ SDL_SYS_JoystickInit(void) { HRESULT result; HINSTANCE instance; - const char *env = SDL_GetHint(SDL_HINT_XINPUT_ENABLED); - if (env && !SDL_atoi(env)) { - s_bXInputEnabled = SDL_FALSE; - } + const char *env = SDL_GetHint(SDL_HINT_XINPUT_ENABLED); + if (env && !SDL_atoi(env)) { + s_bXInputEnabled = SDL_FALSE; + } result = WIN_CoInitialize(); if (FAILED(result)) { @@ -696,238 +696,238 @@ SDL_SYS_JoystickInit(void) s_mutexJoyStickEnum = SDL_CreateMutex(); s_condJoystickThread = SDL_CreateCond(); - s_bDeviceAdded = SDL_TRUE; // force a scan of the system for joysticks this first time + s_bDeviceAdded = SDL_TRUE; /* force a scan of the system for joysticks this first time */ SDL_SYS_JoystickDetect(); if ((s_bXInputEnabled) && (WIN_LoadXInputDLL() == -1)) { s_bXInputEnabled = SDL_FALSE; /* oh well. */ } - if ( !s_threadJoystick ) - { - s_bJoystickThreadQuit = SDL_FALSE; - /* spin up the thread to detect hotplug of devices */ + if ( !s_threadJoystick ) + { + s_bJoystickThreadQuit = SDL_FALSE; + /* spin up the thread to detect hotplug of devices */ #if defined(__WIN32__) && !defined(HAVE_LIBC) #undef SDL_CreateThread - s_threadJoystick= SDL_CreateThread( SDL_JoystickThread, "SDL_joystick", NULL, NULL, NULL ); + s_threadJoystick= SDL_CreateThread( SDL_JoystickThread, "SDL_joystick", NULL, NULL, NULL ); #else - s_threadJoystick = SDL_CreateThread( SDL_JoystickThread, "SDL_joystick", NULL ); + s_threadJoystick = SDL_CreateThread( SDL_JoystickThread, "SDL_joystick", NULL ); #endif - } - return SDL_SYS_NumJoysticks(); + } + return SDL_SYS_NumJoysticks(); } /* return the number of joysticks that are connected right now */ int SDL_SYS_NumJoysticks() { - int nJoysticks = 0; - JoyStick_DeviceData *device = SYS_Joystick; - while ( device ) - { - nJoysticks++; - device = device->pNext; - } + int nJoysticks = 0; + JoyStick_DeviceData *device = SYS_Joystick; + while ( device ) + { + nJoysticks++; + device = device->pNext; + } - return nJoysticks; + return nJoysticks; } static int s_iNewGUID = 0; /* helper function for direct input, gets called for each connected joystick */ static BOOL CALLBACK - EnumJoysticksCallback(const DIDEVICEINSTANCE * pdidInstance, VOID * pContext) + EnumJoysticksCallback(const DIDEVICEINSTANCE * pdidInstance, VOID * pContext) { - JoyStick_DeviceData *pNewJoystick; - JoyStick_DeviceData *pPrevJoystick = NULL; - SDL_bool bXInputDevice; - pNewJoystick = *(JoyStick_DeviceData **)pContext; - while ( pNewJoystick ) - { - if ( !SDL_memcmp( &pNewJoystick->dxdevice.guidInstance, &pdidInstance->guidInstance, sizeof(pNewJoystick->dxdevice.guidInstance) ) ) - { - /* if we are replacing the front of the list then update it */ - if ( pNewJoystick == *(JoyStick_DeviceData **)pContext ) - { - *(JoyStick_DeviceData **)pContext = pNewJoystick->pNext; - } - else if ( pPrevJoystick ) - { - pPrevJoystick->pNext = pNewJoystick->pNext; - } + JoyStick_DeviceData *pNewJoystick; + JoyStick_DeviceData *pPrevJoystick = NULL; + SDL_bool bXInputDevice; + pNewJoystick = *(JoyStick_DeviceData **)pContext; + while ( pNewJoystick ) + { + if ( !SDL_memcmp( &pNewJoystick->dxdevice.guidInstance, &pdidInstance->guidInstance, sizeof(pNewJoystick->dxdevice.guidInstance) ) ) + { + /* if we are replacing the front of the list then update it */ + if ( pNewJoystick == *(JoyStick_DeviceData **)pContext ) + { + *(JoyStick_DeviceData **)pContext = pNewJoystick->pNext; + } + else if ( pPrevJoystick ) + { + pPrevJoystick->pNext = pNewJoystick->pNext; + } - pNewJoystick->pNext = SYS_Joystick; - SYS_Joystick = pNewJoystick; + pNewJoystick->pNext = SYS_Joystick; + SYS_Joystick = pNewJoystick; - s_pKnownJoystickGUIDs[ s_iNewGUID ] = pdidInstance->guidInstance; - s_iNewGUID++; - if ( s_iNewGUID < MAX_JOYSTICKS ) - return DIENUM_CONTINUE; // already have this joystick loaded, just keep going - else - return DIENUM_STOP; - } + s_pKnownJoystickGUIDs[ s_iNewGUID ] = pdidInstance->guidInstance; + s_iNewGUID++; + if ( s_iNewGUID < MAX_JOYSTICKS ) + return DIENUM_CONTINUE; /* already have this joystick loaded, just keep going */ + else + return DIENUM_STOP; + } - pPrevJoystick = pNewJoystick; - pNewJoystick = pNewJoystick->pNext; - } + pPrevJoystick = pNewJoystick; + pNewJoystick = pNewJoystick->pNext; + } - s_bDeviceAdded = SDL_TRUE; + s_bDeviceAdded = SDL_TRUE; - bXInputDevice = IsXInputDevice( &pdidInstance->guidProduct ); + bXInputDevice = IsXInputDevice( &pdidInstance->guidProduct ); - pNewJoystick = (JoyStick_DeviceData *)SDL_malloc( sizeof(JoyStick_DeviceData) ); + pNewJoystick = (JoyStick_DeviceData *)SDL_malloc( sizeof(JoyStick_DeviceData) ); - if ( bXInputDevice ) - { - pNewJoystick->bXInputDevice = SDL_TRUE; - pNewJoystick->XInputUserId = INVALID_XINPUT_USERID; - } - else - { - pNewJoystick->bXInputDevice = SDL_FALSE; - } - - SDL_memcpy(&(pNewJoystick->dxdevice), pdidInstance, - sizeof(DIDEVICEINSTANCE)); + if ( bXInputDevice ) + { + pNewJoystick->bXInputDevice = SDL_TRUE; + pNewJoystick->XInputUserId = INVALID_XINPUT_USERID; + } + else + { + pNewJoystick->bXInputDevice = SDL_FALSE; + } - pNewJoystick->joystickname = WIN_StringToUTF8(pdidInstance->tszProductName); - pNewJoystick->send_add_event = 1; - pNewJoystick->nInstanceID = ++s_nInstanceID; - SDL_memcpy( &pNewJoystick->guid, &pdidInstance->guidProduct, sizeof(pNewJoystick->guid) ); - pNewJoystick->pNext = NULL; + SDL_memcpy(&(pNewJoystick->dxdevice), pdidInstance, + sizeof(DIDEVICEINSTANCE)); - if ( SYS_Joystick ) - { - pNewJoystick->pNext = SYS_Joystick; - } - SYS_Joystick = pNewJoystick; + pNewJoystick->joystickname = WIN_StringToUTF8(pdidInstance->tszProductName); + pNewJoystick->send_add_event = 1; + pNewJoystick->nInstanceID = ++s_nInstanceID; + SDL_memcpy( &pNewJoystick->guid, &pdidInstance->guidProduct, sizeof(pNewJoystick->guid) ); + pNewJoystick->pNext = NULL; - s_pKnownJoystickGUIDs[ s_iNewGUID ] = pdidInstance->guidInstance; - s_iNewGUID++; + if ( SYS_Joystick ) + { + pNewJoystick->pNext = SYS_Joystick; + } + SYS_Joystick = pNewJoystick; - if ( s_iNewGUID < MAX_JOYSTICKS ) - return DIENUM_CONTINUE; // already have this joystick loaded, just keep going - else - return DIENUM_STOP; + s_pKnownJoystickGUIDs[ s_iNewGUID ] = pdidInstance->guidInstance; + s_iNewGUID++; + + if ( s_iNewGUID < MAX_JOYSTICKS ) + return DIENUM_CONTINUE; /* already have this joystick loaded, just keep going */ + else + return DIENUM_STOP; } /* detect any new joysticks being inserted into the system */ void SDL_SYS_JoystickDetect() { - HRESULT result; - JoyStick_DeviceData *pCurList = NULL; - /* only enum the devices if the joystick thread told us something changed */ - if ( s_bDeviceAdded || s_bDeviceRemoved ) - { - s_bDeviceAdded = SDL_FALSE; - s_bDeviceRemoved = SDL_FALSE; + HRESULT result; + JoyStick_DeviceData *pCurList = NULL; + /* only enum the devices if the joystick thread told us something changed */ + if ( s_bDeviceAdded || s_bDeviceRemoved ) + { + s_bDeviceAdded = SDL_FALSE; + s_bDeviceRemoved = SDL_FALSE; - pCurList = SYS_Joystick; - SYS_Joystick = NULL; - s_iNewGUID = 0; - SDL_LockMutex( s_mutexJoyStickEnum ); + pCurList = SYS_Joystick; + SYS_Joystick = NULL; + s_iNewGUID = 0; + SDL_LockMutex( s_mutexJoyStickEnum ); - if ( !s_pKnownJoystickGUIDs ) - s_pKnownJoystickGUIDs = SDL_malloc( sizeof(GUID)*MAX_JOYSTICKS ); - - SDL_memset( s_pKnownJoystickGUIDs, 0x0, sizeof(GUID)*MAX_JOYSTICKS ); + if ( !s_pKnownJoystickGUIDs ) + s_pKnownJoystickGUIDs = SDL_malloc( sizeof(GUID)*MAX_JOYSTICKS ); - /* Look for joysticks, wheels, head trackers, gamepads, etc.. */ - result = IDirectInput8_EnumDevices(dinput, - DI8DEVCLASS_GAMECTRL, - EnumJoysticksCallback, - &pCurList, DIEDFL_ATTACHEDONLY); + SDL_memset( s_pKnownJoystickGUIDs, 0x0, sizeof(GUID)*MAX_JOYSTICKS ); - SDL_UnlockMutex( s_mutexJoyStickEnum ); - } + /* Look for joysticks, wheels, head trackers, gamepads, etc.. */ + result = IDirectInput8_EnumDevices(dinput, + DI8DEVCLASS_GAMECTRL, + EnumJoysticksCallback, + &pCurList, DIEDFL_ATTACHEDONLY); - if ( pCurList ) - { - while ( pCurList ) - { - JoyStick_DeviceData *pListNext = NULL; + SDL_UnlockMutex( s_mutexJoyStickEnum ); + } + + if ( pCurList ) + { + while ( pCurList ) + { + JoyStick_DeviceData *pListNext = NULL; #if !SDL_EVENTS_DISABLED - SDL_Event event; - event.type = SDL_JOYDEVICEREMOVED; + SDL_Event event; + event.type = SDL_JOYDEVICEREMOVED; - if (SDL_GetEventState(event.type) == SDL_ENABLE) { - event.jdevice.which = pCurList->nInstanceID; - if ((SDL_EventOK == NULL) - || (*SDL_EventOK) (SDL_EventOKParam, &event)) { - SDL_PushEvent(&event); - } - } -#endif // !SDL_EVENTS_DISABLED - - pListNext = pCurList->pNext; - SDL_free(pCurList->joystickname); - SDL_free( pCurList ); - pCurList = pListNext; - } - - } - - if ( s_bDeviceAdded ) - { - JoyStick_DeviceData *pNewJoystick; - int device_index = 0; - s_bDeviceAdded = SDL_FALSE; - pNewJoystick = SYS_Joystick; - while ( pNewJoystick ) - { - if ( pNewJoystick->send_add_event ) - { -#if !SDL_EVENTS_DISABLED - SDL_Event event; - event.type = SDL_JOYDEVICEADDED; - - if (SDL_GetEventState(event.type) == SDL_ENABLE) { - event.jdevice.which = device_index; - if ((SDL_EventOK == NULL) - || (*SDL_EventOK) (SDL_EventOKParam, &event)) { - SDL_PushEvent(&event); - } - } + if (SDL_GetEventState(event.type) == SDL_ENABLE) { + event.jdevice.which = pCurList->nInstanceID; + if ((SDL_EventOK == NULL) + || (*SDL_EventOK) (SDL_EventOKParam, &event)) { + SDL_PushEvent(&event); + } + } #endif /* !SDL_EVENTS_DISABLED */ - pNewJoystick->send_add_event = 0; - } - device_index++; - pNewJoystick = pNewJoystick->pNext; - } - } + + pListNext = pCurList->pNext; + SDL_free(pCurList->joystickname); + SDL_free( pCurList ); + pCurList = pListNext; + } + + } + + if ( s_bDeviceAdded ) + { + JoyStick_DeviceData *pNewJoystick; + int device_index = 0; + s_bDeviceAdded = SDL_FALSE; + pNewJoystick = SYS_Joystick; + while ( pNewJoystick ) + { + if ( pNewJoystick->send_add_event ) + { +#if !SDL_EVENTS_DISABLED + SDL_Event event; + event.type = SDL_JOYDEVICEADDED; + + if (SDL_GetEventState(event.type) == SDL_ENABLE) { + event.jdevice.which = device_index; + if ((SDL_EventOK == NULL) + || (*SDL_EventOK) (SDL_EventOKParam, &event)) { + SDL_PushEvent(&event); + } + } +#endif /* !SDL_EVENTS_DISABLED */ + pNewJoystick->send_add_event = 0; + } + device_index++; + pNewJoystick = pNewJoystick->pNext; + } + } } /* we need to poll if we have pending hotplug device changes or connected devices */ SDL_bool SDL_SYS_JoystickNeedsPolling() { - /* we have a new device or one was pulled, we need to think this frame please */ - if ( s_bDeviceAdded || s_bDeviceRemoved ) - return SDL_TRUE; + /* we have a new device or one was pulled, we need to think this frame please */ + if ( s_bDeviceAdded || s_bDeviceRemoved ) + return SDL_TRUE; - return SDL_FALSE; + return SDL_FALSE; } /* Function to get the device-dependent name of a joystick */ const char * SDL_SYS_JoystickNameForDeviceIndex(int device_index) { - JoyStick_DeviceData *device = SYS_Joystick; + JoyStick_DeviceData *device = SYS_Joystick; - for (; device_index > 0; device_index--) - device = device->pNext; + for (; device_index > 0; device_index--) + device = device->pNext; - return device->joystickname; + return device->joystickname; } /* Function to perform the mapping between current device instance and this joysticks instance id */ SDL_JoystickID SDL_SYS_GetInstanceIdOfDeviceIndex(int device_index) { - JoyStick_DeviceData *device = SYS_Joystick; - int index; + JoyStick_DeviceData *device = SYS_Joystick; + int index; - for (index = device_index; index > 0; index--) - device = device->pNext; + for (index = device_index; index > 0; index--) + device = device->pNext; - return device->nInstanceID; + return device->nInstanceID; } /* Function to open a joystick for use. @@ -941,17 +941,17 @@ SDL_SYS_JoystickOpen(SDL_Joystick * joystick, int device_index) HRESULT result; LPDIRECTINPUTDEVICE8 device; DIPROPDWORD dipdw; - JoyStick_DeviceData *joystickdevice = SYS_Joystick; + JoyStick_DeviceData *joystickdevice = SYS_Joystick; - for (; device_index > 0; device_index--) - joystickdevice = joystickdevice->pNext; + for (; device_index > 0; device_index--) + joystickdevice = joystickdevice->pNext; SDL_memset(&dipdw, 0, sizeof(DIPROPDWORD)); dipdw.diph.dwSize = sizeof(DIPROPDWORD); dipdw.diph.dwHeaderSize = sizeof(DIPROPHEADER); /* allocate memory for system specific hardware data */ - joystick->instance_id = joystickdevice->nInstanceID; + joystick->instance_id = joystickdevice->nInstanceID; joystick->closed = 0; joystick->hwdata = (struct joystick_hwdata *) SDL_malloc(sizeof(struct joystick_hwdata)); @@ -960,194 +960,194 @@ SDL_SYS_JoystickOpen(SDL_Joystick * joystick, int device_index) } SDL_memset(joystick->hwdata, 0, sizeof(struct joystick_hwdata)); joystick->hwdata->buffered = 1; - joystick->hwdata->removed = 0; + joystick->hwdata->removed = 0; joystick->hwdata->Capabilities.dwSize = sizeof(DIDEVCAPS); - joystick->hwdata->guid = joystickdevice->guid; + joystick->hwdata->guid = joystickdevice->guid; - if ( joystickdevice->bXInputDevice ) - { - XINPUT_CAPABILITIES capabilities; - Uint8 userId = 0; - DWORD result; - JoyStick_DeviceData *joysticklist = SYS_Joystick; - // scan the opened joysticks and pick the next free xinput userid for this one - for( ; joysticklist; joysticklist = joysticklist->pNext) - { - if ( joysticklist->bXInputDevice && joysticklist->XInputUserId == userId ) - userId++; - } + if ( joystickdevice->bXInputDevice ) + { + XINPUT_CAPABILITIES capabilities; + Uint8 userId = 0; + DWORD result; + JoyStick_DeviceData *joysticklist = SYS_Joystick; + /* scan the opened joysticks and pick the next free xinput userid for this one */ + for( ; joysticklist; joysticklist = joysticklist->pNext) + { + if ( joysticklist->bXInputDevice && joysticklist->XInputUserId == userId ) + userId++; + } - if ( s_bXInputEnabled && XINPUTGETCAPABILITIES ) - { - result = XINPUTGETCAPABILITIES( userId, XINPUT_FLAG_GAMEPAD, &capabilities ); - if ( result == ERROR_SUCCESS ) - { + if ( s_bXInputEnabled && XINPUTGETCAPABILITIES ) + { + result = XINPUTGETCAPABILITIES( userId, XINPUT_FLAG_GAMEPAD, &capabilities ); + if ( result == ERROR_SUCCESS ) + { const SDL_bool bIs14OrLater = (SDL_XInputVersion >= ((1<<16)|4)); - SDL_bool bIsSupported = SDL_FALSE; - // Current version of XInput mistakenly returns 0 as the Type. Ignore it and ensure the subtype is a gamepad. - bIsSupported = ( capabilities.SubType == XINPUT_DEVSUBTYPE_GAMEPAD ); + SDL_bool bIsSupported = SDL_FALSE; + /* Current version of XInput mistakenly returns 0 as the Type. Ignore it and ensure the subtype is a gamepad. */ + bIsSupported = ( capabilities.SubType == XINPUT_DEVSUBTYPE_GAMEPAD ); - if ( !bIsSupported ) - { - joystickdevice->bXInputDevice = SDL_FALSE; - } - else - { - // valid - joystick->hwdata->bXInputDevice = SDL_TRUE; + if ( !bIsSupported ) + { + joystickdevice->bXInputDevice = SDL_FALSE; + } + else + { + /* valid */ + joystick->hwdata->bXInputDevice = SDL_TRUE; if ((!bIs14OrLater) || (capabilities.Flags & XINPUT_CAPS_FFB_SUPPORTED)) { - joystick->hwdata->bXInputHaptic = SDL_TRUE; + joystick->hwdata->bXInputHaptic = SDL_TRUE; } - SDL_memset( joystick->hwdata->XInputState, 0x0, sizeof(joystick->hwdata->XInputState) ); - joystickdevice->XInputUserId = userId; - joystick->hwdata->userid = userId; - joystick->hwdata->currentXInputSlot = 0; - // The XInput API has a hard coded button/axis mapping, so we just match it - joystick->naxes = 6; - joystick->nbuttons = 15; - joystick->nballs = 0; - joystick->nhats = 0; - } - } - else - { - joystickdevice->bXInputDevice = SDL_FALSE; - } - } - else - { - joystickdevice->bXInputDevice = SDL_FALSE; - } - } + SDL_memset( joystick->hwdata->XInputState, 0x0, sizeof(joystick->hwdata->XInputState) ); + joystickdevice->XInputUserId = userId; + joystick->hwdata->userid = userId; + joystick->hwdata->currentXInputSlot = 0; + /* The XInput API has a hard coded button/axis mapping, so we just match it */ + joystick->naxes = 6; + joystick->nbuttons = 15; + joystick->nballs = 0; + joystick->nhats = 0; + } + } + else + { + joystickdevice->bXInputDevice = SDL_FALSE; + } + } + else + { + joystickdevice->bXInputDevice = SDL_FALSE; + } + } - if ( joystickdevice->bXInputDevice == SDL_FALSE ) - { - joystick->hwdata->bXInputDevice = SDL_FALSE; + if ( joystickdevice->bXInputDevice == SDL_FALSE ) + { + joystick->hwdata->bXInputDevice = SDL_FALSE; - result = - IDirectInput8_CreateDevice(dinput, - &(joystickdevice->dxdevice.guidInstance), &device, NULL); - if (FAILED(result)) { - return SetDIerror("IDirectInput::CreateDevice", result); - } + result = + IDirectInput8_CreateDevice(dinput, + &(joystickdevice->dxdevice.guidInstance), &device, NULL); + if (FAILED(result)) { + return SetDIerror("IDirectInput::CreateDevice", result); + } - /* Now get the IDirectInputDevice8 interface, instead. */ - result = IDirectInputDevice8_QueryInterface(device, - &IID_IDirectInputDevice8, - (LPVOID *) & joystick-> - hwdata->InputDevice); - /* We are done with this object. Use the stored one from now on. */ - IDirectInputDevice8_Release(device); + /* Now get the IDirectInputDevice8 interface, instead. */ + result = IDirectInputDevice8_QueryInterface(device, + &IID_IDirectInputDevice8, + (LPVOID *) & joystick-> + hwdata->InputDevice); + /* We are done with this object. Use the stored one from now on. */ + IDirectInputDevice8_Release(device); - if (FAILED(result)) { - return SetDIerror("IDirectInputDevice8::QueryInterface", result); - } + if (FAILED(result)) { + return SetDIerror("IDirectInputDevice8::QueryInterface", result); + } - /* Acquire shared access. Exclusive access is required for forces, - * though. */ - result = - IDirectInputDevice8_SetCooperativeLevel(joystick->hwdata-> - InputDevice, SDL_HelperWindow, - DISCL_NONEXCLUSIVE | - DISCL_BACKGROUND); - if (FAILED(result)) { - return SetDIerror("IDirectInputDevice8::SetCooperativeLevel", result); - } + /* Acquire shared access. Exclusive access is required for forces, + * though. */ + result = + IDirectInputDevice8_SetCooperativeLevel(joystick->hwdata-> + InputDevice, SDL_HelperWindow, + DISCL_NONEXCLUSIVE | + DISCL_BACKGROUND); + if (FAILED(result)) { + return SetDIerror("IDirectInputDevice8::SetCooperativeLevel", result); + } - /* Use the extended data structure: DIJOYSTATE2. */ - result = - IDirectInputDevice8_SetDataFormat(joystick->hwdata->InputDevice, - &c_dfDIJoystick2); - if (FAILED(result)) { - return SetDIerror("IDirectInputDevice8::SetDataFormat", result); - } + /* Use the extended data structure: DIJOYSTATE2. */ + result = + IDirectInputDevice8_SetDataFormat(joystick->hwdata->InputDevice, + &c_dfDIJoystick2); + if (FAILED(result)) { + return SetDIerror("IDirectInputDevice8::SetDataFormat", result); + } - /* Get device capabilities */ - result = - IDirectInputDevice8_GetCapabilities(joystick->hwdata->InputDevice, - &joystick->hwdata->Capabilities); + /* Get device capabilities */ + result = + IDirectInputDevice8_GetCapabilities(joystick->hwdata->InputDevice, + &joystick->hwdata->Capabilities); - if (FAILED(result)) { - return SetDIerror("IDirectInputDevice8::GetCapabilities", result); - } + if (FAILED(result)) { + return SetDIerror("IDirectInputDevice8::GetCapabilities", result); + } - /* Force capable? */ - if (joystick->hwdata->Capabilities.dwFlags & DIDC_FORCEFEEDBACK) { + /* Force capable? */ + if (joystick->hwdata->Capabilities.dwFlags & DIDC_FORCEFEEDBACK) { - result = IDirectInputDevice8_Acquire(joystick->hwdata->InputDevice); + result = IDirectInputDevice8_Acquire(joystick->hwdata->InputDevice); - if (FAILED(result)) { - return SetDIerror("IDirectInputDevice8::Acquire", result); - } + if (FAILED(result)) { + return SetDIerror("IDirectInputDevice8::Acquire", result); + } - /* reset all accuators. */ - result = - IDirectInputDevice8_SendForceFeedbackCommand(joystick->hwdata-> - InputDevice, - DISFFC_RESET); + /* reset all accuators. */ + result = + IDirectInputDevice8_SendForceFeedbackCommand(joystick->hwdata-> + InputDevice, + DISFFC_RESET); - /* Not necessarily supported, ignore if not supported. - if (FAILED(result)) { - return SetDIerror("IDirectInputDevice8::SendForceFeedbackCommand", result); - } - */ + /* Not necessarily supported, ignore if not supported. + if (FAILED(result)) { + return SetDIerror("IDirectInputDevice8::SendForceFeedbackCommand", result); + } + */ - result = IDirectInputDevice8_Unacquire(joystick->hwdata->InputDevice); + result = IDirectInputDevice8_Unacquire(joystick->hwdata->InputDevice); - if (FAILED(result)) { - return SetDIerror("IDirectInputDevice8::Unacquire", result); - } + if (FAILED(result)) { + return SetDIerror("IDirectInputDevice8::Unacquire", result); + } - /* Turn on auto-centering for a ForceFeedback device (until told - * otherwise). */ - dipdw.diph.dwObj = 0; - dipdw.diph.dwHow = DIPH_DEVICE; - dipdw.dwData = DIPROPAUTOCENTER_ON; + /* Turn on auto-centering for a ForceFeedback device (until told + * otherwise). */ + dipdw.diph.dwObj = 0; + dipdw.diph.dwHow = DIPH_DEVICE; + dipdw.dwData = DIPROPAUTOCENTER_ON; - result = - IDirectInputDevice8_SetProperty(joystick->hwdata->InputDevice, - DIPROP_AUTOCENTER, &dipdw.diph); + result = + IDirectInputDevice8_SetProperty(joystick->hwdata->InputDevice, + DIPROP_AUTOCENTER, &dipdw.diph); - /* Not necessarily supported, ignore if not supported. - if (FAILED(result)) { - return SetDIerror("IDirectInputDevice8::SetProperty", result); - } - */ - } + /* Not necessarily supported, ignore if not supported. + if (FAILED(result)) { + return SetDIerror("IDirectInputDevice8::SetProperty", result); + } + */ + } - /* What buttons and axes does it have? */ - IDirectInputDevice8_EnumObjects(joystick->hwdata->InputDevice, - EnumDevObjectsCallback, joystick, - DIDFT_BUTTON | DIDFT_AXIS | DIDFT_POV); + /* What buttons and axes does it have? */ + IDirectInputDevice8_EnumObjects(joystick->hwdata->InputDevice, + EnumDevObjectsCallback, joystick, + DIDFT_BUTTON | DIDFT_AXIS | DIDFT_POV); - /* Reorder the input objects. Some devices do not report the X axis as - * the first axis, for example. */ - SortDevObjects(joystick); + /* Reorder the input objects. Some devices do not report the X axis as + * the first axis, for example. */ + SortDevObjects(joystick); - dipdw.diph.dwObj = 0; - dipdw.diph.dwHow = DIPH_DEVICE; - dipdw.dwData = INPUT_QSIZE; + dipdw.diph.dwObj = 0; + dipdw.diph.dwHow = DIPH_DEVICE; + dipdw.dwData = INPUT_QSIZE; - /* Set the buffer size */ - result = - IDirectInputDevice8_SetProperty(joystick->hwdata->InputDevice, - DIPROP_BUFFERSIZE, &dipdw.diph); + /* Set the buffer size */ + result = + IDirectInputDevice8_SetProperty(joystick->hwdata->InputDevice, + DIPROP_BUFFERSIZE, &dipdw.diph); - if (result == DI_POLLEDDEVICE) { - /* This device doesn't support buffering, so we're forced - * to use less reliable polling. */ - joystick->hwdata->buffered = 0; - } else if (FAILED(result)) { - return SetDIerror("IDirectInputDevice8::SetProperty", result); - } - } + if (result == DI_POLLEDDEVICE) { + /* This device doesn't support buffering, so we're forced + * to use less reliable polling. */ + joystick->hwdata->buffered = 0; + } else if (FAILED(result)) { + return SetDIerror("IDirectInputDevice8::SetProperty", result); + } + } return (0); } /* return true if this joystick is plugged in right now */ SDL_bool SDL_SYS_JoystickAttached( SDL_Joystick * joystick ) { - return joystick->closed == 0 && joystick->hwdata->removed == 0; + return joystick->closed == 0 && joystick->hwdata->removed == 0; } @@ -1156,48 +1156,48 @@ SDL_bool SDL_SYS_JoystickAttached( SDL_Joystick * joystick ) static int SortDevFunc(const void *a, const void *b) { - const input_t *inputA = (const input_t*)a; - const input_t *inputB = (const input_t*)b; + const input_t *inputA = (const input_t*)a; + const input_t *inputB = (const input_t*)b; - if (inputA->ofs < inputB->ofs) - return -1; - if (inputA->ofs > inputB->ofs) - return 1; - return 0; + if (inputA->ofs < inputB->ofs) + return -1; + if (inputA->ofs > inputB->ofs) + return 1; + return 0; } /* Sort the input objects and recalculate the indices for each input. */ static void SortDevObjects(SDL_Joystick *joystick) { - input_t *inputs = joystick->hwdata->Inputs; - int nButtons = 0; - int nHats = 0; - int nAxis = 0; - int n; + input_t *inputs = joystick->hwdata->Inputs; + int nButtons = 0; + int nHats = 0; + int nAxis = 0; + int n; - SDL_qsort(inputs, joystick->hwdata->NumInputs, sizeof(input_t), SortDevFunc); + SDL_qsort(inputs, joystick->hwdata->NumInputs, sizeof(input_t), SortDevFunc); - for (n = 0; n < joystick->hwdata->NumInputs; n++) - { - switch (inputs[n].type) - { - case BUTTON: - inputs[n].num = nButtons; - nButtons++; - break; + for (n = 0; n < joystick->hwdata->NumInputs; n++) + { + switch (inputs[n].type) + { + case BUTTON: + inputs[n].num = nButtons; + nButtons++; + break; - case HAT: - inputs[n].num = nHats; - nHats++; - break; + case HAT: + inputs[n].num = nHats; + nHats++; + break; - case AXIS: - inputs[n].num = nAxis; - nAxis++; - break; - } - } + case AXIS: + inputs[n].num = nAxis; + nAxis++; + break; + } + } } static BOOL CALLBACK @@ -1210,12 +1210,12 @@ EnumDevObjectsCallback(LPCDIDEVICEOBJECTINSTANCE dev, LPVOID pvRef) if (dev->dwType & DIDFT_BUTTON) { in->type = BUTTON; in->num = joystick->nbuttons; - in->ofs = DIJOFS_BUTTON( in->num ); + in->ofs = DIJOFS_BUTTON( in->num ); joystick->nbuttons++; } else if (dev->dwType & DIDFT_POV) { in->type = HAT; in->num = joystick->nhats; - in->ofs = DIJOFS_POV( in->num ); + in->ofs = DIJOFS_POV( in->num ); joystick->nhats++; } else if (dev->dwType & DIDFT_AXIS) { DIPROPRANGE diprg; @@ -1223,28 +1223,28 @@ EnumDevObjectsCallback(LPCDIDEVICEOBJECTINSTANCE dev, LPVOID pvRef) in->type = AXIS; in->num = joystick->naxes; - // work our the axis this guy maps too, thanks for the code icculus! - if ( !SDL_memcmp( &dev->guidType, &GUID_XAxis, sizeof(dev->guidType) ) ) - in->ofs = DIJOFS_X; - else if ( !SDL_memcmp( &dev->guidType, &GUID_YAxis, sizeof(dev->guidType) ) ) - in->ofs = DIJOFS_Y; - else if ( !SDL_memcmp( &dev->guidType, &GUID_ZAxis, sizeof(dev->guidType) ) ) - in->ofs = DIJOFS_Z; - else if ( !SDL_memcmp( &dev->guidType, &GUID_RxAxis, sizeof(dev->guidType) ) ) - in->ofs = DIJOFS_RX; - else if ( !SDL_memcmp( &dev->guidType, &GUID_RyAxis, sizeof(dev->guidType) ) ) - in->ofs = DIJOFS_RY; - else if ( !SDL_memcmp( &dev->guidType, &GUID_RzAxis, sizeof(dev->guidType) ) ) - in->ofs = DIJOFS_RZ; - else if ( !SDL_memcmp( &dev->guidType, &GUID_Slider, sizeof(dev->guidType) ) ) - { - in->ofs = DIJOFS_SLIDER( joystick->hwdata->NumSliders ); - ++joystick->hwdata->NumSliders; - } - else - { - return DIENUM_CONTINUE; // not an axis we can grok - } + /* work our the axis this guy maps too, thanks for the code icculus! */ + if ( !SDL_memcmp( &dev->guidType, &GUID_XAxis, sizeof(dev->guidType) ) ) + in->ofs = DIJOFS_X; + else if ( !SDL_memcmp( &dev->guidType, &GUID_YAxis, sizeof(dev->guidType) ) ) + in->ofs = DIJOFS_Y; + else if ( !SDL_memcmp( &dev->guidType, &GUID_ZAxis, sizeof(dev->guidType) ) ) + in->ofs = DIJOFS_Z; + else if ( !SDL_memcmp( &dev->guidType, &GUID_RxAxis, sizeof(dev->guidType) ) ) + in->ofs = DIJOFS_RX; + else if ( !SDL_memcmp( &dev->guidType, &GUID_RyAxis, sizeof(dev->guidType) ) ) + in->ofs = DIJOFS_RY; + else if ( !SDL_memcmp( &dev->guidType, &GUID_RzAxis, sizeof(dev->guidType) ) ) + in->ofs = DIJOFS_RZ; + else if ( !SDL_memcmp( &dev->guidType, &GUID_Slider, sizeof(dev->guidType) ) ) + { + in->ofs = DIJOFS_SLIDER( joystick->hwdata->NumSliders ); + ++joystick->hwdata->NumSliders; + } + else + { + return DIENUM_CONTINUE; /* not an axis we can grok */ + } diprg.diph.dwSize = sizeof(diprg); diprg.diph.dwHeaderSize = sizeof(diprg.diph); @@ -1310,12 +1310,12 @@ SDL_SYS_JoystickUpdate_Polled(SDL_Joystick * joystick) sizeof(DIJOYSTATE2), &state); } - if ( result != DI_OK ) - { - joystick->hwdata->send_remove_event = 1; - joystick->hwdata->removed = 1; - return; - } + if ( result != DI_OK ) + { + joystick->hwdata->send_remove_event = 1; + joystick->hwdata->removed = 1; + return; + } /* Set each known axis, button and POV. */ for (i = 0; i < joystick->hwdata->NumInputs; ++i) { @@ -1402,11 +1402,11 @@ SDL_SYS_JoystickUpdate_Buffered(SDL_Joystick * joystick) /* Handle the events or punt */ if (FAILED(result)) - { - joystick->hwdata->send_remove_event = 1; - joystick->hwdata->removed = 1; + { + joystick->hwdata->send_remove_event = 1; + joystick->hwdata->removed = 1; return; - } + } for (i = 0; i < (int) numevents; ++i) { int j; @@ -1443,7 +1443,7 @@ SDL_SYS_JoystickUpdate_Buffered(SDL_Joystick * joystick) */ int ButtonChanged( int ButtonsNow, int ButtonsPrev, int ButtonMask ) { - return ( ButtonsNow & ButtonMask ) != ( ButtonsPrev & ButtonMask ); + return ( ButtonsNow & ButtonMask ) != ( ButtonsPrev & ButtonMask ); } /* Function to update the state of a XInput style joystick. @@ -1451,67 +1451,67 @@ int ButtonChanged( int ButtonsNow, int ButtonsPrev, int ButtonMask ) void SDL_SYS_JoystickUpdate_XInput(SDL_Joystick * joystick) { - HRESULT result; + HRESULT result; - if ( !XINPUTGETSTATE ) - return; + if ( !XINPUTGETSTATE ) + return; - result = XINPUTGETSTATE( joystick->hwdata->userid, &joystick->hwdata->XInputState[joystick->hwdata->currentXInputSlot] ); - if ( result == ERROR_DEVICE_NOT_CONNECTED ) - { - joystick->hwdata->send_remove_event = 1; - joystick->hwdata->removed = 1; - return; - } + result = XINPUTGETSTATE( joystick->hwdata->userid, &joystick->hwdata->XInputState[joystick->hwdata->currentXInputSlot] ); + if ( result == ERROR_DEVICE_NOT_CONNECTED ) + { + joystick->hwdata->send_remove_event = 1; + joystick->hwdata->removed = 1; + return; + } - // only fire events if the data changed from last time - if ( joystick->hwdata->XInputState[joystick->hwdata->currentXInputSlot].dwPacketNumber != 0 - && joystick->hwdata->XInputState[joystick->hwdata->currentXInputSlot].dwPacketNumber != joystick->hwdata->XInputState[joystick->hwdata->currentXInputSlot^1].dwPacketNumber ) - { - XINPUT_STATE_EX *pXInputState = &joystick->hwdata->XInputState[joystick->hwdata->currentXInputSlot]; - XINPUT_STATE_EX *pXInputStatePrev = &joystick->hwdata->XInputState[joystick->hwdata->currentXInputSlot ^ 1]; + /* only fire events if the data changed from last time */ + if ( joystick->hwdata->XInputState[joystick->hwdata->currentXInputSlot].dwPacketNumber != 0 + && joystick->hwdata->XInputState[joystick->hwdata->currentXInputSlot].dwPacketNumber != joystick->hwdata->XInputState[joystick->hwdata->currentXInputSlot^1].dwPacketNumber ) + { + XINPUT_STATE_EX *pXInputState = &joystick->hwdata->XInputState[joystick->hwdata->currentXInputSlot]; + XINPUT_STATE_EX *pXInputStatePrev = &joystick->hwdata->XInputState[joystick->hwdata->currentXInputSlot ^ 1]; - SDL_PrivateJoystickAxis(joystick, 0, (Sint16)pXInputState->Gamepad.sThumbLX ); - SDL_PrivateJoystickAxis(joystick, 1, (Sint16)(-1*pXInputState->Gamepad.sThumbLY-1) ); - SDL_PrivateJoystickAxis(joystick, 2, (Sint16)pXInputState->Gamepad.sThumbRX ); - SDL_PrivateJoystickAxis(joystick, 3, (Sint16)(-1*pXInputState->Gamepad.sThumbRY-1) ); - SDL_PrivateJoystickAxis(joystick, 4, (Sint16)((int)pXInputState->Gamepad.bLeftTrigger*32767/255) ); - SDL_PrivateJoystickAxis(joystick, 5, (Sint16)((int)pXInputState->Gamepad.bRightTrigger*32767/255) ); + SDL_PrivateJoystickAxis(joystick, 0, (Sint16)pXInputState->Gamepad.sThumbLX ); + SDL_PrivateJoystickAxis(joystick, 1, (Sint16)(-1*pXInputState->Gamepad.sThumbLY-1) ); + SDL_PrivateJoystickAxis(joystick, 2, (Sint16)pXInputState->Gamepad.sThumbRX ); + SDL_PrivateJoystickAxis(joystick, 3, (Sint16)(-1*pXInputState->Gamepad.sThumbRY-1) ); + SDL_PrivateJoystickAxis(joystick, 4, (Sint16)((int)pXInputState->Gamepad.bLeftTrigger*32767/255) ); + SDL_PrivateJoystickAxis(joystick, 5, (Sint16)((int)pXInputState->Gamepad.bRightTrigger*32767/255) ); - if ( ButtonChanged( pXInputState->Gamepad.wButtons, pXInputStatePrev->Gamepad.wButtons, XINPUT_GAMEPAD_DPAD_UP ) ) - SDL_PrivateJoystickButton(joystick, 0, pXInputState->Gamepad.wButtons & XINPUT_GAMEPAD_DPAD_UP ? SDL_PRESSED : SDL_RELEASED ); - if ( ButtonChanged( pXInputState->Gamepad.wButtons, pXInputStatePrev->Gamepad.wButtons, XINPUT_GAMEPAD_DPAD_DOWN ) ) - SDL_PrivateJoystickButton(joystick, 1, pXInputState->Gamepad.wButtons & XINPUT_GAMEPAD_DPAD_DOWN ? SDL_PRESSED : SDL_RELEASED ); - if ( ButtonChanged( pXInputState->Gamepad.wButtons, pXInputStatePrev->Gamepad.wButtons, XINPUT_GAMEPAD_DPAD_LEFT ) ) - SDL_PrivateJoystickButton(joystick, 2, pXInputState->Gamepad.wButtons & XINPUT_GAMEPAD_DPAD_LEFT ? SDL_PRESSED : SDL_RELEASED ); - if ( ButtonChanged( pXInputState->Gamepad.wButtons, pXInputStatePrev->Gamepad.wButtons, XINPUT_GAMEPAD_DPAD_RIGHT ) ) - SDL_PrivateJoystickButton(joystick, 3, pXInputState->Gamepad.wButtons & XINPUT_GAMEPAD_DPAD_RIGHT ? SDL_PRESSED : SDL_RELEASED ); - if ( ButtonChanged( pXInputState->Gamepad.wButtons, pXInputStatePrev->Gamepad.wButtons, XINPUT_GAMEPAD_START ) ) - SDL_PrivateJoystickButton(joystick, 4, pXInputState->Gamepad.wButtons & XINPUT_GAMEPAD_START ? SDL_PRESSED : SDL_RELEASED ); - if ( ButtonChanged( pXInputState->Gamepad.wButtons, pXInputStatePrev->Gamepad.wButtons, XINPUT_GAMEPAD_BACK ) ) - SDL_PrivateJoystickButton(joystick, 5, pXInputState->Gamepad.wButtons & XINPUT_GAMEPAD_BACK ? SDL_PRESSED : SDL_RELEASED ); - if ( ButtonChanged( pXInputState->Gamepad.wButtons, pXInputStatePrev->Gamepad.wButtons, XINPUT_GAMEPAD_LEFT_THUMB ) ) - SDL_PrivateJoystickButton(joystick, 6, pXInputState->Gamepad.wButtons & XINPUT_GAMEPAD_LEFT_THUMB ? SDL_PRESSED : SDL_RELEASED ); - if ( ButtonChanged( pXInputState->Gamepad.wButtons, pXInputStatePrev->Gamepad.wButtons, XINPUT_GAMEPAD_RIGHT_THUMB ) ) - SDL_PrivateJoystickButton(joystick, 7, pXInputState->Gamepad.wButtons & XINPUT_GAMEPAD_RIGHT_THUMB ? SDL_PRESSED : SDL_RELEASED ); - if ( ButtonChanged( pXInputState->Gamepad.wButtons, pXInputStatePrev->Gamepad.wButtons, XINPUT_GAMEPAD_LEFT_SHOULDER ) ) - SDL_PrivateJoystickButton(joystick, 8, pXInputState->Gamepad.wButtons & XINPUT_GAMEPAD_LEFT_SHOULDER ? SDL_PRESSED : SDL_RELEASED ); - if ( ButtonChanged( pXInputState->Gamepad.wButtons, pXInputStatePrev->Gamepad.wButtons, XINPUT_GAMEPAD_RIGHT_SHOULDER ) ) - SDL_PrivateJoystickButton(joystick, 9, pXInputState->Gamepad.wButtons & XINPUT_GAMEPAD_RIGHT_SHOULDER ? SDL_PRESSED : SDL_RELEASED ); - if ( ButtonChanged( pXInputState->Gamepad.wButtons, pXInputStatePrev->Gamepad.wButtons, XINPUT_GAMEPAD_A ) ) - SDL_PrivateJoystickButton(joystick, 10, pXInputState->Gamepad.wButtons & XINPUT_GAMEPAD_A ? SDL_PRESSED : SDL_RELEASED ); - if ( ButtonChanged( pXInputState->Gamepad.wButtons, pXInputStatePrev->Gamepad.wButtons, XINPUT_GAMEPAD_B ) ) - SDL_PrivateJoystickButton(joystick, 11, pXInputState->Gamepad.wButtons & XINPUT_GAMEPAD_B ? SDL_PRESSED : SDL_RELEASED ); - if ( ButtonChanged( pXInputState->Gamepad.wButtons, pXInputStatePrev->Gamepad.wButtons, XINPUT_GAMEPAD_X ) ) - SDL_PrivateJoystickButton(joystick, 12, pXInputState->Gamepad.wButtons & XINPUT_GAMEPAD_X ? SDL_PRESSED : SDL_RELEASED ); - if ( ButtonChanged( pXInputState->Gamepad.wButtons, pXInputStatePrev->Gamepad.wButtons, XINPUT_GAMEPAD_Y ) ) - SDL_PrivateJoystickButton(joystick, 13, pXInputState->Gamepad.wButtons & XINPUT_GAMEPAD_Y ? SDL_PRESSED : SDL_RELEASED ); - if ( ButtonChanged( pXInputState->Gamepad.wButtons, pXInputStatePrev->Gamepad.wButtons, 0x400 ) ) - SDL_PrivateJoystickButton(joystick, 14, pXInputState->Gamepad.wButtons & 0x400 ? SDL_PRESSED : SDL_RELEASED ); // 0x400 is the undocumented code for the guide button + if ( ButtonChanged( pXInputState->Gamepad.wButtons, pXInputStatePrev->Gamepad.wButtons, XINPUT_GAMEPAD_DPAD_UP ) ) + SDL_PrivateJoystickButton(joystick, 0, pXInputState->Gamepad.wButtons & XINPUT_GAMEPAD_DPAD_UP ? SDL_PRESSED : SDL_RELEASED ); + if ( ButtonChanged( pXInputState->Gamepad.wButtons, pXInputStatePrev->Gamepad.wButtons, XINPUT_GAMEPAD_DPAD_DOWN ) ) + SDL_PrivateJoystickButton(joystick, 1, pXInputState->Gamepad.wButtons & XINPUT_GAMEPAD_DPAD_DOWN ? SDL_PRESSED : SDL_RELEASED ); + if ( ButtonChanged( pXInputState->Gamepad.wButtons, pXInputStatePrev->Gamepad.wButtons, XINPUT_GAMEPAD_DPAD_LEFT ) ) + SDL_PrivateJoystickButton(joystick, 2, pXInputState->Gamepad.wButtons & XINPUT_GAMEPAD_DPAD_LEFT ? SDL_PRESSED : SDL_RELEASED ); + if ( ButtonChanged( pXInputState->Gamepad.wButtons, pXInputStatePrev->Gamepad.wButtons, XINPUT_GAMEPAD_DPAD_RIGHT ) ) + SDL_PrivateJoystickButton(joystick, 3, pXInputState->Gamepad.wButtons & XINPUT_GAMEPAD_DPAD_RIGHT ? SDL_PRESSED : SDL_RELEASED ); + if ( ButtonChanged( pXInputState->Gamepad.wButtons, pXInputStatePrev->Gamepad.wButtons, XINPUT_GAMEPAD_START ) ) + SDL_PrivateJoystickButton(joystick, 4, pXInputState->Gamepad.wButtons & XINPUT_GAMEPAD_START ? SDL_PRESSED : SDL_RELEASED ); + if ( ButtonChanged( pXInputState->Gamepad.wButtons, pXInputStatePrev->Gamepad.wButtons, XINPUT_GAMEPAD_BACK ) ) + SDL_PrivateJoystickButton(joystick, 5, pXInputState->Gamepad.wButtons & XINPUT_GAMEPAD_BACK ? SDL_PRESSED : SDL_RELEASED ); + if ( ButtonChanged( pXInputState->Gamepad.wButtons, pXInputStatePrev->Gamepad.wButtons, XINPUT_GAMEPAD_LEFT_THUMB ) ) + SDL_PrivateJoystickButton(joystick, 6, pXInputState->Gamepad.wButtons & XINPUT_GAMEPAD_LEFT_THUMB ? SDL_PRESSED : SDL_RELEASED ); + if ( ButtonChanged( pXInputState->Gamepad.wButtons, pXInputStatePrev->Gamepad.wButtons, XINPUT_GAMEPAD_RIGHT_THUMB ) ) + SDL_PrivateJoystickButton(joystick, 7, pXInputState->Gamepad.wButtons & XINPUT_GAMEPAD_RIGHT_THUMB ? SDL_PRESSED : SDL_RELEASED ); + if ( ButtonChanged( pXInputState->Gamepad.wButtons, pXInputStatePrev->Gamepad.wButtons, XINPUT_GAMEPAD_LEFT_SHOULDER ) ) + SDL_PrivateJoystickButton(joystick, 8, pXInputState->Gamepad.wButtons & XINPUT_GAMEPAD_LEFT_SHOULDER ? SDL_PRESSED : SDL_RELEASED ); + if ( ButtonChanged( pXInputState->Gamepad.wButtons, pXInputStatePrev->Gamepad.wButtons, XINPUT_GAMEPAD_RIGHT_SHOULDER ) ) + SDL_PrivateJoystickButton(joystick, 9, pXInputState->Gamepad.wButtons & XINPUT_GAMEPAD_RIGHT_SHOULDER ? SDL_PRESSED : SDL_RELEASED ); + if ( ButtonChanged( pXInputState->Gamepad.wButtons, pXInputStatePrev->Gamepad.wButtons, XINPUT_GAMEPAD_A ) ) + SDL_PrivateJoystickButton(joystick, 10, pXInputState->Gamepad.wButtons & XINPUT_GAMEPAD_A ? SDL_PRESSED : SDL_RELEASED ); + if ( ButtonChanged( pXInputState->Gamepad.wButtons, pXInputStatePrev->Gamepad.wButtons, XINPUT_GAMEPAD_B ) ) + SDL_PrivateJoystickButton(joystick, 11, pXInputState->Gamepad.wButtons & XINPUT_GAMEPAD_B ? SDL_PRESSED : SDL_RELEASED ); + if ( ButtonChanged( pXInputState->Gamepad.wButtons, pXInputStatePrev->Gamepad.wButtons, XINPUT_GAMEPAD_X ) ) + SDL_PrivateJoystickButton(joystick, 12, pXInputState->Gamepad.wButtons & XINPUT_GAMEPAD_X ? SDL_PRESSED : SDL_RELEASED ); + if ( ButtonChanged( pXInputState->Gamepad.wButtons, pXInputStatePrev->Gamepad.wButtons, XINPUT_GAMEPAD_Y ) ) + SDL_PrivateJoystickButton(joystick, 13, pXInputState->Gamepad.wButtons & XINPUT_GAMEPAD_Y ? SDL_PRESSED : SDL_RELEASED ); + if ( ButtonChanged( pXInputState->Gamepad.wButtons, pXInputStatePrev->Gamepad.wButtons, 0x400 ) ) + SDL_PrivateJoystickButton(joystick, 14, pXInputState->Gamepad.wButtons & 0x400 ? SDL_PRESSED : SDL_RELEASED ); /* 0x400 is the undocumented code for the guide button */ - joystick->hwdata->currentXInputSlot ^= 1; + joystick->hwdata->currentXInputSlot ^= 1; - } + } } @@ -1575,94 +1575,94 @@ SDL_SYS_JoystickUpdate(SDL_Joystick * joystick) { HRESULT result; - if ( joystick->closed || !joystick->hwdata ) - return; + if ( joystick->closed || !joystick->hwdata ) + return; - if (joystick->hwdata->bXInputDevice) - { - SDL_SYS_JoystickUpdate_XInput(joystick); - } - else - { - result = IDirectInputDevice8_Poll(joystick->hwdata->InputDevice); - if (result == DIERR_INPUTLOST || result == DIERR_NOTACQUIRED) { - IDirectInputDevice8_Acquire(joystick->hwdata->InputDevice); - IDirectInputDevice8_Poll(joystick->hwdata->InputDevice); - } + if (joystick->hwdata->bXInputDevice) + { + SDL_SYS_JoystickUpdate_XInput(joystick); + } + else + { + result = IDirectInputDevice8_Poll(joystick->hwdata->InputDevice); + if (result == DIERR_INPUTLOST || result == DIERR_NOTACQUIRED) { + IDirectInputDevice8_Acquire(joystick->hwdata->InputDevice); + IDirectInputDevice8_Poll(joystick->hwdata->InputDevice); + } - if (joystick->hwdata->buffered) - SDL_SYS_JoystickUpdate_Buffered(joystick); - else - SDL_SYS_JoystickUpdate_Polled(joystick); - } + if (joystick->hwdata->buffered) + SDL_SYS_JoystickUpdate_Buffered(joystick); + else + SDL_SYS_JoystickUpdate_Polled(joystick); + } - if ( joystick->hwdata->removed ) - { - joystick->closed = 1; - joystick->uncentered = 1; - } + if ( joystick->hwdata->removed ) + { + joystick->closed = 1; + joystick->uncentered = 1; + } } /* Function to close a joystick after use */ void SDL_SYS_JoystickClose(SDL_Joystick * joystick) { - if ( joystick->hwdata->bXInputDevice ) - { - JoyStick_DeviceData *joysticklist = SYS_Joystick; - // scan the opened joysticks and clear the userid for this instance - for( ; joysticklist; joysticklist = joysticklist->pNext) - { - if ( joysticklist->bXInputDevice && joysticklist->nInstanceID == joystick->instance_id ) - { - joysticklist->XInputUserId = INVALID_XINPUT_USERID; - } - } + if ( joystick->hwdata->bXInputDevice ) + { + JoyStick_DeviceData *joysticklist = SYS_Joystick; + /* scan the opened joysticks and clear the userid for this instance */ + for( ; joysticklist; joysticklist = joysticklist->pNext) + { + if ( joysticklist->bXInputDevice && joysticklist->nInstanceID == joystick->instance_id ) + { + joysticklist->XInputUserId = INVALID_XINPUT_USERID; + } + } - } - else - { - IDirectInputDevice8_Unacquire(joystick->hwdata->InputDevice); - IDirectInputDevice8_Release(joystick->hwdata->InputDevice); - } + } + else + { + IDirectInputDevice8_Unacquire(joystick->hwdata->InputDevice); + IDirectInputDevice8_Release(joystick->hwdata->InputDevice); + } if (joystick->hwdata != NULL) { /* free system specific hardware data */ SDL_free(joystick->hwdata); } - joystick->closed = 1; + joystick->closed = 1; } /* Function to perform any system-specific joystick related cleanup */ void SDL_SYS_JoystickQuit(void) { - JoyStick_DeviceData *device = SYS_Joystick; + JoyStick_DeviceData *device = SYS_Joystick; - while ( device ) - { - JoyStick_DeviceData *device_next = device->pNext; - SDL_free(device->joystickname); - SDL_free(device); - device = device_next; - } - SYS_Joystick = NULL; + while ( device ) + { + JoyStick_DeviceData *device_next = device->pNext; + SDL_free(device->joystickname); + SDL_free(device); + device = device_next; + } + SYS_Joystick = NULL; - if ( s_threadJoystick ) - { - SDL_LockMutex( s_mutexJoyStickEnum ); - s_bJoystickThreadQuit = SDL_TRUE; - SDL_CondBroadcast( s_condJoystickThread ); // signal the joystick thread to quit - SDL_UnlockMutex( s_mutexJoyStickEnum ); - SDL_WaitThread( s_threadJoystick, NULL ); // wait for it to bugger off + if ( s_threadJoystick ) + { + SDL_LockMutex( s_mutexJoyStickEnum ); + s_bJoystickThreadQuit = SDL_TRUE; + SDL_CondBroadcast( s_condJoystickThread ); /* signal the joystick thread to quit */ + SDL_UnlockMutex( s_mutexJoyStickEnum ); + SDL_WaitThread( s_threadJoystick, NULL ); /* wait for it to bugger off */ - SDL_DestroyMutex( s_mutexJoyStickEnum ); - SDL_DestroyCond( s_condJoystickThread ); - s_condJoystickThread= NULL; - s_mutexJoyStickEnum = NULL; - s_threadJoystick = NULL; - } + SDL_DestroyMutex( s_mutexJoyStickEnum ); + SDL_DestroyCond( s_condJoystickThread ); + s_condJoystickThread= NULL; + s_mutexJoyStickEnum = NULL; + s_threadJoystick = NULL; + } if (dinput != NULL) { IDirectInput8_Release(dinput); @@ -1674,11 +1674,11 @@ SDL_SYS_JoystickQuit(void) coinitialized = SDL_FALSE; } - if ( s_pKnownJoystickGUIDs ) - { - SDL_free( s_pKnownJoystickGUIDs ); - s_pKnownJoystickGUIDs = NULL; - } + if ( s_pKnownJoystickGUIDs ) + { + SDL_free( s_pKnownJoystickGUIDs ); + s_pKnownJoystickGUIDs = NULL; + } if (s_bXInputEnabled) { WIN_UnloadXInputDLL(); @@ -1689,30 +1689,30 @@ SDL_SYS_JoystickQuit(void) /* return the stable device guid for this device index */ SDL_JoystickGUID SDL_SYS_JoystickGetDeviceGUID( int device_index ) { - JoyStick_DeviceData *device = SYS_Joystick; - int index; + JoyStick_DeviceData *device = SYS_Joystick; + int index; - for (index = device_index; index > 0; index--) - device = device->pNext; + for (index = device_index; index > 0; index--) + device = device->pNext; - return device->guid; + return device->guid; } SDL_JoystickGUID SDL_SYS_JoystickGetGUID(SDL_Joystick * joystick) { - return joystick->hwdata->guid; + return joystick->hwdata->guid; } /* return SDL_TRUE if this device is using XInput */ SDL_bool SDL_SYS_IsXInputDeviceIndex(int device_index) { - JoyStick_DeviceData *device = SYS_Joystick; - int index; + JoyStick_DeviceData *device = SYS_Joystick; + int index; - for (index = device_index; index > 0; index--) - device = device->pNext; + for (index = device_index; index > 0; index--) + device = device->pNext; - return device->bXInputDevice; + return device->bXInputDevice; } #endif /* SDL_JOYSTICK_DINPUT */ diff --git a/src/joystick/windows/SDL_dxjoystick_c.h b/src/joystick/windows/SDL_dxjoystick_c.h index 564a566bb..01cfca970 100644 --- a/src/joystick/windows/SDL_dxjoystick_c.h +++ b/src/joystick/windows/SDL_dxjoystick_c.h @@ -23,10 +23,10 @@ #ifndef SDL_JOYSTICK_DINPUT_H /* DirectInput joystick driver; written by Glenn Maynard, based on Andrei de - * A. Formiga's WINMM driver. + * A. Formiga's WINMM driver. * * Hats and sliders are completely untested; the app I'm writing this for mostly - * doesn't use them and I don't own any joysticks with them. + * doesn't use them and I don't own any joysticks with them. * * We don't bother to use event notification here. It doesn't seem to work * with polled devices, and it's fine to call IDirectInputDevice2_GetDeviceData and @@ -57,7 +57,7 @@ typedef struct DWORD dwPaddingReserved; } XINPUT_GAMEPAD_EX; -typedef struct +typedef struct { DWORD dwPacketNumber; XINPUT_GAMEPAD_EX Gamepad; @@ -65,23 +65,23 @@ typedef struct /* Forward decl's for XInput API's we load dynamically and use if available */ typedef DWORD (WINAPI *XInputGetState_t) - ( - DWORD dwUserIndex, // [in] Index of the gamer associated with the device - XINPUT_STATE_EX* pState // [out] Receives the current state - ); + ( + DWORD dwUserIndex, /* [in] Index of the gamer associated with the device */ + XINPUT_STATE_EX* pState /* [out] Receives the current state */ + ); typedef DWORD (WINAPI *XInputSetState_t) - ( - DWORD dwUserIndex, // [in] Index of the gamer associated with the device - XINPUT_VIBRATION* pVibration // [in, out] The vibration information to send to the controller - ); + ( + DWORD dwUserIndex, /* [in] Index of the gamer associated with the device */ + XINPUT_VIBRATION* pVibration /* [in, out] The vibration information to send to the controller */ + ); typedef DWORD (WINAPI *XInputGetCapabilities_t) - ( - DWORD dwUserIndex, // [in] Index of the gamer associated with the device - DWORD dwFlags, // [in] Input flags that identify the device type - XINPUT_CAPABILITIES* pCapabilities // [out] Receives the capabilities - ); + ( + DWORD dwUserIndex, /* [in] Index of the gamer associated with the device */ + DWORD dwFlags, /* [in] Input flags that identify the device type */ + XINPUT_CAPABILITIES* pCapabilities /* [out] Receives the capabilities */ + ); extern int WIN_LoadXInputDLL(void); extern void WIN_UnloadXInputDLL(void); @@ -89,11 +89,11 @@ extern void WIN_UnloadXInputDLL(void); extern XInputGetState_t SDL_XInputGetState; extern XInputSetState_t SDL_XInputSetState; extern XInputGetCapabilities_t SDL_XInputGetCapabilities; -extern DWORD SDL_XInputVersion; // ((major << 16) & 0xFF00) | (minor & 0xFF) +extern DWORD SDL_XInputVersion; /* ((major << 16) & 0xFF00) | (minor & 0xFF) */ -#define XINPUTGETSTATE SDL_XInputGetState -#define XINPUTSETSTATE SDL_XInputSetState -#define XINPUTGETCAPABILITIES SDL_XInputGetCapabilities +#define XINPUTGETSTATE SDL_XInputGetState +#define XINPUTSETSTATE SDL_XInputSetState +#define XINPUTGETCAPABILITIES SDL_XInputGetCapabilities #define INVALID_XINPUT_USERID 255 #define SDL_XINPUT_MAX_DEVICES 4 @@ -102,7 +102,7 @@ extern DWORD SDL_XInputVersion; // ((major << 16) & 0xFF00) | (minor & 0xFF) #endif -#define MAX_INPUTS 256 /* each joystick can have up to 256 inputs */ +#define MAX_INPUTS 256 /* each joystick can have up to 256 inputs */ /* local types */ @@ -127,18 +127,18 @@ struct joystick_hwdata LPDIRECTINPUTDEVICE8 InputDevice; DIDEVCAPS Capabilities; int buffered; - SDL_JoystickGUID guid; + SDL_JoystickGUID guid; input_t Inputs[MAX_INPUTS]; int NumInputs; - int NumSliders; - Uint8 removed; - Uint8 send_remove_event; - Uint8 bXInputDevice; // 1 if this device supports using the xinput API rather than DirectInput - Uint8 bXInputHaptic; // Supports force feedback via XInput. - Uint8 userid; // XInput userid index for this joystick - Uint8 currentXInputSlot; // the current position to write to in XInputState below, used so we can compare old and new values - XINPUT_STATE_EX XInputState[2]; + int NumSliders; + Uint8 removed; + Uint8 send_remove_event; + Uint8 bXInputDevice; /* 1 if this device supports using the xinput API rather than DirectInput */ + Uint8 bXInputHaptic; /* Supports force feedback via XInput. */ + Uint8 userid; /* XInput userid index for this joystick */ + Uint8 currentXInputSlot; /* the current position to write to in XInputState below, used so we can compare old and new values */ + XINPUT_STATE_EX XInputState[2]; }; #endif /* SDL_JOYSTICK_DINPUT_H */ diff --git a/src/joystick/windows/SDL_mmjoystick.c b/src/joystick/windows/SDL_mmjoystick.c index 73ad7fb95..413053f14 100644 --- a/src/joystick/windows/SDL_mmjoystick.c +++ b/src/joystick/windows/SDL_mmjoystick.c @@ -33,14 +33,14 @@ #include "../SDL_sysjoystick.h" #include "../SDL_joystick_c.h" -#define MAX_JOYSTICKS 16 -#define MAX_AXES 6 /* each joystick can have up to 6 axes */ -#define MAX_BUTTONS 32 /* and 32 buttons */ -#define AXIS_MIN -32768 /* minimum value for axis coordinate */ -#define AXIS_MAX 32767 /* maximum value for axis coordinate */ +#define MAX_JOYSTICKS 16 +#define MAX_AXES 6 /* each joystick can have up to 6 axes */ +#define MAX_BUTTONS 32 /* and 32 buttons */ +#define AXIS_MIN -32768 /* minimum value for axis coordinate */ +#define AXIS_MAX 32767 /* maximum value for axis coordinate */ /* limit axis to 256 possible positions to filter out noise */ #define JOY_AXIS_THRESHOLD (((AXIS_MAX)-(AXIS_MIN))/256) -#define JOY_BUTTON_FLAG(n) (1<name; SDL_zero( guid ); SDL_memcpy( &guid, name, SDL_min( sizeof(guid), SDL_strlen( name ) ) ); diff --git a/src/main/beos/SDL_BApp.h b/src/main/beos/SDL_BApp.h index 5bde94c18..2a64455b6 100644 --- a/src/main/beos/SDL_BApp.h +++ b/src/main/beos/SDL_BApp.h @@ -54,24 +54,24 @@ class SDL_BWin; /* Message constants */ enum ToSDL { - /* Intercepted by BWindow on its way to BView */ - BAPP_MOUSE_MOVED, - BAPP_MOUSE_BUTTON, - BAPP_MOUSE_WHEEL, - BAPP_KEY, - BAPP_REPAINT, /* from _UPDATE_ */ - /* From BWindow */ - BAPP_MAXIMIZE, /* from B_ZOOM */ - BAPP_MINIMIZE, - BAPP_RESTORE, /* TODO: IMPLEMENT! */ - BAPP_SHOW, - BAPP_HIDE, - BAPP_MOUSE_FOCUS, /* caused by MOUSE_MOVE */ - BAPP_KEYBOARD_FOCUS, /* from WINDOW_ACTIVATED */ - BAPP_WINDOW_CLOSE_REQUESTED, - BAPP_WINDOW_MOVED, - BAPP_WINDOW_RESIZED, - BAPP_SCREEN_CHANGED + /* Intercepted by BWindow on its way to BView */ + BAPP_MOUSE_MOVED, + BAPP_MOUSE_BUTTON, + BAPP_MOUSE_WHEEL, + BAPP_KEY, + BAPP_REPAINT, /* from _UPDATE_ */ + /* From BWindow */ + BAPP_MAXIMIZE, /* from B_ZOOM */ + BAPP_MINIMIZE, + BAPP_RESTORE, /* TODO: IMPLEMENT! */ + BAPP_SHOW, + BAPP_HIDE, + BAPP_MOUSE_FOCUS, /* caused by MOUSE_MOVE */ + BAPP_KEYBOARD_FOCUS, /* from WINDOW_ACTIVATED */ + BAPP_WINDOW_CLOSE_REQUESTED, + BAPP_WINDOW_MOVED, + BAPP_WINDOW_RESIZED, + BAPP_SCREEN_CHANGED }; @@ -79,302 +79,302 @@ enum ToSDL { /* Create a descendant of BApplication */ class SDL_BApp : public BApplication { public: - SDL_BApp(const char* signature) : - BApplication(signature) { - _current_context = NULL; - } - - - virtual ~SDL_BApp() { - } - - - - /* Event-handling functions */ - virtual void MessageReceived(BMessage* message) { - /* Sort out SDL-related messages */ + SDL_BApp(const char* signature) : + BApplication(signature) { + _current_context = NULL; + } + + + virtual ~SDL_BApp() { + } + + + + /* Event-handling functions */ + virtual void MessageReceived(BMessage* message) { + /* Sort out SDL-related messages */ switch ( message->what ) { case BAPP_MOUSE_MOVED: - _HandleMouseMove(message); - break; + _HandleMouseMove(message); + break; - case BAPP_MOUSE_BUTTON: - _HandleMouseButton(message); - break; - - case BAPP_MOUSE_WHEEL: - _HandleMouseWheel(message); - break; - - case BAPP_KEY: - _HandleKey(message); - break; + case BAPP_MOUSE_BUTTON: + _HandleMouseButton(message); + break; - case BAPP_REPAINT: - _HandleBasicWindowEvent(message, SDL_WINDOWEVENT_EXPOSED); - break; - - case BAPP_MAXIMIZE: - _HandleBasicWindowEvent(message, SDL_WINDOWEVENT_MAXIMIZED); - break; - - case BAPP_MINIMIZE: - _HandleBasicWindowEvent(message, SDL_WINDOWEVENT_MINIMIZED); - break; - - case BAPP_SHOW: - _HandleBasicWindowEvent(message, SDL_WINDOWEVENT_SHOWN); - break; - - case BAPP_HIDE: - _HandleBasicWindowEvent(message, SDL_WINDOWEVENT_HIDDEN); - break; - - case BAPP_MOUSE_FOCUS: - _HandleMouseFocus(message); - break; - - case BAPP_KEYBOARD_FOCUS: - _HandleKeyboardFocus(message); - break; - - case BAPP_WINDOW_CLOSE_REQUESTED: - _HandleBasicWindowEvent(message, SDL_WINDOWEVENT_CLOSE); - break; - - case BAPP_WINDOW_MOVED: - _HandleWindowMoved(message); - break; - - case BAPP_WINDOW_RESIZED: - _HandleWindowResized(message); - break; - - case BAPP_SCREEN_CHANGED: - /* TODO: Handle screen resize or workspace change */ - break; + case BAPP_MOUSE_WHEEL: + _HandleMouseWheel(message); + break; + + case BAPP_KEY: + _HandleKey(message); + break; + + case BAPP_REPAINT: + _HandleBasicWindowEvent(message, SDL_WINDOWEVENT_EXPOSED); + break; + + case BAPP_MAXIMIZE: + _HandleBasicWindowEvent(message, SDL_WINDOWEVENT_MAXIMIZED); + break; + + case BAPP_MINIMIZE: + _HandleBasicWindowEvent(message, SDL_WINDOWEVENT_MINIMIZED); + break; + + case BAPP_SHOW: + _HandleBasicWindowEvent(message, SDL_WINDOWEVENT_SHOWN); + break; + + case BAPP_HIDE: + _HandleBasicWindowEvent(message, SDL_WINDOWEVENT_HIDDEN); + break; + + case BAPP_MOUSE_FOCUS: + _HandleMouseFocus(message); + break; + + case BAPP_KEYBOARD_FOCUS: + _HandleKeyboardFocus(message); + break; + + case BAPP_WINDOW_CLOSE_REQUESTED: + _HandleBasicWindowEvent(message, SDL_WINDOWEVENT_CLOSE); + break; + + case BAPP_WINDOW_MOVED: + _HandleWindowMoved(message); + break; + + case BAPP_WINDOW_RESIZED: + _HandleWindowResized(message); + break; + + case BAPP_SCREEN_CHANGED: + /* TODO: Handle screen resize or workspace change */ + break; default: BApplication::MessageReceived(message); break; } } - + /* Window creation/destruction methods */ int32 GetID(SDL_Window *win) { - int32 i; - for(i = 0; i < _GetNumWindowSlots(); ++i) { - if( GetSDLWindow(i) == NULL ) { - _SetSDLWindow(win, i); - return i; - } - } - - /* Expand the vector if all slots are full */ - if( i == _GetNumWindowSlots() ) { - _PushBackWindow(win); - return i; - } - - /* TODO: error handling */ - return 0; + int32 i; + for(i = 0; i < _GetNumWindowSlots(); ++i) { + if( GetSDLWindow(i) == NULL ) { + _SetSDLWindow(win, i); + return i; + } + } + + /* Expand the vector if all slots are full */ + if( i == _GetNumWindowSlots() ) { + _PushBackWindow(win); + return i; + } + + /* TODO: error handling */ + return 0; } - + /* FIXME: Bad coding practice, but I can't include SDL_BWin.h here. Is there another way to do this? */ void ClearID(SDL_BWin *bwin); /* Defined in SDL_BeApp.cc */ - - - SDL_Window *GetSDLWindow(int32 winID) { - return _window_map[winID]; - } - + + + SDL_Window *GetSDLWindow(int32 winID) { + return _window_map[winID]; + } + void SetCurrentContext(BGLView *newContext) { - if(_current_context) - _current_context->UnlockGL(); - _current_context = newContext; - _current_context->LockGL(); + if(_current_context) + _current_context->UnlockGL(); + _current_context = newContext; + _current_context->LockGL(); } private: - /* Event management */ - void _HandleBasicWindowEvent(BMessage *msg, int32 sdlEventType) { - SDL_Window *win; - int32 winID; - if( - !_GetWinID(msg, &winID) - ) { - return; - } - win = GetSDLWindow(winID); - SDL_SendWindowEvent(win, sdlEventType, 0, 0); - } - - void _HandleMouseMove(BMessage *msg) { - SDL_Window *win; - int32 winID; - int32 x = 0, y = 0; - if( - !_GetWinID(msg, &winID) || - msg->FindInt32("x", &x) != B_OK || /* x movement */ - msg->FindInt32("y", &y) != B_OK /* y movement */ - ) { - return; - } - win = GetSDLWindow(winID); - SDL_SendMouseMotion(win, 0, 0, x, y); - - /* Tell the application that the mouse passed over, redraw needed */ - BE_UpdateWindowFramebuffer(NULL,win,NULL,-1); - } - - void _HandleMouseButton(BMessage *msg) { - SDL_Window *win; - int32 winID; - int32 button, state; /* left/middle/right, pressed/released */ - if( - !_GetWinID(msg, &winID) || - msg->FindInt32("button-id", &button) != B_OK || - msg->FindInt32("button-state", &state) != B_OK - ) { - return; - } - win = GetSDLWindow(winID); - SDL_SendMouseButton(win, 0, state, button); - } - - void _HandleMouseWheel(BMessage *msg) { - SDL_Window *win; - int32 winID; - int32 xTicks, yTicks; - if( - !_GetWinID(msg, &winID) || - msg->FindInt32("xticks", &xTicks) != B_OK || - msg->FindInt32("yticks", &yTicks) != B_OK - ) { - return; - } - win = GetSDLWindow(winID); - SDL_SendMouseWheel(win, 0, xTicks, yTicks); - } - - void _HandleKey(BMessage *msg) { - int32 scancode, state; /* scancode, pressed/released */ - if( - msg->FindInt32("key-state", &state) != B_OK || - msg->FindInt32("key-scancode", &scancode) != B_OK - ) { - return; - } - - /* Make sure this isn't a repeated event (key pressed and held) */ - if(state == SDL_PRESSED && BE_GetKeyState(scancode) == SDL_PRESSED) { - return; - } - BE_SetKeyState(scancode, state); - SDL_SendKeyboardKey(state, BE_GetScancodeFromBeKey(scancode)); - } - - void _HandleMouseFocus(BMessage *msg) { - SDL_Window *win; - int32 winID; - bool bSetFocus; /* If false, lose focus */ - if( - !_GetWinID(msg, &winID) || - msg->FindBool("focusGained", &bSetFocus) != B_OK - ) { - return; - } - win = GetSDLWindow(winID); - if(bSetFocus) { - SDL_SetMouseFocus(win); - } else if(SDL_GetMouseFocus() == win) { - /* Only lose all focus if this window was the current focus */ - SDL_SetMouseFocus(NULL); - } - } - - void _HandleKeyboardFocus(BMessage *msg) { - SDL_Window *win; - int32 winID; - bool bSetFocus; /* If false, lose focus */ - if( - !_GetWinID(msg, &winID) || - msg->FindBool("focusGained", &bSetFocus) != B_OK - ) { - return; - } - win = GetSDLWindow(winID); - if(bSetFocus) { - SDL_SetKeyboardFocus(win); - } else if(SDL_GetKeyboardFocus() == win) { - /* Only lose all focus if this window was the current focus */ - SDL_SetKeyboardFocus(NULL); - } - } - - void _HandleWindowMoved(BMessage *msg) { - SDL_Window *win; - int32 winID; - int32 xPos, yPos; - /* Get the window id and new x/y position of the window */ - if( - !_GetWinID(msg, &winID) || - msg->FindInt32("window-x", &xPos) != B_OK || - msg->FindInt32("window-y", &yPos) != B_OK - ) { - return; - } - win = GetSDLWindow(winID); - SDL_SendWindowEvent(win, SDL_WINDOWEVENT_MOVED, xPos, yPos); - } - - void _HandleWindowResized(BMessage *msg) { - SDL_Window *win; - int32 winID; - int32 w, h; - /* Get the window id ]and new x/y position of the window */ - if( - !_GetWinID(msg, &winID) || - msg->FindInt32("window-w", &w) != B_OK || - msg->FindInt32("window-h", &h) != B_OK - ) { - return; - } - win = GetSDLWindow(winID); - SDL_SendWindowEvent(win, SDL_WINDOWEVENT_RESIZED, w, h); - } + /* Event management */ + void _HandleBasicWindowEvent(BMessage *msg, int32 sdlEventType) { + SDL_Window *win; + int32 winID; + if( + !_GetWinID(msg, &winID) + ) { + return; + } + win = GetSDLWindow(winID); + SDL_SendWindowEvent(win, sdlEventType, 0, 0); + } - bool _GetWinID(BMessage *msg, int32 *winID) { - return msg->FindInt32("window-id", winID) == B_OK; - } + void _HandleMouseMove(BMessage *msg) { + SDL_Window *win; + int32 winID; + int32 x = 0, y = 0; + if( + !_GetWinID(msg, &winID) || + msg->FindInt32("x", &x) != B_OK || /* x movement */ + msg->FindInt32("y", &y) != B_OK /* y movement */ + ) { + return; + } + win = GetSDLWindow(winID); + SDL_SendMouseMotion(win, 0, 0, x, y); + + /* Tell the application that the mouse passed over, redraw needed */ + BE_UpdateWindowFramebuffer(NULL,win,NULL,-1); + } + + void _HandleMouseButton(BMessage *msg) { + SDL_Window *win; + int32 winID; + int32 button, state; /* left/middle/right, pressed/released */ + if( + !_GetWinID(msg, &winID) || + msg->FindInt32("button-id", &button) != B_OK || + msg->FindInt32("button-state", &state) != B_OK + ) { + return; + } + win = GetSDLWindow(winID); + SDL_SendMouseButton(win, 0, state, button); + } + + void _HandleMouseWheel(BMessage *msg) { + SDL_Window *win; + int32 winID; + int32 xTicks, yTicks; + if( + !_GetWinID(msg, &winID) || + msg->FindInt32("xticks", &xTicks) != B_OK || + msg->FindInt32("yticks", &yTicks) != B_OK + ) { + return; + } + win = GetSDLWindow(winID); + SDL_SendMouseWheel(win, 0, xTicks, yTicks); + } + + void _HandleKey(BMessage *msg) { + int32 scancode, state; /* scancode, pressed/released */ + if( + msg->FindInt32("key-state", &state) != B_OK || + msg->FindInt32("key-scancode", &scancode) != B_OK + ) { + return; + } + + /* Make sure this isn't a repeated event (key pressed and held) */ + if(state == SDL_PRESSED && BE_GetKeyState(scancode) == SDL_PRESSED) { + return; + } + BE_SetKeyState(scancode, state); + SDL_SendKeyboardKey(state, BE_GetScancodeFromBeKey(scancode)); + } + + void _HandleMouseFocus(BMessage *msg) { + SDL_Window *win; + int32 winID; + bool bSetFocus; /* If false, lose focus */ + if( + !_GetWinID(msg, &winID) || + msg->FindBool("focusGained", &bSetFocus) != B_OK + ) { + return; + } + win = GetSDLWindow(winID); + if(bSetFocus) { + SDL_SetMouseFocus(win); + } else if(SDL_GetMouseFocus() == win) { + /* Only lose all focus if this window was the current focus */ + SDL_SetMouseFocus(NULL); + } + } + + void _HandleKeyboardFocus(BMessage *msg) { + SDL_Window *win; + int32 winID; + bool bSetFocus; /* If false, lose focus */ + if( + !_GetWinID(msg, &winID) || + msg->FindBool("focusGained", &bSetFocus) != B_OK + ) { + return; + } + win = GetSDLWindow(winID); + if(bSetFocus) { + SDL_SetKeyboardFocus(win); + } else if(SDL_GetKeyboardFocus() == win) { + /* Only lose all focus if this window was the current focus */ + SDL_SetKeyboardFocus(NULL); + } + } + + void _HandleWindowMoved(BMessage *msg) { + SDL_Window *win; + int32 winID; + int32 xPos, yPos; + /* Get the window id and new x/y position of the window */ + if( + !_GetWinID(msg, &winID) || + msg->FindInt32("window-x", &xPos) != B_OK || + msg->FindInt32("window-y", &yPos) != B_OK + ) { + return; + } + win = GetSDLWindow(winID); + SDL_SendWindowEvent(win, SDL_WINDOWEVENT_MOVED, xPos, yPos); + } + + void _HandleWindowResized(BMessage *msg) { + SDL_Window *win; + int32 winID; + int32 w, h; + /* Get the window id ]and new x/y position of the window */ + if( + !_GetWinID(msg, &winID) || + msg->FindInt32("window-w", &w) != B_OK || + msg->FindInt32("window-h", &h) != B_OK + ) { + return; + } + win = GetSDLWindow(winID); + SDL_SendWindowEvent(win, SDL_WINDOWEVENT_RESIZED, w, h); + } + + bool _GetWinID(BMessage *msg, int32 *winID) { + return msg->FindInt32("window-id", winID) == B_OK; + } - /* Vector functions: Wraps vector stuff in case we need to change - implementation */ - void _SetSDLWindow(SDL_Window *win, int32 winID) { - _window_map[winID] = win; - } - - int32 _GetNumWindowSlots() { - return _window_map.size(); - } - - - void _PopBackWindow() { - _window_map.pop_back(); - } + /* Vector functions: Wraps vector stuff in case we need to change + implementation */ + void _SetSDLWindow(SDL_Window *win, int32 winID) { + _window_map[winID] = win; + } - void _PushBackWindow(SDL_Window *win) { - _window_map.push_back(win); - } + int32 _GetNumWindowSlots() { + return _window_map.size(); + } - /* Members */ - vector _window_map; /* Keeps track of SDL_Windows by index-id*/ + void _PopBackWindow() { + _window_map.pop_back(); + } - display_mode *_saved_mode; - BGLView *_current_context; + void _PushBackWindow(SDL_Window *win) { + _window_map.push_back(win); + } + + + /* Members */ + vector _window_map; /* Keeps track of SDL_Windows by index-id*/ + + display_mode *_saved_mode; + BGLView *_current_context; }; #endif diff --git a/src/main/psp/SDL_psp_main.c b/src/main/psp/SDL_psp_main.c index 0286eadec..c60e8441b 100644 --- a/src/main/psp/SDL_psp_main.c +++ b/src/main/psp/SDL_psp_main.c @@ -30,7 +30,7 @@ /* If application's main() is redefined as SDL_main, and libSDLmain is linked, then this file will create the standard exit callback, define the PSP_MODULE_INFO macro, and exit back to the browser when - the program is finished. + the program is finished. You can still override other parameters in your own code if you desire, such as PSP_HEAP_SIZE_KB, PSP_MAIN_THREAD_ATTR, @@ -43,38 +43,38 @@ PSP_MODULE_INFO("SDL App", 0, 1, 1); int sdl_psp_exit_callback(int arg1, int arg2, void *common) { - exit(0); - return 0; + exit(0); + return 0; } int sdl_psp_callback_thread(SceSize args, void *argp) { - int cbid; - cbid = sceKernelCreateCallback("Exit Callback", - sdl_psp_exit_callback, NULL); - sceKernelRegisterExitCallback(cbid); - sceKernelSleepThreadCB(); - return 0; + int cbid; + cbid = sceKernelCreateCallback("Exit Callback", + sdl_psp_exit_callback, NULL); + sceKernelRegisterExitCallback(cbid); + sceKernelSleepThreadCB(); + return 0; } int sdl_psp_setup_callbacks(void) { - int thid = 0; - thid = sceKernelCreateThread("update_thread", - sdl_psp_callback_thread, 0x11, 0xFA0, 0, 0); - if(thid >= 0) - sceKernelStartThread(thid, 0, 0); - return thid; + int thid = 0; + thid = sceKernelCreateThread("update_thread", + sdl_psp_callback_thread, 0x11, 0xFA0, 0, 0); + if(thid >= 0) + sceKernelStartThread(thid, 0, 0); + return thid; } int main(int argc, char *argv[]) { - pspDebugScreenInit(); - sdl_psp_setup_callbacks(); + pspDebugScreenInit(); + sdl_psp_setup_callbacks(); - /* Register sceKernelExitGame() to be called when we exit */ - atexit(sceKernelExitGame); + /* Register sceKernelExitGame() to be called when we exit */ + atexit(sceKernelExitGame); - (void)SDL_main(argc, argv); - return 0; + (void)SDL_main(argc, argv); + return 0; } diff --git a/src/power/beos/SDL_syspower.c b/src/power/beos/SDL_syspower.c index 5c7b47cd2..8f172cc0e 100644 --- a/src/power/beos/SDL_syspower.c +++ b/src/power/beos/SDL_syspower.c @@ -50,8 +50,8 @@ SDL_GetPowerInfo_BeOS(SDL_PowerState * state, int *seconds, int *percent) uint8 battery_flags; uint8 battery_life; uint32 battery_time; - int rc; - + int rc; + if (fd == -1) { return SDL_FALSE; /* maybe some other method will work? */ } diff --git a/src/power/linux/SDL_syspower.c b/src/power/linux/SDL_syspower.c index a019e3992..d9616de25 100644 --- a/src/power/linux/SDL_syspower.c +++ b/src/power/linux/SDL_syspower.c @@ -64,7 +64,7 @@ load_acpi_file(const char *base, const char *node, const char *key, if (br < 0) { return SDL_FALSE; } - buf[br] = '\0'; // null-terminate the string. + buf[br] = '\0'; /* null-terminate the string. */ return SDL_TRUE; } @@ -342,7 +342,7 @@ SDL_GetPowerInfo_Linux_proc_apm(SDL_PowerState * state, return SDL_FALSE; } - buf[br] = '\0'; // null-terminate the string. + buf[br] = '\0'; /* null-terminate the string. */ if (!next_string(&ptr, &str)) { /* driver version */ return SDL_FALSE; } diff --git a/src/power/psp/SDL_syspower.c b/src/power/psp/SDL_syspower.c index 363c952d0..8c791bba4 100644 --- a/src/power/psp/SDL_syspower.c +++ b/src/power/psp/SDL_syspower.c @@ -25,7 +25,7 @@ #if SDL_POWER_PSP #include "SDL_power.h" -#include +#include SDL_bool @@ -34,31 +34,31 @@ SDL_GetPowerInfo_PSP(SDL_PowerState * state, int *seconds, { int battery = scePowerIsBatteryExist(); int plugged = scePowerIsPowerOnline(); - int charging = scePowerIsBatteryCharging(); + int charging = scePowerIsBatteryCharging(); *state = SDL_POWERSTATE_UNKNOWN; - *seconds = -1; - *percent = -1; - - if (!battery) { - *state = SDL_POWERSTATE_NO_BATTERY; - *seconds = -1; - *percent = -1; + *seconds = -1; + *percent = -1; + + if (!battery) { + *state = SDL_POWERSTATE_NO_BATTERY; + *seconds = -1; + *percent = -1; } else if (charging) { *state = SDL_POWERSTATE_CHARGING; - *percent = scePowerGetBatteryLifePercent(); - *seconds = scePowerGetBatteryLifeTime()*60; + *percent = scePowerGetBatteryLifePercent(); + *seconds = scePowerGetBatteryLifeTime()*60; } else if (plugged) { *state = SDL_POWERSTATE_CHARGED; - *percent = scePowerGetBatteryLifePercent(); - *seconds = scePowerGetBatteryLifeTime()*60; + *percent = scePowerGetBatteryLifePercent(); + *seconds = scePowerGetBatteryLifeTime()*60; } else { *state = SDL_POWERSTATE_ON_BATTERY; - *percent = scePowerGetBatteryLifePercent(); - *seconds = scePowerGetBatteryLifeTime()*60; + *percent = scePowerGetBatteryLifePercent(); + *seconds = scePowerGetBatteryLifeTime()*60; } - + return SDL_TRUE; /* always the definitive answer on PSP. */ } diff --git a/src/power/uikit/SDL_syspower.m b/src/power/uikit/SDL_syspower.m index cb309fcb4..3364da56e 100644 --- a/src/power/uikit/SDL_syspower.m +++ b/src/power/uikit/SDL_syspower.m @@ -30,7 +30,7 @@ #include "SDL_assert.h" #include "SDL_syspower.h" -// turn off the battery monitor if it's been more than X ms since last check. +/* turn off the battery monitor if it's been more than X ms since last check. */ static const int BATTERY_MONITORING_TIMEOUT = 3000; static Uint32 SDL_UIKitLastPowerInfoQuery = 0; @@ -41,7 +41,7 @@ SDL_UIKit_UpdateBatteryMonitoring(void) const Uint32 prev = SDL_UIKitLastPowerInfoQuery; const UInt32 now = SDL_GetTicks(); const UInt32 ticks = now - prev; - // if timer wrapped (now < prev), shut down, too. + /* if timer wrapped (now < prev), shut down, too. */ if ((now < prev) || (ticks >= BATTERY_MONITORING_TIMEOUT)) { UIDevice *uidev = [UIDevice currentDevice]; SDL_assert([uidev isBatteryMonitoringEnabled] == YES); @@ -61,13 +61,14 @@ SDL_GetPowerInfo_UIKit(SDL_PowerState * state, int *seconds, int *percent) [uidev setBatteryMonitoringEnabled:YES]; } - // UIKit_GL_SwapWindow() (etc) will check this and disable the battery - // monitoring if the app hasn't queried it in the last X seconds. - // Apparently monitoring the battery burns battery life. :) - // Apple's docs say not to monitor the battery unless you need it. + /* UIKit_GL_SwapWindow() (etc) will check this and disable the battery + * monitoring if the app hasn't queried it in the last X seconds. + * Apparently monitoring the battery burns battery life. :) + * Apple's docs say not to monitor the battery unless you need it. + */ SDL_UIKitLastPowerInfoQuery = SDL_GetTicks(); - *seconds = -1; // no API to estimate this in UIKit. + *seconds = -1; /* no API to estimate this in UIKit. */ switch ([uidev batteryState]) { diff --git a/src/render/SDL_render.c b/src/render/SDL_render.c index 3a8666d77..785e0b905 100644 --- a/src/render/SDL_render.c +++ b/src/render/SDL_render.c @@ -1601,7 +1601,7 @@ SDL_RenderCopyEx(SDL_Renderer * renderer, SDL_Texture * texture, if (!renderer->RenderCopyEx) { return SDL_SetError("Renderer does not support RenderCopyEx"); } - + real_srcrect.x = 0; real_srcrect.y = 0; real_srcrect.w = texture->w; diff --git a/src/render/SDL_yuv_mmx.c b/src/render/SDL_yuv_mmx.c index 6d6c000f3..b223d2d28 100644 --- a/src/render/SDL_yuv_mmx.c +++ b/src/render/SDL_yuv_mmx.c @@ -63,10 +63,10 @@ static mmx_t MMX_grn565 = { .uw = {0x07e0, 0x07e0, 0x07e0, 0x07e0} }; The MMX routine calculates 256bit=8RGB values in each cycle (4 for row1 & 4 for row2) - The red/green/blue.. coefficents are taken from the mpeg_play + The red/green/blue.. coefficents are taken from the mpeg_play player. They look nice, but I dont know if you can have better values, to avoid integer rounding errors. - + IMPORTANT: ========== @@ -84,152 +84,152 @@ void ColorRGBDitherYV12MMX1X( int *colortab, Uint32 *rgb_2_pix, Uint32 *row1; Uint32 *row2; - unsigned char* y = lum +cols*rows; // Pointer to the end + unsigned char* y = lum +cols*rows; /* Pointer to the end */ int x = 0; - row1 = (Uint32 *)out; // 32 bit target - row2 = (Uint32 *)out+cols+mod; // start of second row - mod = (mod+cols+mod)*4; // increment for row1 in byte + row1 = (Uint32 *)out; /* 32 bit target */ + row2 = (Uint32 *)out+cols+mod; /* start of second row */ + mod = (mod+cols+mod)*4; /* increment for row1 in byte */ __asm__ __volatile__ ( - // tap dance to workaround the inability to use %%ebx at will... - // move one thing to the stack... - "pushl $0\n" // save a slot on the stack. - "pushl %%ebx\n" // save %%ebx. - "movl %0, %%ebx\n" // put the thing in ebx. - "movl %%ebx,4(%%esp)\n" // put the thing in the stack slot. - "popl %%ebx\n" // get back %%ebx (the PIC register). + /* tap dance to workaround the inability to use %%ebx at will... */ + /* move one thing to the stack... */ + "pushl $0\n" /* save a slot on the stack. */ + "pushl %%ebx\n" /* save %%ebx. */ + "movl %0, %%ebx\n" /* put the thing in ebx. */ + "movl %%ebx,4(%%esp)\n" /* put the thing in the stack slot. */ + "popl %%ebx\n" /* get back %%ebx (the PIC register). */ ".align 8\n" "1:\n" - // create Cr (result in mm1) + /* create Cr (result in mm1) */ "pushl %%ebx\n" "movl 4(%%esp),%%ebx\n" - "movd (%%ebx),%%mm1\n" // 0 0 0 0 v3 v2 v1 v0 + "movd (%%ebx),%%mm1\n" /* 0 0 0 0 v3 v2 v1 v0 */ "popl %%ebx\n" - "pxor %%mm7,%%mm7\n" // 00 00 00 00 00 00 00 00 - "movd (%2), %%mm2\n" // 0 0 0 0 l3 l2 l1 l0 - "punpcklbw %%mm7,%%mm1\n" // 0 v3 0 v2 00 v1 00 v0 - "punpckldq %%mm1,%%mm1\n" // 00 v1 00 v0 00 v1 00 v0 - "psubw %9,%%mm1\n" // mm1-128:r1 r1 r0 r0 r1 r1 r0 r0 + "pxor %%mm7,%%mm7\n" /* 00 00 00 00 00 00 00 00 */ + "movd (%2), %%mm2\n" /* 0 0 0 0 l3 l2 l1 l0 */ + "punpcklbw %%mm7,%%mm1\n" /* 0 v3 0 v2 00 v1 00 v0 */ + "punpckldq %%mm1,%%mm1\n" /* 00 v1 00 v0 00 v1 00 v0 */ + "psubw %9,%%mm1\n" /* mm1-128:r1 r1 r0 r0 r1 r1 r0 r0 */ - // create Cr_g (result in mm0) - "movq %%mm1,%%mm0\n" // r1 r1 r0 r0 r1 r1 r0 r0 - "pmullw %10,%%mm0\n" // red*-46dec=0.7136*64 - "pmullw %11,%%mm1\n" // red*89dec=1.4013*64 - "psraw $6, %%mm0\n" // red=red/64 - "psraw $6, %%mm1\n" // red=red/64 + /* create Cr_g (result in mm0) */ + "movq %%mm1,%%mm0\n" /* r1 r1 r0 r0 r1 r1 r0 r0 */ + "pmullw %10,%%mm0\n" /* red*-46dec=0.7136*64 */ + "pmullw %11,%%mm1\n" /* red*89dec=1.4013*64 */ + "psraw $6, %%mm0\n" /* red=red/64 */ + "psraw $6, %%mm1\n" /* red=red/64 */ - // create L1 L2 (result in mm2,mm4) - // L2=lum+cols - "movq (%2,%4),%%mm3\n" // 0 0 0 0 L3 L2 L1 L0 - "punpckldq %%mm3,%%mm2\n" // L3 L2 L1 L0 l3 l2 l1 l0 - "movq %%mm2,%%mm4\n" // L3 L2 L1 L0 l3 l2 l1 l0 - "pand %12,%%mm2\n" // L3 0 L1 0 l3 0 l1 0 - "pand %13,%%mm4\n" // 0 L2 0 L0 0 l2 0 l0 - "psrlw $8,%%mm2\n" // 0 L3 0 L1 0 l3 0 l1 + /* create L1 L2 (result in mm2,mm4) */ + /* L2=lum+cols */ + "movq (%2,%4),%%mm3\n" /* 0 0 0 0 L3 L2 L1 L0 */ + "punpckldq %%mm3,%%mm2\n" /* L3 L2 L1 L0 l3 l2 l1 l0 */ + "movq %%mm2,%%mm4\n" /* L3 L2 L1 L0 l3 l2 l1 l0 */ + "pand %12,%%mm2\n" /* L3 0 L1 0 l3 0 l1 0 */ + "pand %13,%%mm4\n" /* 0 L2 0 L0 0 l2 0 l0 */ + "psrlw $8,%%mm2\n" /* 0 L3 0 L1 0 l3 0 l1 */ - // create R (result in mm6) - "movq %%mm2,%%mm5\n" // 0 L3 0 L1 0 l3 0 l1 - "movq %%mm4,%%mm6\n" // 0 L2 0 L0 0 l2 0 l0 - "paddsw %%mm1, %%mm5\n" // lum1+red:x R3 x R1 x r3 x r1 - "paddsw %%mm1, %%mm6\n" // lum1+red:x R2 x R0 x r2 x r0 - "packuswb %%mm5,%%mm5\n" // R3 R1 r3 r1 R3 R1 r3 r1 - "packuswb %%mm6,%%mm6\n" // R2 R0 r2 r0 R2 R0 r2 r0 - "pxor %%mm7,%%mm7\n" // 00 00 00 00 00 00 00 00 - "punpcklbw %%mm5,%%mm6\n" // R3 R2 R1 R0 r3 r2 r1 r0 + /* create R (result in mm6) */ + "movq %%mm2,%%mm5\n" /* 0 L3 0 L1 0 l3 0 l1 */ + "movq %%mm4,%%mm6\n" /* 0 L2 0 L0 0 l2 0 l0 */ + "paddsw %%mm1, %%mm5\n" /* lum1+red:x R3 x R1 x r3 x r1 */ + "paddsw %%mm1, %%mm6\n" /* lum1+red:x R2 x R0 x r2 x r0 */ + "packuswb %%mm5,%%mm5\n" /* R3 R1 r3 r1 R3 R1 r3 r1 */ + "packuswb %%mm6,%%mm6\n" /* R2 R0 r2 r0 R2 R0 r2 r0 */ + "pxor %%mm7,%%mm7\n" /* 00 00 00 00 00 00 00 00 */ + "punpcklbw %%mm5,%%mm6\n" /* R3 R2 R1 R0 r3 r2 r1 r0 */ - // create Cb (result in mm1) - "movd (%1), %%mm1\n" // 0 0 0 0 u3 u2 u1 u0 - "punpcklbw %%mm7,%%mm1\n" // 0 u3 0 u2 00 u1 00 u0 - "punpckldq %%mm1,%%mm1\n" // 00 u1 00 u0 00 u1 00 u0 - "psubw %9,%%mm1\n" // mm1-128:u1 u1 u0 u0 u1 u1 u0 u0 + /* create Cb (result in mm1) */ + "movd (%1), %%mm1\n" /* 0 0 0 0 u3 u2 u1 u0 */ + "punpcklbw %%mm7,%%mm1\n" /* 0 u3 0 u2 00 u1 00 u0 */ + "punpckldq %%mm1,%%mm1\n" /* 00 u1 00 u0 00 u1 00 u0 */ + "psubw %9,%%mm1\n" /* mm1-128:u1 u1 u0 u0 u1 u1 u0 u0 */ - // create Cb_g (result in mm5) - "movq %%mm1,%%mm5\n" // u1 u1 u0 u0 u1 u1 u0 u0 - "pmullw %14,%%mm5\n" // blue*-109dec=1.7129*64 - "pmullw %15,%%mm1\n" // blue*114dec=1.78125*64 - "psraw $6, %%mm5\n" // blue=red/64 - "psraw $6, %%mm1\n" // blue=blue/64 + /* create Cb_g (result in mm5) */ + "movq %%mm1,%%mm5\n" /* u1 u1 u0 u0 u1 u1 u0 u0 */ + "pmullw %14,%%mm5\n" /* blue*-109dec=1.7129*64 */ + "pmullw %15,%%mm1\n" /* blue*114dec=1.78125*64 */ + "psraw $6, %%mm5\n" /* blue=red/64 */ + "psraw $6, %%mm1\n" /* blue=blue/64 */ - // create G (result in mm7) - "movq %%mm2,%%mm3\n" // 0 L3 0 L1 0 l3 0 l1 - "movq %%mm4,%%mm7\n" // 0 L2 0 L0 0 l2 0 l1 - "paddsw %%mm5, %%mm3\n" // lum1+Cb_g:x G3t x G1t x g3t x g1t - "paddsw %%mm5, %%mm7\n" // lum1+Cb_g:x G2t x G0t x g2t x g0t - "paddsw %%mm0, %%mm3\n" // lum1+Cr_g:x G3 x G1 x g3 x g1 - "paddsw %%mm0, %%mm7\n" // lum1+blue:x G2 x G0 x g2 x g0 - "packuswb %%mm3,%%mm3\n" // G3 G1 g3 g1 G3 G1 g3 g1 - "packuswb %%mm7,%%mm7\n" // G2 G0 g2 g0 G2 G0 g2 g0 - "punpcklbw %%mm3,%%mm7\n" // G3 G2 G1 G0 g3 g2 g1 g0 + /* create G (result in mm7) */ + "movq %%mm2,%%mm3\n" /* 0 L3 0 L1 0 l3 0 l1 */ + "movq %%mm4,%%mm7\n" /* 0 L2 0 L0 0 l2 0 l1 */ + "paddsw %%mm5, %%mm3\n" /* lum1+Cb_g:x G3t x G1t x g3t x g1t */ + "paddsw %%mm5, %%mm7\n" /* lum1+Cb_g:x G2t x G0t x g2t x g0t */ + "paddsw %%mm0, %%mm3\n" /* lum1+Cr_g:x G3 x G1 x g3 x g1 */ + "paddsw %%mm0, %%mm7\n" /* lum1+blue:x G2 x G0 x g2 x g0 */ + "packuswb %%mm3,%%mm3\n" /* G3 G1 g3 g1 G3 G1 g3 g1 */ + "packuswb %%mm7,%%mm7\n" /* G2 G0 g2 g0 G2 G0 g2 g0 */ + "punpcklbw %%mm3,%%mm7\n" /* G3 G2 G1 G0 g3 g2 g1 g0 */ - // create B (result in mm5) - "movq %%mm2,%%mm3\n" // 0 L3 0 L1 0 l3 0 l1 - "movq %%mm4,%%mm5\n" // 0 L2 0 L0 0 l2 0 l1 - "paddsw %%mm1, %%mm3\n" // lum1+blue:x B3 x B1 x b3 x b1 - "paddsw %%mm1, %%mm5\n" // lum1+blue:x B2 x B0 x b2 x b0 - "packuswb %%mm3,%%mm3\n" // B3 B1 b3 b1 B3 B1 b3 b1 - "packuswb %%mm5,%%mm5\n" // B2 B0 b2 b0 B2 B0 b2 b0 - "punpcklbw %%mm3,%%mm5\n" // B3 B2 B1 B0 b3 b2 b1 b0 + /* create B (result in mm5) */ + "movq %%mm2,%%mm3\n" /* 0 L3 0 L1 0 l3 0 l1 */ + "movq %%mm4,%%mm5\n" /* 0 L2 0 L0 0 l2 0 l1 */ + "paddsw %%mm1, %%mm3\n" /* lum1+blue:x B3 x B1 x b3 x b1 */ + "paddsw %%mm1, %%mm5\n" /* lum1+blue:x B2 x B0 x b2 x b0 */ + "packuswb %%mm3,%%mm3\n" /* B3 B1 b3 b1 B3 B1 b3 b1 */ + "packuswb %%mm5,%%mm5\n" /* B2 B0 b2 b0 B2 B0 b2 b0 */ + "punpcklbw %%mm3,%%mm5\n" /* B3 B2 B1 B0 b3 b2 b1 b0 */ - // fill destination row1 (needed are mm6=Rr,mm7=Gg,mm5=Bb) + /* fill destination row1 (needed are mm6=Rr,mm7=Gg,mm5=Bb) */ - "pxor %%mm2,%%mm2\n" // 0 0 0 0 0 0 0 0 - "pxor %%mm4,%%mm4\n" // 0 0 0 0 0 0 0 0 - "movq %%mm6,%%mm1\n" // R3 R2 R1 R0 r3 r2 r1 r0 - "movq %%mm5,%%mm3\n" // B3 B2 B1 B0 b3 b2 b1 b0 + "pxor %%mm2,%%mm2\n" /* 0 0 0 0 0 0 0 0 */ + "pxor %%mm4,%%mm4\n" /* 0 0 0 0 0 0 0 0 */ + "movq %%mm6,%%mm1\n" /* R3 R2 R1 R0 r3 r2 r1 r0 */ + "movq %%mm5,%%mm3\n" /* B3 B2 B1 B0 b3 b2 b1 b0 */ - // process lower lum - "punpcklbw %%mm4,%%mm1\n" // 0 r3 0 r2 0 r1 0 r0 - "punpcklbw %%mm4,%%mm3\n" // 0 b3 0 b2 0 b1 0 b0 - "movq %%mm1,%%mm2\n" // 0 r3 0 r2 0 r1 0 r0 - "movq %%mm3,%%mm0\n" // 0 b3 0 b2 0 b1 0 b0 - "punpcklwd %%mm1,%%mm3\n" // 0 r1 0 b1 0 r0 0 b0 - "punpckhwd %%mm2,%%mm0\n" // 0 r3 0 b3 0 r2 0 b2 + /* process lower lum */ + "punpcklbw %%mm4,%%mm1\n" /* 0 r3 0 r2 0 r1 0 r0 */ + "punpcklbw %%mm4,%%mm3\n" /* 0 b3 0 b2 0 b1 0 b0 */ + "movq %%mm1,%%mm2\n" /* 0 r3 0 r2 0 r1 0 r0 */ + "movq %%mm3,%%mm0\n" /* 0 b3 0 b2 0 b1 0 b0 */ + "punpcklwd %%mm1,%%mm3\n" /* 0 r1 0 b1 0 r0 0 b0 */ + "punpckhwd %%mm2,%%mm0\n" /* 0 r3 0 b3 0 r2 0 b2 */ - "pxor %%mm2,%%mm2\n" // 0 0 0 0 0 0 0 0 - "movq %%mm7,%%mm1\n" // G3 G2 G1 G0 g3 g2 g1 g0 - "punpcklbw %%mm1,%%mm2\n" // g3 0 g2 0 g1 0 g0 0 - "punpcklwd %%mm4,%%mm2\n" // 0 0 g1 0 0 0 g0 0 - "por %%mm3, %%mm2\n" // 0 r1 g1 b1 0 r0 g0 b0 - "movq %%mm2,(%3)\n" // wrote out ! row1 + "pxor %%mm2,%%mm2\n" /* 0 0 0 0 0 0 0 0 */ + "movq %%mm7,%%mm1\n" /* G3 G2 G1 G0 g3 g2 g1 g0 */ + "punpcklbw %%mm1,%%mm2\n" /* g3 0 g2 0 g1 0 g0 0 */ + "punpcklwd %%mm4,%%mm2\n" /* 0 0 g1 0 0 0 g0 0 */ + "por %%mm3, %%mm2\n" /* 0 r1 g1 b1 0 r0 g0 b0 */ + "movq %%mm2,(%3)\n" /* wrote out ! row1 */ - "pxor %%mm2,%%mm2\n" // 0 0 0 0 0 0 0 0 - "punpcklbw %%mm1,%%mm4\n" // g3 0 g2 0 g1 0 g0 0 - "punpckhwd %%mm2,%%mm4\n" // 0 0 g3 0 0 0 g2 0 - "por %%mm0, %%mm4\n" // 0 r3 g3 b3 0 r2 g2 b2 - "movq %%mm4,8(%3)\n" // wrote out ! row1 + "pxor %%mm2,%%mm2\n" /* 0 0 0 0 0 0 0 0 */ + "punpcklbw %%mm1,%%mm4\n" /* g3 0 g2 0 g1 0 g0 0 */ + "punpckhwd %%mm2,%%mm4\n" /* 0 0 g3 0 0 0 g2 0 */ + "por %%mm0, %%mm4\n" /* 0 r3 g3 b3 0 r2 g2 b2 */ + "movq %%mm4,8(%3)\n" /* wrote out ! row1 */ - // fill destination row2 (needed are mm6=Rr,mm7=Gg,mm5=Bb) - // this can be done "destructive" - "pxor %%mm2,%%mm2\n" // 0 0 0 0 0 0 0 0 - "punpckhbw %%mm2,%%mm6\n" // 0 R3 0 R2 0 R1 0 R0 - "punpckhbw %%mm1,%%mm5\n" // G3 B3 G2 B2 G1 B1 G0 B0 - "movq %%mm5,%%mm1\n" // G3 B3 G2 B2 G1 B1 G0 B0 - "punpcklwd %%mm6,%%mm1\n" // 0 R1 G1 B1 0 R0 G0 B0 - "movq %%mm1,(%5)\n" // wrote out ! row2 - "punpckhwd %%mm6,%%mm5\n" // 0 R3 G3 B3 0 R2 G2 B2 - "movq %%mm5,8(%5)\n" // wrote out ! row2 + /* fill destination row2 (needed are mm6=Rr,mm7=Gg,mm5=Bb) */ + /* this can be done "destructive" */ + "pxor %%mm2,%%mm2\n" /* 0 0 0 0 0 0 0 0 */ + "punpckhbw %%mm2,%%mm6\n" /* 0 R3 0 R2 0 R1 0 R0 */ + "punpckhbw %%mm1,%%mm5\n" /* G3 B3 G2 B2 G1 B1 G0 B0 */ + "movq %%mm5,%%mm1\n" /* G3 B3 G2 B2 G1 B1 G0 B0 */ + "punpcklwd %%mm6,%%mm1\n" /* 0 R1 G1 B1 0 R0 G0 B0 */ + "movq %%mm1,(%5)\n" /* wrote out ! row2 */ + "punpckhwd %%mm6,%%mm5\n" /* 0 R3 G3 B3 0 R2 G2 B2 */ + "movq %%mm5,8(%5)\n" /* wrote out ! row2 */ - "addl $4,%2\n" // lum+4 - "leal 16(%3),%3\n" // row1+16 - "leal 16(%5),%5\n" // row2+16 - "addl $2,(%%esp)\n" // cr+2 - "addl $2,%1\n" // cb+2 + "addl $4,%2\n" /* lum+4 */ + "leal 16(%3),%3\n" /* row1+16 */ + "leal 16(%5),%5\n" /* row2+16 */ + "addl $2,(%%esp)\n" /* cr+2 */ + "addl $2,%1\n" /* cb+2 */ - "addl $4,%6\n" // x+4 + "addl $4,%6\n" /* x+4 */ "cmpl %4,%6\n" "jl 1b\n" - "addl %4,%2\n" // lum += cols - "addl %8,%3\n" // row1+= mod - "addl %8,%5\n" // row2+= mod - "movl $0,%6\n" // x=0 + "addl %4,%2\n" /* lum += cols */ + "addl %8,%3\n" /* row1+= mod */ + "addl %8,%5\n" /* row2+= mod */ + "movl $0,%6\n" /* x=0 */ "cmpl %7,%2\n" "jl 1b\n" - "addl $4,%%esp\n" // get rid of the stack slot we reserved. - "emms\n" // reset MMX registers. + "addl $4,%%esp\n" /* get rid of the stack slot we reserved. */ + "emms\n" /* reset MMX registers. */ : : "m" (cr), "r"(cb),"r"(lum), "r"(row1),"r"(cols),"r"(row2),"m"(x),"m"(y),"m"(mod), @@ -254,125 +254,125 @@ void Color565DitherYV12MMX1X( int *colortab, Uint32 *rgb_2_pix, mod = (mod+cols+mod)*2; /* increment for row1 in byte */ __asm__ __volatile__( - // tap dance to workaround the inability to use %%ebx at will... - // move one thing to the stack... - "pushl $0\n" // save a slot on the stack. - "pushl %%ebx\n" // save %%ebx. - "movl %0, %%ebx\n" // put the thing in ebx. - "movl %%ebx, 4(%%esp)\n" // put the thing in the stack slot. - "popl %%ebx\n" // get back %%ebx (the PIC register). + /* tap dance to workaround the inability to use %%ebx at will... */ + /* move one thing to the stack... */ + "pushl $0\n" /* save a slot on the stack. */ + "pushl %%ebx\n" /* save %%ebx. */ + "movl %0, %%ebx\n" /* put the thing in ebx. */ + "movl %%ebx, 4(%%esp)\n" /* put the thing in the stack slot. */ + "popl %%ebx\n" /* get back %%ebx (the PIC register). */ ".align 8\n" "1:\n" - "movd (%1), %%mm0\n" // 4 Cb 0 0 0 0 u3 u2 u1 u0 + "movd (%1), %%mm0\n" /* 4 Cb 0 0 0 0 u3 u2 u1 u0 */ "pxor %%mm7, %%mm7\n" "pushl %%ebx\n" "movl 4(%%esp), %%ebx\n" - "movd (%%ebx), %%mm1\n" // 4 Cr 0 0 0 0 v3 v2 v1 v0 + "movd (%%ebx), %%mm1\n" /* 4 Cr 0 0 0 0 v3 v2 v1 v0 */ "popl %%ebx\n" - "punpcklbw %%mm7, %%mm0\n" // 4 W cb 0 u3 0 u2 0 u1 0 u0 - "punpcklbw %%mm7, %%mm1\n" // 4 W cr 0 v3 0 v2 0 v1 0 v0 + "punpcklbw %%mm7, %%mm0\n" /* 4 W cb 0 u3 0 u2 0 u1 0 u0 */ + "punpcklbw %%mm7, %%mm1\n" /* 4 W cr 0 v3 0 v2 0 v1 0 v0 */ "psubw %9, %%mm0\n" "psubw %9, %%mm1\n" - "movq %%mm0, %%mm2\n" // Cb 0 u3 0 u2 0 u1 0 u0 - "movq %%mm1, %%mm3\n" // Cr - "pmullw %10, %%mm2\n" // Cb2green 0 R3 0 R2 0 R1 0 R0 - "movq (%2), %%mm6\n" // L1 l7 L6 L5 L4 L3 L2 L1 L0 - "pmullw %11, %%mm0\n" // Cb2blue - "pand %12, %%mm6\n" // L1 00 L6 00 L4 00 L2 00 L0 - "pmullw %13, %%mm3\n" // Cr2green - "movq (%2), %%mm7\n" // L2 - "pmullw %14, %%mm1\n" // Cr2red - "psrlw $8, %%mm7\n" // L2 00 L7 00 L5 00 L3 00 L1 - "pmullw %15, %%mm6\n" // lum1 - "paddw %%mm3, %%mm2\n" // Cb2green + Cr2green == green - "pmullw %15, %%mm7\n" // lum2 + "movq %%mm0, %%mm2\n" /* Cb 0 u3 0 u2 0 u1 0 u0 */ + "movq %%mm1, %%mm3\n" /* Cr */ + "pmullw %10, %%mm2\n" /* Cb2green 0 R3 0 R2 0 R1 0 R0 */ + "movq (%2), %%mm6\n" /* L1 l7 L6 L5 L4 L3 L2 L1 L0 */ + "pmullw %11, %%mm0\n" /* Cb2blue */ + "pand %12, %%mm6\n" /* L1 00 L6 00 L4 00 L2 00 L0 */ + "pmullw %13, %%mm3\n" /* Cr2green */ + "movq (%2), %%mm7\n" /* L2 */ + "pmullw %14, %%mm1\n" /* Cr2red */ + "psrlw $8, %%mm7\n" /* L2 00 L7 00 L5 00 L3 00 L1 */ + "pmullw %15, %%mm6\n" /* lum1 */ + "paddw %%mm3, %%mm2\n" /* Cb2green + Cr2green == green */ + "pmullw %15, %%mm7\n" /* lum2 */ - "movq %%mm6, %%mm4\n" // lum1 - "paddw %%mm0, %%mm6\n" // lum1 +blue 00 B6 00 B4 00 B2 00 B0 - "movq %%mm4, %%mm5\n" // lum1 - "paddw %%mm1, %%mm4\n" // lum1 +red 00 R6 00 R4 00 R2 00 R0 - "paddw %%mm2, %%mm5\n" // lum1 +green 00 G6 00 G4 00 G2 00 G0 - "psraw $6, %%mm4\n" // R1 0 .. 64 - "movq %%mm7, %%mm3\n" // lum2 00 L7 00 L5 00 L3 00 L1 - "psraw $6, %%mm5\n" // G1 - .. + - "paddw %%mm0, %%mm7\n" // Lum2 +blue 00 B7 00 B5 00 B3 00 B1 - "psraw $6, %%mm6\n" // B1 0 .. 64 - "packuswb %%mm4, %%mm4\n" // R1 R1 - "packuswb %%mm5, %%mm5\n" // G1 G1 - "packuswb %%mm6, %%mm6\n" // B1 B1 + "movq %%mm6, %%mm4\n" /* lum1 */ + "paddw %%mm0, %%mm6\n" /* lum1 +blue 00 B6 00 B4 00 B2 00 B0 */ + "movq %%mm4, %%mm5\n" /* lum1 */ + "paddw %%mm1, %%mm4\n" /* lum1 +red 00 R6 00 R4 00 R2 00 R0 */ + "paddw %%mm2, %%mm5\n" /* lum1 +green 00 G6 00 G4 00 G2 00 G0 */ + "psraw $6, %%mm4\n" /* R1 0 .. 64 */ + "movq %%mm7, %%mm3\n" /* lum2 00 L7 00 L5 00 L3 00 L1 */ + "psraw $6, %%mm5\n" /* G1 - .. + */ + "paddw %%mm0, %%mm7\n" /* Lum2 +blue 00 B7 00 B5 00 B3 00 B1 */ + "psraw $6, %%mm6\n" /* B1 0 .. 64 */ + "packuswb %%mm4, %%mm4\n" /* R1 R1 */ + "packuswb %%mm5, %%mm5\n" /* G1 G1 */ + "packuswb %%mm6, %%mm6\n" /* B1 B1 */ "punpcklbw %%mm4, %%mm4\n" "punpcklbw %%mm5, %%mm5\n" "pand %16, %%mm4\n" - "psllw $3, %%mm5\n" // GREEN 1 + "psllw $3, %%mm5\n" /* GREEN 1 */ "punpcklbw %%mm6, %%mm6\n" "pand %17, %%mm5\n" "pand %16, %%mm6\n" - "por %%mm5, %%mm4\n" // - "psrlw $11, %%mm6\n" // BLUE 1 - "movq %%mm3, %%mm5\n" // lum2 - "paddw %%mm1, %%mm3\n" // lum2 +red 00 R7 00 R5 00 R3 00 R1 - "paddw %%mm2, %%mm5\n" // lum2 +green 00 G7 00 G5 00 G3 00 G1 - "psraw $6, %%mm3\n" // R2 - "por %%mm6, %%mm4\n" // MM4 - "psraw $6, %%mm5\n" // G2 - "movq (%2, %4), %%mm6\n" // L3 load lum2 + "por %%mm5, %%mm4\n" /* */ + "psrlw $11, %%mm6\n" /* BLUE 1 */ + "movq %%mm3, %%mm5\n" /* lum2 */ + "paddw %%mm1, %%mm3\n" /* lum2 +red 00 R7 00 R5 00 R3 00 R1 */ + "paddw %%mm2, %%mm5\n" /* lum2 +green 00 G7 00 G5 00 G3 00 G1 */ + "psraw $6, %%mm3\n" /* R2 */ + "por %%mm6, %%mm4\n" /* MM4 */ + "psraw $6, %%mm5\n" /* G2 */ + "movq (%2, %4), %%mm6\n" /* L3 load lum2 */ "psraw $6, %%mm7\n" "packuswb %%mm3, %%mm3\n" "packuswb %%mm5, %%mm5\n" "packuswb %%mm7, %%mm7\n" - "pand %12, %%mm6\n" // L3 + "pand %12, %%mm6\n" /* L3 */ "punpcklbw %%mm3, %%mm3\n" "punpcklbw %%mm5, %%mm5\n" - "pmullw %15, %%mm6\n" // lum3 + "pmullw %15, %%mm6\n" /* lum3 */ "punpcklbw %%mm7, %%mm7\n" - "psllw $3, %%mm5\n" // GREEN 2 + "psllw $3, %%mm5\n" /* GREEN 2 */ "pand %16, %%mm7\n" "pand %16, %%mm3\n" - "psrlw $11, %%mm7\n" // BLUE 2 + "psrlw $11, %%mm7\n" /* BLUE 2 */ "pand %17, %%mm5\n" "por %%mm7, %%mm3\n" - "movq (%2,%4), %%mm7\n" // L4 load lum2 - "por %%mm5, %%mm3\n" // - "psrlw $8, %%mm7\n" // L4 + "movq (%2,%4), %%mm7\n" /* L4 load lum2 */ + "por %%mm5, %%mm3\n" + "psrlw $8, %%mm7\n" /* L4 */ "movq %%mm4, %%mm5\n" "punpcklwd %%mm3, %%mm4\n" - "pmullw %15, %%mm7\n" // lum4 + "pmullw %15, %%mm7\n" /* lum4 */ "punpckhwd %%mm3, %%mm5\n" - "movq %%mm4, (%3)\n" // write row1 - "movq %%mm5, 8(%3)\n" // write row1 + "movq %%mm4, (%3)\n" /* write row1 */ + "movq %%mm5, 8(%3)\n" /* write row1 */ - "movq %%mm6, %%mm4\n" // Lum3 - "paddw %%mm0, %%mm6\n" // Lum3 +blue + "movq %%mm6, %%mm4\n" /* Lum3 */ + "paddw %%mm0, %%mm6\n" /* Lum3 +blue */ - "movq %%mm4, %%mm5\n" // Lum3 - "paddw %%mm1, %%mm4\n" // Lum3 +red - "paddw %%mm2, %%mm5\n" // Lum3 +green + "movq %%mm4, %%mm5\n" /* Lum3 */ + "paddw %%mm1, %%mm4\n" /* Lum3 +red */ + "paddw %%mm2, %%mm5\n" /* Lum3 +green */ "psraw $6, %%mm4\n" - "movq %%mm7, %%mm3\n" // Lum4 + "movq %%mm7, %%mm3\n" /* Lum4 */ "psraw $6, %%mm5\n" - "paddw %%mm0, %%mm7\n" // Lum4 +blue - "psraw $6, %%mm6\n" // Lum3 +blue - "movq %%mm3, %%mm0\n" // Lum4 + "paddw %%mm0, %%mm7\n" /* Lum4 +blue */ + "psraw $6, %%mm6\n" /* Lum3 +blue */ + "movq %%mm3, %%mm0\n" /* Lum4 */ "packuswb %%mm4, %%mm4\n" - "paddw %%mm1, %%mm3\n" // Lum4 +red + "paddw %%mm1, %%mm3\n" /* Lum4 +red */ "packuswb %%mm5, %%mm5\n" - "paddw %%mm2, %%mm0\n" // Lum4 +green + "paddw %%mm2, %%mm0\n" /* Lum4 +green */ "packuswb %%mm6, %%mm6\n" "punpcklbw %%mm4, %%mm4\n" "punpcklbw %%mm5, %%mm5\n" "punpcklbw %%mm6, %%mm6\n" - "psllw $3, %%mm5\n" // GREEN 3 + "psllw $3, %%mm5\n" /* GREEN 3 */ "pand %16, %%mm4\n" - "psraw $6, %%mm3\n" // psr 6 + "psraw $6, %%mm3\n" /* psr 6 */ "psraw $6, %%mm0\n" - "pand %16, %%mm6\n" // BLUE + "pand %16, %%mm6\n" /* BLUE */ "pand %17, %%mm5\n" - "psrlw $11, %%mm6\n" // BLUE 3 + "psrlw $11, %%mm6\n" /* BLUE 3 */ "por %%mm5, %%mm4\n" "psraw $6, %%mm7\n" "por %%mm6, %%mm4\n" @@ -383,8 +383,8 @@ void Color565DitherYV12MMX1X( int *colortab, Uint32 *rgb_2_pix, "punpcklbw %%mm0, %%mm0\n" "punpcklbw %%mm7, %%mm7\n" "pand %16, %%mm3\n" - "pand %16, %%mm7\n" // BLUE - "psllw $3, %%mm0\n" // GREEN 4 + "pand %16, %%mm7\n" /* BLUE */ + "psllw $3, %%mm0\n" /* GREEN 4 */ "psrlw $11, %%mm7\n" "pand %17, %%mm0\n" "por %%mm7, %%mm3\n" @@ -404,16 +404,16 @@ void Color565DitherYV12MMX1X( int *colortab, Uint32 *rgb_2_pix, "addl $4, %1\n" "cmpl %4, %6\n" "leal 16(%3), %3\n" - "leal 16(%5),%5\n" // row2+16 + "leal 16(%5),%5\n" /* row2+16 */ "jl 1b\n" - "addl %4, %2\n" // lum += cols - "addl %8, %3\n" // row1+= mod - "addl %8, %5\n" // row2+= mod - "movl $0, %6\n" // x=0 + "addl %4, %2\n" /* lum += cols */ + "addl %8, %3\n" /* row1+= mod */ + "addl %8, %5\n" /* row2+= mod */ + "movl $0, %6\n" /* x=0 */ "cmpl %7, %2\n" "jl 1b\n" - "addl $4, %%esp\n" // get rid of the stack slot we reserved. + "addl $4, %%esp\n" /* get rid of the stack slot we reserved. */ "emms\n" : : "m" (cr), "r"(cb),"r"(lum), diff --git a/src/render/SDL_yuv_sw.c b/src/render/SDL_yuv_sw.c index 9f04c21ca..1d7e024c2 100644 --- a/src/render/SDL_yuv_sw.c +++ b/src/render/SDL_yuv_sw.c @@ -26,17 +26,17 @@ * Copyright (c) 1995 The Regents of the University of California. * All rights reserved. - * + * * Permission to use, copy, modify, and distribute this software and its * documentation for any purpose, without fee, and without written agreement is * hereby granted, provided that the above copyright notice and the following * two paragraphs appear in all copies of this software. - * + * * IN NO EVENT SHALL THE UNIVERSITY OF CALIFORNIA BE LIABLE TO ANY PARTY FOR * DIRECT, INDIRECT, SPECIAL, INCIDENTAL, OR CONSEQUENTIAL DAMAGES ARISING OUT * OF THE USE OF THIS SOFTWARE AND ITS DOCUMENTATION, EVEN IF THE UNIVERSITY OF * CALIFORNIA HAS BEEN ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. - * + * * THE UNIVERSITY OF CALIFORNIA SPECIFICALLY DISCLAIMS ANY WARRANTIES, * INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY * AND FITNESS FOR A PARTICULAR PURPOSE. THE SOFTWARE PROVIDED HEREUNDER IS @@ -45,17 +45,17 @@ * Copyright (c) 1995 Erik Corry * All rights reserved. - * + * * Permission to use, copy, modify, and distribute this software and its * documentation for any purpose, without fee, and without written agreement is * hereby granted, provided that the above copyright notice and the following * two paragraphs appear in all copies of this software. - * + * * IN NO EVENT SHALL ERIK CORRY BE LIABLE TO ANY PARTY FOR DIRECT, INDIRECT, * SPECIAL, INCIDENTAL, OR CONSEQUENTIAL DAMAGES ARISING OUT OF THE USE OF * THIS SOFTWARE AND ITS DOCUMENTATION, EVEN IF ERIK CORRY HAS BEEN ADVISED * OF THE POSSIBILITY OF SUCH DAMAGE. - * + * * ERIK CORRY SPECIFICALLY DISCLAIMS ANY WARRANTIES, INCLUDING, BUT NOT * LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A * PARTICULAR PURPOSE. THE SOFTWARE PROVIDED HEREUNDER IS ON AN "AS IS" @@ -64,17 +64,17 @@ * Portions of this software Copyright (c) 1995 Brown University. * All rights reserved. - * + * * Permission to use, copy, modify, and distribute this software and its * documentation for any purpose, without fee, and without written agreement * is hereby granted, provided that the above copyright notice and the * following two paragraphs appear in all copies of this software. - * + * * IN NO EVENT SHALL BROWN UNIVERSITY BE LIABLE TO ANY PARTY FOR * DIRECT, INDIRECT, SPECIAL, INCIDENTAL, OR CONSEQUENTIAL DAMAGES ARISING OUT * OF THE USE OF THIS SOFTWARE AND ITS DOCUMENTATION, EVEN IF BROWN * UNIVERSITY HAS BEEN ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. - * + * * BROWN UNIVERSITY SPECIFICALLY DISCLAIMS ANY WARRANTIES, INCLUDING, BUT NOT * LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A * PARTICULAR PURPOSE. THE SOFTWARE PROVIDED HEREUNDER IS ON AN "AS IS" @@ -904,7 +904,7 @@ SDL_SW_SetupYUVDisplay(SDL_SW_YUVTexture * swdata, Uint32 target_format) g_2_pix_alloc = &swdata->rgb_2_pix[1 * 768]; b_2_pix_alloc = &swdata->rgb_2_pix[2 * 768]; - /* + /* * Set up entries 0-255 in rgb-to-pixel value tables. */ for (i = 0; i < 256; ++i) { @@ -922,7 +922,7 @@ SDL_SW_SetupYUVDisplay(SDL_SW_YUVTexture * swdata, Uint32 target_format) /* * If we have 16-bit output depth, then we double the value * in the top word. This means that we can write out both - * pixels in the pixel doubling mode with one op. It is + * pixels in the pixel doubling mode with one op. It is * harmless in the normal case as storing a 32-bit value * through a short pointer will lose the top bits anyway. */ diff --git a/src/render/direct3d/SDL_render_d3d.c b/src/render/direct3d/SDL_render_d3d.c index 55c313a6c..dea31f644 100644 --- a/src/render/direct3d/SDL_render_d3d.c +++ b/src/render/direct3d/SDL_render_d3d.c @@ -121,23 +121,23 @@ HRESULT WINAPI D3DXCreateMatrixStack(DWORD flags, LPD3DXMATRIXSTACK* ppstack); #endif #ifdef ASSEMBLE_SHADER -/////////////////////////////////////////////////////////////////////////// -// ID3DXBuffer: -// ------------ -// The buffer object is used by D3DX to return arbitrary size data. -// -// GetBufferPointer - -// Returns a pointer to the beginning of the buffer. -// -// GetBufferSize - -// Returns the size of the buffer, in bytes. -/////////////////////////////////////////////////////////////////////////// +/************************************************************************** + * ID3DXBuffer: + * ------------ + * The buffer object is used by D3DX to return arbitrary size data. + * + * GetBufferPointer - + * Returns a pointer to the beginning of the buffer. + * + * GetBufferSize - + * Returns the size of the buffer, in bytes. + **************************************************************************/ typedef interface ID3DXBuffer ID3DXBuffer; typedef interface ID3DXBuffer *LPD3DXBUFFER; -// {8BA5FB08-5195-40e2-AC58-0D989C3A0102} -DEFINE_GUID(IID_ID3DXBuffer, +/* {8BA5FB08-5195-40e2-AC58-0D989C3A0102} */ +DEFINE_GUID(IID_ID3DXBuffer, 0x8ba5fb08, 0x5195, 0x40e2, 0xac, 0x58, 0xd, 0x98, 0x9c, 0x3a, 0x1, 0x2); #undef INTERFACE @@ -149,12 +149,12 @@ typedef interface ID3DXBuffer { typedef const struct ID3DXBufferVtbl ID3DXBufferVtbl; const struct ID3DXBufferVtbl { - // IUnknown + /* IUnknown */ STDMETHOD(QueryInterface)(THIS_ REFIID iid, LPVOID *ppv) PURE; STDMETHOD_(ULONG, AddRef)(THIS) PURE; STDMETHOD_(ULONG, Release)(THIS) PURE; - // ID3DXBuffer + /* ID3DXBuffer */ STDMETHOD_(LPVOID, GetBufferPointer)(THIS) PURE; STDMETHOD_(DWORD, GetBufferSize)(THIS) PURE; }; @@ -444,7 +444,7 @@ D3D_CreateRenderer(SDL_Window * window, Uint32 flags) SDL_DisplayMode fullscreen_mode; D3DMATRIX matrix; int d3dxVersion; - char d3dxDLLFile[50]; + char d3dxDLLFile[50]; renderer = (SDL_Renderer *) SDL_calloc(1, sizeof(*renderer)); if (!renderer) { @@ -496,7 +496,7 @@ D3D_CreateRenderer(SDL_Window * window, Uint32 flags) } - + if (!data->d3d || !data->matrixStack) { SDL_free(renderer); SDL_free(data); @@ -548,14 +548,14 @@ D3D_CreateRenderer(SDL_Window * window, Uint32 flags) pparams.SwapEffect = D3DSWAPEFFECT_DISCARD; if (window_flags & SDL_WINDOW_FULLSCREEN) { - if ( ( window_flags & SDL_WINDOW_FULLSCREEN_DESKTOP ) == SDL_WINDOW_FULLSCREEN_DESKTOP ) { - pparams.Windowed = TRUE; - pparams.FullScreen_RefreshRateInHz = 0; - } else { + if ( ( window_flags & SDL_WINDOW_FULLSCREEN_DESKTOP ) == SDL_WINDOW_FULLSCREEN_DESKTOP ) { + pparams.Windowed = TRUE; + pparams.FullScreen_RefreshRateInHz = 0; + } else { pparams.Windowed = FALSE; pparams.FullScreen_RefreshRateInHz = fullscreen_mode.refresh_rate; - } + } } else { pparams.Windowed = TRUE; pparams.FullScreen_RefreshRateInHz = 0; @@ -1338,7 +1338,7 @@ D3D_RenderCopyEx(SDL_Renderer * renderer, SDL_Texture * texture, D3D_SetBlendMode(data, texture->blendMode); - // Rotate and translate + /* Rotate and translate */ ID3DXMatrixStack_Push(data->matrixStack); ID3DXMatrixStack_LoadIdentity(data->matrixStack); ID3DXMatrixStack_RotateYawPitchRoll(data->matrixStack, 0.0, 0.0, (float)(M_PI * (float) angle / 180.0f)); @@ -1491,7 +1491,7 @@ D3D_DestroyRenderer(SDL_Renderer * renderer) D3D_RenderData *data = (D3D_RenderData *) renderer->driverdata; if (data) { - // Release the render target + /* Release the render target */ if (data->defaultRenderTarget) { IDirect3DSurface9_Release(data->defaultRenderTarget); data->defaultRenderTarget = NULL; @@ -1500,7 +1500,7 @@ D3D_DestroyRenderer(SDL_Renderer * renderer) IDirect3DSurface9_Release(data->currentRenderTarget); data->currentRenderTarget = NULL; } - + if (data->device) { IDirect3DDevice9_Release(data->device); } diff --git a/src/render/opengl/SDL_render_gl.c b/src/render/opengl/SDL_render_gl.c index 3b0f01f15..73ec0a8f8 100644 --- a/src/render/opengl/SDL_render_gl.c +++ b/src/render/opengl/SDL_render_gl.c @@ -106,7 +106,7 @@ typedef struct Uint32 color; int blendMode; } current; - + SDL_bool GL_EXT_framebuffer_object_supported; GL_FBOList *framebuffers; @@ -119,7 +119,7 @@ typedef struct SDL_bool GL_ARB_multitexture_supported; PFNGLACTIVETEXTUREARBPROC glActiveTextureARB; GLint num_texture_units; - + PFNGLGENFRAMEBUFFERSEXTPROC glGenFramebuffersEXT; PFNGLDELETEFRAMEBUFFERSEXTPROC glDeleteFramebuffersEXT; PFNGLFRAMEBUFFERTEXTURE2DEXTPROC glFramebufferTexture2DEXT; @@ -147,7 +147,7 @@ typedef struct SDL_bool yuv; GLuint utexture; GLuint vtexture; - + GL_FBOList *fbo; } GL_TextureData; @@ -408,7 +408,7 @@ GL_CreateRenderer(SDL_Window * window, Uint32 flags) renderer->info.texture_formats[renderer->info.num_texture_formats++] = SDL_PIXELFORMAT_YV12; renderer->info.texture_formats[renderer->info.num_texture_formats++] = SDL_PIXELFORMAT_IYUV; } - + if (SDL_GL_ExtensionSupported("GL_EXT_framebuffer_object")) { data->GL_EXT_framebuffer_object_supported = SDL_TRUE; data->glGenFramebuffersEXT = (PFNGLGENFRAMEBUFFERSEXTPROC) @@ -527,7 +527,7 @@ GL_CreateTexture(SDL_Renderer * renderer, SDL_Texture * texture) } texture->driverdata = data; - + if (texture->access == SDL_TEXTUREACCESS_TARGET) { data->fbo = GL_GetFBO(renderdata, texture->w, texture->h); } else { @@ -702,7 +702,7 @@ GL_LockTexture(SDL_Renderer * renderer, SDL_Texture * texture, GL_TextureData *data = (GL_TextureData *) texture->driverdata; data->locked_rect = *rect; - *pixels = + *pixels = (void *) ((Uint8 *) data->pixels + rect->y * data->pitch + rect->x * SDL_BYTESPERPIXEL(texture->format)); *pitch = data->pitch; @@ -717,7 +717,7 @@ GL_UnlockTexture(SDL_Renderer * renderer, SDL_Texture * texture) void *pixels; rect = &data->locked_rect; - pixels = + pixels = (void *) ((Uint8 *) data->pixels + rect->y * data->pitch + rect->x * SDL_BYTESPERPIXEL(texture->format)); GL_UpdateTexture(renderer, texture, rect, pixels, data->pitch); @@ -726,12 +726,12 @@ GL_UnlockTexture(SDL_Renderer * renderer, SDL_Texture * texture) static int GL_SetRenderTarget(SDL_Renderer * renderer, SDL_Texture * texture) { - GL_RenderData *data = (GL_RenderData *) renderer->driverdata; + GL_RenderData *data = (GL_RenderData *) renderer->driverdata; GL_TextureData *texturedata; GLenum status; GL_ActivateRenderer(renderer); - + if (texture == NULL) { data->glBindFramebufferEXT(GL_FRAMEBUFFER_EXT, 0); return 0; @@ -914,7 +914,7 @@ GL_RenderDrawLines(SDL_Renderer * renderer, const SDL_FPoint * points, GL_SetDrawingState(renderer); - if (count > 2 && + if (count > 2 && points[0].x == points[count-1].x && points[0].y == points[count-1].y) { data->glBegin(GL_LINE_LOOP); /* GL_LINE_LOOP takes care of the final segment */ @@ -1125,11 +1125,11 @@ GL_RenderCopyEx(SDL_Renderer * renderer, SDL_Texture * texture, maxv = (GLfloat) (srcrect->y + srcrect->h) / texture->h; maxv *= texturedata->texh; - // Translate to flip, rotate, translate to position + /* Translate to flip, rotate, translate to position */ data->glPushMatrix(); - data->glTranslatef((GLfloat)dstrect->x + centerx, (GLfloat)dstrect->y + centery, (GLfloat)0.0); + data->glTranslatef((GLfloat)dstrect->x + centerx, (GLfloat)dstrect->y + centery, (GLfloat)0.0); data->glRotated(angle, (GLdouble)0.0, (GLdouble)0.0, (GLdouble)1.0); - + data->glBegin(GL_TRIANGLE_STRIP); data->glTexCoord2f(minu, minv); data->glVertex2f(minx, miny); @@ -1141,7 +1141,7 @@ GL_RenderCopyEx(SDL_Renderer * renderer, SDL_Texture * texture, data->glVertex2f(maxx, maxy); data->glEnd(); data->glPopMatrix(); - + data->glDisable(texturedata->type); GL_CheckError("", renderer); @@ -1303,7 +1303,7 @@ static int GL_UnbindTexture (SDL_Renderer * renderer, SDL_Texture *texture) { data->glActiveTextureARB(GL_TEXTURE0_ARB); } - + data->glDisable(texturedata->type); return 0; diff --git a/src/render/opengl/SDL_shaders_gl.c b/src/render/opengl/SDL_shaders_gl.c index 9b75032ef..1e6262191 100644 --- a/src/render/opengl/SDL_shaders_gl.c +++ b/src/render/opengl/SDL_shaders_gl.c @@ -216,7 +216,7 @@ CompileShaderProgram(GL_ShaderContext *ctx, int index, GL_ShaderData *data) /* Make sure we use the correct sampler type for our texture type */ if (ctx->GL_ARB_texture_rectangle_supported) { - frag_defines = + frag_defines = "#define sampler2D sampler2DRect\n" "#define texture2D texture2DRect\n"; } @@ -252,7 +252,7 @@ CompileShaderProgram(GL_ShaderContext *ctx, int index, GL_ShaderData *data) } } ctx->glUseProgramObjectARB(0); - + return (ctx->glGetError() == GL_NO_ERROR); } diff --git a/src/render/opengles/SDL_render_gles.c b/src/render/opengles/SDL_render_gles.c index 37e32bfe7..bd3eedfea 100644 --- a/src/render/opengles/SDL_render_gles.c +++ b/src/render/opengles/SDL_render_gles.c @@ -189,7 +189,7 @@ static int GLES_LoadFunctions(GLES_RenderData * data) if ( ! data->func ) { \ return SDL_SetError("Couldn't load GLES function %s: %s\n", #func, SDL_GetError()); \ } \ - } while ( 0 ); + } while ( 0 ); #endif /* _SDL_NOGETPROCADDR_ */ #include "SDL_glesfuncs.h" @@ -270,11 +270,11 @@ GLES_CreateRenderer(SDL_Window * window, Uint32 flags) GLES_RenderData *data; GLint value; Uint32 windowFlags; - + SDL_GL_SetAttribute(SDL_GL_CONTEXT_EGL, 1); SDL_GL_SetAttribute(SDL_GL_CONTEXT_MAJOR_VERSION, 1); SDL_GL_SetAttribute(SDL_GL_CONTEXT_MINOR_VERSION, 1); - + windowFlags = SDL_GetWindowFlags(window); if (!(windowFlags & SDL_WINDOW_OPENGL)) { if (SDL_RecreateWindow(window, windowFlags | SDL_WINDOW_OPENGL) < 0) { @@ -386,7 +386,7 @@ static void GLES_WindowEvent(SDL_Renderer * renderer, const SDL_WindowEvent *event) { GLES_RenderData *data = (GLES_RenderData *) renderer->driverdata; - + if (event->event == SDL_WINDOWEVENT_SIZE_CHANGED || event->event == SDL_WINDOWEVENT_SHOWN || event->event == SDL_WINDOWEVENT_HIDDEN) { @@ -765,7 +765,7 @@ GLES_RenderDrawLines(SDL_Renderer * renderer, const SDL_FPoint * points, GLES_SetDrawingState(renderer); data->glVertexPointer(2, GL_FLOAT, 0, points); - if (count > 2 && + if (count > 2 && points[0].x == points[count-1].x && points[0].y == points[count-1].y) { /* GL_LINE_LOOP takes care of the final segment */ --count; @@ -920,7 +920,7 @@ GLES_RenderCopyEx(SDL_Renderer * renderer, SDL_Texture * texture, GLfloat minx, miny, maxx, maxy; GLfloat minu, maxu, minv, maxv; GLfloat centerx, centery; - + GLES_ActivateRenderer(renderer); data->glEnable(GL_TEXTURE_2D); @@ -940,7 +940,7 @@ GLES_RenderCopyEx(SDL_Renderer * renderer, SDL_Texture * texture, centerx = center->x; centery = center->y; - // Rotate and translate + /* Rotate and translate */ data->glPushMatrix(); data->glTranslatef(dstrect->x + centerx, dstrect->y + centery, 0.0f); data->glRotatef((GLfloat)angle, 0.0f, 0.0f, 1.0f); diff --git a/src/render/opengles2/SDL_render_gles2.c b/src/render/opengles2/SDL_render_gles2.c index 0f74aeadc..3933100d6 100644 --- a/src/render/opengles2/SDL_render_gles2.c +++ b/src/render/opengles2/SDL_render_gles2.c @@ -1237,7 +1237,7 @@ GLES2_RenderCopy(SDL_Renderer *renderer, SDL_Texture *texture, const SDL_Rect *s break; } } - else sourceType = GLES2_IMAGESOURCE_TEXTURE_ABGR; // Texture formats match, use the non color mapping shader (even if the formats are not ABGR) + else sourceType = GLES2_IMAGESOURCE_TEXTURE_ABGR; /* Texture formats match, use the non color mapping shader (even if the formats are not ABGR) */ } else { switch (texture->format) @@ -1334,7 +1334,7 @@ GLES2_RenderCopyEx(SDL_Renderer *renderer, SDL_Texture *texture, const SDL_Rect GLfloat tmp; GLES2_ActivateRenderer(renderer); - + rdata->glEnableVertexAttribArray(GLES2_ATTRIBUTE_CENTER); rdata->glEnableVertexAttribArray(GLES2_ATTRIBUTE_ANGLE); fAngle[0] = fAngle[1] = fAngle[2] = fAngle[3] = (GLfloat)(360.0f - angle); @@ -1403,7 +1403,7 @@ GLES2_RenderCopyEx(SDL_Renderer *renderer, SDL_Texture *texture, const SDL_Rect break; } } - else sourceType = GLES2_IMAGESOURCE_TEXTURE_ABGR; // Texture formats match, use the non color mapping shader (even if the formats are not ABGR) + else sourceType = GLES2_IMAGESOURCE_TEXTURE_ABGR; /* Texture formats match, use the non color mapping shader (even if the formats are not ABGR) */ } else { switch (texture->format) @@ -1476,7 +1476,7 @@ GLES2_RenderCopyEx(SDL_Renderer *renderer, SDL_Texture *texture, const SDL_Rect vertices[1] = vertices[3] = vertices[5]; vertices[5] = vertices[7] = tmp; } - + rdata->glVertexAttribPointer(GLES2_ATTRIBUTE_ANGLE, 1, GL_FLOAT, GL_FALSE, 0, &fAngle); rdata->glVertexAttribPointer(GLES2_ATTRIBUTE_CENTER, 2, GL_FLOAT, GL_FALSE, 0, translate); rdata->glVertexAttribPointer(GLES2_ATTRIBUTE_POSITION, 2, GL_FLOAT, GL_FALSE, 0, vertices); diff --git a/src/render/opengles2/SDL_shaders_gles2.c b/src/render/opengles2/SDL_shaders_gles2.c index 3d3a2416c..fb6921fd0 100644 --- a/src/render/opengles2/SDL_shaders_gles2.c +++ b/src/render/opengles2/SDL_shaders_gles2.c @@ -75,7 +75,7 @@ static const Uint8 GLES2_FragmentSrc_TextureABGRSrc_[] = " \ } \ "; -// ARGB to ABGR conversion +/* ARGB to ABGR conversion */ static const Uint8 GLES2_FragmentSrc_TextureARGBSrc_[] = " \ precision mediump float; \ uniform sampler2D u_texture; \ @@ -92,7 +92,7 @@ static const Uint8 GLES2_FragmentSrc_TextureARGBSrc_[] = " \ } \ "; -// RGB to ABGR conversion +/* RGB to ABGR conversion */ static const Uint8 GLES2_FragmentSrc_TextureRGBSrc_[] = " \ precision mediump float; \ uniform sampler2D u_texture; \ @@ -110,7 +110,7 @@ static const Uint8 GLES2_FragmentSrc_TextureRGBSrc_[] = " \ } \ "; -// BGR to ABGR conversion +/* BGR to ABGR conversion */ static const Uint8 GLES2_FragmentSrc_TextureBGRSrc_[] = " \ precision mediump float; \ uniform sampler2D u_texture; \ @@ -744,7 +744,7 @@ const GLES2_Shader *GLES2_GetShader(GLES2_ShaderType type, SDL_BlendMode blendMo default: return NULL; } - + case GLES2_SHADER_FRAGMENT_TEXTURE_RGB_SRC: switch (blendMode) { @@ -759,7 +759,7 @@ const GLES2_Shader *GLES2_GetShader(GLES2_ShaderType type, SDL_BlendMode blendMo default: return NULL; } - + case GLES2_SHADER_FRAGMENT_TEXTURE_BGR_SRC: switch (blendMode) { @@ -774,7 +774,7 @@ const GLES2_Shader *GLES2_GetShader(GLES2_ShaderType type, SDL_BlendMode blendMo default: return NULL; } - + default: return NULL; } diff --git a/src/render/psp/SDL_render_psp.c b/src/render/psp/SDL_render_psp.c index 4d8f33304..7ea536d14 100644 --- a/src/render/psp/SDL_render_psp.c +++ b/src/render/psp/SDL_render_psp.c @@ -20,7 +20,7 @@ */ #include "SDL_config.h" -#if SDL_VIDEO_RENDER_PSP +#if SDL_VIDEO_RENDER_PSP #include "SDL_hints.h" #include "../SDL_sysrender.h" @@ -93,94 +93,94 @@ SDL_RenderDriver PSP_RenderDriver = { }; */ SDL_RenderDriver PSP_RenderDriver = { - .CreateRenderer = PSP_CreateRenderer, + .CreateRenderer = PSP_CreateRenderer, .info = { - .name = "PSP", - .flags = SDL_RENDERER_ACCELERATED | SDL_RENDERER_PRESENTVSYNC | SDL_RENDERER_TARGETTEXTURE, - .num_texture_formats = 4, - .texture_formats = { [0] = SDL_PIXELFORMAT_BGR565, - [1] = SDL_PIXELFORMAT_ABGR1555, - [2] = SDL_PIXELFORMAT_ABGR4444, - [3] = SDL_PIXELFORMAT_ABGR8888, - }, - .max_texture_width = 512, - .max_texture_height = 512, + .name = "PSP", + .flags = SDL_RENDERER_ACCELERATED | SDL_RENDERER_PRESENTVSYNC | SDL_RENDERER_TARGETTEXTURE, + .num_texture_formats = 4, + .texture_formats = { [0] = SDL_PIXELFORMAT_BGR565, + [1] = SDL_PIXELFORMAT_ABGR1555, + [2] = SDL_PIXELFORMAT_ABGR4444, + [3] = SDL_PIXELFORMAT_ABGR8888, + }, + .max_texture_width = 512, + .max_texture_height = 512, } }; -#define PSP_SCREEN_WIDTH 480 -#define PSP_SCREEN_HEIGHT 272 +#define PSP_SCREEN_WIDTH 480 +#define PSP_SCREEN_HEIGHT 272 -#define PSP_FRAME_BUFFER_WIDTH 512 -#define PSP_FRAME_BUFFER_SIZE (PSP_FRAME_BUFFER_WIDTH*PSP_SCREEN_HEIGHT) +#define PSP_FRAME_BUFFER_WIDTH 512 +#define PSP_FRAME_BUFFER_SIZE (PSP_FRAME_BUFFER_WIDTH*PSP_SCREEN_HEIGHT) static unsigned int __attribute__((aligned(16))) DisplayList[262144]; - -#define COL5650(r,g,b,a) ((r>>3) | ((g>>2)<<5) | ((b>>3)<<11)) -#define COL5551(r,g,b,a) ((r>>3) | ((g>>3)<<5) | ((b>>3)<<10) | (a>0?0x7000:0)) -#define COL4444(r,g,b,a) ((r>>4) | ((g>>4)<<4) | ((b>>4)<<8) | ((a>>4)<<12)) -#define COL8888(r,g,b,a) ((r) | ((g)<<8) | ((b)<<16) | ((a)<<24)) - + +#define COL5650(r,g,b,a) ((r>>3) | ((g>>2)<<5) | ((b>>3)<<11)) +#define COL5551(r,g,b,a) ((r>>3) | ((g>>3)<<5) | ((b>>3)<<10) | (a>0?0x7000:0)) +#define COL4444(r,g,b,a) ((r>>4) | ((g>>4)<<4) | ((b>>4)<<8) | ((a>>4)<<12)) +#define COL8888(r,g,b,a) ((r) | ((g)<<8) | ((b)<<16) | ((a)<<24)) + typedef struct { - void* frontbuffer ; - void* backbuffer ; - SDL_bool initialized ; - SDL_bool displayListAvail ; - unsigned int psm ; - unsigned int bpp ; - - SDL_bool vsync; - unsigned int currentColor; - int currentBlendMode; - + void* frontbuffer ; + void* backbuffer ; + SDL_bool initialized ; + SDL_bool displayListAvail ; + unsigned int psm ; + unsigned int bpp ; + + SDL_bool vsync; + unsigned int currentColor; + int currentBlendMode; + } PSP_RenderData; typedef struct { - void *data; /**< Image data. */ - unsigned int size; /**< Size of data in bytes. */ - unsigned int width; /**< Image width. */ - unsigned int height; /**< Image height. */ - unsigned int textureWidth; /**< Texture width (power of two). */ - unsigned int textureHeight; /**< Texture height (power of two). */ - unsigned int bits; /**< Image bits per pixel. */ - unsigned int format; /**< Image format - one of ::pgePixelFormat. */ - unsigned int pitch; - SDL_bool swizzled; /**< Is image swizzled. */ + void *data; /**< Image data. */ + unsigned int size; /**< Size of data in bytes. */ + unsigned int width; /**< Image width. */ + unsigned int height; /**< Image height. */ + unsigned int textureWidth; /**< Texture width (power of two). */ + unsigned int textureHeight; /**< Texture height (power of two). */ + unsigned int bits; /**< Image bits per pixel. */ + unsigned int format; /**< Image format - one of ::pgePixelFormat. */ + unsigned int pitch; + SDL_bool swizzled; /**< Is image swizzled. */ } PSP_TextureData; typedef struct -{ - float x, y, z; +{ + float x, y, z; } VertV; typedef struct { - float u, v; - float x, y, z; - + float u, v; + float x, y, z; + } VertTV; -// Return next power of 2 -static int +/* Return next power of 2 */ +static int TextureNextPow2(unsigned int w) { - if(w == 0) - return 0; + if(w == 0) + return 0; - unsigned int n = 2; + unsigned int n = 2; - while(w > n) - n <<= 1; + while(w > n) + n <<= 1; - return n; + return n; } @@ -190,9 +190,9 @@ GetScaleQuality(void) const char *hint = SDL_GetHint(SDL_HINT_RENDER_SCALE_QUALITY); if (!hint || *hint == '0' || SDL_strcasecmp(hint, "nearest") == 0) { - return GU_NEAREST; // GU_NEAREST good for tile-map + return GU_NEAREST; /* GU_NEAREST good for tile-map */ } else { - return GU_LINEAR; // GU_LINEAR good for scaling + return GU_LINEAR; /* GU_LINEAR good for scaling */ } } @@ -207,133 +207,133 @@ PixelFormatToPSPFMT(Uint32 format) case SDL_PIXELFORMAT_ABGR4444: return GU_PSM_4444; case SDL_PIXELFORMAT_ABGR8888: - return GU_PSM_8888; - default: + return GU_PSM_8888; + default: return GU_PSM_8888; } } -void +void StartDrawing(SDL_Renderer * renderer) -{ - PSP_RenderData *data = (PSP_RenderData *) renderer->driverdata; - if(data->displayListAvail) - return; +{ + PSP_RenderData *data = (PSP_RenderData *) renderer->driverdata; + if(data->displayListAvail) + return; - sceGuStart(GU_DIRECT, DisplayList); - data->displayListAvail = SDL_TRUE; + sceGuStart(GU_DIRECT, DisplayList); + data->displayListAvail = SDL_TRUE; } -int +int TextureSwizzle(PSP_TextureData *psp_texture) { - if(psp_texture->swizzled) - return 1; - - int bytewidth = psp_texture->textureWidth*(psp_texture->bits>>3); - int height = psp_texture->size / bytewidth; + if(psp_texture->swizzled) + return 1; - int rowblocks = (bytewidth>>4); - int rowblocksadd = (rowblocks-1)<<7; - unsigned int blockaddress = 0; - unsigned int *src = (unsigned int*) psp_texture->data; + int bytewidth = psp_texture->textureWidth*(psp_texture->bits>>3); + int height = psp_texture->size / bytewidth; - unsigned char *data = NULL; - data = malloc(psp_texture->size); + int rowblocks = (bytewidth>>4); + int rowblocksadd = (rowblocks-1)<<7; + unsigned int blockaddress = 0; + unsigned int *src = (unsigned int*) psp_texture->data; - int j; + unsigned char *data = NULL; + data = malloc(psp_texture->size); - for(j = 0; j < height; j++, blockaddress += 16) - { - unsigned int *block; + int j; - block = (unsigned int*)&data[blockaddress]; + for(j = 0; j < height; j++, blockaddress += 16) + { + unsigned int *block; - int i; + block = (unsigned int*)&data[blockaddress]; - for(i = 0; i < rowblocks; i++) - { - *block++ = *src++; - *block++ = *src++; - *block++ = *src++; - *block++ = *src++; - block += 28; - } + int i; - if((j & 0x7) == 0x7) - blockaddress += rowblocksadd; - } + for(i = 0; i < rowblocks; i++) + { + *block++ = *src++; + *block++ = *src++; + *block++ = *src++; + *block++ = *src++; + block += 28; + } - free(psp_texture->data); - psp_texture->data = data; - psp_texture->swizzled = SDL_TRUE; + if((j & 0x7) == 0x7) + blockaddress += rowblocksadd; + } - return 1; + free(psp_texture->data); + psp_texture->data = data; + psp_texture->swizzled = SDL_TRUE; + + return 1; } int TextureUnswizzle(PSP_TextureData *psp_texture) { - if(!psp_texture->swizzled) - return 1; - - int blockx, blocky; - - int bytewidth = psp_texture->textureWidth*(psp_texture->bits>>3); - int height = psp_texture->size / bytewidth; - - int widthblocks = bytewidth/16; - int heightblocks = height/8; - - int dstpitch = (bytewidth - 16)/4; - int dstrow = bytewidth * 8; + if(!psp_texture->swizzled) + return 1; - unsigned int *src = (unsigned int*) psp_texture->data; + int blockx, blocky; - unsigned char *data = NULL; - - data = malloc(psp_texture->size); + int bytewidth = psp_texture->textureWidth*(psp_texture->bits>>3); + int height = psp_texture->size / bytewidth; - if(!data) - return 0; - - sceKernelDcacheWritebackAll(); + int widthblocks = bytewidth/16; + int heightblocks = height/8; - int j; - - unsigned char *ydst = (unsigned char *)data; + int dstpitch = (bytewidth - 16)/4; + int dstrow = bytewidth * 8; - for(blocky = 0; blocky < heightblocks; ++blocky) - { - unsigned char *xdst = ydst; - - for(blockx = 0; blockx < widthblocks; ++blockx) - { - unsigned int *block; + unsigned int *src = (unsigned int*) psp_texture->data; - block = (unsigned int*)xdst; + unsigned char *data = NULL; - for(j = 0; j < 8; ++j) - { - *(block++) = *(src++); - *(block++) = *(src++); - *(block++) = *(src++); - *(block++) = *(src++); - block += dstpitch; - } + data = malloc(psp_texture->size); - xdst += 16; - } - - ydst += dstrow; - } + if(!data) + return 0; - free(psp_texture->data); - - psp_texture->data = data; + sceKernelDcacheWritebackAll(); - psp_texture->swizzled = SDL_FALSE; + int j; - return 1; + unsigned char *ydst = (unsigned char *)data; + + for(blocky = 0; blocky < heightblocks; ++blocky) + { + unsigned char *xdst = ydst; + + for(blockx = 0; blockx < widthblocks; ++blockx) + { + unsigned int *block; + + block = (unsigned int*)xdst; + + for(j = 0; j < 8; ++j) + { + *(block++) = *(src++); + *(block++) = *(src++); + *(block++) = *(src++); + *(block++) = *(src++); + block += dstpitch; + } + + xdst += 16; + } + + ydst += dstrow; + } + + free(psp_texture->data); + + psp_texture->data = data; + + psp_texture->swizzled = SDL_FALSE; + + return 1; } SDL_Renderer * @@ -342,7 +342,7 @@ PSP_CreateRenderer(SDL_Window * window, Uint32 flags) SDL_Renderer *renderer; PSP_RenderData *data; - int pixelformat; + int pixelformat; renderer = (SDL_Renderer *) SDL_calloc(1, sizeof(*renderer)); if (!renderer) { SDL_OutOfMemory(); @@ -355,8 +355,8 @@ PSP_CreateRenderer(SDL_Window * window, Uint32 flags) SDL_OutOfMemory(); return NULL; } - - + + renderer->WindowEvent = PSP_WindowEvent; renderer->CreateTexture = PSP_CreateTexture; renderer->UpdateTexture = PSP_UpdateTexture; @@ -378,73 +378,73 @@ PSP_CreateRenderer(SDL_Window * window, Uint32 flags) renderer->info.flags = SDL_RENDERER_ACCELERATED; renderer->driverdata = data; renderer->window = window; - - if (data->initialized != SDL_FALSE) - return 0; - data->initialized = SDL_TRUE; - + + if (data->initialized != SDL_FALSE) + return 0; + data->initialized = SDL_TRUE; + if (flags & SDL_RENDERER_PRESENTVSYNC) { data->vsync = SDL_TRUE; } else { data->vsync = SDL_FALSE; } - - pixelformat=PixelFormatToPSPFMT(SDL_GetWindowPixelFormat(window)); - switch(pixelformat) - { - case GU_PSM_4444: - case GU_PSM_5650: - case GU_PSM_5551: - data->frontbuffer = (unsigned int *)(PSP_FRAME_BUFFER_SIZE<<1); - data->backbuffer = (unsigned int *)(0); - data->bpp = 2; - data->psm = pixelformat; - break; - default: - data->frontbuffer = (unsigned int *)(PSP_FRAME_BUFFER_SIZE<<2); - data->backbuffer = (unsigned int *)(0); - data->bpp = 4; - data->psm = GU_PSM_8888; - break; - } - - sceGuInit(); - // setup GU - sceGuStart(GU_DIRECT, DisplayList); - sceGuDrawBuffer(data->psm, data->frontbuffer, PSP_FRAME_BUFFER_WIDTH); - sceGuDispBuffer(PSP_SCREEN_WIDTH, PSP_SCREEN_HEIGHT, data->backbuffer, PSP_FRAME_BUFFER_WIDTH); + + pixelformat=PixelFormatToPSPFMT(SDL_GetWindowPixelFormat(window)); + switch(pixelformat) + { + case GU_PSM_4444: + case GU_PSM_5650: + case GU_PSM_5551: + data->frontbuffer = (unsigned int *)(PSP_FRAME_BUFFER_SIZE<<1); + data->backbuffer = (unsigned int *)(0); + data->bpp = 2; + data->psm = pixelformat; + break; + default: + data->frontbuffer = (unsigned int *)(PSP_FRAME_BUFFER_SIZE<<2); + data->backbuffer = (unsigned int *)(0); + data->bpp = 4; + data->psm = GU_PSM_8888; + break; + } + + sceGuInit(); + /* setup GU */ + sceGuStart(GU_DIRECT, DisplayList); + sceGuDrawBuffer(data->psm, data->frontbuffer, PSP_FRAME_BUFFER_WIDTH); + sceGuDispBuffer(PSP_SCREEN_WIDTH, PSP_SCREEN_HEIGHT, data->backbuffer, PSP_FRAME_BUFFER_WIDTH); - sceGuOffset(2048 - (PSP_SCREEN_WIDTH>>1), 2048 - (PSP_SCREEN_HEIGHT>>1)); - sceGuViewport(2048, 2048, PSP_SCREEN_WIDTH, PSP_SCREEN_HEIGHT); + sceGuOffset(2048 - (PSP_SCREEN_WIDTH>>1), 2048 - (PSP_SCREEN_HEIGHT>>1)); + sceGuViewport(2048, 2048, PSP_SCREEN_WIDTH, PSP_SCREEN_HEIGHT); data->frontbuffer = vabsptr(data->frontbuffer); data->backbuffer = vabsptr(data->backbuffer); - - // Scissoring - sceGuScissor(0, 0, PSP_SCREEN_WIDTH, PSP_SCREEN_HEIGHT); - sceGuEnable(GU_SCISSOR_TEST); - // Backface culling - sceGuFrontFace(GU_CCW); - sceGuEnable(GU_CULL_FACE); - - // Texturing - sceGuEnable(GU_TEXTURE_2D); - sceGuShadeModel(GU_SMOOTH); - sceGuTexWrap(GU_REPEAT, GU_REPEAT); - - // Blending - sceGuEnable(GU_BLEND); - sceGuBlendFunc(GU_ADD, GU_SRC_ALPHA, GU_ONE_MINUS_SRC_ALPHA, 0, 0); + /* Scissoring */ + sceGuScissor(0, 0, PSP_SCREEN_WIDTH, PSP_SCREEN_HEIGHT); + sceGuEnable(GU_SCISSOR_TEST); + + /* Backface culling */ + sceGuFrontFace(GU_CCW); + sceGuEnable(GU_CULL_FACE); + + /* Texturing */ + sceGuEnable(GU_TEXTURE_2D); + sceGuShadeModel(GU_SMOOTH); + sceGuTexWrap(GU_REPEAT, GU_REPEAT); + + /* Blending */ + sceGuEnable(GU_BLEND); + sceGuBlendFunc(GU_ADD, GU_SRC_ALPHA, GU_ONE_MINUS_SRC_ALPHA, 0, 0); + + sceGuTexFilter(GU_LINEAR,GU_LINEAR); + + sceGuFinish(); + sceGuSync(0,0); + sceDisplayWaitVblankStartCB(); + sceGuDisplay(GU_TRUE); - sceGuTexFilter(GU_LINEAR,GU_LINEAR); - - sceGuFinish(); - sceGuSync(0,0); - sceDisplayWaitVblankStartCB(); - sceGuDisplay(GU_TRUE); - return renderer; } @@ -458,69 +458,69 @@ PSP_WindowEvent(SDL_Renderer * renderer, const SDL_WindowEvent *event) static int PSP_CreateTexture(SDL_Renderer * renderer, SDL_Texture * texture) { -// PSP_RenderData *renderdata = (PSP_RenderData *) renderer->driverdata; - PSP_TextureData* psp_texture = (PSP_TextureData*) SDL_calloc(1, sizeof(*psp_texture));; - - if(!psp_texture) - return -1; +// PSP_RenderData *renderdata = (PSP_RenderData *) renderer->driverdata; + PSP_TextureData* psp_texture = (PSP_TextureData*) SDL_calloc(1, sizeof(*psp_texture));; - psp_texture->swizzled = SDL_FALSE; - psp_texture->width = texture->w; - psp_texture->height = texture->h; - psp_texture->textureHeight = TextureNextPow2(texture->h); - psp_texture->textureWidth = TextureNextPow2(texture->w); - psp_texture->format = PixelFormatToPSPFMT(texture->format); + if(!psp_texture) + return -1; - switch(psp_texture->format) - { - case GU_PSM_5650: - case GU_PSM_5551: - case GU_PSM_4444: - psp_texture->bits = 16; - break; - - case GU_PSM_8888: - psp_texture->bits = 32; - break; - - default: - return -1; - } + psp_texture->swizzled = SDL_FALSE; + psp_texture->width = texture->w; + psp_texture->height = texture->h; + psp_texture->textureHeight = TextureNextPow2(texture->h); + psp_texture->textureWidth = TextureNextPow2(texture->w); + psp_texture->format = PixelFormatToPSPFMT(texture->format); - psp_texture->pitch = psp_texture->textureWidth * SDL_BYTESPERPIXEL(texture->format); - psp_texture->size = psp_texture->textureHeight*psp_texture->pitch; - psp_texture->data = SDL_calloc(1, psp_texture->size); - - if(!psp_texture->data) - { - SDL_free(psp_texture); - return SDL_OutOfMemory(); - } + switch(psp_texture->format) + { + case GU_PSM_5650: + case GU_PSM_5551: + case GU_PSM_4444: + psp_texture->bits = 16; + break; + + case GU_PSM_8888: + psp_texture->bits = 32; + break; + + default: + return -1; + } + + psp_texture->pitch = psp_texture->textureWidth * SDL_BYTESPERPIXEL(texture->format); + psp_texture->size = psp_texture->textureHeight*psp_texture->pitch; + psp_texture->data = SDL_calloc(1, psp_texture->size); + + if(!psp_texture->data) + { + SDL_free(psp_texture); + return SDL_OutOfMemory(); + } texture->driverdata = psp_texture; - + return 0; } -void +void TextureActivate(SDL_Texture * texture) -{ - PSP_TextureData *psp_texture = (PSP_TextureData *) texture->driverdata; - int scaleMode = GetScaleQuality(); - - // Swizzling is useless with small textures. +{ + PSP_TextureData *psp_texture = (PSP_TextureData *) texture->driverdata; + int scaleMode = GetScaleQuality(); + + /* Swizzling is useless with small textures. */ if (texture->w >= 16 || texture->h >= 16) { - TextureSwizzle(psp_texture); + TextureSwizzle(psp_texture); } - - sceGuEnable(GU_TEXTURE_2D); - sceGuTexWrap(GU_REPEAT, GU_REPEAT); - sceGuTexMode(psp_texture->format, 0, 0, psp_texture->swizzled); - sceGuTexFilter(scaleMode, scaleMode); // GU_NEAREST good for tile-map - // GU_LINEAR good for scaling - sceGuTexImage(0, psp_texture->textureWidth, psp_texture->textureHeight, psp_texture->textureWidth, psp_texture->data); - sceGuTexFunc(GU_TFX_REPLACE, GU_TCC_RGBA); + + sceGuEnable(GU_TEXTURE_2D); + sceGuTexWrap(GU_REPEAT, GU_REPEAT); + sceGuTexMode(psp_texture->format, 0, 0, psp_texture->swizzled); + sceGuTexFilter(scaleMode, scaleMode); /* GU_NEAREST good for tile-map */ + /* GU_LINEAR good for scaling */ + sceGuTexImage(0, psp_texture->textureWidth, psp_texture->textureHeight, psp_texture->textureWidth, psp_texture->data); + sceGuTexFunc(GU_TFX_REPLACE, GU_TCC_RGBA); } @@ -528,12 +528,12 @@ static int PSP_UpdateTexture(SDL_Renderer * renderer, SDL_Texture * texture, const SDL_Rect * rect, const void *pixels, int pitch) { -// PSP_TextureData *psp_texture = (PSP_TextureData *) texture->driverdata; +// PSP_TextureData *psp_texture = (PSP_TextureData *) texture->driverdata; const Uint8 *src; Uint8 *dst; int row, length,dpitch; src = pixels; - + PSP_LockTexture(renderer, texture,rect,(void **)&dst, &dpitch); length = rect->w * SDL_BYTESPERPIXEL(texture->format); if (length == pitch && length == dpitch) { @@ -545,8 +545,8 @@ PSP_UpdateTexture(SDL_Renderer * renderer, SDL_Texture * texture, dst += dpitch; } } - - sceKernelDcacheWritebackAll(); + + sceKernelDcacheWritebackAll(); return 0; } @@ -554,7 +554,7 @@ static int PSP_LockTexture(SDL_Renderer * renderer, SDL_Texture * texture, const SDL_Rect * rect, void **pixels, int *pitch) { - PSP_TextureData *psp_texture = (PSP_TextureData *) texture->driverdata; + PSP_TextureData *psp_texture = (PSP_TextureData *) texture->driverdata; *pixels = (void *) ((Uint8 *) psp_texture->data + rect->y * psp_texture->pitch + @@ -566,7 +566,7 @@ PSP_LockTexture(SDL_Renderer * renderer, SDL_Texture * texture, static void PSP_UnlockTexture(SDL_Renderer * renderer, SDL_Texture * texture) { - PSP_TextureData *psp_texture = (PSP_TextureData *) texture->driverdata; + PSP_TextureData *psp_texture = (PSP_TextureData *) texture->driverdata; SDL_Rect rect; /* We do whole texture updates, at least for now */ @@ -595,27 +595,27 @@ PSP_UpdateViewport(SDL_Renderer * renderer) static void PSP_SetBlendMode(SDL_Renderer * renderer, int blendMode) { - PSP_RenderData *data = (PSP_RenderData *) renderer->driverdata; + PSP_RenderData *data = (PSP_RenderData *) renderer->driverdata; if (blendMode != data-> currentBlendMode) { switch (blendMode) { case SDL_BLENDMODE_NONE: - sceGuTexFunc(GU_TFX_REPLACE, GU_TCC_RGBA); - sceGuDisable(GU_BLEND); + sceGuTexFunc(GU_TFX_REPLACE, GU_TCC_RGBA); + sceGuDisable(GU_BLEND); break; case SDL_BLENDMODE_BLEND: - sceGuTexFunc(GU_TFX_MODULATE , GU_TCC_RGBA); - sceGuEnable(GU_BLEND); - sceGuBlendFunc(GU_ADD, GU_SRC_ALPHA, GU_ONE_MINUS_SRC_ALPHA, 0, 0 ); + sceGuTexFunc(GU_TFX_MODULATE , GU_TCC_RGBA); + sceGuEnable(GU_BLEND); + sceGuBlendFunc(GU_ADD, GU_SRC_ALPHA, GU_ONE_MINUS_SRC_ALPHA, 0, 0 ); break; case SDL_BLENDMODE_ADD: - sceGuTexFunc(GU_TFX_MODULATE , GU_TCC_RGBA); - sceGuEnable(GU_BLEND); - sceGuBlendFunc(GU_ADD, GU_SRC_ALPHA, GU_FIX, 0, 0x00FFFFFF ); + sceGuTexFunc(GU_TFX_MODULATE , GU_TCC_RGBA); + sceGuEnable(GU_BLEND); + sceGuBlendFunc(GU_ADD, GU_SRC_ALPHA, GU_FIX, 0, 0x00FFFFFF ); break; case SDL_BLENDMODE_MOD: - sceGuTexFunc(GU_TFX_MODULATE , GU_TCC_RGBA); - sceGuEnable(GU_BLEND); - sceGuBlendFunc( GU_ADD, GU_FIX, GU_SRC_COLOR, 0, 0); + sceGuTexFunc(GU_TFX_MODULATE , GU_TCC_RGBA); + sceGuEnable(GU_BLEND); + sceGuBlendFunc( GU_ADD, GU_FIX, GU_SRC_COLOR, 0, 0); break; } data->currentBlendMode = blendMode; @@ -626,13 +626,13 @@ PSP_SetBlendMode(SDL_Renderer * renderer, int blendMode) static int PSP_RenderClear(SDL_Renderer * renderer) -{ - //start list - StartDrawing(renderer); - int color = renderer->a << 24 | renderer->b << 16 | renderer->g << 8 | renderer->r; - sceGuClearColor(color); - sceGuClearDepth(0); - sceGuClear(GU_COLOR_BUFFER_BIT|GU_DEPTH_BUFFER_BIT|GU_FAST_CLEAR_BIT); +{ + /* start list */ + StartDrawing(renderer); + int color = renderer->a << 24 | renderer->b << 16 | renderer->g << 8 | renderer->r; + sceGuClearColor(color); + sceGuClearDepth(0); + sceGuClear(GU_COLOR_BUFFER_BIT|GU_DEPTH_BUFFER_BIT|GU_FAST_CLEAR_BIT); return 0; } @@ -641,22 +641,22 @@ static int PSP_RenderDrawPoints(SDL_Renderer * renderer, const SDL_FPoint * points, int count) { - int color = renderer->a << 24 | renderer->b << 16 | renderer->g << 8 | renderer->r; - int i; - StartDrawing(renderer); - VertV* vertices = (VertV*)sceGuGetMemory(count*sizeof(VertV)); - - for (i = 0; i < count; ++i) { - vertices[i].x = points[i].x; - vertices[i].y = points[i].y; - vertices[i].z = 0.0f; - } - sceGuDisable(GU_TEXTURE_2D); - sceGuColor(color); - sceGuShadeModel(GU_FLAT); - sceGuDrawArray(GU_POINTS, GU_VERTEX_32BITF|GU_TRANSFORM_2D, count, 0, vertices); - sceGuShadeModel(GU_SMOOTH); - sceGuEnable(GU_TEXTURE_2D); + int color = renderer->a << 24 | renderer->b << 16 | renderer->g << 8 | renderer->r; + int i; + StartDrawing(renderer); + VertV* vertices = (VertV*)sceGuGetMemory(count*sizeof(VertV)); + + for (i = 0; i < count; ++i) { + vertices[i].x = points[i].x; + vertices[i].y = points[i].y; + vertices[i].z = 0.0f; + } + sceGuDisable(GU_TEXTURE_2D); + sceGuColor(color); + sceGuShadeModel(GU_FLAT); + sceGuDrawArray(GU_POINTS, GU_VERTEX_32BITF|GU_TRANSFORM_2D, count, 0, vertices); + sceGuShadeModel(GU_SMOOTH); + sceGuEnable(GU_TEXTURE_2D); return 0; } @@ -665,24 +665,24 @@ static int PSP_RenderDrawLines(SDL_Renderer * renderer, const SDL_FPoint * points, int count) { - int color = renderer->a << 24 | renderer->b << 16 | renderer->g << 8 | renderer->r; - int i; - StartDrawing(renderer); - VertV* vertices = (VertV*)sceGuGetMemory(count*sizeof(VertV)); - - for (i = 0; i < count; ++i) { - vertices[i].x = points[i].x; - vertices[i].y = points[i].y; - vertices[i].z = 0.0f; - } + int color = renderer->a << 24 | renderer->b << 16 | renderer->g << 8 | renderer->r; + int i; + StartDrawing(renderer); + VertV* vertices = (VertV*)sceGuGetMemory(count*sizeof(VertV)); + + for (i = 0; i < count; ++i) { + vertices[i].x = points[i].x; + vertices[i].y = points[i].y; + vertices[i].z = 0.0f; + } + + sceGuDisable(GU_TEXTURE_2D); + sceGuColor(color); + sceGuShadeModel(GU_FLAT); + sceGuDrawArray(GU_LINE_STRIP, GU_VERTEX_32BITF|GU_TRANSFORM_2D, count, 0, vertices); + sceGuShadeModel(GU_SMOOTH); + sceGuEnable(GU_TEXTURE_2D); - sceGuDisable(GU_TEXTURE_2D); - sceGuColor(color); - sceGuShadeModel(GU_FLAT); - sceGuDrawArray(GU_LINE_STRIP, GU_VERTEX_32BITF|GU_TRANSFORM_2D, count, 0, vertices); - sceGuShadeModel(GU_SMOOTH); - sceGuEnable(GU_TEXTURE_2D); - return 0; } @@ -690,29 +690,29 @@ static int PSP_RenderFillRects(SDL_Renderer * renderer, const SDL_FRect * rects, int count) { - int color = renderer->a << 24 | renderer->b << 16 | renderer->g << 8 | renderer->r; - int i; - StartDrawing(renderer); - - for (i = 0; i < count; ++i) { - const SDL_FRect *rect = &rects[i]; - VertV* vertices = (VertV*)sceGuGetMemory((sizeof(VertV)<<1)); - vertices[0].x = rect->x; - vertices[0].y = rect->y; - vertices[0].z = 0.0f; + int color = renderer->a << 24 | renderer->b << 16 | renderer->g << 8 | renderer->r; + int i; + StartDrawing(renderer); - vertices[1].x = rect->x + rect->w; - vertices[1].y = rect->y + rect->h; - vertices[1].z = 0.0f; - - sceGuDisable(GU_TEXTURE_2D); - sceGuColor(color); - sceGuShadeModel(GU_FLAT); - sceGuDrawArray(GU_SPRITES, GU_VERTEX_32BITF|GU_TRANSFORM_2D, 2, 0, vertices); - sceGuShadeModel(GU_SMOOTH); - sceGuEnable(GU_TEXTURE_2D); + for (i = 0; i < count; ++i) { + const SDL_FRect *rect = &rects[i]; + VertV* vertices = (VertV*)sceGuGetMemory((sizeof(VertV)<<1)); + vertices[0].x = rect->x; + vertices[0].y = rect->y; + vertices[0].z = 0.0f; + + vertices[1].x = rect->x + rect->w; + vertices[1].y = rect->y + rect->h; + vertices[1].z = 0.0f; + + sceGuDisable(GU_TEXTURE_2D); + sceGuColor(color); + sceGuShadeModel(GU_FLAT); + sceGuDrawArray(GU_SPRITES, GU_VERTEX_32BITF|GU_TRANSFORM_2D, 2, 0, vertices); + sceGuShadeModel(GU_SMOOTH); + sceGuEnable(GU_TEXTURE_2D); } - + return 0; } @@ -724,127 +724,127 @@ PSP_RenderFillRects(SDL_Renderer * renderer, const SDL_FRect * rects, float MathAbs(float x) { - float result; + float result; - __asm__ volatile ( - "mtv %1, S000\n" - "vabs.s S000, S000\n" - "mfv %0, S000\n" - : "=r"(result) : "r"(x)); + __asm__ volatile ( + "mtv %1, S000\n" + "vabs.s S000, S000\n" + "mfv %0, S000\n" + : "=r"(result) : "r"(x)); - return result; + return result; } void MathSincos(float r, float *s, float *c) { - __asm__ volatile ( - "mtv %2, S002\n" - "vcst.s S003, VFPU_2_PI\n" - "vmul.s S002, S002, S003\n" - "vrot.p C000, S002, [s, c]\n" - "mfv %0, S000\n" - "mfv %1, S001\n" - : "=r"(*s), "=r"(*c): "r"(r)); + __asm__ volatile ( + "mtv %2, S002\n" + "vcst.s S003, VFPU_2_PI\n" + "vmul.s S002, S002, S003\n" + "vrot.p C000, S002, [s, c]\n" + "mfv %0, S000\n" + "mfv %1, S001\n" + : "=r"(*s), "=r"(*c): "r"(r)); } void Swap(float *a, float *b) { - float n=*a; - *a = *b; - *b = n; + float n=*a; + *a = *b; + *b = n; } static int PSP_RenderCopy(SDL_Renderer * renderer, SDL_Texture * texture, const SDL_Rect * srcrect, const SDL_FRect * dstrect) { - float x, y, width, height; - float u0, v0, u1, v1; - unsigned char alpha; - - x = dstrect->x; - y = dstrect->y; - width = dstrect->w; - height = dstrect->h; + float x, y, width, height; + float u0, v0, u1, v1; + unsigned char alpha; - u0 = srcrect->x; - v0 = srcrect->y; - u1 = srcrect->x + srcrect->w; - v1 = srcrect->y + srcrect->h; - - alpha = texture->a; - - StartDrawing(renderer); - TextureActivate(texture); - PSP_SetBlendMode(renderer, renderer->blendMode); - - if(alpha != 255) - { - sceGuTexFunc(GU_TFX_MODULATE, GU_TCC_RGBA); - sceGuColor(GU_RGBA(255, 255, 255, alpha)); - }else{ - sceGuTexFunc(GU_TFX_REPLACE, GU_TCC_RGBA); - sceGuColor(0xFFFFFFFF); - } - - if((MathAbs(u1) - MathAbs(u0)) < 64.0f) - { - VertTV* vertices = (VertTV*)sceGuGetMemory((sizeof(VertTV))<<1); + x = dstrect->x; + y = dstrect->y; + width = dstrect->w; + height = dstrect->h; - vertices[0].u = u0; - vertices[0].v = v0; - vertices[0].x = x; - vertices[0].y = y; - vertices[0].z = 0; + u0 = srcrect->x; + v0 = srcrect->y; + u1 = srcrect->x + srcrect->w; + v1 = srcrect->y + srcrect->h; - vertices[1].u = u1; - vertices[1].v = v1; - vertices[1].x = x + width; - vertices[1].y = y + height; - vertices[1].z = 0; + alpha = texture->a; - sceGuDrawArray(GU_SPRITES, GU_TEXTURE_32BITF|GU_VERTEX_32BITF|GU_TRANSFORM_2D, 2, 0, vertices); - } - else - { - float start, end; - float curU = u0; - float curX = x; - float endX = x + width; - float slice = 64.0f; - float ustep = (u1 - u0)/width * slice; - - if(ustep < 0.0f) - ustep = -ustep; + StartDrawing(renderer); + TextureActivate(texture); + PSP_SetBlendMode(renderer, renderer->blendMode); - for(start = 0, end = width; start < end; start += slice) - { - VertTV* vertices = (VertTV*)sceGuGetMemory((sizeof(VertTV))<<1); + if(alpha != 255) + { + sceGuTexFunc(GU_TFX_MODULATE, GU_TCC_RGBA); + sceGuColor(GU_RGBA(255, 255, 255, alpha)); + }else{ + sceGuTexFunc(GU_TFX_REPLACE, GU_TCC_RGBA); + sceGuColor(0xFFFFFFFF); + } - float polyWidth = ((curX + slice) > endX) ? (endX - curX) : slice; - float sourceWidth = ((curU + ustep) > u1) ? (u1 - curU) : ustep; + if((MathAbs(u1) - MathAbs(u0)) < 64.0f) + { + VertTV* vertices = (VertTV*)sceGuGetMemory((sizeof(VertTV))<<1); - vertices[0].u = curU; - vertices[0].v = v0; - vertices[0].x = curX; - vertices[0].y = y; - vertices[0].z = 0; + vertices[0].u = u0; + vertices[0].v = v0; + vertices[0].x = x; + vertices[0].y = y; + vertices[0].z = 0; - curU += sourceWidth; - curX += polyWidth; + vertices[1].u = u1; + vertices[1].v = v1; + vertices[1].x = x + width; + vertices[1].y = y + height; + vertices[1].z = 0; - vertices[1].u = curU; - vertices[1].v = v1; - vertices[1].x = curX; - vertices[1].y = (y + height); - vertices[1].z = 0; + sceGuDrawArray(GU_SPRITES, GU_TEXTURE_32BITF|GU_VERTEX_32BITF|GU_TRANSFORM_2D, 2, 0, vertices); + } + else + { + float start, end; + float curU = u0; + float curX = x; + float endX = x + width; + float slice = 64.0f; + float ustep = (u1 - u0)/width * slice; - sceGuDrawArray(GU_SPRITES, GU_TEXTURE_32BITF|GU_VERTEX_32BITF|GU_TRANSFORM_2D, 2, 0, vertices); - } - } - - if(alpha != 255) - sceGuTexFunc(GU_TFX_REPLACE, GU_TCC_RGBA); + if(ustep < 0.0f) + ustep = -ustep; + + for(start = 0, end = width; start < end; start += slice) + { + VertTV* vertices = (VertTV*)sceGuGetMemory((sizeof(VertTV))<<1); + + float polyWidth = ((curX + slice) > endX) ? (endX - curX) : slice; + float sourceWidth = ((curU + ustep) > u1) ? (u1 - curU) : ustep; + + vertices[0].u = curU; + vertices[0].v = v0; + vertices[0].x = curX; + vertices[0].y = y; + vertices[0].z = 0; + + curU += sourceWidth; + curX += polyWidth; + + vertices[1].u = curU; + vertices[1].v = v1; + vertices[1].x = curX; + vertices[1].y = (y + height); + vertices[1].z = 0; + + sceGuDrawArray(GU_SPRITES, GU_TEXTURE_32BITF|GU_VERTEX_32BITF|GU_TRANSFORM_2D, 2, 0, vertices); + } + } + + if(alpha != 255) + sceGuTexFunc(GU_TFX_REPLACE, GU_TCC_RGBA); return 0; } @@ -853,7 +853,7 @@ PSP_RenderReadPixels(SDL_Renderer * renderer, const SDL_Rect * rect, Uint32 pixel_format, void * pixels, int pitch) { - return 0; + return 0; } @@ -862,98 +862,98 @@ PSP_RenderCopyEx(SDL_Renderer * renderer, SDL_Texture * texture, const SDL_Rect * srcrect, const SDL_FRect * dstrect, const double angle, const SDL_FPoint *center, const SDL_RendererFlip flip) { - float x, y, width, height; - float u0, v0, u1, v1; - unsigned char alpha; - float centerx, centery; - - x = dstrect->x; - y = dstrect->y; - width = dstrect->w; - height = dstrect->h; + float x, y, width, height; + float u0, v0, u1, v1; + unsigned char alpha; + float centerx, centery; + + x = dstrect->x; + y = dstrect->y; + width = dstrect->w; + height = dstrect->h; + + u0 = srcrect->x; + v0 = srcrect->y; + u1 = srcrect->x + srcrect->w; + v1 = srcrect->y + srcrect->h; - u0 = srcrect->x; - v0 = srcrect->y; - u1 = srcrect->x + srcrect->w; - v1 = srcrect->y + srcrect->h; - centerx = center->x; centery = center->y; - - alpha = texture->a; - - StartDrawing(renderer); - TextureActivate(texture); - PSP_SetBlendMode(renderer, renderer->blendMode); - - if(alpha != 255) - { - sceGuTexFunc(GU_TFX_MODULATE, GU_TCC_RGBA); - sceGuColor(GU_RGBA(255, 255, 255, alpha)); - }else{ - sceGuTexFunc(GU_TFX_REPLACE, GU_TCC_RGBA); - sceGuColor(0xFFFFFFFF); - } -// x += width * 0.5f; -// y += height * 0.5f; - x += centerx; - y += centery; - - float c, s; - - MathSincos(degToRad(angle), &s, &c); - -// width *= 0.5f; -// height *= 0.5f; - width -= centerx; - height -= centery; - - - float cw = c*width; - float sw = s*width; - float ch = c*height; - float sh = s*height; + alpha = texture->a; - VertTV* vertices = (VertTV*)sceGuGetMemory(sizeof(VertTV)<<2); + StartDrawing(renderer); + TextureActivate(texture); + PSP_SetBlendMode(renderer, renderer->blendMode); - vertices[0].u = u0; - vertices[0].v = v0; - vertices[0].x = x - cw + sh; - vertices[0].y = y - sw - ch; - vertices[0].z = 0; - - vertices[1].u = u0; - vertices[1].v = v1; - vertices[1].x = x - cw - sh; - vertices[1].y = y - sw + ch; - vertices[1].z = 0; - - vertices[2].u = u1; - vertices[2].v = v1; - vertices[2].x = x + cw - sh; - vertices[2].y = y + sw + ch; - vertices[2].z = 0; - - vertices[3].u = u1; - vertices[3].v = v0; - vertices[3].x = x + cw + sh; - vertices[3].y = y + sw - ch; - vertices[3].z = 0; - - if (flip & SDL_FLIP_HORIZONTAL) { - Swap(&vertices[0].v, &vertices[2].v); - Swap(&vertices[1].v, &vertices[3].v); - } - if (flip & SDL_FLIP_VERTICAL) { - Swap(&vertices[0].u, &vertices[2].u); - Swap(&vertices[1].u, &vertices[3].u); - } + if(alpha != 255) + { + sceGuTexFunc(GU_TFX_MODULATE, GU_TCC_RGBA); + sceGuColor(GU_RGBA(255, 255, 255, alpha)); + }else{ + sceGuTexFunc(GU_TFX_REPLACE, GU_TCC_RGBA); + sceGuColor(0xFFFFFFFF); + } - sceGuDrawArray(GU_TRIANGLE_FAN, GU_TEXTURE_32BITF|GU_VERTEX_32BITF|GU_TRANSFORM_2D, 4, 0, vertices); - - if(alpha != 255) - sceGuTexFunc(GU_TFX_REPLACE, GU_TCC_RGBA); +// x += width * 0.5f; +// y += height * 0.5f; + x += centerx; + y += centery; + + float c, s; + + MathSincos(degToRad(angle), &s, &c); + +// width *= 0.5f; +// height *= 0.5f; + width -= centerx; + height -= centery; + + + float cw = c*width; + float sw = s*width; + float ch = c*height; + float sh = s*height; + + VertTV* vertices = (VertTV*)sceGuGetMemory(sizeof(VertTV)<<2); + + vertices[0].u = u0; + vertices[0].v = v0; + vertices[0].x = x - cw + sh; + vertices[0].y = y - sw - ch; + vertices[0].z = 0; + + vertices[1].u = u0; + vertices[1].v = v1; + vertices[1].x = x - cw - sh; + vertices[1].y = y - sw + ch; + vertices[1].z = 0; + + vertices[2].u = u1; + vertices[2].v = v1; + vertices[2].x = x + cw - sh; + vertices[2].y = y + sw + ch; + vertices[2].z = 0; + + vertices[3].u = u1; + vertices[3].v = v0; + vertices[3].x = x + cw + sh; + vertices[3].y = y + sw - ch; + vertices[3].z = 0; + + if (flip & SDL_FLIP_HORIZONTAL) { + Swap(&vertices[0].v, &vertices[2].v); + Swap(&vertices[1].v, &vertices[3].v); + } + if (flip & SDL_FLIP_VERTICAL) { + Swap(&vertices[0].u, &vertices[2].u); + Swap(&vertices[1].u, &vertices[3].u); + } + + sceGuDrawArray(GU_TRIANGLE_FAN, GU_TEXTURE_32BITF|GU_VERTEX_32BITF|GU_TRANSFORM_2D, 4, 0, vertices); + + if(alpha != 255) + sceGuTexFunc(GU_TFX_REPLACE, GU_TCC_RGBA); return 0; } @@ -961,39 +961,39 @@ static void PSP_RenderPresent(SDL_Renderer * renderer) { PSP_RenderData *data = (PSP_RenderData *) renderer->driverdata; - if(!data->displayListAvail) - return; - - data->displayListAvail = SDL_FALSE; - sceGuFinish(); - sceGuSync(0,0); - -// if(data->vsync) - sceDisplayWaitVblankStart(); - + if(!data->displayListAvail) + return; + + data->displayListAvail = SDL_FALSE; + sceGuFinish(); + sceGuSync(0,0); + +// if(data->vsync) + sceDisplayWaitVblankStart(); + data->backbuffer = data->frontbuffer; data->frontbuffer = vabsptr(sceGuSwapBuffers()); - + } static void PSP_DestroyTexture(SDL_Renderer * renderer, SDL_Texture * texture) { - PSP_RenderData *renderdata = (PSP_RenderData *) renderer->driverdata; - PSP_TextureData *psp_texture = (PSP_TextureData *) texture->driverdata; - - if (renderdata == 0) - return; + PSP_RenderData *renderdata = (PSP_RenderData *) renderer->driverdata; + PSP_TextureData *psp_texture = (PSP_TextureData *) texture->driverdata; - if(psp_texture == 0) - return; + if (renderdata == 0) + return; - if(psp_texture->data != 0) - { - SDL_free(psp_texture->data); - } - SDL_free(psp_texture); - texture->driverdata = NULL; + if(psp_texture == 0) + return; + + if(psp_texture->data != 0) + { + SDL_free(psp_texture->data); + } + SDL_free(psp_texture); + texture->driverdata = NULL; } static void @@ -1001,17 +1001,17 @@ PSP_DestroyRenderer(SDL_Renderer * renderer) { PSP_RenderData *data = (PSP_RenderData *) renderer->driverdata; if (data) { - if (!data->initialized) - return; + if (!data->initialized) + return; - StartDrawing(renderer); - - sceGuTerm(); -// vfree(data->backbuffer); -// vfree(data->frontbuffer); - - data->initialized = SDL_FALSE; - data->displayListAvail = SDL_FALSE; + StartDrawing(renderer); + + sceGuTerm(); +// vfree(data->backbuffer); +// vfree(data->frontbuffer); + + data->initialized = SDL_FALSE; + data->displayListAvail = SDL_FALSE; SDL_free(data); } SDL_free(renderer); diff --git a/src/render/software/SDL_drawline.c b/src/render/software/SDL_drawline.c index 9f5da0ab6..5cda4ccca 100644 --- a/src/render/software/SDL_drawline.c +++ b/src/render/software/SDL_drawline.c @@ -32,7 +32,6 @@ SDL_DrawLine1(SDL_Surface * dst, int x1, int y1, int x2, int y2, Uint32 color, SDL_bool draw_end) { if (y1 == y2) { - //HLINE(Uint8, DRAW_FASTSETPIXEL1, draw_end); int length; int pitch = (dst->pitch / dst->format->BytesPerPixel); Uint8 *pixel; diff --git a/src/render/software/SDL_rotate.c b/src/render/software/SDL_rotate.c index 2eae0393f..b31553587 100644 --- a/src/render/software/SDL_rotate.c +++ b/src/render/software/SDL_rotate.c @@ -398,7 +398,7 @@ SDL_Surface *_rotateSurface(SDL_Surface * src, double angle, int centerx, int ce /* Determine target size */ - //_rotozoomSurfaceSizeTrig(rz_src->w, rz_src->h, angle, &dstwidth, &dstheight, &cangle, &sangle); + /*_rotozoomSurfaceSizeTrig(rz_src->w, rz_src->h, angle, &dstwidth, &dstheight, &cangle, &sangle); */ /* * Calculate target factors from sin/cos and zoom @@ -459,7 +459,7 @@ SDL_Surface *_rotateSurface(SDL_Surface * src, double angle, int centerx, int ce /* * Turn on source-alpha support */ - //SDL_SetAlpha(rz_dst, SDL_SRCALPHA, 255); + /*SDL_SetAlpha(rz_dst, SDL_SRCALPHA, 255);*/ SDL_SetColorKey(rz_dst, /*SDL_SRCCOLORKEY*/ SDL_TRUE | SDL_RLEACCEL, _colorkey(rz_src)); } else { /* diff --git a/src/stdlib/SDL_malloc.c b/src/stdlib/SDL_malloc.c index 65d1e1d16..5f7882139 100644 --- a/src/stdlib/SDL_malloc.c +++ b/src/stdlib/SDL_malloc.c @@ -409,9 +409,9 @@ MALLINFO_FIELD_TYPE default: size_t size_t. The value is used only if HAVE_USR_INCLUDE_MALLOC_H is not set REALLOC_ZERO_BYTES_FREES default: not defined - This should be set if a call to realloc with zero bytes should - be the same as a call to free. Some people think it should. Otherwise, - since this malloc returns a unique pointer for malloc(0), so does + This should be set if a call to realloc with zero bytes should + be the same as a call to free. Some people think it should. Otherwise, + since this malloc returns a unique pointer for malloc(0), so does realloc(p, 0). LACKS_UNISTD_H, LACKS_FCNTL_H, LACKS_SYS_PARAM_H, LACKS_SYS_MMAN_H @@ -619,12 +619,12 @@ DEFAULT_MMAP_THRESHOLD default: 256K #define MALLINFO_FIELD_TYPE size_t #endif /* MALLINFO_FIELD_TYPE */ -#define memset SDL_memset -#define memcpy SDL_memcpy -#define malloc SDL_malloc -#define calloc SDL_calloc -#define realloc SDL_realloc -#define free SDL_free +#define memset SDL_memset +#define memcpy SDL_memcpy +#define malloc SDL_malloc +#define calloc SDL_calloc +#define realloc SDL_realloc +#define free SDL_free /* mallopt tuning options. SVID/XPG defines four standard parameter @@ -5239,7 +5239,7 @@ History: Trial version Fri Aug 28 13:14:29 1992 Doug Lea (dl at g.oswego.edu) * Based loosely on libg++-1.2X malloc. (It retains some of the overall structure of old version, but most details differ.) - + */ #endif /* !HAVE_MALLOC */ diff --git a/src/test/SDL_test_assert.c b/src/test/SDL_test_assert.c index 4896bc0e5..41a3df68f 100644 --- a/src/test/SDL_test_assert.c +++ b/src/test/SDL_test_assert.c @@ -21,7 +21,7 @@ /* - Used by the test framework and test cases. + Used by the test framework and test cases. */ @@ -47,16 +47,16 @@ static Uint32 SDLTest_AssertsPassed = 0; void SDLTest_Assert(int assertCondition, const char *assertDescription, ...) { va_list list; - char logMessage[SDLTEST_MAX_LOGMESSAGE_LENGTH]; - - // Print assert description into a buffer - SDL_memset(logMessage, 0, SDLTEST_MAX_LOGMESSAGE_LENGTH); - va_start(list, assertDescription); - SDL_vsnprintf(logMessage, SDLTEST_MAX_LOGMESSAGE_LENGTH - 1, assertDescription, list); - va_end(list); - - // Log, then assert and break on failure - SDL_assert((SDLTest_AssertCheck(assertCondition, logMessage))); + char logMessage[SDLTEST_MAX_LOGMESSAGE_LENGTH]; + + /* Print assert description into a buffer */ + SDL_memset(logMessage, 0, SDLTEST_MAX_LOGMESSAGE_LENGTH); + va_start(list, assertDescription); + SDL_vsnprintf(logMessage, SDLTEST_MAX_LOGMESSAGE_LENGTH - 1, assertDescription, list); + va_end(list); + + /* Log, then assert and break on failure */ + SDL_assert((SDLTest_AssertCheck(assertCondition, logMessage))); } /* @@ -65,27 +65,27 @@ void SDLTest_Assert(int assertCondition, const char *assertDescription, ...) int SDLTest_AssertCheck(int assertCondition, const char *assertDescription, ...) { va_list list; - char logMessage[SDLTEST_MAX_LOGMESSAGE_LENGTH]; - - // Print assert description into a buffer - SDL_memset(logMessage, 0, SDLTEST_MAX_LOGMESSAGE_LENGTH); - va_start(list, assertDescription); - SDL_vsnprintf(logMessage, SDLTEST_MAX_LOGMESSAGE_LENGTH - 1, assertDescription, list); - va_end(list); - - // Log pass or fail message - if (assertCondition == ASSERT_FAIL) - { - SDLTest_AssertsFailed++; - SDLTest_LogError(SDLTest_AssertCheckFormat, logMessage, "Failed"); - } - else - { - SDLTest_AssertsPassed++; - SDLTest_Log(SDLTest_AssertCheckFormat, logMessage, "Passed"); - } + char logMessage[SDLTEST_MAX_LOGMESSAGE_LENGTH]; - return assertCondition; + /* Print assert description into a buffer */ + SDL_memset(logMessage, 0, SDLTEST_MAX_LOGMESSAGE_LENGTH); + va_start(list, assertDescription); + SDL_vsnprintf(logMessage, SDLTEST_MAX_LOGMESSAGE_LENGTH - 1, assertDescription, list); + va_end(list); + + /* Log pass or fail message */ + if (assertCondition == ASSERT_FAIL) + { + SDLTest_AssertsFailed++; + SDLTest_LogError(SDLTest_AssertCheckFormat, logMessage, "Failed"); + } + else + { + SDLTest_AssertsPassed++; + SDLTest_Log(SDLTest_AssertCheckFormat, logMessage, "Passed"); + } + + return assertCondition; } /* @@ -94,17 +94,17 @@ int SDLTest_AssertCheck(int assertCondition, const char *assertDescription, ...) void SDLTest_AssertPass(const char *assertDescription, ...) { va_list list; - char logMessage[SDLTEST_MAX_LOGMESSAGE_LENGTH]; - - // Print assert description into a buffer - SDL_memset(logMessage, 0, SDLTEST_MAX_LOGMESSAGE_LENGTH); - va_start(list, assertDescription); - SDL_vsnprintf(logMessage, SDLTEST_MAX_LOGMESSAGE_LENGTH - 1, assertDescription, list); - va_end(list); - - // Log pass message - SDLTest_AssertsPassed++; - SDLTest_Log(SDLTest_AssertCheckFormat, logMessage, "Pass"); + char logMessage[SDLTEST_MAX_LOGMESSAGE_LENGTH]; + + /* Print assert description into a buffer */ + SDL_memset(logMessage, 0, SDLTEST_MAX_LOGMESSAGE_LENGTH); + va_start(list, assertDescription); + SDL_vsnprintf(logMessage, SDLTEST_MAX_LOGMESSAGE_LENGTH - 1, assertDescription, list); + va_end(list); + + /* Log pass message */ + SDLTest_AssertsPassed++; + SDLTest_Log(SDLTest_AssertCheckFormat, logMessage, "Pass"); } /* @@ -112,25 +112,25 @@ void SDLTest_AssertPass(const char *assertDescription, ...) */ void SDLTest_ResetAssertSummary() { - SDLTest_AssertsPassed = 0; - SDLTest_AssertsFailed = 0; + SDLTest_AssertsPassed = 0; + SDLTest_AssertsFailed = 0; } /* - * Logs summary of all assertions (total, pass, fail) since last reset + * Logs summary of all assertions (total, pass, fail) since last reset * as INFO (failed==0) or ERROR (failed > 0). */ void SDLTest_LogAssertSummary() { - Uint32 totalAsserts = SDLTest_AssertsPassed + SDLTest_AssertsFailed; - if (SDLTest_AssertsFailed == 0) - { - SDLTest_Log(SDLTest_AssertSummaryFormat, totalAsserts, SDLTest_AssertsPassed, SDLTest_AssertsFailed); - } - else - { - SDLTest_LogError(SDLTest_AssertSummaryFormat, totalAsserts, SDLTest_AssertsPassed, SDLTest_AssertsFailed); - } + Uint32 totalAsserts = SDLTest_AssertsPassed + SDLTest_AssertsFailed; + if (SDLTest_AssertsFailed == 0) + { + SDLTest_Log(SDLTest_AssertSummaryFormat, totalAsserts, SDLTest_AssertsPassed, SDLTest_AssertsFailed); + } + else + { + SDLTest_LogError(SDLTest_AssertSummaryFormat, totalAsserts, SDLTest_AssertsPassed, SDLTest_AssertsFailed); + } } /* @@ -138,13 +138,13 @@ void SDLTest_LogAssertSummary() */ int SDLTest_AssertSummaryToTestResult() { - if (SDLTest_AssertsFailed > 0) { - return TEST_RESULT_FAILED; - } else { - if (SDLTest_AssertsPassed > 0) { - return TEST_RESULT_PASSED; - } else { - return TEST_RESULT_NO_ASSERT; - } - } + if (SDLTest_AssertsFailed > 0) { + return TEST_RESULT_FAILED; + } else { + if (SDLTest_AssertsPassed > 0) { + return TEST_RESULT_PASSED; + } else { + return TEST_RESULT_NO_ASSERT; + } + } } diff --git a/src/test/SDL_test_common.c b/src/test/SDL_test_common.c index b5fdc3f5b..cd028c7bf 100644 --- a/src/test/SDL_test_common.c +++ b/src/test/SDL_test_common.c @@ -405,7 +405,7 @@ SDLTest_CommonArg(SDLTest_CommonState * state, int index) return -1; } if (SDL_strcmp(argv[index], "-NSDocumentRevisionsDebugMode") == 0) { - /* Debug flag sent by Xcode */ + /* Debug flag sent by Xcode */ return 2; } return 0; @@ -892,7 +892,7 @@ SDLTest_PrintEvent(SDL_Event * event) { if (event->type == SDL_MOUSEMOTION) { /* Mouse motion is really spammy */ - //return; + return; } fprintf(stderr, "SDL EVENT: "); @@ -1097,7 +1097,7 @@ SDLTest_ScreenShot(SDL_Renderer *renderer) } } -static void +static void FullscreenTo(int index, int windowId) { Uint32 flags; @@ -1151,12 +1151,12 @@ SDLTest_CommonEvent(SDLTest_CommonState * state, SDL_Event * event, int *done) } break; case SDL_WINDOWEVENT_CLOSE: - { + { SDL_Window *window = SDL_GetWindowFromID(event->window.windowID); if (window) { - SDL_DestroyWindow(window); - } - } + SDL_DestroyWindow(window); + } + } break; } break; @@ -1298,7 +1298,7 @@ SDLTest_CommonEvent(SDLTest_CommonState * state, SDL_Event * event, int *done) } } break; - case SDLK_0: + case SDLK_0: if (event->key.keysym.mod & KMOD_CTRL) { SDL_Window *window = SDL_GetWindowFromID(event->key.windowID); SDL_ShowSimpleMessageBox(SDL_MESSAGEBOX_INFORMATION, "Test Message", "You're awesome!", window); @@ -1335,7 +1335,7 @@ SDLTest_CommonEvent(SDLTest_CommonState * state, SDL_Event * event, int *done) break; case SDL_MOUSEMOTION: lastEvent = event->motion; - break; + break; } } diff --git a/src/test/SDL_test_compare.c b/src/test/SDL_test_compare.c index e7ac424d9..33f237311 100644 --- a/src/test/SDL_test_compare.c +++ b/src/test/SDL_test_compare.c @@ -22,7 +22,7 @@ /* Based on automated SDL_Surface tests originally written by Edgar Simo 'bobbens'. - + Rewritten for test lib by Andreas Schiffler. */ @@ -62,7 +62,7 @@ int SDLTest_CompareSurfaces(SDL_Surface *surface, SDL_Surface *referenceSurface, if (allowable_error<0) { allowable_error = 0; } - + SDL_LockSurface( surface ); SDL_LockSurface( referenceSurface ); @@ -82,7 +82,7 @@ int SDLTest_CompareSurfaces(SDL_Surface *surface, SDL_Surface *referenceSurface, dist += (R-Rd)*(R-Rd); dist += (G-Gd)*(G-Gd); dist += (B-Bd)*(B-Bd); - + /* Allow some difference in blending accuracy */ if (dist > allowable_error) { ret++; diff --git a/src/test/SDL_test_crc32.c b/src/test/SDL_test_crc32.c index 5329319e6..d6685c347 100644 --- a/src/test/SDL_test_crc32.c +++ b/src/test/SDL_test_crc32.c @@ -21,7 +21,7 @@ /* - Used by the test execution component. + Used by the test execution component. Original source code contributed by A. Schiffler for GSOC project. */ @@ -39,10 +39,10 @@ int SDLTest_Crc32Init(SDLTest_Crc32Context *crcContext) /* Sanity check context pointer */ if (crcContext==NULL) { return -1; - } - + } + /* - * Build auxiliary table for parallel byte-at-a-time CRC-32 + * Build auxiliary table for parallel byte-at-a-time CRC-32 */ #ifdef ORIGINAL_METHOD for (i = 0; i < 256; ++i) { @@ -64,7 +64,7 @@ int SDLTest_Crc32Init(SDLTest_Crc32Context *crcContext) crcContext->crc32_table[i] = c; } #endif - + return 0; } @@ -75,15 +75,15 @@ int SDLTest_Crc32Calc(SDLTest_Crc32Context * crcContext, CrcUint8 *inBuf, CrcUin if (SDLTest_Crc32CalcStart(crcContext,crc32)) { return -1; } - + if (SDLTest_Crc32CalcBuffer(crcContext, inBuf, inLen, crc32)) { return -1; } - + if (SDLTest_Crc32CalcEnd(crcContext, crc32)) { return -1; } - + return 0; } @@ -95,10 +95,10 @@ int SDLTest_Crc32CalcStart(SDLTest_Crc32Context * crcContext, CrcUint32 *crc32) if (crcContext==NULL) { *crc32=0; return -1; - } + } /* - * Preload shift register, per CRC-32 spec + * Preload shift register, per CRC-32 spec */ *crc32 = 0xffffffff; @@ -113,10 +113,10 @@ int SDLTest_Crc32CalcEnd(SDLTest_Crc32Context * crcContext, CrcUint32 *crc32) if (crcContext==NULL) { *crc32=0; return -1; - } - + } + /* - * Return complement, per CRC-32 spec + * Return complement, per CRC-32 spec */ *crc32 = (~(*crc32)); @@ -134,24 +134,24 @@ int SDLTest_Crc32CalcBuffer(SDLTest_Crc32Context * crcContext, CrcUint8 *inBuf, *crc32=0; return -1; } - + if (inBuf==NULL) { return -1; } /* - * Calculate CRC from data + * Calculate CRC from data */ crc = *crc32; for (p = inBuf; inLen > 0; ++p, --inLen) { -#ifdef ORIGINAL_METHOD +#ifdef ORIGINAL_METHOD crc = (crc << 8) ^ crcContext->crc32_table[(crc >> 24) ^ *p]; #else crc = ((crc >> 8) & 0x00FFFFFF) ^ crcContext->crc32_table[ (crc ^ *p) & 0xFF ]; -#endif - } +#endif + } *crc32 = crc; - + return 0; } @@ -159,7 +159,7 @@ int SDLTest_Crc32Done(SDLTest_Crc32Context * crcContext) { if (crcContext==NULL) { return -1; - } + } return 0; } diff --git a/src/test/SDL_test_font.c b/src/test/SDL_test_font.c index dcb3f0464..144bcad02 100644 --- a/src/test/SDL_test_font.c +++ b/src/test/SDL_test_font.c @@ -32,3077 +32,3077 @@ static unsigned char SDLTest_FontData[SDL_TESTFONTDATAMAX] = { - /* - * 0 0x00 '^@' - */ - 0x00, /* 00000000 */ - 0x00, /* 00000000 */ - 0x00, /* 00000000 */ - 0x00, /* 00000000 */ - 0x00, /* 00000000 */ - 0x00, /* 00000000 */ - 0x00, /* 00000000 */ - 0x00, /* 00000000 */ - - /* - * 1 0x01 '^A' - */ - 0x7e, /* 01111110 */ - 0x81, /* 10000001 */ - 0xa5, /* 10100101 */ - 0x81, /* 10000001 */ - 0xbd, /* 10111101 */ - 0x99, /* 10011001 */ - 0x81, /* 10000001 */ - 0x7e, /* 01111110 */ - - /* - * 2 0x02 '^B' - */ - 0x7e, /* 01111110 */ - 0xff, /* 11111111 */ - 0xdb, /* 11011011 */ - 0xff, /* 11111111 */ - 0xc3, /* 11000011 */ - 0xe7, /* 11100111 */ - 0xff, /* 11111111 */ - 0x7e, /* 01111110 */ - - /* - * 3 0x03 '^C' - */ - 0x6c, /* 01101100 */ - 0xfe, /* 11111110 */ - 0xfe, /* 11111110 */ - 0xfe, /* 11111110 */ - 0x7c, /* 01111100 */ - 0x38, /* 00111000 */ - 0x10, /* 00010000 */ - 0x00, /* 00000000 */ - - /* - * 4 0x04 '^D' - */ - 0x10, /* 00010000 */ - 0x38, /* 00111000 */ - 0x7c, /* 01111100 */ - 0xfe, /* 11111110 */ - 0x7c, /* 01111100 */ - 0x38, /* 00111000 */ - 0x10, /* 00010000 */ - 0x00, /* 00000000 */ - - /* - * 5 0x05 '^E' - */ - 0x38, /* 00111000 */ - 0x7c, /* 01111100 */ - 0x38, /* 00111000 */ - 0xfe, /* 11111110 */ - 0xfe, /* 11111110 */ - 0xd6, /* 11010110 */ - 0x10, /* 00010000 */ - 0x38, /* 00111000 */ - - /* - * 6 0x06 '^F' - */ - 0x10, /* 00010000 */ - 0x38, /* 00111000 */ - 0x7c, /* 01111100 */ - 0xfe, /* 11111110 */ - 0xfe, /* 11111110 */ - 0x7c, /* 01111100 */ - 0x10, /* 00010000 */ - 0x38, /* 00111000 */ - - /* - * 7 0x07 '^G' - */ - 0x00, /* 00000000 */ - 0x00, /* 00000000 */ - 0x18, /* 00011000 */ - 0x3c, /* 00111100 */ - 0x3c, /* 00111100 */ - 0x18, /* 00011000 */ - 0x00, /* 00000000 */ - 0x00, /* 00000000 */ - - /* - * 8 0x08 '^H' - */ - 0xff, /* 11111111 */ - 0xff, /* 11111111 */ - 0xe7, /* 11100111 */ - 0xc3, /* 11000011 */ - 0xc3, /* 11000011 */ - 0xe7, /* 11100111 */ - 0xff, /* 11111111 */ - 0xff, /* 11111111 */ - - /* - * 9 0x09 '^I' - */ - 0x00, /* 00000000 */ - 0x3c, /* 00111100 */ - 0x66, /* 01100110 */ - 0x42, /* 01000010 */ - 0x42, /* 01000010 */ - 0x66, /* 01100110 */ - 0x3c, /* 00111100 */ - 0x00, /* 00000000 */ - - /* - * 10 0x0a '^J' - */ - 0xff, /* 11111111 */ - 0xc3, /* 11000011 */ - 0x99, /* 10011001 */ - 0xbd, /* 10111101 */ - 0xbd, /* 10111101 */ - 0x99, /* 10011001 */ - 0xc3, /* 11000011 */ - 0xff, /* 11111111 */ - - /* - * 11 0x0b '^K' - */ - 0x0f, /* 00001111 */ - 0x07, /* 00000111 */ - 0x0f, /* 00001111 */ - 0x7d, /* 01111101 */ - 0xcc, /* 11001100 */ - 0xcc, /* 11001100 */ - 0xcc, /* 11001100 */ - 0x78, /* 01111000 */ - - /* - * 12 0x0c '^L' - */ - 0x3c, /* 00111100 */ - 0x66, /* 01100110 */ - 0x66, /* 01100110 */ - 0x66, /* 01100110 */ - 0x3c, /* 00111100 */ - 0x18, /* 00011000 */ - 0x7e, /* 01111110 */ - 0x18, /* 00011000 */ - - /* - * 13 0x0d '^M' - */ - 0x3f, /* 00111111 */ - 0x33, /* 00110011 */ - 0x3f, /* 00111111 */ - 0x30, /* 00110000 */ - 0x30, /* 00110000 */ - 0x70, /* 01110000 */ - 0xf0, /* 11110000 */ - 0xe0, /* 11100000 */ - - /* - * 14 0x0e '^N' - */ - 0x7f, /* 01111111 */ - 0x63, /* 01100011 */ - 0x7f, /* 01111111 */ - 0x63, /* 01100011 */ - 0x63, /* 01100011 */ - 0x67, /* 01100111 */ - 0xe6, /* 11100110 */ - 0xc0, /* 11000000 */ - - /* - * 15 0x0f '^O' - */ - 0x18, /* 00011000 */ - 0xdb, /* 11011011 */ - 0x3c, /* 00111100 */ - 0xe7, /* 11100111 */ - 0xe7, /* 11100111 */ - 0x3c, /* 00111100 */ - 0xdb, /* 11011011 */ - 0x18, /* 00011000 */ - - /* - * 16 0x10 '^P' - */ - 0x80, /* 10000000 */ - 0xe0, /* 11100000 */ - 0xf8, /* 11111000 */ - 0xfe, /* 11111110 */ - 0xf8, /* 11111000 */ - 0xe0, /* 11100000 */ - 0x80, /* 10000000 */ - 0x00, /* 00000000 */ - - /* - * 17 0x11 '^Q' - */ - 0x02, /* 00000010 */ - 0x0e, /* 00001110 */ - 0x3e, /* 00111110 */ - 0xfe, /* 11111110 */ - 0x3e, /* 00111110 */ - 0x0e, /* 00001110 */ - 0x02, /* 00000010 */ - 0x00, /* 00000000 */ - - /* - * 18 0x12 '^R' - */ - 0x18, /* 00011000 */ - 0x3c, /* 00111100 */ - 0x7e, /* 01111110 */ - 0x18, /* 00011000 */ - 0x18, /* 00011000 */ - 0x7e, /* 01111110 */ - 0x3c, /* 00111100 */ - 0x18, /* 00011000 */ - - /* - * 19 0x13 '^S' - */ - 0x66, /* 01100110 */ - 0x66, /* 01100110 */ - 0x66, /* 01100110 */ - 0x66, /* 01100110 */ - 0x66, /* 01100110 */ - 0x00, /* 00000000 */ - 0x66, /* 01100110 */ - 0x00, /* 00000000 */ - - /* - * 20 0x14 '^T' - */ - 0x7f, /* 01111111 */ - 0xdb, /* 11011011 */ - 0xdb, /* 11011011 */ - 0x7b, /* 01111011 */ - 0x1b, /* 00011011 */ - 0x1b, /* 00011011 */ - 0x1b, /* 00011011 */ - 0x00, /* 00000000 */ - - /* - * 21 0x15 '^U' - */ - 0x3e, /* 00111110 */ - 0x61, /* 01100001 */ - 0x3c, /* 00111100 */ - 0x66, /* 01100110 */ - 0x66, /* 01100110 */ - 0x3c, /* 00111100 */ - 0x86, /* 10000110 */ - 0x7c, /* 01111100 */ - - /* - * 22 0x16 '^V' - */ - 0x00, /* 00000000 */ - 0x00, /* 00000000 */ - 0x00, /* 00000000 */ - 0x00, /* 00000000 */ - 0x7e, /* 01111110 */ - 0x7e, /* 01111110 */ - 0x7e, /* 01111110 */ - 0x00, /* 00000000 */ - - /* - * 23 0x17 '^W' - */ - 0x18, /* 00011000 */ - 0x3c, /* 00111100 */ - 0x7e, /* 01111110 */ - 0x18, /* 00011000 */ - 0x7e, /* 01111110 */ - 0x3c, /* 00111100 */ - 0x18, /* 00011000 */ - 0xff, /* 11111111 */ - - /* - * 24 0x18 '^X' - */ - 0x18, /* 00011000 */ - 0x3c, /* 00111100 */ - 0x7e, /* 01111110 */ - 0x18, /* 00011000 */ - 0x18, /* 00011000 */ - 0x18, /* 00011000 */ - 0x18, /* 00011000 */ - 0x00, /* 00000000 */ - - /* - * 25 0x19 '^Y' - */ - 0x18, /* 00011000 */ - 0x18, /* 00011000 */ - 0x18, /* 00011000 */ - 0x18, /* 00011000 */ - 0x7e, /* 01111110 */ - 0x3c, /* 00111100 */ - 0x18, /* 00011000 */ - 0x00, /* 00000000 */ - - /* - * 26 0x1a '^Z' - */ - 0x00, /* 00000000 */ - 0x18, /* 00011000 */ - 0x0c, /* 00001100 */ - 0xfe, /* 11111110 */ - 0x0c, /* 00001100 */ - 0x18, /* 00011000 */ - 0x00, /* 00000000 */ - 0x00, /* 00000000 */ - - /* - * 27 0x1b '^[' - */ - 0x00, /* 00000000 */ - 0x30, /* 00110000 */ - 0x60, /* 01100000 */ - 0xfe, /* 11111110 */ - 0x60, /* 01100000 */ - 0x30, /* 00110000 */ - 0x00, /* 00000000 */ - 0x00, /* 00000000 */ - - /* - * 28 0x1c '^\' - */ - 0x00, /* 00000000 */ - 0x00, /* 00000000 */ - 0xc0, /* 11000000 */ - 0xc0, /* 11000000 */ - 0xc0, /* 11000000 */ - 0xfe, /* 11111110 */ - 0x00, /* 00000000 */ - 0x00, /* 00000000 */ - - /* - * 29 0x1d '^]' - */ - 0x00, /* 00000000 */ - 0x24, /* 00100100 */ - 0x66, /* 01100110 */ - 0xff, /* 11111111 */ - 0x66, /* 01100110 */ - 0x24, /* 00100100 */ - 0x00, /* 00000000 */ - 0x00, /* 00000000 */ - - /* - * 30 0x1e '^^' - */ - 0x00, /* 00000000 */ - 0x18, /* 00011000 */ - 0x3c, /* 00111100 */ - 0x7e, /* 01111110 */ - 0xff, /* 11111111 */ - 0xff, /* 11111111 */ - 0x00, /* 00000000 */ - 0x00, /* 00000000 */ - - /* - * 31 0x1f '^_' - */ - 0x00, /* 00000000 */ - 0xff, /* 11111111 */ - 0xff, /* 11111111 */ - 0x7e, /* 01111110 */ - 0x3c, /* 00111100 */ - 0x18, /* 00011000 */ - 0x00, /* 00000000 */ - 0x00, /* 00000000 */ - - /* - * 32 0x20 ' ' - */ - 0x00, /* 00000000 */ - 0x00, /* 00000000 */ - 0x00, /* 00000000 */ - 0x00, /* 00000000 */ - 0x00, /* 00000000 */ - 0x00, /* 00000000 */ - 0x00, /* 00000000 */ - 0x00, /* 00000000 */ - - /* - * 33 0x21 '!' - */ - 0x18, /* 00011000 */ - 0x3c, /* 00111100 */ - 0x3c, /* 00111100 */ - 0x18, /* 00011000 */ - 0x18, /* 00011000 */ - 0x00, /* 00000000 */ - 0x18, /* 00011000 */ - 0x00, /* 00000000 */ - - /* - * 34 0x22 '"' - */ - 0x66, /* 01100110 */ - 0x66, /* 01100110 */ - 0x24, /* 00100100 */ - 0x00, /* 00000000 */ - 0x00, /* 00000000 */ - 0x00, /* 00000000 */ - 0x00, /* 00000000 */ - 0x00, /* 00000000 */ - - /* - * 35 0x23 '#' - */ - 0x6c, /* 01101100 */ - 0x6c, /* 01101100 */ - 0xfe, /* 11111110 */ - 0x6c, /* 01101100 */ - 0xfe, /* 11111110 */ - 0x6c, /* 01101100 */ - 0x6c, /* 01101100 */ - 0x00, /* 00000000 */ - - /* - * 36 0x24 '$' - */ - 0x18, /* 00011000 */ - 0x3e, /* 00111110 */ - 0x60, /* 01100000 */ - 0x3c, /* 00111100 */ - 0x06, /* 00000110 */ - 0x7c, /* 01111100 */ - 0x18, /* 00011000 */ - 0x00, /* 00000000 */ - - /* - * 37 0x25 '%' - */ - 0x00, /* 00000000 */ - 0xc6, /* 11000110 */ - 0xcc, /* 11001100 */ - 0x18, /* 00011000 */ - 0x30, /* 00110000 */ - 0x66, /* 01100110 */ - 0xc6, /* 11000110 */ - 0x00, /* 00000000 */ - - /* - * 38 0x26 '&' - */ - 0x38, /* 00111000 */ - 0x6c, /* 01101100 */ - 0x38, /* 00111000 */ - 0x76, /* 01110110 */ - 0xdc, /* 11011100 */ - 0xcc, /* 11001100 */ - 0x76, /* 01110110 */ - 0x00, /* 00000000 */ - - /* - * 39 0x27 ''' - */ - 0x18, /* 00011000 */ - 0x18, /* 00011000 */ - 0x30, /* 00110000 */ - 0x00, /* 00000000 */ - 0x00, /* 00000000 */ - 0x00, /* 00000000 */ - 0x00, /* 00000000 */ - 0x00, /* 00000000 */ - - /* - * 40 0x28 '(' - */ - 0x0c, /* 00001100 */ - 0x18, /* 00011000 */ - 0x30, /* 00110000 */ - 0x30, /* 00110000 */ - 0x30, /* 00110000 */ - 0x18, /* 00011000 */ - 0x0c, /* 00001100 */ - 0x00, /* 00000000 */ - - /* - * 41 0x29 ')' - */ - 0x30, /* 00110000 */ - 0x18, /* 00011000 */ - 0x0c, /* 00001100 */ - 0x0c, /* 00001100 */ - 0x0c, /* 00001100 */ - 0x18, /* 00011000 */ - 0x30, /* 00110000 */ - 0x00, /* 00000000 */ - - /* - * 42 0x2a '*' - */ - 0x00, /* 00000000 */ - 0x66, /* 01100110 */ - 0x3c, /* 00111100 */ - 0xff, /* 11111111 */ - 0x3c, /* 00111100 */ - 0x66, /* 01100110 */ - 0x00, /* 00000000 */ - 0x00, /* 00000000 */ - - /* - * 43 0x2b '+' - */ - 0x00, /* 00000000 */ - 0x18, /* 00011000 */ - 0x18, /* 00011000 */ - 0x7e, /* 01111110 */ - 0x18, /* 00011000 */ - 0x18, /* 00011000 */ - 0x00, /* 00000000 */ - 0x00, /* 00000000 */ - - /* - * 44 0x2c ',' - */ - 0x00, /* 00000000 */ - 0x00, /* 00000000 */ - 0x00, /* 00000000 */ - 0x00, /* 00000000 */ - 0x00, /* 00000000 */ - 0x18, /* 00011000 */ - 0x18, /* 00011000 */ - 0x30, /* 00110000 */ - - /* - * 45 0x2d '-' - */ - 0x00, /* 00000000 */ - 0x00, /* 00000000 */ - 0x00, /* 00000000 */ - 0x7e, /* 01111110 */ - 0x00, /* 00000000 */ - 0x00, /* 00000000 */ - 0x00, /* 00000000 */ - 0x00, /* 00000000 */ - - /* - * 46 0x2e '.' - */ - 0x00, /* 00000000 */ - 0x00, /* 00000000 */ - 0x00, /* 00000000 */ - 0x00, /* 00000000 */ - 0x00, /* 00000000 */ - 0x18, /* 00011000 */ - 0x18, /* 00011000 */ - 0x00, /* 00000000 */ - - /* - * 47 0x2f '/' - */ - 0x06, /* 00000110 */ - 0x0c, /* 00001100 */ - 0x18, /* 00011000 */ - 0x30, /* 00110000 */ - 0x60, /* 01100000 */ - 0xc0, /* 11000000 */ - 0x80, /* 10000000 */ - 0x00, /* 00000000 */ - - /* - * 48 0x30 '0' - */ - 0x38, /* 00111000 */ - 0x6c, /* 01101100 */ - 0xc6, /* 11000110 */ - 0xd6, /* 11010110 */ - 0xc6, /* 11000110 */ - 0x6c, /* 01101100 */ - 0x38, /* 00111000 */ - 0x00, /* 00000000 */ - - /* - * 49 0x31 '1' - */ - 0x18, /* 00011000 */ - 0x38, /* 00111000 */ - 0x18, /* 00011000 */ - 0x18, /* 00011000 */ - 0x18, /* 00011000 */ - 0x18, /* 00011000 */ - 0x7e, /* 01111110 */ - 0x00, /* 00000000 */ - - /* - * 50 0x32 '2' - */ - 0x7c, /* 01111100 */ - 0xc6, /* 11000110 */ - 0x06, /* 00000110 */ - 0x1c, /* 00011100 */ - 0x30, /* 00110000 */ - 0x66, /* 01100110 */ - 0xfe, /* 11111110 */ - 0x00, /* 00000000 */ - - /* - * 51 0x33 '3' - */ - 0x7c, /* 01111100 */ - 0xc6, /* 11000110 */ - 0x06, /* 00000110 */ - 0x3c, /* 00111100 */ - 0x06, /* 00000110 */ - 0xc6, /* 11000110 */ - 0x7c, /* 01111100 */ - 0x00, /* 00000000 */ - - /* - * 52 0x34 '4' - */ - 0x1c, /* 00011100 */ - 0x3c, /* 00111100 */ - 0x6c, /* 01101100 */ - 0xcc, /* 11001100 */ - 0xfe, /* 11111110 */ - 0x0c, /* 00001100 */ - 0x1e, /* 00011110 */ - 0x00, /* 00000000 */ - - /* - * 53 0x35 '5' - */ - 0xfe, /* 11111110 */ - 0xc0, /* 11000000 */ - 0xc0, /* 11000000 */ - 0xfc, /* 11111100 */ - 0x06, /* 00000110 */ - 0xc6, /* 11000110 */ - 0x7c, /* 01111100 */ - 0x00, /* 00000000 */ - - /* - * 54 0x36 '6' - */ - 0x38, /* 00111000 */ - 0x60, /* 01100000 */ - 0xc0, /* 11000000 */ - 0xfc, /* 11111100 */ - 0xc6, /* 11000110 */ - 0xc6, /* 11000110 */ - 0x7c, /* 01111100 */ - 0x00, /* 00000000 */ - - /* - * 55 0x37 '7' - */ - 0xfe, /* 11111110 */ - 0xc6, /* 11000110 */ - 0x0c, /* 00001100 */ - 0x18, /* 00011000 */ - 0x30, /* 00110000 */ - 0x30, /* 00110000 */ - 0x30, /* 00110000 */ - 0x00, /* 00000000 */ - - /* - * 56 0x38 '8' - */ - 0x7c, /* 01111100 */ - 0xc6, /* 11000110 */ - 0xc6, /* 11000110 */ - 0x7c, /* 01111100 */ - 0xc6, /* 11000110 */ - 0xc6, /* 11000110 */ - 0x7c, /* 01111100 */ - 0x00, /* 00000000 */ - - /* - * 57 0x39 '9' - */ - 0x7c, /* 01111100 */ - 0xc6, /* 11000110 */ - 0xc6, /* 11000110 */ - 0x7e, /* 01111110 */ - 0x06, /* 00000110 */ - 0x0c, /* 00001100 */ - 0x78, /* 01111000 */ - 0x00, /* 00000000 */ - - /* - * 58 0x3a ':' - */ - 0x00, /* 00000000 */ - 0x18, /* 00011000 */ - 0x18, /* 00011000 */ - 0x00, /* 00000000 */ - 0x00, /* 00000000 */ - 0x18, /* 00011000 */ - 0x18, /* 00011000 */ - 0x00, /* 00000000 */ - - /* - * 59 0x3b ';' - */ - 0x00, /* 00000000 */ - 0x18, /* 00011000 */ - 0x18, /* 00011000 */ - 0x00, /* 00000000 */ - 0x00, /* 00000000 */ - 0x18, /* 00011000 */ - 0x18, /* 00011000 */ - 0x30, /* 00110000 */ - - /* - * 60 0x3c '<' - */ - 0x06, /* 00000110 */ - 0x0c, /* 00001100 */ - 0x18, /* 00011000 */ - 0x30, /* 00110000 */ - 0x18, /* 00011000 */ - 0x0c, /* 00001100 */ - 0x06, /* 00000110 */ - 0x00, /* 00000000 */ - - /* - * 61 0x3d '=' - */ - 0x00, /* 00000000 */ - 0x00, /* 00000000 */ - 0x7e, /* 01111110 */ - 0x00, /* 00000000 */ - 0x00, /* 00000000 */ - 0x7e, /* 01111110 */ - 0x00, /* 00000000 */ - 0x00, /* 00000000 */ - - /* - * 62 0x3e '>' - */ - 0x60, /* 01100000 */ - 0x30, /* 00110000 */ - 0x18, /* 00011000 */ - 0x0c, /* 00001100 */ - 0x18, /* 00011000 */ - 0x30, /* 00110000 */ - 0x60, /* 01100000 */ - 0x00, /* 00000000 */ - - /* - * 63 0x3f '?' - */ - 0x7c, /* 01111100 */ - 0xc6, /* 11000110 */ - 0x0c, /* 00001100 */ - 0x18, /* 00011000 */ - 0x18, /* 00011000 */ - 0x00, /* 00000000 */ - 0x18, /* 00011000 */ - 0x00, /* 00000000 */ - - /* - * 64 0x40 '@' - */ - 0x7c, /* 01111100 */ - 0xc6, /* 11000110 */ - 0xde, /* 11011110 */ - 0xde, /* 11011110 */ - 0xde, /* 11011110 */ - 0xc0, /* 11000000 */ - 0x78, /* 01111000 */ - 0x00, /* 00000000 */ - - /* - * 65 0x41 'A' - */ - 0x38, /* 00111000 */ - 0x6c, /* 01101100 */ - 0xc6, /* 11000110 */ - 0xfe, /* 11111110 */ - 0xc6, /* 11000110 */ - 0xc6, /* 11000110 */ - 0xc6, /* 11000110 */ - 0x00, /* 00000000 */ - - /* - * 66 0x42 'B' - */ - 0xfc, /* 11111100 */ - 0x66, /* 01100110 */ - 0x66, /* 01100110 */ - 0x7c, /* 01111100 */ - 0x66, /* 01100110 */ - 0x66, /* 01100110 */ - 0xfc, /* 11111100 */ - 0x00, /* 00000000 */ - - /* - * 67 0x43 'C' - */ - 0x3c, /* 00111100 */ - 0x66, /* 01100110 */ - 0xc0, /* 11000000 */ - 0xc0, /* 11000000 */ - 0xc0, /* 11000000 */ - 0x66, /* 01100110 */ - 0x3c, /* 00111100 */ - 0x00, /* 00000000 */ - - /* - * 68 0x44 'D' - */ - 0xf8, /* 11111000 */ - 0x6c, /* 01101100 */ - 0x66, /* 01100110 */ - 0x66, /* 01100110 */ - 0x66, /* 01100110 */ - 0x6c, /* 01101100 */ - 0xf8, /* 11111000 */ - 0x00, /* 00000000 */ - - /* - * 69 0x45 'E' - */ - 0xfe, /* 11111110 */ - 0x62, /* 01100010 */ - 0x68, /* 01101000 */ - 0x78, /* 01111000 */ - 0x68, /* 01101000 */ - 0x62, /* 01100010 */ - 0xfe, /* 11111110 */ - 0x00, /* 00000000 */ - - /* - * 70 0x46 'F' - */ - 0xfe, /* 11111110 */ - 0x62, /* 01100010 */ - 0x68, /* 01101000 */ - 0x78, /* 01111000 */ - 0x68, /* 01101000 */ - 0x60, /* 01100000 */ - 0xf0, /* 11110000 */ - 0x00, /* 00000000 */ - - /* - * 71 0x47 'G' - */ - 0x3c, /* 00111100 */ - 0x66, /* 01100110 */ - 0xc0, /* 11000000 */ - 0xc0, /* 11000000 */ - 0xce, /* 11001110 */ - 0x66, /* 01100110 */ - 0x3a, /* 00111010 */ - 0x00, /* 00000000 */ - - /* - * 72 0x48 'H' - */ - 0xc6, /* 11000110 */ - 0xc6, /* 11000110 */ - 0xc6, /* 11000110 */ - 0xfe, /* 11111110 */ - 0xc6, /* 11000110 */ - 0xc6, /* 11000110 */ - 0xc6, /* 11000110 */ - 0x00, /* 00000000 */ - - /* - * 73 0x49 'I' - */ - 0x3c, /* 00111100 */ - 0x18, /* 00011000 */ - 0x18, /* 00011000 */ - 0x18, /* 00011000 */ - 0x18, /* 00011000 */ - 0x18, /* 00011000 */ - 0x3c, /* 00111100 */ - 0x00, /* 00000000 */ - - /* - * 74 0x4a 'J' - */ - 0x1e, /* 00011110 */ - 0x0c, /* 00001100 */ - 0x0c, /* 00001100 */ - 0x0c, /* 00001100 */ - 0xcc, /* 11001100 */ - 0xcc, /* 11001100 */ - 0x78, /* 01111000 */ - 0x00, /* 00000000 */ - - /* - * 75 0x4b 'K' - */ - 0xe6, /* 11100110 */ - 0x66, /* 01100110 */ - 0x6c, /* 01101100 */ - 0x78, /* 01111000 */ - 0x6c, /* 01101100 */ - 0x66, /* 01100110 */ - 0xe6, /* 11100110 */ - 0x00, /* 00000000 */ - - /* - * 76 0x4c 'L' - */ - 0xf0, /* 11110000 */ - 0x60, /* 01100000 */ - 0x60, /* 01100000 */ - 0x60, /* 01100000 */ - 0x62, /* 01100010 */ - 0x66, /* 01100110 */ - 0xfe, /* 11111110 */ - 0x00, /* 00000000 */ - - /* - * 77 0x4d 'M' - */ - 0xc6, /* 11000110 */ - 0xee, /* 11101110 */ - 0xfe, /* 11111110 */ - 0xfe, /* 11111110 */ - 0xd6, /* 11010110 */ - 0xc6, /* 11000110 */ - 0xc6, /* 11000110 */ - 0x00, /* 00000000 */ - - /* - * 78 0x4e 'N' - */ - 0xc6, /* 11000110 */ - 0xe6, /* 11100110 */ - 0xf6, /* 11110110 */ - 0xde, /* 11011110 */ - 0xce, /* 11001110 */ - 0xc6, /* 11000110 */ - 0xc6, /* 11000110 */ - 0x00, /* 00000000 */ - - /* - * 79 0x4f 'O' - */ - 0x7c, /* 01111100 */ - 0xc6, /* 11000110 */ - 0xc6, /* 11000110 */ - 0xc6, /* 11000110 */ - 0xc6, /* 11000110 */ - 0xc6, /* 11000110 */ - 0x7c, /* 01111100 */ - 0x00, /* 00000000 */ - - /* - * 80 0x50 'P' - */ - 0xfc, /* 11111100 */ - 0x66, /* 01100110 */ - 0x66, /* 01100110 */ - 0x7c, /* 01111100 */ - 0x60, /* 01100000 */ - 0x60, /* 01100000 */ - 0xf0, /* 11110000 */ - 0x00, /* 00000000 */ - - /* - * 81 0x51 'Q' - */ - 0x7c, /* 01111100 */ - 0xc6, /* 11000110 */ - 0xc6, /* 11000110 */ - 0xc6, /* 11000110 */ - 0xc6, /* 11000110 */ - 0xce, /* 11001110 */ - 0x7c, /* 01111100 */ - 0x0e, /* 00001110 */ - - /* - * 82 0x52 'R' - */ - 0xfc, /* 11111100 */ - 0x66, /* 01100110 */ - 0x66, /* 01100110 */ - 0x7c, /* 01111100 */ - 0x6c, /* 01101100 */ - 0x66, /* 01100110 */ - 0xe6, /* 11100110 */ - 0x00, /* 00000000 */ - - /* - * 83 0x53 'S' - */ - 0x3c, /* 00111100 */ - 0x66, /* 01100110 */ - 0x30, /* 00110000 */ - 0x18, /* 00011000 */ - 0x0c, /* 00001100 */ - 0x66, /* 01100110 */ - 0x3c, /* 00111100 */ - 0x00, /* 00000000 */ - - /* - * 84 0x54 'T' - */ - 0x7e, /* 01111110 */ - 0x7e, /* 01111110 */ - 0x5a, /* 01011010 */ - 0x18, /* 00011000 */ - 0x18, /* 00011000 */ - 0x18, /* 00011000 */ - 0x3c, /* 00111100 */ - 0x00, /* 00000000 */ - - /* - * 85 0x55 'U' - */ - 0xc6, /* 11000110 */ - 0xc6, /* 11000110 */ - 0xc6, /* 11000110 */ - 0xc6, /* 11000110 */ - 0xc6, /* 11000110 */ - 0xc6, /* 11000110 */ - 0x7c, /* 01111100 */ - 0x00, /* 00000000 */ - - /* - * 86 0x56 'V' - */ - 0xc6, /* 11000110 */ - 0xc6, /* 11000110 */ - 0xc6, /* 11000110 */ - 0xc6, /* 11000110 */ - 0xc6, /* 11000110 */ - 0x6c, /* 01101100 */ - 0x38, /* 00111000 */ - 0x00, /* 00000000 */ - - /* - * 87 0x57 'W' - */ - 0xc6, /* 11000110 */ - 0xc6, /* 11000110 */ - 0xc6, /* 11000110 */ - 0xd6, /* 11010110 */ - 0xd6, /* 11010110 */ - 0xfe, /* 11111110 */ - 0x6c, /* 01101100 */ - 0x00, /* 00000000 */ - - /* - * 88 0x58 'X' - */ - 0xc6, /* 11000110 */ - 0xc6, /* 11000110 */ - 0x6c, /* 01101100 */ - 0x38, /* 00111000 */ - 0x6c, /* 01101100 */ - 0xc6, /* 11000110 */ - 0xc6, /* 11000110 */ - 0x00, /* 00000000 */ - - /* - * 89 0x59 'Y' - */ - 0x66, /* 01100110 */ - 0x66, /* 01100110 */ - 0x66, /* 01100110 */ - 0x3c, /* 00111100 */ - 0x18, /* 00011000 */ - 0x18, /* 00011000 */ - 0x3c, /* 00111100 */ - 0x00, /* 00000000 */ - - /* - * 90 0x5a 'Z' - */ - 0xfe, /* 11111110 */ - 0xc6, /* 11000110 */ - 0x8c, /* 10001100 */ - 0x18, /* 00011000 */ - 0x32, /* 00110010 */ - 0x66, /* 01100110 */ - 0xfe, /* 11111110 */ - 0x00, /* 00000000 */ - - /* - * 91 0x5b '[' - */ - 0x3c, /* 00111100 */ - 0x30, /* 00110000 */ - 0x30, /* 00110000 */ - 0x30, /* 00110000 */ - 0x30, /* 00110000 */ - 0x30, /* 00110000 */ - 0x3c, /* 00111100 */ - 0x00, /* 00000000 */ - - /* - * 92 0x5c '\' - */ - 0xc0, /* 11000000 */ - 0x60, /* 01100000 */ - 0x30, /* 00110000 */ - 0x18, /* 00011000 */ - 0x0c, /* 00001100 */ - 0x06, /* 00000110 */ - 0x02, /* 00000010 */ - 0x00, /* 00000000 */ - - /* - * 93 0x5d ']' - */ - 0x3c, /* 00111100 */ - 0x0c, /* 00001100 */ - 0x0c, /* 00001100 */ - 0x0c, /* 00001100 */ - 0x0c, /* 00001100 */ - 0x0c, /* 00001100 */ - 0x3c, /* 00111100 */ - 0x00, /* 00000000 */ - - /* - * 94 0x5e '^' - */ - 0x10, /* 00010000 */ - 0x38, /* 00111000 */ - 0x6c, /* 01101100 */ - 0xc6, /* 11000110 */ - 0x00, /* 00000000 */ - 0x00, /* 00000000 */ - 0x00, /* 00000000 */ - 0x00, /* 00000000 */ - - /* - * 95 0x5f '_' - */ - 0x00, /* 00000000 */ - 0x00, /* 00000000 */ - 0x00, /* 00000000 */ - 0x00, /* 00000000 */ - 0x00, /* 00000000 */ - 0x00, /* 00000000 */ - 0x00, /* 00000000 */ - 0xff, /* 11111111 */ - - /* - * 96 0x60 '`' - */ - 0x30, /* 00110000 */ - 0x18, /* 00011000 */ - 0x0c, /* 00001100 */ - 0x00, /* 00000000 */ - 0x00, /* 00000000 */ - 0x00, /* 00000000 */ - 0x00, /* 00000000 */ - 0x00, /* 00000000 */ - - /* - * 97 0x61 'a' - */ - 0x00, /* 00000000 */ - 0x00, /* 00000000 */ - 0x78, /* 01111000 */ - 0x0c, /* 00001100 */ - 0x7c, /* 01111100 */ - 0xcc, /* 11001100 */ - 0x76, /* 01110110 */ - 0x00, /* 00000000 */ - - /* - * 98 0x62 'b' - */ - 0xe0, /* 11100000 */ - 0x60, /* 01100000 */ - 0x7c, /* 01111100 */ - 0x66, /* 01100110 */ - 0x66, /* 01100110 */ - 0x66, /* 01100110 */ - 0xdc, /* 11011100 */ - 0x00, /* 00000000 */ - - /* - * 99 0x63 'c' - */ - 0x00, /* 00000000 */ - 0x00, /* 00000000 */ - 0x7c, /* 01111100 */ - 0xc6, /* 11000110 */ - 0xc0, /* 11000000 */ - 0xc6, /* 11000110 */ - 0x7c, /* 01111100 */ - 0x00, /* 00000000 */ - - /* - * 100 0x64 'd' - */ - 0x1c, /* 00011100 */ - 0x0c, /* 00001100 */ - 0x7c, /* 01111100 */ - 0xcc, /* 11001100 */ - 0xcc, /* 11001100 */ - 0xcc, /* 11001100 */ - 0x76, /* 01110110 */ - 0x00, /* 00000000 */ - - /* - * 101 0x65 'e' - */ - 0x00, /* 00000000 */ - 0x00, /* 00000000 */ - 0x7c, /* 01111100 */ - 0xc6, /* 11000110 */ - 0xfe, /* 11111110 */ - 0xc0, /* 11000000 */ - 0x7c, /* 01111100 */ - 0x00, /* 00000000 */ - - /* - * 102 0x66 'f' - */ - 0x3c, /* 00111100 */ - 0x66, /* 01100110 */ - 0x60, /* 01100000 */ - 0xf8, /* 11111000 */ - 0x60, /* 01100000 */ - 0x60, /* 01100000 */ - 0xf0, /* 11110000 */ - 0x00, /* 00000000 */ - - /* - * 103 0x67 'g' - */ - 0x00, /* 00000000 */ - 0x00, /* 00000000 */ - 0x76, /* 01110110 */ - 0xcc, /* 11001100 */ - 0xcc, /* 11001100 */ - 0x7c, /* 01111100 */ - 0x0c, /* 00001100 */ - 0xf8, /* 11111000 */ - - /* - * 104 0x68 'h' - */ - 0xe0, /* 11100000 */ - 0x60, /* 01100000 */ - 0x6c, /* 01101100 */ - 0x76, /* 01110110 */ - 0x66, /* 01100110 */ - 0x66, /* 01100110 */ - 0xe6, /* 11100110 */ - 0x00, /* 00000000 */ - - /* - * 105 0x69 'i' - */ - 0x18, /* 00011000 */ - 0x00, /* 00000000 */ - 0x38, /* 00111000 */ - 0x18, /* 00011000 */ - 0x18, /* 00011000 */ - 0x18, /* 00011000 */ - 0x3c, /* 00111100 */ - 0x00, /* 00000000 */ - - /* - * 106 0x6a 'j' - */ - 0x06, /* 00000110 */ - 0x00, /* 00000000 */ - 0x06, /* 00000110 */ - 0x06, /* 00000110 */ - 0x06, /* 00000110 */ - 0x66, /* 01100110 */ - 0x66, /* 01100110 */ - 0x3c, /* 00111100 */ - - /* - * 107 0x6b 'k' - */ - 0xe0, /* 11100000 */ - 0x60, /* 01100000 */ - 0x66, /* 01100110 */ - 0x6c, /* 01101100 */ - 0x78, /* 01111000 */ - 0x6c, /* 01101100 */ - 0xe6, /* 11100110 */ - 0x00, /* 00000000 */ - - /* - * 108 0x6c 'l' - */ - 0x38, /* 00111000 */ - 0x18, /* 00011000 */ - 0x18, /* 00011000 */ - 0x18, /* 00011000 */ - 0x18, /* 00011000 */ - 0x18, /* 00011000 */ - 0x3c, /* 00111100 */ - 0x00, /* 00000000 */ - - /* - * 109 0x6d 'm' - */ - 0x00, /* 00000000 */ - 0x00, /* 00000000 */ - 0xec, /* 11101100 */ - 0xfe, /* 11111110 */ - 0xd6, /* 11010110 */ - 0xd6, /* 11010110 */ - 0xd6, /* 11010110 */ - 0x00, /* 00000000 */ - - /* - * 110 0x6e 'n' - */ - 0x00, /* 00000000 */ - 0x00, /* 00000000 */ - 0xdc, /* 11011100 */ - 0x66, /* 01100110 */ - 0x66, /* 01100110 */ - 0x66, /* 01100110 */ - 0x66, /* 01100110 */ - 0x00, /* 00000000 */ - - /* - * 111 0x6f 'o' - */ - 0x00, /* 00000000 */ - 0x00, /* 00000000 */ - 0x7c, /* 01111100 */ - 0xc6, /* 11000110 */ - 0xc6, /* 11000110 */ - 0xc6, /* 11000110 */ - 0x7c, /* 01111100 */ - 0x00, /* 00000000 */ - - /* - * 112 0x70 'p' - */ - 0x00, /* 00000000 */ - 0x00, /* 00000000 */ - 0xdc, /* 11011100 */ - 0x66, /* 01100110 */ - 0x66, /* 01100110 */ - 0x7c, /* 01111100 */ - 0x60, /* 01100000 */ - 0xf0, /* 11110000 */ - - /* - * 113 0x71 'q' - */ - 0x00, /* 00000000 */ - 0x00, /* 00000000 */ - 0x76, /* 01110110 */ - 0xcc, /* 11001100 */ - 0xcc, /* 11001100 */ - 0x7c, /* 01111100 */ - 0x0c, /* 00001100 */ - 0x1e, /* 00011110 */ - - /* - * 114 0x72 'r' - */ - 0x00, /* 00000000 */ - 0x00, /* 00000000 */ - 0xdc, /* 11011100 */ - 0x76, /* 01110110 */ - 0x60, /* 01100000 */ - 0x60, /* 01100000 */ - 0xf0, /* 11110000 */ - 0x00, /* 00000000 */ - - /* - * 115 0x73 's' - */ - 0x00, /* 00000000 */ - 0x00, /* 00000000 */ - 0x7e, /* 01111110 */ - 0xc0, /* 11000000 */ - 0x7c, /* 01111100 */ - 0x06, /* 00000110 */ - 0xfc, /* 11111100 */ - 0x00, /* 00000000 */ - - /* - * 116 0x74 't' - */ - 0x30, /* 00110000 */ - 0x30, /* 00110000 */ - 0xfc, /* 11111100 */ - 0x30, /* 00110000 */ - 0x30, /* 00110000 */ - 0x36, /* 00110110 */ - 0x1c, /* 00011100 */ - 0x00, /* 00000000 */ - - /* - * 117 0x75 'u' - */ - 0x00, /* 00000000 */ - 0x00, /* 00000000 */ - 0xcc, /* 11001100 */ - 0xcc, /* 11001100 */ - 0xcc, /* 11001100 */ - 0xcc, /* 11001100 */ - 0x76, /* 01110110 */ - 0x00, /* 00000000 */ - - /* - * 118 0x76 'v' - */ - 0x00, /* 00000000 */ - 0x00, /* 00000000 */ - 0xc6, /* 11000110 */ - 0xc6, /* 11000110 */ - 0xc6, /* 11000110 */ - 0x6c, /* 01101100 */ - 0x38, /* 00111000 */ - 0x00, /* 00000000 */ - - /* - * 119 0x77 'w' - */ - 0x00, /* 00000000 */ - 0x00, /* 00000000 */ - 0xc6, /* 11000110 */ - 0xd6, /* 11010110 */ - 0xd6, /* 11010110 */ - 0xfe, /* 11111110 */ - 0x6c, /* 01101100 */ - 0x00, /* 00000000 */ - - /* - * 120 0x78 'x' - */ - 0x00, /* 00000000 */ - 0x00, /* 00000000 */ - 0xc6, /* 11000110 */ - 0x6c, /* 01101100 */ - 0x38, /* 00111000 */ - 0x6c, /* 01101100 */ - 0xc6, /* 11000110 */ - 0x00, /* 00000000 */ - - /* - * 121 0x79 'y' - */ - 0x00, /* 00000000 */ - 0x00, /* 00000000 */ - 0xc6, /* 11000110 */ - 0xc6, /* 11000110 */ - 0xc6, /* 11000110 */ - 0x7e, /* 01111110 */ - 0x06, /* 00000110 */ - 0xfc, /* 11111100 */ - - /* - * 122 0x7a 'z' - */ - 0x00, /* 00000000 */ - 0x00, /* 00000000 */ - 0x7e, /* 01111110 */ - 0x4c, /* 01001100 */ - 0x18, /* 00011000 */ - 0x32, /* 00110010 */ - 0x7e, /* 01111110 */ - 0x00, /* 00000000 */ - - /* - * 123 0x7b '{' - */ - 0x0e, /* 00001110 */ - 0x18, /* 00011000 */ - 0x18, /* 00011000 */ - 0x70, /* 01110000 */ - 0x18, /* 00011000 */ - 0x18, /* 00011000 */ - 0x0e, /* 00001110 */ - 0x00, /* 00000000 */ - - /* - * 124 0x7c '|' - */ - 0x18, /* 00011000 */ - 0x18, /* 00011000 */ - 0x18, /* 00011000 */ - 0x18, /* 00011000 */ - 0x18, /* 00011000 */ - 0x18, /* 00011000 */ - 0x18, /* 00011000 */ - 0x00, /* 00000000 */ - - /* - * 125 0x7d '}' - */ - 0x70, /* 01110000 */ - 0x18, /* 00011000 */ - 0x18, /* 00011000 */ - 0x0e, /* 00001110 */ - 0x18, /* 00011000 */ - 0x18, /* 00011000 */ - 0x70, /* 01110000 */ - 0x00, /* 00000000 */ - - /* - * 126 0x7e '~' - */ - 0x76, /* 01110110 */ - 0xdc, /* 11011100 */ - 0x00, /* 00000000 */ - 0x00, /* 00000000 */ - 0x00, /* 00000000 */ - 0x00, /* 00000000 */ - 0x00, /* 00000000 */ - 0x00, /* 00000000 */ - - /* - * 127 0x7f '' - */ - 0x00, /* 00000000 */ - 0x10, /* 00010000 */ - 0x38, /* 00111000 */ - 0x6c, /* 01101100 */ - 0xc6, /* 11000110 */ - 0xc6, /* 11000110 */ - 0xfe, /* 11111110 */ - 0x00, /* 00000000 */ - - /* - * 128 0x80 '' - */ - 0x7c, /* 01111100 */ - 0xc6, /* 11000110 */ - 0xc0, /* 11000000 */ - 0xc0, /* 11000000 */ - 0xc6, /* 11000110 */ - 0x7c, /* 01111100 */ - 0x0c, /* 00001100 */ - 0x78, /* 01111000 */ - - /* - * 129 0x81 '' - */ - 0xcc, /* 11001100 */ - 0x00, /* 00000000 */ - 0xcc, /* 11001100 */ - 0xcc, /* 11001100 */ - 0xcc, /* 11001100 */ - 0xcc, /* 11001100 */ - 0x76, /* 01110110 */ - 0x00, /* 00000000 */ - - /* - * 130 0x82 '' - */ - 0x0c, /* 00001100 */ - 0x18, /* 00011000 */ - 0x7c, /* 01111100 */ - 0xc6, /* 11000110 */ - 0xfe, /* 11111110 */ - 0xc0, /* 11000000 */ - 0x7c, /* 01111100 */ - 0x00, /* 00000000 */ - - /* - * 131 0x83 '' - */ - 0x7c, /* 01111100 */ - 0x82, /* 10000010 */ - 0x78, /* 01111000 */ - 0x0c, /* 00001100 */ - 0x7c, /* 01111100 */ - 0xcc, /* 11001100 */ - 0x76, /* 01110110 */ - 0x00, /* 00000000 */ - - /* - * 132 0x84 '' - */ - 0xc6, /* 11000110 */ - 0x00, /* 00000000 */ - 0x78, /* 01111000 */ - 0x0c, /* 00001100 */ - 0x7c, /* 01111100 */ - 0xcc, /* 11001100 */ - 0x76, /* 01110110 */ - 0x00, /* 00000000 */ - - /* - * 133 0x85 '' - */ - 0x30, /* 00110000 */ - 0x18, /* 00011000 */ - 0x78, /* 01111000 */ - 0x0c, /* 00001100 */ - 0x7c, /* 01111100 */ - 0xcc, /* 11001100 */ - 0x76, /* 01110110 */ - 0x00, /* 00000000 */ - - /* - * 134 0x86 '' - */ - 0x30, /* 00110000 */ - 0x30, /* 00110000 */ - 0x78, /* 01111000 */ - 0x0c, /* 00001100 */ - 0x7c, /* 01111100 */ - 0xcc, /* 11001100 */ - 0x76, /* 01110110 */ - 0x00, /* 00000000 */ - - /* - * 135 0x87 '' - */ - 0x00, /* 00000000 */ - 0x00, /* 00000000 */ - 0x7e, /* 01111110 */ - 0xc0, /* 11000000 */ - 0xc0, /* 11000000 */ - 0x7e, /* 01111110 */ - 0x0c, /* 00001100 */ - 0x38, /* 00111000 */ - - /* - * 136 0x88 '' - */ - 0x7c, /* 01111100 */ - 0x82, /* 10000010 */ - 0x7c, /* 01111100 */ - 0xc6, /* 11000110 */ - 0xfe, /* 11111110 */ - 0xc0, /* 11000000 */ - 0x7c, /* 01111100 */ - 0x00, /* 00000000 */ - - /* - * 137 0x89 '' - */ - 0xc6, /* 11000110 */ - 0x00, /* 00000000 */ - 0x7c, /* 01111100 */ - 0xc6, /* 11000110 */ - 0xfe, /* 11111110 */ - 0xc0, /* 11000000 */ - 0x7c, /* 01111100 */ - 0x00, /* 00000000 */ - - /* - * 138 0x8a '' - */ - 0x30, /* 00110000 */ - 0x18, /* 00011000 */ - 0x7c, /* 01111100 */ - 0xc6, /* 11000110 */ - 0xfe, /* 11111110 */ - 0xc0, /* 11000000 */ - 0x7c, /* 01111100 */ - 0x00, /* 00000000 */ - - /* - * 139 0x8b '' - */ - 0x66, /* 01100110 */ - 0x00, /* 00000000 */ - 0x38, /* 00111000 */ - 0x18, /* 00011000 */ - 0x18, /* 00011000 */ - 0x18, /* 00011000 */ - 0x3c, /* 00111100 */ - 0x00, /* 00000000 */ - - /* - * 140 0x8c '' - */ - 0x7c, /* 01111100 */ - 0x82, /* 10000010 */ - 0x38, /* 00111000 */ - 0x18, /* 00011000 */ - 0x18, /* 00011000 */ - 0x18, /* 00011000 */ - 0x3c, /* 00111100 */ - 0x00, /* 00000000 */ - - /* - * 141 0x8d '' - */ - 0x30, /* 00110000 */ - 0x18, /* 00011000 */ - 0x00, /* 00000000 */ - 0x38, /* 00111000 */ - 0x18, /* 00011000 */ - 0x18, /* 00011000 */ - 0x3c, /* 00111100 */ - 0x00, /* 00000000 */ - - /* - * 142 0x8e '' - */ - 0xc6, /* 11000110 */ - 0x38, /* 00111000 */ - 0x6c, /* 01101100 */ - 0xc6, /* 11000110 */ - 0xfe, /* 11111110 */ - 0xc6, /* 11000110 */ - 0xc6, /* 11000110 */ - 0x00, /* 00000000 */ - - /* - * 143 0x8f '' - */ - 0x38, /* 00111000 */ - 0x6c, /* 01101100 */ - 0x7c, /* 01111100 */ - 0xc6, /* 11000110 */ - 0xfe, /* 11111110 */ - 0xc6, /* 11000110 */ - 0xc6, /* 11000110 */ - 0x00, /* 00000000 */ - - /* - * 144 0x90 '' - */ - 0x18, /* 00011000 */ - 0x30, /* 00110000 */ - 0xfe, /* 11111110 */ - 0xc0, /* 11000000 */ - 0xf8, /* 11111000 */ - 0xc0, /* 11000000 */ - 0xfe, /* 11111110 */ - 0x00, /* 00000000 */ - - /* - * 145 0x91 '' - */ - 0x00, /* 00000000 */ - 0x00, /* 00000000 */ - 0x7e, /* 01111110 */ - 0x18, /* 00011000 */ - 0x7e, /* 01111110 */ - 0xd8, /* 11011000 */ - 0x7e, /* 01111110 */ - 0x00, /* 00000000 */ - - /* - * 146 0x92 '' - */ - 0x3e, /* 00111110 */ - 0x6c, /* 01101100 */ - 0xcc, /* 11001100 */ - 0xfe, /* 11111110 */ - 0xcc, /* 11001100 */ - 0xcc, /* 11001100 */ - 0xce, /* 11001110 */ - 0x00, /* 00000000 */ - - /* - * 147 0x93 '' - */ - 0x7c, /* 01111100 */ - 0x82, /* 10000010 */ - 0x7c, /* 01111100 */ - 0xc6, /* 11000110 */ - 0xc6, /* 11000110 */ - 0xc6, /* 11000110 */ - 0x7c, /* 01111100 */ - 0x00, /* 00000000 */ - - /* - * 148 0x94 '' - */ - 0xc6, /* 11000110 */ - 0x00, /* 00000000 */ - 0x7c, /* 01111100 */ - 0xc6, /* 11000110 */ - 0xc6, /* 11000110 */ - 0xc6, /* 11000110 */ - 0x7c, /* 01111100 */ - 0x00, /* 00000000 */ - - /* - * 149 0x95 '' - */ - 0x30, /* 00110000 */ - 0x18, /* 00011000 */ - 0x7c, /* 01111100 */ - 0xc6, /* 11000110 */ - 0xc6, /* 11000110 */ - 0xc6, /* 11000110 */ - 0x7c, /* 01111100 */ - 0x00, /* 00000000 */ - - /* - * 150 0x96 '' - */ - 0x78, /* 01111000 */ - 0x84, /* 10000100 */ - 0x00, /* 00000000 */ - 0xcc, /* 11001100 */ - 0xcc, /* 11001100 */ - 0xcc, /* 11001100 */ - 0x76, /* 01110110 */ - 0x00, /* 00000000 */ - - /* - * 151 0x97 '' - */ - 0x60, /* 01100000 */ - 0x30, /* 00110000 */ - 0xcc, /* 11001100 */ - 0xcc, /* 11001100 */ - 0xcc, /* 11001100 */ - 0xcc, /* 11001100 */ - 0x76, /* 01110110 */ - 0x00, /* 00000000 */ - - /* - * 152 0x98 '' - */ - 0xc6, /* 11000110 */ - 0x00, /* 00000000 */ - 0xc6, /* 11000110 */ - 0xc6, /* 11000110 */ - 0xc6, /* 11000110 */ - 0x7e, /* 01111110 */ - 0x06, /* 00000110 */ - 0xfc, /* 11111100 */ - - /* - * 153 0x99 '' - */ - 0xc6, /* 11000110 */ - 0x38, /* 00111000 */ - 0x6c, /* 01101100 */ - 0xc6, /* 11000110 */ - 0xc6, /* 11000110 */ - 0x6c, /* 01101100 */ - 0x38, /* 00111000 */ - 0x00, /* 00000000 */ - - /* - * 154 0x9a '' - */ - 0xc6, /* 11000110 */ - 0x00, /* 00000000 */ - 0xc6, /* 11000110 */ - 0xc6, /* 11000110 */ - 0xc6, /* 11000110 */ - 0xc6, /* 11000110 */ - 0x7c, /* 01111100 */ - 0x00, /* 00000000 */ - - /* - * 155 0x9b '' - */ - 0x18, /* 00011000 */ - 0x18, /* 00011000 */ - 0x7e, /* 01111110 */ - 0xc0, /* 11000000 */ - 0xc0, /* 11000000 */ - 0x7e, /* 01111110 */ - 0x18, /* 00011000 */ - 0x18, /* 00011000 */ - - /* - * 156 0x9c '' - */ - 0x38, /* 00111000 */ - 0x6c, /* 01101100 */ - 0x64, /* 01100100 */ - 0xf0, /* 11110000 */ - 0x60, /* 01100000 */ - 0x66, /* 01100110 */ - 0xfc, /* 11111100 */ - 0x00, /* 00000000 */ - - /* - * 157 0x9d '' - */ - 0x66, /* 01100110 */ - 0x66, /* 01100110 */ - 0x3c, /* 00111100 */ - 0x7e, /* 01111110 */ - 0x18, /* 00011000 */ - 0x7e, /* 01111110 */ - 0x18, /* 00011000 */ - 0x18, /* 00011000 */ - - /* - * 158 0x9e '' - */ - 0xf8, /* 11111000 */ - 0xcc, /* 11001100 */ - 0xcc, /* 11001100 */ - 0xfa, /* 11111010 */ - 0xc6, /* 11000110 */ - 0xcf, /* 11001111 */ - 0xc6, /* 11000110 */ - 0xc7, /* 11000111 */ - - /* - * 159 0x9f '' - */ - 0x0e, /* 00001110 */ - 0x1b, /* 00011011 */ - 0x18, /* 00011000 */ - 0x3c, /* 00111100 */ - 0x18, /* 00011000 */ - 0xd8, /* 11011000 */ - 0x70, /* 01110000 */ - 0x00, /* 00000000 */ - - /* - * 160 0xa0 '' - */ - 0x18, /* 00011000 */ - 0x30, /* 00110000 */ - 0x78, /* 01111000 */ - 0x0c, /* 00001100 */ - 0x7c, /* 01111100 */ - 0xcc, /* 11001100 */ - 0x76, /* 01110110 */ - 0x00, /* 00000000 */ - - /* - * 161 0xa1 '' - */ - 0x0c, /* 00001100 */ - 0x18, /* 00011000 */ - 0x00, /* 00000000 */ - 0x38, /* 00111000 */ - 0x18, /* 00011000 */ - 0x18, /* 00011000 */ - 0x3c, /* 00111100 */ - 0x00, /* 00000000 */ - - /* - * 162 0xa2 '' - */ - 0x0c, /* 00001100 */ - 0x18, /* 00011000 */ - 0x7c, /* 01111100 */ - 0xc6, /* 11000110 */ - 0xc6, /* 11000110 */ - 0xc6, /* 11000110 */ - 0x7c, /* 01111100 */ - 0x00, /* 00000000 */ - - /* - * 163 0xa3 '' - */ - 0x18, /* 00011000 */ - 0x30, /* 00110000 */ - 0xcc, /* 11001100 */ - 0xcc, /* 11001100 */ - 0xcc, /* 11001100 */ - 0xcc, /* 11001100 */ - 0x76, /* 01110110 */ - 0x00, /* 00000000 */ - - /* - * 164 0xa4 '' - */ - 0x76, /* 01110110 */ - 0xdc, /* 11011100 */ - 0x00, /* 00000000 */ - 0xdc, /* 11011100 */ - 0x66, /* 01100110 */ - 0x66, /* 01100110 */ - 0x66, /* 01100110 */ - 0x00, /* 00000000 */ - - /* - * 165 0xa5 '' - */ - 0x76, /* 01110110 */ - 0xdc, /* 11011100 */ - 0x00, /* 00000000 */ - 0xe6, /* 11100110 */ - 0xf6, /* 11110110 */ - 0xde, /* 11011110 */ - 0xce, /* 11001110 */ - 0x00, /* 00000000 */ - - /* - * 166 0xa6 '' - */ - 0x3c, /* 00111100 */ - 0x6c, /* 01101100 */ - 0x6c, /* 01101100 */ - 0x3e, /* 00111110 */ - 0x00, /* 00000000 */ - 0x7e, /* 01111110 */ - 0x00, /* 00000000 */ - 0x00, /* 00000000 */ - - /* - * 167 0xa7 '' - */ - 0x38, /* 00111000 */ - 0x6c, /* 01101100 */ - 0x6c, /* 01101100 */ - 0x38, /* 00111000 */ - 0x00, /* 00000000 */ - 0x7c, /* 01111100 */ - 0x00, /* 00000000 */ - 0x00, /* 00000000 */ - - /* - * 168 0xa8 '' - */ - 0x18, /* 00011000 */ - 0x00, /* 00000000 */ - 0x18, /* 00011000 */ - 0x18, /* 00011000 */ - 0x30, /* 00110000 */ - 0x63, /* 01100011 */ - 0x3e, /* 00111110 */ - 0x00, /* 00000000 */ - - /* - * 169 0xa9 '' - */ - 0x00, /* 00000000 */ - 0x00, /* 00000000 */ - 0x00, /* 00000000 */ - 0xfe, /* 11111110 */ - 0xc0, /* 11000000 */ - 0xc0, /* 11000000 */ - 0x00, /* 00000000 */ - 0x00, /* 00000000 */ - - /* - * 170 0xaa '' - */ - 0x00, /* 00000000 */ - 0x00, /* 00000000 */ - 0x00, /* 00000000 */ - 0xfe, /* 11111110 */ - 0x06, /* 00000110 */ - 0x06, /* 00000110 */ - 0x00, /* 00000000 */ - 0x00, /* 00000000 */ - - /* - * 171 0xab '' - */ - 0x63, /* 01100011 */ - 0xe6, /* 11100110 */ - 0x6c, /* 01101100 */ - 0x7e, /* 01111110 */ - 0x33, /* 00110011 */ - 0x66, /* 01100110 */ - 0xcc, /* 11001100 */ - 0x0f, /* 00001111 */ - - /* - * 172 0xac '' - */ - 0x63, /* 01100011 */ - 0xe6, /* 11100110 */ - 0x6c, /* 01101100 */ - 0x7a, /* 01111010 */ - 0x36, /* 00110110 */ - 0x6a, /* 01101010 */ - 0xdf, /* 11011111 */ - 0x06, /* 00000110 */ - - /* - * 173 0xad '' - */ - 0x18, /* 00011000 */ - 0x00, /* 00000000 */ - 0x18, /* 00011000 */ - 0x18, /* 00011000 */ - 0x3c, /* 00111100 */ - 0x3c, /* 00111100 */ - 0x18, /* 00011000 */ - 0x00, /* 00000000 */ - - /* - * 174 0xae '' - */ - 0x00, /* 00000000 */ - 0x33, /* 00110011 */ - 0x66, /* 01100110 */ - 0xcc, /* 11001100 */ - 0x66, /* 01100110 */ - 0x33, /* 00110011 */ - 0x00, /* 00000000 */ - 0x00, /* 00000000 */ - - /* - * 175 0xaf '' - */ - 0x00, /* 00000000 */ - 0xcc, /* 11001100 */ - 0x66, /* 01100110 */ - 0x33, /* 00110011 */ - 0x66, /* 01100110 */ - 0xcc, /* 11001100 */ - 0x00, /* 00000000 */ - 0x00, /* 00000000 */ - - /* - * 176 0xb0 '' - */ - 0x22, /* 00100010 */ - 0x88, /* 10001000 */ - 0x22, /* 00100010 */ - 0x88, /* 10001000 */ - 0x22, /* 00100010 */ - 0x88, /* 10001000 */ - 0x22, /* 00100010 */ - 0x88, /* 10001000 */ - - /* - * 177 0xb1 '' - */ - 0x55, /* 01010101 */ - 0xaa, /* 10101010 */ - 0x55, /* 01010101 */ - 0xaa, /* 10101010 */ - 0x55, /* 01010101 */ - 0xaa, /* 10101010 */ - 0x55, /* 01010101 */ - 0xaa, /* 10101010 */ - - /* - * 178 0xb2 '' - */ - 0x77, /* 01110111 */ - 0xdd, /* 11011101 */ - 0x77, /* 01110111 */ - 0xdd, /* 11011101 */ - 0x77, /* 01110111 */ - 0xdd, /* 11011101 */ - 0x77, /* 01110111 */ - 0xdd, /* 11011101 */ - - /* - * 179 0xb3 '' - */ - 0x18, /* 00011000 */ - 0x18, /* 00011000 */ - 0x18, /* 00011000 */ - 0x18, /* 00011000 */ - 0x18, /* 00011000 */ - 0x18, /* 00011000 */ - 0x18, /* 00011000 */ - 0x18, /* 00011000 */ - - /* - * 180 0xb4 '' - */ - 0x18, /* 00011000 */ - 0x18, /* 00011000 */ - 0x18, /* 00011000 */ - 0x18, /* 00011000 */ - 0xf8, /* 11111000 */ - 0x18, /* 00011000 */ - 0x18, /* 00011000 */ - 0x18, /* 00011000 */ - - /* - * 181 0xb5 '' - */ - 0x18, /* 00011000 */ - 0x18, /* 00011000 */ - 0xf8, /* 11111000 */ - 0x18, /* 00011000 */ - 0xf8, /* 11111000 */ - 0x18, /* 00011000 */ - 0x18, /* 00011000 */ - 0x18, /* 00011000 */ - - /* - * 182 0xb6 '' - */ - 0x36, /* 00110110 */ - 0x36, /* 00110110 */ - 0x36, /* 00110110 */ - 0x36, /* 00110110 */ - 0xf6, /* 11110110 */ - 0x36, /* 00110110 */ - 0x36, /* 00110110 */ - 0x36, /* 00110110 */ - - /* - * 183 0xb7 '' - */ - 0x00, /* 00000000 */ - 0x00, /* 00000000 */ - 0x00, /* 00000000 */ - 0x00, /* 00000000 */ - 0xfe, /* 11111110 */ - 0x36, /* 00110110 */ - 0x36, /* 00110110 */ - 0x36, /* 00110110 */ - - /* - * 184 0xb8 '' - */ - 0x00, /* 00000000 */ - 0x00, /* 00000000 */ - 0xf8, /* 11111000 */ - 0x18, /* 00011000 */ - 0xf8, /* 11111000 */ - 0x18, /* 00011000 */ - 0x18, /* 00011000 */ - 0x18, /* 00011000 */ - - /* - * 185 0xb9 '' - */ - 0x36, /* 00110110 */ - 0x36, /* 00110110 */ - 0xf6, /* 11110110 */ - 0x06, /* 00000110 */ - 0xf6, /* 11110110 */ - 0x36, /* 00110110 */ - 0x36, /* 00110110 */ - 0x36, /* 00110110 */ - - /* - * 186 0xba '' - */ - 0x36, /* 00110110 */ - 0x36, /* 00110110 */ - 0x36, /* 00110110 */ - 0x36, /* 00110110 */ - 0x36, /* 00110110 */ - 0x36, /* 00110110 */ - 0x36, /* 00110110 */ - 0x36, /* 00110110 */ - - /* - * 187 0xbb '' - */ - 0x00, /* 00000000 */ - 0x00, /* 00000000 */ - 0xfe, /* 11111110 */ - 0x06, /* 00000110 */ - 0xf6, /* 11110110 */ - 0x36, /* 00110110 */ - 0x36, /* 00110110 */ - 0x36, /* 00110110 */ - - /* - * 188 0xbc '' - */ - 0x36, /* 00110110 */ - 0x36, /* 00110110 */ - 0xf6, /* 11110110 */ - 0x06, /* 00000110 */ - 0xfe, /* 11111110 */ - 0x00, /* 00000000 */ - 0x00, /* 00000000 */ - 0x00, /* 00000000 */ - - /* - * 189 0xbd '' - */ - 0x36, /* 00110110 */ - 0x36, /* 00110110 */ - 0x36, /* 00110110 */ - 0x36, /* 00110110 */ - 0xfe, /* 11111110 */ - 0x00, /* 00000000 */ - 0x00, /* 00000000 */ - 0x00, /* 00000000 */ - - /* - * 190 0xbe '' - */ - 0x18, /* 00011000 */ - 0x18, /* 00011000 */ - 0xf8, /* 11111000 */ - 0x18, /* 00011000 */ - 0xf8, /* 11111000 */ - 0x00, /* 00000000 */ - 0x00, /* 00000000 */ - 0x00, /* 00000000 */ - - /* - * 191 0xbf '' - */ - 0x00, /* 00000000 */ - 0x00, /* 00000000 */ - 0x00, /* 00000000 */ - 0x00, /* 00000000 */ - 0xf8, /* 11111000 */ - 0x18, /* 00011000 */ - 0x18, /* 00011000 */ - 0x18, /* 00011000 */ - - /* - * 192 0xc0 '' - */ - 0x18, /* 00011000 */ - 0x18, /* 00011000 */ - 0x18, /* 00011000 */ - 0x18, /* 00011000 */ - 0x1f, /* 00011111 */ - 0x00, /* 00000000 */ - 0x00, /* 00000000 */ - 0x00, /* 00000000 */ - - /* - * 193 0xc1 '' - */ - 0x18, /* 00011000 */ - 0x18, /* 00011000 */ - 0x18, /* 00011000 */ - 0x18, /* 00011000 */ - 0xff, /* 11111111 */ - 0x00, /* 00000000 */ - 0x00, /* 00000000 */ - 0x00, /* 00000000 */ - - /* - * 194 0xc2 '' - */ - 0x00, /* 00000000 */ - 0x00, /* 00000000 */ - 0x00, /* 00000000 */ - 0x00, /* 00000000 */ - 0xff, /* 11111111 */ - 0x18, /* 00011000 */ - 0x18, /* 00011000 */ - 0x18, /* 00011000 */ - - /* - * 195 0xc3 '' - */ - 0x18, /* 00011000 */ - 0x18, /* 00011000 */ - 0x18, /* 00011000 */ - 0x18, /* 00011000 */ - 0x1f, /* 00011111 */ - 0x18, /* 00011000 */ - 0x18, /* 00011000 */ - 0x18, /* 00011000 */ - - /* - * 196 0xc4 '' - */ - 0x00, /* 00000000 */ - 0x00, /* 00000000 */ - 0x00, /* 00000000 */ - 0x00, /* 00000000 */ - 0xff, /* 11111111 */ - 0x00, /* 00000000 */ - 0x00, /* 00000000 */ - 0x00, /* 00000000 */ - - /* - * 197 0xc5 '' - */ - 0x18, /* 00011000 */ - 0x18, /* 00011000 */ - 0x18, /* 00011000 */ - 0x18, /* 00011000 */ - 0xff, /* 11111111 */ - 0x18, /* 00011000 */ - 0x18, /* 00011000 */ - 0x18, /* 00011000 */ - - /* - * 198 0xc6 '' - */ - 0x18, /* 00011000 */ - 0x18, /* 00011000 */ - 0x1f, /* 00011111 */ - 0x18, /* 00011000 */ - 0x1f, /* 00011111 */ - 0x18, /* 00011000 */ - 0x18, /* 00011000 */ - 0x18, /* 00011000 */ - - /* - * 199 0xc7 '' - */ - 0x36, /* 00110110 */ - 0x36, /* 00110110 */ - 0x36, /* 00110110 */ - 0x36, /* 00110110 */ - 0x37, /* 00110111 */ - 0x36, /* 00110110 */ - 0x36, /* 00110110 */ - 0x36, /* 00110110 */ - - /* - * 200 0xc8 '' - */ - 0x36, /* 00110110 */ - 0x36, /* 00110110 */ - 0x37, /* 00110111 */ - 0x30, /* 00110000 */ - 0x3f, /* 00111111 */ - 0x00, /* 00000000 */ - 0x00, /* 00000000 */ - 0x00, /* 00000000 */ - - /* - * 201 0xc9 '' - */ - 0x00, /* 00000000 */ - 0x00, /* 00000000 */ - 0x3f, /* 00111111 */ - 0x30, /* 00110000 */ - 0x37, /* 00110111 */ - 0x36, /* 00110110 */ - 0x36, /* 00110110 */ - 0x36, /* 00110110 */ - - /* - * 202 0xca '' - */ - 0x36, /* 00110110 */ - 0x36, /* 00110110 */ - 0xf7, /* 11110111 */ - 0x00, /* 00000000 */ - 0xff, /* 11111111 */ - 0x00, /* 00000000 */ - 0x00, /* 00000000 */ - 0x00, /* 00000000 */ - - /* - * 203 0xcb '' - */ - 0x00, /* 00000000 */ - 0x00, /* 00000000 */ - 0xff, /* 11111111 */ - 0x00, /* 00000000 */ - 0xf7, /* 11110111 */ - 0x36, /* 00110110 */ - 0x36, /* 00110110 */ - 0x36, /* 00110110 */ - - /* - * 204 0xcc '' - */ - 0x36, /* 00110110 */ - 0x36, /* 00110110 */ - 0x37, /* 00110111 */ - 0x30, /* 00110000 */ - 0x37, /* 00110111 */ - 0x36, /* 00110110 */ - 0x36, /* 00110110 */ - 0x36, /* 00110110 */ - - /* - * 205 0xcd '' - */ - 0x00, /* 00000000 */ - 0x00, /* 00000000 */ - 0xff, /* 11111111 */ - 0x00, /* 00000000 */ - 0xff, /* 11111111 */ - 0x00, /* 00000000 */ - 0x00, /* 00000000 */ - 0x00, /* 00000000 */ - - /* - * 206 0xce '' - */ - 0x36, /* 00110110 */ - 0x36, /* 00110110 */ - 0xf7, /* 11110111 */ - 0x00, /* 00000000 */ - 0xf7, /* 11110111 */ - 0x36, /* 00110110 */ - 0x36, /* 00110110 */ - 0x36, /* 00110110 */ - - /* - * 207 0xcf '' - */ - 0x18, /* 00011000 */ - 0x18, /* 00011000 */ - 0xff, /* 11111111 */ - 0x00, /* 00000000 */ - 0xff, /* 11111111 */ - 0x00, /* 00000000 */ - 0x00, /* 00000000 */ - 0x00, /* 00000000 */ - - /* - * 208 0xd0 '' - */ - 0x36, /* 00110110 */ - 0x36, /* 00110110 */ - 0x36, /* 00110110 */ - 0x36, /* 00110110 */ - 0xff, /* 11111111 */ - 0x00, /* 00000000 */ - 0x00, /* 00000000 */ - 0x00, /* 00000000 */ - - /* - * 209 0xd1 '' - */ - 0x00, /* 00000000 */ - 0x00, /* 00000000 */ - 0xff, /* 11111111 */ - 0x00, /* 00000000 */ - 0xff, /* 11111111 */ - 0x18, /* 00011000 */ - 0x18, /* 00011000 */ - 0x18, /* 00011000 */ - - /* - * 210 0xd2 '' - */ - 0x00, /* 00000000 */ - 0x00, /* 00000000 */ - 0x00, /* 00000000 */ - 0x00, /* 00000000 */ - 0xff, /* 11111111 */ - 0x36, /* 00110110 */ - 0x36, /* 00110110 */ - 0x36, /* 00110110 */ - - /* - * 211 0xd3 '' - */ - 0x36, /* 00110110 */ - 0x36, /* 00110110 */ - 0x36, /* 00110110 */ - 0x36, /* 00110110 */ - 0x3f, /* 00111111 */ - 0x00, /* 00000000 */ - 0x00, /* 00000000 */ - 0x00, /* 00000000 */ - - /* - * 212 0xd4 '' - */ - 0x18, /* 00011000 */ - 0x18, /* 00011000 */ - 0x1f, /* 00011111 */ - 0x18, /* 00011000 */ - 0x1f, /* 00011111 */ - 0x00, /* 00000000 */ - 0x00, /* 00000000 */ - 0x00, /* 00000000 */ - - /* - * 213 0xd5 '' - */ - 0x00, /* 00000000 */ - 0x00, /* 00000000 */ - 0x1f, /* 00011111 */ - 0x18, /* 00011000 */ - 0x1f, /* 00011111 */ - 0x18, /* 00011000 */ - 0x18, /* 00011000 */ - 0x18, /* 00011000 */ - - /* - * 214 0xd6 '' - */ - 0x00, /* 00000000 */ - 0x00, /* 00000000 */ - 0x00, /* 00000000 */ - 0x00, /* 00000000 */ - 0x3f, /* 00111111 */ - 0x36, /* 00110110 */ - 0x36, /* 00110110 */ - 0x36, /* 00110110 */ - - /* - * 215 0xd7 '' - */ - 0x36, /* 00110110 */ - 0x36, /* 00110110 */ - 0x36, /* 00110110 */ - 0x36, /* 00110110 */ - 0xff, /* 11111111 */ - 0x36, /* 00110110 */ - 0x36, /* 00110110 */ - 0x36, /* 00110110 */ - - /* - * 216 0xd8 '' - */ - 0x18, /* 00011000 */ - 0x18, /* 00011000 */ - 0xff, /* 11111111 */ - 0x18, /* 00011000 */ - 0xff, /* 11111111 */ - 0x18, /* 00011000 */ - 0x18, /* 00011000 */ - 0x18, /* 00011000 */ - - /* - * 217 0xd9 '' - */ - 0x18, /* 00011000 */ - 0x18, /* 00011000 */ - 0x18, /* 00011000 */ - 0x18, /* 00011000 */ - 0xf8, /* 11111000 */ - 0x00, /* 00000000 */ - 0x00, /* 00000000 */ - 0x00, /* 00000000 */ - - /* - * 218 0xda '' - */ - 0x00, /* 00000000 */ - 0x00, /* 00000000 */ - 0x00, /* 00000000 */ - 0x00, /* 00000000 */ - 0x1f, /* 00011111 */ - 0x18, /* 00011000 */ - 0x18, /* 00011000 */ - 0x18, /* 00011000 */ - - /* - * 219 0xdb '' - */ - 0xff, /* 11111111 */ - 0xff, /* 11111111 */ - 0xff, /* 11111111 */ - 0xff, /* 11111111 */ - 0xff, /* 11111111 */ - 0xff, /* 11111111 */ - 0xff, /* 11111111 */ - 0xff, /* 11111111 */ - - /* - * 220 0xdc '' - */ - 0x00, /* 00000000 */ - 0x00, /* 00000000 */ - 0x00, /* 00000000 */ - 0x00, /* 00000000 */ - 0xff, /* 11111111 */ - 0xff, /* 11111111 */ - 0xff, /* 11111111 */ - 0xff, /* 11111111 */ - - /* - * 221 0xdd '' - */ - 0xf0, /* 11110000 */ - 0xf0, /* 11110000 */ - 0xf0, /* 11110000 */ - 0xf0, /* 11110000 */ - 0xf0, /* 11110000 */ - 0xf0, /* 11110000 */ - 0xf0, /* 11110000 */ - 0xf0, /* 11110000 */ - - /* - * 222 0xde '' - */ - 0x0f, /* 00001111 */ - 0x0f, /* 00001111 */ - 0x0f, /* 00001111 */ - 0x0f, /* 00001111 */ - 0x0f, /* 00001111 */ - 0x0f, /* 00001111 */ - 0x0f, /* 00001111 */ - 0x0f, /* 00001111 */ - - /* - * 223 0xdf '' - */ - 0xff, /* 11111111 */ - 0xff, /* 11111111 */ - 0xff, /* 11111111 */ - 0xff, /* 11111111 */ - 0x00, /* 00000000 */ - 0x00, /* 00000000 */ - 0x00, /* 00000000 */ - 0x00, /* 00000000 */ - - /* - * 224 0xe0 '' - */ - 0x00, /* 00000000 */ - 0x00, /* 00000000 */ - 0x76, /* 01110110 */ - 0xdc, /* 11011100 */ - 0xc8, /* 11001000 */ - 0xdc, /* 11011100 */ - 0x76, /* 01110110 */ - 0x00, /* 00000000 */ - - /* - * 225 0xe1 '' - */ - 0x78, /* 01111000 */ - 0xcc, /* 11001100 */ - 0xcc, /* 11001100 */ - 0xd8, /* 11011000 */ - 0xcc, /* 11001100 */ - 0xc6, /* 11000110 */ - 0xcc, /* 11001100 */ - 0x00, /* 00000000 */ - - /* - * 226 0xe2 '' - */ - 0xfe, /* 11111110 */ - 0xc6, /* 11000110 */ - 0xc0, /* 11000000 */ - 0xc0, /* 11000000 */ - 0xc0, /* 11000000 */ - 0xc0, /* 11000000 */ - 0xc0, /* 11000000 */ - 0x00, /* 00000000 */ - - /* - * 227 0xe3 '' - */ - 0x00, /* 00000000 */ - 0x00, /* 00000000 */ - 0xfe, /* 11111110 */ - 0x6c, /* 01101100 */ - 0x6c, /* 01101100 */ - 0x6c, /* 01101100 */ - 0x6c, /* 01101100 */ - 0x00, /* 00000000 */ - - /* - * 228 0xe4 '' - */ - 0xfe, /* 11111110 */ - 0xc6, /* 11000110 */ - 0x60, /* 01100000 */ - 0x30, /* 00110000 */ - 0x60, /* 01100000 */ - 0xc6, /* 11000110 */ - 0xfe, /* 11111110 */ - 0x00, /* 00000000 */ - - /* - * 229 0xe5 '' - */ - 0x00, /* 00000000 */ - 0x00, /* 00000000 */ - 0x7e, /* 01111110 */ - 0xd8, /* 11011000 */ - 0xd8, /* 11011000 */ - 0xd8, /* 11011000 */ - 0x70, /* 01110000 */ - 0x00, /* 00000000 */ - - /* - * 230 0xe6 '' - */ - 0x00, /* 00000000 */ - 0x00, /* 00000000 */ - 0x66, /* 01100110 */ - 0x66, /* 01100110 */ - 0x66, /* 01100110 */ - 0x66, /* 01100110 */ - 0x7c, /* 01111100 */ - 0xc0, /* 11000000 */ - - /* - * 231 0xe7 '' - */ - 0x00, /* 00000000 */ - 0x76, /* 01110110 */ - 0xdc, /* 11011100 */ - 0x18, /* 00011000 */ - 0x18, /* 00011000 */ - 0x18, /* 00011000 */ - 0x18, /* 00011000 */ - 0x00, /* 00000000 */ - - /* - * 232 0xe8 '' - */ - 0x7e, /* 01111110 */ - 0x18, /* 00011000 */ - 0x3c, /* 00111100 */ - 0x66, /* 01100110 */ - 0x66, /* 01100110 */ - 0x3c, /* 00111100 */ - 0x18, /* 00011000 */ - 0x7e, /* 01111110 */ - - /* - * 233 0xe9 '' - */ - 0x38, /* 00111000 */ - 0x6c, /* 01101100 */ - 0xc6, /* 11000110 */ - 0xfe, /* 11111110 */ - 0xc6, /* 11000110 */ - 0x6c, /* 01101100 */ - 0x38, /* 00111000 */ - 0x00, /* 00000000 */ - - /* - * 234 0xea '' - */ - 0x38, /* 00111000 */ - 0x6c, /* 01101100 */ - 0xc6, /* 11000110 */ - 0xc6, /* 11000110 */ - 0x6c, /* 01101100 */ - 0x6c, /* 01101100 */ - 0xee, /* 11101110 */ - 0x00, /* 00000000 */ - - /* - * 235 0xeb '' - */ - 0x0e, /* 00001110 */ - 0x18, /* 00011000 */ - 0x0c, /* 00001100 */ - 0x3e, /* 00111110 */ - 0x66, /* 01100110 */ - 0x66, /* 01100110 */ - 0x3c, /* 00111100 */ - 0x00, /* 00000000 */ - - /* - * 236 0xec '' - */ - 0x00, /* 00000000 */ - 0x00, /* 00000000 */ - 0x7e, /* 01111110 */ - 0xdb, /* 11011011 */ - 0xdb, /* 11011011 */ - 0x7e, /* 01111110 */ - 0x00, /* 00000000 */ - 0x00, /* 00000000 */ - - /* - * 237 0xed '' - */ - 0x06, /* 00000110 */ - 0x0c, /* 00001100 */ - 0x7e, /* 01111110 */ - 0xdb, /* 11011011 */ - 0xdb, /* 11011011 */ - 0x7e, /* 01111110 */ - 0x60, /* 01100000 */ - 0xc0, /* 11000000 */ - - /* - * 238 0xee '' - */ - 0x1e, /* 00011110 */ - 0x30, /* 00110000 */ - 0x60, /* 01100000 */ - 0x7e, /* 01111110 */ - 0x60, /* 01100000 */ - 0x30, /* 00110000 */ - 0x1e, /* 00011110 */ - 0x00, /* 00000000 */ - - /* - * 239 0xef '' - */ - 0x00, /* 00000000 */ - 0x7c, /* 01111100 */ - 0xc6, /* 11000110 */ - 0xc6, /* 11000110 */ - 0xc6, /* 11000110 */ - 0xc6, /* 11000110 */ - 0xc6, /* 11000110 */ - 0x00, /* 00000000 */ - - /* - * 240 0xf0 '' - */ - 0x00, /* 00000000 */ - 0xfe, /* 11111110 */ - 0x00, /* 00000000 */ - 0xfe, /* 11111110 */ - 0x00, /* 00000000 */ - 0xfe, /* 11111110 */ - 0x00, /* 00000000 */ - 0x00, /* 00000000 */ - - /* - * 241 0xf1 '' - */ - 0x18, /* 00011000 */ - 0x18, /* 00011000 */ - 0x7e, /* 01111110 */ - 0x18, /* 00011000 */ - 0x18, /* 00011000 */ - 0x00, /* 00000000 */ - 0x7e, /* 01111110 */ - 0x00, /* 00000000 */ - - /* - * 242 0xf2 '' - */ - 0x30, /* 00110000 */ - 0x18, /* 00011000 */ - 0x0c, /* 00001100 */ - 0x18, /* 00011000 */ - 0x30, /* 00110000 */ - 0x00, /* 00000000 */ - 0x7e, /* 01111110 */ - 0x00, /* 00000000 */ - - /* - * 243 0xf3 '' - */ - 0x0c, /* 00001100 */ - 0x18, /* 00011000 */ - 0x30, /* 00110000 */ - 0x18, /* 00011000 */ - 0x0c, /* 00001100 */ - 0x00, /* 00000000 */ - 0x7e, /* 01111110 */ - 0x00, /* 00000000 */ - - /* - * 244 0xf4 '' - */ - 0x0e, /* 00001110 */ - 0x1b, /* 00011011 */ - 0x1b, /* 00011011 */ - 0x18, /* 00011000 */ - 0x18, /* 00011000 */ - 0x18, /* 00011000 */ - 0x18, /* 00011000 */ - 0x18, /* 00011000 */ - - /* - * 245 0xf5 '' - */ - 0x18, /* 00011000 */ - 0x18, /* 00011000 */ - 0x18, /* 00011000 */ - 0x18, /* 00011000 */ - 0x18, /* 00011000 */ - 0xd8, /* 11011000 */ - 0xd8, /* 11011000 */ - 0x70, /* 01110000 */ - - /* - * 246 0xf6 '' - */ - 0x00, /* 00000000 */ - 0x18, /* 00011000 */ - 0x00, /* 00000000 */ - 0x7e, /* 01111110 */ - 0x00, /* 00000000 */ - 0x18, /* 00011000 */ - 0x00, /* 00000000 */ - 0x00, /* 00000000 */ - - /* - * 247 0xf7 '' - */ - 0x00, /* 00000000 */ - 0x76, /* 01110110 */ - 0xdc, /* 11011100 */ - 0x00, /* 00000000 */ - 0x76, /* 01110110 */ - 0xdc, /* 11011100 */ - 0x00, /* 00000000 */ - 0x00, /* 00000000 */ - - /* - * 248 0xf8 '' - */ - 0x38, /* 00111000 */ - 0x6c, /* 01101100 */ - 0x6c, /* 01101100 */ - 0x38, /* 00111000 */ - 0x00, /* 00000000 */ - 0x00, /* 00000000 */ - 0x00, /* 00000000 */ - 0x00, /* 00000000 */ - - /* - * 249 0xf9 '' - */ - 0x00, /* 00000000 */ - 0x00, /* 00000000 */ - 0x00, /* 00000000 */ - 0x18, /* 00011000 */ - 0x18, /* 00011000 */ - 0x00, /* 00000000 */ - 0x00, /* 00000000 */ - 0x00, /* 00000000 */ - - /* - * 250 0xfa '' - */ - 0x00, /* 00000000 */ - 0x00, /* 00000000 */ - 0x00, /* 00000000 */ - 0x18, /* 00011000 */ - 0x00, /* 00000000 */ - 0x00, /* 00000000 */ - 0x00, /* 00000000 */ - 0x00, /* 00000000 */ - - /* - * 251 0xfb '' - */ - 0x0f, /* 00001111 */ - 0x0c, /* 00001100 */ - 0x0c, /* 00001100 */ - 0x0c, /* 00001100 */ - 0xec, /* 11101100 */ - 0x6c, /* 01101100 */ - 0x3c, /* 00111100 */ - 0x1c, /* 00011100 */ - - /* - * 252 0xfc '' - */ - 0x6c, /* 01101100 */ - 0x36, /* 00110110 */ - 0x36, /* 00110110 */ - 0x36, /* 00110110 */ - 0x36, /* 00110110 */ - 0x00, /* 00000000 */ - 0x00, /* 00000000 */ - 0x00, /* 00000000 */ - - /* - * 253 0xfd '' - */ - 0x78, /* 01111000 */ - 0x0c, /* 00001100 */ - 0x18, /* 00011000 */ - 0x30, /* 00110000 */ - 0x7c, /* 01111100 */ - 0x00, /* 00000000 */ - 0x00, /* 00000000 */ - 0x00, /* 00000000 */ - - /* - * 254 0xfe '' - */ - 0x00, /* 00000000 */ - 0x00, /* 00000000 */ - 0x3c, /* 00111100 */ - 0x3c, /* 00111100 */ - 0x3c, /* 00111100 */ - 0x3c, /* 00111100 */ - 0x00, /* 00000000 */ - 0x00, /* 00000000 */ - - /* - * 255 0xff ' ' - */ - 0x00, /* 00000000 */ - 0x00, /* 00000000 */ - 0x00, /* 00000000 */ - 0x00, /* 00000000 */ - 0x00, /* 00000000 */ - 0x00, /* 00000000 */ - 0x00, /* 00000000 */ - 0x00, /* 00000000 */ + /* + * 0 0x00 '^@' + */ + 0x00, /* 00000000 */ + 0x00, /* 00000000 */ + 0x00, /* 00000000 */ + 0x00, /* 00000000 */ + 0x00, /* 00000000 */ + 0x00, /* 00000000 */ + 0x00, /* 00000000 */ + 0x00, /* 00000000 */ + + /* + * 1 0x01 '^A' + */ + 0x7e, /* 01111110 */ + 0x81, /* 10000001 */ + 0xa5, /* 10100101 */ + 0x81, /* 10000001 */ + 0xbd, /* 10111101 */ + 0x99, /* 10011001 */ + 0x81, /* 10000001 */ + 0x7e, /* 01111110 */ + + /* + * 2 0x02 '^B' + */ + 0x7e, /* 01111110 */ + 0xff, /* 11111111 */ + 0xdb, /* 11011011 */ + 0xff, /* 11111111 */ + 0xc3, /* 11000011 */ + 0xe7, /* 11100111 */ + 0xff, /* 11111111 */ + 0x7e, /* 01111110 */ + + /* + * 3 0x03 '^C' + */ + 0x6c, /* 01101100 */ + 0xfe, /* 11111110 */ + 0xfe, /* 11111110 */ + 0xfe, /* 11111110 */ + 0x7c, /* 01111100 */ + 0x38, /* 00111000 */ + 0x10, /* 00010000 */ + 0x00, /* 00000000 */ + + /* + * 4 0x04 '^D' + */ + 0x10, /* 00010000 */ + 0x38, /* 00111000 */ + 0x7c, /* 01111100 */ + 0xfe, /* 11111110 */ + 0x7c, /* 01111100 */ + 0x38, /* 00111000 */ + 0x10, /* 00010000 */ + 0x00, /* 00000000 */ + + /* + * 5 0x05 '^E' + */ + 0x38, /* 00111000 */ + 0x7c, /* 01111100 */ + 0x38, /* 00111000 */ + 0xfe, /* 11111110 */ + 0xfe, /* 11111110 */ + 0xd6, /* 11010110 */ + 0x10, /* 00010000 */ + 0x38, /* 00111000 */ + + /* + * 6 0x06 '^F' + */ + 0x10, /* 00010000 */ + 0x38, /* 00111000 */ + 0x7c, /* 01111100 */ + 0xfe, /* 11111110 */ + 0xfe, /* 11111110 */ + 0x7c, /* 01111100 */ + 0x10, /* 00010000 */ + 0x38, /* 00111000 */ + + /* + * 7 0x07 '^G' + */ + 0x00, /* 00000000 */ + 0x00, /* 00000000 */ + 0x18, /* 00011000 */ + 0x3c, /* 00111100 */ + 0x3c, /* 00111100 */ + 0x18, /* 00011000 */ + 0x00, /* 00000000 */ + 0x00, /* 00000000 */ + + /* + * 8 0x08 '^H' + */ + 0xff, /* 11111111 */ + 0xff, /* 11111111 */ + 0xe7, /* 11100111 */ + 0xc3, /* 11000011 */ + 0xc3, /* 11000011 */ + 0xe7, /* 11100111 */ + 0xff, /* 11111111 */ + 0xff, /* 11111111 */ + + /* + * 9 0x09 '^I' + */ + 0x00, /* 00000000 */ + 0x3c, /* 00111100 */ + 0x66, /* 01100110 */ + 0x42, /* 01000010 */ + 0x42, /* 01000010 */ + 0x66, /* 01100110 */ + 0x3c, /* 00111100 */ + 0x00, /* 00000000 */ + + /* + * 10 0x0a '^J' + */ + 0xff, /* 11111111 */ + 0xc3, /* 11000011 */ + 0x99, /* 10011001 */ + 0xbd, /* 10111101 */ + 0xbd, /* 10111101 */ + 0x99, /* 10011001 */ + 0xc3, /* 11000011 */ + 0xff, /* 11111111 */ + + /* + * 11 0x0b '^K' + */ + 0x0f, /* 00001111 */ + 0x07, /* 00000111 */ + 0x0f, /* 00001111 */ + 0x7d, /* 01111101 */ + 0xcc, /* 11001100 */ + 0xcc, /* 11001100 */ + 0xcc, /* 11001100 */ + 0x78, /* 01111000 */ + + /* + * 12 0x0c '^L' + */ + 0x3c, /* 00111100 */ + 0x66, /* 01100110 */ + 0x66, /* 01100110 */ + 0x66, /* 01100110 */ + 0x3c, /* 00111100 */ + 0x18, /* 00011000 */ + 0x7e, /* 01111110 */ + 0x18, /* 00011000 */ + + /* + * 13 0x0d '^M' + */ + 0x3f, /* 00111111 */ + 0x33, /* 00110011 */ + 0x3f, /* 00111111 */ + 0x30, /* 00110000 */ + 0x30, /* 00110000 */ + 0x70, /* 01110000 */ + 0xf0, /* 11110000 */ + 0xe0, /* 11100000 */ + + /* + * 14 0x0e '^N' + */ + 0x7f, /* 01111111 */ + 0x63, /* 01100011 */ + 0x7f, /* 01111111 */ + 0x63, /* 01100011 */ + 0x63, /* 01100011 */ + 0x67, /* 01100111 */ + 0xe6, /* 11100110 */ + 0xc0, /* 11000000 */ + + /* + * 15 0x0f '^O' + */ + 0x18, /* 00011000 */ + 0xdb, /* 11011011 */ + 0x3c, /* 00111100 */ + 0xe7, /* 11100111 */ + 0xe7, /* 11100111 */ + 0x3c, /* 00111100 */ + 0xdb, /* 11011011 */ + 0x18, /* 00011000 */ + + /* + * 16 0x10 '^P' + */ + 0x80, /* 10000000 */ + 0xe0, /* 11100000 */ + 0xf8, /* 11111000 */ + 0xfe, /* 11111110 */ + 0xf8, /* 11111000 */ + 0xe0, /* 11100000 */ + 0x80, /* 10000000 */ + 0x00, /* 00000000 */ + + /* + * 17 0x11 '^Q' + */ + 0x02, /* 00000010 */ + 0x0e, /* 00001110 */ + 0x3e, /* 00111110 */ + 0xfe, /* 11111110 */ + 0x3e, /* 00111110 */ + 0x0e, /* 00001110 */ + 0x02, /* 00000010 */ + 0x00, /* 00000000 */ + + /* + * 18 0x12 '^R' + */ + 0x18, /* 00011000 */ + 0x3c, /* 00111100 */ + 0x7e, /* 01111110 */ + 0x18, /* 00011000 */ + 0x18, /* 00011000 */ + 0x7e, /* 01111110 */ + 0x3c, /* 00111100 */ + 0x18, /* 00011000 */ + + /* + * 19 0x13 '^S' + */ + 0x66, /* 01100110 */ + 0x66, /* 01100110 */ + 0x66, /* 01100110 */ + 0x66, /* 01100110 */ + 0x66, /* 01100110 */ + 0x00, /* 00000000 */ + 0x66, /* 01100110 */ + 0x00, /* 00000000 */ + + /* + * 20 0x14 '^T' + */ + 0x7f, /* 01111111 */ + 0xdb, /* 11011011 */ + 0xdb, /* 11011011 */ + 0x7b, /* 01111011 */ + 0x1b, /* 00011011 */ + 0x1b, /* 00011011 */ + 0x1b, /* 00011011 */ + 0x00, /* 00000000 */ + + /* + * 21 0x15 '^U' + */ + 0x3e, /* 00111110 */ + 0x61, /* 01100001 */ + 0x3c, /* 00111100 */ + 0x66, /* 01100110 */ + 0x66, /* 01100110 */ + 0x3c, /* 00111100 */ + 0x86, /* 10000110 */ + 0x7c, /* 01111100 */ + + /* + * 22 0x16 '^V' + */ + 0x00, /* 00000000 */ + 0x00, /* 00000000 */ + 0x00, /* 00000000 */ + 0x00, /* 00000000 */ + 0x7e, /* 01111110 */ + 0x7e, /* 01111110 */ + 0x7e, /* 01111110 */ + 0x00, /* 00000000 */ + + /* + * 23 0x17 '^W' + */ + 0x18, /* 00011000 */ + 0x3c, /* 00111100 */ + 0x7e, /* 01111110 */ + 0x18, /* 00011000 */ + 0x7e, /* 01111110 */ + 0x3c, /* 00111100 */ + 0x18, /* 00011000 */ + 0xff, /* 11111111 */ + + /* + * 24 0x18 '^X' + */ + 0x18, /* 00011000 */ + 0x3c, /* 00111100 */ + 0x7e, /* 01111110 */ + 0x18, /* 00011000 */ + 0x18, /* 00011000 */ + 0x18, /* 00011000 */ + 0x18, /* 00011000 */ + 0x00, /* 00000000 */ + + /* + * 25 0x19 '^Y' + */ + 0x18, /* 00011000 */ + 0x18, /* 00011000 */ + 0x18, /* 00011000 */ + 0x18, /* 00011000 */ + 0x7e, /* 01111110 */ + 0x3c, /* 00111100 */ + 0x18, /* 00011000 */ + 0x00, /* 00000000 */ + + /* + * 26 0x1a '^Z' + */ + 0x00, /* 00000000 */ + 0x18, /* 00011000 */ + 0x0c, /* 00001100 */ + 0xfe, /* 11111110 */ + 0x0c, /* 00001100 */ + 0x18, /* 00011000 */ + 0x00, /* 00000000 */ + 0x00, /* 00000000 */ + + /* + * 27 0x1b '^[' + */ + 0x00, /* 00000000 */ + 0x30, /* 00110000 */ + 0x60, /* 01100000 */ + 0xfe, /* 11111110 */ + 0x60, /* 01100000 */ + 0x30, /* 00110000 */ + 0x00, /* 00000000 */ + 0x00, /* 00000000 */ + + /* + * 28 0x1c '^\' + */ + 0x00, /* 00000000 */ + 0x00, /* 00000000 */ + 0xc0, /* 11000000 */ + 0xc0, /* 11000000 */ + 0xc0, /* 11000000 */ + 0xfe, /* 11111110 */ + 0x00, /* 00000000 */ + 0x00, /* 00000000 */ + + /* + * 29 0x1d '^]' + */ + 0x00, /* 00000000 */ + 0x24, /* 00100100 */ + 0x66, /* 01100110 */ + 0xff, /* 11111111 */ + 0x66, /* 01100110 */ + 0x24, /* 00100100 */ + 0x00, /* 00000000 */ + 0x00, /* 00000000 */ + + /* + * 30 0x1e '^^' + */ + 0x00, /* 00000000 */ + 0x18, /* 00011000 */ + 0x3c, /* 00111100 */ + 0x7e, /* 01111110 */ + 0xff, /* 11111111 */ + 0xff, /* 11111111 */ + 0x00, /* 00000000 */ + 0x00, /* 00000000 */ + + /* + * 31 0x1f '^_' + */ + 0x00, /* 00000000 */ + 0xff, /* 11111111 */ + 0xff, /* 11111111 */ + 0x7e, /* 01111110 */ + 0x3c, /* 00111100 */ + 0x18, /* 00011000 */ + 0x00, /* 00000000 */ + 0x00, /* 00000000 */ + + /* + * 32 0x20 ' ' + */ + 0x00, /* 00000000 */ + 0x00, /* 00000000 */ + 0x00, /* 00000000 */ + 0x00, /* 00000000 */ + 0x00, /* 00000000 */ + 0x00, /* 00000000 */ + 0x00, /* 00000000 */ + 0x00, /* 00000000 */ + + /* + * 33 0x21 '!' + */ + 0x18, /* 00011000 */ + 0x3c, /* 00111100 */ + 0x3c, /* 00111100 */ + 0x18, /* 00011000 */ + 0x18, /* 00011000 */ + 0x00, /* 00000000 */ + 0x18, /* 00011000 */ + 0x00, /* 00000000 */ + + /* + * 34 0x22 '"' + */ + 0x66, /* 01100110 */ + 0x66, /* 01100110 */ + 0x24, /* 00100100 */ + 0x00, /* 00000000 */ + 0x00, /* 00000000 */ + 0x00, /* 00000000 */ + 0x00, /* 00000000 */ + 0x00, /* 00000000 */ + + /* + * 35 0x23 '#' + */ + 0x6c, /* 01101100 */ + 0x6c, /* 01101100 */ + 0xfe, /* 11111110 */ + 0x6c, /* 01101100 */ + 0xfe, /* 11111110 */ + 0x6c, /* 01101100 */ + 0x6c, /* 01101100 */ + 0x00, /* 00000000 */ + + /* + * 36 0x24 '$' + */ + 0x18, /* 00011000 */ + 0x3e, /* 00111110 */ + 0x60, /* 01100000 */ + 0x3c, /* 00111100 */ + 0x06, /* 00000110 */ + 0x7c, /* 01111100 */ + 0x18, /* 00011000 */ + 0x00, /* 00000000 */ + + /* + * 37 0x25 '%' + */ + 0x00, /* 00000000 */ + 0xc6, /* 11000110 */ + 0xcc, /* 11001100 */ + 0x18, /* 00011000 */ + 0x30, /* 00110000 */ + 0x66, /* 01100110 */ + 0xc6, /* 11000110 */ + 0x00, /* 00000000 */ + + /* + * 38 0x26 '&' + */ + 0x38, /* 00111000 */ + 0x6c, /* 01101100 */ + 0x38, /* 00111000 */ + 0x76, /* 01110110 */ + 0xdc, /* 11011100 */ + 0xcc, /* 11001100 */ + 0x76, /* 01110110 */ + 0x00, /* 00000000 */ + + /* + * 39 0x27 ''' + */ + 0x18, /* 00011000 */ + 0x18, /* 00011000 */ + 0x30, /* 00110000 */ + 0x00, /* 00000000 */ + 0x00, /* 00000000 */ + 0x00, /* 00000000 */ + 0x00, /* 00000000 */ + 0x00, /* 00000000 */ + + /* + * 40 0x28 '(' + */ + 0x0c, /* 00001100 */ + 0x18, /* 00011000 */ + 0x30, /* 00110000 */ + 0x30, /* 00110000 */ + 0x30, /* 00110000 */ + 0x18, /* 00011000 */ + 0x0c, /* 00001100 */ + 0x00, /* 00000000 */ + + /* + * 41 0x29 ')' + */ + 0x30, /* 00110000 */ + 0x18, /* 00011000 */ + 0x0c, /* 00001100 */ + 0x0c, /* 00001100 */ + 0x0c, /* 00001100 */ + 0x18, /* 00011000 */ + 0x30, /* 00110000 */ + 0x00, /* 00000000 */ + + /* + * 42 0x2a '*' + */ + 0x00, /* 00000000 */ + 0x66, /* 01100110 */ + 0x3c, /* 00111100 */ + 0xff, /* 11111111 */ + 0x3c, /* 00111100 */ + 0x66, /* 01100110 */ + 0x00, /* 00000000 */ + 0x00, /* 00000000 */ + + /* + * 43 0x2b '+' + */ + 0x00, /* 00000000 */ + 0x18, /* 00011000 */ + 0x18, /* 00011000 */ + 0x7e, /* 01111110 */ + 0x18, /* 00011000 */ + 0x18, /* 00011000 */ + 0x00, /* 00000000 */ + 0x00, /* 00000000 */ + + /* + * 44 0x2c ',' + */ + 0x00, /* 00000000 */ + 0x00, /* 00000000 */ + 0x00, /* 00000000 */ + 0x00, /* 00000000 */ + 0x00, /* 00000000 */ + 0x18, /* 00011000 */ + 0x18, /* 00011000 */ + 0x30, /* 00110000 */ + + /* + * 45 0x2d '-' + */ + 0x00, /* 00000000 */ + 0x00, /* 00000000 */ + 0x00, /* 00000000 */ + 0x7e, /* 01111110 */ + 0x00, /* 00000000 */ + 0x00, /* 00000000 */ + 0x00, /* 00000000 */ + 0x00, /* 00000000 */ + + /* + * 46 0x2e '.' + */ + 0x00, /* 00000000 */ + 0x00, /* 00000000 */ + 0x00, /* 00000000 */ + 0x00, /* 00000000 */ + 0x00, /* 00000000 */ + 0x18, /* 00011000 */ + 0x18, /* 00011000 */ + 0x00, /* 00000000 */ + + /* + * 47 0x2f '/' + */ + 0x06, /* 00000110 */ + 0x0c, /* 00001100 */ + 0x18, /* 00011000 */ + 0x30, /* 00110000 */ + 0x60, /* 01100000 */ + 0xc0, /* 11000000 */ + 0x80, /* 10000000 */ + 0x00, /* 00000000 */ + + /* + * 48 0x30 '0' + */ + 0x38, /* 00111000 */ + 0x6c, /* 01101100 */ + 0xc6, /* 11000110 */ + 0xd6, /* 11010110 */ + 0xc6, /* 11000110 */ + 0x6c, /* 01101100 */ + 0x38, /* 00111000 */ + 0x00, /* 00000000 */ + + /* + * 49 0x31 '1' + */ + 0x18, /* 00011000 */ + 0x38, /* 00111000 */ + 0x18, /* 00011000 */ + 0x18, /* 00011000 */ + 0x18, /* 00011000 */ + 0x18, /* 00011000 */ + 0x7e, /* 01111110 */ + 0x00, /* 00000000 */ + + /* + * 50 0x32 '2' + */ + 0x7c, /* 01111100 */ + 0xc6, /* 11000110 */ + 0x06, /* 00000110 */ + 0x1c, /* 00011100 */ + 0x30, /* 00110000 */ + 0x66, /* 01100110 */ + 0xfe, /* 11111110 */ + 0x00, /* 00000000 */ + + /* + * 51 0x33 '3' + */ + 0x7c, /* 01111100 */ + 0xc6, /* 11000110 */ + 0x06, /* 00000110 */ + 0x3c, /* 00111100 */ + 0x06, /* 00000110 */ + 0xc6, /* 11000110 */ + 0x7c, /* 01111100 */ + 0x00, /* 00000000 */ + + /* + * 52 0x34 '4' + */ + 0x1c, /* 00011100 */ + 0x3c, /* 00111100 */ + 0x6c, /* 01101100 */ + 0xcc, /* 11001100 */ + 0xfe, /* 11111110 */ + 0x0c, /* 00001100 */ + 0x1e, /* 00011110 */ + 0x00, /* 00000000 */ + + /* + * 53 0x35 '5' + */ + 0xfe, /* 11111110 */ + 0xc0, /* 11000000 */ + 0xc0, /* 11000000 */ + 0xfc, /* 11111100 */ + 0x06, /* 00000110 */ + 0xc6, /* 11000110 */ + 0x7c, /* 01111100 */ + 0x00, /* 00000000 */ + + /* + * 54 0x36 '6' + */ + 0x38, /* 00111000 */ + 0x60, /* 01100000 */ + 0xc0, /* 11000000 */ + 0xfc, /* 11111100 */ + 0xc6, /* 11000110 */ + 0xc6, /* 11000110 */ + 0x7c, /* 01111100 */ + 0x00, /* 00000000 */ + + /* + * 55 0x37 '7' + */ + 0xfe, /* 11111110 */ + 0xc6, /* 11000110 */ + 0x0c, /* 00001100 */ + 0x18, /* 00011000 */ + 0x30, /* 00110000 */ + 0x30, /* 00110000 */ + 0x30, /* 00110000 */ + 0x00, /* 00000000 */ + + /* + * 56 0x38 '8' + */ + 0x7c, /* 01111100 */ + 0xc6, /* 11000110 */ + 0xc6, /* 11000110 */ + 0x7c, /* 01111100 */ + 0xc6, /* 11000110 */ + 0xc6, /* 11000110 */ + 0x7c, /* 01111100 */ + 0x00, /* 00000000 */ + + /* + * 57 0x39 '9' + */ + 0x7c, /* 01111100 */ + 0xc6, /* 11000110 */ + 0xc6, /* 11000110 */ + 0x7e, /* 01111110 */ + 0x06, /* 00000110 */ + 0x0c, /* 00001100 */ + 0x78, /* 01111000 */ + 0x00, /* 00000000 */ + + /* + * 58 0x3a ':' + */ + 0x00, /* 00000000 */ + 0x18, /* 00011000 */ + 0x18, /* 00011000 */ + 0x00, /* 00000000 */ + 0x00, /* 00000000 */ + 0x18, /* 00011000 */ + 0x18, /* 00011000 */ + 0x00, /* 00000000 */ + + /* + * 59 0x3b ';' + */ + 0x00, /* 00000000 */ + 0x18, /* 00011000 */ + 0x18, /* 00011000 */ + 0x00, /* 00000000 */ + 0x00, /* 00000000 */ + 0x18, /* 00011000 */ + 0x18, /* 00011000 */ + 0x30, /* 00110000 */ + + /* + * 60 0x3c '<' + */ + 0x06, /* 00000110 */ + 0x0c, /* 00001100 */ + 0x18, /* 00011000 */ + 0x30, /* 00110000 */ + 0x18, /* 00011000 */ + 0x0c, /* 00001100 */ + 0x06, /* 00000110 */ + 0x00, /* 00000000 */ + + /* + * 61 0x3d '=' + */ + 0x00, /* 00000000 */ + 0x00, /* 00000000 */ + 0x7e, /* 01111110 */ + 0x00, /* 00000000 */ + 0x00, /* 00000000 */ + 0x7e, /* 01111110 */ + 0x00, /* 00000000 */ + 0x00, /* 00000000 */ + + /* + * 62 0x3e '>' + */ + 0x60, /* 01100000 */ + 0x30, /* 00110000 */ + 0x18, /* 00011000 */ + 0x0c, /* 00001100 */ + 0x18, /* 00011000 */ + 0x30, /* 00110000 */ + 0x60, /* 01100000 */ + 0x00, /* 00000000 */ + + /* + * 63 0x3f '?' + */ + 0x7c, /* 01111100 */ + 0xc6, /* 11000110 */ + 0x0c, /* 00001100 */ + 0x18, /* 00011000 */ + 0x18, /* 00011000 */ + 0x00, /* 00000000 */ + 0x18, /* 00011000 */ + 0x00, /* 00000000 */ + + /* + * 64 0x40 '@' + */ + 0x7c, /* 01111100 */ + 0xc6, /* 11000110 */ + 0xde, /* 11011110 */ + 0xde, /* 11011110 */ + 0xde, /* 11011110 */ + 0xc0, /* 11000000 */ + 0x78, /* 01111000 */ + 0x00, /* 00000000 */ + + /* + * 65 0x41 'A' + */ + 0x38, /* 00111000 */ + 0x6c, /* 01101100 */ + 0xc6, /* 11000110 */ + 0xfe, /* 11111110 */ + 0xc6, /* 11000110 */ + 0xc6, /* 11000110 */ + 0xc6, /* 11000110 */ + 0x00, /* 00000000 */ + + /* + * 66 0x42 'B' + */ + 0xfc, /* 11111100 */ + 0x66, /* 01100110 */ + 0x66, /* 01100110 */ + 0x7c, /* 01111100 */ + 0x66, /* 01100110 */ + 0x66, /* 01100110 */ + 0xfc, /* 11111100 */ + 0x00, /* 00000000 */ + + /* + * 67 0x43 'C' + */ + 0x3c, /* 00111100 */ + 0x66, /* 01100110 */ + 0xc0, /* 11000000 */ + 0xc0, /* 11000000 */ + 0xc0, /* 11000000 */ + 0x66, /* 01100110 */ + 0x3c, /* 00111100 */ + 0x00, /* 00000000 */ + + /* + * 68 0x44 'D' + */ + 0xf8, /* 11111000 */ + 0x6c, /* 01101100 */ + 0x66, /* 01100110 */ + 0x66, /* 01100110 */ + 0x66, /* 01100110 */ + 0x6c, /* 01101100 */ + 0xf8, /* 11111000 */ + 0x00, /* 00000000 */ + + /* + * 69 0x45 'E' + */ + 0xfe, /* 11111110 */ + 0x62, /* 01100010 */ + 0x68, /* 01101000 */ + 0x78, /* 01111000 */ + 0x68, /* 01101000 */ + 0x62, /* 01100010 */ + 0xfe, /* 11111110 */ + 0x00, /* 00000000 */ + + /* + * 70 0x46 'F' + */ + 0xfe, /* 11111110 */ + 0x62, /* 01100010 */ + 0x68, /* 01101000 */ + 0x78, /* 01111000 */ + 0x68, /* 01101000 */ + 0x60, /* 01100000 */ + 0xf0, /* 11110000 */ + 0x00, /* 00000000 */ + + /* + * 71 0x47 'G' + */ + 0x3c, /* 00111100 */ + 0x66, /* 01100110 */ + 0xc0, /* 11000000 */ + 0xc0, /* 11000000 */ + 0xce, /* 11001110 */ + 0x66, /* 01100110 */ + 0x3a, /* 00111010 */ + 0x00, /* 00000000 */ + + /* + * 72 0x48 'H' + */ + 0xc6, /* 11000110 */ + 0xc6, /* 11000110 */ + 0xc6, /* 11000110 */ + 0xfe, /* 11111110 */ + 0xc6, /* 11000110 */ + 0xc6, /* 11000110 */ + 0xc6, /* 11000110 */ + 0x00, /* 00000000 */ + + /* + * 73 0x49 'I' + */ + 0x3c, /* 00111100 */ + 0x18, /* 00011000 */ + 0x18, /* 00011000 */ + 0x18, /* 00011000 */ + 0x18, /* 00011000 */ + 0x18, /* 00011000 */ + 0x3c, /* 00111100 */ + 0x00, /* 00000000 */ + + /* + * 74 0x4a 'J' + */ + 0x1e, /* 00011110 */ + 0x0c, /* 00001100 */ + 0x0c, /* 00001100 */ + 0x0c, /* 00001100 */ + 0xcc, /* 11001100 */ + 0xcc, /* 11001100 */ + 0x78, /* 01111000 */ + 0x00, /* 00000000 */ + + /* + * 75 0x4b 'K' + */ + 0xe6, /* 11100110 */ + 0x66, /* 01100110 */ + 0x6c, /* 01101100 */ + 0x78, /* 01111000 */ + 0x6c, /* 01101100 */ + 0x66, /* 01100110 */ + 0xe6, /* 11100110 */ + 0x00, /* 00000000 */ + + /* + * 76 0x4c 'L' + */ + 0xf0, /* 11110000 */ + 0x60, /* 01100000 */ + 0x60, /* 01100000 */ + 0x60, /* 01100000 */ + 0x62, /* 01100010 */ + 0x66, /* 01100110 */ + 0xfe, /* 11111110 */ + 0x00, /* 00000000 */ + + /* + * 77 0x4d 'M' + */ + 0xc6, /* 11000110 */ + 0xee, /* 11101110 */ + 0xfe, /* 11111110 */ + 0xfe, /* 11111110 */ + 0xd6, /* 11010110 */ + 0xc6, /* 11000110 */ + 0xc6, /* 11000110 */ + 0x00, /* 00000000 */ + + /* + * 78 0x4e 'N' + */ + 0xc6, /* 11000110 */ + 0xe6, /* 11100110 */ + 0xf6, /* 11110110 */ + 0xde, /* 11011110 */ + 0xce, /* 11001110 */ + 0xc6, /* 11000110 */ + 0xc6, /* 11000110 */ + 0x00, /* 00000000 */ + + /* + * 79 0x4f 'O' + */ + 0x7c, /* 01111100 */ + 0xc6, /* 11000110 */ + 0xc6, /* 11000110 */ + 0xc6, /* 11000110 */ + 0xc6, /* 11000110 */ + 0xc6, /* 11000110 */ + 0x7c, /* 01111100 */ + 0x00, /* 00000000 */ + + /* + * 80 0x50 'P' + */ + 0xfc, /* 11111100 */ + 0x66, /* 01100110 */ + 0x66, /* 01100110 */ + 0x7c, /* 01111100 */ + 0x60, /* 01100000 */ + 0x60, /* 01100000 */ + 0xf0, /* 11110000 */ + 0x00, /* 00000000 */ + + /* + * 81 0x51 'Q' + */ + 0x7c, /* 01111100 */ + 0xc6, /* 11000110 */ + 0xc6, /* 11000110 */ + 0xc6, /* 11000110 */ + 0xc6, /* 11000110 */ + 0xce, /* 11001110 */ + 0x7c, /* 01111100 */ + 0x0e, /* 00001110 */ + + /* + * 82 0x52 'R' + */ + 0xfc, /* 11111100 */ + 0x66, /* 01100110 */ + 0x66, /* 01100110 */ + 0x7c, /* 01111100 */ + 0x6c, /* 01101100 */ + 0x66, /* 01100110 */ + 0xe6, /* 11100110 */ + 0x00, /* 00000000 */ + + /* + * 83 0x53 'S' + */ + 0x3c, /* 00111100 */ + 0x66, /* 01100110 */ + 0x30, /* 00110000 */ + 0x18, /* 00011000 */ + 0x0c, /* 00001100 */ + 0x66, /* 01100110 */ + 0x3c, /* 00111100 */ + 0x00, /* 00000000 */ + + /* + * 84 0x54 'T' + */ + 0x7e, /* 01111110 */ + 0x7e, /* 01111110 */ + 0x5a, /* 01011010 */ + 0x18, /* 00011000 */ + 0x18, /* 00011000 */ + 0x18, /* 00011000 */ + 0x3c, /* 00111100 */ + 0x00, /* 00000000 */ + + /* + * 85 0x55 'U' + */ + 0xc6, /* 11000110 */ + 0xc6, /* 11000110 */ + 0xc6, /* 11000110 */ + 0xc6, /* 11000110 */ + 0xc6, /* 11000110 */ + 0xc6, /* 11000110 */ + 0x7c, /* 01111100 */ + 0x00, /* 00000000 */ + + /* + * 86 0x56 'V' + */ + 0xc6, /* 11000110 */ + 0xc6, /* 11000110 */ + 0xc6, /* 11000110 */ + 0xc6, /* 11000110 */ + 0xc6, /* 11000110 */ + 0x6c, /* 01101100 */ + 0x38, /* 00111000 */ + 0x00, /* 00000000 */ + + /* + * 87 0x57 'W' + */ + 0xc6, /* 11000110 */ + 0xc6, /* 11000110 */ + 0xc6, /* 11000110 */ + 0xd6, /* 11010110 */ + 0xd6, /* 11010110 */ + 0xfe, /* 11111110 */ + 0x6c, /* 01101100 */ + 0x00, /* 00000000 */ + + /* + * 88 0x58 'X' + */ + 0xc6, /* 11000110 */ + 0xc6, /* 11000110 */ + 0x6c, /* 01101100 */ + 0x38, /* 00111000 */ + 0x6c, /* 01101100 */ + 0xc6, /* 11000110 */ + 0xc6, /* 11000110 */ + 0x00, /* 00000000 */ + + /* + * 89 0x59 'Y' + */ + 0x66, /* 01100110 */ + 0x66, /* 01100110 */ + 0x66, /* 01100110 */ + 0x3c, /* 00111100 */ + 0x18, /* 00011000 */ + 0x18, /* 00011000 */ + 0x3c, /* 00111100 */ + 0x00, /* 00000000 */ + + /* + * 90 0x5a 'Z' + */ + 0xfe, /* 11111110 */ + 0xc6, /* 11000110 */ + 0x8c, /* 10001100 */ + 0x18, /* 00011000 */ + 0x32, /* 00110010 */ + 0x66, /* 01100110 */ + 0xfe, /* 11111110 */ + 0x00, /* 00000000 */ + + /* + * 91 0x5b '[' + */ + 0x3c, /* 00111100 */ + 0x30, /* 00110000 */ + 0x30, /* 00110000 */ + 0x30, /* 00110000 */ + 0x30, /* 00110000 */ + 0x30, /* 00110000 */ + 0x3c, /* 00111100 */ + 0x00, /* 00000000 */ + + /* + * 92 0x5c '\' + */ + 0xc0, /* 11000000 */ + 0x60, /* 01100000 */ + 0x30, /* 00110000 */ + 0x18, /* 00011000 */ + 0x0c, /* 00001100 */ + 0x06, /* 00000110 */ + 0x02, /* 00000010 */ + 0x00, /* 00000000 */ + + /* + * 93 0x5d ']' + */ + 0x3c, /* 00111100 */ + 0x0c, /* 00001100 */ + 0x0c, /* 00001100 */ + 0x0c, /* 00001100 */ + 0x0c, /* 00001100 */ + 0x0c, /* 00001100 */ + 0x3c, /* 00111100 */ + 0x00, /* 00000000 */ + + /* + * 94 0x5e '^' + */ + 0x10, /* 00010000 */ + 0x38, /* 00111000 */ + 0x6c, /* 01101100 */ + 0xc6, /* 11000110 */ + 0x00, /* 00000000 */ + 0x00, /* 00000000 */ + 0x00, /* 00000000 */ + 0x00, /* 00000000 */ + + /* + * 95 0x5f '_' + */ + 0x00, /* 00000000 */ + 0x00, /* 00000000 */ + 0x00, /* 00000000 */ + 0x00, /* 00000000 */ + 0x00, /* 00000000 */ + 0x00, /* 00000000 */ + 0x00, /* 00000000 */ + 0xff, /* 11111111 */ + + /* + * 96 0x60 '`' + */ + 0x30, /* 00110000 */ + 0x18, /* 00011000 */ + 0x0c, /* 00001100 */ + 0x00, /* 00000000 */ + 0x00, /* 00000000 */ + 0x00, /* 00000000 */ + 0x00, /* 00000000 */ + 0x00, /* 00000000 */ + + /* + * 97 0x61 'a' + */ + 0x00, /* 00000000 */ + 0x00, /* 00000000 */ + 0x78, /* 01111000 */ + 0x0c, /* 00001100 */ + 0x7c, /* 01111100 */ + 0xcc, /* 11001100 */ + 0x76, /* 01110110 */ + 0x00, /* 00000000 */ + + /* + * 98 0x62 'b' + */ + 0xe0, /* 11100000 */ + 0x60, /* 01100000 */ + 0x7c, /* 01111100 */ + 0x66, /* 01100110 */ + 0x66, /* 01100110 */ + 0x66, /* 01100110 */ + 0xdc, /* 11011100 */ + 0x00, /* 00000000 */ + + /* + * 99 0x63 'c' + */ + 0x00, /* 00000000 */ + 0x00, /* 00000000 */ + 0x7c, /* 01111100 */ + 0xc6, /* 11000110 */ + 0xc0, /* 11000000 */ + 0xc6, /* 11000110 */ + 0x7c, /* 01111100 */ + 0x00, /* 00000000 */ + + /* + * 100 0x64 'd' + */ + 0x1c, /* 00011100 */ + 0x0c, /* 00001100 */ + 0x7c, /* 01111100 */ + 0xcc, /* 11001100 */ + 0xcc, /* 11001100 */ + 0xcc, /* 11001100 */ + 0x76, /* 01110110 */ + 0x00, /* 00000000 */ + + /* + * 101 0x65 'e' + */ + 0x00, /* 00000000 */ + 0x00, /* 00000000 */ + 0x7c, /* 01111100 */ + 0xc6, /* 11000110 */ + 0xfe, /* 11111110 */ + 0xc0, /* 11000000 */ + 0x7c, /* 01111100 */ + 0x00, /* 00000000 */ + + /* + * 102 0x66 'f' + */ + 0x3c, /* 00111100 */ + 0x66, /* 01100110 */ + 0x60, /* 01100000 */ + 0xf8, /* 11111000 */ + 0x60, /* 01100000 */ + 0x60, /* 01100000 */ + 0xf0, /* 11110000 */ + 0x00, /* 00000000 */ + + /* + * 103 0x67 'g' + */ + 0x00, /* 00000000 */ + 0x00, /* 00000000 */ + 0x76, /* 01110110 */ + 0xcc, /* 11001100 */ + 0xcc, /* 11001100 */ + 0x7c, /* 01111100 */ + 0x0c, /* 00001100 */ + 0xf8, /* 11111000 */ + + /* + * 104 0x68 'h' + */ + 0xe0, /* 11100000 */ + 0x60, /* 01100000 */ + 0x6c, /* 01101100 */ + 0x76, /* 01110110 */ + 0x66, /* 01100110 */ + 0x66, /* 01100110 */ + 0xe6, /* 11100110 */ + 0x00, /* 00000000 */ + + /* + * 105 0x69 'i' + */ + 0x18, /* 00011000 */ + 0x00, /* 00000000 */ + 0x38, /* 00111000 */ + 0x18, /* 00011000 */ + 0x18, /* 00011000 */ + 0x18, /* 00011000 */ + 0x3c, /* 00111100 */ + 0x00, /* 00000000 */ + + /* + * 106 0x6a 'j' + */ + 0x06, /* 00000110 */ + 0x00, /* 00000000 */ + 0x06, /* 00000110 */ + 0x06, /* 00000110 */ + 0x06, /* 00000110 */ + 0x66, /* 01100110 */ + 0x66, /* 01100110 */ + 0x3c, /* 00111100 */ + + /* + * 107 0x6b 'k' + */ + 0xe0, /* 11100000 */ + 0x60, /* 01100000 */ + 0x66, /* 01100110 */ + 0x6c, /* 01101100 */ + 0x78, /* 01111000 */ + 0x6c, /* 01101100 */ + 0xe6, /* 11100110 */ + 0x00, /* 00000000 */ + + /* + * 108 0x6c 'l' + */ + 0x38, /* 00111000 */ + 0x18, /* 00011000 */ + 0x18, /* 00011000 */ + 0x18, /* 00011000 */ + 0x18, /* 00011000 */ + 0x18, /* 00011000 */ + 0x3c, /* 00111100 */ + 0x00, /* 00000000 */ + + /* + * 109 0x6d 'm' + */ + 0x00, /* 00000000 */ + 0x00, /* 00000000 */ + 0xec, /* 11101100 */ + 0xfe, /* 11111110 */ + 0xd6, /* 11010110 */ + 0xd6, /* 11010110 */ + 0xd6, /* 11010110 */ + 0x00, /* 00000000 */ + + /* + * 110 0x6e 'n' + */ + 0x00, /* 00000000 */ + 0x00, /* 00000000 */ + 0xdc, /* 11011100 */ + 0x66, /* 01100110 */ + 0x66, /* 01100110 */ + 0x66, /* 01100110 */ + 0x66, /* 01100110 */ + 0x00, /* 00000000 */ + + /* + * 111 0x6f 'o' + */ + 0x00, /* 00000000 */ + 0x00, /* 00000000 */ + 0x7c, /* 01111100 */ + 0xc6, /* 11000110 */ + 0xc6, /* 11000110 */ + 0xc6, /* 11000110 */ + 0x7c, /* 01111100 */ + 0x00, /* 00000000 */ + + /* + * 112 0x70 'p' + */ + 0x00, /* 00000000 */ + 0x00, /* 00000000 */ + 0xdc, /* 11011100 */ + 0x66, /* 01100110 */ + 0x66, /* 01100110 */ + 0x7c, /* 01111100 */ + 0x60, /* 01100000 */ + 0xf0, /* 11110000 */ + + /* + * 113 0x71 'q' + */ + 0x00, /* 00000000 */ + 0x00, /* 00000000 */ + 0x76, /* 01110110 */ + 0xcc, /* 11001100 */ + 0xcc, /* 11001100 */ + 0x7c, /* 01111100 */ + 0x0c, /* 00001100 */ + 0x1e, /* 00011110 */ + + /* + * 114 0x72 'r' + */ + 0x00, /* 00000000 */ + 0x00, /* 00000000 */ + 0xdc, /* 11011100 */ + 0x76, /* 01110110 */ + 0x60, /* 01100000 */ + 0x60, /* 01100000 */ + 0xf0, /* 11110000 */ + 0x00, /* 00000000 */ + + /* + * 115 0x73 's' + */ + 0x00, /* 00000000 */ + 0x00, /* 00000000 */ + 0x7e, /* 01111110 */ + 0xc0, /* 11000000 */ + 0x7c, /* 01111100 */ + 0x06, /* 00000110 */ + 0xfc, /* 11111100 */ + 0x00, /* 00000000 */ + + /* + * 116 0x74 't' + */ + 0x30, /* 00110000 */ + 0x30, /* 00110000 */ + 0xfc, /* 11111100 */ + 0x30, /* 00110000 */ + 0x30, /* 00110000 */ + 0x36, /* 00110110 */ + 0x1c, /* 00011100 */ + 0x00, /* 00000000 */ + + /* + * 117 0x75 'u' + */ + 0x00, /* 00000000 */ + 0x00, /* 00000000 */ + 0xcc, /* 11001100 */ + 0xcc, /* 11001100 */ + 0xcc, /* 11001100 */ + 0xcc, /* 11001100 */ + 0x76, /* 01110110 */ + 0x00, /* 00000000 */ + + /* + * 118 0x76 'v' + */ + 0x00, /* 00000000 */ + 0x00, /* 00000000 */ + 0xc6, /* 11000110 */ + 0xc6, /* 11000110 */ + 0xc6, /* 11000110 */ + 0x6c, /* 01101100 */ + 0x38, /* 00111000 */ + 0x00, /* 00000000 */ + + /* + * 119 0x77 'w' + */ + 0x00, /* 00000000 */ + 0x00, /* 00000000 */ + 0xc6, /* 11000110 */ + 0xd6, /* 11010110 */ + 0xd6, /* 11010110 */ + 0xfe, /* 11111110 */ + 0x6c, /* 01101100 */ + 0x00, /* 00000000 */ + + /* + * 120 0x78 'x' + */ + 0x00, /* 00000000 */ + 0x00, /* 00000000 */ + 0xc6, /* 11000110 */ + 0x6c, /* 01101100 */ + 0x38, /* 00111000 */ + 0x6c, /* 01101100 */ + 0xc6, /* 11000110 */ + 0x00, /* 00000000 */ + + /* + * 121 0x79 'y' + */ + 0x00, /* 00000000 */ + 0x00, /* 00000000 */ + 0xc6, /* 11000110 */ + 0xc6, /* 11000110 */ + 0xc6, /* 11000110 */ + 0x7e, /* 01111110 */ + 0x06, /* 00000110 */ + 0xfc, /* 11111100 */ + + /* + * 122 0x7a 'z' + */ + 0x00, /* 00000000 */ + 0x00, /* 00000000 */ + 0x7e, /* 01111110 */ + 0x4c, /* 01001100 */ + 0x18, /* 00011000 */ + 0x32, /* 00110010 */ + 0x7e, /* 01111110 */ + 0x00, /* 00000000 */ + + /* + * 123 0x7b '{' + */ + 0x0e, /* 00001110 */ + 0x18, /* 00011000 */ + 0x18, /* 00011000 */ + 0x70, /* 01110000 */ + 0x18, /* 00011000 */ + 0x18, /* 00011000 */ + 0x0e, /* 00001110 */ + 0x00, /* 00000000 */ + + /* + * 124 0x7c '|' + */ + 0x18, /* 00011000 */ + 0x18, /* 00011000 */ + 0x18, /* 00011000 */ + 0x18, /* 00011000 */ + 0x18, /* 00011000 */ + 0x18, /* 00011000 */ + 0x18, /* 00011000 */ + 0x00, /* 00000000 */ + + /* + * 125 0x7d '}' + */ + 0x70, /* 01110000 */ + 0x18, /* 00011000 */ + 0x18, /* 00011000 */ + 0x0e, /* 00001110 */ + 0x18, /* 00011000 */ + 0x18, /* 00011000 */ + 0x70, /* 01110000 */ + 0x00, /* 00000000 */ + + /* + * 126 0x7e '~' + */ + 0x76, /* 01110110 */ + 0xdc, /* 11011100 */ + 0x00, /* 00000000 */ + 0x00, /* 00000000 */ + 0x00, /* 00000000 */ + 0x00, /* 00000000 */ + 0x00, /* 00000000 */ + 0x00, /* 00000000 */ + + /* + * 127 0x7f '' + */ + 0x00, /* 00000000 */ + 0x10, /* 00010000 */ + 0x38, /* 00111000 */ + 0x6c, /* 01101100 */ + 0xc6, /* 11000110 */ + 0xc6, /* 11000110 */ + 0xfe, /* 11111110 */ + 0x00, /* 00000000 */ + + /* + * 128 0x80 '' + */ + 0x7c, /* 01111100 */ + 0xc6, /* 11000110 */ + 0xc0, /* 11000000 */ + 0xc0, /* 11000000 */ + 0xc6, /* 11000110 */ + 0x7c, /* 01111100 */ + 0x0c, /* 00001100 */ + 0x78, /* 01111000 */ + + /* + * 129 0x81 '' + */ + 0xcc, /* 11001100 */ + 0x00, /* 00000000 */ + 0xcc, /* 11001100 */ + 0xcc, /* 11001100 */ + 0xcc, /* 11001100 */ + 0xcc, /* 11001100 */ + 0x76, /* 01110110 */ + 0x00, /* 00000000 */ + + /* + * 130 0x82 '' + */ + 0x0c, /* 00001100 */ + 0x18, /* 00011000 */ + 0x7c, /* 01111100 */ + 0xc6, /* 11000110 */ + 0xfe, /* 11111110 */ + 0xc0, /* 11000000 */ + 0x7c, /* 01111100 */ + 0x00, /* 00000000 */ + + /* + * 131 0x83 '' + */ + 0x7c, /* 01111100 */ + 0x82, /* 10000010 */ + 0x78, /* 01111000 */ + 0x0c, /* 00001100 */ + 0x7c, /* 01111100 */ + 0xcc, /* 11001100 */ + 0x76, /* 01110110 */ + 0x00, /* 00000000 */ + + /* + * 132 0x84 '' + */ + 0xc6, /* 11000110 */ + 0x00, /* 00000000 */ + 0x78, /* 01111000 */ + 0x0c, /* 00001100 */ + 0x7c, /* 01111100 */ + 0xcc, /* 11001100 */ + 0x76, /* 01110110 */ + 0x00, /* 00000000 */ + + /* + * 133 0x85 '' + */ + 0x30, /* 00110000 */ + 0x18, /* 00011000 */ + 0x78, /* 01111000 */ + 0x0c, /* 00001100 */ + 0x7c, /* 01111100 */ + 0xcc, /* 11001100 */ + 0x76, /* 01110110 */ + 0x00, /* 00000000 */ + + /* + * 134 0x86 '' + */ + 0x30, /* 00110000 */ + 0x30, /* 00110000 */ + 0x78, /* 01111000 */ + 0x0c, /* 00001100 */ + 0x7c, /* 01111100 */ + 0xcc, /* 11001100 */ + 0x76, /* 01110110 */ + 0x00, /* 00000000 */ + + /* + * 135 0x87 '' + */ + 0x00, /* 00000000 */ + 0x00, /* 00000000 */ + 0x7e, /* 01111110 */ + 0xc0, /* 11000000 */ + 0xc0, /* 11000000 */ + 0x7e, /* 01111110 */ + 0x0c, /* 00001100 */ + 0x38, /* 00111000 */ + + /* + * 136 0x88 '' + */ + 0x7c, /* 01111100 */ + 0x82, /* 10000010 */ + 0x7c, /* 01111100 */ + 0xc6, /* 11000110 */ + 0xfe, /* 11111110 */ + 0xc0, /* 11000000 */ + 0x7c, /* 01111100 */ + 0x00, /* 00000000 */ + + /* + * 137 0x89 '' + */ + 0xc6, /* 11000110 */ + 0x00, /* 00000000 */ + 0x7c, /* 01111100 */ + 0xc6, /* 11000110 */ + 0xfe, /* 11111110 */ + 0xc0, /* 11000000 */ + 0x7c, /* 01111100 */ + 0x00, /* 00000000 */ + + /* + * 138 0x8a '' + */ + 0x30, /* 00110000 */ + 0x18, /* 00011000 */ + 0x7c, /* 01111100 */ + 0xc6, /* 11000110 */ + 0xfe, /* 11111110 */ + 0xc0, /* 11000000 */ + 0x7c, /* 01111100 */ + 0x00, /* 00000000 */ + + /* + * 139 0x8b '' + */ + 0x66, /* 01100110 */ + 0x00, /* 00000000 */ + 0x38, /* 00111000 */ + 0x18, /* 00011000 */ + 0x18, /* 00011000 */ + 0x18, /* 00011000 */ + 0x3c, /* 00111100 */ + 0x00, /* 00000000 */ + + /* + * 140 0x8c '' + */ + 0x7c, /* 01111100 */ + 0x82, /* 10000010 */ + 0x38, /* 00111000 */ + 0x18, /* 00011000 */ + 0x18, /* 00011000 */ + 0x18, /* 00011000 */ + 0x3c, /* 00111100 */ + 0x00, /* 00000000 */ + + /* + * 141 0x8d '' + */ + 0x30, /* 00110000 */ + 0x18, /* 00011000 */ + 0x00, /* 00000000 */ + 0x38, /* 00111000 */ + 0x18, /* 00011000 */ + 0x18, /* 00011000 */ + 0x3c, /* 00111100 */ + 0x00, /* 00000000 */ + + /* + * 142 0x8e '' + */ + 0xc6, /* 11000110 */ + 0x38, /* 00111000 */ + 0x6c, /* 01101100 */ + 0xc6, /* 11000110 */ + 0xfe, /* 11111110 */ + 0xc6, /* 11000110 */ + 0xc6, /* 11000110 */ + 0x00, /* 00000000 */ + + /* + * 143 0x8f '' + */ + 0x38, /* 00111000 */ + 0x6c, /* 01101100 */ + 0x7c, /* 01111100 */ + 0xc6, /* 11000110 */ + 0xfe, /* 11111110 */ + 0xc6, /* 11000110 */ + 0xc6, /* 11000110 */ + 0x00, /* 00000000 */ + + /* + * 144 0x90 '' + */ + 0x18, /* 00011000 */ + 0x30, /* 00110000 */ + 0xfe, /* 11111110 */ + 0xc0, /* 11000000 */ + 0xf8, /* 11111000 */ + 0xc0, /* 11000000 */ + 0xfe, /* 11111110 */ + 0x00, /* 00000000 */ + + /* + * 145 0x91 '' + */ + 0x00, /* 00000000 */ + 0x00, /* 00000000 */ + 0x7e, /* 01111110 */ + 0x18, /* 00011000 */ + 0x7e, /* 01111110 */ + 0xd8, /* 11011000 */ + 0x7e, /* 01111110 */ + 0x00, /* 00000000 */ + + /* + * 146 0x92 '' + */ + 0x3e, /* 00111110 */ + 0x6c, /* 01101100 */ + 0xcc, /* 11001100 */ + 0xfe, /* 11111110 */ + 0xcc, /* 11001100 */ + 0xcc, /* 11001100 */ + 0xce, /* 11001110 */ + 0x00, /* 00000000 */ + + /* + * 147 0x93 '' + */ + 0x7c, /* 01111100 */ + 0x82, /* 10000010 */ + 0x7c, /* 01111100 */ + 0xc6, /* 11000110 */ + 0xc6, /* 11000110 */ + 0xc6, /* 11000110 */ + 0x7c, /* 01111100 */ + 0x00, /* 00000000 */ + + /* + * 148 0x94 '' + */ + 0xc6, /* 11000110 */ + 0x00, /* 00000000 */ + 0x7c, /* 01111100 */ + 0xc6, /* 11000110 */ + 0xc6, /* 11000110 */ + 0xc6, /* 11000110 */ + 0x7c, /* 01111100 */ + 0x00, /* 00000000 */ + + /* + * 149 0x95 '' + */ + 0x30, /* 00110000 */ + 0x18, /* 00011000 */ + 0x7c, /* 01111100 */ + 0xc6, /* 11000110 */ + 0xc6, /* 11000110 */ + 0xc6, /* 11000110 */ + 0x7c, /* 01111100 */ + 0x00, /* 00000000 */ + + /* + * 150 0x96 '' + */ + 0x78, /* 01111000 */ + 0x84, /* 10000100 */ + 0x00, /* 00000000 */ + 0xcc, /* 11001100 */ + 0xcc, /* 11001100 */ + 0xcc, /* 11001100 */ + 0x76, /* 01110110 */ + 0x00, /* 00000000 */ + + /* + * 151 0x97 '' + */ + 0x60, /* 01100000 */ + 0x30, /* 00110000 */ + 0xcc, /* 11001100 */ + 0xcc, /* 11001100 */ + 0xcc, /* 11001100 */ + 0xcc, /* 11001100 */ + 0x76, /* 01110110 */ + 0x00, /* 00000000 */ + + /* + * 152 0x98 '' + */ + 0xc6, /* 11000110 */ + 0x00, /* 00000000 */ + 0xc6, /* 11000110 */ + 0xc6, /* 11000110 */ + 0xc6, /* 11000110 */ + 0x7e, /* 01111110 */ + 0x06, /* 00000110 */ + 0xfc, /* 11111100 */ + + /* + * 153 0x99 '' + */ + 0xc6, /* 11000110 */ + 0x38, /* 00111000 */ + 0x6c, /* 01101100 */ + 0xc6, /* 11000110 */ + 0xc6, /* 11000110 */ + 0x6c, /* 01101100 */ + 0x38, /* 00111000 */ + 0x00, /* 00000000 */ + + /* + * 154 0x9a '' + */ + 0xc6, /* 11000110 */ + 0x00, /* 00000000 */ + 0xc6, /* 11000110 */ + 0xc6, /* 11000110 */ + 0xc6, /* 11000110 */ + 0xc6, /* 11000110 */ + 0x7c, /* 01111100 */ + 0x00, /* 00000000 */ + + /* + * 155 0x9b '' + */ + 0x18, /* 00011000 */ + 0x18, /* 00011000 */ + 0x7e, /* 01111110 */ + 0xc0, /* 11000000 */ + 0xc0, /* 11000000 */ + 0x7e, /* 01111110 */ + 0x18, /* 00011000 */ + 0x18, /* 00011000 */ + + /* + * 156 0x9c '' + */ + 0x38, /* 00111000 */ + 0x6c, /* 01101100 */ + 0x64, /* 01100100 */ + 0xf0, /* 11110000 */ + 0x60, /* 01100000 */ + 0x66, /* 01100110 */ + 0xfc, /* 11111100 */ + 0x00, /* 00000000 */ + + /* + * 157 0x9d '' + */ + 0x66, /* 01100110 */ + 0x66, /* 01100110 */ + 0x3c, /* 00111100 */ + 0x7e, /* 01111110 */ + 0x18, /* 00011000 */ + 0x7e, /* 01111110 */ + 0x18, /* 00011000 */ + 0x18, /* 00011000 */ + + /* + * 158 0x9e '' + */ + 0xf8, /* 11111000 */ + 0xcc, /* 11001100 */ + 0xcc, /* 11001100 */ + 0xfa, /* 11111010 */ + 0xc6, /* 11000110 */ + 0xcf, /* 11001111 */ + 0xc6, /* 11000110 */ + 0xc7, /* 11000111 */ + + /* + * 159 0x9f '' + */ + 0x0e, /* 00001110 */ + 0x1b, /* 00011011 */ + 0x18, /* 00011000 */ + 0x3c, /* 00111100 */ + 0x18, /* 00011000 */ + 0xd8, /* 11011000 */ + 0x70, /* 01110000 */ + 0x00, /* 00000000 */ + + /* + * 160 0xa0 '' + */ + 0x18, /* 00011000 */ + 0x30, /* 00110000 */ + 0x78, /* 01111000 */ + 0x0c, /* 00001100 */ + 0x7c, /* 01111100 */ + 0xcc, /* 11001100 */ + 0x76, /* 01110110 */ + 0x00, /* 00000000 */ + + /* + * 161 0xa1 '' + */ + 0x0c, /* 00001100 */ + 0x18, /* 00011000 */ + 0x00, /* 00000000 */ + 0x38, /* 00111000 */ + 0x18, /* 00011000 */ + 0x18, /* 00011000 */ + 0x3c, /* 00111100 */ + 0x00, /* 00000000 */ + + /* + * 162 0xa2 '' + */ + 0x0c, /* 00001100 */ + 0x18, /* 00011000 */ + 0x7c, /* 01111100 */ + 0xc6, /* 11000110 */ + 0xc6, /* 11000110 */ + 0xc6, /* 11000110 */ + 0x7c, /* 01111100 */ + 0x00, /* 00000000 */ + + /* + * 163 0xa3 '' + */ + 0x18, /* 00011000 */ + 0x30, /* 00110000 */ + 0xcc, /* 11001100 */ + 0xcc, /* 11001100 */ + 0xcc, /* 11001100 */ + 0xcc, /* 11001100 */ + 0x76, /* 01110110 */ + 0x00, /* 00000000 */ + + /* + * 164 0xa4 '' + */ + 0x76, /* 01110110 */ + 0xdc, /* 11011100 */ + 0x00, /* 00000000 */ + 0xdc, /* 11011100 */ + 0x66, /* 01100110 */ + 0x66, /* 01100110 */ + 0x66, /* 01100110 */ + 0x00, /* 00000000 */ + + /* + * 165 0xa5 '' + */ + 0x76, /* 01110110 */ + 0xdc, /* 11011100 */ + 0x00, /* 00000000 */ + 0xe6, /* 11100110 */ + 0xf6, /* 11110110 */ + 0xde, /* 11011110 */ + 0xce, /* 11001110 */ + 0x00, /* 00000000 */ + + /* + * 166 0xa6 '' + */ + 0x3c, /* 00111100 */ + 0x6c, /* 01101100 */ + 0x6c, /* 01101100 */ + 0x3e, /* 00111110 */ + 0x00, /* 00000000 */ + 0x7e, /* 01111110 */ + 0x00, /* 00000000 */ + 0x00, /* 00000000 */ + + /* + * 167 0xa7 '' + */ + 0x38, /* 00111000 */ + 0x6c, /* 01101100 */ + 0x6c, /* 01101100 */ + 0x38, /* 00111000 */ + 0x00, /* 00000000 */ + 0x7c, /* 01111100 */ + 0x00, /* 00000000 */ + 0x00, /* 00000000 */ + + /* + * 168 0xa8 '' + */ + 0x18, /* 00011000 */ + 0x00, /* 00000000 */ + 0x18, /* 00011000 */ + 0x18, /* 00011000 */ + 0x30, /* 00110000 */ + 0x63, /* 01100011 */ + 0x3e, /* 00111110 */ + 0x00, /* 00000000 */ + + /* + * 169 0xa9 '' + */ + 0x00, /* 00000000 */ + 0x00, /* 00000000 */ + 0x00, /* 00000000 */ + 0xfe, /* 11111110 */ + 0xc0, /* 11000000 */ + 0xc0, /* 11000000 */ + 0x00, /* 00000000 */ + 0x00, /* 00000000 */ + + /* + * 170 0xaa '' + */ + 0x00, /* 00000000 */ + 0x00, /* 00000000 */ + 0x00, /* 00000000 */ + 0xfe, /* 11111110 */ + 0x06, /* 00000110 */ + 0x06, /* 00000110 */ + 0x00, /* 00000000 */ + 0x00, /* 00000000 */ + + /* + * 171 0xab '' + */ + 0x63, /* 01100011 */ + 0xe6, /* 11100110 */ + 0x6c, /* 01101100 */ + 0x7e, /* 01111110 */ + 0x33, /* 00110011 */ + 0x66, /* 01100110 */ + 0xcc, /* 11001100 */ + 0x0f, /* 00001111 */ + + /* + * 172 0xac '' + */ + 0x63, /* 01100011 */ + 0xe6, /* 11100110 */ + 0x6c, /* 01101100 */ + 0x7a, /* 01111010 */ + 0x36, /* 00110110 */ + 0x6a, /* 01101010 */ + 0xdf, /* 11011111 */ + 0x06, /* 00000110 */ + + /* + * 173 0xad '' + */ + 0x18, /* 00011000 */ + 0x00, /* 00000000 */ + 0x18, /* 00011000 */ + 0x18, /* 00011000 */ + 0x3c, /* 00111100 */ + 0x3c, /* 00111100 */ + 0x18, /* 00011000 */ + 0x00, /* 00000000 */ + + /* + * 174 0xae '' + */ + 0x00, /* 00000000 */ + 0x33, /* 00110011 */ + 0x66, /* 01100110 */ + 0xcc, /* 11001100 */ + 0x66, /* 01100110 */ + 0x33, /* 00110011 */ + 0x00, /* 00000000 */ + 0x00, /* 00000000 */ + + /* + * 175 0xaf '' + */ + 0x00, /* 00000000 */ + 0xcc, /* 11001100 */ + 0x66, /* 01100110 */ + 0x33, /* 00110011 */ + 0x66, /* 01100110 */ + 0xcc, /* 11001100 */ + 0x00, /* 00000000 */ + 0x00, /* 00000000 */ + + /* + * 176 0xb0 '' + */ + 0x22, /* 00100010 */ + 0x88, /* 10001000 */ + 0x22, /* 00100010 */ + 0x88, /* 10001000 */ + 0x22, /* 00100010 */ + 0x88, /* 10001000 */ + 0x22, /* 00100010 */ + 0x88, /* 10001000 */ + + /* + * 177 0xb1 '' + */ + 0x55, /* 01010101 */ + 0xaa, /* 10101010 */ + 0x55, /* 01010101 */ + 0xaa, /* 10101010 */ + 0x55, /* 01010101 */ + 0xaa, /* 10101010 */ + 0x55, /* 01010101 */ + 0xaa, /* 10101010 */ + + /* + * 178 0xb2 '' + */ + 0x77, /* 01110111 */ + 0xdd, /* 11011101 */ + 0x77, /* 01110111 */ + 0xdd, /* 11011101 */ + 0x77, /* 01110111 */ + 0xdd, /* 11011101 */ + 0x77, /* 01110111 */ + 0xdd, /* 11011101 */ + + /* + * 179 0xb3 '' + */ + 0x18, /* 00011000 */ + 0x18, /* 00011000 */ + 0x18, /* 00011000 */ + 0x18, /* 00011000 */ + 0x18, /* 00011000 */ + 0x18, /* 00011000 */ + 0x18, /* 00011000 */ + 0x18, /* 00011000 */ + + /* + * 180 0xb4 '' + */ + 0x18, /* 00011000 */ + 0x18, /* 00011000 */ + 0x18, /* 00011000 */ + 0x18, /* 00011000 */ + 0xf8, /* 11111000 */ + 0x18, /* 00011000 */ + 0x18, /* 00011000 */ + 0x18, /* 00011000 */ + + /* + * 181 0xb5 '' + */ + 0x18, /* 00011000 */ + 0x18, /* 00011000 */ + 0xf8, /* 11111000 */ + 0x18, /* 00011000 */ + 0xf8, /* 11111000 */ + 0x18, /* 00011000 */ + 0x18, /* 00011000 */ + 0x18, /* 00011000 */ + + /* + * 182 0xb6 '' + */ + 0x36, /* 00110110 */ + 0x36, /* 00110110 */ + 0x36, /* 00110110 */ + 0x36, /* 00110110 */ + 0xf6, /* 11110110 */ + 0x36, /* 00110110 */ + 0x36, /* 00110110 */ + 0x36, /* 00110110 */ + + /* + * 183 0xb7 '' + */ + 0x00, /* 00000000 */ + 0x00, /* 00000000 */ + 0x00, /* 00000000 */ + 0x00, /* 00000000 */ + 0xfe, /* 11111110 */ + 0x36, /* 00110110 */ + 0x36, /* 00110110 */ + 0x36, /* 00110110 */ + + /* + * 184 0xb8 '' + */ + 0x00, /* 00000000 */ + 0x00, /* 00000000 */ + 0xf8, /* 11111000 */ + 0x18, /* 00011000 */ + 0xf8, /* 11111000 */ + 0x18, /* 00011000 */ + 0x18, /* 00011000 */ + 0x18, /* 00011000 */ + + /* + * 185 0xb9 '' + */ + 0x36, /* 00110110 */ + 0x36, /* 00110110 */ + 0xf6, /* 11110110 */ + 0x06, /* 00000110 */ + 0xf6, /* 11110110 */ + 0x36, /* 00110110 */ + 0x36, /* 00110110 */ + 0x36, /* 00110110 */ + + /* + * 186 0xba '' + */ + 0x36, /* 00110110 */ + 0x36, /* 00110110 */ + 0x36, /* 00110110 */ + 0x36, /* 00110110 */ + 0x36, /* 00110110 */ + 0x36, /* 00110110 */ + 0x36, /* 00110110 */ + 0x36, /* 00110110 */ + + /* + * 187 0xbb '' + */ + 0x00, /* 00000000 */ + 0x00, /* 00000000 */ + 0xfe, /* 11111110 */ + 0x06, /* 00000110 */ + 0xf6, /* 11110110 */ + 0x36, /* 00110110 */ + 0x36, /* 00110110 */ + 0x36, /* 00110110 */ + + /* + * 188 0xbc '' + */ + 0x36, /* 00110110 */ + 0x36, /* 00110110 */ + 0xf6, /* 11110110 */ + 0x06, /* 00000110 */ + 0xfe, /* 11111110 */ + 0x00, /* 00000000 */ + 0x00, /* 00000000 */ + 0x00, /* 00000000 */ + + /* + * 189 0xbd '' + */ + 0x36, /* 00110110 */ + 0x36, /* 00110110 */ + 0x36, /* 00110110 */ + 0x36, /* 00110110 */ + 0xfe, /* 11111110 */ + 0x00, /* 00000000 */ + 0x00, /* 00000000 */ + 0x00, /* 00000000 */ + + /* + * 190 0xbe '' + */ + 0x18, /* 00011000 */ + 0x18, /* 00011000 */ + 0xf8, /* 11111000 */ + 0x18, /* 00011000 */ + 0xf8, /* 11111000 */ + 0x00, /* 00000000 */ + 0x00, /* 00000000 */ + 0x00, /* 00000000 */ + + /* + * 191 0xbf '' + */ + 0x00, /* 00000000 */ + 0x00, /* 00000000 */ + 0x00, /* 00000000 */ + 0x00, /* 00000000 */ + 0xf8, /* 11111000 */ + 0x18, /* 00011000 */ + 0x18, /* 00011000 */ + 0x18, /* 00011000 */ + + /* + * 192 0xc0 '' + */ + 0x18, /* 00011000 */ + 0x18, /* 00011000 */ + 0x18, /* 00011000 */ + 0x18, /* 00011000 */ + 0x1f, /* 00011111 */ + 0x00, /* 00000000 */ + 0x00, /* 00000000 */ + 0x00, /* 00000000 */ + + /* + * 193 0xc1 '' + */ + 0x18, /* 00011000 */ + 0x18, /* 00011000 */ + 0x18, /* 00011000 */ + 0x18, /* 00011000 */ + 0xff, /* 11111111 */ + 0x00, /* 00000000 */ + 0x00, /* 00000000 */ + 0x00, /* 00000000 */ + + /* + * 194 0xc2 '' + */ + 0x00, /* 00000000 */ + 0x00, /* 00000000 */ + 0x00, /* 00000000 */ + 0x00, /* 00000000 */ + 0xff, /* 11111111 */ + 0x18, /* 00011000 */ + 0x18, /* 00011000 */ + 0x18, /* 00011000 */ + + /* + * 195 0xc3 '' + */ + 0x18, /* 00011000 */ + 0x18, /* 00011000 */ + 0x18, /* 00011000 */ + 0x18, /* 00011000 */ + 0x1f, /* 00011111 */ + 0x18, /* 00011000 */ + 0x18, /* 00011000 */ + 0x18, /* 00011000 */ + + /* + * 196 0xc4 '' + */ + 0x00, /* 00000000 */ + 0x00, /* 00000000 */ + 0x00, /* 00000000 */ + 0x00, /* 00000000 */ + 0xff, /* 11111111 */ + 0x00, /* 00000000 */ + 0x00, /* 00000000 */ + 0x00, /* 00000000 */ + + /* + * 197 0xc5 '' + */ + 0x18, /* 00011000 */ + 0x18, /* 00011000 */ + 0x18, /* 00011000 */ + 0x18, /* 00011000 */ + 0xff, /* 11111111 */ + 0x18, /* 00011000 */ + 0x18, /* 00011000 */ + 0x18, /* 00011000 */ + + /* + * 198 0xc6 '' + */ + 0x18, /* 00011000 */ + 0x18, /* 00011000 */ + 0x1f, /* 00011111 */ + 0x18, /* 00011000 */ + 0x1f, /* 00011111 */ + 0x18, /* 00011000 */ + 0x18, /* 00011000 */ + 0x18, /* 00011000 */ + + /* + * 199 0xc7 '' + */ + 0x36, /* 00110110 */ + 0x36, /* 00110110 */ + 0x36, /* 00110110 */ + 0x36, /* 00110110 */ + 0x37, /* 00110111 */ + 0x36, /* 00110110 */ + 0x36, /* 00110110 */ + 0x36, /* 00110110 */ + + /* + * 200 0xc8 '' + */ + 0x36, /* 00110110 */ + 0x36, /* 00110110 */ + 0x37, /* 00110111 */ + 0x30, /* 00110000 */ + 0x3f, /* 00111111 */ + 0x00, /* 00000000 */ + 0x00, /* 00000000 */ + 0x00, /* 00000000 */ + + /* + * 201 0xc9 '' + */ + 0x00, /* 00000000 */ + 0x00, /* 00000000 */ + 0x3f, /* 00111111 */ + 0x30, /* 00110000 */ + 0x37, /* 00110111 */ + 0x36, /* 00110110 */ + 0x36, /* 00110110 */ + 0x36, /* 00110110 */ + + /* + * 202 0xca '' + */ + 0x36, /* 00110110 */ + 0x36, /* 00110110 */ + 0xf7, /* 11110111 */ + 0x00, /* 00000000 */ + 0xff, /* 11111111 */ + 0x00, /* 00000000 */ + 0x00, /* 00000000 */ + 0x00, /* 00000000 */ + + /* + * 203 0xcb '' + */ + 0x00, /* 00000000 */ + 0x00, /* 00000000 */ + 0xff, /* 11111111 */ + 0x00, /* 00000000 */ + 0xf7, /* 11110111 */ + 0x36, /* 00110110 */ + 0x36, /* 00110110 */ + 0x36, /* 00110110 */ + + /* + * 204 0xcc '' + */ + 0x36, /* 00110110 */ + 0x36, /* 00110110 */ + 0x37, /* 00110111 */ + 0x30, /* 00110000 */ + 0x37, /* 00110111 */ + 0x36, /* 00110110 */ + 0x36, /* 00110110 */ + 0x36, /* 00110110 */ + + /* + * 205 0xcd '' + */ + 0x00, /* 00000000 */ + 0x00, /* 00000000 */ + 0xff, /* 11111111 */ + 0x00, /* 00000000 */ + 0xff, /* 11111111 */ + 0x00, /* 00000000 */ + 0x00, /* 00000000 */ + 0x00, /* 00000000 */ + + /* + * 206 0xce '' + */ + 0x36, /* 00110110 */ + 0x36, /* 00110110 */ + 0xf7, /* 11110111 */ + 0x00, /* 00000000 */ + 0xf7, /* 11110111 */ + 0x36, /* 00110110 */ + 0x36, /* 00110110 */ + 0x36, /* 00110110 */ + + /* + * 207 0xcf '' + */ + 0x18, /* 00011000 */ + 0x18, /* 00011000 */ + 0xff, /* 11111111 */ + 0x00, /* 00000000 */ + 0xff, /* 11111111 */ + 0x00, /* 00000000 */ + 0x00, /* 00000000 */ + 0x00, /* 00000000 */ + + /* + * 208 0xd0 '' + */ + 0x36, /* 00110110 */ + 0x36, /* 00110110 */ + 0x36, /* 00110110 */ + 0x36, /* 00110110 */ + 0xff, /* 11111111 */ + 0x00, /* 00000000 */ + 0x00, /* 00000000 */ + 0x00, /* 00000000 */ + + /* + * 209 0xd1 '' + */ + 0x00, /* 00000000 */ + 0x00, /* 00000000 */ + 0xff, /* 11111111 */ + 0x00, /* 00000000 */ + 0xff, /* 11111111 */ + 0x18, /* 00011000 */ + 0x18, /* 00011000 */ + 0x18, /* 00011000 */ + + /* + * 210 0xd2 '' + */ + 0x00, /* 00000000 */ + 0x00, /* 00000000 */ + 0x00, /* 00000000 */ + 0x00, /* 00000000 */ + 0xff, /* 11111111 */ + 0x36, /* 00110110 */ + 0x36, /* 00110110 */ + 0x36, /* 00110110 */ + + /* + * 211 0xd3 '' + */ + 0x36, /* 00110110 */ + 0x36, /* 00110110 */ + 0x36, /* 00110110 */ + 0x36, /* 00110110 */ + 0x3f, /* 00111111 */ + 0x00, /* 00000000 */ + 0x00, /* 00000000 */ + 0x00, /* 00000000 */ + + /* + * 212 0xd4 '' + */ + 0x18, /* 00011000 */ + 0x18, /* 00011000 */ + 0x1f, /* 00011111 */ + 0x18, /* 00011000 */ + 0x1f, /* 00011111 */ + 0x00, /* 00000000 */ + 0x00, /* 00000000 */ + 0x00, /* 00000000 */ + + /* + * 213 0xd5 '' + */ + 0x00, /* 00000000 */ + 0x00, /* 00000000 */ + 0x1f, /* 00011111 */ + 0x18, /* 00011000 */ + 0x1f, /* 00011111 */ + 0x18, /* 00011000 */ + 0x18, /* 00011000 */ + 0x18, /* 00011000 */ + + /* + * 214 0xd6 '' + */ + 0x00, /* 00000000 */ + 0x00, /* 00000000 */ + 0x00, /* 00000000 */ + 0x00, /* 00000000 */ + 0x3f, /* 00111111 */ + 0x36, /* 00110110 */ + 0x36, /* 00110110 */ + 0x36, /* 00110110 */ + + /* + * 215 0xd7 '' + */ + 0x36, /* 00110110 */ + 0x36, /* 00110110 */ + 0x36, /* 00110110 */ + 0x36, /* 00110110 */ + 0xff, /* 11111111 */ + 0x36, /* 00110110 */ + 0x36, /* 00110110 */ + 0x36, /* 00110110 */ + + /* + * 216 0xd8 '' + */ + 0x18, /* 00011000 */ + 0x18, /* 00011000 */ + 0xff, /* 11111111 */ + 0x18, /* 00011000 */ + 0xff, /* 11111111 */ + 0x18, /* 00011000 */ + 0x18, /* 00011000 */ + 0x18, /* 00011000 */ + + /* + * 217 0xd9 '' + */ + 0x18, /* 00011000 */ + 0x18, /* 00011000 */ + 0x18, /* 00011000 */ + 0x18, /* 00011000 */ + 0xf8, /* 11111000 */ + 0x00, /* 00000000 */ + 0x00, /* 00000000 */ + 0x00, /* 00000000 */ + + /* + * 218 0xda '' + */ + 0x00, /* 00000000 */ + 0x00, /* 00000000 */ + 0x00, /* 00000000 */ + 0x00, /* 00000000 */ + 0x1f, /* 00011111 */ + 0x18, /* 00011000 */ + 0x18, /* 00011000 */ + 0x18, /* 00011000 */ + + /* + * 219 0xdb '' + */ + 0xff, /* 11111111 */ + 0xff, /* 11111111 */ + 0xff, /* 11111111 */ + 0xff, /* 11111111 */ + 0xff, /* 11111111 */ + 0xff, /* 11111111 */ + 0xff, /* 11111111 */ + 0xff, /* 11111111 */ + + /* + * 220 0xdc '' + */ + 0x00, /* 00000000 */ + 0x00, /* 00000000 */ + 0x00, /* 00000000 */ + 0x00, /* 00000000 */ + 0xff, /* 11111111 */ + 0xff, /* 11111111 */ + 0xff, /* 11111111 */ + 0xff, /* 11111111 */ + + /* + * 221 0xdd '' + */ + 0xf0, /* 11110000 */ + 0xf0, /* 11110000 */ + 0xf0, /* 11110000 */ + 0xf0, /* 11110000 */ + 0xf0, /* 11110000 */ + 0xf0, /* 11110000 */ + 0xf0, /* 11110000 */ + 0xf0, /* 11110000 */ + + /* + * 222 0xde '' + */ + 0x0f, /* 00001111 */ + 0x0f, /* 00001111 */ + 0x0f, /* 00001111 */ + 0x0f, /* 00001111 */ + 0x0f, /* 00001111 */ + 0x0f, /* 00001111 */ + 0x0f, /* 00001111 */ + 0x0f, /* 00001111 */ + + /* + * 223 0xdf '' + */ + 0xff, /* 11111111 */ + 0xff, /* 11111111 */ + 0xff, /* 11111111 */ + 0xff, /* 11111111 */ + 0x00, /* 00000000 */ + 0x00, /* 00000000 */ + 0x00, /* 00000000 */ + 0x00, /* 00000000 */ + + /* + * 224 0xe0 '' + */ + 0x00, /* 00000000 */ + 0x00, /* 00000000 */ + 0x76, /* 01110110 */ + 0xdc, /* 11011100 */ + 0xc8, /* 11001000 */ + 0xdc, /* 11011100 */ + 0x76, /* 01110110 */ + 0x00, /* 00000000 */ + + /* + * 225 0xe1 '' + */ + 0x78, /* 01111000 */ + 0xcc, /* 11001100 */ + 0xcc, /* 11001100 */ + 0xd8, /* 11011000 */ + 0xcc, /* 11001100 */ + 0xc6, /* 11000110 */ + 0xcc, /* 11001100 */ + 0x00, /* 00000000 */ + + /* + * 226 0xe2 '' + */ + 0xfe, /* 11111110 */ + 0xc6, /* 11000110 */ + 0xc0, /* 11000000 */ + 0xc0, /* 11000000 */ + 0xc0, /* 11000000 */ + 0xc0, /* 11000000 */ + 0xc0, /* 11000000 */ + 0x00, /* 00000000 */ + + /* + * 227 0xe3 '' + */ + 0x00, /* 00000000 */ + 0x00, /* 00000000 */ + 0xfe, /* 11111110 */ + 0x6c, /* 01101100 */ + 0x6c, /* 01101100 */ + 0x6c, /* 01101100 */ + 0x6c, /* 01101100 */ + 0x00, /* 00000000 */ + + /* + * 228 0xe4 '' + */ + 0xfe, /* 11111110 */ + 0xc6, /* 11000110 */ + 0x60, /* 01100000 */ + 0x30, /* 00110000 */ + 0x60, /* 01100000 */ + 0xc6, /* 11000110 */ + 0xfe, /* 11111110 */ + 0x00, /* 00000000 */ + + /* + * 229 0xe5 '' + */ + 0x00, /* 00000000 */ + 0x00, /* 00000000 */ + 0x7e, /* 01111110 */ + 0xd8, /* 11011000 */ + 0xd8, /* 11011000 */ + 0xd8, /* 11011000 */ + 0x70, /* 01110000 */ + 0x00, /* 00000000 */ + + /* + * 230 0xe6 '' + */ + 0x00, /* 00000000 */ + 0x00, /* 00000000 */ + 0x66, /* 01100110 */ + 0x66, /* 01100110 */ + 0x66, /* 01100110 */ + 0x66, /* 01100110 */ + 0x7c, /* 01111100 */ + 0xc0, /* 11000000 */ + + /* + * 231 0xe7 '' + */ + 0x00, /* 00000000 */ + 0x76, /* 01110110 */ + 0xdc, /* 11011100 */ + 0x18, /* 00011000 */ + 0x18, /* 00011000 */ + 0x18, /* 00011000 */ + 0x18, /* 00011000 */ + 0x00, /* 00000000 */ + + /* + * 232 0xe8 '' + */ + 0x7e, /* 01111110 */ + 0x18, /* 00011000 */ + 0x3c, /* 00111100 */ + 0x66, /* 01100110 */ + 0x66, /* 01100110 */ + 0x3c, /* 00111100 */ + 0x18, /* 00011000 */ + 0x7e, /* 01111110 */ + + /* + * 233 0xe9 '' + */ + 0x38, /* 00111000 */ + 0x6c, /* 01101100 */ + 0xc6, /* 11000110 */ + 0xfe, /* 11111110 */ + 0xc6, /* 11000110 */ + 0x6c, /* 01101100 */ + 0x38, /* 00111000 */ + 0x00, /* 00000000 */ + + /* + * 234 0xea '' + */ + 0x38, /* 00111000 */ + 0x6c, /* 01101100 */ + 0xc6, /* 11000110 */ + 0xc6, /* 11000110 */ + 0x6c, /* 01101100 */ + 0x6c, /* 01101100 */ + 0xee, /* 11101110 */ + 0x00, /* 00000000 */ + + /* + * 235 0xeb '' + */ + 0x0e, /* 00001110 */ + 0x18, /* 00011000 */ + 0x0c, /* 00001100 */ + 0x3e, /* 00111110 */ + 0x66, /* 01100110 */ + 0x66, /* 01100110 */ + 0x3c, /* 00111100 */ + 0x00, /* 00000000 */ + + /* + * 236 0xec '' + */ + 0x00, /* 00000000 */ + 0x00, /* 00000000 */ + 0x7e, /* 01111110 */ + 0xdb, /* 11011011 */ + 0xdb, /* 11011011 */ + 0x7e, /* 01111110 */ + 0x00, /* 00000000 */ + 0x00, /* 00000000 */ + + /* + * 237 0xed '' + */ + 0x06, /* 00000110 */ + 0x0c, /* 00001100 */ + 0x7e, /* 01111110 */ + 0xdb, /* 11011011 */ + 0xdb, /* 11011011 */ + 0x7e, /* 01111110 */ + 0x60, /* 01100000 */ + 0xc0, /* 11000000 */ + + /* + * 238 0xee '' + */ + 0x1e, /* 00011110 */ + 0x30, /* 00110000 */ + 0x60, /* 01100000 */ + 0x7e, /* 01111110 */ + 0x60, /* 01100000 */ + 0x30, /* 00110000 */ + 0x1e, /* 00011110 */ + 0x00, /* 00000000 */ + + /* + * 239 0xef '' + */ + 0x00, /* 00000000 */ + 0x7c, /* 01111100 */ + 0xc6, /* 11000110 */ + 0xc6, /* 11000110 */ + 0xc6, /* 11000110 */ + 0xc6, /* 11000110 */ + 0xc6, /* 11000110 */ + 0x00, /* 00000000 */ + + /* + * 240 0xf0 '' + */ + 0x00, /* 00000000 */ + 0xfe, /* 11111110 */ + 0x00, /* 00000000 */ + 0xfe, /* 11111110 */ + 0x00, /* 00000000 */ + 0xfe, /* 11111110 */ + 0x00, /* 00000000 */ + 0x00, /* 00000000 */ + + /* + * 241 0xf1 '' + */ + 0x18, /* 00011000 */ + 0x18, /* 00011000 */ + 0x7e, /* 01111110 */ + 0x18, /* 00011000 */ + 0x18, /* 00011000 */ + 0x00, /* 00000000 */ + 0x7e, /* 01111110 */ + 0x00, /* 00000000 */ + + /* + * 242 0xf2 '' + */ + 0x30, /* 00110000 */ + 0x18, /* 00011000 */ + 0x0c, /* 00001100 */ + 0x18, /* 00011000 */ + 0x30, /* 00110000 */ + 0x00, /* 00000000 */ + 0x7e, /* 01111110 */ + 0x00, /* 00000000 */ + + /* + * 243 0xf3 '' + */ + 0x0c, /* 00001100 */ + 0x18, /* 00011000 */ + 0x30, /* 00110000 */ + 0x18, /* 00011000 */ + 0x0c, /* 00001100 */ + 0x00, /* 00000000 */ + 0x7e, /* 01111110 */ + 0x00, /* 00000000 */ + + /* + * 244 0xf4 '' + */ + 0x0e, /* 00001110 */ + 0x1b, /* 00011011 */ + 0x1b, /* 00011011 */ + 0x18, /* 00011000 */ + 0x18, /* 00011000 */ + 0x18, /* 00011000 */ + 0x18, /* 00011000 */ + 0x18, /* 00011000 */ + + /* + * 245 0xf5 '' + */ + 0x18, /* 00011000 */ + 0x18, /* 00011000 */ + 0x18, /* 00011000 */ + 0x18, /* 00011000 */ + 0x18, /* 00011000 */ + 0xd8, /* 11011000 */ + 0xd8, /* 11011000 */ + 0x70, /* 01110000 */ + + /* + * 246 0xf6 '' + */ + 0x00, /* 00000000 */ + 0x18, /* 00011000 */ + 0x00, /* 00000000 */ + 0x7e, /* 01111110 */ + 0x00, /* 00000000 */ + 0x18, /* 00011000 */ + 0x00, /* 00000000 */ + 0x00, /* 00000000 */ + + /* + * 247 0xf7 '' + */ + 0x00, /* 00000000 */ + 0x76, /* 01110110 */ + 0xdc, /* 11011100 */ + 0x00, /* 00000000 */ + 0x76, /* 01110110 */ + 0xdc, /* 11011100 */ + 0x00, /* 00000000 */ + 0x00, /* 00000000 */ + + /* + * 248 0xf8 '' + */ + 0x38, /* 00111000 */ + 0x6c, /* 01101100 */ + 0x6c, /* 01101100 */ + 0x38, /* 00111000 */ + 0x00, /* 00000000 */ + 0x00, /* 00000000 */ + 0x00, /* 00000000 */ + 0x00, /* 00000000 */ + + /* + * 249 0xf9 '' + */ + 0x00, /* 00000000 */ + 0x00, /* 00000000 */ + 0x00, /* 00000000 */ + 0x18, /* 00011000 */ + 0x18, /* 00011000 */ + 0x00, /* 00000000 */ + 0x00, /* 00000000 */ + 0x00, /* 00000000 */ + + /* + * 250 0xfa '' + */ + 0x00, /* 00000000 */ + 0x00, /* 00000000 */ + 0x00, /* 00000000 */ + 0x18, /* 00011000 */ + 0x00, /* 00000000 */ + 0x00, /* 00000000 */ + 0x00, /* 00000000 */ + 0x00, /* 00000000 */ + + /* + * 251 0xfb '' + */ + 0x0f, /* 00001111 */ + 0x0c, /* 00001100 */ + 0x0c, /* 00001100 */ + 0x0c, /* 00001100 */ + 0xec, /* 11101100 */ + 0x6c, /* 01101100 */ + 0x3c, /* 00111100 */ + 0x1c, /* 00011100 */ + + /* + * 252 0xfc '' + */ + 0x6c, /* 01101100 */ + 0x36, /* 00110110 */ + 0x36, /* 00110110 */ + 0x36, /* 00110110 */ + 0x36, /* 00110110 */ + 0x00, /* 00000000 */ + 0x00, /* 00000000 */ + 0x00, /* 00000000 */ + + /* + * 253 0xfd '' + */ + 0x78, /* 01111000 */ + 0x0c, /* 00001100 */ + 0x18, /* 00011000 */ + 0x30, /* 00110000 */ + 0x7c, /* 01111100 */ + 0x00, /* 00000000 */ + 0x00, /* 00000000 */ + 0x00, /* 00000000 */ + + /* + * 254 0xfe '' + */ + 0x00, /* 00000000 */ + 0x00, /* 00000000 */ + 0x3c, /* 00111100 */ + 0x3c, /* 00111100 */ + 0x3c, /* 00111100 */ + 0x3c, /* 00111100 */ + 0x00, /* 00000000 */ + 0x00, /* 00000000 */ + + /* + * 255 0xff ' ' + */ + 0x00, /* 00000000 */ + 0x00, /* 00000000 */ + 0x00, /* 00000000 */ + 0x00, /* 00000000 */ + 0x00, /* 00000000 */ + 0x00, /* 00000000 */ + 0x00, /* 00000000 */ + 0x00, /* 00000000 */ }; @@ -3116,123 +3116,123 @@ static SDL_Texture *SDLTest_CharTextureCache[256]; int SDLTest_DrawCharacter(SDL_Renderer *renderer, int x, int y, char c) { - const Uint32 charWidth = 8; - const Uint32 charHeight = 8; - const Uint32 charSize = 8; - SDL_Rect srect; - SDL_Rect drect; - int result; - Uint32 ix, iy; - const unsigned char *charpos; - Uint8 *curpos; - Uint8 patt, mask; - Uint8 *linepos; - Uint32 pitch; - SDL_Surface *character; - Uint32 ci; - Uint8 r, g, b, a; + const Uint32 charWidth = 8; + const Uint32 charHeight = 8; + const Uint32 charSize = 8; + SDL_Rect srect; + SDL_Rect drect; + int result; + Uint32 ix, iy; + const unsigned char *charpos; + Uint8 *curpos; + Uint8 patt, mask; + Uint8 *linepos; + Uint32 pitch; + SDL_Surface *character; + Uint32 ci; + Uint8 r, g, b, a; - /* - * Setup source rectangle - */ - srect.x = 0; - srect.y = 0; - srect.w = charWidth; - srect.h = charHeight; + /* + * Setup source rectangle + */ + srect.x = 0; + srect.y = 0; + srect.w = charWidth; + srect.h = charHeight; - /* - * Setup destination rectangle - */ - drect.x = x; - drect.y = y; - drect.w = charWidth; - drect.h = charHeight; + /* + * Setup destination rectangle + */ + drect.x = x; + drect.y = y; + drect.w = charWidth; + drect.h = charHeight; - /* Character index in cache */ - ci = (unsigned char)c; + /* Character index in cache */ + ci = (unsigned char)c; - /* - * Create new charWidth x charHeight bitmap surface if not already present. - */ - if (SDLTest_CharTextureCache[ci] == NULL) { - /* - * Redraw character into surface - */ - character = SDL_CreateRGBSurface(SDL_SWSURFACE, - charWidth, charHeight, 32, - 0xFF000000, 0x00FF0000, 0x0000FF00, 0x000000FF); - if (character == NULL) { - return (-1); - } + /* + * Create new charWidth x charHeight bitmap surface if not already present. + */ + if (SDLTest_CharTextureCache[ci] == NULL) { + /* + * Redraw character into surface + */ + character = SDL_CreateRGBSurface(SDL_SWSURFACE, + charWidth, charHeight, 32, + 0xFF000000, 0x00FF0000, 0x0000FF00, 0x000000FF); + if (character == NULL) { + return (-1); + } - charpos = SDLTest_FontData + ci * charSize; - linepos = (Uint8 *)character->pixels; - pitch = character->pitch; + charpos = SDLTest_FontData + ci * charSize; + linepos = (Uint8 *)character->pixels; + pitch = character->pitch; - /* - * Drawing loop - */ - patt = 0; - for (iy = 0; iy < charWidth; iy++) { - mask = 0x00; - curpos = linepos; - for (ix = 0; ix < charWidth; ix++) { - if (!(mask >>= 1)) { - patt = *charpos++; - mask = 0x80; - } - if (patt & mask) { - *(Uint32 *)curpos = 0xffffffff; - } else { - *(Uint32 *)curpos = 0; - } - curpos += 4; - } - linepos += pitch; - } + /* + * Drawing loop + */ + patt = 0; + for (iy = 0; iy < charWidth; iy++) { + mask = 0x00; + curpos = linepos; + for (ix = 0; ix < charWidth; ix++) { + if (!(mask >>= 1)) { + patt = *charpos++; + mask = 0x80; + } + if (patt & mask) { + *(Uint32 *)curpos = 0xffffffff; + } else { + *(Uint32 *)curpos = 0; + } + curpos += 4; + } + linepos += pitch; + } - /* Convert temp surface into texture */ - SDLTest_CharTextureCache[ci] = SDL_CreateTextureFromSurface(renderer, character); - SDL_FreeSurface(character); + /* Convert temp surface into texture */ + SDLTest_CharTextureCache[ci] = SDL_CreateTextureFromSurface(renderer, character); + SDL_FreeSurface(character); - /* - * Check pointer - */ - if (SDLTest_CharTextureCache[ci] == NULL) { - return (-1); - } - } + /* + * Check pointer + */ + if (SDLTest_CharTextureCache[ci] == NULL) { + return (-1); + } + } - /* - * Set color - */ - result = 0; - result |= SDL_GetRenderDrawColor(renderer, &r, &g, &b, &a); - result |= SDL_SetTextureColorMod(SDLTest_CharTextureCache[ci], r, g, b); - result |= SDL_SetTextureAlphaMod(SDLTest_CharTextureCache[ci], a); + /* + * Set color + */ + result = 0; + result |= SDL_GetRenderDrawColor(renderer, &r, &g, &b, &a); + result |= SDL_SetTextureColorMod(SDLTest_CharTextureCache[ci], r, g, b); + result |= SDL_SetTextureAlphaMod(SDLTest_CharTextureCache[ci], a); - /* - * Draw texture onto destination - */ - result |= SDL_RenderCopy(renderer, SDLTest_CharTextureCache[ci], &srect, &drect); + /* + * Draw texture onto destination + */ + result |= SDL_RenderCopy(renderer, SDLTest_CharTextureCache[ci], &srect, &drect); - return (result); + return (result); } int SDLTest_DrawString(SDL_Renderer * renderer, int x, int y, const char *s) { - const Uint32 charWidth = 8; - int result = 0; - int curx = x; - int cury = y; - const char *curchar = s; + const Uint32 charWidth = 8; + int result = 0; + int curx = x; + int cury = y; + const char *curchar = s; - while (*curchar && !result) { - result |= SDLTest_DrawCharacter(renderer, curx, cury, *curchar); - curx += charWidth; - curchar++; - } + while (*curchar && !result) { + result |= SDLTest_DrawCharacter(renderer, curx, cury, *curchar); + curx += charWidth; + curchar++; + } - return (result); + return (result); } diff --git a/src/test/SDL_test_fuzzer.c b/src/test/SDL_test_fuzzer.c index dcbace68c..8a27fd011 100644 --- a/src/test/SDL_test_fuzzer.c +++ b/src/test/SDL_test_fuzzer.c @@ -19,10 +19,10 @@ 3. This notice may not be removed or altered from any source distribution. */ -/* +/* Data generators for fuzzing test data in a reproducible way. - + */ #include "SDL_config.h" @@ -43,7 +43,7 @@ #include "SDL_test.h" -/** +/** * Counter for fuzzer invocations */ static int fuzzerInvocationCounter = 0; @@ -60,93 +60,93 @@ static SDLTest_RandomContext rndContext; void SDLTest_FuzzerInit(Uint64 execKey) { - Uint32 a = (execKey >> 32) & 0x00000000FFFFFFFF; - Uint32 b = execKey & 0x00000000FFFFFFFF; - SDL_memset((void *)&rndContext, 0, sizeof(SDLTest_RandomContext)); - SDLTest_RandomInit(&rndContext, a, b); - fuzzerInvocationCounter = 0; + Uint32 a = (execKey >> 32) & 0x00000000FFFFFFFF; + Uint32 b = execKey & 0x00000000FFFFFFFF; + SDL_memset((void *)&rndContext, 0, sizeof(SDLTest_RandomContext)); + SDLTest_RandomInit(&rndContext, a, b); + fuzzerInvocationCounter = 0; } int SDLTest_GetFuzzerInvocationCount() { - return fuzzerInvocationCounter; + return fuzzerInvocationCounter; } Uint8 SDLTest_RandomUint8() { - fuzzerInvocationCounter++; + fuzzerInvocationCounter++; - return (Uint8) SDLTest_RandomInt(&rndContext) & 0x000000FF; + return (Uint8) SDLTest_RandomInt(&rndContext) & 0x000000FF; } Sint8 SDLTest_RandomSint8() { - fuzzerInvocationCounter++; + fuzzerInvocationCounter++; - return (Sint8) SDLTest_RandomInt(&rndContext) & 0x000000FF; + return (Sint8) SDLTest_RandomInt(&rndContext) & 0x000000FF; } Uint16 SDLTest_RandomUint16() { - fuzzerInvocationCounter++; + fuzzerInvocationCounter++; - return (Uint16) SDLTest_RandomInt(&rndContext) & 0x0000FFFF; + return (Uint16) SDLTest_RandomInt(&rndContext) & 0x0000FFFF; } Sint16 SDLTest_RandomSint16() { - fuzzerInvocationCounter++; + fuzzerInvocationCounter++; - return (Sint16) SDLTest_RandomInt(&rndContext) & 0x0000FFFF; + return (Sint16) SDLTest_RandomInt(&rndContext) & 0x0000FFFF; } Sint32 SDLTest_RandomSint32() { - fuzzerInvocationCounter++; + fuzzerInvocationCounter++; - return (Sint32) SDLTest_RandomInt(&rndContext); + return (Sint32) SDLTest_RandomInt(&rndContext); } Uint32 SDLTest_RandomUint32() { - fuzzerInvocationCounter++; + fuzzerInvocationCounter++; - return (Uint32) SDLTest_RandomInt(&rndContext); + return (Uint32) SDLTest_RandomInt(&rndContext); } Uint64 SDLTest_RandomUint64() { - Uint64 value = 0; - Uint32 *vp = (void *)&value; + Uint64 value = 0; + Uint32 *vp = (void *)&value; - fuzzerInvocationCounter++; + fuzzerInvocationCounter++; - vp[0] = SDLTest_RandomSint32(); - vp[1] = SDLTest_RandomSint32(); + vp[0] = SDLTest_RandomSint32(); + vp[1] = SDLTest_RandomSint32(); - return value; + return value; } Sint64 SDLTest_RandomSint64() { - Uint64 value = 0; - Uint32 *vp = (void *)&value; + Uint64 value = 0; + Uint32 *vp = (void *)&value; - fuzzerInvocationCounter++; + fuzzerInvocationCounter++; - vp[0] = SDLTest_RandomSint32(); - vp[1] = SDLTest_RandomSint32(); + vp[0] = SDLTest_RandomSint32(); + vp[1] = SDLTest_RandomSint32(); - return value; + return value; } @@ -154,23 +154,23 @@ SDLTest_RandomSint64() Sint32 SDLTest_RandomIntegerInRange(Sint32 pMin, Sint32 pMax) { - Sint64 min = pMin; - Sint64 max = pMax; - Sint64 temp; - Sint64 number; + Sint64 min = pMin; + Sint64 max = pMax; + Sint64 temp; + Sint64 number; - if(pMin > pMax) { - temp = min; - min = max; - max = temp; - } else if(pMin == pMax) { - return (Sint32)min; - } + if(pMin > pMax) { + temp = min; + min = max; + max = temp; + } else if(pMin == pMax) { + return (Sint32)min; + } - number = SDLTest_RandomUint32(); - /* invocation count increment in preceeding call */ + number = SDLTest_RandomUint32(); + /* invocation count increment in preceeding call */ - return (Sint32)((number % ((max + 1) - min)) + min); + return (Sint32)((number % ((max + 1) - min)) + min); } /*! @@ -189,7 +189,7 @@ SDLTest_RandomIntegerInRange(Sint32 pMin, Sint32 pMax) * Generator works the same for other types of unsigned integers. * * \param maxValue The biggest value that is acceptable for this data type. - * For instance, for Uint8 -> 255, Uint16 -> 65536 etc. + * For instance, for Uint8 -> 255, Uint16 -> 65536 etc. * \param boundary1 defines lower boundary * \param boundary2 defines upper boundary * \param validDomain Generate only for valid domain (for the data type) @@ -200,107 +200,107 @@ Uint64 SDLTest_GenerateUnsignedBoundaryValues(const Uint64 maxValue, Uint64 boundary1, Uint64 boundary2, SDL_bool validDomain) { Uint64 b1, b2; - Uint64 delta; - Uint64 tempBuf[4]; - Uint8 index; - + Uint64 delta; + Uint64 tempBuf[4]; + Uint8 index; + /* Maybe swap */ - if (boundary1 > boundary2) { - b1 = boundary2; - b2 = boundary1; - } else { - b1 = boundary1; - b2 = boundary2; + if (boundary1 > boundary2) { + b1 = boundary2; + b2 = boundary1; + } else { + b1 = boundary1; + b2 = boundary2; } - index = 0; - if (validDomain == SDL_TRUE) { - if (b1 == b2) { - return b1; - } - - /* Generate up to 4 values within bounds */ - delta = b2 - b1; - if (delta < 4) { - do { - tempBuf[index] = b1 + index; - index++; + index = 0; + if (validDomain == SDL_TRUE) { + if (b1 == b2) { + return b1; + } + + /* Generate up to 4 values within bounds */ + delta = b2 - b1; + if (delta < 4) { + do { + tempBuf[index] = b1 + index; + index++; } while (index < delta); - } else { - tempBuf[index] = b1; - index++; - tempBuf[index] = b1 + 1; - index++; - tempBuf[index] = b2 - 1; - index++; - tempBuf[index] = b2; - index++; - } - } else { - /* Generate up to 2 values outside of bounds */ - if (b1 > 0) { - tempBuf[index] = b1 - 1; - index++; - } + } else { + tempBuf[index] = b1; + index++; + tempBuf[index] = b1 + 1; + index++; + tempBuf[index] = b2 - 1; + index++; + tempBuf[index] = b2; + index++; + } + } else { + /* Generate up to 2 values outside of bounds */ + if (b1 > 0) { + tempBuf[index] = b1 - 1; + index++; + } - if (b2 < maxValue) { - tempBuf[index] = b2 + 1; - index++; - } - } + if (b2 < maxValue) { + tempBuf[index] = b2 + 1; + index++; + } + } - if (index == 0) { - /* There are no valid boundaries */ - SDL_Unsupported(); - return 0; - } + if (index == 0) { + /* There are no valid boundaries */ + SDL_Unsupported(); + return 0; + } - return tempBuf[SDLTest_RandomUint8() % index]; + return tempBuf[SDLTest_RandomUint8() % index]; } Uint8 SDLTest_RandomUint8BoundaryValue(Uint8 boundary1, Uint8 boundary2, SDL_bool validDomain) { - /* max value for Uint8 */ - const Uint64 maxValue = UCHAR_MAX; - return (Uint8)SDLTest_GenerateUnsignedBoundaryValues(maxValue, - (Uint64) boundary1, (Uint64) boundary2, - validDomain); + /* max value for Uint8 */ + const Uint64 maxValue = UCHAR_MAX; + return (Uint8)SDLTest_GenerateUnsignedBoundaryValues(maxValue, + (Uint64) boundary1, (Uint64) boundary2, + validDomain); } Uint16 SDLTest_RandomUint16BoundaryValue(Uint16 boundary1, Uint16 boundary2, SDL_bool validDomain) { - /* max value for Uint16 */ - const Uint64 maxValue = USHRT_MAX; - return (Uint16)SDLTest_GenerateUnsignedBoundaryValues(maxValue, - (Uint64) boundary1, (Uint64) boundary2, - validDomain); + /* max value for Uint16 */ + const Uint64 maxValue = USHRT_MAX; + return (Uint16)SDLTest_GenerateUnsignedBoundaryValues(maxValue, + (Uint64) boundary1, (Uint64) boundary2, + validDomain); } Uint32 SDLTest_RandomUint32BoundaryValue(Uint32 boundary1, Uint32 boundary2, SDL_bool validDomain) { - /* max value for Uint32 */ - #if ((ULONG_MAX) == (UINT_MAX)) - const Uint64 maxValue = ULONG_MAX; + /* max value for Uint32 */ + #if ((ULONG_MAX) == (UINT_MAX)) + const Uint64 maxValue = ULONG_MAX; #else - const Uint64 maxValue = UINT_MAX; + const Uint64 maxValue = UINT_MAX; #endif - return (Uint32)SDLTest_GenerateUnsignedBoundaryValues(maxValue, - (Uint64) boundary1, (Uint64) boundary2, - validDomain); + return (Uint32)SDLTest_GenerateUnsignedBoundaryValues(maxValue, + (Uint64) boundary1, (Uint64) boundary2, + validDomain); } Uint64 SDLTest_RandomUint64BoundaryValue(Uint64 boundary1, Uint64 boundary2, SDL_bool validDomain) { - /* max value for Uint64 */ - const Uint64 maxValue = ULLONG_MAX; - return SDLTest_GenerateUnsignedBoundaryValues(maxValue, - (Uint64) boundary1, (Uint64) boundary2, - validDomain); + /* max value for Uint64 */ + const Uint64 maxValue = ULLONG_MAX; + return SDLTest_GenerateUnsignedBoundaryValues(maxValue, + (Uint64) boundary1, (Uint64) boundary2, + validDomain); } /*! @@ -319,9 +319,9 @@ SDLTest_RandomUint64BoundaryValue(Uint64 boundary1, Uint64 boundary2, SDL_bool v * Generator works the same for other types of signed integers. * * \param minValue The smallest value that is acceptable for this data type. - * For instance, for Uint8 -> -127, etc. + * For instance, for Uint8 -> -127, etc. * \param maxValue The biggest value that is acceptable for this data type. - * For instance, for Uint8 -> 127, etc. + * For instance, for Uint8 -> 127, etc. * \param boundary1 defines lower boundary * \param boundary2 defines upper boundary * \param validDomain Generate only for valid domain (for the data type) @@ -332,118 +332,118 @@ Sint64 SDLTest_GenerateSignedBoundaryValues(const Sint64 minValue, const Sint64 maxValue, Sint64 boundary1, Sint64 boundary2, SDL_bool validDomain) { Sint64 b1, b2; - Sint64 delta; - Sint64 tempBuf[4]; - Uint8 index; - + Sint64 delta; + Sint64 tempBuf[4]; + Uint8 index; + /* Maybe swap */ - if (boundary1 > boundary2) { - b1 = boundary2; - b2 = boundary1; - } else { - b1 = boundary1; - b2 = boundary2; + if (boundary1 > boundary2) { + b1 = boundary2; + b2 = boundary1; + } else { + b1 = boundary1; + b2 = boundary2; } - index = 0; - if (validDomain == SDL_TRUE) { - if (b1 == b2) { - return b1; - } - - /* Generate up to 4 values within bounds */ - delta = b2 - b1; - if (delta < 4) { - do { - tempBuf[index] = b1 + index; - index++; + index = 0; + if (validDomain == SDL_TRUE) { + if (b1 == b2) { + return b1; + } + + /* Generate up to 4 values within bounds */ + delta = b2 - b1; + if (delta < 4) { + do { + tempBuf[index] = b1 + index; + index++; } while (index < delta); - } else { - tempBuf[index] = b1; - index++; - tempBuf[index] = b1 + 1; - index++; - tempBuf[index] = b2 - 1; - index++; - tempBuf[index] = b2; - index++; - } - } else { - /* Generate up to 2 values outside of bounds */ - if (b1 > minValue) { - tempBuf[index] = b1 - 1; - index++; - } + } else { + tempBuf[index] = b1; + index++; + tempBuf[index] = b1 + 1; + index++; + tempBuf[index] = b2 - 1; + index++; + tempBuf[index] = b2; + index++; + } + } else { + /* Generate up to 2 values outside of bounds */ + if (b1 > minValue) { + tempBuf[index] = b1 - 1; + index++; + } - if (b2 < maxValue) { - tempBuf[index] = b2 + 1; - index++; - } - } + if (b2 < maxValue) { + tempBuf[index] = b2 + 1; + index++; + } + } - if (index == 0) { - /* There are no valid boundaries */ - SDL_Unsupported(); - return minValue; - } + if (index == 0) { + /* There are no valid boundaries */ + SDL_Unsupported(); + return minValue; + } - return tempBuf[SDLTest_RandomUint8() % index]; + return tempBuf[SDLTest_RandomUint8() % index]; } Sint8 SDLTest_RandomSint8BoundaryValue(Sint8 boundary1, Sint8 boundary2, SDL_bool validDomain) { - /* min & max values for Sint8 */ - const Sint64 maxValue = SCHAR_MAX; - const Sint64 minValue = SCHAR_MIN; - return (Sint8)SDLTest_GenerateSignedBoundaryValues(minValue, maxValue, - (Sint64) boundary1, (Sint64) boundary2, - validDomain); + /* min & max values for Sint8 */ + const Sint64 maxValue = SCHAR_MAX; + const Sint64 minValue = SCHAR_MIN; + return (Sint8)SDLTest_GenerateSignedBoundaryValues(minValue, maxValue, + (Sint64) boundary1, (Sint64) boundary2, + validDomain); } Sint16 SDLTest_RandomSint16BoundaryValue(Sint16 boundary1, Sint16 boundary2, SDL_bool validDomain) { - /* min & max values for Sint16 */ - const Sint64 maxValue = SHRT_MAX; - const Sint64 minValue = SHRT_MIN; - return (Sint16)SDLTest_GenerateSignedBoundaryValues(minValue, maxValue, - (Sint64) boundary1, (Sint64) boundary2, - validDomain); + /* min & max values for Sint16 */ + const Sint64 maxValue = SHRT_MAX; + const Sint64 minValue = SHRT_MIN; + return (Sint16)SDLTest_GenerateSignedBoundaryValues(minValue, maxValue, + (Sint64) boundary1, (Sint64) boundary2, + validDomain); } Sint32 SDLTest_RandomSint32BoundaryValue(Sint32 boundary1, Sint32 boundary2, SDL_bool validDomain) { - /* min & max values for Sint32 */ - #if ((ULONG_MAX) == (UINT_MAX)) - const Sint64 maxValue = LONG_MAX; - const Sint64 minValue = LONG_MIN; + /* min & max values for Sint32 */ + #if ((ULONG_MAX) == (UINT_MAX)) + const Sint64 maxValue = LONG_MAX; + const Sint64 minValue = LONG_MIN; #else - const Sint64 maxValue = INT_MAX; - const Sint64 minValue = INT_MIN; + const Sint64 maxValue = INT_MAX; + const Sint64 minValue = INT_MIN; #endif - return (Sint32)SDLTest_GenerateSignedBoundaryValues(minValue, maxValue, - (Sint64) boundary1, (Sint64) boundary2, - validDomain); + return (Sint32)SDLTest_GenerateSignedBoundaryValues(minValue, maxValue, + (Sint64) boundary1, (Sint64) boundary2, + validDomain); } Sint64 SDLTest_RandomSint64BoundaryValue(Sint64 boundary1, Sint64 boundary2, SDL_bool validDomain) { - /* min & max values for Sint64 */ - const Sint64 maxValue = LLONG_MAX; - const Sint64 minValue = LLONG_MIN; - return SDLTest_GenerateSignedBoundaryValues(minValue, maxValue, - boundary1, boundary2, - validDomain); + /* min & max values for Sint64 */ + const Sint64 maxValue = LLONG_MAX; + const Sint64 minValue = LLONG_MIN; + return SDLTest_GenerateSignedBoundaryValues(minValue, maxValue, + boundary1, boundary2, + validDomain); } float SDLTest_RandomUnitFloat() { - return (float) SDLTest_RandomUint32() / UINT_MAX; + return (float) SDLTest_RandomUint32() / UINT_MAX; } float @@ -455,70 +455,70 @@ SDLTest_RandomFloat() double SDLTest_RandomUnitDouble() { - return (double) (SDLTest_RandomUint64() >> 11) * (1.0/9007199254740992.0); + return (double) (SDLTest_RandomUint64() >> 11) * (1.0/9007199254740992.0); } double SDLTest_RandomDouble() { - double r = 0.0; - double s = 1.0; - do { - s /= UINT_MAX + 1.0; - r += (double)SDLTest_RandomInt(&rndContext) * s; - } while (s > DBL_EPSILON); - - fuzzerInvocationCounter++; - - return r; + double r = 0.0; + double s = 1.0; + do { + s /= UINT_MAX + 1.0; + r += (double)SDLTest_RandomInt(&rndContext) * s; + } while (s > DBL_EPSILON); + + fuzzerInvocationCounter++; + + return r; } char * SDLTest_RandomAsciiString() { - return SDLTest_RandomAsciiStringWithMaximumLength(255); + return SDLTest_RandomAsciiStringWithMaximumLength(255); } char * SDLTest_RandomAsciiStringWithMaximumLength(int maxLength) { - int size; + int size; - if(maxLength < 1) { + if(maxLength < 1) { SDL_InvalidParamError("maxLength"); - return NULL; - } + return NULL; + } - size = (SDLTest_RandomUint32() % (maxLength + 1)); - - return SDLTest_RandomAsciiStringOfSize(size); + size = (SDLTest_RandomUint32() % (maxLength + 1)); + + return SDLTest_RandomAsciiStringOfSize(size); } char * SDLTest_RandomAsciiStringOfSize(int size) { - char *string; - int counter; + char *string; + int counter; - if(size < 1) { + if(size < 1) { SDL_InvalidParamError("size"); - return NULL; - } + return NULL; + } - string = (char *)SDL_malloc((size + 1) * sizeof(char)); - if (string==NULL) { - return NULL; + string = (char *)SDL_malloc((size + 1) * sizeof(char)); + if (string==NULL) { + return NULL; } - for(counter = 0; counter < size; ++counter) { - string[counter] = (char)SDLTest_RandomIntegerInRange(32, 126); - } + for(counter = 0; counter < size; ++counter) { + string[counter] = (char)SDLTest_RandomIntegerInRange(32, 126); + } - string[counter] = '\0'; + string[counter] = '\0'; - fuzzerInvocationCounter++; + fuzzerInvocationCounter++; - return string; + return string; } diff --git a/src/test/SDL_test_harness.c b/src/test/SDL_test_harness.c index d3c0266cf..291874566 100644 --- a/src/test/SDL_test_harness.c +++ b/src/test/SDL_test_harness.c @@ -53,45 +53,45 @@ static Uint32 SDLTest_TestCaseTimeout = 3600; char * SDLTest_GenerateRunSeed(const int length) { - char *seed = NULL; - SDLTest_RandomContext randomContext; - int counter; + char *seed = NULL; + SDLTest_RandomContext randomContext; + int counter; - /* Sanity check input */ - if (length <= 0) { - SDLTest_LogError("The length of the harness seed must be >0."); - return NULL; - } + /* Sanity check input */ + if (length <= 0) { + SDLTest_LogError("The length of the harness seed must be >0."); + return NULL; + } - /* Allocate output buffer */ - seed = (char *)SDL_malloc((length + 1) * sizeof(char)); - if (seed == NULL) { - SDLTest_LogError("SDL_malloc for run seed output buffer failed."); - return NULL; - } + /* Allocate output buffer */ + seed = (char *)SDL_malloc((length + 1) * sizeof(char)); + if (seed == NULL) { + SDLTest_LogError("SDL_malloc for run seed output buffer failed."); + return NULL; + } - /* Generate a random string of alphanumeric characters */ - SDLTest_RandomInitTime(&randomContext); - for (counter = 0; counter < length - 1; ++counter) { - unsigned int number = SDLTest_Random(&randomContext); - char ch = (char) (number % (91 - 48)) + 48; - if (ch >= 58 && ch <= 64) { - ch = 65; - } - seed[counter] = ch; - } - seed[counter] = '\0'; + /* Generate a random string of alphanumeric characters */ + SDLTest_RandomInitTime(&randomContext); + for (counter = 0; counter < length - 1; ++counter) { + unsigned int number = SDLTest_Random(&randomContext); + char ch = (char) (number % (91 - 48)) + 48; + if (ch >= 58 && ch <= 64) { + ch = 65; + } + seed[counter] = ch; + } + seed[counter] = '\0'; - return seed; + return seed; } /** * Generates an execution key for the fuzzer. * -* \param runSeed The run seed to use -* \param suiteName The name of the test suite -* \param testName The name of the test -* \param iteration The iteration count +* \param runSeed The run seed to use +* \param suiteName The name of the test suite +* \param testName The name of the test +* \param iteration The iteration count * * \returns The generated execution key to initialize the fuzzer with. * @@ -99,61 +99,61 @@ SDLTest_GenerateRunSeed(const int length) Uint64 SDLTest_GenerateExecKey(char *runSeed, char *suiteName, char *testName, int iteration) { - SDLTest_Md5Context md5Context; - Uint64 *keys; - char iterationString[16]; - Uint32 runSeedLength; - Uint32 suiteNameLength; - Uint32 testNameLength; - Uint32 iterationStringLength; - Uint32 entireStringLength; - char *buffer; + SDLTest_Md5Context md5Context; + Uint64 *keys; + char iterationString[16]; + Uint32 runSeedLength; + Uint32 suiteNameLength; + Uint32 testNameLength; + Uint32 iterationStringLength; + Uint32 entireStringLength; + char *buffer; - if (runSeed == NULL || SDL_strlen(runSeed)==0) { - SDLTest_LogError("Invalid runSeed string."); - return -1; - } + if (runSeed == NULL || SDL_strlen(runSeed)==0) { + SDLTest_LogError("Invalid runSeed string."); + return -1; + } - if (suiteName == NULL || SDL_strlen(suiteName)==0) { - SDLTest_LogError("Invalid suiteName string."); - return -1; - } + if (suiteName == NULL || SDL_strlen(suiteName)==0) { + SDLTest_LogError("Invalid suiteName string."); + return -1; + } - if (testName == NULL || SDL_strlen(testName)==0) { - SDLTest_LogError("Invalid testName string."); - return -1; - } + if (testName == NULL || SDL_strlen(testName)==0) { + SDLTest_LogError("Invalid testName string."); + return -1; + } - if (iteration <= 0) { - SDLTest_LogError("Invalid iteration count."); - return -1; - } + if (iteration <= 0) { + SDLTest_LogError("Invalid iteration count."); + return -1; + } - /* Convert iteration number into a string */ - SDL_memset(iterationString, 0, sizeof(iterationString)); - SDL_snprintf(iterationString, sizeof(iterationString) - 1, "%d", iteration); + /* Convert iteration number into a string */ + SDL_memset(iterationString, 0, sizeof(iterationString)); + SDL_snprintf(iterationString, sizeof(iterationString) - 1, "%d", iteration); - /* Combine the parameters into single string */ - runSeedLength = SDL_strlen(runSeed); - suiteNameLength = SDL_strlen(suiteName); - testNameLength = SDL_strlen(testName); - iterationStringLength = SDL_strlen(iterationString); - entireStringLength = runSeedLength + suiteNameLength + testNameLength + iterationStringLength + 1; - buffer = (char *)SDL_malloc(entireStringLength); - if (buffer == NULL) { - SDLTest_LogError("SDL_malloc failed to allocate buffer for execKey generation."); - return 0; - } - SDL_snprintf(buffer, entireStringLength, "%s%s%s%d", runSeed, suiteName, testName, iteration); + /* Combine the parameters into single string */ + runSeedLength = SDL_strlen(runSeed); + suiteNameLength = SDL_strlen(suiteName); + testNameLength = SDL_strlen(testName); + iterationStringLength = SDL_strlen(iterationString); + entireStringLength = runSeedLength + suiteNameLength + testNameLength + iterationStringLength + 1; + buffer = (char *)SDL_malloc(entireStringLength); + if (buffer == NULL) { + SDLTest_LogError("SDL_malloc failed to allocate buffer for execKey generation."); + return 0; + } + SDL_snprintf(buffer, entireStringLength, "%s%s%s%d", runSeed, suiteName, testName, iteration); - /* Hash string and use half of the digest as 64bit exec key */ - SDLTest_Md5Init(&md5Context); - SDLTest_Md5Update(&md5Context, (unsigned char *)buffer, entireStringLength); - SDLTest_Md5Final(&md5Context); - SDL_free(buffer); - keys = (Uint64 *)md5Context.digest; + /* Hash string and use half of the digest as 64bit exec key */ + SDLTest_Md5Init(&md5Context); + SDLTest_Md5Update(&md5Context, (unsigned char *)buffer, entireStringLength); + SDLTest_Md5Final(&md5Context); + SDL_free(buffer); + keys = (Uint64 *)md5Context.digest; - return keys[0]; + return keys[0]; } /** @@ -163,52 +163,52 @@ SDLTest_GenerateExecKey(char *runSeed, char *suiteName, char *testName, int iter * * \param timeout Timeout interval in seconds. * \param callback Function that will be called after timeout has elapsed. -* +* * \return Timer id or -1 on failure. */ SDL_TimerID SDLTest_SetTestTimeout(int timeout, void (*callback)()) { - Uint32 timeoutInMilliseconds; - SDL_TimerID timerID; + Uint32 timeoutInMilliseconds; + SDL_TimerID timerID; - if (callback == NULL) { - SDLTest_LogError("Timeout callback can't be NULL"); - return -1; - } + if (callback == NULL) { + SDLTest_LogError("Timeout callback can't be NULL"); + return -1; + } - if (timeout < 0) { - SDLTest_LogError("Timeout value must be bigger than zero."); - return -1; - } + if (timeout < 0) { + SDLTest_LogError("Timeout value must be bigger than zero."); + return -1; + } - /* Init SDL timer if not initialized before */ - if (SDL_WasInit(SDL_INIT_TIMER) == 0) { - if (SDL_InitSubSystem(SDL_INIT_TIMER)) { - SDLTest_LogError("Failed to init timer subsystem: %s", SDL_GetError()); - return -1; - } - } + /* Init SDL timer if not initialized before */ + if (SDL_WasInit(SDL_INIT_TIMER) == 0) { + if (SDL_InitSubSystem(SDL_INIT_TIMER)) { + SDLTest_LogError("Failed to init timer subsystem: %s", SDL_GetError()); + return -1; + } + } - /* Set timer */ - timeoutInMilliseconds = timeout * 1000; - timerID = SDL_AddTimer(timeoutInMilliseconds, (SDL_TimerCallback)callback, 0x0); - if (timerID == 0) { - SDLTest_LogError("Creation of SDL timer failed: %s", SDL_GetError()); - return -1; - } + /* Set timer */ + timeoutInMilliseconds = timeout * 1000; + timerID = SDL_AddTimer(timeoutInMilliseconds, (SDL_TimerCallback)callback, 0x0); + if (timerID == 0) { + SDLTest_LogError("Creation of SDL timer failed: %s", SDL_GetError()); + return -1; + } - return timerID; + return timerID; } /** * \brief Timeout handler. Aborts test run and exits harness process. */ void - SDLTest_BailOut() + SDLTest_BailOut() { - SDLTest_LogError("TestCaseTimeout timer expired. Aborting test run."); - exit(TEST_ABORTED); /* bail out from the test */ + SDLTest_LogError("TestCaseTimeout timer expired. Aborting test run."); + exit(TEST_ABORTED); /* bail out from the test */ } /** @@ -223,127 +223,127 @@ void int SDLTest_RunTest(SDLTest_TestSuiteReference *testSuite, SDLTest_TestCaseReference *testCase, Uint64 execKey) { - SDL_TimerID timer = 0; - int testCaseResult = 0; - int testResult = 0; - int fuzzerCount; + SDL_TimerID timer = 0; + int testCaseResult = 0; + int testResult = 0; + int fuzzerCount; - if (testSuite==NULL || testCase==NULL || testSuite->name==NULL || testCase->name==NULL) - { - SDLTest_LogError("Setup failure: testSuite or testCase references NULL"); - return TEST_RESULT_SETUP_FAILURE; - } + if (testSuite==NULL || testCase==NULL || testSuite->name==NULL || testCase->name==NULL) + { + SDLTest_LogError("Setup failure: testSuite or testCase references NULL"); + return TEST_RESULT_SETUP_FAILURE; + } - if (!testCase->enabled) - { - SDLTest_Log((char *)SDLTest_FinalResultFormat, "Test", testCase->name, "Skipped (Disabled)"); - return TEST_RESULT_SKIPPED; - } + if (!testCase->enabled) + { + SDLTest_Log((char *)SDLTest_FinalResultFormat, "Test", testCase->name, "Skipped (Disabled)"); + return TEST_RESULT_SKIPPED; + } - /* Initialize fuzzer */ - SDLTest_FuzzerInit(execKey); + /* Initialize fuzzer */ + SDLTest_FuzzerInit(execKey); - /* Reset assert tracker */ - SDLTest_ResetAssertSummary(); + /* Reset assert tracker */ + SDLTest_ResetAssertSummary(); - /* Set timeout timer */ - timer = SDLTest_SetTestTimeout(SDLTest_TestCaseTimeout, SDLTest_BailOut); + /* Set timeout timer */ + timer = SDLTest_SetTestTimeout(SDLTest_TestCaseTimeout, SDLTest_BailOut); - /* Maybe run suite initalizer function */ - if (testSuite->testSetUp) { - testSuite->testSetUp(0x0); - if (SDLTest_AssertSummaryToTestResult() == TEST_RESULT_FAILED) { - SDLTest_LogError((char *)SDLTest_FinalResultFormat, "Suite Setup", testSuite->name, "Failed"); - return TEST_RESULT_SETUP_FAILURE; - } - } + /* Maybe run suite initalizer function */ + if (testSuite->testSetUp) { + testSuite->testSetUp(0x0); + if (SDLTest_AssertSummaryToTestResult() == TEST_RESULT_FAILED) { + SDLTest_LogError((char *)SDLTest_FinalResultFormat, "Suite Setup", testSuite->name, "Failed"); + return TEST_RESULT_SETUP_FAILURE; + } + } - /* Run test case function */ - testCaseResult = testCase->testCase(0x0); - - /* Convert test execution result into harness result */ - if (testCaseResult == TEST_SKIPPED) { - /* Test was programatically skipped */ - testResult = TEST_RESULT_SKIPPED; - } else if (testCaseResult == TEST_STARTED) { - /* Test did not return a TEST_COMPLETED value; assume it failed */ - testResult = TEST_RESULT_FAILED; - } else if (testCaseResult == TEST_ABORTED) { - /* Test was aborted early; assume it failed */ - testResult = TEST_RESULT_FAILED; - } else { - /* Perform failure analysis based on asserts */ - testResult = SDLTest_AssertSummaryToTestResult(); - } + /* Run test case function */ + testCaseResult = testCase->testCase(0x0); - /* Maybe run suite cleanup function (ignore failed asserts) */ - if (testSuite->testTearDown) { - testSuite->testTearDown(0x0); - } + /* Convert test execution result into harness result */ + if (testCaseResult == TEST_SKIPPED) { + /* Test was programatically skipped */ + testResult = TEST_RESULT_SKIPPED; + } else if (testCaseResult == TEST_STARTED) { + /* Test did not return a TEST_COMPLETED value; assume it failed */ + testResult = TEST_RESULT_FAILED; + } else if (testCaseResult == TEST_ABORTED) { + /* Test was aborted early; assume it failed */ + testResult = TEST_RESULT_FAILED; + } else { + /* Perform failure analysis based on asserts */ + testResult = SDLTest_AssertSummaryToTestResult(); + } - /* Cancel timeout timer */ - if (timer) { - SDL_RemoveTimer(timer); - } + /* Maybe run suite cleanup function (ignore failed asserts) */ + if (testSuite->testTearDown) { + testSuite->testTearDown(0x0); + } - /* Report on asserts and fuzzer usage */ - fuzzerCount = SDLTest_GetFuzzerInvocationCount(); - if (fuzzerCount > 0) { - SDLTest_Log("Fuzzer invocations: %d", fuzzerCount); - } + /* Cancel timeout timer */ + if (timer) { + SDL_RemoveTimer(timer); + } - /* Final log based on test execution result */ - if (testCaseResult == TEST_SKIPPED) { - /* Test was programatically skipped */ - SDLTest_Log((char *)SDLTest_FinalResultFormat, "Test", testCase->name, "Skipped (Programmatically)"); - } else if (testCaseResult == TEST_STARTED) { - /* Test did not return a TEST_COMPLETED value; assume it failed */ - SDLTest_LogError((char *)SDLTest_FinalResultFormat, "Test", testCase->name, "Failed (test started, but did not return TEST_COMPLETED)"); - } else if (testCaseResult == TEST_ABORTED) { - /* Test was aborted early; assume it failed */ - SDLTest_LogError((char *)SDLTest_FinalResultFormat, "Test", testCase->name, "Failed (Aborted)"); - } else { - SDLTest_LogAssertSummary(); - } + /* Report on asserts and fuzzer usage */ + fuzzerCount = SDLTest_GetFuzzerInvocationCount(); + if (fuzzerCount > 0) { + SDLTest_Log("Fuzzer invocations: %d", fuzzerCount); + } - return testResult; + /* Final log based on test execution result */ + if (testCaseResult == TEST_SKIPPED) { + /* Test was programatically skipped */ + SDLTest_Log((char *)SDLTest_FinalResultFormat, "Test", testCase->name, "Skipped (Programmatically)"); + } else if (testCaseResult == TEST_STARTED) { + /* Test did not return a TEST_COMPLETED value; assume it failed */ + SDLTest_LogError((char *)SDLTest_FinalResultFormat, "Test", testCase->name, "Failed (test started, but did not return TEST_COMPLETED)"); + } else if (testCaseResult == TEST_ABORTED) { + /* Test was aborted early; assume it failed */ + SDLTest_LogError((char *)SDLTest_FinalResultFormat, "Test", testCase->name, "Failed (Aborted)"); + } else { + SDLTest_LogAssertSummary(); + } + + return testResult; } /* Prints summary of all suites/tests contained in the given reference */ void SDLTest_LogTestSuiteSummary(SDLTest_TestSuiteReference *testSuites) { - int suiteCounter; - int testCounter; - SDLTest_TestSuiteReference *testSuite; - SDLTest_TestCaseReference *testCase; + int suiteCounter; + int testCounter; + SDLTest_TestSuiteReference *testSuite; + SDLTest_TestCaseReference *testCase; - /* Loop over all suites */ - suiteCounter = 0; - while(&testSuites[suiteCounter]) { - testSuite=&testSuites[suiteCounter]; - suiteCounter++; - SDLTest_Log("Test Suite %i - %s\n", suiteCounter, - (testSuite->name) ? testSuite->name : SDLTest_InvalidNameFormat); + /* Loop over all suites */ + suiteCounter = 0; + while(&testSuites[suiteCounter]) { + testSuite=&testSuites[suiteCounter]; + suiteCounter++; + SDLTest_Log("Test Suite %i - %s\n", suiteCounter, + (testSuite->name) ? testSuite->name : SDLTest_InvalidNameFormat); - /* Loop over all test cases */ - testCounter = 0; - while(testSuite->testCases[testCounter]) - { - testCase=(SDLTest_TestCaseReference *)testSuite->testCases[testCounter]; - testCounter++; - SDLTest_Log(" Test Case %i - %s: %s", testCounter, - (testCase->name) ? testCase->name : SDLTest_InvalidNameFormat, - (testCase->description) ? testCase->description : SDLTest_InvalidNameFormat); - } - } + /* Loop over all test cases */ + testCounter = 0; + while(testSuite->testCases[testCounter]) + { + testCase=(SDLTest_TestCaseReference *)testSuite->testCases[testCounter]; + testCounter++; + SDLTest_Log(" Test Case %i - %s: %s", testCounter, + (testCase->name) ? testCase->name : SDLTest_InvalidNameFormat, + (testCase->description) ? testCase->description : SDLTest_InvalidNameFormat); + } + } } /* Gets a timer value in seconds */ float GetClock() { - float currentClock = (float)clock(); - return currentClock / (float)CLOCKS_PER_SEC; + float currentClock = (float)clock(); + return currentClock / (float)CLOCKS_PER_SEC; } /** @@ -362,274 +362,274 @@ float GetClock() */ int SDLTest_RunSuites(SDLTest_TestSuiteReference *testSuites[], const char *userRunSeed, Uint64 userExecKey, const char *filter, int testIterations) { - int suiteCounter; - int testCounter; - int iterationCounter; - SDLTest_TestSuiteReference *testSuite; - SDLTest_TestCaseReference *testCase; - const char *runSeed = NULL; - char *currentSuiteName; - char *currentTestName; - Uint64 execKey; - float runStartSeconds; - float suiteStartSeconds; - float testStartSeconds; - float runEndSeconds; - float suiteEndSeconds; - float testEndSeconds; - float runtime; - int suiteFilter = 0; - char *suiteFilterName = NULL; - int testFilter = 0; - char *testFilterName = NULL; - int testResult = 0; - int runResult = 0; - Uint32 totalTestFailedCount = 0; - Uint32 totalTestPassedCount = 0; - Uint32 totalTestSkippedCount = 0; - Uint32 testFailedCount = 0; - Uint32 testPassedCount = 0; - Uint32 testSkippedCount = 0; - Uint32 countSum = 0; - char *logFormat = (char *)SDLTest_LogSummaryFormat; + int suiteCounter; + int testCounter; + int iterationCounter; + SDLTest_TestSuiteReference *testSuite; + SDLTest_TestCaseReference *testCase; + const char *runSeed = NULL; + char *currentSuiteName; + char *currentTestName; + Uint64 execKey; + float runStartSeconds; + float suiteStartSeconds; + float testStartSeconds; + float runEndSeconds; + float suiteEndSeconds; + float testEndSeconds; + float runtime; + int suiteFilter = 0; + char *suiteFilterName = NULL; + int testFilter = 0; + char *testFilterName = NULL; + int testResult = 0; + int runResult = 0; + Uint32 totalTestFailedCount = 0; + Uint32 totalTestPassedCount = 0; + Uint32 totalTestSkippedCount = 0; + Uint32 testFailedCount = 0; + Uint32 testPassedCount = 0; + Uint32 testSkippedCount = 0; + Uint32 countSum = 0; + char *logFormat = (char *)SDLTest_LogSummaryFormat; - /* Sanitize test iterations */ - if (testIterations < 1) { - testIterations = 1; - } + /* Sanitize test iterations */ + if (testIterations < 1) { + testIterations = 1; + } - /* Generate run see if we don't have one already */ - if (userRunSeed == NULL || SDL_strlen(userRunSeed) == 0) { - runSeed = SDLTest_GenerateRunSeed(16); - if (runSeed == NULL) { - SDLTest_LogError("Generating a random seed failed"); - return 2; - } - } else { - runSeed = userRunSeed; - } + /* Generate run see if we don't have one already */ + if (userRunSeed == NULL || SDL_strlen(userRunSeed) == 0) { + runSeed = SDLTest_GenerateRunSeed(16); + if (runSeed == NULL) { + SDLTest_LogError("Generating a random seed failed"); + return 2; + } + } else { + runSeed = userRunSeed; + } - /* Reset per-run counters */ - totalTestFailedCount = 0; - totalTestPassedCount = 0; - totalTestSkippedCount = 0; + /* Reset per-run counters */ + totalTestFailedCount = 0; + totalTestPassedCount = 0; + totalTestSkippedCount = 0; - /* Take time - run start */ - runStartSeconds = GetClock(); + /* Take time - run start */ + runStartSeconds = GetClock(); - /* Log run with fuzzer parameters */ - SDLTest_Log("::::: Test Run /w seed '%s' started\n", runSeed); + /* Log run with fuzzer parameters */ + SDLTest_Log("::::: Test Run /w seed '%s' started\n", runSeed); - /* Initialize filtering */ - if (filter != NULL && SDL_strlen(filter) > 0) { - /* Loop over all suites to check if we have a filter match */ - suiteCounter = 0; - while (testSuites[suiteCounter] && suiteFilter == 0) { - testSuite=(SDLTest_TestSuiteReference *)testSuites[suiteCounter]; - suiteCounter++; - if (testSuite->name != NULL && SDL_strcmp(filter, testSuite->name) == 0) { - /* Matched a suite name */ - suiteFilter = 1; - suiteFilterName = testSuite->name; - SDLTest_Log("Filtering: running only suite '%s'", suiteFilterName); - break; - } + /* Initialize filtering */ + if (filter != NULL && SDL_strlen(filter) > 0) { + /* Loop over all suites to check if we have a filter match */ + suiteCounter = 0; + while (testSuites[suiteCounter] && suiteFilter == 0) { + testSuite=(SDLTest_TestSuiteReference *)testSuites[suiteCounter]; + suiteCounter++; + if (testSuite->name != NULL && SDL_strcmp(filter, testSuite->name) == 0) { + /* Matched a suite name */ + suiteFilter = 1; + suiteFilterName = testSuite->name; + SDLTest_Log("Filtering: running only suite '%s'", suiteFilterName); + break; + } - /* Within each suite, loop over all test cases to check if we have a filter match */ - testCounter = 0; - while (testSuite->testCases[testCounter] && testFilter == 0) - { - testCase=(SDLTest_TestCaseReference *)testSuite->testCases[testCounter]; - testCounter++; - if (testCase->name != NULL && SDL_strcmp(filter, testCase->name) == 0) { - /* Matched a test name */ - suiteFilter = 1; - suiteFilterName = testSuite->name; - testFilter = 1; - testFilterName = testCase->name; - SDLTest_Log("Filtering: running only test '%s' in suite '%s'", testFilterName, suiteFilterName); - break; - } - } - } - - if (suiteFilter == 0 && testFilter == 0) { - SDLTest_LogError("Filter '%s' did not match any test suite/case.", filter); - SDLTest_Log("Exit code: 2"); - return 2; - } - } + /* Within each suite, loop over all test cases to check if we have a filter match */ + testCounter = 0; + while (testSuite->testCases[testCounter] && testFilter == 0) + { + testCase=(SDLTest_TestCaseReference *)testSuite->testCases[testCounter]; + testCounter++; + if (testCase->name != NULL && SDL_strcmp(filter, testCase->name) == 0) { + /* Matched a test name */ + suiteFilter = 1; + suiteFilterName = testSuite->name; + testFilter = 1; + testFilterName = testCase->name; + SDLTest_Log("Filtering: running only test '%s' in suite '%s'", testFilterName, suiteFilterName); + break; + } + } + } - /* Loop over all suites */ - suiteCounter = 0; - while(testSuites[suiteCounter]) { - testSuite=(SDLTest_TestSuiteReference *)testSuites[suiteCounter]; - currentSuiteName = (char *)((testSuite->name) ? testSuite->name : SDLTest_InvalidNameFormat); - suiteCounter++; + if (suiteFilter == 0 && testFilter == 0) { + SDLTest_LogError("Filter '%s' did not match any test suite/case.", filter); + SDLTest_Log("Exit code: 2"); + return 2; + } + } - /* Filter suite if flag set and we have a name */ - if (suiteFilter == 1 && suiteFilterName != NULL && testSuite->name != NULL && - SDL_strcmp(suiteFilterName, testSuite->name) != 0) { - /* Skip suite */ - SDLTest_Log("===== Test Suite %i: '%s' skipped\n", - suiteCounter, - currentSuiteName); - } else { + /* Loop over all suites */ + suiteCounter = 0; + while(testSuites[suiteCounter]) { + testSuite=(SDLTest_TestSuiteReference *)testSuites[suiteCounter]; + currentSuiteName = (char *)((testSuite->name) ? testSuite->name : SDLTest_InvalidNameFormat); + suiteCounter++; - /* Reset per-suite counters */ - testFailedCount = 0; - testPassedCount = 0; - testSkippedCount = 0; + /* Filter suite if flag set and we have a name */ + if (suiteFilter == 1 && suiteFilterName != NULL && testSuite->name != NULL && + SDL_strcmp(suiteFilterName, testSuite->name) != 0) { + /* Skip suite */ + SDLTest_Log("===== Test Suite %i: '%s' skipped\n", + suiteCounter, + currentSuiteName); + } else { - /* Take time - suite start */ - suiteStartSeconds = GetClock(); + /* Reset per-suite counters */ + testFailedCount = 0; + testPassedCount = 0; + testSkippedCount = 0; - /* Log suite started */ - SDLTest_Log("===== Test Suite %i: '%s' started\n", - suiteCounter, - currentSuiteName); + /* Take time - suite start */ + suiteStartSeconds = GetClock(); - /* Loop over all test cases */ - testCounter = 0; - while(testSuite->testCases[testCounter]) - { - testCase=(SDLTest_TestCaseReference *)testSuite->testCases[testCounter]; - currentTestName = (char *)((testCase->name) ? testCase->name : SDLTest_InvalidNameFormat); - testCounter++; + /* Log suite started */ + SDLTest_Log("===== Test Suite %i: '%s' started\n", + suiteCounter, + currentSuiteName); - /* Filter tests if flag set and we have a name */ - if (testFilter == 1 && testFilterName != NULL && testCase->name != NULL && - SDL_strcmp(testFilterName, testCase->name) != 0) { - /* Skip test */ - SDLTest_Log("===== Test Case %i.%i: '%s' skipped\n", - suiteCounter, - testCounter, - currentTestName); - } else { - /* Override 'disabled' flag if we specified a test filter (i.e. force run for debugging) */ - if (testFilter == 1 && !testCase->enabled) { - SDLTest_Log("Force run of disabled test since test filter was set"); - testCase->enabled = 1; - } + /* Loop over all test cases */ + testCounter = 0; + while(testSuite->testCases[testCounter]) + { + testCase=(SDLTest_TestCaseReference *)testSuite->testCases[testCounter]; + currentTestName = (char *)((testCase->name) ? testCase->name : SDLTest_InvalidNameFormat); + testCounter++; - /* Take time - test start */ - testStartSeconds = GetClock(); + /* Filter tests if flag set and we have a name */ + if (testFilter == 1 && testFilterName != NULL && testCase->name != NULL && + SDL_strcmp(testFilterName, testCase->name) != 0) { + /* Skip test */ + SDLTest_Log("===== Test Case %i.%i: '%s' skipped\n", + suiteCounter, + testCounter, + currentTestName); + } else { + /* Override 'disabled' flag if we specified a test filter (i.e. force run for debugging) */ + if (testFilter == 1 && !testCase->enabled) { + SDLTest_Log("Force run of disabled test since test filter was set"); + testCase->enabled = 1; + } - /* Log test started */ - SDLTest_Log("----- Test Case %i.%i: '%s' started", - suiteCounter, - testCounter, - currentTestName); - if (testCase->description != NULL && SDL_strlen(testCase->description)>0) { - SDLTest_Log("Test Description: '%s'", - (testCase->description) ? testCase->description : SDLTest_InvalidNameFormat); - } + /* Take time - test start */ + testStartSeconds = GetClock(); - /* Loop over all iterations */ - iterationCounter = 0; - while(iterationCounter < testIterations) - { - iterationCounter++; + /* Log test started */ + SDLTest_Log("----- Test Case %i.%i: '%s' started", + suiteCounter, + testCounter, + currentTestName); + if (testCase->description != NULL && SDL_strlen(testCase->description)>0) { + SDLTest_Log("Test Description: '%s'", + (testCase->description) ? testCase->description : SDLTest_InvalidNameFormat); + } - if (userExecKey != 0) { - execKey = userExecKey; - } else { - execKey = SDLTest_GenerateExecKey((char *)runSeed, testSuite->name, testCase->name, iterationCounter); - } + /* Loop over all iterations */ + iterationCounter = 0; + while(iterationCounter < testIterations) + { + iterationCounter++; - SDLTest_Log("Test Iteration %i: execKey %llu", iterationCounter, execKey); - testResult = SDLTest_RunTest(testSuite, testCase, execKey); + if (userExecKey != 0) { + execKey = userExecKey; + } else { + execKey = SDLTest_GenerateExecKey((char *)runSeed, testSuite->name, testCase->name, iterationCounter); + } - if (testResult == TEST_RESULT_PASSED) { - testPassedCount++; - totalTestPassedCount++; - } else if (testResult == TEST_RESULT_SKIPPED) { - testSkippedCount++; - totalTestSkippedCount++; - } else { - testFailedCount++; - totalTestFailedCount++; - } - } + SDLTest_Log("Test Iteration %i: execKey %llu", iterationCounter, execKey); + testResult = SDLTest_RunTest(testSuite, testCase, execKey); - /* Take time - test end */ - testEndSeconds = GetClock(); - runtime = testEndSeconds - testStartSeconds; - if (runtime < 0.0f) runtime = 0.0f; + if (testResult == TEST_RESULT_PASSED) { + testPassedCount++; + totalTestPassedCount++; + } else if (testResult == TEST_RESULT_SKIPPED) { + testSkippedCount++; + totalTestSkippedCount++; + } else { + testFailedCount++; + totalTestFailedCount++; + } + } - if (testIterations > 1) { - /* Log test runtime */ - SDLTest_Log("Runtime of %i iterations: %.1f sec", testIterations, runtime); - SDLTest_Log("Average Test runtime: %.5f sec", runtime / (float)testIterations); - } else { - /* Log test runtime */ - SDLTest_Log("Total Test runtime: %.1f sec", runtime); - } + /* Take time - test end */ + testEndSeconds = GetClock(); + runtime = testEndSeconds - testStartSeconds; + if (runtime < 0.0f) runtime = 0.0f; - /* Log final test result */ - switch (testResult) { - case TEST_RESULT_PASSED: - SDLTest_Log((char *)SDLTest_FinalResultFormat, "Test", currentTestName, "Passed"); - break; - case TEST_RESULT_FAILED: - SDLTest_LogError((char *)SDLTest_FinalResultFormat, "Test", currentTestName, "Failed"); - break; - case TEST_RESULT_NO_ASSERT: - SDLTest_LogError((char *)SDLTest_FinalResultFormat,"Test", currentTestName, "No Asserts"); - break; - } + if (testIterations > 1) { + /* Log test runtime */ + SDLTest_Log("Runtime of %i iterations: %.1f sec", testIterations, runtime); + SDLTest_Log("Average Test runtime: %.5f sec", runtime / (float)testIterations); + } else { + /* Log test runtime */ + SDLTest_Log("Total Test runtime: %.1f sec", runtime); + } - } - } + /* Log final test result */ + switch (testResult) { + case TEST_RESULT_PASSED: + SDLTest_Log((char *)SDLTest_FinalResultFormat, "Test", currentTestName, "Passed"); + break; + case TEST_RESULT_FAILED: + SDLTest_LogError((char *)SDLTest_FinalResultFormat, "Test", currentTestName, "Failed"); + break; + case TEST_RESULT_NO_ASSERT: + SDLTest_LogError((char *)SDLTest_FinalResultFormat,"Test", currentTestName, "No Asserts"); + break; + } - /* Take time - suite end */ - suiteEndSeconds = GetClock(); - runtime = suiteEndSeconds - suiteStartSeconds; - if (runtime < 0.0f) runtime = 0.0f; + } + } - /* Log suite runtime */ - SDLTest_Log("Total Suite runtime: %.1f sec", runtime); + /* Take time - suite end */ + suiteEndSeconds = GetClock(); + runtime = suiteEndSeconds - suiteStartSeconds; + if (runtime < 0.0f) runtime = 0.0f; - /* Log summary and final Suite result */ - countSum = testPassedCount + testFailedCount + testSkippedCount; - if (testFailedCount == 0) - { - SDLTest_Log(logFormat, "Suite", countSum, testPassedCount, testFailedCount, testSkippedCount); - SDLTest_Log((char *)SDLTest_FinalResultFormat, "Suite", currentSuiteName, "Passed"); - } - else - { - SDLTest_LogError(logFormat, "Suite", countSum, testPassedCount, testFailedCount, testSkippedCount); - SDLTest_LogError((char *)SDLTest_FinalResultFormat, "Suite", currentSuiteName, "Failed"); - } + /* Log suite runtime */ + SDLTest_Log("Total Suite runtime: %.1f sec", runtime); - } - } + /* Log summary and final Suite result */ + countSum = testPassedCount + testFailedCount + testSkippedCount; + if (testFailedCount == 0) + { + SDLTest_Log(logFormat, "Suite", countSum, testPassedCount, testFailedCount, testSkippedCount); + SDLTest_Log((char *)SDLTest_FinalResultFormat, "Suite", currentSuiteName, "Passed"); + } + else + { + SDLTest_LogError(logFormat, "Suite", countSum, testPassedCount, testFailedCount, testSkippedCount); + SDLTest_LogError((char *)SDLTest_FinalResultFormat, "Suite", currentSuiteName, "Failed"); + } - /* Take time - run end */ - runEndSeconds = GetClock(); - runtime = runEndSeconds - runStartSeconds; - if (runtime < 0.0f) runtime = 0.0f; + } + } - /* Log total runtime */ - SDLTest_Log("Total Run runtime: %.1f sec", runtime); + /* Take time - run end */ + runEndSeconds = GetClock(); + runtime = runEndSeconds - runStartSeconds; + if (runtime < 0.0f) runtime = 0.0f; - /* Log summary and final run result */ - countSum = totalTestPassedCount + totalTestFailedCount + totalTestSkippedCount; - if (totalTestFailedCount == 0) - { - runResult = 0; - SDLTest_Log(logFormat, "Run", countSum, totalTestPassedCount, totalTestFailedCount, totalTestSkippedCount); - SDLTest_Log((char *)SDLTest_FinalResultFormat, "Run /w seed", runSeed, "Passed"); - } - else - { - runResult = 1; - SDLTest_LogError(logFormat, "Run", countSum, totalTestPassedCount, totalTestFailedCount, totalTestSkippedCount); - SDLTest_LogError((char *)SDLTest_FinalResultFormat, "Run /w seed", runSeed, "Failed"); - } + /* Log total runtime */ + SDLTest_Log("Total Run runtime: %.1f sec", runtime); - SDLTest_Log("Exit code: %d", runResult); - return runResult; + /* Log summary and final run result */ + countSum = totalTestPassedCount + totalTestFailedCount + totalTestSkippedCount; + if (totalTestFailedCount == 0) + { + runResult = 0; + SDLTest_Log(logFormat, "Run", countSum, totalTestPassedCount, totalTestFailedCount, totalTestSkippedCount); + SDLTest_Log((char *)SDLTest_FinalResultFormat, "Run /w seed", runSeed, "Passed"); + } + else + { + runResult = 1; + SDLTest_LogError(logFormat, "Run", countSum, totalTestPassedCount, totalTestFailedCount, totalTestSkippedCount); + SDLTest_LogError((char *)SDLTest_FinalResultFormat, "Run /w seed", runSeed, "Failed"); + } + + SDLTest_Log("Exit code: %d", runResult); + return runResult; } diff --git a/src/test/SDL_test_imageBlit.c b/src/test/SDL_test_imageBlit.c index 2608e4fa8..d1d12952c 100644 --- a/src/test/SDL_test_imageBlit.c +++ b/src/test/SDL_test_imageBlit.c @@ -540,11 +540,11 @@ const SDLTest_SurfaceImage_t SDLTest_imageBlit = { */ SDL_Surface *SDLTest_ImageBlit() { - SDL_Surface *surface = SDL_CreateRGBSurfaceFrom( + SDL_Surface *surface = SDL_CreateRGBSurfaceFrom( (void*)SDLTest_imageBlit.pixel_data, - SDLTest_imageBlit.width, - SDLTest_imageBlit.height, - SDLTest_imageBlit.bytes_per_pixel * 8, + SDLTest_imageBlit.width, + SDLTest_imageBlit.height, + SDLTest_imageBlit.bytes_per_pixel * 8, SDLTest_imageBlit.width * SDLTest_imageBlit.bytes_per_pixel, #if (SDL_BYTEORDER == SDL_BIG_ENDIAN) 0xff000000, /* Red bit mask. */ @@ -1023,11 +1023,11 @@ const SDLTest_SurfaceImage_t SDLTest_imageBlitColor = { */ SDL_Surface *SDLTest_ImageBlitColor() { - SDL_Surface *surface = SDL_CreateRGBSurfaceFrom( + SDL_Surface *surface = SDL_CreateRGBSurfaceFrom( (void*)SDLTest_imageBlitColor.pixel_data, - SDLTest_imageBlitColor.width, - SDLTest_imageBlitColor.height, - SDLTest_imageBlitColor.bytes_per_pixel * 8, + SDLTest_imageBlitColor.width, + SDLTest_imageBlitColor.height, + SDLTest_imageBlitColor.bytes_per_pixel * 8, SDLTest_imageBlitColor.width * SDLTest_imageBlitColor.bytes_per_pixel, #if (SDL_BYTEORDER == SDL_BIG_ENDIAN) 0xff000000, /* Red bit mask. */ @@ -1535,10 +1535,10 @@ const SDLTest_SurfaceImage_t SDLTest_imageBlitAlpha = { */ SDL_Surface *SDLTest_ImageBlitAlpha() { - SDL_Surface *surface = SDL_CreateRGBSurfaceFrom( + SDL_Surface *surface = SDL_CreateRGBSurfaceFrom( (void*)SDLTest_imageBlitAlpha.pixel_data, - SDLTest_imageBlitAlpha.width, - SDLTest_imageBlitAlpha.height, + SDLTest_imageBlitAlpha.width, + SDLTest_imageBlitAlpha.height, SDLTest_imageBlitAlpha.bytes_per_pixel * 8, SDLTest_imageBlitAlpha.width * SDLTest_imageBlitAlpha.bytes_per_pixel, #if (SDL_BYTEORDER == SDL_BIG_ENDIAN) diff --git a/src/test/SDL_test_imageBlitBlend.c b/src/test/SDL_test_imageBlitBlend.c index 8a4859533..06dbfabd4 100644 --- a/src/test/SDL_test_imageBlitBlend.c +++ b/src/test/SDL_test_imageBlitBlend.c @@ -580,11 +580,11 @@ const SDLTest_SurfaceImage_t SDLTest_imageBlitBlendAdd = { */ SDL_Surface *SDLTest_ImageBlitBlendAdd() { - SDL_Surface *surface = SDL_CreateRGBSurfaceFrom( + SDL_Surface *surface = SDL_CreateRGBSurfaceFrom( (void*)SDLTest_imageBlitBlendAdd.pixel_data, - SDLTest_imageBlitBlendAdd.width, - SDLTest_imageBlitBlendAdd.height, - SDLTest_imageBlitBlendAdd.bytes_per_pixel * 8, + SDLTest_imageBlitBlendAdd.width, + SDLTest_imageBlitBlendAdd.height, + SDLTest_imageBlitBlendAdd.bytes_per_pixel * 8, SDLTest_imageBlitBlendAdd.width * SDLTest_imageBlitBlendAdd.bytes_per_pixel, #if (SDL_BYTEORDER == SDL_BIG_ENDIAN) 0xff000000, /* Red bit mask. */ @@ -1110,11 +1110,11 @@ const SDLTest_SurfaceImage_t SDLTest_imageBlitBlend = { */ SDL_Surface *SDLTest_ImageBlitBlend() { - SDL_Surface *surface = SDL_CreateRGBSurfaceFrom( + SDL_Surface *surface = SDL_CreateRGBSurfaceFrom( (void*)SDLTest_imageBlitBlend.pixel_data, - SDLTest_imageBlitBlend.width, - SDLTest_imageBlitBlend.height, - SDLTest_imageBlitBlend.bytes_per_pixel * 8, + SDLTest_imageBlitBlend.width, + SDLTest_imageBlitBlend.height, + SDLTest_imageBlitBlend.bytes_per_pixel * 8, SDLTest_imageBlitBlend.width * SDLTest_imageBlitBlend.bytes_per_pixel, #if (SDL_BYTEORDER == SDL_BIG_ENDIAN) 0xff000000, /* Red bit mask. */ @@ -1540,11 +1540,11 @@ const SDLTest_SurfaceImage_t SDLTest_imageBlitBlendMod = { */ SDL_Surface *SDLTest_ImageBlitBlendMod() { - SDL_Surface *surface = SDL_CreateRGBSurfaceFrom( + SDL_Surface *surface = SDL_CreateRGBSurfaceFrom( (void*)SDLTest_imageBlitBlendMod.pixel_data, - SDLTest_imageBlitBlendMod.width, - SDLTest_imageBlitBlendMod.height, - SDLTest_imageBlitBlendMod.bytes_per_pixel * 8, + SDLTest_imageBlitBlendMod.width, + SDLTest_imageBlitBlendMod.height, + SDLTest_imageBlitBlendMod.bytes_per_pixel * 8, SDLTest_imageBlitBlendMod.width * SDLTest_imageBlitBlendMod.bytes_per_pixel, #if (SDL_BYTEORDER == SDL_BIG_ENDIAN) 0xff000000, /* Red bit mask. */ @@ -2353,11 +2353,11 @@ const SDLTest_SurfaceImage_t SDLTest_imageBlitBlendNone = { */ SDL_Surface *SDLTest_ImageBlitBlendNone() { - SDL_Surface *surface = SDL_CreateRGBSurfaceFrom( + SDL_Surface *surface = SDL_CreateRGBSurfaceFrom( (void*)SDLTest_imageBlitBlendNone.pixel_data, - SDLTest_imageBlitBlendNone.width, - SDLTest_imageBlitBlendNone.height, - SDLTest_imageBlitBlendNone.bytes_per_pixel * 8, + SDLTest_imageBlitBlendNone.width, + SDLTest_imageBlitBlendNone.height, + SDLTest_imageBlitBlendNone.bytes_per_pixel * 8, SDLTest_imageBlitBlendNone.width * SDLTest_imageBlitBlendNone.bytes_per_pixel, #if (SDL_BYTEORDER == SDL_BIG_ENDIAN) 0xff000000, /* Red bit mask. */ @@ -2821,11 +2821,11 @@ const SDLTest_SurfaceImage_t SDLTest_imageBlitBlendAll = { */ SDL_Surface *SDLTest_ImageBlitBlendAll() { - SDL_Surface *surface = SDL_CreateRGBSurfaceFrom( + SDL_Surface *surface = SDL_CreateRGBSurfaceFrom( (void*)SDLTest_imageBlitBlendAll.pixel_data, - SDLTest_imageBlitBlendAll.width, - SDLTest_imageBlitBlendAll.height, - SDLTest_imageBlitBlendAll.bytes_per_pixel * 8, + SDLTest_imageBlitBlendAll.width, + SDLTest_imageBlitBlendAll.height, + SDLTest_imageBlitBlendAll.bytes_per_pixel * 8, SDLTest_imageBlitBlendAll.width * SDLTest_imageBlitBlendAll.bytes_per_pixel, #if (SDL_BYTEORDER == SDL_BIG_ENDIAN) 0xff000000, /* Red bit mask. */ diff --git a/src/test/SDL_test_imageFace.c b/src/test/SDL_test_imageFace.c index 2dd7ea762..46c117a4f 100644 --- a/src/test/SDL_test_imageFace.c +++ b/src/test/SDL_test_imageFace.c @@ -223,11 +223,11 @@ const SDLTest_SurfaceImage_t SDLTest_imageFace = { */ SDL_Surface *SDLTest_ImageFace() { - SDL_Surface *surface = SDL_CreateRGBSurfaceFrom( + SDL_Surface *surface = SDL_CreateRGBSurfaceFrom( (void*)SDLTest_imageFace.pixel_data, - SDLTest_imageFace.width, - SDLTest_imageFace.height, - SDLTest_imageFace.bytes_per_pixel * 8, + SDLTest_imageFace.width, + SDLTest_imageFace.height, + SDLTest_imageFace.bytes_per_pixel * 8, SDLTest_imageFace.width * SDLTest_imageFace.bytes_per_pixel, #if (SDL_BYTEORDER == SDL_BIG_ENDIAN) 0xff000000, /* Red bit mask. */ diff --git a/src/test/SDL_test_imagePrimitives.c b/src/test/SDL_test_imagePrimitives.c index 191353854..93b99d692 100644 --- a/src/test/SDL_test_imagePrimitives.c +++ b/src/test/SDL_test_imagePrimitives.c @@ -490,11 +490,11 @@ const SDLTest_SurfaceImage_t SDLTest_imagePrimitives = { */ SDL_Surface *SDLTest_ImagePrimitives() { - SDL_Surface *surface = SDL_CreateRGBSurfaceFrom( + SDL_Surface *surface = SDL_CreateRGBSurfaceFrom( (void*)SDLTest_imagePrimitives.pixel_data, - SDLTest_imagePrimitives.width, + SDLTest_imagePrimitives.width, SDLTest_imagePrimitives.height, - SDLTest_imagePrimitives.bytes_per_pixel * 8, + SDLTest_imagePrimitives.bytes_per_pixel * 8, SDLTest_imagePrimitives.width * SDLTest_imagePrimitives.bytes_per_pixel, #if (SDL_BYTEORDER == SDL_BIG_ENDIAN) 0xff000000, /* Red bit mask. */ diff --git a/src/test/SDL_test_imagePrimitivesBlend.c b/src/test/SDL_test_imagePrimitivesBlend.c index 705e5c9bc..ce9adc51a 100644 --- a/src/test/SDL_test_imagePrimitivesBlend.c +++ b/src/test/SDL_test_imagePrimitivesBlend.c @@ -672,11 +672,11 @@ const SDLTest_SurfaceImage_t SDLTest_imagePrimitivesBlend = { */ SDL_Surface *SDLTest_ImagePrimitivesBlend() { - SDL_Surface *surface = SDL_CreateRGBSurfaceFrom( + SDL_Surface *surface = SDL_CreateRGBSurfaceFrom( (void*)SDLTest_imagePrimitivesBlend.pixel_data, - SDLTest_imagePrimitivesBlend.width, - SDLTest_imagePrimitivesBlend.height, - SDLTest_imagePrimitivesBlend.bytes_per_pixel * 8, + SDLTest_imagePrimitivesBlend.width, + SDLTest_imagePrimitivesBlend.height, + SDLTest_imagePrimitivesBlend.bytes_per_pixel * 8, SDLTest_imagePrimitivesBlend.width * SDLTest_imagePrimitivesBlend.bytes_per_pixel, #if (SDL_BYTEORDER == SDL_BIG_ENDIAN) 0xff000000, /* Red bit mask. */ diff --git a/src/test/SDL_test_log.c b/src/test/SDL_test_log.c index 4d19012dc..d184396a3 100644 --- a/src/test/SDL_test_log.c +++ b/src/test/SDL_test_log.c @@ -21,11 +21,11 @@ /* - Used by the test framework and test cases. + Used by the test framework and test cases. */ -// quiet windows compiler warnings +/* quiet windows compiler warnings */ #define _CRT_SECURE_NO_WARNINGS #include "SDL_config.h" @@ -50,18 +50,18 @@ * * \return Ascii representation of the timestamp in localtime in the format '08/23/01 14:55:02' */ -char *SDLTest_TimestampToString(const time_t timestamp) +char *SDLTest_TimestampToString(const time_t timestamp) { - time_t copy; - static char buffer[64]; - struct tm *local; + time_t copy; + static char buffer[64]; + struct tm *local; - SDL_memset(buffer, 0, sizeof(buffer));\ - copy = timestamp; - local = localtime(©); - strftime(buffer, sizeof(buffer), "%x %X", local); + SDL_memset(buffer, 0, sizeof(buffer));\ + copy = timestamp; + local = localtime(©); + strftime(buffer, sizeof(buffer), "%x %X", local); - return buffer; + return buffer; } /* @@ -69,17 +69,17 @@ char *SDLTest_TimestampToString(const time_t timestamp) */ void SDLTest_Log(const char *fmt, ...) { - va_list list; - char logMessage[SDLTEST_MAX_LOGMESSAGE_LENGTH]; + va_list list; + char logMessage[SDLTEST_MAX_LOGMESSAGE_LENGTH]; - // Print log message into a buffer - SDL_memset(logMessage, 0, SDLTEST_MAX_LOGMESSAGE_LENGTH); - va_start(list, fmt); - SDL_vsnprintf(logMessage, SDLTEST_MAX_LOGMESSAGE_LENGTH - 1, fmt, list); - va_end(list); + /* Print log message into a buffer */ + SDL_memset(logMessage, 0, SDLTEST_MAX_LOGMESSAGE_LENGTH); + va_start(list, fmt); + SDL_vsnprintf(logMessage, SDLTEST_MAX_LOGMESSAGE_LENGTH - 1, fmt, list); + va_end(list); - // Log with timestamp and newline - SDL_LogMessage(SDL_LOG_CATEGORY_TEST, SDL_LOG_PRIORITY_INFO, " %s: %s", SDLTest_TimestampToString(time(0)), logMessage); + /* Log with timestamp and newline */ + SDL_LogMessage(SDL_LOG_CATEGORY_TEST, SDL_LOG_PRIORITY_INFO, " %s: %s", SDLTest_TimestampToString(time(0)), logMessage); } /* @@ -87,15 +87,15 @@ void SDLTest_Log(const char *fmt, ...) */ void SDLTest_LogError(const char *fmt, ...) { - va_list list; - char logMessage[SDLTEST_MAX_LOGMESSAGE_LENGTH]; + va_list list; + char logMessage[SDLTEST_MAX_LOGMESSAGE_LENGTH]; - // Print log message into a buffer - SDL_memset(logMessage, 0, SDLTEST_MAX_LOGMESSAGE_LENGTH); - va_start(list, fmt); - SDL_vsnprintf(logMessage, SDLTEST_MAX_LOGMESSAGE_LENGTH - 1, fmt, list); - va_end(list); + /* Print log message into a buffer */ + SDL_memset(logMessage, 0, SDLTEST_MAX_LOGMESSAGE_LENGTH); + va_start(list, fmt); + SDL_vsnprintf(logMessage, SDLTEST_MAX_LOGMESSAGE_LENGTH - 1, fmt, list); + va_end(list); - // Log with timestamp and newline - SDL_LogMessage(SDL_LOG_CATEGORY_TEST, SDL_LOG_PRIORITY_ERROR, "%s: %s", SDLTest_TimestampToString(time(0)), logMessage); + /* Log with timestamp and newline */ + SDL_LogMessage(SDL_LOG_CATEGORY_TEST, SDL_LOG_PRIORITY_ERROR, "%s: %s", SDLTest_TimestampToString(time(0)), logMessage); } diff --git a/src/test/SDL_test_md5.c b/src/test/SDL_test_md5.c index 6d4d7d04b..3f42ed356 100644 --- a/src/test/SDL_test_md5.c +++ b/src/test/SDL_test_md5.c @@ -102,7 +102,7 @@ static unsigned char MD5PADDING[64] = { (a) += (b); \ } -/* +/* The routine MD5Init initializes the message-digest context mdContext. All fields are set to zero. */ @@ -122,14 +122,14 @@ void SDLTest_Md5Init(SDLTest_Md5Context * mdContext) mdContext->buf[3] = (MD5UINT4) 0x10325476; } -/* +/* The routine MD5Update updates the message-digest context to account for the presence of each of the characters inBuf[0..inLen-1] in the message whose digest is being computed. */ void SDLTest_Md5Update(SDLTest_Md5Context * mdContext, unsigned char *inBuf, - unsigned int inLen) + unsigned int inLen) { MD5UINT4 in[16]; int mdi; @@ -139,12 +139,12 @@ void SDLTest_Md5Update(SDLTest_Md5Context * mdContext, unsigned char *inBuf, if (inBuf == NULL || inLen < 1) return; /* - * compute number of bytes mod 64 + * compute number of bytes mod 64 */ mdi = (int) ((mdContext->i[0] >> 3) & 0x3F); /* - * update number of bits + * update number of bits */ if ((mdContext->i[0] + ((MD5UINT4) inLen << 3)) < mdContext->i[0]) mdContext->i[1]++; @@ -153,26 +153,26 @@ void SDLTest_Md5Update(SDLTest_Md5Context * mdContext, unsigned char *inBuf, while (inLen--) { /* - * add new character to buffer, increment mdi + * add new character to buffer, increment mdi */ mdContext->in[mdi++] = *inBuf++; /* - * transform if necessary + * transform if necessary */ if (mdi == 0x40) { for (i = 0, ii = 0; i < 16; i++, ii += 4) - in[i] = (((MD5UINT4) mdContext->in[ii + 3]) << 24) | - (((MD5UINT4) mdContext->in[ii + 2]) << 16) | - (((MD5UINT4) mdContext->in[ii + 1]) << 8) | - ((MD5UINT4) mdContext->in[ii]); + in[i] = (((MD5UINT4) mdContext->in[ii + 3]) << 24) | + (((MD5UINT4) mdContext->in[ii + 2]) << 16) | + (((MD5UINT4) mdContext->in[ii + 1]) << 8) | + ((MD5UINT4) mdContext->in[ii]); SDLTest_Md5Transform(mdContext->buf, in); mdi = 0; } } } -/* +/* The routine MD5Final terminates the message-digest computation and ends with the desired message digest in mdContext->digest[0...15]. */ @@ -187,24 +187,24 @@ void SDLTest_Md5Final(SDLTest_Md5Context * mdContext) if (mdContext == NULL) return; /* - * save number of bits + * save number of bits */ in[14] = mdContext->i[0]; in[15] = mdContext->i[1]; /* - * compute number of bytes mod 64 + * compute number of bytes mod 64 */ mdi = (int) ((mdContext->i[0] >> 3) & 0x3F); /* - * pad out to 56 mod 64 + * pad out to 56 mod 64 */ padLen = (mdi < 56) ? (56 - mdi) : (120 - mdi); SDLTest_Md5Update(mdContext, MD5PADDING, padLen); /* - * append length in bits and transform + * append length in bits and transform */ for (i = 0, ii = 0; i < 14; i++, ii += 4) in[i] = (((MD5UINT4) mdContext->in[ii + 3]) << 24) | @@ -214,7 +214,7 @@ void SDLTest_Md5Final(SDLTest_Md5Context * mdContext) SDLTest_Md5Transform(mdContext->buf, in); /* - * store buffer in digest + * store buffer in digest */ for (i = 0, ii = 0; i < 4; i++, ii += 4) { mdContext->digest[ii] = (unsigned char) (mdContext->buf[i] & 0xFF); @@ -234,100 +234,100 @@ static void SDLTest_Md5Transform(MD5UINT4 * buf, MD5UINT4 * in) MD5UINT4 a = buf[0], b = buf[1], c = buf[2], d = buf[3]; /* - * Round 1 + * Round 1 */ #define S11 7 #define S12 12 #define S13 17 #define S14 22 - FF(a, b, c, d, in[0], S11, 3614090360u); /* 1 */ - FF(d, a, b, c, in[1], S12, 3905402710u); /* 2 */ - FF(c, d, a, b, in[2], S13, 606105819u); /* 3 */ - FF(b, c, d, a, in[3], S14, 3250441966u); /* 4 */ - FF(a, b, c, d, in[4], S11, 4118548399u); /* 5 */ - FF(d, a, b, c, in[5], S12, 1200080426u); /* 6 */ - FF(c, d, a, b, in[6], S13, 2821735955u); /* 7 */ - FF(b, c, d, a, in[7], S14, 4249261313u); /* 8 */ - FF(a, b, c, d, in[8], S11, 1770035416u); /* 9 */ - FF(d, a, b, c, in[9], S12, 2336552879u); /* 10 */ - FF(c, d, a, b, in[10], S13, 4294925233u); /* 11 */ - FF(b, c, d, a, in[11], S14, 2304563134u); /* 12 */ - FF(a, b, c, d, in[12], S11, 1804603682u); /* 13 */ - FF(d, a, b, c, in[13], S12, 4254626195u); /* 14 */ - FF(c, d, a, b, in[14], S13, 2792965006u); /* 15 */ - FF(b, c, d, a, in[15], S14, 1236535329u); /* 16 */ + FF(a, b, c, d, in[0], S11, 3614090360u); /* 1 */ + FF(d, a, b, c, in[1], S12, 3905402710u); /* 2 */ + FF(c, d, a, b, in[2], S13, 606105819u); /* 3 */ + FF(b, c, d, a, in[3], S14, 3250441966u); /* 4 */ + FF(a, b, c, d, in[4], S11, 4118548399u); /* 5 */ + FF(d, a, b, c, in[5], S12, 1200080426u); /* 6 */ + FF(c, d, a, b, in[6], S13, 2821735955u); /* 7 */ + FF(b, c, d, a, in[7], S14, 4249261313u); /* 8 */ + FF(a, b, c, d, in[8], S11, 1770035416u); /* 9 */ + FF(d, a, b, c, in[9], S12, 2336552879u); /* 10 */ + FF(c, d, a, b, in[10], S13, 4294925233u); /* 11 */ + FF(b, c, d, a, in[11], S14, 2304563134u); /* 12 */ + FF(a, b, c, d, in[12], S11, 1804603682u); /* 13 */ + FF(d, a, b, c, in[13], S12, 4254626195u); /* 14 */ + FF(c, d, a, b, in[14], S13, 2792965006u); /* 15 */ + FF(b, c, d, a, in[15], S14, 1236535329u); /* 16 */ /* - * Round 2 + * Round 2 */ #define S21 5 #define S22 9 #define S23 14 #define S24 20 - GG(a, b, c, d, in[1], S21, 4129170786u); /* 17 */ - GG(d, a, b, c, in[6], S22, 3225465664u); /* 18 */ - GG(c, d, a, b, in[11], S23, 643717713u); /* 19 */ - GG(b, c, d, a, in[0], S24, 3921069994u); /* 20 */ - GG(a, b, c, d, in[5], S21, 3593408605u); /* 21 */ - GG(d, a, b, c, in[10], S22, 38016083u); /* 22 */ - GG(c, d, a, b, in[15], S23, 3634488961u); /* 23 */ - GG(b, c, d, a, in[4], S24, 3889429448u); /* 24 */ - GG(a, b, c, d, in[9], S21, 568446438u); /* 25 */ - GG(d, a, b, c, in[14], S22, 3275163606u); /* 26 */ - GG(c, d, a, b, in[3], S23, 4107603335u); /* 27 */ - GG(b, c, d, a, in[8], S24, 1163531501u); /* 28 */ - GG(a, b, c, d, in[13], S21, 2850285829u); /* 29 */ - GG(d, a, b, c, in[2], S22, 4243563512u); /* 30 */ - GG(c, d, a, b, in[7], S23, 1735328473u); /* 31 */ - GG(b, c, d, a, in[12], S24, 2368359562u); /* 32 */ + GG(a, b, c, d, in[1], S21, 4129170786u); /* 17 */ + GG(d, a, b, c, in[6], S22, 3225465664u); /* 18 */ + GG(c, d, a, b, in[11], S23, 643717713u); /* 19 */ + GG(b, c, d, a, in[0], S24, 3921069994u); /* 20 */ + GG(a, b, c, d, in[5], S21, 3593408605u); /* 21 */ + GG(d, a, b, c, in[10], S22, 38016083u); /* 22 */ + GG(c, d, a, b, in[15], S23, 3634488961u); /* 23 */ + GG(b, c, d, a, in[4], S24, 3889429448u); /* 24 */ + GG(a, b, c, d, in[9], S21, 568446438u); /* 25 */ + GG(d, a, b, c, in[14], S22, 3275163606u); /* 26 */ + GG(c, d, a, b, in[3], S23, 4107603335u); /* 27 */ + GG(b, c, d, a, in[8], S24, 1163531501u); /* 28 */ + GG(a, b, c, d, in[13], S21, 2850285829u); /* 29 */ + GG(d, a, b, c, in[2], S22, 4243563512u); /* 30 */ + GG(c, d, a, b, in[7], S23, 1735328473u); /* 31 */ + GG(b, c, d, a, in[12], S24, 2368359562u); /* 32 */ /* - * Round 3 + * Round 3 */ #define S31 4 #define S32 11 #define S33 16 #define S34 23 - HH(a, b, c, d, in[5], S31, 4294588738u); /* 33 */ - HH(d, a, b, c, in[8], S32, 2272392833u); /* 34 */ - HH(c, d, a, b, in[11], S33, 1839030562u); /* 35 */ - HH(b, c, d, a, in[14], S34, 4259657740u); /* 36 */ - HH(a, b, c, d, in[1], S31, 2763975236u); /* 37 */ - HH(d, a, b, c, in[4], S32, 1272893353u); /* 38 */ - HH(c, d, a, b, in[7], S33, 4139469664u); /* 39 */ - HH(b, c, d, a, in[10], S34, 3200236656u); /* 40 */ - HH(a, b, c, d, in[13], S31, 681279174u); /* 41 */ - HH(d, a, b, c, in[0], S32, 3936430074u); /* 42 */ - HH(c, d, a, b, in[3], S33, 3572445317u); /* 43 */ - HH(b, c, d, a, in[6], S34, 76029189u); /* 44 */ - HH(a, b, c, d, in[9], S31, 3654602809u); /* 45 */ - HH(d, a, b, c, in[12], S32, 3873151461u); /* 46 */ - HH(c, d, a, b, in[15], S33, 530742520u); /* 47 */ - HH(b, c, d, a, in[2], S34, 3299628645u); /* 48 */ + HH(a, b, c, d, in[5], S31, 4294588738u); /* 33 */ + HH(d, a, b, c, in[8], S32, 2272392833u); /* 34 */ + HH(c, d, a, b, in[11], S33, 1839030562u); /* 35 */ + HH(b, c, d, a, in[14], S34, 4259657740u); /* 36 */ + HH(a, b, c, d, in[1], S31, 2763975236u); /* 37 */ + HH(d, a, b, c, in[4], S32, 1272893353u); /* 38 */ + HH(c, d, a, b, in[7], S33, 4139469664u); /* 39 */ + HH(b, c, d, a, in[10], S34, 3200236656u); /* 40 */ + HH(a, b, c, d, in[13], S31, 681279174u); /* 41 */ + HH(d, a, b, c, in[0], S32, 3936430074u); /* 42 */ + HH(c, d, a, b, in[3], S33, 3572445317u); /* 43 */ + HH(b, c, d, a, in[6], S34, 76029189u); /* 44 */ + HH(a, b, c, d, in[9], S31, 3654602809u); /* 45 */ + HH(d, a, b, c, in[12], S32, 3873151461u); /* 46 */ + HH(c, d, a, b, in[15], S33, 530742520u); /* 47 */ + HH(b, c, d, a, in[2], S34, 3299628645u); /* 48 */ /* - * Round 4 + * Round 4 */ #define S41 6 #define S42 10 #define S43 15 #define S44 21 - II(a, b, c, d, in[0], S41, 4096336452u); /* 49 */ - II(d, a, b, c, in[7], S42, 1126891415u); /* 50 */ - II(c, d, a, b, in[14], S43, 2878612391u); /* 51 */ - II(b, c, d, a, in[5], S44, 4237533241u); /* 52 */ - II(a, b, c, d, in[12], S41, 1700485571u); /* 53 */ - II(d, a, b, c, in[3], S42, 2399980690u); /* 54 */ - II(c, d, a, b, in[10], S43, 4293915773u); /* 55 */ - II(b, c, d, a, in[1], S44, 2240044497u); /* 56 */ - II(a, b, c, d, in[8], S41, 1873313359u); /* 57 */ - II(d, a, b, c, in[15], S42, 4264355552u); /* 58 */ - II(c, d, a, b, in[6], S43, 2734768916u); /* 59 */ - II(b, c, d, a, in[13], S44, 1309151649u); /* 60 */ - II(a, b, c, d, in[4], S41, 4149444226u); /* 61 */ - II(d, a, b, c, in[11], S42, 3174756917u); /* 62 */ - II(c, d, a, b, in[2], S43, 718787259u); /* 63 */ - II(b, c, d, a, in[9], S44, 3951481745u); /* 64 */ + II(a, b, c, d, in[0], S41, 4096336452u); /* 49 */ + II(d, a, b, c, in[7], S42, 1126891415u); /* 50 */ + II(c, d, a, b, in[14], S43, 2878612391u); /* 51 */ + II(b, c, d, a, in[5], S44, 4237533241u); /* 52 */ + II(a, b, c, d, in[12], S41, 1700485571u); /* 53 */ + II(d, a, b, c, in[3], S42, 2399980690u); /* 54 */ + II(c, d, a, b, in[10], S43, 4293915773u); /* 55 */ + II(b, c, d, a, in[1], S44, 2240044497u); /* 56 */ + II(a, b, c, d, in[8], S41, 1873313359u); /* 57 */ + II(d, a, b, c, in[15], S42, 4264355552u); /* 58 */ + II(c, d, a, b, in[6], S43, 2734768916u); /* 59 */ + II(b, c, d, a, in[13], S44, 1309151649u); /* 60 */ + II(a, b, c, d, in[4], S41, 4149444226u); /* 61 */ + II(d, a, b, c, in[11], S42, 3174756917u); /* 62 */ + II(c, d, a, b, in[2], S43, 718787259u); /* 63 */ + II(b, c, d, a, in[9], S44, 3951481745u); /* 64 */ buf[0] += a; buf[1] += b; diff --git a/src/test/SDL_test_random.c b/src/test/SDL_test_random.c index 8b305c50e..2c70dbd47 100644 --- a/src/test/SDL_test_random.c +++ b/src/test/SDL_test_random.c @@ -23,14 +23,14 @@ A portable "32-bit Multiply with carry" random number generator. - Used by the fuzzer component. + Used by the fuzzer component. Original source code contributed by A. Schiffler for GSOC project. */ #include "SDL_config.h" -#include +#include #include #include @@ -41,13 +41,13 @@ void SDLTest_RandomInit(SDLTest_RandomContext * rndContext, unsigned int xi, unsigned int ci) { if (rndContext==NULL) return; - + /* * Choose a value for 'a' from this list * 1791398085 1929682203 1683268614 1965537969 1675393560 * 1967773755 1517746329 1447497129 1655692410 1606218150 * 2051013963 1075433238 1557985959 1781943330 1893513180 - * 1631296680 2131995753 2083801278 1873196400 1554115554 + * 1631296680 2131995753 2083801278 1873196400 1554115554 */ rndContext->a = 1655692410; rndContext->x = 30903; @@ -65,9 +65,9 @@ void SDLTest_RandomInit(SDLTest_RandomContext * rndContext, unsigned int xi, uns void SDLTest_RandomInitTime(SDLTest_RandomContext * rndContext) { int a, b; - + if (rndContext==NULL) return; - + srand((unsigned int)time(NULL)); a=rand(); srand(clock()); @@ -82,7 +82,7 @@ unsigned int SDLTest_Random(SDLTest_RandomContext * rndContext) unsigned int xh, xl; if (rndContext==NULL) return -1; - + xh = rndContext->x >> 16, xl = rndContext->x & 65535; rndContext->x = rndContext->x * rndContext->a + rndContext->c; rndContext->c = diff --git a/src/thread/SDL_thread.c b/src/thread/SDL_thread.c index e20f672ff..61e252c17 100644 --- a/src/thread/SDL_thread.c +++ b/src/thread/SDL_thread.c @@ -28,7 +28,7 @@ #include "SDL_systhread.h" #include "../SDL_error_c.h" -#define ARRAY_CHUNKSIZE 32 +#define ARRAY_CHUNKSIZE 32 /* The array of threads currently active in the application (except the main thread) The manipulation of an array here is safer than using a linked list. diff --git a/src/thread/psp/SDL_syssem.c b/src/thread/psp/SDL_syssem.c index 22ecc5f6b..8eff409e0 100644 --- a/src/thread/psp/SDL_syssem.c +++ b/src/thread/psp/SDL_syssem.c @@ -31,42 +31,42 @@ #include struct SDL_semaphore { - SceUID semid; + SceUID semid; }; /* Create a semaphore */ SDL_sem *SDL_CreateSemaphore(Uint32 initial_value) { - SDL_sem *sem; + SDL_sem *sem; - sem = (SDL_sem *) malloc(sizeof(*sem)); - if (sem != NULL) { - /* TODO: Figure out the limit on the maximum value. */ - sem->semid = sceKernelCreateSema("SDL sema", 0, initial_value, 255, NULL); - if (sem->semid < 0) { - SDL_SetError("Couldn't create semaphore"); - free(sem); - sem = NULL; - } - } else { - SDL_OutOfMemory(); - } + sem = (SDL_sem *) malloc(sizeof(*sem)); + if (sem != NULL) { + /* TODO: Figure out the limit on the maximum value. */ + sem->semid = sceKernelCreateSema("SDL sema", 0, initial_value, 255, NULL); + if (sem->semid < 0) { + SDL_SetError("Couldn't create semaphore"); + free(sem); + sem = NULL; + } + } else { + SDL_OutOfMemory(); + } - return sem; + return sem; } /* Free the semaphore */ void SDL_DestroySemaphore(SDL_sem *sem) { - if (sem != NULL) { - if (sem->semid > 0) { - sceKernelDeleteSema(sem->semid); - sem->semid = 0; - } + if (sem != NULL) { + if (sem->semid > 0) { + sceKernelDeleteSema(sem->semid); + sem->semid = 0; + } - free(sem); - } + free(sem); + } } /* TODO: This routine is a bit overloaded. @@ -75,30 +75,30 @@ void SDL_DestroySemaphore(SDL_sem *sem) * is specified, convert it to microseconds. */ int SDL_SemWaitTimeout(SDL_sem *sem, Uint32 timeout) { - Uint32 *pTimeout; + Uint32 *pTimeout; unsigned int res; - if (sem == NULL) { - SDL_SetError("Passed a NULL sem"); - return 0; - } + if (sem == NULL) { + SDL_SetError("Passed a NULL sem"); + return 0; + } - if (timeout == 0) { - res = sceKernelPollSema(sem->semid, 1); - if (res < 0) { - return SDL_MUTEX_TIMEDOUT; - } - return 0; - } + if (timeout == 0) { + res = sceKernelPollSema(sem->semid, 1); + if (res < 0) { + return SDL_MUTEX_TIMEDOUT; + } + return 0; + } - if (timeout == SDL_MUTEX_MAXWAIT) { - pTimeout = NULL; - } else { - timeout *= 1000; /* Convert to microseconds. */ - pTimeout = &timeout; - } + if (timeout == SDL_MUTEX_MAXWAIT) { + pTimeout = NULL; + } else { + timeout *= 1000; /* Convert to microseconds. */ + pTimeout = &timeout; + } - res = sceKernelWaitSema(sem->semid, 1, pTimeout); + res = sceKernelWaitSema(sem->semid, 1, pTimeout); switch (res) { case SCE_KERNEL_ERROR_OK: return 0; @@ -106,50 +106,50 @@ int SDL_SemWaitTimeout(SDL_sem *sem, Uint32 timeout) return SDL_MUTEX_TIMEDOUT; default: return SDL_SetError("WaitForSingleObject() failed"); - } + } } int SDL_SemTryWait(SDL_sem *sem) { - return SDL_SemWaitTimeout(sem, 0); + return SDL_SemWaitTimeout(sem, 0); } int SDL_SemWait(SDL_sem *sem) { - return SDL_SemWaitTimeout(sem, SDL_MUTEX_MAXWAIT); + return SDL_SemWaitTimeout(sem, SDL_MUTEX_MAXWAIT); } /* Returns the current count of the semaphore */ Uint32 SDL_SemValue(SDL_sem *sem) { - SceKernelSemaInfo info; + SceKernelSemaInfo info; - if (sem == NULL) { - SDL_SetError("Passed a NULL sem"); - return 0; - } + if (sem == NULL) { + SDL_SetError("Passed a NULL sem"); + return 0; + } - if (sceKernelReferSemaStatus(sem->semid, &info) >= 0) { - return info.currentCount; - } + if (sceKernelReferSemaStatus(sem->semid, &info) >= 0) { + return info.currentCount; + } - return 0; + return 0; } int SDL_SemPost(SDL_sem *sem) { - int res; + int res; - if (sem == NULL) { - return SDL_SetError("Passed a NULL sem"); - } + if (sem == NULL) { + return SDL_SetError("Passed a NULL sem"); + } - res = sceKernelSignalSema(sem->semid, 1); - if (res < 0) { - return SDL_SetError("sceKernelSignalSema() failed"); - } + res = sceKernelSignalSema(sem->semid, 1); + if (res < 0) { + return SDL_SetError("sceKernelSignalSema() failed"); + } - return 0; + return 0; } /* vim: ts=4 sw=4 diff --git a/src/thread/psp/SDL_systhread.c b/src/thread/psp/SDL_systhread.c index 57b932084..05a2341fe 100644 --- a/src/thread/psp/SDL_systhread.c +++ b/src/thread/psp/SDL_systhread.c @@ -35,57 +35,57 @@ static int ThreadEntry(SceSize args, void *argp) { - SDL_RunThread(*(void **) argp); - return 0; + SDL_RunThread(*(void **) argp); + return 0; } int SDL_SYS_CreateThread(SDL_Thread *thread, void *args) { - SceKernelThreadInfo status; - int priority = 32; + SceKernelThreadInfo status; + int priority = 32; - /* Set priority of new thread to the same as the current thread */ - status.size = sizeof(SceKernelThreadInfo); - if (sceKernelReferThreadStatus(sceKernelGetThreadId(), &status) == 0) { - priority = status.currentPriority; - } + /* Set priority of new thread to the same as the current thread */ + status.size = sizeof(SceKernelThreadInfo); + if (sceKernelReferThreadStatus(sceKernelGetThreadId(), &status) == 0) { + priority = status.currentPriority; + } - thread->handle = sceKernelCreateThread("SDL thread", ThreadEntry, - priority, 0x8000, - PSP_THREAD_ATTR_VFPU, NULL); - if (thread->handle < 0) { - return SDL_SetError("sceKernelCreateThread() failed"); - } + thread->handle = sceKernelCreateThread("SDL thread", ThreadEntry, + priority, 0x8000, + PSP_THREAD_ATTR_VFPU, NULL); + if (thread->handle < 0) { + return SDL_SetError("sceKernelCreateThread() failed"); + } - sceKernelStartThread(thread->handle, 4, &args); - return 0; + sceKernelStartThread(thread->handle, 4, &args); + return 0; } void SDL_SYS_SetupThread(const char *name) { - /* Do nothing. */ + /* Do nothing. */ } SDL_threadID SDL_ThreadID(void) { - return (SDL_threadID) sceKernelGetThreadId(); + return (SDL_threadID) sceKernelGetThreadId(); } void SDL_SYS_WaitThread(SDL_Thread *thread) { - sceKernelWaitThreadEnd(thread->handle, NULL); - sceKernelDeleteThread(thread->handle); + sceKernelWaitThreadEnd(thread->handle, NULL); + sceKernelDeleteThread(thread->handle); } void SDL_SYS_KillThread(SDL_Thread *thread) -{ - sceKernelTerminateDeleteThread(thread->handle); +{ + sceKernelTerminateDeleteThread(thread->handle); } int SDL_SYS_SetThreadPriority(SDL_ThreadPriority priority) -{ +{ int value; - + if (priority == SDL_THREAD_PRIORITY_LOW) { value = 19; } else if (priority == SDL_THREAD_PRIORITY_HIGH) { @@ -93,7 +93,7 @@ int SDL_SYS_SetThreadPriority(SDL_ThreadPriority priority) } else { value = 0; } - + return sceKernelChangeThreadPriority(sceKernelGetThreadId(),value); } diff --git a/src/thread/pthread/SDL_systhread.c b/src/thread/pthread/SDL_systhread.c index 62436936e..c967ca7f3 100644 --- a/src/thread/pthread/SDL_systhread.c +++ b/src/thread/pthread/SDL_systhread.c @@ -34,7 +34,7 @@ #include #include #include -#endif // __LINUX__ +#endif /* __LINUX__ */ #if defined(__LINUX__) || defined(__MACOSX__) || defined(__IPHONEOS__) #include diff --git a/src/thread/windows/SDL_systhread.c b/src/thread/windows/SDL_systhread.c index 6ae9cdb8f..ada365413 100644 --- a/src/thread/windows/SDL_systhread.c +++ b/src/thread/windows/SDL_systhread.c @@ -36,7 +36,7 @@ /* Cygwin gcc-3 ... MingW64 (even with a i386 host) does this like MSVC. */ #if (defined(__MINGW32__) && (__GNUC__ < 4)) typedef unsigned long (__cdecl *pfnSDL_CurrentBeginThread) (void *, unsigned, - unsigned (__stdcall *func)(void *), void *arg, + unsigned (__stdcall *func)(void *), void *arg, unsigned, unsigned *threadID); typedef void (__cdecl *pfnSDL_CurrentEndThread)(unsigned code); @@ -118,9 +118,9 @@ SDL_SYS_CreateThread(SDL_Thread * thread, void *args) if (!pThreadParms) { return SDL_OutOfMemory(); } - // Save the function which we will have to call to clear the RTL of calling app! + /* Save the function which we will have to call to clear the RTL of calling app! */ pThreadParms->pfnCurrentEndThread = pfnEndThread; - // Also save the real parameters we have to pass to thread function + /* Also save the real parameters we have to pass to thread function */ pThreadParms->args = args; if (pfnBeginThread) { diff --git a/src/timer/SDL_timer.c b/src/timer/SDL_timer.c index 5e542f083..5b6550c1c 100644 --- a/src/timer/SDL_timer.c +++ b/src/timer/SDL_timer.c @@ -336,7 +336,7 @@ SDL_AddTimer(Uint32 interval, SDL_TimerCallback callback, void *param) timer->interval = interval; timer->scheduled = SDL_GetTicks() + interval; timer->canceled = SDL_FALSE; - + entry = (SDL_TimerMap *)SDL_malloc(sizeof(*entry)); if (!entry) { SDL_free(timer); diff --git a/src/timer/SDL_timer_c.h b/src/timer/SDL_timer_c.h index c759bcd84..157485310 100644 --- a/src/timer/SDL_timer_c.h +++ b/src/timer/SDL_timer_c.h @@ -23,8 +23,8 @@ /* Useful functions and variables from SDL_timer.c */ #include "SDL_timer.h" -#define ROUND_RESOLUTION(X) \ - (((X+TIMER_RESOLUTION-1)/TIMER_RESOLUTION)*TIMER_RESOLUTION) +#define ROUND_RESOLUTION(X) \ + (((X+TIMER_RESOLUTION-1)/TIMER_RESOLUTION)*TIMER_RESOLUTION) extern void SDL_InitTicks(void); extern int SDL_TimerInit(void); diff --git a/src/timer/psp/SDL_systimer.c b/src/timer/psp/SDL_systimer.c index cfb0aeb25..59bb4df1c 100644 --- a/src/timer/psp/SDL_systimer.c +++ b/src/timer/psp/SDL_systimer.c @@ -32,17 +32,17 @@ static struct timeval start; void SDL_StartTicks(void) { - gettimeofday(&start, NULL); + gettimeofday(&start, NULL); } Uint32 SDL_GetTicks(void) { - struct timeval now; - Uint32 ticks; + struct timeval now; + Uint32 ticks; - gettimeofday(&now, NULL); - ticks=(now.tv_sec-start.tv_sec)*1000+(now.tv_usec-start.tv_usec)/1000; - return(ticks); + gettimeofday(&now, NULL); + ticks=(now.tv_sec-start.tv_sec)*1000+(now.tv_usec-start.tv_usec)/1000; + return(ticks); } Uint64 @@ -59,10 +59,10 @@ SDL_GetPerformanceFrequency(void) void SDL_Delay(Uint32 ms) { - const Uint32 max_delay = 0xffffffffUL / 1000; - if(ms > max_delay) - ms = max_delay; - sceKernelDelayThreadCB(ms * 1000); + const Uint32 max_delay = 0xffffffffUL / 1000; + if(ms > max_delay) + ms = max_delay; + sceKernelDelayThreadCB(ms * 1000); } /* vim: ts=4 sw=4 diff --git a/src/timer/unix/SDL_systimer.c b/src/timer/unix/SDL_systimer.c index c61b8b966..514ac2267 100644 --- a/src/timer/unix/SDL_systimer.c +++ b/src/timer/unix/SDL_systimer.c @@ -85,7 +85,7 @@ SDL_GetTicks(void) #if HAVE_CLOCK_GETTIME struct timespec now; clock_gettime(CLOCK_MONOTONIC, &now); - ticks = + ticks = (now.tv_sec - start_ts.tv_sec) * 1000 + (now.tv_nsec - start_ts.tv_nsec) / 1000000; #elif defined(__APPLE__) diff --git a/src/timer/windows/SDL_systimer.c b/src/timer/windows/SDL_systimer.c index 9d1711b96..33097634e 100644 --- a/src/timer/windows/SDL_systimer.c +++ b/src/timer/windows/SDL_systimer.c @@ -27,7 +27,7 @@ #include "SDL_timer.h" -#define TIME_WRAP_VALUE (~(DWORD)0) +#define TIME_WRAP_VALUE (~(DWORD)0) /* The first (low-resolution) ticks value of the application */ static DWORD start; @@ -48,7 +48,7 @@ SDL_StartTicks(void) #ifdef USE_GETTICKCOUNT start = GetTickCount(); #else - /* QueryPerformanceCounter has had problems in the past, but lots of games + /* QueryPerformanceCounter has had problems in the past, but lots of games use it, so we'll rely on it here. */ if (QueryPerformanceFrequency(&hires_ticks_per_second) == TRUE) { diff --git a/src/video/SDL_RLEaccel.c b/src/video/SDL_RLEaccel.c index 965a706f5..e1f12d13b 100644 --- a/src/video/SDL_RLEaccel.c +++ b/src/video/SDL_RLEaccel.c @@ -71,7 +71,7 @@ * For 32-bit targets, each pixel has the target RGB format but with * the alpha value occupying the highest 8 bits. The and * counts are 16 bit. - * + * * For 16-bit targets, each pixel has the target RGB format, but with * the middle component (usually green) shifted 16 steps to the left, * and the hole filled with the 5 most significant bits of the alpha value. @@ -97,20 +97,20 @@ #define MIN(a, b) ((a) < (b) ? (a) : (b)) #endif -#define PIXEL_COPY(to, from, len, bpp) \ -do { \ - if(bpp == 4) { \ - SDL_memcpy4(to, from, (size_t)(len)); \ - } else { \ - SDL_memcpy(to, from, (size_t)(len) * (bpp)); \ - } \ +#define PIXEL_COPY(to, from, len, bpp) \ +do { \ + if(bpp == 4) { \ + SDL_memcpy4(to, from, (size_t)(len)); \ + } else { \ + SDL_memcpy(to, from, (size_t)(len) * (bpp)); \ + } \ } while(0) /* * Various colorkey blit methods, for opaque and per-surface alpha */ -#define OPAQUE_BLIT(to, from, length, bpp, alpha) \ +#define OPAQUE_BLIT(to, from, length, bpp, alpha) \ PIXEL_COPY(to, from, length, bpp) /* @@ -120,22 +120,22 @@ do { \ * of each component, so the bits from the multiplication don't collide. * This can be used for any RGB permutation of course. */ -#define ALPHA_BLIT32_888(to, from, length, bpp, alpha) \ - do { \ - int i; \ - Uint32 *src = (Uint32 *)(from); \ - Uint32 *dst = (Uint32 *)(to); \ - for(i = 0; i < (int)(length); i++) { \ - Uint32 s = *src++; \ - Uint32 d = *dst; \ - Uint32 s1 = s & 0xff00ff; \ - Uint32 d1 = d & 0xff00ff; \ - d1 = (d1 + ((s1 - d1) * alpha >> 8)) & 0xff00ff; \ - s &= 0xff00; \ - d &= 0xff00; \ - d = (d + ((s - d) * alpha >> 8)) & 0xff00; \ - *dst++ = d1 | d; \ - } \ +#define ALPHA_BLIT32_888(to, from, length, bpp, alpha) \ + do { \ + int i; \ + Uint32 *src = (Uint32 *)(from); \ + Uint32 *dst = (Uint32 *)(to); \ + for(i = 0; i < (int)(length); i++) { \ + Uint32 s = *src++; \ + Uint32 d = *dst; \ + Uint32 s1 = s & 0xff00ff; \ + Uint32 d1 = d & 0xff00ff; \ + d1 = (d1 + ((s1 - d1) * alpha >> 8)) & 0xff00ff; \ + s &= 0xff00; \ + d &= 0xff00; \ + d = (d + ((s - d) * alpha >> 8)) & 0xff00; \ + *dst++ = d1 | d; \ + } \ } while(0) /* @@ -144,98 +144,98 @@ do { \ * components at the same time. Since the smallest gap is here just * 5 bits, we have to scale alpha down to 5 bits as well. */ -#define ALPHA_BLIT16_565(to, from, length, bpp, alpha) \ - do { \ - int i; \ - Uint16 *src = (Uint16 *)(from); \ - Uint16 *dst = (Uint16 *)(to); \ - Uint32 ALPHA = alpha >> 3; \ - for(i = 0; i < (int)(length); i++) { \ - Uint32 s = *src++; \ - Uint32 d = *dst; \ - s = (s | s << 16) & 0x07e0f81f; \ - d = (d | d << 16) & 0x07e0f81f; \ - d += (s - d) * ALPHA >> 5; \ - d &= 0x07e0f81f; \ - *dst++ = (Uint16)(d | d >> 16); \ - } \ +#define ALPHA_BLIT16_565(to, from, length, bpp, alpha) \ + do { \ + int i; \ + Uint16 *src = (Uint16 *)(from); \ + Uint16 *dst = (Uint16 *)(to); \ + Uint32 ALPHA = alpha >> 3; \ + for(i = 0; i < (int)(length); i++) { \ + Uint32 s = *src++; \ + Uint32 d = *dst; \ + s = (s | s << 16) & 0x07e0f81f; \ + d = (d | d << 16) & 0x07e0f81f; \ + d += (s - d) * ALPHA >> 5; \ + d &= 0x07e0f81f; \ + *dst++ = (Uint16)(d | d >> 16); \ + } \ } while(0) -#define ALPHA_BLIT16_555(to, from, length, bpp, alpha) \ - do { \ - int i; \ - Uint16 *src = (Uint16 *)(from); \ - Uint16 *dst = (Uint16 *)(to); \ - Uint32 ALPHA = alpha >> 3; \ - for(i = 0; i < (int)(length); i++) { \ - Uint32 s = *src++; \ - Uint32 d = *dst; \ - s = (s | s << 16) & 0x03e07c1f; \ - d = (d | d << 16) & 0x03e07c1f; \ - d += (s - d) * ALPHA >> 5; \ - d &= 0x03e07c1f; \ - *dst++ = (Uint16)(d | d >> 16); \ - } \ +#define ALPHA_BLIT16_555(to, from, length, bpp, alpha) \ + do { \ + int i; \ + Uint16 *src = (Uint16 *)(from); \ + Uint16 *dst = (Uint16 *)(to); \ + Uint32 ALPHA = alpha >> 3; \ + for(i = 0; i < (int)(length); i++) { \ + Uint32 s = *src++; \ + Uint32 d = *dst; \ + s = (s | s << 16) & 0x03e07c1f; \ + d = (d | d << 16) & 0x03e07c1f; \ + d += (s - d) * ALPHA >> 5; \ + d &= 0x03e07c1f; \ + *dst++ = (Uint16)(d | d >> 16); \ + } \ } while(0) /* * The general slow catch-all function, for remaining depths and formats */ -#define ALPHA_BLIT_ANY(to, from, length, bpp, alpha) \ - do { \ - int i; \ - Uint8 *src = from; \ - Uint8 *dst = to; \ - for(i = 0; i < (int)(length); i++) { \ - Uint32 s, d; \ - unsigned rs, gs, bs, rd, gd, bd; \ - switch(bpp) { \ - case 2: \ - s = *(Uint16 *)src; \ - d = *(Uint16 *)dst; \ - break; \ - case 3: \ - if(SDL_BYTEORDER == SDL_BIG_ENDIAN) { \ - s = (src[0] << 16) | (src[1] << 8) | src[2]; \ - d = (dst[0] << 16) | (dst[1] << 8) | dst[2]; \ - } else { \ - s = (src[2] << 16) | (src[1] << 8) | src[0]; \ - d = (dst[2] << 16) | (dst[1] << 8) | dst[0]; \ - } \ - break; \ - case 4: \ - s = *(Uint32 *)src; \ - d = *(Uint32 *)dst; \ - break; \ - } \ - RGB_FROM_PIXEL(s, fmt, rs, gs, bs); \ - RGB_FROM_PIXEL(d, fmt, rd, gd, bd); \ - rd += (rs - rd) * alpha >> 8; \ - gd += (gs - gd) * alpha >> 8; \ - bd += (bs - bd) * alpha >> 8; \ - PIXEL_FROM_RGB(d, fmt, rd, gd, bd); \ - switch(bpp) { \ - case 2: \ - *(Uint16 *)dst = (Uint16)d; \ - break; \ - case 3: \ - if(SDL_BYTEORDER == SDL_BIG_ENDIAN) { \ - dst[0] = (Uint8)(d >> 16); \ - dst[1] = (Uint8)(d >> 8); \ - dst[2] = (Uint8)(d); \ - } else { \ - dst[0] = (Uint8)d; \ - dst[1] = (Uint8)(d >> 8); \ - dst[2] = (Uint8)(d >> 16); \ - } \ - break; \ - case 4: \ - *(Uint32 *)dst = d; \ - break; \ - } \ - src += bpp; \ - dst += bpp; \ - } \ +#define ALPHA_BLIT_ANY(to, from, length, bpp, alpha) \ + do { \ + int i; \ + Uint8 *src = from; \ + Uint8 *dst = to; \ + for(i = 0; i < (int)(length); i++) { \ + Uint32 s, d; \ + unsigned rs, gs, bs, rd, gd, bd; \ + switch(bpp) { \ + case 2: \ + s = *(Uint16 *)src; \ + d = *(Uint16 *)dst; \ + break; \ + case 3: \ + if(SDL_BYTEORDER == SDL_BIG_ENDIAN) { \ + s = (src[0] << 16) | (src[1] << 8) | src[2]; \ + d = (dst[0] << 16) | (dst[1] << 8) | dst[2]; \ + } else { \ + s = (src[2] << 16) | (src[1] << 8) | src[0]; \ + d = (dst[2] << 16) | (dst[1] << 8) | dst[0]; \ + } \ + break; \ + case 4: \ + s = *(Uint32 *)src; \ + d = *(Uint32 *)dst; \ + break; \ + } \ + RGB_FROM_PIXEL(s, fmt, rs, gs, bs); \ + RGB_FROM_PIXEL(d, fmt, rd, gd, bd); \ + rd += (rs - rd) * alpha >> 8; \ + gd += (gs - gd) * alpha >> 8; \ + bd += (bs - bd) * alpha >> 8; \ + PIXEL_FROM_RGB(d, fmt, rd, gd, bd); \ + switch(bpp) { \ + case 2: \ + *(Uint16 *)dst = (Uint16)d; \ + break; \ + case 3: \ + if(SDL_BYTEORDER == SDL_BIG_ENDIAN) { \ + dst[0] = (Uint8)(d >> 16); \ + dst[1] = (Uint8)(d >> 8); \ + dst[2] = (Uint8)(d); \ + } else { \ + dst[0] = (Uint8)d; \ + dst[1] = (Uint8)(d >> 8); \ + dst[2] = (Uint8)(d >> 16); \ + } \ + break; \ + case 4: \ + *(Uint32 *)dst = d; \ + break; \ + } \ + src += bpp; \ + dst += bpp; \ + } \ } while(0) /* @@ -246,17 +246,17 @@ do { \ * First zero the lowest bit of each component, which gives us room to * add them. Then shift right and add the sum of the lowest bits. */ -#define ALPHA_BLIT32_888_50(to, from, length, bpp, alpha) \ - do { \ - int i; \ - Uint32 *src = (Uint32 *)(from); \ - Uint32 *dst = (Uint32 *)(to); \ - for(i = 0; i < (int)(length); i++) { \ - Uint32 s = *src++; \ - Uint32 d = *dst; \ - *dst++ = (((s & 0x00fefefe) + (d & 0x00fefefe)) >> 1) \ - + (s & d & 0x00010101); \ - } \ +#define ALPHA_BLIT32_888_50(to, from, length, bpp, alpha) \ + do { \ + int i; \ + Uint32 *src = (Uint32 *)(from); \ + Uint32 *dst = (Uint32 *)(to); \ + for(i = 0; i < (int)(length); i++) { \ + Uint32 s = *src++; \ + Uint32 d = *dst; \ + *dst++ = (((s & 0x00fefefe) + (d & 0x00fefefe)) >> 1) \ + + (s & d & 0x00010101); \ + } \ } while(0) /* @@ -265,116 +265,116 @@ do { \ */ /* helper: blend a single 16 bit pixel at 50% */ -#define BLEND16_50(dst, src, mask) \ - do { \ - Uint32 s = *src++; \ - Uint32 d = *dst; \ - *dst++ = (Uint16)((((s & mask) + (d & mask)) >> 1) + \ - (s & d & (~mask & 0xffff))); \ +#define BLEND16_50(dst, src, mask) \ + do { \ + Uint32 s = *src++; \ + Uint32 d = *dst; \ + *dst++ = (Uint16)((((s & mask) + (d & mask)) >> 1) + \ + (s & d & (~mask & 0xffff))); \ } while(0) /* basic 16bpp blender. mask is the pixels to keep when adding. */ -#define ALPHA_BLIT16_50(to, from, length, bpp, alpha, mask) \ - do { \ - unsigned n = (length); \ - Uint16 *src = (Uint16 *)(from); \ - Uint16 *dst = (Uint16 *)(to); \ - if(((uintptr_t)src ^ (uintptr_t)dst) & 3) { \ - /* source and destination not in phase, blit one by one */ \ - while(n--) \ - BLEND16_50(dst, src, mask); \ - } else { \ - if((uintptr_t)src & 3) { \ - /* first odd pixel */ \ - BLEND16_50(dst, src, mask); \ - n--; \ - } \ - for(; n > 1; n -= 2) { \ - Uint32 s = *(Uint32 *)src; \ - Uint32 d = *(Uint32 *)dst; \ - *(Uint32 *)dst = ((s & (mask | mask << 16)) >> 1) \ - + ((d & (mask | mask << 16)) >> 1) \ - + (s & d & (~(mask | mask << 16))); \ - src += 2; \ - dst += 2; \ - } \ - if(n) \ - BLEND16_50(dst, src, mask); /* last odd pixel */ \ - } \ +#define ALPHA_BLIT16_50(to, from, length, bpp, alpha, mask) \ + do { \ + unsigned n = (length); \ + Uint16 *src = (Uint16 *)(from); \ + Uint16 *dst = (Uint16 *)(to); \ + if(((uintptr_t)src ^ (uintptr_t)dst) & 3) { \ + /* source and destination not in phase, blit one by one */ \ + while(n--) \ + BLEND16_50(dst, src, mask); \ + } else { \ + if((uintptr_t)src & 3) { \ + /* first odd pixel */ \ + BLEND16_50(dst, src, mask); \ + n--; \ + } \ + for(; n > 1; n -= 2) { \ + Uint32 s = *(Uint32 *)src; \ + Uint32 d = *(Uint32 *)dst; \ + *(Uint32 *)dst = ((s & (mask | mask << 16)) >> 1) \ + + ((d & (mask | mask << 16)) >> 1) \ + + (s & d & (~(mask | mask << 16))); \ + src += 2; \ + dst += 2; \ + } \ + if(n) \ + BLEND16_50(dst, src, mask); /* last odd pixel */ \ + } \ } while(0) -#define ALPHA_BLIT16_565_50(to, from, length, bpp, alpha) \ +#define ALPHA_BLIT16_565_50(to, from, length, bpp, alpha) \ ALPHA_BLIT16_50(to, from, length, bpp, alpha, 0xf7de) -#define ALPHA_BLIT16_555_50(to, from, length, bpp, alpha) \ +#define ALPHA_BLIT16_555_50(to, from, length, bpp, alpha) \ ALPHA_BLIT16_50(to, from, length, bpp, alpha, 0xfbde) -#define CHOOSE_BLIT(blitter, alpha, fmt) \ - do { \ - if(alpha == 255) { \ - switch(fmt->BytesPerPixel) { \ - case 1: blitter(1, Uint8, OPAQUE_BLIT); break; \ - case 2: blitter(2, Uint8, OPAQUE_BLIT); break; \ - case 3: blitter(3, Uint8, OPAQUE_BLIT); break; \ - case 4: blitter(4, Uint16, OPAQUE_BLIT); break; \ - } \ - } else { \ - switch(fmt->BytesPerPixel) { \ - case 1: \ - /* No 8bpp alpha blitting */ \ - break; \ - \ - case 2: \ - switch(fmt->Rmask | fmt->Gmask | fmt->Bmask) { \ - case 0xffff: \ - if(fmt->Gmask == 0x07e0 \ - || fmt->Rmask == 0x07e0 \ - || fmt->Bmask == 0x07e0) { \ - if(alpha == 128) \ - blitter(2, Uint8, ALPHA_BLIT16_565_50); \ - else { \ - blitter(2, Uint8, ALPHA_BLIT16_565); \ - } \ - } else \ - goto general16; \ - break; \ - \ - case 0x7fff: \ - if(fmt->Gmask == 0x03e0 \ - || fmt->Rmask == 0x03e0 \ - || fmt->Bmask == 0x03e0) { \ - if(alpha == 128) \ - blitter(2, Uint8, ALPHA_BLIT16_555_50); \ - else { \ - blitter(2, Uint8, ALPHA_BLIT16_555); \ - } \ - break; \ - } \ - /* fallthrough */ \ - \ - default: \ - general16: \ - blitter(2, Uint8, ALPHA_BLIT_ANY); \ - } \ - break; \ - \ - case 3: \ - blitter(3, Uint8, ALPHA_BLIT_ANY); \ - break; \ - \ - case 4: \ - if((fmt->Rmask | fmt->Gmask | fmt->Bmask) == 0x00ffffff \ - && (fmt->Gmask == 0xff00 || fmt->Rmask == 0xff00 \ - || fmt->Bmask == 0xff00)) { \ - if(alpha == 128) \ - blitter(4, Uint16, ALPHA_BLIT32_888_50); \ - else \ - blitter(4, Uint16, ALPHA_BLIT32_888); \ - } else \ - blitter(4, Uint16, ALPHA_BLIT_ANY); \ - break; \ - } \ - } \ +#define CHOOSE_BLIT(blitter, alpha, fmt) \ + do { \ + if(alpha == 255) { \ + switch(fmt->BytesPerPixel) { \ + case 1: blitter(1, Uint8, OPAQUE_BLIT); break; \ + case 2: blitter(2, Uint8, OPAQUE_BLIT); break; \ + case 3: blitter(3, Uint8, OPAQUE_BLIT); break; \ + case 4: blitter(4, Uint16, OPAQUE_BLIT); break; \ + } \ + } else { \ + switch(fmt->BytesPerPixel) { \ + case 1: \ + /* No 8bpp alpha blitting */ \ + break; \ + \ + case 2: \ + switch(fmt->Rmask | fmt->Gmask | fmt->Bmask) { \ + case 0xffff: \ + if(fmt->Gmask == 0x07e0 \ + || fmt->Rmask == 0x07e0 \ + || fmt->Bmask == 0x07e0) { \ + if(alpha == 128) \ + blitter(2, Uint8, ALPHA_BLIT16_565_50); \ + else { \ + blitter(2, Uint8, ALPHA_BLIT16_565); \ + } \ + } else \ + goto general16; \ + break; \ + \ + case 0x7fff: \ + if(fmt->Gmask == 0x03e0 \ + || fmt->Rmask == 0x03e0 \ + || fmt->Bmask == 0x03e0) { \ + if(alpha == 128) \ + blitter(2, Uint8, ALPHA_BLIT16_555_50); \ + else { \ + blitter(2, Uint8, ALPHA_BLIT16_555); \ + } \ + break; \ + } \ + /* fallthrough */ \ + \ + default: \ + general16: \ + blitter(2, Uint8, ALPHA_BLIT_ANY); \ + } \ + break; \ + \ + case 3: \ + blitter(3, Uint8, ALPHA_BLIT_ANY); \ + break; \ + \ + case 4: \ + if((fmt->Rmask | fmt->Gmask | fmt->Bmask) == 0x00ffffff \ + && (fmt->Gmask == 0xff00 || fmt->Rmask == 0xff00 \ + || fmt->Bmask == 0xff00)) { \ + if(alpha == 128) \ + blitter(4, Uint16, ALPHA_BLIT32_888_50); \ + else \ + blitter(4, Uint16, ALPHA_BLIT32_888); \ + } else \ + blitter(4, Uint16, ALPHA_BLIT_ANY); \ + break; \ + } \ + } \ } while(0) /* @@ -387,48 +387,48 @@ RLEClipBlit(int w, Uint8 * srcbuf, SDL_Surface * dst, { SDL_PixelFormat *fmt = dst->format; -#define RLECLIPBLIT(bpp, Type, do_blit) \ - do { \ - int linecount = srcrect->h; \ - int ofs = 0; \ - int left = srcrect->x; \ - int right = left + srcrect->w; \ - dstbuf -= left * bpp; \ - for(;;) { \ - int run; \ - ofs += *(Type *)srcbuf; \ - run = ((Type *)srcbuf)[1]; \ - srcbuf += 2 * sizeof(Type); \ - if(run) { \ - /* clip to left and right borders */ \ - if(ofs < right) { \ - int start = 0; \ - int len = run; \ - int startcol; \ - if(left - ofs > 0) { \ - start = left - ofs; \ - len -= start; \ - if(len <= 0) \ - goto nocopy ## bpp ## do_blit; \ - } \ - startcol = ofs + start; \ - if(len > right - startcol) \ - len = right - startcol; \ - do_blit(dstbuf + startcol * bpp, srcbuf + start * bpp, \ - len, bpp, alpha); \ - } \ - nocopy ## bpp ## do_blit: \ - srcbuf += run * bpp; \ - ofs += run; \ - } else if(!ofs) \ - break; \ - if(ofs == w) { \ - ofs = 0; \ - dstbuf += dst->pitch; \ - if(!--linecount) \ - break; \ - } \ - } \ +#define RLECLIPBLIT(bpp, Type, do_blit) \ + do { \ + int linecount = srcrect->h; \ + int ofs = 0; \ + int left = srcrect->x; \ + int right = left + srcrect->w; \ + dstbuf -= left * bpp; \ + for(;;) { \ + int run; \ + ofs += *(Type *)srcbuf; \ + run = ((Type *)srcbuf)[1]; \ + srcbuf += 2 * sizeof(Type); \ + if(run) { \ + /* clip to left and right borders */ \ + if(ofs < right) { \ + int start = 0; \ + int len = run; \ + int startcol; \ + if(left - ofs > 0) { \ + start = left - ofs; \ + len -= start; \ + if(len <= 0) \ + goto nocopy ## bpp ## do_blit; \ + } \ + startcol = ofs + start; \ + if(len > right - startcol) \ + len = right - startcol; \ + do_blit(dstbuf + startcol * bpp, srcbuf + start * bpp, \ + len, bpp, alpha); \ + } \ + nocopy ## bpp ## do_blit: \ + srcbuf += run * bpp; \ + ofs += run; \ + } else if(!ofs) \ + break; \ + if(ofs == w) { \ + ofs = 0; \ + dstbuf += dst->pitch; \ + if(!--linecount) \ + break; \ + } \ + } \ } while(0) CHOOSE_BLIT(RLECLIPBLIT, alpha, fmt); @@ -469,23 +469,23 @@ SDL_RLEBlit(SDL_Surface * src, SDL_Rect * srcrect, int ofs = 0; if (vskip) { -#define RLESKIP(bpp, Type) \ - for(;;) { \ - int run; \ - ofs += *(Type *)srcbuf; \ - run = ((Type *)srcbuf)[1]; \ - srcbuf += sizeof(Type) * 2; \ - if(run) { \ - srcbuf += run * bpp; \ - ofs += run; \ - } else if(!ofs) \ - goto done; \ - if(ofs == w) { \ - ofs = 0; \ - if(!--vskip) \ - break; \ - } \ - } +#define RLESKIP(bpp, Type) \ + for(;;) { \ + int run; \ + ofs += *(Type *)srcbuf; \ + run = ((Type *)srcbuf)[1]; \ + srcbuf += sizeof(Type) * 2; \ + if(run) { \ + srcbuf += run * bpp; \ + ofs += run; \ + } else if(!ofs) \ + goto done; \ + if(ofs == w) { \ + ofs = 0; \ + if(!--vskip) \ + break; \ + } \ + } switch (src->format->BytesPerPixel) { case 1: @@ -514,29 +514,29 @@ SDL_RLEBlit(SDL_Surface * src, SDL_Rect * srcrect, } else { SDL_PixelFormat *fmt = src->format; -#define RLEBLIT(bpp, Type, do_blit) \ - do { \ - int linecount = srcrect->h; \ - int ofs = 0; \ - for(;;) { \ - unsigned run; \ - ofs += *(Type *)srcbuf; \ - run = ((Type *)srcbuf)[1]; \ - srcbuf += 2 * sizeof(Type); \ - if(run) { \ - do_blit(dstbuf + ofs * bpp, srcbuf, run, bpp, alpha); \ - srcbuf += run * bpp; \ - ofs += run; \ - } else if(!ofs) \ - break; \ - if(ofs == w) { \ - ofs = 0; \ - dstbuf += dst->pitch; \ - if(!--linecount) \ - break; \ - } \ - } \ - } while(0) +#define RLEBLIT(bpp, Type, do_blit) \ + do { \ + int linecount = srcrect->h; \ + int ofs = 0; \ + for(;;) { \ + unsigned run; \ + ofs += *(Type *)srcbuf; \ + run = ((Type *)srcbuf)[1]; \ + srcbuf += 2 * sizeof(Type); \ + if(run) { \ + do_blit(dstbuf + ofs * bpp, srcbuf, run, bpp, alpha); \ + srcbuf += run * bpp; \ + ofs += run; \ + } else if(!ofs) \ + break; \ + if(ofs == w) { \ + ofs = 0; \ + dstbuf += dst->pitch; \ + if(!--linecount) \ + break; \ + } \ + } \ + } while(0) CHOOSE_BLIT(RLEBLIT, alpha, fmt); @@ -562,46 +562,46 @@ SDL_RLEBlit(SDL_Surface * src, SDL_Rect * srcrect, * For 32bpp pixels, we have made sure the alpha is stored in the top * 8 bits, so proceed as usual */ -#define BLIT_TRANSL_888(src, dst) \ - do { \ - Uint32 s = src; \ - Uint32 d = dst; \ - unsigned alpha = s >> 24; \ - Uint32 s1 = s & 0xff00ff; \ - Uint32 d1 = d & 0xff00ff; \ - d1 = (d1 + ((s1 - d1) * alpha >> 8)) & 0xff00ff; \ - s &= 0xff00; \ - d &= 0xff00; \ - d = (d + ((s - d) * alpha >> 8)) & 0xff00; \ - dst = d1 | d | 0xff000000; \ +#define BLIT_TRANSL_888(src, dst) \ + do { \ + Uint32 s = src; \ + Uint32 d = dst; \ + unsigned alpha = s >> 24; \ + Uint32 s1 = s & 0xff00ff; \ + Uint32 d1 = d & 0xff00ff; \ + d1 = (d1 + ((s1 - d1) * alpha >> 8)) & 0xff00ff; \ + s &= 0xff00; \ + d &= 0xff00; \ + d = (d + ((s - d) * alpha >> 8)) & 0xff00; \ + dst = d1 | d | 0xff000000; \ } while(0) /* * For 16bpp pixels, we have stored the 5 most significant alpha bits in * bits 5-10. As before, we can process all 3 RGB components at the same time. */ -#define BLIT_TRANSL_565(src, dst) \ - do { \ - Uint32 s = src; \ - Uint32 d = dst; \ - unsigned alpha = (s & 0x3e0) >> 5; \ - s &= 0x07e0f81f; \ - d = (d | d << 16) & 0x07e0f81f; \ - d += (s - d) * alpha >> 5; \ - d &= 0x07e0f81f; \ - dst = (Uint16)(d | d >> 16); \ +#define BLIT_TRANSL_565(src, dst) \ + do { \ + Uint32 s = src; \ + Uint32 d = dst; \ + unsigned alpha = (s & 0x3e0) >> 5; \ + s &= 0x07e0f81f; \ + d = (d | d << 16) & 0x07e0f81f; \ + d += (s - d) * alpha >> 5; \ + d &= 0x07e0f81f; \ + dst = (Uint16)(d | d >> 16); \ } while(0) -#define BLIT_TRANSL_555(src, dst) \ - do { \ - Uint32 s = src; \ - Uint32 d = dst; \ - unsigned alpha = (s & 0x3e0) >> 5; \ - s &= 0x03e07c1f; \ - d = (d | d << 16) & 0x03e07c1f; \ - d += (s - d) * alpha >> 5; \ - d &= 0x03e07c1f; \ - dst = (Uint16)(d | d >> 16); \ +#define BLIT_TRANSL_555(src, dst) \ + do { \ + Uint32 s = src; \ + Uint32 d = dst; \ + unsigned alpha = (s & 0x3e0) >> 5; \ + s &= 0x03e07c1f; \ + d = (d | d << 16) & 0x03e07c1f; \ + d += (s - d) * alpha >> 5; \ + d &= 0x03e07c1f; \ + dst = (Uint16)(d | d >> 16); \ } while(0) /* used to save the destination format in the encoding. Designed to be @@ -635,72 +635,72 @@ RLEAlphaClipBlit(int w, Uint8 * srcbuf, SDL_Surface * dst, * Ctype the translucent count type, and do_blend the macro * to blend one pixel. */ -#define RLEALPHACLIPBLIT(Ptype, Ctype, do_blend) \ - do { \ - int linecount = srcrect->h; \ - int left = srcrect->x; \ - int right = left + srcrect->w; \ - dstbuf -= left * sizeof(Ptype); \ - do { \ - int ofs = 0; \ - /* blit opaque pixels on one line */ \ - do { \ - unsigned run; \ - ofs += ((Ctype *)srcbuf)[0]; \ - run = ((Ctype *)srcbuf)[1]; \ - srcbuf += 2 * sizeof(Ctype); \ - if(run) { \ - /* clip to left and right borders */ \ - int cofs = ofs; \ - int crun = run; \ - if(left - cofs > 0) { \ - crun -= left - cofs; \ - cofs = left; \ - } \ - if(crun > right - cofs) \ - crun = right - cofs; \ - if(crun > 0) \ - PIXEL_COPY(dstbuf + cofs * sizeof(Ptype), \ - srcbuf + (cofs - ofs) * sizeof(Ptype), \ - (unsigned)crun, sizeof(Ptype)); \ - srcbuf += run * sizeof(Ptype); \ - ofs += run; \ - } else if(!ofs) \ - return; \ - } while(ofs < w); \ - /* skip padding if necessary */ \ - if(sizeof(Ptype) == 2) \ - srcbuf += (uintptr_t)srcbuf & 2; \ - /* blit translucent pixels on the same line */ \ - ofs = 0; \ - do { \ - unsigned run; \ - ofs += ((Uint16 *)srcbuf)[0]; \ - run = ((Uint16 *)srcbuf)[1]; \ - srcbuf += 4; \ - if(run) { \ - /* clip to left and right borders */ \ - int cofs = ofs; \ - int crun = run; \ - if(left - cofs > 0) { \ - crun -= left - cofs; \ - cofs = left; \ - } \ - if(crun > right - cofs) \ - crun = right - cofs; \ - if(crun > 0) { \ - Ptype *dst = (Ptype *)dstbuf + cofs; \ - Uint32 *src = (Uint32 *)srcbuf + (cofs - ofs); \ - int i; \ - for(i = 0; i < crun; i++) \ - do_blend(src[i], dst[i]); \ - } \ - srcbuf += run * 4; \ - ofs += run; \ - } \ - } while(ofs < w); \ - dstbuf += dst->pitch; \ - } while(--linecount); \ +#define RLEALPHACLIPBLIT(Ptype, Ctype, do_blend) \ + do { \ + int linecount = srcrect->h; \ + int left = srcrect->x; \ + int right = left + srcrect->w; \ + dstbuf -= left * sizeof(Ptype); \ + do { \ + int ofs = 0; \ + /* blit opaque pixels on one line */ \ + do { \ + unsigned run; \ + ofs += ((Ctype *)srcbuf)[0]; \ + run = ((Ctype *)srcbuf)[1]; \ + srcbuf += 2 * sizeof(Ctype); \ + if(run) { \ + /* clip to left and right borders */ \ + int cofs = ofs; \ + int crun = run; \ + if(left - cofs > 0) { \ + crun -= left - cofs; \ + cofs = left; \ + } \ + if(crun > right - cofs) \ + crun = right - cofs; \ + if(crun > 0) \ + PIXEL_COPY(dstbuf + cofs * sizeof(Ptype), \ + srcbuf + (cofs - ofs) * sizeof(Ptype), \ + (unsigned)crun, sizeof(Ptype)); \ + srcbuf += run * sizeof(Ptype); \ + ofs += run; \ + } else if(!ofs) \ + return; \ + } while(ofs < w); \ + /* skip padding if necessary */ \ + if(sizeof(Ptype) == 2) \ + srcbuf += (uintptr_t)srcbuf & 2; \ + /* blit translucent pixels on the same line */ \ + ofs = 0; \ + do { \ + unsigned run; \ + ofs += ((Uint16 *)srcbuf)[0]; \ + run = ((Uint16 *)srcbuf)[1]; \ + srcbuf += 4; \ + if(run) { \ + /* clip to left and right borders */ \ + int cofs = ofs; \ + int crun = run; \ + if(left - cofs > 0) { \ + crun -= left - cofs; \ + cofs = left; \ + } \ + if(crun > right - cofs) \ + crun = right - cofs; \ + if(crun > 0) { \ + Ptype *dst = (Ptype *)dstbuf + cofs; \ + Uint32 *src = (Uint32 *)srcbuf + (cofs - ofs); \ + int i; \ + for(i = 0; i < crun; i++) \ + do_blend(src[i], dst[i]); \ + } \ + srcbuf += run * 4; \ + ofs += run; \ + } \ + } while(ofs < w); \ + dstbuf += dst->pitch; \ + } while(--linecount); \ } while(0) switch (df->BytesPerPixel) { @@ -804,50 +804,50 @@ SDL_RLEAlphaBlit(SDL_Surface * src, SDL_Rect * srcrect, * Ctype the translucent count type, and do_blend the * macro to blend one pixel. */ -#define RLEALPHABLIT(Ptype, Ctype, do_blend) \ - do { \ - int linecount = srcrect->h; \ - do { \ - int ofs = 0; \ - /* blit opaque pixels on one line */ \ - do { \ - unsigned run; \ - ofs += ((Ctype *)srcbuf)[0]; \ - run = ((Ctype *)srcbuf)[1]; \ - srcbuf += 2 * sizeof(Ctype); \ - if(run) { \ - PIXEL_COPY(dstbuf + ofs * sizeof(Ptype), srcbuf, \ - run, sizeof(Ptype)); \ - srcbuf += run * sizeof(Ptype); \ - ofs += run; \ - } else if(!ofs) \ - goto done; \ - } while(ofs < w); \ - /* skip padding if necessary */ \ - if(sizeof(Ptype) == 2) \ - srcbuf += (uintptr_t)srcbuf & 2; \ - /* blit translucent pixels on the same line */ \ - ofs = 0; \ - do { \ - unsigned run; \ - ofs += ((Uint16 *)srcbuf)[0]; \ - run = ((Uint16 *)srcbuf)[1]; \ - srcbuf += 4; \ - if(run) { \ - Ptype *dst = (Ptype *)dstbuf + ofs; \ - unsigned i; \ - for(i = 0; i < run; i++) { \ - Uint32 src = *(Uint32 *)srcbuf; \ - do_blend(src, *dst); \ - srcbuf += 4; \ - dst++; \ - } \ - ofs += run; \ - } \ - } while(ofs < w); \ - dstbuf += dst->pitch; \ - } while(--linecount); \ - } while(0) +#define RLEALPHABLIT(Ptype, Ctype, do_blend) \ + do { \ + int linecount = srcrect->h; \ + do { \ + int ofs = 0; \ + /* blit opaque pixels on one line */ \ + do { \ + unsigned run; \ + ofs += ((Ctype *)srcbuf)[0]; \ + run = ((Ctype *)srcbuf)[1]; \ + srcbuf += 2 * sizeof(Ctype); \ + if(run) { \ + PIXEL_COPY(dstbuf + ofs * sizeof(Ptype), srcbuf, \ + run, sizeof(Ptype)); \ + srcbuf += run * sizeof(Ptype); \ + ofs += run; \ + } else if(!ofs) \ + goto done; \ + } while(ofs < w); \ + /* skip padding if necessary */ \ + if(sizeof(Ptype) == 2) \ + srcbuf += (uintptr_t)srcbuf & 2; \ + /* blit translucent pixels on the same line */ \ + ofs = 0; \ + do { \ + unsigned run; \ + ofs += ((Uint16 *)srcbuf)[0]; \ + run = ((Uint16 *)srcbuf)[1]; \ + srcbuf += 4; \ + if(run) { \ + Ptype *dst = (Ptype *)dstbuf + ofs; \ + unsigned i; \ + for(i = 0; i < run; i++) { \ + Uint32 src = *(Uint32 *)srcbuf; \ + do_blend(src, *dst); \ + srcbuf += 4; \ + dst++; \ + } \ + ofs += run; \ + } \ + } while(ofs < w); \ + dstbuf += dst->pitch; \ + } while(--linecount); \ + } while(0) switch (df->BytesPerPixel) { case 2: @@ -1012,7 +1012,7 @@ uncopy_32(Uint32 * dst, void *src, int n, #define ISOPAQUE(pixel, fmt) ((((pixel) & fmt->Amask) >> fmt->Ashift) == 255) -#define ISTRANSL(pixel, fmt) \ +#define ISTRANSL(pixel, fmt) \ ((unsigned)((((pixel) & fmt->Amask) >> fmt->Ashift) - 1U) < 254U) /* convert surface to be quickly alpha-blittable onto dest, if possible */ @@ -1117,20 +1117,20 @@ RLEAlphaSurface(SDL_Surface * surface) Uint8 *lastline = dst; /* end of last non-blank line */ /* opaque counts are 8 or 16 bits, depending on target depth */ -#define ADD_OPAQUE_COUNTS(n, m) \ - if(df->BytesPerPixel == 4) { \ - ((Uint16 *)dst)[0] = n; \ - ((Uint16 *)dst)[1] = m; \ - dst += 4; \ - } else { \ - dst[0] = n; \ - dst[1] = m; \ - dst += 2; \ - } +#define ADD_OPAQUE_COUNTS(n, m) \ + if(df->BytesPerPixel == 4) { \ + ((Uint16 *)dst)[0] = n; \ + ((Uint16 *)dst)[1] = m; \ + dst += 4; \ + } else { \ + dst[0] = n; \ + dst[1] = m; \ + dst += 2; \ + } /* translucent counts are always 16 bit */ -#define ADD_TRANSL_COUNTS(n, m) \ - (((Uint16 *)dst)[0] = n, ((Uint16 *)dst)[1] = m, dst += 4) +#define ADD_TRANSL_COUNTS(n, m) \ + (((Uint16 *)dst)[0] = n, ((Uint16 *)dst)[1] = m, dst += 4) for (y = 0; y < h; y++) { int runstart, skipstart; @@ -1312,16 +1312,16 @@ RLEColorkeySurface(SDL_Surface * surface) w = surface->w; h = surface->h; -#define ADD_COUNTS(n, m) \ - if(bpp == 4) { \ - ((Uint16 *)dst)[0] = n; \ - ((Uint16 *)dst)[1] = m; \ - dst += 4; \ - } else { \ - dst[0] = n; \ - dst[1] = m; \ - dst += 2; \ - } +#define ADD_COUNTS(n, m) \ + if(bpp == 4) { \ + ((Uint16 *)dst)[0] = n; \ + ((Uint16 *)dst)[1] = m; \ + dst += 4; \ + } else { \ + dst[0] = n; \ + dst[1] = m; \ + dst += 2; \ + } for (y = 0; y < h; y++) { int x = 0; diff --git a/src/video/SDL_blit.h b/src/video/SDL_blit.h index e9965561a..7243e6193 100644 --- a/src/video/SDL_blit.h +++ b/src/video/SDL_blit.h @@ -118,289 +118,289 @@ extern SDL_BlitFunc SDL_CalculateBlitA(SDL_Surface * surface); #endif /* Load pixel of the specified format from a buffer and get its R-G-B values */ -#define RGB_FROM_PIXEL(Pixel, fmt, r, g, b) \ -{ \ - r = SDL_expand_byte[fmt->Rloss][((Pixel&fmt->Rmask)>>fmt->Rshift)]; \ - g = SDL_expand_byte[fmt->Gloss][((Pixel&fmt->Gmask)>>fmt->Gshift)]; \ - b = SDL_expand_byte[fmt->Bloss][((Pixel&fmt->Bmask)>>fmt->Bshift)]; \ +#define RGB_FROM_PIXEL(Pixel, fmt, r, g, b) \ +{ \ + r = SDL_expand_byte[fmt->Rloss][((Pixel&fmt->Rmask)>>fmt->Rshift)]; \ + g = SDL_expand_byte[fmt->Gloss][((Pixel&fmt->Gmask)>>fmt->Gshift)]; \ + b = SDL_expand_byte[fmt->Bloss][((Pixel&fmt->Bmask)>>fmt->Bshift)]; \ } -#define RGB_FROM_RGB565(Pixel, r, g, b) \ -{ \ - r = SDL_expand_byte[3][((Pixel&0xF800)>>11)]; \ - g = SDL_expand_byte[2][((Pixel&0x07E0)>>5)]; \ - b = SDL_expand_byte[3][(Pixel&0x001F)]; \ +#define RGB_FROM_RGB565(Pixel, r, g, b) \ +{ \ + r = SDL_expand_byte[3][((Pixel&0xF800)>>11)]; \ + g = SDL_expand_byte[2][((Pixel&0x07E0)>>5)]; \ + b = SDL_expand_byte[3][(Pixel&0x001F)]; \ } -#define RGB_FROM_RGB555(Pixel, r, g, b) \ -{ \ - r = SDL_expand_byte[3][((Pixel&0x7C00)>>10)]; \ - g = SDL_expand_byte[3][((Pixel&0x03E0)>>5)]; \ - b = SDL_expand_byte[3][(Pixel&0x001F)]; \ +#define RGB_FROM_RGB555(Pixel, r, g, b) \ +{ \ + r = SDL_expand_byte[3][((Pixel&0x7C00)>>10)]; \ + g = SDL_expand_byte[3][((Pixel&0x03E0)>>5)]; \ + b = SDL_expand_byte[3][(Pixel&0x001F)]; \ } -#define RGB_FROM_RGB888(Pixel, r, g, b) \ -{ \ - r = ((Pixel&0xFF0000)>>16); \ - g = ((Pixel&0xFF00)>>8); \ - b = (Pixel&0xFF); \ +#define RGB_FROM_RGB888(Pixel, r, g, b) \ +{ \ + r = ((Pixel&0xFF0000)>>16); \ + g = ((Pixel&0xFF00)>>8); \ + b = (Pixel&0xFF); \ } -#define RETRIEVE_RGB_PIXEL(buf, bpp, Pixel) \ -do { \ - switch (bpp) { \ - case 2: \ - Pixel = *((Uint16 *)(buf)); \ - break; \ - \ - case 3: { \ - Uint8 *B = (Uint8 *)(buf); \ - if (SDL_BYTEORDER == SDL_LIL_ENDIAN) { \ - Pixel = B[0] + (B[1] << 8) + (B[2] << 16); \ - } else { \ - Pixel = (B[0] << 16) + (B[1] << 8) + B[2]; \ - } \ - } \ - break; \ - \ - case 4: \ - Pixel = *((Uint32 *)(buf)); \ - break; \ - \ - default: \ - Pixel = 0; /* stop gcc complaints */ \ - break; \ - } \ +#define RETRIEVE_RGB_PIXEL(buf, bpp, Pixel) \ +do { \ + switch (bpp) { \ + case 2: \ + Pixel = *((Uint16 *)(buf)); \ + break; \ + \ + case 3: { \ + Uint8 *B = (Uint8 *)(buf); \ + if (SDL_BYTEORDER == SDL_LIL_ENDIAN) { \ + Pixel = B[0] + (B[1] << 8) + (B[2] << 16); \ + } else { \ + Pixel = (B[0] << 16) + (B[1] << 8) + B[2]; \ + } \ + } \ + break; \ + \ + case 4: \ + Pixel = *((Uint32 *)(buf)); \ + break; \ + \ + default: \ + Pixel = 0; /* stop gcc complaints */ \ + break; \ + } \ } while (0) -#define DISEMBLE_RGB(buf, bpp, fmt, Pixel, r, g, b) \ -do { \ - switch (bpp) { \ - case 2: \ - Pixel = *((Uint16 *)(buf)); \ - RGB_FROM_PIXEL(Pixel, fmt, r, g, b); \ - break; \ - \ - case 3: { \ +#define DISEMBLE_RGB(buf, bpp, fmt, Pixel, r, g, b) \ +do { \ + switch (bpp) { \ + case 2: \ + Pixel = *((Uint16 *)(buf)); \ + RGB_FROM_PIXEL(Pixel, fmt, r, g, b); \ + break; \ + \ + case 3: { \ Pixel = 0; \ - if (SDL_BYTEORDER == SDL_LIL_ENDIAN) { \ - r = *((buf)+fmt->Rshift/8); \ - g = *((buf)+fmt->Gshift/8); \ - b = *((buf)+fmt->Bshift/8); \ - } else { \ - r = *((buf)+2-fmt->Rshift/8); \ - g = *((buf)+2-fmt->Gshift/8); \ - b = *((buf)+2-fmt->Bshift/8); \ - } \ - } \ - break; \ - \ - case 4: \ - Pixel = *((Uint32 *)(buf)); \ - RGB_FROM_PIXEL(Pixel, fmt, r, g, b); \ - break; \ - \ - default: \ - /* stop gcc complaints */ \ - Pixel = 0; \ + if (SDL_BYTEORDER == SDL_LIL_ENDIAN) { \ + r = *((buf)+fmt->Rshift/8); \ + g = *((buf)+fmt->Gshift/8); \ + b = *((buf)+fmt->Bshift/8); \ + } else { \ + r = *((buf)+2-fmt->Rshift/8); \ + g = *((buf)+2-fmt->Gshift/8); \ + b = *((buf)+2-fmt->Bshift/8); \ + } \ + } \ + break; \ + \ + case 4: \ + Pixel = *((Uint32 *)(buf)); \ + RGB_FROM_PIXEL(Pixel, fmt, r, g, b); \ + break; \ + \ + default: \ + /* stop gcc complaints */ \ + Pixel = 0; \ r = g = b = 0; \ - break; \ - } \ + break; \ + } \ } while (0) /* Assemble R-G-B values into a specified pixel format and store them */ -#define PIXEL_FROM_RGB(Pixel, fmt, r, g, b) \ -{ \ - Pixel = ((r>>fmt->Rloss)<Rshift)| \ - ((g>>fmt->Gloss)<Gshift)| \ - ((b>>fmt->Bloss)<Bshift)| \ - fmt->Amask; \ +#define PIXEL_FROM_RGB(Pixel, fmt, r, g, b) \ +{ \ + Pixel = ((r>>fmt->Rloss)<Rshift)| \ + ((g>>fmt->Gloss)<Gshift)| \ + ((b>>fmt->Bloss)<Bshift)| \ + fmt->Amask; \ } -#define RGB565_FROM_RGB(Pixel, r, g, b) \ -{ \ - Pixel = ((r>>3)<<11)|((g>>2)<<5)|(b>>3); \ +#define RGB565_FROM_RGB(Pixel, r, g, b) \ +{ \ + Pixel = ((r>>3)<<11)|((g>>2)<<5)|(b>>3); \ } -#define RGB555_FROM_RGB(Pixel, r, g, b) \ -{ \ - Pixel = ((r>>3)<<10)|((g>>3)<<5)|(b>>3); \ +#define RGB555_FROM_RGB(Pixel, r, g, b) \ +{ \ + Pixel = ((r>>3)<<10)|((g>>3)<<5)|(b>>3); \ } -#define RGB888_FROM_RGB(Pixel, r, g, b) \ -{ \ - Pixel = (r<<16)|(g<<8)|b; \ +#define RGB888_FROM_RGB(Pixel, r, g, b) \ +{ \ + Pixel = (r<<16)|(g<<8)|b; \ } -#define ARGB8888_FROM_RGBA(Pixel, r, g, b, a) \ -{ \ - Pixel = (a<<24)|(r<<16)|(g<<8)|b; \ +#define ARGB8888_FROM_RGBA(Pixel, r, g, b, a) \ +{ \ + Pixel = (a<<24)|(r<<16)|(g<<8)|b; \ } -#define RGBA8888_FROM_RGBA(Pixel, r, g, b, a) \ -{ \ - Pixel = (r<<24)|(g<<16)|(b<<8)|a; \ +#define RGBA8888_FROM_RGBA(Pixel, r, g, b, a) \ +{ \ + Pixel = (r<<24)|(g<<16)|(b<<8)|a; \ } -#define ABGR8888_FROM_RGBA(Pixel, r, g, b, a) \ -{ \ - Pixel = (a<<24)|(b<<16)|(g<<8)|r; \ +#define ABGR8888_FROM_RGBA(Pixel, r, g, b, a) \ +{ \ + Pixel = (a<<24)|(b<<16)|(g<<8)|r; \ } -#define BGRA8888_FROM_RGBA(Pixel, r, g, b, a) \ -{ \ - Pixel = (b<<24)|(g<<16)|(r<<8)|a; \ +#define BGRA8888_FROM_RGBA(Pixel, r, g, b, a) \ +{ \ + Pixel = (b<<24)|(g<<16)|(r<<8)|a; \ } -#define ASSEMBLE_RGB(buf, bpp, fmt, r, g, b) \ -{ \ - switch (bpp) { \ - case 2: { \ - Uint16 Pixel; \ - \ - PIXEL_FROM_RGB(Pixel, fmt, r, g, b); \ - *((Uint16 *)(buf)) = Pixel; \ - } \ - break; \ - \ - case 3: { \ - if (SDL_BYTEORDER == SDL_LIL_ENDIAN) { \ - *((buf)+fmt->Rshift/8) = r; \ - *((buf)+fmt->Gshift/8) = g; \ - *((buf)+fmt->Bshift/8) = b; \ - } else { \ - *((buf)+2-fmt->Rshift/8) = r; \ - *((buf)+2-fmt->Gshift/8) = g; \ - *((buf)+2-fmt->Bshift/8) = b; \ - } \ - } \ - break; \ - \ - case 4: { \ - Uint32 Pixel; \ - \ - PIXEL_FROM_RGB(Pixel, fmt, r, g, b); \ - *((Uint32 *)(buf)) = Pixel; \ - } \ - break; \ - } \ +#define ASSEMBLE_RGB(buf, bpp, fmt, r, g, b) \ +{ \ + switch (bpp) { \ + case 2: { \ + Uint16 Pixel; \ + \ + PIXEL_FROM_RGB(Pixel, fmt, r, g, b); \ + *((Uint16 *)(buf)) = Pixel; \ + } \ + break; \ + \ + case 3: { \ + if (SDL_BYTEORDER == SDL_LIL_ENDIAN) { \ + *((buf)+fmt->Rshift/8) = r; \ + *((buf)+fmt->Gshift/8) = g; \ + *((buf)+fmt->Bshift/8) = b; \ + } else { \ + *((buf)+2-fmt->Rshift/8) = r; \ + *((buf)+2-fmt->Gshift/8) = g; \ + *((buf)+2-fmt->Bshift/8) = b; \ + } \ + } \ + break; \ + \ + case 4: { \ + Uint32 Pixel; \ + \ + PIXEL_FROM_RGB(Pixel, fmt, r, g, b); \ + *((Uint32 *)(buf)) = Pixel; \ + } \ + break; \ + } \ } /* FIXME: Should we rescale alpha into 0..255 here? */ -#define RGBA_FROM_PIXEL(Pixel, fmt, r, g, b, a) \ -{ \ - r = SDL_expand_byte[fmt->Rloss][((Pixel&fmt->Rmask)>>fmt->Rshift)]; \ - g = SDL_expand_byte[fmt->Gloss][((Pixel&fmt->Gmask)>>fmt->Gshift)]; \ - b = SDL_expand_byte[fmt->Bloss][((Pixel&fmt->Bmask)>>fmt->Bshift)]; \ - a = SDL_expand_byte[fmt->Aloss][((Pixel&fmt->Amask)>>fmt->Ashift)]; \ +#define RGBA_FROM_PIXEL(Pixel, fmt, r, g, b, a) \ +{ \ + r = SDL_expand_byte[fmt->Rloss][((Pixel&fmt->Rmask)>>fmt->Rshift)]; \ + g = SDL_expand_byte[fmt->Gloss][((Pixel&fmt->Gmask)>>fmt->Gshift)]; \ + b = SDL_expand_byte[fmt->Bloss][((Pixel&fmt->Bmask)>>fmt->Bshift)]; \ + a = SDL_expand_byte[fmt->Aloss][((Pixel&fmt->Amask)>>fmt->Ashift)]; \ } -#define RGBA_FROM_8888(Pixel, fmt, r, g, b, a) \ -{ \ - r = (Pixel&fmt->Rmask)>>fmt->Rshift; \ - g = (Pixel&fmt->Gmask)>>fmt->Gshift; \ - b = (Pixel&fmt->Bmask)>>fmt->Bshift; \ - a = (Pixel&fmt->Amask)>>fmt->Ashift; \ +#define RGBA_FROM_8888(Pixel, fmt, r, g, b, a) \ +{ \ + r = (Pixel&fmt->Rmask)>>fmt->Rshift; \ + g = (Pixel&fmt->Gmask)>>fmt->Gshift; \ + b = (Pixel&fmt->Bmask)>>fmt->Bshift; \ + a = (Pixel&fmt->Amask)>>fmt->Ashift; \ } -#define RGBA_FROM_RGBA8888(Pixel, r, g, b, a) \ -{ \ - r = (Pixel>>24); \ - g = ((Pixel>>16)&0xFF); \ - b = ((Pixel>>8)&0xFF); \ - a = (Pixel&0xFF); \ +#define RGBA_FROM_RGBA8888(Pixel, r, g, b, a) \ +{ \ + r = (Pixel>>24); \ + g = ((Pixel>>16)&0xFF); \ + b = ((Pixel>>8)&0xFF); \ + a = (Pixel&0xFF); \ } -#define RGBA_FROM_ARGB8888(Pixel, r, g, b, a) \ -{ \ - r = ((Pixel>>16)&0xFF); \ - g = ((Pixel>>8)&0xFF); \ - b = (Pixel&0xFF); \ - a = (Pixel>>24); \ +#define RGBA_FROM_ARGB8888(Pixel, r, g, b, a) \ +{ \ + r = ((Pixel>>16)&0xFF); \ + g = ((Pixel>>8)&0xFF); \ + b = (Pixel&0xFF); \ + a = (Pixel>>24); \ } -#define RGBA_FROM_ABGR8888(Pixel, r, g, b, a) \ -{ \ - r = (Pixel&0xFF); \ - g = ((Pixel>>8)&0xFF); \ - b = ((Pixel>>16)&0xFF); \ - a = (Pixel>>24); \ +#define RGBA_FROM_ABGR8888(Pixel, r, g, b, a) \ +{ \ + r = (Pixel&0xFF); \ + g = ((Pixel>>8)&0xFF); \ + b = ((Pixel>>16)&0xFF); \ + a = (Pixel>>24); \ } -#define RGBA_FROM_BGRA8888(Pixel, r, g, b, a) \ -{ \ - r = ((Pixel>>8)&0xFF); \ - g = ((Pixel>>16)&0xFF); \ - b = (Pixel>>24); \ - a = (Pixel&0xFF); \ +#define RGBA_FROM_BGRA8888(Pixel, r, g, b, a) \ +{ \ + r = ((Pixel>>8)&0xFF); \ + g = ((Pixel>>16)&0xFF); \ + b = (Pixel>>24); \ + a = (Pixel&0xFF); \ } -#define DISEMBLE_RGBA(buf, bpp, fmt, Pixel, r, g, b, a) \ -do { \ - switch (bpp) { \ - case 2: \ - Pixel = *((Uint16 *)(buf)); \ - RGBA_FROM_PIXEL(Pixel, fmt, r, g, b, a); \ - break; \ - \ - case 3: { \ +#define DISEMBLE_RGBA(buf, bpp, fmt, Pixel, r, g, b, a) \ +do { \ + switch (bpp) { \ + case 2: \ + Pixel = *((Uint16 *)(buf)); \ + RGBA_FROM_PIXEL(Pixel, fmt, r, g, b, a); \ + break; \ + \ + case 3: { \ Pixel = 0; \ - if (SDL_BYTEORDER == SDL_LIL_ENDIAN) { \ - r = *((buf)+fmt->Rshift/8); \ - g = *((buf)+fmt->Gshift/8); \ - b = *((buf)+fmt->Bshift/8); \ - } else { \ - r = *((buf)+2-fmt->Rshift/8); \ - g = *((buf)+2-fmt->Gshift/8); \ - b = *((buf)+2-fmt->Bshift/8); \ - } \ - a = 0xFF; \ - } \ - break; \ - \ - case 4: \ - Pixel = *((Uint32 *)(buf)); \ - RGBA_FROM_PIXEL(Pixel, fmt, r, g, b, a); \ - break; \ - \ - default: \ - /* stop gcc complaints */ \ - Pixel = 0; \ + if (SDL_BYTEORDER == SDL_LIL_ENDIAN) { \ + r = *((buf)+fmt->Rshift/8); \ + g = *((buf)+fmt->Gshift/8); \ + b = *((buf)+fmt->Bshift/8); \ + } else { \ + r = *((buf)+2-fmt->Rshift/8); \ + g = *((buf)+2-fmt->Gshift/8); \ + b = *((buf)+2-fmt->Bshift/8); \ + } \ + a = 0xFF; \ + } \ + break; \ + \ + case 4: \ + Pixel = *((Uint32 *)(buf)); \ + RGBA_FROM_PIXEL(Pixel, fmt, r, g, b, a); \ + break; \ + \ + default: \ + /* stop gcc complaints */ \ + Pixel = 0; \ r = g = b = a = 0; \ - break; \ - } \ + break; \ + } \ } while (0) /* FIXME: this isn't correct, especially for Alpha (maximum != 255) */ -#define PIXEL_FROM_RGBA(Pixel, fmt, r, g, b, a) \ -{ \ - Pixel = ((r>>fmt->Rloss)<Rshift)| \ - ((g>>fmt->Gloss)<Gshift)| \ - ((b>>fmt->Bloss)<Bshift)| \ - ((a>>fmt->Aloss)<Ashift); \ +#define PIXEL_FROM_RGBA(Pixel, fmt, r, g, b, a) \ +{ \ + Pixel = ((r>>fmt->Rloss)<Rshift)| \ + ((g>>fmt->Gloss)<Gshift)| \ + ((b>>fmt->Bloss)<Bshift)| \ + ((a>>fmt->Aloss)<Ashift); \ } -#define ASSEMBLE_RGBA(buf, bpp, fmt, r, g, b, a) \ -{ \ - switch (bpp) { \ - case 2: { \ - Uint16 Pixel; \ - \ - PIXEL_FROM_RGBA(Pixel, fmt, r, g, b, a); \ - *((Uint16 *)(buf)) = Pixel; \ - } \ - break; \ - \ - case 3: { \ - if (SDL_BYTEORDER == SDL_LIL_ENDIAN) { \ - *((buf)+fmt->Rshift/8) = r; \ - *((buf)+fmt->Gshift/8) = g; \ - *((buf)+fmt->Bshift/8) = b; \ - } else { \ - *((buf)+2-fmt->Rshift/8) = r; \ - *((buf)+2-fmt->Gshift/8) = g; \ - *((buf)+2-fmt->Bshift/8) = b; \ - } \ - } \ - break; \ - \ - case 4: { \ - Uint32 Pixel; \ - \ - PIXEL_FROM_RGBA(Pixel, fmt, r, g, b, a); \ - *((Uint32 *)(buf)) = Pixel; \ - } \ - break; \ - } \ +#define ASSEMBLE_RGBA(buf, bpp, fmt, r, g, b, a) \ +{ \ + switch (bpp) { \ + case 2: { \ + Uint16 Pixel; \ + \ + PIXEL_FROM_RGBA(Pixel, fmt, r, g, b, a); \ + *((Uint16 *)(buf)) = Pixel; \ + } \ + break; \ + \ + case 3: { \ + if (SDL_BYTEORDER == SDL_LIL_ENDIAN) { \ + *((buf)+fmt->Rshift/8) = r; \ + *((buf)+fmt->Gshift/8) = g; \ + *((buf)+fmt->Bshift/8) = b; \ + } else { \ + *((buf)+2-fmt->Rshift/8) = r; \ + *((buf)+2-fmt->Gshift/8) = g; \ + *((buf)+2-fmt->Bshift/8) = b; \ + } \ + } \ + break; \ + \ + case 4: { \ + Uint32 Pixel; \ + \ + PIXEL_FROM_RGBA(Pixel, fmt, r, g, b, a); \ + *((Uint32 *)(buf)) = Pixel; \ + } \ + break; \ + } \ } /* Blend the RGB values of two Pixels based on a source alpha value */ -#define ALPHA_BLEND(sR, sG, sB, A, dR, dG, dB) \ -do { \ - dR = ((((int)(sR-dR)*(int)A)/255)+dR); \ - dG = ((((int)(sG-dG)*(int)A)/255)+dG); \ - dB = ((((int)(sB-dB)*(int)A)/255)+dB); \ +#define ALPHA_BLEND(sR, sG, sB, A, dR, dG, dB) \ +do { \ + dR = ((((int)(sR-dR)*(int)A)/255)+dR); \ + dG = ((((int)(sG-dG)*(int)A)/255)+dG); \ + dB = ((((int)(sB-dB)*(int)A)/255)+dB); \ } while(0) @@ -413,75 +413,75 @@ do { \ #ifdef USE_DUFFS_LOOP /* 8-times unrolled loop */ -#define DUFFS_LOOP8(pixel_copy_increment, width) \ -{ int n = (width+7)/8; \ - switch (width & 7) { \ - case 0: do { pixel_copy_increment; \ - case 7: pixel_copy_increment; \ - case 6: pixel_copy_increment; \ - case 5: pixel_copy_increment; \ - case 4: pixel_copy_increment; \ - case 3: pixel_copy_increment; \ - case 2: pixel_copy_increment; \ - case 1: pixel_copy_increment; \ - } while ( --n > 0 ); \ - } \ +#define DUFFS_LOOP8(pixel_copy_increment, width) \ +{ int n = (width+7)/8; \ + switch (width & 7) { \ + case 0: do { pixel_copy_increment; \ + case 7: pixel_copy_increment; \ + case 6: pixel_copy_increment; \ + case 5: pixel_copy_increment; \ + case 4: pixel_copy_increment; \ + case 3: pixel_copy_increment; \ + case 2: pixel_copy_increment; \ + case 1: pixel_copy_increment; \ + } while ( --n > 0 ); \ + } \ } /* 4-times unrolled loop */ -#define DUFFS_LOOP4(pixel_copy_increment, width) \ -{ int n = (width+3)/4; \ - switch (width & 3) { \ - case 0: do { pixel_copy_increment; \ - case 3: pixel_copy_increment; \ - case 2: pixel_copy_increment; \ - case 1: pixel_copy_increment; \ - } while (--n > 0); \ - } \ +#define DUFFS_LOOP4(pixel_copy_increment, width) \ +{ int n = (width+3)/4; \ + switch (width & 3) { \ + case 0: do { pixel_copy_increment; \ + case 3: pixel_copy_increment; \ + case 2: pixel_copy_increment; \ + case 1: pixel_copy_increment; \ + } while (--n > 0); \ + } \ } /* Use the 8-times version of the loop by default */ -#define DUFFS_LOOP(pixel_copy_increment, width) \ - DUFFS_LOOP8(pixel_copy_increment, width) +#define DUFFS_LOOP(pixel_copy_increment, width) \ + DUFFS_LOOP8(pixel_copy_increment, width) /* Special version of Duff's device for even more optimization */ -#define DUFFS_LOOP_124(pixel_copy_increment1, \ - pixel_copy_increment2, \ - pixel_copy_increment4, width) \ -{ int n = width; \ - if (n & 1) { \ - pixel_copy_increment1; n -= 1; \ - } \ - if (n & 2) { \ - pixel_copy_increment2; n -= 2; \ - } \ - if (n) { \ - n = (n+7)/ 8; \ - switch (n & 4) { \ - case 0: do { pixel_copy_increment4; \ - case 4: pixel_copy_increment4; \ - } while (--n > 0); \ - } \ - } \ +#define DUFFS_LOOP_124(pixel_copy_increment1, \ + pixel_copy_increment2, \ + pixel_copy_increment4, width) \ +{ int n = width; \ + if (n & 1) { \ + pixel_copy_increment1; n -= 1; \ + } \ + if (n & 2) { \ + pixel_copy_increment2; n -= 2; \ + } \ + if (n) { \ + n = (n+7)/ 8; \ + switch (n & 4) { \ + case 0: do { pixel_copy_increment4; \ + case 4: pixel_copy_increment4; \ + } while (--n > 0); \ + } \ + } \ } #else /* Don't use Duff's device to unroll loops */ -#define DUFFS_LOOP(pixel_copy_increment, width) \ -{ int n; \ - for ( n=width; n > 0; --n ) { \ - pixel_copy_increment; \ - } \ +#define DUFFS_LOOP(pixel_copy_increment, width) \ +{ int n; \ + for ( n=width; n > 0; --n ) { \ + pixel_copy_increment; \ + } \ } -#define DUFFS_LOOP8(pixel_copy_increment, width) \ - DUFFS_LOOP(pixel_copy_increment, width) -#define DUFFS_LOOP4(pixel_copy_increment, width) \ - DUFFS_LOOP(pixel_copy_increment, width) -#define DUFFS_LOOP_124(pixel_copy_increment1, \ - pixel_copy_increment2, \ - pixel_copy_increment4, width) \ - DUFFS_LOOP(pixel_copy_increment1, width) +#define DUFFS_LOOP8(pixel_copy_increment, width) \ + DUFFS_LOOP(pixel_copy_increment, width) +#define DUFFS_LOOP4(pixel_copy_increment, width) \ + DUFFS_LOOP(pixel_copy_increment, width) +#define DUFFS_LOOP_124(pixel_copy_increment1, \ + pixel_copy_increment2, \ + pixel_copy_increment4, width) \ + DUFFS_LOOP(pixel_copy_increment1, width) #endif /* USE_DUFFS_LOOP */ diff --git a/src/video/SDL_bmp.c b/src/video/SDL_bmp.c index 5b861dd93..7ee65d85d 100644 --- a/src/video/SDL_bmp.c +++ b/src/video/SDL_bmp.c @@ -20,14 +20,14 @@ */ #include "SDL_config.h" -/* +/* Code to load and save surfaces in Windows BMP format. Why support BMP format? Well, it's a native format for Windows, and most image processing programs can read and write it. It would be nice to be able to have at least one image format that we can natively load and save, and since PNG is so complex that it would bloat the library, - BMP is a good alternative. + BMP is a good alternative. This code currently supports Win32 DIBs in uncompressed 8 and 24 bpp. */ @@ -40,10 +40,10 @@ /* Compression encodings for BMP files */ #ifndef BI_RGB -#define BI_RGB 0 -#define BI_RLE8 1 -#define BI_RLE4 2 -#define BI_BITFIELDS 3 +#define BI_RGB 0 +#define BI_RLE8 1 +#define BI_RLE4 2 +#define BI_BITFIELDS 3 #endif @@ -439,7 +439,7 @@ SDL_SaveBMP_RW(SDL_Surface * saveme, SDL_RWops * dst, int freedst) /* If the surface has a colorkey or alpha channel we'll save a 32-bit BMP with alpha channel, otherwise save a 24-bit BMP. */ if (save32bit) { - SDL_InitFormat(&format, + SDL_InitFormat(&format, #if SDL_BYTEORDER == SDL_LIL_ENDIAN SDL_PIXELFORMAT_ARGB8888 #else diff --git a/src/video/SDL_pixels.c b/src/video/SDL_pixels.c index 271a17d3c..c472c38b5 100644 --- a/src/video/SDL_pixels.c +++ b/src/video/SDL_pixels.c @@ -139,7 +139,7 @@ SDL_PixelFormatEnumToMasks(Uint32 format, int *bpp, Uint32 * Rmask, SDL_SetError("FOURCC pixel formats are not supported"); return SDL_FALSE; } - + /* Initialize the values here */ if (SDL_BYTESPERPIXEL(format) <= 2) { *bpp = SDL_BITSPERPIXEL(format); @@ -615,7 +615,7 @@ SDL_Palette * SDL_AllocPalette(int ncolors) { SDL_Palette *palette; - + /* Input validation */ if (ncolors < 1) { SDL_InvalidParamError("ncolors"); @@ -741,7 +741,7 @@ SDL_DitherColors(SDL_Color * colors, int bpp) } } -/* +/* * Calculate the pad-aligned scanline width of a surface */ int @@ -1055,7 +1055,7 @@ SDL_MapSurface(SDL_Surface * src, SDL_Surface * dst) while we're still pointing at it. A better method would be for the destination surface to keep - track of surfaces that are mapped to it and automatically + track of surfaces that are mapped to it and automatically invalidate them when it is freed, but this will do for now. */ ++map->dst->refcount; @@ -1090,7 +1090,7 @@ void SDL_CalculateGammaRamp(float gamma, Uint16 * ramp) { int i; - + /* Input validation */ if (gamma < 0.0f ) { SDL_InvalidParamError("gamma"); diff --git a/src/video/SDL_rect.c b/src/video/SDL_rect.c index 045d3f1cf..8dcb5b651 100644 --- a/src/video/SDL_rect.c +++ b/src/video/SDL_rect.c @@ -85,7 +85,7 @@ SDL_IntersectRect(const SDL_Rect * A, const SDL_Rect * B, SDL_Rect * result) SDL_InvalidParamError("B"); return SDL_FALSE; } - + if (!result) { SDL_InvalidParamError("result"); return SDL_FALSE; @@ -97,7 +97,7 @@ SDL_IntersectRect(const SDL_Rect * A, const SDL_Rect * B, SDL_Rect * result) result->h = 0; return SDL_FALSE; } - + /* Horizontal intersection */ Amin = A->x; Amax = Amin + A->w; @@ -139,7 +139,7 @@ SDL_UnionRect(const SDL_Rect * A, const SDL_Rect * B, SDL_Rect * result) SDL_InvalidParamError("B"); return; } - + if (!result) { SDL_InvalidParamError("result"); return; @@ -155,14 +155,14 @@ SDL_UnionRect(const SDL_Rect * A, const SDL_Rect * B, SDL_Rect * result) *result = *B; return; } - } else { + } else { if (SDL_RectEmpty(B)) { /* A not empty, B empty */ *result = *A; return; - } + } } - + /* Horizontal union */ Amin = A->x; Amax = Amin + A->w; @@ -219,7 +219,7 @@ SDL_EnclosePoints(const SDL_Point * points, int count, const SDL_Rect * clip, if (SDL_RectEmpty(clip)) { return SDL_FALSE; } - + for (i = 0; i < count; ++i) { x = points[i].x; y = points[i].y; @@ -259,7 +259,7 @@ SDL_EnclosePoints(const SDL_Point * points, int count, const SDL_Rect * clip, if (result == NULL) { return SDL_TRUE; } - + /* No clipping, always add the first point */ minx = maxx = points[0].x; miny = maxy = points[0].y; @@ -330,22 +330,22 @@ SDL_IntersectRectAndLine(const SDL_Rect * rect, int *X1, int *Y1, int *X2, SDL_InvalidParamError("rect"); return SDL_FALSE; } - + if (!X1) { SDL_InvalidParamError("X1"); return SDL_FALSE; } - + if (!Y1) { SDL_InvalidParamError("Y1"); return SDL_FALSE; } - + if (!X2) { SDL_InvalidParamError("X2"); return SDL_FALSE; } - + if (!Y2) { SDL_InvalidParamError("Y2"); return SDL_FALSE; @@ -355,7 +355,7 @@ SDL_IntersectRectAndLine(const SDL_Rect * rect, int *X1, int *Y1, int *X2, if (SDL_RectEmpty(rect)) { return SDL_FALSE; } - + x1 = *X1; y1 = *Y1; x2 = *X2; diff --git a/src/video/SDL_shape.c b/src/video/SDL_shape.c index c3094802d..e9876e410 100644 --- a/src/video/SDL_shape.c +++ b/src/video/SDL_shape.c @@ -30,7 +30,8 @@ #include "SDL_shape_internals.h" SDL_Window* -SDL_CreateShapedWindow(const char *title,unsigned int x,unsigned int y,unsigned int w,unsigned int h,Uint32 flags) { +SDL_CreateShapedWindow(const char *title,unsigned int x,unsigned int y,unsigned int w,unsigned int h,Uint32 flags) +{ SDL_Window *result = NULL; result = SDL_CreateWindow(title,-1000,-1000,w,h,(flags | SDL_WINDOW_BORDERLESS) & (~SDL_WINDOW_FULLSCREEN) & (~SDL_WINDOW_RESIZABLE) /*& (~SDL_WINDOW_SHOWN)*/); if(result != NULL) { @@ -53,7 +54,8 @@ SDL_CreateShapedWindow(const char *title,unsigned int x,unsigned int y,unsigned } SDL_bool -SDL_IsShapedWindow(const SDL_Window *window) { +SDL_IsShapedWindow(const SDL_Window *window) +{ if(window == NULL) return SDL_FALSE; else @@ -62,7 +64,8 @@ SDL_IsShapedWindow(const SDL_Window *window) { /* REQUIRES that bitmap point to a w-by-h bitmap with ppb pixels-per-byte. */ void -SDL_CalculateShapeBitmap(SDL_WindowShapeMode mode,SDL_Surface *shape,Uint8* bitmap,Uint8 ppb) { +SDL_CalculateShapeBitmap(SDL_WindowShapeMode mode,SDL_Surface *shape,Uint8* bitmap,Uint8 ppb) +{ int x = 0; int y = 0; Uint8 r = 0,g = 0,b = 0,alpha = 0; @@ -163,34 +166,35 @@ RecursivelyCalculateShapeTree(SDL_WindowShapeMode mode,SDL_Surface* mask,SDL_Rec last_opaque = pixel_opaque; if(last_opaque != pixel_opaque) { result->kind = QuadShape; - //These will stay the same. + /* These will stay the same. */ next.w = dimensions.w / 2; next.h = dimensions.h / 2; - //These will change from recursion to recursion. + /* These will change from recursion to recursion. */ next.x = dimensions.x; next.y = dimensions.y; result->data.children.upleft = (struct SDL_ShapeTree *)RecursivelyCalculateShapeTree(mode,mask,next); next.x += next.w; - //Unneeded: next.y = dimensions.y; + /* Unneeded: next.y = dimensions.y; */ result->data.children.upright = (struct SDL_ShapeTree *)RecursivelyCalculateShapeTree(mode,mask,next); next.x = dimensions.x; next.y += next.h; result->data.children.downleft = (struct SDL_ShapeTree *)RecursivelyCalculateShapeTree(mode,mask,next); next.x += next.w; - //Unneeded: next.y = dimensions.y + dimensions.h /2; + /* Unneeded: next.y = dimensions.y + dimensions.h /2; */ result->data.children.downright = (struct SDL_ShapeTree *)RecursivelyCalculateShapeTree(mode,mask,next); return result; } } } - //If we never recursed, all the pixels in this quadrant have the same "value". + /* If we never recursed, all the pixels in this quadrant have the same "value". */ result->kind = (last_opaque == SDL_TRUE ? OpaqueShape : TransparentShape); result->data.shape = dimensions; return result; } SDL_ShapeTree* -SDL_CalculateShapeTree(SDL_WindowShapeMode mode,SDL_Surface* shape) { +SDL_CalculateShapeTree(SDL_WindowShapeMode mode,SDL_Surface* shape) +{ SDL_Rect dimensions = {0,0,shape->w,shape->h}; SDL_ShapeTree* result = NULL; if(SDL_MUSTLOCK(shape)) @@ -202,7 +206,8 @@ SDL_CalculateShapeTree(SDL_WindowShapeMode mode,SDL_Surface* shape) { } void -SDL_TraverseShapeTree(SDL_ShapeTree *tree,SDL_TraversalFunction function,void* closure) { +SDL_TraverseShapeTree(SDL_ShapeTree *tree,SDL_TraversalFunction function,void* closure) +{ SDL_assert(tree != NULL); if(tree->kind == QuadShape) { SDL_TraverseShapeTree((SDL_ShapeTree *)tree->data.children.upleft,function,closure); @@ -215,7 +220,8 @@ SDL_TraverseShapeTree(SDL_ShapeTree *tree,SDL_TraversalFunction function,void* c } void -SDL_FreeShapeTree(SDL_ShapeTree** shape_tree) { +SDL_FreeShapeTree(SDL_ShapeTree** shape_tree) +{ if((*shape_tree)->kind == QuadShape) { SDL_FreeShapeTree((SDL_ShapeTree **)&(*shape_tree)->data.children.upleft); SDL_FreeShapeTree((SDL_ShapeTree **)&(*shape_tree)->data.children.upright); @@ -227,15 +233,16 @@ SDL_FreeShapeTree(SDL_ShapeTree** shape_tree) { } int -SDL_SetWindowShape(SDL_Window *window,SDL_Surface *shape,SDL_WindowShapeMode *shape_mode) { +SDL_SetWindowShape(SDL_Window *window,SDL_Surface *shape,SDL_WindowShapeMode *shape_mode) +{ int result; if(window == NULL || !SDL_IsShapedWindow(window)) - //The window given was not a shapeable window. + /* The window given was not a shapeable window. */ return SDL_NONSHAPEABLE_WINDOW; if(shape == NULL) - //Invalid shape argument. + /* Invalid shape argument. */ return SDL_INVALID_SHAPE_ARGUMENT; - + if(shape_mode != NULL) window->shaper->mode = *shape_mode; result = SDL_GetVideoDevice()->shape_driver.SetWindowShape(window->shaper,shape,shape_mode); @@ -249,21 +256,23 @@ SDL_SetWindowShape(SDL_Window *window,SDL_Surface *shape,SDL_WindowShapeMode *sh } static SDL_bool -SDL_WindowHasAShape(SDL_Window *window) { +SDL_WindowHasAShape(SDL_Window *window) +{ if (window == NULL || !SDL_IsShapedWindow(window)) return SDL_FALSE; return window->shaper->hasshape; } int -SDL_GetShapedWindowMode(SDL_Window *window,SDL_WindowShapeMode *shape_mode) { +SDL_GetShapedWindowMode(SDL_Window *window,SDL_WindowShapeMode *shape_mode) +{ if(window != NULL && SDL_IsShapedWindow(window)) { if(shape_mode == NULL) { if(SDL_WindowHasAShape(window)) - //The window given has a shape. + /* The window given has a shape. */ return 0; else - //The window given is shapeable but lacks a shape. + /* The window given is shapeable but lacks a shape. */ return SDL_WINDOW_LACKS_SHAPE; } else { @@ -272,6 +281,6 @@ SDL_GetShapedWindowMode(SDL_Window *window,SDL_WindowShapeMode *shape_mode) { } } else - //The window given is not a valid shapeable window. + /* The window given is not a valid shapeable window. */ return SDL_NONSHAPEABLE_WINDOW; } diff --git a/src/video/SDL_surface.c b/src/video/SDL_surface.c index 94ce6eacc..d1c57119c 100644 --- a/src/video/SDL_surface.c +++ b/src/video/SDL_surface.c @@ -473,13 +473,13 @@ SDL_GetClipRect(SDL_Surface * surface, SDL_Rect * rect) } } -/* +/* * Set up a blit between two surfaces -- split into three parts: - * The upper part, SDL_UpperBlit(), performs clipping and rectangle + * The upper part, SDL_UpperBlit(), performs clipping and rectangle * verification. The lower part is a pointer to a low level * accelerated blitting function. * - * These parts are separated out and each used internally by this + * These parts are separated out and each used internally by this * library in the optimimum places. They are exported so that if * you know exactly what you are doing, you can optimize your code * by calling the one(s) you need. @@ -738,7 +738,7 @@ SDL_LowerBlitScaled(SDL_Surface * src, SDL_Rect * srcrect, src->map->info.flags |= SDL_COPY_NEAREST; if ( !(src->map->info.flags & complex_copy_flags) && - src->format->format == dst->format->format && + src->format->format == dst->format->format && !SDL_ISPIXELFORMAT_INDEXED(src->format->format) ) { return SDL_SoftStretch( src, &final_src, dst, &final_dst ); } else { @@ -785,7 +785,7 @@ SDL_UnlockSurface(SDL_Surface * surface) } } -/* +/* * Convert a surface into the specified pixel format. */ SDL_Surface * @@ -854,7 +854,7 @@ SDL_ConvertSurface(SDL_Surface * surface, SDL_PixelFormat * format, SDL_bool set_colorkey_by_color = SDL_FALSE; if (surface->format->palette) { - if (format->palette && + if (format->palette && surface->format->palette->ncolors <= format->palette->ncolors && (SDL_memcmp(surface->format->palette->colors, format->palette->colors, surface->format->palette->ncolors * sizeof(SDL_Color)) == 0)) { @@ -917,7 +917,7 @@ SDL_ConvertSurfaceFormat(SDL_Surface * surface, Uint32 pixel_format, */ static __inline__ SDL_bool SDL_CreateSurfaceOnStack(int width, int height, Uint32 pixel_format, - void * pixels, int pitch, SDL_Surface * surface, + void * pixels, int pitch, SDL_Surface * surface, SDL_PixelFormat * format, SDL_BlitMap * blitmap) { if (SDL_ISPIXELFORMAT_INDEXED(pixel_format)) { diff --git a/src/video/SDL_sysvideo.h b/src/video/SDL_sysvideo.h index 63f088fff..45ca74507 100644 --- a/src/video/SDL_sysvideo.h +++ b/src/video/SDL_sysvideo.h @@ -35,19 +35,19 @@ typedef struct SDL_VideoDevice SDL_VideoDevice; /* Define the SDL window-shaper structure */ struct SDL_WindowShaper -{ +{ /* The window associated with the shaper */ SDL_Window *window; - + /* The user's specified coordinates for the window, for once we give it a shape. */ Uint32 userx,usery; - + /* The parameters for shape calculation. */ SDL_WindowShapeMode mode; - + /* Has this window been assigned a shape? */ SDL_bool hasshape; - + void *driverdata; }; @@ -82,7 +82,7 @@ struct SDL_Window SDL_Rect windowed; SDL_DisplayMode fullscreen_mode; - + float brightness; Uint16 *gamma; Uint16 *saved_gamma; /* (just offset into gamma) */ @@ -128,7 +128,7 @@ struct SDL_VideoDisplay struct SDL_SysWMinfo; /* Define the SDL video driver structure */ -#define _THIS SDL_VideoDevice *_this +#define _THIS SDL_VideoDevice *_this struct SDL_VideoDevice { diff --git a/src/video/SDL_video.c b/src/video/SDL_video.c index 034486e63..57cc934df 100644 --- a/src/video/SDL_video.c +++ b/src/video/SDL_video.c @@ -416,7 +416,7 @@ SDL_VideoInit(const char *driver_name) if (_this != NULL) { SDL_VideoQuit(); } - + #if !SDL_TIMERS_DISABLED SDL_InitTicks(); #endif @@ -1013,12 +1013,12 @@ int SDL_GetWindowDisplayMode(SDL_Window * window, SDL_DisplayMode * mode) { SDL_DisplayMode fullscreen_mode; - SDL_VideoDisplay *display; + SDL_VideoDisplay *display; if (!mode) { return SDL_InvalidParamError("mode"); } - + CHECK_WINDOW_MAGIC(window, -1); fullscreen_mode = window->fullscreen_mode; @@ -1028,15 +1028,15 @@ SDL_GetWindowDisplayMode(SDL_Window * window, SDL_DisplayMode * mode) if (!fullscreen_mode.h) { fullscreen_mode.h = window->h; } - - display = SDL_GetDisplayForWindow(window); - /* if in desktop size mode, just return the size of the desktop */ - if ( ( window->flags & SDL_WINDOW_FULLSCREEN_DESKTOP ) == SDL_WINDOW_FULLSCREEN_DESKTOP ) - { - fullscreen_mode = display->desktop_mode; - } - else if (!SDL_GetClosestDisplayModeForDisplay(SDL_GetDisplayForWindow(window), + display = SDL_GetDisplayForWindow(window); + + /* if in desktop size mode, just return the size of the desktop */ + if ( ( window->flags & SDL_WINDOW_FULLSCREEN_DESKTOP ) == SDL_WINDOW_FULLSCREEN_DESKTOP ) + { + fullscreen_mode = display->desktop_mode; + } + else if (!SDL_GetClosestDisplayModeForDisplay(SDL_GetDisplayForWindow(window), &fullscreen_mode, &fullscreen_mode)) { return SDL_SetError("Couldn't find display mode match"); @@ -1110,13 +1110,13 @@ SDL_UpdateFullscreenMode(SDL_Window * window, SDL_bool fullscreen) resized = SDL_FALSE; } - /* only do the mode change if we want exclusive fullscreen */ - if ( ( window->flags & SDL_WINDOW_FULLSCREEN_DESKTOP ) != SDL_WINDOW_FULLSCREEN_DESKTOP ) - SDL_SetDisplayModeForDisplay(display, &fullscreen_mode); - else - SDL_SetDisplayModeForDisplay(display, NULL); + /* only do the mode change if we want exclusive fullscreen */ + if ( ( window->flags & SDL_WINDOW_FULLSCREEN_DESKTOP ) != SDL_WINDOW_FULLSCREEN_DESKTOP ) + SDL_SetDisplayModeForDisplay(display, &fullscreen_mode); + else + SDL_SetDisplayModeForDisplay(display, NULL); + - if (_this->SetWindowFullscreen) { _this->SetWindowFullscreen(_this, other, display, SDL_TRUE); } @@ -1251,7 +1251,7 @@ SDL_CreateWindow(const char *title, int x, int y, int w, int h, Uint32 flags) SDL_SetWindowTitle(window, title); } SDL_FinishWindowCreation(window, flags); - + /* If the window was created fullscreen, make sure the mode code matches */ SDL_UpdateFullscreenMode(window, FULLSCREEN_VISIBLE(window)); @@ -1430,7 +1430,7 @@ SDL_SetWindowData(SDL_Window * window, const char *name, void *userdata) SDL_WindowUserData *prev, *data; CHECK_WINDOW_MAGIC(window, NULL); - + /* Input validation */ if (name == NULL || SDL_strlen(name) == 0) { SDL_InvalidParamError("name"); @@ -1602,7 +1602,7 @@ SDL_GetWindowSize(SDL_Window * window, int *w, int *h) } if (h) { *h = window->h; - } + } } void @@ -1617,7 +1617,7 @@ SDL_SetWindowMinimumSize(SDL_Window * window, int min_w, int min_h) SDL_InvalidParamError("min_h"); return; } - + if (!(window->flags & SDL_WINDOW_FULLSCREEN)) { window->min_w = min_w; window->min_h = min_h; @@ -1653,7 +1653,7 @@ SDL_SetWindowMaximumSize(SDL_Window * window, int max_w, int max_h) SDL_InvalidParamError("max_h"); return; } - + if (!(window->flags & SDL_WINDOW_FULLSCREEN)) { window->max_w = max_w; window->max_h = max_h; @@ -1772,14 +1772,14 @@ SDL_SetWindowFullscreen(SDL_Window * window, Uint32 flags) { CHECK_WINDOW_MAGIC(window, -1); - flags &= FULLSCREEN_MASK; - + flags &= FULLSCREEN_MASK; + if ( flags == (window->flags & FULLSCREEN_MASK) ) { return 0; } - - /* clear the previous flags and OR in the new ones */ - window->flags &= ~FULLSCREEN_MASK; + + /* clear the previous flags and OR in the new ones */ + window->flags &= ~FULLSCREEN_MASK; window->flags |= flags; SDL_UpdateFullscreenMode(window, FULLSCREEN_VISIBLE(window)); @@ -2065,15 +2065,15 @@ SDL_OnWindowFocusGained(SDL_Window * window) static SDL_bool ShouldMinimizeOnFocusLoss() { - const char *hint = SDL_GetHint(SDL_HINT_VIDEO_MINIMIZE_ON_FOCUS_LOSS); - if (hint) { - if (*hint == '0') { - return SDL_FALSE; - } else { - return SDL_TRUE; - } - } - return SDL_TRUE; + const char *hint = SDL_GetHint(SDL_HINT_VIDEO_MINIMIZE_ON_FOCUS_LOSS); + if (hint) { + if (*hint == '0') { + return SDL_FALSE; + } else { + return SDL_TRUE; + } + } + return SDL_TRUE; } void @@ -2086,8 +2086,8 @@ SDL_OnWindowFocusLost(SDL_Window * window) SDL_UpdateWindowGrab(window); /* If we're fullscreen on a single-head system and lose focus, minimize */ - if ((window->flags & SDL_WINDOW_FULLSCREEN) && ShouldMinimizeOnFocusLoss() ) { - SDL_MinimizeWindow(window); + if ((window->flags & SDL_WINDOW_FULLSCREEN) && ShouldMinimizeOnFocusLoss() ) { + SDL_MinimizeWindow(window); } } @@ -2472,27 +2472,27 @@ SDL_GL_SetAttribute(SDL_GLattr attr, int value) break; case SDL_GL_CONTEXT_FLAGS: if( value & ~(SDL_GL_CONTEXT_DEBUG_FLAG | - SDL_GL_CONTEXT_FORWARD_COMPATIBLE_FLAG | - SDL_GL_CONTEXT_ROBUST_ACCESS_FLAG | - SDL_GL_CONTEXT_RESET_ISOLATION_FLAG) ) { - retval = SDL_SetError("Unknown OpenGL context flag %d", value); - break; - } + SDL_GL_CONTEXT_FORWARD_COMPATIBLE_FLAG | + SDL_GL_CONTEXT_ROBUST_ACCESS_FLAG | + SDL_GL_CONTEXT_RESET_ISOLATION_FLAG) ) { + retval = SDL_SetError("Unknown OpenGL context flag %d", value); + break; + } _this->gl_config.flags = value; break; case SDL_GL_CONTEXT_PROFILE_MASK: if( value != 0 && - value != SDL_GL_CONTEXT_PROFILE_CORE && - value != SDL_GL_CONTEXT_PROFILE_COMPATIBILITY && - value != SDL_GL_CONTEXT_PROFILE_ES ) { - retval = SDL_SetError("Unknown OpenGL context profile %d", value); - break; - } + value != SDL_GL_CONTEXT_PROFILE_CORE && + value != SDL_GL_CONTEXT_PROFILE_COMPATIBILITY && + value != SDL_GL_CONTEXT_PROFILE_ES ) { + retval = SDL_SetError("Unknown OpenGL context profile %d", value); + break; + } _this->gl_config.profile_mask = value; break; case SDL_GL_SHARE_WITH_CURRENT_CONTEXT: _this->gl_config.share_with_current_context = value; - break; + break; default: retval = SDL_SetError("Unknown OpenGL attribute"); break; @@ -2779,7 +2779,7 @@ SDL_GL_DeleteContext(SDL_GLContext context) _this->GL_DeleteContext(_this, context); } -#if 0 // FIXME +#if 0 /* FIXME */ /* * Utility function used by SDL_WM_SetIcon(); flags & 1 for color key, flags * & 2 for alpha channel. @@ -2790,7 +2790,7 @@ CreateMaskFromColorKeyOrAlpha(SDL_Surface * icon, Uint8 * mask, int flags) int x, y; Uint32 colorkey; #define SET_MASKBIT(icon, x, y, mask) \ - mask[(y*((icon->w+7)/8))+(x/8)] &= ~(0x01<<(7-(x%8))) + mask[(y*((icon->w+7)/8))+(x/8)] &= ~(0x01<<(7-(x%8))) colorkey = icon->format->colorkey; switch (icon->format->BytesPerPixel) { @@ -2985,18 +2985,18 @@ int SDL_ShowMessageBox(const SDL_MessageBoxData *messageboxdata, int *buttonid) { int dummybutton; - int retval = -1; - SDL_bool relative_mode = SDL_GetRelativeMouseMode(); - int show_cursor_prev = SDL_ShowCursor( 1 ); + int retval = -1; + SDL_bool relative_mode = SDL_GetRelativeMouseMode(); + int show_cursor_prev = SDL_ShowCursor( 1 ); - SDL_SetRelativeMouseMode( SDL_FALSE ); + SDL_SetRelativeMouseMode( SDL_FALSE ); if (!buttonid) { buttonid = &dummybutton; } if (_this && _this->ShowMessageBox) { if (_this->ShowMessageBox(_this, messageboxdata, buttonid) == 0) { - retval = 0; + retval = 0; } } @@ -3022,12 +3022,12 @@ SDL_ShowMessageBox(const SDL_MessageBoxData *messageboxdata, int *buttonid) } #endif - SDL_ShowCursor( show_cursor_prev ); - SDL_SetRelativeMouseMode( relative_mode ); + SDL_ShowCursor( show_cursor_prev ); + SDL_SetRelativeMouseMode( relative_mode ); - if(retval == -1) { - SDL_SetError("No message system available"); - } + if(retval == -1) { + SDL_SetError("No message system available"); + } return retval; } @@ -3056,15 +3056,15 @@ SDL_ShowSimpleMessageBox(Uint32 flags, const char *title, const char *message, S SDL_bool SDL_ShouldAllowTopmost(void) { - const char *hint = SDL_GetHint(SDL_HINT_ALLOW_TOPMOST); - if (hint) { - if (*hint == '0') { - return SDL_FALSE; - } else { - return SDL_TRUE; - } - } - return SDL_TRUE; + const char *hint = SDL_GetHint(SDL_HINT_ALLOW_TOPMOST); + if (hint) { + if (*hint == '0') { + return SDL_FALSE; + } else { + return SDL_TRUE; + } + } + return SDL_TRUE; } /* vi: set ts=4 sw=4 expandtab: */ diff --git a/src/video/android/SDL_androidkeyboard.c b/src/video/android/SDL_androidkeyboard.c index 88b904acf..512007a2f 100644 --- a/src/video/android/SDL_androidkeyboard.c +++ b/src/video/android/SDL_androidkeyboard.c @@ -322,7 +322,7 @@ Android_SetTextInputRect(_THIS, SDL_Rect *rect) SDL_InvalidParamError("rect"); return; } - + videodata->textRect = *rect; } diff --git a/src/video/android/SDL_androidtouch.c b/src/video/android/SDL_androidtouch.c index c8d5ae6d5..1b42b5f77 100644 --- a/src/video/android/SDL_androidtouch.c +++ b/src/video/android/SDL_androidtouch.c @@ -36,7 +36,7 @@ #define ACTION_MOVE 2 #define ACTION_CANCEL 3 #define ACTION_OUTSIDE 4 -// The following two are deprecated but it seems they are still emitted (instead the corresponding ACTION_UP/DOWN) as of Android 3.2 +/* The following two are deprecated but it seems they are still emitted (instead the corresponding ACTION_UP/DOWN) as of Android 3.2 */ #define ACTION_POINTER_1_DOWN 5 #define ACTION_POINTER_1_UP 6 @@ -52,7 +52,7 @@ static void Android_GetWindowCoordinates(float x, float y, *window_y = (int)(y * window_h); } -void Android_OnTouch(int touch_device_id_in, int pointer_finger_id_in, int action, float x, float y, float p) +void Android_OnTouch(int touch_device_id_in, int pointer_finger_id_in, int action, float x, float y, float p) { SDL_TouchID touchDeviceId = 0; SDL_FingerID fingerId = 0; @@ -104,7 +104,7 @@ void Android_OnTouch(int touch_device_id_in, int pointer_finger_id_in, int actio break; default: break; - } + } } #endif /* SDL_VIDEO_DRIVER_ANDROID */ diff --git a/src/video/android/SDL_androidvideo.c b/src/video/android/SDL_androidvideo.c index ebf9535f5..4b4a85196 100644 --- a/src/video/android/SDL_androidvideo.c +++ b/src/video/android/SDL_androidvideo.c @@ -48,7 +48,6 @@ static void Android_VideoQuit(_THIS); extern int Android_GL_LoadLibrary(_THIS, const char *path); extern void *Android_GL_GetProcAddress(_THIS, const char *proc); extern void Android_GL_UnloadLibrary(_THIS); -//extern int *Android_GL_GetVisual(_THIS, Display * display, int screen); extern SDL_GLContext Android_GL_CreateContext(_THIS, SDL_Window * window); extern int Android_GL_MakeCurrent(_THIS, SDL_Window * window, SDL_GLContext context); @@ -60,8 +59,7 @@ extern void Android_GL_DeleteContext(_THIS, SDL_GLContext context); /* Android driver bootstrap functions */ -// These are filled in with real values in Android_SetScreenResolution on -// init (before SDL_main()) +/* These are filled in with real values in Android_SetScreenResolution on init (before SDL_main()) */ int Android_ScreenWidth = 0; int Android_ScreenHeight = 0; Uint32 Android_ScreenFormat = SDL_PIXELFORMAT_UNKNOWN; @@ -182,7 +180,7 @@ void Android_SetScreenResolution(int width, int height, Uint32 format) { Android_ScreenWidth = width; - Android_ScreenHeight = height; + Android_ScreenHeight = height; Android_ScreenFormat = format; if (Android_Window) { diff --git a/src/video/android/SDL_androidwindow.c b/src/video/android/SDL_androidwindow.c index 25a0e9f6f..b3c6cd9a4 100644 --- a/src/video/android/SDL_androidwindow.c +++ b/src/video/android/SDL_androidwindow.c @@ -49,7 +49,7 @@ Android_CreateWindow(_THIS, SDL_Window * window) window->flags |= SDL_WINDOW_FULLSCREEN; /* window is always fullscreen */ window->flags &= ~SDL_WINDOW_HIDDEN; window->flags |= SDL_WINDOW_SHOWN; /* only one window on Android */ - window->flags |= SDL_WINDOW_INPUT_FOCUS; /* always has input focus */ + window->flags |= SDL_WINDOW_INPUT_FOCUS; /* always has input focus */ /* One window, it always has focus */ SDL_SetMouseFocus(window); diff --git a/src/video/bwindow/SDL_BWin.h b/src/video/bwindow/SDL_BWin.h index 9d7a273b0..fb576da68 100644 --- a/src/video/bwindow/SDL_BWin.h +++ b/src/video/bwindow/SDL_BWin.h @@ -47,23 +47,23 @@ extern "C" { enum WinCommands { - BWIN_MOVE_WINDOW, - BWIN_RESIZE_WINDOW, - BWIN_SHOW_WINDOW, - BWIN_HIDE_WINDOW, - BWIN_MAXIMIZE_WINDOW, - BWIN_MINIMIZE_WINDOW, - BWIN_RESTORE_WINDOW, - BWIN_SET_TITLE, - BWIN_SET_BORDERED, - BWIN_FULLSCREEN + BWIN_MOVE_WINDOW, + BWIN_RESIZE_WINDOW, + BWIN_SHOW_WINDOW, + BWIN_HIDE_WINDOW, + BWIN_MAXIMIZE_WINDOW, + BWIN_MINIMIZE_WINDOW, + BWIN_RESTORE_WINDOW, + BWIN_SET_TITLE, + BWIN_SET_BORDERED, + BWIN_FULLSCREEN }; class SDL_BWin:public BDirectWindow { public: - /* Constructor/Destructor */ + /* Constructor/Destructor */ SDL_BWin(BRect bounds, window_look look, uint32 flags) : BDirectWindow(bounds, "Untitled", look, B_NORMAL_WINDOW_FEEL, flags) { @@ -85,7 +85,7 @@ class SDL_BWin:public BDirectWindow _bitmap = NULL; #ifdef DRAWTHREAD _draw_thread_id = spawn_thread(BE_DrawThread, "drawing_thread", - B_NORMAL_PRIORITY, (void*) this); + B_NORMAL_PRIORITY, (void*) this); resume_thread(_draw_thread_id); #endif } @@ -95,22 +95,22 @@ class SDL_BWin:public BDirectWindow Lock(); _connection_disabled = true; int32 result; - + #if SDL_VIDEO_OPENGL if (_SDL_GLView) { _SDL_GLView->UnlockGL(); - RemoveChild(_SDL_GLView); /* Why was this outside the if - statement before? */ + RemoveChild(_SDL_GLView); /* Why was this outside the if + statement before? */ } - -#endif + +#endif Unlock(); #if SDL_VIDEO_OPENGL if (_SDL_GLView) { delete _SDL_GLView; } #endif - + /* Clean up framebuffer stuff */ _buffer_locker->Lock(); #ifdef DRAWTHREAD @@ -119,7 +119,7 @@ class SDL_BWin:public BDirectWindow free(_clips); delete _buffer_locker; } - + /* * * * * OpenGL functionality * * * * */ #if SDL_VIDEO_OPENGL @@ -133,186 +133,186 @@ class SDL_BWin:public BDirectWindow } AddChild(_SDL_GLView); _SDL_GLView->EnableDirectMode(true); - _SDL_GLView->LockGL(); /* "New" GLViews are created */ + _SDL_GLView->LockGL(); /* "New" GLViews are created */ Unlock(); return (_SDL_GLView); } - + virtual void RemoveGLView() { - Lock(); - if(_SDL_GLView) { - _SDL_GLView->UnlockGL(); - RemoveChild(_SDL_GLView); - } - Unlock(); + Lock(); + if(_SDL_GLView) { + _SDL_GLView->UnlockGL(); + RemoveChild(_SDL_GLView); + } + Unlock(); } - + virtual void SwapBuffers(void) { - _SDL_GLView->UnlockGL(); - _SDL_GLView->LockGL(); - _SDL_GLView->SwapBuffers(); - } + _SDL_GLView->UnlockGL(); + _SDL_GLView->LockGL(); + _SDL_GLView->SwapBuffers(); + } #endif - + /* * * * * Framebuffering* * * * */ virtual void DirectConnected(direct_buffer_info *info) { - if(!_connected && _connection_disabled) { - return; - } + if(!_connected && _connection_disabled) { + return; + } - /* Determine if the pixel buffer is usable after this update */ - _trash_window_buffer = _trash_window_buffer - || ((info->buffer_state & B_BUFFER_RESIZED) - || (info->buffer_state & B_BUFFER_RESET) - || (info->driver_state == B_MODE_CHANGED)); - LockBuffer(); + /* Determine if the pixel buffer is usable after this update */ + _trash_window_buffer = _trash_window_buffer + || ((info->buffer_state & B_BUFFER_RESIZED) + || (info->buffer_state & B_BUFFER_RESET) + || (info->driver_state == B_MODE_CHANGED)); + LockBuffer(); - switch(info->buffer_state & B_DIRECT_MODE_MASK) { - case B_DIRECT_START: - _connected = true; + switch(info->buffer_state & B_DIRECT_MODE_MASK) { + case B_DIRECT_START: + _connected = true; - case B_DIRECT_MODIFY: - if(_clips) { - free(_clips); - _clips = NULL; - } - - _num_clips = info->clip_list_count; - _clips = (clipping_rect *)malloc(_num_clips*sizeof(clipping_rect)); - if(_clips) { - memcpy(_clips, info->clip_list, - _num_clips*sizeof(clipping_rect)); - - _bits = (uint8*) info->bits; - _row_bytes = info->bytes_per_row; - _bounds = info->window_bounds; - _bytes_per_px = info->bits_per_pixel / 8; - _buffer_dirty = true; - } - break; + case B_DIRECT_MODIFY: + if(_clips) { + free(_clips); + _clips = NULL; + } - case B_DIRECT_STOP: - _connected = false; - break; - } + _num_clips = info->clip_list_count; + _clips = (clipping_rect *)malloc(_num_clips*sizeof(clipping_rect)); + if(_clips) { + memcpy(_clips, info->clip_list, + _num_clips*sizeof(clipping_rect)); + + _bits = (uint8*) info->bits; + _row_bytes = info->bytes_per_row; + _bounds = info->window_bounds; + _bytes_per_px = info->bits_per_pixel / 8; + _buffer_dirty = true; + } + break; + + case B_DIRECT_STOP: + _connected = false; + break; + } #if SDL_VIDEO_OPENGL - if(_SDL_GLView) { - _SDL_GLView->DirectConnected(info); - } + if(_SDL_GLView) { + _SDL_GLView->DirectConnected(info); + } #endif - - - /* Call the base object directconnected */ - BDirectWindow::DirectConnected(info); - - UnlockBuffer(); - + + + /* Call the base object directconnected */ + BDirectWindow::DirectConnected(info); + + UnlockBuffer(); + } - - - - + + + + /* * * * * Event sending * * * * */ /* Hook functions */ virtual void FrameMoved(BPoint origin) { - /* Post a message to the BApp so that it can handle the window event */ - BMessage msg(BAPP_WINDOW_MOVED); - msg.AddInt32("window-x", (int)origin.x); - msg.AddInt32("window-y", (int)origin.y); - _PostWindowEvent(msg); - - /* Perform normal hook operations */ - BDirectWindow::FrameMoved(origin); + /* Post a message to the BApp so that it can handle the window event */ + BMessage msg(BAPP_WINDOW_MOVED); + msg.AddInt32("window-x", (int)origin.x); + msg.AddInt32("window-y", (int)origin.y); + _PostWindowEvent(msg); + + /* Perform normal hook operations */ + BDirectWindow::FrameMoved(origin); } - + virtual void FrameResized(float width, float height) { - /* Post a message to the BApp so that it can handle the window event */ - BMessage msg(BAPP_WINDOW_RESIZED); + /* Post a message to the BApp so that it can handle the window event */ + BMessage msg(BAPP_WINDOW_RESIZED); - msg.AddInt32("window-w", (int)width + 1); - msg.AddInt32("window-h", (int)height + 1); - _PostWindowEvent(msg); - - /* Perform normal hook operations */ - BDirectWindow::FrameResized(width, height); + msg.AddInt32("window-w", (int)width + 1); + msg.AddInt32("window-h", (int)height + 1); + _PostWindowEvent(msg); + + /* Perform normal hook operations */ + BDirectWindow::FrameResized(width, height); } - virtual bool QuitRequested() { - BMessage msg(BAPP_WINDOW_CLOSE_REQUESTED); - _PostWindowEvent(msg); + virtual bool QuitRequested() { + BMessage msg(BAPP_WINDOW_CLOSE_REQUESTED); + _PostWindowEvent(msg); - /* We won't allow a quit unless asked by DestroyWindow() */ - return false; + /* We won't allow a quit unless asked by DestroyWindow() */ + return false; } - + virtual void WindowActivated(bool active) { - BMessage msg(BAPP_KEYBOARD_FOCUS); /* Mouse focus sold separately */ - _PostWindowEvent(msg); + BMessage msg(BAPP_KEYBOARD_FOCUS); /* Mouse focus sold separately */ + _PostWindowEvent(msg); } - - virtual void Zoom(BPoint origin, - float width, - float height) { - BMessage msg(BAPP_MAXIMIZE); /* Closest thing to maximization Haiku has */ - _PostWindowEvent(msg); - - /* Before the window zooms, record its size */ - if( !_prev_frame ) - _prev_frame = new BRect(Frame()); - /* Perform normal hook operations */ - BDirectWindow::Zoom(origin, width, height); + virtual void Zoom(BPoint origin, + float width, + float height) { + BMessage msg(BAPP_MAXIMIZE); /* Closest thing to maximization Haiku has */ + _PostWindowEvent(msg); + + /* Before the window zooms, record its size */ + if( !_prev_frame ) + _prev_frame = new BRect(Frame()); + + /* Perform normal hook operations */ + BDirectWindow::Zoom(origin, width, height); } - + /* Member functions */ virtual void Show() { - while(IsHidden()) { - BDirectWindow::Show(); - } - _shown = true; + while(IsHidden()) { + BDirectWindow::Show(); + } + _shown = true; - BMessage msg(BAPP_SHOW); - _PostWindowEvent(msg); + BMessage msg(BAPP_SHOW); + _PostWindowEvent(msg); } - - virtual void Hide() { - BDirectWindow::Hide(); - _shown = false; - BMessage msg(BAPP_HIDE); - _PostWindowEvent(msg); + virtual void Hide() { + BDirectWindow::Hide(); + _shown = false; + + BMessage msg(BAPP_HIDE); + _PostWindowEvent(msg); } virtual void Minimize(bool minimize) { - BDirectWindow::Minimize(minimize); - int32 minState = (minimize ? BAPP_MINIMIZE : BAPP_RESTORE); - - BMessage msg(minState); - _PostWindowEvent(msg); + BDirectWindow::Minimize(minimize); + int32 minState = (minimize ? BAPP_MINIMIZE : BAPP_RESTORE); + + BMessage msg(minState); + _PostWindowEvent(msg); } - - + + /* BView message interruption */ virtual void DispatchMessage(BMessage * msg, BHandler * target) { - BPoint where; /* Used by mouse moved */ - int32 buttons; /* Used for mouse button events */ - int32 key; /* Used for key events */ - + BPoint where; /* Used by mouse moved */ + int32 buttons; /* Used for mouse button events */ + int32 key; /* Used for key events */ + switch (msg->what) { case B_MOUSE_MOVED: int32 transit; if (msg->FindPoint("where", &where) == B_OK && msg->FindInt32("be:transit", &transit) == B_OK) { - _MouseMotionEvent(where, transit); + _MouseMotionEvent(where, transit); } - + /* FIXME: Apparently a button press/release event might be dropped if made before before a different button is released. Does B_MOUSE_MOVED have the data needed to check if a mouse button state has changed? */ if (msg->FindInt32("buttons", &buttons) == B_OK) { - _MouseButtonEvent(buttons); + _MouseButtonEvent(buttons); } break; @@ -321,32 +321,32 @@ class SDL_BWin:public BDirectWindow /* _MouseButtonEvent() detects any and all buttons that may have changed state, as well as that button's new state */ if (msg->FindInt32("buttons", &buttons) == B_OK) { - _MouseButtonEvent(buttons); + _MouseButtonEvent(buttons); } break; case B_MOUSE_WHEEL_CHANGED: - float x, y; - if (msg->FindFloat("be:wheel_delta_x", &x) == B_OK - && msg->FindFloat("be:wheel_delta_y", &y) == B_OK) { - _MouseWheelEvent((int)x, (int)y); - } - break; + float x, y; + if (msg->FindFloat("be:wheel_delta_x", &x) == B_OK + && msg->FindFloat("be:wheel_delta_y", &y) == B_OK) { + _MouseWheelEvent((int)x, (int)y); + } + break; case B_KEY_DOWN: case B_UNMAPPED_KEY_DOWN: /* modifier keys are unmapped */ - if (msg->FindInt32("key", &key) == B_OK) { - _KeyEvent((SDL_Scancode)key, SDL_PRESSED); - } - break; + if (msg->FindInt32("key", &key) == B_OK) { + _KeyEvent((SDL_Scancode)key, SDL_PRESSED); + } + break; case B_KEY_UP: case B_UNMAPPED_KEY_UP: /* modifier keys are unmapped */ - if (msg->FindInt32("key", &key) == B_OK) { - _KeyEvent(key, SDL_RELEASED); + if (msg->FindInt32("key", &key) == B_OK) { + _KeyEvent(key, SDL_RELEASED); } break; - + default: /* move it after switch{} so it's always handled that way we keep BeOS feautures like: @@ -359,263 +359,263 @@ class SDL_BWin:public BDirectWindow BDirectWindow::DispatchMessage(msg, target); } - + /* Handle command messages */ virtual void MessageReceived(BMessage* message) { - switch (message->what) { - /* Handle commands from SDL */ - case BWIN_SET_TITLE: - _SetTitle(message); - break; - case BWIN_MOVE_WINDOW: - _MoveTo(message); - break; - case BWIN_RESIZE_WINDOW: - _ResizeTo(message); - break; - case BWIN_SET_BORDERED: - _SetBordered(message); - break; - case BWIN_SHOW_WINDOW: - Show(); - break; - case BWIN_HIDE_WINDOW: - Hide(); - break; - case BWIN_MAXIMIZE_WINDOW: - BWindow::Zoom(); - break; - case BWIN_MINIMIZE_WINDOW: - Minimize(true); - break; - case BWIN_RESTORE_WINDOW: - _Restore(); - break; - case BWIN_FULLSCREEN: - _SetFullScreen(message); - break; - default: - /* Perform normal message handling */ - BDirectWindow::MessageReceived(message); - break; - } + switch (message->what) { + /* Handle commands from SDL */ + case BWIN_SET_TITLE: + _SetTitle(message); + break; + case BWIN_MOVE_WINDOW: + _MoveTo(message); + break; + case BWIN_RESIZE_WINDOW: + _ResizeTo(message); + break; + case BWIN_SET_BORDERED: + _SetBordered(message); + break; + case BWIN_SHOW_WINDOW: + Show(); + break; + case BWIN_HIDE_WINDOW: + Hide(); + break; + case BWIN_MAXIMIZE_WINDOW: + BWindow::Zoom(); + break; + case BWIN_MINIMIZE_WINDOW: + Minimize(true); + break; + case BWIN_RESTORE_WINDOW: + _Restore(); + break; + case BWIN_FULLSCREEN: + _SetFullScreen(message); + break; + default: + /* Perform normal message handling */ + BDirectWindow::MessageReceived(message); + break; + } } - - - /* Accessor methods */ - bool IsShown() { return _shown; } - int32 GetID() { return _id; } - uint32 GetRowBytes() { return _row_bytes; } - int32 GetFbX() { return _bounds.left; } - int32 GetFbY() { return _bounds.top; } - bool ConnectionEnabled() { return !_connection_disabled; } - bool Connected() { return _connected; } - clipping_rect *GetClips() { return _clips; } - int32 GetNumClips() { return _num_clips; } - uint8* GetBufferPx() { return _bits; } - int32 GetBytesPerPx() { return _bytes_per_px; } - bool CanTrashWindowBuffer() { return _trash_window_buffer; } - bool BufferExists() { return _buffer_created; } - bool BufferIsDirty() { return _buffer_dirty; } - BBitmap *GetBitmap() { return _bitmap; } + + + /* Accessor methods */ + bool IsShown() { return _shown; } + int32 GetID() { return _id; } + uint32 GetRowBytes() { return _row_bytes; } + int32 GetFbX() { return _bounds.left; } + int32 GetFbY() { return _bounds.top; } + bool ConnectionEnabled() { return !_connection_disabled; } + bool Connected() { return _connected; } + clipping_rect *GetClips() { return _clips; } + int32 GetNumClips() { return _num_clips; } + uint8* GetBufferPx() { return _bits; } + int32 GetBytesPerPx() { return _bytes_per_px; } + bool CanTrashWindowBuffer() { return _trash_window_buffer; } + bool BufferExists() { return _buffer_created; } + bool BufferIsDirty() { return _buffer_dirty; } + BBitmap *GetBitmap() { return _bitmap; } #if SDL_VIDEO_OPENGL - BGLView *GetGLView() { return _SDL_GLView; } + BGLView *GetGLView() { return _SDL_GLView; } #endif - - /* Setter methods */ - void SetID(int32 id) { _id = id; } - void SetBufferExists(bool bufferExists) { _buffer_created = bufferExists; } - void LockBuffer() { _buffer_locker->Lock(); } - void UnlockBuffer() { _buffer_locker->Unlock(); } - void SetBufferDirty(bool bufferDirty) { _buffer_dirty = bufferDirty; } - void SetTrashBuffer(bool trash) { _trash_window_buffer = trash; } - void SetBitmap(BBitmap *bitmap) { _bitmap = bitmap; } - - + + /* Setter methods */ + void SetID(int32 id) { _id = id; } + void SetBufferExists(bool bufferExists) { _buffer_created = bufferExists; } + void LockBuffer() { _buffer_locker->Lock(); } + void UnlockBuffer() { _buffer_locker->Unlock(); } + void SetBufferDirty(bool bufferDirty) { _buffer_dirty = bufferDirty; } + void SetTrashBuffer(bool trash) { _trash_window_buffer = trash; } + void SetBitmap(BBitmap *bitmap) { _bitmap = bitmap; } + + private: - /* Event redirection */ + /* Event redirection */ void _MouseMotionEvent(BPoint &where, int32 transit) { - if(transit == B_EXITED_VIEW) { - /* Change mouse focus */ - if(_mouse_focused) { - _MouseFocusEvent(false); - } - } else { - /* Change mouse focus */ - if (!_mouse_focused) { - _MouseFocusEvent(true); - } - BMessage msg(BAPP_MOUSE_MOVED); - msg.AddInt32("x", (int)where.x); - msg.AddInt32("y", (int)where.y); - - _PostWindowEvent(msg); - } + if(transit == B_EXITED_VIEW) { + /* Change mouse focus */ + if(_mouse_focused) { + _MouseFocusEvent(false); + } + } else { + /* Change mouse focus */ + if (!_mouse_focused) { + _MouseFocusEvent(true); + } + BMessage msg(BAPP_MOUSE_MOVED); + msg.AddInt32("x", (int)where.x); + msg.AddInt32("y", (int)where.y); + + _PostWindowEvent(msg); + } } - + void _MouseFocusEvent(bool focusGained) { - _mouse_focused = focusGained; - BMessage msg(BAPP_MOUSE_FOCUS); - msg.AddBool("focusGained", focusGained); - _PostWindowEvent(msg); - + _mouse_focused = focusGained; + BMessage msg(BAPP_MOUSE_FOCUS); + msg.AddBool("focusGained", focusGained); + _PostWindowEvent(msg); + //FIXME: Why were these here? // if false: be_app->SetCursor(B_HAND_CURSOR); // if true: SDL_SetCursor(NULL); } - + void _MouseButtonEvent(int32 buttons) { - int32 buttonStateChange = buttons ^ _last_buttons; - - /* Make sure at least one button has changed state */ - if( !(buttonStateChange) ) { - return; - } - - /* Add any mouse button events */ - if(buttonStateChange & B_PRIMARY_MOUSE_BUTTON) { - _SendMouseButton(SDL_BUTTON_LEFT, buttons & - B_PRIMARY_MOUSE_BUTTON); - } - if(buttonStateChange & B_SECONDARY_MOUSE_BUTTON) { - _SendMouseButton(SDL_BUTTON_RIGHT, buttons & - B_PRIMARY_MOUSE_BUTTON); - } - if(buttonStateChange & B_TERTIARY_MOUSE_BUTTON) { - _SendMouseButton(SDL_BUTTON_MIDDLE, buttons & - B_PRIMARY_MOUSE_BUTTON); - } - - _last_buttons = buttons; + int32 buttonStateChange = buttons ^ _last_buttons; + + /* Make sure at least one button has changed state */ + if( !(buttonStateChange) ) { + return; + } + + /* Add any mouse button events */ + if(buttonStateChange & B_PRIMARY_MOUSE_BUTTON) { + _SendMouseButton(SDL_BUTTON_LEFT, buttons & + B_PRIMARY_MOUSE_BUTTON); + } + if(buttonStateChange & B_SECONDARY_MOUSE_BUTTON) { + _SendMouseButton(SDL_BUTTON_RIGHT, buttons & + B_PRIMARY_MOUSE_BUTTON); + } + if(buttonStateChange & B_TERTIARY_MOUSE_BUTTON) { + _SendMouseButton(SDL_BUTTON_MIDDLE, buttons & + B_PRIMARY_MOUSE_BUTTON); + } + + _last_buttons = buttons; } - + void _SendMouseButton(int32 button, int32 state) { - BMessage msg(BAPP_MOUSE_BUTTON); - msg.AddInt32("button-id", button); - msg.AddInt32("button-state", state); - _PostWindowEvent(msg); + BMessage msg(BAPP_MOUSE_BUTTON); + msg.AddInt32("button-id", button); + msg.AddInt32("button-state", state); + _PostWindowEvent(msg); } - + void _MouseWheelEvent(int32 x, int32 y) { - /* Create a message to pass along to the BeApp thread */ - BMessage msg(BAPP_MOUSE_WHEEL); - msg.AddInt32("xticks", x); - msg.AddInt32("yticks", y); - _PostWindowEvent(msg); + /* Create a message to pass along to the BeApp thread */ + BMessage msg(BAPP_MOUSE_WHEEL); + msg.AddInt32("xticks", x); + msg.AddInt32("yticks", y); + _PostWindowEvent(msg); } - + void _KeyEvent(int32 keyCode, int32 keyState) { - /* Create a message to pass along to the BeApp thread */ - BMessage msg(BAPP_KEY); - msg.AddInt32("key-state", keyState); - msg.AddInt32("key-scancode", keyCode); - be_app->PostMessage(&msg); - /* Apparently SDL only uses the scancode */ + /* Create a message to pass along to the BeApp thread */ + BMessage msg(BAPP_KEY); + msg.AddInt32("key-state", keyState); + msg.AddInt32("key-scancode", keyCode); + be_app->PostMessage(&msg); + /* Apparently SDL only uses the scancode */ } - + void _RepaintEvent() { - /* Force a repaint: Call the SDL exposed event */ - BMessage msg(BAPP_REPAINT); - _PostWindowEvent(msg); + /* Force a repaint: Call the SDL exposed event */ + BMessage msg(BAPP_REPAINT); + _PostWindowEvent(msg); } void _PostWindowEvent(BMessage &msg) { - msg.AddInt32("window-id", _id); - be_app->PostMessage(&msg); + msg.AddInt32("window-id", _id); + be_app->PostMessage(&msg); } - - /* Command methods (functions called upon by SDL) */ + + /* Command methods (functions called upon by SDL) */ void _SetTitle(BMessage *msg) { - const char *title; - if( - msg->FindString("window-title", &title) != B_OK - ) { - return; - } - SetTitle(title); + const char *title; + if( + msg->FindString("window-title", &title) != B_OK + ) { + return; + } + SetTitle(title); } - + void _MoveTo(BMessage *msg) { - int32 x, y; - if( - msg->FindInt32("window-x", &x) != B_OK || - msg->FindInt32("window-y", &y) != B_OK - ) { - return; - } - MoveTo(x, y); + int32 x, y; + if( + msg->FindInt32("window-x", &x) != B_OK || + msg->FindInt32("window-y", &y) != B_OK + ) { + return; + } + MoveTo(x, y); } - + void _ResizeTo(BMessage *msg) { - int32 w, h; - if( - msg->FindInt32("window-w", &w) != B_OK || - msg->FindInt32("window-h", &h) != B_OK - ) { - return; - } - ResizeTo(w, h); + int32 w, h; + if( + msg->FindInt32("window-w", &w) != B_OK || + msg->FindInt32("window-h", &h) != B_OK + ) { + return; + } + ResizeTo(w, h); } void _SetBordered(BMessage *msg) { - bool bEnabled; - if(msg->FindBool("window-border", &bEnabled) != B_OK) { - return; - } - SetLook(bEnabled ? B_BORDERED_WINDOW_LOOK : B_NO_BORDER_WINDOW_LOOK); + bool bEnabled; + if(msg->FindBool("window-border", &bEnabled) != B_OK) { + return; + } + SetLook(bEnabled ? B_BORDERED_WINDOW_LOOK : B_NO_BORDER_WINDOW_LOOK); } void _Restore() { - if(IsMinimized()) { - Minimize(false); - } else if(IsHidden()) { - Show(); - } else if(_prev_frame != NULL) { /* Zoomed */ - MoveTo(_prev_frame->left, _prev_frame->top); - ResizeTo(_prev_frame->Width(), _prev_frame->Height()); - } + if(IsMinimized()) { + Minimize(false); + } else if(IsHidden()) { + Show(); + } else if(_prev_frame != NULL) { /* Zoomed */ + MoveTo(_prev_frame->left, _prev_frame->top); + ResizeTo(_prev_frame->Width(), _prev_frame->Height()); + } } void _SetFullScreen(BMessage *msg) { - bool fullscreen; - if( - msg->FindBool("fullscreen", &fullscreen) != B_OK - ) { - return; - } - SetFullScreen(fullscreen); + bool fullscreen; + if( + msg->FindBool("fullscreen", &fullscreen) != B_OK + ) { + return; + } + SetFullScreen(fullscreen); } - + /* Members */ #if SDL_VIDEO_OPENGL BGLView * _SDL_GLView; #endif - + int32 _last_buttons; - int32 _id; /* Window id used by SDL_BApp */ - bool _mouse_focused; /* Does this window have mouse focus? */ + int32 _id; /* Window id used by SDL_BApp */ + bool _mouse_focused; /* Does this window have mouse focus? */ bool _shown; bool _inhibit_resize; - - BRect *_prev_frame; /* Previous position and size of the window */ - + + BRect *_prev_frame; /* Previous position and size of the window */ + /* Framebuffer members */ - bool _connected, - _connection_disabled, - _buffer_created, - _buffer_dirty, - _trash_window_buffer; - uint8 *_bits; - uint32 _row_bytes; - clipping_rect _bounds; - BLocker *_buffer_locker; + bool _connected, + _connection_disabled, + _buffer_created, + _buffer_dirty, + _trash_window_buffer; + uint8 *_bits; + uint32 _row_bytes; + clipping_rect _bounds; + BLocker *_buffer_locker; clipping_rect *_clips; - int32 _num_clips; - int32 _bytes_per_px; - thread_id _draw_thread_id; - - BBitmap *_bitmap; + int32 _num_clips; + int32 _bytes_per_px; + thread_id _draw_thread_id; + + BBitmap *_bitmap; }; diff --git a/src/video/bwindow/SDL_bevents.h b/src/video/bwindow/SDL_bevents.h index 66284283a..a83d03b52 100644 --- a/src/video/bwindow/SDL_bevents.h +++ b/src/video/bwindow/SDL_bevents.h @@ -17,7 +17,7 @@ 2. Altered source versions must be plainly marked as such, and must not be misrepresented as being the original software. 3. This notice may not be removed or altered from any source distribution. -*/ +*/ #ifndef SDL_BEVENTS_H #define SDL_BEVENTS_H diff --git a/src/video/bwindow/SDL_bmodes.cc b/src/video/bwindow/SDL_bmodes.cc index 2e8f4b577..41894fb78 100644 --- a/src/video/bwindow/SDL_bmodes.cc +++ b/src/video/bwindow/SDL_bmodes.cc @@ -275,7 +275,7 @@ void BE_GetDisplayModes(_THIS, SDL_VideoDisplay *display) { bscreen.GetMode(&this_bmode); for(i = 0; i < count; ++i) { - //FIXME: Apparently there are errors with colorspace changes + // FIXME: Apparently there are errors with colorspace changes if (bmodes[i].space == this_bmode.space) { _BDisplayModeToSdlDisplayMode(&bmodes[i], &mode); SDL_AddDisplayMode(display, &mode); diff --git a/src/video/bwindow/SDL_bmodes.h b/src/video/bwindow/SDL_bmodes.h index 5e723a801..9ca04d087 100644 --- a/src/video/bwindow/SDL_bmodes.h +++ b/src/video/bwindow/SDL_bmodes.h @@ -34,10 +34,10 @@ extern int32 BE_BPPToSDLPxFormat(int32 bpp); extern int BE_InitModes(_THIS); extern int BE_QuitModes(_THIS); extern int BE_GetDisplayBounds(_THIS, SDL_VideoDisplay *display, - SDL_Rect *rect); + SDL_Rect *rect); extern void BE_GetDisplayModes(_THIS, SDL_VideoDisplay *display); extern int BE_SetDisplayMode(_THIS, SDL_VideoDisplay *display, - SDL_DisplayMode *mode); + SDL_DisplayMode *mode); #ifdef __cplusplus } diff --git a/src/video/bwindow/SDL_bopengl.h b/src/video/bwindow/SDL_bopengl.h index 35a3b204c..f0279ba66 100644 --- a/src/video/bwindow/SDL_bopengl.h +++ b/src/video/bwindow/SDL_bopengl.h @@ -29,13 +29,13 @@ extern "C" { #include "../SDL_sysvideo.h" -extern int BE_GL_LoadLibrary(_THIS, const char *path); //FIXME -extern void *BE_GL_GetProcAddress(_THIS, const char *proc); //FIXME -extern void BE_GL_UnloadLibrary(_THIS); //TODO +extern int BE_GL_LoadLibrary(_THIS, const char *path); //FIXME +extern void *BE_GL_GetProcAddress(_THIS, const char *proc); //FIXME +extern void BE_GL_UnloadLibrary(_THIS); //TODO extern int BE_GL_MakeCurrent(_THIS, SDL_Window * window, SDL_GLContext context); -extern int BE_GL_SetSwapInterval(_THIS, int interval); //TODO -extern int BE_GL_GetSwapInterval(_THIS); //TODO +extern int BE_GL_SetSwapInterval(_THIS, int interval); //TODO +extern int BE_GL_GetSwapInterval(_THIS); //TODO extern void BE_GL_SwapWindow(_THIS, SDL_Window * window); extern SDL_GLContext BE_GL_CreateContext(_THIS, SDL_Window * window); extern void BE_GL_DeleteContext(_THIS, SDL_GLContext context); diff --git a/src/video/cocoa/SDL_cocoaclipboard.m b/src/video/cocoa/SDL_cocoaclipboard.m index fd499260a..27d222769 100644 --- a/src/video/cocoa/SDL_cocoaclipboard.m +++ b/src/video/cocoa/SDL_cocoaclipboard.m @@ -99,8 +99,8 @@ Cocoa_HasClipboardText(_THIS) SDL_bool result = SDL_FALSE; char *text = Cocoa_GetClipboardText(_this); if (text) { - result = (SDL_strlen(text)>0) ? SDL_TRUE : SDL_FALSE; - SDL_free(text); + result = (SDL_strlen(text)>0) ? SDL_TRUE : SDL_FALSE; + SDL_free(text); } return result; } diff --git a/src/video/cocoa/SDL_cocoaevents.m b/src/video/cocoa/SDL_cocoaevents.m index 7df95bbd0..e952a9e9f 100644 --- a/src/video/cocoa/SDL_cocoaevents.m +++ b/src/video/cocoa/SDL_cocoaevents.m @@ -68,7 +68,7 @@ GetApplicationName(void) dict = (NSDictionary *)CFBundleGetInfoDictionary(CFBundleGetMainBundle()); if (dict) appName = [dict objectForKey: @"CFBundleName"]; - + if (![appName length]) appName = [[NSProcessInfo processInfo] processName]; @@ -84,14 +84,14 @@ CreateApplicationMenus(void) NSMenu *serviceMenu; NSMenu *windowMenu; NSMenuItem *menuItem; - + /* Create the main menu bar */ [NSApp setMainMenu:[[NSMenu alloc] init]]; /* Create the application menu */ appName = GetApplicationName(); appleMenu = [[NSMenu alloc] initWithTitle:@""]; - + /* Add menu items */ title = [@"About " stringByAppendingString:appName]; [appleMenu addItemWithTitle:title action:@selector(orderFrontStandardAboutPanel:) keyEquivalent:@""]; @@ -123,7 +123,7 @@ CreateApplicationMenus(void) title = [@"Quit " stringByAppendingString:appName]; [appleMenu addItemWithTitle:title action:@selector(terminate:) keyEquivalent:@"q"]; - + /* Put menu into the menubar */ menuItem = [[NSMenuItem alloc] initWithTitle:@"" action:nil keyEquivalent:@""]; [menuItem setSubmenu:appleMenu]; @@ -137,10 +137,10 @@ CreateApplicationMenus(void) /* Create the window menu */ windowMenu = [[NSMenu alloc] initWithTitle:@"Window"]; - + /* Add menu items */ [windowMenu addItemWithTitle:@"Minimize" action:@selector(performMiniaturize:) keyEquivalent:@"m"]; - + [windowMenu addItemWithTitle:@"Zoom" action:@selector(performZoom:) keyEquivalent:@""]; /* Put menu into the menubar */ @@ -148,7 +148,7 @@ CreateApplicationMenus(void) [menuItem setSubmenu:windowMenu]; [[NSApp mainMenu] addItem:menuItem]; [menuItem release]; - + /* Tell the application object that this is now the window menu */ [NSApp setWindowsMenu:windowMenu]; [windowMenu release]; @@ -203,7 +203,7 @@ Cocoa_PumpEvents(_THIS) if ( event == nil ) { break; } - + switch ([event type]) { case NSLeftMouseDown: case NSOtherMouseDown: diff --git a/src/video/cocoa/SDL_cocoakeyboard.m b/src/video/cocoa/SDL_cocoakeyboard.m index 63f4bf942..705b0358d 100644 --- a/src/video/cocoa/SDL_cocoakeyboard.m +++ b/src/video/cocoa/SDL_cocoakeyboard.m @@ -29,7 +29,7 @@ #include -//#define DEBUG_IME NSLog +/*#define DEBUG_IME NSLog */ #define DEBUG_IME(...) #ifndef NX_DEVICERCTLKEYMASK @@ -93,9 +93,10 @@ - (void) doCommandBySelector:(SEL) myselector { - // No need to do anything since we are not using Cocoa - // selectors to handle special keys, instead we use SDL - // key events to do the same job. + /* No need to do anything since we are not using Cocoa + selectors to handle special keys, instead we use SDL + key events to do the same job. + */ } - (BOOL) hasMarkedText @@ -181,18 +182,20 @@ return (long) self; } -// This method returns the index for character that is -// nearest to thePoint. thPoint is in screen coordinate system. +/* This method returns the index for character that is + * nearest to thePoint. thPoint is in screen coordinate system. + */ - (NSUInteger) characterIndexForPoint:(NSPoint) thePoint { DEBUG_IME(@"characterIndexForPoint: (%g, %g)", thePoint.x, thePoint.y); return 0; } -// This method is the key to attribute extension. -// We could add new attributes through this method. -// NSInputServer examines the return value of this -// method & constructs appropriate attributed string. +/* This method is the key to attribute extension. + * We could add new attributes through this method. + * NSInputServer examines the return value of this + * method & constructs appropriate attributed string. + */ - (NSArray *) validAttributesForMarkedText { return [NSArray array]; @@ -200,7 +203,7 @@ @end -/* This is the original behavior, before support was added for +/* This is the original behavior, before support was added for * differentiating between left and right versions of the keys. */ static void @@ -239,7 +242,7 @@ DoUnsidedModifiers(unsigned short scancode, } } -/* This is a helper function for HandleModifierSide. This +/* This is a helper function for HandleModifierSide. This * function reverts back to behavior before the distinction between * sides was made. */ @@ -250,13 +253,13 @@ HandleNonDeviceModifier(unsigned int device_independent_mask, SDL_Scancode scancode) { unsigned int oldMask, newMask; - - /* Isolate just the bits we care about in the depedent bits so we can + + /* Isolate just the bits we care about in the depedent bits so we can * figure out what changed - */ + */ oldMask = oldMods & device_independent_mask; newMask = newMods & device_independent_mask; - + if (oldMask && oldMask != newMask) { SDL_SendKeyboardKey(SDL_RELEASED, scancode); } else if (newMask && oldMask != newMask) { @@ -264,24 +267,24 @@ HandleNonDeviceModifier(unsigned int device_independent_mask, } } -/* This is a helper function for HandleModifierSide. +/* This is a helper function for HandleModifierSide. * This function sets the actual SDL_PrivateKeyboard event. */ static void HandleModifierOneSide(unsigned int oldMods, unsigned int newMods, - SDL_Scancode scancode, + SDL_Scancode scancode, unsigned int sided_device_dependent_mask) { unsigned int old_dep_mask, new_dep_mask; - /* Isolate just the bits we care about in the depedent bits so we can + /* Isolate just the bits we care about in the depedent bits so we can * figure out what changed - */ + */ old_dep_mask = oldMods & sided_device_dependent_mask; new_dep_mask = newMods & sided_device_dependent_mask; /* We now know that this side bit flipped. But we don't know if - * it went pressed to released or released to pressed, so we must + * it went pressed to released or released to pressed, so we must * find out which it is. */ if (new_dep_mask && old_dep_mask != new_dep_mask) { @@ -292,23 +295,23 @@ HandleModifierOneSide(unsigned int oldMods, unsigned int newMods, } /* This is a helper function for DoSidedModifiers. - * This function will figure out if the modifier key is the left or right side, - * e.g. left-shift vs right-shift. + * This function will figure out if the modifier key is the left or right side, + * e.g. left-shift vs right-shift. */ static void -HandleModifierSide(int device_independent_mask, - unsigned int oldMods, unsigned int newMods, - SDL_Scancode left_scancode, +HandleModifierSide(int device_independent_mask, + unsigned int oldMods, unsigned int newMods, + SDL_Scancode left_scancode, SDL_Scancode right_scancode, - unsigned int left_device_dependent_mask, + unsigned int left_device_dependent_mask, unsigned int right_device_dependent_mask) { unsigned int device_dependent_mask = (left_device_dependent_mask | right_device_dependent_mask); unsigned int diff_mod; - - /* On the basis that the device independent mask is set, but there are - * no device dependent flags set, we'll assume that we can't detect this + + /* On the basis that the device independent mask is set, but there are + * no device dependent flags set, we'll assume that we can't detect this * keyboard and revert to the unsided behavior. */ if ((device_dependent_mask & newMods) == 0) { @@ -321,7 +324,7 @@ HandleModifierSide(int device_independent_mask, diff_mod = (device_dependent_mask & oldMods) ^ (device_dependent_mask & newMods); if (diff_mod) { - /* A change in state was found. Isolate the left and right bits + /* A change in state was found. Isolate the left and right bits * to handle them separately just in case the values can simulataneously * change or if the bits don't both exist. */ @@ -333,38 +336,38 @@ HandleModifierSide(int device_independent_mask, } } } - + /* This is a helper function for DoSidedModifiers. - * This function will release a key press in the case that - * it is clear that the modifier has been released (i.e. one side + * This function will release a key press in the case that + * it is clear that the modifier has been released (i.e. one side * can't still be down). */ static void -ReleaseModifierSide(unsigned int device_independent_mask, +ReleaseModifierSide(unsigned int device_independent_mask, unsigned int oldMods, unsigned int newMods, - SDL_Scancode left_scancode, + SDL_Scancode left_scancode, SDL_Scancode right_scancode, - unsigned int left_device_dependent_mask, + unsigned int left_device_dependent_mask, unsigned int right_device_dependent_mask) { unsigned int device_dependent_mask = (left_device_dependent_mask | right_device_dependent_mask); - /* On the basis that the device independent mask is set, but there are - * no device dependent flags set, we'll assume that we can't detect this + /* On the basis that the device independent mask is set, but there are + * no device dependent flags set, we'll assume that we can't detect this * keyboard and revert to the unsided behavior. */ if ((device_dependent_mask & oldMods) == 0) { - /* In this case, we can't detect the keyboard, so use the left side - * to represent both, and release it. + /* In this case, we can't detect the keyboard, so use the left side + * to represent both, and release it. */ SDL_SendKeyboardKey(SDL_RELEASED, left_scancode); return; } - /* + /* * This could have been done in an if-else case because at this point, - * we know that all keys have been released when calling this function. + * we know that all keys have been released when calling this function. * But I'm being paranoid so I want to handle each separately, * so I hope this doesn't cause other problems. */ @@ -384,7 +387,7 @@ HandleCapsLock(unsigned short scancode, unsigned int oldMods, unsigned int newMods) { unsigned int oldMask, newMask; - + oldMask = oldMods & NSAlphaShiftKeyMask; newMask = newMods & NSAlphaShiftKeyMask; @@ -402,14 +405,14 @@ HandleCapsLock(unsigned short scancode, } } -/* This function will handle the modifier keys and also determine the +/* This function will handle the modifier keys and also determine the * correct side of the key. */ static void DoSidedModifiers(unsigned short scancode, unsigned int oldMods, unsigned int newMods) { - /* Set up arrays for the key syms for the left and right side. */ + /* Set up arrays for the key syms for the left and right side. */ const SDL_Scancode left_mapping[] = { SDL_SCANCODE_LSHIFT, SDL_SCANCODE_LCTRL, @@ -422,8 +425,8 @@ DoSidedModifiers(unsigned short scancode, SDL_SCANCODE_RALT, SDL_SCANCODE_RGUI }; - /* Set up arrays for the device dependent masks with indices that - * correspond to the _mapping arrays + /* Set up arrays for the device dependent masks with indices that + * correspond to the _mapping arrays */ const unsigned int left_device_mapping[] = { NX_DEVICELSHIFTKEYMASK, NX_DEVICELCTLKEYMASK, NX_DEVICELALTKEYMASK, NX_DEVICELCMDKEYMASK }; const unsigned int right_device_mapping[] = { NX_DEVICERSHIFTKEYMASK, NX_DEVICERCTLKEYMASK, NX_DEVICERALTKEYMASK, NX_DEVICERCMDKEYMASK }; @@ -436,10 +439,10 @@ DoSidedModifiers(unsigned short scancode, /* Iterate through the bits, testing each against the old modifiers */ for (i = 0, bit = NSShiftKeyMask; bit <= NSCommandKeyMask; bit <<= 1, ++i) { unsigned int oldMask, newMask; - + oldMask = oldMods & bit; newMask = newMods & bit; - + /* If the bit is set, we must always examine it because the left * and right side keys may alternate or both may be pressed. */ @@ -465,11 +468,11 @@ HandleModifiers(_THIS, unsigned short scancode, unsigned int modifierFlags) SDL_VideoData *data = (SDL_VideoData *) _this->driverdata; if (modifierFlags == data->modifierFlags) { - return; + return; } - /* - * Starting with Panther (10.3.0), the ability to distinguish between + /* + * Starting with Panther (10.3.0), the ability to distinguish between * left side and right side modifiers is available. */ if (data->osversion >= 0x1030) { @@ -611,7 +614,7 @@ Cocoa_InitKeyboard(_THIS) SDL_VideoData *data = (SDL_VideoData *) _this->driverdata; UpdateKeymap(data); - + /* Set our own names for the platform-dependent but layout-independent keys */ /* This key is NumLock on the MacBook keyboard. :) */ /*SDL_SetScancodeName(SDL_SCANCODE_NUMLOCKCLEAR, "Clear");*/ @@ -640,7 +643,7 @@ Cocoa_StartTextInput(_THIS) if (![[data->fieldEdit superview] isEqual: parentView]) { - // DEBUG_IME(@"add fieldEdit to window contentView"); + /* DEBUG_IME(@"add fieldEdit to window contentView"); */ [data->fieldEdit removeFromSuperview]; [parentView addSubview: data->fieldEdit]; [[NSApp keyWindow] makeFirstResponder: data->fieldEdit]; @@ -669,8 +672,8 @@ Cocoa_SetTextInputRect(_THIS, SDL_Rect *rect) SDL_VideoData *data = (SDL_VideoData *) _this->driverdata; if (!rect) { - SDL_InvalidParamError("rect"); - return; + SDL_InvalidParamError("rect"); + return; } [data->fieldEdit setInputRect: rect]; diff --git a/src/video/cocoa/SDL_cocoamodes.m b/src/video/cocoa/SDL_cocoamodes.m index 563226c2a..ad6ece279 100644 --- a/src/video/cocoa/SDL_cocoamodes.m +++ b/src/video/cocoa/SDL_cocoamodes.m @@ -55,8 +55,8 @@ static inline void Cocoa_ToggleMenuBar(const BOOL show) #endif #if MAC_OS_X_VERSION_MAX_ALLOWED < 1050 -/* - Add methods to get at private members of NSScreen. +/* + Add methods to get at private members of NSScreen. Since there is a bug in Apple's screen switching code that does not update this variable when switching to fullscreen, we'll set it manually (but only for the @@ -226,7 +226,7 @@ Cocoa_GetDisplayName(CGDirectDisplayID displayID) NSDictionary *deviceInfo = (NSDictionary *)IODisplayCreateInfoDictionary(CGDisplayIOServicePort(displayID), kIODisplayOnlyPreferredName); NSDictionary *localizedNames = [deviceInfo objectForKey:[NSString stringWithUTF8String:kDisplayProductName]]; const char* displayName = NULL; - + if ([localizedNames count] > 0) { displayName = SDL_strdup([[localizedNames objectForKey:[[localizedNames allKeys] objectAtIndex:0]] UTF8String]); } @@ -304,7 +304,7 @@ Cocoa_InitModes(_THIS) displaydata->display = displays[i]; SDL_zero(display); - // this returns a stddup'ed string + /* this returns a stddup'ed string */ display.name = (char *)Cocoa_GetDisplayName(displays[i]); if (!GetDisplayMode (_this, moderef, &mode)) { Cocoa_ReleaseDisplayMode(_this, moderef); diff --git a/src/video/cocoa/SDL_cocoamouse.m b/src/video/cocoa/SDL_cocoamouse.m index 4a6c581d5..fd76bb584 100644 --- a/src/video/cocoa/SDL_cocoamouse.m +++ b/src/video/cocoa/SDL_cocoamouse.m @@ -153,7 +153,7 @@ Cocoa_CreateSystemCursor(SDL_SystemCursor id) if (nscursor) { cursor = SDL_calloc(1, sizeof(*cursor)); if (cursor) { - // We'll free it later, so retain it here + /* We'll free it later, so retain it here */ [nscursor retain]; cursor->driverdata = nscursor; } diff --git a/src/video/cocoa/SDL_cocoashape.h b/src/video/cocoa/SDL_cocoashape.h index fc867a081..3b656c1a9 100644 --- a/src/video/cocoa/SDL_cocoashape.h +++ b/src/video/cocoa/SDL_cocoashape.h @@ -30,10 +30,10 @@ #include "../SDL_shape_internals.h" typedef struct { - NSGraphicsContext* context; - SDL_bool saved; - - SDL_ShapeTree* shape; + NSGraphicsContext* context; + SDL_bool saved; + + SDL_ShapeTree* shape; } SDL_ShapeData; extern SDL_WindowShaper* Cocoa_CreateShaper(SDL_Window* window); diff --git a/src/video/cocoa/SDL_cocoashape.m b/src/video/cocoa/SDL_cocoashape.m index 8f2fa47dc..3cde7d048 100644 --- a/src/video/cocoa/SDL_cocoashape.m +++ b/src/video/cocoa/SDL_cocoashape.m @@ -42,13 +42,13 @@ Cocoa_CreateShaper(SDL_Window* window) { result->mode.parameters.binarizationCutoff = 1; result->userx = result->usery = 0; window->shaper = result; - + SDL_ShapeData* data = malloc(sizeof(SDL_ShapeData)); result->driverdata = data; data->context = [windata->nswindow graphicsContext]; data->saved = SDL_FALSE; data->shape = NULL; - + int resized_properly = Cocoa_ResizeWindowShape(window); SDL_assert(resized_properly == 0); return result; @@ -72,26 +72,26 @@ ConvertRects(SDL_ShapeTree* tree,void* closure) { int Cocoa_SetWindowShape(SDL_WindowShaper *shaper,SDL_Surface *shape,SDL_WindowShapeMode *shape_mode) { SDL_ShapeData* data = (SDL_ShapeData*)shaper->driverdata; - SDL_WindowData* windata = (SDL_WindowData*)shaper->window->driverdata; - SDL_CocoaClosure closure; - NSAutoreleasePool *pool = NULL; + SDL_WindowData* windata = (SDL_WindowData*)shaper->window->driverdata; + SDL_CocoaClosure closure; + NSAutoreleasePool *pool = NULL; if(data->saved == SDL_TRUE) { [data->context restoreGraphicsState]; data->saved = SDL_FALSE; } - + //[data->context saveGraphicsState]; //data->saved = SDL_TRUE; - [NSGraphicsContext setCurrentContext:data->context]; - + [NSGraphicsContext setCurrentContext:data->context]; + [[NSColor clearColor] set]; NSRectFill([[windata->nswindow contentView] frame]); data->shape = SDL_CalculateShapeTree(*shape_mode,shape); - - pool = [[NSAutoreleasePool alloc] init]; + + pool = [[NSAutoreleasePool alloc] init]; closure.view = [windata->nswindow contentView]; closure.path = [[NSBezierPath bezierPath] autorelease]; - closure.window = shaper->window; + closure.window = shaper->window; SDL_TraverseShapeTree(data->shape,&ConvertRects,&closure); [closure.path addClip]; diff --git a/src/video/cocoa/SDL_cocoavideo.m b/src/video/cocoa/SDL_cocoavideo.m index 6502a3fd7..5600222ae 100644 --- a/src/video/cocoa/SDL_cocoavideo.m +++ b/src/video/cocoa/SDL_cocoavideo.m @@ -110,11 +110,11 @@ Cocoa_CreateDevice(int devindex) device->SetWindowGrab = Cocoa_SetWindowGrab; device->DestroyWindow = Cocoa_DestroyWindow; device->GetWindowWMInfo = Cocoa_GetWindowWMInfo; - + device->shape_driver.CreateShaper = Cocoa_CreateShaper; device->shape_driver.SetWindowShape = Cocoa_SetWindowShape; device->shape_driver.ResizeWindowShape = Cocoa_ResizeWindowShape; - + #if SDL_VIDEO_OPENGL_CGL device->GL_LoadLibrary = Cocoa_GL_LoadLibrary; device->GL_GetProcAddress = Cocoa_GL_GetProcAddress; @@ -173,7 +173,7 @@ Cocoa_CreateImage(SDL_Surface * surface) int i; NSImage *img; - converted = SDL_ConvertSurfaceFormat(surface, + converted = SDL_ConvertSurfaceFormat(surface, #if SDL_BYTEORDER == SDL_BIG_ENDIAN SDL_PIXELFORMAT_RGBA8888, #else diff --git a/src/video/cocoa/SDL_cocoawindow.m b/src/video/cocoa/SDL_cocoawindow.m index f6d54a78d..d0f825cba 100644 --- a/src/video/cocoa/SDL_cocoawindow.m +++ b/src/video/cocoa/SDL_cocoawindow.m @@ -67,9 +67,10 @@ static __inline__ void ConvertNSRect(NSRect *r) [window setDelegate:self]; } - // Haven't found a delegate / notification that triggers when the window is - // ordered out (is not visible any more). You can be ordered out without - // minimizing, so DidMiniaturize doesn't work. (e.g. -[NSWindow orderOut:]) + /* Haven't found a delegate / notification that triggers when the window is + * ordered out (is not visible any more). You can be ordered out without + * minimizing, so DidMiniaturize doesn't work. (e.g. -[NSWindow orderOut:]) + */ [window addObserver:self forKeyPath:@"visible" options:NSKeyValueObservingOptionNew @@ -274,27 +275,29 @@ static __inline__ void ConvertNSRect(NSRect *r) } } -// We'll respond to key events by doing nothing so we don't beep. -// We could handle key messages here, but we lose some in the NSApp dispatch, -// where they get converted to action messages, etc. +/* We'll respond to key events by doing nothing so we don't beep. + * We could handle key messages here, but we lose some in the NSApp dispatch, + * where they get converted to action messages, etc. + */ - (void)flagsChanged:(NSEvent *)theEvent { - //Cocoa_HandleKeyEvent(SDL_GetVideoDevice(), theEvent); + /*Cocoa_HandleKeyEvent(SDL_GetVideoDevice(), theEvent);*/ } - (void)keyDown:(NSEvent *)theEvent { - //Cocoa_HandleKeyEvent(SDL_GetVideoDevice(), theEvent); + /*Cocoa_HandleKeyEvent(SDL_GetVideoDevice(), theEvent);*/ } - (void)keyUp:(NSEvent *)theEvent { - //Cocoa_HandleKeyEvent(SDL_GetVideoDevice(), theEvent); + /*Cocoa_HandleKeyEvent(SDL_GetVideoDevice(), theEvent);*/ } -// We'll respond to selectors by doing nothing so we don't beep. -// The escape key gets converted to a "cancel" selector, etc. +/* We'll respond to selectors by doing nothing so we don't beep. + * The escape key gets converted to a "cancel" selector, etc. + */ - (void)doCommandBySelector:(SEL)aSelector { - //NSLog(@"doCommandBySelector: %@\n", NSStringFromSelector(aSelector)); + /*NSLog(@"doCommandBySelector: %@\n", NSStringFromSelector(aSelector));*/ } - (void)mouseDown:(NSEvent *)theEvent @@ -472,7 +475,7 @@ static __inline__ void ConvertNSRect(NSRect *r) if (SDL_AddTouch(touchId, "") < 0) { return; } - } + } const SDL_FingerID fingerId = (SDL_FingerID)(intptr_t)[touch identity]; float x = [touch normalizedPosition].x; @@ -550,18 +553,18 @@ GetWindowStyle(SDL_Window * window) { unsigned int style; - if (window->flags & SDL_WINDOW_FULLSCREEN) { + if (window->flags & SDL_WINDOW_FULLSCREEN) { style = NSBorderlessWindowMask; - } else { - if (window->flags & SDL_WINDOW_BORDERLESS) { - style = NSBorderlessWindowMask; - } else { - style = (NSTitledWindowMask|NSClosableWindowMask|NSMiniaturizableWindowMask); - } - if (window->flags & SDL_WINDOW_RESIZABLE) { - style |= NSResizableWindowMask; - } - } + } else { + if (window->flags & SDL_WINDOW_BORDERLESS) { + style = NSBorderlessWindowMask; + } else { + style = (NSTitledWindowMask|NSClosableWindowMask|NSMiniaturizableWindowMask); + } + if (window->flags & SDL_WINDOW_RESIZABLE) { + style |= NSResizableWindowMask; + } + } return style; } @@ -688,7 +691,7 @@ Cocoa_CreateWindow(_THIS, SDL_Window * window) } nswindow = [[SDLWindow alloc] initWithContentRect:rect styleMask:style backing:NSBackingStoreBuffered defer:NO screen:screen]; - // Create a default view for this window + /* Create a default view for this window */ rect = [nswindow contentRectForFrameRect:[nswindow frame]]; NSView *contentView = [[SDLView alloc] initWithFrame:rect]; [nswindow setContentView: contentView]; @@ -804,13 +807,13 @@ Cocoa_SetWindowMinimumSize(_THIS, SDL_Window * window) { NSAutoreleasePool *pool = [[NSAutoreleasePool alloc] init]; SDL_WindowData *windata = (SDL_WindowData *) window->driverdata; - + NSSize minSize; minSize.width = window->min_w; minSize.height = window->min_h; - + [windata->nswindow setContentMinSize:minSize]; - + [pool release]; } @@ -819,13 +822,13 @@ Cocoa_SetWindowMaximumSize(_THIS, SDL_Window * window) { NSAutoreleasePool *pool = [[NSAutoreleasePool alloc] init]; SDL_WindowData *windata = (SDL_WindowData *) window->driverdata; - + NSSize maxSize; maxSize.width = window->max_w; maxSize.height = window->max_h; - + [windata->nswindow setContentMaxSize:maxSize]; - + [pool release]; } @@ -937,7 +940,7 @@ Cocoa_SetWindowBordered(_THIS, SDL_Window * window, SDL_bool bordered) if ([nswindow respondsToSelector:@selector(setStyleMask:)]) { [nswindow setStyleMask:GetWindowStyle(window)]; if (bordered) { - Cocoa_SetWindowTitle(_this, window); // this got blanked out. + Cocoa_SetWindowTitle(_this, window); /* this got blanked out. */ } } [pool release]; @@ -1090,17 +1093,17 @@ Cocoa_SetWindowGrab(_THIS, SDL_Window * window, SDL_bool grabbed) cgpoint.y = window->y + y; CGDisplayMoveCursorToPoint(kCGDirectMainDisplay, cgpoint); } - - if ( window->flags & SDL_WINDOW_FULLSCREEN ) { - SDL_WindowData *data = (SDL_WindowData *) window->driverdata; - if (SDL_ShouldAllowTopmost() && (window->flags & SDL_WINDOW_INPUT_FOCUS)) { - /* OpenGL is rendering to the window, so make it visible! */ - [data->nswindow setLevel:CGShieldingWindowLevel()]; - } else { - [data->nswindow setLevel:kCGNormalWindowLevel]; - } - } + if ( window->flags & SDL_WINDOW_FULLSCREEN ) { + SDL_WindowData *data = (SDL_WindowData *) window->driverdata; + + if (SDL_ShouldAllowTopmost() && (window->flags & SDL_WINDOW_INPUT_FOCUS)) { + /* OpenGL is rendering to the window, so make it visible! */ + [data->nswindow setLevel:CGShieldingWindowLevel()]; + } else { + [data->nswindow setLevel:kCGNormalWindowLevel]; + } + } } void diff --git a/src/video/directfb/SDL_DirectFB_WM.c b/src/video/directfb/SDL_DirectFB_WM.c index 84e76ca1c..8241d9b3d 100644 --- a/src/video/directfb/SDL_DirectFB_WM.c +++ b/src/video/directfb/SDL_DirectFB_WM.c @@ -81,24 +81,24 @@ LoadFont(_THIS, SDL_Window * window) SDL_DFB_DEVICEDATA(_this); SDL_DFB_WINDOWDATA(window); - if (windata->font != NULL) { - SDL_DFB_RELEASE(windata->font); - windata->font = NULL; - SDL_DFB_CHECK(windata->window_surface->SetFont(windata->window_surface, windata->font)); - } - - if (windata->theme.font != NULL) - { + if (windata->font != NULL) { + SDL_DFB_RELEASE(windata->font); + windata->font = NULL; + SDL_DFB_CHECK(windata->window_surface->SetFont(windata->window_surface, windata->font)); + } + + if (windata->theme.font != NULL) + { DFBFontDescription fdesc; - SDL_zero(fdesc); - fdesc.flags = DFDESC_HEIGHT; - fdesc.height = windata->theme.font_size; - SDL_DFB_CHECK(devdata-> - dfb->CreateFont(devdata->dfb, windata->theme.font, - &fdesc, &windata->font)); - SDL_DFB_CHECK(windata->window_surface->SetFont(windata->window_surface, windata->font)); - } + SDL_zero(fdesc); + fdesc.flags = DFDESC_HEIGHT; + fdesc.height = windata->theme.font_size; + SDL_DFB_CHECK(devdata-> + dfb->CreateFont(devdata->dfb, windata->theme.font, + &fdesc, &windata->font)); + SDL_DFB_CHECK(windata->window_surface->SetFont(windata->window_surface, windata->font)); + } } static void @@ -130,8 +130,8 @@ DirectFB_WM_RedrawLayout(_THIS, SDL_Window * window) SDL_DFB_CHECK(s->SetDrawingFlags(s, DSDRAW_NOFX)); SDL_DFB_CHECK(s->SetBlittingFlags(s, DSBLIT_NOFX)); - LoadFont(_this, window); - //s->SetDrawingFlags(s, DSDRAW_BLEND); + LoadFont(_this, window); + /*s->SetDrawingFlags(s, DSDRAW_BLEND); */ s->SetColor(s, COLOR_EXPAND(t->frame_color)); /* top */ for (i = 0; i < t->top_size; i++) @@ -162,7 +162,7 @@ DirectFB_WM_RedrawLayout(_THIS, SDL_Window * window) /* Caption */ if (window->title) { - s->SetColor(s, COLOR_EXPAND(t->font_color)); + s->SetColor(s, COLOR_EXPAND(t->font_color)); DrawCraption(_this, s, (x - w) / 2, t->top_size + d, window->title); } /* Icon */ @@ -184,7 +184,7 @@ DFBResult DirectFB_WM_GetClientSize(_THIS, SDL_Window * window, int *cw, int *ch) { SDL_DFB_WINDOWDATA(window); - IDirectFBWindow *dfbwin = windata->dfbwin; + IDirectFBWindow *dfbwin = windata->dfbwin; SDL_DFB_CHECK(dfbwin->GetSize(dfbwin, cw, ch)); dfbwin->GetSize(dfbwin, cw, ch); @@ -203,8 +203,8 @@ DirectFB_WM_AdjustWindowLayout(SDL_Window * window, int flags, int w, int h) if (!windata->is_managed) windata->theme = theme_none; else if (flags & SDL_WINDOW_BORDERLESS) - //desc.caps |= DWCAPS_NODECORATION;) - windata->theme = theme_none; + /*desc.caps |= DWCAPS_NODECORATION;) */ + windata->theme = theme_none; else if (flags & SDL_WINDOW_FULLSCREEN) { windata->theme = theme_none; } else if (flags & SDL_WINDOW_MAXIMIZED) { @@ -289,8 +289,8 @@ DirectFB_WM_ProcessEvent(_THIS, SDL_Window * window, DFBWindowEvent * evt) { SDL_DFB_DEVICEDATA(_this); SDL_DFB_WINDOWDATA(window); - DFB_WindowData *gwindata = ((devdata->grabbed_window) ? (DFB_WindowData *) ((devdata->grabbed_window)->driverdata) : NULL); - IDirectFBWindow *dfbwin = windata->dfbwin; + DFB_WindowData *gwindata = ((devdata->grabbed_window) ? (DFB_WindowData *) ((devdata->grabbed_window)->driverdata) : NULL); + IDirectFBWindow *dfbwin = windata->dfbwin; DFBWindowOptions wopts; if (!windata->is_managed) @@ -306,29 +306,29 @@ DirectFB_WM_ProcessEvent(_THIS, SDL_Window * window, DFBWindowEvent * evt) case WM_POS_NONE: return 0; case WM_POS_CLOSE: - windata->wm_grab = WM_POS_NONE; + windata->wm_grab = WM_POS_NONE; SDL_SendWindowEvent(window, SDL_WINDOWEVENT_CLOSE, 0, 0); return 1; case WM_POS_MAX: - windata->wm_grab = WM_POS_NONE; - if (window->flags & SDL_WINDOW_MAXIMIZED) { - SDL_RestoreWindow(window); - } else { - SDL_MaximizeWindow(window); - } + windata->wm_grab = WM_POS_NONE; + if (window->flags & SDL_WINDOW_MAXIMIZED) { + SDL_RestoreWindow(window); + } else { + SDL_MaximizeWindow(window); + } return 1; case WM_POS_CAPTION: - if (!(wopts & DWOP_KEEP_STACKING)) { - DirectFB_RaiseWindow(_this, window); - } - if (window->flags & SDL_WINDOW_MAXIMIZED) - return 1; + if (!(wopts & DWOP_KEEP_STACKING)) { + DirectFB_RaiseWindow(_this, window); + } + if (window->flags & SDL_WINDOW_MAXIMIZED) + return 1; /* fall through */ default: windata->wm_grab = pos; if (gwindata != NULL) - SDL_DFB_CHECK(gwindata->dfbwin->UngrabPointer(gwindata->dfbwin)); + SDL_DFB_CHECK(gwindata->dfbwin->UngrabPointer(gwindata->dfbwin)); SDL_DFB_CHECK(dfbwin->GrabPointer(dfbwin)); windata->wm_lastx = evt->cx; windata->wm_lasty = evt->cy; @@ -343,21 +343,21 @@ DirectFB_WM_ProcessEvent(_THIS, SDL_Window * window, DFBWindowEvent * evt) int dx = evt->cx - windata->wm_lastx; int dy = evt->cy - windata->wm_lasty; - if (!(wopts & DWOP_KEEP_SIZE)) { + if (!(wopts & DWOP_KEEP_SIZE)) { int cw, ch; - if ((windata->wm_grab & (WM_POS_BOTTOM | WM_POS_RIGHT)) == WM_POS_BOTTOM) - dx = 0; - else if ((windata->wm_grab & (WM_POS_BOTTOM | WM_POS_RIGHT)) == WM_POS_RIGHT) - dy = 0; - SDL_DFB_CHECK(dfbwin->GetSize(dfbwin, &cw, &ch)); + if ((windata->wm_grab & (WM_POS_BOTTOM | WM_POS_RIGHT)) == WM_POS_BOTTOM) + dx = 0; + else if ((windata->wm_grab & (WM_POS_BOTTOM | WM_POS_RIGHT)) == WM_POS_RIGHT) + dy = 0; + SDL_DFB_CHECK(dfbwin->GetSize(dfbwin, &cw, &ch)); - /* necessary to trigger an event - ugly*/ - SDL_DFB_CHECK(dfbwin->DisableEvents(dfbwin, DWET_ALL)); - SDL_DFB_CHECK(dfbwin->Resize(dfbwin, cw + dx + 1, ch + dy)); - SDL_DFB_CHECK(dfbwin->EnableEvents(dfbwin, DWET_ALL)); + /* necessary to trigger an event - ugly*/ + SDL_DFB_CHECK(dfbwin->DisableEvents(dfbwin, DWET_ALL)); + SDL_DFB_CHECK(dfbwin->Resize(dfbwin, cw + dx + 1, ch + dy)); + SDL_DFB_CHECK(dfbwin->EnableEvents(dfbwin, DWET_ALL)); - SDL_DFB_CHECK(dfbwin->Resize(dfbwin, cw + dx, ch + dy)); - } + SDL_DFB_CHECK(dfbwin->Resize(dfbwin, cw + dx, ch + dy)); + } } SDL_DFB_CHECK(dfbwin->UngrabPointer(dfbwin)); if (gwindata != NULL) @@ -370,34 +370,34 @@ DirectFB_WM_ProcessEvent(_THIS, SDL_Window * window, DFBWindowEvent * evt) if (!windata->wm_grab) return 0; if (evt->buttons & DIBM_LEFT) { - int dx = evt->cx - windata->wm_lastx; + int dx = evt->cx - windata->wm_lastx; int dy = evt->cy - windata->wm_lasty; if (windata->wm_grab & WM_POS_CAPTION) { - if (!(wopts & DWOP_KEEP_POSITION)) - SDL_DFB_CHECK(dfbwin->Move(dfbwin, dx, dy)); + if (!(wopts & DWOP_KEEP_POSITION)) + SDL_DFB_CHECK(dfbwin->Move(dfbwin, dx, dy)); } if (windata->wm_grab & (WM_POS_RIGHT | WM_POS_BOTTOM)) { - if (!(wopts & DWOP_KEEP_SIZE)) { - int cw, ch; + if (!(wopts & DWOP_KEEP_SIZE)) { + int cw, ch; - /* Make sure all events are disabled for this operation ! */ - SDL_DFB_CHECK(dfbwin->DisableEvents(dfbwin, DWET_ALL)); + /* Make sure all events are disabled for this operation ! */ + SDL_DFB_CHECK(dfbwin->DisableEvents(dfbwin, DWET_ALL)); - if ((windata->wm_grab & (WM_POS_BOTTOM | WM_POS_RIGHT)) == WM_POS_BOTTOM) - dx = 0; - else if ((windata->wm_grab & (WM_POS_BOTTOM | WM_POS_RIGHT)) == WM_POS_RIGHT) - dy = 0; + if ((windata->wm_grab & (WM_POS_BOTTOM | WM_POS_RIGHT)) == WM_POS_BOTTOM) + dx = 0; + else if ((windata->wm_grab & (WM_POS_BOTTOM | WM_POS_RIGHT)) == WM_POS_RIGHT) + dy = 0; - SDL_DFB_CHECK(dfbwin->GetSize(dfbwin, &cw, &ch)); - SDL_DFB_CHECK(dfbwin->Resize(dfbwin, cw + dx, ch + dy)); + SDL_DFB_CHECK(dfbwin->GetSize(dfbwin, &cw, &ch)); + SDL_DFB_CHECK(dfbwin->Resize(dfbwin, cw + dx, ch + dy)); - SDL_DFB_CHECK(dfbwin->EnableEvents(dfbwin, DWET_ALL)); - } + SDL_DFB_CHECK(dfbwin->EnableEvents(dfbwin, DWET_ALL)); + } } - windata->wm_lastx = evt->cx; - windata->wm_lasty = evt->cy; - return 1; + windata->wm_lastx = evt->cx; + windata->wm_lasty = evt->cy; + return 1; } break; case DWET_KEYDOWN: diff --git a/src/video/directfb/SDL_DirectFB_dyn.c b/src/video/directfb/SDL_DirectFB_dyn.c index 496909252..cbbfa175b 100644 --- a/src/video/directfb/SDL_DirectFB_dyn.c +++ b/src/video/directfb/SDL_DirectFB_dyn.c @@ -32,7 +32,7 @@ #define DFB_SYM(ret, name, args, al, func) ret (*name) args; static struct _SDL_DirectFB_Symbols { - DFB_SYMS + DFB_SYMS const unsigned int *directfb_major_version; const unsigned int *directfb_minor_version; const unsigned int *directfb_micro_version; diff --git a/src/video/directfb/SDL_DirectFB_dyn.h b/src/video/directfb/SDL_DirectFB_dyn.h index de90961a6..52658b01f 100644 --- a/src/video/directfb/SDL_DirectFB_dyn.h +++ b/src/video/directfb/SDL_DirectFB_dyn.h @@ -23,15 +23,15 @@ #define _SDL_DirectFB_dyn_h #define DFB_SYMS \ - DFB_SYM(DFBResult, DirectFBError, (const char *msg, DFBResult result), (msg, result), return) \ - DFB_SYM(DFBResult, DirectFBErrorFatal, (const char *msg, DFBResult result), (msg, result), return) \ - DFB_SYM(const char *, DirectFBErrorString, (DFBResult result), (result), return) \ - DFB_SYM(const char *, DirectFBUsageString, ( void ), (), return) \ - DFB_SYM(DFBResult, DirectFBInit, (int *argc, char *(*argv[]) ), (argc, argv), return) \ - DFB_SYM(DFBResult, DirectFBSetOption, (const char *name, const char *value), (name, value), return) \ - DFB_SYM(DFBResult, DirectFBCreate, (IDirectFB **interface), (interface), return) \ - DFB_SYM(const char *, DirectFBCheckVersion, (unsigned int required_major, unsigned int required_minor, unsigned int required_micro), \ - (required_major, required_minor, required_micro), return) + DFB_SYM(DFBResult, DirectFBError, (const char *msg, DFBResult result), (msg, result), return) \ + DFB_SYM(DFBResult, DirectFBErrorFatal, (const char *msg, DFBResult result), (msg, result), return) \ + DFB_SYM(const char *, DirectFBErrorString, (DFBResult result), (result), return) \ + DFB_SYM(const char *, DirectFBUsageString, ( void ), (), return) \ + DFB_SYM(DFBResult, DirectFBInit, (int *argc, char *(*argv[]) ), (argc, argv), return) \ + DFB_SYM(DFBResult, DirectFBSetOption, (const char *name, const char *value), (name, value), return) \ + DFB_SYM(DFBResult, DirectFBCreate, (IDirectFB **interface), (interface), return) \ + DFB_SYM(const char *, DirectFBCheckVersion, (unsigned int required_major, unsigned int required_minor, unsigned int required_micro), \ + (required_major, required_minor, required_micro), return) int SDL_DirectFB_LoadLibrary(void); void SDL_DirectFB_UnLoadLibrary(void); diff --git a/src/video/directfb/SDL_DirectFB_events.c b/src/video/directfb/SDL_DirectFB_events.c index 8ee0b9085..ffb15c362 100644 --- a/src/video/directfb/SDL_DirectFB_events.c +++ b/src/video/directfb/SDL_DirectFB_events.c @@ -52,11 +52,11 @@ #endif typedef struct _cb_data cb_data; -struct _cb_data +struct _cb_data { - DFB_DeviceData *devdata; - int sys_ids; - int sys_kbd; + DFB_DeviceData *devdata; + int sys_ids; + int sys_kbd; }; /* The translation tables from a DirectFB keycode to a SDL keysym */ @@ -74,7 +74,7 @@ static int DirectFB_TranslateButton(DFBInputDeviceButtonIdentifier button); static void UnicodeToUtf8( Uint16 w , char *utf8buf) { unsigned char *utf8s = (unsigned char *) utf8buf; - + if ( w < 0x0080 ) { utf8s[0] = ( unsigned char ) w; utf8s[1] = 0; @@ -82,14 +82,14 @@ static void UnicodeToUtf8( Uint16 w , char *utf8buf) else if ( w < 0x0800 ) { utf8s[0] = 0xc0 | (( w ) >> 6 ); utf8s[1] = 0x80 | (( w ) & 0x3f ); - utf8s[2] = 0; + utf8s[2] = 0; } else { utf8s[0] = 0xe0 | (( w ) >> 12 ); utf8s[1] = 0x80 | (( ( w ) >> 6 ) & 0x3f ); utf8s[2] = 0x80 | (( w ) & 0x3f ); utf8s[3] = 0; - } + } } static void @@ -132,7 +132,7 @@ MotionAllMice(_THIS, int x, int y) SDL_Mouse *mouse = SDL_GetMouse(index); mouse->x = mouse->last_x = x; mouse->y = mouse->last_y = y; - //SDL_SendMouseMotion(devdata->mouse_id[index], 0, x, y, 0); + /*SDL_SendMouseMotion(devdata->mouse_id[index], 0, x, y, 0);*/ } #endif } @@ -215,7 +215,7 @@ ProcessWindowEvent(_THIS, SDL_Window *sdlwin, DFBWindowEvent * evt) SDL_SendMouseMotion_ex(sdlwin, devdata->mouse_id[0], 0, evt->x, evt->y, 0); } else { - /* relative movements are not exact! + /* relative movements are not exact! * This code should limit the number of events sent. * However it kills MAME axis recognition ... */ static int cnt = 0; @@ -232,10 +232,10 @@ ProcessWindowEvent(_THIS, SDL_Window *sdlwin, DFBWindowEvent * evt) case DWET_KEYDOWN: if (!devdata->use_linux_input) { DirectFB_TranslateKey(_this, evt, &keysym); - //printf("Scancode %d %d %d\n", keysym.scancode, evt->key_code, evt->key_id); + /*printf("Scancode %d %d %d\n", keysym.scancode, evt->key_code, evt->key_id);*/ SDL_SendKeyboardKey_ex(0, SDL_PRESSED, keysym.scancode); if (SDL_EventState(SDL_TEXTINPUT, SDL_QUERY)) { - SDL_zero(text); + SDL_zero(text); UnicodeToUtf8(keysym.unicode, text); if (*text) { SDL_SendKeyboardText_ex(0, text); @@ -262,7 +262,7 @@ ProcessWindowEvent(_THIS, SDL_Window *sdlwin, DFBWindowEvent * evt) } /* fall throught */ case DWET_SIZE: - // FIXME: what about < 0 + /* FIXME: what about < 0 */ evt->w -= (windata->theme.right_size + windata->theme.left_size); evt->h -= (windata->theme.top_size + windata->theme.bottom_size + @@ -286,7 +286,7 @@ ProcessWindowEvent(_THIS, SDL_Window *sdlwin, DFBWindowEvent * evt) case DWET_ENTER: /* SDL_DirectFB_ReshowCursor(_this, 0); */ FocusAllMice(_this, sdlwin); - // FIXME: when do we really enter ? + /* FIXME: when do we really enter ? */ if (ClientXY(windata, &evt->x, &evt->y)) MotionAllMice(_this, evt->x, evt->y); SDL_SendWindowEvent(sdlwin, SDL_WINDOWEVENT_ENTER, 0, 0); @@ -367,7 +367,7 @@ ProcessInputEvent(_THIS, DFBInputEvent * ievt) case DIET_KEYPRESS: kbd_idx = KbdIndex(_this, ievt->device_id); DirectFB_TranslateKeyInputEvent(_this, ievt, &keysym); - //printf("Scancode %d %d %d\n", keysym.scancode, evt->key_code, evt->key_id); + /*printf("Scancode %d %d %d\n", keysym.scancode, evt->key_code, evt->key_id); */ SDL_SendKeyboardKey_ex(kbd_idx, SDL_PRESSED, keysym.scancode); if (SDL_EventState(SDL_TEXTINPUT, SDL_QUERY)) { SDL_zero(text); @@ -435,7 +435,7 @@ DirectFB_PumpEventsWindow(_THIS) while (devdata->events->GetEvent(devdata->events, DFB_EVENT(&ievt)) == DFB_OK) { - if (SDL_GetEventState(SDL_SYSWMEVENT) == SDL_ENABLE) { + if (SDL_GetEventState(SDL_SYSWMEVENT) == SDL_ENABLE) { SDL_SysWMmsg wmmsg; SDL_VERSION(&wmmsg.version); wmmsg.subsystem = SDL_SYSWM_DIRECTFB; @@ -584,8 +584,8 @@ DirectFB_TranslateKey(_THIS, DFBWindowEvent * evt, SDL_Keysym * keysym) keysym->scancode = SDL_SCANCODE_UNKNOWN; if (kbd->map && evt->key_code >= kbd->map_adjust && - evt->key_code < kbd->map_size + kbd->map_adjust) - keysym->scancode = kbd->map[evt->key_code - kbd->map_adjust]; + evt->key_code < kbd->map_size + kbd->map_adjust) + keysym->scancode = kbd->map[evt->key_code - kbd->map_adjust]; if (keysym->scancode == SDL_SCANCODE_UNKNOWN || devdata->keyboard[kbd_idx].is_generic) { @@ -615,8 +615,8 @@ DirectFB_TranslateKeyInputEvent(_THIS, DFBInputEvent * evt, keysym->scancode = SDL_SCANCODE_UNKNOWN; if (kbd->map && evt->key_code >= kbd->map_adjust && - evt->key_code < kbd->map_size + kbd->map_adjust) - keysym->scancode = kbd->map[evt->key_code - kbd->map_adjust]; + evt->key_code < kbd->map_size + kbd->map_adjust) + keysym->scancode = kbd->map[evt->key_code - kbd->map_adjust]; if (keysym->scancode == SDL_SCANCODE_UNKNOWN || devdata->keyboard[kbd_idx].is_generic) { if (evt->key_id - DIKI_UNKNOWN < SDL_arraysize(oskeymap)) @@ -653,26 +653,26 @@ static DFBEnumerationResult EnumKeyboards(DFBInputDeviceID device_id, DFBInputDeviceDescription desc, void *callbackdata) { - cb_data *cb = callbackdata; + cb_data *cb = callbackdata; DFB_DeviceData *devdata = cb->devdata; #if USE_MULTI_API SDL_Keyboard keyboard; #endif SDL_Keycode keymap[SDL_NUM_SCANCODES]; - if (!cb->sys_kbd) { - if (cb->sys_ids) { - if (device_id >= 0x10) - return DFENUM_OK; - } else { - if (device_id < 0x10) - return DFENUM_OK; - } - } else { - if (device_id != DIDID_KEYBOARD) - return DFENUM_OK; - } - + if (!cb->sys_kbd) { + if (cb->sys_ids) { + if (device_id >= 0x10) + return DFENUM_OK; + } else { + if (device_id < 0x10) + return DFENUM_OK; + } + } else { + if (device_id != DIDID_KEYBOARD) + return DFENUM_OK; + } + if ((desc.caps & DIDTF_KEYBOARD)) { #if USE_MULTI_API SDL_zero(keyboard); @@ -682,17 +682,17 @@ EnumKeyboards(DFBInputDeviceID device_id, devdata->keyboard[devdata->num_keyboard].is_generic = 0; if (!strncmp("X11", desc.name, 3)) { - devdata->keyboard[devdata->num_keyboard].map = xfree86_scancode_table2; - devdata->keyboard[devdata->num_keyboard].map_size = SDL_arraysize(xfree86_scancode_table2); - devdata->keyboard[devdata->num_keyboard].map_adjust = 8; + devdata->keyboard[devdata->num_keyboard].map = xfree86_scancode_table2; + devdata->keyboard[devdata->num_keyboard].map_size = SDL_arraysize(xfree86_scancode_table2); + devdata->keyboard[devdata->num_keyboard].map_adjust = 8; } else { - devdata->keyboard[devdata->num_keyboard].map = linux_scancode_table; - devdata->keyboard[devdata->num_keyboard].map_size = SDL_arraysize(linux_scancode_table); - devdata->keyboard[devdata->num_keyboard].map_adjust = 0; + devdata->keyboard[devdata->num_keyboard].map = linux_scancode_table; + devdata->keyboard[devdata->num_keyboard].map_size = SDL_arraysize(linux_scancode_table); + devdata->keyboard[devdata->num_keyboard].map_adjust = 0; } - SDL_DFB_LOG("Keyboard %d - %s\n", device_id, desc.name); - + SDL_DFB_LOG("Keyboard %d - %s\n", device_id, desc.name); + SDL_GetDefaultKeymap(keymap); #if USE_MULTI_API SDL_SetKeymap(devdata->num_keyboard, 0, keymap, SDL_NUM_SCANCODES); @@ -701,8 +701,8 @@ EnumKeyboards(DFBInputDeviceID device_id, #endif devdata->num_keyboard++; - if (cb->sys_kbd) - return DFENUM_CANCEL; + if (cb->sys_kbd) + return DFENUM_CANCEL; } return DFENUM_OK; } @@ -711,15 +711,15 @@ void DirectFB_InitKeyboard(_THIS) { SDL_DFB_DEVICEDATA(_this); - cb_data cb; - + cb_data cb; + DirectFB_InitOSKeymap(_this, &oskeymap[0], SDL_arraysize(oskeymap)); devdata->num_keyboard = 0; cb.devdata = devdata; - + if (devdata->use_linux_input) { - cb.sys_kbd = 0; + cb.sys_kbd = 0; cb.sys_ids = 0; SDL_DFB_CHECK(devdata->dfb-> EnumInputDevices(devdata->dfb, EnumKeyboards, &cb)); @@ -730,7 +730,7 @@ DirectFB_InitKeyboard(_THIS) &cb)); } } else { - cb.sys_kbd = 1; + cb.sys_kbd = 1; SDL_DFB_CHECK(devdata->dfb->EnumInputDevices(devdata->dfb, EnumKeyboards, &cb)); @@ -740,7 +740,7 @@ DirectFB_InitKeyboard(_THIS) void DirectFB_QuitKeyboard(_THIS) { - //SDL_DFB_DEVICEDATA(_this); + /*SDL_DFB_DEVICEDATA(_this); */ SDL_KeyboardQuit(); diff --git a/src/video/directfb/SDL_DirectFB_modes.c b/src/video/directfb/SDL_DirectFB_modes.c index d3a7a54fa..c6d1bb49c 100644 --- a/src/video/directfb/SDL_DirectFB_modes.c +++ b/src/video/directfb/SDL_DirectFB_modes.c @@ -137,7 +137,7 @@ DirectFB_SetContext(_THIS, SDL_Window *window) SDL_VideoDisplay *display = SDL_GetDisplayForWindow(window); DFB_DisplayData *dispdata = (DFB_DisplayData *) display->driverdata; - /* FIXME: should we handle the error */ + /* FIXME: should we handle the error */ if (dispdata->vidIDinuse) SDL_DFB_CHECK(dispdata->vidlayer->SwitchContext(dispdata->vidlayer, DFB_TRUE)); @@ -220,7 +220,7 @@ DirectFB_InitModes(_THIS) SDL_DFB_CHECKERR(layer->GetConfiguration(layer, &dlc)); mode.format = DirectFB_DFBToSDLPixelFormat(dlc.pixelformat); - + if (mode.format == SDL_PIXELFORMAT_UNKNOWN) { SDL_DFB_ERR("Unknown dfb pixelformat %x !\n", dlc.pixelformat); goto error; @@ -309,7 +309,7 @@ DirectFB_SetDisplayMode(_THIS, SDL_VideoDisplay * display, SDL_DisplayMode * mod { /* * FIXME: video mode switch is currently broken for 1.2.0 - * + * */ SDL_DFB_DEVICEDATA(_this); diff --git a/src/video/directfb/SDL_DirectFB_modes.h b/src/video/directfb/SDL_DirectFB_modes.h index d9defec32..6e439cdc9 100644 --- a/src/video/directfb/SDL_DirectFB_modes.h +++ b/src/video/directfb/SDL_DirectFB_modes.h @@ -31,19 +31,19 @@ typedef struct _DFB_DisplayData DFB_DisplayData; struct _DFB_DisplayData { - IDirectFBDisplayLayer *layer; - DFBSurfacePixelFormat pixelformat; - /* FIXME: support for multiple video layer. - * However, I do not know any card supporting + IDirectFBDisplayLayer *layer; + DFBSurfacePixelFormat pixelformat; + /* FIXME: support for multiple video layer. + * However, I do not know any card supporting * more than one */ - DFBDisplayLayerID vidID; - IDirectFBDisplayLayer *vidlayer; + DFBDisplayLayerID vidID; + IDirectFBDisplayLayer *vidlayer; - int vidIDinuse; + int vidIDinuse; - int cw; - int ch; + int cw; + int ch; }; diff --git a/src/video/directfb/SDL_DirectFB_mouse.c b/src/video/directfb/SDL_DirectFB_mouse.c index 2377c877a..fb5ed4e7b 100644 --- a/src/video/directfb/SDL_DirectFB_mouse.c +++ b/src/video/directfb/SDL_DirectFB_mouse.c @@ -115,12 +115,12 @@ DirectFB_CreateDefaultCursor(void) { for (j = 0; j < 32; j++) { - switch (arrow[i][j]) - { - case ' ': dest[j] = 0x00000000; break; - case '.': dest[j] = 0xffffffff; break; - case 'X': dest[j] = 0xff000000; break; - } + switch (arrow[i][j]) + { + case ' ': dest[j] = 0x00000000; break; + case '.': dest[j] = 0xffffffff; break; + case 'X': dest[j] = 0xff000000; break; + } } dest += (pitch >> 2); } diff --git a/src/video/directfb/SDL_DirectFB_mouse.h b/src/video/directfb/SDL_DirectFB_mouse.h index b65f9fddb..906f1fb5e 100644 --- a/src/video/directfb/SDL_DirectFB_mouse.h +++ b/src/video/directfb/SDL_DirectFB_mouse.h @@ -30,8 +30,8 @@ typedef struct _DFB_CursorData DFB_CursorData; struct _DFB_CursorData { IDirectFBSurface *surf; - int hotx; - int hoty; + int hotx; + int hoty; }; #define SDL_DFB_CURSORDATA(curs) DFB_CursorData *curdata = (DFB_CursorData *) ((curs) ? (curs)->driverdata : NULL) diff --git a/src/video/directfb/SDL_DirectFB_opengl.c b/src/video/directfb/SDL_DirectFB_opengl.c index c325f4231..fac05e6f2 100644 --- a/src/video/directfb/SDL_DirectFB_opengl.c +++ b/src/video/directfb/SDL_DirectFB_opengl.c @@ -40,7 +40,7 @@ struct SDL_GLDriverData int gl_active; /* to stop switching drivers while we have a valid context */ int initialized; DirectFB_GLContext *firstgl; /* linked list */ - + /* OpenGL */ void (*glFinish) (void); void (*glFlush) (void); @@ -49,13 +49,13 @@ struct SDL_GLDriverData #define OPENGL_REQUIRS_DLOPEN #if defined(OPENGL_REQUIRS_DLOPEN) && defined(SDL_LOADSO_DLOPEN) #include -#define GL_LoadObject(X) dlopen(X, (RTLD_NOW|RTLD_GLOBAL)) -#define GL_LoadFunction dlsym -#define GL_UnloadObject dlclose +#define GL_LoadObject(X) dlopen(X, (RTLD_NOW|RTLD_GLOBAL)) +#define GL_LoadFunction dlsym +#define GL_UnloadObject dlclose #else -#define GL_LoadObject SDL_LoadObject -#define GL_LoadFunction SDL_LoadFunction -#define GL_UnloadObject SDL_UnloadObject +#define GL_LoadObject SDL_LoadObject +#define GL_LoadFunction SDL_LoadFunction +#define GL_UnloadObject SDL_UnloadObject #endif static void DirectFB_GL_UnloadLibrary(_THIS); @@ -107,8 +107,6 @@ DirectFB_GL_Shutdown(_THIS) int DirectFB_GL_LoadLibrary(_THIS, const char *path) { - //SDL_DFB_DEVICEDATA(_this); - void *handle = NULL; SDL_DFB_DEBUG("Loadlibrary : %s\n", path); @@ -181,7 +179,6 @@ DirectFB_GL_GetProcAddress(_THIS, const char *proc) SDL_GLContext DirectFB_GL_CreateContext(_THIS, SDL_Window * window) { - //SDL_DFB_DEVICEDATA(_this); SDL_DFB_WINDOWDATA(window); DirectFB_GLContext *context; @@ -195,7 +192,7 @@ DirectFB_GL_CreateContext(_THIS, SDL_Window * window) context->is_locked = 0; context->sdl_window = window; - + context->next = _this->gl_data->firstgl; _this->gl_data->firstgl = context; @@ -215,7 +212,6 @@ DirectFB_GL_CreateContext(_THIS, SDL_Window * window) int DirectFB_GL_MakeCurrent(_THIS, SDL_Window * window, SDL_GLContext context) { - //SDL_DFB_WINDOWDATA(window); DirectFB_GLContext *ctx = (DirectFB_GLContext *) context; DirectFB_GLContext *p; @@ -225,7 +221,7 @@ DirectFB_GL_MakeCurrent(_THIS, SDL_Window * window, SDL_GLContext context) SDL_DFB_CHECKERR(p->context->Unlock(p->context)); p->is_locked = 0; } - + } if (ctx != NULL) { @@ -253,7 +249,6 @@ DirectFB_GL_GetSwapInterval(_THIS) void DirectFB_GL_SwapWindow(_THIS, SDL_Window * window) { - //SDL_DFB_DEVICEDATA(_this); SDL_DFB_WINDOWDATA(window); DFBRegion region; DirectFB_GLContext *p; @@ -270,20 +265,14 @@ DirectFB_GL_SwapWindow(_THIS, SDL_Window * window) devdata->glFlush(); #endif - for (p = _this->gl_data->firstgl; p != NULL; p = p->next) + for (p = _this->gl_data->firstgl; p != NULL; p = p->next) if (p->sdl_window == window && p->is_locked) { SDL_DFB_CHECKERR(p->context->Unlock(p->context)); p->is_locked = 0; - } + } SDL_DFB_CHECKERR(windata->window_surface->Flip(windata->window_surface,NULL, DSFLIP_PIPELINE |DSFLIP_BLIT | DSFLIP_ONSYNC )); - - //if (windata->gl_context) { - //SDL_DFB_CHECKERR(windata->surface->Flip(windata->surface,NULL, DSFLIP_ONSYNC)); - //SDL_DFB_CHECKERR(windata->gl_context->context->Lock(windata->gl_context->context)); - //} - return; error: return; @@ -313,14 +302,14 @@ void DirectFB_GL_FreeWindowContexts(_THIS, SDL_Window * window) { DirectFB_GLContext *p; - - for (p = _this->gl_data->firstgl; p != NULL; p = p->next) - if (p->sdl_window == window) - { - if (p->is_locked) - SDL_DFB_CHECK(p->context->Unlock(p->context)); - SDL_DFB_RELEASE(p->context); - } + + for (p = _this->gl_data->firstgl; p != NULL; p = p->next) + if (p->sdl_window == window) + { + if (p->is_locked) + SDL_DFB_CHECK(p->context->Unlock(p->context)); + SDL_DFB_RELEASE(p->context); + } } void @@ -328,15 +317,15 @@ DirectFB_GL_ReAllocWindowContexts(_THIS, SDL_Window * window) { DirectFB_GLContext *p; - for (p = _this->gl_data->firstgl; p != NULL; p = p->next) - if (p->sdl_window == window) - { + for (p = _this->gl_data->firstgl; p != NULL; p = p->next) + if (p->sdl_window == window) + { SDL_DFB_WINDOWDATA(window); - SDL_DFB_CHECK(windata->surface->GetGL(windata->surface, - &p->context)); - if (p->is_locked) - SDL_DFB_CHECK(p->context->Lock(p->context)); - } + SDL_DFB_CHECK(windata->surface->GetGL(windata->surface, + &p->context)); + if (p->is_locked) + SDL_DFB_CHECK(p->context->Lock(p->context)); + } } void @@ -344,9 +333,9 @@ DirectFB_GL_DestroyWindowContexts(_THIS, SDL_Window * window) { DirectFB_GLContext *p; - for (p = _this->gl_data->firstgl; p != NULL; p = p->next) - if (p->sdl_window == window) - DirectFB_GL_DeleteContext(_this, p); + for (p = _this->gl_data->firstgl; p != NULL; p = p->next) + if (p->sdl_window == window) + DirectFB_GL_DeleteContext(_this, p); } #endif diff --git a/src/video/directfb/SDL_DirectFB_opengl.h b/src/video/directfb/SDL_DirectFB_opengl.h index 53d1572aa..efb11f766 100644 --- a/src/video/directfb/SDL_DirectFB_opengl.h +++ b/src/video/directfb/SDL_DirectFB_opengl.h @@ -32,11 +32,11 @@ typedef struct _DirectFB_GLContext DirectFB_GLContext; struct _DirectFB_GLContext { - IDirectFBGL *context; - DirectFB_GLContext *next; - - SDL_Window *sdl_window; - int is_locked; + IDirectFBGL *context; + DirectFB_GLContext *next; + + SDL_Window *sdl_window; + int is_locked; }; /* OpenGL functions */ diff --git a/src/video/directfb/SDL_DirectFB_render.c b/src/video/directfb/SDL_DirectFB_render.c index 07aa77d11..958793db7 100644 --- a/src/video/directfb/SDL_DirectFB_render.c +++ b/src/video/directfb/SDL_DirectFB_render.c @@ -21,7 +21,6 @@ #include "SDL_config.h" #if SDL_VIDEO_DRIVER_DIRECTFB -//#include "SDL_DirectFB_video.h" #include "SDL_DirectFB_window.h" #include "SDL_DirectFB_modes.h" @@ -30,8 +29,6 @@ #include "../SDL_sysvideo.h" #include "../../render/SDL_sysrender.h" -//#include "../SDL_rect_c.h" -//#include "../SDL_yuv_sw_c.h" #ifndef DFB_VERSION_ATLEAST @@ -242,7 +239,7 @@ SetBlendMode(DirectFB_RenderData * data, int blendMode, { IDirectFBSurface *destsurf = data->target; - //FIXME: check for format change + /* FIXME: check for format change */ if (1 || data->lastBlendMode != blendMode) { switch (blendMode) { case SDL_BLENDMODE_NONE: @@ -269,9 +266,9 @@ SetBlendMode(DirectFB_RenderData * data, int blendMode, case SDL_BLENDMODE_ADD: data->blitFlags = DSBLIT_BLEND_ALPHACHANNEL; data->drawFlags = DSDRAW_BLEND; - // FIXME: SRCALPHA kills performance on radeon ... - // It will be cheaper to copy the surface to - // a temporay surface and premultiply + /* FIXME: SRCALPHA kills performance on radeon ... */ + * It will be cheaper to copy the surface to a temporary surface and premultiply + */ if (source && TextureHasAlpha(source)) SDL_DFB_CHECK(destsurf->SetSrcBlendFunction(destsurf, DSBF_SRCALPHA)); else @@ -281,9 +278,6 @@ SetBlendMode(DirectFB_RenderData * data, int blendMode, case SDL_BLENDMODE_MOD: data->blitFlags = DSBLIT_BLEND_ALPHACHANNEL; data->drawFlags = DSDRAW_BLEND; - //SDL_DFB_CHECK(destsurf->SetSrcBlendFunction(destsurf, DSBF_DESTCOLOR)); - //SDL_DFB_CHECK(destsurf->SetDstBlendFunction(destsurf, DSBF_ZERO)); - //data->glBlendFunc(GL_ZERO, GL_SRC_COLOR); SDL_DFB_CHECK(destsurf->SetSrcBlendFunction(destsurf, DSBF_ZERO)); SDL_DFB_CHECK(destsurf->SetDstBlendFunction(destsurf, DSBF_SRCCOLOR)); @@ -332,8 +326,8 @@ DirectFB_WindowEvent(SDL_Renderer * renderer, const SDL_WindowEvent *event) if (event->event == SDL_WINDOWEVENT_SIZE_CHANGED) { /* Rebind the context to the window area and update matrices */ - //SDL_CurrentContext = NULL; - //data->updateSize = SDL_TRUE; + /*SDL_CurrentContext = NULL; */ + /*data->updateSize = SDL_TRUE; */ renddata->size_changed = SDL_TRUE; } } @@ -362,7 +356,6 @@ DirectFB_CreateRenderer(SDL_Window * window, Uint32 flags) SDL_Renderer *renderer = NULL; DirectFB_RenderData *data = NULL; DFBSurfaceCapabilities scaps; - //char *p; SDL_DFB_ALLOC_CLEAR(renderer, sizeof(*renderer)); SDL_DFB_ALLOC_CLEAR(data, sizeof(*data)); @@ -386,7 +379,7 @@ DirectFB_CreateRenderer(SDL_Window * window, Uint32 flags) /* FIXME: Yet to be tested */ renderer->RenderReadPixels = DirectFB_RenderReadPixels; - //renderer->RenderWritePixels = DirectFB_RenderWritePixels; + /*renderer->RenderWritePixels = DirectFB_RenderWritePixels; */ renderer->DestroyTexture = DirectFB_DestroyTexture; renderer->DestroyRenderer = DirectFB_DestroyRenderer; @@ -458,7 +451,6 @@ DirectFB_ActivateRenderer(SDL_Renderer * renderer) SDL_DFB_WINDOWDATA(window); if (renddata->size_changed /*|| windata->wm_needs_redraw*/) { - //DirectFB_AdjustWindowSurface(window); renddata->size_changed = SDL_FALSE; } } @@ -467,7 +459,6 @@ DirectFB_ActivateRenderer(SDL_Renderer * renderer) static int DirectFB_AcquireVidLayer(SDL_Renderer * renderer, SDL_Texture * texture) { - //SDL_DFB_RENDERERDATA(renderer); SDL_Window *window = renderer->window; SDL_VideoDisplay *display = SDL_GetDisplayForWindow(window); SDL_DFB_DEVICEDATA(display->device); @@ -586,7 +577,7 @@ DirectFB_CreateTexture(SDL_Renderer * renderer, SDL_Texture * texture) * Creating a new palette does not help. */ DFBPaletteDescription pal_desc; - pal_desc.flags = DPDESC_SIZE; // | DPDESC_ENTRIES + pal_desc.flags = DPDESC_SIZE; /* | DPDESC_ENTRIES */ pal_desc.size = 256; SDL_DFB_CHECKERR(devdata->dfb->CreatePalette(devdata->dfb, &pal_desc,&data->palette)); SDL_DFB_CHECKERR(data->surface->SetPalette(data->surface, data->palette)); @@ -710,7 +701,7 @@ DirectFB_SetTextureBlendMode(SDL_Renderer * renderer, SDL_Texture * texture) { switch (texture->blendMode) { case SDL_BLENDMODE_NONE: - //case SDL_BLENDMODE_MASK: + /*case SDL_BLENDMODE_MASK: */ case SDL_BLENDMODE_BLEND: case SDL_BLENDMODE_ADD: case SDL_BLENDMODE_MOD: @@ -726,7 +717,7 @@ DirectFB_SetDrawBlendMode(SDL_Renderer * renderer) { switch (renderer->blendMode) { case SDL_BLENDMODE_NONE: - //case SDL_BLENDMODE_MASK: + /*case SDL_BLENDMODE_MASK: */ case SDL_BLENDMODE_BLEND: case SDL_BLENDMODE_ADD: case SDL_BLENDMODE_MOD: @@ -778,7 +769,7 @@ DirectFB_UpdateTexture(SDL_Renderer * renderer, SDL_Texture * texture, int row; size_t length; int bpp = DFB_BYTES_PER_PIXEL(DirectFB_SDLToDFBPixelFormat(texture->format)); - // FIXME: SDL_BYTESPERPIXEL(texture->format) broken for yuv yv12 3 planes + /* FIXME: SDL_BYTESPERPIXEL(texture->format) broken for yuv yv12 3 planes */ DirectFB_ActivateRenderer(renderer); @@ -925,7 +916,7 @@ PrepareDraw(SDL_Renderer * renderer) switch (renderer->blendMode) { case SDL_BLENDMODE_NONE: - //case SDL_BLENDMODE_MASK: + /*case SDL_BLENDMODE_MASK: */ case SDL_BLENDMODE_BLEND: break; case SDL_BLENDMODE_ADD: @@ -1035,7 +1026,7 @@ DirectFB_RenderFillRects(SDL_Renderer * renderer, const SDL_FRect * rects, int c destsurf->GetClip(destsurf, &clip_region); for (i=0; iFillRectangle(destsurf, dst.x, dst.y, @@ -1137,7 +1128,7 @@ DirectFB_RenderCopy(SDL_Renderer * renderer, SDL_Texture * texture, SDL_DFB_CHECKERR(destsurf-> SetColor(destsurf, r, g, b, alpha)); - // ???? flags |= DSBLIT_SRC_PREMULTCOLOR; + /* ???? flags |= DSBLIT_SRC_PREMULTCOLOR; */ SetBlendMode(data, texture->blendMode, texturedata); @@ -1208,7 +1199,6 @@ DirectFB_DestroyTexture(SDL_Renderer * renderer, SDL_Texture * texture) if (!data) { return; } - //SDL_FreeDirtyRects(&data->dirty); SDL_DFB_RELEASE(data->palette); SDL_DFB_RELEASE(data->surface); if (data->display) { diff --git a/src/video/directfb/SDL_DirectFB_shape.c b/src/video/directfb/SDL_DirectFB_shape.c index 01ac74449..13c3d703e 100644 --- a/src/video/directfb/SDL_DirectFB_shape.c +++ b/src/video/directfb/SDL_DirectFB_shape.c @@ -57,20 +57,20 @@ int DirectFB_ResizeWindowShape(SDL_Window* window) { SDL_ShapeData* data = window->shaper->driverdata; SDL_assert(data != NULL); - - if (window->x != -1000) + + if (window->x != -1000) { - window->shaper->userx = window->x; - window->shaper->usery = window->y; + window->shaper->userx = window->x; + window->shaper->usery = window->y; } SDL_SetWindowPosition(window,-1000,-1000); - + return 0; } - + int DirectFB_SetWindowShape(SDL_WindowShaper *shaper,SDL_Surface *shape,SDL_WindowShapeMode *shape_mode) { - + if(shaper == NULL || shape == NULL || shaper->driverdata == NULL) return -1; if(shape->format->Amask == 0 && SDL_SHAPEMODEALPHA(shape_mode->mode)) @@ -81,10 +81,10 @@ DirectFB_SetWindowShape(SDL_WindowShaper *shaper,SDL_Surface *shape,SDL_WindowSh { SDL_VideoDisplay *display = SDL_GetDisplayForWindow(shaper->window); SDL_DFB_DEVICEDATA(display->device); - Uint32 *pixels; - Sint32 pitch; - Uint32 h,w; - Uint8 *src, *bitmap; + Uint32 *pixels; + Sint32 pitch; + Uint32 h,w; + Uint8 *src, *bitmap; DFBSurfaceDescription dsc; SDL_ShapeData *data = shaper->driverdata; @@ -103,32 +103,32 @@ DirectFB_SetWindowShape(SDL_WindowShaper *shaper,SDL_Surface *shape,SDL_WindowSh SDL_DFB_ALLOC_CLEAR(bitmap, shape->w * shape->h); SDL_CalculateShapeBitmap(shaper->mode,shape,bitmap,1); - src = bitmap; + src = bitmap; SDL_DFB_CHECK(data->surface->Lock(data->surface, DSLF_WRITE | DSLF_READ, (void **) &pixels, &pitch)); - h = shaper->window->h; - while (h--) { - for (w = 0; w < shaper->window->w; w++) { - if (*src) - pixels[w] = 0xFFFFFFFF; - else - pixels[w] = 0; - src++; + h = shaper->window->h; + while (h--) { + for (w = 0; w < shaper->window->w; w++) { + if (*src) + pixels[w] = 0xFFFFFFFF; + else + pixels[w] = 0; + src++; - } - pixels += (pitch >> 2); - } + } + pixels += (pitch >> 2); + } SDL_DFB_CHECK(data->surface->Unlock(data->surface)); - SDL_DFB_FREE(bitmap); + SDL_DFB_FREE(bitmap); - /* FIXME: Need to call this here - Big ?? */ - DirectFB_WM_RedrawLayout(SDL_GetDisplayForWindow(shaper->window)->device, shaper->window); + /* FIXME: Need to call this here - Big ?? */ + DirectFB_WM_RedrawLayout(SDL_GetDisplayForWindow(shaper->window)->device, shaper->window); } - + return 0; error: - return -1; + return -1; } #endif /* SDL_VIDEO_DRIVER_DIRECTFB */ diff --git a/src/video/directfb/SDL_DirectFB_shape.h b/src/video/directfb/SDL_DirectFB_shape.h index b405bdea2..a99778533 100644 --- a/src/video/directfb/SDL_DirectFB_shape.h +++ b/src/video/directfb/SDL_DirectFB_shape.h @@ -28,12 +28,12 @@ #include "SDL_shape.h" typedef struct { - IDirectFBSurface *surface; + IDirectFBSurface *surface; } SDL_ShapeData; extern SDL_Window* DirectFB_CreateShapedWindow(const char *title,unsigned int x,unsigned int y,unsigned int w,unsigned int h,Uint32 flags); extern SDL_WindowShaper* DirectFB_CreateShaper(SDL_Window* window); extern int DirectFB_ResizeWindowShape(SDL_Window* window); -extern int DirectFB_SetWindowShape(SDL_WindowShaper *shaper,SDL_Surface *shape,SDL_WindowShapeMode *shapeMode); +extern int DirectFB_SetWindowShape(SDL_WindowShaper *shaper,SDL_Surface *shape,SDL_WindowShapeMode *shapeMode); #endif /* _SDL_DirectFB_shape_h */ diff --git a/src/video/directfb/SDL_DirectFB_video.c b/src/video/directfb/SDL_DirectFB_video.c index 3f9bba2ba..d20b5f122 100644 --- a/src/video/directfb/SDL_DirectFB_video.c +++ b/src/video/directfb/SDL_DirectFB_video.c @@ -148,13 +148,13 @@ DirectFB_CreateDevice(int devindex) #endif - /* Shaped window support */ - device->shape_driver.CreateShaper = DirectFB_CreateShaper; - device->shape_driver.SetWindowShape = DirectFB_SetWindowShape; - device->shape_driver.ResizeWindowShape = DirectFB_ResizeWindowShape; - + /* Shaped window support */ + device->shape_driver.CreateShaper = DirectFB_CreateShaper; + device->shape_driver.SetWindowShape = DirectFB_SetWindowShape; + device->shape_driver.ResizeWindowShape = DirectFB_ResizeWindowShape; + device->free = DirectFB_DeleteDevice; - + return device; error: if (device) @@ -235,19 +235,19 @@ DirectFB_VideoInit(_THIS) DirectFBSetOption("disable-module", "x11input"); } - /* FIXME: Reenable as default once multi kbd/mouse interface is sorted out */ - devdata->use_linux_input = readBoolEnv(DFBENV_USE_LINUX_INPUT, 0); /* default: on */ + /* FIXME: Reenable as default once multi kbd/mouse interface is sorted out */ + devdata->use_linux_input = readBoolEnv(DFBENV_USE_LINUX_INPUT, 0); /* default: on */ if (!devdata->use_linux_input) { - SDL_DFB_LOG("Disabling linxu input\n"); + SDL_DFB_LOG("Disabling linxu input\n"); DirectFBSetOption("disable-module", "linux_input"); } - + SDL_DFB_CHECKERR(DirectFBCreate(&dfb)); DirectFB_DeviceInformation(dfb); - + devdata->use_yuv_underlays = readBoolEnv(DFBENV_USE_YUV_UNDERLAY, 0); /* default: off */ devdata->use_yuv_direct = readBoolEnv(DFBENV_USE_YUV_DIRECT, 0); /* default is off! */ @@ -317,7 +317,7 @@ DirectFB_VideoQuit(_THIS) static const struct { DFBSurfacePixelFormat dfb; Uint32 sdl; -} pixelformat_tab[] = +} pixelformat_tab[] = { { DSPF_RGB32, SDL_PIXELFORMAT_RGB888 }, /* 24 bit RGB (4 byte, nothing@24, red 8@16, green 8@8, blue 8@0) */ { DSPF_ARGB, SDL_PIXELFORMAT_ARGB8888 }, /* 32 bit ARGB (4 byte, alpha 8@24, red 8@16, green 8@8, blue 8@0) */ @@ -342,38 +342,38 @@ static const struct { { DSPF_UNKNOWN, SDL_PIXELFORMAT_BGR555 }, #endif - /* Pfff ... nonmatching formats follow */ - + /* Pfff ... nonmatching formats follow */ + { DSPF_ALUT44, SDL_PIXELFORMAT_UNKNOWN }, /* 8 bit ALUT (1 byte, alpha 4@4, color lookup 4@0) */ - { DSPF_A8, SDL_PIXELFORMAT_UNKNOWN }, /* 8 bit alpha (1 byte, alpha 8@0), e.g. anti-aliased glyphs */ - { DSPF_AiRGB, SDL_PIXELFORMAT_UNKNOWN }, /* 32 bit ARGB (4 byte, inv. alpha 8@24, red 8@16, green 8@8, blue 8@0) */ - { DSPF_A1, SDL_PIXELFORMAT_UNKNOWN }, /* 1 bit alpha (1 byte/ 8 pixel, most significant bit used first) */ - { DSPF_NV12, SDL_PIXELFORMAT_UNKNOWN }, /* 12 bit YUV (8 bit Y plane followed by one 16 bit quarter size CbCr [15:0] plane) */ - { DSPF_NV16, SDL_PIXELFORMAT_UNKNOWN }, /* 16 bit YUV (8 bit Y plane followed by one 16 bit half width CbCr [15:0] plane) */ - { DSPF_ARGB2554, SDL_PIXELFORMAT_UNKNOWN }, /* 16 bit ARGB (2 byte, alpha 2@14, red 5@9, green 5@4, blue 4@0) */ - { DSPF_NV21, SDL_PIXELFORMAT_UNKNOWN }, /* 12 bit YUV (8 bit Y plane followed by one 16 bit quarter size CrCb [15:0] plane) */ - { DSPF_AYUV, SDL_PIXELFORMAT_UNKNOWN }, /* 32 bit AYUV (4 byte, alpha 8@24, Y 8@16, Cb 8@8, Cr 8@0) */ - { DSPF_A4, SDL_PIXELFORMAT_UNKNOWN }, /* 4 bit alpha (1 byte/ 2 pixel, more significant nibble used first) */ - { DSPF_ARGB1666, SDL_PIXELFORMAT_UNKNOWN }, /* 1 bit alpha (3 byte/ alpha 1@18, red 6@16, green 6@6, blue 6@0) */ - { DSPF_ARGB6666, SDL_PIXELFORMAT_UNKNOWN }, /* 6 bit alpha (3 byte/ alpha 6@18, red 6@16, green 6@6, blue 6@0) */ - { DSPF_RGB18, SDL_PIXELFORMAT_UNKNOWN }, /* 6 bit RGB (3 byte/ red 6@16, green 6@6, blue 6@0) */ - { DSPF_LUT2, SDL_PIXELFORMAT_UNKNOWN }, /* 2 bit LUT (1 byte/ 4 pixel, 2 bit color and alpha lookup from palette) */ + { DSPF_A8, SDL_PIXELFORMAT_UNKNOWN }, /* 8 bit alpha (1 byte, alpha 8@0), e.g. anti-aliased glyphs */ + { DSPF_AiRGB, SDL_PIXELFORMAT_UNKNOWN }, /* 32 bit ARGB (4 byte, inv. alpha 8@24, red 8@16, green 8@8, blue 8@0) */ + { DSPF_A1, SDL_PIXELFORMAT_UNKNOWN }, /* 1 bit alpha (1 byte/ 8 pixel, most significant bit used first) */ + { DSPF_NV12, SDL_PIXELFORMAT_UNKNOWN }, /* 12 bit YUV (8 bit Y plane followed by one 16 bit quarter size CbCr [15:0] plane) */ + { DSPF_NV16, SDL_PIXELFORMAT_UNKNOWN }, /* 16 bit YUV (8 bit Y plane followed by one 16 bit half width CbCr [15:0] plane) */ + { DSPF_ARGB2554, SDL_PIXELFORMAT_UNKNOWN }, /* 16 bit ARGB (2 byte, alpha 2@14, red 5@9, green 5@4, blue 4@0) */ + { DSPF_NV21, SDL_PIXELFORMAT_UNKNOWN }, /* 12 bit YUV (8 bit Y plane followed by one 16 bit quarter size CrCb [15:0] plane) */ + { DSPF_AYUV, SDL_PIXELFORMAT_UNKNOWN }, /* 32 bit AYUV (4 byte, alpha 8@24, Y 8@16, Cb 8@8, Cr 8@0) */ + { DSPF_A4, SDL_PIXELFORMAT_UNKNOWN }, /* 4 bit alpha (1 byte/ 2 pixel, more significant nibble used first) */ + { DSPF_ARGB1666, SDL_PIXELFORMAT_UNKNOWN }, /* 1 bit alpha (3 byte/ alpha 1@18, red 6@16, green 6@6, blue 6@0) */ + { DSPF_ARGB6666, SDL_PIXELFORMAT_UNKNOWN }, /* 6 bit alpha (3 byte/ alpha 6@18, red 6@16, green 6@6, blue 6@0) */ + { DSPF_RGB18, SDL_PIXELFORMAT_UNKNOWN }, /* 6 bit RGB (3 byte/ red 6@16, green 6@6, blue 6@0) */ + { DSPF_LUT2, SDL_PIXELFORMAT_UNKNOWN }, /* 2 bit LUT (1 byte/ 4 pixel, 2 bit color and alpha lookup from palette) */ #if (DFB_VERSION_ATLEAST(1,3,0)) - { DSPF_RGBA4444, SDL_PIXELFORMAT_UNKNOWN }, /* 16 bit RGBA (2 byte, red 4@12, green 4@8, blue 4@4, alpha 4@0) */ + { DSPF_RGBA4444, SDL_PIXELFORMAT_UNKNOWN }, /* 16 bit RGBA (2 byte, red 4@12, green 4@8, blue 4@4, alpha 4@0) */ #endif #if (DFB_VERSION_ATLEAST(1,4,3)) - { DSPF_RGBA5551, SDL_PIXELFORMAT_UNKNOWN }, /* 16 bit RGBA (2 byte, red 5@11, green 5@6, blue 5@1, alpha 1@0) */ - { DSPF_YUV444P, SDL_PIXELFORMAT_UNKNOWN }, /* 24 bit full YUV planar (8 bit Y plane followed by an 8 bit Cb and an 8 bit Cr plane) */ - { DSPF_ARGB8565, SDL_PIXELFORMAT_UNKNOWN }, /* 24 bit ARGB (3 byte, alpha 8@16, red 5@11, green 6@5, blue 5@0) */ - { DSPF_AVYU, SDL_PIXELFORMAT_UNKNOWN }, /* 32 bit AVYU 4:4:4 (4 byte, alpha 8@24, Cr 8@16, Y 8@8, Cb 8@0) */ - { DSPF_VYU, SDL_PIXELFORMAT_UNKNOWN }, /* 24 bit VYU 4:4:4 (3 byte, Cr 8@16, Y 8@8, Cb 8@0) */ + { DSPF_RGBA5551, SDL_PIXELFORMAT_UNKNOWN }, /* 16 bit RGBA (2 byte, red 5@11, green 5@6, blue 5@1, alpha 1@0) */ + { DSPF_YUV444P, SDL_PIXELFORMAT_UNKNOWN }, /* 24 bit full YUV planar (8 bit Y plane followed by an 8 bit Cb and an 8 bit Cr plane) */ + { DSPF_ARGB8565, SDL_PIXELFORMAT_UNKNOWN }, /* 24 bit ARGB (3 byte, alpha 8@16, red 5@11, green 6@5, blue 5@0) */ + { DSPF_AVYU, SDL_PIXELFORMAT_UNKNOWN }, /* 32 bit AVYU 4:4:4 (4 byte, alpha 8@24, Cr 8@16, Y 8@8, Cb 8@0) */ + { DSPF_VYU, SDL_PIXELFORMAT_UNKNOWN }, /* 24 bit VYU 4:4:4 (3 byte, Cr 8@16, Y 8@8, Cb 8@0) */ #endif - + { DSPF_UNKNOWN, SDL_PIXELFORMAT_INDEX1LSB }, { DSPF_UNKNOWN, SDL_PIXELFORMAT_INDEX1MSB }, - { DSPF_UNKNOWN, SDL_PIXELFORMAT_INDEX4LSB }, + { DSPF_UNKNOWN, SDL_PIXELFORMAT_INDEX4LSB }, { DSPF_UNKNOWN, SDL_PIXELFORMAT_INDEX4MSB }, { DSPF_UNKNOWN, SDL_PIXELFORMAT_BGR24 }, { DSPF_UNKNOWN, SDL_PIXELFORMAT_BGR888 }, @@ -384,14 +384,14 @@ static const struct { { DSPF_UNKNOWN, SDL_PIXELFORMAT_ABGR4444 }, { DSPF_UNKNOWN, SDL_PIXELFORMAT_ABGR1555 }, { DSPF_UNKNOWN, SDL_PIXELFORMAT_BGR565 }, - { DSPF_UNKNOWN, SDL_PIXELFORMAT_YVYU }, /**< Packed mode: Y0+V0+Y1+U0 (1 pla */ + { DSPF_UNKNOWN, SDL_PIXELFORMAT_YVYU }, /**< Packed mode: Y0+V0+Y1+U0 (1 pla */ }; Uint32 DirectFB_DFBToSDLPixelFormat(DFBSurfacePixelFormat pixelformat) { int i; - + for (i=0; pixelformat_tab[i].dfb != DSPF_UNKNOWN; i++) if (pixelformat_tab[i].dfb == pixelformat) { @@ -404,7 +404,7 @@ DFBSurfacePixelFormat DirectFB_SDLToDFBPixelFormat(Uint32 format) { int i; - + for (i=0; pixelformat_tab[i].dfb != DSPF_UNKNOWN; i++) if (pixelformat_tab[i].sdl == format) { @@ -415,11 +415,11 @@ DirectFB_SDLToDFBPixelFormat(Uint32 format) void DirectFB_SetSupportedPixelFormats(SDL_RendererInfo* ri) { - int i, j; + int i, j; for (i=0, j=0; pixelformat_tab[i].dfb != DSPF_UNKNOWN; i++) - if (pixelformat_tab[i].sdl != SDL_PIXELFORMAT_UNKNOWN) - ri->texture_formats[j++] = pixelformat_tab[i].sdl; + if (pixelformat_tab[i].sdl != SDL_PIXELFORMAT_UNKNOWN) + ri->texture_formats[j++] = pixelformat_tab[i].sdl; ri->num_texture_formats = j; } diff --git a/src/video/directfb/SDL_DirectFB_video.h b/src/video/directfb/SDL_DirectFB_video.h index 4980f7a5c..53fcdcfb9 100644 --- a/src/video/directfb/SDL_DirectFB_video.h +++ b/src/video/directfb/SDL_DirectFB_video.h @@ -33,14 +33,14 @@ #include "SDL_log.h" -#define DFB_VERSIONNUM(X, Y, Z) \ - ((X)*1000 + (Y)*100 + (Z)) +#define DFB_VERSIONNUM(X, Y, Z) \ + ((X)*1000 + (Y)*100 + (Z)) #define DFB_COMPILEDVERSION \ - DFB_VERSIONNUM(DIRECTFB_MAJOR_VERSION, DIRECTFB_MINOR_VERSION, DIRECTFB_MICRO_VERSION) + DFB_VERSIONNUM(DIRECTFB_MAJOR_VERSION, DIRECTFB_MINOR_VERSION, DIRECTFB_MICRO_VERSION) #define DFB_VERSION_ATLEAST(X, Y, Z) \ - (DFB_COMPILEDVERSION >= DFB_VERSIONNUM(X, Y, Z)) + (DFB_COMPILEDVERSION >= DFB_VERSIONNUM(X, Y, Z)) #if (DFB_VERSION_ATLEAST(1,0,0)) #ifdef SDL_VIDEO_OPENGL @@ -51,10 +51,10 @@ #endif /* Set below to 1 to compile with (old) multi mice/keyboard api. Code left in - * in case we see this again ... + * in case we see this again ... */ -#define USE_MULTI_API (0) +#define USE_MULTI_API (0) /* Support for LUT8/INDEX8 pixel format. * This is broken in DirectFB 1.4.3. It works in 1.4.0 and 1.4.5 @@ -62,18 +62,18 @@ */ #if (DFB_COMPILEDVERSION == DFB_VERSIONNUM(1, 4, 3)) -#define ENABLE_LUT8 (0) +#define ENABLE_LUT8 (0) #else -#define ENABLE_LUT8 (1) +#define ENABLE_LUT8 (1) #endif #define DIRECTFB_DEBUG 1 -#define DFBENV_USE_YUV_UNDERLAY "SDL_DIRECTFB_YUV_UNDERLAY" /* Default: off */ -#define DFBENV_USE_YUV_DIRECT "SDL_DIRECTFB_YUV_DIRECT" /* Default: off */ -#define DFBENV_USE_X11_CHECK "SDL_DIRECTFB_X11_CHECK" /* Default: on */ -#define DFBENV_USE_LINUX_INPUT "SDL_DIRECTFB_LINUX_INPUT" /* Default: on */ -#define DFBENV_USE_WM "SDL_DIRECTFB_WM" /* Default: off */ +#define DFBENV_USE_YUV_UNDERLAY "SDL_DIRECTFB_YUV_UNDERLAY" /* Default: off */ +#define DFBENV_USE_YUV_DIRECT "SDL_DIRECTFB_YUV_DIRECT" /* Default: off */ +#define DFBENV_USE_X11_CHECK "SDL_DIRECTFB_X11_CHECK" /* Default: on */ +#define DFBENV_USE_LINUX_INPUT "SDL_DIRECTFB_LINUX_INPUT" /* Default: on */ +#define DFBENV_USE_WM "SDL_DIRECTFB_WM" /* Default: off */ #define SDL_DFB_RELEASE(x) do { if ( (x) != NULL ) { SDL_DFB_CHECK(x->Release(x)); x = NULL; } } while (0) #define SDL_DFB_FREE(x) do { if ( (x) != NULL ) { SDL_free(x); x = NULL; } } while (0) @@ -89,11 +89,11 @@ #define SDL_DFB_DEBUG(x...) SDL_LogDebug(SDL_LOG_CATEGORY_VIDEO, x) static inline DFBResult sdl_dfb_check(DFBResult ret, const char *src_file, int src_line) { - if (ret != DFB_OK) { - SDL_DFB_LOG("%s (%d):%s", src_file, src_line, DirectFBErrorString (ret) ); - SDL_SetError("%s:%s", SDL_DFB_CONTEXT, DirectFBErrorString (ret) ); - } - return ret; + if (ret != DFB_OK) { + SDL_DFB_LOG("%s (%d):%s", src_file, src_line, DirectFBErrorString (ret) ); + SDL_SetError("%s:%s", SDL_DFB_CONTEXT, DirectFBErrorString (ret) ); + } + return ret; } #define SDL_DFB_CHECK(x...) do { sdl_dfb_check( x, __FILE__, __LINE__); } while (0) @@ -113,9 +113,9 @@ static inline DFBResult sdl_dfb_check(DFBResult ret, const char *src_file, int s do { \ r = SDL_calloc (n, s); \ if (!(r)) { \ - SDL_DFB_ERR("Out of memory"); \ + SDL_DFB_ERR("Out of memory"); \ SDL_OutOfMemory(); \ - goto error; \ + goto error; \ } \ } while (0) @@ -130,10 +130,10 @@ static inline DFBResult sdl_dfb_check(DFBResult ret, const char *src_file, int s typedef struct _DFB_KeyboardData DFB_KeyboardData; struct _DFB_KeyboardData { - const SDL_Scancode *map; /* keyboard scancode map */ - int map_size; /* size of map */ - int map_adjust; /* index adjust */ - int is_generic; /* generic keyboard */ + const SDL_Scancode *map; /* keyboard scancode map */ + int map_size; /* size of map */ + int map_adjust; /* index adjust */ + int is_generic; /* generic keyboard */ int id; }; @@ -142,21 +142,21 @@ struct _DFB_DeviceData { int initialized; - IDirectFB *dfb; - int num_mice; - int mouse_id[0x100]; - int num_keyboard; - DFB_KeyboardData keyboard[10]; - SDL_Window *firstwin; + IDirectFB *dfb; + int num_mice; + int mouse_id[0x100]; + int num_keyboard; + DFB_KeyboardData keyboard[10]; + SDL_Window *firstwin; - int use_yuv_underlays; - int use_yuv_direct; - int use_linux_input; - int has_own_wm; + int use_yuv_underlays; + int use_yuv_direct; + int use_linux_input; + int has_own_wm; - /* window grab */ - SDL_Window *grabbed_window; + /* window grab */ + SDL_Window *grabbed_window; /* global events */ IDirectFBEventBuffer *events; diff --git a/src/video/directfb/SDL_DirectFB_window.c b/src/video/directfb/SDL_DirectFB_window.c index 1ba4cfe60..cdcb4cce6 100644 --- a/src/video/directfb/SDL_DirectFB_window.c +++ b/src/video/directfb/SDL_DirectFB_window.c @@ -57,10 +57,10 @@ DirectFB_CreateWindow(_THIS, SDL_Window * window) SDL_DFB_CHECKERR(dispdata->layer->SetCooperativeLevel(dispdata->layer, DLSCL_ADMINISTRATIVE)); #endif - /* FIXME ... ughh, ugly */ - if (window->x == -1000 && window->y == -1000) - bshaped = 1; - + /* FIXME ... ughh, ugly */ + if (window->x == -1000 && window->y == -1000) + bshaped = 1; + /* Fill the window description. */ x = window->x; y = window->y; @@ -68,21 +68,21 @@ DirectFB_CreateWindow(_THIS, SDL_Window * window) DirectFB_WM_AdjustWindowLayout(window, window->flags, window->w, window->h); /* Create Window */ - desc.caps = 0; + desc.caps = 0; desc.flags = DWDESC_WIDTH | DWDESC_HEIGHT | DWDESC_POSX | DWDESC_POSY | DWDESC_SURFACE_CAPS; if (bshaped) { - desc.flags |= DWDESC_CAPS; - desc.caps |= DWCAPS_ALPHACHANNEL; + desc.flags |= DWDESC_CAPS; + desc.caps |= DWCAPS_ALPHACHANNEL; } else { - desc.flags |= DWDESC_PIXELFORMAT; + desc.flags |= DWDESC_PIXELFORMAT; } if (!(window->flags & SDL_WINDOW_BORDERLESS)) - desc.caps |= DWCAPS_NODECORATION; + desc.caps |= DWCAPS_NODECORATION; desc.posx = x; desc.posy = y; @@ -116,7 +116,7 @@ DirectFB_CreateWindow(_THIS, SDL_Window * window) wopts |= DWOP_KEEP_POSITION | DWOP_KEEP_STACKING | DWOP_KEEP_SIZE; SDL_DFB_CHECK(windata->dfbwin->SetStackingClass(windata->dfbwin, DWSC_UPPER)); } - + if (bshaped) { wopts |= DWOP_SHAPED | DWOP_ALPHACHANNEL; wopts &= ~DWOP_OPAQUE_REGION; @@ -155,7 +155,7 @@ DirectFB_CreateWindow(_THIS, SDL_Window * window) SDL_DFB_CHECK(windata->dfbwin->RaiseToTop(windata->dfbwin)); /* remember parent */ - //windata->sdlwin = window; + /*windata->sdlwin = window; */ /* Add to list ... */ @@ -168,7 +168,7 @@ DirectFB_CreateWindow(_THIS, SDL_Window * window) return 0; error: - SDL_DFB_RELEASE(windata->surface); + SDL_DFB_RELEASE(windata->surface); SDL_DFB_RELEASE(windata->dfbwin); return -1; } @@ -275,7 +275,7 @@ DirectFB_SetWindowSize(_THIS, SDL_Window * window) if (cw != window->w || ch != window->h) { - DirectFB_WM_AdjustWindowLayout(window, window->flags, window->w, window->h); + DirectFB_WM_AdjustWindowLayout(window, window->flags, window->w, window->h); SDL_DFB_CHECKERR(windata->dfbwin->Resize(windata->dfbwin, windata->size.w, windata->size.h)); @@ -367,7 +367,7 @@ DirectFB_RestoreWindow(_THIS, SDL_Window * window) /* Window layout */ DirectFB_WM_AdjustWindowLayout(window, window->flags & ~(SDL_WINDOW_MAXIMIZED | SDL_WINDOW_MINIMIZED), - windata->restore.w, windata->restore.h); + windata->restore.w, windata->restore.h); SDL_DFB_CHECK(windata->dfbwin->Resize(windata->dfbwin, windata->restore.w, windata->restore.h)); SDL_DFB_CHECK(windata->dfbwin->MoveTo(windata->dfbwin, windata->restore.x, @@ -393,8 +393,8 @@ DirectFB_SetWindowGrab(_THIS, SDL_Window * window, SDL_bool grabbed) if ((window->flags & SDL_WINDOW_INPUT_GRABBED)) { if (gwindata != NULL) { - SDL_DFB_CHECK(gwindata->dfbwin->UngrabPointer(gwindata->dfbwin)); - SDL_DFB_CHECK(gwindata->dfbwin->UngrabKeyboard(gwindata->dfbwin)); + SDL_DFB_CHECK(gwindata->dfbwin->UngrabPointer(gwindata->dfbwin)); + SDL_DFB_CHECK(gwindata->dfbwin->UngrabKeyboard(gwindata->dfbwin)); } SDL_DFB_CHECK(windata->dfbwin->GrabPointer(windata->dfbwin)); SDL_DFB_CHECK(windata->dfbwin->GrabKeyboard(windata->dfbwin)); @@ -418,22 +418,22 @@ DirectFB_DestroyWindow(_THIS, SDL_Window * window) SDL_DFB_CHECK(windata->dfbwin->UngrabKeyboard(windata->dfbwin)); #if SDL_DIRECTFB_OPENGL - DirectFB_GL_DestroyWindowContexts(_this, window); + DirectFB_GL_DestroyWindowContexts(_this, window); #endif - if (window->shaper) - { - SDL_ShapeData *data = window->shaper->driverdata; - SDL_DFB_CHECK(data->surface->ReleaseSource(data->surface)); - SDL_DFB_RELEASE(data->surface); - SDL_DFB_FREE(data); - SDL_DFB_FREE(window->shaper); - } + if (window->shaper) + { + SDL_ShapeData *data = window->shaper->driverdata; + SDL_DFB_CHECK(data->surface->ReleaseSource(data->surface)); + SDL_DFB_RELEASE(data->surface); + SDL_DFB_FREE(data); + SDL_DFB_FREE(window->shaper); + } SDL_DFB_CHECK(windata->window_surface->SetFont(windata->window_surface, NULL)); SDL_DFB_CHECK(windata->surface->ReleaseSource(windata->surface)); SDL_DFB_CHECK(windata->window_surface->ReleaseSource(windata->window_surface)); - SDL_DFB_RELEASE(windata->icon); + SDL_DFB_RELEASE(windata->icon); SDL_DFB_RELEASE(windata->font); SDL_DFB_RELEASE(windata->eventbuffer); SDL_DFB_RELEASE(windata->surface); @@ -494,7 +494,7 @@ DirectFB_AdjustWindowSurface(SDL_Window * window) if (adjust) { #if SDL_DIRECTFB_OPENGL - DirectFB_GL_FreeWindowContexts(SDL_GetVideoDevice(), window); + DirectFB_GL_FreeWindowContexts(SDL_GetVideoDevice(), window); #endif #if (DFB_VERSION_ATLEAST(1,2,1)) @@ -521,9 +521,9 @@ DirectFB_AdjustWindowSurface(SDL_Window * window) &windata->client, &windata->surface)); #endif DirectFB_WM_RedrawLayout(SDL_GetVideoDevice(), window); - + #if SDL_DIRECTFB_OPENGL - DirectFB_GL_ReAllocWindowContexts(SDL_GetVideoDevice(), window); + DirectFB_GL_ReAllocWindowContexts(SDL_GetVideoDevice(), window); #endif } error: diff --git a/src/video/directfb/SDL_DirectFB_window.h b/src/video/directfb/SDL_DirectFB_window.h index 43a08d308..a4a1cc840 100644 --- a/src/video/directfb/SDL_DirectFB_window.h +++ b/src/video/directfb/SDL_DirectFB_window.h @@ -30,28 +30,28 @@ typedef struct _DFB_WindowData DFB_WindowData; struct _DFB_WindowData { - IDirectFBSurface *window_surface; /* window surface */ - IDirectFBSurface *surface; /* client drawing surface */ - IDirectFBWindow *dfbwin; - IDirectFBEventBuffer *eventbuffer; - //SDL_Window *sdlwin; - SDL_Window *next; - Uint8 opacity; - DFBRectangle client; - DFBDimension size; - DFBRectangle restore; + IDirectFBSurface *window_surface; /* window surface */ + IDirectFBSurface *surface; /* client drawing surface */ + IDirectFBWindow *dfbwin; + IDirectFBEventBuffer *eventbuffer; + /*SDL_Window *sdlwin; */ + SDL_Window *next; + Uint8 opacity; + DFBRectangle client; + DFBDimension size; + DFBRectangle restore; /* WM extras */ - int is_managed; - int wm_needs_redraw; - IDirectFBSurface *icon; - IDirectFBFont *font; - DFB_Theme theme; + int is_managed; + int wm_needs_redraw; + IDirectFBSurface *icon; + IDirectFBFont *font; + DFB_Theme theme; /* WM moving and sizing */ - int wm_grab; - int wm_lastx; - int wm_lasty; + int wm_grab; + int wm_lastx; + int wm_lasty; }; extern int DirectFB_CreateWindow(_THIS, SDL_Window * window); diff --git a/src/video/pandora/SDL_pandora.c b/src/video/pandora/SDL_pandora.c index 77d12b79c..17c761bd6 100644 --- a/src/video/pandora/SDL_pandora.c +++ b/src/video/pandora/SDL_pandora.c @@ -38,7 +38,7 @@ /* WIZ declarations */ #include "GLES/gl.h" #ifdef WIZ_GLES_LITE -static NativeWindowType hNativeWnd = 0; // A handle to the window we will create. +static NativeWindowType hNativeWnd = 0; /* A handle to the window we will create. */ #endif static SDL_bool PND_initialized = SDL_FALSE; @@ -343,7 +343,7 @@ PND_gl_loadlibrary(_THIS, const char *path) /* Already linked with GF library which provides egl* subset of */ /* functions, use Common profile of OpenGL ES library by default */ #ifdef WIZ_GLES_LITE - path = "/lib/libopengles_lite.so"; + path = "/lib/libopengles_lite.so"; #else path = "/usr/lib/libGLES_CM.so"; #endif @@ -628,21 +628,21 @@ PND_gl_createcontext(_THIS, SDL_Window * window) #ifdef WIZ_GLES_LITE if( !hNativeWnd ) { - hNativeWnd = (NativeWindowType)malloc(16*1024); + hNativeWnd = (NativeWindowType)malloc(16*1024); - if(!hNativeWnd) - printf( "Error : Wiz framebuffer allocatation failed\n" ); - else - printf( "SDL13: Wiz framebuffer allocated: %X\n", hNativeWnd ); + if(!hNativeWnd) + printf( "Error : Wiz framebuffer allocatation failed\n" ); + else + printf( "SDL13: Wiz framebuffer allocated: %X\n", hNativeWnd ); } else { - printf( "SDL13: Wiz framebuffer already allocated: %X\n", hNativeWnd ); + printf( "SDL13: Wiz framebuffer already allocated: %X\n", hNativeWnd ); } wdata->gles_surface = - eglCreateWindowSurface(phdata->egl_display, - wdata->gles_configs[wdata->gles_config], - hNativeWnd, NULL ); + eglCreateWindowSurface(phdata->egl_display, + wdata->gles_configs[wdata->gles_config], + hNativeWnd, NULL ); #else wdata->gles_surface = eglCreateWindowSurface(phdata->egl_display, @@ -838,9 +838,9 @@ PND_gl_deletecontext(_THIS, SDL_GLContext context) #ifdef WIZ_GLES_LITE if( hNativeWnd != 0 ) { - free(hNativeWnd); - hNativeWnd = 0; - printf( "SDL13: Wiz framebuffer released\n" ); + free(hNativeWnd); + hNativeWnd = 0; + printf( "SDL13: Wiz framebuffer released\n" ); } #endif diff --git a/src/video/psp/SDL_pspevents.c b/src/video/psp/SDL_pspevents.c index e418daae2..54cd4e7d8 100644 --- a/src/video/psp/SDL_pspevents.c +++ b/src/video/psp/SDL_pspevents.c @@ -47,236 +47,236 @@ static SDL_sem *event_sem = NULL; static SDL_Thread *thread = NULL; static int running = 0; static struct { - enum PspHprmKeys id; - SDL_Keycode sym; + enum PspHprmKeys id; + SDL_Keycode sym; } keymap_psp[] = { - { PSP_HPRM_PLAYPAUSE, SDLK_F10 }, - { PSP_HPRM_FORWARD, SDLK_F11 }, - { PSP_HPRM_BACK, SDLK_F12 }, - { PSP_HPRM_VOL_UP, SDLK_F13 }, - { PSP_HPRM_VOL_DOWN, SDLK_F14 }, - { PSP_HPRM_HOLD, SDLK_F15 } + { PSP_HPRM_PLAYPAUSE, SDLK_F10 }, + { PSP_HPRM_FORWARD, SDLK_F11 }, + { PSP_HPRM_BACK, SDLK_F12 }, + { PSP_HPRM_VOL_UP, SDLK_F13 }, + { PSP_HPRM_VOL_DOWN, SDLK_F14 }, + { PSP_HPRM_HOLD, SDLK_F15 } }; int EventUpdate(void *data) { - while (running) { + while (running) { SDL_SemWait(event_sem); - sceHprmPeekCurrentKey(&hprm); + sceHprmPeekCurrentKey(&hprm); SDL_SemPost(event_sem); /* Delay 1/60th of a second */ - sceKernelDelayThread(1000000 / 60); + sceKernelDelayThread(1000000 / 60); } return 0; } void PSP_PumpEvents(_THIS) { - int i; - enum PspHprmKeys keys; - enum PspHprmKeys changed; - static enum PspHprmKeys old_keys = 0; - SDL_Keysym sym; + int i; + enum PspHprmKeys keys; + enum PspHprmKeys changed; + static enum PspHprmKeys old_keys = 0; + SDL_Keysym sym; - SDL_SemWait(event_sem); - keys = hprm; - SDL_SemPost(event_sem); + SDL_SemWait(event_sem); + keys = hprm; + SDL_SemPost(event_sem); - /* HPRM Keyboard */ - changed = old_keys ^ keys; - old_keys = keys; - if(changed) { - for(i=0; i= 0) { - if((length % sizeof(SIrKeybScanCodeData)) == 0){ - count = length / sizeof(SIrKeybScanCodeData); - for( i=0; i < count; i++ ) { - unsigned char raw, pressed; - scanData=(SIrKeybScanCodeData*) buffer+i; - raw = scanData->raw; - pressed = scanData->pressed; - sym.scancode = raw; - sym.sym = keymap[raw]; - /* not tested*/ - //SDL_PrivateKeyboard(pressed?SDL_PRESSED:SDL_RELEASED, &sym); - SDL_SendKeyboardKey((keys & keymap_psp[i].id) ? - SDL_PRESSED : SDL_RELEASED, SDL_GetScancodeFromKey(keymap[raw]); - - } - } - } - } -#endif - sceKernelDelayThread(0); + if (irkbd_ready) { + unsigned char buffer[255]; + int i, length, count; + SIrKeybScanCodeData *scanData; - return; + if(pspIrKeybReadinput(buffer, &length) >= 0) { + if((length % sizeof(SIrKeybScanCodeData)) == 0){ + count = length / sizeof(SIrKeybScanCodeData); + for( i=0; i < count; i++ ) { + unsigned char raw, pressed; + scanData=(SIrKeybScanCodeData*) buffer+i; + raw = scanData->raw; + pressed = scanData->pressed; + sym.scancode = raw; + sym.sym = keymap[raw]; + /* not tested*/ + /*SDL_PrivateKeyboard(pressed?SDL_PRESSED:SDL_RELEASED, &sym); */ + SDL_SendKeyboardKey((keys & keymap_psp[i].id) ? + SDL_PRESSED : SDL_RELEASED, SDL_GetScancodeFromKey(keymap[raw]); + + } + } + } + } +#endif + sceKernelDelayThread(0); + + return; } void PSP_InitOSKeymap(_THIS) { #ifdef PSPIRKEYB - int i; - for (i=0; igl_config.driver_loaded) { - _this->gl_config.driver_loaded = 1; + _this->gl_config.driver_loaded = 1; } return 0; } -/* pspgl doesn't provide this call, so stub it out since SDL requires it. +/* pspgl doesn't provide this call, so stub it out since SDL requires it. #define GLSTUB(func,params) void func params {} - + GLSTUB(glOrtho,(GLdouble left, GLdouble right, GLdouble bottom, GLdouble top, - GLdouble zNear, GLdouble zFar)) + GLdouble zNear, GLdouble zFar)) */ void * PSP_GL_GetProcAddress(_THIS, const char *proc) { - return eglGetProcAddress(proc); + return eglGetProcAddress(proc); } void PSP_GL_UnloadLibrary(_THIS) { - eglTerminate(_this->gl_data->display); + eglTerminate(_this->gl_data->display); } static EGLint width = 480; @@ -78,64 +78,64 @@ PSP_GL_CreateContext(_THIS, SDL_Window * window) SDL_WindowData *wdata = (SDL_WindowData *) window->driverdata; - EGLint attribs[32]; - EGLDisplay display; - EGLContext context; - EGLSurface surface; - EGLConfig config; - EGLint num_configs; - int i; - + EGLint attribs[32]; + EGLDisplay display; + EGLContext context; + EGLSurface surface; + EGLConfig config; + EGLint num_configs; + int i; - /* EGL init taken from glutCreateWindow() in PSPGL's glut.c. */ - EGLCHK(display = eglGetDisplay(0)); - EGLCHK(eglInitialize(display, NULL, NULL)); - wdata->uses_gles = SDL_TRUE; - window->flags |= SDL_WINDOW_FULLSCREEN; - - /* Setup the config based on SDL's current values. */ - i = 0; - attribs[i++] = EGL_RED_SIZE; - attribs[i++] = _this->gl_config.red_size; - attribs[i++] = EGL_GREEN_SIZE; - attribs[i++] = _this->gl_config.green_size; - attribs[i++] = EGL_BLUE_SIZE; - attribs[i++] = _this->gl_config.blue_size; - attribs[i++] = EGL_DEPTH_SIZE; - attribs[i++] = _this->gl_config.depth_size; - - if (_this->gl_config.alpha_size) - { - attribs[i++] = EGL_ALPHA_SIZE; - attribs[i++] = _this->gl_config.alpha_size; - } - if (_this->gl_config.stencil_size) - { - attribs[i++] = EGL_STENCIL_SIZE; - attribs[i++] = _this->gl_config.stencil_size; - } - - attribs[i++] = EGL_NONE; - - EGLCHK(eglChooseConfig(display, attribs, &config, 1, &num_configs)); - - if (num_configs == 0) - { - SDL_SetError("No valid EGL configs for requested mode"); - return 0; - } - - EGLCHK(eglGetConfigAttrib(display, config, EGL_WIDTH, &width)); - EGLCHK(eglGetConfigAttrib(display, config, EGL_HEIGHT, &height)); - EGLCHK(context = eglCreateContext(display, config, NULL, NULL)); - EGLCHK(surface = eglCreateWindowSurface(display, config, 0, NULL)); - EGLCHK(eglMakeCurrent(display, surface, surface, context)); - - _this->gl_data->display = display; - _this->gl_data->context = context; - _this->gl_data->surface = surface; - + /* EGL init taken from glutCreateWindow() in PSPGL's glut.c. */ + EGLCHK(display = eglGetDisplay(0)); + EGLCHK(eglInitialize(display, NULL, NULL)); + wdata->uses_gles = SDL_TRUE; + window->flags |= SDL_WINDOW_FULLSCREEN; + + /* Setup the config based on SDL's current values. */ + i = 0; + attribs[i++] = EGL_RED_SIZE; + attribs[i++] = _this->gl_config.red_size; + attribs[i++] = EGL_GREEN_SIZE; + attribs[i++] = _this->gl_config.green_size; + attribs[i++] = EGL_BLUE_SIZE; + attribs[i++] = _this->gl_config.blue_size; + attribs[i++] = EGL_DEPTH_SIZE; + attribs[i++] = _this->gl_config.depth_size; + + if (_this->gl_config.alpha_size) + { + attribs[i++] = EGL_ALPHA_SIZE; + attribs[i++] = _this->gl_config.alpha_size; + } + if (_this->gl_config.stencil_size) + { + attribs[i++] = EGL_STENCIL_SIZE; + attribs[i++] = _this->gl_config.stencil_size; + } + + attribs[i++] = EGL_NONE; + + EGLCHK(eglChooseConfig(display, attribs, &config, 1, &num_configs)); + + if (num_configs == 0) + { + SDL_SetError("No valid EGL configs for requested mode"); + return 0; + } + + EGLCHK(eglGetConfigAttrib(display, config, EGL_WIDTH, &width)); + EGLCHK(eglGetConfigAttrib(display, config, EGL_HEIGHT, &height)); + + EGLCHK(context = eglCreateContext(display, config, NULL, NULL)); + EGLCHK(surface = eglCreateWindowSurface(display, config, 0, NULL)); + EGLCHK(eglMakeCurrent(display, surface, surface, context)); + + _this->gl_data->display = display; + _this->gl_data->context = context; + _this->gl_data->surface = surface; + return context; } @@ -143,18 +143,18 @@ PSP_GL_CreateContext(_THIS, SDL_Window * window) int PSP_GL_MakeCurrent(_THIS, SDL_Window * window, SDL_GLContext context) { - if (!eglMakeCurrent(_this->gl_data->display, _this->gl_data->surface, - _this->gl_data->surface, _this->gl_data->context)) - { - return SDL_SetError("Unable to make EGL context current"); - } + if (!eglMakeCurrent(_this->gl_data->display, _this->gl_data->surface, + _this->gl_data->surface, _this->gl_data->context)) + { + return SDL_SetError("Unable to make EGL context current"); + } return 0; } int PSP_GL_SetSwapInterval(_THIS, int interval) { - EGLBoolean status; + EGLBoolean status; status = eglSwapInterval(_this->gl_data->display, interval); if (status == EGL_TRUE) { /* Return success to upper level */ diff --git a/src/video/psp/SDL_pspgl_c.h b/src/video/psp/SDL_pspgl_c.h index 73235ef68..8b20d1544 100644 --- a/src/video/psp/SDL_pspgl_c.h +++ b/src/video/psp/SDL_pspgl_c.h @@ -30,9 +30,9 @@ typedef struct SDL_GLDriverData { - EGLDisplay display; - EGLContext context; - EGLSurface surface; + EGLDisplay display; + EGLContext context; + EGLSurface surface; uint32_t swapinterval; }SDL_GLDriverData; diff --git a/src/video/psp/SDL_pspmouse.c b/src/video/psp/SDL_pspmouse.c index 8f0ffdc7d..002a518b4 100644 --- a/src/video/psp/SDL_pspmouse.c +++ b/src/video/psp/SDL_pspmouse.c @@ -31,5 +31,5 @@ /* The implementation dependent data for the window manager cursor */ struct WMcursor { - int unused; + int unused; }; diff --git a/src/video/psp/SDL_pspvideo.c b/src/video/psp/SDL_pspvideo.c index d84e69b92..ed5ab1c96 100644 --- a/src/video/psp/SDL_pspvideo.c +++ b/src/video/psp/SDL_pspvideo.c @@ -51,7 +51,7 @@ PSP_Available(void) static void PSP_Destroy(SDL_VideoDevice * device) { -// SDL_VideoData *phdata = (SDL_VideoData *) device->driverdata; +/* SDL_VideoData *phdata = (SDL_VideoData *) device->driverdata; */ if (device->driverdata != NULL) { device->driverdata = NULL; @@ -87,15 +87,15 @@ PSP_Create() SDL_free(device); return NULL; } - - gldata = (SDL_GLDriverData *) SDL_calloc(1, sizeof(SDL_GLDriverData)); + + gldata = (SDL_GLDriverData *) SDL_calloc(1, sizeof(SDL_GLDriverData)); if (gldata == NULL) { SDL_OutOfMemory(); SDL_free(device); return NULL; - } + } device->gl_data = gldata; - + device->driverdata = phdata; phdata->egl_initialized = SDL_TRUE; @@ -136,11 +136,11 @@ PSP_Create() device->GL_GetSwapInterval = PSP_GL_GetSwapInterval; device->GL_SwapWindow = PSP_GL_SwapWindow; device->GL_DeleteContext = PSP_GL_DeleteContext; - device->HasScreenKeyboardSupport = PSP_HasScreenKeyboardSupport; - device->ShowScreenKeyboard = PSP_ShowScreenKeyboard; - device->HideScreenKeyboard = PSP_HideScreenKeyboard; - device->IsScreenKeyboardShown = PSP_IsScreenKeyboardShown; - + device->HasScreenKeyboardSupport = PSP_HasScreenKeyboardSupport; + device->ShowScreenKeyboard = PSP_ShowScreenKeyboard; + device->HideScreenKeyboard = PSP_HideScreenKeyboard; + device->IsScreenKeyboardShown = PSP_IsScreenKeyboardShown; + device->PumpEvents = PSP_PumpEvents; return device; @@ -163,15 +163,14 @@ PSP_VideoInit(_THIS) SDL_DisplayMode current_mode; SDL_zero(current_mode); - + current_mode.w = 480; current_mode.h = 272; - + current_mode.refresh_rate = 60; - // 32 bpp for default - // current_mode.format = SDL_PIXELFORMAT_RGBA8888; + /* 32 bpp for default */ current_mode.format = SDL_PIXELFORMAT_ABGR8888; - + current_mode.driverdata = NULL; SDL_zero(display); @@ -201,23 +200,21 @@ PSP_SetDisplayMode(_THIS, SDL_VideoDisplay * display, SDL_DisplayMode * mode) { return 0; } -#define EGLCHK(stmt) \ - do { \ - EGLint err; \ - \ - stmt; \ - err = eglGetError(); \ - if (err != EGL_SUCCESS) { \ - SDL_SetError("EGL error %d", err); \ - return 0; \ - } \ - } while (0) - +#define EGLCHK(stmt) \ + do { \ + EGLint err; \ + \ + stmt; \ + err = eglGetError(); \ + if (err != EGL_SUCCESS) { \ + SDL_SetError("EGL error %d", err); \ + return 0; \ + } \ + } while (0) + int PSP_CreateWindow(_THIS, SDL_Window * window) { -// SDL_VideoData *phdata = (SDL_VideoData *) _this->driverdata; - SDL_WindowData *wdata; /* Allocate window internal data */ @@ -288,8 +285,6 @@ PSP_SetWindowGrab(_THIS, SDL_Window * window, SDL_bool grabbed) void PSP_DestroyWindow(_THIS, SDL_Window * window) { - -// eglTerminate(_this->gl_data->display); } /*****************************************************************************/ @@ -324,7 +319,7 @@ void PSP_HideScreenKeyboard(_THIS, SDL_Window *window) } SDL_bool PSP_IsScreenKeyboardShown(_THIS, SDL_Window *window) { - return SDL_FALSE; + return SDL_FALSE; } diff --git a/src/video/psp/SDL_pspvideo.h b/src/video/psp/SDL_pspvideo.h index 4c8a8cda4..d4ab32bfe 100644 --- a/src/video/psp/SDL_pspvideo.h +++ b/src/video/psp/SDL_pspvideo.h @@ -31,7 +31,7 @@ typedef struct SDL_VideoData { SDL_bool egl_initialized; /* OpenGL ES device initialization status */ uint32_t egl_refcount; /* OpenGL ES reference count */ - + } SDL_VideoData; @@ -46,7 +46,7 @@ typedef struct SDL_DisplayData typedef struct SDL_WindowData { SDL_bool uses_gles; /* if true window must support OpenGL ES */ - + } SDL_WindowData; @@ -96,7 +96,7 @@ SDL_bool PSP_HasScreenKeyboardSupport(_THIS); void PSP_ShowScreenKeyboard(_THIS, SDL_Window *window); void PSP_HideScreenKeyboard(_THIS, SDL_Window *window); SDL_bool PSP_IsScreenKeyboardShown(_THIS, SDL_Window *window); - + #endif /* __SDL_PANDORA_H__ */ /* vi: set ts=4 sw=4 expandtab: */ diff --git a/src/video/uikit/SDL_uikitappdelegate.m b/src/video/uikit/SDL_uikitappdelegate.m index 11e74025e..d13c2bbce 100644 --- a/src/video/uikit/SDL_uikitappdelegate.m +++ b/src/video/uikit/SDL_uikitappdelegate.m @@ -117,7 +117,7 @@ static void SDL_IdleTimerDisabledChanged(const char *name, const char *oldValue, if (self->splashLandscape) { [self->splashLandscape retain]; } - + [self updateSplashImage:[[UIApplication sharedApplication] statusBarOrientation]]; return self; @@ -126,8 +126,8 @@ static void SDL_IdleTimerDisabledChanged(const char *name, const char *oldValue, - (NSUInteger)supportedInterfaceOrientations { NSUInteger orientationMask = UIInterfaceOrientationMaskAll; - - // Don't allow upside-down orientation on the phone, so answering calls is in the natural orientation + + /* Don't allow upside-down orientation on the phone, so answering calls is in the natural orientation */ if ([[UIDevice currentDevice] userInterfaceIdiom] == UIUserInterfaceIdiomPhone) { orientationMask &= ~UIInterfaceOrientationMaskPortraitUpsideDown; } @@ -148,7 +148,7 @@ static void SDL_IdleTimerDisabledChanged(const char *name, const char *oldValue, - (void)updateSplashImage:(UIInterfaceOrientation)interfaceOrientation { UIImage *image; - + if (UIInterfaceOrientationIsLandscape(interfaceOrientation)) { image = self->splashLandscape; } else { @@ -199,9 +199,10 @@ static void SDL_IdleTimerDisabledChanged(const char *name, const char *oldValue, } /* exit, passing the return status from the user's application */ - // We don't actually exit to support applications that do setup in - // their main function and then allow the Cocoa event loop to run. - // exit(exit_status); + /* We don't actually exit to support applications that do setup in + * their main function and then allow the Cocoa event loop to run. + */ + /* exit(exit_status); */ } - (BOOL)application:(UIApplication *)application didFinishLaunchingWithOptions:(NSDictionary *)launchOptions diff --git a/src/video/uikit/SDL_uikitmessagebox.m b/src/video/uikit/SDL_uikitmessagebox.m index 26c218b01..5ec7e8b47 100644 --- a/src/video/uikit/SDL_uikitmessagebox.m +++ b/src/video/uikit/SDL_uikitmessagebox.m @@ -49,7 +49,7 @@ static SDL_bool s_showingMessageBox = SDL_FALSE; return nil; } self->clickedButtonIndex = buttonIndex; - + return self; } @@ -58,7 +58,7 @@ static SDL_bool s_showingMessageBox = SDL_FALSE; *clickedButtonIndex = buttonIndex; } -@end // UIKit_UIAlertViewDelegate +@end /* UIKit_UIAlertViewDelegate */ SDL_bool @@ -71,7 +71,7 @@ int UIKit_ShowMessageBox(const SDL_MessageBoxData *messageboxdata, int *buttonid) { int clicked; - + NSAutoreleasePool *pool = [[NSAutoreleasePool alloc] init]; UIAlertView* alert = [[UIAlertView alloc] init]; @@ -86,13 +86,13 @@ UIKit_ShowMessageBox(const SDL_MessageBoxData *messageboxdata, int *buttonid) [alert addButtonWithTitle:[[NSString alloc] initWithUTF8String:buttons[i].text]]; } - // Set up for showing the alert + /* Set up for showing the alert */ clicked = messageboxdata->numbuttons; [alert show]; - - // Run the main event loop until the alert has finished - // Note that this needs to be done on the main thread + + /* Run the main event loop until the alert has finished */ + /* Note that this needs to be done on the main thread */ s_showingMessageBox = SDL_TRUE; while (clicked == messageboxdata->numbuttons) { [[NSRunLoop currentRunLoop] runMode:NSDefaultRunLoopMode beforeDate:[NSDate distantFuture]]; @@ -100,7 +100,7 @@ UIKit_ShowMessageBox(const SDL_MessageBoxData *messageboxdata, int *buttonid) s_showingMessageBox = SDL_FALSE; *buttonid = messageboxdata->buttons[clicked].buttonid; - + [alert.delegate release]; [alert release]; diff --git a/src/video/uikit/SDL_uikitmodes.m b/src/video/uikit/SDL_uikitmodes.m index 87c3cc1e5..f093a81c6 100644 --- a/src/video/uikit/SDL_uikitmodes.m +++ b/src/video/uikit/SDL_uikitmodes.m @@ -34,22 +34,22 @@ UIKit_AllocateDisplayModeData(SDL_DisplayMode * mode, UIScreenMode * uiscreenmode, CGFloat scale) { SDL_DisplayModeData *data = NULL; - + if (uiscreenmode != nil) { /* Allocate the display mode data */ data = (SDL_DisplayModeData *) SDL_malloc(sizeof(*data)); if (!data) { return SDL_OutOfMemory(); } - + data->uiscreenmode = uiscreenmode; [data->uiscreenmode retain]; - + data->scale = scale; } - + mode->driverdata = data; - + return 0; } @@ -57,7 +57,7 @@ static void UIKit_FreeDisplayModeData(SDL_DisplayMode * mode) { if (!SDL_UIKit_supports_multiple_displays) { - // Not on at least iPhoneOS 3.2 (versions prior to iPad). + /* Not on at least iPhoneOS 3.2 (versions prior to iPad). */ SDL_assert(mode->driverdata == NULL); } else if (mode->driverdata != NULL) { SDL_DisplayModeData *data = (SDL_DisplayModeData *)mode->driverdata; @@ -73,13 +73,13 @@ UIKit_AddSingleDisplayMode(SDL_VideoDisplay * display, int w, int h, { SDL_DisplayMode mode; SDL_zero(mode); - + mode.format = SDL_PIXELFORMAT_ABGR8888; mode.refresh_rate = 0; if (UIKit_AllocateDisplayModeData(&mode, uiscreenmode, scale) < 0) { return -1; } - + mode.w = w; mode.h = h; if (SDL_AddDisplayMode(display, &mode)) { @@ -97,14 +97,14 @@ UIKit_AddDisplayMode(SDL_VideoDisplay * display, int w, int h, CGFloat scale, if (UIKit_AddSingleDisplayMode(display, w, h, uiscreenmode, scale) < 0) { return -1; } - + if (addRotation) { - // Add the rotated version + /* Add the rotated version */ if (UIKit_AddSingleDisplayMode(display, h, w, uiscreenmode, scale) < 0) { return -1; } } - + return 0; } @@ -113,25 +113,26 @@ UIKit_AddDisplay(UIScreen *uiscreen) { CGSize size = [uiscreen bounds].size; - // Make sure the width/height are oriented correctly + /* Make sure the width/height are oriented correctly */ if (UIKit_IsDisplayLandscape(uiscreen) != (size.width > size.height)) { CGFloat height = size.width; size.width = size.height; size.height = height; } - // When dealing with UIKit all coordinates are specified in terms of - // what Apple refers to as points. On earlier devices without the - // so called "Retina" display, there is a one to one mapping between - // points and pixels. In other cases [UIScreen scale] indicates the - // relationship between points and pixels. Since SDL has no notion - // of points, we must compensate in all cases where dealing with such - // units. + /* When dealing with UIKit all coordinates are specified in terms of + * what Apple refers to as points. On earlier devices without the + * so called "Retina" display, there is a one to one mapping between + * points and pixels. In other cases [UIScreen scale] indicates the + * relationship between points and pixels. Since SDL has no notion + * of points, we must compensate in all cases where dealing with such + * units. + */ CGFloat scale; if ([UIScreen instancesRespondToSelector:@selector(scale)]) { - scale = [uiscreen scale]; // iOS >= 4.0 + scale = [uiscreen scale]; /* iOS >= 4.0 */ } else { - scale = 1.0f; // iOS < 4.0 + scale = 1.0f; /* iOS < 4.0 */ } SDL_VideoDisplay display; @@ -140,14 +141,15 @@ UIKit_AddDisplay(UIScreen *uiscreen) mode.format = SDL_PIXELFORMAT_ABGR8888; mode.w = (int)(size.width * scale); mode.h = (int)(size.height * scale); - + UIScreenMode * uiscreenmode = nil; - // UIScreenMode showed up in 3.2 (the iPad and later). We're - // misusing this supports_multiple_displays flag here for that. + /* UIScreenMode showed up in 3.2 (the iPad and later). We're + * misusing this supports_multiple_displays flag here for that. + */ if (SDL_UIKit_supports_multiple_displays) { uiscreenmode = [uiscreen currentMode]; } - + if (UIKit_AllocateDisplayModeData(&mode, uiscreenmode, scale) < 0) { return -1; } @@ -162,14 +164,14 @@ UIKit_AddDisplay(UIScreen *uiscreen) UIKit_FreeDisplayModeData(&display.desktop_mode); return SDL_OutOfMemory(); } - + [uiscreen retain]; data->uiscreen = uiscreen; data->scale = scale; - + display.driverdata = data; SDL_AddVideoDisplay(&display); - + return 0; } @@ -187,20 +189,21 @@ UIKit_IsDisplayLandscape(UIScreen *uiscreen) int UIKit_InitModes(_THIS) { - // this tells us whether we are running on ios >= 3.2 + /* this tells us whether we are running on ios >= 3.2 */ SDL_UIKit_supports_multiple_displays = [UIScreen instancesRespondToSelector:@selector(currentMode)]; - // Add the main screen. + /* Add the main screen. */ if (UIKit_AddDisplay([UIScreen mainScreen]) < 0) { return -1; } - // If this is iPhoneOS < 3.2, all devices are one screen, 320x480 pixels. - // The iPad added both a larger main screen and the ability to use - // external displays. So, add the other displays (screens in UI speak). + /* If this is iPhoneOS < 3.2, all devices are one screen, 320x480 pixels. */ + /* The iPad added both a larger main screen and the ability to use + * external displays. So, add the other displays (screens in UI speak). + */ if (SDL_UIKit_supports_multiple_displays) { for (UIScreen *uiscreen in [UIScreen screens]) { - // Only add the other screens + /* Only add the other screens */ if (uiscreen != [UIScreen mainScreen]) { if (UIKit_AddDisplay(uiscreen) < 0) { return -1; @@ -222,27 +225,28 @@ UIKit_GetDisplayModes(_THIS, SDL_VideoDisplay * display) SDL_bool addRotation = (data->uiscreen == [UIScreen mainScreen]); if (SDL_UIKit_supports_multiple_displays) { - // availableModes showed up in 3.2 (the iPad and later). We should only - // land here for at least that version of the OS. + /* availableModes showed up in 3.2 (the iPad and later). We should only + * land here for at least that version of the OS. + */ for (UIScreenMode *uimode in [data->uiscreen availableModes]) { CGSize size = [uimode size]; int w = (int)size.width; int h = (int)size.height; - - // Make sure the width/height are oriented correctly + + /* Make sure the width/height are oriented correctly */ if (isLandscape != (w > h)) { int tmp = w; w = h; h = tmp; } - // Add the native screen resolution. + /* Add the native screen resolution. */ UIKit_AddDisplayMode(display, w, h, data->scale, uimode, addRotation); if (data->scale != 1.0f) { - // Add the native screen resolution divided by its scale. - // This is so devices capable of e.g. 640x960 also advertise - // 320x480. + /* Add the native screen resolution divided by its scale. + * This is so devices capable of e.g. 640x960 also advertise 320x480. + */ UIKit_AddDisplayMode(display, (int)(size.width / data->scale), (int)(size.height / data->scale), @@ -254,7 +258,7 @@ UIKit_GetDisplayModes(_THIS, SDL_VideoDisplay * display) int w = (int)size.width; int h = (int)size.height; - // Make sure the width/height are oriented correctly + /* Make sure the width/height are oriented correctly */ if (isLandscape != (w > h)) { int tmp = w; w = h; @@ -262,7 +266,7 @@ UIKit_GetDisplayModes(_THIS, SDL_VideoDisplay * display) } UIKit_AddDisplayMode(display, w, h, 1.0f, nil, addRotation); - } + } } int @@ -271,7 +275,7 @@ UIKit_SetDisplayMode(_THIS, SDL_VideoDisplay * display, SDL_DisplayMode * mode) SDL_DisplayData *data = (SDL_DisplayData *) display->driverdata; if (!SDL_UIKit_supports_multiple_displays) { - // Not on at least iPhoneOS 3.2 (versions prior to iPad). + /* Not on at least iPhoneOS 3.2 (versions prior to iPad). */ SDL_assert(mode->driverdata == NULL); } else { SDL_DisplayModeData *modedata = (SDL_DisplayModeData *)mode->driverdata; @@ -295,7 +299,7 @@ UIKit_SetDisplayMode(_THIS, SDL_VideoDisplay * display, SDL_DisplayMode * mode) void UIKit_QuitModes(_THIS) { - // Release Objective-C objects, so higher level doesn't free() them. + /* Release Objective-C objects, so higher level doesn't free() them. */ int i, j; for (i = 0; i < _this->num_displays; i++) { SDL_VideoDisplay *display = &_this->displays[i]; diff --git a/src/video/uikit/SDL_uikitopengles.m b/src/video/uikit/SDL_uikitopengles.m index 4fc1a2773..a7d370f2b 100644 --- a/src/video/uikit/SDL_uikitopengles.m +++ b/src/video/uikit/SDL_uikitopengles.m @@ -80,7 +80,7 @@ UIKit_GL_LoadLibrary(_THIS, const char *path) void UIKit_GL_SwapWindow(_THIS, SDL_Window * window) { #if SDL_POWER_UIKIT - // Check once a frame to see if we should turn off the battery monitor. + /* Check once a frame to see if we should turn off the battery monitor. */ SDL_UIKit_UpdateBatteryMonitoring(); #endif @@ -134,8 +134,8 @@ SDL_GLContext UIKit_GL_CreateContext(_THIS, SDL_Window * window) [view->viewcontroller retain]; } [uiwindow addSubview: view]; - - // The view controller needs to be the root in order to control rotation on iOS 6.0 + + /* The view controller needs to be the root in order to control rotation on iOS 6.0 */ if (uiwindow.rootViewController == nil) { uiwindow.rootViewController = view->viewcontroller; } diff --git a/src/video/uikit/SDL_uikitopenglview.m b/src/video/uikit/SDL_uikitopenglview.m index 16ac872d9..6ca5162d9 100644 --- a/src/video/uikit/SDL_uikitopenglview.m +++ b/src/video/uikit/SDL_uikitopenglview.m @@ -165,9 +165,10 @@ - (void)startAnimation { - // CADisplayLink is API new to iPhone SDK 3.1. Compiling against earlier versions will result in a warning, but can be dismissed - // if the system version runtime check for CADisplayLink exists in -initWithCoder:. - + /* CADisplayLink is API new to iPhone SDK 3.1. + * Compiling against earlier versions will result in a warning, but can be dismissed + * if the system version runtime check for CADisplayLink exists in -initWithCoder:. + */ displayLink = [NSClassFromString(@"CADisplayLink") displayLinkWithTarget:self selector:@selector(doLoop:)]; [displayLink setFrameInterval:animationInterval]; [displayLink addToRunLoop:[NSRunLoop currentRunLoop] forMode:NSDefaultRunLoopMode]; @@ -181,7 +182,7 @@ - (void)doLoop:(id)sender { - // Don't run the game loop while a messagebox is up + /* Don't run the game loop while a messagebox is up */ if (!UIKit_ShowingMessageBox()) { animationCallback(animationCallbackParam); } diff --git a/src/video/uikit/SDL_uikitvideo.h b/src/video/uikit/SDL_uikitvideo.h index c8418faa4..8969e91e9 100644 --- a/src/video/uikit/SDL_uikitvideo.h +++ b/src/video/uikit/SDL_uikitvideo.h @@ -26,7 +26,7 @@ #include "../SDL_sysvideo.h" #ifndef __IPHONE_6_0 -// This enum isn't available in older SDKs, but we use it for our own purposes on iOS 5.1 and for the system on iOS 6.0 +/* This enum isn't available in older SDKs, but we use it for our own purposes on iOS 5.1 and for the system on iOS 6.0 */ enum UIInterfaceOrientationMask { UIInterfaceOrientationMaskPortrait = (1 << UIInterfaceOrientationPortrait), @@ -37,7 +37,7 @@ enum UIInterfaceOrientationMask UIInterfaceOrientationMaskAll = (UIInterfaceOrientationMaskPortrait | UIInterfaceOrientationMaskLandscapeLeft | UIInterfaceOrientationMaskLandscapeRight | UIInterfaceOrientationMaskPortraitUpsideDown), UIInterfaceOrientationMaskAllButUpsideDown = (UIInterfaceOrientationMaskPortrait | UIInterfaceOrientationMaskLandscapeLeft | UIInterfaceOrientationMaskLandscapeRight), }; -#endif // !__IPHONE_6_0 +#endif /* !__IPHONE_6_0 */ #endif /* _SDL_uikitvideo_h */ diff --git a/src/video/uikit/SDL_uikitview.m b/src/video/uikit/SDL_uikitview.m index ec37f1880..e808962ef 100644 --- a/src/video/uikit/SDL_uikitview.m +++ b/src/video/uikit/SDL_uikitview.m @@ -63,11 +63,11 @@ { CGPoint point = [touch locationInView: self]; - // Get the display scale and apply that to the input coordinates + /* Get the display scale and apply that to the input coordinates */ SDL_Window *window = self->viewcontroller.window; SDL_VideoDisplay *display = SDL_GetDisplayForWindow(window); SDL_DisplayModeData *displaymodedata = (SDL_DisplayModeData *) display->current_mode.driverdata; - + if (normalize) { CGRect bounds = [self bounds]; point.x /= bounds.size.width; @@ -99,9 +99,10 @@ CGPoint locationInView = [self touchLocation:touch shouldNormalize:YES]; #ifdef IPHONE_TOUCH_EFFICIENT_DANGEROUS - // FIXME: TODO: Using touch as the fingerId is potentially dangerous - // It is also much more efficient than storing the UITouch pointer - // and comparing it to the incoming event. + /* FIXME: TODO: Using touch as the fingerId is potentially dangerous + * It is also much more efficient than storing the UITouch pointer + * and comparing it to the incoming event. + */ SDL_SendTouch(touchId, (SDL_FingerID)((size_t)touch), SDL_TRUE, locationInView.x, locationInView.y, 1.0f); #else diff --git a/src/video/uikit/SDL_uikitviewcontroller.m b/src/video/uikit/SDL_uikitviewcontroller.m index 896a76f0e..157b70aa0 100644 --- a/src/video/uikit/SDL_uikitviewcontroller.m +++ b/src/video/uikit/SDL_uikitviewcontroller.m @@ -51,7 +51,7 @@ - (void)loadView { - // do nothing. + /* do nothing. */ } - (void)viewDidLayoutSubviews @@ -62,10 +62,10 @@ SDL_DisplayModeData *displaymodedata = (SDL_DisplayModeData *) display->current_mode.driverdata; const CGSize size = data->view.bounds.size; int w, h; - + w = (int)(size.width * displaymodedata->scale); h = (int)(size.height * displaymodedata->scale); - + SDL_SendWindowEvent(self->window, SDL_WINDOWEVENT_RESIZED, w, h); } } @@ -73,7 +73,7 @@ - (NSUInteger)supportedInterfaceOrientations { NSUInteger orientationMask = 0; - + const char *orientationsCString; if ((orientationsCString = SDL_GetHint(SDL_HINT_ORIENTATIONS)) != NULL) { BOOL rotate = NO; @@ -81,7 +81,7 @@ encoding:NSUTF8StringEncoding]; NSArray *orientations = [orientationsNSString componentsSeparatedByCharactersInSet: [NSCharacterSet characterSetWithCharactersInString:@" "]]; - + if ([orientations containsObject:@"LandscapeLeft"]) { orientationMask |= UIInterfaceOrientationMaskLandscapeLeft; } @@ -94,9 +94,9 @@ if ([orientations containsObject:@"PortraitUpsideDown"]) { orientationMask |= UIInterfaceOrientationMaskPortraitUpsideDown; } - + } else if (self->window->flags & SDL_WINDOW_RESIZABLE) { - orientationMask = UIInterfaceOrientationMaskAll; // any orientation is okay. + orientationMask = UIInterfaceOrientationMaskAll; /* any orientation is okay. */ } else { if (self->window->w >= self->window->h) { orientationMask |= UIInterfaceOrientationMaskLandscape; @@ -105,8 +105,8 @@ orientationMask |= (UIInterfaceOrientationMaskPortrait | UIInterfaceOrientationMaskPortraitUpsideDown); } } - - // Don't allow upside-down orientation on the phone, so answering calls is in the natural orientation + + /* Don't allow upside-down orientation on the phone, so answering calls is in the natural orientation */ if ([[UIDevice currentDevice] userInterfaceIdiom] == UIUserInterfaceIdiomPhone) { orientationMask &= ~UIInterfaceOrientationMaskPortraitUpsideDown; } diff --git a/src/video/uikit/SDL_uikitwindow.m b/src/video/uikit/SDL_uikitwindow.m index a009f5976..6be691518 100644 --- a/src/video/uikit/SDL_uikitwindow.m +++ b/src/video/uikit/SDL_uikitwindow.m @@ -76,7 +76,7 @@ static int SetupWindowData(_THIS, SDL_Window *window, UIWindow *uiwindow, SDL_bo int width = (int)(bounds.size.width * displaymodedata->scale); int height = (int)(bounds.size.height * displaymodedata->scale); - // Make sure the width/height are oriented correctly + /* Make sure the width/height are oriented correctly */ if (UIKit_IsDisplayLandscape(displaydata->uiscreen) != (width > height)) { int temp = width; width = height; @@ -93,30 +93,32 @@ static int SetupWindowData(_THIS, SDL_Window *window, UIWindow *uiwindow, SDL_bo window->flags &= ~SDL_WINDOW_HIDDEN; window->flags |= SDL_WINDOW_SHOWN; - // SDL_WINDOW_BORDERLESS controls whether status bar is hidden. - // This is only set if the window is on the main screen. Other screens - // just force the window to have the borderless flag. + /* SDL_WINDOW_BORDERLESS controls whether status bar is hidden. + * This is only set if the window is on the main screen. Other screens + * just force the window to have the borderless flag. + */ if (displaydata->uiscreen == [UIScreen mainScreen]) { - window->flags |= SDL_WINDOW_INPUT_FOCUS; // always has input focus - + window->flags |= SDL_WINDOW_INPUT_FOCUS; /* always has input focus */ + if ([UIApplication sharedApplication].statusBarHidden) { window->flags |= SDL_WINDOW_BORDERLESS; } else { window->flags &= ~SDL_WINDOW_BORDERLESS; } } else { - window->flags &= ~SDL_WINDOW_RESIZABLE; // window is NEVER resizeable - window->flags &= ~SDL_WINDOW_INPUT_FOCUS; // never has input focus - window->flags |= SDL_WINDOW_BORDERLESS; // never has a status bar. + window->flags &= ~SDL_WINDOW_RESIZABLE; /* window is NEVER resizeable */ + window->flags &= ~SDL_WINDOW_INPUT_FOCUS; /* never has input focus */ + window->flags |= SDL_WINDOW_BORDERLESS; /* never has a status bar. */ } - // The View Controller will handle rotating the view when the - // device orientation changes. This will trigger resize events, if - // appropriate. + /* The View Controller will handle rotating the view when the + * device orientation changes. This will trigger resize events, if + * appropriate. + */ SDL_uikitviewcontroller *controller; controller = [SDL_uikitviewcontroller alloc]; data->viewcontroller = [controller initWithSDLWindow:window]; - [data->viewcontroller setTitle:@"SDL App"]; // !!! FIXME: hook up SDL_SetWindowTitle() + [data->viewcontroller setTitle:@"SDL App"]; /* !!! FIXME: hook up SDL_SetWindowTitle() */ return 0; } @@ -128,7 +130,7 @@ UIKit_CreateWindow(_THIS, SDL_Window *window) SDL_DisplayData *data = (SDL_DisplayData *) display->driverdata; const BOOL external = ([UIScreen mainScreen] != data->uiscreen); - // SDL currently puts this window at the start of display's linked list. We rely on this. + /* SDL currently puts this window at the start of display's linked list. We rely on this. */ SDL_assert(_this->windows == window); /* We currently only handle a single window per display on iOS */ @@ -136,9 +138,10 @@ UIKit_CreateWindow(_THIS, SDL_Window *window) return SDL_SetError("Only one window allowed per display."); } - // If monitor has a resolution of 0x0 (hasn't been explicitly set by the - // user, so it's in standby), try to force the display to a resolution - // that most closely matches the desired window size. + /* If monitor has a resolution of 0x0 (hasn't been explicitly set by the + * user, so it's in standby), try to force the display to a resolution + * that most closely matches the desired window size. + */ if (SDL_UIKit_supports_multiple_displays) { const CGSize origsize = [[data->uiscreen currentMode] size]; if ((origsize.width == 0.0f) && (origsize.height == 0.0f)) { @@ -158,14 +161,15 @@ UIKit_CreateWindow(_THIS, SDL_Window *window) SDL_DisplayModeData *modedata = (SDL_DisplayModeData *)bestmode->driverdata; [data->uiscreen setCurrentMode:modedata->uiscreenmode]; - // desktop_mode doesn't change here (the higher level will - // use it to set all the screens back to their defaults - // upon window destruction, SDL_Quit(), etc. + /* desktop_mode doesn't change here (the higher level will + * use it to set all the screens back to their defaults + * upon window destruction, SDL_Quit(), etc. + */ display->current_mode = *bestmode; } } } - + if (data->uiscreen == [UIScreen mainScreen]) { if (window->flags & (SDL_WINDOW_FULLSCREEN|SDL_WINDOW_BORDERLESS)) { [UIApplication sharedApplication].statusBarHidden = YES; @@ -173,7 +177,7 @@ UIKit_CreateWindow(_THIS, SDL_Window *window) [UIApplication sharedApplication].statusBarHidden = NO; } } - + if (!(window->flags & SDL_WINDOW_RESIZABLE)) { if (window->w > window->h) { if (!UIKit_IsDisplayLandscape(data->uiscreen)) { @@ -187,14 +191,15 @@ UIKit_CreateWindow(_THIS, SDL_Window *window) } /* ignore the size user requested, and make a fullscreen window */ - // !!! FIXME: can we have a smaller view? + /* !!! FIXME: can we have a smaller view? */ UIWindow *uiwindow = [UIWindow alloc]; uiwindow = [uiwindow initWithFrame:[data->uiscreen bounds]]; - // put the window on an external display if appropriate. This implicitly - // does [uiwindow setframe:[uiscreen bounds]], so don't do it on the - // main display, where we land by default, as that would eat the - // status bar real estate. + /* put the window on an external display if appropriate. This implicitly + * does [uiwindow setframe:[uiscreen bounds]], so don't do it on the + * main display, where we land by default, as that would eat the + * status bar real estate. + */ if (external) { [uiwindow setScreen:data->uiscreen]; } @@ -227,10 +232,11 @@ UIKit_HideWindow(_THIS, SDL_Window * window) void UIKit_RaiseWindow(_THIS, SDL_Window * window) { - // We don't currently offer a concept of "raising" the SDL window, since - // we only allow one per display, in the iOS fashion. - // However, we use this entry point to rebind the context to the view - // during OnWindowRestored processing. + /* We don't currently offer a concept of "raising" the SDL window, since + * we only allow one per display, in the iOS fashion. + * However, we use this entry point to rebind the context to the view + * during OnWindowRestored processing. + */ _this->GL_MakeCurrent(_this, _this->current_glwin, _this->current_glctx); } diff --git a/src/video/windows/SDL_vkeys.h b/src/video/windows/SDL_vkeys.h index 2e835f543..ca24e8ff9 100644 --- a/src/video/windows/SDL_vkeys.h +++ b/src/video/windows/SDL_vkeys.h @@ -20,57 +20,57 @@ */ #ifndef VK_0 -#define VK_0 '0' -#define VK_1 '1' -#define VK_2 '2' -#define VK_3 '3' -#define VK_4 '4' -#define VK_5 '5' -#define VK_6 '6' -#define VK_7 '7' -#define VK_8 '8' -#define VK_9 '9' -#define VK_A 'A' -#define VK_B 'B' -#define VK_C 'C' -#define VK_D 'D' -#define VK_E 'E' -#define VK_F 'F' -#define VK_G 'G' -#define VK_H 'H' -#define VK_I 'I' -#define VK_J 'J' -#define VK_K 'K' -#define VK_L 'L' -#define VK_M 'M' -#define VK_N 'N' -#define VK_O 'O' -#define VK_P 'P' -#define VK_Q 'Q' -#define VK_R 'R' -#define VK_S 'S' -#define VK_T 'T' -#define VK_U 'U' -#define VK_V 'V' -#define VK_W 'W' -#define VK_X 'X' -#define VK_Y 'Y' -#define VK_Z 'Z' +#define VK_0 '0' +#define VK_1 '1' +#define VK_2 '2' +#define VK_3 '3' +#define VK_4 '4' +#define VK_5 '5' +#define VK_6 '6' +#define VK_7 '7' +#define VK_8 '8' +#define VK_9 '9' +#define VK_A 'A' +#define VK_B 'B' +#define VK_C 'C' +#define VK_D 'D' +#define VK_E 'E' +#define VK_F 'F' +#define VK_G 'G' +#define VK_H 'H' +#define VK_I 'I' +#define VK_J 'J' +#define VK_K 'K' +#define VK_L 'L' +#define VK_M 'M' +#define VK_N 'N' +#define VK_O 'O' +#define VK_P 'P' +#define VK_Q 'Q' +#define VK_R 'R' +#define VK_S 'S' +#define VK_T 'T' +#define VK_U 'U' +#define VK_V 'V' +#define VK_W 'W' +#define VK_X 'X' +#define VK_Y 'Y' +#define VK_Z 'Z' #endif /* VK_0 */ /* These keys haven't been defined, but were experimentally determined */ -#define VK_SEMICOLON 0xBA -#define VK_EQUALS 0xBB -#define VK_COMMA 0xBC -#define VK_MINUS 0xBD -#define VK_PERIOD 0xBE -#define VK_SLASH 0xBF -#define VK_GRAVE 0xC0 -#define VK_LBRACKET 0xDB -#define VK_BACKSLASH 0xDC -#define VK_RBRACKET 0xDD -#define VK_APOSTROPHE 0xDE -#define VK_BACKTICK 0xDF -#define VK_OEM_102 0xE2 +#define VK_SEMICOLON 0xBA +#define VK_EQUALS 0xBB +#define VK_COMMA 0xBC +#define VK_MINUS 0xBD +#define VK_PERIOD 0xBE +#define VK_SLASH 0xBF +#define VK_GRAVE 0xC0 +#define VK_LBRACKET 0xDB +#define VK_BACKSLASH 0xDC +#define VK_RBRACKET 0xDD +#define VK_APOSTROPHE 0xDE +#define VK_BACKTICK 0xDF +#define VK_OEM_102 0xE2 /* vi: set ts=4 sw=4 expandtab: */ diff --git a/src/video/windows/SDL_windowsclipboard.c b/src/video/windows/SDL_windowsclipboard.c index 4f0c87a81..83bf0caa3 100644 --- a/src/video/windows/SDL_windowsclipboard.c +++ b/src/video/windows/SDL_windowsclipboard.c @@ -137,7 +137,7 @@ WIN_HasClipboardText(_THIS) if (text) { result = (SDL_strlen(text)>0) ? SDL_TRUE : SDL_FALSE; SDL_free(text); - } + } return result; } diff --git a/src/video/windows/SDL_windowsevents.c b/src/video/windows/SDL_windowsevents.c index f38429532..b30b8364b 100644 --- a/src/video/windows/SDL_windowsevents.c +++ b/src/video/windows/SDL_windowsevents.c @@ -36,7 +36,7 @@ /*#define WMMSG_DEBUG*/ #ifdef WMMSG_DEBUG -#include +#include #include "wmmsg.h" #endif @@ -46,7 +46,7 @@ #define VK_ENTER 10 /* Keypad Enter ... no VKEY defined? */ #ifndef VK_OEM_NEC_EQUAL -#define VK_OEM_NEC_EQUAL 0x92 +#define VK_OEM_NEC_EQUAL 0x92 #endif /* Make sure XBUTTON stuff is defined that isn't in older Platform SDKs... */ @@ -66,192 +66,192 @@ #define WM_TOUCH 0x0240 #endif -static SDL_Scancode +static SDL_Scancode WindowsScanCodeToSDLScanCode( LPARAM lParam, WPARAM wParam ) { - SDL_Scancode code; - char bIsExtended; - int nScanCode = ( lParam >> 16 ) & 0xFF; + SDL_Scancode code; + char bIsExtended; + int nScanCode = ( lParam >> 16 ) & 0xFF; - /* 0x45 here to work around both pause and numlock sharing the same scancode, so use the VK key to tell them apart */ - if ( nScanCode == 0 || nScanCode == 0x45 ) - { - switch( wParam ) - { - case VK_CLEAR: return SDL_SCANCODE_CLEAR; - case VK_MODECHANGE: return SDL_SCANCODE_MODE; - case VK_SELECT: return SDL_SCANCODE_SELECT; - case VK_EXECUTE: return SDL_SCANCODE_EXECUTE; - case VK_HELP: return SDL_SCANCODE_HELP; - case VK_PAUSE: return SDL_SCANCODE_PAUSE; - case VK_NUMLOCK: return SDL_SCANCODE_NUMLOCKCLEAR; + /* 0x45 here to work around both pause and numlock sharing the same scancode, so use the VK key to tell them apart */ + if ( nScanCode == 0 || nScanCode == 0x45 ) + { + switch( wParam ) + { + case VK_CLEAR: return SDL_SCANCODE_CLEAR; + case VK_MODECHANGE: return SDL_SCANCODE_MODE; + case VK_SELECT: return SDL_SCANCODE_SELECT; + case VK_EXECUTE: return SDL_SCANCODE_EXECUTE; + case VK_HELP: return SDL_SCANCODE_HELP; + case VK_PAUSE: return SDL_SCANCODE_PAUSE; + case VK_NUMLOCK: return SDL_SCANCODE_NUMLOCKCLEAR; - case VK_F13: return SDL_SCANCODE_F13; - case VK_F14: return SDL_SCANCODE_F14; - case VK_F15: return SDL_SCANCODE_F15; - case VK_F16: return SDL_SCANCODE_F16; - case VK_F17: return SDL_SCANCODE_F17; - case VK_F18: return SDL_SCANCODE_F18; - case VK_F19: return SDL_SCANCODE_F19; - case VK_F20: return SDL_SCANCODE_F20; - case VK_F21: return SDL_SCANCODE_F21; - case VK_F22: return SDL_SCANCODE_F22; - case VK_F23: return SDL_SCANCODE_F23; - case VK_F24: return SDL_SCANCODE_F24; + case VK_F13: return SDL_SCANCODE_F13; + case VK_F14: return SDL_SCANCODE_F14; + case VK_F15: return SDL_SCANCODE_F15; + case VK_F16: return SDL_SCANCODE_F16; + case VK_F17: return SDL_SCANCODE_F17; + case VK_F18: return SDL_SCANCODE_F18; + case VK_F19: return SDL_SCANCODE_F19; + case VK_F20: return SDL_SCANCODE_F20; + case VK_F21: return SDL_SCANCODE_F21; + case VK_F22: return SDL_SCANCODE_F22; + case VK_F23: return SDL_SCANCODE_F23; + case VK_F24: return SDL_SCANCODE_F24; - case VK_OEM_NEC_EQUAL: return SDL_SCANCODE_KP_EQUALS; - case VK_BROWSER_BACK: return SDL_SCANCODE_AC_BACK; - case VK_BROWSER_FORWARD: return SDL_SCANCODE_AC_FORWARD; - case VK_BROWSER_REFRESH: return SDL_SCANCODE_AC_REFRESH; - case VK_BROWSER_STOP: return SDL_SCANCODE_AC_STOP; - case VK_BROWSER_SEARCH: return SDL_SCANCODE_AC_SEARCH; - case VK_BROWSER_FAVORITES: return SDL_SCANCODE_AC_BOOKMARKS; - case VK_BROWSER_HOME: return SDL_SCANCODE_AC_HOME; - case VK_VOLUME_MUTE: return SDL_SCANCODE_AUDIOMUTE; - case VK_VOLUME_DOWN: return SDL_SCANCODE_VOLUMEDOWN; - case VK_VOLUME_UP: return SDL_SCANCODE_VOLUMEUP; - - case VK_MEDIA_NEXT_TRACK: return SDL_SCANCODE_AUDIONEXT; - case VK_MEDIA_PREV_TRACK: return SDL_SCANCODE_AUDIOPREV; - case VK_MEDIA_STOP: return SDL_SCANCODE_AUDIOSTOP; - case VK_MEDIA_PLAY_PAUSE: return SDL_SCANCODE_AUDIOPLAY; - case VK_LAUNCH_MAIL: return SDL_SCANCODE_MAIL; - case VK_LAUNCH_MEDIA_SELECT: return SDL_SCANCODE_MEDIASELECT; - - case VK_OEM_102: return SDL_SCANCODE_NONUSBACKSLASH; + case VK_OEM_NEC_EQUAL: return SDL_SCANCODE_KP_EQUALS; + case VK_BROWSER_BACK: return SDL_SCANCODE_AC_BACK; + case VK_BROWSER_FORWARD: return SDL_SCANCODE_AC_FORWARD; + case VK_BROWSER_REFRESH: return SDL_SCANCODE_AC_REFRESH; + case VK_BROWSER_STOP: return SDL_SCANCODE_AC_STOP; + case VK_BROWSER_SEARCH: return SDL_SCANCODE_AC_SEARCH; + case VK_BROWSER_FAVORITES: return SDL_SCANCODE_AC_BOOKMARKS; + case VK_BROWSER_HOME: return SDL_SCANCODE_AC_HOME; + case VK_VOLUME_MUTE: return SDL_SCANCODE_AUDIOMUTE; + case VK_VOLUME_DOWN: return SDL_SCANCODE_VOLUMEDOWN; + case VK_VOLUME_UP: return SDL_SCANCODE_VOLUMEUP; - case VK_ATTN: return SDL_SCANCODE_SYSREQ; - case VK_CRSEL: return SDL_SCANCODE_CRSEL; - case VK_EXSEL: return SDL_SCANCODE_EXSEL; - case VK_OEM_CLEAR: return SDL_SCANCODE_CLEAR; + case VK_MEDIA_NEXT_TRACK: return SDL_SCANCODE_AUDIONEXT; + case VK_MEDIA_PREV_TRACK: return SDL_SCANCODE_AUDIOPREV; + case VK_MEDIA_STOP: return SDL_SCANCODE_AUDIOSTOP; + case VK_MEDIA_PLAY_PAUSE: return SDL_SCANCODE_AUDIOPLAY; + case VK_LAUNCH_MAIL: return SDL_SCANCODE_MAIL; + case VK_LAUNCH_MEDIA_SELECT: return SDL_SCANCODE_MEDIASELECT; - case VK_LAUNCH_APP1: return SDL_SCANCODE_APP1; - case VK_LAUNCH_APP2: return SDL_SCANCODE_APP2; + case VK_OEM_102: return SDL_SCANCODE_NONUSBACKSLASH; - default: return SDL_SCANCODE_UNKNOWN; - } - } + case VK_ATTN: return SDL_SCANCODE_SYSREQ; + case VK_CRSEL: return SDL_SCANCODE_CRSEL; + case VK_EXSEL: return SDL_SCANCODE_EXSEL; + case VK_OEM_CLEAR: return SDL_SCANCODE_CLEAR; - if ( nScanCode > 127 ) - return SDL_SCANCODE_UNKNOWN; + case VK_LAUNCH_APP1: return SDL_SCANCODE_APP1; + case VK_LAUNCH_APP2: return SDL_SCANCODE_APP2; - code = windows_scancode_table[nScanCode]; + default: return SDL_SCANCODE_UNKNOWN; + } + } - bIsExtended = ( lParam & ( 1 << 24 ) ) != 0; - if ( !bIsExtended ) - { - switch ( code ) - { - case SDL_SCANCODE_HOME: - return SDL_SCANCODE_KP_7; - case SDL_SCANCODE_UP: - return SDL_SCANCODE_KP_8; - case SDL_SCANCODE_PAGEUP: - return SDL_SCANCODE_KP_9; - case SDL_SCANCODE_LEFT: - return SDL_SCANCODE_KP_4; - case SDL_SCANCODE_RIGHT: - return SDL_SCANCODE_KP_6; - case SDL_SCANCODE_END: - return SDL_SCANCODE_KP_1; - case SDL_SCANCODE_DOWN: - return SDL_SCANCODE_KP_2; - case SDL_SCANCODE_PAGEDOWN: - return SDL_SCANCODE_KP_3; - case SDL_SCANCODE_INSERT: - return SDL_SCANCODE_KP_0; - case SDL_SCANCODE_DELETE: - return SDL_SCANCODE_KP_PERIOD; - case SDL_SCANCODE_PRINTSCREEN: - return SDL_SCANCODE_KP_MULTIPLY; - default: - break; - } - } - else - { - switch ( code ) - { - case SDL_SCANCODE_RETURN: - return SDL_SCANCODE_KP_ENTER; - case SDL_SCANCODE_LALT: - return SDL_SCANCODE_RALT; - case SDL_SCANCODE_LCTRL: - return SDL_SCANCODE_RCTRL; - case SDL_SCANCODE_SLASH: - return SDL_SCANCODE_KP_DIVIDE; - case SDL_SCANCODE_CAPSLOCK: - return SDL_SCANCODE_KP_PLUS; + if ( nScanCode > 127 ) + return SDL_SCANCODE_UNKNOWN; + + code = windows_scancode_table[nScanCode]; + + bIsExtended = ( lParam & ( 1 << 24 ) ) != 0; + if ( !bIsExtended ) + { + switch ( code ) + { + case SDL_SCANCODE_HOME: + return SDL_SCANCODE_KP_7; + case SDL_SCANCODE_UP: + return SDL_SCANCODE_KP_8; + case SDL_SCANCODE_PAGEUP: + return SDL_SCANCODE_KP_9; + case SDL_SCANCODE_LEFT: + return SDL_SCANCODE_KP_4; + case SDL_SCANCODE_RIGHT: + return SDL_SCANCODE_KP_6; + case SDL_SCANCODE_END: + return SDL_SCANCODE_KP_1; + case SDL_SCANCODE_DOWN: + return SDL_SCANCODE_KP_2; + case SDL_SCANCODE_PAGEDOWN: + return SDL_SCANCODE_KP_3; + case SDL_SCANCODE_INSERT: + return SDL_SCANCODE_KP_0; + case SDL_SCANCODE_DELETE: + return SDL_SCANCODE_KP_PERIOD; + case SDL_SCANCODE_PRINTSCREEN: + return SDL_SCANCODE_KP_MULTIPLY; default: break; - } - } + } + } + else + { + switch ( code ) + { + case SDL_SCANCODE_RETURN: + return SDL_SCANCODE_KP_ENTER; + case SDL_SCANCODE_LALT: + return SDL_SCANCODE_RALT; + case SDL_SCANCODE_LCTRL: + return SDL_SCANCODE_RCTRL; + case SDL_SCANCODE_SLASH: + return SDL_SCANCODE_KP_DIVIDE; + case SDL_SCANCODE_CAPSLOCK: + return SDL_SCANCODE_KP_PLUS; + default: + break; + } + } - return code; + return code; } -void +void WIN_CheckWParamMouseButton( SDL_bool bwParamMousePressed, SDL_bool bSDLMousePressed, SDL_WindowData *data, Uint8 button ) { - if ( bwParamMousePressed && !bSDLMousePressed ) - { - SDL_SendMouseButton(data->window, 0, SDL_PRESSED, button); - } - else if ( !bwParamMousePressed && bSDLMousePressed ) - { - SDL_SendMouseButton(data->window, 0, SDL_RELEASED, button); - } + if ( bwParamMousePressed && !bSDLMousePressed ) + { + SDL_SendMouseButton(data->window, 0, SDL_PRESSED, button); + } + else if ( !bwParamMousePressed && bSDLMousePressed ) + { + SDL_SendMouseButton(data->window, 0, SDL_RELEASED, button); + } } /* * Some windows systems fail to send a WM_LBUTTONDOWN sometimes, but each mouse move contains the current button state also * so this funciton reconciles our view of the world with the current buttons reported by windows */ -void +void WIN_CheckWParamMouseButtons( WPARAM wParam, SDL_WindowData *data ) { - if ( wParam != data->mouse_button_flags ) - { - Uint32 mouseFlags = SDL_GetMouseState( NULL, NULL ); - WIN_CheckWParamMouseButton( (wParam & MK_LBUTTON), (mouseFlags & SDL_BUTTON_LMASK), data, SDL_BUTTON_LEFT ); - WIN_CheckWParamMouseButton( (wParam & MK_MBUTTON), (mouseFlags & SDL_BUTTON_MMASK), data, SDL_BUTTON_MIDDLE ); - WIN_CheckWParamMouseButton( (wParam & MK_RBUTTON), (mouseFlags & SDL_BUTTON_RMASK), data, SDL_BUTTON_RIGHT ); - WIN_CheckWParamMouseButton( (wParam & MK_XBUTTON1), (mouseFlags & SDL_BUTTON_X1MASK), data, SDL_BUTTON_X1 ); - WIN_CheckWParamMouseButton( (wParam & MK_XBUTTON2), (mouseFlags & SDL_BUTTON_X2MASK), data, SDL_BUTTON_X2 ); - data->mouse_button_flags = wParam; - } + if ( wParam != data->mouse_button_flags ) + { + Uint32 mouseFlags = SDL_GetMouseState( NULL, NULL ); + WIN_CheckWParamMouseButton( (wParam & MK_LBUTTON), (mouseFlags & SDL_BUTTON_LMASK), data, SDL_BUTTON_LEFT ); + WIN_CheckWParamMouseButton( (wParam & MK_MBUTTON), (mouseFlags & SDL_BUTTON_MMASK), data, SDL_BUTTON_MIDDLE ); + WIN_CheckWParamMouseButton( (wParam & MK_RBUTTON), (mouseFlags & SDL_BUTTON_RMASK), data, SDL_BUTTON_RIGHT ); + WIN_CheckWParamMouseButton( (wParam & MK_XBUTTON1), (mouseFlags & SDL_BUTTON_X1MASK), data, SDL_BUTTON_X1 ); + WIN_CheckWParamMouseButton( (wParam & MK_XBUTTON2), (mouseFlags & SDL_BUTTON_X2MASK), data, SDL_BUTTON_X2 ); + data->mouse_button_flags = wParam; + } } -void +void WIN_CheckRawMouseButtons( ULONG rawButtons, SDL_WindowData *data ) { - if ( rawButtons != data->mouse_button_flags ) - { - Uint32 mouseFlags = SDL_GetMouseState( NULL, NULL ); - if ( (rawButtons & RI_MOUSE_BUTTON_1_DOWN) ) - WIN_CheckWParamMouseButton( (rawButtons & RI_MOUSE_BUTTON_1_DOWN), (mouseFlags & SDL_BUTTON_LMASK), data, SDL_BUTTON_LEFT ); - if ( (rawButtons & RI_MOUSE_BUTTON_1_UP) ) - WIN_CheckWParamMouseButton( !(rawButtons & RI_MOUSE_BUTTON_1_UP), (mouseFlags & SDL_BUTTON_LMASK), data, SDL_BUTTON_LEFT ); - if ( (rawButtons & RI_MOUSE_BUTTON_2_DOWN) ) - WIN_CheckWParamMouseButton( (rawButtons & RI_MOUSE_BUTTON_2_DOWN), (mouseFlags & SDL_BUTTON_RMASK), data, SDL_BUTTON_RIGHT ); - if ( (rawButtons & RI_MOUSE_BUTTON_2_UP) ) - WIN_CheckWParamMouseButton( !(rawButtons & RI_MOUSE_BUTTON_2_UP), (mouseFlags & SDL_BUTTON_RMASK), data, SDL_BUTTON_RIGHT ); - if ( (rawButtons & RI_MOUSE_BUTTON_3_DOWN) ) - WIN_CheckWParamMouseButton( (rawButtons & RI_MOUSE_BUTTON_3_DOWN), (mouseFlags & SDL_BUTTON_MMASK), data, SDL_BUTTON_MIDDLE ); - if ( (rawButtons & RI_MOUSE_BUTTON_3_UP) ) - WIN_CheckWParamMouseButton( !(rawButtons & RI_MOUSE_BUTTON_3_UP), (mouseFlags & SDL_BUTTON_MMASK), data, SDL_BUTTON_MIDDLE ); - if ( (rawButtons & RI_MOUSE_BUTTON_4_DOWN) ) - WIN_CheckWParamMouseButton( (rawButtons & RI_MOUSE_BUTTON_4_DOWN), (mouseFlags & SDL_BUTTON_X1MASK), data, SDL_BUTTON_X1 ); - if ( (rawButtons & RI_MOUSE_BUTTON_4_UP) ) - WIN_CheckWParamMouseButton( !(rawButtons & RI_MOUSE_BUTTON_4_UP), (mouseFlags & SDL_BUTTON_X1MASK), data, SDL_BUTTON_X1 ); - if ( (rawButtons & RI_MOUSE_BUTTON_5_DOWN) ) - WIN_CheckWParamMouseButton( (rawButtons & RI_MOUSE_BUTTON_5_DOWN), (mouseFlags & SDL_BUTTON_X2MASK), data, SDL_BUTTON_X2 ); - if ( (rawButtons & RI_MOUSE_BUTTON_5_UP) ) - WIN_CheckWParamMouseButton( !(rawButtons & RI_MOUSE_BUTTON_5_UP), (mouseFlags & SDL_BUTTON_X2MASK), data, SDL_BUTTON_X2 ); - data->mouse_button_flags = rawButtons; - } + if ( rawButtons != data->mouse_button_flags ) + { + Uint32 mouseFlags = SDL_GetMouseState( NULL, NULL ); + if ( (rawButtons & RI_MOUSE_BUTTON_1_DOWN) ) + WIN_CheckWParamMouseButton( (rawButtons & RI_MOUSE_BUTTON_1_DOWN), (mouseFlags & SDL_BUTTON_LMASK), data, SDL_BUTTON_LEFT ); + if ( (rawButtons & RI_MOUSE_BUTTON_1_UP) ) + WIN_CheckWParamMouseButton( !(rawButtons & RI_MOUSE_BUTTON_1_UP), (mouseFlags & SDL_BUTTON_LMASK), data, SDL_BUTTON_LEFT ); + if ( (rawButtons & RI_MOUSE_BUTTON_2_DOWN) ) + WIN_CheckWParamMouseButton( (rawButtons & RI_MOUSE_BUTTON_2_DOWN), (mouseFlags & SDL_BUTTON_RMASK), data, SDL_BUTTON_RIGHT ); + if ( (rawButtons & RI_MOUSE_BUTTON_2_UP) ) + WIN_CheckWParamMouseButton( !(rawButtons & RI_MOUSE_BUTTON_2_UP), (mouseFlags & SDL_BUTTON_RMASK), data, SDL_BUTTON_RIGHT ); + if ( (rawButtons & RI_MOUSE_BUTTON_3_DOWN) ) + WIN_CheckWParamMouseButton( (rawButtons & RI_MOUSE_BUTTON_3_DOWN), (mouseFlags & SDL_BUTTON_MMASK), data, SDL_BUTTON_MIDDLE ); + if ( (rawButtons & RI_MOUSE_BUTTON_3_UP) ) + WIN_CheckWParamMouseButton( !(rawButtons & RI_MOUSE_BUTTON_3_UP), (mouseFlags & SDL_BUTTON_MMASK), data, SDL_BUTTON_MIDDLE ); + if ( (rawButtons & RI_MOUSE_BUTTON_4_DOWN) ) + WIN_CheckWParamMouseButton( (rawButtons & RI_MOUSE_BUTTON_4_DOWN), (mouseFlags & SDL_BUTTON_X1MASK), data, SDL_BUTTON_X1 ); + if ( (rawButtons & RI_MOUSE_BUTTON_4_UP) ) + WIN_CheckWParamMouseButton( !(rawButtons & RI_MOUSE_BUTTON_4_UP), (mouseFlags & SDL_BUTTON_X1MASK), data, SDL_BUTTON_X1 ); + if ( (rawButtons & RI_MOUSE_BUTTON_5_DOWN) ) + WIN_CheckWParamMouseButton( (rawButtons & RI_MOUSE_BUTTON_5_DOWN), (mouseFlags & SDL_BUTTON_X2MASK), data, SDL_BUTTON_X2 ); + if ( (rawButtons & RI_MOUSE_BUTTON_5_UP) ) + WIN_CheckWParamMouseButton( !(rawButtons & RI_MOUSE_BUTTON_5_UP), (mouseFlags & SDL_BUTTON_X2MASK), data, SDL_BUTTON_X2 ); + data->mouse_button_flags = rawButtons; + } } LRESULT CALLBACK @@ -280,8 +280,8 @@ WIN_WindowProc(HWND hwnd, UINT msg, WPARAM wParam, LPARAM lParam) } #ifdef WMMSG_DEBUG - { - FILE *log = fopen("wmmsg.txt", "a"); + { + FILE *log = fopen("wmmsg.txt", "a"); fprintf(log, "Received windows message: %p ", hwnd); if (msg > MAX_WMMSG) { fprintf(log, "%d", msg); @@ -314,8 +314,8 @@ WIN_WindowProc(HWND hwnd, UINT msg, WPARAM wParam, LPARAM lParam) minimized = HIWORD(wParam); if (!minimized && (LOWORD(wParam) != WA_INACTIVE)) { - Uint32 mouseFlags; - SHORT keyState; + Uint32 mouseFlags; + SHORT keyState; SDL_SendWindowEvent(data->window, SDL_WINDOWEVENT_SHOWN, 0, 0); SDL_SendWindowEvent(data->window, @@ -327,40 +327,40 @@ WIN_WindowProc(HWND hwnd, UINT msg, WPARAM wParam, LPARAM lParam) if (SDL_GetKeyboardFocus() != data->window) { SDL_SetKeyboardFocus(data->window); } - /* mouse buttons may have changed state here, we need - to resync them, but we will get a WM_MOUSEMOVE right away which will fix - things up if in non raw mode also - */ - mouseFlags = SDL_GetMouseState( NULL, NULL ); + /* mouse buttons may have changed state here, we need + to resync them, but we will get a WM_MOUSEMOVE right away which will fix + things up if in non raw mode also + */ + mouseFlags = SDL_GetMouseState( NULL, NULL ); - keyState = GetAsyncKeyState( VK_LBUTTON ); - WIN_CheckWParamMouseButton( ( keyState & 0x8000 ), (mouseFlags & SDL_BUTTON_LMASK), data, SDL_BUTTON_LEFT ); - keyState = GetAsyncKeyState( VK_RBUTTON ); - WIN_CheckWParamMouseButton( ( keyState & 0x8000 ), (mouseFlags & SDL_BUTTON_RMASK), data, SDL_BUTTON_RIGHT ); - keyState = GetAsyncKeyState( VK_MBUTTON ); - WIN_CheckWParamMouseButton( ( keyState & 0x8000 ), (mouseFlags & SDL_BUTTON_MMASK), data, SDL_BUTTON_MIDDLE ); - keyState = GetAsyncKeyState( VK_XBUTTON1 ); - WIN_CheckWParamMouseButton( ( keyState & 0x8000 ), (mouseFlags & SDL_BUTTON_X1MASK), data, SDL_BUTTON_X1 ); - keyState = GetAsyncKeyState( VK_XBUTTON2 ); - WIN_CheckWParamMouseButton( ( keyState & 0x8000 ), (mouseFlags & SDL_BUTTON_X2MASK), data, SDL_BUTTON_X2 ); - data->mouse_button_flags = 0; + keyState = GetAsyncKeyState( VK_LBUTTON ); + WIN_CheckWParamMouseButton( ( keyState & 0x8000 ), (mouseFlags & SDL_BUTTON_LMASK), data, SDL_BUTTON_LEFT ); + keyState = GetAsyncKeyState( VK_RBUTTON ); + WIN_CheckWParamMouseButton( ( keyState & 0x8000 ), (mouseFlags & SDL_BUTTON_RMASK), data, SDL_BUTTON_RIGHT ); + keyState = GetAsyncKeyState( VK_MBUTTON ); + WIN_CheckWParamMouseButton( ( keyState & 0x8000 ), (mouseFlags & SDL_BUTTON_MMASK), data, SDL_BUTTON_MIDDLE ); + keyState = GetAsyncKeyState( VK_XBUTTON1 ); + WIN_CheckWParamMouseButton( ( keyState & 0x8000 ), (mouseFlags & SDL_BUTTON_X1MASK), data, SDL_BUTTON_X1 ); + keyState = GetAsyncKeyState( VK_XBUTTON2 ); + WIN_CheckWParamMouseButton( ( keyState & 0x8000 ), (mouseFlags & SDL_BUTTON_X2MASK), data, SDL_BUTTON_X2 ); + data->mouse_button_flags = 0; - if(SDL_GetMouse()->relative_mode) { - LONG cx, cy; - RECT rect; - GetWindowRect(hwnd, &rect); + if(SDL_GetMouse()->relative_mode) { + LONG cx, cy; + RECT rect; + GetWindowRect(hwnd, &rect); - cx = (rect.left + rect.right) / 2; - cy = (rect.top + rect.bottom) / 2; + cx = (rect.left + rect.right) / 2; + cy = (rect.top + rect.bottom) / 2; - /* Make an absurdly small clip rect */ - rect.left = cx-1; - rect.right = cx+1; - rect.top = cy-1; - rect.bottom = cy+1; + /* Make an absurdly small clip rect */ + rect.left = cx-1; + rect.right = cx+1; + rect.top = cy-1; + rect.bottom = cy+1; - ClipCursor(&rect); - } + ClipCursor(&rect); + } /* * FIXME: Update keyboard state @@ -379,65 +379,65 @@ WIN_WindowProc(HWND hwnd, UINT msg, WPARAM wParam, LPARAM lParam) returnCode = 0; break; - case WM_MOUSEMOVE: - if( !SDL_GetMouse()->relative_mode ) - SDL_SendMouseMotion(data->window, 0, 0, LOWORD(lParam), HIWORD(lParam)); - /* don't break here, fall through to check the wParam like the button presses */ - case WM_LBUTTONUP: - case WM_RBUTTONUP: - case WM_MBUTTONUP: - case WM_XBUTTONUP: - case WM_LBUTTONDOWN: - case WM_RBUTTONDOWN: - case WM_MBUTTONDOWN: - case WM_XBUTTONDOWN: - if( !SDL_GetMouse()->relative_mode ) - WIN_CheckWParamMouseButtons( wParam, data ); - break; + case WM_MOUSEMOVE: + if( !SDL_GetMouse()->relative_mode ) + SDL_SendMouseMotion(data->window, 0, 0, LOWORD(lParam), HIWORD(lParam)); + /* don't break here, fall through to check the wParam like the button presses */ + case WM_LBUTTONUP: + case WM_RBUTTONUP: + case WM_MBUTTONUP: + case WM_XBUTTONUP: + case WM_LBUTTONDOWN: + case WM_RBUTTONDOWN: + case WM_MBUTTONDOWN: + case WM_XBUTTONDOWN: + if( !SDL_GetMouse()->relative_mode ) + WIN_CheckWParamMouseButtons( wParam, data ); + break; - case WM_INPUT: - { - HRAWINPUT hRawInput = (HRAWINPUT)lParam; - RAWINPUT inp; - UINT size = sizeof(inp); + case WM_INPUT: + { + HRAWINPUT hRawInput = (HRAWINPUT)lParam; + RAWINPUT inp; + UINT size = sizeof(inp); - if(!SDL_GetMouse()->relative_mode) - break; + if(!SDL_GetMouse()->relative_mode) + break; - GetRawInputData(hRawInput, RID_INPUT, &inp, &size, sizeof(RAWINPUTHEADER)); + GetRawInputData(hRawInput, RID_INPUT, &inp, &size, sizeof(RAWINPUTHEADER)); - /* Mouse data */ - if(inp.header.dwType == RIM_TYPEMOUSE) - { - RAWMOUSE* mouse = &inp.data.mouse; + /* Mouse data */ + if(inp.header.dwType == RIM_TYPEMOUSE) + { + RAWMOUSE* mouse = &inp.data.mouse; - if((mouse->usFlags & 0x01) == MOUSE_MOVE_RELATIVE) - { - SDL_SendMouseMotion(data->window, 0, 1, (int)mouse->lLastX, (int)mouse->lLastY); - } - else - { - // synthesize relative moves from the abs position - static SDL_Point initialMousePoint; - if ( initialMousePoint.x == 0 && initialMousePoint.y == 0 ) - { - initialMousePoint.x = mouse->lLastX; - initialMousePoint.y = mouse->lLastY; - } + if((mouse->usFlags & 0x01) == MOUSE_MOVE_RELATIVE) + { + SDL_SendMouseMotion(data->window, 0, 1, (int)mouse->lLastX, (int)mouse->lLastY); + } + else + { + /* synthesize relative moves from the abs position */ + static SDL_Point initialMousePoint; + if ( initialMousePoint.x == 0 && initialMousePoint.y == 0 ) + { + initialMousePoint.x = mouse->lLastX; + initialMousePoint.y = mouse->lLastY; + } - SDL_SendMouseMotion(data->window, 0, 1, (int)(mouse->lLastX-initialMousePoint.x), (int)(mouse->lLastY-initialMousePoint.y) ); + SDL_SendMouseMotion(data->window, 0, 1, (int)(mouse->lLastX-initialMousePoint.x), (int)(mouse->lLastY-initialMousePoint.y) ); - initialMousePoint.x = mouse->lLastX; - initialMousePoint.y = mouse->lLastY; - } - WIN_CheckRawMouseButtons( mouse->usButtonFlags, data ); - } - break; - } + initialMousePoint.x = mouse->lLastX; + initialMousePoint.y = mouse->lLastY; + } + WIN_CheckRawMouseButtons( mouse->usButtonFlags, data ); + } + break; + } case WM_MOUSEWHEEL: { - // FIXME: This may need to accumulate deltas up to WHEEL_DELTA + /* FIXME: This may need to accumulate deltas up to WHEEL_DELTA */ short motion = GET_WHEEL_DELTA_WPARAM(wParam) / WHEEL_DELTA; SDL_SendMouseWheel(data->window, 0, 0, motion); @@ -447,14 +447,14 @@ WIN_WindowProc(HWND hwnd, UINT msg, WPARAM wParam, LPARAM lParam) #ifdef WM_MOUSELEAVE case WM_MOUSELEAVE: if (SDL_GetMouseFocus() == data->window) { - if (!SDL_GetMouse()->relative_mode) { - POINT cursorPos; - GetCursorPos(&cursorPos); - ScreenToClient(hwnd, &cursorPos); - SDL_SendMouseMotion(data->window, 0, 0, cursorPos.x, cursorPos.y); - } + if (!SDL_GetMouse()->relative_mode) { + POINT cursorPos; + GetCursorPos(&cursorPos); + ScreenToClient(hwnd, &cursorPos); + SDL_SendMouseMotion(data->window, 0, 0, cursorPos.x, cursorPos.y); + } - SDL_SetMouseFocus(NULL); + SDL_SetMouseFocus(NULL); } returnCode = 0; break; @@ -463,8 +463,8 @@ WIN_WindowProc(HWND hwnd, UINT msg, WPARAM wParam, LPARAM lParam) case WM_SYSKEYDOWN: case WM_KEYDOWN: { - SDL_Scancode code = WindowsScanCodeToSDLScanCode( lParam, wParam ); - if ( code != SDL_SCANCODE_UNKNOWN ) { + SDL_Scancode code = WindowsScanCodeToSDLScanCode( lParam, wParam ); + if ( code != SDL_SCANCODE_UNKNOWN ) { SDL_SendKeyboardKey(SDL_PRESSED, code ); } } @@ -529,7 +529,7 @@ WIN_WindowProc(HWND hwnd, UINT msg, WPARAM wParam, LPARAM lParam) int max_w, max_h; int style; BOOL menu; - BOOL constrain_max_size; + BOOL constrain_max_size; /* If we allow resizing, let the resize happen naturally */ if (SDL_IsShapedWindow(data->window)) @@ -545,7 +545,7 @@ WIN_WindowProc(HWND hwnd, UINT msg, WPARAM wParam, LPARAM lParam) SDL_GetWindowMinimumSize(data->window, &min_w, &min_h); SDL_GetWindowMaximumSize(data->window, &max_w, &max_h); - /* Store in min_w and min_h difference between current size and minimal + /* Store in min_w and min_h difference between current size and minimal size so we don't need to call AdjustWindowRectEx twice */ min_w -= w; min_h -= h; @@ -680,56 +680,56 @@ WIN_WindowProc(HWND hwnd, UINT msg, WPARAM wParam, LPARAM lParam) returnCode = 0; break; - case WM_TOUCH: - { - UINT i, num_inputs = LOWORD(wParam); - PTOUCHINPUT inputs = SDL_stack_alloc(TOUCHINPUT, num_inputs); - if (data->videodata->GetTouchInputInfo((HTOUCHINPUT)lParam, num_inputs, inputs, sizeof(TOUCHINPUT))) { - RECT rect; - float x, y; + case WM_TOUCH: + { + UINT i, num_inputs = LOWORD(wParam); + PTOUCHINPUT inputs = SDL_stack_alloc(TOUCHINPUT, num_inputs); + if (data->videodata->GetTouchInputInfo((HTOUCHINPUT)lParam, num_inputs, inputs, sizeof(TOUCHINPUT))) { + RECT rect; + float x, y; - if (!GetClientRect(hwnd, &rect) || - (rect.right == rect.left && rect.bottom == rect.top)) { - break; - } - ClientToScreen(hwnd, (LPPOINT) & rect); - ClientToScreen(hwnd, (LPPOINT) & rect + 1); - rect.top *= 100; - rect.left *= 100; - rect.bottom *= 100; - rect.right *= 100; + if (!GetClientRect(hwnd, &rect) || + (rect.right == rect.left && rect.bottom == rect.top)) { + break; + } + ClientToScreen(hwnd, (LPPOINT) & rect); + ClientToScreen(hwnd, (LPPOINT) & rect + 1); + rect.top *= 100; + rect.left *= 100; + rect.bottom *= 100; + rect.right *= 100; - for (i = 0; i < num_inputs; ++i) { - PTOUCHINPUT input = &inputs[i]; + for (i = 0; i < num_inputs; ++i) { + PTOUCHINPUT input = &inputs[i]; - const SDL_TouchID touchId = (SDL_TouchID)input->hSource; - if (!SDL_GetTouch(touchId)) { - if (SDL_AddTouch(touchId, "") < 0) { - continue; - } - } + const SDL_TouchID touchId = (SDL_TouchID)input->hSource; + if (!SDL_GetTouch(touchId)) { + if (SDL_AddTouch(touchId, "") < 0) { + continue; + } + } - // Get the normalized coordinates for the window - x = (float)(input->x - rect.left)/(rect.right - rect.left); - y = (float)(input->y - rect.top)/(rect.bottom - rect.top); + /* Get the normalized coordinates for the window */ + x = (float)(input->x - rect.left)/(rect.right - rect.left); + y = (float)(input->y - rect.top)/(rect.bottom - rect.top); - if (input->dwFlags & TOUCHEVENTF_DOWN) { - SDL_SendTouch(touchId, input->dwID, SDL_TRUE, x, y, 1.0f); - } - if (input->dwFlags & TOUCHEVENTF_MOVE) { - SDL_SendTouchMotion(touchId, input->dwID, x, y, 1.0f); - } - if (input->dwFlags & TOUCHEVENTF_UP) { - SDL_SendTouch(touchId, input->dwID, SDL_FALSE, x, y, 1.0f); - } - } - } - SDL_stack_free(inputs); + if (input->dwFlags & TOUCHEVENTF_DOWN) { + SDL_SendTouch(touchId, input->dwID, SDL_TRUE, x, y, 1.0f); + } + if (input->dwFlags & TOUCHEVENTF_MOVE) { + SDL_SendTouchMotion(touchId, input->dwID, x, y, 1.0f); + } + if (input->dwFlags & TOUCHEVENTF_UP) { + SDL_SendTouch(touchId, input->dwID, SDL_FALSE, x, y, 1.0f); + } + } + } + SDL_stack_free(inputs); - data->videodata->CloseTouchInputHandle((HTOUCHINPUT)lParam); - return 0; - } - break; + data->videodata->CloseTouchInputHandle((HTOUCHINPUT)lParam); + return 0; + } + break; case WM_DROPFILES: { diff --git a/src/video/windows/SDL_windowsframebuffer.c b/src/video/windows/SDL_windowsframebuffer.c index 5a2a9ef00..93af4c5e8 100644 --- a/src/video/windows/SDL_windowsframebuffer.c +++ b/src/video/windows/SDL_windowsframebuffer.c @@ -77,7 +77,7 @@ int WIN_CreateWindowFramebuffer(_THIS, SDL_Window * window, Uint32 * format, voi /* Fill in the size information */ *pitch = (((window->w * SDL_BYTESPERPIXEL(*format)) + 3) & ~3); info->bmiHeader.biWidth = window->w; - info->bmiHeader.biHeight = -window->h; /* negative for topdown bitmap */ + info->bmiHeader.biHeight = -window->h; /* negative for topdown bitmap */ info->bmiHeader.biSizeImage = window->h * (*pitch); data->mdc = CreateCompatibleDC(data->hdc); diff --git a/src/video/windows/SDL_windowskeyboard.c b/src/video/windows/SDL_windowskeyboard.c index 74f078f86..5bb9d4217 100644 --- a/src/video/windows/SDL_windowskeyboard.c +++ b/src/video/windows/SDL_windowskeyboard.c @@ -187,12 +187,12 @@ void WIN_SetTextInputRect(_THIS, SDL_Rect *rect) { SDL_VideoData *videodata = (SDL_VideoData *)_this->driverdata; - + if (!rect) { SDL_InvalidParamError("rect"); return; } - + videodata->ime_rect = *rect; } @@ -1031,7 +1031,7 @@ STDMETHODIMP UIElementSink_BeginUIElement(TSFSink *sink, DWORD dwUIElementId, BO } preading->lpVtbl->Release(preading); } - else if (SUCCEEDED(element->lpVtbl->QueryInterface(element, &IID_ITfCandidateListUIElement, (LPVOID *)&pcandlist))) { + else if (SUCCEEDED(element->lpVtbl->QueryInterface(element, &IID_ITfCandidateListUIElement, (LPVOID *)&pcandlist))) { videodata->ime_candref++; UILess_GetCandidateList(videodata, pcandlist); pcandlist->lpVtbl->Release(pcandlist); @@ -1058,7 +1058,7 @@ STDMETHODIMP UIElementSink_UpdateUIElement(TSFSink *sink, DWORD dwUIElementId) } preading->lpVtbl->Release(preading); } - else if (SUCCEEDED(element->lpVtbl->QueryInterface(element, &IID_ITfCandidateListUIElement, (LPVOID *)&pcandlist))) { + else if (SUCCEEDED(element->lpVtbl->QueryInterface(element, &IID_ITfCandidateListUIElement, (LPVOID *)&pcandlist))) { UILess_GetCandidateList(videodata, pcandlist); pcandlist->lpVtbl->Release(pcandlist); } @@ -1512,7 +1512,7 @@ void IME_Present(SDL_VideoData *videodata) if (videodata->ime_dirty) IME_Render(videodata); - // FIXME: Need to show the IME bitmap + /* FIXME: Need to show the IME bitmap */ } #endif /* SDL_DISABLE_WINDOWS_IME */ diff --git a/src/video/windows/SDL_windowsmessagebox.c b/src/video/windows/SDL_windowsmessagebox.c index 18504cb3c..bbe79237f 100644 --- a/src/video/windows/SDL_windowsmessagebox.c +++ b/src/video/windows/SDL_windowsmessagebox.c @@ -36,28 +36,28 @@ typedef struct { - WORD dlgVer; - WORD signature; - DWORD helpID; - DWORD exStyle; - DWORD style; - WORD cDlgItems; - short x; - short y; - short cx; - short cy; + WORD dlgVer; + WORD signature; + DWORD helpID; + DWORD exStyle; + DWORD style; + WORD cDlgItems; + short x; + short y; + short cx; + short cy; } DLGTEMPLATEEX; typedef struct { - DWORD helpID; - DWORD exStyle; - DWORD style; - short x; - short y; - short cx; - short cy; - DWORD id; + DWORD helpID; + DWORD exStyle; + DWORD style; + short x; + short y; + short cx; + short cy; + DWORD id; } DLGITEMTEMPLATEEX; #pragma pack(pop) @@ -76,7 +76,7 @@ static INT_PTR MessageBoxDialogProc(HWND hDlg, UINT iMessage, WPARAM wParam, LPA switch ( iMessage ) { case WM_COMMAND: /* Return the ID of the button that was pushed */ - EndDialog(hDlg, LOWORD(wParam)); + EndDialog(hDlg, LOWORD(wParam)); return TRUE; default: @@ -108,7 +108,7 @@ static SDL_bool ExpandDialogSpace(WIN_DialogData *dialog, size_t space) } return SDL_TRUE; } - + static SDL_bool AlignDialogData(WIN_DialogData *dialog, size_t size) { size_t padding = (dialog->used % size); @@ -166,7 +166,7 @@ static int s_BaseUnitsX; static int s_BaseUnitsY; static void Vec2ToDLU(short *x, short *y) { - SDL_assert(s_BaseUnitsX != 0); // we init in WIN_ShowMessageBox(), which is the only public function... + SDL_assert(s_BaseUnitsX != 0); /* we init in WIN_ShowMessageBox(), which is the only public function... */ *x = MulDiv(*x, 4, s_BaseUnitsX); *y = MulDiv(*y, 8, s_BaseUnitsY); @@ -265,37 +265,37 @@ static WIN_DialogData *CreateDialogData(int w, int h, const char *caption) return NULL; } - // No menu + /* No menu */ WordToPass = 0; if (!AddDialogData(dialog, &WordToPass, 2)) { FreeDialogData(dialog); return NULL; } - // No custom class + /* No custom class */ if (!AddDialogData(dialog, &WordToPass, 2)) { FreeDialogData(dialog); return NULL; } - // title + /* title */ if (!AddDialogString(dialog, caption)) { FreeDialogData(dialog); return NULL; } - // Font stuff + /* Font stuff */ { - // - // We want to use the system messagebox font. - // + /* + * We want to use the system messagebox font. + */ BYTE ToPass; - + NONCLIENTMETRICSA NCM; NCM.cbSize = sizeof(NCM); SystemParametersInfoA(SPI_GETNONCLIENTMETRICS, 0, &NCM, 0); - - // Font size - convert to logical font size for dialog parameter. + + /* Font size - convert to logical font size for dialog parameter. */ { HDC ScreenDC = GetDC(0); WordToPass = (WORD)(-72 * NCM.lfMessageFont.lfHeight / GetDeviceCaps(ScreenDC, LOGPIXELSY)); @@ -307,28 +307,28 @@ static WIN_DialogData *CreateDialogData(int w, int h, const char *caption) return NULL; } - // Font weight + /* Font weight */ WordToPass = (WORD)NCM.lfMessageFont.lfWeight; if (!AddDialogData(dialog, &WordToPass, 2)) { FreeDialogData(dialog); return NULL; } - // italic? + /* italic? */ ToPass = NCM.lfMessageFont.lfItalic; if (!AddDialogData(dialog, &ToPass, 1)) { FreeDialogData(dialog); return NULL; } - // charset? + /* charset? */ ToPass = NCM.lfMessageFont.lfCharSet; if (!AddDialogData(dialog, &ToPass, 1)) { FreeDialogData(dialog); return NULL; } - // font typeface. + /* font typeface. */ if (!AddDialogString(dialog, NCM.lfMessageFont.lfFaceName)) { FreeDialogData(dialog); return NULL; @@ -355,44 +355,44 @@ WIN_ShowMessageBox(const SDL_MessageBoxData *messageboxdata, int *buttonid) const int ButtonHeight = 26; const int TextMargin = 16; const int ButtonMargin = 12; - - // Jan 25th, 2013 - dant@fleetsa.com - // - // - // I've tried to make this more reasonable, but I've run in to a lot - // of nonsense. - // - // The original issue is the code was written in pixels and not - // dialog units (DLUs). All DialogBox functions use DLUs, which - // vary based on the selected font (yay). - // - // According to MSDN, the most reliable way to convert is via - // MapDialogUnits, which requires an HWND, which we don't have - // at time of template creation. - // - // We do however have: - // The system font (DLU width 8 for me) - // The font we select for the dialog (DLU width 6 for me) - // - // Based on experimentation, *neither* of these return the value - // actually used. Stepping in to MapDialogUnits(), the conversion - // is fairly clear, and uses 7 for me. - // - // As a result, some of this is hacky to ensure the sizing is - // somewhat correct. - // - // Honestly, a long term solution is to use CreateWindow, not CreateDialog. - // - // - // In order to get text dimensions we need to have a DC with the desired font. - // I'm assuming a dialog box in SDL is rare enough we can to the create. - // + /* Jan 25th, 2013 - dant@fleetsa.com + * + * + * I've tried to make this more reasonable, but I've run in to a lot + * of nonsense. + * + * The original issue is the code was written in pixels and not + * dialog units (DLUs). All DialogBox functions use DLUs, which + * vary based on the selected font (yay). + * + * According to MSDN, the most reliable way to convert is via + * MapDialogUnits, which requires an HWND, which we don't have + * at time of template creation. + * + * We do however have: + * The system font (DLU width 8 for me) + * The font we select for the dialog (DLU width 6 for me) + * + * Based on experimentation, *neither* of these return the value + * actually used. Stepping in to MapDialogUnits(), the conversion + * is fairly clear, and uses 7 for me. + * + * As a result, some of this is hacky to ensure the sizing is + * somewhat correct. + * + * Honestly, a long term solution is to use CreateWindow, not CreateDialog. + * + + * + * In order to get text dimensions we need to have a DC with the desired font. + * I'm assuming a dialog box in SDL is rare enough we can to the create. + */ HDC FontDC = CreateCompatibleDC(0); - + { - // Create a duplicate of the font used in system message boxes. + /* Create a duplicate of the font used in system message boxes. */ LOGFONT lf; NONCLIENTMETRICS NCM; NCM.cbSize = sizeof(NCM); @@ -401,40 +401,40 @@ WIN_ShowMessageBox(const SDL_MessageBoxData *messageboxdata, int *buttonid) DialogFont = CreateFontIndirect(&lf); } - // Select the font in to our DC + /* Select the font in to our DC */ SelectObject(FontDC, DialogFont); { - // Get the metrics to try and figure our DLU conversion. + /* Get the metrics to try and figure our DLU conversion. */ GetTextMetrics(FontDC, &TM); s_BaseUnitsX = TM.tmAveCharWidth + 1; s_BaseUnitsY = TM.tmHeight; } - - // Measure the *pixel* size of the string. + + /* Measure the *pixel* size of the string. */ wmessage = WIN_UTF8ToString(messageboxdata->message); SDL_zero(TextSize); Size.cx = DrawText(FontDC, wmessage, -1, &TextSize, DT_CALCRECT); - // Add some padding for hangs, etc. + /* Add some padding for hangs, etc. */ TextSize.right += 2; TextSize.bottom += 2; - // Done with the DC, and the string + /* Done with the DC, and the string */ DeleteDC(FontDC); SDL_free(wmessage); - // Increase the size of the dialog by some border spacing around the text. + /* Increase the size of the dialog by some border spacing around the text. */ Size.cx = TextSize.right - TextSize.left; Size.cy = TextSize.bottom - TextSize.top; Size.cx += TextMargin * 2; Size.cy += TextMargin * 2; - // Ensure the size is wide enough for all of the buttons. + /* Ensure the size is wide enough for all of the buttons. */ if (Size.cx < messageboxdata->numbuttons * (ButtonWidth + ButtonMargin) + ButtonMargin) Size.cx = messageboxdata->numbuttons * (ButtonWidth + ButtonMargin) + ButtonMargin; - // Add vertical space for the buttons and border. + /* Add vertical space for the buttons and border. */ Size.cy += ButtonHeight + TextMargin; dialog = CreateDialogData(Size.cx, Size.cy, messageboxdata->title); @@ -447,7 +447,7 @@ WIN_ShowMessageBox(const SDL_MessageBoxData *messageboxdata, int *buttonid) return -1; } - // Align the buttons to the right/bottom. + /* Align the buttons to the right/bottom. */ x = Size.cx - ButtonWidth - ButtonMargin; y = Size.cy - ButtonHeight - ButtonMargin; for (i = 0; i < messageboxdata->numbuttons; ++i) { diff --git a/src/video/windows/SDL_windowsmouse.c b/src/video/windows/SDL_windowsmouse.c index d762bdf38..d61c8b6bb 100644 --- a/src/video/windows/SDL_windowsmouse.c +++ b/src/video/windows/SDL_windowsmouse.c @@ -180,44 +180,44 @@ static int WIN_SetRelativeMouseMode(SDL_bool enabled) { RAWINPUTDEVICE rawMouse = { 0x01, 0x02, 0, NULL }; /* Mouse: UsagePage = 1, Usage = 2 */ - HWND hWnd; - hWnd = GetActiveWindow(); + HWND hWnd; + hWnd = GetActiveWindow(); - rawMouse.hwndTarget = hWnd; - if(!enabled) { - rawMouse.dwFlags |= RIDEV_REMOVE; - rawMouse.hwndTarget = NULL; - } + rawMouse.hwndTarget = hWnd; + if(!enabled) { + rawMouse.dwFlags |= RIDEV_REMOVE; + rawMouse.hwndTarget = NULL; + } - /* (Un)register raw input for mice */ - if(RegisterRawInputDevices(&rawMouse, 1, sizeof(RAWINPUTDEVICE)) == FALSE) { + /* (Un)register raw input for mice */ + if(RegisterRawInputDevices(&rawMouse, 1, sizeof(RAWINPUTDEVICE)) == FALSE) { - /* Only return an error when registering. If we unregister and fail, then - it's probably that we unregistered twice. That's OK. */ - if(enabled) { - return SDL_Unsupported(); - } - } + /* Only return an error when registering. If we unregister and fail, then + it's probably that we unregistered twice. That's OK. */ + if(enabled) { + return SDL_Unsupported(); + } + } - if(enabled) { - LONG cx, cy; - RECT rect; - GetWindowRect(hWnd, &rect); + if(enabled) { + LONG cx, cy; + RECT rect; + GetWindowRect(hWnd, &rect); - cx = (rect.left + rect.right) / 2; - cy = (rect.top + rect.bottom) / 2; + cx = (rect.left + rect.right) / 2; + cy = (rect.top + rect.bottom) / 2; - /* Make an absurdly small clip rect */ - rect.left = cx-1; - rect.right = cx+1; - rect.top = cy-1; - rect.bottom = cy+1; + /* Make an absurdly small clip rect */ + rect.left = cx-1; + rect.right = cx+1; + rect.top = cy-1; + rect.bottom = cy+1; - ClipCursor(&rect); - } - else - ClipCursor(NULL); + ClipCursor(&rect); + } + else + ClipCursor(NULL); return 0; } @@ -228,7 +228,7 @@ WIN_InitMouse(_THIS) SDL_Mouse *mouse = SDL_GetMouse(); mouse->CreateCursor = WIN_CreateCursor; - mouse->CreateSystemCursor = WIN_CreateSystemCursor; + mouse->CreateSystemCursor = WIN_CreateSystemCursor; mouse->ShowCursor = WIN_ShowCursor; mouse->FreeCursor = WIN_FreeCursor; mouse->WarpMouse = WIN_WarpMouse; diff --git a/src/video/windows/SDL_windowsopengl.c b/src/video/windows/SDL_windowsopengl.c index 97cbaffc4..573b08796 100644 --- a/src/video/windows/SDL_windowsopengl.c +++ b/src/video/windows/SDL_windowsopengl.c @@ -503,7 +503,7 @@ WIN_GL_SetupWindow(_THIS, SDL_Window * window) } if (!pixel_format && _this->gl_config.accelerated != 1) { iAttr[-1] = WGL_NO_ACCELERATION_ARB; - pixel_format = WIN_GL_ChoosePixelFormatARB(_this, iAttribs, fAttribs); + pixel_format = WIN_GL_ChoosePixelFormatARB(_this, iAttribs, fAttribs); } if (!pixel_format) { pixel_format = WIN_GL_ChoosePixelFormat(hdc, &pfd); @@ -530,13 +530,13 @@ WIN_GL_CreateContext(_THIS, SDL_Window * window) } if (_this->gl_config.major_version < 3 && - _this->gl_config.profile_mask == 0 && - _this->gl_config.flags == 0) { + _this->gl_config.profile_mask == 0 && + _this->gl_config.flags == 0) { /* Create legacy context */ context = _this->gl_data->wglCreateContext(hdc); - if( share_context != 0 ) { + if( share_context != 0 ) { _this->gl_data->wglShareLists(share_context, context); - } + } } else { PFNWGLCREATECONTEXTATTRIBSARBPROC wglCreateContextAttribsARB; HGLRC temp_context = _this->gl_data->wglCreateContext(hdc); @@ -558,27 +558,27 @@ WIN_GL_CreateContext(_THIS, SDL_Window * window) SDL_SetError("GL 3.x is not supported"); context = temp_context; } else { - /* max 8 attributes plus terminator */ + /* max 8 attributes plus terminator */ int attribs[9] = { WGL_CONTEXT_MAJOR_VERSION_ARB, _this->gl_config.major_version, WGL_CONTEXT_MINOR_VERSION_ARB, _this->gl_config.minor_version, 0 }; - int iattr = 4; + int iattr = 4; - /* SDL profile bits match WGL profile bits */ - if( _this->gl_config.profile_mask != 0 ) { - attribs[iattr++] = WGL_CONTEXT_PROFILE_MASK_ARB; - attribs[iattr++] = _this->gl_config.profile_mask; - } + /* SDL profile bits match WGL profile bits */ + if( _this->gl_config.profile_mask != 0 ) { + attribs[iattr++] = WGL_CONTEXT_PROFILE_MASK_ARB; + attribs[iattr++] = _this->gl_config.profile_mask; + } - /* SDL flags match WGL flags */ - if( _this->gl_config.flags != 0 ) { - attribs[iattr++] = WGL_CONTEXT_FLAGS_ARB; - attribs[iattr++] = _this->gl_config.flags; - } + /* SDL flags match WGL flags */ + if( _this->gl_config.flags != 0 ) { + attribs[iattr++] = WGL_CONTEXT_FLAGS_ARB; + attribs[iattr++] = _this->gl_config.flags; + } - attribs[iattr++] = 0; + attribs[iattr++] = 0; /* Create the GL 3.x context */ context = wglCreateContextAttribsARB(hdc, share_context, attribs); diff --git a/src/video/windows/SDL_windowsshape.c b/src/video/windows/SDL_windowsshape.c index 5e3286175..fdbcdfc76 100644 --- a/src/video/windows/SDL_windowsshape.c +++ b/src/video/windows/SDL_windowsshape.c @@ -36,12 +36,12 @@ Win32_CreateShaper(SDL_Window * window) { result->userx = result->usery = 0; result->driverdata = (SDL_ShapeData*)SDL_malloc(sizeof(SDL_ShapeData)); ((SDL_ShapeData*)result->driverdata)->mask_tree = NULL; - //Put some driver-data here. + /* Put some driver-data here. */ window->shaper = result; resized_properly = Win32_ResizeWindowShape(window); if (resized_properly != 0) return NULL; - + return result; } @@ -49,15 +49,15 @@ void CombineRectRegions(SDL_ShapeTree* node,void* closure) { HRGN mask_region = *((HRGN*)closure),temp_region = NULL; if(node->kind == OpaqueShape) { - //Win32 API regions exclude their outline, so we widen the region by one pixel in each direction to include the real outline. + /* Win32 API regions exclude their outline, so we widen the region by one pixel in each direction to include the real outline. */ temp_region = CreateRectRgn(node->data.shape.x,node->data.shape.y,node->data.shape.x + node->data.shape.w + 1,node->data.shape.y + node->data.shape.h + 1); if(mask_region != NULL) { CombineRgn(mask_region,mask_region,temp_region,RGN_OR); DeleteObject(temp_region); - } - else + } + else *((HRGN*)closure) = temp_region; - } + } } int @@ -77,12 +77,12 @@ Win32_SetWindowShape(SDL_WindowShaper *shaper,SDL_Surface *shape,SDL_WindowShape if(data->mask_tree != NULL) SDL_FreeShapeTree(&data->mask_tree); data->mask_tree = SDL_CalculateShapeTree(*shape_mode,shape); - + SDL_TraverseShapeTree(data->mask_tree,&CombineRectRegions,&mask_region); - SDL_assert(mask_region != NULL); + SDL_assert(mask_region != NULL); SetWindowRgn(((SDL_WindowData *)(shaper->window->driverdata))->hwnd, mask_region, TRUE); - + return 0; } @@ -95,15 +95,15 @@ Win32_ResizeWindowShape(SDL_Window *window) { data = (SDL_ShapeData *)window->shaper->driverdata; if (data == NULL) return -1; - + if(data->mask_tree != NULL) SDL_FreeShapeTree(&data->mask_tree); if(window->shaper->hasshape == SDL_TRUE) { window->shaper->userx = window->x; window->shaper->usery = window->y; SDL_SetWindowPosition(window,-1000,-1000); - } - + } + return 0; } diff --git a/src/video/windows/SDL_windowsshape.h b/src/video/windows/SDL_windowsshape.h index 3b73425e5..06aaea11e 100644 --- a/src/video/windows/SDL_windowsshape.h +++ b/src/video/windows/SDL_windowsshape.h @@ -30,7 +30,7 @@ #include "../SDL_shape_internals.h" typedef struct { - SDL_ShapeTree *mask_tree; + SDL_ShapeTree *mask_tree; } SDL_ShapeData; extern SDL_WindowShaper* Win32_CreateShaper(SDL_Window * window); diff --git a/src/video/windows/SDL_windowsvideo.c b/src/video/windows/SDL_windowsvideo.c index 7b46d2751..883cafae4 100644 --- a/src/video/windows/SDL_windowsvideo.c +++ b/src/video/windows/SDL_windowsvideo.c @@ -51,9 +51,9 @@ WIN_DeleteDevice(SDL_VideoDevice * device) SDL_VideoData *data = (SDL_VideoData *) device->driverdata; SDL_UnregisterApp(); - if (data->userDLL) { - SDL_UnloadObject(data->userDLL); - } + if (data->userDLL) { + SDL_UnloadObject(data->userDLL); + } SDL_free(device->driverdata); SDL_free(device); @@ -83,12 +83,12 @@ WIN_CreateDevice(int devindex) } device->driverdata = data; - data->userDLL = SDL_LoadObject("USER32.DLL"); - if (data->userDLL) { - data->CloseTouchInputHandle = (BOOL (WINAPI *)( HTOUCHINPUT )) SDL_LoadFunction(data->userDLL, "CloseTouchInputHandle"); - data->GetTouchInputInfo = (BOOL (WINAPI *)( HTOUCHINPUT, UINT, PTOUCHINPUT, int )) SDL_LoadFunction(data->userDLL, "GetTouchInputInfo"); - data->RegisterTouchWindow = (BOOL (WINAPI *)( HWND, ULONG )) SDL_LoadFunction(data->userDLL, "RegisterTouchWindow"); - } + data->userDLL = SDL_LoadObject("USER32.DLL"); + if (data->userDLL) { + data->CloseTouchInputHandle = (BOOL (WINAPI *)( HTOUCHINPUT )) SDL_LoadFunction(data->userDLL, "CloseTouchInputHandle"); + data->GetTouchInputInfo = (BOOL (WINAPI *)( HTOUCHINPUT, UINT, PTOUCHINPUT, int )) SDL_LoadFunction(data->userDLL, "GetTouchInputInfo"); + data->RegisterTouchWindow = (BOOL (WINAPI *)( HWND, ULONG )) SDL_LoadFunction(data->userDLL, "RegisterTouchWindow"); + } /* Set the function pointers */ device->VideoInit = WIN_VideoInit; @@ -122,11 +122,11 @@ WIN_CreateDevice(int devindex) device->UpdateWindowFramebuffer = WIN_UpdateWindowFramebuffer; device->DestroyWindowFramebuffer = WIN_DestroyWindowFramebuffer; device->OnWindowEnter = WIN_OnWindowEnter; - + device->shape_driver.CreateShaper = Win32_CreateShaper; device->shape_driver.SetWindowShape = Win32_SetWindowShape; device->shape_driver.ResizeWindowShape = Win32_ResizeWindowShape; - + #if SDL_VIDEO_OPENGL_WGL device->GL_LoadLibrary = WIN_GL_LoadLibrary; device->GL_GetProcAddress = WIN_GL_GetProcAddress; diff --git a/src/video/windows/SDL_windowsvideo.h b/src/video/windows/SDL_windowsvideo.h index 199a8ba8f..0943708b5 100644 --- a/src/video/windows/SDL_windowsvideo.h +++ b/src/video/windows/SDL_windowsvideo.h @@ -51,8 +51,8 @@ #if WINVER < 0x0601 /* Touch input definitions */ -#define TWF_FINETOUCH 1 -#define TWF_WANTPALM 2 +#define TWF_FINETOUCH 1 +#define TWF_WANTPALM 2 #define TOUCHEVENTF_MOVE 0x0001 #define TOUCHEVENTF_DOWN 0x0002 @@ -61,16 +61,16 @@ DECLARE_HANDLE(HTOUCHINPUT); typedef struct _TOUCHINPUT { - LONG x; - LONG y; - HANDLE hSource; - DWORD dwID; - DWORD dwFlags; - DWORD dwMask; - DWORD dwTime; - ULONG_PTR dwExtraInfo; - DWORD cxContact; - DWORD cyContact; + LONG x; + LONG y; + HANDLE hSource; + DWORD dwID; + DWORD dwFlags; + DWORD dwMask; + DWORD dwTime; + ULONG_PTR dwExtraInfo; + DWORD cxContact; + DWORD cyContact; } TOUCHINPUT, *PTOUCHINPUT; #endif /* WINVER < 0x0601 */ @@ -78,7 +78,7 @@ typedef struct _TOUCHINPUT { typedef BOOL (*PFNSHFullScreen)(HWND, DWORD); typedef void (*PFCoordTransform)(SDL_Window*, POINT*); -typedef struct +typedef struct { void **lpVtbl; int refcount; @@ -115,13 +115,13 @@ typedef struct SDL_VideoData { int render; - DWORD clipboard_count; + DWORD clipboard_count; - /* Touch input functions */ - void* userDLL; - BOOL (WINAPI *CloseTouchInputHandle)( HTOUCHINPUT ); - BOOL (WINAPI *GetTouchInputInfo)( HTOUCHINPUT, UINT, PTOUCHINPUT, int ); - BOOL (WINAPI *RegisterTouchWindow)( HWND, ULONG ); + /* Touch input functions */ + void* userDLL; + BOOL (WINAPI *CloseTouchInputHandle)( HTOUCHINPUT ); + BOOL (WINAPI *GetTouchInputInfo)( HTOUCHINPUT, UINT, PTOUCHINPUT, int ); + BOOL (WINAPI *RegisterTouchWindow)( HWND, ULONG ); SDL_bool ime_com_initialized; struct ITfThreadMgr *ime_threadmgr; diff --git a/src/video/windows/SDL_windowswindow.c b/src/video/windows/SDL_windowswindow.c index 97db15fb2..1e41182e4 100644 --- a/src/video/windows/SDL_windowswindow.c +++ b/src/video/windows/SDL_windowswindow.c @@ -201,7 +201,7 @@ WIN_CreateWindow(_THIS, SDL_Window * window) DWORD style = STYLE_BASIC; int x, y; int w, h; - + style |= GetWindowStyle(window); /* Figure out what the window area will be */ @@ -352,7 +352,7 @@ WIN_SetWindowPositionInternal(_THIS, SDL_Window * window, UINT flags) /* Figure out what the window area will be */ if ( SDL_ShouldAllowTopmost() && (window->flags & (SDL_WINDOW_FULLSCREEN|SDL_WINDOW_INPUT_FOCUS)) == (SDL_WINDOW_FULLSCREEN|SDL_WINDOW_INPUT_FOCUS )) { - top = HWND_TOPMOST; + top = HWND_TOPMOST; } else { top = HWND_NOTOPMOST; } @@ -403,11 +403,11 @@ WIN_RaiseWindow(_THIS, SDL_Window * window) HWND hwnd = ((SDL_WindowData *) window->driverdata)->hwnd; HWND top; - if ( SDL_ShouldAllowTopmost() && (window->flags & (SDL_WINDOW_FULLSCREEN|SDL_WINDOW_INPUT_FOCUS)) == (SDL_WINDOW_FULLSCREEN|SDL_WINDOW_INPUT_FOCUS )) { - top = HWND_TOPMOST; - } else { - top = HWND_NOTOPMOST; - } + if ( SDL_ShouldAllowTopmost() && (window->flags & (SDL_WINDOW_FULLSCREEN|SDL_WINDOW_INPUT_FOCUS)) == (SDL_WINDOW_FULLSCREEN|SDL_WINDOW_INPUT_FOCUS )) { + top = HWND_TOPMOST; + } else { + top = HWND_NOTOPMOST; + } SetWindowPos(hwnd, top, 0, 0, 0, 0, (SWP_NOMOVE | SWP_NOSIZE)); } @@ -464,11 +464,11 @@ WIN_SetWindowFullscreen(_THIS, SDL_Window * window, SDL_VideoDisplay * display, int x, y; int w, h; - if ( SDL_ShouldAllowTopmost() && (window->flags & (SDL_WINDOW_FULLSCREEN|SDL_WINDOW_INPUT_FOCUS)) == (SDL_WINDOW_FULLSCREEN|SDL_WINDOW_INPUT_FOCUS )) { - top = HWND_TOPMOST; - } else { - top = HWND_NOTOPMOST; - } + if ( SDL_ShouldAllowTopmost() && (window->flags & (SDL_WINDOW_FULLSCREEN|SDL_WINDOW_INPUT_FOCUS)) == (SDL_WINDOW_FULLSCREEN|SDL_WINDOW_INPUT_FOCUS )) { + top = HWND_TOPMOST; + } else { + top = HWND_NOTOPMOST; + } style = GetWindowLong(hwnd, GWL_STYLE); style &= ~STYLE_MASK; @@ -550,22 +550,22 @@ WIN_SetWindowGrab(_THIS, SDL_Window * window, SDL_bool grabbed) ClipCursor(NULL); } - if ( window->flags & SDL_WINDOW_FULLSCREEN ) - { - HWND top; - SDL_WindowData *data = (SDL_WindowData *) window->driverdata; - HWND hwnd = data->hwnd; - UINT flags = SWP_NOMOVE | SWP_NOSIZE; + if ( window->flags & SDL_WINDOW_FULLSCREEN ) + { + HWND top; + SDL_WindowData *data = (SDL_WindowData *) window->driverdata; + HWND hwnd = data->hwnd; + UINT flags = SWP_NOMOVE | SWP_NOSIZE; - if ( SDL_ShouldAllowTopmost() && (window->flags & SDL_WINDOW_INPUT_FOCUS ) ) { - top = HWND_TOPMOST; - } else { - top = HWND_NOTOPMOST; - flags |= SWP_NOZORDER; - } - - SetWindowPos(hwnd, top, 0, 0, 0, 0, flags); - } + if ( SDL_ShouldAllowTopmost() && (window->flags & SDL_WINDOW_INPUT_FOCUS ) ) { + top = HWND_TOPMOST; + } else { + top = HWND_NOTOPMOST; + flags |= SWP_NOZORDER; + } + + SetWindowPos(hwnd, top, 0, 0, 0, 0, flags); + } } void diff --git a/src/video/windows/wmmsg.h b/src/video/windows/wmmsg.h index 0c36cf82c..2cc7a843f 100644 --- a/src/video/windows/wmmsg.h +++ b/src/video/windows/wmmsg.h @@ -1,5 +1,5 @@ -#define MAX_WMMSG (sizeof(wmtab)/sizeof(wmtab[0])) +#define MAX_WMMSG (sizeof(wmtab)/sizeof(wmtab[0])) char *wmtab[] = { "WM_NULL", diff --git a/src/video/x11/SDL_x11clipboard.c b/src/video/x11/SDL_x11clipboard.c index 0c3b000e0..bdeb4da8a 100644 --- a/src/video/x11/SDL_x11clipboard.c +++ b/src/video/x11/SDL_x11clipboard.c @@ -139,7 +139,7 @@ X11_GetClipboardText(_THIS) if (!text) { text = SDL_strdup(""); } - + return text; } @@ -151,7 +151,7 @@ X11_HasClipboardText(_THIS) if (text) { result = (SDL_strlen(text)>0) ? SDL_TRUE : SDL_FALSE; SDL_free(text); - } + } return result; } diff --git a/src/video/x11/SDL_x11dyn.c b/src/video/x11/SDL_x11dyn.c index dbd7d7c13..ab0eafb4d 100644 --- a/src/video/x11/SDL_x11dyn.c +++ b/src/video/x11/SDL_x11dyn.c @@ -107,9 +107,9 @@ X11_GetSym(const char *fnname, int *pHasModule) /* Define all the function pointers and wrappers... */ #define SDL_X11_MODULE(modname) #define SDL_X11_SYM(rc,fn,params,args,ret) \ - typedef rc (*SDL_DYNX11FN_##fn) params; \ - static SDL_DYNX11FN_##fn p##fn = NULL; \ - rc fn params { ret p##fn args ; } + typedef rc (*SDL_DYNX11FN_##fn) params; \ + static SDL_DYNX11FN_##fn p##fn = NULL; \ + rc fn params { ret p##fn args ; } #include "SDL_x11sym.h" #undef SDL_X11_MODULE #undef SDL_X11_SYM diff --git a/src/video/x11/SDL_x11events.c b/src/video/x11/SDL_x11events.c index e26f64ca3..757abd93c 100644 --- a/src/video/x11/SDL_x11events.c +++ b/src/video/x11/SDL_x11events.c @@ -42,29 +42,29 @@ #include typedef struct { - unsigned char *data; - int format, count; - Atom type; + unsigned char *data; + int format, count; + Atom type; } SDL_x11Prop; /* Reads property Must call XFree on results */ -static void X11_ReadProperty(SDL_x11Prop *p, Display *disp, Window w, Atom prop) +static void X11_ReadProperty(SDL_x11Prop *p, Display *disp, Window w, Atom prop) { unsigned char *ret=NULL; Atom type; int fmt; unsigned long count; unsigned long bytes_left; - int bytes_fetch = 0; - + int bytes_fetch = 0; + do { if (ret != 0) XFree(ret); XGetWindowProperty(disp, w, prop, 0, bytes_fetch, False, AnyPropertyType, &type, &fmt, &count, &bytes_left, &ret); bytes_fetch += bytes_left; } while (bytes_left != 0); - + p->data=ret; p->format=fmt; p->count=count; @@ -124,7 +124,7 @@ static SDL_bool X11_IsWheelEvent(Display * display,XEvent * event,int * ticks) /* according to the xlib docs, no specific mouse wheel events exist. however, mouse wheel events trigger a button press and a button release immediately. thus, checking if the same button was released at the same - time as it was pressed, should be an adequate hack to derive a mouse + time as it was pressed, should be an adequate hack to derive a mouse wheel event. */ XPeekEvent(display,&peekevent); if ((peekevent.type == ButtonRelease) && @@ -501,7 +501,7 @@ X11_DispatchEvent(_THIS) case ClientMessage:{ int xdnd_version=0; - + if (xevent.xclient.message_type == videodata->XdndEnter) { SDL_bool use_list = xevent.xclient.data.l[1] & 1; data->xdnd_source = xevent.xclient.data.l[0]; @@ -519,7 +519,7 @@ X11_DispatchEvent(_THIS) } } else if (xevent.xclient.message_type == videodata->XdndPosition) { - + /* reply with status */ XClientMessageEvent m; memset(&m, 0, sizeof(XClientMessageEvent)); @@ -533,7 +533,7 @@ X11_DispatchEvent(_THIS) m.data.l[2] = 0; /* specify an empty rectangle */ m.data.l[3] = 0; m.data.l[4] = videodata->XdndActionCopy; /* we only accept copying anyway */ - + XSendEvent(display, xevent.xclient.data.l[0], False, NoEventMask, (XEvent*)&m); XFlush(display); } @@ -554,9 +554,9 @@ X11_DispatchEvent(_THIS) } else { /* convert */ if(xdnd_version >= 1) { - XConvertSelection(display, videodata->XdndSelection, data->xdnd_req, videodata->PRIMARY, data->xwindow, xevent.xclient.data.l[2]); + XConvertSelection(display, videodata->XdndSelection, data->xdnd_req, videodata->PRIMARY, data->xwindow, xevent.xclient.data.l[2]); } else { - XConvertSelection(display, videodata->XdndSelection, data->xdnd_req, videodata->PRIMARY, data->xwindow, CurrentTime); + XConvertSelection(display, videodata->XdndSelection, data->xdnd_req, videodata->PRIMARY, data->xwindow, CurrentTime); } } } @@ -596,7 +596,7 @@ X11_DispatchEvent(_THIS) break; case MotionNotify:{ - SDL_Mouse *mouse = SDL_GetMouse(); + SDL_Mouse *mouse = SDL_GetMouse(); if(!mouse->relative_mode) { #ifdef DEBUG_MOTION printf("window %p: X11 motion: %d,%d\n", xevent.xmotion.x, xevent.xmotion.y); @@ -775,7 +775,7 @@ X11_DispatchEvent(_THIS) /* read data */ SDL_x11Prop p; X11_ReadProperty(&p, display, data->xwindow, videodata->PRIMARY); - + if(p.format==8) { SDL_bool expect_lf = SDL_FALSE; char *start = NULL; @@ -807,9 +807,9 @@ X11_DispatchEvent(_THIS) scan++; } } - + XFree(p.data); - + /* send reply */ XClientMessageEvent m; memset(&m, 0, sizeof(XClientMessageEvent)); @@ -822,13 +822,13 @@ X11_DispatchEvent(_THIS) m.data.l[1] = 1; m.data.l[2] = videodata->XdndActionCopy; XSendEvent(display, data->xdnd_source, False, NoEventMask, (XEvent*)&m); - + XSync(display, False); - + } else { videodata->selection_waiting = SDL_FALSE; } - + } break; @@ -915,7 +915,7 @@ X11_PumpEvents(_THIS) data->screensaver_activity = now; } - } + } /* Keep processing pending events */ while (X11_Pending(data->display)) { diff --git a/src/video/x11/SDL_x11framebuffer.c b/src/video/x11/SDL_x11framebuffer.c index 0c8febe4a..4dfe0d174 100644 --- a/src/video/x11/SDL_x11framebuffer.c +++ b/src/video/x11/SDL_x11framebuffer.c @@ -111,7 +111,7 @@ X11_CreateWindowFramebuffer(_THIS, SDL_Window * window, Uint32 * format, if (!shm_error) { data->ximage = XShmCreateImage(display, data->visual, vinfo.depth, ZPixmap, - shminfo->shmaddr, shminfo, + shminfo->shmaddr, shminfo, window->w, window->h); if (!data->ximage) { XShmDetach(display, shminfo); @@ -133,7 +133,7 @@ X11_CreateWindowFramebuffer(_THIS, SDL_Window * window, Uint32 * format, } data->ximage = XCreateImage(display, data->visual, - vinfo.depth, ZPixmap, 0, (char *)(*pixels), + vinfo.depth, ZPixmap, 0, (char *)(*pixels), window->w, window->h, 32, 0); if (!data->ximage) { SDL_free(*pixels); diff --git a/src/video/x11/SDL_x11messagebox.c b/src/video/x11/SDL_x11messagebox.c index 47cac1c66..38867f06a 100644 --- a/src/video/x11/SDL_x11messagebox.c +++ b/src/video/x11/SDL_x11messagebox.c @@ -700,8 +700,8 @@ X11_ShowMessageBox(const SDL_MessageBoxData *messageboxdata, int *buttonid) int fds[2]; int status = 0; - /* Need to flush here in case someone has turned grab off and it hasn't gone through yet, etc. */ - XFlush(data->display); + /* Need to flush here in case someone has turned grab off and it hasn't gone through yet, etc. */ + XFlush(data->display); if (pipe(fds) == -1) { return X11_ShowMessageBoxImpl(messageboxdata, buttonid); /* oh well. */ diff --git a/src/video/x11/SDL_x11modes.c b/src/video/x11/SDL_x11modes.c index 60363b491..b1da7370f 100644 --- a/src/video/x11/SDL_x11modes.c +++ b/src/video/x11/SDL_x11modes.c @@ -577,7 +577,7 @@ X11_InitModes(_THIS) unsigned long nitems, bytes_after; Atom actual_type; - if (props[i] == EDID) { + if (props[i] == EDID) { if (XRRGetOutputProperty(data->display, res->outputs[output], props[i], 0, 100, False, False, diff --git a/src/video/x11/SDL_x11mouse.c b/src/video/x11/SDL_x11mouse.c index 1d021b7b6..441ecdfe3 100644 --- a/src/video/x11/SDL_x11mouse.c +++ b/src/video/x11/SDL_x11mouse.c @@ -194,8 +194,8 @@ X11_CreatePixmapCursor(SDL_Surface * surface, int hot_x, int hot_y) surface->w, surface->h); cursor = XCreatePixmapCursor(display, data_pixmap, mask_pixmap, &fg, &bg, hot_x, hot_y); - XFreePixmap(display, data_pixmap); - XFreePixmap(display, mask_pixmap); + XFreePixmap(display, data_pixmap); + XFreePixmap(display, mask_pixmap); return cursor; } @@ -236,8 +236,8 @@ X11_CreateSystemCursor(SDL_SystemCursor id) default: SDL_assert(0); return NULL; - // X Font Cursors reference: - // http://tronche.com/gui/x/xlib/appendix/b/ + /* X Font Cursors reference: */ + /* http://tronche.com/gui/x/xlib/appendix/b/ */ case SDL_SYSTEM_CURSOR_ARROW: shape = XC_left_ptr; break; case SDL_SYSTEM_CURSOR_IBEAM: shape = XC_xterm; break; case SDL_SYSTEM_CURSOR_WAIT: shape = XC_watch; break; @@ -336,7 +336,7 @@ X11_InitMouse(_THIS) SDL_Mouse *mouse = SDL_GetMouse(); mouse->CreateCursor = X11_CreateCursor; - mouse->CreateSystemCursor = X11_CreateSystemCursor; + mouse->CreateSystemCursor = X11_CreateSystemCursor; mouse->ShowCursor = X11_ShowCursor; mouse->FreeCursor = X11_FreeCursor; mouse->WarpMouse = X11_WarpMouse; diff --git a/src/video/x11/SDL_x11opengl.c b/src/video/x11/SDL_x11opengl.c index 8e6614bef..1e1078eff 100644 --- a/src/video/x11/SDL_x11opengl.c +++ b/src/video/x11/SDL_x11opengl.c @@ -33,13 +33,13 @@ #if defined(__IRIX__) /* IRIX doesn't have a GL library versioning system */ -#define DEFAULT_OPENGL "libGL.so" +#define DEFAULT_OPENGL "libGL.so" #elif defined(__MACOSX__) -#define DEFAULT_OPENGL "/usr/X11R6/lib/libGL.1.dylib" +#define DEFAULT_OPENGL "/usr/X11R6/lib/libGL.1.dylib" #elif defined(__QNXNTO__) -#define DEFAULT_OPENGL "libGL.so.3" +#define DEFAULT_OPENGL "libGL.so.3" #else -#define DEFAULT_OPENGL "libGL.so.1" +#define DEFAULT_OPENGL "libGL.so.1" #endif #ifndef GLX_NONE_EXT @@ -118,13 +118,13 @@ typedef GLXContext(*PFNGLXCREATECONTEXTATTRIBSARBPROC) (Display * dpy, #define OPENGL_REQUIRES_DLOPEN #if defined(OPENGL_REQUIRES_DLOPEN) && defined(SDL_LOADSO_DLOPEN) #include -#define GL_LoadObject(X) dlopen(X, (RTLD_NOW|RTLD_GLOBAL)) -#define GL_LoadFunction dlsym -#define GL_UnloadObject dlclose +#define GL_LoadObject(X) dlopen(X, (RTLD_NOW|RTLD_GLOBAL)) +#define GL_LoadFunction dlsym +#define GL_UnloadObject dlclose #else -#define GL_LoadObject SDL_LoadObject -#define GL_LoadFunction SDL_LoadFunction -#define GL_UnloadObject SDL_UnloadObject +#define GL_LoadObject SDL_LoadObject +#define GL_LoadFunction SDL_LoadFunction +#define GL_UnloadObject SDL_UnloadObject #endif static void X11_GL_InitExtensions(_THIS); @@ -369,21 +369,21 @@ X11_GL_InitExtensions(_THIS) } /* glXChooseVisual and glXChooseFBConfig have some small differences in - * the attribute encoding, it can be chosen with the for_FBConfig parameter. + * the attribute encoding, it can be chosen with the for_FBConfig parameter. */ -int +int X11_GL_GetAttributes(_THIS, Display * display, int screen, int * attribs, int size, Bool for_FBConfig) { int i = 0; - const int MAX_ATTRIBUTES = 64; + const int MAX_ATTRIBUTES = 64; - /* assert buffer is large enough to hold all SDL attributes. */ + /* assert buffer is large enough to hold all SDL attributes. */ SDL_assert(size >= MAX_ATTRIBUTES); /* Setup our GLX attributes according to the gl_config. */ if( for_FBConfig ) { attribs[i++] = GLX_RENDER_TYPE; - attribs[i++] = GLX_RGBA_BIT; + attribs[i++] = GLX_RGBA_BIT; } else { attribs[i++] = GLX_RGBA; } @@ -401,8 +401,8 @@ X11_GL_GetAttributes(_THIS, Display * display, int screen, int * attribs, int si if (_this->gl_config.double_buffer) { attribs[i++] = GLX_DOUBLEBUFFER; - if( for_FBConfig ) - attribs[i++] = True; + if( for_FBConfig ) + attribs[i++] = True; } attribs[i++] = GLX_DEPTH_SIZE; @@ -435,8 +435,8 @@ X11_GL_GetAttributes(_THIS, Display * display, int screen, int * attribs, int si if (_this->gl_config.stereo) { attribs[i++] = GLX_STEREO; - if( for_FBConfig ) - attribs[i++] = True; + if( for_FBConfig ) + attribs[i++] = True; } if (_this->gl_config.multisamplebuffers) { @@ -467,7 +467,7 @@ X11_GL_GetAttributes(_THIS, Display * display, int screen, int * attribs, int si attribs[i++] = None; SDL_assert(i <= MAX_ATTRIBUTES); - + return i; } @@ -631,7 +631,7 @@ X11_GL_CreateContext(_THIS, SDL_Window * window) } XSync(display, False); XSetErrorHandler(handler); - + if (!context) { SDL_SetError("Could not create GL context"); return NULL; @@ -664,7 +664,7 @@ X11_GL_MakeCurrent(_THIS, SDL_Window * window, SDL_GLContext context) return 0; } -/* +/* 0 is a valid argument to glxSwapInterval(MESA|EXT) and setting it to 0 will undo the effect of a previous call with a value that is greater than zero (or at least that is what the docs say). OTOH, 0 is an invalid diff --git a/src/video/x11/SDL_x11opengles.c b/src/video/x11/SDL_x11opengles.c index 279c58c34..218421b32 100644 --- a/src/video/x11/SDL_x11opengles.c +++ b/src/video/x11/SDL_x11opengles.c @@ -32,11 +32,11 @@ #define DEFAULT_OGL_ES "libGLESv1_CM.so" #define LOAD_FUNC(NAME) \ - *((void**)&_this->gles_data->NAME) = dlsym(handle, #NAME); \ - if (!_this->gles_data->NAME) \ - { \ - return SDL_SetError("Could not retrieve EGL function " #NAME); \ - } + *((void**)&_this->gles_data->NAME) = dlsym(handle, #NAME); \ + if (!_this->gles_data->NAME) \ + { \ + return SDL_SetError("Could not retrieve EGL function " #NAME); \ + } /* GLES implementation of SDL OpenGL support */ @@ -54,7 +54,7 @@ X11_GLES_GetProcAddress(_THIS, const char *proc) return retval; } } - + handle = _this->gl_config.dll_handle; #if defined(__OpenBSD__) && !defined(__ELF__) #undef dlsym(x,y); @@ -379,7 +379,7 @@ X11_GLES_SetSwapInterval(_THIS, int interval) status = _this->gles_data->eglSwapInterval(_this->gles_data->egl_display, interval); if (status == EGL_TRUE) { _this->gles_data->egl_swapinterval = interval; - return 0; + return 0; } return SDL_SetError("Unable to set the EGL swap interval"); @@ -406,7 +406,7 @@ void X11_GLES_DeleteContext(_THIS, SDL_GLContext context) { /* Clean up GLES and EGL */ - if (!_this->gles_data) { + if (!_this->gles_data) { return; } diff --git a/src/video/x11/SDL_x11shape.c b/src/video/x11/SDL_x11shape.c index e1e68934e..cea280722 100644 --- a/src/video/x11/SDL_x11shape.c +++ b/src/video/x11/SDL_x11shape.c @@ -61,7 +61,7 @@ int X11_ResizeWindowShape(SDL_Window* window) { SDL_ShapeData* data = window->shaper->driverdata; SDL_assert(data != NULL); - + unsigned int bitmapsize = window->w / 8; if(window->w % 8 > 0) bitmapsize += 1; @@ -76,14 +76,14 @@ X11_ResizeWindowShape(SDL_Window* window) { } } memset(data->bitmap,0,data->bitmapsize); - + window->shaper->userx = window->x; window->shaper->usery = window->y; SDL_SetWindowPosition(window,-1000,-1000); - + return 0; } - + int X11_SetWindowShape(SDL_WindowShaper *shaper,SDL_Surface *shape,SDL_WindowShapeMode *shape_mode) { if(shaper == NULL || shape == NULL || shaper->driverdata == NULL) @@ -95,13 +95,13 @@ X11_SetWindowShape(SDL_WindowShaper *shaper,SDL_Surface *shape,SDL_WindowShapeMo if(shape->w != shaper->window->w || shape->h != shaper->window->h) return -3; SDL_ShapeData *data = shaper->driverdata; - + /* Assume that shaper->alphacutoff already has a value, because SDL_SetWindowShape() should have given it one. */ SDL_CalculateShapeBitmap(shaper->mode,shape,data->bitmap,8); - + SDL_WindowData *windowdata = (SDL_WindowData*)(shaper->window->driverdata); Pixmap shapemask = XCreateBitmapFromData(windowdata->videodata->display,windowdata->xwindow,data->bitmap,shaper->window->w,shaper->window->h); - + XShapeCombineMask(windowdata->videodata->display,windowdata->xwindow, ShapeBounding, 0, 0,shapemask, ShapeSet); XSync(windowdata->videodata->display,False); diff --git a/src/video/x11/SDL_x11shape.h b/src/video/x11/SDL_x11shape.h index d7c389283..96b4a8b0a 100644 --- a/src/video/x11/SDL_x11shape.h +++ b/src/video/x11/SDL_x11shape.h @@ -28,13 +28,13 @@ #include "../SDL_sysvideo.h" typedef struct { - void* bitmap; - Uint32 bitmapsize; + void* bitmap; + Uint32 bitmapsize; } SDL_ShapeData; extern SDL_Window* X11_CreateShapedWindow(const char *title,unsigned int x,unsigned int y,unsigned int w,unsigned int h,Uint32 flags); extern SDL_WindowShaper* X11_CreateShaper(SDL_Window* window); extern int X11_ResizeWindowShape(SDL_Window* window); -extern int X11_SetWindowShape(SDL_WindowShaper *shaper,SDL_Surface *shape,SDL_WindowShapeMode *shapeMode); +extern int X11_SetWindowShape(SDL_WindowShaper *shaper,SDL_Surface *shape,SDL_WindowShapeMode *shapeMode); #endif /* _SDL_x11shape_h */ diff --git a/src/video/x11/SDL_x11video.c b/src/video/x11/SDL_x11video.c index 4794241e9..d12f87a7b 100644 --- a/src/video/x11/SDL_x11video.c +++ b/src/video/x11/SDL_x11video.c @@ -32,7 +32,7 @@ #include "SDL_x11video.h" #include "SDL_x11framebuffer.h" #include "SDL_x11shape.h" -#include "SDL_x11touch.h" +#include "SDL_x11touch.h" #include "SDL_x11xinput2.h" #if SDL_VIDEO_OPENGL_ES || SDL_VIDEO_OPENGL_ES2 diff --git a/src/video/x11/SDL_x11video.h b/src/video/x11/SDL_x11video.h index 9411b7b7e..68a041326 100644 --- a/src/video/x11/SDL_x11video.h +++ b/src/video/x11/SDL_x11video.h @@ -110,9 +110,9 @@ typedef struct SDL_VideoData Atom XdndDrop; Atom XdndFinished; Atom XdndSelection; - + SDL_Scancode key_layout[256]; - SDL_bool selection_waiting; + SDL_bool selection_waiting; #if SDL_USE_LIBDBUS DBusConnection *dbus; diff --git a/src/video/x11/SDL_x11window.c b/src/video/x11/SDL_x11window.c index 6403ac4b4..eda47f7ef 100644 --- a/src/video/x11/SDL_x11window.c +++ b/src/video/x11/SDL_x11window.c @@ -349,7 +349,7 @@ X11_CreateWindow(_THIS, SDL_Window * window) if (window->flags & SDL_WINDOW_OPENGL) { XVisualInfo *vinfo; -#if SDL_VIDEO_OPENGL_ES || SDL_VIDEO_OPENGL_ES2 +#if SDL_VIDEO_OPENGL_ES || SDL_VIDEO_OPENGL_ES2 if (_this->gl_config.use_egl == 1) { vinfo = X11_GLES_GetVisual(_this, display, screen); } else @@ -532,7 +532,7 @@ X11_CreateWindow(_THIS, SDL_Window * window) PropModeReplace, (unsigned char *)&_NET_WM_WINDOW_TYPE_NORMAL, 1); - + { Atom protocols[] = { data->WM_DELETE_WINDOW, /* Allow window to be deleted by the WM */ @@ -565,7 +565,7 @@ X11_CreateWindow(_THIS, SDL_Window * window) XdndAware = XInternAtom(display, "XdndAware", False); XChangeProperty(display, w, XdndAware, XA_ATOM, 32, PropModeReplace, - (unsigned char*)&xdnd_version, 1); + (unsigned char*)&xdnd_version, 1); XFlush(display); @@ -836,7 +836,7 @@ X11_ShowWindow(_THIS, SDL_Window * window) if (!X11_IsWindowMapped(_this, window)) { XMapRaised(display, data->xwindow); /* Blocking wait for "MapNotify" event. - * We use XIfEvent because XWindowEvent takes a mask rather than a type, + * We use XIfEvent because XWindowEvent takes a mask rather than a type, * and XCheckTypedWindowEvent doesn't block */ XIfEvent(display, &event, &isMapNotify, (XPointer)&data->xwindow); XFlush(display); @@ -853,7 +853,7 @@ X11_HideWindow(_THIS, SDL_Window * window) if (X11_IsWindowMapped(_this, window)) { XUnmapWindow(display, data->xwindow); /* Blocking wait for "UnmapNotify" event */ - XIfEvent(display, &event, &isUnmapNotify, (XPointer)&data->xwindow); + XIfEvent(display, &event, &isUnmapNotify, (XPointer)&data->xwindow); XFlush(display); } } @@ -922,7 +922,7 @@ X11_MinimizeWindow(_THIS, SDL_Window * window) SDL_DisplayData *displaydata = (SDL_DisplayData *) SDL_GetDisplayForWindow(window)->driverdata; Display *display = data->videodata->display; - + XIconifyWindow(display, data->xwindow, displaydata->screen); XFlush(display); } @@ -934,7 +934,7 @@ SetWindowActive(_THIS, SDL_Window * window) SDL_DisplayData *displaydata = (SDL_DisplayData *) SDL_GetDisplayForWindow(window)->driverdata; Display *display = data->videodata->display; - Atom _NET_ACTIVE_WINDOW = data->videodata->_NET_ACTIVE_WINDOW; + Atom _NET_ACTIVE_WINDOW = data->videodata->_NET_ACTIVE_WINDOW; if (X11_IsWindowMapped(_this, window)) { XEvent e; @@ -945,13 +945,13 @@ SetWindowActive(_THIS, SDL_Window * window) e.xclient.format = 32; e.xclient.window = data->xwindow; e.xclient.data.l[0] = 1; /* source indication. 1 = application */ - e.xclient.data.l[1] = CurrentTime; - e.xclient.data.l[2] = 0; + e.xclient.data.l[1] = CurrentTime; + e.xclient.data.l[2] = 0; XSendEvent(display, RootWindow(display, displaydata->screen), 0, SubstructureNotifyMask | SubstructureRedirectMask, &e); - XFlush(display); + XFlush(display); } } @@ -959,7 +959,7 @@ void X11_RestoreWindow(_THIS, SDL_Window * window) { SetWindowMaximized(_this, window, SDL_FALSE); - SetWindowActive(_this, window); + SetWindowActive(_this, window); X11_ShowWindow(_this, window); } diff --git a/src/video/x11/SDL_x11xinput2.c b/src/video/x11/SDL_x11xinput2.c index 2bd466a54..1b86c6774 100644 --- a/src/video/x11/SDL_x11xinput2.c +++ b/src/video/x11/SDL_x11xinput2.c @@ -39,7 +39,7 @@ static int xinput2_multitouch_supported = 0; /* Opcode returned XQueryExtension * It will be used in event processing * to know that the event came from - * this extension */ + * this extension */ static int xinput2_opcode; static void parse_valuators(const double *input_values,unsigned char *mask,int mask_len, @@ -61,7 +61,7 @@ static void parse_valuators(const double *input_values,unsigned char *mask,int m } #endif /* SDL_VIDEO_DRIVER_X11_XINPUT2 */ -void +void X11_InitXinput2(_THIS) { #if SDL_VIDEO_DRIVER_X11_XINPUT2 @@ -78,8 +78,8 @@ X11_InitXinput2(_THIS) /* * Initialize XInput 2 * According to http://who-t.blogspot.com/2009/05/xi2-recipes-part-1.html its better - * to inform Xserver what version of Xinput we support.The server will store the version we support. - * "As XI2 progresses it becomes important that you use this call as the server may treat the client + * to inform Xserver what version of Xinput we support.The server will store the version we support. + * "As XI2 progresses it becomes important that you use this call as the server may treat the client * differently depending on the supported version". * * FIXME:event and err are not needed but if not passed XQueryExtension returns SegmentationFault @@ -114,14 +114,14 @@ X11_InitXinput2(_THIS) eventmask.mask = mask; XISetMask(mask, XI_RawMotion); - + if (XISelectEvents(data->display,DefaultRootWindow(data->display),&eventmask,1) != Success) { - return; + return; } #endif } -int +int X11_HandleXinput2Event(SDL_VideoData *videodata,XGenericEventCookie *cookie) { #if SDL_VIDEO_DRIVER_X11_XINPUT2 @@ -172,7 +172,7 @@ X11_HandleXinput2Event(SDL_VideoData *videodata,XGenericEventCookie *cookie) return 0; } -void +void X11_InitXinput2Multitouch(_THIS) { #if SDL_VIDEO_DRIVER_X11_XINPUT2_SUPPORTS_MULTITOUCH @@ -202,7 +202,7 @@ X11_InitXinput2Multitouch(_THIS) #endif } -void +void X11_Xinput2SelectTouch(_THIS, SDL_Window *window) { #if SDL_VIDEO_DRIVER_X11_XINPUT2_SUPPORTS_MULTITOUCH @@ -222,13 +222,13 @@ X11_Xinput2SelectTouch(_THIS, SDL_Window *window) XISetMask(mask, XI_TouchBegin); XISetMask(mask, XI_TouchUpdate); XISetMask(mask, XI_TouchEnd); - + XISelectEvents(data->display,window_data->xwindow,&eventmask,1); #endif } -int +int X11_Xinput2IsInitialized() { #if SDL_VIDEO_DRIVER_X11_XINPUT2 diff --git a/src/video/x11/SDL_x11xinput2.h b/src/video/x11/SDL_x11xinput2.h index e74018f9c..56a4b906c 100644 --- a/src/video/x11/SDL_x11xinput2.h +++ b/src/video/x11/SDL_x11xinput2.h @@ -24,11 +24,11 @@ #define _SDL_x11xinput2_h #ifndef SDL_VIDEO_DRIVER_X11_SUPPORTS_GENERIC_EVENTS -/*Define XGenericEventCookie as forward declaration when +/*Define XGenericEventCookie as forward declaration when *xinput2 is not available in order to compile*/ struct XGenericEventCookie; typedef struct XGenericEventCookie XGenericEventCookie; -#endif +#endif extern void X11_InitXinput2(_THIS); extern void X11_InitXinput2Multitouch(_THIS); diff --git a/test/automated/common/common.h b/test/automated/common/common.h index 25e7ecf74..299f8197e 100644 --- a/test/automated/common/common.h +++ b/test/automated/common/common.h @@ -21,12 +21,12 @@ typedef struct SurfaceImage_s { int width; int height; - unsigned int bytes_per_pixel; /* 3:RGB, 4:RGBA */ + unsigned int bytes_per_pixel; /* 3:RGB, 4:RGBA */ const char *pixel_data; } SurfaceImage_t; -#define ALLOWABLE_ERROR_OPAQUE 0 -#define ALLOWABLE_ERROR_BLENDED 64 +#define ALLOWABLE_ERROR_OPAQUE 0 +#define ALLOWABLE_ERROR_BLENDED 64 /** * @brief Compares a surface and a surface image for equality. diff --git a/test/automated/rwops/TestSupportRWops_Cocoa.m b/test/automated/rwops/TestSupportRWops_Cocoa.m index 5f0dc07d3..153fd8d4d 100644 --- a/test/automated/rwops/TestSupportRWops_Cocoa.m +++ b/test/automated/rwops/TestSupportRWops_Cocoa.m @@ -20,70 +20,70 @@ FILE* TestSupportRWops_OpenFPFromReadDir(const char *file, const char *mode) { FILE* fp = NULL; - // If the file mode is writable, skip all the bundle stuff because generally the bundle is read-only. - if(strcmp("r", mode) && strcmp("rb", mode)) - { - return fopen(file, mode); - } - - NSAutoreleasePool* autorelease_pool = [[NSAutoreleasePool alloc] init]; + /* If the file mode is writable, skip all the bundle stuff because generally the bundle is read-only. */ + if(strcmp("r", mode) && strcmp("rb", mode)) + { + return fopen(file, mode); + } + + NSAutoreleasePool* autorelease_pool = [[NSAutoreleasePool alloc] init]; - NSFileManager* file_manager = [NSFileManager defaultManager]; - NSString* resource_path = [[NSBundle mainBundle] resourcePath]; + NSFileManager* file_manager = [NSFileManager defaultManager]; + NSString* resource_path = [[NSBundle mainBundle] resourcePath]; - NSString* ns_string_file_component = [file_manager stringWithFileSystemRepresentation:file length:strlen(file)]; + NSString* ns_string_file_component = [file_manager stringWithFileSystemRepresentation:file length:strlen(file)]; - NSString* full_path_with_file_to_try = [resource_path stringByAppendingPathComponent:ns_string_file_component]; - if([file_manager fileExistsAtPath:full_path_with_file_to_try]) - { - fp = fopen([full_path_with_file_to_try fileSystemRepresentation], mode); - } - else - { - fp = fopen(file, mode); - } + NSString* full_path_with_file_to_try = [resource_path stringByAppendingPathComponent:ns_string_file_component]; + if([file_manager fileExistsAtPath:full_path_with_file_to_try]) + { + fp = fopen([full_path_with_file_to_try fileSystemRepresentation], mode); + } + else + { + fp = fopen(file, mode); + } - [autorelease_pool drain]; + [autorelease_pool drain]; - return fp; + return fp; } FILE* TestSupportRWops_OpenFPFromWriteDir(const char *file, const char *mode) { FILE* fp = NULL; - - NSAutoreleasePool* autorelease_pool = [[NSAutoreleasePool alloc] init]; - - NSFileManager* file_manager = [NSFileManager defaultManager]; - NSString* ns_string_file_component = [file_manager stringWithFileSystemRepresentation:file length:strlen(file)]; - NSString* full_path_with_file_to_try = [NSTemporaryDirectory() stringByAppendingPathComponent:ns_string_file_component]; - fp = fopen([full_path_with_file_to_try fileSystemRepresentation], mode); - - [autorelease_pool drain]; - - return fp; + NSAutoreleasePool* autorelease_pool = [[NSAutoreleasePool alloc] init]; + + NSFileManager* file_manager = [NSFileManager defaultManager]; + NSString* ns_string_file_component = [file_manager stringWithFileSystemRepresentation:file length:strlen(file)]; + NSString* full_path_with_file_to_try = [NSTemporaryDirectory() stringByAppendingPathComponent:ns_string_file_component]; + + fp = fopen([full_path_with_file_to_try fileSystemRepresentation], mode); + + [autorelease_pool drain]; + + return fp; } SDL_RWops* TestSupportRWops_OpenRWopsFromReadDir(const char *file, const char *mode) { - return SDL_RWFromFile(file, mode); + return SDL_RWFromFile(file, mode); } SDL_RWops* TestSupportRWops_OpenRWopsFromWriteDir(const char *file, const char *mode) { - SDL_RWops* rw = NULL; + SDL_RWops* rw = NULL; - NSAutoreleasePool* autorelease_pool = [[NSAutoreleasePool alloc] init]; - - NSFileManager* file_manager = [NSFileManager defaultManager]; - NSString* ns_string_file_component = [file_manager stringWithFileSystemRepresentation:file length:strlen(file)]; - NSString* full_path_with_file_to_try = [NSTemporaryDirectory() stringByAppendingPathComponent:ns_string_file_component]; - - rw = SDL_RWFromFile( [full_path_with_file_to_try fileSystemRepresentation], mode ); + NSAutoreleasePool* autorelease_pool = [[NSAutoreleasePool alloc] init]; - [autorelease_pool drain]; - return rw; + NSFileManager* file_manager = [NSFileManager defaultManager]; + NSString* ns_string_file_component = [file_manager stringWithFileSystemRepresentation:file length:strlen(file)]; + NSString* full_path_with_file_to_try = [NSTemporaryDirectory() stringByAppendingPathComponent:ns_string_file_component]; + + rw = SDL_RWFromFile( [full_path_with_file_to_try fileSystemRepresentation], mode ); + + [autorelease_pool drain]; + return rw; } diff --git a/test/automated/rwops/TestSupportRWops_Generic.c b/test/automated/rwops/TestSupportRWops_Generic.c index a4b366a34..36128bf3a 100644 --- a/test/automated/rwops/TestSupportRWops_Generic.c +++ b/test/automated/rwops/TestSupportRWops_Generic.c @@ -2,7 +2,7 @@ * Customizations for specific platforms should go in alternative files. */ -// quiet windows compiler warnings +/* quiet windows compiler warnings */ #define _CRT_SECURE_NO_WARNINGS #include @@ -13,20 +13,20 @@ const char* RWOPS_WRITE = "rwops/write"; FILE* TestSupportRWops_OpenFPFromReadDir(const char *file, const char *mode) { - return fopen(file, mode); + return fopen(file, mode); } FILE* TestSupportRWops_OpenFPFromWriteDir(const char *file, const char *mode) { - return fopen(file, mode); + return fopen(file, mode); } SDL_RWops* TestSupportRWops_OpenRWopsFromReadDir(const char *file, const char *mode) { - return SDL_RWFromFile(file, mode); + return SDL_RWFromFile(file, mode); } SDL_RWops* TestSupportRWops_OpenRWopsFromWriteDir(const char *file, const char *mode) { - return SDL_RWFromFile(file, mode); + return SDL_RWFromFile(file, mode); } diff --git a/test/automated/surface/surface.c b/test/automated/surface/surface.c index 037cde924..c3974836c 100644 --- a/test/automated/surface/surface.c +++ b/test/automated/surface/surface.c @@ -49,9 +49,9 @@ static void surface_testLoad( SDL_Surface *testsur ) /* Create the blit surface. */ #ifdef __APPLE__ - face = SDL_LoadBMP("icon.bmp"); + face = SDL_LoadBMP("icon.bmp"); #else - face = SDL_LoadBMP("../icon.bmp"); + face = SDL_LoadBMP("../icon.bmp"); #endif if (SDL_ATassert( "SDL_CreateLoadBmp", face != NULL)) @@ -428,7 +428,7 @@ int test_surface (void) * Surface on surface tests. */ /* Create the test surface. */ - testsur = SDL_CreateRGBSurface( 0, 80, 60, 32, + testsur = SDL_CreateRGBSurface( 0, 80, 60, 32, RMASK, GMASK, BMASK, AMASK ); if (SDL_ATassert( "SDL_CreateRGBSurface", testsur != NULL)) goto err; diff --git a/test/checkkeys.c b/test/checkkeys.c index 49dc277b2..aa94f9f50 100644 --- a/test/checkkeys.c +++ b/test/checkkeys.c @@ -11,7 +11,7 @@ */ /* Simple program: Loop, watching keystrokes - Note that you need to call SDL_PollEvent() or SDL_WaitEvent() to + Note that you need to call SDL_PollEvent() or SDL_WaitEvent() to pump the event loop and catch keystrokes. */ diff --git a/test/loopwave.c b/test/loopwave.c index 8e7604111..11c0f1b41 100644 --- a/test/loopwave.c +++ b/test/loopwave.c @@ -12,8 +12,8 @@ /* Program to load a wave file and loop playing it using SDL sound */ -/* loopwaves.c is much more robust in handling WAVE files -- - This is only for simple WAVEs +/* loopwaves.c is much more robust in handling WAVE files -- + This is only for simple WAVEs */ #include "SDL_config.h" diff --git a/test/test-automation/include/SDL_test.h b/test/test-automation/include/SDL_test.h index 4f3b6f02e..0b37bc89f 100644 --- a/test/test-automation/include/SDL_test.h +++ b/test/test-automation/include/SDL_test.h @@ -35,12 +35,12 @@ #define ASSERT_FAILURE 0 //! Definition of all the possible test results -#define TEST_RESULT_PASS 0 -#define TEST_RESULT_FAILURE 1 -#define TEST_RESULT_NO_ASSERT 2 -#define TEST_RESULT_SKIPPED 3 -#define TEST_RESULT_KILLED 4 -#define TEST_RESULT_SETUP_FAILURE 5 +#define TEST_RESULT_PASS 0 +#define TEST_RESULT_FAILURE 1 +#define TEST_RESULT_NO_ASSERT 2 +#define TEST_RESULT_SKIPPED 3 +#define TEST_RESULT_KILLED 4 +#define TEST_RESULT_SETUP_FAILURE 5 //! Definitions for test requirements #define TEST_REQUIRES_AUDIO 1 @@ -51,16 +51,16 @@ * Holds information about a test case */ typedef struct TestCaseReference { - /*!< "Func2Stress" */ - char *name; - /*!< "This test beats the crap out of func2()" */ - char *description; - /*!< Set to TEST_ENABLED or TEST_DISABLED */ - int enabled; - /*!< Set to TEST_REQUIRES_OPENGL, TEST_REQUIRES_AUDIO, ... */ - long requirements; - /* 0) { - Log(time(0), "Fuzzer invocation count: %d", GetInvocationCount()); - } + if(GetInvocationCount() > 0) { + Log(time(0), "Fuzzer invocation count: %d", GetInvocationCount()); + } - DeinitFuzzer(); + DeinitFuzzer(); - return _testReturnValue; + return _testReturnValue; } int _CountFailedAsserts() { - return _testAssertsFailed; + return _testAssertsFailed; } /*! @@ -87,18 +87,18 @@ void _BailOut() { if(!canBailOut) - return ; + return ; - AssertSummary(_testAssertsFailed + _testAssertsPassed, + AssertSummary(_testAssertsFailed + _testAssertsPassed, _testAssertsFailed, _testAssertsPassed, time(0)); - if(GetInvocationCount() > 0) { - Log(time(0), "Fuzzer invocation count: %d", GetInvocationCount()); - } + if(GetInvocationCount() > 0) { + Log(time(0), "Fuzzer invocation count: %d", GetInvocationCount()); + } - DeinitFuzzer(); + DeinitFuzzer(); - exit(TEST_RESULT_FAILURE); // bail out from the test + exit(TEST_RESULT_FAILURE); // bail out from the test } void @@ -120,8 +120,8 @@ AssertEquals(int expected, int actual, char *message, ...) _BailOut(); } else { - AssertWithValues("AssertEquals", 1, buf, - actual, expected, time(0)); + AssertWithValues("AssertEquals", 1, buf, + actual, expected, time(0)); _testAssertsPassed++; } @@ -145,9 +145,9 @@ AssertTrue(int condition, char *message, ...) _BailOut(); } else { - Assert("AssertTrue", 1, buf, time(0)); + Assert("AssertTrue", 1, buf, time(0)); - _testAssertsPassed++; + _testAssertsPassed++; } } @@ -156,7 +156,7 @@ AssertPass(char *message, ...) { va_list args; char buf[256]; - + va_start( args, message ); SDL_vsnprintf( buf, sizeof(buf), message, args ); va_end( args ); @@ -172,7 +172,7 @@ AssertFail(char *message, ...) { va_list args; char buf[256]; - + va_start( args, message ); SDL_vsnprintf( buf, sizeof(buf), message, args ); va_end( args ); diff --git a/test/test-automation/src/libSDLtest/common/common.h b/test/test-automation/src/libSDLtest/common/common.h index cf40f1feb..f2abc9564 100644 --- a/test/test-automation/src/libSDLtest/common/common.h +++ b/test/test-automation/src/libSDLtest/common/common.h @@ -22,12 +22,12 @@ typedef struct SurfaceImage_s { int width; int height; - unsigned int bytes_per_pixel; /* 3:RGB, 4:RGBA */ + unsigned int bytes_per_pixel; /* 3:RGB, 4:RGBA */ const unsigned char pixel_data[]; } SurfaceImage_t; -#define ALLOWABLE_ERROR_OPAQUE 0 -#define ALLOWABLE_ERROR_BLENDED 64 +#define ALLOWABLE_ERROR_OPAQUE 0 +#define ALLOWABLE_ERROR_BLENDED 64 /** * @brief Compares a surface and a surface image for equality. diff --git a/test/test-automation/src/libSDLtest/fuzzer/fuzzer.c b/test/test-automation/src/libSDLtest/fuzzer/fuzzer.c index 1d245371a..0c0fc5541 100644 --- a/test/test-automation/src/libSDLtest/fuzzer/fuzzer.c +++ b/test/test-automation/src/libSDLtest/fuzzer/fuzzer.c @@ -38,156 +38,156 @@ int invocationCounter = 0; Uint64 GenerateExecKey(char *runSeed, char *suiteName, - char *testName, int iterationNumber) + char *testName, int iterationNumber) { - if(runSeed == NULL) { - fprintf(stderr, "Error: Incorrect runSeed given to GenerateExecKey function\n"); - return -1; - } + if(runSeed == NULL) { + fprintf(stderr, "Error: Incorrect runSeed given to GenerateExecKey function\n"); + return -1; + } - if(suiteName == NULL) { - fprintf(stderr, "Error: Incorrect suiteName given to GenerateExecKey function\n"); - return -1; - } + if(suiteName == NULL) { + fprintf(stderr, "Error: Incorrect suiteName given to GenerateExecKey function\n"); + return -1; + } - if(testName == NULL) { - fprintf(stderr, "Error: Incorrect testName given to GenerateExecKey function\n"); - return -1; - } + if(testName == NULL) { + fprintf(stderr, "Error: Incorrect testName given to GenerateExecKey function\n"); + return -1; + } - if(iterationNumber < 0) { - fprintf(stderr, "Error: Incorrect iteration number given to GenerateExecKey function\n"); - return -1; - } + if(iterationNumber < 0) { + fprintf(stderr, "Error: Incorrect iteration number given to GenerateExecKey function\n"); + return -1; + } - char iterationString[16]; - memset(iterationString, 0, sizeof(iterationString)); - SDL_snprintf(iterationString, sizeof(iterationString) - 1, "%d", iterationNumber); + char iterationString[16]; + memset(iterationString, 0, sizeof(iterationString)); + SDL_snprintf(iterationString, sizeof(iterationString) - 1, "%d", iterationNumber); - // combine the parameters - const Uint32 runSeedLength = strlen(runSeed); - const Uint32 suiteNameLength = strlen(suiteName); - const Uint32 testNameLength = strlen(testName); - const Uint32 iterationStringLength = strlen(iterationString); + // combine the parameters + const Uint32 runSeedLength = strlen(runSeed); + const Uint32 suiteNameLength = strlen(suiteName); + const Uint32 testNameLength = strlen(testName); + const Uint32 iterationStringLength = strlen(iterationString); - // size of the entire + 3 for slashes and + 1 for '\0' - const Uint32 entireString = runSeedLength + suiteNameLength + - testNameLength + iterationStringLength + 3 + 1; + // size of the entire + 3 for slashes and + 1 for '\0' + const Uint32 entireString = runSeedLength + suiteNameLength + + testNameLength + iterationStringLength + 3 + 1; - char *buffer = SDL_malloc(entireString); - if(!buffer) { - return 0; - } + char *buffer = SDL_malloc(entireString); + if(!buffer) { + return 0; + } - SDL_snprintf(buffer, entireString, "%s/%s/%s/%d", runSeed, suiteName, - testName, iterationNumber); + SDL_snprintf(buffer, entireString, "%s/%s/%s/%d", runSeed, suiteName, + testName, iterationNumber); - MD5_CTX md5Context; - utl_md5Init(&md5Context); - utl_md5Update(&md5Context, buffer, entireString); - utl_md5Final(&md5Context); + MD5_CTX md5Context; + utl_md5Init(&md5Context); + utl_md5Update(&md5Context, buffer, entireString); + utl_md5Final(&md5Context); - SDL_free(buffer); + SDL_free(buffer); - Uint64 *keys = (Uint64 *)md5Context.digest; + Uint64 *keys = (Uint64 *)md5Context.digest; - return keys[0]; + return keys[0]; } void InitFuzzer(Uint64 execKey) { - Uint32 a = (execKey >> 32) & 0x00000000FFFFFFFF; - Uint32 b = execKey & 0x00000000FFFFFFFF; - utl_randomInit(&rndContext, a, b); + Uint32 a = (execKey >> 32) & 0x00000000FFFFFFFF; + Uint32 b = execKey & 0x00000000FFFFFFFF; + utl_randomInit(&rndContext, a, b); } int GetInvocationCount() { - return invocationCounter; + return invocationCounter; } void DeinitFuzzer() { - invocationCounter = 0; + invocationCounter = 0; } Uint8 RandomUint8() { - invocationCounter++; + invocationCounter++; - return (Uint8) utl_randomInt(&rndContext) & 0x000000FF; + return (Uint8) utl_randomInt(&rndContext) & 0x000000FF; } Sint8 RandomSint8() { - invocationCounter++; + invocationCounter++; - return (Sint8) utl_randomInt(&rndContext) & 0x000000FF; + return (Sint8) utl_randomInt(&rndContext) & 0x000000FF; } Uint16 RandomUint16() { - invocationCounter++; + invocationCounter++; - return (Uint16) utl_randomInt(&rndContext) & 0x0000FFFF; + return (Uint16) utl_randomInt(&rndContext) & 0x0000FFFF; } Sint16 RandomSint16() { - invocationCounter++; + invocationCounter++; - return (Sint16) utl_randomInt(&rndContext) & 0x0000FFFF; + return (Sint16) utl_randomInt(&rndContext) & 0x0000FFFF; } Sint32 RandomSint32() { - invocationCounter++; + invocationCounter++; - return (Sint32) utl_randomInt(&rndContext); + return (Sint32) utl_randomInt(&rndContext); } Uint32 RandomUint32() { - invocationCounter++; + invocationCounter++; - return (Uint32) utl_randomInt(&rndContext); + return (Uint32) utl_randomInt(&rndContext); } Uint64 RandomUint64() { - Uint64 value; + Uint64 value; - invocationCounter++; + invocationCounter++; - Uint32 *vp = (Uint32*)&value; - vp[0] = RandomSint32(); - vp[1] = RandomSint32(); + Uint32 *vp = (Uint32*)&value; + vp[0] = RandomSint32(); + vp[1] = RandomSint32(); - return value; + return value; } Sint64 RandomSint64() { - Uint64 value; + Uint64 value; - invocationCounter++; + invocationCounter++; - Uint32 *vp = (Uint32*)&value; - vp[0] = RandomSint32(); - vp[1] = RandomSint32(); + Uint32 *vp = (Uint32*)&value; + vp[0] = RandomSint32(); + vp[1] = RandomSint32(); - return value; + return value; } @@ -195,20 +195,20 @@ RandomSint64() Sint32 RandomIntegerInRange(Sint32 pMin, Sint32 pMax) { - Sint64 min = pMin; - Sint64 max = pMax; + Sint64 min = pMin; + Sint64 max = pMax; - if(pMin > pMax) { - Sint64 temp = min; - min = max; - max = temp; - } else if(pMin == pMax) { - return min; - } + if(pMin > pMax) { + Sint64 temp = min; + min = max; + max = temp; + } else if(pMin == pMax) { + return min; + } - Sint64 number = RandomUint32(); // invocation count increment in there + Sint64 number = RandomUint32(); // invocation count increment in there - return (Sint32)((number % ((max + 1) - min)) + min); + return (Sint32)((number % ((max + 1) - min)) + min); } /*! @@ -230,7 +230,7 @@ RandomIntegerInRange(Sint32 pMin, Sint32 pMax) * If outbuffer != NULL, it'll be freed. * * \param maxValue The biggest value that is acceptable for this data type. - * For instance, for Uint8 -> 255, Uint16 -> 65536 etc. + * For instance, for Uint8 -> 255, Uint16 -> 65536 etc. * \param pBoundary1 defines lower boundary * \param pBoundary2 defines upper boundary * \param validDomain Generate only for valid domain (for the data type) @@ -241,164 +241,164 @@ RandomIntegerInRange(Sint32 pMin, Sint32 pMax) */ Uint32 GenerateUnsignedBoundaryValues(const Uint64 maxValue, - Uint64 pBoundary1, Uint64 pBoundary2, SDL_bool validDomain, - Uint64 *outBuffer) + Uint64 pBoundary1, Uint64 pBoundary2, SDL_bool validDomain, + Uint64 *outBuffer) { - Uint64 boundary1 = pBoundary1, boundary2 = pBoundary2; + Uint64 boundary1 = pBoundary1, boundary2 = pBoundary2; - if(outBuffer != NULL) { - SDL_free(outBuffer); - } + if(outBuffer != NULL) { + SDL_free(outBuffer); + } - if(boundary1 > boundary2) { - Uint64 temp = boundary1; - boundary1 = boundary2; - boundary2 = temp; - } + if(boundary1 > boundary2) { + Uint64 temp = boundary1; + boundary1 = boundary2; + boundary2 = temp; + } - Uint64 tempBuf[4]; - Uint64 index = 0; + Uint64 tempBuf[4]; + Uint64 index = 0; - if(boundary1 == boundary2) { - tempBuf[index++] = boundary1; - } - else if(validDomain) { - tempBuf[index++] = boundary1; + if(boundary1 == boundary2) { + tempBuf[index++] = boundary1; + } + else if(validDomain) { + tempBuf[index++] = boundary1; - if(boundary1 < UINT64_MAX) - tempBuf[index++] = boundary1 + 1; + if(boundary1 < UINT64_MAX) + tempBuf[index++] = boundary1 + 1; - tempBuf[index++] = boundary2 - 1; - tempBuf[index++] = boundary2; - } - else { - if(boundary1 > 0) { - tempBuf[index++] = boundary1 - 1; - } + tempBuf[index++] = boundary2 - 1; + tempBuf[index++] = boundary2; + } + else { + if(boundary1 > 0) { + tempBuf[index++] = boundary1 - 1; + } - if(boundary2 < maxValue && boundary2 < UINT64_MAX) { - tempBuf[index++] = boundary2 + 1; - } - } + if(boundary2 < maxValue && boundary2 < UINT64_MAX) { + tempBuf[index++] = boundary2 + 1; + } + } - if(index == 0) { - // There are no valid boundaries - return 0; - } + if(index == 0) { + // There are no valid boundaries + return 0; + } - // Create the return buffer - outBuffer = SDL_malloc(index * sizeof(Uint64)); - if(outBuffer == NULL) { - return 0; - } + // Create the return buffer + outBuffer = SDL_malloc(index * sizeof(Uint64)); + if(outBuffer == NULL) { + return 0; + } - SDL_memcpy(outBuffer, tempBuf, index * sizeof(Uint64)); + SDL_memcpy(outBuffer, tempBuf, index * sizeof(Uint64)); - return index; + return index; } Uint8 RandomUint8BoundaryValue(Uint8 boundary1, Uint8 boundary2, SDL_bool validDomain) { - Uint64 *buffer = NULL; - Uint32 size; + Uint64 *buffer = NULL; + Uint32 size; - // max value for Uint8 - const Uint64 maxValue = UINT8_MAX; + // max value for Uint8 + const Uint64 maxValue = UINT8_MAX; - size = GenerateUnsignedBoundaryValues(maxValue, - (Uint64) boundary1, (Uint64) boundary2, - validDomain, buffer); - if(size == 0) { - return 0; - } + size = GenerateUnsignedBoundaryValues(maxValue, + (Uint64) boundary1, (Uint64) boundary2, + validDomain, buffer); + if(size == 0) { + return 0; + } - Uint32 index = RandomSint32() % size; - Uint8 retVal = (Uint8) buffer[index]; + Uint32 index = RandomSint32() % size; + Uint8 retVal = (Uint8) buffer[index]; - SDL_free(buffer); + SDL_free(buffer); - invocationCounter++; + invocationCounter++; - return retVal; + return retVal; } Uint16 RandomUint16BoundaryValue(Uint16 boundary1, Uint16 boundary2, SDL_bool validDomain) { - Uint64 *buffer = NULL; - Uint32 size; + Uint64 *buffer = NULL; + Uint32 size; - // max value for Uint16 - const Uint64 maxValue = UINT16_MAX; + // max value for Uint16 + const Uint64 maxValue = UINT16_MAX; - size = GenerateUnsignedBoundaryValues(maxValue, - (Uint64) boundary1, (Uint64) boundary2, - validDomain, buffer); - if(size == 0) { - return 0; - } + size = GenerateUnsignedBoundaryValues(maxValue, + (Uint64) boundary1, (Uint64) boundary2, + validDomain, buffer); + if(size == 0) { + return 0; + } - Uint32 index = RandomSint32() % size; - Uint16 retVal = (Uint16) buffer[index]; + Uint32 index = RandomSint32() % size; + Uint16 retVal = (Uint16) buffer[index]; - SDL_free(buffer); + SDL_free(buffer); - invocationCounter++; + invocationCounter++; - return retVal; + return retVal; } Uint32 RandomUint32BoundaryValue(Uint32 boundary1, Uint32 boundary2, SDL_bool validDomain) { - Uint64 *buffer = NULL; - Uint32 size; + Uint64 *buffer = NULL; + Uint32 size; - // max value for Uint32 - const Uint64 maxValue = UINT32_MAX; + // max value for Uint32 + const Uint64 maxValue = UINT32_MAX; - size = GenerateUnsignedBoundaryValues(maxValue, - (Uint64) boundary1, (Uint64) boundary2, - validDomain, buffer); - if(size == 0) { - return 0; - } + size = GenerateUnsignedBoundaryValues(maxValue, + (Uint64) boundary1, (Uint64) boundary2, + validDomain, buffer); + if(size == 0) { + return 0; + } - Uint32 index = RandomSint32() % size; - Uint32 retVal = (Uint32) buffer[index]; + Uint32 index = RandomSint32() % size; + Uint32 retVal = (Uint32) buffer[index]; - SDL_free(buffer); + SDL_free(buffer); - invocationCounter++; + invocationCounter++; - return retVal; + return retVal; } Uint64 RandomUint64BoundaryValue(Uint64 boundary1, Uint64 boundary2, SDL_bool validDomain) { - Uint64 *buffer = NULL; - Uint32 size; + Uint64 *buffer = NULL; + Uint32 size; - // max value for Uint64 - const Uint64 maxValue = UINT64_MAX; + // max value for Uint64 + const Uint64 maxValue = UINT64_MAX; - size = GenerateUnsignedBoundaryValues(maxValue, - (Uint64) boundary1, (Uint64) boundary2, - validDomain, buffer); - if(size == 0) { - return 0; - } + size = GenerateUnsignedBoundaryValues(maxValue, + (Uint64) boundary1, (Uint64) boundary2, + validDomain, buffer); + if(size == 0) { + return 0; + } - Uint32 index = RandomSint32() % size; - Uint64 retVal = (Uint64) buffer[index]; + Uint32 index = RandomSint32() % size; + Uint64 retVal = (Uint64) buffer[index]; - SDL_free(buffer); + SDL_free(buffer); - invocationCounter++; + invocationCounter++; - return retVal; + return retVal; } /*! @@ -421,9 +421,9 @@ RandomUint64BoundaryValue(Uint64 boundary1, Uint64 boundary2, SDL_bool validDoma * * * \param minValue The smallest value that is acceptable for this data type. - * For instance, for Uint8 -> -128, Uint16 -> -32,768 etc. + * For instance, for Uint8 -> -128, Uint16 -> -32,768 etc. * \param maxValue The biggest value that is acceptable for this data type. - * For instance, for Uint8 -> 127, Uint16 -> 32767 etc. + * For instance, for Uint8 -> 127, Uint16 -> 32767 etc. * \param pBoundary1 defines lower boundary * \param pBoundary2 defines upper boundary * \param validDomain Generate only for valid domain (for the data type) @@ -434,229 +434,229 @@ RandomUint64BoundaryValue(Uint64 boundary1, Uint64 boundary2, SDL_bool validDoma */ Uint32 GenerateSignedBoundaryValues(const Sint64 minValue, const Sint64 maxValue, - Sint64 pBoundary1, Sint64 pBoundary2, SDL_bool validDomain, - Sint64 *outBuffer) + Sint64 pBoundary1, Sint64 pBoundary2, SDL_bool validDomain, + Sint64 *outBuffer) { - Sint64 boundary1 = pBoundary1, boundary2 = pBoundary2; + Sint64 boundary1 = pBoundary1, boundary2 = pBoundary2; - if(outBuffer != NULL) { - SDL_free(outBuffer); - } + if(outBuffer != NULL) { + SDL_free(outBuffer); + } - if(boundary1 > boundary2) { - Sint64 temp = boundary1; - boundary1 = boundary2; - boundary2 = temp; - } + if(boundary1 > boundary2) { + Sint64 temp = boundary1; + boundary1 = boundary2; + boundary2 = temp; + } - Sint64 tempBuf[4]; + Sint64 tempBuf[4]; - Sint64 index = 0; + Sint64 index = 0; - if(boundary1 == boundary2) { - tempBuf[index++] = boundary1; - } - else if(validDomain) { - tempBuf[index++] = boundary1; + if(boundary1 == boundary2) { + tempBuf[index++] = boundary1; + } + else if(validDomain) { + tempBuf[index++] = boundary1; - if(boundary1 < LLONG_MAX) - tempBuf[index++] = boundary1 + 1; + if(boundary1 < LLONG_MAX) + tempBuf[index++] = boundary1 + 1; - if(boundary2 > LLONG_MIN) - tempBuf[index++] = boundary2 - 1; + if(boundary2 > LLONG_MIN) + tempBuf[index++] = boundary2 - 1; - tempBuf[index++] = boundary2; - } - else { - if(boundary1 > minValue && boundary1 > LLONG_MIN) { - tempBuf[index++] = boundary1 - 1; - } + tempBuf[index++] = boundary2; + } + else { + if(boundary1 > minValue && boundary1 > LLONG_MIN) { + tempBuf[index++] = boundary1 - 1; + } - if(boundary2 < maxValue && boundary2 < UINT64_MAX) { - tempBuf[index++] = boundary2 + 1; - } - } + if(boundary2 < maxValue && boundary2 < UINT64_MAX) { + tempBuf[index++] = boundary2 + 1; + } + } - if(index == 0) { - // There are no valid boundaries - return 0; - } + if(index == 0) { + // There are no valid boundaries + return 0; + } - // Create the return buffer - outBuffer = SDL_malloc(index * sizeof(Sint64)); - if(outBuffer == NULL) { - return 0; - } + // Create the return buffer + outBuffer = SDL_malloc(index * sizeof(Sint64)); + if(outBuffer == NULL) { + return 0; + } - SDL_memcpy(outBuffer, tempBuf, index * sizeof(Sint64)); + SDL_memcpy(outBuffer, tempBuf, index * sizeof(Sint64)); - return index; + return index; } Sint8 RandomSint8BoundaryValue(Sint8 boundary1, Sint8 boundary2, SDL_bool validDomain) { - Sint64 *buffer = NULL; - Uint32 size; + Sint64 *buffer = NULL; + Uint32 size; - // min & max values for Sint8 - const Sint64 maxValue = CHAR_MAX; - const Sint64 minValue = CHAR_MIN; + // min & max values for Sint8 + const Sint64 maxValue = CHAR_MAX; + const Sint64 minValue = CHAR_MIN; - size = GenerateSignedBoundaryValues(minValue, maxValue, - (Sint64) boundary1, (Sint64) boundary2, - validDomain, buffer); - if(size == 0) { - return CHAR_MIN; - } + size = GenerateSignedBoundaryValues(minValue, maxValue, + (Sint64) boundary1, (Sint64) boundary2, + validDomain, buffer); + if(size == 0) { + return CHAR_MIN; + } - Uint32 index = RandomSint32() % size; - Sint8 retVal = (Sint8) buffer[index]; + Uint32 index = RandomSint32() % size; + Sint8 retVal = (Sint8) buffer[index]; - SDL_free(buffer); + SDL_free(buffer); - invocationCounter++; + invocationCounter++; - return retVal; + return retVal; } Sint16 RandomSint16BoundaryValue(Sint16 boundary1, Sint16 boundary2, SDL_bool validDomain) { - Sint64 *buffer = NULL; - Uint32 size; + Sint64 *buffer = NULL; + Uint32 size; - // min & max values for Sint16 - const Sint64 maxValue = SHRT_MAX; - const Sint64 minValue = SHRT_MIN; + // min & max values for Sint16 + const Sint64 maxValue = SHRT_MAX; + const Sint64 minValue = SHRT_MIN; - size = GenerateSignedBoundaryValues(minValue, maxValue, - (Sint64) boundary1, (Sint64) boundary2, - validDomain, buffer); - if(size == 0) { - return SHRT_MIN; - } + size = GenerateSignedBoundaryValues(minValue, maxValue, + (Sint64) boundary1, (Sint64) boundary2, + validDomain, buffer); + if(size == 0) { + return SHRT_MIN; + } - Uint32 index = RandomSint32() % size; - Sint16 retVal = (Sint16) buffer[index]; + Uint32 index = RandomSint32() % size; + Sint16 retVal = (Sint16) buffer[index]; - SDL_free(buffer); + SDL_free(buffer); - invocationCounter++; + invocationCounter++; - return retVal; + return retVal; } Sint32 RandomSint32BoundaryValue(Sint32 boundary1, Sint32 boundary2, SDL_bool validDomain) { - Sint64 *buffer = NULL; - Uint32 size; + Sint64 *buffer = NULL; + Uint32 size; - // min & max values for Sint32 - const Sint64 maxValue = INT_MAX; - const Sint64 minValue = INT_MIN; + // min & max values for Sint32 + const Sint64 maxValue = INT_MAX; + const Sint64 minValue = INT_MIN; - size = GenerateSignedBoundaryValues(minValue, maxValue, - (Sint64) boundary1, (Sint64) boundary2, - validDomain, buffer); - if(size == 0) { - return INT_MIN; - } + size = GenerateSignedBoundaryValues(minValue, maxValue, + (Sint64) boundary1, (Sint64) boundary2, + validDomain, buffer); + if(size == 0) { + return INT_MIN; + } - Uint32 index = RandomSint32() % size; - Sint32 retVal = (Sint32) buffer[index]; + Uint32 index = RandomSint32() % size; + Sint32 retVal = (Sint32) buffer[index]; - SDL_free(buffer); + SDL_free(buffer); - invocationCounter++; + invocationCounter++; - return retVal; + return retVal; } Sint64 RandomSint64BoundaryValue(Sint64 boundary1, Sint64 boundary2, SDL_bool validDomain) { - Sint64 *buffer = NULL; - Uint32 size; + Sint64 *buffer = NULL; + Uint32 size; - // min & max values for Sint64 - const Sint64 maxValue = LLONG_MAX; - const Sint64 minValue = LLONG_MIN; + // min & max values for Sint64 + const Sint64 maxValue = LLONG_MAX; + const Sint64 minValue = LLONG_MIN; - size = GenerateSignedBoundaryValues(minValue, maxValue, - (Sint64) boundary1, (Sint64) boundary2, - validDomain, buffer); - if(size == 0) { - return LLONG_MIN; - } + size = GenerateSignedBoundaryValues(minValue, maxValue, + (Sint64) boundary1, (Sint64) boundary2, + validDomain, buffer); + if(size == 0) { + return LLONG_MIN; + } - Uint32 index = RandomSint32() % size; - Sint64 retVal = (Sint64) buffer[index]; + Uint32 index = RandomSint32() % size; + Sint64 retVal = (Sint64) buffer[index]; - SDL_free(buffer); + SDL_free(buffer); - invocationCounter++; + invocationCounter++; - return retVal; + return retVal; } float RandomUnitFloat() { - return (float) RandomUint32() / UINT_MAX; + return (float) RandomUint32() / UINT_MAX; } double RandomUnitDouble() { - return (RandomUint64() >> 11) * (1.0/9007199254740992.0); + return (RandomUint64() >> 11) * (1.0/9007199254740992.0); } float RandomFloat() { - invocationCounter++; + invocationCounter++; - // \todo to be implemented - return 0.0f; + // \todo to be implemented + return 0.0f; } double RandomDouble() { - invocationCounter++; + invocationCounter++; - // \todo to be implemented - return 0.0f; + // \todo to be implemented + return 0.0f; } char * RandomAsciiString() { - // note: invocationCounter is increment in the RandomAsciiStringWithMaximumLenght - return RandomAsciiStringWithMaximumLength(255); + // note: invocationCounter is increment in the RandomAsciiStringWithMaximumLenght + return RandomAsciiStringWithMaximumLength(255); } char * RandomAsciiStringWithMaximumLength(int maxSize) { - invocationCounter++; + invocationCounter++; - if(maxSize < 1) { - return NULL; - } + if(maxSize < 1) { + return NULL; + } - int size = (RandomUint32() % (maxSize + 1)) + 1; - char *string = SDL_malloc(size * sizeof(char)); + int size = (RandomUint32() % (maxSize + 1)) + 1; + char *string = SDL_malloc(size * sizeof(char)); - int counter = 0; - for( ; counter < size; ++counter) { - string[counter] = (char) RandomIntegerInRange(1, 127); - } + int counter = 0; + for( ; counter < size; ++counter) { + string[counter] = (char) RandomIntegerInRange(1, 127); + } - string[counter] = '\0'; + string[counter] = '\0'; - return string; + return string; } diff --git a/test/test-automation/src/libSDLtest/fuzzer/fuzzer.h b/test/test-automation/src/libSDLtest/fuzzer/fuzzer.h index f090deb7c..88096d35e 100644 --- a/test/test-automation/src/libSDLtest/fuzzer/fuzzer.h +++ b/test/test-automation/src/libSDLtest/fuzzer/fuzzer.h @@ -349,7 +349,7 @@ char *RandomAsciiStringWithMaximumLength(int maxLength); * \param iterationNumber of test iteration * * \return Generated execution key as blob of 16 bytes. It needs be deallocated. - * On error, returns NULL. + * On error, returns NULL. */ Uint64 GenerateExecKey(char *runSeed, char *suiteName, char *testName, int iterationNumber); diff --git a/test/test-automation/src/libSDLtest/fuzzer/utl_crc32.c b/test/test-automation/src/libSDLtest/fuzzer/utl_crc32.c index eb7903041..8c2e9a102 100644 --- a/test/test-automation/src/libSDLtest/fuzzer/utl_crc32.c +++ b/test/test-automation/src/libSDLtest/fuzzer/utl_crc32.c @@ -9,10 +9,10 @@ int utl_crc32Init(CRC32_CTX *crcContext) /* Sanity check context pointer */ if (crcContext==NULL) { return(-1); - } - + } + /* - * Build auxiliary table for parallel byte-at-a-time CRC-32 + * Build auxiliary table for parallel byte-at-a-time CRC-32 */ #ifdef ORIGINAL_METHOD for (i = 0; i < 256; ++i) { @@ -34,7 +34,7 @@ int utl_crc32Init(CRC32_CTX *crcContext) crcContext->crc32_table[i] = c; } #endif - + return(0); } @@ -50,7 +50,7 @@ int utl_crc32Calc(CRC32_CTX * crcContext, CrcUint8 *inBuf, CrcUint32 inLen, CrcU } if (utl_crc32CalcEnd(crcContext, crc32)) { return(-1); - } + } return(0); } @@ -62,10 +62,10 @@ int utl_crc32CalcStart(CRC32_CTX * crcContext, CrcUint32 *crc32) if (crcContext==NULL) { *crc32=0; return(-1); - } + } /* - * Preload shift register, per CRC-32 spec + * Preload shift register, per CRC-32 spec */ *crc32 = 0xffffffff; @@ -77,7 +77,7 @@ int utl_crc32CalcStart(CRC32_CTX * crcContext, CrcUint32 *crc32) int utl_crc32CalcEnd(CRC32_CTX * crcContext, CrcUint32 *crc32) { /* - * Return complement, per CRC-32 spec + * Return complement, per CRC-32 spec */ *crc32 = (~(*crc32)); @@ -95,22 +95,22 @@ int utl_crc32CalcBuffer(CRC32_CTX * crcContext, CrcUint8 *inBuf, CrcUint32 inLen if (crcContext==NULL) { *crc32=0; return(-1); - } + } /* - * Calculate CRC from data + * Calculate CRC from data */ crc = *crc32; for (p = inBuf; inLen > 0; ++p, --inLen) { -#ifdef ORIGINAL_METHOD +#ifdef ORIGINAL_METHOD crc = (crc << 8) ^ crcContext->crc32_table[(crc >> 24) ^ *p]; #else crc = ((crc >> 8) & 0x00FFFFFF) ^ crcContext->crc32_table[ (crc ^ *p) & 0xFF ]; -#endif - } +#endif + } *crc32 = crc; - + return(0); } @@ -119,7 +119,7 @@ int utl_crc32Done(CRC32_CTX * crcContext) /* Sanity check context pointer */ if (crcContext==NULL) { return(-1); - } + } return(0); } diff --git a/test/test-automation/src/libSDLtest/fuzzer/utl_crc32.h b/test/test-automation/src/libSDLtest/fuzzer/utl_crc32.h index dbbcb47ce..418d7e488 100644 --- a/test/test-automation/src/libSDLtest/fuzzer/utl_crc32.h +++ b/test/test-automation/src/libSDLtest/fuzzer/utl_crc32.h @@ -15,14 +15,14 @@ extern "C" { /* Definition shared by all CRC routines */ #ifndef CrcUint32 - #define CrcUint32 unsigned int + #define CrcUint32 unsigned int #endif #ifndef CrcUint8 - #define CrcUint8 unsigned char + #define CrcUint8 unsigned char #endif #ifdef ORIGINAL_METHOD - #define CRC32_POLY 0x04c11db7 /* AUTODIN II, Ethernet, & FDDI */ + #define CRC32_POLY 0x04c11db7 /* AUTODIN II, Ethernet, & FDDI */ #else #define CRC32_POLY 0xEDB88320 /* Perl String::CRC32 compatible */ #endif @@ -45,12 +45,12 @@ extern "C" { #define DLLINTERFACE #endif -/* +/* * utl_crc32Init: initialize the CRC context * * Parameters: * - * crcContext pointer to context variable + * crcContext pointer to context variable * * Return value: * @@ -64,10 +64,10 @@ extern "C" { /* * utl_crc32Calc: calculate a crc32 from a data block - * + * * Parameters: * - * crcContext pointer to context variable + * crcContext pointer to context variable * inBuf input buffer to checksum * inLen length of input buffer * crc32 pointer to Uint32 to store the final CRC into @@ -93,7 +93,7 @@ extern "C" { * * Parameters: * - * crcContext pointer to context variable + * crcContext pointer to context variable * * Return value: * diff --git a/test/test-automation/src/libSDLtest/fuzzer/utl_md5.c b/test/test-automation/src/libSDLtest/fuzzer/utl_md5.c index 626297bcf..c4f224735 100644 --- a/test/test-automation/src/libSDLtest/fuzzer/utl_md5.c +++ b/test/test-automation/src/libSDLtest/fuzzer/utl_md5.c @@ -81,7 +81,7 @@ static unsigned char MD5PADDING[64] = { (a) += (b); \ } -/* +/* The routine MD5Init initializes the message-digest context mdContext. All fields are set to zero. */ @@ -99,26 +99,26 @@ void utl_md5Init(MD5_CTX * mdContext) mdContext->buf[3] = (MD5UINT4) 0x10325476; } -/* +/* The routine MD5Update updates the message-digest context to account for the presence of each of the characters inBuf[0..inLen-1] in the message whose digest is being computed. */ void utl_md5Update(MD5_CTX * mdContext, unsigned char *inBuf, - unsigned int inLen) + unsigned int inLen) { MD5UINT4 in[16]; int mdi; unsigned int i, ii; /* - * compute number of bytes mod 64 + * compute number of bytes mod 64 */ mdi = (int) ((mdContext->i[0] >> 3) & 0x3F); /* - * update number of bits + * update number of bits */ if ((mdContext->i[0] + ((MD5UINT4) inLen << 3)) < mdContext->i[0]) mdContext->i[1]++; @@ -127,26 +127,26 @@ void utl_md5Update(MD5_CTX * mdContext, unsigned char *inBuf, while (inLen--) { /* - * add new character to buffer, increment mdi + * add new character to buffer, increment mdi */ mdContext->in[mdi++] = *inBuf++; /* - * transform if necessary + * transform if necessary */ if (mdi == 0x40) { for (i = 0, ii = 0; i < 16; i++, ii += 4) - in[i] = (((MD5UINT4) mdContext->in[ii + 3]) << 24) | - (((MD5UINT4) mdContext->in[ii + 2]) << 16) | - (((MD5UINT4) mdContext->in[ii + 1]) << 8) | - ((MD5UINT4) mdContext->in[ii]); + in[i] = (((MD5UINT4) mdContext->in[ii + 3]) << 24) | + (((MD5UINT4) mdContext->in[ii + 2]) << 16) | + (((MD5UINT4) mdContext->in[ii + 1]) << 8) | + ((MD5UINT4) mdContext->in[ii]); Transform(mdContext->buf, in); mdi = 0; } } } -/* +/* The routine MD5Final terminates the message-digest computation and ends with the desired message digest in mdContext->digest[0...15]. */ @@ -159,24 +159,24 @@ void utl_md5Final(MD5_CTX * mdContext) unsigned int padLen; /* - * save number of bits + * save number of bits */ in[14] = mdContext->i[0]; in[15] = mdContext->i[1]; /* - * compute number of bytes mod 64 + * compute number of bytes mod 64 */ mdi = (int) ((mdContext->i[0] >> 3) & 0x3F); /* - * pad out to 56 mod 64 + * pad out to 56 mod 64 */ padLen = (mdi < 56) ? (56 - mdi) : (120 - mdi); utl_md5Update(mdContext, MD5PADDING, padLen); /* - * append length in bits and transform + * append length in bits and transform */ for (i = 0, ii = 0; i < 14; i++, ii += 4) in[i] = (((MD5UINT4) mdContext->in[ii + 3]) << 24) | @@ -186,7 +186,7 @@ void utl_md5Final(MD5_CTX * mdContext) Transform(mdContext->buf, in); /* - * store buffer in digest + * store buffer in digest */ for (i = 0, ii = 0; i < 4; i++, ii += 4) { mdContext->digest[ii] = (unsigned char) (mdContext->buf[i] & 0xFF); @@ -206,100 +206,100 @@ static void Transform(MD5UINT4 * buf, MD5UINT4 * in) MD5UINT4 a = buf[0], b = buf[1], c = buf[2], d = buf[3]; /* - * Round 1 + * Round 1 */ #define S11 7 #define S12 12 #define S13 17 #define S14 22 - FF(a, b, c, d, in[0], S11, 3614090360u); /* 1 */ - FF(d, a, b, c, in[1], S12, 3905402710u); /* 2 */ - FF(c, d, a, b, in[2], S13, 606105819u); /* 3 */ - FF(b, c, d, a, in[3], S14, 3250441966u); /* 4 */ - FF(a, b, c, d, in[4], S11, 4118548399u); /* 5 */ - FF(d, a, b, c, in[5], S12, 1200080426u); /* 6 */ - FF(c, d, a, b, in[6], S13, 2821735955u); /* 7 */ - FF(b, c, d, a, in[7], S14, 4249261313u); /* 8 */ - FF(a, b, c, d, in[8], S11, 1770035416u); /* 9 */ - FF(d, a, b, c, in[9], S12, 2336552879u); /* 10 */ - FF(c, d, a, b, in[10], S13, 4294925233u); /* 11 */ - FF(b, c, d, a, in[11], S14, 2304563134u); /* 12 */ - FF(a, b, c, d, in[12], S11, 1804603682u); /* 13 */ - FF(d, a, b, c, in[13], S12, 4254626195u); /* 14 */ - FF(c, d, a, b, in[14], S13, 2792965006u); /* 15 */ - FF(b, c, d, a, in[15], S14, 1236535329u); /* 16 */ + FF(a, b, c, d, in[0], S11, 3614090360u); /* 1 */ + FF(d, a, b, c, in[1], S12, 3905402710u); /* 2 */ + FF(c, d, a, b, in[2], S13, 606105819u); /* 3 */ + FF(b, c, d, a, in[3], S14, 3250441966u); /* 4 */ + FF(a, b, c, d, in[4], S11, 4118548399u); /* 5 */ + FF(d, a, b, c, in[5], S12, 1200080426u); /* 6 */ + FF(c, d, a, b, in[6], S13, 2821735955u); /* 7 */ + FF(b, c, d, a, in[7], S14, 4249261313u); /* 8 */ + FF(a, b, c, d, in[8], S11, 1770035416u); /* 9 */ + FF(d, a, b, c, in[9], S12, 2336552879u); /* 10 */ + FF(c, d, a, b, in[10], S13, 4294925233u); /* 11 */ + FF(b, c, d, a, in[11], S14, 2304563134u); /* 12 */ + FF(a, b, c, d, in[12], S11, 1804603682u); /* 13 */ + FF(d, a, b, c, in[13], S12, 4254626195u); /* 14 */ + FF(c, d, a, b, in[14], S13, 2792965006u); /* 15 */ + FF(b, c, d, a, in[15], S14, 1236535329u); /* 16 */ /* - * Round 2 + * Round 2 */ #define S21 5 #define S22 9 #define S23 14 #define S24 20 - GG(a, b, c, d, in[1], S21, 4129170786u); /* 17 */ - GG(d, a, b, c, in[6], S22, 3225465664u); /* 18 */ - GG(c, d, a, b, in[11], S23, 643717713u); /* 19 */ - GG(b, c, d, a, in[0], S24, 3921069994u); /* 20 */ - GG(a, b, c, d, in[5], S21, 3593408605u); /* 21 */ - GG(d, a, b, c, in[10], S22, 38016083u); /* 22 */ - GG(c, d, a, b, in[15], S23, 3634488961u); /* 23 */ - GG(b, c, d, a, in[4], S24, 3889429448u); /* 24 */ - GG(a, b, c, d, in[9], S21, 568446438u); /* 25 */ - GG(d, a, b, c, in[14], S22, 3275163606u); /* 26 */ - GG(c, d, a, b, in[3], S23, 4107603335u); /* 27 */ - GG(b, c, d, a, in[8], S24, 1163531501u); /* 28 */ - GG(a, b, c, d, in[13], S21, 2850285829u); /* 29 */ - GG(d, a, b, c, in[2], S22, 4243563512u); /* 30 */ - GG(c, d, a, b, in[7], S23, 1735328473u); /* 31 */ - GG(b, c, d, a, in[12], S24, 2368359562u); /* 32 */ + GG(a, b, c, d, in[1], S21, 4129170786u); /* 17 */ + GG(d, a, b, c, in[6], S22, 3225465664u); /* 18 */ + GG(c, d, a, b, in[11], S23, 643717713u); /* 19 */ + GG(b, c, d, a, in[0], S24, 3921069994u); /* 20 */ + GG(a, b, c, d, in[5], S21, 3593408605u); /* 21 */ + GG(d, a, b, c, in[10], S22, 38016083u); /* 22 */ + GG(c, d, a, b, in[15], S23, 3634488961u); /* 23 */ + GG(b, c, d, a, in[4], S24, 3889429448u); /* 24 */ + GG(a, b, c, d, in[9], S21, 568446438u); /* 25 */ + GG(d, a, b, c, in[14], S22, 3275163606u); /* 26 */ + GG(c, d, a, b, in[3], S23, 4107603335u); /* 27 */ + GG(b, c, d, a, in[8], S24, 1163531501u); /* 28 */ + GG(a, b, c, d, in[13], S21, 2850285829u); /* 29 */ + GG(d, a, b, c, in[2], S22, 4243563512u); /* 30 */ + GG(c, d, a, b, in[7], S23, 1735328473u); /* 31 */ + GG(b, c, d, a, in[12], S24, 2368359562u); /* 32 */ /* - * Round 3 + * Round 3 */ #define S31 4 #define S32 11 #define S33 16 #define S34 23 - HH(a, b, c, d, in[5], S31, 4294588738u); /* 33 */ - HH(d, a, b, c, in[8], S32, 2272392833u); /* 34 */ - HH(c, d, a, b, in[11], S33, 1839030562u); /* 35 */ - HH(b, c, d, a, in[14], S34, 4259657740u); /* 36 */ - HH(a, b, c, d, in[1], S31, 2763975236u); /* 37 */ - HH(d, a, b, c, in[4], S32, 1272893353u); /* 38 */ - HH(c, d, a, b, in[7], S33, 4139469664u); /* 39 */ - HH(b, c, d, a, in[10], S34, 3200236656u); /* 40 */ - HH(a, b, c, d, in[13], S31, 681279174u); /* 41 */ - HH(d, a, b, c, in[0], S32, 3936430074u); /* 42 */ - HH(c, d, a, b, in[3], S33, 3572445317u); /* 43 */ - HH(b, c, d, a, in[6], S34, 76029189u); /* 44 */ - HH(a, b, c, d, in[9], S31, 3654602809u); /* 45 */ - HH(d, a, b, c, in[12], S32, 3873151461u); /* 46 */ - HH(c, d, a, b, in[15], S33, 530742520u); /* 47 */ - HH(b, c, d, a, in[2], S34, 3299628645u); /* 48 */ + HH(a, b, c, d, in[5], S31, 4294588738u); /* 33 */ + HH(d, a, b, c, in[8], S32, 2272392833u); /* 34 */ + HH(c, d, a, b, in[11], S33, 1839030562u); /* 35 */ + HH(b, c, d, a, in[14], S34, 4259657740u); /* 36 */ + HH(a, b, c, d, in[1], S31, 2763975236u); /* 37 */ + HH(d, a, b, c, in[4], S32, 1272893353u); /* 38 */ + HH(c, d, a, b, in[7], S33, 4139469664u); /* 39 */ + HH(b, c, d, a, in[10], S34, 3200236656u); /* 40 */ + HH(a, b, c, d, in[13], S31, 681279174u); /* 41 */ + HH(d, a, b, c, in[0], S32, 3936430074u); /* 42 */ + HH(c, d, a, b, in[3], S33, 3572445317u); /* 43 */ + HH(b, c, d, a, in[6], S34, 76029189u); /* 44 */ + HH(a, b, c, d, in[9], S31, 3654602809u); /* 45 */ + HH(d, a, b, c, in[12], S32, 3873151461u); /* 46 */ + HH(c, d, a, b, in[15], S33, 530742520u); /* 47 */ + HH(b, c, d, a, in[2], S34, 3299628645u); /* 48 */ /* - * Round 4 + * Round 4 */ #define S41 6 #define S42 10 #define S43 15 #define S44 21 - II(a, b, c, d, in[0], S41, 4096336452u); /* 49 */ - II(d, a, b, c, in[7], S42, 1126891415u); /* 50 */ - II(c, d, a, b, in[14], S43, 2878612391u); /* 51 */ - II(b, c, d, a, in[5], S44, 4237533241u); /* 52 */ - II(a, b, c, d, in[12], S41, 1700485571u); /* 53 */ - II(d, a, b, c, in[3], S42, 2399980690u); /* 54 */ - II(c, d, a, b, in[10], S43, 4293915773u); /* 55 */ - II(b, c, d, a, in[1], S44, 2240044497u); /* 56 */ - II(a, b, c, d, in[8], S41, 1873313359u); /* 57 */ - II(d, a, b, c, in[15], S42, 4264355552u); /* 58 */ - II(c, d, a, b, in[6], S43, 2734768916u); /* 59 */ - II(b, c, d, a, in[13], S44, 1309151649u); /* 60 */ - II(a, b, c, d, in[4], S41, 4149444226u); /* 61 */ - II(d, a, b, c, in[11], S42, 3174756917u); /* 62 */ - II(c, d, a, b, in[2], S43, 718787259u); /* 63 */ - II(b, c, d, a, in[9], S44, 3951481745u); /* 64 */ + II(a, b, c, d, in[0], S41, 4096336452u); /* 49 */ + II(d, a, b, c, in[7], S42, 1126891415u); /* 50 */ + II(c, d, a, b, in[14], S43, 2878612391u); /* 51 */ + II(b, c, d, a, in[5], S44, 4237533241u); /* 52 */ + II(a, b, c, d, in[12], S41, 1700485571u); /* 53 */ + II(d, a, b, c, in[3], S42, 2399980690u); /* 54 */ + II(c, d, a, b, in[10], S43, 4293915773u); /* 55 */ + II(b, c, d, a, in[1], S44, 2240044497u); /* 56 */ + II(a, b, c, d, in[8], S41, 1873313359u); /* 57 */ + II(d, a, b, c, in[15], S42, 4264355552u); /* 58 */ + II(c, d, a, b, in[6], S43, 2734768916u); /* 59 */ + II(b, c, d, a, in[13], S44, 1309151649u); /* 60 */ + II(a, b, c, d, in[4], S41, 4149444226u); /* 61 */ + II(d, a, b, c, in[11], S42, 3174756917u); /* 62 */ + II(c, d, a, b, in[2], S43, 718787259u); /* 63 */ + II(b, c, d, a, in[9], S44, 3951481745u); /* 64 */ buf[0] += a; buf[1] += b; diff --git a/test/test-automation/src/libSDLtest/fuzzer/utl_md5.h b/test/test-automation/src/libSDLtest/fuzzer/utl_md5.h index e812b4992..ab6dbe59e 100644 --- a/test/test-automation/src/libSDLtest/fuzzer/utl_md5.h +++ b/test/test-automation/src/libSDLtest/fuzzer/utl_md5.h @@ -40,10 +40,10 @@ extern "C" { /* Data structure for MD5 (Message-Digest) computation */ typedef struct { - MD5UINT4 i[2]; /* number of _bits_ handled mod 2^64 */ - MD5UINT4 buf[4]; /* scratch buffer */ - unsigned char in[64]; /* input buffer */ - unsigned char digest[16]; /* actual digest after MD5Final call */ + MD5UINT4 i[2]; /* number of _bits_ handled mod 2^64 */ + MD5UINT4 buf[4]; /* scratch buffer */ + unsigned char in[64]; /* input buffer */ + unsigned char digest[16]; /* actual digest after MD5Final call */ } MD5_CTX; /* ---------- Function Prototypes ------------- */ @@ -58,19 +58,19 @@ extern "C" { #define DLLINTERFACE #endif -/* +/* * utl_md5Init: initialize the context * * Parameters: * - * mdContext pointer to context variable + * mdContext pointer to context variable * * Return value: * * none * * Note: The function initializes the message-digest context - * mdContext. Call before each new use of the context - + * mdContext. Call before each new use of the context - * all fields are set to zero. */ DLLINTERFACE void utl_md5Init(MD5_CTX * mdContext); @@ -78,7 +78,7 @@ extern "C" { /* * utl_md5update: update digest from variable length data - * + * * Parameters: * * mdContext pointer to context variable @@ -89,13 +89,13 @@ extern "C" { * * none * - * Note: The function updates the message-digest context to account + * Note: The function updates the message-digest context to account * for the presence of each of the characters inBuf[0..inLen-1] * in the message whose digest is being computed. */ DLLINTERFACE void utl_md5Update(MD5_CTX * mdContext, unsigned char *inBuf, - unsigned int inLen); + unsigned int inLen); /* @@ -103,7 +103,7 @@ extern "C" { * * Parameters: * - * mdContext pointer to context variable + * mdContext pointer to context variable * * Return value: * diff --git a/test/test-automation/src/libSDLtest/fuzzer/utl_random.c b/test/test-automation/src/libSDLtest/fuzzer/utl_random.c index 9290afe47..7f540d622 100644 --- a/test/test-automation/src/libSDLtest/fuzzer/utl_random.c +++ b/test/test-automation/src/libSDLtest/fuzzer/utl_random.c @@ -1,10 +1,10 @@ -/* +/* utl_random - A "32-bit Multiply with carry" random number generator. - + A "32-bit Multiply with carry" random number generator. + */ @@ -20,7 +20,7 @@ void utl_randomInit(RND_CTX * rndContext, unsigned int xi, unsigned int ci) * 1791398085 1929682203 1683268614 1965537969 1675393560 * 1967773755 1517746329 1447497129 1655692410 1606218150 * 2051013963 1075433238 1557985959 1781943330 1893513180 - * 1631296680 2131995753 2083801278 1873196400 1554115554 + * 1631296680 2131995753 2083801278 1873196400 1554115554 */ rndContext->a = 1655692410; rndContext->x = 30903; @@ -37,7 +37,7 @@ void utl_randomInit(RND_CTX * rndContext, unsigned int xi, unsigned int ci) void utl_randomInitTime(RND_CTX * rndContext) { int a,b; - + srand(time(NULL)); a=rand(); srand(clock()); diff --git a/test/test-automation/src/libSDLtest/fuzzer/utl_random.h b/test/test-automation/src/libSDLtest/fuzzer/utl_random.h index 7fcaa71bf..cd4379c99 100644 --- a/test/test-automation/src/libSDLtest/fuzzer/utl_random.h +++ b/test/test-automation/src/libSDLtest/fuzzer/utl_random.h @@ -1,11 +1,11 @@ -/* +/* - A "32-bit Multiply with carry: random number generator. + A "32-bit Multiply with carry: random number generator. Has a list of recommended multipliers. Very fast and good. - + multiply-with-carry generator" x(n) = a*x(n-1) + carry mod 2^32. period" (a*2^31)-1 - + */ #ifndef _utl_random_h @@ -28,8 +28,8 @@ extern "C" { * Macros that return random number in a specific format. See utl_random() * below for details. Float values are in the range [0.0-1.0]. */ -#define utl_randomInt(c) ((int)utl_random(c)) -#define utl_randomFloat(c) ((double)utl_random(c)/(unsigned long)0xffffffff) +#define utl_randomInt(c) ((int)utl_random(c)) +#define utl_randomFloat(c) ((double)utl_random(c)/(unsigned long)0xffffffff) typedef struct { unsigned int a; @@ -51,8 +51,8 @@ extern "C" { #define DLLINTERFACE #endif -/* - * utl_randomInit: Initialize random number generator with two integers. +/* + * utl_randomInit: Initialize random number generator with two integers. * * Paramaters: * @@ -68,10 +68,10 @@ extern "C" { * */ DLLINTERFACE void utl_randomInit(RND_CTX * rndContext, unsigned int xi, - unsigned int ci); + unsigned int ci); -/* - * utl_randomInitTime: Initialize random number generator with the time +/* + * utl_randomInitTime: Initialize random number generator with the time * * Parameters: * @@ -85,8 +85,8 @@ extern "C" { DLLINTERFACE void utl_randomInitTime(RND_CTX * rndContext); -/* - * utl_random: Returns random numbers +/* + * utl_random: Returns random numbers * * Parameters: * diff --git a/test/test-automation/src/libSDLtest/logger_helpers.c b/test/test-automation/src/libSDLtest/logger_helpers.c index f8b55513b..9e8eab025 100644 --- a/test/test-automation/src/libSDLtest/logger_helpers.c +++ b/test/test-automation/src/libSDLtest/logger_helpers.c @@ -33,12 +33,12 @@ * \returns Given integer as string */ char *IntToString(const int integer) { - static char buffer[256]; // malloc might work better - memset(buffer, 0, sizeof(buffer)); + static char buffer[256]; // malloc might work better + memset(buffer, 0, sizeof(buffer)); - SDL_snprintf(buffer, sizeof(buffer), "%d", integer); + SDL_snprintf(buffer, sizeof(buffer), "%d", integer); - return buffer; + return buffer; } /*! @@ -53,12 +53,12 @@ char *IntToString(const int integer) { * \returns Given integer as string in hex fomat */ char *IntToHexString(const Uint64 integer) { - static char buffer[256]; // malloc might work better - memset(buffer, 0, sizeof(buffer)); + static char buffer[256]; // malloc might work better + memset(buffer, 0, sizeof(buffer)); - SDL_snprintf(buffer, sizeof(buffer), "%llX", integer); + SDL_snprintf(buffer, sizeof(buffer), "%llX", integer); - return buffer; + return buffer; } /*! @@ -72,12 +72,12 @@ char *IntToHexString(const Uint64 integer) { * \returns Given double value as string */ char *DoubleToString(const double decimal) { - static char buffer[256]; // malloc might work better - memset(buffer, 0, sizeof(buffer)); + static char buffer[256]; // malloc might work better + memset(buffer, 0, sizeof(buffer)); - SDL_snprintf(buffer, sizeof(buffer), "%.5f", decimal); + SDL_snprintf(buffer, sizeof(buffer), "%.5f", decimal); - return buffer; + return buffer; } /*! @@ -91,15 +91,15 @@ char *DoubleToString(const double decimal) { * \return Ascii presentation */ char *TimestampToString(const time_t timestamp) { - static char buffer[256]; - memset(buffer, 0, sizeof(buffer)); + static char buffer[256]; + memset(buffer, 0, sizeof(buffer)); - time_t copy = timestamp; + time_t copy = timestamp; - struct tm *local = localtime(©); - strftime(buffer, sizeof(buffer), "%a %Y-%m-%d %H:%M:%S %Z", local); + struct tm *local = localtime(©); + strftime(buffer, sizeof(buffer), "%a %Y-%m-%d %H:%M:%S %Z", local); - return buffer; + return buffer; } /*! @@ -115,15 +115,15 @@ char *TimestampToString(const time_t timestamp) { * \return Ascii presentation */ char *TimestampToStringWithFormat(const time_t timestamp, char *format) { - static char buffer[256]; - memset(buffer, 0, sizeof(buffer)); + static char buffer[256]; + memset(buffer, 0, sizeof(buffer)); - time_t copy = timestamp; + time_t copy = timestamp; - struct tm *local = localtime(©); - strftime(buffer, sizeof(buffer), format, local); + struct tm *local = localtime(©); + strftime(buffer, sizeof(buffer), format, local); - return buffer; + return buffer; } /*! Turns all the characters of the given @@ -135,23 +135,23 @@ char *TimestampToStringWithFormat(const time_t timestamp, char *format) { char * ToLowerCase(const char *string) { - if(ValidateString(string) == 0) { - return NULL; - } + if(ValidateString(string) == 0) { + return NULL; + } - const int size = SDL_strlen(string); - char *ret = SDL_malloc(size + 1); - strncpy(ret, string, size); - ret[size] = '\0'; + const int size = SDL_strlen(string); + char *ret = SDL_malloc(size + 1); + strncpy(ret, string, size); + ret[size] = '\0'; - int counter = 0; - for(; counter < size; ++counter) { - ret[counter] = tolower(ret[counter]); - } + int counter = 0; + for(; counter < size; ++counter) { + ret[counter] = tolower(ret[counter]); + } - // printf("Debug: %s == %s\n", string, ret); + // printf("Debug: %s == %s\n", string, ret); - return ret; + return ret; } /*! @@ -164,19 +164,19 @@ ToLowerCase(const char *string) int ValidateString(const char *string) { - int retVal = 1; + int retVal = 1; - if(string != NULL) { - if(SDL_strlen(string) > 0) { - retVal = 1; - } + if(string != NULL) { + if(SDL_strlen(string) > 0) { + retVal = 1; + } - retVal = 1; - } else { - retVal = 0; - } + retVal = 1; + } else { + retVal = 0; + } - return retVal; + return retVal; } diff --git a/test/test-automation/src/libSDLtest/plain_logger.c b/test/test-automation/src/libSDLtest/plain_logger.c index f570cf84d..5fc4babb5 100644 --- a/test/test-automation/src/libSDLtest/plain_logger.c +++ b/test/test-automation/src/libSDLtest/plain_logger.c @@ -48,178 +48,178 @@ static FILE *logFile; int Output(const int currentIndentLevel, const char *message, ...) { - if(logFile == NULL) { - fprintf(stderr, "logfile is NULL\n"); - exit(3); - } + if(logFile == NULL) { + fprintf(stderr, "logfile is NULL\n"); + exit(3); + } - int indent = 0; - for( ; indent < currentIndentLevel; ++indent) { - fprintf(logFile, " "); // \todo make configurable? - } + int indent = 0; + for( ; indent < currentIndentLevel; ++indent) { + fprintf(logFile, " "); // \todo make configurable? + } - char buffer[1024]; - memset(buffer, 0, 1024); + char buffer[1024]; + memset(buffer, 0, 1024); - va_list list; - va_start(list, message); + va_list list; + va_start(list, message); - SDL_vsnprintf(buffer, 1024, message, list); + SDL_vsnprintf(buffer, 1024, message, list); - va_end(list); - fprintf(logFile, "%s\n", buffer); - fflush(logFile); + va_end(list); + fprintf(logFile, "%s\n", buffer); + fflush(logFile); } void PlainRunStarted(int parameterCount, char *runnerParameters[], char *runSeed, - time_t eventTime, LoggerData *data) + time_t eventTime, LoggerData *data) { - if(data == NULL) { - fprintf(stderr, "Logger data is NULL\n"); - exit(3); - } + if(data == NULL) { + fprintf(stderr, "Logger data is NULL\n"); + exit(3); + } - // Set up the logging destination - if(data->stdoutEnabled == 1) { - logFile = stdout; - } else { - logFile = fopen(data->filename, "w"); - if(logFile == NULL) { - fprintf(stderr, "Log file %s couldn't opened\n", data->filename); - exit(3); - } - } + // Set up the logging destination + if(data->stdoutEnabled == 1) { + logFile = stdout; + } else { + logFile = fopen(data->filename, "w"); + if(logFile == NULL) { + fprintf(stderr, "Log file %s couldn't opened\n", data->filename); + exit(3); + } + } - level = data->level; + level = data->level; - Output(indentLevel, "Test run started at %s", TimestampToString(eventTime)); - Output(indentLevel, "Fuzzer seed is: %s", runSeed); - Output(indentLevel, "Runner parameters: "); + Output(indentLevel, "Test run started at %s", TimestampToString(eventTime)); + Output(indentLevel, "Fuzzer seed is: %s", runSeed); + Output(indentLevel, "Runner parameters: "); - int counter = 0; - for(counter = 0; counter < parameterCount; counter++) { - char *parameter = runnerParameters[counter]; - Output(indentLevel, "\t%s", parameter); - } + int counter = 0; + for(counter = 0; counter < parameterCount; counter++) { + char *parameter = runnerParameters[counter]; + Output(indentLevel, "\t%s", parameter); + } - Output(indentLevel, ""); + Output(indentLevel, ""); } void PlainRunEnded(int testCount, int suiteCount, int testPassCount, int testFailCount, - int testSkippedCount, time_t endTime, double totalRuntime) + int testSkippedCount, time_t endTime, double totalRuntime) { - Output(indentLevel, "Test run ended at %s", TimestampToString(endTime)); + Output(indentLevel, "Test run ended at %s", TimestampToString(endTime)); - Output(indentLevel, "Ran %d tests in %0.5f seconds from %d suites.", - testCount, totalRuntime, suiteCount); + Output(indentLevel, "Ran %d tests in %0.5f seconds from %d suites.", + testCount, totalRuntime, suiteCount); - Output(indentLevel, "%d tests passed", testPassCount); - Output(indentLevel, "%d tests failed", testFailCount); - Output(indentLevel, "%d tests skipped", testSkippedCount); + Output(indentLevel, "%d tests passed", testPassCount); + Output(indentLevel, "%d tests failed", testFailCount); + Output(indentLevel, "%d tests skipped", testSkippedCount); - fclose(logFile); + fclose(logFile); } void PlainSuiteStarted(const char *suiteName, time_t eventTime) { - Output(indentLevel++, "Executing tests from %s", suiteName); + Output(indentLevel++, "Executing tests from %s", suiteName); } void PlainSuiteEnded(int testsPassed, int testsFailed, int testsSkipped, time_t endTime, double totalRuntime) { - Output(--indentLevel, "Suite executed. %d passed, %d failed and %d skipped. Total runtime %0.5f seconds", - testsPassed, testsFailed, testsSkipped, totalRuntime); - Output(indentLevel, ""); + Output(--indentLevel, "Suite executed. %d passed, %d failed and %d skipped. Total runtime %0.5f seconds", + testsPassed, testsFailed, testsSkipped, totalRuntime); + Output(indentLevel, ""); } void PlainTestStarted(const char *testName, const char *suiteName, - const char *testDescription, Uint64 execKey, time_t startTime) + const char *testDescription, Uint64 execKey, time_t startTime) { - Output(indentLevel, "Executing test: %s (in %s, exec key: %llX)", testName, suiteName, execKey); - Output(indentLevel++, "Test description: %s", testDescription); + Output(indentLevel, "Executing test: %s (in %s, exec key: %llX)", testName, suiteName, execKey); + Output(indentLevel++, "Test description: %s", testDescription); } void PlainTestEnded(const char *testName, const char *suiteName, int testResult, time_t endTime, double totalRuntime) { - switch(testResult) { - case TEST_RESULT_PASS: - Output(--indentLevel, "%s: ok", testName); - break; - case TEST_RESULT_FAILURE: - Output(--indentLevel, "%s: failed", testName); - break; - case TEST_RESULT_NO_ASSERT: - Output(--indentLevel, "%s: failed -> no assert", testName); - break; - case TEST_RESULT_SKIPPED: - Output(--indentLevel, "%s: skipped", testName); - break; - case TEST_RESULT_KILLED: - Output(--indentLevel, "%s: killed, exceeded timeout", testName); - break; - case TEST_RESULT_SETUP_FAILURE: - Output(--indentLevel, "%s: killed, setup failure", testName); - break; - } + switch(testResult) { + case TEST_RESULT_PASS: + Output(--indentLevel, "%s: ok", testName); + break; + case TEST_RESULT_FAILURE: + Output(--indentLevel, "%s: failed", testName); + break; + case TEST_RESULT_NO_ASSERT: + Output(--indentLevel, "%s: failed -> no assert", testName); + break; + case TEST_RESULT_SKIPPED: + Output(--indentLevel, "%s: skipped", testName); + break; + case TEST_RESULT_KILLED: + Output(--indentLevel, "%s: killed, exceeded timeout", testName); + break; + case TEST_RESULT_SETUP_FAILURE: + Output(--indentLevel, "%s: killed, setup failure", testName); + break; + } } void PlainAssert(const char *assertName, int assertResult, const char *assertMessage, - time_t eventTime) + time_t eventTime) { - // Log passed asserts only on VERBOSE level - if(level <= LOGGER_TERSE && assertResult == ASSERT_PASS) { - return ; - } + // Log passed asserts only on VERBOSE level + if(level <= LOGGER_TERSE && assertResult == ASSERT_PASS) { + return ; + } - const char *result = (assertResult) ? "passed" : "failed"; - Output(indentLevel, "%s: %s - %s", assertName, result, assertMessage); + const char *result = (assertResult) ? "passed" : "failed"; + Output(indentLevel, "%s: %s - %s", assertName, result, assertMessage); } void PlainAssertWithValues(const char *assertName, int assertResult, const char *assertMessage, - int actualValue, int expectedValue, time_t eventTime) + int actualValue, int expectedValue, time_t eventTime) { - // Log passed asserts only on VERBOSE level - if(level <= LOGGER_TERSE && assertResult == ASSERT_PASS) { - return ; - } + // Log passed asserts only on VERBOSE level + if(level <= LOGGER_TERSE && assertResult == ASSERT_PASS) { + return ; + } - const char *result = (assertResult) ? "passed" : "failed"; - Output(indentLevel, "%s: %s (expected %d, actualValue %d) - %s", - assertName, result, expectedValue, actualValue, assertMessage); + const char *result = (assertResult) ? "passed" : "failed"; + Output(indentLevel, "%s: %s (expected %d, actualValue %d) - %s", + assertName, result, expectedValue, actualValue, assertMessage); } void PlainAssertSummary(int numAsserts, int numAssertsFailed, int numAssertsPass, time_t eventTime) { - Output(indentLevel, "Assert summary: %d failed, %d passed (total: %d)", - numAssertsFailed, numAssertsPass, numAsserts); + Output(indentLevel, "Assert summary: %d failed, %d passed (total: %d)", + numAssertsFailed, numAssertsPass, numAsserts); } void PlainLog(time_t eventTime, char *fmt, ...) { - // create the log message - va_list args; - char logMessage[1024]; - memset(logMessage, 0, sizeof(logMessage)); + // create the log message + va_list args; + char logMessage[1024]; + memset(logMessage, 0, sizeof(logMessage)); - va_start( args, fmt ); - SDL_vsnprintf( logMessage, sizeof(logMessage), fmt, args ); - va_end( args ); + va_start( args, fmt ); + SDL_vsnprintf( logMessage, sizeof(logMessage), fmt, args ); + va_end( args ); - Output(indentLevel, "%s", logMessage); + Output(indentLevel, "%s", logMessage); } #endif diff --git a/test/test-automation/src/libSDLtest/plain_logger.h b/test/test-automation/src/libSDLtest/plain_logger.h index a0e1d6198..00e525c9a 100644 --- a/test/test-automation/src/libSDLtest/plain_logger.h +++ b/test/test-automation/src/libSDLtest/plain_logger.h @@ -36,7 +36,7 @@ * */ void PlainRunStarted(int parameterCount, char *runnerParameters[], char *runSeed, - time_t eventTime, LoggerData *data); + time_t eventTime, LoggerData *data); /*! * Prints out information about ending the test run. @@ -50,7 +50,7 @@ void PlainRunStarted(int parameterCount, char *runnerParameters[], char *runSeed * \param totalRuntime How long the execution took */ void PlainRunEnded(int testCount, int suiteCount, int testPassCount, int testFailCount, - int testSkippedCount, time_t endTime, double totalRuntime); + int testSkippedCount, time_t endTime, double totalRuntime); /*! * Prints the data about the test suite that'll be executed next @@ -106,7 +106,7 @@ void PlainTestEnded(const char *testName, const char *suiteName, * \param eventTime When the assert happened */ void PlainAssert(const char *assertName, int assertResult, const char *assertMessage, - time_t eventTime); + time_t eventTime); /*! * Prints information about assert that has actual and expected values @@ -119,7 +119,7 @@ void PlainAssert(const char *assertName, int assertResult, const char *assertMes * \param eventTime When the assert happened */ void PlainAssertWithValues(const char *assertName, int assertResult, const char *assertMessage, - int actualValue, int expected, time_t eventTime); + int actualValue, int expected, time_t eventTime); /*! * Prints summary of all assertions of certain tests diff --git a/test/test-automation/src/libSDLtest/xml.c b/test/test-automation/src/libSDLtest/xml.c index db7528d2d..c9cb58ef8 100644 --- a/test/test-automation/src/libSDLtest/xml.c +++ b/test/test-automation/src/libSDLtest/xml.c @@ -39,8 +39,8 @@ static const char *root; * Defines structure used for "counting" open XML-tags */ typedef struct TagList { - const char *tag; - struct TagList *next; + const char *tag; + struct TagList *next; } TagList; static TagList *openTags = NULL; @@ -53,26 +53,26 @@ static TagList *openTags = NULL; static int AddOpenTag(const char *tag) { - TagList *openTag = SDL_malloc(sizeof(TagList)); - if(openTag == NULL) { - return 1; - } - memset(openTag, 0, sizeof(TagList)); + TagList *openTag = SDL_malloc(sizeof(TagList)); + if(openTag == NULL) { + return 1; + } + memset(openTag, 0, sizeof(TagList)); - const int tagSize = SDL_strlen(tag) + 1; - openTag->tag = SDL_malloc(tagSize); - if(openTag->tag == NULL) { - SDL_free(openTag); - return 1; - } + const int tagSize = SDL_strlen(tag) + 1; + openTag->tag = SDL_malloc(tagSize); + if(openTag->tag == NULL) { + SDL_free(openTag); + return 1; + } - strncpy((char *)openTag->tag, (char *)tag, tagSize); + strncpy((char *)openTag->tag, (char *)tag, tagSize); - openTag->next = openTags; + openTag->next = openTags; - openTags = openTag; + openTags = openTag; - return 0; + return 0; } /*! @@ -83,30 +83,30 @@ AddOpenTag(const char *tag) static int RemoveOpenTag(const char *tag) { - if(openTags == NULL || ValidateString(tag) == 0) { - return 1; - } + if(openTags == NULL || ValidateString(tag) == 0) { + return 1; + } - int retVal = 0; + int retVal = 0; - const int size = SDL_strlen(tag); - char *tempTag = SDL_malloc(size); - strncpy(tempTag, tag, size); + const int size = SDL_strlen(tag); + char *tempTag = SDL_malloc(size); + strncpy(tempTag, tag, size); - // Tag should always be the same as previously opened tag - // It prevents opening and ending tag mismatch - if(SDL_strncmp(tempTag, tag, size) == 0) { - TagList *openTag = openTags; - SDL_free((char *)openTag->tag); + // Tag should always be the same as previously opened tag + // It prevents opening and ending tag mismatch + if(SDL_strncmp(tempTag, tag, size) == 0) { + TagList *openTag = openTags; + SDL_free((char *)openTag->tag); - openTags = openTags->next; - SDL_free(openTag); - } else { - //printf("Debug | xml.c:RemoveOpenTag(): open/end tag mismatch"); - retVal = 1; - } + openTags = openTags->next; + SDL_free(openTag); + } else { + //printf("Debug | xml.c:RemoveOpenTag(): open/end tag mismatch"); + retVal = 1; + } - return retVal; + return retVal; } /*! @@ -115,12 +115,12 @@ RemoveOpenTag(const char *tag) static void PrintOpenTags() { - printf("\nOpen tags:\n"); + printf("\nOpen tags:\n"); - TagList *openTag = NULL; - for(openTag = openTags; openTag; openTag = openTag->next) { - printf("\ttag: %s\n", openTag->tag); - } + TagList *openTag = NULL; + for(openTag = openTags; openTag; openTag = openTag->next) { + printf("\ttag: %s\n", openTag->tag); + } } @@ -134,83 +134,83 @@ PrintOpenTags() const char * EscapeString(const char *string) { - // Calculate the size of the escaped string - int totalSize = 0; + // Calculate the size of the escaped string + int totalSize = 0; - const int maxCount = SDL_strlen(string); + const int maxCount = SDL_strlen(string); - int counter = 0; - for(; counter < maxCount; ++counter) { - char character = string[counter]; + int counter = 0; + for(; counter < maxCount; ++counter) { + char character = string[counter]; - switch(character) { - case '&': totalSize += 5; //SDL_strlen("&"); - break; - case '\'': totalSize += 6; //SDL_strlen("'"); - break; - case '"': totalSize += 6; //SDL_strlen("""); - break; - case '<': totalSize += 4; //SDL_strlen("<"); - break; - case '>': totalSize += 4; //SDL_strlen(">"); - break; - default: - totalSize += 1; - break; - } - } - totalSize += 1; // for '\0' + switch(character) { + case '&': totalSize += 5; //SDL_strlen("&"); + break; + case '\'': totalSize += 6; //SDL_strlen("'"); + break; + case '"': totalSize += 6; //SDL_strlen("""); + break; + case '<': totalSize += 4; //SDL_strlen("<"); + break; + case '>': totalSize += 4; //SDL_strlen(">"); + break; + default: + totalSize += 1; + break; + } + } + totalSize += 1; // for '\0' - char *retBuffer = SDL_malloc(totalSize * sizeof(char)); - if(retBuffer == NULL) { - return NULL; - } + char *retBuffer = SDL_malloc(totalSize * sizeof(char)); + if(retBuffer == NULL) { + return NULL; + } - // escape the string - char *curRetBuffer = retBuffer; - const char *curString = string; + // escape the string + char *curRetBuffer = retBuffer; + const char *curString = string; - char character = *curString; - while( (character = *curString++) ) { + char character = *curString; + while( (character = *curString++) ) { - switch(character) { - case '&': - memcpy((void *)curRetBuffer, (void *)"&", 5); - curRetBuffer += 5; - break; - case '\'': - memcpy((void *)curRetBuffer, (void *)"'", 6); - curRetBuffer += 6; - break; - case '"': - memcpy((void *)curRetBuffer, (void *)""", 6); - curRetBuffer += 6; - break; - case '<': - memcpy((void *)curRetBuffer, (void *)"<", 4); - curRetBuffer += 4; - break; - case '>': - memcpy((void *)curRetBuffer, (void *)">", 4); - curRetBuffer += 4; - break; - default: - *curRetBuffer = character; - curRetBuffer += 1; - break; - } - } + switch(character) { + case '&': + memcpy((void *)curRetBuffer, (void *)"&", 5); + curRetBuffer += 5; + break; + case '\'': + memcpy((void *)curRetBuffer, (void *)"'", 6); + curRetBuffer += 6; + break; + case '"': + memcpy((void *)curRetBuffer, (void *)""", 6); + curRetBuffer += 6; + break; + case '<': + memcpy((void *)curRetBuffer, (void *)"<", 4); + curRetBuffer += 4; + break; + case '>': + memcpy((void *)curRetBuffer, (void *)">", 4); + curRetBuffer += 4; + break; + default: + *curRetBuffer = character; + curRetBuffer += 1; + break; + } + } - *curRetBuffer = '\0'; + *curRetBuffer = '\0'; - return retBuffer; + return retBuffer; } /* =================== - Functions to handle creation of XML elements + Functions to handle creation of XML elements =================== */ @@ -218,159 +218,159 @@ EscapeString(const char *string) char * XMLOpenDocument(const char *rootTag, const char *xslStyle) { - const char *doctype = "\n"; + const char *doctype = "\n"; - //! \todo refactor this mess - char *style = NULL; - if(xslStyle) { - const char *styleStart = "\n"; + //! \todo refactor this mess + char *style = NULL; + if(xslStyle) { + const char *styleStart = "\n"; - const int sizeStyleStart = SDL_strlen(styleStart); - const int sizeStyleEnd = SDL_strlen(styleEnd); - const int sizeStyleSheetName = SDL_strlen(xslStyle); + const int sizeStyleStart = SDL_strlen(styleStart); + const int sizeStyleEnd = SDL_strlen(styleEnd); + const int sizeStyleSheetName = SDL_strlen(xslStyle); - const int tempSize = sizeStyleStart + sizeStyleEnd + sizeStyleSheetName + 1; - style = SDL_malloc(tempSize); - memset(style, 0, tempSize); - SDL_snprintf(style, tempSize, "%s%s%s", styleStart, xslStyle, styleEnd); - } + const int tempSize = sizeStyleStart + sizeStyleEnd + sizeStyleSheetName + 1; + style = SDL_malloc(tempSize); + memset(style, 0, tempSize); + SDL_snprintf(style, tempSize, "%s%s%s", styleStart, xslStyle, styleEnd); + } - memset(buffer, 0, bufferSize); - SDL_snprintf(buffer, bufferSize, "<%s>", rootTag); + memset(buffer, 0, bufferSize); + SDL_snprintf(buffer, bufferSize, "<%s>", rootTag); - AddOpenTag(rootTag); + AddOpenTag(rootTag); - root = rootTag; // it's fine, as long as rootTag points to static memory? + root = rootTag; // it's fine, as long as rootTag points to static memory? - char *retBuf = NULL; - if(xslStyle) { - const int doctypeSize = SDL_strlen(doctype); - const int styleSize = SDL_strlen(style); - const int tagSize = SDL_strlen(buffer); + char *retBuf = NULL; + if(xslStyle) { + const int doctypeSize = SDL_strlen(doctype); + const int styleSize = SDL_strlen(style); + const int tagSize = SDL_strlen(buffer); - const int size = doctypeSize + styleSize + tagSize + 1; // extra byte for '\0' - retBuf = SDL_malloc(size); + const int size = doctypeSize + styleSize + tagSize + 1; // extra byte for '\0' + retBuf = SDL_malloc(size); - SDL_snprintf(retBuf, size, "%s%s%s", doctype, style, buffer); + SDL_snprintf(retBuf, size, "%s%s%s", doctype, style, buffer); - SDL_free(style); - } else { - const int doctypeSize = SDL_strlen(doctype); - const int tagSize = SDL_strlen(buffer); + SDL_free(style); + } else { + const int doctypeSize = SDL_strlen(doctype); + const int tagSize = SDL_strlen(buffer); - const int size = doctypeSize + tagSize + 1; // extra byte for '\0' - retBuf = SDL_malloc(size); + const int size = doctypeSize + tagSize + 1; // extra byte for '\0' + retBuf = SDL_malloc(size); - SDL_snprintf(retBuf, size, "%s%s", doctype, buffer); - } + SDL_snprintf(retBuf, size, "%s%s", doctype, buffer); + } - return retBuf; + return retBuf; } char * XMLCloseDocument() { - return XMLCloseElement(root); + return XMLCloseElement(root); } char * XMLOpenElement(const char *tag) { - memset(buffer, 0, bufferSize); - SDL_snprintf(buffer, bufferSize, "<%s>", tag); + memset(buffer, 0, bufferSize); + SDL_snprintf(buffer, bufferSize, "<%s>", tag); - AddOpenTag(tag); + AddOpenTag(tag); - const int size = SDL_strlen(buffer); - char *ret = SDL_malloc(size + 1); - strncpy(ret, buffer, size); - ret[size] = '\0'; + const int size = SDL_strlen(buffer); + char *ret = SDL_malloc(size + 1); + strncpy(ret, buffer, size); + ret[size] = '\0'; - return ret; + return ret; } char * XMLAddContent(const char *content) { - if(ValidateString(content) == 0) { - return NULL; - } + if(ValidateString(content) == 0) { + return NULL; + } - const char *escapedContent = EscapeString(content); + const char *escapedContent = EscapeString(content); - if(SDL_strlen(escapedContent) >= bufferSize) { - return NULL; - } + if(SDL_strlen(escapedContent) >= bufferSize) { + return NULL; + } - memset(buffer, 0, bufferSize); - SDL_snprintf(buffer, bufferSize, "%s", escapedContent); - SDL_free((char *)escapedContent); + memset(buffer, 0, bufferSize); + SDL_snprintf(buffer, bufferSize, "%s", escapedContent); + SDL_free((char *)escapedContent); - const int size = SDL_strlen(buffer); - char *ret = SDL_malloc(size + 1); - strncpy(ret, buffer, size); - ret[size] = '\0'; + const int size = SDL_strlen(buffer); + char *ret = SDL_malloc(size + 1); + strncpy(ret, buffer, size); + ret[size] = '\0'; - return ret; + return ret; } char * XMLCloseElement(const char *tag) { - if(ValidateString(tag) == 0) { - return NULL; - } + if(ValidateString(tag) == 0) { + return NULL; + } - int retBufferSize = 150; - char *ret = SDL_malloc(retBufferSize); - memset(ret, 0, retBufferSize); + int retBufferSize = 150; + char *ret = SDL_malloc(retBufferSize); + memset(ret, 0, retBufferSize); - // \todo check that element we're trying to close is actually open, - // otherwise it'll cause nesting problems + // \todo check that element we're trying to close is actually open, + // otherwise it'll cause nesting problems - // Close the open tags with proper nesting. Closes tags until it finds - // the given tag which is the last tag that will be closed - TagList *openTag = openTags; - while(openTag) { - TagList *temp = openTag->next; + // Close the open tags with proper nesting. Closes tags until it finds + // the given tag which is the last tag that will be closed + TagList *openTag = openTags; + while(openTag) { + TagList *temp = openTag->next; - char *lowOpenTag = ToLowerCase(openTag->tag); - char *lowTag = ToLowerCase(tag); + char *lowOpenTag = ToLowerCase(openTag->tag); + char *lowTag = ToLowerCase(tag); - const int openTagSize = SDL_strlen(lowOpenTag); - const int tagSize = SDL_strlen(lowTag); - const int compSize = (openTagSize > tagSize) ? openTagSize : tagSize; + const int openTagSize = SDL_strlen(lowOpenTag); + const int tagSize = SDL_strlen(lowTag); + const int compSize = (openTagSize > tagSize) ? openTagSize : tagSize; - memset(buffer, 0, bufferSize); + memset(buffer, 0, bufferSize); - int breakOut = 0; - if(SDL_strncmp(lowOpenTag, lowTag, compSize) == 0) { - breakOut = 1; - SDL_snprintf(buffer, bufferSize, "", tag); - } else { - SDL_snprintf(buffer, bufferSize, "", openTag->tag); - } + int breakOut = 0; + if(SDL_strncmp(lowOpenTag, lowTag, compSize) == 0) { + breakOut = 1; + SDL_snprintf(buffer, bufferSize, "", tag); + } else { + SDL_snprintf(buffer, bufferSize, "", openTag->tag); + } - SDL_free(lowOpenTag); - SDL_free(lowTag); + SDL_free(lowOpenTag); + SDL_free(lowTag); - int bytesLeft = bufferSize - SDL_strlen(ret); - if(bytesLeft) { - strncat(ret, buffer, bytesLeft); - } else { - // \! todo there's probably better way to report an error? - fprintf(stderr, "xml.c | XMLCloseElement: Buffer is full"); - } + int bytesLeft = bufferSize - SDL_strlen(ret); + if(bytesLeft) { + strncat(ret, buffer, bytesLeft); + } else { + // \! todo there's probably better way to report an error? + fprintf(stderr, "xml.c | XMLCloseElement: Buffer is full"); + } - RemoveOpenTag(openTag->tag); + RemoveOpenTag(openTag->tag); - openTag = temp; + openTag = temp; - if(breakOut) { - break; - } - } + if(breakOut) { + break; + } + } - return ret; + return ret; } diff --git a/test/test-automation/src/libSDLtest/xml.h b/test/test-automation/src/libSDLtest/xml.h index 98d02f866..e31019f3b 100644 --- a/test/test-automation/src/libSDLtest/xml.h +++ b/test/test-automation/src/libSDLtest/xml.h @@ -23,8 +23,8 @@ /*! Defines attribute for XML elements */ typedef struct Attribute { - const char *attribute; - const char *value; + const char *attribute; + const char *value; } Attribute; diff --git a/test/test-automation/src/libSDLtest/xml_logger.c b/test/test-automation/src/libSDLtest/xml_logger.c index 93e51678c..e164345f2 100644 --- a/test/test-automation/src/libSDLtest/xml_logger.c +++ b/test/test-automation/src/libSDLtest/xml_logger.c @@ -93,582 +93,582 @@ static FILE *logFile = NULL; */ void XMLOutputter(const int currentIndentLevel, - int EOL, const char *message) + int EOL, const char *message) { - if(ValidateString(message)) { - int indent = 0; - for( ; indent < currentIndentLevel && prevEOL; ++indent) { - fprintf(logFile, " "); // \todo make configurable? - } + if(ValidateString(message)) { + int indent = 0; + for( ; indent < currentIndentLevel && prevEOL; ++indent) { + fprintf(logFile, " "); // \todo make configurable? + } - prevEOL = EOL; + prevEOL = EOL; - if(EOL) { - fprintf(logFile, "%s\n", message); - } else { - fprintf(logFile, "%s", message); - } + if(EOL) { + fprintf(logFile, "%s\n", message); + } else { + fprintf(logFile, "%s", message); + } - fflush(logFile); - } else { - fprintf(logFile, "Error: Tried to output invalid string!"); - } + fflush(logFile); + } else { + fprintf(logFile, "Error: Tried to output invalid string!"); + } - SDL_free((char *)message); + SDL_free((char *)message); } void XMLRunStarted(int parameterCount, char *runnerParameters[], char *runSeed, - time_t eventTime, LoggerData *data) + time_t eventTime, LoggerData *data) { - // Set up the logging destination - if(data->stdoutEnabled) { - logFile = stdout; - } else { - logFile = fopen(data->filename, "w"); - if(logFile == NULL) { - fprintf(stderr, "Log file %s couldn't opened\n", data->filename); - exit(3); - } - } + // Set up the logging destination + if(data->stdoutEnabled) { + logFile = stdout; + } else { + logFile = fopen(data->filename, "w"); + if(logFile == NULL) { + fprintf(stderr, "Log file %s couldn't opened\n", data->filename); + exit(3); + } + } - // Set up the style sheet - char *xslStylesheet = (char *)data->custom; - level = data->level; - //printf("Debug: %d == %d\n", level, data->level); + // Set up the style sheet + char *xslStylesheet = (char *)data->custom; + level = data->level; + //printf("Debug: %d == %d\n", level, data->level); - char *output = XMLOpenDocument(documentRoot, xslStylesheet); - XMLOutputter(indentLevel++, YES, output); + char *output = XMLOpenDocument(documentRoot, xslStylesheet); + XMLOutputter(indentLevel++, YES, output); - // log harness parameters - output = XMLOpenElement(parametersElementName); - XMLOutputter(indentLevel++, YES, output); + // log harness parameters + output = XMLOpenElement(parametersElementName); + XMLOutputter(indentLevel++, YES, output); - int counter = 0; - for(counter = 0; counter < parameterCount; counter++) { - char *parameter = runnerParameters[counter]; + int counter = 0; + for(counter = 0; counter < parameterCount; counter++) { + char *parameter = runnerParameters[counter]; - output = XMLOpenElement(parameterElementName); - XMLOutputter(indentLevel++, NO, output); + output = XMLOpenElement(parameterElementName); + XMLOutputter(indentLevel++, NO, output); - output = XMLAddContent(parameter); - XMLOutputter(indentLevel, NO, output); + output = XMLAddContent(parameter); + XMLOutputter(indentLevel, NO, output); - output = XMLCloseElement(parameterElementName); - XMLOutputter(--indentLevel, YES, output); - } + output = XMLCloseElement(parameterElementName); + XMLOutputter(--indentLevel, YES, output); + } - output = XMLCloseElement(parametersElementName); - XMLOutputter(--indentLevel, YES, output); + output = XMLCloseElement(parametersElementName); + XMLOutputter(--indentLevel, YES, output); - // log seed - output = XMLOpenElement(seedElementName); - XMLOutputter(indentLevel++, NO, output); + // log seed + output = XMLOpenElement(seedElementName); + XMLOutputter(indentLevel++, NO, output); - output = XMLAddContent(runSeed); - XMLOutputter(indentLevel, NO, output); + output = XMLAddContent(runSeed); + XMLOutputter(indentLevel, NO, output); - output = XMLCloseElement(seedElementName); - XMLOutputter(--indentLevel, YES, output); + output = XMLCloseElement(seedElementName); + XMLOutputter(--indentLevel, YES, output); - // log start time - output = XMLOpenElement(startTimeElementName); - XMLOutputter(indentLevel++, NO, output); + // log start time + output = XMLOpenElement(startTimeElementName); + XMLOutputter(indentLevel++, NO, output); - output = XMLAddContent(TimestampToString(eventTime)); - XMLOutputter(indentLevel, NO, output); + output = XMLAddContent(TimestampToString(eventTime)); + XMLOutputter(indentLevel, NO, output); - output = XMLCloseElement(startTimeElementName); - XMLOutputter(--indentLevel, YES, output); + output = XMLCloseElement(startTimeElementName); + XMLOutputter(--indentLevel, YES, output); } void XMLRunEnded(int testCount, int suiteCount, int testPassCount, int testFailCount, - int testSkippedCount, time_t endTime, double totalRuntime) + int testSkippedCount, time_t endTime, double totalRuntime) { - // log suite count - char *output = XMLOpenElement(numSuitesElementName); - XMLOutputter(indentLevel++, NO, output); + // log suite count + char *output = XMLOpenElement(numSuitesElementName); + XMLOutputter(indentLevel++, NO, output); - output = XMLAddContent(IntToString(suiteCount)); - XMLOutputter(indentLevel, NO, output); + output = XMLAddContent(IntToString(suiteCount)); + XMLOutputter(indentLevel, NO, output); - output = XMLCloseElement(numSuitesElementName); - XMLOutputter(--indentLevel, YES, output); + output = XMLCloseElement(numSuitesElementName); + XMLOutputter(--indentLevel, YES, output); - // log test count - output = XMLOpenElement(numTestElementName); - XMLOutputter(indentLevel++, NO, output); + // log test count + output = XMLOpenElement(numTestElementName); + XMLOutputter(indentLevel++, NO, output); - output = XMLAddContent(IntToString(testCount)); - XMLOutputter(indentLevel, NO, output); + output = XMLAddContent(IntToString(testCount)); + XMLOutputter(indentLevel, NO, output); - output = XMLCloseElement(numTestElementName); - XMLOutputter(--indentLevel, YES, output); + output = XMLCloseElement(numTestElementName); + XMLOutputter(--indentLevel, YES, output); - // log passed test count - output = XMLOpenElement(numPassedTestsElementName); - XMLOutputter(indentLevel++, NO, output); + // log passed test count + output = XMLOpenElement(numPassedTestsElementName); + XMLOutputter(indentLevel++, NO, output); - output = XMLAddContent(IntToString(testPassCount)); - XMLOutputter(indentLevel, NO, output); + output = XMLAddContent(IntToString(testPassCount)); + XMLOutputter(indentLevel, NO, output); - output = XMLCloseElement(numPassedTestsElementName); - XMLOutputter(--indentLevel, YES, output); + output = XMLCloseElement(numPassedTestsElementName); + XMLOutputter(--indentLevel, YES, output); - // log failed test count - output = XMLOpenElement(numFailedTestsElementName); - XMLOutputter(indentLevel++, NO, output); + // log failed test count + output = XMLOpenElement(numFailedTestsElementName); + XMLOutputter(indentLevel++, NO, output); - output = XMLAddContent(IntToString(testFailCount)); - XMLOutputter(indentLevel, NO, output); + output = XMLAddContent(IntToString(testFailCount)); + XMLOutputter(indentLevel, NO, output); - output = XMLCloseElement(numFailedTestsElementName); - XMLOutputter(--indentLevel, YES, output); + output = XMLCloseElement(numFailedTestsElementName); + XMLOutputter(--indentLevel, YES, output); - // log skipped test count - output = XMLOpenElement(numSkippedTestsElementName); - XMLOutputter(indentLevel++, NO, output); + // log skipped test count + output = XMLOpenElement(numSkippedTestsElementName); + XMLOutputter(indentLevel++, NO, output); - output = XMLAddContent(IntToString(testSkippedCount)); - XMLOutputter(indentLevel, NO, output); + output = XMLAddContent(IntToString(testSkippedCount)); + XMLOutputter(indentLevel, NO, output); - output = XMLCloseElement(numSkippedTestsElementName); - XMLOutputter(--indentLevel, YES, output); + output = XMLCloseElement(numSkippedTestsElementName); + XMLOutputter(--indentLevel, YES, output); - // log end tite - output = XMLOpenElement(endTimeElementName); - XMLOutputter(indentLevel++, NO, output); + // log end tite + output = XMLOpenElement(endTimeElementName); + XMLOutputter(indentLevel++, NO, output); - output = XMLAddContent(TimestampToString(endTime)); - XMLOutputter(indentLevel, NO, output); + output = XMLAddContent(TimestampToString(endTime)); + XMLOutputter(indentLevel, NO, output); - output = XMLCloseElement(endTimeElementName); - XMLOutputter(--indentLevel, YES, output); + output = XMLCloseElement(endTimeElementName); + XMLOutputter(--indentLevel, YES, output); - // log total runtime - output = XMLOpenElement(totalRuntimeElementName); - XMLOutputter(indentLevel++, NO, output); + // log total runtime + output = XMLOpenElement(totalRuntimeElementName); + XMLOutputter(indentLevel++, NO, output); - output = XMLAddContent(DoubleToString(totalRuntime)); - XMLOutputter(indentLevel, NO, output); + output = XMLAddContent(DoubleToString(totalRuntime)); + XMLOutputter(indentLevel, NO, output); - output = XMLCloseElement(totalRuntimeElementName); - XMLOutputter(--indentLevel, YES, output); + output = XMLCloseElement(totalRuntimeElementName); + XMLOutputter(--indentLevel, YES, output); - output = XMLCloseDocument(documentRoot); - XMLOutputter(--indentLevel, YES, output); + output = XMLCloseDocument(documentRoot); + XMLOutputter(--indentLevel, YES, output); - // close the log file - fclose(logFile); + // close the log file + fclose(logFile); } void XMLSuiteStarted(const char *suiteName, time_t eventTime) { - // log suite name - char *output = XMLOpenElement(suiteElementName); - XMLOutputter(indentLevel++, YES, output); + // log suite name + char *output = XMLOpenElement(suiteElementName); + XMLOutputter(indentLevel++, YES, output); - output = XMLOpenElement(nameElementName); - XMLOutputter(indentLevel++, NO, output); + output = XMLOpenElement(nameElementName); + XMLOutputter(indentLevel++, NO, output); - output = XMLAddContent(suiteName); - XMLOutputter(indentLevel, NO, output); + output = XMLAddContent(suiteName); + XMLOutputter(indentLevel, NO, output); - // log test name - output = XMLCloseElement(nameElementName); - XMLOutputter(--indentLevel, YES, output); + // log test name + output = XMLCloseElement(nameElementName); + XMLOutputter(--indentLevel, YES, output); - output = XMLOpenElement(startTimeElementName); - XMLOutputter(indentLevel++, NO, output); + output = XMLOpenElement(startTimeElementName); + XMLOutputter(indentLevel++, NO, output); - // log beginning time - output = XMLAddContent(TimestampToString(eventTime)); - XMLOutputter(indentLevel, NO, output); + // log beginning time + output = XMLAddContent(TimestampToString(eventTime)); + XMLOutputter(indentLevel, NO, output); - output = XMLCloseElement(startTimeElementName); - XMLOutputter(--indentLevel, YES, output); + output = XMLCloseElement(startTimeElementName); + XMLOutputter(--indentLevel, YES, output); } void XMLSuiteEnded(int testsPassed, int testsFailed, int testsSkipped, time_t endTime, double totalRuntime) { - // log tests passed - char *output = XMLOpenElement(testsPassedElementName); - XMLOutputter(indentLevel++, NO, output); + // log tests passed + char *output = XMLOpenElement(testsPassedElementName); + XMLOutputter(indentLevel++, NO, output); - output = XMLAddContent(IntToString(testsPassed)); - XMLOutputter(indentLevel, NO, output); + output = XMLAddContent(IntToString(testsPassed)); + XMLOutputter(indentLevel, NO, output); - output = XMLCloseElement(testsPassedElementName); - XMLOutputter(--indentLevel, YES, output); + output = XMLCloseElement(testsPassedElementName); + XMLOutputter(--indentLevel, YES, output); - // log tests failed - output = XMLOpenElement(testsFailedElementName); - XMLOutputter(indentLevel++, NO, output); + // log tests failed + output = XMLOpenElement(testsFailedElementName); + XMLOutputter(indentLevel++, NO, output); - output = XMLAddContent(IntToString(testsFailed)); - XMLOutputter(indentLevel, NO, output); + output = XMLAddContent(IntToString(testsFailed)); + XMLOutputter(indentLevel, NO, output); - output = XMLCloseElement(testsFailedElementName); - XMLOutputter(--indentLevel, YES, output); + output = XMLCloseElement(testsFailedElementName); + XMLOutputter(--indentLevel, YES, output); - // log tests skipped - output = XMLOpenElement(testsSkippedElementName); - XMLOutputter(indentLevel++, NO, output); + // log tests skipped + output = XMLOpenElement(testsSkippedElementName); + XMLOutputter(indentLevel++, NO, output); - output = XMLAddContent(IntToString(testsSkipped)); - XMLOutputter(indentLevel, NO, output); + output = XMLAddContent(IntToString(testsSkipped)); + XMLOutputter(indentLevel, NO, output); - output = XMLCloseElement(testsSkippedElementName); - XMLOutputter(--indentLevel, YES, output); + output = XMLCloseElement(testsSkippedElementName); + XMLOutputter(--indentLevel, YES, output); - // log tests skipped - output = XMLOpenElement(endTimeElementName); - XMLOutputter(indentLevel++, NO, output); + // log tests skipped + output = XMLOpenElement(endTimeElementName); + XMLOutputter(indentLevel++, NO, output); - output = XMLAddContent(TimestampToString(endTime)); - XMLOutputter(indentLevel, NO, output); + output = XMLAddContent(TimestampToString(endTime)); + XMLOutputter(indentLevel, NO, output); - output = XMLCloseElement(endTimeElementName); - XMLOutputter(--indentLevel, YES, output); + output = XMLCloseElement(endTimeElementName); + XMLOutputter(--indentLevel, YES, output); - // log total runtime - output = XMLOpenElement(totalRuntimeElementName); - XMLOutputter(indentLevel++, NO, output); + // log total runtime + output = XMLOpenElement(totalRuntimeElementName); + XMLOutputter(indentLevel++, NO, output); - output = XMLAddContent(DoubleToString(totalRuntime)); - XMLOutputter(indentLevel, NO, output); + output = XMLAddContent(DoubleToString(totalRuntime)); + XMLOutputter(indentLevel, NO, output); - output = XMLCloseElement(totalRuntimeElementName); - XMLOutputter(--indentLevel, YES, output); + output = XMLCloseElement(totalRuntimeElementName); + XMLOutputter(--indentLevel, YES, output); - output = XMLCloseElement(suiteElementName); - XMLOutputter(--indentLevel, YES, output); + output = XMLCloseElement(suiteElementName); + XMLOutputter(--indentLevel, YES, output); } void XMLTestStarted(const char *testName, const char *suiteName, - const char *testDescription, Uint64 execKey, time_t startTime) + const char *testDescription, Uint64 execKey, time_t startTime) { - char * output = XMLOpenElement(testElementName); - XMLOutputter(indentLevel++, YES, output); + char * output = XMLOpenElement(testElementName); + XMLOutputter(indentLevel++, YES, output); - // log test name - output = XMLOpenElement(nameElementName); - XMLOutputter(indentLevel++, NO, output); + // log test name + output = XMLOpenElement(nameElementName); + XMLOutputter(indentLevel++, NO, output); - output = XMLAddContent(testName); - XMLOutputter(indentLevel, NO, output); + output = XMLAddContent(testName); + XMLOutputter(indentLevel, NO, output); - output = XMLCloseElement(nameElementName); - XMLOutputter(--indentLevel, YES, output); + output = XMLCloseElement(nameElementName); + XMLOutputter(--indentLevel, YES, output); - // log test description - output = XMLOpenElement(descriptionElementName); - XMLOutputter(indentLevel++, NO, output); + // log test description + output = XMLOpenElement(descriptionElementName); + XMLOutputter(indentLevel++, NO, output); - output = XMLAddContent(testDescription); - XMLOutputter(indentLevel, NO, output); + output = XMLAddContent(testDescription); + XMLOutputter(indentLevel, NO, output); - output = XMLCloseElement(descriptionElementName); - XMLOutputter(--indentLevel, YES, output); + output = XMLCloseElement(descriptionElementName); + XMLOutputter(--indentLevel, YES, output); - // log execution key - output = XMLOpenElement(execKeyElementName); - XMLOutputter(indentLevel++, NO, output); + // log execution key + output = XMLOpenElement(execKeyElementName); + XMLOutputter(indentLevel++, NO, output); - output = XMLAddContent(IntToHexString(execKey)); - XMLOutputter(indentLevel, NO, output); + output = XMLAddContent(IntToHexString(execKey)); + XMLOutputter(indentLevel, NO, output); - output = XMLCloseElement(execKeyElementName); - XMLOutputter(--indentLevel, YES, output); + output = XMLCloseElement(execKeyElementName); + XMLOutputter(--indentLevel, YES, output); - // log start time - output = XMLOpenElement(startTimeElementName); - XMLOutputter(indentLevel++, NO, output); + // log start time + output = XMLOpenElement(startTimeElementName); + XMLOutputter(indentLevel++, NO, output); - output = XMLAddContent(TimestampToString(startTime)); - XMLOutputter(indentLevel, NO, output); + output = XMLAddContent(TimestampToString(startTime)); + XMLOutputter(indentLevel, NO, output); - output = XMLCloseElement(startTimeElementName); - XMLOutputter(--indentLevel, YES, output); + output = XMLCloseElement(startTimeElementName); + XMLOutputter(--indentLevel, YES, output); } void XMLTestEnded(const char *testName, const char *suiteName, int testResult, time_t endTime, double totalRuntime) { - // Log test result - char *output = XMLOpenElement(resultElementName); - XMLOutputter(indentLevel++, NO, output); + // Log test result + char *output = XMLOpenElement(resultElementName); + XMLOutputter(indentLevel++, NO, output); - switch(testResult) { - case TEST_RESULT_PASS: - output = XMLAddContent("passed"); - break; - case TEST_RESULT_FAILURE: - output = XMLAddContent("failed"); - break; - case TEST_RESULT_NO_ASSERT: - output = XMLAddContent("failed"); - break; - case TEST_RESULT_SKIPPED: - output = XMLAddContent("skipped"); - break; - case TEST_RESULT_KILLED: - output = XMLAddContent("failed"); - break; - case TEST_RESULT_SETUP_FAILURE: - output = XMLAddContent("failed"); - break; - } - XMLOutputter(indentLevel, NO, output); + switch(testResult) { + case TEST_RESULT_PASS: + output = XMLAddContent("passed"); + break; + case TEST_RESULT_FAILURE: + output = XMLAddContent("failed"); + break; + case TEST_RESULT_NO_ASSERT: + output = XMLAddContent("failed"); + break; + case TEST_RESULT_SKIPPED: + output = XMLAddContent("skipped"); + break; + case TEST_RESULT_KILLED: + output = XMLAddContent("failed"); + break; + case TEST_RESULT_SETUP_FAILURE: + output = XMLAddContent("failed"); + break; + } + XMLOutputter(indentLevel, NO, output); - output = XMLCloseElement(resultElementName); - XMLOutputter(--indentLevel, YES, output); + output = XMLCloseElement(resultElementName); + XMLOutputter(--indentLevel, YES, output); - // Log description of test result. Why the test failed, - // if there's some specific reason - output = XMLOpenElement(resultDescriptionElementName); - XMLOutputter(indentLevel++, NO, output); + // Log description of test result. Why the test failed, + // if there's some specific reason + output = XMLOpenElement(resultDescriptionElementName); + XMLOutputter(indentLevel++, NO, output); - switch(testResult) { - case TEST_RESULT_PASS: - case TEST_RESULT_FAILURE: - case TEST_RESULT_SKIPPED: - output = XMLAddContent(""); - break; - case TEST_RESULT_NO_ASSERT: - output = XMLAddContent("No assert"); - break; - case TEST_RESULT_KILLED: - output = XMLAddContent("Timeout exceeded"); - break; - case TEST_RESULT_SETUP_FAILURE: - output = XMLAddContent("Setup failure, couldn't be executed"); - break; - } - XMLOutputter(indentLevel, NO, output); + switch(testResult) { + case TEST_RESULT_PASS: + case TEST_RESULT_FAILURE: + case TEST_RESULT_SKIPPED: + output = XMLAddContent(""); + break; + case TEST_RESULT_NO_ASSERT: + output = XMLAddContent("No assert"); + break; + case TEST_RESULT_KILLED: + output = XMLAddContent("Timeout exceeded"); + break; + case TEST_RESULT_SETUP_FAILURE: + output = XMLAddContent("Setup failure, couldn't be executed"); + break; + } + XMLOutputter(indentLevel, NO, output); - output = XMLCloseElement(resultDescriptionElementName); - XMLOutputter(--indentLevel, YES, output); + output = XMLCloseElement(resultDescriptionElementName); + XMLOutputter(--indentLevel, YES, output); - // log total runtime - output = XMLOpenElement(endTimeElementName); - XMLOutputter(indentLevel++, NO, output); + // log total runtime + output = XMLOpenElement(endTimeElementName); + XMLOutputter(indentLevel++, NO, output); - output = XMLAddContent(TimestampToString(endTime)); - XMLOutputter(indentLevel, NO, output); + output = XMLAddContent(TimestampToString(endTime)); + XMLOutputter(indentLevel, NO, output); - output = XMLCloseElement(endTimeElementName); - XMLOutputter(--indentLevel, YES, output); + output = XMLCloseElement(endTimeElementName); + XMLOutputter(--indentLevel, YES, output); - // log total runtime - output = XMLOpenElement(totalRuntimeElementName); - XMLOutputter(indentLevel++, NO, output); + // log total runtime + output = XMLOpenElement(totalRuntimeElementName); + XMLOutputter(indentLevel++, NO, output); - output = XMLAddContent(DoubleToString(totalRuntime)); - XMLOutputter(indentLevel, NO, output); + output = XMLAddContent(DoubleToString(totalRuntime)); + XMLOutputter(indentLevel, NO, output); - output = XMLCloseElement(totalRuntimeElementName); - XMLOutputter(--indentLevel, YES, output); + output = XMLCloseElement(totalRuntimeElementName); + XMLOutputter(--indentLevel, YES, output); - output = XMLCloseElement(testElementName); - XMLOutputter(--indentLevel, YES, output); + output = XMLCloseElement(testElementName); + XMLOutputter(--indentLevel, YES, output); } void XMLAssert(const char *assertName, int assertResult, const char *assertMessage, - time_t eventTime) + time_t eventTime) { - // Log passed asserts only on VERBOSE level - if(level <= LOGGER_TERSE && assertResult == ASSERT_PASS) { - return ; - } + // Log passed asserts only on VERBOSE level + if(level <= LOGGER_TERSE && assertResult == ASSERT_PASS) { + return ; + } - char *output = XMLOpenElement(assertElementName); - XMLOutputter(indentLevel++, YES, output); + char *output = XMLOpenElement(assertElementName); + XMLOutputter(indentLevel++, YES, output); - // log assert name - output = XMLOpenElement(nameElementName); - XMLOutputter(indentLevel++, NO, output); + // log assert name + output = XMLOpenElement(nameElementName); + XMLOutputter(indentLevel++, NO, output); - output = XMLAddContent(assertName); - XMLOutputter(indentLevel, NO, output); + output = XMLAddContent(assertName); + XMLOutputter(indentLevel, NO, output); - output = XMLCloseElement(nameElementName); - XMLOutputter(--indentLevel, YES, output); + output = XMLCloseElement(nameElementName); + XMLOutputter(--indentLevel, YES, output); - // log assert result - output = XMLOpenElement(resultElementName); - XMLOutputter(indentLevel++, NO, output); + // log assert result + output = XMLOpenElement(resultElementName); + XMLOutputter(indentLevel++, NO, output); - output = XMLAddContent((assertResult) ? "pass" : "failure"); - XMLOutputter(indentLevel, NO, output); + output = XMLAddContent((assertResult) ? "pass" : "failure"); + XMLOutputter(indentLevel, NO, output); - output = XMLCloseElement(resultElementName); - XMLOutputter(--indentLevel, YES, output); + output = XMLCloseElement(resultElementName); + XMLOutputter(--indentLevel, YES, output); - // log assert message - output = XMLOpenElement(messageElementName); - XMLOutputter(indentLevel++, NO, output); + // log assert message + output = XMLOpenElement(messageElementName); + XMLOutputter(indentLevel++, NO, output); - output = XMLAddContent(assertMessage); - XMLOutputter(indentLevel, NO, output); + output = XMLAddContent(assertMessage); + XMLOutputter(indentLevel, NO, output); - output = XMLCloseElement(messageElementName); - XMLOutputter(--indentLevel, YES, output); + output = XMLCloseElement(messageElementName); + XMLOutputter(--indentLevel, YES, output); - // log event time - output = XMLOpenElement(timeElementName); - XMLOutputter(indentLevel++, NO, output); + // log event time + output = XMLOpenElement(timeElementName); + XMLOutputter(indentLevel++, NO, output); - output = XMLAddContent(TimestampToString(eventTime)); - XMLOutputter(indentLevel, NO, output); + output = XMLAddContent(TimestampToString(eventTime)); + XMLOutputter(indentLevel, NO, output); - output = XMLCloseElement(timeElementName); - XMLOutputter(--indentLevel, YES, output); + output = XMLCloseElement(timeElementName); + XMLOutputter(--indentLevel, YES, output); - output = XMLCloseElement(assertElementName); - XMLOutputter(--indentLevel, YES, output); + output = XMLCloseElement(assertElementName); + XMLOutputter(--indentLevel, YES, output); } void XMLAssertWithValues(const char *assertName, int assertResult, const char *assertMessage, - int actualValue, int excpected, time_t eventTime) + int actualValue, int excpected, time_t eventTime) { - // Log passed asserts only on VERBOSE level - if(level <= LOGGER_TERSE && assertResult == ASSERT_PASS) { - return ; - } + // Log passed asserts only on VERBOSE level + if(level <= LOGGER_TERSE && assertResult == ASSERT_PASS) { + return ; + } - char *output = XMLOpenElement(assertElementName); - XMLOutputter(indentLevel++, YES, output); + char *output = XMLOpenElement(assertElementName); + XMLOutputter(indentLevel++, YES, output); - // log assert name - output = XMLOpenElement(nameElementName); - XMLOutputter(indentLevel++, NO, output); + // log assert name + output = XMLOpenElement(nameElementName); + XMLOutputter(indentLevel++, NO, output); - output = XMLAddContent(assertName); - XMLOutputter(indentLevel, NO, output); + output = XMLAddContent(assertName); + XMLOutputter(indentLevel, NO, output); - output = XMLCloseElement(nameElementName); - XMLOutputter(--indentLevel, YES, output); + output = XMLCloseElement(nameElementName); + XMLOutputter(--indentLevel, YES, output); - // log assert result - output = XMLOpenElement(resultElementName); - XMLOutputter(indentLevel++, NO, output); + // log assert result + output = XMLOpenElement(resultElementName); + XMLOutputter(indentLevel++, NO, output); - output = XMLAddContent((assertResult) ? "pass" : "failure"); - XMLOutputter(indentLevel, NO, output); + output = XMLAddContent((assertResult) ? "pass" : "failure"); + XMLOutputter(indentLevel, NO, output); - output = XMLCloseElement(resultElementName); - XMLOutputter(--indentLevel, YES, output); + output = XMLCloseElement(resultElementName); + XMLOutputter(--indentLevel, YES, output); - // log assert message - output = XMLOpenElement(messageElementName); - XMLOutputter(indentLevel++, NO, output); + // log assert message + output = XMLOpenElement(messageElementName); + XMLOutputter(indentLevel++, NO, output); - output = XMLAddContent(assertMessage); - XMLOutputter(indentLevel, NO, output); + output = XMLAddContent(assertMessage); + XMLOutputter(indentLevel, NO, output); - output = XMLCloseElement(messageElementName); - XMLOutputter(--indentLevel, YES, output); + output = XMLCloseElement(messageElementName); + XMLOutputter(--indentLevel, YES, output); - // log event time - output = XMLOpenElement(timeElementName); - XMLOutputter(indentLevel++, NO, output); + // log event time + output = XMLOpenElement(timeElementName); + XMLOutputter(indentLevel++, NO, output); - output = XMLAddContent(TimestampToString(eventTime)); - XMLOutputter(indentLevel, NO, output); + output = XMLAddContent(TimestampToString(eventTime)); + XMLOutputter(indentLevel, NO, output); - output = XMLCloseElement(timeElementName); - XMLOutputter(--indentLevel, YES, output); + output = XMLCloseElement(timeElementName); + XMLOutputter(--indentLevel, YES, output); - output = XMLCloseElement(assertElementName); - XMLOutputter(--indentLevel, YES, output); + output = XMLCloseElement(assertElementName); + XMLOutputter(--indentLevel, YES, output); } void XMLAssertSummary(int numAsserts, int numAssertsFailed, - int numAssertsPass, time_t eventTime) + int numAssertsPass, time_t eventTime) { - char *output = XMLOpenElement(assertSummaryElementName); - XMLOutputter(indentLevel++, YES, output); + char *output = XMLOpenElement(assertSummaryElementName); + XMLOutputter(indentLevel++, YES, output); - output = XMLOpenElement(assertCountElementName); - XMLOutputter(indentLevel++, NO, output); + output = XMLOpenElement(assertCountElementName); + XMLOutputter(indentLevel++, NO, output); - output = XMLAddContent(IntToString(numAsserts)); - XMLOutputter(indentLevel, NO, output); + output = XMLAddContent(IntToString(numAsserts)); + XMLOutputter(indentLevel, NO, output); - output = XMLCloseElement(assertCountElementName); - XMLOutputter(--indentLevel, YES, output); + output = XMLCloseElement(assertCountElementName); + XMLOutputter(--indentLevel, YES, output); - output = XMLOpenElement(assertsPassedElementName); - XMLOutputter(indentLevel++, NO, output); + output = XMLOpenElement(assertsPassedElementName); + XMLOutputter(indentLevel++, NO, output); - output = XMLAddContent(IntToString(numAssertsPass)); - XMLOutputter(indentLevel, NO, output); + output = XMLAddContent(IntToString(numAssertsPass)); + XMLOutputter(indentLevel, NO, output); - output = XMLCloseElement(assertsPassedElementName); - XMLOutputter(--indentLevel, YES, output); + output = XMLCloseElement(assertsPassedElementName); + XMLOutputter(--indentLevel, YES, output); - output = XMLOpenElement(assertsFailedElementName); - XMLOutputter(indentLevel++, NO, output); + output = XMLOpenElement(assertsFailedElementName); + XMLOutputter(indentLevel++, NO, output); - output = XMLAddContent(IntToString(numAsserts)); - XMLOutputter(indentLevel, NO, output); + output = XMLAddContent(IntToString(numAsserts)); + XMLOutputter(indentLevel, NO, output); - output = XMLCloseElement(assertsFailedElementName); - XMLOutputter(--indentLevel, YES, output); + output = XMLCloseElement(assertsFailedElementName); + XMLOutputter(--indentLevel, YES, output); - output = XMLCloseElement(assertSummaryElementName); - XMLOutputter(--indentLevel, YES, output); + output = XMLCloseElement(assertSummaryElementName); + XMLOutputter(--indentLevel, YES, output); } void XMLLog(time_t eventTime, char *fmt, ...) { - // create the log message - va_list args; - char logMessage[1024]; - memset(logMessage, 0, sizeof(logMessage)); + // create the log message + va_list args; + char logMessage[1024]; + memset(logMessage, 0, sizeof(logMessage)); - va_start( args, fmt ); - SDL_vsnprintf( logMessage, sizeof(logMessage), fmt, args ); - va_end( args ); + va_start( args, fmt ); + SDL_vsnprintf( logMessage, sizeof(logMessage), fmt, args ); + va_end( args ); - char *output = XMLOpenElement(logElementName); - XMLOutputter(indentLevel++, YES, output); + char *output = XMLOpenElement(logElementName); + XMLOutputter(indentLevel++, YES, output); - // log message - output = XMLOpenElement(messageElementName); - XMLOutputter(indentLevel++, NO, output); + // log message + output = XMLOpenElement(messageElementName); + XMLOutputter(indentLevel++, NO, output); - // fix this here! - output = XMLAddContent(logMessage); - XMLOutputter(indentLevel, NO, output); + // fix this here! + output = XMLAddContent(logMessage); + XMLOutputter(indentLevel, NO, output); - output = XMLCloseElement(messageElementName); - XMLOutputter(--indentLevel, YES, output); + output = XMLCloseElement(messageElementName); + XMLOutputter(--indentLevel, YES, output); - // log eventTime - output = XMLOpenElement(timeElementName); - XMLOutputter(indentLevel++, NO, output); + // log eventTime + output = XMLOpenElement(timeElementName); + XMLOutputter(indentLevel++, NO, output); - output = XMLAddContent(TimestampToString(eventTime)); - XMLOutputter(indentLevel, NO, output); + output = XMLAddContent(TimestampToString(eventTime)); + XMLOutputter(indentLevel, NO, output); - output = XMLCloseElement(timeElementName); - XMLOutputter(--indentLevel, YES, output); + output = XMLCloseElement(timeElementName); + XMLOutputter(--indentLevel, YES, output); - output = XMLCloseElement(logElementName); - XMLOutputter(--indentLevel, YES, output); + output = XMLCloseElement(logElementName); + XMLOutputter(--indentLevel, YES, output); } diff --git a/test/test-automation/src/libSDLtest/xml_logger.h b/test/test-automation/src/libSDLtest/xml_logger.h index 7ca6f58c9..fc04c52f1 100644 --- a/test/test-automation/src/libSDLtest/xml_logger.h +++ b/test/test-automation/src/libSDLtest/xml_logger.h @@ -35,7 +35,7 @@ * \param data LoggerData structure which contains data for the logger */ void XMLRunStarted(int parameterCount, char *runnerParameters[], char *runSeed, - time_t eventTime, LoggerData *data); + time_t eventTime, LoggerData *data); /*! * Prints out information about ending the test run in XML @@ -49,7 +49,7 @@ void XMLRunStarted(int parameterCount, char *runnerParameters[], char *runSeed, * \param totalRuntime How long the execution took */ void XMLRunEnded(int testCount, int suiteCount, int testPassCount, int testFailCount, - int testSkippedCount, time_t endTime, double totalRuntime); + int testSkippedCount, time_t endTime, double totalRuntime); /*! * Prints the data about the test suite that'll be executed next in XML @@ -81,7 +81,7 @@ void XMLSuiteEnded(int testsPassed, int testsFailed, int testsSkipped, * \param startTime When the test started to execute */ void XMLTestStarted(const char *testName, const char *suiteName, - const char *testDescription, Uint64 execKey, time_t startTime); + const char *testDescription, Uint64 execKey, time_t startTime); /*! * Prints information about the test test that was just executed in XML @@ -104,7 +104,7 @@ void XMLTestEnded(const char *testName, const char *suiteName, * \param eventTime When the assert happened */ void XMLAssert(const char *assertName, int assertResult, const char *assertMessage, - time_t eventTime); + time_t eventTime); /*! * Prints information about assert that has actual and expected values in XML @@ -117,7 +117,7 @@ void XMLAssert(const char *assertName, int assertResult, const char *assertMessa * \param eventTime When the assert happened */ void XMLAssertWithValues(const char *assertName, int assertResult, const char *assertMessage, - int actualValue, int expected, time_t eventTime); + int actualValue, int expected, time_t eventTime); /*! * Prints summary of all assertions of certain tests in XML diff --git a/test/test-automation/src/runner/logger.h b/test/test-automation/src/runner/logger.h index d4225e020..3c8538261 100644 --- a/test/test-automation/src/runner/logger.h +++ b/test/test-automation/src/runner/logger.h @@ -26,8 +26,8 @@ /* Logging levels */ typedef enum LogLevel { - LOGGER_TERSE = 1, - LOGGER_VERBOSE + LOGGER_TERSE = 1, + LOGGER_VERBOSE } Level; //! Default logging level @@ -35,14 +35,14 @@ typedef enum LogLevel { //! Contains information for the logger typedef struct LoggerData { - //! If enabled logger will write to stdout instead of file - int stdoutEnabled; - //!< Name and directory of the log file (ie. logs/runner-seed.log) - char *filename; - //!< Logging level of the logger (such as VERBOSE) - Level level; - //!< Some custom data that a logger needs - char *custom; + //! If enabled logger will write to stdout instead of file + int stdoutEnabled; + //!< Name and directory of the log file (ie. logs/runner-seed.log) + char *filename; + //!< Logging level of the logger (such as VERBOSE) + Level level; + //!< Some custom data that a logger needs + char *custom; } LoggerData; /*! @@ -50,30 +50,30 @@ typedef struct LoggerData { * logging interface. See the headers of implementations (plain_logger.h or * xml_logger.h) for more information. */ -typedef void (*RunStartedFp)(int parameterCount, char *runnerParameters[], char *runSeed, time_t eventTime, LoggerData *data); -typedef void (*RunEndedFp)(int testCount, int suiteCount, int testPassCount, int testFailCount, +typedef void (*RunStartedFp)(int parameterCount, char *runnerParameters[], char *runSeed, time_t eventTime, LoggerData *data); +typedef void (*RunEndedFp)(int testCount, int suiteCount, int testPassCount, int testFailCount, int testSkippedCount, time_t endTime, double totalRuntime); -typedef void (*SuiteStartedFp)(const char *suiteName, time_t eventTime); -typedef void (*SuiteEndedFp)(int testsPassed, int testsFailed, int testsSkipped, - time_t endTime, double totalRuntime); +typedef void (*SuiteStartedFp)(const char *suiteName, time_t eventTime); +typedef void (*SuiteEndedFp)(int testsPassed, int testsFailed, int testsSkipped, + time_t endTime, double totalRuntime); -typedef void (*TestStartedFp)(const char *testName, const char *suiteName, +typedef void (*TestStartedFp)(const char *testName, const char *suiteName, const char *testDescription, Uint64 execKey, time_t startTime); -typedef void (*TestEndedFp)(const char *testName, const char *suiteName, int testResult, +typedef void (*TestEndedFp)(const char *testName, const char *suiteName, int testResult, time_t endTime, double totalRuntime); -typedef void (*AssertFp)(const char *assertName, int assertResult, - const char *assertMessage, time_t eventTime); +typedef void (*AssertFp)(const char *assertName, int assertResult, + const char *assertMessage, time_t eventTime); -typedef void (*AssertWithValuesFp)(const char *assertName, int assertResult, - const char *assertMessage, int actualValue, int expected, - time_t eventTime); +typedef void (*AssertWithValuesFp)(const char *assertName, int assertResult, + const char *assertMessage, int actualValue, int expected, + time_t eventTime); -typedef void (*AssertSummaryFp)(int numAsserts, int numAssertsFailed, - int numAssertsPass, time_t eventTime); +typedef void (*AssertSummaryFp)(int numAsserts, int numAssertsFailed, + int numAssertsPass, time_t eventTime); -typedef void (*LogFp)(time_t eventTime, char *fmt, ...); +typedef void (*LogFp)(time_t eventTime, char *fmt, ...); /*! Function pointers to actual logging function implementations */ diff --git a/test/test-automation/src/runner/runner.c b/test/test-automation/src/runner/runner.c index 3303aa919..b45b33107 100644 --- a/test/test-automation/src/runner/runner.c +++ b/test/test-automation/src/runner/runner.c @@ -154,11 +154,11 @@ int testFailureCount = 0, testPassCount = 0, testSkipCount = 0; * and pointer to dynamic library. Implemented as linked list. */ typedef struct TestSuiteReference { - char *name; //!< test suite name - char *directoryPath; //!< test suites path (eg. tests/libtestsuite) - void *library; //!< pointer to shared/dynamic library implementing the suite + char *name; //!< test suite name + char *directoryPath; //!< test suites path (eg. tests/libtestsuite) + void *library; //!< pointer to shared/dynamic library implementing the suite - struct TestSuiteReference *next; //!< Pointer to next item in the list + struct TestSuiteReference *next; //!< Pointer to next item in the list } TestSuiteReference; @@ -168,22 +168,22 @@ typedef struct TestSuiteReference { * Implemented as linked list. */ typedef struct TestCaseItem { - char *testName; - char *suiteName; + char *testName; + char *suiteName; - char *description; - long requirements; - long timeout; + char *description; + long requirements; + long timeout; - InitTestInvironmentFp initTestEnvironment; - TestCaseSetUpFp testSetUp; - TestCaseFp testCase; - TestCaseTearDownFp testTearDown; - QuitTestInvironmentFp quitTestEnvironment; + InitTestInvironmentFp initTestEnvironment; + TestCaseSetUpFp testSetUp; + TestCaseFp testCase; + TestCaseTearDownFp testTearDown; + QuitTestInvironmentFp quitTestEnvironment; - CountFailedAssertsFp countFailedAsserts; + CountFailedAssertsFp countFailedAsserts; - struct TestCaseItem *next; + struct TestCaseItem *next; } TestCase; @@ -228,112 +228,112 @@ LogFp Log = NULL; * \param extension What file extension is used with dynamic objects * * \return Pointer to TestSuiteReference which holds all the info about suites - * or NULL on failure + * or NULL on failure */ TestSuiteReference * ScanForTestSuites(char *directoryName, char *extension) { - typedef struct dirent Entry; - TestSuiteReference *suites = NULL; - TestSuiteReference *reference = NULL; - Entry *entry = NULL; - DIR *directory = NULL; + typedef struct dirent Entry; + TestSuiteReference *suites = NULL; + TestSuiteReference *reference = NULL; + Entry *entry = NULL; + DIR *directory = NULL; - if(directoryName == NULL || extension == NULL || - SDL_strlen(directoryName) == 0 || SDL_strlen(extension) == 0) { - return NULL; - } + if(directoryName == NULL || extension == NULL || + SDL_strlen(directoryName) == 0 || SDL_strlen(extension) == 0) { + return NULL; + } - directory = opendir(directoryName); - if(!directory) { - fprintf(stderr, "Failed to open test suite directory: %s\n", directoryName); - perror("Error message"); - exit(2); - } + directory = opendir(directoryName); + if(!directory) { + fprintf(stderr, "Failed to open test suite directory: %s\n", directoryName); + perror("Error message"); + exit(2); + } - while( (entry = readdir(directory)) ) { - // discards . and .. and hidden files starting with dot and directories etc. - if(strlen(entry->d_name) > 2 && entry->d_name[0] != '.' && entry->d_type == DT_REG) { - const char *delimiters = "."; - char *name = strtok(entry->d_name, delimiters); - char *ext = strtok(NULL, delimiters); + while( (entry = readdir(directory)) ) { + // discards . and .. and hidden files starting with dot and directories etc. + if(strlen(entry->d_name) > 2 && entry->d_name[0] != '.' && entry->d_type == DT_REG) { + const char *delimiters = "."; + char *name = strtok(entry->d_name, delimiters); + char *ext = strtok(NULL, delimiters); - if(name == NULL || ext == NULL) { - goto error; - } + if(name == NULL || ext == NULL) { + goto error; + } - int ok = 1; // on default, we want to include all tests + int ok = 1; // on default, we want to include all tests - // filter out all other suites but the selected test suite - if(only_selected_suite) { - ok = SDL_strncmp(selected_suite_name, name, NAME_BUFFER_SIZE) == 0; - } + // filter out all other suites but the selected test suite + if(only_selected_suite) { + ok = SDL_strncmp(selected_suite_name, name, NAME_BUFFER_SIZE) == 0; + } - if(SDL_strncmp(name, DUMMY_TEST_NAME, NAME_BUFFER_SIZE) == 0) { - if(include_dummy_suite) { - ok = 1; - } else { - ok = 0; - } - } + if(SDL_strncmp(name, DUMMY_TEST_NAME, NAME_BUFFER_SIZE) == 0) { + if(include_dummy_suite) { + ok = 1; + } else { + ok = 0; + } + } - if(ok && SDL_strncmp(ext, extension, SDL_strlen(extension)) == 0) { - // create test suite reference - reference = (TestSuiteReference *) SDL_malloc(sizeof(TestSuiteReference)); - if(reference == NULL) { - goto error; - } + if(ok && SDL_strncmp(ext, extension, SDL_strlen(extension)) == 0) { + // create test suite reference + reference = (TestSuiteReference *) SDL_malloc(sizeof(TestSuiteReference)); + if(reference == NULL) { + goto error; + } - memset(reference, 0, sizeof(TestSuiteReference)); + memset(reference, 0, sizeof(TestSuiteReference)); - const Uint32 dirSize = SDL_strlen(directoryName); - const Uint32 extSize = SDL_strlen(ext); - const Uint32 nameSize = SDL_strlen(name) + 1; + const Uint32 dirSize = SDL_strlen(directoryName); + const Uint32 extSize = SDL_strlen(ext); + const Uint32 nameSize = SDL_strlen(name) + 1; - // copy the name - reference->name = SDL_malloc(nameSize * sizeof(char)); - if(reference->name == NULL) { - goto error; - } + // copy the name + reference->name = SDL_malloc(nameSize * sizeof(char)); + if(reference->name == NULL) { + goto error; + } - SDL_snprintf(reference->name, nameSize, "%s", name); + SDL_snprintf(reference->name, nameSize, "%s", name); - // copy the directory path - const Uint32 dpSize = dirSize + nameSize + 1 + extSize + 1; - reference->directoryPath = SDL_malloc(dpSize * sizeof(char)); - if(reference->directoryPath == NULL) { - goto error; - } + // copy the directory path + const Uint32 dpSize = dirSize + nameSize + 1 + extSize + 1; + reference->directoryPath = SDL_malloc(dpSize * sizeof(char)); + if(reference->directoryPath == NULL) { + goto error; + } - SDL_snprintf(reference->directoryPath, dpSize, "%s%s.%s", - directoryName, name, ext); + SDL_snprintf(reference->directoryPath, dpSize, "%s%s.%s", + directoryName, name, ext); - reference->next = suites; - suites = reference; - } - } - } + reference->next = suites; + suites = reference; + } + } + } - goto finished; + goto finished; - error: - if(reference) { - SDL_free(reference->name); - SDL_free(reference->directoryPath); - SDL_free(reference); - } + error: + if(reference) { + SDL_free(reference->name); + SDL_free(reference->directoryPath); + SDL_free(reference); + } - // Unload all the suites that are loaded thus far - UnloadTestSuites(suites); - suites = NULL; + // Unload all the suites that are loaded thus far + UnloadTestSuites(suites); + suites = NULL; - finished: - if(directory) { - closedir(directory); - } + finished: + if(directory) { + closedir(directory); + } - return suites; + return suites; } @@ -347,13 +347,13 @@ ScanForTestSuites(char *directoryName, char *extension) void * LoadTestSuite(const TestSuiteReference *suite) { - void *library = SDL_LoadObject(suite->directoryPath); - if(library == NULL) { - fprintf(stderr, "Loading %s failed\n", suite->name); - fprintf(stderr, "%s\n", SDL_GetError()); - } + void *library = SDL_LoadObject(suite->directoryPath); + if(library == NULL) { + fprintf(stderr, "Loading %s failed\n", suite->name); + fprintf(stderr, "%s\n", SDL_GetError()); + } - return library; + return library; } @@ -369,12 +369,12 @@ LoadTestSuite(const TestSuiteReference *suite) TestSuiteReference * LoadTestSuites(TestSuiteReference *suites) { - TestSuiteReference *reference = NULL; - for(reference = suites; reference; reference = reference->next) { - reference->library = LoadTestSuite(reference); - } + TestSuiteReference *reference = NULL; + for(reference = suites; reference; reference = reference->next) { + reference->library = LoadTestSuite(reference); + } - return suites; + return suites; } @@ -387,23 +387,23 @@ LoadTestSuites(TestSuiteReference *suites) void UnloadTestSuites(TestSuiteReference *suites) { - TestSuiteReference *ref = suites; - while(ref) { - if(ref->name) - SDL_free(ref->name); + TestSuiteReference *ref = suites; + while(ref) { + if(ref->name) + SDL_free(ref->name); - if(ref->directoryPath) - SDL_free(ref->directoryPath); + if(ref->directoryPath) + SDL_free(ref->directoryPath); - if(ref->library) - SDL_UnloadObject(ref->library); + if(ref->library) + SDL_UnloadObject(ref->library); - TestSuiteReference *temp = ref->next; - SDL_free(ref); - ref = temp; - } + TestSuiteReference *temp = ref->next; + SDL_free(ref); + ref = temp; + } - suites = NULL; + suites = NULL; } @@ -420,86 +420,86 @@ UnloadTestSuites(TestSuiteReference *suites) TestCase * LoadTestCases(TestSuiteReference *suites) { - TestCase *testCases = NULL; + TestCase *testCases = NULL; - TestSuiteReference *suiteReference = NULL; - for(suiteReference = suites; suiteReference; suiteReference = suiteReference->next) { - TestCaseReference **tests = QueryTestCaseReferences(suiteReference->library); + TestSuiteReference *suiteReference = NULL; + for(suiteReference = suites; suiteReference; suiteReference = suiteReference->next) { + TestCaseReference **tests = QueryTestCaseReferences(suiteReference->library); - TestCaseReference *testReference = NULL; - int counter = 0; - for(testReference = tests[counter]; testReference; testReference = tests[++counter]) { - //void *suite = suiteReference->library; + TestCaseReference *testReference = NULL; + int counter = 0; + for(testReference = tests[counter]; testReference; testReference = tests[++counter]) { + //void *suite = suiteReference->library; - // Load test case functions - InitTestInvironmentFp initTestEnvironment = LoadInitTestInvironmentFunction(suiteReference->library); - QuitTestInvironmentFp quitTestEnvironment = LoadQuitTestInvironmentFunction(suiteReference->library); + // Load test case functions + InitTestInvironmentFp initTestEnvironment = LoadInitTestInvironmentFunction(suiteReference->library); + QuitTestInvironmentFp quitTestEnvironment = LoadQuitTestInvironmentFunction(suiteReference->library); - TestCaseSetUpFp testSetUp = LoadTestSetUpFunction(suiteReference->library); - TestCaseTearDownFp testTearDown = LoadTestTearDownFunction(suiteReference->library); + TestCaseSetUpFp testSetUp = LoadTestSetUpFunction(suiteReference->library); + TestCaseTearDownFp testTearDown = LoadTestTearDownFunction(suiteReference->library); - TestCaseFp testCase = LoadTestCaseFunction(suiteReference->library, testReference->name); + TestCaseFp testCase = LoadTestCaseFunction(suiteReference->library, testReference->name); - CountFailedAssertsFp countFailedAsserts = LoadCountFailedAssertsFunction(suiteReference->library); + CountFailedAssertsFp countFailedAsserts = LoadCountFailedAssertsFunction(suiteReference->library); - // Do the filtering - if(FilterTestCase(testReference)) { - TestCase *item = SDL_malloc(sizeof(TestCase)); - memset(item, 0, sizeof(TestCase)); + // Do the filtering + if(FilterTestCase(testReference)) { + TestCase *item = SDL_malloc(sizeof(TestCase)); + memset(item, 0, sizeof(TestCase)); - item->initTestEnvironment = initTestEnvironment; - item->quitTestEnvironment = quitTestEnvironment; + item->initTestEnvironment = initTestEnvironment; + item->quitTestEnvironment = quitTestEnvironment; - item->testSetUp = testSetUp; - item->testTearDown = testTearDown; + item->testSetUp = testSetUp; + item->testTearDown = testTearDown; - item->testCase = testCase; + item->testCase = testCase; - item->countFailedAsserts = countFailedAsserts; + item->countFailedAsserts = countFailedAsserts; - // copy suite name - int length = SDL_strlen(suiteReference->name) + 1; - item->suiteName = SDL_malloc(length); - if(item->suiteName == NULL) { - SDL_free(item); - return NULL; - } - strncpy(item->suiteName, suiteReference->name, length); + // copy suite name + int length = SDL_strlen(suiteReference->name) + 1; + item->suiteName = SDL_malloc(length); + if(item->suiteName == NULL) { + SDL_free(item); + return NULL; + } + strncpy(item->suiteName, suiteReference->name, length); - // copy test name - length = SDL_strlen(testReference->name) + 1; - item->testName = SDL_malloc(length); - if(item->testName == NULL) { - SDL_free(item->suiteName); - SDL_free(item); - return NULL; - } - strncpy(item->testName, testReference->name, length); + // copy test name + length = SDL_strlen(testReference->name) + 1; + item->testName = SDL_malloc(length); + if(item->testName == NULL) { + SDL_free(item->suiteName); + SDL_free(item); + return NULL; + } + strncpy(item->testName, testReference->name, length); - // copy test description - length = SDL_strlen(testReference->description) + 1; - item->description = SDL_malloc(length); - if(item->description == NULL) { - SDL_free(item->description); - SDL_free(item->suiteName); - SDL_free(item); - return NULL; - } - strncpy(item->description, testReference->description, length); + // copy test description + length = SDL_strlen(testReference->description) + 1; + item->description = SDL_malloc(length); + if(item->description == NULL) { + SDL_free(item->description); + SDL_free(item->suiteName); + SDL_free(item); + return NULL; + } + strncpy(item->description, testReference->description, length); - item->requirements = testReference->requirements; - item->timeout = testReference->timeout; + item->requirements = testReference->requirements; + item->timeout = testReference->timeout; - // prepend the list - item->next = testCases; - testCases = item; + // prepend the list + item->next = testCases; + testCases = item; - //printf("Added test: %s\n", testReference->name); - } - } - } + //printf("Added test: %s\n", testReference->name); + } + } + } - return testCases; + return testCases; } @@ -512,23 +512,23 @@ LoadTestCases(TestSuiteReference *suites) void UnloadTestCases(TestCase *testCases) { - TestCase *ref = testCases; - while(ref) { - if(ref->testName) - SDL_free(ref->testName); + TestCase *ref = testCases; + while(ref) { + if(ref->testName) + SDL_free(ref->testName); - if(ref->suiteName) - SDL_free(ref->suiteName); + if(ref->suiteName) + SDL_free(ref->suiteName); - if(ref->description) - SDL_free(ref->description); + if(ref->description) + SDL_free(ref->description); - TestCase *temp = ref->next; - SDL_free(ref); - ref = temp; - } + TestCase *temp = ref->next; + SDL_free(ref); + ref = temp; + } - testCases = NULL; + testCases = NULL; } @@ -541,29 +541,29 @@ UnloadTestCases(TestCase *testCases) int FilterTestCase(TestCaseReference *testReference) { - int retVal = 1; + int retVal = 1; - if(testReference->enabled == TEST_DISABLED) { - retVal = 0; - } + if(testReference->enabled == TEST_DISABLED) { + retVal = 0; + } - if(only_selected_test) { - if(SDL_strncmp(testReference->name, selected_test_name, NAME_BUFFER_SIZE) == 0) { - retVal = 1; - } else { - retVal = 0; - } - } + if(only_selected_test) { + if(SDL_strncmp(testReference->name, selected_test_name, NAME_BUFFER_SIZE) == 0) { + retVal = 1; + } else { + retVal = 0; + } + } - if(only_tests_with_string) { - if(strstr(testReference->name, testcase_name_substring) != NULL) { - retVal = 1; - } else { - retVal = 0; - } - } + if(only_tests_with_string) { + if(strstr(testReference->name, testcase_name_substring) != NULL) { + retVal = 1; + } else { + retVal = 0; + } + } - return retVal; + return retVal; } @@ -576,21 +576,21 @@ FilterTestCase(TestCaseReference *testReference) TestCaseReference ** QueryTestCaseReferences(void *library) { - TestCaseReference **(*suite)(void); + TestCaseReference **(*suite)(void); - suite = (TestCaseReference **(*)(void)) SDL_LoadFunction(library, "QueryTestSuite"); - if(suite == NULL) { - fprintf(stderr, "Loading QueryTestCaseReferences() failed.\n"); - fprintf(stderr, "%s\n", SDL_GetError()); - } + suite = (TestCaseReference **(*)(void)) SDL_LoadFunction(library, "QueryTestSuite"); + if(suite == NULL) { + fprintf(stderr, "Loading QueryTestCaseReferences() failed.\n"); + fprintf(stderr, "%s\n", SDL_GetError()); + } - TestCaseReference **tests = suite(); - if(tests == NULL) { - fprintf(stderr, "Failed to load test references.\n"); - fprintf(stderr, "%s\n", SDL_GetError()); - } + TestCaseReference **tests = suite(); + if(tests == NULL) { + fprintf(stderr, "Failed to load test references.\n"); + fprintf(stderr, "%s\n", SDL_GetError()); + } - return tests; + return tests; } @@ -605,13 +605,13 @@ QueryTestCaseReferences(void *library) TestCaseFp LoadTestCaseFunction(void *suite, char *testName) { - TestCaseFp test = (TestCaseFp) SDL_LoadFunction(suite, testName); - if(test == NULL) { - fprintf(stderr, "Loading test %s failed, test == NULL\n", testName); - fprintf(stderr, "%s\n", SDL_GetError()); - } + TestCaseFp test = (TestCaseFp) SDL_LoadFunction(suite, testName); + if(test == NULL) { + fprintf(stderr, "Loading test %s failed, test == NULL\n", testName); + fprintf(stderr, "%s\n", SDL_GetError()); + } - return test; + return test; } @@ -625,7 +625,7 @@ LoadTestCaseFunction(void *suite, char *testName) */ TestCaseSetUpFp LoadTestSetUpFunction(void *suite) { - return (TestCaseSetUpFp) SDL_LoadFunction(suite, "SetUp"); + return (TestCaseSetUpFp) SDL_LoadFunction(suite, "SetUp"); } @@ -639,7 +639,7 @@ LoadTestSetUpFunction(void *suite) { */ TestCaseTearDownFp LoadTestTearDownFunction(void *suite) { - return (TestCaseTearDownFp) SDL_LoadFunction(suite, "TearDown"); + return (TestCaseTearDownFp) SDL_LoadFunction(suite, "TearDown"); } @@ -653,13 +653,13 @@ LoadTestTearDownFunction(void *suite) { */ InitTestInvironmentFp LoadInitTestInvironmentFunction(void *suite) { - InitTestInvironmentFp testEnvInit = (InitTestInvironmentFp) SDL_LoadFunction(suite, "_InitTestEnvironment"); - if(testEnvInit == NULL) { - fprintf(stderr, "Loading _InitTestInvironment function failed, testEnvInit == NULL\n"); - fprintf(stderr, "%s\n", SDL_GetError()); - } + InitTestInvironmentFp testEnvInit = (InitTestInvironmentFp) SDL_LoadFunction(suite, "_InitTestEnvironment"); + if(testEnvInit == NULL) { + fprintf(stderr, "Loading _InitTestInvironment function failed, testEnvInit == NULL\n"); + fprintf(stderr, "%s\n", SDL_GetError()); + } - return testEnvInit; + return testEnvInit; } @@ -673,13 +673,13 @@ LoadInitTestInvironmentFunction(void *suite) { */ QuitTestInvironmentFp LoadQuitTestInvironmentFunction(void *suite) { - QuitTestInvironmentFp testEnvQuit = (QuitTestInvironmentFp) SDL_LoadFunction(suite, "_QuitTestEnvironment"); - if(testEnvQuit == NULL) { - fprintf(stderr, "Loading _QuitTestEnvironment function failed, testEnvQuit == NULL\n"); - fprintf(stderr, "%s\n", SDL_GetError()); - } + QuitTestInvironmentFp testEnvQuit = (QuitTestInvironmentFp) SDL_LoadFunction(suite, "_QuitTestEnvironment"); + if(testEnvQuit == NULL) { + fprintf(stderr, "Loading _QuitTestEnvironment function failed, testEnvQuit == NULL\n"); + fprintf(stderr, "%s\n", SDL_GetError()); + } - return testEnvQuit; + return testEnvQuit; } @@ -693,13 +693,13 @@ LoadQuitTestInvironmentFunction(void *suite) { */ CountFailedAssertsFp LoadCountFailedAssertsFunction(void *suite) { - CountFailedAssertsFp countFailedAssert = (CountFailedAssertsFp) SDL_LoadFunction(suite, "_CountFailedAsserts"); - if(countFailedAssert == NULL) { - fprintf(stderr, "Loading _CountFailedAsserts function failed, countFailedAssert == NULL\n"); - fprintf(stderr, "%s\n", SDL_GetError()); - } + CountFailedAssertsFp countFailedAssert = (CountFailedAssertsFp) SDL_LoadFunction(suite, "_CountFailedAsserts"); + if(countFailedAssert == NULL) { + fprintf(stderr, "Loading _CountFailedAsserts function failed, countFailedAssert == NULL\n"); + fprintf(stderr, "%s\n", SDL_GetError()); + } - return countFailedAssert; + return countFailedAssert; } #define USE_SDL_TIMER_FOR_TIMEOUT @@ -713,38 +713,38 @@ LoadCountFailedAssertsFunction(void *suite) { void SetTestTimeout(int timeout, void (*callback)(int)) { - if(callback == NULL) { - fprintf(stderr, "Error: timeout callback can't be NULL"); - } + if(callback == NULL) { + fprintf(stderr, "Error: timeout callback can't be NULL"); + } - if(timeout < 0) { - fprintf(stderr, "Error: timeout value must be bigger than zero."); - } + if(timeout < 0) { + fprintf(stderr, "Error: timeout value must be bigger than zero."); + } - int tm = (timeout > universal_timeout ? timeout : universal_timeout); + int tm = (timeout > universal_timeout ? timeout : universal_timeout); #ifdef USE_SDL_TIMER_FOR_TIMEOUT - /* Init SDL timer if not initialized before */ - if(SDL_WasInit(SDL_INIT_TIMER) == 0) { - if(SDL_InitSubSystem(SDL_INIT_TIMER)) { - fprintf(stderr, "Error: Failed to init timer subsystem"); - fprintf(stderr, "%s\n", SDL_GetError()); - } - } + /* Init SDL timer if not initialized before */ + if(SDL_WasInit(SDL_INIT_TIMER) == 0) { + if(SDL_InitSubSystem(SDL_INIT_TIMER)) { + fprintf(stderr, "Error: Failed to init timer subsystem"); + fprintf(stderr, "%s\n", SDL_GetError()); + } + } - /* Note: - * SDL_Init(SDL_INIT_TIMER) should be successfully called before using this - */ - int timeoutInMilliseconds = tm * 1000; + /* Note: + * SDL_Init(SDL_INIT_TIMER) should be successfully called before using this + */ + int timeoutInMilliseconds = tm * 1000; - SDL_TimerID timerID = SDL_AddTimer(timeoutInMilliseconds, (SDL_TimerCallback) callback, 0x0); - if(timerID == 0) { - fprintf(stderr, "Error: Creation of SDL timer failed.\n"); - fprintf(stderr, "Error: %s\n", SDL_GetError()); - } + SDL_TimerID timerID = SDL_AddTimer(timeoutInMilliseconds, (SDL_TimerCallback) callback, 0x0); + if(timerID == 0) { + fprintf(stderr, "Error: Creation of SDL timer failed.\n"); + fprintf(stderr, "Error: %s\n", SDL_GetError()); + } #else - signal(SIGALRM, callback); - alarm((unsigned int) tm); + signal(SIGALRM, callback); + alarm((unsigned int) tm); #endif } @@ -764,9 +764,9 @@ SetTestTimeout(int timeout, void (*callback)(int)) void KillHungTestInChildProcess(int signum) { - (void)signum; // keeps the compiler silent about unused variable + (void)signum; // keeps the compiler silent about unused variable - exit(TEST_RESULT_KILLED); + exit(TEST_RESULT_KILLED); } /*! @@ -778,23 +778,23 @@ KillHungTestInChildProcess(int signum) int CheckTestRequirements(TestCase *testCase) { - int retVal = 1; + int retVal = 1; - if(testCase == NULL) { - fprintf(stderr, "TestCase parameter can't be NULL"); - return -1; - } + if(testCase == NULL) { + fprintf(stderr, "TestCase parameter can't be NULL"); + return -1; + } - if(testCase->requirements & TEST_REQUIRES_AUDIO) { - retVal = PlatformSupportsAudio(); - } + if(testCase->requirements & TEST_REQUIRES_AUDIO) { + retVal = PlatformSupportsAudio(); + } - if(testCase->requirements & TEST_REQUIRES_STDIO) { - retVal = PlatformSupportsStdio(); - } + if(testCase->requirements & TEST_REQUIRES_STDIO) { + retVal = PlatformSupportsStdio(); + } - return retVal; + return retVal; } @@ -808,42 +808,42 @@ CheckTestRequirements(TestCase *testCase) int RunTest(TestCase *testCase, Uint64 execKey) { - if(!testCase) { - return -1; - } + if(!testCase) { + return -1; + } - int runnable = CheckTestRequirements(testCase); - if(runnable != 1) { - return TEST_RESULT_SKIPPED; - } + int runnable = CheckTestRequirements(testCase); + if(runnable != 1) { + return TEST_RESULT_SKIPPED; + } - if(testCase->timeout > 0 || universal_timeout > 0) { - if(execute_inproc) { - Log(time(0), "Test asked for timeout which is not supported."); - } - else { - SetTestTimeout(testCase->timeout, KillHungTestInChildProcess); - } - } + if(testCase->timeout > 0 || universal_timeout > 0) { + if(execute_inproc) { + Log(time(0), "Test asked for timeout which is not supported."); + } + else { + SetTestTimeout(testCase->timeout, KillHungTestInChildProcess); + } + } - testCase->initTestEnvironment(execKey, execute_inproc); + testCase->initTestEnvironment(execKey, execute_inproc); - if(testCase->testSetUp) { - testCase->testSetUp(0x0); - } + if(testCase->testSetUp) { + testCase->testSetUp(0x0); + } - int cntFailedAsserts = testCase->countFailedAsserts(); - if(cntFailedAsserts != 0) { - return TEST_RESULT_SETUP_FAILURE; - } + int cntFailedAsserts = testCase->countFailedAsserts(); + if(cntFailedAsserts != 0) { + return TEST_RESULT_SETUP_FAILURE; + } - testCase->testCase(0x0); + testCase->testCase(0x0); - if(testCase->testTearDown) { - testCase->testTearDown(0x0); - } + if(testCase->testTearDown) { + testCase->testTearDown(0x0); + } - return testCase->quitTestEnvironment(); + return testCase->quitTestEnvironment(); } @@ -858,37 +858,37 @@ RunTest(TestCase *testCase, Uint64 execKey) */ int ExecuteTest(TestCase *testItem, Uint64 execKey) { - int retVal = -1; + int retVal = -1; - if(execute_inproc) { - retVal = RunTest(testItem, execKey); - } else { - int childpid = fork(); - if(childpid == 0) { - exit(RunTest(testItem, execKey)); - } else { - int stat_lock = -1; - wait(&stat_lock); + if(execute_inproc) { + retVal = RunTest(testItem, execKey); + } else { + int childpid = fork(); + if(childpid == 0) { + exit(RunTest(testItem, execKey)); + } else { + int stat_lock = -1; + wait(&stat_lock); - retVal = HandleChildProcessReturnValue(stat_lock); - } - } + retVal = HandleChildProcessReturnValue(stat_lock); + } + } - if(retVal == TEST_RESULT_SKIPPED) { - testSkipCount++; - totalTestSkipCount++; - } - else if(retVal) { - totalTestFailureCount++; - testFailureCount++; - } - else { - totalTestPassCount++; - testPassCount++; - } + if(retVal == TEST_RESULT_SKIPPED) { + testSkipCount++; + totalTestSkipCount++; + } + else if(retVal) { + totalTestFailureCount++; + testFailureCount++; + } + else { + totalTestPassCount++; + testPassCount++; + } - // return the value for logger - return retVal; + // return the value for logger + return retVal; } @@ -905,18 +905,18 @@ ExecuteTest(TestCase *testItem, Uint64 execKey) { int HandleChildProcessReturnValue(int stat_lock) { - int returnValue = -1; + int returnValue = -1; - if(WIFEXITED(stat_lock)) { - returnValue = WEXITSTATUS(stat_lock); - } else if(WIFSIGNALED(stat_lock)) { - int signal = WTERMSIG(stat_lock); - // \todo add this to logger (add signal number) - Log(time(0), "FAILURE: test was aborted due to %d\n", signal); - returnValue = 1; - } + if(WIFEXITED(stat_lock)) { + returnValue = WEXITSTATUS(stat_lock); + } else if(WIFSIGNALED(stat_lock)) { + int signal = WTERMSIG(stat_lock); + // \todo add this to logger (add signal number) + Log(time(0), "FAILURE: test was aborted due to %d\n", signal); + returnValue = 1; + } - return returnValue; + return returnValue; } @@ -931,36 +931,36 @@ HandleChildProcessReturnValue(int stat_lock) char * GenerateRunSeed(const int length) { - if(length <= 0) { - fprintf(stderr, "Error: length of the harness seed can't be less than zero\n"); - return NULL; - } + if(length <= 0) { + fprintf(stderr, "Error: length of the harness seed can't be less than zero\n"); + return NULL; + } - char *seed = SDL_malloc((length + 1) * sizeof(char)); - if(seed == NULL) { - fprintf(stderr, "Error: malloc for run seed failed\n"); - return NULL; - } + char *seed = SDL_malloc((length + 1) * sizeof(char)); + if(seed == NULL) { + fprintf(stderr, "Error: malloc for run seed failed\n"); + return NULL; + } - RND_CTX randomContext; + RND_CTX randomContext; - utl_randomInitTime(&randomContext); + utl_randomInitTime(&randomContext); - int counter = 0; - for( ; counter < length - 1; ++counter) { - int number = abs(utl_random(&randomContext)); - char ch = (char) (number % (91 - 48)) + 48; + int counter = 0; + for( ; counter < length - 1; ++counter) { + int number = abs(utl_random(&randomContext)); + char ch = (char) (number % (91 - 48)) + 48; - if(ch >= 58 && ch <= 64) { - ch = 65; - } + if(ch >= 58 && ch <= 64) { + ch = 65; + } - seed[counter] = ch; - } + seed[counter] = ch; + } - seed[counter] = '\0'; + seed[counter] = '\0'; - return seed; + return seed; } /*! @@ -970,109 +970,109 @@ GenerateRunSeed(const int length) */ LoggerData * SetUpLogger(const int log_stdout_enabled, const int xml_enabled, const int xsl_enabled, - const int custom_xsl_enabled, const char *defaultXslSheet, const time_t timestamp) + const int custom_xsl_enabled, const char *defaultXslSheet, const time_t timestamp) { - LoggerData *loggerData = SDL_malloc(sizeof(LoggerData)); - if(loggerData == NULL) { - fprintf(stderr, "Error: Logger data structure not allocated."); - return NULL; - } - memset(loggerData, 0, sizeof(LoggerData)); + LoggerData *loggerData = SDL_malloc(sizeof(LoggerData)); + if(loggerData == NULL) { + fprintf(stderr, "Error: Logger data structure not allocated."); + return NULL; + } + memset(loggerData, 0, sizeof(LoggerData)); - loggerData->level = (enable_verbose_logger ? LOGGER_VERBOSE : LOGGER_TERSE); + loggerData->level = (enable_verbose_logger ? LOGGER_VERBOSE : LOGGER_TERSE); - if(log_stdout_enabled == 1) { - loggerData->stdoutEnabled = 1; - loggerData->filename = NULL; - } else { - loggerData->stdoutEnabled = 0; + if(log_stdout_enabled == 1) { + loggerData->stdoutEnabled = 1; + loggerData->filename = NULL; + } else { + loggerData->stdoutEnabled = 0; - const char *extension = (xml_enabled ? "xml" : "log"); + const char *extension = (xml_enabled ? "xml" : "log"); - // create directory (if it doesn't exist yet) - unsigned int mode = S_IRWXU | S_IRGRP | S_ISUID; - mkdir(log_directory, mode); + // create directory (if it doesn't exist yet) + unsigned int mode = S_IRWXU | S_IRGRP | S_ISUID; + mkdir(log_directory, mode); - char *timeString = TimestampToStringWithFormat(timestamp, "%Y%m%d_%H:%M:%S"); + char *timeString = TimestampToStringWithFormat(timestamp, "%Y%m%d_%H:%M:%S"); - /* Combine and create directory for log file */ - const Uint32 directoryLength = SDL_strlen(log_directory); - const Uint32 basenameLength = SDL_strlen(log_basename); - const Uint32 seedLength = SDL_strlen(runSeed); - const Uint32 extensionLength = SDL_strlen(extension); + /* Combine and create directory for log file */ + const Uint32 directoryLength = SDL_strlen(log_directory); + const Uint32 basenameLength = SDL_strlen(log_basename); + const Uint32 seedLength = SDL_strlen(runSeed); + const Uint32 extensionLength = SDL_strlen(extension); - const Uint32 timeLength = SDL_strlen(timeString); + const Uint32 timeLength = SDL_strlen(timeString); - // couple of extras bytes for '/', '-', '.' and '\0' at the end - const Uint32 length = directoryLength + basenameLength + seedLength - + extensionLength + timeLength + 5; + // couple of extras bytes for '/', '-', '.' and '\0' at the end + const Uint32 length = directoryLength + basenameLength + seedLength + + extensionLength + timeLength + 5; - if(length <= 0) { - return NULL; - } + if(length <= 0) { + return NULL; + } - char *filename = SDL_malloc(length); - if(filename == NULL) { - SDL_free(loggerData); + char *filename = SDL_malloc(length); + if(filename == NULL) { + SDL_free(loggerData); - fprintf(stderr, "Error: Failed to allocate memory for filename of log"); - return NULL; - } - memset(filename, 0, length); + fprintf(stderr, "Error: Failed to allocate memory for filename of log"); + return NULL; + } + memset(filename, 0, length); - SDL_snprintf(filename, length, "%s%c%s-%s-%s.%s", log_directory, - DIRECTORY_SEPARATOR, log_basename, timeString, runSeed, extension); + SDL_snprintf(filename, length, "%s%c%s-%s-%s.%s", log_directory, + DIRECTORY_SEPARATOR, log_basename, timeString, runSeed, extension); - loggerData->filename = filename; - } + loggerData->filename = filename; + } - if(xml_enabled) { - char *sheet = NULL; - if(xsl_enabled) { - sheet = (char *) defaultXslSheet; - } + if(xml_enabled) { + char *sheet = NULL; + if(xsl_enabled) { + sheet = (char *) defaultXslSheet; + } - if(custom_xsl_enabled) { - sheet = xsl_stylesheet_name; - } + if(custom_xsl_enabled) { + sheet = xsl_stylesheet_name; + } - loggerData->custom = sheet; - } + loggerData->custom = sheet; + } - if(xml_enabled) { - RunStarted = XMLRunStarted; - RunEnded = XMLRunEnded; + if(xml_enabled) { + RunStarted = XMLRunStarted; + RunEnded = XMLRunEnded; - SuiteStarted = XMLSuiteStarted; - SuiteEnded = XMLSuiteEnded; + SuiteStarted = XMLSuiteStarted; + SuiteEnded = XMLSuiteEnded; - TestStarted = XMLTestStarted; - TestEnded = XMLTestEnded; + TestStarted = XMLTestStarted; + TestEnded = XMLTestEnded; - Assert = XMLAssert; - AssertWithValues = XMLAssertWithValues; - AssertSummary = XMLAssertSummary; + Assert = XMLAssert; + AssertWithValues = XMLAssertWithValues; + AssertSummary = XMLAssertSummary; - Log = XMLLog; - } else { - RunStarted = PlainRunStarted; - RunEnded = PlainRunEnded; + Log = XMLLog; + } else { + RunStarted = PlainRunStarted; + RunEnded = PlainRunEnded; - SuiteStarted = PlainSuiteStarted; - SuiteEnded = PlainSuiteEnded; + SuiteStarted = PlainSuiteStarted; + SuiteEnded = PlainSuiteEnded; - TestStarted = PlainTestStarted; - TestEnded = PlainTestEnded; + TestStarted = PlainTestStarted; + TestEnded = PlainTestEnded; - Assert = PlainAssert; - AssertWithValues = PlainAssertWithValues; - AssertSummary = PlainAssertSummary; + Assert = PlainAssert; + AssertWithValues = PlainAssertWithValues; + AssertSummary = PlainAssertSummary; - Log = PlainLog; - } + Log = PlainLog; + } - return loggerData; + return loggerData; } @@ -1081,40 +1081,40 @@ SetUpLogger(const int log_stdout_enabled, const int xml_enabled, const int xsl_e */ void PrintUsage() { - printf("Usage: ./runner [--in-proc] [--show-tests] [--verbose]\n"); - printf(" [--logfile [BASENAME]] [--logdir DIR] [--xml]\n"); - printf(" [--xsl [STYLESHEET]] [--seed VALUE] [--iterations VALUE]\n"); - printf(" [--exec-key KEY] [--timeout VALUE] [--test TEST]\n"); - printf(" [--name-contains SUBSTR] [--suite SUITE] [--include-dummy]\n"); - printf(" [--version] [--help]\n"); - printf("Options:\n"); - printf(" --in-proc Executes tests in-process\n"); - printf(" --show-tests Prints out all the executable tests\n"); - printf(" -v --verbose Enables verbose logging\n"); - printf(" --logfile [BASENAME] Enables logging to a file. If BASENAME is\n"); - printf(" specified it'll be used as basename for\n"); - printf(" the log file\n"); - printf(" --logdir DIR Define directory for logs. Defaults to 'logs'\n"); - printf(" --xml Enables XML logger\n"); - printf(" --xsl [STYLESHEET] Adds XSL stylesheet to the XML test reports for\n"); - printf(" browser viewing. Optionally uses the specified XSL\n"); - printf(" file or URL instead of the default one\n"); - printf(" --seed VALUE Specify fuzzing seed for the harness\n"); - printf(" --iterations VALUE Specify how many times a test will be executed\n"); - printf(" --exec-key KEY Run test(s) with specific execution key\n"); - printf(" -tm --timeout VALUE Specify common timeout value for all tests\n"); - printf(" Timeout is given in seconds and it'll override\n"); - printf(" test specific timeout value only if the given\n"); - printf(" value is greater than the test specific value\n"); - printf(" note: doesn't work with --in-proc option.\n"); - printf(" -t --test TEST Executes only tests with given name\n"); - printf(" -ts --name-contains SUBSTR Executes only tests that have given\n"); - printf(" substring in test name\n"); - printf(" -s --suite SUITE Executes only the given test suite\n"); - printf(" --include-dummy Includes dummy test suite in the test run\n"); + printf("Usage: ./runner [--in-proc] [--show-tests] [--verbose]\n"); + printf(" [--logfile [BASENAME]] [--logdir DIR] [--xml]\n"); + printf(" [--xsl [STYLESHEET]] [--seed VALUE] [--iterations VALUE]\n"); + printf(" [--exec-key KEY] [--timeout VALUE] [--test TEST]\n"); + printf(" [--name-contains SUBSTR] [--suite SUITE] [--include-dummy]\n"); + printf(" [--version] [--help]\n"); + printf("Options:\n"); + printf(" --in-proc Executes tests in-process\n"); + printf(" --show-tests Prints out all the executable tests\n"); + printf(" -v --verbose Enables verbose logging\n"); + printf(" --logfile [BASENAME] Enables logging to a file. If BASENAME is\n"); + printf(" specified it'll be used as basename for\n"); + printf(" the log file\n"); + printf(" --logdir DIR Define directory for logs. Defaults to 'logs'\n"); + printf(" --xml Enables XML logger\n"); + printf(" --xsl [STYLESHEET] Adds XSL stylesheet to the XML test reports for\n"); + printf(" browser viewing. Optionally uses the specified XSL\n"); + printf(" file or URL instead of the default one\n"); + printf(" --seed VALUE Specify fuzzing seed for the harness\n"); + printf(" --iterations VALUE Specify how many times a test will be executed\n"); + printf(" --exec-key KEY Run test(s) with specific execution key\n"); + printf(" -tm --timeout VALUE Specify common timeout value for all tests\n"); + printf(" Timeout is given in seconds and it'll override\n"); + printf(" test specific timeout value only if the given\n"); + printf(" value is greater than the test specific value\n"); + printf(" note: doesn't work with --in-proc option.\n"); + printf(" -t --test TEST Executes only tests with given name\n"); + printf(" -ts --name-contains SUBSTR Executes only tests that have given\n"); + printf(" substring in test name\n"); + printf(" -s --suite SUITE Executes only the given test suite\n"); + printf(" --include-dummy Includes dummy test suite in the test run\n"); - printf(" --version Print version information\n"); - printf(" -h --help Print this help\n"); + printf(" --version Print version information\n"); + printf(" -h --help Print this help\n"); } @@ -1135,178 +1135,178 @@ ParseOptions(int argc, char *argv[]) execute_inproc = 1; } else if(SDL_strcmp(arg, "--show-tests") == 0) { - only_print_tests = 1; + only_print_tests = 1; } else if(SDL_strcmp(arg, "--xml") == 0) { - xml_enabled = 1; + xml_enabled = 1; } else if(SDL_strcmp(arg, "--verbose") == 0 || SDL_strcmp(arg, "-v") == 0) { - enable_verbose_logger = 1; + enable_verbose_logger = 1; } else if(SDL_strcmp(arg, "--logdir") == 0) { - char *dirString = NULL; + char *dirString = NULL; - if( (i + 1) < argc && argv[i+1][0] != '-') { - dirString = argv[++i]; - } else { - printf("runner: dir is missing\n"); - PrintUsage(); - exit(1); - } + if( (i + 1) < argc && argv[i+1][0] != '-') { + dirString = argv[++i]; + } else { + printf("runner: dir is missing\n"); + PrintUsage(); + exit(1); + } - memset(log_directory, 0, NAME_BUFFER_SIZE); - memcpy(log_directory, dirString, SDL_strlen(dirString)); + memset(log_directory, 0, NAME_BUFFER_SIZE); + memcpy(log_directory, dirString, SDL_strlen(dirString)); - log_stdout_enabled = 0; + log_stdout_enabled = 0; } else if(SDL_strcmp(arg, "--logfile") == 0) { - char *fileString = NULL; + char *fileString = NULL; - if( (i + 1) < argc && argv[i+1][0] != '-') { - fileString = argv[++i]; - } else { - fileString = DEFAULT_LOG_FILENAME; - } + if( (i + 1) < argc && argv[i+1][0] != '-') { + fileString = argv[++i]; + } else { + fileString = DEFAULT_LOG_FILENAME; + } - memset(log_basename, 0, NAME_BUFFER_SIZE); - memcpy(log_basename, fileString, SDL_strlen(fileString)); + memset(log_basename, 0, NAME_BUFFER_SIZE); + memcpy(log_basename, fileString, SDL_strlen(fileString)); - log_stdout_enabled = 0; + log_stdout_enabled = 0; } else if(SDL_strcmp(arg, "--timeout") == 0 || SDL_strcmp(arg, "-tm") == 0) { - universal_timeout_enabled = 1; - char *timeoutString = NULL; + universal_timeout_enabled = 1; + char *timeoutString = NULL; - if( (i + 1) < argc && argv[i+1][0] != '-') { - timeoutString = argv[++i]; - } else { - printf("runner: timeout is missing\n"); - PrintUsage(); - exit(1); - } + if( (i + 1) < argc && argv[i+1][0] != '-') { + timeoutString = argv[++i]; + } else { + printf("runner: timeout is missing\n"); + PrintUsage(); + exit(1); + } - universal_timeout = atoi(timeoutString); + universal_timeout = atoi(timeoutString); } else if(SDL_strcmp(arg, "--seed") == 0) { - userRunSeed = 1; + userRunSeed = 1; - if( (i + 1) < argc && argv[i+1][0] != '-') { - runSeed = argv[++i]; - } else { - printf("runner: seed value is missing\n"); - PrintUsage(); - exit(1); - } - //!\todo should the seed be copied to a buffer? + if( (i + 1) < argc && argv[i+1][0] != '-') { + runSeed = argv[++i]; + } else { + printf("runner: seed value is missing\n"); + PrintUsage(); + exit(1); + } + //!\todo should the seed be copied to a buffer? } else if(SDL_strcmp(arg, "--iterations") == 0) { - char *iterationsString = NULL; - if( (i + 1) < argc && argv[i+1][0] != '-') { - iterationsString = argv[++i]; - } else { - printf("runner: iterations value is missing\n"); - PrintUsage(); - exit(1); - } + char *iterationsString = NULL; + if( (i + 1) < argc && argv[i+1][0] != '-') { + iterationsString = argv[++i]; + } else { + printf("runner: iterations value is missing\n"); + PrintUsage(); + exit(1); + } - testInvocationCount = atoi(iterationsString); - if(testInvocationCount < 1) { - printf("Iteration value has to bigger than 0.\n"); - exit(1); - } + testInvocationCount = atoi(iterationsString); + if(testInvocationCount < 1) { + printf("Iteration value has to bigger than 0.\n"); + exit(1); + } } else if(SDL_strcmp(arg, "--exec-key") == 0) { - char *execKeyString = NULL; - if( (i + 1) < argc && argv[i+1][0] != '-') { - execKeyString = argv[++i]; - } else { - printf("runner: execkey value is missing\n"); - PrintUsage(); - exit(1); - } + char *execKeyString = NULL; + if( (i + 1) < argc && argv[i+1][0] != '-') { + execKeyString = argv[++i]; + } else { + printf("runner: execkey value is missing\n"); + PrintUsage(); + exit(1); + } - int ret = sscanf(execKeyString, "%llx", &userExecKey); - if(ret != 1) { - fprintf(stderr, "Error: Failed to parse exec-key option"); - exit(1); - } + int ret = sscanf(execKeyString, "%llx", &userExecKey); + if(ret != 1) { + fprintf(stderr, "Error: Failed to parse exec-key option"); + exit(1); + } } else if(SDL_strcmp(arg, "--test") == 0 || SDL_strcmp(arg, "-t") == 0) { - only_selected_test = 1; - char *testName = NULL; + only_selected_test = 1; + char *testName = NULL; - if( (i + 1) < argc && argv[i+1][0] != '-') { - testName = argv[++i]; - } else { - printf("runner: test name is missing\n"); - PrintUsage(); - exit(1); - } + if( (i + 1) < argc && argv[i+1][0] != '-') { + testName = argv[++i]; + } else { + printf("runner: test name is missing\n"); + PrintUsage(); + exit(1); + } - memset(selected_test_name, 0, NAME_BUFFER_SIZE); - strncpy(selected_test_name, testName, NAME_BUFFER_SIZE); + memset(selected_test_name, 0, NAME_BUFFER_SIZE); + strncpy(selected_test_name, testName, NAME_BUFFER_SIZE); } else if(SDL_strcmp(arg, "--xsl") == 0) { - xsl_enabled = 1; + xsl_enabled = 1; - if( (i + 1) < argc && argv[i+1][0] != '-') { - char *stylesheet = argv[++i]; - if(stylesheet[0] != '-') { - custom_xsl_enabled = 1; + if( (i + 1) < argc && argv[i+1][0] != '-') { + char *stylesheet = argv[++i]; + if(stylesheet[0] != '-') { + custom_xsl_enabled = 1; - memset(xsl_stylesheet_name, 0, NAME_BUFFER_SIZE); - strncpy(xsl_stylesheet_name, stylesheet, NAME_BUFFER_SIZE); - } - } + memset(xsl_stylesheet_name, 0, NAME_BUFFER_SIZE); + strncpy(xsl_stylesheet_name, stylesheet, NAME_BUFFER_SIZE); + } + } } else if(SDL_strcmp(arg, "--name-contains") == 0 || SDL_strcmp(arg, "-ts") == 0) { - only_tests_with_string = 1; - char *substring = NULL; + only_tests_with_string = 1; + char *substring = NULL; - if( (i + 1) < argc && argv[i+1][0] != '-') { - substring = argv[++i]; - } else { - printf("runner: substring of test name is missing\n"); - PrintUsage(); - exit(1); - } + if( (i + 1) < argc && argv[i+1][0] != '-') { + substring = argv[++i]; + } else { + printf("runner: substring of test name is missing\n"); + PrintUsage(); + exit(1); + } - memset(testcase_name_substring, 0, NAME_BUFFER_SIZE); - strncpy(testcase_name_substring, strdup(substring), NAME_BUFFER_SIZE); + memset(testcase_name_substring, 0, NAME_BUFFER_SIZE); + strncpy(testcase_name_substring, strdup(substring), NAME_BUFFER_SIZE); } else if(SDL_strcmp(arg, "--suite") == 0 || SDL_strcmp(arg, "-s") == 0) { - only_selected_suite = 1; + only_selected_suite = 1; - char *suiteName = NULL; - if( (i + 1) < argc && argv[i+1][0] != '-') { - suiteName = argv[++i]; - } else { - printf("runner: suite name is missing\n"); - PrintUsage(); - exit(1); - } + char *suiteName = NULL; + if( (i + 1) < argc && argv[i+1][0] != '-') { + suiteName = argv[++i]; + } else { + printf("runner: suite name is missing\n"); + PrintUsage(); + exit(1); + } - memset(selected_suite_name, 0, NAME_BUFFER_SIZE); - strcpy(selected_suite_name, suiteName); + memset(selected_suite_name, 0, NAME_BUFFER_SIZE); + strcpy(selected_suite_name, suiteName); } else if(SDL_strcmp(arg, "--include-dummy") == 0) { - include_dummy_suite = 1; + include_dummy_suite = 1; } else if(SDL_strcmp(arg, "--version") == 0) { - fprintf(stdout, "SDL test harness (version %s)\n", PACKAGE_VERSION); + fprintf(stdout, "SDL test harness (version %s)\n", PACKAGE_VERSION); - // print: Testing against SDL version fuu (rev: bar) + // print: Testing against SDL version fuu (rev: bar) - exit(0); + exit(0); } else if(SDL_strcmp(arg, "--help") == 0 || SDL_strcmp(arg, "-h") == 0) { - PrintUsage(); - exit(0); + PrintUsage(); + exit(0); } else { - printf("runner: unknown command '%s'\n", arg); - PrintUsage(); - exit(0); + printf("runner: unknown command '%s'\n", arg); + PrintUsage(); + exit(0); } } } @@ -1314,14 +1314,14 @@ ParseOptions(int argc, char *argv[]) void InitRunner() { - // Inits some global buffers to their default values - memcpy(log_basename, (void *)DEFAULT_LOG_FILENAME, SDL_strlen(DEFAULT_LOG_FILENAME)); - memcpy(log_directory, (void *)DEFAULT_LOG_DIRECTORY, SDL_strlen(DEFAULT_LOG_DIRECTORY)); + // Inits some global buffers to their default values + memcpy(log_basename, (void *)DEFAULT_LOG_FILENAME, SDL_strlen(DEFAULT_LOG_FILENAME)); + memcpy(log_directory, (void *)DEFAULT_LOG_DIRECTORY, SDL_strlen(DEFAULT_LOG_DIRECTORY)); - memset(selected_test_name, 0, NAME_BUFFER_SIZE); - memset(selected_suite_name, 0, NAME_BUFFER_SIZE); - memset(testcase_name_substring, 0, NAME_BUFFER_SIZE); - memset(xsl_stylesheet_name, 0, NAME_BUFFER_SIZE); + memset(selected_test_name, 0, NAME_BUFFER_SIZE); + memset(selected_suite_name, 0, NAME_BUFFER_SIZE); + memset(testcase_name_substring, 0, NAME_BUFFER_SIZE); + memset(xsl_stylesheet_name, 0, NAME_BUFFER_SIZE); } @@ -1334,173 +1334,173 @@ InitRunner() int main(int argc, char *argv[]) { - InitRunner(); + InitRunner(); - ParseOptions(argc, argv); + ParseOptions(argc, argv); - int suiteCounter = 0; + int suiteCounter = 0; #if defined(linux) || defined( __linux) - char *extension = "so"; + char *extension = "so"; #else - char *extension = "dylib"; + char *extension = "dylib"; #endif - const Uint32 startTicks = SDL_GetTicks(); + const Uint32 startTicks = SDL_GetTicks(); - TestSuiteReference *suites = ScanForTestSuites(DEFAULT_TEST_DIRECTORY, extension); - if(suites == NULL) { - fprintf(stderr, "No test suites loaded.\n"); - fprintf(stderr, "Compile you suites and install them to tests/\n"); - return 2; - } - suites = LoadTestSuites(suites); + TestSuiteReference *suites = ScanForTestSuites(DEFAULT_TEST_DIRECTORY, extension); + if(suites == NULL) { + fprintf(stderr, "No test suites loaded.\n"); + fprintf(stderr, "Compile you suites and install them to tests/\n"); + return 2; + } + suites = LoadTestSuites(suites); - TestCase *testCases = LoadTestCases(suites); - if(testCases == NULL) { - fprintf(stderr, "Found zero test cases\n"); - fprintf(stderr, "Check out your command line options\n"); - return 2; - } + TestCase *testCases = LoadTestCases(suites); + if(testCases == NULL) { + fprintf(stderr, "Found zero test cases\n"); + fprintf(stderr, "Check out your command line options\n"); + return 2; + } - // if --show-tests option is given, only print tests and exit - if(only_print_tests) { - TestCase *testItem = NULL; - char *lastSuiteName = NULL; - for(testItem = testCases; testItem; testItem = testItem->next) { - if ((lastSuiteName == NULL) || (strcmp(lastSuiteName, testItem->suiteName)!=0)) { - lastSuiteName = testItem->suiteName; - printf ("%s:\n", lastSuiteName); - } - printf(" %s: %s", testItem->testName, testItem->description); - if (testItem->timeout>0) { - printf (" (timeout: %i sec)", testItem->timeout); - } - printf ("\n"); - } + // if --show-tests option is given, only print tests and exit + if(only_print_tests) { + TestCase *testItem = NULL; + char *lastSuiteName = NULL; + for(testItem = testCases; testItem; testItem = testItem->next) { + if ((lastSuiteName == NULL) || (strcmp(lastSuiteName, testItem->suiteName)!=0)) { + lastSuiteName = testItem->suiteName; + printf ("%s:\n", lastSuiteName); + } + printf(" %s: %s", testItem->testName, testItem->description); + if (testItem->timeout>0) { + printf (" (timeout: %i sec)", testItem->timeout); + } + printf ("\n"); + } - return 0; - } + return 0; + } - if(userRunSeed == 0) { - runSeed = GenerateRunSeed(16); - if(runSeed == NULL) { - fprintf(stderr, "Error: Generating harness seed failed\n"); - return 2; - } - } + if(userRunSeed == 0) { + runSeed = GenerateRunSeed(16); + if(runSeed == NULL) { + fprintf(stderr, "Error: Generating harness seed failed\n"); + return 2; + } + } - const time_t startTimestamp = time(0); + const time_t startTimestamp = time(0); - LoggerData *loggerData = SetUpLogger(log_stdout_enabled, xml_enabled, - xsl_enabled, custom_xsl_enabled, defaultXSLStylesheet, startTimestamp); - if(loggerData == NULL) { - printf("Failed to create a logger.\n"); - return 2; - } + LoggerData *loggerData = SetUpLogger(log_stdout_enabled, xml_enabled, + xsl_enabled, custom_xsl_enabled, defaultXSLStylesheet, startTimestamp); + if(loggerData == NULL) { + printf("Failed to create a logger.\n"); + return 2; + } - if(log_stdout_enabled == 0) { - printf("Runner is executing the tests.\n"); - if(enable_verbose_logger) { - printf("Logging level is set to verbose.\n"); - } - printf("Test report is created to: %s\n", loggerData->filename); - fflush(stdout); - } + if(log_stdout_enabled == 0) { + printf("Runner is executing the tests.\n"); + if(enable_verbose_logger) { + printf("Logging level is set to verbose.\n"); + } + printf("Test report is created to: %s\n", loggerData->filename); + fflush(stdout); + } - RunStarted(argc, argv, runSeed, startTimestamp, loggerData); + RunStarted(argc, argv, runSeed, startTimestamp, loggerData); - // logger data is no longer used so free it - SDL_free(loggerData->filename); - SDL_free(loggerData); + // logger data is no longer used so free it + SDL_free(loggerData->filename); + SDL_free(loggerData); - // validate the parsed command options - // \todo add a lot more and refactor. There are many more combinations - // of commands that doesn't make sense together - if(execute_inproc && universal_timeout_enabled) { - Log(time(0), "Test timeout is not supported with in-proc execution."); - Log(time(0), "Timeout will be disabled..."); + // validate the parsed command options + // \todo add a lot more and refactor. There are many more combinations + // of commands that doesn't make sense together + if(execute_inproc && universal_timeout_enabled) { + Log(time(0), "Test timeout is not supported with in-proc execution."); + Log(time(0), "Timeout will be disabled..."); - universal_timeout_enabled = 0; - universal_timeout = -1; - } /* - if(userExecKey && testInvocationCount > 1 || userRunSeed) { - printf("The given combination of command line options doesn't make sense\n"); - printf("--exec-key should only be used to rerun failed fuzz tests\n"); - }*/ + universal_timeout_enabled = 0; + universal_timeout = -1; + } /* + if(userExecKey && testInvocationCount > 1 || userRunSeed) { + printf("The given combination of command line options doesn't make sense\n"); + printf("--exec-key should only be used to rerun failed fuzz tests\n"); + }*/ - char *currentSuiteName = NULL; - int suiteStartTime = SDL_GetTicks(); + char *currentSuiteName = NULL; + int suiteStartTime = SDL_GetTicks(); - int notFirstSuite = 0; - int startNewSuite = 1; - TestCase *testItem = NULL; - for(testItem = testCases; testItem; testItem = testItem->next) { - if(currentSuiteName && strncmp(currentSuiteName, testItem->suiteName, NAME_BUFFER_SIZE) != 0) { - startNewSuite = 1; - } + int notFirstSuite = 0; + int startNewSuite = 1; + TestCase *testItem = NULL; + for(testItem = testCases; testItem; testItem = testItem->next) { + if(currentSuiteName && strncmp(currentSuiteName, testItem->suiteName, NAME_BUFFER_SIZE) != 0) { + startNewSuite = 1; + } - if(startNewSuite) { - if(notFirstSuite) { - const double suiteRuntime = (SDL_GetTicks() - suiteStartTime) / 1000.0f; + if(startNewSuite) { + if(notFirstSuite) { + const double suiteRuntime = (SDL_GetTicks() - suiteStartTime) / 1000.0f; - SuiteEnded(testPassCount, testFailureCount, testSkipCount, time(0), - suiteRuntime); - } + SuiteEnded(testPassCount, testFailureCount, testSkipCount, time(0), + suiteRuntime); + } - suiteStartTime = SDL_GetTicks(); + suiteStartTime = SDL_GetTicks(); - currentSuiteName = testItem->suiteName; - SuiteStarted(currentSuiteName, time(0)); - testFailureCount = testPassCount = testSkipCount = 0; - suiteCounter++; + currentSuiteName = testItem->suiteName; + SuiteStarted(currentSuiteName, time(0)); + testFailureCount = testPassCount = testSkipCount = 0; + suiteCounter++; - startNewSuite = 0; - notFirstSuite = 1; - } + startNewSuite = 0; + notFirstSuite = 1; + } - int currentIteration = testInvocationCount; - while(currentIteration > 0) { - Uint64 execKey = 5; - if(userExecKey != 0) { - execKey = userExecKey; - } else { - execKey = GenerateExecKey(runSeed, testItem->suiteName, - testItem->testName, currentIteration); - } + int currentIteration = testInvocationCount; + while(currentIteration > 0) { + Uint64 execKey = 5; + if(userExecKey != 0) { + execKey = userExecKey; + } else { + execKey = GenerateExecKey(runSeed, testItem->suiteName, + testItem->testName, currentIteration); + } - TestStarted(testItem->testName, testItem->suiteName, - testItem->description, execKey, time(0)); + TestStarted(testItem->testName, testItem->suiteName, + testItem->description, execKey, time(0)); - const Uint32 testTimeStart = SDL_GetTicks(); + const Uint32 testTimeStart = SDL_GetTicks(); - int retVal = ExecuteTest(testItem, execKey); + int retVal = ExecuteTest(testItem, execKey); - const double testTotalRuntime = (SDL_GetTicks() - testTimeStart) / 1000.0f; + const double testTotalRuntime = (SDL_GetTicks() - testTimeStart) / 1000.0f; - TestEnded(testItem->testName, testItem->suiteName, retVal, time(0), testTotalRuntime); + TestEnded(testItem->testName, testItem->suiteName, retVal, time(0), testTotalRuntime); - currentIteration--; - } - } + currentIteration--; + } + } - if(currentSuiteName) { - SuiteEnded(testPassCount, testFailureCount, testSkipCount, time(0), - (SDL_GetTicks() - suiteStartTime) / 1000.0f); - } + if(currentSuiteName) { + SuiteEnded(testPassCount, testFailureCount, testSkipCount, time(0), + (SDL_GetTicks() - suiteStartTime) / 1000.0f); + } - UnloadTestCases(testCases); - UnloadTestSuites(suites); + UnloadTestCases(testCases); + UnloadTestSuites(suites); - const Uint32 endTicks = SDL_GetTicks(); - const double totalRunTime = (endTicks - startTicks) / 1000.0f; + const Uint32 endTicks = SDL_GetTicks(); + const double totalRunTime = (endTicks - startTicks) / 1000.0f; - RunEnded(totalTestPassCount + totalTestFailureCount + totalTestSkipCount, suiteCounter, - totalTestPassCount, totalTestFailureCount, totalTestSkipCount, time(0), totalRunTime); + RunEnded(totalTestPassCount + totalTestFailureCount + totalTestSkipCount, suiteCounter, + totalTestPassCount, totalTestFailureCount, totalTestSkipCount, time(0), totalRunTime); - // Some SDL subsystem might be init'ed so shut them down - SDL_Quit(); + // Some SDL subsystem might be init'ed so shut them down + SDL_Quit(); - return (totalTestFailureCount ? 1 : 0); + return (totalTestFailureCount ? 1 : 0); } diff --git a/test/test-automation/src/runner/support.c b/test/test-automation/src/runner/support.c index 0f8e89d3f..e5cbfa599 100644 --- a/test/test-automation/src/runner/support.c +++ b/test/test-automation/src/runner/support.c @@ -25,28 +25,28 @@ int PlatformSupportsAudio() { - int retValue = 0; + int retValue = 0; #ifdef SDL_AUDIO_DRIVER_COREAUDIO - retValue = 1; + retValue = 1; #endif #ifdef SDL_AUDIO_DRIVER_OSS - retValue = 1; + retValue = 1; #endif - return retValue; + return retValue; } int PlatformSupportsStdio() { - int retValue = 0; + int retValue = 0; #ifdef HAVE_STDIO_H - retValue = 1; + retValue = 1; #endif - return retValue; + return retValue; } @@ -64,12 +64,12 @@ SDL_test.h int PlatformSupportsOpenGL() { - int retValue = 0; + int retValue = 0; #define SDL_VIDEO_OPENGL - retValue = 1; + retValue = 1; #endif - return retValue; + return retValue; } */ diff --git a/test/test-automation/tests/testaudio/testaudio.c b/test/test-automation/tests/testaudio/testaudio.c index 511a78fe4..8d1f05ccb 100644 --- a/test/test-automation/tests/testaudio/testaudio.c +++ b/test/test-automation/tests/testaudio/testaudio.c @@ -11,25 +11,25 @@ /* Test cases */ static const TestCaseReference test1 = - (TestCaseReference){ "audio_enumerateAndNameAudioDevices", "Enumerate and name available audio devices (output and capture)", TEST_ENABLED, TEST_REQUIRES_AUDIO, 0}; + (TestCaseReference){ "audio_enumerateAndNameAudioDevices", "Enumerate and name available audio devices (output and capture)", TEST_ENABLED, TEST_REQUIRES_AUDIO, 0}; static const TestCaseReference test2 = - (TestCaseReference){ "audio_enumerateAndNameAudioDevicesNegativeTests", "Netative tests around enumeration and naming of audio devices.", TEST_ENABLED, TEST_REQUIRES_AUDIO, 0}; + (TestCaseReference){ "audio_enumerateAndNameAudioDevicesNegativeTests", "Netative tests around enumeration and naming of audio devices.", TEST_ENABLED, TEST_REQUIRES_AUDIO, 0}; static const TestCaseReference test3 = - (TestCaseReference){ "audio_printAudioDrivers", "Checks available audio driver names.", TEST_ENABLED, TEST_REQUIRES_AUDIO, 0}; + (TestCaseReference){ "audio_printAudioDrivers", "Checks available audio driver names.", TEST_ENABLED, TEST_REQUIRES_AUDIO, 0}; static const TestCaseReference test4 = - (TestCaseReference){ "audio_printCurrentAudioDriver", "Checks current audio driver name with initialized audio.", TEST_ENABLED, TEST_REQUIRES_AUDIO, 0}; + (TestCaseReference){ "audio_printCurrentAudioDriver", "Checks current audio driver name with initialized audio.", TEST_ENABLED, TEST_REQUIRES_AUDIO, 0}; /* Test suite */ extern const TestCaseReference *testSuite[] = { - &test1, &test2, &test3, &test4, NULL + &test1, &test2, &test3, &test4, NULL }; TestCaseReference **QueryTestSuite() { - return (TestCaseReference **)testSuite; + return (TestCaseReference **)testSuite; } /* Fixture */ @@ -37,23 +37,23 @@ TestCaseReference **QueryTestSuite() { void SetUp(void *arg) { - /* Start SDL. */ - int ret = SDL_Init( SDL_INIT_AUDIO ); - AssertTrue(ret==0, "SDL_Init(SDL_INIT_AUDIO): %s", SDL_GetError()); + /* Start SDL. */ + int ret = SDL_Init( SDL_INIT_AUDIO ); + AssertTrue(ret==0, "SDL_Init(SDL_INIT_AUDIO): %s", SDL_GetError()); } void TearDown(void *arg) { - /* Quit SDL. */ - SDL_Quit(); + /* Quit SDL. */ + SDL_Quit(); } /* Test case functions */ /** * \brief Enumerate and name available audio devices (output and capture). - * + * * \sa http://wiki.libsdl.org/moin.cgi/SDL_GetNumAudioDevices * \sa http://wiki.libsdl.org/moin.cgi/SDL_GetAudioDeviceName */ @@ -66,13 +66,13 @@ int audio_enumerateAndNameAudioDevices() /* Iterate over types: t=0 output device, t=1 input/capture device */ for (t=0; t<2; t++) { - + /* Get number of devices. */ n = SDL_GetNumAudioDevices(t); - AssertTrue(n>=0, - "Number of %s devices < 0, reported as %i: %s", + AssertTrue(n>=0, + "Number of %s devices < 0, reported as %i: %s", (t) ? "output" : "capture", - n, + n, SDL_GetError()); /* Variation of non-zero type */ @@ -82,8 +82,8 @@ int audio_enumerateAndNameAudioDevices() AssertTrue(n==nn, "SDL_GetNumAudioDevices(%i) : expected same number of audio devices %i, got %i", tt, n, nn); nn = SDL_GetNumAudioDevices(-tt); AssertTrue(n==nn, "SDL_GetNumAudioDevices(%i) : expected same number of audio devices %i, got %i", -tt, n, nn); - } - + } + /* List devices. */ if (n>0) { for (i=0; i0, "SDL_GetAudioDeviceName(%i, %i): returned empty name string", i, tt); - AssertTrue(strcmp(name, nameAgain)==0, - "SDL_GetAudioDeviceName(%i, %i): returned unexpected name string %s, expected %s", + AssertTrue(strcmp(name, nameAgain)==0, + "SDL_GetAudioDeviceName(%i, %i): returned unexpected name string %s, expected %s", i, tt, nameAgain, name); } } @@ -106,7 +106,7 @@ int audio_enumerateAndNameAudioDevices() /** * \brief Negative tests around enumeration and naming of audio devices. - * + * * \sa http://wiki.libsdl.org/moin.cgi/SDL_GetNumAudioDevices * \sa http://wiki.libsdl.org/moin.cgi/SDL_GetAudioDeviceName */ @@ -116,25 +116,25 @@ int audio_enumerateAndNameAudioDevicesNegativeTests() int t; int i, j, no, nc; const char *name; - + /* Get number of devices. */ no = SDL_GetNumAudioDevices(0); nc = SDL_GetNumAudioDevices(1); - + /* Invalid device index when getting name */ for (t=0; t<2; t++) { /* Negative device index */ i = -1; name = SDL_GetAudioDeviceName(i, t); AssertTrue(name == NULL, "SDL_GetAudioDeviceName(%i, %i): returned a name, should return NULL", i, t); - + /* Device index past range */ for (j=0; j<3; j++) { i = (t) ? nc+j : no+j; name = SDL_GetAudioDeviceName(i, t); AssertTrue(name == NULL, "SDL_GetAudioDeviceName(%i, %i): returned a name, should return NULL", i, t); } - + /* Capture index past capture range but within output range */ if ((no>0) && (no>nc) && (t==1)) { i = no-1; @@ -155,7 +155,7 @@ int audio_printAudioDrivers() /* Get number of drivers */ n = SDL_GetNumAudioDrivers(); AssertTrue(n>=0, "Number of audio drivers >= 0"); - + /* List drivers. */ if (n>0) { diff --git a/test/test-automation/tests/testclipboard/testclipboard.c b/test/test-automation/tests/testclipboard/testclipboard.c index 6fd272b33..c4ff59d1f 100644 --- a/test/test-automation/tests/testclipboard/testclipboard.c +++ b/test/test-automation/tests/testclipboard/testclipboard.c @@ -12,24 +12,24 @@ /* Test cases */ static const TestCaseReference test1 = - (TestCaseReference){ "clipboard_testHasClipboardText", "Check call to SDL_HasClipboardText", TEST_ENABLED, 0, 0 }; + (TestCaseReference){ "clipboard_testHasClipboardText", "Check call to SDL_HasClipboardText", TEST_ENABLED, 0, 0 }; static const TestCaseReference test2 = - (TestCaseReference){ "clipboard_testGetClipboardText", "Check call to SDL_GetClipboardText", TEST_ENABLED, 0, 0 }; + (TestCaseReference){ "clipboard_testGetClipboardText", "Check call to SDL_GetClipboardText", TEST_ENABLED, 0, 0 }; static const TestCaseReference test3 = - (TestCaseReference){ "clipboard_testSetClipboardText", "Check call to SDL_SetClipboardText", TEST_ENABLED, 0, 0 }; + (TestCaseReference){ "clipboard_testSetClipboardText", "Check call to SDL_SetClipboardText", TEST_ENABLED, 0, 0 }; static const TestCaseReference test4 = - (TestCaseReference){ "clipboard_testClipboardTextFunctions", "End-to-end test of SDL_xyzClipboardText functions", TEST_ENABLED, 0, 0 }; + (TestCaseReference){ "clipboard_testClipboardTextFunctions", "End-to-end test of SDL_xyzClipboardText functions", TEST_ENABLED, 0, 0 }; /* Test suite */ extern const TestCaseReference *testSuite[] = { - &test1, &test2, &test3, &test4, NULL + &test1, &test2, &test3, &test4, NULL }; TestCaseReference **QueryTestSuite() { - return (TestCaseReference **)testSuite; + return (TestCaseReference **)testSuite; } void @@ -39,7 +39,7 @@ SetUp(void *arg) int ret = SDL_InitSubSystem( SDL_INIT_VIDEO ); AssertTrue(ret==0, "SDL_Init(SDL_INIT_VIDEO) failed: %s", SDL_GetError()); } - + void TearDown(void *arg) { @@ -50,52 +50,52 @@ TearDown(void *arg) /** * \brief Check call to SDL_HasClipboardText * - * \sa + * \sa * http://wiki.libsdl.org/moin.cgi/SDL_HasClipboardText */ int clipboard_testHasClipboardText(void *arg) { - SDL_bool result; - result = SDL_HasClipboardText(); - AssertPass("Call to SDL_HasClipboardText succeeded"); + SDL_bool result; + result = SDL_HasClipboardText(); + AssertPass("Call to SDL_HasClipboardText succeeded"); } /** * \brief Check call to SDL_GetClipboardText * - * \sa + * \sa * http://wiki.libsdl.org/moin.cgi/SDL_GetClipboardText */ int clipboard_testGetClipboardText(void *arg) { - char *result; - result = SDL_GetClipboardText(); - AssertPass("Call to SDL_GetClipboardText succeeded"); + char *result; + result = SDL_GetClipboardText(); + AssertPass("Call to SDL_GetClipboardText succeeded"); } /** * \brief Check call to SDL_SetClipboardText - * \sa + * \sa * http://wiki.libsdl.org/moin.cgi/SDL_SetClipboardText */ int clipboard_testSetClipboardText(void *arg) { - char *textRef = RandomAsciiString(); - char *text = strdup(textRef); - int result; - result = SDL_SetClipboardText((const char *)text); - AssertTrue( - result == 0, - "Call to SDL_SetClipboardText failed with error %i: %s", - result, SDL_GetError()); - AssertTrue( - strcmp(textRef, text) == 0, - "SDL_SetClipboardText modified input string: expected %s, got %s", - textRef, text); - + char *textRef = RandomAsciiString(); + char *text = strdup(textRef); + int result; + result = SDL_SetClipboardText((const char *)text); + AssertTrue( + result == 0, + "Call to SDL_SetClipboardText failed with error %i: %s", + result, SDL_GetError()); + AssertTrue( + strcmp(textRef, text) == 0, + "SDL_SetClipboardText modified input string: expected %s, got %s", + textRef, text); + /* Cleanup */ if (textRef) free(textRef); if (text) free(text); @@ -104,7 +104,7 @@ clipboard_testSetClipboardText(void *arg) /** * \brief End-to-end test of SDL_xyzClipboardText functions - * \sa + * \sa * http://wiki.libsdl.org/moin.cgi/SDL_HasClipboardText * http://wiki.libsdl.org/moin.cgi/SDL_GetClipboardText * http://wiki.libsdl.org/moin.cgi/SDL_SetClipboardText @@ -112,54 +112,54 @@ clipboard_testSetClipboardText(void *arg) int clipboard_testClipboardTextFunctions(void *arg) { - char *textRef = RandomAsciiString(); - char *text = strdup(textRef); - SDL_bool boolResult; - int intResult; - char *charResult; - - /* Clear clipboard text state */ - boolResult = SDL_HasClipboardText(); - if (boolResult == SDL_TRUE) { + char *textRef = RandomAsciiString(); + char *text = strdup(textRef); + SDL_bool boolResult; + int intResult; + char *charResult; + + /* Clear clipboard text state */ + boolResult = SDL_HasClipboardText(); + if (boolResult == SDL_TRUE) { intResult = SDL_SetClipboardText((const char *)NULL); - AssertTrue( - intResult == 0, - "Call to SDL_SetClipboardText("") failed with error %i: %s", - intResult, SDL_GetError()); - charResult = SDL_GetClipboardText(); - boolResult = SDL_HasClipboardText(); - AssertTrue( + AssertTrue( + intResult == 0, + "Call to SDL_SetClipboardText("") failed with error %i: %s", + intResult, SDL_GetError()); + charResult = SDL_GetClipboardText(); + boolResult = SDL_HasClipboardText(); + AssertTrue( boolResult == SDL_FALSE, - "SDL_HasClipboardText returned TRUE, expected FALSE"); + "SDL_HasClipboardText returned TRUE, expected FALSE"); } - - /* Empty clipboard */ - charResult = SDL_GetClipboardText(); - AssertTrue( - charResult != NULL, - "SDL_GetClipboardText returned NULL"); - AssertTrue( - strlen(charResult) == 0, - "SDL_GetClipboardText returned string with length >0: got length %i", - strlen(charResult)); - intResult = SDL_SetClipboardText((const char *)text); - AssertTrue( - intResult == 0, - "Call to SDL_SetClipboardText failed with error %i: %s", - intResult, SDL_GetError()); - AssertTrue( - strcmp(textRef, text) == 0, - "SDL_SetClipboardText modified input string: expected %s, got %s", - textRef, text); - boolResult = SDL_HasClipboardText(); - AssertTrue( + + /* Empty clipboard */ + charResult = SDL_GetClipboardText(); + AssertTrue( + charResult != NULL, + "SDL_GetClipboardText returned NULL"); + AssertTrue( + strlen(charResult) == 0, + "SDL_GetClipboardText returned string with length >0: got length %i", + strlen(charResult)); + intResult = SDL_SetClipboardText((const char *)text); + AssertTrue( + intResult == 0, + "Call to SDL_SetClipboardText failed with error %i: %s", + intResult, SDL_GetError()); + AssertTrue( + strcmp(textRef, text) == 0, + "SDL_SetClipboardText modified input string: expected %s, got %s", + textRef, text); + boolResult = SDL_HasClipboardText(); + AssertTrue( boolResult == SDL_TRUE, - "SDL_HasClipboardText returned FALSE, expected TRUE"); - charResult = SDL_GetClipboardText(); - AssertTrue( - strcmp(textRef, charResult) == 0, - "SDL_GetClipboardText did not return correst string: expected %s, got %s", - textRef, charResult); + "SDL_HasClipboardText returned FALSE, expected TRUE"); + charResult = SDL_GetClipboardText(); + AssertTrue( + strcmp(textRef, charResult) == 0, + "SDL_GetClipboardText did not return correst string: expected %s, got %s", + textRef, charResult); /* Cleanup */ if (textRef) free(textRef); diff --git a/test/test-automation/tests/testdummy/testdummy.c b/test/test-automation/tests/testdummy/testdummy.c index 6a20626db..945a6620f 100644 --- a/test/test-automation/tests/testdummy/testdummy.c +++ b/test/test-automation/tests/testdummy/testdummy.c @@ -35,25 +35,25 @@ /* Test case references */ static const TestCaseReference test1 = - (TestCaseReference){ "test_dummy1", "description", TEST_ENABLED, 0, 4}; + (TestCaseReference){ "test_dummy1", "description", TEST_ENABLED, 0, 4}; static const TestCaseReference test2 = - (TestCaseReference){ "test_dummy2", "description", TEST_ENABLED, 0, 0}; + (TestCaseReference){ "test_dummy2", "description", TEST_ENABLED, 0, 0}; static const TestCaseReference test3 = - (TestCaseReference){ "test_fuzzy", "description", TEST_ENABLED, 0, 2}; + (TestCaseReference){ "test_fuzzy", "description", TEST_ENABLED, 0, 2}; static const TestCaseReference test4 = - (TestCaseReference){ "test_leak", "description", TEST_ENABLED, 0, 2}; + (TestCaseReference){ "test_leak", "description", TEST_ENABLED, 0, 2}; /* Test suite */ extern const TestCaseReference *testSuite[] = { - &test1, &test2, &test3, &test4, NULL + &test1, &test2, &test3, &test4, NULL }; TestCaseReference **QueryTestSuite() { - return (TestCaseReference **)testSuite; + return (TestCaseReference **)testSuite; } /* Create test fixture */ @@ -72,8 +72,8 @@ TestCaseReference **QueryTestSuite() { void SetUp(void *arg) { - // create test fixture, - // for example, set up static variables used by test cases here + // create test fixture, + // for example, set up static variables used by test cases here } /*! @@ -87,71 +87,71 @@ SetUp(void *arg) void TearDown(void *arg) { - // destroy test fixture + // destroy test fixture } /* Test case functions */ void test_dummy1(void *arg) { - AssertEquals(5, 5, "Assert message"); + AssertEquals(5, 5, "Assert message"); - /* - for( ; 1 ; ) - Log(0, "uint8 (same value): %u", RandomUint32()); - // */ + /* + for( ; 1 ; ) + Log(0, "uint8 (same value): %u", RandomUint32()); + // */ - //Log(0, "uint8 (same value): %d", RandomUint8BoundaryValue(200, 200, SDL_TRUE)); + //Log(0, "uint8 (same value): %d", RandomUint8BoundaryValue(200, 200, SDL_TRUE)); - int c = 0; - //for(; c < 100 ; c++) - printf("%f\n", RandomUnitFloat()); + int c = 0; + //for(; c < 100 ; c++) + printf("%f\n", RandomUnitFloat()); - for(; 0 ; ) - printf("%d\n", RandomSint16()); + for(; 0 ; ) + printf("%d\n", RandomSint16()); - for( ; 0 ; ) { - //Log(0, "sint8: %d", RandomSint8BoundaryValue(-11, 10, SDL_TRUE)); - //Log(0, "sint16: %d", RandomSint16BoundaryValue(SHRT_MIN, SHRT_MAX, SDL_FALSE)); - Log(0, "sint32: %d", RandomSint32BoundaryValue(INT_MIN, 3000, SDL_FALSE)); - //Log(0, "sint64: %lld", RandomSint64BoundaryValue(-34, -34, SDL_FALSE)); - } + for( ; 0 ; ) { + //Log(0, "sint8: %d", RandomSint8BoundaryValue(-11, 10, SDL_TRUE)); + //Log(0, "sint16: %d", RandomSint16BoundaryValue(SHRT_MIN, SHRT_MAX, SDL_FALSE)); + Log(0, "sint32: %d", RandomSint32BoundaryValue(INT_MIN, 3000, SDL_FALSE)); + //Log(0, "sint64: %lld", RandomSint64BoundaryValue(-34, -34, SDL_FALSE)); + } - for(; 0 ;) { - //Log(0, "int8: %u", RandomUint8BoundaryValue(0, 255, SDL_FALSE)); - //Log(0, "uint16: %u", RandomUint16BoundaryValue(0, UINT16_MAX, SDL_FALSE)); - //Log(0, "int32: %u", RandomUint32BoundaryValue(0, 0xFFFFFFFE, SDL_FALSE)); - Log(0, "int64: %llu", RandomUint64BoundaryValue(2, 0xFFFFFFFFFFFFFFFE, SDL_FALSE)); - } + for(; 0 ;) { + //Log(0, "int8: %u", RandomUint8BoundaryValue(0, 255, SDL_FALSE)); + //Log(0, "uint16: %u", RandomUint16BoundaryValue(0, UINT16_MAX, SDL_FALSE)); + //Log(0, "int32: %u", RandomUint32BoundaryValue(0, 0xFFFFFFFE, SDL_FALSE)); + Log(0, "int64: %llu", RandomUint64BoundaryValue(2, 0xFFFFFFFFFFFFFFFE, SDL_FALSE)); + } - for(; 0 ;) { - int min = -5; - int max = 5; - int random = RandomIntegerInRange(min, max); - if(random < min || random > max ) { - AssertFail("Generated incorrect integer"); - } - Log(0, "%d", random); - } + for(; 0 ;) { + int min = -5; + int max = 5; + int random = RandomIntegerInRange(min, max); + if(random < min || random > max ) { + AssertFail("Generated incorrect integer"); + } + Log(0, "%d", random); + } - //Log(0, "Random: %s", RandomAsciiString()); + //Log(0, "Random: %s", RandomAsciiString()); } void test_dummy2(void *arg) { - char *msg = "eello"; - //msg[0] = 'H'; - AssertTrue(1, "Assert message"); - AssertTrue(0, "Assert message"); - AssertTrue(1, "Assert message"); + char *msg = "eello"; + //msg[0] = 'H'; + AssertTrue(1, "Assert message"); + AssertTrue(0, "Assert message"); + AssertTrue(1, "Assert message"); } void test_fuzzy(void *arg) { - // Simulates a fuzzing failure - AssertTrue(RandomUint8() != 100, "Value is 100"); + // Simulates a fuzzing failure + AssertTrue(RandomUint8() != 100, "Value is 100"); } static void @@ -164,9 +164,9 @@ f(void) { void test_leak(void *arg) { - // Creates a memory leak - f(); + // Creates a memory leak + f(); - AssertPass(""); + AssertPass(""); } diff --git a/test/test-automation/tests/testevents/testevents.c b/test/test-automation/tests/testevents/testevents.c index bdb7f089d..3b5b7dc02 100644 --- a/test/test-automation/tests/testevents/testevents.c +++ b/test/test-automation/tests/testevents/testevents.c @@ -13,15 +13,15 @@ /* Test cases */ static const TestCaseReference test1 = - (TestCaseReference){ "events_test", "description", TEST_DISABLED, 0, 0 }; + (TestCaseReference){ "events_test", "description", TEST_DISABLED, 0, 0 }; /* Test suite */ extern const TestCaseReference *testSuite[] = { - &test1, NULL + &test1, NULL }; TestCaseReference **QueryTestSuite() { - return (TestCaseReference **)testSuite; + return (TestCaseReference **)testSuite; } /** @@ -30,5 +30,5 @@ TestCaseReference **QueryTestSuite() { int events_test(void *arg) { - AssertPass(""); + AssertPass(""); } diff --git a/test/test-automation/tests/testkeyboard/testkeyboard.c b/test/test-automation/tests/testkeyboard/testkeyboard.c index 341e39449..47240399b 100644 --- a/test/test-automation/tests/testkeyboard/testkeyboard.c +++ b/test/test-automation/tests/testkeyboard/testkeyboard.c @@ -13,15 +13,15 @@ /* Test cases */ static const TestCaseReference test1 = - (TestCaseReference){ "keyboard_test", "description", TEST_DISABLED, 0, 0 }; + (TestCaseReference){ "keyboard_test", "description", TEST_DISABLED, 0, 0 }; /* Test suite */ extern const TestCaseReference *testSuite[] = { - &test1, NULL + &test1, NULL }; TestCaseReference **QueryTestSuite() { - return (TestCaseReference **)testSuite; + return (TestCaseReference **)testSuite; } /** @@ -30,5 +30,5 @@ TestCaseReference **QueryTestSuite() { int keyboard_test(void *arg) { - AssertPass(""); + AssertPass(""); } diff --git a/test/test-automation/tests/testplatform/testplatform.c b/test/test-automation/tests/testplatform/testplatform.c index 974d6afb7..d4fb286bd 100644 --- a/test/test-automation/tests/testplatform/testplatform.c +++ b/test/test-automation/tests/testplatform/testplatform.c @@ -11,45 +11,45 @@ /* Test cases */ static const TestCaseReference test1 = - (TestCaseReference){ "platform_testTypes", "Tests predefined types", TEST_ENABLED, 0, 0 }; + (TestCaseReference){ "platform_testTypes", "Tests predefined types", TEST_ENABLED, 0, 0 }; static const TestCaseReference test2 = - (TestCaseReference){ "platform_testEndianessAndSwap", "Tests endianess and swap functions", TEST_ENABLED, 0, 0 }; + (TestCaseReference){ "platform_testEndianessAndSwap", "Tests endianess and swap functions", TEST_ENABLED, 0, 0 }; static const TestCaseReference test3 = - (TestCaseReference){ "platform_testGetFunctions", "Tests various SDL_GetXYZ functions", TEST_ENABLED, 0, 0 }; + (TestCaseReference){ "platform_testGetFunctions", "Tests various SDL_GetXYZ functions", TEST_ENABLED, 0, 0 }; static const TestCaseReference test4 = - (TestCaseReference){ "platform_testHasFunctions", "Tests various SDL_HasXYZ functions", TEST_ENABLED, 0, 0 }; + (TestCaseReference){ "platform_testHasFunctions", "Tests various SDL_HasXYZ functions", TEST_ENABLED, 0, 0 }; static const TestCaseReference test5 = - (TestCaseReference){ "platform_testGetVersion", "Tests SDL_GetVersion function", TEST_ENABLED, 0, 0 }; + (TestCaseReference){ "platform_testGetVersion", "Tests SDL_GetVersion function", TEST_ENABLED, 0, 0 }; static const TestCaseReference test6 = - (TestCaseReference){ "platform_testSDLVersion", "Tests SDL_VERSION macro", TEST_ENABLED, 0, 0 }; + (TestCaseReference){ "platform_testSDLVersion", "Tests SDL_VERSION macro", TEST_ENABLED, 0, 0 }; static const TestCaseReference test7 = - (TestCaseReference){ "platform_testDefaultInit", "Tests default SDL_Init", TEST_ENABLED, 0, 0 }; + (TestCaseReference){ "platform_testDefaultInit", "Tests default SDL_Init", TEST_ENABLED, 0, 0 }; static const TestCaseReference test8 = - (TestCaseReference){ "platform_testGetSetClearError", "Tests SDL_Get/Set/ClearError", TEST_ENABLED, 0, 0 }; + (TestCaseReference){ "platform_testGetSetClearError", "Tests SDL_Get/Set/ClearError", TEST_ENABLED, 0, 0 }; static const TestCaseReference test9 = - (TestCaseReference){ "platform_testSetErrorEmptyInput", "Tests SDL_SetError with empty input", TEST_ENABLED, 0, 0 }; + (TestCaseReference){ "platform_testSetErrorEmptyInput", "Tests SDL_SetError with empty input", TEST_ENABLED, 0, 0 }; static const TestCaseReference test10 = - (TestCaseReference){ "platform_testSetErrorInvalidInput", "Tests SDL_SetError with invalid input", TEST_ENABLED, 0, 0 }; + (TestCaseReference){ "platform_testSetErrorInvalidInput", "Tests SDL_SetError with invalid input", TEST_ENABLED, 0, 0 }; static const TestCaseReference test11 = - (TestCaseReference){ "platform_testGetPowerInfo", "Tests SDL_GetPowerInfo function", TEST_ENABLED, 0, 0 }; + (TestCaseReference){ "platform_testGetPowerInfo", "Tests SDL_GetPowerInfo function", TEST_ENABLED, 0, 0 }; /* Test suite */ extern const TestCaseReference *testSuite[] = { - &test1, &test2, &test3, &test4, &test5, &test6, &test7, &test8, &test9, &test10, &test11, NULL + &test1, &test2, &test3, &test4, &test5, &test6, &test7, &test8, &test9, &test10, &test11, NULL }; TestCaseReference **QueryTestSuite() { - return (TestCaseReference **)testSuite; + return (TestCaseReference **)testSuite; } /** @@ -103,14 +103,14 @@ int platform_testEndianessAndSwap(void *arg) swapped64 = 0x1234ABCD; swapped64 <<= 32; swapped64 |= 0xDEADBEEF; - + if ((*((char *) &value) >> 4) == 0x1) { real_byteorder = SDL_BIG_ENDIAN; } else { real_byteorder = SDL_LIL_ENDIAN; } - /* Test endianness. */ + /* Test endianness. */ AssertTrue( real_byteorder == SDL_BYTEORDER, "Machine detected as %s endian, appears to be %s endian.", (SDL_BYTEORDER == SDL_LIL_ENDIAN) ? "little" : "big", @@ -151,29 +151,29 @@ int platform_testGetFunctions (void *arg) char *revision; int ret; int len; - + platform = (char *)SDL_GetPlatform(); AssertPass("SDL_GetPlatform()"); AssertTrue(platform != NULL, "SDL_GetPlatform() != NULL"); if (platform != NULL) { len = strlen(platform); - AssertTrue(len > 0, - "SDL_GetPlatform(): expected non-empty platform, was platform: '%s', len: %i", - platform, + AssertTrue(len > 0, + "SDL_GetPlatform(): expected non-empty platform, was platform: '%s', len: %i", + platform, len); } - + ret = SDL_GetCPUCount(); AssertPass("SDL_GetCPUCount()"); AssertTrue(ret > 0, - "SDL_GetCPUCount(): expected count > 0, was: %i", - ret); + "SDL_GetCPUCount(): expected count > 0, was: %i", + ret); ret = SDL_GetCPUCacheLineSize(); AssertPass("SDL_GetCPUCacheLineSize()"); AssertTrue(ret >= 0, - "SDL_GetCPUCacheLineSize(): expected size >= 0, was: %i", - ret); + "SDL_GetCPUCacheLineSize(): expected size >= 0, was: %i", + ret); revision = (char *)SDL_GetRevision(); AssertPass("SDL_GetRevision()"); @@ -199,12 +199,12 @@ int platform_testGetFunctions (void *arg) int platform_testHasFunctions (void *arg) { int ret; - + // TODO: independently determine and compare values as well - + ret = SDL_HasRDTSC(); AssertPass("SDL_HasRDTSC()"); - + ret = SDL_HasAltiVec(); AssertPass("SDL_HasAltiVec()"); @@ -238,16 +238,16 @@ int platform_testHasFunctions (void *arg) int platform_testGetVersion(void *arg) { SDL_version linked; - + SDL_GetVersion(&linked); AssertTrue( linked.major >= SDL_MAJOR_VERSION, "SDL_GetVersion(): returned major %i (>= %i)", linked.major, - SDL_MAJOR_VERSION); + SDL_MAJOR_VERSION); AssertTrue( linked.minor >= SDL_MINOR_VERSION, "SDL_GetVersion(): returned minor %i (>= %i)", linked.minor, - SDL_MINOR_VERSION); + SDL_MINOR_VERSION); } /*! @@ -256,16 +256,16 @@ int platform_testGetVersion(void *arg) int platform_testSDLVersion(void *arg) { SDL_version compiled; - + SDL_VERSION(&compiled); AssertTrue( compiled.major >= SDL_MAJOR_VERSION, "SDL_VERSION() returned major %i (>= %i)", compiled.major, - SDL_MAJOR_VERSION); + SDL_MAJOR_VERSION); AssertTrue( compiled.minor >= SDL_MINOR_VERSION, "SDL_VERSION() returned minor %i (>= %i)", compiled.minor, - SDL_MINOR_VERSION); + SDL_MINOR_VERSION); } /*! @@ -275,24 +275,24 @@ int platform_testDefaultInit(void *arg) { int ret; int subsystem; - - ret = SDL_Init(0); - AssertTrue( ret == 0, + + ret = SDL_Init(0); + AssertTrue( ret == 0, "SDL_Init(0): returned %i, expected 0, error: %s", ret, SDL_GetError()); - + subsystem = SDL_WasInit(0); - AssertTrue( subsystem == 0, + AssertTrue( subsystem == 0, "SDL_WasInit(0): returned %i, expected 0", - ret); - + ret); + SDL_Quit(); } /*! * \brief Tests SDL_Get/Set/ClearError - * \sa + * \sa * http://wiki.libsdl.org/moin.cgi/SDL_GetError * http://wiki.libsdl.org/moin.cgi/SDL_SetError * http://wiki.libsdl.org/moin.cgi/SDL_ClearError @@ -302,40 +302,40 @@ int platform_testGetSetClearError(void *arg) const char *testError = "Testing"; char *lastError; int len; - + SDL_ClearError(); AssertPass("SDL_ClearError()"); - - lastError = (char *)SDL_GetError(); + + lastError = (char *)SDL_GetError(); AssertPass("SDL_GetError()"); - AssertTrue(lastError != NULL, + AssertTrue(lastError != NULL, "SDL_GetError() != NULL"); if (lastError != NULL) { len = strlen(lastError); - AssertTrue(len == 0, + AssertTrue(len == 0, "SDL_GetError(): no message expected, len: %i", len); } - + SDL_SetError("%s", testError); AssertPass("SDL_SetError()"); - lastError = (char *)SDL_GetError(); - AssertTrue(lastError != NULL, + lastError = (char *)SDL_GetError(); + AssertTrue(lastError != NULL, "SDL_GetError() != NULL"); if (lastError != NULL) { len = strlen(lastError); - AssertTrue(len == strlen(testError), - "SDL_GetError(): expected message len %i, was len: %i", - strlen(testError), + AssertTrue(len == strlen(testError), + "SDL_GetError(): expected message len %i, was len: %i", + strlen(testError), len); - AssertTrue(strcmp(lastError, testError) == 0, - "SDL_GetError(): expected message %s, was message: %s", - testError, + AssertTrue(strcmp(lastError, testError) == 0, + "SDL_GetError(): expected message %s, was message: %s", + testError, lastError); } - // Clean up + // Clean up SDL_ClearError(); } @@ -349,32 +349,32 @@ int platform_testSetErrorEmptyInput(void *arg) const char *testError = ""; char *lastError; int len; - + SDL_SetError("%s", testError); AssertPass("SDL_SetError()"); - lastError = (char *)SDL_GetError(); - AssertTrue(lastError != NULL, + lastError = (char *)SDL_GetError(); + AssertTrue(lastError != NULL, "SDL_GetError() != NULL"); if (lastError != NULL) { len = strlen(lastError); - AssertTrue(len == strlen(testError), - "SDL_GetError(): expected message len %i, was len: %i", - strlen(testError), + AssertTrue(len == strlen(testError), + "SDL_GetError(): expected message len %i, was len: %i", + strlen(testError), len); - AssertTrue(strcmp(lastError, testError) == 0, - "SDL_GetError(): expected message '%s', was message: '%s'", - testError, + AssertTrue(strcmp(lastError, testError) == 0, + "SDL_GetError(): expected message '%s', was message: '%s'", + testError, lastError); } - // Clean up + // Clean up SDL_ClearError(); } /*! * \brief Tests SDL_SetError with invalid input - * \sa + * \sa * http://wiki.libsdl.org/moin.cgi/SDL_SetError */ int platform_testSetErrorInvalidInput(void *arg) @@ -386,48 +386,48 @@ int platform_testSetErrorInvalidInput(void *arg) // Reset SDL_ClearError(); - + // Check for no-op SDL_SetError(testError); AssertPass("SDL_SetError()"); - lastError = (char *)SDL_GetError(); - AssertTrue(lastError != NULL, + lastError = (char *)SDL_GetError(); + AssertTrue(lastError != NULL, "SDL_GetError() != NULL"); if (lastError != NULL) { len = strlen(lastError); - AssertTrue(len == 0, - "SDL_GetError(): expected message len 0, was len: %i", - 0, + AssertTrue(len == 0, + "SDL_GetError(): expected message len 0, was len: %i", + 0, len); - AssertTrue(strcmp(lastError, "") == 0, - "SDL_GetError(): expected message '', was message: '%s'", + AssertTrue(strcmp(lastError, "") == 0, + "SDL_GetError(): expected message '', was message: '%s'", lastError); } - + // Set SDL_SetError(probeError); - + // Check for no-op SDL_SetError(testError); AssertPass("SDL_SetError()"); - lastError = (char *)SDL_GetError(); - AssertTrue(lastError != NULL, + lastError = (char *)SDL_GetError(); + AssertTrue(lastError != NULL, "SDL_GetError() != NULL"); if (lastError != NULL) { len = strlen(lastError); - AssertTrue(len == strlen(probeError), - "SDL_GetError(): expected message len %i, was len: %i", - strlen(probeError), + AssertTrue(len == strlen(probeError), + "SDL_GetError(): expected message len %i, was len: %i", + strlen(probeError), len); - AssertTrue(strcmp(lastError, probeError) == 0, + AssertTrue(strcmp(lastError, probeError) == 0, "SDL_GetError(): expected message '%s', was message: '%s'", probeError, lastError); } - // Clean up + // Clean up SDL_ClearError(); } @@ -444,7 +444,7 @@ int platform_testGetPowerInfo(void *arg) int secsAgain; int pct; int pctAgain; - + state = SDL_GetPowerInfo(&secs, &pct); AssertPass("SDL_GetPowerInfo()"); AssertTrue( @@ -455,7 +455,7 @@ int platform_testGetPowerInfo(void *arg) state==SDL_POWERSTATE_CHARGED, "SDL_GetPowerInfo(): state %i is one of the expected values", (int)state); - + if (state==SDL_POWERSTATE_ON_BATTERY) { AssertTrue( @@ -465,7 +465,7 @@ int platform_testGetPowerInfo(void *arg) AssertTrue( (pct >= 0) && (pct <= 100), "SDL_GetPowerInfo(): on battery, pct=[0,100], was: %i", - pct); + pct); } if (state==SDL_POWERSTATE_UNKNOWN || @@ -478,31 +478,31 @@ int platform_testGetPowerInfo(void *arg) AssertTrue( pct == -1, "SDL_GetPowerInfo(): no battery, pct == -1, was: %i", - pct); + pct); } - // Partial return value variations + // Partial return value variations stateAgain = SDL_GetPowerInfo(&secsAgain, NULL); AssertTrue( state==stateAgain, "State %i returned when only 'secs' requested", - stateAgain); + stateAgain); AssertTrue( secs==secsAgain, "Value %i matches when only 'secs' requested", - secsAgain); + secsAgain); stateAgain = SDL_GetPowerInfo(NULL, &pctAgain); AssertTrue( state==stateAgain, "State %i returned when only 'pct' requested", - stateAgain); + stateAgain); AssertTrue( pct==pctAgain, "Value %i matches when only 'pct' requested", - pctAgain); + pctAgain); stateAgain = SDL_GetPowerInfo(NULL, NULL); AssertTrue( state==stateAgain, "State %i returned when no value requested", - stateAgain); + stateAgain); } diff --git a/test/test-automation/tests/testrect/testrect.c b/test/test-automation/tests/testrect/testrect.c index 77df61aae..ea2ce6b40 100644 --- a/test/test-automation/tests/testrect/testrect.c +++ b/test/test-automation/tests/testrect/testrect.c @@ -11,98 +11,98 @@ /* SDL_IntersectRectAndLine */ static const TestCaseReference test1 = - (TestCaseReference){ "rect_testIntersectRectAndLine", "Tests SDL_IntersectRectAndLine clipping cases", TEST_ENABLED, 0, 0 }; + (TestCaseReference){ "rect_testIntersectRectAndLine", "Tests SDL_IntersectRectAndLine clipping cases", TEST_ENABLED, 0, 0 }; static const TestCaseReference test2 = - (TestCaseReference){ "rect_testIntersectRectAndLineInside", "Tests SDL_IntersectRectAndLine with line fully contained in rect", TEST_ENABLED, 0, 0 }; + (TestCaseReference){ "rect_testIntersectRectAndLineInside", "Tests SDL_IntersectRectAndLine with line fully contained in rect", TEST_ENABLED, 0, 0 }; static const TestCaseReference test3 = - (TestCaseReference){ "rect_testIntersectRectAndLineOutside", "Tests SDL_IntersectRectAndLine with line fully outside of rect", TEST_ENABLED, 0, 0 }; + (TestCaseReference){ "rect_testIntersectRectAndLineOutside", "Tests SDL_IntersectRectAndLine with line fully outside of rect", TEST_ENABLED, 0, 0 }; static const TestCaseReference test4 = - (TestCaseReference){ "rect_testIntersectRectAndLineEmpty", "Tests SDL_IntersectRectAndLine with empty rectangle ", TEST_ENABLED, 0, 0 }; + (TestCaseReference){ "rect_testIntersectRectAndLineEmpty", "Tests SDL_IntersectRectAndLine with empty rectangle ", TEST_ENABLED, 0, 0 }; static const TestCaseReference test5 = - (TestCaseReference){ "rect_testIntersectRectAndLineParam", "Negative tests against SDL_IntersectRectAndLine with invalid parameters", TEST_ENABLED, 0, 0 }; + (TestCaseReference){ "rect_testIntersectRectAndLineParam", "Negative tests against SDL_IntersectRectAndLine with invalid parameters", TEST_ENABLED, 0, 0 }; /* SDL_IntersectRect */ static const TestCaseReference test6 = - (TestCaseReference){ "rect_testIntersectRectInside", "Tests SDL_IntersectRect with B fully contained in A", TEST_ENABLED, 0, 0 }; + (TestCaseReference){ "rect_testIntersectRectInside", "Tests SDL_IntersectRect with B fully contained in A", TEST_ENABLED, 0, 0 }; static const TestCaseReference test7 = - (TestCaseReference){ "rect_testIntersectRectOutside", "Tests SDL_IntersectRect with B fully outside of A", TEST_ENABLED, 0, 0 }; + (TestCaseReference){ "rect_testIntersectRectOutside", "Tests SDL_IntersectRect with B fully outside of A", TEST_ENABLED, 0, 0 }; static const TestCaseReference test8 = - (TestCaseReference){ "rect_testIntersectRectPartial", "Tests SDL_IntersectRect with B partially intersecting A", TEST_ENABLED, 0, 0 }; + (TestCaseReference){ "rect_testIntersectRectPartial", "Tests SDL_IntersectRect with B partially intersecting A", TEST_ENABLED, 0, 0 }; static const TestCaseReference test9 = - (TestCaseReference){ "rect_testIntersectRectPoint", "Tests SDL_IntersectRect with 1x1 sized rectangles", TEST_ENABLED, 0, 0 }; + (TestCaseReference){ "rect_testIntersectRectPoint", "Tests SDL_IntersectRect with 1x1 sized rectangles", TEST_ENABLED, 0, 0 }; static const TestCaseReference test10 = - (TestCaseReference){ "rect_testIntersectRectEmpty", "Tests SDL_IntersectRect with empty rectangles", TEST_ENABLED, 0, 0 }; + (TestCaseReference){ "rect_testIntersectRectEmpty", "Tests SDL_IntersectRect with empty rectangles", TEST_ENABLED, 0, 0 }; static const TestCaseReference test11 = - (TestCaseReference){ "rect_testIntersectRectParam", "Negative tests against SDL_IntersectRect with invalid parameters", TEST_ENABLED, 0, 0 }; + (TestCaseReference){ "rect_testIntersectRectParam", "Negative tests against SDL_IntersectRect with invalid parameters", TEST_ENABLED, 0, 0 }; /* SDL_HasIntersection */ static const TestCaseReference test12 = - (TestCaseReference){ "rect_testHasIntersectionInside", "Tests SDL_HasIntersection with B fully contained in A", TEST_ENABLED, 0, 0 }; + (TestCaseReference){ "rect_testHasIntersectionInside", "Tests SDL_HasIntersection with B fully contained in A", TEST_ENABLED, 0, 0 }; static const TestCaseReference test13 = - (TestCaseReference){ "rect_testHasIntersectionOutside", "Tests SDL_HasIntersection with B fully outside of A", TEST_ENABLED, 0, 0 }; + (TestCaseReference){ "rect_testHasIntersectionOutside", "Tests SDL_HasIntersection with B fully outside of A", TEST_ENABLED, 0, 0 }; static const TestCaseReference test14 = - (TestCaseReference){ "rect_testHasIntersectionPartial", "Tests SDL_HasIntersection with B partially intersecting A", TEST_ENABLED, 0, 0 }; + (TestCaseReference){ "rect_testHasIntersectionPartial", "Tests SDL_HasIntersection with B partially intersecting A", TEST_ENABLED, 0, 0 }; static const TestCaseReference test15 = - (TestCaseReference){ "rect_testHasIntersectionPoint", "Tests SDL_HasIntersection with 1x1 sized rectangles", TEST_ENABLED, 0, 0 }; + (TestCaseReference){ "rect_testHasIntersectionPoint", "Tests SDL_HasIntersection with 1x1 sized rectangles", TEST_ENABLED, 0, 0 }; static const TestCaseReference test16 = - (TestCaseReference){ "rect_testHasIntersectionEmpty", "Tests SDL_HasIntersection with empty rectangles", TEST_ENABLED, 0, 0 }; + (TestCaseReference){ "rect_testHasIntersectionEmpty", "Tests SDL_HasIntersection with empty rectangles", TEST_ENABLED, 0, 0 }; static const TestCaseReference test17 = - (TestCaseReference){ "rect_testHasIntersectionParam", "Negative tests against SDL_HasIntersection with invalid parameters", TEST_ENABLED, 0, 0 }; + (TestCaseReference){ "rect_testHasIntersectionParam", "Negative tests against SDL_HasIntersection with invalid parameters", TEST_ENABLED, 0, 0 }; /* SDL_EnclosePoints */ static const TestCaseReference test18 = - (TestCaseReference){ "rect_testEnclosePoints", "Tests SDL_EnclosePoints without clipping", TEST_ENABLED, 0, 0 }; + (TestCaseReference){ "rect_testEnclosePoints", "Tests SDL_EnclosePoints without clipping", TEST_ENABLED, 0, 0 }; static const TestCaseReference test19 = - (TestCaseReference){ "rect_testEnclosePointsWithClipping", "Tests SDL_EnclosePoints with clipping", TEST_ENABLED, 0, 0 }; + (TestCaseReference){ "rect_testEnclosePointsWithClipping", "Tests SDL_EnclosePoints with clipping", TEST_ENABLED, 0, 0 }; static const TestCaseReference test20 = - (TestCaseReference){ "rect_testEnclosePointsRepeatedInput", "Tests SDL_EnclosePoints with repeated input", TEST_ENABLED, 0, 0 }; + (TestCaseReference){ "rect_testEnclosePointsRepeatedInput", "Tests SDL_EnclosePoints with repeated input", TEST_ENABLED, 0, 0 }; static const TestCaseReference test21 = - (TestCaseReference){ "rect_testEnclosePointsParam", "Negative tests against SDL_EnclosePoints with invalid parameters", TEST_ENABLED, 0, 0 }; + (TestCaseReference){ "rect_testEnclosePointsParam", "Negative tests against SDL_EnclosePoints with invalid parameters", TEST_ENABLED, 0, 0 }; /* SDL_UnionRect */ static const TestCaseReference test22 = - (TestCaseReference){ "rect_testUnionRectInside", "Tests SDL_UnionRect where rect B is inside rect A", TEST_ENABLED, 0, 0 }; + (TestCaseReference){ "rect_testUnionRectInside", "Tests SDL_UnionRect where rect B is inside rect A", TEST_ENABLED, 0, 0 }; static const TestCaseReference test23 = - (TestCaseReference){ "rect_testUnionRectOutside", "Tests SDL_UnionRect where rect B is outside rect A", TEST_ENABLED, 0, 0 }; + (TestCaseReference){ "rect_testUnionRectOutside", "Tests SDL_UnionRect where rect B is outside rect A", TEST_ENABLED, 0, 0 }; static const TestCaseReference test24 = - (TestCaseReference){ "rect_testUnionRectEmpty", "Tests SDL_UnionRect where rect A or rect B are empty", TEST_ENABLED, 0, 0 }; + (TestCaseReference){ "rect_testUnionRectEmpty", "Tests SDL_UnionRect where rect A or rect B are empty", TEST_ENABLED, 0, 0 }; static const TestCaseReference test25 = - (TestCaseReference){ "rect_testUnionRectParam", "Negative tests against SDL_UnionRect with invalid parameters", TEST_ENABLED, 0, 0 }; + (TestCaseReference){ "rect_testUnionRectParam", "Negative tests against SDL_UnionRect with invalid parameters", TEST_ENABLED, 0, 0 }; /* SDL_RectEmpty */ static const TestCaseReference test26 = - (TestCaseReference){ "rect_testRectEmpty", "Tests SDL_RectEmpty with various inputs", TEST_ENABLED, 0, 0 }; + (TestCaseReference){ "rect_testRectEmpty", "Tests SDL_RectEmpty with various inputs", TEST_ENABLED, 0, 0 }; static const TestCaseReference test27 = - (TestCaseReference){ "rect_testRectEmptyParam", "Negative tests against SDL_RectEmpty with invalid parameters", TEST_ENABLED, 0, 0 }; + (TestCaseReference){ "rect_testRectEmptyParam", "Negative tests against SDL_RectEmpty with invalid parameters", TEST_ENABLED, 0, 0 }; /* SDL_RectEquals */ static const TestCaseReference test28 = - (TestCaseReference){ "rect_testRectEquals", "Tests SDL_RectEquals with various inputs", TEST_ENABLED, 0, 0 }; + (TestCaseReference){ "rect_testRectEquals", "Tests SDL_RectEquals with various inputs", TEST_ENABLED, 0, 0 }; static const TestCaseReference test29 = - (TestCaseReference){ "rect_testRectEqualsParam", "Negative tests against SDL_RectEquals with invalid parameters", TEST_ENABLED, 0, 0 }; + (TestCaseReference){ "rect_testRectEqualsParam", "Negative tests against SDL_RectEquals with invalid parameters", TEST_ENABLED, 0, 0 }; /*! @@ -112,13 +112,13 @@ static const TestCaseReference test29 = * http://wiki.libsdl.org/moin.cgi/CategoryRect */ extern const TestCaseReference *testSuite[] = { - &test1, &test2, &test3, &test4, &test5, &test6, &test7, &test8, &test9, &test10, &test11, &test12, &test13, &test14, - &test15, &test16, &test17, &test18, &test19, &test20, &test21, &test22, &test23, &test24, &test25, &test26, &test27, - &test28, &test29, NULL + &test1, &test2, &test3, &test4, &test5, &test6, &test7, &test8, &test9, &test10, &test11, &test12, &test13, &test14, + &test15, &test16, &test17, &test18, &test19, &test20, &test21, &test22, &test23, &test24, &test25, &test26, &test27, + &test28, &test29, NULL }; TestCaseReference **QueryTestSuite() { - return (TestCaseReference **)testSuite; + return (TestCaseReference **)testSuite; } /*! @@ -130,7 +130,7 @@ void _validateIntersectRectAndLineResults( int x1, int y1, int x2, int y2, int x1Ref, int y1Ref, int x2Ref, int y2Ref) { - AssertTrue(intersection == expectedIntersection, + AssertTrue(intersection == expectedIntersection, "Incorrect intersection result: expected %s, got %s intersecting rect (%d,%d,%d,%d) with line (%d,%d - %d,%d)\n", (expectedIntersection == SDL_TRUE) ? "true" : "false", (intersection == SDL_TRUE) ? "true" : "false", @@ -344,7 +344,7 @@ int rect_testIntersectRectAndLineEmpty (void *arg) int x1, y1, x1Ref, y1Ref; int x2, y2, x2Ref, y2Ref; SDL_bool intersected; - + refRect.x = RandomIntegerInRange(1, 1024); refRect.y = RandomIntegerInRange(1, 1024); refRect.w = 0; @@ -377,10 +377,10 @@ int rect_testIntersectRectAndLineParam (void *arg) int x2 = x1; int y2 = 2 * rect.h; SDL_bool intersected; - + intersected = SDL_IntersectRectAndLine(&rect, &x1, &y1, &x2, &y2); AssertTrue(intersected == SDL_TRUE, "Test variables not intersected as expected"); - + intersected = SDL_IntersectRectAndLine((SDL_Rect *)NULL, &x1, &y1, &x2, &y2); AssertTrue(intersected == SDL_FALSE, "Incorrect intersected result when 1st parameter is NULL"); intersected = SDL_IntersectRectAndLine(&rect, (int *)NULL, &y1, &x2, &y2); @@ -399,14 +399,14 @@ int rect_testIntersectRectAndLineParam (void *arg) * \brief Private helper to check SDL_HasIntersection results */ void _validateHasIntersectionResults( - SDL_bool intersection, SDL_bool expectedIntersection, + SDL_bool intersection, SDL_bool expectedIntersection, SDL_Rect *rectA, SDL_Rect *rectB, SDL_Rect *refRectA, SDL_Rect *refRectB) { - AssertTrue(intersection == expectedIntersection, + AssertTrue(intersection == expectedIntersection, "Incorrect intersection result: expected %s, got %s intersecting A (%d,%d,%d,%d) with B (%d,%d,%d,%d)\n", (expectedIntersection == SDL_TRUE) ? "true" : "false", (intersection == SDL_TRUE) ? "true" : "false", - rectA->x, rectA->y, rectA->w, rectA->h, + rectA->x, rectA->y, rectA->w, rectA->h, rectB->x, rectB->y, rectB->w, rectB->h); AssertTrue(rectA->x == refRectA->x && rectA->y == refRectA->y && rectA->w == refRectA->w && rectA->h == refRectA->h, "Source rectangle A was modified: got (%d,%d,%d,%d) expected (%d,%d,%d,%d)", @@ -422,15 +422,15 @@ void _validateHasIntersectionResults( * \brief Private helper to check SDL_IntersectRect results */ void _validateIntersectRectResults( - SDL_bool intersection, SDL_bool expectedIntersection, - SDL_Rect *rectA, SDL_Rect *rectB, SDL_Rect *refRectA, SDL_Rect *refRectB, + SDL_bool intersection, SDL_bool expectedIntersection, + SDL_Rect *rectA, SDL_Rect *rectB, SDL_Rect *refRectA, SDL_Rect *refRectB, SDL_Rect *result, SDL_Rect *expectedResult) { _validateHasIntersectionResults(intersection, expectedIntersection, rectA, rectB, refRectA, refRectB); if (result && expectedResult) { AssertTrue(result->x == expectedResult->x && result->y == expectedResult->y && result->w == expectedResult->w && result->h == expectedResult->h, "Intersection of rectangles A (%d,%d,%d,%d) and B (%d,%d,%d,%d) was incorrectly calculated, got (%d,%d,%d,%d) expected (%d,%d,%d,%d)", - rectA->x, rectA->y, rectA->w, rectA->h, + rectA->x, rectA->y, rectA->w, rectA->h, rectB->x, rectB->y, rectB->w, rectB->h, result->x, result->y, result->w, result->h, expectedResult->x, expectedResult->y, expectedResult->w, expectedResult->h); @@ -441,7 +441,7 @@ void _validateIntersectRectResults( * \brief Private helper to check SDL_UnionRect results */ void _validateUnionRectResults( - SDL_Rect *rectA, SDL_Rect *rectB, SDL_Rect *refRectA, SDL_Rect *refRectB, + SDL_Rect *rectA, SDL_Rect *rectB, SDL_Rect *refRectA, SDL_Rect *refRectB, SDL_Rect *result, SDL_Rect *expectedResult) { AssertTrue(rectA->x == refRectA->x && rectA->y == refRectA->y && rectA->w == refRectA->w && rectA->h == refRectA->h, @@ -454,7 +454,7 @@ void _validateUnionRectResults( refRectB->x, refRectB->y, refRectB->w, refRectB->h); AssertTrue(result->x == expectedResult->x && result->y == expectedResult->y && result->w == expectedResult->w && result->h == expectedResult->h, "Union of rectangles A (%d,%d,%d,%d) and B (%d,%d,%d,%d) was incorrectly calculated, got (%d,%d,%d,%d) expected (%d,%d,%d,%d)", - rectA->x, rectA->y, rectA->w, rectA->h, + rectA->x, rectA->y, rectA->w, rectA->h, rectB->x, rectB->y, rectB->w, rectB->h, result->x, result->y, result->w, result->h, expectedResult->x, expectedResult->y, expectedResult->w, expectedResult->h); @@ -464,10 +464,10 @@ void _validateUnionRectResults( * \brief Private helper to check SDL_RectEmpty results */ void _validateRectEmptyResults( - SDL_bool empty, SDL_bool expectedEmpty, + SDL_bool empty, SDL_bool expectedEmpty, SDL_Rect *rect, SDL_Rect *refRect) { - AssertTrue(empty == expectedEmpty, + AssertTrue(empty == expectedEmpty, "Incorrect empty result: expected %s, got %s testing (%d,%d,%d,%d)\n", (expectedEmpty == SDL_TRUE) ? "true" : "false", (empty == SDL_TRUE) ? "true" : "false", @@ -482,10 +482,10 @@ void _validateRectEmptyResults( * \brief Private helper to check SDL_RectEquals results */ void _validateRectEqualsResults( - SDL_bool equals, SDL_bool expectedEquals, + SDL_bool equals, SDL_bool expectedEquals, SDL_Rect *rectA, SDL_Rect *rectB, SDL_Rect *refRectA, SDL_Rect *refRectB) { - AssertTrue(equals == expectedEquals, + AssertTrue(equals == expectedEquals, "Incorrect equals result: expected %s, got %s testing (%d,%d,%d,%d) and (%d,%d,%d,%d) \n", (expectedEquals == SDL_TRUE) ? "true" : "false", (equals == SDL_TRUE) ? "true" : "false", @@ -550,7 +550,7 @@ int rect_testIntersectRectOutside (void *arg) rectA = refRectA; rectB = refRectB; intersection = SDL_IntersectRect(&rectA, &rectB, &result); - _validateIntersectRectResults(intersection, SDL_FALSE, &rectA, &rectB, &refRectA, &refRectB, (SDL_Rect *)NULL, (SDL_Rect *)NULL); + _validateIntersectRectResults(intersection, SDL_FALSE, &rectA, &rectB, &refRectA, &refRectB, (SDL_Rect *)NULL, (SDL_Rect *)NULL); } /*! @@ -579,7 +579,7 @@ int rect_testIntersectRectPartial (void *arg) expectedResult.x = refRectB.x; expectedResult.y = refRectB.y; expectedResult.w = refRectA.w - refRectB.x; - expectedResult.h = refRectA.h - refRectB.y; + expectedResult.h = refRectA.h - refRectB.y; intersection = SDL_IntersectRect(&rectA, &rectB, &result); _validateIntersectRectResults(intersection, SDL_TRUE, &rectA, &rectB, &refRectA, &refRectB, &result, &expectedResult); @@ -593,7 +593,7 @@ int rect_testIntersectRectPartial (void *arg) expectedResult.x = refRectB.x; expectedResult.y = refRectB.y; expectedResult.w = 1; - expectedResult.h = refRectB.h; + expectedResult.h = refRectB.h; intersection = SDL_IntersectRect(&rectA, &rectB, &result); _validateIntersectRectResults(intersection, SDL_TRUE, &rectA, &rectB, &refRectA, &refRectB, &result, &expectedResult); @@ -607,7 +607,7 @@ int rect_testIntersectRectPartial (void *arg) expectedResult.x = 0; expectedResult.y = refRectB.y; expectedResult.w = 1; - expectedResult.h = refRectB.h; + expectedResult.h = refRectB.h; intersection = SDL_IntersectRect(&rectA, &rectB, &result); _validateIntersectRectResults(intersection, SDL_TRUE, &rectA, &rectB, &refRectA, &refRectB, &result, &expectedResult); @@ -621,7 +621,7 @@ int rect_testIntersectRectPartial (void *arg) expectedResult.x = refRectB.x; expectedResult.y = refRectB.y; expectedResult.w = refRectB.w; - expectedResult.h = 1; + expectedResult.h = 1; intersection = SDL_IntersectRect(&rectA, &rectB, &result); _validateIntersectRectResults(intersection, SDL_TRUE, &rectA, &rectB, &refRectA, &refRectB, &result, &expectedResult); @@ -635,7 +635,7 @@ int rect_testIntersectRectPartial (void *arg) expectedResult.x = refRectB.x; expectedResult.y = 0; expectedResult.w = refRectB.w; - expectedResult.h = 1; + expectedResult.h = 1; intersection = SDL_IntersectRect(&rectA, &rectB, &result); _validateIntersectRectResults(intersection, SDL_TRUE, &rectA, &rectB, &refRectA, &refRectB, &result, &expectedResult); } @@ -673,7 +673,7 @@ int rect_testIntersectRectPoint (void *arg) refRectA.x = RandomIntegerInRange(1, 100); refRectA.y = RandomIntegerInRange(1, 100); refRectB.x = refRectA.x; - refRectB.y = refRectA.y; + refRectB.y = refRectA.y; refRectB.x += offsetX; refRectB.y += offsetY; rectA = refRectA; @@ -757,17 +757,17 @@ int rect_testIntersectRectParam(void *arg) // invalid parameter combinations intersection = SDL_IntersectRect((SDL_Rect *)NULL, &rectB, &result); - AssertTrue(intersection == SDL_FALSE, "Function did not return false when 1st parameter was NULL"); + AssertTrue(intersection == SDL_FALSE, "Function did not return false when 1st parameter was NULL"); intersection = SDL_IntersectRect(&rectA, (SDL_Rect *)NULL, &result); - AssertTrue(intersection == SDL_FALSE, "Function did not return false when 2st parameter was NULL"); + AssertTrue(intersection == SDL_FALSE, "Function did not return false when 2st parameter was NULL"); intersection = SDL_IntersectRect(&rectA, &rectB, (SDL_Rect *)NULL); - AssertTrue(intersection == SDL_FALSE, "Function did not return false when 3st parameter was NULL"); + AssertTrue(intersection == SDL_FALSE, "Function did not return false when 3st parameter was NULL"); intersection = SDL_IntersectRect((SDL_Rect *)NULL, (SDL_Rect *)NULL, &result); - AssertTrue(intersection == SDL_FALSE, "Function did not return false when 1st and 2nd parameters were NULL"); + AssertTrue(intersection == SDL_FALSE, "Function did not return false when 1st and 2nd parameters were NULL"); intersection = SDL_IntersectRect((SDL_Rect *)NULL, &rectB, (SDL_Rect *)NULL); - AssertTrue(intersection == SDL_FALSE, "Function did not return false when 1st and 3rd parameters were NULL "); + AssertTrue(intersection == SDL_FALSE, "Function did not return false when 1st and 3rd parameters were NULL "); intersection = SDL_IntersectRect((SDL_Rect *)NULL, (SDL_Rect *)NULL, (SDL_Rect *)NULL); - AssertTrue(intersection == SDL_FALSE, "Function did not return false when all parameters were NULL"); + AssertTrue(intersection == SDL_FALSE, "Function did not return false when all parameters were NULL"); } /*! @@ -918,7 +918,7 @@ int rect_testHasIntersectionPoint (void *arg) refRectA.x = RandomIntegerInRange(1, 100); refRectA.y = RandomIntegerInRange(1, 100); refRectB.x = refRectA.x; - refRectB.y = refRectA.y; + refRectB.y = refRectA.y; refRectB.x += offsetX; refRectB.y += offsetY; rectA = refRectA; @@ -1000,11 +1000,11 @@ int rect_testHasIntersectionParam(void *arg) // invalid parameter combinations intersection = SDL_HasIntersection((SDL_Rect *)NULL, &rectB); - AssertTrue(intersection == SDL_FALSE, "Function did not return false when 1st parameter was NULL"); + AssertTrue(intersection == SDL_FALSE, "Function did not return false when 1st parameter was NULL"); intersection = SDL_HasIntersection(&rectA, (SDL_Rect *)NULL); - AssertTrue(intersection == SDL_FALSE, "Function did not return false when 2st parameter was NULL"); + AssertTrue(intersection == SDL_FALSE, "Function did not return false when 2st parameter was NULL"); intersection = SDL_HasIntersection((SDL_Rect *)NULL, (SDL_Rect *)NULL); - AssertTrue(intersection == SDL_FALSE, "Function did not return false when all parameters were NULL"); + AssertTrue(intersection == SDL_FALSE, "Function did not return false when all parameters were NULL"); } /*! @@ -1045,26 +1045,26 @@ int rect_testEnclosePoints(void *arg) if (newy>maxy) maxy=newy; } } - + // Call function and validate - special case: no result requested anyEnclosedNoResult = SDL_EnclosePoints((const SDL_Point *)points, numPoints, (const SDL_Rect *)NULL, (SDL_Rect *)NULL); - AssertTrue(expectedEnclosed==anyEnclosedNoResult, - "Expected return value %s, got %s", + AssertTrue(expectedEnclosed==anyEnclosedNoResult, + "Expected return value %s, got %s", (expectedEnclosed==SDL_TRUE) ? "true" : "false", (anyEnclosedNoResult==SDL_TRUE) ? "true" : "false"); for (i=0; irefRectB.x) ? refRectA.x : refRectB.x; miny = (refRectA.yrefRectB.y) ? refRectA.y : refRectB.y; + maxy = (refRectA.y>refRectB.y) ? refRectA.y : refRectB.y; expectedResult.x = minx; expectedResult.y = miny; expectedResult.w = maxx - minx + 1; @@ -1307,7 +1307,7 @@ int rect_testUnionRectOutside(void *arg) } /* Union outside overlap */ - for (dx = -1; dx < 2; dx++) { + for (dx = -1; dx < 2; dx++) { for (dy = -1; dy < 2; dy++) { if ((dx != 0) || (dy != 0)) { refRectA.x=RandomIntegerInRange(-1024, 1024); @@ -1345,7 +1345,7 @@ int rect_testUnionRectEmpty(void *arg) SDL_Rect expectedResult; SDL_Rect result; - /* A empty */ + /* A empty */ refRectA.x=RandomIntegerInRange(-1024, 1024); refRectA.y=RandomIntegerInRange(-1024, 1024); refRectA.w=0; @@ -1359,8 +1359,8 @@ int rect_testUnionRectEmpty(void *arg) rectB = refRectB; SDL_UnionRect(&rectA, &rectB, &result); _validateUnionRectResults(&rectA, &rectB, &refRectA, &refRectB, &result, &expectedResult); - - /* B empty */ + + /* B empty */ refRectA.x=RandomIntegerInRange(-1024, 1024); refRectA.y=RandomIntegerInRange(-1024, 1024); refRectA.w=RandomIntegerInRange(1, 1024); @@ -1375,7 +1375,7 @@ int rect_testUnionRectEmpty(void *arg) SDL_UnionRect(&rectA, &rectB, &result); _validateUnionRectResults(&rectA, &rectB, &refRectA, &refRectB, &result, &expectedResult); - /* A and B empty */ + /* A and B empty */ refRectA.x=RandomIntegerInRange(-1024, 1024); refRectA.y=RandomIntegerInRange(-1024, 1024); refRectA.w=0; @@ -1409,7 +1409,7 @@ int rect_testUnionRectInside(void *arg) SDL_Rect result; int minx, maxx, miny, maxy; int dx, dy; - + /* Union 1x1 with itself */ refRectA.x=RandomIntegerInRange(-1024, 1024); refRectA.y=RandomIntegerInRange(-1024, 1024); @@ -1436,7 +1436,7 @@ int rect_testUnionRectInside(void *arg) _validateUnionRectResults(&rectA, &rectB, &refRectA, &refRectB, &result, &expectedResult); /* Union inside with edges modified */ - for (dx = -1; dx < 2; dx++) { + for (dx = -1; dx < 2; dx++) { for (dy = -1; dy < 2; dy++) { if ((dx != 0) || (dy != 0)) { refRectA.x=RandomIntegerInRange(-1024, 1024); @@ -1447,7 +1447,7 @@ int rect_testUnionRectInside(void *arg) if (dx == -1) refRectB.x++; if ((dx == 1) || (dx == -1)) refRectB.w--; if (dy == -1) refRectB.y++; - if ((dy == 1) || (dy == -1)) refRectB.h--; + if ((dy == 1) || (dy == -1)) refRectB.h--; expectedResult = refRectA; rectA = refRectA; rectB = refRectB; @@ -1471,17 +1471,17 @@ int rect_testUnionRectParam(void *arg) // invalid parameter combinations SDL_UnionRect((SDL_Rect *)NULL, &rectB, &result); - AssertPass("Function did return when 1st parameter was NULL"); + AssertPass("Function did return when 1st parameter was NULL"); SDL_UnionRect(&rectA, (SDL_Rect *)NULL, &result); - AssertPass("Function did return when 2nd parameter was NULL"); + AssertPass("Function did return when 2nd parameter was NULL"); SDL_UnionRect(&rectA, &rectB, (SDL_Rect *)NULL); - AssertPass("Function did return when 3rd parameter was NULL"); + AssertPass("Function did return when 3rd parameter was NULL"); SDL_UnionRect((SDL_Rect *)NULL, &rectB, (SDL_Rect *)NULL); - AssertPass("Function did return when 1st and 3rd parameter were NULL"); + AssertPass("Function did return when 1st and 3rd parameter were NULL"); SDL_UnionRect(&rectA, (SDL_Rect *)NULL, (SDL_Rect *)NULL); - AssertPass("Function did return when 2nd and 3rd parameter were NULL"); + AssertPass("Function did return when 2nd and 3rd parameter were NULL"); SDL_UnionRect((SDL_Rect *)NULL, (SDL_Rect *)NULL, (SDL_Rect *)NULL); - AssertPass("Function did return when all parameters were NULL"); + AssertPass("Function did return when all parameters were NULL"); } /*! @@ -1507,7 +1507,7 @@ int rect_testRectEmpty(void *arg) rect = refRect; result = SDL_RectEmpty((const SDL_Rect *)&rect); _validateRectEmptyResults(result, expectedResult, &rect, &refRect); - + // Empty case for (w=-1; w<2; w++) { for (h=-1; h<2; h++) { @@ -1537,7 +1537,7 @@ int rect_testRectEmptyParam(void *arg) // invalid parameter combinations result = SDL_RectEmpty((const SDL_Rect *)NULL); - AssertTrue(result == SDL_TRUE, "Function did not return TRUE when 1st parameter was NULL"); + AssertTrue(result == SDL_TRUE, "Function did not return TRUE when 1st parameter was NULL"); } /*! @@ -1560,7 +1560,7 @@ int rect_testRectEquals(void *arg) refRectA.y=RandomIntegerInRange(-1024, 1024); refRectA.w=RandomIntegerInRange(1, 1024); refRectA.h=RandomIntegerInRange(1, 1024); - refRectB = refRectA; + refRectB = refRectA; expectedResult = SDL_TRUE; rectA = refRectA; rectB = refRectB; @@ -1592,9 +1592,9 @@ int rect_testRectEqualsParam(void *arg) // invalid parameter combinations result = SDL_RectEquals((const SDL_Rect *)NULL, (const SDL_Rect *)&rectB); - AssertTrue(result == SDL_FALSE, "Function did not return FALSE when 1st parameter was NULL"); + AssertTrue(result == SDL_FALSE, "Function did not return FALSE when 1st parameter was NULL"); result = SDL_RectEquals((const SDL_Rect *)&rectA, (const SDL_Rect *)NULL); - AssertTrue(result == SDL_FALSE, "Function did not return FALSE when 2nd parameter was NULL"); + AssertTrue(result == SDL_FALSE, "Function did not return FALSE when 2nd parameter was NULL"); result = SDL_RectEquals((const SDL_Rect *)NULL, (const SDL_Rect *)NULL); - AssertTrue(result == SDL_FALSE, "Function did not return FALSE when 1st and 2nd parameter were NULL"); + AssertTrue(result == SDL_FALSE, "Function did not return FALSE when 1st and 2nd parameter were NULL"); } diff --git a/test/test-automation/tests/testrender/testrender.c b/test/test-automation/tests/testrender/testrender.c index bea2040d5..f95469f8c 100644 --- a/test/test-automation/tests/testrender/testrender.c +++ b/test/test-automation/tests/testrender/testrender.c @@ -30,38 +30,38 @@ static int _isSupported(int code); /* Test cases */ static const TestCaseReference test1 = - (TestCaseReference){ "render_testGetNumRenderDrivers", "Tests call to SDL_GetNumRenderDrivers", TEST_ENABLED, 0, 0 }; + (TestCaseReference){ "render_testGetNumRenderDrivers", "Tests call to SDL_GetNumRenderDrivers", TEST_ENABLED, 0, 0 }; static const TestCaseReference test2 = - (TestCaseReference){ "render_testCreateRenderer", "Tests SDL_CreateRenderer", TEST_ENABLED, 0, 0 }; + (TestCaseReference){ "render_testCreateRenderer", "Tests SDL_CreateRenderer", TEST_ENABLED, 0, 0 }; static const TestCaseReference test3 = - (TestCaseReference){ "render_testPrimitives", "Tests rendering primitives", TEST_ENABLED, 0, 0 }; + (TestCaseReference){ "render_testPrimitives", "Tests rendering primitives", TEST_ENABLED, 0, 0 }; static const TestCaseReference test4 = - (TestCaseReference){ "render_testPrimitivesBlend", "Tests rendering primitives with blending", TEST_ENABLED, 0, 0 }; + (TestCaseReference){ "render_testPrimitivesBlend", "Tests rendering primitives with blending", TEST_ENABLED, 0, 0 }; static const TestCaseReference test5 = - (TestCaseReference){ "render_testBlit", "Tests blitting", TEST_ENABLED, 0, 0 }; + (TestCaseReference){ "render_testBlit", "Tests blitting", TEST_ENABLED, 0, 0 }; static const TestCaseReference test6 = - (TestCaseReference){ "render_testBlitColour", "Tests blitting with color", TEST_ENABLED, 0, 0 }; + (TestCaseReference){ "render_testBlitColour", "Tests blitting with color", TEST_ENABLED, 0, 0 }; static const TestCaseReference test7 = - (TestCaseReference){ "render_testBlitAlpha", "Tests blitting with alpha", TEST_ENABLED, 0, 0 }; + (TestCaseReference){ "render_testBlitAlpha", "Tests blitting with alpha", TEST_ENABLED, 0, 0 }; static const TestCaseReference test8 = - (TestCaseReference){ "render_testBlitBlend", "Tests blitting with blending", TEST_ENABLED, 0, 0 }; + (TestCaseReference){ "render_testBlitBlend", "Tests blitting with blending", TEST_ENABLED, 0, 0 }; /* Test suite */ extern const TestCaseReference *testSuite[] = { - &test1, &test2, &test3, &test4, &test5, &test6, &test7, &test8, NULL + &test1, &test2, &test3, &test4, &test5, &test6, &test7, &test8, NULL }; TestCaseReference **QueryTestSuite() { - return (TestCaseReference **)testSuite; + return (TestCaseReference **)testSuite; } // Fixture @@ -74,10 +74,10 @@ SetUp(void *arg) AssertTrue(ret==0, "SDL_Init(SDL_INIT_VIDEO): %s", SDL_GetError()); SDL_Window *w = SDL_CreateWindow( "title", SDL_WINDOWPOS_CENTERED, SDL_WINDOWPOS_CENTERED, - 80, 60, SDL_WINDOW_SHOWN ); + 80, 60, SDL_WINDOW_SHOWN ); renderer = SDL_CreateRenderer(w, 0, 0); } - + void TearDown(void *arg) { @@ -88,7 +88,7 @@ TearDown(void *arg) /** * @brief Tests call to SDL_GetNumRenderDrivers * - * \sa + * \sa * http://wiki.libsdl.org/moin.cgi/SDL_GetNumRenderDrivers */ int @@ -118,7 +118,7 @@ render_testCreateRenderer(void *arg) if (window != NULL) { AssertPass("Window created"); renderer = SDL_CreateRenderer(window, -1, SDL_RENDERER_SOFTWARE); - if (renderer) { + if (renderer) { AssertPass("Renderer created"); SDL_DestroyRenderer(renderer); } else { @@ -127,7 +127,7 @@ render_testCreateRenderer(void *arg) SDL_DestroyWindow(window); } else { AssertFail("Could not create window: %s", SDL_GetError()); - } + } } diff --git a/test/test-automation/tests/testrwops/testrwops.c b/test/test-automation/tests/testrwops/testrwops.c index 8e0c4bcd8..6bc336d31 100644 --- a/test/test-automation/tests/testrwops/testrwops.c +++ b/test/test-automation/tests/testrwops/testrwops.c @@ -22,35 +22,35 @@ static const char const_mem[] = "Hello World!"; /* Test cases */ static const TestCaseReference test1 = - (TestCaseReference){ "rwops_testParam", " Negative test for SDL_RWFromFile parameters", TEST_ENABLED, 0, 60 }; + (TestCaseReference){ "rwops_testParam", " Negative test for SDL_RWFromFile parameters", TEST_ENABLED, 0, 60 }; static const TestCaseReference test2 = - (TestCaseReference){ "rwops_testMem", "Tests opening from memory", TEST_ENABLED, 0, 60 }; + (TestCaseReference){ "rwops_testMem", "Tests opening from memory", TEST_ENABLED, 0, 60 }; static const TestCaseReference test3 = - (TestCaseReference){ "rwops_testConstMem", "Tests opening from (const) memory", TEST_ENABLED, 0, 60 }; + (TestCaseReference){ "rwops_testConstMem", "Tests opening from (const) memory", TEST_ENABLED, 0, 60 }; static const TestCaseReference test4 = - (TestCaseReference){ "rwops_testFileRead", "Tests reading from a file", TEST_ENABLED, 0, 60 }; + (TestCaseReference){ "rwops_testFileRead", "Tests reading from a file", TEST_ENABLED, 0, 60 }; static const TestCaseReference test5 = - (TestCaseReference){ "rwops_testFileWrite", "Test writing to a file", TEST_ENABLED, 0, 60 }; + (TestCaseReference){ "rwops_testFileWrite", "Test writing to a file", TEST_ENABLED, 0, 60 }; static const TestCaseReference test6 = - (TestCaseReference){ "rwops_testFPRead", "Test reading from stdio", TEST_ENABLED, TEST_REQUIRES_STDIO, 60 }; + (TestCaseReference){ "rwops_testFPRead", "Test reading from stdio", TEST_ENABLED, TEST_REQUIRES_STDIO, 60 }; static const TestCaseReference test7 = - (TestCaseReference){ "rwops_testFPWrite", "Test writing to stdio", TEST_ENABLED, TEST_REQUIRES_STDIO, 60 }; + (TestCaseReference){ "rwops_testFPWrite", "Test writing to stdio", TEST_ENABLED, TEST_REQUIRES_STDIO, 60 }; /* Test suite */ extern const TestCaseReference *testSuite[] = { - &test1, &test2, &test3, &test4, &test5, &test6, &test7, NULL + &test1, &test2, &test3, &test4, &test5, &test6, &test7, NULL }; TestCaseReference **QueryTestSuite() { - return (TestCaseReference **)testSuite; + return (TestCaseReference **)testSuite; } @@ -58,19 +58,19 @@ TestCaseReference **QueryTestSuite() { void SetUp(void *arg) { - FILE *handle = fopen(RWOPS_READ, "w"); - AssertTrue(handle != NULL, "Creating file '%s' failed", RWOPS_READ); + FILE *handle = fopen(RWOPS_READ, "w"); + AssertTrue(handle != NULL, "Creating file '%s' failed", RWOPS_READ); - fwrite(hello_world, 1, SDL_strlen(hello_world), handle); - fclose(handle); + fwrite(hello_world, 1, SDL_strlen(hello_world), handle); + fclose(handle); } void TearDown(void *arg) { - // Remove the created files - remove(RWOPS_READ); - remove(RWOPS_WRITE); + // Remove the created files + remove(RWOPS_READ); + remove(RWOPS_WRITE); } /** @@ -93,10 +93,10 @@ int _testGeneric( SDL_RWops *rw, int write ) i = SDL_RWwrite( rw, hello_world, sizeof(hello_world)-1, 1); if (write) { - AssertEquals(i, 1, "Writing with SDL_RWwrite (failed to write)"); + AssertEquals(i, 1, "Writing with SDL_RWwrite (failed to write)"); } else { - AssertTrue(i <= 0, "Writing with SDL_RWwrite (wrote when shouldn't have): %d <= 0", i); + AssertTrue(i <= 0, "Writing with SDL_RWwrite (wrote when shouldn't have): %d <= 0", i); } /* Test seek. */ diff --git a/test/test-automation/tests/testsurface/testsurface.c b/test/test-automation/tests/testsurface/testsurface.c index 43b775cfb..dda9b1c10 100644 --- a/test/test-automation/tests/testsurface/testsurface.c +++ b/test/test-automation/tests/testsurface/testsurface.c @@ -11,47 +11,47 @@ /* Test case references */ static const TestCaseReference test1 = - (TestCaseReference){ "surface_testLoad", "Tests sprite loading.", TEST_ENABLED, 0, 0}; + (TestCaseReference){ "surface_testLoad", "Tests sprite loading.", TEST_ENABLED, 0, 0}; static const TestCaseReference test2 = - (TestCaseReference){ "surface_testBlit", "Tests some blitting routines.", TEST_ENABLED, 0, 0}; + (TestCaseReference){ "surface_testBlit", "Tests some blitting routines.", TEST_ENABLED, 0, 0}; static const TestCaseReference test3 = - (TestCaseReference){ "surface_testBlitBlendNone", "Tests blitting routines with none blending.", TEST_ENABLED, 0, 0}; + (TestCaseReference){ "surface_testBlitBlendNone", "Tests blitting routines with none blending.", TEST_ENABLED, 0, 0}; static const TestCaseReference test4 = - (TestCaseReference){ "surface_testLoadFailure", "Tests sprite loading. A failure case.", TEST_ENABLED, 0, 0}; + (TestCaseReference){ "surface_testLoadFailure", "Tests sprite loading. A failure case.", TEST_ENABLED, 0, 0}; static const TestCaseReference test5 = - (TestCaseReference){ "surface_testConversion", "Tests sprite conversion.", TEST_ENABLED, 0, 0}; + (TestCaseReference){ "surface_testConversion", "Tests sprite conversion.", TEST_ENABLED, 0, 0}; static const TestCaseReference test6 = - (TestCaseReference){ "surface_testBlitColorMod", "Tests some blitting routines with color mod.", TEST_ENABLED, 0, 0}; + (TestCaseReference){ "surface_testBlitColorMod", "Tests some blitting routines with color mod.", TEST_ENABLED, 0, 0}; static const TestCaseReference test7 = - (TestCaseReference){ "surface_testBlitAlphaMod", "Tests some blitting routines with alpha mod.", TEST_ENABLED, 0, 0}; + (TestCaseReference){ "surface_testBlitAlphaMod", "Tests some blitting routines with alpha mod.", TEST_ENABLED, 0, 0}; static const TestCaseReference test8 = - (TestCaseReference){ "surface_testBlitBlendLoop", "Test blittin routines with blending", TEST_ENABLED, 0, 0}; + (TestCaseReference){ "surface_testBlitBlendLoop", "Test blittin routines with blending", TEST_ENABLED, 0, 0}; static const TestCaseReference test9 = - (TestCaseReference){ "surface_testBlitBlendBlend", "Tests blitting routines with blend blending.", TEST_ENABLED, 0, 0}; + (TestCaseReference){ "surface_testBlitBlendBlend", "Tests blitting routines with blend blending.", TEST_ENABLED, 0, 0}; static const TestCaseReference test10 = - (TestCaseReference){ "surface_testBlitBlendAdd", "Tests blitting routines with add blending.", TEST_ENABLED, 0, 0}; + (TestCaseReference){ "surface_testBlitBlendAdd", "Tests blitting routines with add blending.", TEST_ENABLED, 0, 0}; static const TestCaseReference test11 = - (TestCaseReference){ "surface_testBlitBlendMod", "Tests blitting routines with modblending.", TEST_ENABLED, 0, 0}; + (TestCaseReference){ "surface_testBlitBlendMod", "Tests blitting routines with modblending.", TEST_ENABLED, 0, 0}; /* Test suite */ extern const TestCaseReference *testSuite[] = { - &test1, &test2, &test3, &test4, &test5, - &test6, &test7, &test8, &test9, &test10, &test11, NULL + &test1, &test2, &test3, &test4, &test5, + &test6, &test7, &test8, &test9, &test10, &test11, NULL }; TestCaseReference **QueryTestSuite() { - return (TestCaseReference **)testSuite; + return (TestCaseReference **)testSuite; } /* Function prototypes */ @@ -66,19 +66,19 @@ static SDL_Surface *testsur = NULL; void SetUp(void *arg) { - int ret = SDL_Init(SDL_INIT_VIDEO); - AssertTrue(ret == 0, "SDL_Init(SDL_INIT_VIDEO)"); + int ret = SDL_Init(SDL_INIT_VIDEO); + AssertTrue(ret == 0, "SDL_Init(SDL_INIT_VIDEO)"); - testsur = _CreateTestSurface(); - AssertTrue(testsur != NULL, "SDL_Init(SDL_INIT_VIDEO)"); + testsur = _CreateTestSurface(); + AssertTrue(testsur != NULL, "SDL_Init(SDL_INIT_VIDEO)"); } void TearDown(void *arg) { - SDL_FreeSurface( testsur ); + SDL_FreeSurface( testsur ); - SDL_Quit(); + SDL_Quit(); } /* Helper functions for the test cases */ @@ -93,24 +93,24 @@ TearDown(void *arg) SDL_Surface * _CreateTestSurface() { - SDL_Surface *testsur = NULL; + SDL_Surface *testsur = NULL; - /* Create the test surface. */ - testsur = SDL_CreateRGBSurface( 0, - TEST_SURFACE_WIDTH, TEST_SURFACE_HEIGHT, 32, - RMASK, GMASK, BMASK, AMASK ); + /* Create the test surface. */ + testsur = SDL_CreateRGBSurface( 0, + TEST_SURFACE_WIDTH, TEST_SURFACE_HEIGHT, 32, + RMASK, GMASK, BMASK, AMASK ); - if(testsur->w != TEST_SURFACE_WIDTH) { - AssertFail("Test surface width doesn't match"); - } + if(testsur->w != TEST_SURFACE_WIDTH) { + AssertFail("Test surface width doesn't match"); + } - if(testsur->h != TEST_SURFACE_HEIGHT) { - AssertFail("Test surface height doesn't match"); - } + if(testsur->h != TEST_SURFACE_HEIGHT) { + AssertFail("Test surface height doesn't match"); + } - AssertTrue(testsur != NULL, "SDL_CreateRGBSurface"); + AssertTrue(testsur != NULL, "SDL_CreateRGBSurface"); - return testsur; + return testsur; } /*! @@ -119,26 +119,26 @@ _CreateTestSurface() SDL_Surface * _createTestSurfaceFromMemory() { - SDL_Surface *face = NULL; + SDL_Surface *face = NULL; - /* Create face surface. */ - face = SDL_CreateRGBSurfaceFrom( (void*)img_face.pixel_data, - img_face.width, img_face.height, 32, img_face.width*4, - #if (SDL_BYTEORDER == SDL_BIG_ENDIAN) - 0xff000000, /* Red bit mask. */ - 0x00ff0000, /* Green bit mask. */ - 0x0000ff00, /* Blue bit mask. */ - 0x000000ff /* Alpha bit mask. */ - #else - 0x000000ff, /* Red bit mask. */ - 0x0000ff00, /* Green bit mask. */ - 0x00ff0000, /* Blue bit mask. */ - 0xff000000 /* Alpha bit mask. */ - #endif - ); - AssertTrue(face != NULL, "SDL_CreateRGBSurfaceFrom"); + /* Create face surface. */ + face = SDL_CreateRGBSurfaceFrom( (void*)img_face.pixel_data, + img_face.width, img_face.height, 32, img_face.width*4, + #if (SDL_BYTEORDER == SDL_BIG_ENDIAN) + 0xff000000, /* Red bit mask. */ + 0x00ff0000, /* Green bit mask. */ + 0x0000ff00, /* Blue bit mask. */ + 0x000000ff /* Alpha bit mask. */ + #else + 0x000000ff, /* Red bit mask. */ + 0x0000ff00, /* Green bit mask. */ + 0x00ff0000, /* Blue bit mask. */ + 0xff000000 /* Alpha bit mask. */ + #endif + ); + AssertTrue(face != NULL, "SDL_CreateRGBSurfaceFrom"); - return face; + return face; } /** @@ -146,50 +146,50 @@ _createTestSurfaceFromMemory() */ void _testBlitBlendMode(SDL_Surface *testsur, SDL_Surface *face, int mode) { - int ret; - int i, j, ni, nj; - SDL_Rect rect; + int ret; + int i, j, ni, nj; + SDL_Rect rect; - AssertTrue(testsur != NULL, "testsur != NULL"); - AssertTrue(face != NULL, "face != NULL"); + AssertTrue(testsur != NULL, "testsur != NULL"); + AssertTrue(face != NULL, "face != NULL"); - /* Clear surface. */ - ret = SDL_FillRect( testsur, NULL, - SDL_MapRGB( testsur->format, 0, 0, 0 ) ); - AssertTrue(ret == 0, "SDL_FillRect"); + /* Clear surface. */ + ret = SDL_FillRect( testsur, NULL, + SDL_MapRGB( testsur->format, 0, 0, 0 ) ); + AssertTrue(ret == 0, "SDL_FillRect"); - /* Steps to take. */ - ni = testsur->w - face->w; - nj = testsur->h - face->h; + /* Steps to take. */ + ni = testsur->w - face->w; + nj = testsur->h - face->h; - /* Constant values. */ - rect.w = face->w; - rect.h = face->h; + /* Constant values. */ + rect.w = face->w; + rect.h = face->h; - /* Test blend mode. */ - for (j=0; j <= nj; j+=4) { - for (i=0; i <= ni; i+=4) { - /* Set blend mode. */ - ret = SDL_SetSurfaceBlendMode( face, mode ); - AssertTrue(ret == 0, "SDL_SetSurfaceBlendMode"); + /* Test blend mode. */ + for (j=0; j <= nj; j+=4) { + for (i=0; i <= ni; i+=4) { + /* Set blend mode. */ + ret = SDL_SetSurfaceBlendMode( face, mode ); + AssertTrue(ret == 0, "SDL_SetSurfaceBlendMode"); - /* Blitting. */ - rect.x = i; - rect.y = j; - // TODO Add pixel level validation, SDL_BlitSurface might be no-op - ret = SDL_BlitSurface( face, NULL, testsur, &rect ); - AssertTrue(ret == 0, "SDL_BlitSurface"); - } - } + /* Blitting. */ + rect.x = i; + rect.y = j; + // TODO Add pixel level validation, SDL_BlitSurface might be no-op + ret = SDL_BlitSurface( face, NULL, testsur, &rect ); + AssertTrue(ret == 0, "SDL_BlitSurface"); + } + } } int _AssertFileExist(const char *filename) { - struct stat st; - int ret = stat(filename, &st); + struct stat st; + int ret = stat(filename, &st); - AssertTrue(ret == 0, "Does file %s exist", filename); + AssertTrue(ret == 0, "Does file %s exist", filename); } /* Test case functions */ @@ -198,25 +198,25 @@ _AssertFileExist(const char *filename) */ void surface_testLoad(void *arg) { - int ret; + int ret; SDL_Surface *face, *rface; /* Clear surface. */ /* ret = SDL_FillRect( testsur, NULL, SDL_MapRGB( testsur->format, 0, 0, 0 ) ); - AssertTrue(ret == 0, "SDL_FillRect"); - */ + AssertTrue(ret == 0, "SDL_FillRect"); + */ /* Create the blit surface. */ - const char *filename = "data/images/icon.bmp"; - _AssertFileExist(filename); + const char *filename = "data/images/icon.bmp"; + _AssertFileExist(filename); - face = SDL_LoadBMP(filename); - AssertTrue(face != NULL, "SDL_CreateLoadBmp"); + face = SDL_LoadBMP(filename); + AssertTrue(face != NULL, "SDL_CreateLoadBmp"); - AssertTrue(face->w == 32, "testing icon width"); - AssertTrue(face->h == 32, "testing icon height"); + AssertTrue(face->w == 32, "testing icon width"); + AssertTrue(face->h == 32, "testing icon height"); } /*! @@ -224,32 +224,32 @@ void surface_testLoad(void *arg) */ void surface_testConversion(void *arg) { - SDL_Surface *rface = NULL, *face = NULL; - int ret = 0; + SDL_Surface *rface = NULL, *face = NULL; + int ret = 0; - const char *filename = "data/images/icon.bmp"; - _AssertFileExist(filename); + const char *filename = "data/images/icon.bmp"; + _AssertFileExist(filename); - face = SDL_LoadBMP(filename); - AssertTrue(face != NULL, "SDL_CreateLoadBmp"); + face = SDL_LoadBMP(filename); + AssertTrue(face != NULL, "SDL_CreateLoadBmp"); - /* Set transparent pixel as the pixel at (0,0) */ - if (face->format->palette) { - ret = SDL_SetColorKey(face, SDL_RLEACCEL, *(Uint8 *) face->pixels); - AssertTrue(ret == 0, "SDL_SetColorKey"); - } + /* Set transparent pixel as the pixel at (0,0) */ + if (face->format->palette) { + ret = SDL_SetColorKey(face, SDL_RLEACCEL, *(Uint8 *) face->pixels); + AssertTrue(ret == 0, "SDL_SetColorKey"); + } - /* Convert to 32 bit to compare. */ - rface = SDL_ConvertSurface( face, testsur->format, 0 ); - AssertTrue(rface != NULL, "SDL_ConvertSurface"); + /* Convert to 32 bit to compare. */ + rface = SDL_ConvertSurface( face, testsur->format, 0 ); + AssertTrue(rface != NULL, "SDL_ConvertSurface"); - /* See if it's the same. */ - AssertTrue(surface_compare( rface, &img_face, 0 ) == 0, - "Comparing primitives output."); + /* See if it's the same. */ + AssertTrue(surface_compare( rface, &img_face, 0 ) == 0, + "Comparing primitives output."); - /* Clean up. */ - SDL_FreeSurface( rface ); - SDL_FreeSurface( face ); + /* Clean up. */ + SDL_FreeSurface( rface ); + SDL_FreeSurface( face ); } @@ -258,8 +258,8 @@ void surface_testConversion(void *arg) */ void surface_testLoadFailure(void *arg) { - SDL_Surface *face = SDL_LoadBMP("nonexistant.bmp"); - AssertTrue(face == NULL, "SDL_CreateLoadBmp"); + SDL_Surface *face = SDL_LoadBMP("nonexistant.bmp"); + AssertTrue(face == NULL, "SDL_CreateLoadBmp"); } /** @@ -302,7 +302,7 @@ void surface_testBlit(void *arg) /* See if it's the same. */ AssertTrue(surface_compare( testsur, &img_blit, 0 ) == 0, - "Comparing blitting output (normal blit)."); + "Comparing blitting output (normal blit)."); /* Clean up. */ SDL_FreeSurface( face ); @@ -357,7 +357,7 @@ void surface_testBlitColorMod(void *arg) /* See if it's the same. */ AssertTrue(surface_compare( testsur, &img_blitColour, 0 ) == 0, - "Comparing blitting output (using SDL_SetSurfaceColorMod)."); + "Comparing blitting output (using SDL_SetSurfaceColorMod)."); /* Clean up. */ SDL_FreeSurface( face ); @@ -415,7 +415,7 @@ void surface_testBlitAlphaMod(void *arg) /* See if it's the same. */ AssertTrue(surface_compare( testsur, &img_blitAlpha, 0 ) == 0, - "Comparing blitting output (using SDL_SetSurfaceAlphaMod)."); + "Comparing blitting output (using SDL_SetSurfaceAlphaMod)."); /* Clean up. */ SDL_FreeSurface( face ); @@ -458,22 +458,22 @@ void surface_testBlitBlendNone(void *arg) /* Test None. */ _testBlitBlendMode( testsur, face, SDL_BLENDMODE_NONE ); AssertTrue(surface_compare( testsur, &img_blendNone, 0 ) == 0, - "Comparing blitting blending output (using SDL_BLENDMODE_NONE)."); + "Comparing blitting blending output (using SDL_BLENDMODE_NONE)."); /* Test Blend. */ _testBlitBlendMode( testsur, face, SDL_BLENDMODE_BLEND ); AssertTrue(surface_compare( testsur, &img_blendBlend, 0 ) == 0, - "Comparing blitting blending output (using SDL_BLENDMODE_BLEND)."); + "Comparing blitting blending output (using SDL_BLENDMODE_BLEND)."); /* Test Add. */ _testBlitBlendMode( testsur, face, SDL_BLENDMODE_ADD ); AssertTrue(surface_compare( testsur, &img_blendAdd, 0 ) == 0, - "Comparing blitting blending output (using SDL_BLENDMODE_ADD)."); + "Comparing blitting blending output (using SDL_BLENDMODE_ADD)."); /* Test Mod. */ _testBlitBlendMode( testsur, face, SDL_BLENDMODE_MOD ); AssertTrue(surface_compare( testsur, &img_blendMod, 0 ) == 0, - "Comparing blitting blending output not the same (using SDL_BLENDMODE_MOD)."); + "Comparing blitting blending output not the same (using SDL_BLENDMODE_MOD)."); } /** @@ -513,7 +513,7 @@ void surface_testBlitBlendBlend(void *arg) /* Test Blend. */ _testBlitBlendMode( testsur, face, SDL_BLENDMODE_BLEND ); AssertTrue(surface_compare( testsur, &img_blendBlend, 0 ) == 0, - "Comparing blitting blending output (using SDL_BLENDMODE_BLEND)."); + "Comparing blitting blending output (using SDL_BLENDMODE_BLEND)."); } /** @@ -553,7 +553,7 @@ void surface_testBlitBlendAdd(void *arg) /* Test Add. */ _testBlitBlendMode( testsur, face, SDL_BLENDMODE_ADD ); AssertTrue(surface_compare( testsur, &img_blendAdd, 0 ) == 0, - "Comparing blitting blending output (using SDL_BLENDMODE_ADD)."); + "Comparing blitting blending output (using SDL_BLENDMODE_ADD)."); } /** @@ -594,41 +594,41 @@ void surface_testBlitBlendMod(void *arg) /* Test Mod. */ _testBlitBlendMode( testsur, face, SDL_BLENDMODE_MOD ); AssertTrue(surface_compare( testsur, &img_blendMod, 0 ) == 0, - "Comparing blitting blending output (using SDL_BLENDMODE_MOD)."); + "Comparing blitting blending output (using SDL_BLENDMODE_MOD)."); } /** * @brief Tests some more blitting routines with loop */ void surface_testBlitBlendLoop(void *arg) { - int ret; - SDL_Rect rect; - SDL_Surface *face; - int i, j, ni, nj; - int mode; + int ret; + SDL_Rect rect; + SDL_Surface *face; + int i, j, ni, nj; + int mode; - /* Clear surface. */ - ret = SDL_FillRect( testsur, NULL, - SDL_MapRGB( testsur->format, 0, 0, 0 ) ); - AssertTrue(ret == 0, "SDL_FillRect"); + /* Clear surface. */ + ret = SDL_FillRect( testsur, NULL, + SDL_MapRGB( testsur->format, 0, 0, 0 ) ); + AssertTrue(ret == 0, "SDL_FillRect"); - face = _createTestSurfaceFromMemory(); + face = _createTestSurfaceFromMemory(); - /* Set alpha mod. */ - // TODO alpha value could be generated by fuzzer - ret = SDL_SetSurfaceAlphaMod( face, 100 ); - AssertTrue(ret == 0, "SDL_SetSurfaceAlphaMod"); + /* Set alpha mod. */ + // TODO alpha value could be generated by fuzzer + ret = SDL_SetSurfaceAlphaMod( face, 100 ); + AssertTrue(ret == 0, "SDL_SetSurfaceAlphaMod"); - /* Steps to take. */ - ni = testsur->w - face->w; - nj = testsur->h - face->h; + /* Steps to take. */ + ni = testsur->w - face->w; + nj = testsur->h - face->h; - AssertTrue(ni != 0, "ni != 0"); - AssertTrue(nj != 0, "nj != 0"); + AssertTrue(ni != 0, "ni != 0"); + AssertTrue(nj != 0, "nj != 0"); - /* Constant values. */ - rect.w = face->w; - rect.h = face->h; + /* Constant values. */ + rect.w = face->w; + rect.h = face->h; /* Clear surface. */ ret = SDL_FillRect( testsur, NULL, @@ -668,7 +668,7 @@ void surface_testBlitBlendLoop(void *arg) { /* Check to see if matches. */ AssertTrue(surface_compare( testsur, &img_blendAll, 0 ) == 0, - "Surface comparison (surface_compare)."); + "Surface comparison (surface_compare)."); /* Clean up. */ SDL_FreeSurface( face ); diff --git a/test/test-automation/tests/testsyswm/testsyswm.c b/test/test-automation/tests/testsyswm/testsyswm.c index c1ed07c76..6360eb4e0 100644 --- a/test/test-automation/tests/testsyswm/testsyswm.c +++ b/test/test-automation/tests/testsyswm/testsyswm.c @@ -13,15 +13,15 @@ /* Test cases */ static const TestCaseReference test1 = - (TestCaseReference){ "syswm_test", "description", TEST_DISABLED, 0, 0 }; + (TestCaseReference){ "syswm_test", "description", TEST_DISABLED, 0, 0 }; /* Test suite */ extern const TestCaseReference *testSuite[] = { - &test1, NULL + &test1, NULL }; TestCaseReference **QueryTestSuite() { - return (TestCaseReference **)testSuite; + return (TestCaseReference **)testSuite; } /** @@ -30,5 +30,5 @@ TestCaseReference **QueryTestSuite() { int syswm_test(void *arg) { - AssertPass(""); + AssertPass(""); } diff --git a/test/test-automation/tests/testvideo/testvideo.c b/test/test-automation/tests/testvideo/testvideo.c index bedfcac66..686c42881 100644 --- a/test/test-automation/tests/testvideo/testvideo.c +++ b/test/test-automation/tests/testvideo/testvideo.c @@ -13,15 +13,15 @@ /* Test cases */ static const TestCaseReference test1 = - (TestCaseReference){ "video_test", "video stuff", TEST_DISABLED, 0, 0 }; + (TestCaseReference){ "video_test", "video stuff", TEST_DISABLED, 0, 0 }; /* Test suite */ extern const TestCaseReference *testSuite[] = { - &test1, NULL + &test1, NULL }; TestCaseReference **QueryTestSuite() { - return (TestCaseReference **)testSuite; + return (TestCaseReference **)testSuite; } /** @@ -30,5 +30,5 @@ TestCaseReference **QueryTestSuite() { int video_test(void *arg) { - AssertPass(""); + AssertPass(""); } diff --git a/test/testatomic.c b/test/testatomic.c index 7bcceb559..143d707c0 100644 --- a/test/testatomic.c +++ b/test/testatomic.c @@ -53,7 +53,7 @@ void RunBasicTest() printf("AtomicUnlock lock=%d\n", lock); printf("\natomic -----------------------------------------\n\n"); - + SDL_AtomicSet(&v, 0); tfret = SDL_AtomicSet(&v, 10) == 0; printf("AtomicSet(10) tfret=%s val=%d\n", tf(tfret), SDL_AtomicGet(&v)); @@ -95,27 +95,27 @@ void RunBasicTest() * at the end the value is compared with the expected * and with a non-atomic counter. */ - + /* Number of concurrent incrementers */ #define NThreads 2 #define CountInc 100 #define VALBITS (sizeof(atomicValue)*8) - + #define atomicValue int #define CountTo ((atomicValue)((unsigned int)(1<<(VALBITS-1))-1)) #define NInter (CountTo/CountInc/NThreads) #define Expect (CountTo-NInter*CountInc*NThreads) - + SDL_COMPILE_TIME_ASSERT(size, CountTo>0); /* check for rollover */ - + static SDL_atomic_t good = { 42 }; - + static atomicValue bad = 42; - + static SDL_atomic_t threadsRunning; static SDL_sem *threadDone; - + static int adder(void* junk) { @@ -129,111 +129,111 @@ int adder(void* junk) SDL_SemPost(threadDone); return 0; } - + static void runAdder(void) { Uint32 start, end; int T=NThreads; - + start = SDL_GetTicks(); - + threadDone = SDL_CreateSemaphore(0); SDL_AtomicSet(&threadsRunning, NThreads); while (T--) SDL_CreateThread(adder, "Adder", NULL); - + while (SDL_AtomicGet(&threadsRunning) > 0) SDL_SemWait(threadDone); - + SDL_DestroySemaphore(threadDone); end = SDL_GetTicks(); - + printf("Finished in %f sec\n", (end - start) / 1000.f); } - + static void RunEpicTest() { int b; atomicValue v; - + printf("\nepic test---------------------------------------\n\n"); printf("Size asserted to be >= 32-bit\n"); SDL_assert(sizeof(atomicValue)>=4); - + printf("Check static initializer\n"); v=SDL_AtomicGet(&good); SDL_assert(v==42); - + SDL_assert(bad==42); - + printf("Test negative values\n"); SDL_AtomicSet(&good, -5); v=SDL_AtomicGet(&good); SDL_assert(v==-5); - + printf("Verify maximum value\n"); SDL_AtomicSet(&good, CountTo); v=SDL_AtomicGet(&good); SDL_assert(v==CountTo); - + printf("Test compare and exchange\n"); - + b=SDL_AtomicCAS(&good, 500, 43); SDL_assert(!b); /* no swap since CountTo!=500 */ v=SDL_AtomicGet(&good); SDL_assert(v==CountTo); /* ensure no swap */ - + b=SDL_AtomicCAS(&good, CountTo, 44); SDL_assert(!!b); /* will swap */ v=SDL_AtomicGet(&good); SDL_assert(v==44); - + printf("Test Add\n"); - + v=SDL_AtomicAdd(&good, 1); SDL_assert(v==44); v=SDL_AtomicGet(&good); SDL_assert(v==45); - + v=SDL_AtomicAdd(&good, 10); SDL_assert(v==45); v=SDL_AtomicGet(&good); SDL_assert(v==55); - + printf("Test Add (Negative values)\n"); - + v=SDL_AtomicAdd(&good, -20); SDL_assert(v==55); v=SDL_AtomicGet(&good); SDL_assert(v==35); - + v=SDL_AtomicAdd(&good, -50); /* crossing zero down */ SDL_assert(v==35); v=SDL_AtomicGet(&good); SDL_assert(v==-15); - + v=SDL_AtomicAdd(&good, 30); /* crossing zero up */ SDL_assert(v==-15); v=SDL_AtomicGet(&good); SDL_assert(v==15); - + printf("Reset before count down test\n"); SDL_AtomicSet(&good, CountTo); v=SDL_AtomicGet(&good); SDL_assert(v==CountTo); - + bad=CountTo; SDL_assert(bad==CountTo); - + printf("Counting down from %d, Expect %d remaining\n",CountTo,Expect); runAdder(); - + v=SDL_AtomicGet(&good); printf("Atomic %d Non-Atomic %d\n",v,bad); SDL_assert(v==Expect); @@ -599,7 +599,7 @@ static void RunFIFOTest(SDL_bool lock_free) Uint32 start, end; int i, j; int grand_total; - + printf("\nFIFO test---------------------------------------\n\n"); printf("Mode: %s\n", lock_free ? "LockFree" : "Mutex"); @@ -614,7 +614,7 @@ static void RunFIFOTest(SDL_bool lock_free) } start = SDL_GetTicks(); - + #ifdef TEST_SPINLOCK_FIFO /* Start a monitoring thread */ if (lock_free) { @@ -646,12 +646,12 @@ static void RunFIFOTest(SDL_bool lock_free) writerData[i].lock_free = lock_free; SDL_CreateThread(FIFO_Writer, name, &writerData[i]); } - + /* Wait for the writers */ while (SDL_AtomicGet(&writersRunning) > 0) { SDL_SemWait(writersDone); } - + /* Shut down the queue so readers exit */ queue.active = SDL_FALSE; @@ -661,14 +661,14 @@ static void RunFIFOTest(SDL_bool lock_free) } end = SDL_GetTicks(); - + SDL_DestroySemaphore(readersDone); SDL_DestroySemaphore(writersDone); if (!lock_free) { SDL_DestroyMutex(queue.mutex); } - + printf("Finished in %f sec\n", (end - start) / 1000.f); printf("\n"); diff --git a/test/testautomation.c b/test/testautomation.c index a32853c53..be3bd7ff8 100644 --- a/test/testautomation.c +++ b/test/testautomation.c @@ -57,27 +57,27 @@ main(int argc, char *argv[]) if (argv[i + 1]) { testIterations = SDL_atoi(argv[i + 1]); if (testIterations < 1) testIterations = 1; - consumed = 2; + consumed = 2; } - } + } else if (SDL_strcasecmp(argv[i], "--execKey") == 0) { if (argv[i + 1]) { SDL_sscanf(argv[i + 1], "%llu", (long long unsigned int *)&userExecKey); - consumed = 2; + consumed = 2; } - } + } else if (SDL_strcasecmp(argv[i], "--seed") == 0) { if (argv[i + 1]) { userRunSeed = SDL_strdup(argv[i + 1]); consumed = 2; } - } + } else if (SDL_strcasecmp(argv[i], "--filter") == 0) { if (argv[i + 1]) { filter = SDL_strdup(argv[i + 1]); consumed = 2; } - } + } } if (consumed < 0) { fprintf(stderr, @@ -85,11 +85,11 @@ main(int argc, char *argv[]) argv[0], SDLTest_CommonUsage(state)); quit(1); } - + i += consumed; } - /* Initialize common state */ + /* Initialize common state */ if (!SDLTest_CommonInit(state)) { quit(2); } @@ -104,7 +104,7 @@ main(int argc, char *argv[]) /* Call Harness */ result = SDLTest_RunSuites(testSuites, (const char *)userRunSeed, userExecKey, (const char *)filter, testIterations); - /* Empty event queue */ + /* Empty event queue */ done = 0; for (i=0; i<100; i++) { while (SDL_PollEvent(&event)) { @@ -120,9 +120,9 @@ main(int argc, char *argv[]) if (filter != NULL) { SDL_free(filter); } - + /* Shutdown everything */ - quit(result); + quit(result); return(result); } diff --git a/test/testautomation_audio.c b/test/testautomation_audio.c index b6f316393..90b08acbd 100644 --- a/test/testautomation_audio.c +++ b/test/testautomation_audio.c @@ -16,11 +16,11 @@ void _audioSetUp(void *arg) { - /* Start SDL audio subsystem */ - int ret = SDL_InitSubSystem( SDL_INIT_AUDIO ); + /* Start SDL audio subsystem */ + int ret = SDL_InitSubSystem( SDL_INIT_AUDIO ); SDLTest_AssertPass("Call to SDL_InitSubSystem(SDL_INIT_AUDIO)"); - SDLTest_AssertCheck(ret==0, "Check result from SDL_InitSubSystem(SDL_INIT_AUDIO)"); - if (ret != 0) { + SDLTest_AssertCheck(ret==0, "Check result from SDL_InitSubSystem(SDL_INIT_AUDIO)"); + if (ret != 0) { SDLTest_LogError("%s", SDL_GetError()); } } @@ -37,14 +37,14 @@ void _audio_testCallback(void *userdata, Uint8 *stream, int len) /** * \brief Stop and restart audio subsystem - * + * * \sa http://wiki.libsdl.org/moin.cgi/SDL_QuitSubSystem * \sa http://wiki.libsdl.org/moin.cgi/SDL_InitSubSystem */ int audio_quitInitAudioSubSystem() { - /* Stop SDL audio subsystem */ - SDL_QuitSubSystem( SDL_INIT_AUDIO ); + /* Stop SDL audio subsystem */ + SDL_QuitSubSystem( SDL_INIT_AUDIO ); SDLTest_AssertPass("Call to SDL_QuitSubSystem(SDL_INIT_AUDIO)"); /* Restart audio again */ @@ -55,18 +55,18 @@ int audio_quitInitAudioSubSystem() /** * \brief Start and stop audio directly - * + * * \sa http://wiki.libsdl.org/moin.cgi/SDL_InitAudio * \sa http://wiki.libsdl.org/moin.cgi/SDL_QuitAudio */ int audio_initQuitAudio() { int result; - int i, iMax; - const char* audioDriver; - - /* Stop SDL audio subsystem */ - SDL_QuitSubSystem( SDL_INIT_AUDIO ); + int i, iMax; + const char* audioDriver; + + /* Stop SDL audio subsystem */ + SDL_QuitSubSystem( SDL_INIT_AUDIO ); SDLTest_AssertPass("Call to SDL_QuitSubSystem(SDL_INIT_AUDIO)"); /* Loop over all available audio drivers */ @@ -74,33 +74,33 @@ int audio_initQuitAudio() SDLTest_AssertPass("Call to SDL_GetNumAudioDrivers"); SDLTest_AssertCheck(iMax > 0, "Validate number of audio drivers; expected: >0 got: %d", iMax); for (i = 0; i < iMax; i++) { - audioDriver = SDL_GetAudioDriver(i); - SDLTest_AssertPass("Call to SDL_GetAudioDriver(%d)", i); - SDLTest_AssertCheck(audioDriver != NULL, "Audio driver name is not NULL"); - SDLTest_AssertCheck(SDL_strlen(audioDriver) > 0, "Audio driver name is not empty; got: %s", audioDriver); - - /* Call Init */ - result = SDL_AudioInit(audioDriver); - SDLTest_AssertPass("Call to SDL_AudioInit('%s')", audioDriver); - SDLTest_AssertCheck(result == 0, "Validate result value; expected: 0 got: %d", result); - - /* Call Quit */ - SDL_AudioQuit(); - SDLTest_AssertPass("Call to SDL_AudioQuit()"); - } - - /* NULL driver specification */ - audioDriver = NULL; - - /* Call Init */ - result = SDL_AudioInit(audioDriver); - SDLTest_AssertPass("Call to SDL_AudioInit(NULL)"); - SDLTest_AssertCheck(result == 0, "Validate result value; expected: 0 got: %d", result); - - /* Call Quit */ - SDL_AudioQuit(); - SDLTest_AssertPass("Call to SDL_AudioQuit()"); - + audioDriver = SDL_GetAudioDriver(i); + SDLTest_AssertPass("Call to SDL_GetAudioDriver(%d)", i); + SDLTest_AssertCheck(audioDriver != NULL, "Audio driver name is not NULL"); + SDLTest_AssertCheck(SDL_strlen(audioDriver) > 0, "Audio driver name is not empty; got: %s", audioDriver); + + /* Call Init */ + result = SDL_AudioInit(audioDriver); + SDLTest_AssertPass("Call to SDL_AudioInit('%s')", audioDriver); + SDLTest_AssertCheck(result == 0, "Validate result value; expected: 0 got: %d", result); + + /* Call Quit */ + SDL_AudioQuit(); + SDLTest_AssertPass("Call to SDL_AudioQuit()"); + } + + /* NULL driver specification */ + audioDriver = NULL; + + /* Call Init */ + result = SDL_AudioInit(audioDriver); + SDLTest_AssertPass("Call to SDL_AudioInit(NULL)"); + SDLTest_AssertCheck(result == 0, "Validate result value; expected: 0 got: %d", result); + + /* Call Quit */ + SDL_AudioQuit(); + SDLTest_AssertPass("Call to SDL_AudioQuit()"); + /* Restart audio again */ _audioSetUp(NULL); @@ -109,7 +109,7 @@ int audio_initQuitAudio() /** * \brief Start, open, close and stop audio - * + * * \sa http://wiki.libsdl.org/moin.cgi/SDL_InitAudio * \sa http://wiki.libsdl.org/moin.cgi/SDL_OpenAudio * \sa http://wiki.libsdl.org/moin.cgi/SDL_CloseAudio @@ -118,12 +118,12 @@ int audio_initQuitAudio() int audio_initOpenCloseQuitAudio() { int result; - int i, iMax, j; - const char* audioDriver; - SDL_AudioSpec desired; - - /* Stop SDL audio subsystem */ - SDL_QuitSubSystem( SDL_INIT_AUDIO ); + int i, iMax, j; + const char* audioDriver; + SDL_AudioSpec desired; + + /* Stop SDL audio subsystem */ + SDL_QuitSubSystem( SDL_INIT_AUDIO ); SDLTest_AssertPass("Call to SDL_QuitSubSystem(SDL_INIT_AUDIO)"); /* Loop over all available audio drivers */ @@ -131,58 +131,58 @@ int audio_initOpenCloseQuitAudio() SDLTest_AssertPass("Call to SDL_GetNumAudioDrivers"); SDLTest_AssertCheck(iMax > 0, "Validate number of audio drivers; expected: >0 got: %d", iMax); for (i = 0; i < iMax; i++) { - audioDriver = SDL_GetAudioDriver(i); - SDLTest_AssertPass("Call to SDL_GetAudioDriver(%d)", i); - SDLTest_AssertCheck(audioDriver != NULL, "Audio driver name is not NULL"); - SDLTest_AssertCheck(SDL_strlen(audioDriver) > 0, "Audio driver name is not empty; got: %s", audioDriver); - - /* Change specs */ - for (j = 0; j < 2; j++) { - - /* Call Init */ - result = SDL_AudioInit(audioDriver); - SDLTest_AssertPass("Call to SDL_AudioInit('%s')", audioDriver); - SDLTest_AssertCheck(result == 0, "Validate result value; expected: 0 got: %d", result); - - /* Set spec */ - SDL_memset(&desired, 0, sizeof(desired)); - switch (j) { - case 0: - /* Set standard desired spec */ - desired.freq = 22050; - desired.format = AUDIO_S16SYS; - desired.channels = 2; - desired.samples = 4096; - desired.callback = _audio_testCallback; - desired.userdata = NULL; - - case 1: - /* Set custom desired spec */ - desired.freq = 48000; - desired.format = AUDIO_F32SYS; - desired.channels = 2; - desired.samples = 2048; - desired.callback = _audio_testCallback; - desired.userdata = NULL; - break; - } + audioDriver = SDL_GetAudioDriver(i); + SDLTest_AssertPass("Call to SDL_GetAudioDriver(%d)", i); + SDLTest_AssertCheck(audioDriver != NULL, "Audio driver name is not NULL"); + SDLTest_AssertCheck(SDL_strlen(audioDriver) > 0, "Audio driver name is not empty; got: %s", audioDriver); + + /* Change specs */ + for (j = 0; j < 2; j++) { + + /* Call Init */ + result = SDL_AudioInit(audioDriver); + SDLTest_AssertPass("Call to SDL_AudioInit('%s')", audioDriver); + SDLTest_AssertCheck(result == 0, "Validate result value; expected: 0 got: %d", result); + + /* Set spec */ + SDL_memset(&desired, 0, sizeof(desired)); + switch (j) { + case 0: + /* Set standard desired spec */ + desired.freq = 22050; + desired.format = AUDIO_S16SYS; + desired.channels = 2; + desired.samples = 4096; + desired.callback = _audio_testCallback; + desired.userdata = NULL; + + case 1: + /* Set custom desired spec */ + desired.freq = 48000; + desired.format = AUDIO_F32SYS; + desired.channels = 2; + desired.samples = 2048; + desired.callback = _audio_testCallback; + desired.userdata = NULL; + break; + } + + /* Call Open */ + result = SDL_OpenAudio(&desired, NULL); + SDLTest_AssertPass("Call to SDL_OpenAudio(desired_spec_%d, NULL)", j); + SDLTest_AssertCheck(result == 0, "Verify return value; expected: 0 got: %d", result); + + /* Call Close */ + SDL_CloseAudio(); + SDLTest_AssertPass("Call to SDL_CloseAudio()"); + + /* Call Quit */ + SDL_AudioQuit(); + SDLTest_AssertPass("Call to SDL_AudioQuit()"); + + } /* spec loop */ + } /* driver loop */ - /* Call Open */ - result = SDL_OpenAudio(&desired, NULL); - SDLTest_AssertPass("Call to SDL_OpenAudio(desired_spec_%d, NULL)", j); - SDLTest_AssertCheck(result == 0, "Verify return value; expected: 0 got: %d", result); - - /* Call Close */ - SDL_CloseAudio(); - SDLTest_AssertPass("Call to SDL_CloseAudio()"); - - /* Call Quit */ - SDL_AudioQuit(); - SDLTest_AssertPass("Call to SDL_AudioQuit()"); - - } /* spec loop */ - } /* driver loop */ - /* Restart audio again */ _audioSetUp(NULL); @@ -191,7 +191,7 @@ int audio_initOpenCloseQuitAudio() /** * \brief Enumerate and name available audio devices (output and capture). - * + * * \sa http://wiki.libsdl.org/moin.cgi/SDL_GetNumAudioDevices * \sa http://wiki.libsdl.org/moin.cgi/SDL_GetAudioDeviceName */ @@ -203,7 +203,7 @@ int audio_enumerateAndNameAudioDevices() /* Iterate over types: t=0 output device, t=1 input/capture device */ for (t=0; t<2; t++) { - + /* Get number of devices. */ n = SDL_GetNumAudioDevices(t); SDLTest_AssertPass("Call to SDL_GetNumAudioDevices(%i)", t); @@ -217,8 +217,8 @@ int audio_enumerateAndNameAudioDevices() SDLTest_AssertCheck(n==nn, "Verify result from SDL_GetNumAudioDevices(%i), expected same number of audio devices %i, got %i", tt, n, nn); nn = SDL_GetNumAudioDevices(-tt); SDLTest_AssertCheck(n==nn, "Verify result from SDL_GetNumAudioDevices(%i), expected same number of audio devices %i, got %i", -tt, n, nn); - } - + } + /* List devices. */ if (n>0) { for (i=0; i0, "Verify result from SDL_GetAudioDeviceName(%i, %i) is not empty, got: '%s'", i, tt, nameAgain); - SDLTest_AssertCheck(SDL_strcmp(name, nameAgain)==0, - "Verify SDL_GetAudioDeviceName(%i, %i) and SDL_GetAudioDeviceName(%i %i) return the same string", + SDLTest_AssertCheck(SDL_strcmp(name, nameAgain)==0, + "Verify SDL_GetAudioDeviceName(%i, %i) and SDL_GetAudioDeviceName(%i %i) return the same string", i, t, i, tt); } } @@ -243,13 +243,13 @@ int audio_enumerateAndNameAudioDevices() } } } - + return TEST_COMPLETED; } /** * \brief Negative tests around enumeration and naming of audio devices. - * + * * \sa http://wiki.libsdl.org/moin.cgi/SDL_GetNumAudioDevices * \sa http://wiki.libsdl.org/moin.cgi/SDL_GetAudioDeviceName */ @@ -258,13 +258,13 @@ int audio_enumerateAndNameAudioDevicesNegativeTests() int t; int i, j, no, nc; const char *name; - + /* Get number of devices. */ no = SDL_GetNumAudioDevices(0); SDLTest_AssertPass("Call to SDL_GetNumAudioDevices(0)"); nc = SDL_GetNumAudioDevices(1); SDLTest_AssertPass("Call to SDL_GetNumAudioDevices(1)"); - + /* Invalid device index when getting name */ for (t=0; t<2; t++) { /* Negative device index */ @@ -272,7 +272,7 @@ int audio_enumerateAndNameAudioDevicesNegativeTests() name = SDL_GetAudioDeviceName(i, t); SDLTest_AssertPass("Call to SDL_GetAudioDeviceName(%i, %i)", i, t); SDLTest_AssertCheck(name == NULL, "Check SDL_GetAudioDeviceName(%i, %i) result NULL, expected NULL, got: %s", i, t, (name == NULL) ? "NULL" : name); - + /* Device index past range */ for (j=0; j<3; j++) { i = (t) ? nc+j : no+j; @@ -280,7 +280,7 @@ int audio_enumerateAndNameAudioDevicesNegativeTests() SDLTest_AssertPass("Call to SDL_GetAudioDeviceName(%i, %i)", i, t); SDLTest_AssertCheck(name == NULL, "Check SDL_GetAudioDeviceName(%i, %i) result, expected: NULL, got: %s", i, t, (name == NULL) ? "NULL" : name); } - + /* Capture index past capture range but within output range */ if ((no>0) && (no>nc) && (t==1)) { i = no-1; @@ -309,7 +309,7 @@ int audio_printAudioDrivers() n = SDL_GetNumAudioDrivers(); SDLTest_AssertPass("Call to SDL_GetNumAudioDrivers()"); SDLTest_AssertCheck(n>=0, "Verify number of audio drivers >= 0, got: %i", n); - + /* List drivers. */ if (n>0) { @@ -347,11 +347,11 @@ int audio_printCurrentAudioDriver() /* Definition of all formats, channels, and frequencies used to test audio conversions */ const int _numAudioFormats = 18; -SDL_AudioFormat _audioFormats[] = { AUDIO_S8, AUDIO_U8, AUDIO_S16LSB, AUDIO_S16MSB, AUDIO_S16SYS, AUDIO_S16, AUDIO_U16LSB, - AUDIO_U16MSB, AUDIO_U16SYS, AUDIO_U16, AUDIO_S32LSB, AUDIO_S32MSB, AUDIO_S32SYS, AUDIO_S32, +SDL_AudioFormat _audioFormats[] = { AUDIO_S8, AUDIO_U8, AUDIO_S16LSB, AUDIO_S16MSB, AUDIO_S16SYS, AUDIO_S16, AUDIO_U16LSB, + AUDIO_U16MSB, AUDIO_U16SYS, AUDIO_U16, AUDIO_S32LSB, AUDIO_S32MSB, AUDIO_S32SYS, AUDIO_S32, AUDIO_F32LSB, AUDIO_F32MSB, AUDIO_F32SYS, AUDIO_F32 }; -char *_audioFormatsVerbose[] = { "AUDIO_S8", "AUDIO_U8", "AUDIO_S16LSB", "AUDIO_S16MSB", "AUDIO_S16SYS", "AUDIO_S16", "AUDIO_U16LSB", - "AUDIO_U16MSB", "AUDIO_U16SYS", "AUDIO_U16", "AUDIO_S32LSB", "AUDIO_S32MSB", "AUDIO_S32SYS", "AUDIO_S32", +char *_audioFormatsVerbose[] = { "AUDIO_S8", "AUDIO_U8", "AUDIO_S16LSB", "AUDIO_S16MSB", "AUDIO_S16SYS", "AUDIO_S16", "AUDIO_U16LSB", + "AUDIO_U16MSB", "AUDIO_U16SYS", "AUDIO_U16", "AUDIO_S32LSB", "AUDIO_S32MSB", "AUDIO_S32SYS", "AUDIO_S32", "AUDIO_F32LSB", "AUDIO_F32MSB", "AUDIO_F32SYS", "AUDIO_F32" }; const int _numAudioChannels = 4; Uint8 _audioChannels[] = { 1, 2, 4, 6 }; @@ -371,7 +371,7 @@ int audio_buildAudioCVT() SDL_AudioSpec spec1; SDL_AudioSpec spec2; int i, ii, j, jj, k, kk; - + /* No conversion needed */ spec1.format = AUDIO_S16LSB; spec1.channels = 2; @@ -387,7 +387,7 @@ int audio_buildAudioCVT() spec1.freq = 22050; spec2.format = AUDIO_S16LSB; spec2.channels = 2; - spec2.freq = 44100; + spec2.freq = 44100; result = SDL_BuildAudioCVT(&cvt, spec1.format, spec1.channels, spec1.freq, spec2.format, spec2.channels, spec2.freq); SDLTest_AssertPass("Call to SDL_BuildAudioCVT(spec1 ==> spec2)"); @@ -408,7 +408,7 @@ int audio_buildAudioCVT() spec2.freq = _audioFrequencies[kk]; result = SDL_BuildAudioCVT(&cvt, spec1.format, spec1.channels, spec1.freq, spec2.format, spec2.channels, spec2.freq); - SDLTest_AssertPass("Call to SDL_BuildAudioCVT(format[%i]=%s(%i),channels[%i]=%i,freq[%i]=%i ==> format[%i]=%s(%i),channels[%i]=%i,freq[%i]=%i)", + SDLTest_AssertPass("Call to SDL_BuildAudioCVT(format[%i]=%s(%i),channels[%i]=%i,freq[%i]=%i ==> format[%i]=%s(%i),channels[%i]=%i,freq[%i]=%i)", i, _audioFormatsVerbose[i], spec1.format, j, spec1.channels, k, spec1.freq, ii, _audioFormatsVerbose[ii], spec2.format, jj, spec2.channels, kk, spec2.freq); SDLTest_AssertCheck(result == 0 || result == 1, "Verify result value; expected: 0 or 1, got: %i", result); if (result<0) { @@ -431,7 +431,7 @@ int audio_buildAudioCVT() int audio_buildAudioCVTNegative() { const char *expectedError = "Parameter 'cvt' is invalid"; - const char *error; + const char *error; int result; SDL_AudioCVT cvt; SDL_AudioSpec spec1; @@ -439,13 +439,13 @@ int audio_buildAudioCVTNegative() int i; char message[256]; - /* Valid format */ + /* Valid format */ spec1.format = AUDIO_S8; spec1.channels = 1; spec1.freq = 22050; spec2.format = AUDIO_S16LSB; spec2.channels = 2; - spec2.freq = 44100; + spec2.freq = 44100; SDL_ClearError(); SDLTest_AssertPass("Call to SDL_ClearError()"); @@ -454,51 +454,51 @@ int audio_buildAudioCVTNegative() result = SDL_BuildAudioCVT((SDL_AudioCVT *)NULL, spec1.format, spec1.channels, spec1.freq, spec2.format, spec2.channels, spec2.freq); SDLTest_AssertPass("Call to SDL_BuildAudioCVT(NULL,...)"); - SDLTest_AssertCheck(result == -1, "Verify result value; expected: -1, got: %i", result); + SDLTest_AssertCheck(result == -1, "Verify result value; expected: -1, got: %i", result); error = SDL_GetError(); SDLTest_AssertPass("Call to SDL_GetError()"); SDLTest_AssertCheck(error != NULL, "Validate that error message was not NULL"); if (error != NULL) { - SDLTest_AssertCheck(SDL_strcmp(error, expectedError) == 0, + SDLTest_AssertCheck(SDL_strcmp(error, expectedError) == 0, "Validate error message, expected: '%s', got: '%s'", expectedError, error); } /* Invalid conversions */ for (i = 1; i < 64; i++) { - /* Valid format to start with */ + /* Valid format to start with */ spec1.format = AUDIO_S8; spec1.channels = 1; spec1.freq = 22050; spec2.format = AUDIO_S16LSB; spec2.channels = 2; - spec2.freq = 44100; + spec2.freq = 44100; SDL_ClearError(); SDLTest_AssertPass("Call to SDL_ClearError()"); - + /* Set various invalid format inputs */ SDL_strlcpy(message, "Invalid: ", 256); if (i & 1) { SDL_strlcat(message, " spec1.format", 256); spec1.format = 0; } - if (i & 2) { + if (i & 2) { SDL_strlcat(message, " spec1.channels", 256); spec1.channels = 0; } - if (i & 4) { + if (i & 4) { SDL_strlcat(message, " spec1.freq", 256); spec1.freq = 0; } - if (i & 8) { + if (i & 8) { SDL_strlcat(message, " spec2.format", 256); spec2.format = 0; } - if (i & 16) { + if (i & 16) { SDL_strlcat(message, " spec2.channels", 256); spec2.channels = 0; } - if (i & 32) { + if (i & 32) { SDL_strlcat(message, " spec2.freq", 256); spec2.freq = 0; } @@ -514,7 +514,7 @@ int audio_buildAudioCVTNegative() SDL_ClearError(); SDLTest_AssertPass("Call to SDL_ClearError()"); - + return TEST_COMPLETED; } @@ -531,7 +531,7 @@ int audio_getAudioStatus() result = SDL_GetAudioStatus(); SDLTest_AssertPass("Call to SDL_GetAudioStatus()"); SDLTest_AssertCheck(result == SDL_AUDIO_STOPPED || result == SDL_AUDIO_PLAYING || result == SDL_AUDIO_PAUSED, - "Verify returned value; expected: STOPPED (%i) | PLAYING (%i) | PAUSED (%i), got: %i", + "Verify returned value; expected: STOPPED (%i) | PLAYING (%i) | PAUSED (%i), got: %i", SDL_AUDIO_STOPPED, SDL_AUDIO_PLAYING, SDL_AUDIO_PAUSED, result); return TEST_COMPLETED; @@ -549,10 +549,10 @@ int audio_openCloseAndGetAudioStatus() SDL_AudioStatus result; int i; int count; - char *device; + char *device; SDL_AudioDeviceID id; SDL_AudioSpec desired, obtained; - + /* Get number of devices. */ count = SDL_GetNumAudioDevices(0); SDLTest_AssertPass("Call to SDL_GetNumAudioDevices(0)"); @@ -571,20 +571,20 @@ int audio_openCloseAndGetAudioStatus() desired.samples=4096; desired.callback=_audio_testCallback; desired.userdata=NULL; - + /* Open device */ id = SDL_OpenAudioDevice((const char *)device, 0, &desired, &obtained, SDL_AUDIO_ALLOW_ANY_CHANGE); SDLTest_AssertPass("SDL_OpenAudioDevice('%s',...)", device); SDLTest_AssertCheck(id > 1, "Validate device ID; expected: >=2, got: %i", id); if (id > 1) { - + /* Check device audio status */ result = SDL_GetAudioDeviceStatus(id); SDLTest_AssertPass("Call to SDL_GetAudioDeviceStatus()"); SDLTest_AssertCheck(result == SDL_AUDIO_STOPPED || result == SDL_AUDIO_PLAYING || result == SDL_AUDIO_PAUSED, - "Verify returned value; expected: STOPPED (%i) | PLAYING (%i) | PAUSED (%i), got: %i", - SDL_AUDIO_STOPPED, SDL_AUDIO_PLAYING, SDL_AUDIO_PAUSED, result); - + "Verify returned value; expected: STOPPED (%i) | PLAYING (%i) | PAUSED (%i), got: %i", + SDL_AUDIO_STOPPED, SDL_AUDIO_PLAYING, SDL_AUDIO_PAUSED, result); + /* Close device again */ SDL_CloseAudioDevice(id); SDLTest_AssertPass("Call to SDL_CloseAudioDevice()"); @@ -593,7 +593,7 @@ int audio_openCloseAndGetAudioStatus() } else { SDLTest_Log("No devices to test with"); } - + return TEST_COMPLETED; } @@ -607,10 +607,10 @@ int audio_lockUnlockOpenAudioDevice() { int i; int count; - char *device; + char *device; SDL_AudioDeviceID id; SDL_AudioSpec desired, obtained; - + /* Get number of devices. */ count = SDL_GetNumAudioDevices(0); SDLTest_AssertPass("Call to SDL_GetNumAudioDevices(0)"); @@ -629,24 +629,24 @@ int audio_lockUnlockOpenAudioDevice() desired.samples=4096; desired.callback=_audio_testCallback; desired.userdata=NULL; - + /* Open device */ id = SDL_OpenAudioDevice((const char *)device, 0, &desired, &obtained, SDL_AUDIO_ALLOW_ANY_CHANGE); SDLTest_AssertPass("SDL_OpenAudioDevice('%s',...)", device); SDLTest_AssertCheck(id > 1, "Validate device ID; expected: >=2, got: %i", id); - if (id > 1) { + if (id > 1) { /* Lock to protect callback */ SDL_LockAudioDevice(id); SDLTest_AssertPass("SDL_LockAudioDevice(%i)", id); - + /* Simulate callback processing */ SDL_Delay(10); SDLTest_Log("Simulate callback processing - delay"); - - /* Unlock again*/ + + /* Unlock again*/ SDL_UnlockAudioDevice(id); - SDLTest_AssertPass("SDL_UnlockAudioDevice(%i)", id); - + SDLTest_AssertPass("SDL_UnlockAudioDevice(%i)", id); + /* Close device again */ SDL_CloseAudioDevice(id); SDLTest_AssertPass("Call to SDL_CloseAudioDevice()"); @@ -655,7 +655,7 @@ int audio_lockUnlockOpenAudioDevice() } else { SDLTest_Log("No devices to test with"); } - + return TEST_COMPLETED; } @@ -692,11 +692,11 @@ int audio_convertAudio() /* All source conversions with random conversion targets */ for (i = 0; i < _numAudioFormats; i++) { for (j = 0; j < _numAudioChannels; j++) { - for (k = 0; k < _numAudioFrequencies; k++) { + for (k = 0; k < _numAudioFrequencies; k++) { spec1.format = _audioFormats[i]; spec1.channels = _audioChannels[j]; spec1.freq = _audioFrequencies[k]; - + /* Ensure we have a different target format */ do { if (c & 1) { @@ -718,10 +718,10 @@ int audio_convertAudio() spec2.format = _audioFormats[ii]; spec2.channels = _audioChannels[jj]; spec2.freq = _audioFrequencies[kk]; - + result = SDL_BuildAudioCVT(&cvt, spec1.format, spec1.channels, spec1.freq, spec2.format, spec2.channels, spec2.freq); - SDLTest_AssertPass("Call to SDL_BuildAudioCVT(format[%i]=%s(%i),channels[%i]=%i,freq[%i]=%i ==> format[%i]=%s(%i),channels[%i]=%i,freq[%i]=%i)", + SDLTest_AssertPass("Call to SDL_BuildAudioCVT(format[%i]=%s(%i),channels[%i]=%i,freq[%i]=%i ==> format[%i]=%s(%i),channels[%i]=%i,freq[%i]=%i)", i, _audioFormatsVerbose[i], spec1.format, j, spec1.channels, k, spec1.freq, ii, _audioFormatsVerbose[ii], spec2.format, jj, spec2.channels, kk, spec2.freq); SDLTest_AssertCheck(result == 1, "Verify result value; expected: 1, got: %i", result); if (result != 1) { @@ -729,7 +729,7 @@ int audio_convertAudio() } else { SDLTest_AssertCheck(cvt.len_mult > 0, "Verify that cvt.len_mult value; expected: >0, got: %i", cvt.len_mult); if (cvt.len_mult < 1) return TEST_ABORTED; - + /* Create some random data to convert */ l = 64; ll = l * cvt.len_mult; @@ -738,20 +738,20 @@ int audio_convertAudio() cvt.buf = (Uint8 *)SDL_malloc(ll); SDLTest_AssertCheck(cvt.buf != NULL, "Check data buffer to convert is not NULL"); if (cvt.buf == NULL) return TEST_ABORTED; - + /* Convert the data */ result = SDL_ConvertAudio(&cvt); SDLTest_AssertPass("Call to SDL_ConvertAudio()"); SDLTest_AssertCheck(result == 0, "Verify result value; expected: 0; got: %i", result); SDLTest_AssertCheck(cvt.buf != NULL, "Verify conversion buffer is not NULL"); SDLTest_AssertCheck(cvt.len_ratio > 0.0, "Verify conversion length ratio; expected: >0; got: %f", cvt.len_ratio); - + /* Free converted buffer */ if (cvt.buf != NULL) { - SDL_free(cvt.buf); - cvt.buf = NULL; - } - } + SDL_free(cvt.buf); + cvt.buf = NULL; + } + } } } } @@ -771,10 +771,10 @@ int audio_openCloseAudioDeviceConnected() int result = -1; int i; int count; - char *device; + char *device; SDL_AudioDeviceID id; SDL_AudioSpec desired, obtained; - + /* Get number of devices. */ count = SDL_GetNumAudioDevices(0); SDLTest_AssertPass("Call to SDL_GetNumAudioDevices(0)"); @@ -793,7 +793,7 @@ int audio_openCloseAudioDeviceConnected() desired.samples=4096; desired.callback=_audio_testCallback; desired.userdata=NULL; - + /* Open device */ id = SDL_OpenAudioDevice((const char *)device, 0, &desired, &obtained, SDL_AUDIO_ALLOW_ANY_CHANGE); SDLTest_AssertPass("SDL_OpenAudioDevice('%s',...)", device); @@ -802,13 +802,13 @@ int audio_openCloseAudioDeviceConnected() /* TODO: enable test code when function is available in SDL2 */ -#ifdef AUDIODEVICECONNECTED_DEFINED +#ifdef AUDIODEVICECONNECTED_DEFINED /* Get connected status */ result = SDL_AudioDeviceConnected(id); SDLTest_AssertPass("Call to SDL_AudioDeviceConnected()"); #endif SDLTest_AssertCheck(result == 1, "Verify returned value; expected: 1; got: %i", result); - + /* Close device again */ SDL_CloseAudioDevice(id); SDLTest_AssertPass("Call to SDL_CloseAudioDevice()"); @@ -817,7 +817,7 @@ int audio_openCloseAudioDeviceConnected() } else { SDLTest_Log("No devices to test with"); } - + return TEST_COMPLETED; } @@ -827,69 +827,69 @@ int audio_openCloseAudioDeviceConnected() /* Audio test cases */ static const SDLTest_TestCaseReference audioTest1 = - { (SDLTest_TestCaseFp)audio_enumerateAndNameAudioDevices, "audio_enumerateAndNameAudioDevices", "Enumerate and name available audio devices (output and capture)", TEST_ENABLED }; + { (SDLTest_TestCaseFp)audio_enumerateAndNameAudioDevices, "audio_enumerateAndNameAudioDevices", "Enumerate and name available audio devices (output and capture)", TEST_ENABLED }; static const SDLTest_TestCaseReference audioTest2 = - { (SDLTest_TestCaseFp)audio_enumerateAndNameAudioDevicesNegativeTests, "audio_enumerateAndNameAudioDevicesNegativeTests", "Negative tests around enumeration and naming of audio devices.", TEST_ENABLED }; + { (SDLTest_TestCaseFp)audio_enumerateAndNameAudioDevicesNegativeTests, "audio_enumerateAndNameAudioDevicesNegativeTests", "Negative tests around enumeration and naming of audio devices.", TEST_ENABLED }; static const SDLTest_TestCaseReference audioTest3 = - { (SDLTest_TestCaseFp)audio_printAudioDrivers, "audio_printAudioDrivers", "Checks available audio driver names.", TEST_ENABLED }; + { (SDLTest_TestCaseFp)audio_printAudioDrivers, "audio_printAudioDrivers", "Checks available audio driver names.", TEST_ENABLED }; static const SDLTest_TestCaseReference audioTest4 = - { (SDLTest_TestCaseFp)audio_printCurrentAudioDriver, "audio_printCurrentAudioDriver", "Checks current audio driver name with initialized audio.", TEST_ENABLED }; + { (SDLTest_TestCaseFp)audio_printCurrentAudioDriver, "audio_printCurrentAudioDriver", "Checks current audio driver name with initialized audio.", TEST_ENABLED }; static const SDLTest_TestCaseReference audioTest5 = - { (SDLTest_TestCaseFp)audio_buildAudioCVT, "audio_buildAudioCVT", "Builds various audio conversion structures.", TEST_ENABLED }; + { (SDLTest_TestCaseFp)audio_buildAudioCVT, "audio_buildAudioCVT", "Builds various audio conversion structures.", TEST_ENABLED }; static const SDLTest_TestCaseReference audioTest6 = - { (SDLTest_TestCaseFp)audio_buildAudioCVTNegative, "audio_buildAudioCVTNegative", "Checks calls with invalid input to SDL_BuildAudioCVT", TEST_ENABLED }; + { (SDLTest_TestCaseFp)audio_buildAudioCVTNegative, "audio_buildAudioCVTNegative", "Checks calls with invalid input to SDL_BuildAudioCVT", TEST_ENABLED }; static const SDLTest_TestCaseReference audioTest7 = - { (SDLTest_TestCaseFp)audio_getAudioStatus, "audio_getAudioStatus", "Checks current audio status.", TEST_ENABLED }; + { (SDLTest_TestCaseFp)audio_getAudioStatus, "audio_getAudioStatus", "Checks current audio status.", TEST_ENABLED }; static const SDLTest_TestCaseReference audioTest8 = - { (SDLTest_TestCaseFp)audio_openCloseAndGetAudioStatus, "audio_openCloseAndGetAudioStatus", "Opens and closes audio device and get audio status.", TEST_ENABLED }; + { (SDLTest_TestCaseFp)audio_openCloseAndGetAudioStatus, "audio_openCloseAndGetAudioStatus", "Opens and closes audio device and get audio status.", TEST_ENABLED }; static const SDLTest_TestCaseReference audioTest9 = - { (SDLTest_TestCaseFp)audio_lockUnlockOpenAudioDevice, "audio_lockUnlockOpenAudioDevice", "Locks and unlocks an open audio device.", TEST_ENABLED }; + { (SDLTest_TestCaseFp)audio_lockUnlockOpenAudioDevice, "audio_lockUnlockOpenAudioDevice", "Locks and unlocks an open audio device.", TEST_ENABLED }; /* TODO: enable test when SDL_ConvertAudio segfaults on cygwin have been fixed. */ /* For debugging, test case can be run manually using --filter audio_convertAudio */ static const SDLTest_TestCaseReference audioTest10 = - { (SDLTest_TestCaseFp)audio_convertAudio, "audio_convertAudio", "Convert audio using available formats.", TEST_DISABLED }; + { (SDLTest_TestCaseFp)audio_convertAudio, "audio_convertAudio", "Convert audio using available formats.", TEST_DISABLED }; /* TODO: enable test when SDL_AudioDeviceConnected has been implemented. */ static const SDLTest_TestCaseReference audioTest11 = - { (SDLTest_TestCaseFp)audio_openCloseAudioDeviceConnected, "audio_openCloseAudioDeviceConnected", "Opens and closes audio device and get connected status.", TEST_DISABLED }; + { (SDLTest_TestCaseFp)audio_openCloseAudioDeviceConnected, "audio_openCloseAudioDeviceConnected", "Opens and closes audio device and get connected status.", TEST_DISABLED }; static const SDLTest_TestCaseReference audioTest12 = - { (SDLTest_TestCaseFp)audio_quitInitAudioSubSystem, "audio_quitInitAudioSubSystem", "Quit and re-init audio subsystem.", TEST_ENABLED }; + { (SDLTest_TestCaseFp)audio_quitInitAudioSubSystem, "audio_quitInitAudioSubSystem", "Quit and re-init audio subsystem.", TEST_ENABLED }; /* TODO: enable when bugs 1343 and 1396 are fixed. */ /* For debugging, test case can be run manually using --filter audio_initQuitAudio */ static const SDLTest_TestCaseReference audioTest13 = - { (SDLTest_TestCaseFp)audio_initQuitAudio, "audio_initQuitAudio", "Init and quit audio drivers directly.", TEST_DISABLED }; + { (SDLTest_TestCaseFp)audio_initQuitAudio, "audio_initQuitAudio", "Init and quit audio drivers directly.", TEST_DISABLED }; /* TODO: enable when bugs 1343 and 1396 are fixed. */ /* For debugging, test case can be run manually using --filter audio_initOpenCloseQuitAudio */ static const SDLTest_TestCaseReference audioTest14 = - { (SDLTest_TestCaseFp)audio_initOpenCloseQuitAudio, "audio_initOpenCloseQuitAudio", "Cycle through init, open, close and quit with various audio specs.", TEST_DISABLED }; + { (SDLTest_TestCaseFp)audio_initOpenCloseQuitAudio, "audio_initOpenCloseQuitAudio", "Cycle through init, open, close and quit with various audio specs.", TEST_DISABLED }; /* Sequence of Audio test cases */ static const SDLTest_TestCaseReference *audioTests[] = { - &audioTest1, &audioTest2, &audioTest3, &audioTest4, &audioTest5, &audioTest6, - &audioTest7, &audioTest8, &audioTest9, &audioTest10, &audioTest11, - &audioTest12, &audioTest13, &audioTest14, NULL + &audioTest1, &audioTest2, &audioTest3, &audioTest4, &audioTest5, &audioTest6, + &audioTest7, &audioTest8, &audioTest9, &audioTest10, &audioTest11, + &audioTest12, &audioTest13, &audioTest14, NULL }; /* Audio test suite (global) */ SDLTest_TestSuiteReference audioTestSuite = { - "Audio", - _audioSetUp, - audioTests, - NULL + "Audio", + _audioSetUp, + audioTests, + NULL }; diff --git a/test/testautomation_clipboard.c b/test/testautomation_clipboard.c index 76c2936f8..cc112f9a6 100644 --- a/test/testautomation_clipboard.c +++ b/test/testautomation_clipboard.c @@ -21,9 +21,9 @@ int clipboard_testHasClipboardText(void *arg) { - SDL_bool result; - result = SDL_HasClipboardText(); - SDLTest_AssertPass("Call to SDL_HasClipboardText succeeded"); + SDL_bool result; + result = SDL_HasClipboardText(); + SDLTest_AssertPass("Call to SDL_HasClipboardText succeeded"); return TEST_COMPLETED; } @@ -37,11 +37,11 @@ clipboard_testHasClipboardText(void *arg) int clipboard_testGetClipboardText(void *arg) { - char *charResult; - charResult = SDL_GetClipboardText(); - SDLTest_AssertPass("Call to SDL_GetClipboardText succeeded"); + char *charResult; + charResult = SDL_GetClipboardText(); + SDLTest_AssertPass("Call to SDL_GetClipboardText succeeded"); - if (charResult) SDL_free(charResult); + if (charResult) SDL_free(charResult); return TEST_COMPLETED; } @@ -54,19 +54,19 @@ clipboard_testGetClipboardText(void *arg) int clipboard_testSetClipboardText(void *arg) { - char *textRef = SDLTest_RandomAsciiString(); - char *text = SDL_strdup(textRef); - int result; - result = SDL_SetClipboardText((const char *)text); - SDLTest_AssertPass("Call to SDL_SetClipboardText succeeded"); - SDLTest_AssertCheck( - result == 0, - "Validate SDL_SetClipboardText result, expected 0, got %i", - result); - SDLTest_AssertCheck( - SDL_strcmp(textRef, text) == 0, - "Verify SDL_SetClipboardText did not modify input string, expected '%s', got '%s'", - textRef, text); + char *textRef = SDLTest_RandomAsciiString(); + char *text = SDL_strdup(textRef); + int result; + result = SDL_SetClipboardText((const char *)text); + SDLTest_AssertPass("Call to SDL_SetClipboardText succeeded"); + SDLTest_AssertCheck( + result == 0, + "Validate SDL_SetClipboardText result, expected 0, got %i", + result); + SDLTest_AssertCheck( + SDL_strcmp(textRef, text) == 0, + "Verify SDL_SetClipboardText did not modify input string, expected '%s', got '%s'", + textRef, text); /* Cleanup */ if (textRef) SDL_free(textRef); @@ -85,64 +85,64 @@ clipboard_testSetClipboardText(void *arg) int clipboard_testClipboardTextFunctions(void *arg) { - char *textRef = SDLTest_RandomAsciiString(); - char *text = SDL_strdup(textRef); - SDL_bool boolResult; - int intResult; - char *charResult; + char *textRef = SDLTest_RandomAsciiString(); + char *text = SDL_strdup(textRef); + SDL_bool boolResult; + int intResult; + char *charResult; - /* Clear clipboard text state */ - boolResult = SDL_HasClipboardText(); - SDLTest_AssertPass("Call to SDL_HasClipboardText succeeded"); - if (boolResult == SDL_TRUE) { + /* Clear clipboard text state */ + boolResult = SDL_HasClipboardText(); + SDLTest_AssertPass("Call to SDL_HasClipboardText succeeded"); + if (boolResult == SDL_TRUE) { intResult = SDL_SetClipboardText((const char *)NULL); SDLTest_AssertPass("Call to SDL_SetClipboardText(NULL) succeeded"); - SDLTest_AssertCheck( - intResult == 0, - "Verify result from SDL_SetClipboardText(NULL), expected 0, got %i", - intResult); - charResult = SDL_GetClipboardText(); - SDLTest_AssertPass("Call to SDL_GetClipboardText succeeded"); - boolResult = SDL_HasClipboardText(); - SDLTest_AssertPass("Call to SDL_HasClipboardText succeeded"); - SDLTest_AssertCheck( + SDLTest_AssertCheck( + intResult == 0, + "Verify result from SDL_SetClipboardText(NULL), expected 0, got %i", + intResult); + charResult = SDL_GetClipboardText(); + SDLTest_AssertPass("Call to SDL_GetClipboardText succeeded"); + boolResult = SDL_HasClipboardText(); + SDLTest_AssertPass("Call to SDL_HasClipboardText succeeded"); + SDLTest_AssertCheck( boolResult == SDL_FALSE, - "Verify SDL_HasClipboardText returned SDL_FALSE, got %s", - (boolResult) ? "SDL_TRUE" : "SDL_FALSE"); + "Verify SDL_HasClipboardText returned SDL_FALSE, got %s", + (boolResult) ? "SDL_TRUE" : "SDL_FALSE"); } /* Empty clipboard */ - charResult = SDL_GetClipboardText(); - SDLTest_AssertPass("Call to SDL_GetClipboardText succeeded"); - SDLTest_AssertCheck( - charResult != NULL, - "Verify SDL_GetClipboardText did not return NULL"); - SDLTest_AssertCheck( - SDL_strlen(charResult) == 0, - "Verify SDL_GetClipboardText returned string with length 0, got length %i", - SDL_strlen(charResult)); + charResult = SDL_GetClipboardText(); + SDLTest_AssertPass("Call to SDL_GetClipboardText succeeded"); + SDLTest_AssertCheck( + charResult != NULL, + "Verify SDL_GetClipboardText did not return NULL"); + SDLTest_AssertCheck( + SDL_strlen(charResult) == 0, + "Verify SDL_GetClipboardText returned string with length 0, got length %i", + SDL_strlen(charResult)); intResult = SDL_SetClipboardText((const char *)text); - SDLTest_AssertPass("Call to SDL_SetClipboardText succeeded"); - SDLTest_AssertCheck( - intResult == 0, - "Verify result from SDL_SetClipboardText(NULL), expected 0, got %i", - intResult); - SDLTest_AssertCheck( - SDL_strcmp(textRef, text) == 0, - "Verify SDL_SetClipboardText did not modify input string, expected '%s', got '%s'", - textRef, text); - boolResult = SDL_HasClipboardText(); - SDLTest_AssertPass("Call to SDL_HasClipboardText succeeded"); - SDLTest_AssertCheck( + SDLTest_AssertPass("Call to SDL_SetClipboardText succeeded"); + SDLTest_AssertCheck( + intResult == 0, + "Verify result from SDL_SetClipboardText(NULL), expected 0, got %i", + intResult); + SDLTest_AssertCheck( + SDL_strcmp(textRef, text) == 0, + "Verify SDL_SetClipboardText did not modify input string, expected '%s', got '%s'", + textRef, text); + boolResult = SDL_HasClipboardText(); + SDLTest_AssertPass("Call to SDL_HasClipboardText succeeded"); + SDLTest_AssertCheck( boolResult == SDL_TRUE, - "Verify SDL_HasClipboardText returned SDL_TRUE, got %s", - (boolResult) ? "SDL_TRUE" : "SDL_FALSE"); - charResult = SDL_GetClipboardText(); - SDLTest_AssertPass("Call to SDL_GetClipboardText succeeded"); - SDLTest_AssertCheck( - strcmp(textRef, charResult) == 0, - "Verify SDL_GetClipboardText returned correct string, expected '%s', got '%s'", - textRef, charResult); + "Verify SDL_HasClipboardText returned SDL_TRUE, got %s", + (boolResult) ? "SDL_TRUE" : "SDL_FALSE"); + charResult = SDL_GetClipboardText(); + SDLTest_AssertPass("Call to SDL_GetClipboardText succeeded"); + SDLTest_AssertCheck( + strcmp(textRef, charResult) == 0, + "Verify SDL_GetClipboardText returned correct string, expected '%s', got '%s'", + textRef, charResult); /* Cleanup */ if (textRef) SDL_free(textRef); @@ -157,26 +157,26 @@ clipboard_testClipboardTextFunctions(void *arg) /* Clipboard test cases */ static const SDLTest_TestCaseReference clipboardTest1 = - { (SDLTest_TestCaseFp)clipboard_testHasClipboardText, "clipboard_testHasClipboardText", "Check call to SDL_HasClipboardText", TEST_ENABLED }; + { (SDLTest_TestCaseFp)clipboard_testHasClipboardText, "clipboard_testHasClipboardText", "Check call to SDL_HasClipboardText", TEST_ENABLED }; static const SDLTest_TestCaseReference clipboardTest2 = - { (SDLTest_TestCaseFp)clipboard_testGetClipboardText, "clipboard_testGetClipboardText", "Check call to SDL_GetClipboardText", TEST_ENABLED }; + { (SDLTest_TestCaseFp)clipboard_testGetClipboardText, "clipboard_testGetClipboardText", "Check call to SDL_GetClipboardText", TEST_ENABLED }; static const SDLTest_TestCaseReference clipboardTest3 = - { (SDLTest_TestCaseFp)clipboard_testSetClipboardText, "clipboard_testSetClipboardText", "Check call to SDL_SetClipboardText", TEST_ENABLED }; + { (SDLTest_TestCaseFp)clipboard_testSetClipboardText, "clipboard_testSetClipboardText", "Check call to SDL_SetClipboardText", TEST_ENABLED }; static const SDLTest_TestCaseReference clipboardTest4 = - { (SDLTest_TestCaseFp)clipboard_testClipboardTextFunctions, "clipboard_testClipboardTextFunctions", "End-to-end test of SDL_xyzClipboardText functions", TEST_ENABLED }; + { (SDLTest_TestCaseFp)clipboard_testClipboardTextFunctions, "clipboard_testClipboardTextFunctions", "End-to-end test of SDL_xyzClipboardText functions", TEST_ENABLED }; /* Sequence of Clipboard test cases */ static const SDLTest_TestCaseReference *clipboardTests[] = { - &clipboardTest1, &clipboardTest2, &clipboardTest3, &clipboardTest4, NULL + &clipboardTest1, &clipboardTest2, &clipboardTest3, &clipboardTest4, NULL }; /* Clipboard test suite (global) */ SDLTest_TestSuiteReference clipboardTestSuite = { - "Clipboard", - NULL, - clipboardTests, - NULL + "Clipboard", + NULL, + clipboardTests, + NULL }; diff --git a/test/testautomation_events.c b/test/testautomation_events.c index 930d44cb3..638607e76 100644 --- a/test/testautomation_events.c +++ b/test/testautomation_events.c @@ -28,14 +28,14 @@ int _userdataValue2 = 2; int _events_sampleNullEventFilter(void *userdata, SDL_Event *event) { _eventFilterCalled = 1; - + if (_userdataCheck != 0) { SDLTest_AssertCheck(userdata != NULL, "Check userdata pointer, expected: non-NULL, got: %s", (userdata != NULL) ? "non-NULL" : "NULL"); if (userdata != NULL) { SDLTest_AssertCheck(*(int *)userdata == _userdataValue, "Check userdata value, expected: %i, got: %i", _userdataValue, *(int *)userdata); } } - + return 0; } @@ -51,24 +51,24 @@ events_pushPumpAndPollUserevent(void *arg) SDL_Event event1; SDL_Event event2; int result; - + /* Create user event */ event1.type = SDL_USEREVENT; event1.user.code = SDLTest_RandomSint32(); event1.user.data1 = (void *)&_userdataValue1; event1.user.data2 = (void *)&_userdataValue2; - + /* Push a user event onto the queue and force queue update*/ SDL_PushEvent(&event1); SDLTest_AssertPass("Call to SDL_PushEvent()"); SDL_PumpEvents(); SDLTest_AssertPass("Call to SDL_PumpEvents()"); - + /* Poll for user event */ result = SDL_PollEvent(&event2); SDLTest_AssertPass("Call to SDL_PollEvent()"); SDLTest_AssertCheck(result == 1, "Check result from SDL_PollEvent, expected: 1, got: %d", result); - + return TEST_COMPLETED; } @@ -84,7 +84,7 @@ int events_addDelEventWatch(void *arg) { SDL_Event event; - + /* Create user event */ event.type = SDL_USEREVENT; event.user.code = SDLTest_RandomSint32();; @@ -97,10 +97,10 @@ events_addDelEventWatch(void *arg) /* Reset event filter call tracker */ _eventFilterCalled = 0; - /* Add watch */ + /* Add watch */ SDL_AddEventWatch(_events_sampleNullEventFilter, NULL); SDLTest_AssertPass("Call to SDL_AddEventWatch()"); - + /* Push a user event onto the queue and force queue update*/ SDL_PushEvent(&event); SDLTest_AssertPass("Call to SDL_PushEvent()"); @@ -134,13 +134,13 @@ int events_addDelEventWatchWithUserdata(void *arg) { SDL_Event event; - + /* Create user event */ event.type = SDL_USEREVENT; event.user.code = SDLTest_RandomSint32();; event.user.data1 = (void *)&_userdataValue1; event.user.data2 = (void *)&_userdataValue2; - + /* Enable userdata check and set a value to check */ _userdataCheck = 1; _userdataValue = SDLTest_RandomIntegerInRange(-1024, 1024); @@ -148,7 +148,7 @@ events_addDelEventWatchWithUserdata(void *arg) /* Reset event filter call tracker */ _eventFilterCalled = 0; - /* Add watch */ + /* Add watch */ SDL_AddEventWatch(_events_sampleNullEventFilter, (void *)&_userdataValue); SDLTest_AssertPass("Call to SDL_AddEventWatch()"); @@ -162,7 +162,7 @@ events_addDelEventWatchWithUserdata(void *arg) /* Delete watch */ SDL_DelEventWatch(_events_sampleNullEventFilter, (void *)&_userdataValue); SDLTest_AssertPass("Call to SDL_DelEventWatch()"); - + /* Push a user event onto the queue and force queue update*/ _eventFilterCalled = 0; SDL_PushEvent(&event); @@ -170,7 +170,7 @@ events_addDelEventWatchWithUserdata(void *arg) SDL_PumpEvents(); SDLTest_AssertPass("Call to SDL_PumpEvents()"); SDLTest_AssertCheck(_eventFilterCalled == 0, "Check that event filter was NOT called"); - + return TEST_COMPLETED; } @@ -179,23 +179,23 @@ events_addDelEventWatchWithUserdata(void *arg) /* Events test cases */ static const SDLTest_TestCaseReference eventsTest1 = - { (SDLTest_TestCaseFp)events_pushPumpAndPollUserevent, "events_pushPumpAndPollUserevent", "Pushes, pumps and polls a user event", TEST_ENABLED }; + { (SDLTest_TestCaseFp)events_pushPumpAndPollUserevent, "events_pushPumpAndPollUserevent", "Pushes, pumps and polls a user event", TEST_ENABLED }; static const SDLTest_TestCaseReference eventsTest2 = - { (SDLTest_TestCaseFp)events_addDelEventWatch, "events_addDelEventWatch", "Adds and deletes an event watch function with NULL userdata", TEST_ENABLED }; + { (SDLTest_TestCaseFp)events_addDelEventWatch, "events_addDelEventWatch", "Adds and deletes an event watch function with NULL userdata", TEST_ENABLED }; static const SDLTest_TestCaseReference eventsTest3 = - { (SDLTest_TestCaseFp)events_addDelEventWatchWithUserdata, "events_addDelEventWatchWithUserdata", "Adds and deletes an event watch function with userdata", TEST_ENABLED }; + { (SDLTest_TestCaseFp)events_addDelEventWatchWithUserdata, "events_addDelEventWatchWithUserdata", "Adds and deletes an event watch function with userdata", TEST_ENABLED }; /* Sequence of Events test cases */ static const SDLTest_TestCaseReference *eventsTests[] = { - &eventsTest1, &eventsTest2, &eventsTest3, NULL + &eventsTest1, &eventsTest2, &eventsTest3, NULL }; /* Events test suite (global) */ SDLTest_TestSuiteReference eventsTestSuite = { - "Events", - NULL, - eventsTests, - NULL + "Events", + NULL, + eventsTests, + NULL }; diff --git a/test/testautomation_keyboard.c b/test/testautomation_keyboard.c index ab80631b6..1e5df4ff0 100644 --- a/test/testautomation_keyboard.c +++ b/test/testautomation_keyboard.c @@ -15,7 +15,7 @@ /** * @brief Check call to SDL_GetKeyboardState with and without numkeys reference. - * + * * @sa http://wiki.libsdl.org/moin.cgi/SDL_GetKeyboardState */ int @@ -24,7 +24,7 @@ keyboard_getKeyboardState(void *arg) int numkeys; Uint8 *state; - /* Case where numkeys pointer is NULL */ + /* Case where numkeys pointer is NULL */ state = SDL_GetKeyboardState(NULL); SDLTest_AssertPass("Call to SDL_GetKeyboardState(NULL)"); SDLTest_AssertCheck(state != NULL, "Validate that return value from SDL_GetKeyboardState is not NULL"); @@ -35,13 +35,13 @@ keyboard_getKeyboardState(void *arg) SDLTest_AssertPass("Call to SDL_GetKeyboardState(&numkeys)"); SDLTest_AssertCheck(state != NULL, "Validate that return value from SDL_GetKeyboardState is not NULL"); SDLTest_AssertCheck(numkeys >= 0, "Validate that value of numkeys is >= 0, got: %i", numkeys); - + return TEST_COMPLETED; } /** * @brief Check call to SDL_GetKeyboardFocus - * + * * @sa http://wiki.libsdl.org/moin.cgi/SDL_GetKeyboardFocus */ int @@ -58,7 +58,7 @@ keyboard_getKeyboardFocus(void *arg) /** * @brief Check call to SDL_GetKeyFromName for known, unknown and invalid name. - * + * * @sa http://wiki.libsdl.org/moin.cgi/SDL_GetKeyFromName */ int @@ -104,19 +104,19 @@ keyboard_getKeyFromName(void *arg) return TEST_COMPLETED; } -/* +/* * Local helper to check for the invalid scancode error message */ void _checkInvalidScancodeError() { const char *expectedError = "Parameter 'scancode' is invalid"; - const char *error; + const char *error; error = SDL_GetError(); SDLTest_AssertPass("Call to SDL_GetError()"); SDLTest_AssertCheck(error != NULL, "Validate that error message was not NULL"); if (error != NULL) { - SDLTest_AssertCheck(SDL_strcmp(error, expectedError) == 0, + SDLTest_AssertCheck(SDL_strcmp(error, expectedError) == 0, "Validate error message, expected: '%s', got: '%s'", expectedError, error); SDL_ClearError(); SDLTest_AssertPass("Call to SDL_ClearError()"); @@ -125,7 +125,7 @@ _checkInvalidScancodeError() /** * @brief Check call to SDL_GetKeyFromScancode - * + * * @sa http://wiki.libsdl.org/moin.cgi/SDL_GetKeyFromScancode */ int @@ -164,12 +164,12 @@ keyboard_getKeyFromScancode(void *arg) /** * @brief Check call to SDL_GetKeyName - * + * * @sa http://wiki.libsdl.org/moin.cgi/SDL_GetKeyName */ int keyboard_getKeyName(void *arg) -{ +{ char *result; char *expected; @@ -220,12 +220,12 @@ keyboard_getKeyName(void *arg) /** * @brief SDL_GetScancodeName negative cases - * + * * @sa http://wiki.libsdl.org/moin.cgi/SDL_GetScancodeName */ int keyboard_getScancodeNameNegative(void *arg) -{ +{ SDL_Scancode scancode; char *result; char *expected = ""; @@ -247,12 +247,12 @@ keyboard_getScancodeNameNegative(void *arg) /** * @brief SDL_GetKeyName negative cases - * + * * @sa http://wiki.libsdl.org/moin.cgi/SDL_GetKeyName */ int keyboard_getKeyNameNegative(void *arg) -{ +{ SDL_Keycode keycode; char *result; char *expected = ""; @@ -284,17 +284,17 @@ keyboard_getKeyNameNegative(void *arg) /** * @brief Check call to SDL_GetModState and SDL_SetModState - * + * * @sa http://wiki.libsdl.org/moin.cgi/SDL_GetModState * @sa http://wiki.libsdl.org/moin.cgi/SDL_SetModState */ int keyboard_getSetModState(void *arg) -{ +{ SDL_Keymod result; SDL_Keymod currentState; SDL_Keymod newState; - SDL_Keymod allStates = + SDL_Keymod allStates = KMOD_NONE | KMOD_LSHIFT | KMOD_RSHIFT | @@ -309,13 +309,13 @@ keyboard_getSetModState(void *arg) KMOD_MODE | KMOD_RESERVED; - /* Get state, cache for later reset */ + /* Get state, cache for later reset */ result = SDL_GetModState(); SDLTest_AssertPass("Call to SDL_GetModState()"); - SDLTest_AssertCheck(result >=0 && result <= allStates, "Verify result from call is valid, expected: 0 <= result <= %i, got: %i", allStates, result); + SDLTest_AssertCheck(result >=0 && result <= allStates, "Verify result from call is valid, expected: 0 <= result <= %i, got: %i", allStates, result); currentState = result; - /* Set random state */ + /* Set random state */ newState = SDLTest_RandomIntegerInRange(0, allStates); SDL_SetModState(newState); SDLTest_AssertPass("Call to SDL_SetModState(%i)", newState); @@ -345,13 +345,13 @@ keyboard_getSetModState(void *arg) /** * @brief Check call to SDL_StartTextInput and SDL_StopTextInput - * + * * @sa http://wiki.libsdl.org/moin.cgi/SDL_StartTextInput * @sa http://wiki.libsdl.org/moin.cgi/SDL_StopTextInput */ int keyboard_startStopTextInput(void *arg) -{ +{ /* Start-Stop */ SDL_StartTextInput(); SDLTest_AssertPass("Call to SDL_StartTextInput()"); @@ -361,12 +361,12 @@ keyboard_startStopTextInput(void *arg) /* Stop-Start */ SDL_StartTextInput(); SDLTest_AssertPass("Call to SDL_StartTextInput()"); - + /* Start-Start */ SDL_StartTextInput(); SDLTest_AssertPass("Call to SDL_StartTextInput()"); - /* Stop-Stop */ + /* Stop-Stop */ SDL_StopTextInput(); SDLTest_AssertPass("Call to SDL_StopTextInput()"); SDL_StopTextInput(); @@ -379,34 +379,34 @@ keyboard_startStopTextInput(void *arg) void _testSetTextInputRect(SDL_Rect refRect) { SDL_Rect testRect; - + testRect = refRect; SDL_SetTextInputRect(&testRect); SDLTest_AssertPass("Call to SDL_SetTextInputRect with refRect(x:%i,y:%i,w:%i,h:%i)", refRect.x, refRect.y, refRect.w, refRect.h); SDLTest_AssertCheck( - (refRect.x == testRect.x) && (refRect.y == testRect.y) && (refRect.w == testRect.w) && (refRect.h == testRect.h), - "Check that input data was not modified, expected: x:%i,y:%i,w:%i,h:%i, got: x:%i,y:%i,w:%i,h:%i", - refRect.x, refRect.y, refRect.w, refRect.h, + (refRect.x == testRect.x) && (refRect.y == testRect.y) && (refRect.w == testRect.w) && (refRect.h == testRect.h), + "Check that input data was not modified, expected: x:%i,y:%i,w:%i,h:%i, got: x:%i,y:%i,w:%i,h:%i", + refRect.x, refRect.y, refRect.w, refRect.h, testRect.x, testRect.y, testRect.w, testRect.h); } /** * @brief Check call to SDL_SetTextInputRect - * + * * @sa http://wiki.libsdl.org/moin.cgi/SDL_SetTextInputRect */ int keyboard_setTextInputRect(void *arg) -{ +{ SDL_Rect refRect; - + /* Normal visible refRect, origin inside */ refRect.x = SDLTest_RandomIntegerInRange(1, 50);; refRect.y = SDLTest_RandomIntegerInRange(1, 50);; refRect.w = SDLTest_RandomIntegerInRange(10, 50); refRect.h = SDLTest_RandomIntegerInRange(10, 50); _testSetTextInputRect(refRect); - + /* Normal visible refRect, origin 0,0 */ refRect.x = 0; refRect.y = 0; @@ -472,133 +472,133 @@ keyboard_setTextInputRect(void *arg) /** * @brief Check call to SDL_SetTextInputRect with invalid data - * + * * @sa http://wiki.libsdl.org/moin.cgi/SDL_SetTextInputRect */ int keyboard_setTextInputRectNegative(void *arg) -{ +{ /* Some platforms set also an error message; prepare for checking it */ -#if SDL_VIDEO_DRIVER_WINDOWS || SDL_VIDEO_DRIVER_ANDROID || SDL_VIDEO_DRIVER_COCOA +#if SDL_VIDEO_DRIVER_WINDOWS || SDL_VIDEO_DRIVER_ANDROID || SDL_VIDEO_DRIVER_COCOA const char *expectedError = "Parameter 'rect' is invalid"; const char *error; - + SDL_ClearError(); SDLTest_AssertPass("Call to SDL_ClearError()"); #endif - + /* NULL refRect */ SDL_SetTextInputRect(NULL); SDLTest_AssertPass("Call to SDL_SetTextInputRect(NULL)"); /* Some platforms set also an error message; so check it */ -#if SDL_VIDEO_DRIVER_WINDOWS || SDL_VIDEO_DRIVER_ANDROID || SDL_VIDEO_DRIVER_COCOA +#if SDL_VIDEO_DRIVER_WINDOWS || SDL_VIDEO_DRIVER_ANDROID || SDL_VIDEO_DRIVER_COCOA error = SDL_GetError(); SDLTest_AssertPass("Call to SDL_GetError()"); SDLTest_AssertCheck(error != NULL, "Validate that error message was not NULL"); if (error != NULL) { - SDLTest_AssertCheck(SDL_strcmp(error, expectedError) == 0, + SDLTest_AssertCheck(SDL_strcmp(error, expectedError) == 0, "Validate error message, expected: '%s', got: '%s'", expectedError, error); } SDL_ClearError(); SDLTest_AssertPass("Call to SDL_ClearError()"); #endif - + return TEST_COMPLETED; } /** * @brief Check call to SDL_GetScancodeFromKey - * + * * @sa http://wiki.libsdl.org/moin.cgi/SDL_GetScancodeFromKey * @sa http://wiki.libsdl.org/moin.cgi/SDL_Keycode */ int keyboard_getScancodeFromKey(void *arg) -{ +{ SDL_Scancode scancode; - + /* Regular key */ scancode = SDL_GetScancodeFromKey(SDLK_4); SDLTest_AssertPass("Call to SDL_GetScancodeFromKey(SDLK_4)"); - SDLTest_AssertCheck(scancode == SDL_SCANCODE_4, "Validate return value from SDL_GetScancodeFromKey, expected: %i, got: %i", SDL_SCANCODE_4, scancode); + SDLTest_AssertCheck(scancode == SDL_SCANCODE_4, "Validate return value from SDL_GetScancodeFromKey, expected: %i, got: %i", SDL_SCANCODE_4, scancode); /* Virtual key */ scancode = SDL_GetScancodeFromKey(SDLK_PLUS); SDLTest_AssertPass("Call to SDL_GetScancodeFromKey(SDLK_PLUS)"); - SDLTest_AssertCheck(scancode == 0, "Validate return value from SDL_GetScancodeFromKey, expected: 0, got: %i", scancode); - + SDLTest_AssertCheck(scancode == 0, "Validate return value from SDL_GetScancodeFromKey, expected: 0, got: %i", scancode); + return TEST_COMPLETED; } /** * @brief Check call to SDL_GetScancodeFromName - * + * * @sa http://wiki.libsdl.org/moin.cgi/SDL_GetScancodeFromName * @sa http://wiki.libsdl.org/moin.cgi/SDL_Keycode */ int keyboard_getScancodeFromName(void *arg) -{ +{ SDL_Scancode scancode; /* Regular key, 1 character, first name in list */ scancode = SDL_GetScancodeFromName("A"); SDLTest_AssertPass("Call to SDL_GetScancodeFromName('A')"); - SDLTest_AssertCheck(scancode == SDL_SCANCODE_A, "Validate return value from SDL_GetScancodeFromName, expected: %i, got: %i", SDL_SCANCODE_A, scancode); + SDLTest_AssertCheck(scancode == SDL_SCANCODE_A, "Validate return value from SDL_GetScancodeFromName, expected: %i, got: %i", SDL_SCANCODE_A, scancode); /* Regular key, 1 character */ scancode = SDL_GetScancodeFromName("4"); SDLTest_AssertPass("Call to SDL_GetScancodeFromName('4')"); - SDLTest_AssertCheck(scancode == SDL_SCANCODE_4, "Validate return value from SDL_GetScancodeFromName, expected: %i, got: %i", SDL_SCANCODE_4, scancode); + SDLTest_AssertCheck(scancode == SDL_SCANCODE_4, "Validate return value from SDL_GetScancodeFromName, expected: %i, got: %i", SDL_SCANCODE_4, scancode); /* Regular key, 2 characters */ scancode = SDL_GetScancodeFromName("F1"); SDLTest_AssertPass("Call to SDL_GetScancodeFromName('F1')"); - SDLTest_AssertCheck(scancode == SDL_SCANCODE_F1, "Validate return value from SDL_GetScancodeFromName, expected: %i, got: %i", SDL_SCANCODE_F1, scancode); + SDLTest_AssertCheck(scancode == SDL_SCANCODE_F1, "Validate return value from SDL_GetScancodeFromName, expected: %i, got: %i", SDL_SCANCODE_F1, scancode); /* Regular key, 3 characters */ scancode = SDL_GetScancodeFromName("End"); SDLTest_AssertPass("Call to SDL_GetScancodeFromName('End')"); - SDLTest_AssertCheck(scancode == SDL_SCANCODE_END, "Validate return value from SDL_GetScancodeFromName, expected: %i, got: %i", SDL_SCANCODE_END, scancode); + SDLTest_AssertCheck(scancode == SDL_SCANCODE_END, "Validate return value from SDL_GetScancodeFromName, expected: %i, got: %i", SDL_SCANCODE_END, scancode); /* Regular key, 4 characters */ scancode = SDL_GetScancodeFromName("Find"); SDLTest_AssertPass("Call to SDL_GetScancodeFromName('Find')"); - SDLTest_AssertCheck(scancode == SDL_SCANCODE_FIND, "Validate return value from SDL_GetScancodeFromName, expected: %i, got: %i", SDL_SCANCODE_FIND, scancode); + SDLTest_AssertCheck(scancode == SDL_SCANCODE_FIND, "Validate return value from SDL_GetScancodeFromName, expected: %i, got: %i", SDL_SCANCODE_FIND, scancode); /* Regular key, several characters */ scancode = SDL_GetScancodeFromName("Backspace"); SDLTest_AssertPass("Call to SDL_GetScancodeFromName('Backspace')"); - SDLTest_AssertCheck(scancode == SDL_SCANCODE_BACKSPACE, "Validate return value from SDL_GetScancodeFromName, expected: %i, got: %i", SDL_SCANCODE_BACKSPACE, scancode); + SDLTest_AssertCheck(scancode == SDL_SCANCODE_BACKSPACE, "Validate return value from SDL_GetScancodeFromName, expected: %i, got: %i", SDL_SCANCODE_BACKSPACE, scancode); /* Regular key, several characters with space */ scancode = SDL_GetScancodeFromName("Keypad Enter"); SDLTest_AssertPass("Call to SDL_GetScancodeFromName('Keypad Enter')"); - SDLTest_AssertCheck(scancode == SDL_SCANCODE_KP_ENTER, "Validate return value from SDL_GetScancodeFromName, expected: %i, got: %i", SDL_SCANCODE_KP_ENTER, scancode); + SDLTest_AssertCheck(scancode == SDL_SCANCODE_KP_ENTER, "Validate return value from SDL_GetScancodeFromName, expected: %i, got: %i", SDL_SCANCODE_KP_ENTER, scancode); /* Regular key, last name in list */ scancode = SDL_GetScancodeFromName("Sleep"); SDLTest_AssertPass("Call to SDL_GetScancodeFromName('Sleep')"); - SDLTest_AssertCheck(scancode == SDL_SCANCODE_SLEEP, "Validate return value from SDL_GetScancodeFromName, expected: %i, got: %i", SDL_SCANCODE_SLEEP, scancode); - + SDLTest_AssertCheck(scancode == SDL_SCANCODE_SLEEP, "Validate return value from SDL_GetScancodeFromName, expected: %i, got: %i", SDL_SCANCODE_SLEEP, scancode); + return TEST_COMPLETED; } -/* +/* * Local helper to check for the invalid scancode error message */ void _checkInvalidNameError() { const char *expectedError = "Parameter 'name' is invalid"; - const char *error; + const char *error; error = SDL_GetError(); SDLTest_AssertPass("Call to SDL_GetError()"); SDLTest_AssertCheck(error != NULL, "Validate that error message was not NULL"); if (error != NULL) { - SDLTest_AssertCheck(SDL_strcmp(error, expectedError) == 0, + SDLTest_AssertCheck(SDL_strcmp(error, expectedError) == 0, "Validate error message, expected: '%s', got: '%s'", expectedError, error); SDL_ClearError(); SDLTest_AssertPass("Call to SDL_ClearError()"); @@ -607,13 +607,13 @@ _checkInvalidNameError() /** * @brief Check call to SDL_GetScancodeFromName with invalid data - * + * * @sa http://wiki.libsdl.org/moin.cgi/SDL_GetScancodeFromName * @sa http://wiki.libsdl.org/moin.cgi/SDL_Keycode */ int keyboard_getScancodeFromNameNegative(void *arg) -{ +{ char *name; SDL_Scancode scancode; @@ -626,13 +626,13 @@ keyboard_getScancodeFromNameNegative(void *arg) SDLTest_Assert(name != NULL, "Check that random name is not NULL"); if (name == NULL) { return TEST_ABORTED; - } + } scancode = SDL_GetScancodeFromName((const char *)name); SDLTest_AssertPass("Call to SDL_GetScancodeFromName('%s')", name); SDL_free(name); SDLTest_AssertCheck(scancode == SDL_SCANCODE_UNKNOWN, "Validate return value from SDL_GetScancodeFromName, expected: %i, got: %i", SDL_SCANCODE_UNKNOWN, scancode); _checkInvalidNameError(); - + /* Zero length string input */ name = ""; scancode = SDL_GetScancodeFromName((const char *)name); @@ -646,7 +646,7 @@ keyboard_getScancodeFromNameNegative(void *arg) SDLTest_AssertPass("Call to SDL_GetScancodeFromName(NULL)"); SDLTest_AssertCheck(scancode == SDL_SCANCODE_UNKNOWN, "Validate return value from SDL_GetScancodeFromName, expected: %i, got: %i", SDL_SCANCODE_UNKNOWN, scancode); _checkInvalidNameError(); - + return TEST_COMPLETED; } @@ -656,58 +656,58 @@ keyboard_getScancodeFromNameNegative(void *arg) /* Keyboard test cases */ static const SDLTest_TestCaseReference keyboardTest1 = - { (SDLTest_TestCaseFp)keyboard_getKeyboardState, "keyboard_getKeyboardState", "Check call to SDL_GetKeyboardState with and without numkeys reference", TEST_ENABLED }; + { (SDLTest_TestCaseFp)keyboard_getKeyboardState, "keyboard_getKeyboardState", "Check call to SDL_GetKeyboardState with and without numkeys reference", TEST_ENABLED }; static const SDLTest_TestCaseReference keyboardTest2 = - { (SDLTest_TestCaseFp)keyboard_getKeyboardFocus, "keyboard_getKeyboardFocus", "Check call to SDL_GetKeyboardFocus", TEST_ENABLED }; + { (SDLTest_TestCaseFp)keyboard_getKeyboardFocus, "keyboard_getKeyboardFocus", "Check call to SDL_GetKeyboardFocus", TEST_ENABLED }; static const SDLTest_TestCaseReference keyboardTest3 = - { (SDLTest_TestCaseFp)keyboard_getKeyFromName, "keyboard_getKeyFromName", "Check call to SDL_GetKeyFromName for known, unknown and invalid name", TEST_ENABLED }; + { (SDLTest_TestCaseFp)keyboard_getKeyFromName, "keyboard_getKeyFromName", "Check call to SDL_GetKeyFromName for known, unknown and invalid name", TEST_ENABLED }; static const SDLTest_TestCaseReference keyboardTest4 = - { (SDLTest_TestCaseFp)keyboard_getKeyFromScancode, "keyboard_getKeyFromScancode", "Check call to SDL_GetKeyFromScancode", TEST_ENABLED }; + { (SDLTest_TestCaseFp)keyboard_getKeyFromScancode, "keyboard_getKeyFromScancode", "Check call to SDL_GetKeyFromScancode", TEST_ENABLED }; static const SDLTest_TestCaseReference keyboardTest5 = - { (SDLTest_TestCaseFp)keyboard_getKeyName, "keyboard_getKeyName", "Check call to SDL_GetKeyName", TEST_ENABLED }; + { (SDLTest_TestCaseFp)keyboard_getKeyName, "keyboard_getKeyName", "Check call to SDL_GetKeyName", TEST_ENABLED }; static const SDLTest_TestCaseReference keyboardTest6 = - { (SDLTest_TestCaseFp)keyboard_getSetModState, "keyboard_getSetModState", "Check call to SDL_GetModState and SDL_SetModState", TEST_ENABLED }; + { (SDLTest_TestCaseFp)keyboard_getSetModState, "keyboard_getSetModState", "Check call to SDL_GetModState and SDL_SetModState", TEST_ENABLED }; static const SDLTest_TestCaseReference keyboardTest7 = - { (SDLTest_TestCaseFp)keyboard_startStopTextInput, "keyboard_startStopTextInput", "Check call to SDL_StartTextInput and SDL_StopTextInput", TEST_ENABLED }; + { (SDLTest_TestCaseFp)keyboard_startStopTextInput, "keyboard_startStopTextInput", "Check call to SDL_StartTextInput and SDL_StopTextInput", TEST_ENABLED }; static const SDLTest_TestCaseReference keyboardTest8 = - { (SDLTest_TestCaseFp)keyboard_setTextInputRect, "keyboard_setTextInputRect", "Check call to SDL_SetTextInputRect", TEST_ENABLED }; + { (SDLTest_TestCaseFp)keyboard_setTextInputRect, "keyboard_setTextInputRect", "Check call to SDL_SetTextInputRect", TEST_ENABLED }; static const SDLTest_TestCaseReference keyboardTest9 = - { (SDLTest_TestCaseFp)keyboard_setTextInputRectNegative, "keyboard_setTextInputRectNegative", "Check call to SDL_SetTextInputRect with invalid data", TEST_ENABLED }; + { (SDLTest_TestCaseFp)keyboard_setTextInputRectNegative, "keyboard_setTextInputRectNegative", "Check call to SDL_SetTextInputRect with invalid data", TEST_ENABLED }; static const SDLTest_TestCaseReference keyboardTest10 = - { (SDLTest_TestCaseFp)keyboard_getScancodeFromKey, "keyboard_getScancodeFromKey", "Check call to SDL_GetScancodeFromKey", TEST_ENABLED }; + { (SDLTest_TestCaseFp)keyboard_getScancodeFromKey, "keyboard_getScancodeFromKey", "Check call to SDL_GetScancodeFromKey", TEST_ENABLED }; static const SDLTest_TestCaseReference keyboardTest11 = - { (SDLTest_TestCaseFp)keyboard_getScancodeFromName, "keyboard_getScancodeFromName", "Check call to SDL_GetScancodeFromName", TEST_ENABLED }; + { (SDLTest_TestCaseFp)keyboard_getScancodeFromName, "keyboard_getScancodeFromName", "Check call to SDL_GetScancodeFromName", TEST_ENABLED }; static const SDLTest_TestCaseReference keyboardTest12 = - { (SDLTest_TestCaseFp)keyboard_getScancodeFromNameNegative, "keyboard_getScancodeFromNameNegative", "Check call to SDL_GetScancodeFromName with invalid data", TEST_ENABLED }; + { (SDLTest_TestCaseFp)keyboard_getScancodeFromNameNegative, "keyboard_getScancodeFromNameNegative", "Check call to SDL_GetScancodeFromName with invalid data", TEST_ENABLED }; static const SDLTest_TestCaseReference keyboardTest13 = - { (SDLTest_TestCaseFp)keyboard_getKeyNameNegative, "keyboard_getKeyNameNegative", "Check call to SDL_GetKeyName with invalid data", TEST_ENABLED }; + { (SDLTest_TestCaseFp)keyboard_getKeyNameNegative, "keyboard_getKeyNameNegative", "Check call to SDL_GetKeyName with invalid data", TEST_ENABLED }; static const SDLTest_TestCaseReference keyboardTest14 = - { (SDLTest_TestCaseFp)keyboard_getScancodeNameNegative, "keyboard_getScancodeNameNegative", "Check call to SDL_GetScancodeName with invalid data", TEST_ENABLED }; + { (SDLTest_TestCaseFp)keyboard_getScancodeNameNegative, "keyboard_getScancodeNameNegative", "Check call to SDL_GetScancodeName with invalid data", TEST_ENABLED }; /* Sequence of Keyboard test cases */ static const SDLTest_TestCaseReference *keyboardTests[] = { - &keyboardTest1, &keyboardTest2, &keyboardTest3, &keyboardTest4, &keyboardTest5, &keyboardTest6, - &keyboardTest7, &keyboardTest8, &keyboardTest9, &keyboardTest10, &keyboardTest11, &keyboardTest12, - &keyboardTest13, &keyboardTest14, NULL + &keyboardTest1, &keyboardTest2, &keyboardTest3, &keyboardTest4, &keyboardTest5, &keyboardTest6, + &keyboardTest7, &keyboardTest8, &keyboardTest9, &keyboardTest10, &keyboardTest11, &keyboardTest12, + &keyboardTest13, &keyboardTest14, NULL }; /* Keyboard test suite (global) */ SDLTest_TestSuiteReference keyboardTestSuite = { - "Keyboard", - NULL, - keyboardTests, - NULL + "Keyboard", + NULL, + keyboardTests, + NULL }; diff --git a/test/testautomation_main.c b/test/testautomation_main.c index a39bf3ca1..f695903c2 100644 --- a/test/testautomation_main.c +++ b/test/testautomation_main.c @@ -126,32 +126,32 @@ static int main_testImpliedJoystickQuit (void *arg) } static const SDLTest_TestCaseReference mainTest1 = - { (SDLTest_TestCaseFp)main_testInitQuitJoystickHaptic, "main_testInitQuitJoystickHaptic", "Tests SDL_Init/Quit of Joystick and Haptic subsystem", TEST_ENABLED}; + { (SDLTest_TestCaseFp)main_testInitQuitJoystickHaptic, "main_testInitQuitJoystickHaptic", "Tests SDL_Init/Quit of Joystick and Haptic subsystem", TEST_ENABLED}; static const SDLTest_TestCaseReference mainTest2 = - { (SDLTest_TestCaseFp)main_testInitQuitSubSystem, "main_testInitQuitSubSystem", "Tests SDL_InitSubSystem/QuitSubSystem", TEST_ENABLED}; + { (SDLTest_TestCaseFp)main_testInitQuitSubSystem, "main_testInitQuitSubSystem", "Tests SDL_InitSubSystem/QuitSubSystem", TEST_ENABLED}; static const SDLTest_TestCaseReference mainTest3 = - { (SDLTest_TestCaseFp)main_testImpliedJoystickInit, "main_testImpliedJoystickInit", "Tests that init for gamecontroller properly implies joystick", TEST_ENABLED}; + { (SDLTest_TestCaseFp)main_testImpliedJoystickInit, "main_testImpliedJoystickInit", "Tests that init for gamecontroller properly implies joystick", TEST_ENABLED}; static const SDLTest_TestCaseReference mainTest4 = - { (SDLTest_TestCaseFp)main_testImpliedJoystickQuit, "main_testImpliedJoystickQuit", "Tests that quit for gamecontroller doesn't quit joystick if you inited it explicitly", TEST_ENABLED}; + { (SDLTest_TestCaseFp)main_testImpliedJoystickQuit, "main_testImpliedJoystickQuit", "Tests that quit for gamecontroller doesn't quit joystick if you inited it explicitly", TEST_ENABLED}; /* Sequence of Platform test cases */ static const SDLTest_TestCaseReference *mainTests[] = { - &mainTest1, - &mainTest2, - &mainTest3, - &mainTest4, - NULL + &mainTest1, + &mainTest2, + &mainTest3, + &mainTest4, + NULL }; /* Platform test suite (global) */ SDLTest_TestSuiteReference mainTestSuite = { - "Main", - NULL, - mainTests, - NULL + "Main", + NULL, + mainTests, + NULL }; /* vi: set ts=4 sw=4 expandtab: */ diff --git a/test/testautomation_mouse.c b/test/testautomation_mouse.c index 2f7eb1b8e..57cadee2e 100644 --- a/test/testautomation_mouse.c +++ b/test/testautomation_mouse.c @@ -15,17 +15,17 @@ /* Helper to evaluate state returned from SDL_GetMouseState */ int _mouseStateCheck(Uint32 state) { - return (state == 0) || - (state == SDL_BUTTON(SDL_BUTTON_LEFT)) || - (state == SDL_BUTTON(SDL_BUTTON_MIDDLE)) || - (state == SDL_BUTTON(SDL_BUTTON_RIGHT)) || - (state == SDL_BUTTON(SDL_BUTTON_X1)) || + return (state == 0) || + (state == SDL_BUTTON(SDL_BUTTON_LEFT)) || + (state == SDL_BUTTON(SDL_BUTTON_MIDDLE)) || + (state == SDL_BUTTON(SDL_BUTTON_RIGHT)) || + (state == SDL_BUTTON(SDL_BUTTON_X1)) || (state == SDL_BUTTON(SDL_BUTTON_X2)); } /** * @brief Check call to SDL_GetMouseState - * + * */ int mouse_getMouseState(void *arg) @@ -38,7 +38,7 @@ mouse_getMouseState(void *arg) SDL_PumpEvents(); SDLTest_AssertPass("Call to SDL_PumpEvents()"); - /* Case where x, y pointer is NULL */ + /* Case where x, y pointer is NULL */ state = SDL_GetMouseState(NULL, NULL); SDLTest_AssertPass("Call to SDL_GetMouseState(NULL, NULL)"); SDLTest_AssertCheck(_mouseStateCheck(state), "Validate state returned from function, got: %i", state); @@ -65,13 +65,13 @@ mouse_getMouseState(void *arg) SDLTest_AssertCheck(x > INT_MIN, "Validate that value of x is > INT_MIN, got: %i", x); SDLTest_AssertCheck(y > INT_MIN, "Validate that value of y is > INT_MIN, got: %i", y); SDLTest_AssertCheck(_mouseStateCheck(state), "Validate state returned from function, got: %i", state); - + return TEST_COMPLETED; } /** * @brief Check call to SDL_GetRelativeMouseState - * + * */ int mouse_getRelativeMouseState(void *arg) @@ -84,7 +84,7 @@ mouse_getRelativeMouseState(void *arg) SDL_PumpEvents(); SDLTest_AssertPass("Call to SDL_PumpEvents()"); - /* Case where x, y pointer is NULL */ + /* Case where x, y pointer is NULL */ state = SDL_GetRelativeMouseState(NULL, NULL); SDLTest_AssertPass("Call to SDL_GetRelativeMouseState(NULL, NULL)"); SDLTest_AssertCheck(_mouseStateCheck(state), "Validate state returned from function, got: %i", state); @@ -111,7 +111,7 @@ mouse_getRelativeMouseState(void *arg) SDLTest_AssertCheck(x > INT_MIN, "Validate that value of x is > INT_MIN, got: %i", x); SDLTest_AssertCheck(y > INT_MIN, "Validate that value of y is > INT_MIN, got: %i", y); SDLTest_AssertCheck(_mouseStateCheck(state), "Validate state returned from function, got: %i", state); - + return TEST_COMPLETED; } @@ -191,225 +191,225 @@ static SDL_Cursor *_initArrowCursor(const char *image[]) /** * @brief Check call to SDL_CreateCursor and SDL_FreeCursor - * + * * @sa http://wiki.libsdl.org/moin.cgi/SDL_CreateCursor * @sa http://wiki.libsdl.org/moin.cgi/SDL_FreeCursor */ int mouse_createFreeCursor(void *arg) { - SDL_Cursor *cursor; + SDL_Cursor *cursor; - /* Create a cursor */ - cursor = _initArrowCursor(_mouseArrowData); + /* Create a cursor */ + cursor = _initArrowCursor(_mouseArrowData); SDLTest_AssertPass("Call to SDL_CreateCursor()"); - SDLTest_AssertCheck(cursor != NULL, "Validate result from SDL_CreateCursor() is not NULL"); - if (cursor == NULL) { - return TEST_ABORTED; - } + SDLTest_AssertCheck(cursor != NULL, "Validate result from SDL_CreateCursor() is not NULL"); + if (cursor == NULL) { + return TEST_ABORTED; + } - /* Free cursor again */ - SDL_FreeCursor(cursor); - SDLTest_AssertPass("Call to SDL_FreeCursor()"); + /* Free cursor again */ + SDL_FreeCursor(cursor); + SDLTest_AssertPass("Call to SDL_FreeCursor()"); - return TEST_COMPLETED; + return TEST_COMPLETED; } /** * @brief Check call to SDL_CreateColorCursor and SDL_FreeCursor - * + * * @sa http://wiki.libsdl.org/moin.cgi/SDL_CreateColorCursor * @sa http://wiki.libsdl.org/moin.cgi/SDL_FreeCursor */ int mouse_createFreeColorCursor(void *arg) { - SDL_Surface *face; - SDL_Cursor *cursor; + SDL_Surface *face; + SDL_Cursor *cursor; - /* Get sample surface */ - face = SDLTest_ImageFace(); - SDLTest_AssertCheck(face != NULL, "Validate sample input image is not NULL"); - if (face == NULL) return TEST_ABORTED; - - /* Create a color cursor from surface */ - cursor = SDL_CreateColorCursor(face, 0, 0); + /* Get sample surface */ + face = SDLTest_ImageFace(); + SDLTest_AssertCheck(face != NULL, "Validate sample input image is not NULL"); + if (face == NULL) return TEST_ABORTED; + + /* Create a color cursor from surface */ + cursor = SDL_CreateColorCursor(face, 0, 0); SDLTest_AssertPass("Call to SDL_CreateColorCursor()"); - SDLTest_AssertCheck(cursor != NULL, "Validate result from SDL_CreateColorCursor() is not NULL"); - if (cursor == NULL) { - SDL_FreeSurface(face); - return TEST_ABORTED; - } + SDLTest_AssertCheck(cursor != NULL, "Validate result from SDL_CreateColorCursor() is not NULL"); + if (cursor == NULL) { + SDL_FreeSurface(face); + return TEST_ABORTED; + } - /* Free cursor again */ - SDL_FreeCursor(cursor); - SDLTest_AssertPass("Call to SDL_FreeCursor()"); + /* Free cursor again */ + SDL_FreeCursor(cursor); + SDLTest_AssertPass("Call to SDL_FreeCursor()"); - /* Clean up */ - SDL_FreeSurface(face); - - return TEST_COMPLETED; + /* Clean up */ + SDL_FreeSurface(face); + + return TEST_COMPLETED; } /* Helper that changes cursor visibility */ void _changeCursorVisibility(int state) { - int oldState; - int newState; - int result; + int oldState; + int newState; + int result; oldState = SDL_ShowCursor(SDL_QUERY); - SDLTest_AssertPass("Call to SDL_ShowCursor(SDL_QUERY)"); + SDLTest_AssertPass("Call to SDL_ShowCursor(SDL_QUERY)"); result = SDL_ShowCursor(state); - SDLTest_AssertPass("Call to SDL_ShowCursor(%s)", (state == SDL_ENABLE) ? "SDL_ENABLE" : "SDL_DISABLE"); - SDLTest_AssertCheck(result == oldState, "Validate result from SDL_ShowCursor(%s), expected: %i, got: %i", - (state == SDL_ENABLE) ? "SDL_ENABLE" : "SDL_DISABLE", oldState, result); - - newState = SDL_ShowCursor(SDL_QUERY); - SDLTest_AssertPass("Call to SDL_ShowCursor(SDL_QUERY)"); - SDLTest_AssertCheck(state == newState, "Validate new state, expected: %i, got: %i", - state, newState); + SDLTest_AssertPass("Call to SDL_ShowCursor(%s)", (state == SDL_ENABLE) ? "SDL_ENABLE" : "SDL_DISABLE"); + SDLTest_AssertCheck(result == oldState, "Validate result from SDL_ShowCursor(%s), expected: %i, got: %i", + (state == SDL_ENABLE) ? "SDL_ENABLE" : "SDL_DISABLE", oldState, result); + + newState = SDL_ShowCursor(SDL_QUERY); + SDLTest_AssertPass("Call to SDL_ShowCursor(SDL_QUERY)"); + SDLTest_AssertCheck(state == newState, "Validate new state, expected: %i, got: %i", + state, newState); } /** * @brief Check call to SDL_ShowCursor - * + * * @sa http://wiki.libsdl.org/moin.cgi/SDL_ShowCursor */ int mouse_showCursor(void *arg) { - int currentState; + int currentState; - /* Get current state */ - currentState = SDL_ShowCursor(SDL_QUERY); - SDLTest_AssertPass("Call to SDL_ShowCursor(SDL_QUERY)"); - SDLTest_AssertCheck(currentState == SDL_DISABLE || currentState == SDL_ENABLE, - "Validate result is %i or %i, got: %i", SDL_DISABLE, SDL_ENABLE, currentState); - if (currentState == SDL_DISABLE) { - /* Show the cursor, then hide it again */ - _changeCursorVisibility(SDL_ENABLE); - _changeCursorVisibility(SDL_DISABLE); - } else if (currentState == SDL_ENABLE) { - /* Hide the cursor, then show it again */ - _changeCursorVisibility(SDL_DISABLE); - _changeCursorVisibility(SDL_ENABLE); - } else { - return TEST_ABORTED; - } + /* Get current state */ + currentState = SDL_ShowCursor(SDL_QUERY); + SDLTest_AssertPass("Call to SDL_ShowCursor(SDL_QUERY)"); + SDLTest_AssertCheck(currentState == SDL_DISABLE || currentState == SDL_ENABLE, + "Validate result is %i or %i, got: %i", SDL_DISABLE, SDL_ENABLE, currentState); + if (currentState == SDL_DISABLE) { + /* Show the cursor, then hide it again */ + _changeCursorVisibility(SDL_ENABLE); + _changeCursorVisibility(SDL_DISABLE); + } else if (currentState == SDL_ENABLE) { + /* Hide the cursor, then show it again */ + _changeCursorVisibility(SDL_DISABLE); + _changeCursorVisibility(SDL_ENABLE); + } else { + return TEST_ABORTED; + } - return TEST_COMPLETED; + return TEST_COMPLETED; } /** * @brief Check call to SDL_SetCursor - * + * * @sa http://wiki.libsdl.org/moin.cgi/SDL_SetCursor */ int mouse_setCursor(void *arg) { - SDL_Cursor *cursor; + SDL_Cursor *cursor; - /* Create a cursor */ - cursor = _initArrowCursor(_mouseArrowData); + /* Create a cursor */ + cursor = _initArrowCursor(_mouseArrowData); SDLTest_AssertPass("Call to SDL_CreateCursor()"); - SDLTest_AssertCheck(cursor != NULL, "Validate result from SDL_CreateCursor() is not NULL"); - if (cursor == NULL) { - return TEST_ABORTED; - } + SDLTest_AssertCheck(cursor != NULL, "Validate result from SDL_CreateCursor() is not NULL"); + if (cursor == NULL) { + return TEST_ABORTED; + } - /* Set the arrow cursor */ - SDL_SetCursor(cursor); - SDLTest_AssertPass("Call to SDL_SetCursor(cursor)"); + /* Set the arrow cursor */ + SDL_SetCursor(cursor); + SDLTest_AssertPass("Call to SDL_SetCursor(cursor)"); - /* Force redraw */ - SDL_SetCursor(NULL); - SDLTest_AssertPass("Call to SDL_SetCursor(NULL)"); + /* Force redraw */ + SDL_SetCursor(NULL); + SDLTest_AssertPass("Call to SDL_SetCursor(NULL)"); - /* Free cursor again */ - SDL_FreeCursor(cursor); - SDLTest_AssertPass("Call to SDL_FreeCursor()"); + /* Free cursor again */ + SDL_FreeCursor(cursor); + SDLTest_AssertPass("Call to SDL_FreeCursor()"); - return TEST_COMPLETED; + return TEST_COMPLETED; } /** * @brief Check call to SDL_GetCursor - * + * * @sa http://wiki.libsdl.org/moin.cgi/SDL_GetCursor */ int mouse_getCursor(void *arg) { - SDL_Cursor *cursor; + SDL_Cursor *cursor; - /* Get current cursor */ - cursor = SDL_GetCursor(); + /* Get current cursor */ + cursor = SDL_GetCursor(); SDLTest_AssertPass("Call to SDL_GetCursor()"); - SDLTest_AssertCheck(cursor != NULL, "Validate result from SDL_GetCursor() is not NULL"); + SDLTest_AssertCheck(cursor != NULL, "Validate result from SDL_GetCursor() is not NULL"); - return TEST_COMPLETED; + return TEST_COMPLETED; } /** * @brief Check call to SDL_GetRelativeMouseMode and SDL_SetRelativeMouseMode - * + * * @sa http://wiki.libsdl.org/moin.cgi/SDL_GetRelativeMouseMode * @sa http://wiki.libsdl.org/moin.cgi/SDL_SetRelativeMouseMode */ int mouse_getSetRelativeMouseMode(void *arg) { - int result; + int result; int i; - SDL_bool initialState; - SDL_bool currentState; + SDL_bool initialState; + SDL_bool currentState; - /* Capture original state so we can revert back to it later */ - initialState = SDL_GetRelativeMouseMode(); + /* Capture original state so we can revert back to it later */ + initialState = SDL_GetRelativeMouseMode(); SDLTest_AssertPass("Call to SDL_GetRelativeMouseMode()"); /* Repeat twice to check D->D transition */ for (i=0; i<2; i++) { - /* Disable - should always be supported */ + /* Disable - should always be supported */ result = SDL_SetRelativeMouseMode(SDL_FALSE); SDLTest_AssertPass("Call to SDL_SetRelativeMouseMode(FALSE)"); SDLTest_AssertCheck(result == 0, "Validate result value from SDL_SetRelativeMouseMode, expected: 0, got: %i", result); - currentState = SDL_GetRelativeMouseMode(); + currentState = SDL_GetRelativeMouseMode(); SDLTest_AssertPass("Call to SDL_GetRelativeMouseMode()"); SDLTest_AssertCheck(currentState == SDL_FALSE, "Validate current state is FALSE, got: %i", currentState); } - + /* Repeat twice to check D->E->E transition */ for (i=0; i<2; i++) { - /* Enable - may not be supported */ + /* Enable - may not be supported */ result = SDL_SetRelativeMouseMode(SDL_TRUE); SDLTest_AssertPass("Call to SDL_SetRelativeMouseMode(TRUE)"); if (result != -1) { SDLTest_AssertCheck(result == 0, "Validate result value from SDL_SetRelativeMouseMode, expected: 0, got: %i", result); - currentState = SDL_GetRelativeMouseMode(); + currentState = SDL_GetRelativeMouseMode(); SDLTest_AssertPass("Call to SDL_GetRelativeMouseMode()"); SDLTest_AssertCheck(currentState == SDL_TRUE, "Validate current state is TRUE, got: %i", currentState); } } - /* Disable to check E->D transition */ + /* Disable to check E->D transition */ result = SDL_SetRelativeMouseMode(SDL_FALSE); SDLTest_AssertPass("Call to SDL_SetRelativeMouseMode(FALSE)"); SDLTest_AssertCheck(result == 0, "Validate result value from SDL_SetRelativeMouseMode, expected: 0, got: %i", result); - currentState = SDL_GetRelativeMouseMode(); + currentState = SDL_GetRelativeMouseMode(); SDLTest_AssertPass("Call to SDL_GetRelativeMouseMode()"); SDLTest_AssertCheck(currentState == SDL_FALSE, "Validate current state is FALSE, got: %i", currentState); - + /* Revert to original state - ignore result */ result = SDL_SetRelativeMouseMode(initialState); - return TEST_COMPLETED; + return TEST_COMPLETED; } -#define MOUSE_TESTWINDOW_WIDTH 320 +#define MOUSE_TESTWINDOW_WIDTH 320 #define MOUSE_TESTWINDOW_HEIGHT 200 /** @@ -426,11 +426,11 @@ SDL_Window *_createMouseSuiteTestWindow() } /* - * Destroy test window + * Destroy test window */ void _destroyMouseSuiteTestWindow(SDL_Window *window) { - if (window != NULL) { + if (window != NULL) { SDL_DestroyWindow(window); window = NULL; SDLTest_AssertPass("SDL_DestroyWindow()"); @@ -439,156 +439,156 @@ void _destroyMouseSuiteTestWindow(SDL_Window *window) /** * @brief Check call to SDL_WarpMouseInWindow - * + * * @sa http://wiki.libsdl.org/moin.cgi/SDL_WarpMouseInWindow */ int mouse_warpMouseInWindow(void *arg) { - const int w = MOUSE_TESTWINDOW_WIDTH, h = MOUSE_TESTWINDOW_HEIGHT; - int numPositions = 6; - int xPositions[] = {-1, 0, 1, w-1, w, w+1 }; - int yPositions[] = {-1, 0, 1, h-1, h, h+1 }; - int x, y, i, j; - SDL_Window *window; - - /* Create test window */ - window = _createMouseSuiteTestWindow(); - if (window == NULL) return TEST_ABORTED; + const int w = MOUSE_TESTWINDOW_WIDTH, h = MOUSE_TESTWINDOW_HEIGHT; + int numPositions = 6; + int xPositions[] = {-1, 0, 1, w-1, w, w+1 }; + int yPositions[] = {-1, 0, 1, h-1, h, h+1 }; + int x, y, i, j; + SDL_Window *window; - /* Mouse to random position inside window */ - x = SDLTest_RandomIntegerInRange(1, w-1); - y = SDLTest_RandomIntegerInRange(1, h-1); - SDL_WarpMouseInWindow(window, x, y); - SDLTest_AssertPass("SDL_WarpMouseInWindow(...,%i,%i)", x, y); + /* Create test window */ + window = _createMouseSuiteTestWindow(); + if (window == NULL) return TEST_ABORTED; + + /* Mouse to random position inside window */ + x = SDLTest_RandomIntegerInRange(1, w-1); + y = SDLTest_RandomIntegerInRange(1, h-1); + SDL_WarpMouseInWindow(window, x, y); + SDLTest_AssertPass("SDL_WarpMouseInWindow(...,%i,%i)", x, y); /* Same position again */ - SDL_WarpMouseInWindow(window, x, y); - SDLTest_AssertPass("SDL_WarpMouseInWindow(...,%i,%i)", x, y); + SDL_WarpMouseInWindow(window, x, y); + SDLTest_AssertPass("SDL_WarpMouseInWindow(...,%i,%i)", x, y); - /* Mouse to various boundary positions */ - for (i=0; iformat == format, "Verify value of result.format; expected: %u, got %u", format, result->format); - SDLTest_AssertCheck(result->BitsPerPixel == 0, "Verify value of result.BitsPerPixel; expected: 0, got %u", result->BitsPerPixel); - SDLTest_AssertCheck(result->BytesPerPixel == 0, "Verify value of result.BytesPerPixel; expected: 0, got %u", result->BytesPerPixel); + SDLTest_AssertCheck(result->format == format, "Verify value of result.format; expected: %u, got %u", format, result->format); + SDLTest_AssertCheck(result->BitsPerPixel == 0, "Verify value of result.BitsPerPixel; expected: 0, got %u", result->BitsPerPixel); + SDLTest_AssertCheck(result->BytesPerPixel == 0, "Verify value of result.BytesPerPixel; expected: 0, got %u", result->BytesPerPixel); masks = result->Rmask | result->Gmask | result->Bmask | result->Amask; SDLTest_AssertCheck(masks == 0, "Verify value of result.[RGBA]mask combined; expected: 0, got %u", masks); - + /* Deallocate again */ SDL_FreeFormat(result); - SDLTest_AssertPass("Call to SDL_FreeFormat()"); + SDLTest_AssertPass("Call to SDL_FreeFormat()"); } /* RGB formats */ for (i = 0; i < _numRGBPixelFormats; i++) { format = _RGBPixelFormats[i]; SDLTest_Log("RGB Format: %s (%u)", _RGBPixelFormatsVerbose[i], format); - + /* Allocate format */ result = SDL_AllocFormat(format); SDLTest_AssertPass("Call to SDL_AllocFormat()"); - SDLTest_AssertCheck(result != NULL, "Verify result is not NULL"); + SDLTest_AssertCheck(result != NULL, "Verify result is not NULL"); if (result != NULL) { - SDLTest_AssertCheck(result->format == format, "Verify value of result.format; expected: %u, got %u", format, result->format); - SDLTest_AssertCheck(result->BitsPerPixel > 0, "Verify value of result.BitsPerPixel; expected: >0, got %u", result->BitsPerPixel); - SDLTest_AssertCheck(result->BytesPerPixel > 0, "Verify value of result.BytesPerPixel; expected: >0, got %u", result->BytesPerPixel); - if (result->palette != NULL) { + SDLTest_AssertCheck(result->format == format, "Verify value of result.format; expected: %u, got %u", format, result->format); + SDLTest_AssertCheck(result->BitsPerPixel > 0, "Verify value of result.BitsPerPixel; expected: >0, got %u", result->BitsPerPixel); + SDLTest_AssertCheck(result->BytesPerPixel > 0, "Verify value of result.BytesPerPixel; expected: >0, got %u", result->BytesPerPixel); + if (result->palette != NULL) { masks = result->Rmask | result->Gmask | result->Bmask | result->Amask; SDLTest_AssertCheck(masks > 0, "Verify value of result.[RGBA]mask combined; expected: >0, got %u", masks); } - + /* Deallocate again */ SDL_FreeFormat(result); - SDLTest_AssertPass("Call to SDL_FreeFormat()"); + SDLTest_AssertPass("Call to SDL_FreeFormat()"); } } @@ -177,28 +177,28 @@ pixels_allocFreeFormat(void *arg) for (i = 0; i < _numNonRGBPixelFormats; i++) { format = _nonRGBPixelFormats[i]; SDLTest_Log("non-RGB Format: %s (%u)", _nonRGBPixelFormatsVerbose[i], format); - + /* Try to allocate format */ result = SDL_AllocFormat(format); SDLTest_AssertPass("Call to SDL_AllocFormat()"); - SDLTest_AssertCheck(result == NULL, "Verify result is NULL"); + SDLTest_AssertCheck(result == NULL, "Verify result is NULL"); } - + /* Negative cases */ - - /* Invalid Formats */ + + /* Invalid Formats */ for (i = 0; i < _numInvalidPixelFormats; i++) { SDL_ClearError(); SDLTest_AssertPass("Call to SDL_ClearError()"); format = _invalidPixelFormats[i]; result = SDL_AllocFormat(format); SDLTest_AssertPass("Call to SDL_AllocFormat(%u)", format); - SDLTest_AssertCheck(result == NULL, "Verify result is NULL"); + SDLTest_AssertCheck(result == NULL, "Verify result is NULL"); error = SDL_GetError(); SDLTest_AssertPass("Call to SDL_GetError()"); SDLTest_AssertCheck(error != NULL, "Validate that error message was not NULL"); if (error != NULL) { - SDLTest_AssertCheck(SDL_strcmp(error, expectedError) == 0, + SDLTest_AssertCheck(SDL_strcmp(error, expectedError) == 0, "Validate error message, expected: '%s', got: '%s'", expectedError, error); } } @@ -212,10 +212,10 @@ pixels_allocFreeFormat(void *arg) SDLTest_AssertPass("Call to SDL_GetError()"); SDLTest_AssertCheck(error != NULL, "Validate that error message was not NULL"); if (error != NULL) { - SDLTest_AssertCheck(SDL_strcmp(error, expectedError) == 0, + SDLTest_AssertCheck(SDL_strcmp(error, expectedError) == 0, "Validate error message, expected: '%s', got: '%s'", expectedError, error); } - + return TEST_COMPLETED; } @@ -228,7 +228,7 @@ int pixels_getPixelFormatName(void *arg) { const char *unknownFormat = "SDL_PIXELFORMAT_UNKNOWN"; - const char *error; + const char *error; int i; Uint32 format; char* result; @@ -236,14 +236,14 @@ pixels_getPixelFormatName(void *arg) /* Blank/undefined format */ format = 0; SDLTest_Log("RGB Format: %s (%u)", unknownFormat, format); - + /* Get name of format */ result = (char *)SDL_GetPixelFormatName(format); SDLTest_AssertPass("Call to SDL_GetPixelFormatName()"); - SDLTest_AssertCheck(result != NULL, "Verify result is not NULL"); + SDLTest_AssertCheck(result != NULL, "Verify result is not NULL"); if (result != NULL) { SDLTest_AssertCheck(SDL_strlen(result) > 0, "Verify result is non-empty"); - SDLTest_AssertCheck(SDL_strcmp(result, unknownFormat) == 0, + SDLTest_AssertCheck(SDL_strcmp(result, unknownFormat) == 0, "Verify result text; expected: %s, got %s", unknownFormat, result); } @@ -251,14 +251,14 @@ pixels_getPixelFormatName(void *arg) for (i = 0; i < _numRGBPixelFormats; i++) { format = _RGBPixelFormats[i]; SDLTest_Log("RGB Format: %s (%u)", _RGBPixelFormatsVerbose[i], format); - + /* Get name of format */ result = (char *)SDL_GetPixelFormatName(format); SDLTest_AssertPass("Call to SDL_GetPixelFormatName()"); - SDLTest_AssertCheck(result != NULL, "Verify result is not NULL"); + SDLTest_AssertCheck(result != NULL, "Verify result is not NULL"); if (result != NULL) { SDLTest_AssertCheck(SDL_strlen(result) > 0, "Verify result is non-empty"); - SDLTest_AssertCheck(SDL_strcmp(result, _RGBPixelFormatsVerbose[i]) == 0, + SDLTest_AssertCheck(SDL_strcmp(result, _RGBPixelFormatsVerbose[i]) == 0, "Verify result text; expected: %s, got %s", _RGBPixelFormatsVerbose[i], result); } } @@ -267,30 +267,30 @@ pixels_getPixelFormatName(void *arg) for (i = 0; i < _numNonRGBPixelFormats; i++) { format = _nonRGBPixelFormats[i]; SDLTest_Log("non-RGB Format: %s (%u)", _nonRGBPixelFormatsVerbose[i], format); - + /* Get name of format */ result = (char *)SDL_GetPixelFormatName(format); SDLTest_AssertPass("Call to SDL_GetPixelFormatName()"); - SDLTest_AssertCheck(result != NULL, "Verify result is not NULL"); + SDLTest_AssertCheck(result != NULL, "Verify result is not NULL"); if (result != NULL) { SDLTest_AssertCheck(SDL_strlen(result) > 0, "Verify result is non-empty"); - SDLTest_AssertCheck(SDL_strcmp(result, _nonRGBPixelFormatsVerbose[i]) == 0, + SDLTest_AssertCheck(SDL_strcmp(result, _nonRGBPixelFormatsVerbose[i]) == 0, "Verify result text; expected: %s, got %s", _nonRGBPixelFormatsVerbose[i], result); } } - + /* Negative cases */ - - /* Invalid Formats */ + + /* Invalid Formats */ SDL_ClearError(); SDLTest_AssertPass("Call to SDL_ClearError()"); for (i = 0; i < _numInvalidPixelFormats; i++) { format = _invalidPixelFormats[i]; result = (char *)SDL_GetPixelFormatName(format); SDLTest_AssertPass("Call to SDL_GetPixelFormatName(%u)", format); - SDLTest_AssertCheck(result != NULL, "Verify result is not NULL"); + SDLTest_AssertCheck(result != NULL, "Verify result is not NULL"); if (result != NULL) { - SDLTest_AssertCheck(SDL_strlen(result) > 0, + SDLTest_AssertCheck(SDL_strlen(result) > 0, "Verify result is non-empty; got: %s", result); SDLTest_AssertCheck(SDL_strcmp(result, _invalidPixelFormatsVerbose[i]) == 0, "Validate name is UNKNOWN, expected: '%s', got: '%s'", _invalidPixelFormatsVerbose[i], result); @@ -314,14 +314,14 @@ pixels_allocFreePalette(void *arg) { const char *expectedError1 = "Parameter 'ncolors' is invalid"; const char *expectedError2 = "Parameter 'palette' is invalid"; - const char *error; + const char *error; int variation; int i; int ncolors; SDL_Palette* result; /* Allocate palette */ - for (variation = 1; variation <= 3; variation++) { + for (variation = 1; variation <= 3; variation++) { switch (variation) { /* Just one color */ case 1: @@ -339,28 +339,28 @@ pixels_allocFreePalette(void *arg) result = SDL_AllocPalette(ncolors); SDLTest_AssertPass("Call to SDL_AllocPalette(%d)", ncolors); - SDLTest_AssertCheck(result != NULL, "Verify result is not NULL"); + SDLTest_AssertCheck(result != NULL, "Verify result is not NULL"); if (result != NULL) { - SDLTest_AssertCheck(result->ncolors == ncolors, "Verify value of result.ncolors; expected: %u, got %u", ncolors, result->ncolors); + SDLTest_AssertCheck(result->ncolors == ncolors, "Verify value of result.ncolors; expected: %u, got %u", ncolors, result->ncolors); if (result->ncolors > 0) { SDLTest_AssertCheck(result->colors != NULL, "Verify value of result.colors is not NULL"); if (result->colors != NULL) { for(i = 0; i < result->ncolors; i++) { - SDLTest_AssertCheck(result->colors[i].r == 255, "Verify value of result.colors[%d].r; expected: 255, got %u", i, result->colors[i].r); - SDLTest_AssertCheck(result->colors[i].g == 255, "Verify value of result.colors[%d].g; expected: 255, got %u", i, result->colors[i].g); - SDLTest_AssertCheck(result->colors[i].b == 255, "Verify value of result.colors[%d].b; expected: 255, got %u", i, result->colors[i].b); + SDLTest_AssertCheck(result->colors[i].r == 255, "Verify value of result.colors[%d].r; expected: 255, got %u", i, result->colors[i].r); + SDLTest_AssertCheck(result->colors[i].g == 255, "Verify value of result.colors[%d].g; expected: 255, got %u", i, result->colors[i].g); + SDLTest_AssertCheck(result->colors[i].b == 255, "Verify value of result.colors[%d].b; expected: 255, got %u", i, result->colors[i].b); } - } + } } - + /* Deallocate again */ SDL_FreePalette(result); - SDLTest_AssertPass("Call to SDL_FreePalette()"); + SDLTest_AssertPass("Call to SDL_FreePalette()"); } } /* Negative cases */ - + /* Invalid number of colors */ for (ncolors = 0; ncolors > -3; ncolors--) { SDL_ClearError(); @@ -372,7 +372,7 @@ pixels_allocFreePalette(void *arg) SDLTest_AssertPass("Call to SDL_GetError()"); SDLTest_AssertCheck(error != NULL, "Validate that error message was not NULL"); if (error != NULL) { - SDLTest_AssertCheck(SDL_strcmp(error, expectedError1) == 0, + SDLTest_AssertCheck(SDL_strcmp(error, expectedError1) == 0, "Validate error message, expected: '%s', got: '%s'", expectedError1, error); } } @@ -386,10 +386,10 @@ pixels_allocFreePalette(void *arg) SDLTest_AssertPass("Call to SDL_GetError()"); SDLTest_AssertCheck(error != NULL, "Validate that error message was not NULL"); if (error != NULL) { - SDLTest_AssertCheck(SDL_strcmp(error, expectedError2) == 0, + SDLTest_AssertCheck(SDL_strcmp(error, expectedError2) == 0, "Validate error message, expected: '%s', got: '%s'", expectedError2, error); } - + return TEST_COMPLETED; } @@ -403,7 +403,7 @@ pixels_calcGammaRamp(void *arg) { const char *expectedError1 = "Parameter 'gamma' is invalid"; const char *expectedError2 = "Parameter 'ramp' is invalid"; - const char *error; + const char *error; float gamma; Uint16 *ramp; int variation; @@ -415,29 +415,29 @@ pixels_calcGammaRamp(void *arg) ramp = (Uint16 *)SDL_malloc(256 * sizeof(Uint16)); SDLTest_AssertCheck(ramp != NULL, "Validate temp ramp array could be allocated"); if (ramp == NULL) return TEST_ABORTED; - + /* Make call with different gamma values */ for (variation = 0; variation < 4; variation++) { switch (variation) { /* gamma = 0 all black */ - case 0: + case 0: gamma = 0.0f; break; /* gamma = 1 identity */ case 1: gamma = 1.0f; break; - /* gamma = [0.2,0.8] normal range */ + /* gamma = [0.2,0.8] normal range */ case 2: gamma = 0.2f + 0.8f * SDLTest_RandomUnitFloat(); break; - /* gamma = >1.1 non-standard range */ + /* gamma = >1.1 non-standard range */ case 3: gamma = 1.1f + SDLTest_RandomUnitFloat(); break; } - /* Make call and check that values were updated */ + /* Make call and check that values were updated */ for (i = 0; i < 256; i++) ramp[i] = magic; SDL_CalculateGammaRamp(gamma, ramp); SDLTest_AssertPass("Call to SDL_CalculateGammaRamp(%f)", gamma); @@ -460,7 +460,7 @@ pixels_calcGammaRamp(void *arg) break; } } - + /* Negative cases */ SDL_ClearError(); SDLTest_AssertPass("Call to SDL_ClearError()"); @@ -472,7 +472,7 @@ pixels_calcGammaRamp(void *arg) SDLTest_AssertPass("Call to SDL_GetError()"); SDLTest_AssertCheck(error != NULL, "Validate that error message was not NULL"); if (error != NULL) { - SDLTest_AssertCheck(SDL_strcmp(error, expectedError1) == 0, + SDLTest_AssertCheck(SDL_strcmp(error, expectedError1) == 0, "Validate error message, expected: '%s', got: '%s'", expectedError1, error); } changed = 0; @@ -485,14 +485,14 @@ pixels_calcGammaRamp(void *arg) SDLTest_AssertPass("Call to SDL_GetError()"); SDLTest_AssertCheck(error != NULL, "Validate that error message was not NULL"); if (error != NULL) { - SDLTest_AssertCheck(SDL_strcmp(error, expectedError2) == 0, + SDLTest_AssertCheck(SDL_strcmp(error, expectedError2) == 0, "Validate error message, expected: '%s', got: '%s'", expectedError2, error); } - + /* Cleanup */ SDL_free(ramp); - - + + return TEST_COMPLETED; } @@ -500,26 +500,26 @@ pixels_calcGammaRamp(void *arg) /* Pixels test cases */ static const SDLTest_TestCaseReference pixelsTest1 = - { (SDLTest_TestCaseFp)pixels_allocFreeFormat, "pixels_allocFreeFormat", "Call to SDL_AllocFormat and SDL_FreeFormat", TEST_ENABLED }; + { (SDLTest_TestCaseFp)pixels_allocFreeFormat, "pixels_allocFreeFormat", "Call to SDL_AllocFormat and SDL_FreeFormat", TEST_ENABLED }; static const SDLTest_TestCaseReference pixelsTest2 = - { (SDLTest_TestCaseFp)pixels_allocFreePalette, "pixels_allocFreePalette", "Call to SDL_AllocPalette and SDL_FreePalette", TEST_ENABLED }; + { (SDLTest_TestCaseFp)pixels_allocFreePalette, "pixels_allocFreePalette", "Call to SDL_AllocPalette and SDL_FreePalette", TEST_ENABLED }; static const SDLTest_TestCaseReference pixelsTest3 = - { (SDLTest_TestCaseFp)pixels_calcGammaRamp, "pixels_calcGammaRamp", "Call to SDL_CalculateGammaRamp", TEST_ENABLED }; + { (SDLTest_TestCaseFp)pixels_calcGammaRamp, "pixels_calcGammaRamp", "Call to SDL_CalculateGammaRamp", TEST_ENABLED }; static const SDLTest_TestCaseReference pixelsTest4 = - { (SDLTest_TestCaseFp)pixels_getPixelFormatName, "pixels_getPixelFormatName", "Call to SDL_GetPixelFormatName", TEST_ENABLED }; + { (SDLTest_TestCaseFp)pixels_getPixelFormatName, "pixels_getPixelFormatName", "Call to SDL_GetPixelFormatName", TEST_ENABLED }; /* Sequence of Pixels test cases */ static const SDLTest_TestCaseReference *pixelsTests[] = { - &pixelsTest1, &pixelsTest2, &pixelsTest3, &pixelsTest4, NULL + &pixelsTest1, &pixelsTest2, &pixelsTest3, &pixelsTest4, NULL }; /* Pixels test suite (global) */ SDLTest_TestSuiteReference pixelsTestSuite = { - "Pixels", - NULL, - pixelsTests, - NULL + "Pixels", + NULL, + pixelsTests, + NULL }; diff --git a/test/testautomation_platform.c b/test/testautomation_platform.c index a77aad280..5ed2abad1 100644 --- a/test/testautomation_platform.c +++ b/test/testautomation_platform.c @@ -504,58 +504,58 @@ int platform_testGetPowerInfo(void *arg) /* Platform test cases */ static const SDLTest_TestCaseReference platformTest1 = - { (SDLTest_TestCaseFp)platform_testTypes, "platform_testTypes", "Tests predefined types", TEST_ENABLED}; + { (SDLTest_TestCaseFp)platform_testTypes, "platform_testTypes", "Tests predefined types", TEST_ENABLED}; static const SDLTest_TestCaseReference platformTest2 = - { (SDLTest_TestCaseFp)platform_testEndianessAndSwap, "platform_testEndianessAndSwap", "Tests endianess and swap functions", TEST_ENABLED}; + { (SDLTest_TestCaseFp)platform_testEndianessAndSwap, "platform_testEndianessAndSwap", "Tests endianess and swap functions", TEST_ENABLED}; static const SDLTest_TestCaseReference platformTest3 = - { (SDLTest_TestCaseFp)platform_testGetFunctions, "platform_testGetFunctions", "Tests various SDL_GetXYZ functions", TEST_ENABLED}; + { (SDLTest_TestCaseFp)platform_testGetFunctions, "platform_testGetFunctions", "Tests various SDL_GetXYZ functions", TEST_ENABLED}; static const SDLTest_TestCaseReference platformTest4 = - { (SDLTest_TestCaseFp)platform_testHasFunctions, "platform_testHasFunctions", "Tests various SDL_HasXYZ functions", TEST_ENABLED}; + { (SDLTest_TestCaseFp)platform_testHasFunctions, "platform_testHasFunctions", "Tests various SDL_HasXYZ functions", TEST_ENABLED}; static const SDLTest_TestCaseReference platformTest5 = - { (SDLTest_TestCaseFp)platform_testGetVersion, "platform_testGetVersion", "Tests SDL_GetVersion function", TEST_ENABLED}; + { (SDLTest_TestCaseFp)platform_testGetVersion, "platform_testGetVersion", "Tests SDL_GetVersion function", TEST_ENABLED}; static const SDLTest_TestCaseReference platformTest6 = - { (SDLTest_TestCaseFp)platform_testSDLVersion, "platform_testSDLVersion", "Tests SDL_VERSION macro", TEST_ENABLED}; + { (SDLTest_TestCaseFp)platform_testSDLVersion, "platform_testSDLVersion", "Tests SDL_VERSION macro", TEST_ENABLED}; static const SDLTest_TestCaseReference platformTest7 = - { (SDLTest_TestCaseFp)platform_testDefaultInit, "platform_testDefaultInit", "Tests default SDL_Init", TEST_ENABLED}; + { (SDLTest_TestCaseFp)platform_testDefaultInit, "platform_testDefaultInit", "Tests default SDL_Init", TEST_ENABLED}; static const SDLTest_TestCaseReference platformTest8 = - { (SDLTest_TestCaseFp)platform_testGetSetClearError, "platform_testGetSetClearError", "Tests SDL_Get/Set/ClearError", TEST_ENABLED}; + { (SDLTest_TestCaseFp)platform_testGetSetClearError, "platform_testGetSetClearError", "Tests SDL_Get/Set/ClearError", TEST_ENABLED}; static const SDLTest_TestCaseReference platformTest9 = - { (SDLTest_TestCaseFp)platform_testSetErrorEmptyInput, "platform_testSetErrorEmptyInput", "Tests SDL_SetError with empty input", TEST_ENABLED}; + { (SDLTest_TestCaseFp)platform_testSetErrorEmptyInput, "platform_testSetErrorEmptyInput", "Tests SDL_SetError with empty input", TEST_ENABLED}; static const SDLTest_TestCaseReference platformTest10 = - { (SDLTest_TestCaseFp)platform_testSetErrorInvalidInput, "platform_testSetErrorInvalidInput", "Tests SDL_SetError with invalid input", TEST_ENABLED}; + { (SDLTest_TestCaseFp)platform_testSetErrorInvalidInput, "platform_testSetErrorInvalidInput", "Tests SDL_SetError with invalid input", TEST_ENABLED}; static const SDLTest_TestCaseReference platformTest11 = - { (SDLTest_TestCaseFp)platform_testGetPowerInfo, "platform_testGetPowerInfo", "Tests SDL_GetPowerInfo function", TEST_ENABLED }; + { (SDLTest_TestCaseFp)platform_testGetPowerInfo, "platform_testGetPowerInfo", "Tests SDL_GetPowerInfo function", TEST_ENABLED }; /* Sequence of Platform test cases */ static const SDLTest_TestCaseReference *platformTests[] = { - &platformTest1, - &platformTest2, - &platformTest3, - &platformTest4, - &platformTest5, - &platformTest6, - &platformTest7, - &platformTest8, - &platformTest9, - &platformTest10, - &platformTest11, - NULL + &platformTest1, + &platformTest2, + &platformTest3, + &platformTest4, + &platformTest5, + &platformTest6, + &platformTest7, + &platformTest8, + &platformTest9, + &platformTest10, + &platformTest11, + NULL }; /* Platform test suite (global) */ SDLTest_TestSuiteReference platformTestSuite = { - "Platform", - NULL, - platformTests, - NULL + "Platform", + NULL, + platformTests, + NULL }; diff --git a/test/testautomation_rect.c b/test/testautomation_rect.c index 333c973ed..77a7347e6 100644 --- a/test/testautomation_rect.c +++ b/test/testautomation_rect.c @@ -21,7 +21,7 @@ void _validateIntersectRectAndLineResults( int x1, int y1, int x2, int y2, int x1Ref, int y1Ref, int x2Ref, int y2Ref) { - SDLTest_AssertCheck(intersection == expectedIntersection, + SDLTest_AssertCheck(intersection == expectedIntersection, "Check for correct intersection result: expected %s, got %s intersecting rect (%d,%d,%d,%d) with line (%d,%d - %d,%d)", (expectedIntersection == SDL_TRUE) ? "SDL_TRUE" : "SDL_FALSE", (intersection == SDL_TRUE) ? "SDL_TRUE" : "SDL_FALSE", @@ -45,7 +45,7 @@ void _validateIntersectRectAndLineResults( * \sa * http://wiki.libsdl.org/moin.cgi/SDL_IntersectRectAndLine */ -int +int rect_testIntersectRectAndLine (void *arg) { SDL_Rect refRect = { 0, 0, 32, 32 }; @@ -107,7 +107,7 @@ rect_testIntersectRectAndLine (void *arg) intersected = SDL_IntersectRectAndLine(&rect, &x1, &y1, &x2, &y2); _validateIntersectRectAndLineResults(intersected, SDL_TRUE, &rect, &refRect, x1, y1, x2, y2, 31, 0, 0, 31); - return TEST_COMPLETED; + return TEST_COMPLETED; } /*! @@ -116,7 +116,7 @@ rect_testIntersectRectAndLine (void *arg) * \sa * http://wiki.libsdl.org/moin.cgi/SDL_IntersectRectAndLine */ -int +int rect_testIntersectRectAndLineInside (void *arg) { SDL_Rect refRect = { 0, 0, 32, 32 }; @@ -174,7 +174,7 @@ rect_testIntersectRectAndLineInside (void *arg) intersected = SDL_IntersectRectAndLine(&rect, &x1, &y1, &x2, &y2); _validateIntersectRectAndLineResults(intersected, SDL_TRUE, &rect, &refRect, x1, y1, x2, y2, xmin, ymax, xmax, ymin); - return TEST_COMPLETED; + return TEST_COMPLETED; } /*! @@ -183,7 +183,7 @@ rect_testIntersectRectAndLineInside (void *arg) * \sa * http://wiki.libsdl.org/moin.cgi/SDL_IntersectRectAndLine */ -int +int rect_testIntersectRectAndLineOutside (void *arg) { SDL_Rect refRect = { 0, 0, 32, 32 }; @@ -229,7 +229,7 @@ rect_testIntersectRectAndLineOutside (void *arg) intersected = SDL_IntersectRectAndLine(&rect, &x1, &y1, &x2, &y2); _validateIntersectRectAndLineResults(intersected, SDL_FALSE, &rect, &refRect, x1, y1, x2, y2, 0, yBottom, 31, yBottom); - return TEST_COMPLETED; + return TEST_COMPLETED; } /*! @@ -238,7 +238,7 @@ rect_testIntersectRectAndLineOutside (void *arg) * \sa * http://wiki.libsdl.org/moin.cgi/SDL_IntersectRectAndLine */ -int +int rect_testIntersectRectAndLineEmpty (void *arg) { SDL_Rect refRect; @@ -246,7 +246,7 @@ rect_testIntersectRectAndLineEmpty (void *arg) int x1, y1, x1Ref, y1Ref; int x2, y2, x2Ref, y2Ref; SDL_bool intersected; - + refRect.x = SDLTest_RandomIntegerInRange(1, 1024); refRect.y = SDLTest_RandomIntegerInRange(1, 1024); refRect.w = 0; @@ -264,7 +264,7 @@ rect_testIntersectRectAndLineEmpty (void *arg) intersected = SDL_IntersectRectAndLine(&rect, &x1, &y1, &x2, &y2); _validateIntersectRectAndLineResults(intersected, SDL_FALSE, &rect, &refRect, x1, y1, x2, y2, x1Ref, y1Ref, x2Ref, y2Ref); - return TEST_COMPLETED; + return TEST_COMPLETED; } /*! @@ -273,7 +273,7 @@ rect_testIntersectRectAndLineEmpty (void *arg) * \sa * http://wiki.libsdl.org/moin.cgi/SDL_IntersectRectAndLine */ -int +int rect_testIntersectRectAndLineParam (void *arg) { SDL_Rect rect = { 0, 0, 32, 32 }; @@ -282,10 +282,10 @@ rect_testIntersectRectAndLineParam (void *arg) int x2 = x1; int y2 = 2 * rect.h; SDL_bool intersected; - + intersected = SDL_IntersectRectAndLine(&rect, &x1, &y1, &x2, &y2); SDLTest_AssertCheck(intersected == SDL_TRUE, "Check that intersection result was SDL_TRUE"); - + intersected = SDL_IntersectRectAndLine((SDL_Rect *)NULL, &x1, &y1, &x2, &y2); SDLTest_AssertCheck(intersected == SDL_FALSE, "Check that function returns SDL_FALSE when 1st parameter is NULL"); intersected = SDL_IntersectRectAndLine(&rect, (int *)NULL, &y1, &x2, &y2); @@ -299,21 +299,21 @@ rect_testIntersectRectAndLineParam (void *arg) intersected = SDL_IntersectRectAndLine((SDL_Rect *)NULL, (int *)NULL, (int *)NULL, (int *)NULL, (int *)NULL); SDLTest_AssertCheck(intersected == SDL_FALSE, "Check that function returns SDL_FALSE when all parameters are NULL"); - return TEST_COMPLETED; + return TEST_COMPLETED; } /*! * \brief Private helper to check SDL_HasIntersection results */ void _validateHasIntersectionResults( - SDL_bool intersection, SDL_bool expectedIntersection, + SDL_bool intersection, SDL_bool expectedIntersection, SDL_Rect *rectA, SDL_Rect *rectB, SDL_Rect *refRectA, SDL_Rect *refRectB) { - SDLTest_AssertCheck(intersection == expectedIntersection, + SDLTest_AssertCheck(intersection == expectedIntersection, "Check intersection result: expected %s, got %s intersecting A (%d,%d,%d,%d) with B (%d,%d,%d,%d)", (expectedIntersection == SDL_TRUE) ? "SDL_TRUE" : "SDL_FALSE", (intersection == SDL_TRUE) ? "SDL_TRUE" : "SDL_FALSE", - rectA->x, rectA->y, rectA->w, rectA->h, + rectA->x, rectA->y, rectA->w, rectA->h, rectB->x, rectB->y, rectB->w, rectB->h); SDLTest_AssertCheck(rectA->x == refRectA->x && rectA->y == refRectA->y && rectA->w == refRectA->w && rectA->h == refRectA->h, "Check that source rectangle A was not modified: got (%d,%d,%d,%d) expected (%d,%d,%d,%d)", @@ -329,15 +329,15 @@ void _validateHasIntersectionResults( * \brief Private helper to check SDL_IntersectRect results */ void _validateIntersectRectResults( - SDL_bool intersection, SDL_bool expectedIntersection, - SDL_Rect *rectA, SDL_Rect *rectB, SDL_Rect *refRectA, SDL_Rect *refRectB, + SDL_bool intersection, SDL_bool expectedIntersection, + SDL_Rect *rectA, SDL_Rect *rectB, SDL_Rect *refRectA, SDL_Rect *refRectB, SDL_Rect *result, SDL_Rect *expectedResult) { _validateHasIntersectionResults(intersection, expectedIntersection, rectA, rectB, refRectA, refRectB); if (result && expectedResult) { SDLTest_AssertCheck(result->x == expectedResult->x && result->y == expectedResult->y && result->w == expectedResult->w && result->h == expectedResult->h, "Check that intersection of rectangles A (%d,%d,%d,%d) and B (%d,%d,%d,%d) was correctly calculated, got (%d,%d,%d,%d) expected (%d,%d,%d,%d)", - rectA->x, rectA->y, rectA->w, rectA->h, + rectA->x, rectA->y, rectA->w, rectA->h, rectB->x, rectB->y, rectB->w, rectB->h, result->x, result->y, result->w, result->h, expectedResult->x, expectedResult->y, expectedResult->w, expectedResult->h); @@ -348,7 +348,7 @@ void _validateIntersectRectResults( * \brief Private helper to check SDL_UnionRect results */ void _validateUnionRectResults( - SDL_Rect *rectA, SDL_Rect *rectB, SDL_Rect *refRectA, SDL_Rect *refRectB, + SDL_Rect *rectA, SDL_Rect *rectB, SDL_Rect *refRectA, SDL_Rect *refRectB, SDL_Rect *result, SDL_Rect *expectedResult) { SDLTest_AssertCheck(rectA->x == refRectA->x && rectA->y == refRectA->y && rectA->w == refRectA->w && rectA->h == refRectA->h, @@ -361,7 +361,7 @@ void _validateUnionRectResults( refRectB->x, refRectB->y, refRectB->w, refRectB->h); SDLTest_AssertCheck(result->x == expectedResult->x && result->y == expectedResult->y && result->w == expectedResult->w && result->h == expectedResult->h, "Check that union of rectangles A (%d,%d,%d,%d) and B (%d,%d,%d,%d) was correctly calculated, got (%d,%d,%d,%d) expected (%d,%d,%d,%d)", - rectA->x, rectA->y, rectA->w, rectA->h, + rectA->x, rectA->y, rectA->w, rectA->h, rectB->x, rectB->y, rectB->w, rectB->h, result->x, result->y, result->w, result->h, expectedResult->x, expectedResult->y, expectedResult->w, expectedResult->h); @@ -371,10 +371,10 @@ void _validateUnionRectResults( * \brief Private helper to check SDL_RectEmpty results */ void _validateRectEmptyResults( - SDL_bool empty, SDL_bool expectedEmpty, + SDL_bool empty, SDL_bool expectedEmpty, SDL_Rect *rect, SDL_Rect *refRect) { - SDLTest_AssertCheck(empty == expectedEmpty, + SDLTest_AssertCheck(empty == expectedEmpty, "Check for correct empty result: expected %s, got %s testing (%d,%d,%d,%d)", (expectedEmpty == SDL_TRUE) ? "SDL_TRUE" : "SDL_FALSE", (empty == SDL_TRUE) ? "SDL_TRUE" : "SDL_FALSE", @@ -389,10 +389,10 @@ void _validateRectEmptyResults( * \brief Private helper to check SDL_RectEquals results */ void _validateRectEqualsResults( - SDL_bool equals, SDL_bool expectedEquals, + SDL_bool equals, SDL_bool expectedEquals, SDL_Rect *rectA, SDL_Rect *rectB, SDL_Rect *refRectA, SDL_Rect *refRectB) { - SDLTest_AssertCheck(equals == expectedEquals, + SDLTest_AssertCheck(equals == expectedEquals, "Check for correct equals result: expected %s, got %s testing (%d,%d,%d,%d) and (%d,%d,%d,%d)", (expectedEquals == SDL_TRUE) ? "SDL_TRUE" : "SDL_FALSE", (equals == SDL_TRUE) ? "SDL_TRUE" : "SDL_FALSE", @@ -433,7 +433,7 @@ int rect_testIntersectRectInside (void *arg) intersection = SDL_IntersectRect(&rectA, &rectB, &result); _validateIntersectRectResults(intersection, SDL_TRUE, &rectA, &rectB, &refRectA, &refRectB, &result, &refRectB); - return TEST_COMPLETED; + return TEST_COMPLETED; } /*! @@ -459,9 +459,9 @@ int rect_testIntersectRectOutside (void *arg) rectA = refRectA; rectB = refRectB; intersection = SDL_IntersectRect(&rectA, &rectB, &result); - _validateIntersectRectResults(intersection, SDL_FALSE, &rectA, &rectB, &refRectA, &refRectB, (SDL_Rect *)NULL, (SDL_Rect *)NULL); + _validateIntersectRectResults(intersection, SDL_FALSE, &rectA, &rectB, &refRectA, &refRectB, (SDL_Rect *)NULL, (SDL_Rect *)NULL); - return TEST_COMPLETED; + return TEST_COMPLETED; } /*! @@ -490,7 +490,7 @@ int rect_testIntersectRectPartial (void *arg) expectedResult.x = refRectB.x; expectedResult.y = refRectB.y; expectedResult.w = refRectA.w - refRectB.x; - expectedResult.h = refRectA.h - refRectB.y; + expectedResult.h = refRectA.h - refRectB.y; intersection = SDL_IntersectRect(&rectA, &rectB, &result); _validateIntersectRectResults(intersection, SDL_TRUE, &rectA, &rectB, &refRectA, &refRectB, &result, &expectedResult); @@ -504,7 +504,7 @@ int rect_testIntersectRectPartial (void *arg) expectedResult.x = refRectB.x; expectedResult.y = refRectB.y; expectedResult.w = 1; - expectedResult.h = refRectB.h; + expectedResult.h = refRectB.h; intersection = SDL_IntersectRect(&rectA, &rectB, &result); _validateIntersectRectResults(intersection, SDL_TRUE, &rectA, &rectB, &refRectA, &refRectB, &result, &expectedResult); @@ -518,7 +518,7 @@ int rect_testIntersectRectPartial (void *arg) expectedResult.x = 0; expectedResult.y = refRectB.y; expectedResult.w = 1; - expectedResult.h = refRectB.h; + expectedResult.h = refRectB.h; intersection = SDL_IntersectRect(&rectA, &rectB, &result); _validateIntersectRectResults(intersection, SDL_TRUE, &rectA, &rectB, &refRectA, &refRectB, &result, &expectedResult); @@ -532,7 +532,7 @@ int rect_testIntersectRectPartial (void *arg) expectedResult.x = refRectB.x; expectedResult.y = refRectB.y; expectedResult.w = refRectB.w; - expectedResult.h = 1; + expectedResult.h = 1; intersection = SDL_IntersectRect(&rectA, &rectB, &result); _validateIntersectRectResults(intersection, SDL_TRUE, &rectA, &rectB, &refRectA, &refRectB, &result, &expectedResult); @@ -546,11 +546,11 @@ int rect_testIntersectRectPartial (void *arg) expectedResult.x = refRectB.x; expectedResult.y = 0; expectedResult.w = refRectB.w; - expectedResult.h = 1; + expectedResult.h = 1; intersection = SDL_IntersectRect(&rectA, &rectB, &result); _validateIntersectRectResults(intersection, SDL_TRUE, &rectA, &rectB, &refRectA, &refRectB, &result, &expectedResult); - return TEST_COMPLETED; + return TEST_COMPLETED; } /*! @@ -586,7 +586,7 @@ int rect_testIntersectRectPoint (void *arg) refRectA.x = SDLTest_RandomIntegerInRange(1, 100); refRectA.y = SDLTest_RandomIntegerInRange(1, 100); refRectB.x = refRectA.x; - refRectB.y = refRectA.y; + refRectB.y = refRectA.y; refRectB.x += offsetX; refRectB.y += offsetY; rectA = refRectA; @@ -597,7 +597,7 @@ int rect_testIntersectRectPoint (void *arg) } } - return TEST_COMPLETED; + return TEST_COMPLETED; } /*! @@ -632,7 +632,7 @@ int rect_testIntersectRectEmpty (void *arg) _validateIntersectRectResults(intersection, SDL_FALSE, &rectA, &rectB, &refRectA, &refRectB, (SDL_Rect *)NULL, (SDL_Rect *)NULL); empty = (SDL_bool)SDL_RectEmpty(&result); SDLTest_AssertCheck(empty == SDL_TRUE, "Validate result is empty Rect; got: %s", (empty == SDL_TRUE) ? "SDL_TRUE" : "SDL_FALSE"); - + // Rect B empty result.w = SDLTest_RandomIntegerInRange(1, 100); result.h = SDLTest_RandomIntegerInRange(1, 100); @@ -687,19 +687,19 @@ int rect_testIntersectRectParam(void *arg) // invalid parameter combinations intersection = SDL_IntersectRect((SDL_Rect *)NULL, &rectB, &result); - SDLTest_AssertCheck(intersection == SDL_FALSE, "Check that function returns SDL_FALSE when 1st parameter is NULL"); + SDLTest_AssertCheck(intersection == SDL_FALSE, "Check that function returns SDL_FALSE when 1st parameter is NULL"); intersection = SDL_IntersectRect(&rectA, (SDL_Rect *)NULL, &result); - SDLTest_AssertCheck(intersection == SDL_FALSE, "Check that function returns SDL_FALSE when 2st parameter is NULL"); + SDLTest_AssertCheck(intersection == SDL_FALSE, "Check that function returns SDL_FALSE when 2st parameter is NULL"); intersection = SDL_IntersectRect(&rectA, &rectB, (SDL_Rect *)NULL); - SDLTest_AssertCheck(intersection == SDL_FALSE, "Check that function returns SDL_FALSE when 3st parameter is NULL"); + SDLTest_AssertCheck(intersection == SDL_FALSE, "Check that function returns SDL_FALSE when 3st parameter is NULL"); intersection = SDL_IntersectRect((SDL_Rect *)NULL, (SDL_Rect *)NULL, &result); - SDLTest_AssertCheck(intersection == SDL_FALSE, "Check that function returns SDL_FALSE when 1st and 2nd parameters are NULL"); + SDLTest_AssertCheck(intersection == SDL_FALSE, "Check that function returns SDL_FALSE when 1st and 2nd parameters are NULL"); intersection = SDL_IntersectRect((SDL_Rect *)NULL, &rectB, (SDL_Rect *)NULL); - SDLTest_AssertCheck(intersection == SDL_FALSE, "Check that function returns SDL_FALSE when 1st and 3rd parameters are NULL "); + SDLTest_AssertCheck(intersection == SDL_FALSE, "Check that function returns SDL_FALSE when 1st and 3rd parameters are NULL "); intersection = SDL_IntersectRect((SDL_Rect *)NULL, (SDL_Rect *)NULL, (SDL_Rect *)NULL); - SDLTest_AssertCheck(intersection == SDL_FALSE, "Check that function returns SDL_FALSE when all parameters are NULL"); + SDLTest_AssertCheck(intersection == SDL_FALSE, "Check that function returns SDL_FALSE when all parameters are NULL"); - return TEST_COMPLETED; + return TEST_COMPLETED; } /*! @@ -726,7 +726,7 @@ int rect_testHasIntersectionInside (void *arg) intersection = SDL_HasIntersection(&rectA, &rectB); _validateHasIntersectionResults(intersection, SDL_TRUE, &rectA, &rectB, &refRectA, &refRectB); - return TEST_COMPLETED; + return TEST_COMPLETED; } /*! @@ -753,7 +753,7 @@ int rect_testHasIntersectionOutside (void *arg) intersection = SDL_HasIntersection(&rectA, &rectB); _validateHasIntersectionResults(intersection, SDL_FALSE, &rectA, &rectB, &refRectA, &refRectB); - return TEST_COMPLETED; + return TEST_COMPLETED; } /*! @@ -820,7 +820,7 @@ int rect_testHasIntersectionPartial (void *arg) intersection = SDL_HasIntersection(&rectA, &rectB); _validateHasIntersectionResults(intersection, SDL_TRUE, &rectA, &rectB, &refRectA, &refRectB); - return TEST_COMPLETED; + return TEST_COMPLETED; } /*! @@ -855,7 +855,7 @@ int rect_testHasIntersectionPoint (void *arg) refRectA.x = SDLTest_RandomIntegerInRange(1, 100); refRectA.y = SDLTest_RandomIntegerInRange(1, 100); refRectB.x = refRectA.x; - refRectB.y = refRectA.y; + refRectB.y = refRectA.y; refRectB.x += offsetX; refRectB.y += offsetY; rectA = refRectA; @@ -866,7 +866,7 @@ int rect_testHasIntersectionPoint (void *arg) } } - return TEST_COMPLETED; + return TEST_COMPLETED; } /*! @@ -924,7 +924,7 @@ int rect_testHasIntersectionEmpty (void *arg) intersection = SDL_HasIntersection(&rectA, &rectB); _validateHasIntersectionResults(intersection, SDL_FALSE, &rectA, &rectB, &refRectA, &refRectB); - return TEST_COMPLETED; + return TEST_COMPLETED; } /*! @@ -941,13 +941,13 @@ int rect_testHasIntersectionParam(void *arg) // invalid parameter combinations intersection = SDL_HasIntersection((SDL_Rect *)NULL, &rectB); - SDLTest_AssertCheck(intersection == SDL_FALSE, "Check that function returns SDL_FALSE when 1st parameter is NULL"); + SDLTest_AssertCheck(intersection == SDL_FALSE, "Check that function returns SDL_FALSE when 1st parameter is NULL"); intersection = SDL_HasIntersection(&rectA, (SDL_Rect *)NULL); - SDLTest_AssertCheck(intersection == SDL_FALSE, "Check that function returns SDL_FALSE when 2st parameter is NULL"); + SDLTest_AssertCheck(intersection == SDL_FALSE, "Check that function returns SDL_FALSE when 2st parameter is NULL"); intersection = SDL_HasIntersection((SDL_Rect *)NULL, (SDL_Rect *)NULL); - SDLTest_AssertCheck(intersection == SDL_FALSE, "Check that function returns SDL_FALSE when all parameters are NULL"); + SDLTest_AssertCheck(intersection == SDL_FALSE, "Check that function returns SDL_FALSE when all parameters are NULL"); - return TEST_COMPLETED; + return TEST_COMPLETED; } /*! @@ -989,35 +989,35 @@ int rect_testEnclosePoints(void *arg) if (newy > maxy) maxy = newy; } } - + // Call function and validate - special case: no result requested anyEnclosedNoResult = SDL_EnclosePoints((const SDL_Point *)points, numPoints, (const SDL_Rect *)NULL, (SDL_Rect *)NULL); - SDLTest_AssertCheck(expectedEnclosed==anyEnclosedNoResult, - "Check expected return value %s, got %s", - (expectedEnclosed==SDL_TRUE) ? "SDL_TRUE" : "SDL_FALSE", - (anyEnclosedNoResult==SDL_TRUE) ? "SDL_TRUE" : "SDL_FALSE"); + SDLTest_AssertCheck(expectedEnclosed==anyEnclosedNoResult, + "Check expected return value %s, got %s", + (expectedEnclosed==SDL_TRUE) ? "SDL_TRUE" : "SDL_FALSE", + (anyEnclosedNoResult==SDL_TRUE) ? "SDL_TRUE" : "SDL_FALSE"); for (i=0; irefRectB.x) ? refRectA.x : refRectB.x; miny = (refRectA.yrefRectB.y) ? refRectA.y : refRectB.y; + maxy = (refRectA.y>refRectB.y) ? refRectA.y : refRectB.y; expectedResult.x = minx; expectedResult.y = miny; expectedResult.w = maxx - minx + 1; @@ -1267,7 +1267,7 @@ int rect_testUnionRectOutside(void *arg) } /* Union outside overlap */ - for (dx = -1; dx < 2; dx++) { + for (dx = -1; dx < 2; dx++) { for (dy = -1; dy < 2; dy++) { if ((dx != 0) || (dy != 0)) { refRectA.x=SDLTest_RandomIntegerInRange(-1024, 1024); @@ -1291,7 +1291,7 @@ int rect_testUnionRectOutside(void *arg) } } - return TEST_COMPLETED; + return TEST_COMPLETED; } /*! @@ -1307,7 +1307,7 @@ int rect_testUnionRectEmpty(void *arg) SDL_Rect expectedResult; SDL_Rect result; - /* A empty */ + /* A empty */ refRectA.x=SDLTest_RandomIntegerInRange(-1024, 1024); refRectA.y=SDLTest_RandomIntegerInRange(-1024, 1024); refRectA.w=0; @@ -1321,8 +1321,8 @@ int rect_testUnionRectEmpty(void *arg) rectB = refRectB; SDL_UnionRect(&rectA, &rectB, &result); _validateUnionRectResults(&rectA, &rectB, &refRectA, &refRectB, &result, &expectedResult); - - /* B empty */ + + /* B empty */ refRectA.x=SDLTest_RandomIntegerInRange(-1024, 1024); refRectA.y=SDLTest_RandomIntegerInRange(-1024, 1024); refRectA.w=SDLTest_RandomIntegerInRange(1, 1024); @@ -1337,7 +1337,7 @@ int rect_testUnionRectEmpty(void *arg) SDL_UnionRect(&rectA, &rectB, &result); _validateUnionRectResults(&rectA, &rectB, &refRectA, &refRectB, &result, &expectedResult); - /* A and B empty */ + /* A and B empty */ refRectA.x=SDLTest_RandomIntegerInRange(-1024, 1024); refRectA.y=SDLTest_RandomIntegerInRange(-1024, 1024); refRectA.w=0; @@ -1356,7 +1356,7 @@ int rect_testUnionRectEmpty(void *arg) SDL_UnionRect(&rectA, &rectB, &result); _validateUnionRectResults(&rectA, &rectB, &refRectA, &refRectB, &result, &expectedResult); - return TEST_COMPLETED; + return TEST_COMPLETED; } /*! @@ -1372,7 +1372,7 @@ int rect_testUnionRectInside(void *arg) SDL_Rect expectedResult; SDL_Rect result; int dx, dy; - + /* Union 1x1 with itself */ refRectA.x=SDLTest_RandomIntegerInRange(-1024, 1024); refRectA.y=SDLTest_RandomIntegerInRange(-1024, 1024); @@ -1399,7 +1399,7 @@ int rect_testUnionRectInside(void *arg) _validateUnionRectResults(&rectA, &rectB, &refRectA, &refRectB, &result, &expectedResult); /* Union inside with edges modified */ - for (dx = -1; dx < 2; dx++) { + for (dx = -1; dx < 2; dx++) { for (dy = -1; dy < 2; dy++) { if ((dx != 0) || (dy != 0)) { refRectA.x=SDLTest_RandomIntegerInRange(-1024, 1024); @@ -1410,7 +1410,7 @@ int rect_testUnionRectInside(void *arg) if (dx == -1) refRectB.x++; if ((dx == 1) || (dx == -1)) refRectB.w--; if (dy == -1) refRectB.y++; - if ((dy == 1) || (dy == -1)) refRectB.h--; + if ((dy == 1) || (dy == -1)) refRectB.h--; expectedResult = refRectA; rectA = refRectA; rectB = refRectB; @@ -1420,7 +1420,7 @@ int rect_testUnionRectInside(void *arg) } } - return TEST_COMPLETED; + return TEST_COMPLETED; } /*! @@ -1436,19 +1436,19 @@ int rect_testUnionRectParam(void *arg) // invalid parameter combinations SDL_UnionRect((SDL_Rect *)NULL, &rectB, &result); - SDLTest_AssertPass("Check that function returns when 1st parameter is NULL"); + SDLTest_AssertPass("Check that function returns when 1st parameter is NULL"); SDL_UnionRect(&rectA, (SDL_Rect *)NULL, &result); - SDLTest_AssertPass("Check that function returns when 2nd parameter is NULL"); + SDLTest_AssertPass("Check that function returns when 2nd parameter is NULL"); SDL_UnionRect(&rectA, &rectB, (SDL_Rect *)NULL); - SDLTest_AssertPass("Check that function returns when 3rd parameter is NULL"); + SDLTest_AssertPass("Check that function returns when 3rd parameter is NULL"); SDL_UnionRect((SDL_Rect *)NULL, &rectB, (SDL_Rect *)NULL); - SDLTest_AssertPass("Check that function returns when 1st and 3rd parameter are NULL"); + SDLTest_AssertPass("Check that function returns when 1st and 3rd parameter are NULL"); SDL_UnionRect(&rectA, (SDL_Rect *)NULL, (SDL_Rect *)NULL); - SDLTest_AssertPass("Check that function returns when 2nd and 3rd parameter are NULL"); + SDLTest_AssertPass("Check that function returns when 2nd and 3rd parameter are NULL"); SDL_UnionRect((SDL_Rect *)NULL, (SDL_Rect *)NULL, (SDL_Rect *)NULL); - SDLTest_AssertPass("Check that function returns when all parameters are NULL"); + SDLTest_AssertPass("Check that function returns when all parameters are NULL"); - return TEST_COMPLETED; + return TEST_COMPLETED; } /*! @@ -1474,7 +1474,7 @@ int rect_testRectEmpty(void *arg) rect = refRect; result = (SDL_bool)SDL_RectEmpty((const SDL_Rect *)&rect); _validateRectEmptyResults(result, expectedResult, &rect, &refRect); - + // Empty case for (w=-1; w<2; w++) { for (h=-1; h<2; h++) { @@ -1491,7 +1491,7 @@ int rect_testRectEmpty(void *arg) } } - return TEST_COMPLETED; + return TEST_COMPLETED; } /*! @@ -1506,9 +1506,9 @@ int rect_testRectEmptyParam(void *arg) // invalid parameter combinations result = (SDL_bool)SDL_RectEmpty((const SDL_Rect *)NULL); - SDLTest_AssertCheck(result == SDL_TRUE, "Check that function returns TRUE when 1st parameter is NULL"); + SDLTest_AssertCheck(result == SDL_TRUE, "Check that function returns TRUE when 1st parameter is NULL"); - return TEST_COMPLETED; + return TEST_COMPLETED; } /*! @@ -1531,14 +1531,14 @@ int rect_testRectEquals(void *arg) refRectA.y=SDLTest_RandomIntegerInRange(-1024, 1024); refRectA.w=SDLTest_RandomIntegerInRange(1, 1024); refRectA.h=SDLTest_RandomIntegerInRange(1, 1024); - refRectB = refRectA; + refRectB = refRectA; expectedResult = SDL_TRUE; rectA = refRectA; rectB = refRectB; result = (SDL_bool)SDL_RectEquals((const SDL_Rect *)&rectA, (const SDL_Rect *)&rectB); _validateRectEqualsResults(result, expectedResult, &rectA, &rectB, &refRectA, &refRectB); - return TEST_COMPLETED; + return TEST_COMPLETED; } /*! @@ -1565,13 +1565,13 @@ int rect_testRectEqualsParam(void *arg) // invalid parameter combinations result = (SDL_bool)SDL_RectEquals((const SDL_Rect *)NULL, (const SDL_Rect *)&rectB); - SDLTest_AssertCheck(result == SDL_FALSE, "Check that function returns SDL_FALSE when 1st parameter is NULL"); + SDLTest_AssertCheck(result == SDL_FALSE, "Check that function returns SDL_FALSE when 1st parameter is NULL"); result = (SDL_bool)SDL_RectEquals((const SDL_Rect *)&rectA, (const SDL_Rect *)NULL); - SDLTest_AssertCheck(result == SDL_FALSE, "Check that function returns SDL_FALSE when 2nd parameter is NULL"); + SDLTest_AssertCheck(result == SDL_FALSE, "Check that function returns SDL_FALSE when 2nd parameter is NULL"); result = (SDL_bool)SDL_RectEquals((const SDL_Rect *)NULL, (const SDL_Rect *)NULL); - SDLTest_AssertCheck(result == SDL_FALSE, "Check that function returns SDL_FALSE when 1st and 2nd parameter are NULL"); + SDLTest_AssertCheck(result == SDL_FALSE, "Check that function returns SDL_FALSE when 1st and 2nd parameter are NULL"); - return TEST_COMPLETED; + return TEST_COMPLETED; } /* ================= Test References ================== */ @@ -1580,98 +1580,98 @@ int rect_testRectEqualsParam(void *arg) /* SDL_IntersectRectAndLine */ static const SDLTest_TestCaseReference rectTest1 = - { (SDLTest_TestCaseFp)rect_testIntersectRectAndLine,"rect_testIntersectRectAndLine", "Tests SDL_IntersectRectAndLine clipping cases", TEST_ENABLED }; + { (SDLTest_TestCaseFp)rect_testIntersectRectAndLine,"rect_testIntersectRectAndLine", "Tests SDL_IntersectRectAndLine clipping cases", TEST_ENABLED }; static const SDLTest_TestCaseReference rectTest2 = - { (SDLTest_TestCaseFp)rect_testIntersectRectAndLineInside, "rect_testIntersectRectAndLineInside", "Tests SDL_IntersectRectAndLine with line fully contained in rect", TEST_ENABLED }; + { (SDLTest_TestCaseFp)rect_testIntersectRectAndLineInside, "rect_testIntersectRectAndLineInside", "Tests SDL_IntersectRectAndLine with line fully contained in rect", TEST_ENABLED }; static const SDLTest_TestCaseReference rectTest3 = - { (SDLTest_TestCaseFp)rect_testIntersectRectAndLineOutside, "rect_testIntersectRectAndLineOutside", "Tests SDL_IntersectRectAndLine with line fully outside of rect", TEST_ENABLED }; + { (SDLTest_TestCaseFp)rect_testIntersectRectAndLineOutside, "rect_testIntersectRectAndLineOutside", "Tests SDL_IntersectRectAndLine with line fully outside of rect", TEST_ENABLED }; static const SDLTest_TestCaseReference rectTest4 = - { (SDLTest_TestCaseFp)rect_testIntersectRectAndLineEmpty, "rect_testIntersectRectAndLineEmpty", "Tests SDL_IntersectRectAndLine with empty rectangle ", TEST_ENABLED }; + { (SDLTest_TestCaseFp)rect_testIntersectRectAndLineEmpty, "rect_testIntersectRectAndLineEmpty", "Tests SDL_IntersectRectAndLine with empty rectangle ", TEST_ENABLED }; static const SDLTest_TestCaseReference rectTest5 = - { (SDLTest_TestCaseFp)rect_testIntersectRectAndLineParam, "rect_testIntersectRectAndLineParam", "Negative tests against SDL_IntersectRectAndLine with invalid parameters", TEST_ENABLED }; + { (SDLTest_TestCaseFp)rect_testIntersectRectAndLineParam, "rect_testIntersectRectAndLineParam", "Negative tests against SDL_IntersectRectAndLine with invalid parameters", TEST_ENABLED }; /* SDL_IntersectRect */ static const SDLTest_TestCaseReference rectTest6 = - { (SDLTest_TestCaseFp)rect_testIntersectRectInside, "rect_testIntersectRectInside", "Tests SDL_IntersectRect with B fully contained in A", TEST_ENABLED }; + { (SDLTest_TestCaseFp)rect_testIntersectRectInside, "rect_testIntersectRectInside", "Tests SDL_IntersectRect with B fully contained in A", TEST_ENABLED }; static const SDLTest_TestCaseReference rectTest7 = - { (SDLTest_TestCaseFp)rect_testIntersectRectOutside, "rect_testIntersectRectOutside", "Tests SDL_IntersectRect with B fully outside of A", TEST_ENABLED }; + { (SDLTest_TestCaseFp)rect_testIntersectRectOutside, "rect_testIntersectRectOutside", "Tests SDL_IntersectRect with B fully outside of A", TEST_ENABLED }; static const SDLTest_TestCaseReference rectTest8 = - { (SDLTest_TestCaseFp)rect_testIntersectRectPartial, "rect_testIntersectRectPartial", "Tests SDL_IntersectRect with B partially intersecting A", TEST_ENABLED }; + { (SDLTest_TestCaseFp)rect_testIntersectRectPartial, "rect_testIntersectRectPartial", "Tests SDL_IntersectRect with B partially intersecting A", TEST_ENABLED }; static const SDLTest_TestCaseReference rectTest9 = - { (SDLTest_TestCaseFp)rect_testIntersectRectPoint, "rect_testIntersectRectPoint", "Tests SDL_IntersectRect with 1x1 sized rectangles", TEST_ENABLED }; + { (SDLTest_TestCaseFp)rect_testIntersectRectPoint, "rect_testIntersectRectPoint", "Tests SDL_IntersectRect with 1x1 sized rectangles", TEST_ENABLED }; static const SDLTest_TestCaseReference rectTest10 = - { (SDLTest_TestCaseFp)rect_testIntersectRectEmpty, "rect_testIntersectRectEmpty", "Tests SDL_IntersectRect with empty rectangles", TEST_ENABLED }; + { (SDLTest_TestCaseFp)rect_testIntersectRectEmpty, "rect_testIntersectRectEmpty", "Tests SDL_IntersectRect with empty rectangles", TEST_ENABLED }; static const SDLTest_TestCaseReference rectTest11 = - { (SDLTest_TestCaseFp)rect_testIntersectRectParam, "rect_testIntersectRectParam", "Negative tests against SDL_IntersectRect with invalid parameters", TEST_ENABLED }; + { (SDLTest_TestCaseFp)rect_testIntersectRectParam, "rect_testIntersectRectParam", "Negative tests against SDL_IntersectRect with invalid parameters", TEST_ENABLED }; /* SDL_HasIntersection */ static const SDLTest_TestCaseReference rectTest12 = - { (SDLTest_TestCaseFp)rect_testHasIntersectionInside, "rect_testHasIntersectionInside", "Tests SDL_HasIntersection with B fully contained in A", TEST_ENABLED }; + { (SDLTest_TestCaseFp)rect_testHasIntersectionInside, "rect_testHasIntersectionInside", "Tests SDL_HasIntersection with B fully contained in A", TEST_ENABLED }; static const SDLTest_TestCaseReference rectTest13 = - { (SDLTest_TestCaseFp)rect_testHasIntersectionOutside, "rect_testHasIntersectionOutside", "Tests SDL_HasIntersection with B fully outside of A", TEST_ENABLED }; + { (SDLTest_TestCaseFp)rect_testHasIntersectionOutside, "rect_testHasIntersectionOutside", "Tests SDL_HasIntersection with B fully outside of A", TEST_ENABLED }; static const SDLTest_TestCaseReference rectTest14 = - { (SDLTest_TestCaseFp)rect_testHasIntersectionPartial,"rect_testHasIntersectionPartial", "Tests SDL_HasIntersection with B partially intersecting A", TEST_ENABLED }; + { (SDLTest_TestCaseFp)rect_testHasIntersectionPartial,"rect_testHasIntersectionPartial", "Tests SDL_HasIntersection with B partially intersecting A", TEST_ENABLED }; static const SDLTest_TestCaseReference rectTest15 = - { (SDLTest_TestCaseFp)rect_testHasIntersectionPoint, "rect_testHasIntersectionPoint", "Tests SDL_HasIntersection with 1x1 sized rectangles", TEST_ENABLED }; + { (SDLTest_TestCaseFp)rect_testHasIntersectionPoint, "rect_testHasIntersectionPoint", "Tests SDL_HasIntersection with 1x1 sized rectangles", TEST_ENABLED }; static const SDLTest_TestCaseReference rectTest16 = - { (SDLTest_TestCaseFp)rect_testHasIntersectionEmpty, "rect_testHasIntersectionEmpty", "Tests SDL_HasIntersection with empty rectangles", TEST_ENABLED }; + { (SDLTest_TestCaseFp)rect_testHasIntersectionEmpty, "rect_testHasIntersectionEmpty", "Tests SDL_HasIntersection with empty rectangles", TEST_ENABLED }; static const SDLTest_TestCaseReference rectTest17 = - { (SDLTest_TestCaseFp)rect_testHasIntersectionParam, "rect_testHasIntersectionParam", "Negative tests against SDL_HasIntersection with invalid parameters", TEST_ENABLED }; + { (SDLTest_TestCaseFp)rect_testHasIntersectionParam, "rect_testHasIntersectionParam", "Negative tests against SDL_HasIntersection with invalid parameters", TEST_ENABLED }; /* SDL_EnclosePoints */ static const SDLTest_TestCaseReference rectTest18 = - { (SDLTest_TestCaseFp)rect_testEnclosePoints, "rect_testEnclosePoints", "Tests SDL_EnclosePoints without clipping", TEST_ENABLED }; + { (SDLTest_TestCaseFp)rect_testEnclosePoints, "rect_testEnclosePoints", "Tests SDL_EnclosePoints without clipping", TEST_ENABLED }; static const SDLTest_TestCaseReference rectTest19 = - { (SDLTest_TestCaseFp)rect_testEnclosePointsWithClipping, "rect_testEnclosePointsWithClipping", "Tests SDL_EnclosePoints with clipping", TEST_ENABLED }; + { (SDLTest_TestCaseFp)rect_testEnclosePointsWithClipping, "rect_testEnclosePointsWithClipping", "Tests SDL_EnclosePoints with clipping", TEST_ENABLED }; static const SDLTest_TestCaseReference rectTest20 = - { (SDLTest_TestCaseFp)rect_testEnclosePointsRepeatedInput, "rect_testEnclosePointsRepeatedInput", "Tests SDL_EnclosePoints with repeated input", TEST_ENABLED }; + { (SDLTest_TestCaseFp)rect_testEnclosePointsRepeatedInput, "rect_testEnclosePointsRepeatedInput", "Tests SDL_EnclosePoints with repeated input", TEST_ENABLED }; static const SDLTest_TestCaseReference rectTest21 = - { (SDLTest_TestCaseFp)rect_testEnclosePointsParam, "rect_testEnclosePointsParam", "Negative tests against SDL_EnclosePoints with invalid parameters", TEST_ENABLED }; + { (SDLTest_TestCaseFp)rect_testEnclosePointsParam, "rect_testEnclosePointsParam", "Negative tests against SDL_EnclosePoints with invalid parameters", TEST_ENABLED }; /* SDL_UnionRect */ static const SDLTest_TestCaseReference rectTest22 = - { (SDLTest_TestCaseFp)rect_testUnionRectInside, "rect_testUnionRectInside", "Tests SDL_UnionRect where rect B is inside rect A", TEST_ENABLED }; + { (SDLTest_TestCaseFp)rect_testUnionRectInside, "rect_testUnionRectInside", "Tests SDL_UnionRect where rect B is inside rect A", TEST_ENABLED }; static const SDLTest_TestCaseReference rectTest23 = - { (SDLTest_TestCaseFp)rect_testUnionRectOutside, "rect_testUnionRectOutside", "Tests SDL_UnionRect where rect B is outside rect A", TEST_ENABLED }; + { (SDLTest_TestCaseFp)rect_testUnionRectOutside, "rect_testUnionRectOutside", "Tests SDL_UnionRect where rect B is outside rect A", TEST_ENABLED }; static const SDLTest_TestCaseReference rectTest24 = - { (SDLTest_TestCaseFp)rect_testUnionRectEmpty, "rect_testUnionRectEmpty", "Tests SDL_UnionRect where rect A or rect B are empty", TEST_ENABLED }; + { (SDLTest_TestCaseFp)rect_testUnionRectEmpty, "rect_testUnionRectEmpty", "Tests SDL_UnionRect where rect A or rect B are empty", TEST_ENABLED }; static const SDLTest_TestCaseReference rectTest25 = - { (SDLTest_TestCaseFp)rect_testUnionRectParam, "rect_testUnionRectParam", "Negative tests against SDL_UnionRect with invalid parameters", TEST_ENABLED }; + { (SDLTest_TestCaseFp)rect_testUnionRectParam, "rect_testUnionRectParam", "Negative tests against SDL_UnionRect with invalid parameters", TEST_ENABLED }; /* SDL_RectEmpty */ static const SDLTest_TestCaseReference rectTest26 = - { (SDLTest_TestCaseFp)rect_testRectEmpty, "rect_testRectEmpty", "Tests SDL_RectEmpty with various inputs", TEST_ENABLED }; + { (SDLTest_TestCaseFp)rect_testRectEmpty, "rect_testRectEmpty", "Tests SDL_RectEmpty with various inputs", TEST_ENABLED }; static const SDLTest_TestCaseReference rectTest27 = - { (SDLTest_TestCaseFp)rect_testRectEmptyParam, "rect_testRectEmptyParam", "Negative tests against SDL_RectEmpty with invalid parameters", TEST_ENABLED }; + { (SDLTest_TestCaseFp)rect_testRectEmptyParam, "rect_testRectEmptyParam", "Negative tests against SDL_RectEmpty with invalid parameters", TEST_ENABLED }; /* SDL_RectEquals */ static const SDLTest_TestCaseReference rectTest28 = - { (SDLTest_TestCaseFp)rect_testRectEquals, "rect_testRectEquals", "Tests SDL_RectEquals with various inputs", TEST_ENABLED }; + { (SDLTest_TestCaseFp)rect_testRectEquals, "rect_testRectEquals", "Tests SDL_RectEquals with various inputs", TEST_ENABLED }; static const SDLTest_TestCaseReference rectTest29 = - { (SDLTest_TestCaseFp)rect_testRectEqualsParam, "rect_testRectEqualsParam", "Negative tests against SDL_RectEquals with invalid parameters", TEST_ENABLED }; + { (SDLTest_TestCaseFp)rect_testRectEqualsParam, "rect_testRectEqualsParam", "Negative tests against SDL_RectEquals with invalid parameters", TEST_ENABLED }; /*! @@ -1681,16 +1681,16 @@ static const SDLTest_TestCaseReference rectTest29 = * http://wiki.libsdl.org/moin.cgi/CategoryRect */ static const SDLTest_TestCaseReference *rectTests[] = { - &rectTest1, &rectTest2, &rectTest3, &rectTest4, &rectTest5, &rectTest6, &rectTest7, &rectTest8, &rectTest9, &rectTest10, &rectTest11, &rectTest12, &rectTest13, &rectTest14, - &rectTest15, &rectTest16, &rectTest17, &rectTest18, &rectTest19, &rectTest20, &rectTest21, &rectTest22, &rectTest23, &rectTest24, &rectTest25, &rectTest26, &rectTest27, - &rectTest28, &rectTest29, NULL + &rectTest1, &rectTest2, &rectTest3, &rectTest4, &rectTest5, &rectTest6, &rectTest7, &rectTest8, &rectTest9, &rectTest10, &rectTest11, &rectTest12, &rectTest13, &rectTest14, + &rectTest15, &rectTest16, &rectTest17, &rectTest18, &rectTest19, &rectTest20, &rectTest21, &rectTest22, &rectTest23, &rectTest24, &rectTest25, &rectTest26, &rectTest27, + &rectTest28, &rectTest29, NULL }; /* Rect test suite (global) */ SDLTest_TestSuiteReference rectTestSuite = { - "Rect", - NULL, - rectTests, - NULL + "Rect", + NULL, + rectTests, + NULL }; diff --git a/test/testautomation_render.c b/test/testautomation_render.c index 48350e74b..d582cb07c 100644 --- a/test/testautomation_render.c +++ b/test/testautomation_render.c @@ -19,8 +19,8 @@ #define RENDER_COMPARE_GMASK 0x0000ff00 /**< Green bit mask. */ #define RENDER_COMPARE_BMASK 0x000000ff /**< Blue bit mask. */ -#define ALLOWABLE_ERROR_OPAQUE 0 -#define ALLOWABLE_ERROR_BLENDED 64 +#define ALLOWABLE_ERROR_OPAQUE 0 +#define ALLOWABLE_ERROR_BLENDED 64 /* Test window and renderer */ SDL_Window *window = NULL; @@ -50,7 +50,7 @@ void InitCreateRenderer(void *arg) if (window == NULL) { return; } - + renderer = SDL_CreateRenderer(window, -1, SDL_RENDERER_ACCELERATED); SDLTest_AssertPass("SDL_CreateRenderer()"); SDLTest_AssertCheck(renderer != 0, "Check SDL_CreateRenderer result"); @@ -61,17 +61,17 @@ void InitCreateRenderer(void *arg) } /* - * Destroy renderer for tests + * Destroy renderer for tests */ void CleanupDestroyRenderer(void *arg) { - if (renderer != NULL) { + if (renderer != NULL) { SDL_DestroyRenderer(renderer); renderer = NULL; SDLTest_AssertPass("SDL_DestroyRenderer()"); } - - if (window != NULL) { + + if (window != NULL) { SDL_DestroyWindow(window); window = NULL; SDLTest_AssertPass("SDL_DestroyWindow"); @@ -288,7 +288,7 @@ int render_testPrimitivesBlend (void *arg) SDLTest_AssertCheck(checkFailCount1 == 0, "Validate results from calls to SDL_SetRenderDrawColor, expected: 0, got: %i", checkFailCount1); SDLTest_AssertCheck(checkFailCount2 == 0, "Validate results from calls to SDL_SetRenderDrawBlendMode, expected: 0, got: %i", checkFailCount2); SDLTest_AssertCheck(checkFailCount3 == 0, "Validate results from calls to SDL_RenderDrawLine, expected: 0, got: %i", checkFailCount3); - + checkFailCount1 = 0; checkFailCount2 = 0; checkFailCount3 = 0; @@ -323,7 +323,7 @@ int render_testPrimitivesBlend (void *arg) ret = SDL_RenderDrawPoint(renderer, i, j ); if (ret != 0) checkFailCount3++; } - } + } SDLTest_AssertCheck(checkFailCount1 == 0, "Validate results from calls to SDL_SetRenderDrawColor, expected: 0, got: %i", checkFailCount1); SDLTest_AssertCheck(checkFailCount2 == 0, "Validate results from calls to SDL_SetRenderDrawBlendMode, expected: 0, got: %i", checkFailCount2); SDLTest_AssertCheck(checkFailCount3 == 0, "Validate results from calls to SDL_RenderDrawPoint, expected: 0, got: %i", checkFailCount3); @@ -533,7 +533,7 @@ render_testBlitAlpha (void *arg) ret = SDL_RenderCopy(renderer, tface, NULL, &rect ); if (ret != 0) checkFailCount2++; } - } + } SDLTest_AssertCheck(checkFailCount1 == 0, "Validate results from calls to SDL_SetTextureAlphaMod, expected: 0, got: %i", checkFailCount1); SDLTest_AssertCheck(checkFailCount2 == 0, "Validate results from calls to SDL_RenderCopy, expected: 0, got: %i", checkFailCount2); @@ -654,12 +654,12 @@ render_testBlitBlend (void *arg) /* Test None. */ _testBlitBlendMode( tface, SDL_BLENDMODE_NONE ); referenceSurface = SDLTest_ImageBlitBlendNone(); - _compare(referenceSurface, ALLOWABLE_ERROR_OPAQUE ); + _compare(referenceSurface, ALLOWABLE_ERROR_OPAQUE ); if (referenceSurface != NULL) { SDL_FreeSurface(referenceSurface); referenceSurface = NULL; } - + /* Test Blend. */ _testBlitBlendMode( tface, SDL_BLENDMODE_BLEND ); referenceSurface = SDLTest_ImageBlitBlend(); @@ -773,7 +773,7 @@ _hasDrawColor (void) ret = SDL_GetRenderDrawColor(renderer, &r, &g, &b, &a ); if (!_isSupported(ret)) fail = 1; - + /* Restore natural. */ ret = SDL_SetRenderDrawColor(renderer, 0, 0, 0, SDL_ALPHA_OPAQUE ); if (!_isSupported(ret)) @@ -782,7 +782,7 @@ _hasDrawColor (void) /* Something failed, consider not available. */ if (fail) return 0; - + /* Not set properly, consider failed. */ else if ((r != 100) || (g != 100) || (b != 100) || (a != 100)) return 0; @@ -862,7 +862,7 @@ _loadTestFace(void) if (face == NULL) { return NULL; } - + tface = SDL_CreateTextureFromSurface(renderer, face); if (tface == NULL) { SDLTest_LogError("SDL_CreateTextureFromSurface() failed with error: %s", SDL_GetError()); @@ -996,7 +996,7 @@ _compare(SDL_Surface *referenceSurface, int allowable_error) /* Clean up. */ if (pixels != NULL) { - SDL_free(pixels); + SDL_free(pixels); } if (testSurface != NULL) { SDL_FreeSurface(testSurface); @@ -1038,38 +1038,38 @@ _clearScreen(void) /* Render test cases */ static const SDLTest_TestCaseReference renderTest1 = - { (SDLTest_TestCaseFp)render_testGetNumRenderDrivers, "render_testGetNumRenderDrivers", "Tests call to SDL_GetNumRenderDrivers", TEST_ENABLED }; + { (SDLTest_TestCaseFp)render_testGetNumRenderDrivers, "render_testGetNumRenderDrivers", "Tests call to SDL_GetNumRenderDrivers", TEST_ENABLED }; static const SDLTest_TestCaseReference renderTest2 = - { (SDLTest_TestCaseFp)render_testPrimitives, "render_testPrimitives", "Tests rendering primitives", TEST_ENABLED }; + { (SDLTest_TestCaseFp)render_testPrimitives, "render_testPrimitives", "Tests rendering primitives", TEST_ENABLED }; /* TODO: rewrite test case, define new test data and re-enable; current implementation fails */ static const SDLTest_TestCaseReference renderTest3 = - { (SDLTest_TestCaseFp)render_testPrimitivesBlend, "render_testPrimitivesBlend", "Tests rendering primitives with blending", TEST_DISABLED }; + { (SDLTest_TestCaseFp)render_testPrimitivesBlend, "render_testPrimitivesBlend", "Tests rendering primitives with blending", TEST_DISABLED }; static const SDLTest_TestCaseReference renderTest4 = - { (SDLTest_TestCaseFp)render_testBlit, "render_testBlit", "Tests blitting", TEST_ENABLED }; + { (SDLTest_TestCaseFp)render_testBlit, "render_testBlit", "Tests blitting", TEST_ENABLED }; static const SDLTest_TestCaseReference renderTest5 = - { (SDLTest_TestCaseFp)render_testBlitColor, "render_testBlitColor", "Tests blitting with color", TEST_ENABLED }; + { (SDLTest_TestCaseFp)render_testBlitColor, "render_testBlitColor", "Tests blitting with color", TEST_ENABLED }; /* TODO: rewrite test case, define new test data and re-enable; current implementation fails */ static const SDLTest_TestCaseReference renderTest6 = - { (SDLTest_TestCaseFp)render_testBlitAlpha, "render_testBlitAlpha", "Tests blitting with alpha", TEST_DISABLED }; + { (SDLTest_TestCaseFp)render_testBlitAlpha, "render_testBlitAlpha", "Tests blitting with alpha", TEST_DISABLED }; /* TODO: rewrite test case, define new test data and re-enable; current implementation fails */ static const SDLTest_TestCaseReference renderTest7 = - { (SDLTest_TestCaseFp)render_testBlitBlend, "render_testBlitBlend", "Tests blitting with blending", TEST_DISABLED }; + { (SDLTest_TestCaseFp)render_testBlitBlend, "render_testBlitBlend", "Tests blitting with blending", TEST_DISABLED }; /* Sequence of Render test cases */ static const SDLTest_TestCaseReference *renderTests[] = { - &renderTest1, &renderTest2, &renderTest3, &renderTest4, &renderTest5, &renderTest6, &renderTest7, NULL + &renderTest1, &renderTest2, &renderTest3, &renderTest4, &renderTest5, &renderTest6, &renderTest7, NULL }; /* Render test suite (global) */ SDLTest_TestSuiteReference renderTestSuite = { - "Render", - InitCreateRenderer, - renderTests, - CleanupDestroyRenderer + "Render", + InitCreateRenderer, + renderTests, + CleanupDestroyRenderer }; diff --git a/test/testautomation_rwops.c b/test/testautomation_rwops.c index be93809db..f536d8b8b 100644 --- a/test/testautomation_rwops.c +++ b/test/testautomation_rwops.c @@ -32,56 +32,56 @@ static const char RWopsAlphabetString[] = "ABCDEFGHIJKLMNOPQRSTUVWXYZ"; void RWopsSetUp(void *arg) { - int fileLen; - FILE *handle; - int writtenLen; - int result; + int fileLen; + FILE *handle; + int writtenLen; + int result; - /* Clean up from previous runs (if any); ignore errors */ - remove(RWopsReadTestFilename); - remove(RWopsWriteTestFilename); - remove(RWopsAlphabetFilename); + /* Clean up from previous runs (if any); ignore errors */ + remove(RWopsReadTestFilename); + remove(RWopsWriteTestFilename); + remove(RWopsAlphabetFilename); - /* Create a test file */ - handle = fopen(RWopsReadTestFilename, "w"); - SDLTest_AssertCheck(handle != NULL, "Verify creation of file '%s' returned non NULL handle", RWopsReadTestFilename); + /* Create a test file */ + handle = fopen(RWopsReadTestFilename, "w"); + SDLTest_AssertCheck(handle != NULL, "Verify creation of file '%s' returned non NULL handle", RWopsReadTestFilename); if (handle == NULL) return; - /* Write some known text into it */ - fileLen = SDL_strlen(RWopsHelloWorldTestString); - writtenLen = (int)fwrite(RWopsHelloWorldTestString, 1, fileLen, handle); - SDLTest_AssertCheck(fileLen == writtenLen, "Verify number of written bytes, expected %i, got %i", fileLen, writtenLen); - result = fclose(handle); - SDLTest_AssertCheck(result == 0, "Verify result from fclose, expected 0, got %i", result); + /* Write some known text into it */ + fileLen = SDL_strlen(RWopsHelloWorldTestString); + writtenLen = (int)fwrite(RWopsHelloWorldTestString, 1, fileLen, handle); + SDLTest_AssertCheck(fileLen == writtenLen, "Verify number of written bytes, expected %i, got %i", fileLen, writtenLen); + result = fclose(handle); + SDLTest_AssertCheck(result == 0, "Verify result from fclose, expected 0, got %i", result); - /* Create a second test file */ - handle = fopen(RWopsAlphabetFilename, "w"); - SDLTest_AssertCheck(handle != NULL, "Verify creation of file '%s' returned non NULL handle", RWopsAlphabetFilename); + /* Create a second test file */ + handle = fopen(RWopsAlphabetFilename, "w"); + SDLTest_AssertCheck(handle != NULL, "Verify creation of file '%s' returned non NULL handle", RWopsAlphabetFilename); if (handle == NULL) return; - /* Write alphabet text into it */ - fileLen = SDL_strlen(RWopsAlphabetString); - writtenLen = (int)fwrite(RWopsAlphabetString, 1, fileLen, handle); - SDLTest_AssertCheck(fileLen == writtenLen, "Verify number of written bytes, expected %i, got %i", fileLen, writtenLen); - result = fclose(handle); - SDLTest_AssertCheck(result == 0, "Verify result from fclose, expected 0, got %i", result); + /* Write alphabet text into it */ + fileLen = SDL_strlen(RWopsAlphabetString); + writtenLen = (int)fwrite(RWopsAlphabetString, 1, fileLen, handle); + SDLTest_AssertCheck(fileLen == writtenLen, "Verify number of written bytes, expected %i, got %i", fileLen, writtenLen); + result = fclose(handle); + SDLTest_AssertCheck(result == 0, "Verify result from fclose, expected 0, got %i", result); - SDLTest_AssertPass("Creation of test file completed"); + SDLTest_AssertPass("Creation of test file completed"); } void RWopsTearDown(void *arg) { - int result; - - /* Remove the created files to clean up; ignore errors for write filename */ - result = remove(RWopsReadTestFilename); - SDLTest_AssertCheck(result == 0, "Verify result from remove(%s), expected 0, got %i", RWopsReadTestFilename, result); - remove(RWopsWriteTestFilename); - result = remove(RWopsAlphabetFilename); - SDLTest_AssertCheck(result == 0, "Verify result from remove(%s), expected 0, got %i", RWopsAlphabetFilename, result); + int result; - SDLTest_AssertPass("Cleanup of test files completed"); + /* Remove the created files to clean up; ignore errors for write filename */ + result = remove(RWopsReadTestFilename); + SDLTest_AssertCheck(result == 0, "Verify result from remove(%s), expected 0, got %i", RWopsReadTestFilename, result); + remove(RWopsWriteTestFilename); + result = remove(RWopsAlphabetFilename); + SDLTest_AssertCheck(result == 0, "Verify result from remove(%s), expected 0, got %i", RWopsAlphabetFilename, result); + + SDLTest_AssertPass("Cleanup of test files completed"); } /** @@ -91,7 +91,7 @@ RWopsTearDown(void *arg) * http://wiki.libsdl.org/moin.cgi/SDL_RWseek * http://wiki.libsdl.org/moin.cgi/SDL_RWread */ -void +void _testGenericRWopsValidations(SDL_RWops *rw, int write) { char buf[sizeof(RWopsHelloWorldTestString)]; @@ -111,10 +111,10 @@ _testGenericRWopsValidations(SDL_RWops *rw, int write) s = SDL_RWwrite(rw, RWopsHelloWorldTestString, sizeof(RWopsHelloWorldTestString)-1, 1); SDLTest_AssertPass("Call to SDL_RWwrite succeeded"); if (write) { - SDLTest_AssertCheck(s == (size_t)1, "Verify result of writing one byte with SDL_RWwrite, expected 1, got %i", s); + SDLTest_AssertCheck(s == (size_t)1, "Verify result of writing one byte with SDL_RWwrite, expected 1, got %i", s); } else { - SDLTest_AssertCheck(s == (size_t)0, "Verify result of writing with SDL_RWwrite, expected: 0, got %i", s); + SDLTest_AssertCheck(s == (size_t)0, "Verify result of writing with SDL_RWwrite, expected: 0, got %i", s); } /* Test seek to random position */ @@ -131,38 +131,38 @@ _testGenericRWopsValidations(SDL_RWops *rw, int write) s = SDL_RWread( rw, buf, 1, sizeof(RWopsHelloWorldTestString)-1 ); SDLTest_AssertPass("Call to SDL_RWread succeeded"); SDLTest_AssertCheck( - s == (size_t)(sizeof(RWopsHelloWorldTestString)-1), - "Verify result from SDL_RWread, expected %i, got %i", - sizeof(RWopsHelloWorldTestString)-1, - s); + s == (size_t)(sizeof(RWopsHelloWorldTestString)-1), + "Verify result from SDL_RWread, expected %i, got %i", + sizeof(RWopsHelloWorldTestString)-1, + s); SDLTest_AssertCheck( - SDL_memcmp(buf, RWopsHelloWorldTestString, sizeof(RWopsHelloWorldTestString)-1 ) == 0, - "Verify read bytes match expected string, expected '%s', got '%s'", RWopsHelloWorldTestString, buf); + SDL_memcmp(buf, RWopsHelloWorldTestString, sizeof(RWopsHelloWorldTestString)-1 ) == 0, + "Verify read bytes match expected string, expected '%s', got '%s'", RWopsHelloWorldTestString, buf); /* More seek tests. */ i = SDL_RWseek( rw, -4, RW_SEEK_CUR ); SDLTest_AssertPass("Call to SDL_RWseek(...,-4,RW_SEEK_CUR) succeeded"); SDLTest_AssertCheck( - i == (Sint64)(sizeof(RWopsHelloWorldTestString)-5), - "Verify seek to -4 with SDL_RWseek (RW_SEEK_CUR), expected %i, got %i", - sizeof(RWopsHelloWorldTestString)-5, - i); + i == (Sint64)(sizeof(RWopsHelloWorldTestString)-5), + "Verify seek to -4 with SDL_RWseek (RW_SEEK_CUR), expected %i, got %i", + sizeof(RWopsHelloWorldTestString)-5, + i); i = SDL_RWseek( rw, -1, RW_SEEK_END ); SDLTest_AssertPass("Call to SDL_RWseek(...,-1,RW_SEEK_END) succeeded"); SDLTest_AssertCheck( - i == (Sint64)(sizeof(RWopsHelloWorldTestString)-2), - "Verify seek to -1 with SDL_RWseek (RW_SEEK_END), expected %i, got %i", - sizeof(RWopsHelloWorldTestString)-2, - i); - + i == (Sint64)(sizeof(RWopsHelloWorldTestString)-2), + "Verify seek to -1 with SDL_RWseek (RW_SEEK_END), expected %i, got %i", + sizeof(RWopsHelloWorldTestString)-2, + i); + /* Invalid whence seek */ i = SDL_RWseek( rw, 0, 999 ); SDLTest_AssertPass("Call to SDL_RWseek(...,0,invalid_whence) succeeded"); SDLTest_AssertCheck( - i == (Sint64)(-1), - "Verify seek with SDL_RWseek (invalid_whence); expected: -1, got %i", - i); + i == (Sint64)(-1), + "Verify seek with SDL_RWseek (invalid_whence); expected: -1, got %i", + i); } /*! @@ -258,7 +258,7 @@ rwops_testMem (void) * http://wiki.libsdl.org/moin.cgi/SDL_RWFromConstMem * http://wiki.libsdl.org/moin.cgi/SDL_RWClose */ -int +int rwops_testConstMem (void) { SDL_RWops *rw; @@ -311,15 +311,15 @@ rwops_testFileRead(void) /* Check type */ #if defined(ANDROID) SDLTest_AssertCheck( - rw->type == SDL_RWOPS_STDFILE || rw->type == SDL_RWOPS_JNIFILE, + rw->type == SDL_RWOPS_STDFILE || rw->type == SDL_RWOPS_JNIFILE, "Verify RWops type is SDL_RWOPS_STDFILE or SDL_RWOPS_JNIFILE; expected: %d|%d, got: %d", SDL_RWOPS_STDFILE, SDL_RWOPS_JNIFILE, rw->type); #elif defined(__WIN32__) SDLTest_AssertCheck( - rw->type == SDL_RWOPS_WINFILE, + rw->type == SDL_RWOPS_WINFILE, "Verify RWops type is SDL_RWOPS_WINFILE; expected: %d, got: %d", SDL_RWOPS_WINFILE, rw->type); #else SDLTest_AssertCheck( - rw->type == SDL_RWOPS_STDFILE, + rw->type == SDL_RWOPS_STDFILE, "Verify RWops type is SDL_RWOPS_STDFILE; expected: %d, got: %d", SDL_RWOPS_STDFILE, rw->type); #endif @@ -358,15 +358,15 @@ rwops_testFileWrite(void) /* Check type */ #if defined(ANDROID) SDLTest_AssertCheck( - rw->type == SDL_RWOPS_STDFILE || rw->type == SDL_RWOPS_JNIFILE, + rw->type == SDL_RWOPS_STDFILE || rw->type == SDL_RWOPS_JNIFILE, "Verify RWops type is SDL_RWOPS_STDFILE or SDL_RWOPS_JNIFILE; expected: %d|%d, got: %d", SDL_RWOPS_STDFILE, SDL_RWOPS_JNIFILE, rw->type); #elif defined(__WIN32__) SDLTest_AssertCheck( - rw->type == SDL_RWOPS_WINFILE, + rw->type == SDL_RWOPS_WINFILE, "Verify RWops type is SDL_RWOPS_WINFILE; expected: %d, got: %d", SDL_RWOPS_WINFILE, rw->type); #else SDLTest_AssertCheck( - rw->type == SDL_RWOPS_STDFILE, + rw->type == SDL_RWOPS_STDFILE, "Verify RWops type is SDL_RWOPS_STDFILE; expected: %d, got: %d", SDL_RWOPS_STDFILE, rw->type); #endif @@ -417,7 +417,7 @@ rwops_testFPRead(void) /* Check type */ SDLTest_AssertCheck( - rw->type == SDL_RWOPS_STDFILE, + rw->type == SDL_RWOPS_STDFILE, "Verify RWops type is SDL_RWOPS_STDFILE; expected: %d, got: %d", SDL_RWOPS_STDFILE, rw->type); /* Run generic tests */ @@ -467,7 +467,7 @@ rwops_testFPWrite(void) /* Check type */ SDLTest_AssertCheck( - rw->type == SDL_RWOPS_STDFILE, + rw->type == SDL_RWOPS_STDFILE, "Verify RWops type is SDL_RWOPS_STDFILE; expected: %d, got: %d", SDL_RWOPS_STDFILE, rw->type); /* Run generic tests */ @@ -498,9 +498,9 @@ rwops_testAllocFree (void) /* Check type */ SDLTest_AssertCheck( - rw->type == SDL_RWOPS_UNKNOWN, + rw->type == SDL_RWOPS_UNKNOWN, "Verify RWops type is SDL_RWOPS_UNKNOWN; expected: %d, got: %d", SDL_RWOPS_UNKNOWN, rw->type); - + /* Free context again */ SDL_FreeRW(rw); SDLTest_AssertPass("Call to SDL_FreeRW() succeeded"); @@ -529,13 +529,13 @@ rwops_testCompareRWFromMemWithRWFromFile(void) int size; int result; - + for (size=5; size<10; size++) { /* Terminate buffer */ buffer_file[slen] = 0; buffer_mem[slen] = 0; - + /* Read/seek from memory */ rwops_mem = SDL_RWFromMem((void *)RWopsAlphabetString, slen); SDLTest_AssertPass("Call to SDL_RWFromMem()"); @@ -557,7 +557,7 @@ rwops_testCompareRWFromMemWithRWFromFile(void) result = SDL_RWclose(rwops_file); SDLTest_AssertPass("Call to SDL_RWclose(file)"); SDLTest_AssertCheck(result == 0, "Verify result value is 0; got: %d", result); - + /* Compare */ SDLTest_AssertCheck(rv_mem == rv_file, "Verify returned read blocks matches for mem and file reads; got: rv_mem=%d rv_file=%d", rv_mem, rv_file); SDLTest_AssertCheck(sv_mem == sv_file, "Verify SEEK_END position matches for mem and file seeks; got: sv_mem=%llu sv_file=%llu", sv_mem, sv_file); @@ -570,7 +570,7 @@ rwops_testCompareRWFromMemWithRWFromFile(void) SDL_strncmp(buffer_file, RWopsAlphabetString, slen) == 0, "Verify file buffer contain alphabet string; expected: %s, got: %s", RWopsAlphabetString, buffer_file); } - + return TEST_COMPLETED; } @@ -605,7 +605,7 @@ rwops_testFileWriteReadEndian(void) int cresult; for (mode = 0; mode < 3; mode++) { - + /* Create test data */ switch (mode) { case 0: @@ -636,7 +636,7 @@ rwops_testFileWriteReadEndian(void) LE64value = SDLTest_RandomUint64(); break; } - + /* Write test. */ rw = SDL_RWFromFile(RWopsWriteTestFilename, "w+"); SDLTest_AssertPass("Call to SDL_RWFromFile(..,\"w+\")"); @@ -648,22 +648,22 @@ rwops_testFileWriteReadEndian(void) /* Write test data */ objectsWritten = SDL_WriteBE16(rw, BE16value); SDLTest_AssertPass("Call to SDL_WriteBE16"); - SDLTest_AssertCheck(objectsWritten == 1, "Validate number of objects written, expected: 1, got: %i", objectsWritten); + SDLTest_AssertCheck(objectsWritten == 1, "Validate number of objects written, expected: 1, got: %i", objectsWritten); objectsWritten = SDL_WriteBE32(rw, BE32value); SDLTest_AssertPass("Call to SDL_WriteBE32"); - SDLTest_AssertCheck(objectsWritten == 1, "Validate number of objects written, expected: 1, got: %i", objectsWritten); + SDLTest_AssertCheck(objectsWritten == 1, "Validate number of objects written, expected: 1, got: %i", objectsWritten); objectsWritten = SDL_WriteBE64(rw, BE64value); SDLTest_AssertPass("Call to SDL_WriteBE64"); - SDLTest_AssertCheck(objectsWritten == 1, "Validate number of objects written, expected: 1, got: %i", objectsWritten); + SDLTest_AssertCheck(objectsWritten == 1, "Validate number of objects written, expected: 1, got: %i", objectsWritten); objectsWritten = SDL_WriteLE16(rw, LE16value); SDLTest_AssertPass("Call to SDL_WriteLE16"); - SDLTest_AssertCheck(objectsWritten == 1, "Validate number of objects written, expected: 1, got: %i", objectsWritten); + SDLTest_AssertCheck(objectsWritten == 1, "Validate number of objects written, expected: 1, got: %i", objectsWritten); objectsWritten = SDL_WriteLE32(rw, LE32value); SDLTest_AssertPass("Call to SDL_WriteLE32"); - SDLTest_AssertCheck(objectsWritten == 1, "Validate number of objects written, expected: 1, got: %i", objectsWritten); + SDLTest_AssertCheck(objectsWritten == 1, "Validate number of objects written, expected: 1, got: %i", objectsWritten); objectsWritten = SDL_WriteLE64(rw, LE64value); SDLTest_AssertPass("Call to SDL_WriteLE64"); - SDLTest_AssertCheck(objectsWritten == 1, "Validate number of objects written, expected: 1, got: %i", objectsWritten); + SDLTest_AssertCheck(objectsWritten == 1, "Validate number of objects written, expected: 1, got: %i", objectsWritten); /* Test seek to start */ result = SDL_RWseek( rw, 0, RW_SEEK_SET ); @@ -676,16 +676,16 @@ rwops_testFileWriteReadEndian(void) SDLTest_AssertCheck(BE16test == BE16value, "Validate return value from SDL_ReadBE16, expected: %hu, got: %hu", BE16value, BE16test); BE32test = SDL_ReadBE32(rw); SDLTest_AssertPass("Call to SDL_ReadBE32"); - SDLTest_AssertCheck(BE32test == BE32value, "Validate return value from SDL_ReadBE32, expected: %u, got: %u", BE32value, BE32test); + SDLTest_AssertCheck(BE32test == BE32value, "Validate return value from SDL_ReadBE32, expected: %u, got: %u", BE32value, BE32test); BE64test = SDL_ReadBE64(rw); SDLTest_AssertPass("Call to SDL_ReadBE64"); - SDLTest_AssertCheck(BE64test == BE64value, "Validate return value from SDL_ReadBE64, expected: %llu, got: %llu", BE64value, BE64test); + SDLTest_AssertCheck(BE64test == BE64value, "Validate return value from SDL_ReadBE64, expected: %llu, got: %llu", BE64value, BE64test); LE16test = SDL_ReadLE16(rw); SDLTest_AssertPass("Call to SDL_ReadLE16"); SDLTest_AssertCheck(LE16test == LE16value, "Validate return value from SDL_ReadLE16, expected: %hu, got: %hu", LE16value, LE16test); LE32test = SDL_ReadLE32(rw); SDLTest_AssertPass("Call to SDL_ReadLE32"); - SDLTest_AssertCheck(LE32test == LE32value, "Validate return value from SDL_ReadLE32, expected: %u, got: %u", LE32value, LE32test); + SDLTest_AssertCheck(LE32test == LE32value, "Validate return value from SDL_ReadLE32, expected: %u, got: %u", LE32value, LE32test); LE64test = SDL_ReadLE64(rw); SDLTest_AssertPass("Call to SDL_ReadLE64"); SDLTest_AssertCheck(LE64test == LE64value, "Validate return value from SDL_ReadLE64, expected: %llu, got: %llu", LE64value, LE64test); @@ -693,7 +693,7 @@ rwops_testFileWriteReadEndian(void) /* Close handle */ cresult = SDL_RWclose(rw); SDLTest_AssertPass("Call to SDL_RWclose() succeeded"); - SDLTest_AssertCheck(cresult == 0, "Verify result value is 0; got: %d", cresult); + SDLTest_AssertCheck(cresult == 0, "Verify result value is 0; got: %d", cresult); } return TEST_COMPLETED; @@ -704,45 +704,45 @@ rwops_testFileWriteReadEndian(void) /* RWops test cases */ static const SDLTest_TestCaseReference rwopsTest1 = - { (SDLTest_TestCaseFp)rwops_testParamNegative, "rwops_testParamNegative", "Negative test for SDL_RWFromFile parameters", TEST_ENABLED }; + { (SDLTest_TestCaseFp)rwops_testParamNegative, "rwops_testParamNegative", "Negative test for SDL_RWFromFile parameters", TEST_ENABLED }; static const SDLTest_TestCaseReference rwopsTest2 = - { (SDLTest_TestCaseFp)rwops_testMem, "rwops_testMem", "Tests opening from memory", TEST_ENABLED }; + { (SDLTest_TestCaseFp)rwops_testMem, "rwops_testMem", "Tests opening from memory", TEST_ENABLED }; static const SDLTest_TestCaseReference rwopsTest3 = - { (SDLTest_TestCaseFp)rwops_testConstMem, "rwops_testConstMem", "Tests opening from (const) memory", TEST_ENABLED }; + { (SDLTest_TestCaseFp)rwops_testConstMem, "rwops_testConstMem", "Tests opening from (const) memory", TEST_ENABLED }; static const SDLTest_TestCaseReference rwopsTest4 = - { (SDLTest_TestCaseFp)rwops_testFileRead, "rwops_testFileRead", "Tests reading from a file", TEST_ENABLED }; + { (SDLTest_TestCaseFp)rwops_testFileRead, "rwops_testFileRead", "Tests reading from a file", TEST_ENABLED }; static const SDLTest_TestCaseReference rwopsTest5 = - { (SDLTest_TestCaseFp)rwops_testFileWrite, "rwops_testFileWrite", "Test writing to a file", TEST_ENABLED }; + { (SDLTest_TestCaseFp)rwops_testFileWrite, "rwops_testFileWrite", "Test writing to a file", TEST_ENABLED }; static const SDLTest_TestCaseReference rwopsTest6 = - { (SDLTest_TestCaseFp)rwops_testFPRead, "rwops_testFPRead", "Test reading from file pointer", TEST_ENABLED }; + { (SDLTest_TestCaseFp)rwops_testFPRead, "rwops_testFPRead", "Test reading from file pointer", TEST_ENABLED }; static const SDLTest_TestCaseReference rwopsTest7 = - { (SDLTest_TestCaseFp)rwops_testFPWrite, "rwops_testFPWrite", "Test writing to file pointer", TEST_ENABLED }; + { (SDLTest_TestCaseFp)rwops_testFPWrite, "rwops_testFPWrite", "Test writing to file pointer", TEST_ENABLED }; static const SDLTest_TestCaseReference rwopsTest8 = - { (SDLTest_TestCaseFp)rwops_testAllocFree, "rwops_testAllocFree", "Test alloc and free of RW context", TEST_ENABLED }; + { (SDLTest_TestCaseFp)rwops_testAllocFree, "rwops_testAllocFree", "Test alloc and free of RW context", TEST_ENABLED }; static const SDLTest_TestCaseReference rwopsTest9 = - { (SDLTest_TestCaseFp)rwops_testFileWriteReadEndian, "rwops_testFileWriteReadEndian", "Test writing and reading via the Endian aware functions", TEST_ENABLED }; + { (SDLTest_TestCaseFp)rwops_testFileWriteReadEndian, "rwops_testFileWriteReadEndian", "Test writing and reading via the Endian aware functions", TEST_ENABLED }; static const SDLTest_TestCaseReference rwopsTest10 = - { (SDLTest_TestCaseFp)rwops_testCompareRWFromMemWithRWFromFile, "rwops_testCompareRWFromMemWithRWFromFile", "Compare RWFromMem and RWFromFile RWops for read and seek", TEST_ENABLED }; + { (SDLTest_TestCaseFp)rwops_testCompareRWFromMemWithRWFromFile, "rwops_testCompareRWFromMemWithRWFromFile", "Compare RWFromMem and RWFromFile RWops for read and seek", TEST_ENABLED }; /* Sequence of RWops test cases */ static const SDLTest_TestCaseReference *rwopsTests[] = { - &rwopsTest1, &rwopsTest2, &rwopsTest3, &rwopsTest4, &rwopsTest5, &rwopsTest6, - &rwopsTest7, &rwopsTest8, &rwopsTest9, &rwopsTest10, NULL + &rwopsTest1, &rwopsTest2, &rwopsTest3, &rwopsTest4, &rwopsTest5, &rwopsTest6, + &rwopsTest7, &rwopsTest8, &rwopsTest9, &rwopsTest10, NULL }; /* RWops test suite (global) */ SDLTest_TestSuiteReference rwopsTestSuite = { - "RWops", - RWopsSetUp, - rwopsTests, - RWopsTearDown + "RWops", + RWopsSetUp, + rwopsTests, + RWopsTearDown }; diff --git a/test/testautomation_sdltest.c b/test/testautomation_sdltest.c index 26d0f72c8..b8bc326a7 100644 --- a/test/testautomation_sdltest.c +++ b/test/testautomation_sdltest.c @@ -29,18 +29,18 @@ sdltest_getFuzzerInvocationCount(void *arg) { Uint8 result; int fuzzerCount1, fuzzerCount2; - + fuzzerCount1 = SDLTest_GetFuzzerInvocationCount(); SDLTest_AssertPass("Call to SDLTest_GetFuzzerInvocationCount()"); SDLTest_AssertCheck(fuzzerCount1 >= 0, "Verify returned value, expected: >=0, got: %d", fuzzerCount1); - + result = SDLTest_RandomUint8(); SDLTest_AssertPass("Call to SDLTest_RandomUint8(), returned %d", result); fuzzerCount2 = SDLTest_GetFuzzerInvocationCount(); SDLTest_AssertPass("Call to SDLTest_GetFuzzerInvocationCount()"); SDLTest_AssertCheck(fuzzerCount2 > fuzzerCount1, "Verify returned value, expected: >%d, got: %d", fuzzerCount1, fuzzerCount2); - + return TEST_COMPLETED; } @@ -56,7 +56,7 @@ sdltest_randomNumber(void *arg) double dresult; Uint64 umax; Sint64 min, max; - + result = (Sint64)SDLTest_RandomUint8(); umax = (1 << 8) - 1; SDLTest_AssertPass("Call to SDLTest_RandomUint8"); @@ -67,7 +67,7 @@ sdltest_randomNumber(void *arg) max = (1 << 7) - 1; SDLTest_AssertPass("Call to SDLTest_RandomSint8"); SDLTest_AssertCheck(result >= min && result <= max, "Verify result value, expected: [%lld,%lld], got: %lld", min, max, result); - + result = (Sint64)SDLTest_RandomUint16(); umax = (1 << 16) - 1; SDLTest_AssertPass("Call to SDLTest_RandomUint16"); @@ -99,7 +99,7 @@ sdltest_randomNumber(void *arg) dresult = (double)SDLTest_RandomUnitFloat(); SDLTest_AssertPass("Call to SDLTest_RandomUnitFloat"); SDLTest_AssertCheck(dresult >= 0.0 && dresult < 1.0, "Verify result value, expected: [0.0,1.0[, got: %e", dresult); - + dresult = (double)SDLTest_RandomFloat(); SDLTest_AssertPass("Call to SDLTest_RandomFloat"); SDLTest_AssertCheck(dresult >= (double)(-FLT_MAX) && dresult <= (double)FLT_MAX, "Verify result value, expected: [%e,%e], got: %e", (double)(-FLT_MAX), (double)FLT_MAX, dresult); @@ -110,7 +110,7 @@ sdltest_randomNumber(void *arg) dresult = SDLTest_RandomDouble(); SDLTest_AssertPass("Call to SDLTest_RandomDouble"); - + return TEST_COMPLETED; } @@ -133,56 +133,56 @@ sdltest_randomBoundaryNumberUint8(void *arg) SDLTest_AssertPass("Call to SDLTest_RandomUint8BoundaryValue"); SDLTest_AssertCheck( uresult == 10, - "Validate result value for parameters (10,10,SDL_TRUE); expected: 10, got: %lld", uresult); + "Validate result value for parameters (10,10,SDL_TRUE); expected: 10, got: %lld", uresult); /* RandomUintXBoundaryValue(10, 11, SDL_TRUE) returns 10, 11 */ uresult = (Uint64)SDLTest_RandomUint8BoundaryValue(10, 11, SDL_TRUE); SDLTest_AssertPass("Call to SDLTest_RandomUint8BoundaryValue"); SDLTest_AssertCheck( uresult == 10 || uresult == 11, - "Validate result value for parameters (10,11,SDL_TRUE); expected: 10|11, got: %lld", uresult); + "Validate result value for parameters (10,11,SDL_TRUE); expected: 10|11, got: %lld", uresult); /* RandomUintXBoundaryValue(10, 12, SDL_TRUE) returns 10, 11, 12 */ uresult = (Uint64)SDLTest_RandomUint8BoundaryValue(10, 12, SDL_TRUE); SDLTest_AssertPass("Call to SDLTest_RandomUint8BoundaryValue"); SDLTest_AssertCheck( uresult == 10 || uresult == 11 || uresult == 12, - "Validate result value for parameters (10,12,SDL_TRUE); expected: 10|11|12, got: %lld", uresult); + "Validate result value for parameters (10,12,SDL_TRUE); expected: 10|11|12, got: %lld", uresult); /* RandomUintXBoundaryValue(10, 13, SDL_TRUE) returns 10, 11, 12, 13 */ uresult = (Uint64)SDLTest_RandomUint8BoundaryValue(10, 13, SDL_TRUE); SDLTest_AssertPass("Call to SDLTest_RandomUint8BoundaryValue"); SDLTest_AssertCheck( uresult == 10 || uresult == 11 || uresult == 12 || uresult == 13, - "Validate result value for parameters (10,13,SDL_TRUE); expected: 10|11|12|13, got: %lld", uresult); + "Validate result value for parameters (10,13,SDL_TRUE); expected: 10|11|12|13, got: %lld", uresult); /* RandomUintXBoundaryValue(10, 20, SDL_TRUE) returns 10, 11, 19 or 20 */ uresult = (Uint64)SDLTest_RandomUint8BoundaryValue(10, 20, SDL_TRUE); SDLTest_AssertPass("Call to SDLTest_RandomUint8BoundaryValue"); SDLTest_AssertCheck( uresult == 10 || uresult == 11 || uresult == 19 || uresult == 20, - "Validate result value for parameters (10,20,SDL_TRUE); expected: 10|11|19|20, got: %lld", uresult); + "Validate result value for parameters (10,20,SDL_TRUE); expected: 10|11|19|20, got: %lld", uresult); /* RandomUintXBoundaryValue(20, 10, SDL_TRUE) returns 10, 11, 19 or 20 */ uresult = (Uint64)SDLTest_RandomUint8BoundaryValue(20, 10, SDL_TRUE); SDLTest_AssertPass("Call to SDLTest_RandomUint8BoundaryValue"); SDLTest_AssertCheck( uresult == 10 || uresult == 11 || uresult == 19 || uresult == 20, - "Validate result value for parameters (20,10,SDL_TRUE); expected: 10|11|19|20, got: %lld", uresult); + "Validate result value for parameters (20,10,SDL_TRUE); expected: 10|11|19|20, got: %lld", uresult); /* RandomUintXBoundaryValue(1, 20, SDL_FALSE) returns 0, 21 */ uresult = (Uint64)SDLTest_RandomUint8BoundaryValue(1, 20, SDL_FALSE); SDLTest_AssertPass("Call to SDLTest_RandomUint8BoundaryValue"); SDLTest_AssertCheck( uresult == 0 || uresult == 21, - "Validate result value for parameters (1,20,SDL_FALSE); expected: 0|21, got: %lld", uresult); - + "Validate result value for parameters (1,20,SDL_FALSE); expected: 0|21, got: %lld", uresult); + /* RandomUintXBoundaryValue(0, 99, SDL_FALSE) returns 100 */ uresult = (Uint64)SDLTest_RandomUint8BoundaryValue(0, 99, SDL_FALSE); SDLTest_AssertPass("Call to SDLTest_RandomUint8BoundaryValue"); SDLTest_AssertCheck( uresult == 100, - "Validate result value for parameters (0,99,SDL_FALSE); expected: 100, got: %lld", uresult); + "Validate result value for parameters (0,99,SDL_FALSE); expected: 100, got: %lld", uresult); /* RandomUintXBoundaryValue(1, 0xff, SDL_FALSE) returns 0 (no error) */ uresult = (Uint64)SDLTest_RandomUint8BoundaryValue(1, 255, SDL_FALSE); @@ -243,56 +243,56 @@ sdltest_randomBoundaryNumberUint16(void *arg) SDLTest_AssertPass("Call to SDLTest_RandomUint16BoundaryValue"); SDLTest_AssertCheck( uresult == 10, - "Validate result value for parameters (10,10,SDL_TRUE); expected: 10, got: %lld", uresult); + "Validate result value for parameters (10,10,SDL_TRUE); expected: 10, got: %lld", uresult); /* RandomUintXBoundaryValue(10, 11, SDL_TRUE) returns 10, 11 */ uresult = (Uint64)SDLTest_RandomUint16BoundaryValue(10, 11, SDL_TRUE); SDLTest_AssertPass("Call to SDLTest_RandomUint16BoundaryValue"); SDLTest_AssertCheck( uresult == 10 || uresult == 11, - "Validate result value for parameters (10,11,SDL_TRUE); expected: 10|11, got: %lld", uresult); + "Validate result value for parameters (10,11,SDL_TRUE); expected: 10|11, got: %lld", uresult); /* RandomUintXBoundaryValue(10, 12, SDL_TRUE) returns 10, 11, 12 */ uresult = (Uint64)SDLTest_RandomUint16BoundaryValue(10, 12, SDL_TRUE); SDLTest_AssertPass("Call to SDLTest_RandomUint16BoundaryValue"); SDLTest_AssertCheck( uresult == 10 || uresult == 11 || uresult == 12, - "Validate result value for parameters (10,12,SDL_TRUE); expected: 10|11|12, got: %lld", uresult); + "Validate result value for parameters (10,12,SDL_TRUE); expected: 10|11|12, got: %lld", uresult); /* RandomUintXBoundaryValue(10, 13, SDL_TRUE) returns 10, 11, 12, 13 */ uresult = (Uint64)SDLTest_RandomUint16BoundaryValue(10, 13, SDL_TRUE); SDLTest_AssertPass("Call to SDLTest_RandomUint16BoundaryValue"); SDLTest_AssertCheck( uresult == 10 || uresult == 11 || uresult == 12 || uresult == 13, - "Validate result value for parameters (10,13,SDL_TRUE); expected: 10|11|12|13, got: %lld", uresult); + "Validate result value for parameters (10,13,SDL_TRUE); expected: 10|11|12|13, got: %lld", uresult); /* RandomUintXBoundaryValue(10, 20, SDL_TRUE) returns 10, 11, 19 or 20 */ uresult = (Uint64)SDLTest_RandomUint16BoundaryValue(10, 20, SDL_TRUE); SDLTest_AssertPass("Call to SDLTest_RandomUint16BoundaryValue"); SDLTest_AssertCheck( uresult == 10 || uresult == 11 || uresult == 19 || uresult == 20, - "Validate result value for parameters (10,20,SDL_TRUE); expected: 10|11|19|20, got: %lld", uresult); + "Validate result value for parameters (10,20,SDL_TRUE); expected: 10|11|19|20, got: %lld", uresult); /* RandomUintXBoundaryValue(20, 10, SDL_TRUE) returns 10, 11, 19 or 20 */ uresult = (Uint64)SDLTest_RandomUint16BoundaryValue(20, 10, SDL_TRUE); SDLTest_AssertPass("Call to SDLTest_RandomUint16BoundaryValue"); SDLTest_AssertCheck( uresult == 10 || uresult == 11 || uresult == 19 || uresult == 20, - "Validate result value for parameters (20,10,SDL_TRUE); expected: 10|11|19|20, got: %lld", uresult); + "Validate result value for parameters (20,10,SDL_TRUE); expected: 10|11|19|20, got: %lld", uresult); /* RandomUintXBoundaryValue(1, 20, SDL_FALSE) returns 0, 21 */ uresult = (Uint64)SDLTest_RandomUint16BoundaryValue(1, 20, SDL_FALSE); SDLTest_AssertPass("Call to SDLTest_RandomUint16BoundaryValue"); SDLTest_AssertCheck( uresult == 0 || uresult == 21, - "Validate result value for parameters (1,20,SDL_FALSE); expected: 0|21, got: %lld", uresult); - + "Validate result value for parameters (1,20,SDL_FALSE); expected: 0|21, got: %lld", uresult); + /* RandomUintXBoundaryValue(0, 99, SDL_FALSE) returns 100 */ uresult = (Uint64)SDLTest_RandomUint16BoundaryValue(0, 99, SDL_FALSE); SDLTest_AssertPass("Call to SDLTest_RandomUint16BoundaryValue"); SDLTest_AssertCheck( uresult == 100, - "Validate result value for parameters (0,99,SDL_FALSE); expected: 100, got: %lld", uresult); + "Validate result value for parameters (0,99,SDL_FALSE); expected: 100, got: %lld", uresult); /* RandomUintXBoundaryValue(1, 0xffff, SDL_FALSE) returns 0 (no error) */ uresult = (Uint64)SDLTest_RandomUint16BoundaryValue(1, 0xffff, SDL_FALSE); @@ -333,7 +333,7 @@ sdltest_randomBoundaryNumberUint16(void *arg) return TEST_COMPLETED; } - + /* * @brief Calls to random boundary number generators for Uint32 */ @@ -353,56 +353,56 @@ sdltest_randomBoundaryNumberUint32(void *arg) SDLTest_AssertPass("Call to SDLTest_RandomUint32BoundaryValue"); SDLTest_AssertCheck( uresult == 10, - "Validate result value for parameters (10,10,SDL_TRUE); expected: 10, got: %lld", uresult); + "Validate result value for parameters (10,10,SDL_TRUE); expected: 10, got: %lld", uresult); /* RandomUintXBoundaryValue(10, 11, SDL_TRUE) returns 10, 11 */ uresult = (Uint64)SDLTest_RandomUint32BoundaryValue(10, 11, SDL_TRUE); SDLTest_AssertPass("Call to SDLTest_RandomUint32BoundaryValue"); SDLTest_AssertCheck( uresult == 10 || uresult == 11, - "Validate result value for parameters (10,11,SDL_TRUE); expected: 10|11, got: %lld", uresult); + "Validate result value for parameters (10,11,SDL_TRUE); expected: 10|11, got: %lld", uresult); /* RandomUintXBoundaryValue(10, 12, SDL_TRUE) returns 10, 11, 12 */ uresult = (Uint64)SDLTest_RandomUint32BoundaryValue(10, 12, SDL_TRUE); SDLTest_AssertPass("Call to SDLTest_RandomUint32BoundaryValue"); SDLTest_AssertCheck( uresult == 10 || uresult == 11 || uresult == 12, - "Validate result value for parameters (10,12,SDL_TRUE); expected: 10|11|12, got: %lld", uresult); + "Validate result value for parameters (10,12,SDL_TRUE); expected: 10|11|12, got: %lld", uresult); /* RandomUintXBoundaryValue(10, 13, SDL_TRUE) returns 10, 11, 12, 13 */ uresult = (Uint64)SDLTest_RandomUint32BoundaryValue(10, 13, SDL_TRUE); SDLTest_AssertPass("Call to SDLTest_RandomUint32BoundaryValue"); SDLTest_AssertCheck( uresult == 10 || uresult == 11 || uresult == 12 || uresult == 13, - "Validate result value for parameters (10,13,SDL_TRUE); expected: 10|11|12|13, got: %lld", uresult); + "Validate result value for parameters (10,13,SDL_TRUE); expected: 10|11|12|13, got: %lld", uresult); /* RandomUintXBoundaryValue(10, 20, SDL_TRUE) returns 10, 11, 19 or 20 */ uresult = (Uint64)SDLTest_RandomUint32BoundaryValue(10, 20, SDL_TRUE); SDLTest_AssertPass("Call to SDLTest_RandomUint32BoundaryValue"); SDLTest_AssertCheck( uresult == 10 || uresult == 11 || uresult == 19 || uresult == 20, - "Validate result value for parameters (10,20,SDL_TRUE); expected: 10|11|19|20, got: %lld", uresult); + "Validate result value for parameters (10,20,SDL_TRUE); expected: 10|11|19|20, got: %lld", uresult); /* RandomUintXBoundaryValue(20, 10, SDL_TRUE) returns 10, 11, 19 or 20 */ uresult = (Uint64)SDLTest_RandomUint32BoundaryValue(20, 10, SDL_TRUE); SDLTest_AssertPass("Call to SDLTest_RandomUint32BoundaryValue"); SDLTest_AssertCheck( uresult == 10 || uresult == 11 || uresult == 19 || uresult == 20, - "Validate result value for parameters (20,10,SDL_TRUE); expected: 10|11|19|20, got: %lld", uresult); + "Validate result value for parameters (20,10,SDL_TRUE); expected: 10|11|19|20, got: %lld", uresult); /* RandomUintXBoundaryValue(1, 20, SDL_FALSE) returns 0, 21 */ uresult = (Uint64)SDLTest_RandomUint32BoundaryValue(1, 20, SDL_FALSE); SDLTest_AssertPass("Call to SDLTest_RandomUint32BoundaryValue"); SDLTest_AssertCheck( uresult == 0 || uresult == 21, - "Validate result value for parameters (1,20,SDL_FALSE); expected: 0|21, got: %lld", uresult); - + "Validate result value for parameters (1,20,SDL_FALSE); expected: 0|21, got: %lld", uresult); + /* RandomUintXBoundaryValue(0, 99, SDL_FALSE) returns 100 */ uresult = (Uint64)SDLTest_RandomUint32BoundaryValue(0, 99, SDL_FALSE); SDLTest_AssertPass("Call to SDLTest_RandomUint32BoundaryValue"); SDLTest_AssertCheck( uresult == 100, - "Validate result value for parameters (0,99,SDL_FALSE); expected: 100, got: %lld", uresult); + "Validate result value for parameters (0,99,SDL_FALSE); expected: 100, got: %lld", uresult); /* RandomUintXBoundaryValue(1, 0xffffffff, SDL_FALSE) returns 0 (no error) */ uresult = (Uint64)SDLTest_RandomUint32BoundaryValue(1, 0xffffffff, SDL_FALSE); @@ -463,56 +463,56 @@ sdltest_randomBoundaryNumberUint64(void *arg) SDLTest_AssertPass("Call to SDLTest_RandomUint64BoundaryValue"); SDLTest_AssertCheck( uresult == 10, - "Validate result value for parameters (10,10,SDL_TRUE); expected: 10, got: %lld", uresult); + "Validate result value for parameters (10,10,SDL_TRUE); expected: 10, got: %lld", uresult); /* RandomUintXBoundaryValue(10, 11, SDL_TRUE) returns 10, 11 */ uresult = (Uint64)SDLTest_RandomUint64BoundaryValue(10, 11, SDL_TRUE); SDLTest_AssertPass("Call to SDLTest_RandomUint64BoundaryValue"); SDLTest_AssertCheck( uresult == 10 || uresult == 11, - "Validate result value for parameters (10,11,SDL_TRUE); expected: 10|11, got: %lld", uresult); + "Validate result value for parameters (10,11,SDL_TRUE); expected: 10|11, got: %lld", uresult); /* RandomUintXBoundaryValue(10, 12, SDL_TRUE) returns 10, 11, 12 */ uresult = (Uint64)SDLTest_RandomUint64BoundaryValue(10, 12, SDL_TRUE); SDLTest_AssertPass("Call to SDLTest_RandomUint64BoundaryValue"); SDLTest_AssertCheck( uresult == 10 || uresult == 11 || uresult == 12, - "Validate result value for parameters (10,12,SDL_TRUE); expected: 10|11|12, got: %lld", uresult); + "Validate result value for parameters (10,12,SDL_TRUE); expected: 10|11|12, got: %lld", uresult); /* RandomUintXBoundaryValue(10, 13, SDL_TRUE) returns 10, 11, 12, 13 */ uresult = (Uint64)SDLTest_RandomUint64BoundaryValue(10, 13, SDL_TRUE); SDLTest_AssertPass("Call to SDLTest_RandomUint64BoundaryValue"); SDLTest_AssertCheck( uresult == 10 || uresult == 11 || uresult == 12 || uresult == 13, - "Validate result value for parameters (10,13,SDL_TRUE); expected: 10|11|12|13, got: %lld", uresult); + "Validate result value for parameters (10,13,SDL_TRUE); expected: 10|11|12|13, got: %lld", uresult); /* RandomUintXBoundaryValue(10, 20, SDL_TRUE) returns 10, 11, 19 or 20 */ uresult = (Uint64)SDLTest_RandomUint64BoundaryValue(10, 20, SDL_TRUE); SDLTest_AssertPass("Call to SDLTest_RandomUint64BoundaryValue"); SDLTest_AssertCheck( uresult == 10 || uresult == 11 || uresult == 19 || uresult == 20, - "Validate result value for parameters (10,20,SDL_TRUE); expected: 10|11|19|20, got: %lld", uresult); + "Validate result value for parameters (10,20,SDL_TRUE); expected: 10|11|19|20, got: %lld", uresult); /* RandomUintXBoundaryValue(20, 10, SDL_TRUE) returns 10, 11, 19 or 20 */ uresult = (Uint64)SDLTest_RandomUint64BoundaryValue(20, 10, SDL_TRUE); SDLTest_AssertPass("Call to SDLTest_RandomUint64BoundaryValue"); SDLTest_AssertCheck( uresult == 10 || uresult == 11 || uresult == 19 || uresult == 20, - "Validate result value for parameters (20,10,SDL_TRUE); expected: 10|11|19|20, got: %lld", uresult); + "Validate result value for parameters (20,10,SDL_TRUE); expected: 10|11|19|20, got: %lld", uresult); /* RandomUintXBoundaryValue(1, 20, SDL_FALSE) returns 0, 21 */ uresult = (Uint64)SDLTest_RandomUint64BoundaryValue(1, 20, SDL_FALSE); SDLTest_AssertPass("Call to SDLTest_RandomUint64BoundaryValue"); SDLTest_AssertCheck( uresult == 0 || uresult == 21, - "Validate result value for parameters (1,20,SDL_FALSE); expected: 0|21, got: %lld", uresult); - + "Validate result value for parameters (1,20,SDL_FALSE); expected: 0|21, got: %lld", uresult); + /* RandomUintXBoundaryValue(0, 99, SDL_FALSE) returns 100 */ uresult = (Uint64)SDLTest_RandomUint64BoundaryValue(0, 99, SDL_FALSE); SDLTest_AssertPass("Call to SDLTest_RandomUint64BoundaryValue"); SDLTest_AssertCheck( uresult == 100, - "Validate result value for parameters (0,99,SDL_FALSE); expected: 100, got: %lld", uresult); + "Validate result value for parameters (0,99,SDL_FALSE); expected: 100, got: %lld", uresult); /* RandomUintXBoundaryValue(1, 0xffffffffffffffff, SDL_FALSE) returns 0 (no error) */ uresult = (Uint64)SDLTest_RandomUint64BoundaryValue(1, (Uint64)0xffffffffffffffffULL, SDL_FALSE); @@ -573,56 +573,56 @@ sdltest_randomBoundaryNumberSint8(void *arg) SDLTest_AssertPass("Call to SDLTest_RandomSint8BoundaryValue"); SDLTest_AssertCheck( sresult == 10, - "Validate result value for parameters (10,10,SDL_TRUE); expected: 10, got: %lld", sresult); + "Validate result value for parameters (10,10,SDL_TRUE); expected: 10, got: %lld", sresult); /* RandomSintXBoundaryValue(10, 11, SDL_TRUE) returns 10, 11 */ sresult = (Sint64)SDLTest_RandomSint8BoundaryValue(10, 11, SDL_TRUE); SDLTest_AssertPass("Call to SDLTest_RandomSint8BoundaryValue"); SDLTest_AssertCheck( sresult == 10 || sresult == 11, - "Validate result value for parameters (10,11,SDL_TRUE); expected: 10|11, got: %lld", sresult); + "Validate result value for parameters (10,11,SDL_TRUE); expected: 10|11, got: %lld", sresult); /* RandomSintXBoundaryValue(10, 12, SDL_TRUE) returns 10, 11, 12 */ sresult = (Sint64)SDLTest_RandomSint8BoundaryValue(10, 12, SDL_TRUE); SDLTest_AssertPass("Call to SDLTest_RandomSint8BoundaryValue"); SDLTest_AssertCheck( sresult == 10 || sresult == 11 || sresult == 12, - "Validate result value for parameters (10,12,SDL_TRUE); expected: 10|11|12, got: %lld", sresult); + "Validate result value for parameters (10,12,SDL_TRUE); expected: 10|11|12, got: %lld", sresult); /* RandomSintXBoundaryValue(10, 13, SDL_TRUE) returns 10, 11, 12, 13 */ sresult = (Sint64)SDLTest_RandomSint8BoundaryValue(10, 13, SDL_TRUE); SDLTest_AssertPass("Call to SDLTest_RandomSint8BoundaryValue"); SDLTest_AssertCheck( sresult == 10 || sresult == 11 || sresult == 12 || sresult == 13, - "Validate result value for parameters (10,13,SDL_TRUE); expected: 10|11|12|13, got: %lld", sresult); + "Validate result value for parameters (10,13,SDL_TRUE); expected: 10|11|12|13, got: %lld", sresult); /* RandomSintXBoundaryValue(10, 20, SDL_TRUE) returns 10, 11, 19 or 20 */ sresult = (Sint64)SDLTest_RandomSint8BoundaryValue(10, 20, SDL_TRUE); SDLTest_AssertPass("Call to SDLTest_RandomSint8BoundaryValue"); SDLTest_AssertCheck( sresult == 10 || sresult == 11 || sresult == 19 || sresult == 20, - "Validate result value for parameters (10,20,SDL_TRUE); expected: 10|11|19|20, got: %lld", sresult); + "Validate result value for parameters (10,20,SDL_TRUE); expected: 10|11|19|20, got: %lld", sresult); /* RandomSintXBoundaryValue(20, 10, SDL_TRUE) returns 10, 11, 19 or 20 */ sresult = (Sint64)SDLTest_RandomSint8BoundaryValue(20, 10, SDL_TRUE); SDLTest_AssertPass("Call to SDLTest_RandomSint8BoundaryValue"); SDLTest_AssertCheck( sresult == 10 || sresult == 11 || sresult == 19 || sresult == 20, - "Validate result value for parameters (20,10,SDL_TRUE); expected: 10|11|19|20, got: %lld", sresult); + "Validate result value for parameters (20,10,SDL_TRUE); expected: 10|11|19|20, got: %lld", sresult); /* RandomSintXBoundaryValue(1, 20, SDL_FALSE) returns 0, 21 */ sresult = (Sint64)SDLTest_RandomSint8BoundaryValue(1, 20, SDL_FALSE); SDLTest_AssertPass("Call to SDLTest_RandomSint8BoundaryValue"); SDLTest_AssertCheck( sresult == 0 || sresult == 21, - "Validate result value for parameters (1,20,SDL_FALSE); expected: 0|21, got: %lld", sresult); - + "Validate result value for parameters (1,20,SDL_FALSE); expected: 0|21, got: %lld", sresult); + /* RandomSintXBoundaryValue(SCHAR_MIN, 99, SDL_FALSE) returns 100 */ sresult = (Sint64)SDLTest_RandomSint8BoundaryValue(SCHAR_MIN, 99, SDL_FALSE); SDLTest_AssertPass("Call to SDLTest_RandomSint8BoundaryValue"); SDLTest_AssertCheck( sresult == 100, - "Validate result value for parameters (SCHAR_MIN,99,SDL_FALSE); expected: 100, got: %lld", sresult); + "Validate result value for parameters (SCHAR_MIN,99,SDL_FALSE); expected: 100, got: %lld", sresult); /* RandomSintXBoundaryValue(SCHAR_MIN + 1, SCHAR_MAX, SDL_FALSE) returns SCHAR_MIN (no error) */ sresult = (Sint64)SDLTest_RandomSint8BoundaryValue(SCHAR_MIN + 1, SCHAR_MAX, SDL_FALSE); @@ -660,7 +660,7 @@ sdltest_randomBoundaryNumberSint8(void *arg) /* Clear error messages */ SDL_ClearError(); SDLTest_AssertPass("SDL_ClearError()"); - + return TEST_COMPLETED; } @@ -683,56 +683,56 @@ sdltest_randomBoundaryNumberSint16(void *arg) SDLTest_AssertPass("Call to SDLTest_RandomSint16BoundaryValue"); SDLTest_AssertCheck( sresult == 10, - "Validate result value for parameters (10,10,SDL_TRUE); expected: 10, got: %lld", sresult); + "Validate result value for parameters (10,10,SDL_TRUE); expected: 10, got: %lld", sresult); /* RandomSintXBoundaryValue(10, 11, SDL_TRUE) returns 10, 11 */ sresult = (Sint64)SDLTest_RandomSint16BoundaryValue(10, 11, SDL_TRUE); SDLTest_AssertPass("Call to SDLTest_RandomSint16BoundaryValue"); SDLTest_AssertCheck( sresult == 10 || sresult == 11, - "Validate result value for parameters (10,11,SDL_TRUE); expected: 10|11, got: %lld", sresult); + "Validate result value for parameters (10,11,SDL_TRUE); expected: 10|11, got: %lld", sresult); /* RandomSintXBoundaryValue(10, 12, SDL_TRUE) returns 10, 11, 12 */ sresult = (Sint64)SDLTest_RandomSint16BoundaryValue(10, 12, SDL_TRUE); SDLTest_AssertPass("Call to SDLTest_RandomSint16BoundaryValue"); SDLTest_AssertCheck( sresult == 10 || sresult == 11 || sresult == 12, - "Validate result value for parameters (10,12,SDL_TRUE); expected: 10|11|12, got: %lld", sresult); + "Validate result value for parameters (10,12,SDL_TRUE); expected: 10|11|12, got: %lld", sresult); /* RandomSintXBoundaryValue(10, 13, SDL_TRUE) returns 10, 11, 12, 13 */ sresult = (Sint64)SDLTest_RandomSint16BoundaryValue(10, 13, SDL_TRUE); SDLTest_AssertPass("Call to SDLTest_RandomSint16BoundaryValue"); SDLTest_AssertCheck( sresult == 10 || sresult == 11 || sresult == 12 || sresult == 13, - "Validate result value for parameters (10,13,SDL_TRUE); expected: 10|11|12|13, got: %lld", sresult); + "Validate result value for parameters (10,13,SDL_TRUE); expected: 10|11|12|13, got: %lld", sresult); /* RandomSintXBoundaryValue(10, 20, SDL_TRUE) returns 10, 11, 19 or 20 */ sresult = (Sint64)SDLTest_RandomSint16BoundaryValue(10, 20, SDL_TRUE); SDLTest_AssertPass("Call to SDLTest_RandomSint16BoundaryValue"); SDLTest_AssertCheck( sresult == 10 || sresult == 11 || sresult == 19 || sresult == 20, - "Validate result value for parameters (10,20,SDL_TRUE); expected: 10|11|19|20, got: %lld", sresult); + "Validate result value for parameters (10,20,SDL_TRUE); expected: 10|11|19|20, got: %lld", sresult); /* RandomSintXBoundaryValue(20, 10, SDL_TRUE) returns 10, 11, 19 or 20 */ sresult = (Sint64)SDLTest_RandomSint16BoundaryValue(20, 10, SDL_TRUE); SDLTest_AssertPass("Call to SDLTest_RandomSint16BoundaryValue"); SDLTest_AssertCheck( sresult == 10 || sresult == 11 || sresult == 19 || sresult == 20, - "Validate result value for parameters (20,10,SDL_TRUE); expected: 10|11|19|20, got: %lld", sresult); + "Validate result value for parameters (20,10,SDL_TRUE); expected: 10|11|19|20, got: %lld", sresult); /* RandomSintXBoundaryValue(1, 20, SDL_FALSE) returns 0, 21 */ sresult = (Sint64)SDLTest_RandomSint16BoundaryValue(1, 20, SDL_FALSE); SDLTest_AssertPass("Call to SDLTest_RandomSint16BoundaryValue"); SDLTest_AssertCheck( sresult == 0 || sresult == 21, - "Validate result value for parameters (1,20,SDL_FALSE); expected: 0|21, got: %lld", sresult); - + "Validate result value for parameters (1,20,SDL_FALSE); expected: 0|21, got: %lld", sresult); + /* RandomSintXBoundaryValue(SHRT_MIN, 99, SDL_FALSE) returns 100 */ sresult = (Sint64)SDLTest_RandomSint16BoundaryValue(SHRT_MIN, 99, SDL_FALSE); SDLTest_AssertPass("Call to SDLTest_RandomSint16BoundaryValue"); SDLTest_AssertCheck( sresult == 100, - "Validate result value for parameters (SHRT_MIN,99,SDL_FALSE); expected: 100, got: %lld", sresult); + "Validate result value for parameters (SHRT_MIN,99,SDL_FALSE); expected: 100, got: %lld", sresult); /* RandomSintXBoundaryValue(SHRT_MIN + 1, SHRT_MAX, SDL_FALSE) returns SHRT_MIN (no error) */ sresult = (Sint64)SDLTest_RandomSint16BoundaryValue(SHRT_MIN + 1, SHRT_MAX, SDL_FALSE); @@ -773,7 +773,7 @@ sdltest_randomBoundaryNumberSint16(void *arg) return TEST_COMPLETED; } - + /* * @brief Calls to random boundary number generators for Sint32 */ @@ -784,7 +784,7 @@ sdltest_randomBoundaryNumberSint32(void *arg) char *lastError; Sint64 sresult; #if ((ULONG_MAX) == (UINT_MAX)) - Sint32 long_min = LONG_MIN; + Sint32 long_min = LONG_MIN; Sint32 long_max = LONG_MAX; #else Sint32 long_min = INT_MIN; @@ -800,56 +800,56 @@ sdltest_randomBoundaryNumberSint32(void *arg) SDLTest_AssertPass("Call to SDLTest_RandomSint32BoundaryValue"); SDLTest_AssertCheck( sresult == 10, - "Validate result value for parameters (10,10,SDL_TRUE); expected: 10, got: %lld", sresult); + "Validate result value for parameters (10,10,SDL_TRUE); expected: 10, got: %lld", sresult); /* RandomSintXBoundaryValue(10, 11, SDL_TRUE) returns 10, 11 */ sresult = (Sint64)SDLTest_RandomSint32BoundaryValue(10, 11, SDL_TRUE); SDLTest_AssertPass("Call to SDLTest_RandomSint32BoundaryValue"); SDLTest_AssertCheck( sresult == 10 || sresult == 11, - "Validate result value for parameters (10,11,SDL_TRUE); expected: 10|11, got: %lld", sresult); + "Validate result value for parameters (10,11,SDL_TRUE); expected: 10|11, got: %lld", sresult); /* RandomSintXBoundaryValue(10, 12, SDL_TRUE) returns 10, 11, 12 */ sresult = (Sint64)SDLTest_RandomSint32BoundaryValue(10, 12, SDL_TRUE); SDLTest_AssertPass("Call to SDLTest_RandomSint32BoundaryValue"); SDLTest_AssertCheck( sresult == 10 || sresult == 11 || sresult == 12, - "Validate result value for parameters (10,12,SDL_TRUE); expected: 10|11|12, got: %lld", sresult); + "Validate result value for parameters (10,12,SDL_TRUE); expected: 10|11|12, got: %lld", sresult); /* RandomSintXBoundaryValue(10, 13, SDL_TRUE) returns 10, 11, 12, 13 */ sresult = (Sint64)SDLTest_RandomSint32BoundaryValue(10, 13, SDL_TRUE); SDLTest_AssertPass("Call to SDLTest_RandomSint32BoundaryValue"); SDLTest_AssertCheck( sresult == 10 || sresult == 11 || sresult == 12 || sresult == 13, - "Validate result value for parameters (10,13,SDL_TRUE); expected: 10|11|12|13, got: %lld", sresult); + "Validate result value for parameters (10,13,SDL_TRUE); expected: 10|11|12|13, got: %lld", sresult); /* RandomSintXBoundaryValue(10, 20, SDL_TRUE) returns 10, 11, 19 or 20 */ sresult = (Sint64)SDLTest_RandomSint32BoundaryValue(10, 20, SDL_TRUE); SDLTest_AssertPass("Call to SDLTest_RandomSint32BoundaryValue"); SDLTest_AssertCheck( sresult == 10 || sresult == 11 || sresult == 19 || sresult == 20, - "Validate result value for parameters (10,20,SDL_TRUE); expected: 10|11|19|20, got: %lld", sresult); + "Validate result value for parameters (10,20,SDL_TRUE); expected: 10|11|19|20, got: %lld", sresult); /* RandomSintXBoundaryValue(20, 10, SDL_TRUE) returns 10, 11, 19 or 20 */ sresult = (Sint64)SDLTest_RandomSint32BoundaryValue(20, 10, SDL_TRUE); SDLTest_AssertPass("Call to SDLTest_RandomSint32BoundaryValue"); SDLTest_AssertCheck( sresult == 10 || sresult == 11 || sresult == 19 || sresult == 20, - "Validate result value for parameters (20,10,SDL_TRUE); expected: 10|11|19|20, got: %lld", sresult); + "Validate result value for parameters (20,10,SDL_TRUE); expected: 10|11|19|20, got: %lld", sresult); /* RandomSintXBoundaryValue(1, 20, SDL_FALSE) returns 0, 21 */ sresult = (Sint64)SDLTest_RandomSint32BoundaryValue(1, 20, SDL_FALSE); SDLTest_AssertPass("Call to SDLTest_RandomSint32BoundaryValue"); SDLTest_AssertCheck( sresult == 0 || sresult == 21, - "Validate result value for parameters (1,20,SDL_FALSE); expected: 0|21, got: %lld", sresult); - + "Validate result value for parameters (1,20,SDL_FALSE); expected: 0|21, got: %lld", sresult); + /* RandomSintXBoundaryValue(LONG_MIN, 99, SDL_FALSE) returns 100 */ sresult = (Sint64)SDLTest_RandomSint32BoundaryValue(long_min, 99, SDL_FALSE); SDLTest_AssertPass("Call to SDLTest_RandomSint32BoundaryValue"); SDLTest_AssertCheck( sresult == 100, - "Validate result value for parameters (LONG_MIN,99,SDL_FALSE); expected: 100, got: %lld", sresult); + "Validate result value for parameters (LONG_MIN,99,SDL_FALSE); expected: 100, got: %lld", sresult); /* RandomSintXBoundaryValue(LONG_MIN + 1, LONG_MAX, SDL_FALSE) returns LONG_MIN (no error) */ sresult = (Sint64)SDLTest_RandomSint32BoundaryValue(long_min + 1, long_max, SDL_FALSE); @@ -910,56 +910,56 @@ sdltest_randomBoundaryNumberSint64(void *arg) SDLTest_AssertPass("Call to SDLTest_RandomSint64BoundaryValue"); SDLTest_AssertCheck( sresult == 10, - "Validate result value for parameters (10,10,SDL_TRUE); expected: 10, got: %lld", sresult); + "Validate result value for parameters (10,10,SDL_TRUE); expected: 10, got: %lld", sresult); /* RandomSintXBoundaryValue(10, 11, SDL_TRUE) returns 10, 11 */ sresult = (Sint64)SDLTest_RandomSint64BoundaryValue(10, 11, SDL_TRUE); SDLTest_AssertPass("Call to SDLTest_RandomSint64BoundaryValue"); SDLTest_AssertCheck( sresult == 10 || sresult == 11, - "Validate result value for parameters (10,11,SDL_TRUE); expected: 10|11, got: %lld", sresult); + "Validate result value for parameters (10,11,SDL_TRUE); expected: 10|11, got: %lld", sresult); /* RandomSintXBoundaryValue(10, 12, SDL_TRUE) returns 10, 11, 12 */ sresult = (Sint64)SDLTest_RandomSint64BoundaryValue(10, 12, SDL_TRUE); SDLTest_AssertPass("Call to SDLTest_RandomSint64BoundaryValue"); SDLTest_AssertCheck( sresult == 10 || sresult == 11 || sresult == 12, - "Validate result value for parameters (10,12,SDL_TRUE); expected: 10|11|12, got: %lld", sresult); + "Validate result value for parameters (10,12,SDL_TRUE); expected: 10|11|12, got: %lld", sresult); /* RandomSintXBoundaryValue(10, 13, SDL_TRUE) returns 10, 11, 12, 13 */ sresult = (Sint64)SDLTest_RandomSint64BoundaryValue(10, 13, SDL_TRUE); SDLTest_AssertPass("Call to SDLTest_RandomSint64BoundaryValue"); SDLTest_AssertCheck( sresult == 10 || sresult == 11 || sresult == 12 || sresult == 13, - "Validate result value for parameters (10,13,SDL_TRUE); expected: 10|11|12|13, got: %lld", sresult); + "Validate result value for parameters (10,13,SDL_TRUE); expected: 10|11|12|13, got: %lld", sresult); /* RandomSintXBoundaryValue(10, 20, SDL_TRUE) returns 10, 11, 19 or 20 */ sresult = (Sint64)SDLTest_RandomSint64BoundaryValue(10, 20, SDL_TRUE); SDLTest_AssertPass("Call to SDLTest_RandomSint64BoundaryValue"); SDLTest_AssertCheck( sresult == 10 || sresult == 11 || sresult == 19 || sresult == 20, - "Validate result value for parameters (10,20,SDL_TRUE); expected: 10|11|19|20, got: %lld", sresult); + "Validate result value for parameters (10,20,SDL_TRUE); expected: 10|11|19|20, got: %lld", sresult); /* RandomSintXBoundaryValue(20, 10, SDL_TRUE) returns 10, 11, 19 or 20 */ sresult = (Sint64)SDLTest_RandomSint64BoundaryValue(20, 10, SDL_TRUE); SDLTest_AssertPass("Call to SDLTest_RandomSint64BoundaryValue"); SDLTest_AssertCheck( sresult == 10 || sresult == 11 || sresult == 19 || sresult == 20, - "Validate result value for parameters (20,10,SDL_TRUE); expected: 10|11|19|20, got: %lld", sresult); + "Validate result value for parameters (20,10,SDL_TRUE); expected: 10|11|19|20, got: %lld", sresult); /* RandomSintXBoundaryValue(1, 20, SDL_FALSE) returns 0, 21 */ sresult = (Sint64)SDLTest_RandomSint64BoundaryValue(1, 20, SDL_FALSE); SDLTest_AssertPass("Call to SDLTest_RandomSint64BoundaryValue"); SDLTest_AssertCheck( sresult == 0 || sresult == 21, - "Validate result value for parameters (1,20,SDL_FALSE); expected: 0|21, got: %lld", sresult); - + "Validate result value for parameters (1,20,SDL_FALSE); expected: 0|21, got: %lld", sresult); + /* RandomSintXBoundaryValue(LLONG_MIN, 99, SDL_FALSE) returns 100 */ sresult = (Sint64)SDLTest_RandomSint64BoundaryValue(LLONG_MIN, 99, SDL_FALSE); SDLTest_AssertPass("Call to SDLTest_RandomSint64BoundaryValue"); SDLTest_AssertCheck( sresult == 100, - "Validate result value for parameters (LLONG_MIN,99,SDL_FALSE); expected: 100, got: %lld", sresult); + "Validate result value for parameters (LLONG_MIN,99,SDL_FALSE); expected: 100, got: %lld", sresult); /* RandomSintXBoundaryValue(LLONG_MIN + 1, LLONG_MAX, SDL_FALSE) returns LLONG_MIN (no error) */ sresult = (Sint64)SDLTest_RandomSint64BoundaryValue(LLONG_MIN + 1, LLONG_MAX, SDL_FALSE); @@ -1010,7 +1010,7 @@ sdltest_randomIntegerInRange(void *arg) Sint32 min, max; Sint32 result; #if ((ULONG_MAX) == (UINT_MAX)) - Sint32 long_min = LONG_MIN; + Sint32 long_min = LONG_MIN; Sint32 long_max = LONG_MAX; #else Sint32 long_min = INT_MIN; @@ -1101,11 +1101,11 @@ sdltest_randomAsciiString(void *arg) } SDLTest_AssertCheck(nonAsciiCharacters == 0, "Validate that result does not contain non-Ascii characters, got: %d", nonAsciiCharacters); if (nonAsciiCharacters) { - SDLTest_LogError("Invalid result from generator: '%s'", result); + SDLTest_LogError("Invalid result from generator: '%s'", result); } - SDL_free(result); + SDL_free(result); } - + return TEST_COMPLETED; } @@ -1139,9 +1139,9 @@ sdltest_randomAsciiStringWithMaximumLength(void *arg) } SDLTest_AssertCheck(nonAsciiCharacters == 0, "Validate that result does not contain non-Ascii characters, got: %d", nonAsciiCharacters); if (nonAsciiCharacters) { - SDLTest_LogError("Invalid result from generator: '%s'", result); + SDLTest_LogError("Invalid result from generator: '%s'", result); } - SDL_free(result); + SDL_free(result); } /* Negative test */ @@ -1159,7 +1159,7 @@ sdltest_randomAsciiStringWithMaximumLength(void *arg) /* Clear error messages */ SDL_ClearError(); SDLTest_AssertPass("SDL_ClearError()"); - + return TEST_COMPLETED; } @@ -1193,11 +1193,11 @@ sdltest_randomAsciiStringOfSize(void *arg) } SDLTest_AssertCheck(nonAsciiCharacters == 0, "Validate that result does not contain non-ASCII characters, got: %d", nonAsciiCharacters); if (nonAsciiCharacters) { - SDLTest_LogError("Invalid result from generator: '%s'", result); + SDLTest_LogError("Invalid result from generator: '%s'", result); } - SDL_free(result); + SDL_free(result); } - + /* Negative test */ targetLen = 0; result = SDLTest_RandomAsciiStringOfSize(targetLen); @@ -1213,7 +1213,7 @@ sdltest_randomAsciiStringOfSize(void *arg) /* Clear error messages */ SDL_ClearError(); SDLTest_AssertPass("SDL_ClearError()"); - + return TEST_COMPLETED; } @@ -1222,58 +1222,58 @@ sdltest_randomAsciiStringOfSize(void *arg) /* SDL_test test cases */ static const SDLTest_TestCaseReference sdltestTest1 = - { (SDLTest_TestCaseFp)sdltest_getFuzzerInvocationCount, "sdltest_getFuzzerInvocationCount", "Call to sdltest_GetFuzzerInvocationCount", TEST_ENABLED }; + { (SDLTest_TestCaseFp)sdltest_getFuzzerInvocationCount, "sdltest_getFuzzerInvocationCount", "Call to sdltest_GetFuzzerInvocationCount", TEST_ENABLED }; static const SDLTest_TestCaseReference sdltestTest2 = - { (SDLTest_TestCaseFp)sdltest_randomNumber, "sdltest_randomNumber", "Calls to random number generators", TEST_ENABLED }; + { (SDLTest_TestCaseFp)sdltest_randomNumber, "sdltest_randomNumber", "Calls to random number generators", TEST_ENABLED }; static const SDLTest_TestCaseReference sdltestTest3 = - { (SDLTest_TestCaseFp)sdltest_randomBoundaryNumberUint8, "sdltest_randomBoundaryNumberUint8", "Calls to random boundary number generators for Uint8", TEST_ENABLED }; + { (SDLTest_TestCaseFp)sdltest_randomBoundaryNumberUint8, "sdltest_randomBoundaryNumberUint8", "Calls to random boundary number generators for Uint8", TEST_ENABLED }; static const SDLTest_TestCaseReference sdltestTest4 = - { (SDLTest_TestCaseFp)sdltest_randomBoundaryNumberUint16, "sdltest_randomBoundaryNumberUint16", "Calls to random boundary number generators for Uint16", TEST_ENABLED }; + { (SDLTest_TestCaseFp)sdltest_randomBoundaryNumberUint16, "sdltest_randomBoundaryNumberUint16", "Calls to random boundary number generators for Uint16", TEST_ENABLED }; static const SDLTest_TestCaseReference sdltestTest5 = - { (SDLTest_TestCaseFp)sdltest_randomBoundaryNumberUint32, "sdltest_randomBoundaryNumberUint32", "Calls to random boundary number generators for Uint32", TEST_ENABLED }; + { (SDLTest_TestCaseFp)sdltest_randomBoundaryNumberUint32, "sdltest_randomBoundaryNumberUint32", "Calls to random boundary number generators for Uint32", TEST_ENABLED }; static const SDLTest_TestCaseReference sdltestTest6 = - { (SDLTest_TestCaseFp)sdltest_randomBoundaryNumberUint64, "sdltest_randomBoundaryNumberUint64", "Calls to random boundary number generators for Uint64", TEST_ENABLED }; + { (SDLTest_TestCaseFp)sdltest_randomBoundaryNumberUint64, "sdltest_randomBoundaryNumberUint64", "Calls to random boundary number generators for Uint64", TEST_ENABLED }; static const SDLTest_TestCaseReference sdltestTest7 = - { (SDLTest_TestCaseFp)sdltest_randomBoundaryNumberSint8, "sdltest_randomBoundaryNumberSint8", "Calls to random boundary number generators for Sint8", TEST_ENABLED }; + { (SDLTest_TestCaseFp)sdltest_randomBoundaryNumberSint8, "sdltest_randomBoundaryNumberSint8", "Calls to random boundary number generators for Sint8", TEST_ENABLED }; static const SDLTest_TestCaseReference sdltestTest8 = - { (SDLTest_TestCaseFp)sdltest_randomBoundaryNumberSint16, "sdltest_randomBoundaryNumberSint16", "Calls to random boundary number generators for Sint16", TEST_ENABLED }; + { (SDLTest_TestCaseFp)sdltest_randomBoundaryNumberSint16, "sdltest_randomBoundaryNumberSint16", "Calls to random boundary number generators for Sint16", TEST_ENABLED }; static const SDLTest_TestCaseReference sdltestTest9 = - { (SDLTest_TestCaseFp)sdltest_randomBoundaryNumberSint32, "sdltest_randomBoundaryNumberSint32", "Calls to random boundary number generators for Sint32", TEST_ENABLED }; + { (SDLTest_TestCaseFp)sdltest_randomBoundaryNumberSint32, "sdltest_randomBoundaryNumberSint32", "Calls to random boundary number generators for Sint32", TEST_ENABLED }; static const SDLTest_TestCaseReference sdltestTest10 = - { (SDLTest_TestCaseFp)sdltest_randomBoundaryNumberSint64, "sdltest_randomBoundaryNumberSint64", "Calls to random boundary number generators for Sint64", TEST_ENABLED }; + { (SDLTest_TestCaseFp)sdltest_randomBoundaryNumberSint64, "sdltest_randomBoundaryNumberSint64", "Calls to random boundary number generators for Sint64", TEST_ENABLED }; static const SDLTest_TestCaseReference sdltestTest11 = - { (SDLTest_TestCaseFp)sdltest_randomIntegerInRange, "sdltest_randomIntegerInRange", "Calls to ranged random number generator", TEST_ENABLED }; + { (SDLTest_TestCaseFp)sdltest_randomIntegerInRange, "sdltest_randomIntegerInRange", "Calls to ranged random number generator", TEST_ENABLED }; static const SDLTest_TestCaseReference sdltestTest12 = - { (SDLTest_TestCaseFp)sdltest_randomAsciiString, "sdltest_randomAsciiString", "Calls to default ASCII string generator", TEST_ENABLED }; + { (SDLTest_TestCaseFp)sdltest_randomAsciiString, "sdltest_randomAsciiString", "Calls to default ASCII string generator", TEST_ENABLED }; static const SDLTest_TestCaseReference sdltestTest13 = - { (SDLTest_TestCaseFp)sdltest_randomAsciiStringWithMaximumLength, "sdltest_randomAsciiStringWithMaximumLength", "Calls to random maximum length ASCII string generator", TEST_ENABLED }; + { (SDLTest_TestCaseFp)sdltest_randomAsciiStringWithMaximumLength, "sdltest_randomAsciiStringWithMaximumLength", "Calls to random maximum length ASCII string generator", TEST_ENABLED }; static const SDLTest_TestCaseReference sdltestTest14 = - { (SDLTest_TestCaseFp)sdltest_randomAsciiStringOfSize, "sdltest_randomAsciiStringOfSize", "Calls to fixed size ASCII string generator", TEST_ENABLED }; + { (SDLTest_TestCaseFp)sdltest_randomAsciiStringOfSize, "sdltest_randomAsciiStringOfSize", "Calls to fixed size ASCII string generator", TEST_ENABLED }; /* Sequence of SDL_test test cases */ static const SDLTest_TestCaseReference *sdltestTests[] = { - &sdltestTest1, &sdltestTest2, &sdltestTest3, &sdltestTest4, &sdltestTest5, &sdltestTest6, - &sdltestTest7, &sdltestTest8, &sdltestTest9, &sdltestTest10, &sdltestTest11, &sdltestTest12, - &sdltestTest13, &sdltestTest14, NULL + &sdltestTest1, &sdltestTest2, &sdltestTest3, &sdltestTest4, &sdltestTest5, &sdltestTest6, + &sdltestTest7, &sdltestTest8, &sdltestTest9, &sdltestTest10, &sdltestTest11, &sdltestTest12, + &sdltestTest13, &sdltestTest14, NULL }; /* SDL_test test suite (global) */ SDLTest_TestSuiteReference sdltestTestSuite = { - "SDLtest", - NULL, - sdltestTests, - NULL + "SDLtest", + NULL, + sdltestTests, + NULL }; diff --git a/test/testautomation_suites.h b/test/testautomation_suites.h index 53e51578c..e42cd4266 100644 --- a/test/testautomation_suites.h +++ b/test/testautomation_suites.h @@ -28,23 +28,23 @@ extern SDLTest_TestSuiteReference pixelsTestSuite; // All test suites SDLTest_TestSuiteReference *testSuites[] = { - &audioTestSuite, - &clipboardTestSuite, - &eventsTestSuite, - &keyboardTestSuite, - &mainTestSuite, - &platformTestSuite, - &rectTestSuite, - &renderTestSuite, - &rwopsTestSuite, - &surfaceTestSuite, - &syswmTestSuite, - &sdltestTestSuite, - &videoTestSuite, - &mouseTestSuite, - &timerTestSuite, - &pixelsTestSuite, - NULL + &audioTestSuite, + &clipboardTestSuite, + &eventsTestSuite, + &keyboardTestSuite, + &mainTestSuite, + &platformTestSuite, + &rectTestSuite, + &renderTestSuite, + &rwopsTestSuite, + &surfaceTestSuite, + &syswmTestSuite, + &sdltestTestSuite, + &videoTestSuite, + &mouseTestSuite, + &timerTestSuite, + &pixelsTestSuite, + NULL }; #endif diff --git a/test/testautomation_surface.c b/test/testautomation_surface.c index c75ac0125..159dd1a89 100644 --- a/test/testautomation_surface.c +++ b/test/testautomation_surface.c @@ -56,21 +56,21 @@ _surfaceSetUp(void *arg) SDLTest_AssertCheck(result == 0, "Validate result from SDL_SetSurfaceBlendMode, expected: 0, got: %i", result); result = SDL_GetSurfaceBlendMode(testSurface, ¤tBlendMode); SDLTest_AssertCheck(result == 0, "Validate result from SDL_GetSurfaceBlendMode, expected: 0, got: %i", result); - SDLTest_AssertCheck(currentBlendMode == blendMode, "Validate blendMode, expected: %i, got: %i", blendMode, currentBlendMode); + SDLTest_AssertCheck(currentBlendMode == blendMode, "Validate blendMode, expected: %i, got: %i", blendMode, currentBlendMode); } } void _surfaceTearDown(void *arg) { - if (referenceSurface != NULL) { - SDL_FreeSurface(referenceSurface); - referenceSurface = NULL; - } - if (testSurface != NULL) { - SDL_FreeSurface(testSurface); - testSurface = NULL; - } + if (referenceSurface != NULL) { + SDL_FreeSurface(referenceSurface); + referenceSurface = NULL; + } + if (testSurface != NULL) { + SDL_FreeSurface(testSurface); + testSurface = NULL; + } } /** @@ -78,15 +78,15 @@ _surfaceTearDown(void *arg) */ void _clearTestSurface() { - int ret; - Uint32 color; + int ret; + Uint32 color; - /* Clear surface. */ - color = SDL_MapRGBA( testSurface->format, 0, 0, 0, 0); - SDLTest_AssertPass("Call to SDL_MapRGBA()"); - ret = SDL_FillRect( testSurface, NULL, color); - SDLTest_AssertPass("Call to SDL_FillRect()"); - SDLTest_AssertCheck(ret == 0, "Verify result from SDL_FillRect, expected: 0, got: %i", ret); + /* Clear surface. */ + color = SDL_MapRGBA( testSurface->format, 0, 0, 0, 0); + SDLTest_AssertPass("Call to SDL_MapRGBA()"); + ret = SDL_FillRect( testSurface, NULL, color); + SDLTest_AssertPass("Call to SDL_FillRect()"); + SDLTest_AssertCheck(ret == 0, "Verify result from SDL_FillRect, expected: 0, got: %i", ret); } /** @@ -94,119 +94,119 @@ void _clearTestSurface() */ void _testBlitBlendMode(int mode) { - int ret; - int i, j, ni, nj; - SDL_Surface *face; - SDL_Rect rect; - int nmode; - SDL_BlendMode bmode; - int checkFailCount1; - int checkFailCount2; - int checkFailCount3; - int checkFailCount4; + int ret; + int i, j, ni, nj; + SDL_Surface *face; + SDL_Rect rect; + int nmode; + SDL_BlendMode bmode; + int checkFailCount1; + int checkFailCount2; + int checkFailCount3; + int checkFailCount4; - /* Check test surface */ - SDLTest_AssertCheck(testSurface != NULL, "Verify testSurface is not NULL"); - if (testSurface == NULL) return; - - /* Create sample surface */ - face = SDLTest_ImageFace(); - SDLTest_AssertCheck(face != NULL, "Verify face surface is not NULL"); - if (face == NULL) return; + /* Check test surface */ + SDLTest_AssertCheck(testSurface != NULL, "Verify testSurface is not NULL"); + if (testSurface == NULL) return; - /* Reset alpha modulation */ - ret = SDL_SetSurfaceAlphaMod(face, 255); - SDLTest_AssertPass("Call to SDL_SetSurfaceAlphaMod()"); - SDLTest_AssertCheck(ret == 0, "Verify result from SDL_SetSurfaceAlphaMod(), expected: 0, got: %i", ret); + /* Create sample surface */ + face = SDLTest_ImageFace(); + SDLTest_AssertCheck(face != NULL, "Verify face surface is not NULL"); + if (face == NULL) return; - /* Reset color modulation */ - ret = SDL_SetSurfaceColorMod(face, 255, 255, 255); - SDLTest_AssertPass("Call to SDL_SetSurfaceColorMod()"); - SDLTest_AssertCheck(ret == 0, "Verify result from SDL_SetSurfaceColorMod(), expected: 0, got: %i", ret); + /* Reset alpha modulation */ + ret = SDL_SetSurfaceAlphaMod(face, 255); + SDLTest_AssertPass("Call to SDL_SetSurfaceAlphaMod()"); + SDLTest_AssertCheck(ret == 0, "Verify result from SDL_SetSurfaceAlphaMod(), expected: 0, got: %i", ret); - /* Reset color key */ - ret = SDL_SetColorKey(face, SDL_FALSE, 0); - SDLTest_AssertPass("Call to SDL_SetColorKey()"); - SDLTest_AssertCheck(ret == 0, "Verify result from SDL_SetColorKey(), expected: 0, got: %i", ret); + /* Reset color modulation */ + ret = SDL_SetSurfaceColorMod(face, 255, 255, 255); + SDLTest_AssertPass("Call to SDL_SetSurfaceColorMod()"); + SDLTest_AssertCheck(ret == 0, "Verify result from SDL_SetSurfaceColorMod(), expected: 0, got: %i", ret); - /* Clear the test surface */ + /* Reset color key */ + ret = SDL_SetColorKey(face, SDL_FALSE, 0); + SDLTest_AssertPass("Call to SDL_SetColorKey()"); + SDLTest_AssertCheck(ret == 0, "Verify result from SDL_SetColorKey(), expected: 0, got: %i", ret); + + /* Clear the test surface */ _clearTestSurface(); - - /* Target rect size */ - rect.w = face->w; - rect.h = face->h; - - /* Steps to take */ - ni = testSurface->w - face->w; - nj = testSurface->h - face->h; - /* Optionally set blend mode. */ - if (mode >= 0) { - ret = SDL_SetSurfaceBlendMode( face, (SDL_BlendMode)mode ); - SDLTest_AssertPass("Call to SDL_SetSurfaceBlendMode()"); - SDLTest_AssertCheck(ret == 0, "Verify result from SDL_SetSurfaceBlendMode(..., %i), expected: 0, got: %i", mode, ret); - } - - /* Test blend mode. */ - checkFailCount1 = 0; - checkFailCount2 = 0; - checkFailCount3 = 0; - checkFailCount4 = 0; - for (j=0; j <= nj; j+=4) { - for (i=0; i <= ni; i+=4) { - if (mode == -2) { - /* Set color mod. */ - ret = SDL_SetSurfaceColorMod( face, (255/nj)*j, (255/ni)*i, (255/nj)*j ); - if (ret != 0) checkFailCount2++; - } - else if (mode == -3) { - /* Set alpha mod. */ - ret = SDL_SetSurfaceAlphaMod( face, (255/ni)*i ); - if (ret != 0) checkFailCount3++; - } - else if (mode == -4) { - /* Crazy blending mode magic. */ - nmode = (i/4*j/4) % 4; - if (nmode==0) { - bmode = SDL_BLENDMODE_NONE; - } else if (nmode==1) { - bmode = SDL_BLENDMODE_BLEND; - } else if (nmode==2) { - bmode = SDL_BLENDMODE_ADD; - } else if (nmode==3) { - bmode = SDL_BLENDMODE_MOD; - } - ret = SDL_SetSurfaceBlendMode( face, bmode ); - if (ret != 0) checkFailCount4++; - } + /* Target rect size */ + rect.w = face->w; + rect.h = face->h; - /* Blitting. */ - rect.x = i; - rect.y = j; - ret = SDL_BlitSurface( face, NULL, testSurface, &rect ); - if (ret != 0) checkFailCount1++; - } - } - SDLTest_AssertCheck(checkFailCount1 == 0, "Validate results from calls to SDL_BlitSurface, expected: 0, got: %i", checkFailCount1); - SDLTest_AssertCheck(checkFailCount2 == 0, "Validate results from calls to SDL_SetSurfaceColorMod, expected: 0, got: %i", checkFailCount2); - SDLTest_AssertCheck(checkFailCount3 == 0, "Validate results from calls to SDL_SetSurfaceAlphaMod, expected: 0, got: %i", checkFailCount3); - SDLTest_AssertCheck(checkFailCount4 == 0, "Validate results from calls to SDL_SetSurfaceBlendMode, expected: 0, got: %i", checkFailCount4); - - /* Clean up */ - if (face != NULL) { - SDL_FreeSurface(face); - face = NULL; - } + /* Steps to take */ + ni = testSurface->w - face->w; + nj = testSurface->h - face->h; + + /* Optionally set blend mode. */ + if (mode >= 0) { + ret = SDL_SetSurfaceBlendMode( face, (SDL_BlendMode)mode ); + SDLTest_AssertPass("Call to SDL_SetSurfaceBlendMode()"); + SDLTest_AssertCheck(ret == 0, "Verify result from SDL_SetSurfaceBlendMode(..., %i), expected: 0, got: %i", mode, ret); + } + + /* Test blend mode. */ + checkFailCount1 = 0; + checkFailCount2 = 0; + checkFailCount3 = 0; + checkFailCount4 = 0; + for (j=0; j <= nj; j+=4) { + for (i=0; i <= ni; i+=4) { + if (mode == -2) { + /* Set color mod. */ + ret = SDL_SetSurfaceColorMod( face, (255/nj)*j, (255/ni)*i, (255/nj)*j ); + if (ret != 0) checkFailCount2++; + } + else if (mode == -3) { + /* Set alpha mod. */ + ret = SDL_SetSurfaceAlphaMod( face, (255/ni)*i ); + if (ret != 0) checkFailCount3++; + } + else if (mode == -4) { + /* Crazy blending mode magic. */ + nmode = (i/4*j/4) % 4; + if (nmode==0) { + bmode = SDL_BLENDMODE_NONE; + } else if (nmode==1) { + bmode = SDL_BLENDMODE_BLEND; + } else if (nmode==2) { + bmode = SDL_BLENDMODE_ADD; + } else if (nmode==3) { + bmode = SDL_BLENDMODE_MOD; + } + ret = SDL_SetSurfaceBlendMode( face, bmode ); + if (ret != 0) checkFailCount4++; + } + + /* Blitting. */ + rect.x = i; + rect.y = j; + ret = SDL_BlitSurface( face, NULL, testSurface, &rect ); + if (ret != 0) checkFailCount1++; + } + } + SDLTest_AssertCheck(checkFailCount1 == 0, "Validate results from calls to SDL_BlitSurface, expected: 0, got: %i", checkFailCount1); + SDLTest_AssertCheck(checkFailCount2 == 0, "Validate results from calls to SDL_SetSurfaceColorMod, expected: 0, got: %i", checkFailCount2); + SDLTest_AssertCheck(checkFailCount3 == 0, "Validate results from calls to SDL_SetSurfaceAlphaMod, expected: 0, got: %i", checkFailCount3); + SDLTest_AssertCheck(checkFailCount4 == 0, "Validate results from calls to SDL_SetSurfaceBlendMode, expected: 0, got: %i", checkFailCount4); + + /* Clean up */ + if (face != NULL) { + SDL_FreeSurface(face); + face = NULL; + } } /* Helper to check that a file exists */ void _AssertFileExist(const char *filename) { - struct stat st; - int ret = stat(filename, &st); + struct stat st; + int ret = stat(filename, &st); - SDLTest_AssertCheck(ret == 0, "Verify file '%s' exists", filename); + SDLTest_AssertCheck(ret == 0, "Verify file '%s' exists", filename); } @@ -234,16 +234,16 @@ surface_testSaveLoadBitmap(void *arg) /* Save a surface */ ret = SDL_SaveBMP(face, sampleFilename); SDLTest_AssertPass("Call to SDL_SaveBMP()"); - SDLTest_AssertCheck(ret == 0, "Verify result from SDL_SaveBMP, expected: 0, got: %i", ret); + SDLTest_AssertCheck(ret == 0, "Verify result from SDL_SaveBMP, expected: 0, got: %i", ret); _AssertFileExist(sampleFilename); - + /* Load a surface */ rface = SDL_LoadBMP(sampleFilename); SDLTest_AssertPass("Call to SDL_LoadBMP()"); SDLTest_AssertCheck(rface != NULL, "Verify result from SDL_LoadBMP is not NULL"); if (rface != NULL) { - SDLTest_AssertCheck(face->w == rface->w, "Verify width of loaded surface, expected: %i, got: %i", face->w, rface->w); - SDLTest_AssertCheck(face->h == rface->h, "Verify height of loaded surface, expected: %i, got: %i", face->h, rface->h); + SDLTest_AssertCheck(face->w == rface->w, "Verify width of loaded surface, expected: %i, got: %i", face->w, rface->w); + SDLTest_AssertCheck(face->h == rface->h, "Verify height of loaded surface, expected: %i, got: %i", face->h, rface->h); } /* Delete test file; ignore errors */ @@ -251,14 +251,14 @@ surface_testSaveLoadBitmap(void *arg) /* Clean up */ if (face != NULL) { - SDL_FreeSurface(face); - face = NULL; + SDL_FreeSurface(face); + face = NULL; } if (rface != NULL) { - SDL_FreeSurface(rface); - rface = NULL; + SDL_FreeSurface(rface); + rface = NULL; } - + return TEST_COMPLETED; } @@ -268,42 +268,42 @@ surface_testSaveLoadBitmap(void *arg) int surface_testSurfaceConversion(void *arg) { - SDL_Surface *rface = NULL, *face = NULL; - int ret = 0; + SDL_Surface *rface = NULL, *face = NULL; + int ret = 0; - /* Create sample surface */ - face = SDLTest_ImageFace(); - SDLTest_AssertCheck(face != NULL, "Verify face surface is not NULL"); - if (face == NULL) - return TEST_ABORTED; + /* Create sample surface */ + face = SDLTest_ImageFace(); + SDLTest_AssertCheck(face != NULL, "Verify face surface is not NULL"); + if (face == NULL) + return TEST_ABORTED; - /* Set transparent pixel as the pixel at (0,0) */ - if (face->format->palette) { - ret = SDL_SetColorKey(face, SDL_RLEACCEL, *(Uint8 *) face->pixels); - SDLTest_AssertPass("Call to SDL_SetColorKey()"); - SDLTest_AssertCheck(ret == 0, "Verify result from SDL_SetColorKey, expected: 0, got: %i", ret); - } + /* Set transparent pixel as the pixel at (0,0) */ + if (face->format->palette) { + ret = SDL_SetColorKey(face, SDL_RLEACCEL, *(Uint8 *) face->pixels); + SDLTest_AssertPass("Call to SDL_SetColorKey()"); + SDLTest_AssertCheck(ret == 0, "Verify result from SDL_SetColorKey, expected: 0, got: %i", ret); + } - /* Convert to 32 bit to compare. */ - rface = SDL_ConvertSurface( face, testSurface->format, 0 ); - SDLTest_AssertPass("Call to SDL_ConvertSurface()"); - SDLTest_AssertCheck(rface != NULL, "Verify result from SDL_ConvertSurface is not NULL"); + /* Convert to 32 bit to compare. */ + rface = SDL_ConvertSurface( face, testSurface->format, 0 ); + SDLTest_AssertPass("Call to SDL_ConvertSurface()"); + SDLTest_AssertCheck(rface != NULL, "Verify result from SDL_ConvertSurface is not NULL"); - /* Compare surface. */ - ret = SDLTest_CompareSurfaces( rface, face, 0 ); - SDLTest_AssertCheck(ret == 0, "Validate result from SDLTest_CompareSurfaces, expected: 0, got: %i", ret); - - /* Clean up. */ - if (face != NULL) { - SDL_FreeSurface( face ); - face = NULL; - } - if (rface != NULL) { - SDL_FreeSurface( rface ); - rface = NULL; - } + /* Compare surface. */ + ret = SDLTest_CompareSurfaces( rface, face, 0 ); + SDLTest_AssertCheck(ret == 0, "Validate result from SDLTest_CompareSurfaces, expected: 0, got: %i", ret); - return TEST_COMPLETED; + /* Clean up. */ + if (face != NULL) { + SDL_FreeSurface( face ); + face = NULL; + } + if (rface != NULL) { + SDL_FreeSurface( rface ); + rface = NULL; + } + + return TEST_COMPLETED; } @@ -313,10 +313,10 @@ surface_testSurfaceConversion(void *arg) int surface_testLoadFailure(void *arg) { - SDL_Surface *face = SDL_LoadBMP("nonexistant.bmp"); - SDLTest_AssertCheck(face == NULL, "SDL_CreateLoadBmp"); + SDL_Surface *face = SDL_LoadBMP("nonexistant.bmp"); + SDLTest_AssertCheck(face == NULL, "SDL_CreateLoadBmp"); - return TEST_COMPLETED; + return TEST_COMPLETED; } /** @@ -328,17 +328,17 @@ surface_testBlit(void *arg) int ret; SDL_Surface *compareSurface; - /* Basic blitting */ + /* Basic blitting */ _testBlitBlendMode(-1); - + /* Verify result by comparing surfaces */ compareSurface = SDLTest_ImageBlit(); ret = SDLTest_CompareSurfaces( testSurface, compareSurface, 0 ); SDLTest_AssertCheck(ret == 0, "Validate result from SDLTest_CompareSurfaces, expected: 0, got: %i", ret); - + /* Clean up. */ - if (compareSurface != NULL) { - SDL_FreeSurface( compareSurface ); + if (compareSurface != NULL) { + SDL_FreeSurface( compareSurface ); } return TEST_COMPLETED; @@ -353,17 +353,17 @@ surface_testBlitColorMod(void *arg) int ret; SDL_Surface *compareSurface; - /* Basic blitting with color mod */ + /* Basic blitting with color mod */ _testBlitBlendMode(-2); - + /* Verify result by comparing surfaces */ compareSurface = SDLTest_ImageBlitColor(); ret = SDLTest_CompareSurfaces( testSurface, compareSurface, 0 ); SDLTest_AssertCheck(ret == 0, "Validate result from SDLTest_CompareSurfaces, expected: 0, got: %i", ret); - + /* Clean up. */ - if (compareSurface != NULL) { - SDL_FreeSurface( compareSurface ); + if (compareSurface != NULL) { + SDL_FreeSurface( compareSurface ); } return TEST_COMPLETED; @@ -378,17 +378,17 @@ surface_testBlitAlphaMod(void *arg) int ret; SDL_Surface *compareSurface; - /* Basic blitting with alpha mod */ + /* Basic blitting with alpha mod */ _testBlitBlendMode(-3); - + /* Verify result by comparing surfaces */ compareSurface = SDLTest_ImageBlitAlpha(); ret = SDLTest_CompareSurfaces( testSurface, compareSurface, 0 ); SDLTest_AssertCheck(ret == 0, "Validate result from SDLTest_CompareSurfaces, expected: 0, got: %i", ret); - + /* Clean up. */ - if (compareSurface != NULL) { - SDL_FreeSurface( compareSurface ); + if (compareSurface != NULL) { + SDL_FreeSurface( compareSurface ); } return TEST_COMPLETED; @@ -404,17 +404,17 @@ surface_testBlitBlendNone(void *arg) int ret; SDL_Surface *compareSurface; - /* Basic blitting */ + /* Basic blitting */ _testBlitBlendMode(SDL_BLENDMODE_NONE); - + /* Verify result by comparing surfaces */ compareSurface = SDLTest_ImageBlitBlendNone(); ret = SDLTest_CompareSurfaces( testSurface, compareSurface, 0 ); SDLTest_AssertCheck(ret == 0, "Validate result from SDLTest_CompareSurfaces, expected: 0, got: %i", ret); - + /* Clean up. */ - if (compareSurface != NULL) { - SDL_FreeSurface( compareSurface ); + if (compareSurface != NULL) { + SDL_FreeSurface( compareSurface ); } return TEST_COMPLETED; @@ -429,17 +429,17 @@ surface_testBlitBlendBlend(void *arg) int ret; SDL_Surface *compareSurface; - /* Blend blitting */ + /* Blend blitting */ _testBlitBlendMode(SDL_BLENDMODE_BLEND); - + /* Verify result by comparing surfaces */ compareSurface = SDLTest_ImageBlitBlend(); ret = SDLTest_CompareSurfaces( testSurface, compareSurface, 0 ); SDLTest_AssertCheck(ret == 0, "Validate result from SDLTest_CompareSurfaces, expected: 0, got: %i", ret); - + /* Clean up. */ - if (compareSurface != NULL) { - SDL_FreeSurface( compareSurface ); + if (compareSurface != NULL) { + SDL_FreeSurface( compareSurface ); } return TEST_COMPLETED; @@ -454,17 +454,17 @@ surface_testBlitBlendAdd(void *arg) int ret; SDL_Surface *compareSurface; - /* Add blitting */ + /* Add blitting */ _testBlitBlendMode(SDL_BLENDMODE_ADD); - + /* Verify result by comparing surfaces */ compareSurface = SDLTest_ImageBlitBlendAdd(); ret = SDLTest_CompareSurfaces( testSurface, compareSurface, 0 ); SDLTest_AssertCheck(ret == 0, "Validate result from SDLTest_CompareSurfaces, expected: 0, got: %i", ret); - + /* Clean up. */ - if (compareSurface != NULL) { - SDL_FreeSurface( compareSurface ); + if (compareSurface != NULL) { + SDL_FreeSurface( compareSurface ); } return TEST_COMPLETED; @@ -479,17 +479,17 @@ surface_testBlitBlendMod(void *arg) int ret; SDL_Surface *compareSurface; - /* Mod blitting */ + /* Mod blitting */ _testBlitBlendMode(SDL_BLENDMODE_MOD); - + /* Verify result by comparing surfaces */ compareSurface = SDLTest_ImageBlitBlendMod(); ret = SDLTest_CompareSurfaces( testSurface, compareSurface, 0 ); SDLTest_AssertCheck(ret == 0, "Validate result from SDLTest_CompareSurfaces, expected: 0, got: %i", ret); - + /* Clean up. */ - if (compareSurface != NULL) { - SDL_FreeSurface( compareSurface ); + if (compareSurface != NULL) { + SDL_FreeSurface( compareSurface ); } return TEST_COMPLETED; @@ -504,17 +504,17 @@ surface_testBlitBlendLoop(void *arg) { int ret; SDL_Surface *compareSurface; - /* All blitting modes */ + /* All blitting modes */ _testBlitBlendMode(-4); - + /* Verify result by comparing surfaces */ compareSurface = SDLTest_ImageBlitBlendAll(); ret = SDLTest_CompareSurfaces( testSurface, compareSurface, 0 ); SDLTest_AssertCheck(ret == 0, "Validate result from SDLTest_CompareSurfaces, expected: 0, got: %i", ret); - + /* Clean up. */ - if (compareSurface != NULL) { - SDL_FreeSurface(compareSurface); + if (compareSurface != NULL) { + SDL_FreeSurface(compareSurface); } return TEST_COMPLETED; @@ -525,52 +525,52 @@ surface_testBlitBlendLoop(void *arg) { /* Surface test cases */ static const SDLTest_TestCaseReference surfaceTest1 = - { (SDLTest_TestCaseFp)surface_testSaveLoadBitmap, "surface_testSaveLoadBitmap", "Tests sprite saving and loading.", TEST_ENABLED}; + { (SDLTest_TestCaseFp)surface_testSaveLoadBitmap, "surface_testSaveLoadBitmap", "Tests sprite saving and loading.", TEST_ENABLED}; static const SDLTest_TestCaseReference surfaceTest2 = - { (SDLTest_TestCaseFp)surface_testBlit, "surface_testBlit", "Tests basic blitting.", TEST_ENABLED}; + { (SDLTest_TestCaseFp)surface_testBlit, "surface_testBlit", "Tests basic blitting.", TEST_ENABLED}; static const SDLTest_TestCaseReference surfaceTest3 = - { (SDLTest_TestCaseFp)surface_testBlitBlendNone, "surface_testBlitBlendNone", "Tests blitting routines with none blending mode.", TEST_ENABLED}; + { (SDLTest_TestCaseFp)surface_testBlitBlendNone, "surface_testBlitBlendNone", "Tests blitting routines with none blending mode.", TEST_ENABLED}; static const SDLTest_TestCaseReference surfaceTest4 = - { (SDLTest_TestCaseFp)surface_testLoadFailure, "surface_testLoadFailure", "Tests sprite loading. A failure case.", TEST_ENABLED}; + { (SDLTest_TestCaseFp)surface_testLoadFailure, "surface_testLoadFailure", "Tests sprite loading. A failure case.", TEST_ENABLED}; static const SDLTest_TestCaseReference surfaceTest5 = - { (SDLTest_TestCaseFp)surface_testSurfaceConversion, "surface_testSurfaceConversion", "Tests surface conversion.", TEST_ENABLED}; + { (SDLTest_TestCaseFp)surface_testSurfaceConversion, "surface_testSurfaceConversion", "Tests surface conversion.", TEST_ENABLED}; static const SDLTest_TestCaseReference surfaceTest6 = - { (SDLTest_TestCaseFp)surface_testBlitColorMod, "surface_testBlitColorMod", "Tests some blitting routines with color mod.", TEST_ENABLED}; + { (SDLTest_TestCaseFp)surface_testBlitColorMod, "surface_testBlitColorMod", "Tests some blitting routines with color mod.", TEST_ENABLED}; static const SDLTest_TestCaseReference surfaceTest7 = - { (SDLTest_TestCaseFp)surface_testBlitAlphaMod, "surface_testBlitAlphaMod", "Tests some blitting routines with alpha mod.", TEST_ENABLED}; + { (SDLTest_TestCaseFp)surface_testBlitAlphaMod, "surface_testBlitAlphaMod", "Tests some blitting routines with alpha mod.", TEST_ENABLED}; /* TODO: rewrite test case, define new test data and re-enable; current implementation fails */ static const SDLTest_TestCaseReference surfaceTest8 = - { (SDLTest_TestCaseFp)surface_testBlitBlendLoop, "surface_testBlitBlendLoop", "Test blittin routines with verious blending modes", TEST_DISABLED}; + { (SDLTest_TestCaseFp)surface_testBlitBlendLoop, "surface_testBlitBlendLoop", "Test blittin routines with verious blending modes", TEST_DISABLED}; /* TODO: rewrite test case, define new test data and re-enable; current implementation fails */ static const SDLTest_TestCaseReference surfaceTest9 = - { (SDLTest_TestCaseFp)surface_testBlitBlendBlend, "surface_testBlitBlendBlend", "Tests blitting routines with blend blending mode.", TEST_DISABLED}; + { (SDLTest_TestCaseFp)surface_testBlitBlendBlend, "surface_testBlitBlendBlend", "Tests blitting routines with blend blending mode.", TEST_DISABLED}; /* TODO: rewrite test case, define new test data and re-enable; current implementation fails */ static const SDLTest_TestCaseReference surfaceTest10 = - { (SDLTest_TestCaseFp)surface_testBlitBlendAdd, "surface_testBlitBlendAdd", "Tests blitting routines with add blending mode.", TEST_DISABLED}; + { (SDLTest_TestCaseFp)surface_testBlitBlendAdd, "surface_testBlitBlendAdd", "Tests blitting routines with add blending mode.", TEST_DISABLED}; static const SDLTest_TestCaseReference surfaceTest11 = - { (SDLTest_TestCaseFp)surface_testBlitBlendMod, "surface_testBlitBlendMod", "Tests blitting routines with mod blending mode.", TEST_ENABLED}; + { (SDLTest_TestCaseFp)surface_testBlitBlendMod, "surface_testBlitBlendMod", "Tests blitting routines with mod blending mode.", TEST_ENABLED}; /* Sequence of Surface test cases */ static const SDLTest_TestCaseReference *surfaceTests[] = { - &surfaceTest1, &surfaceTest2, &surfaceTest3, &surfaceTest4, &surfaceTest5, - &surfaceTest6, &surfaceTest7, &surfaceTest8, &surfaceTest9, &surfaceTest10, &surfaceTest11, NULL + &surfaceTest1, &surfaceTest2, &surfaceTest3, &surfaceTest4, &surfaceTest5, + &surfaceTest6, &surfaceTest7, &surfaceTest8, &surfaceTest9, &surfaceTest10, &surfaceTest11, NULL }; /* Surface test suite (global) */ SDLTest_TestSuiteReference surfaceTestSuite = { - "Surface", - _surfaceSetUp, - surfaceTests, - _surfaceTearDown + "Surface", + _surfaceSetUp, + surfaceTests, + _surfaceTearDown }; diff --git a/test/testautomation_syswm.c b/test/testautomation_syswm.c index b3ee6f4dd..3e368f63e 100644 --- a/test/testautomation_syswm.c +++ b/test/testautomation_syswm.c @@ -17,27 +17,27 @@ int syswm_getWindowWMInfo(void *arg) { SDL_bool result; - SDL_Window *window; + SDL_Window *window; SDL_SysWMinfo info; - + window = SDL_CreateWindow("", 0, 0, 0, 0, SDL_WINDOW_HIDDEN); SDLTest_AssertPass("Call to SDL_CreateWindow()"); SDLTest_AssertCheck(window != NULL, "Check that value returned from SDL_CreateWindow is not NULL"); if (window == NULL) { return TEST_ABORTED; } - + /* Initialize info structure with SDL version info */ - SDL_VERSION(&info.version); - + SDL_VERSION(&info.version); + /* Make call */ result = SDL_GetWindowWMInfo(window, &info); SDLTest_AssertPass("Call to SDL_GetWindowWMInfo"); SDLTest_Log((result == SDL_TRUE) ? "Got window information" : "Couldn't get window information"); - + SDL_DestroyWindow(window); SDLTest_AssertPass("Call to SDL_DestroyWindow()"); - + return TEST_COMPLETED; } @@ -45,17 +45,17 @@ syswm_getWindowWMInfo(void *arg) /* SysWM test cases */ static const SDLTest_TestCaseReference syswmTest1 = - { (SDLTest_TestCaseFp)syswm_getWindowWMInfo, "syswm_getWindowWMInfo", "Call to SDL_GetWindowWMInfo", TEST_ENABLED }; + { (SDLTest_TestCaseFp)syswm_getWindowWMInfo, "syswm_getWindowWMInfo", "Call to SDL_GetWindowWMInfo", TEST_ENABLED }; /* Sequence of SysWM test cases */ static const SDLTest_TestCaseReference *syswmTests[] = { - &syswmTest1, NULL + &syswmTest1, NULL }; /* SysWM test suite (global) */ SDLTest_TestSuiteReference syswmTestSuite = { - "SysWM", - NULL, - syswmTests, - NULL + "SysWM", + NULL, + syswmTests, + NULL }; diff --git a/test/testautomation_timer.c b/test/testautomation_timer.c index 71cc8d8aa..ddf6a5f29 100644 --- a/test/testautomation_timer.c +++ b/test/testautomation_timer.c @@ -21,11 +21,11 @@ int _timerCallbackCalled = 0; void _timerSetUp(void *arg) { - /* Start SDL timer subsystem */ - int ret = SDL_InitSubSystem( SDL_INIT_TIMER ); + /* Start SDL timer subsystem */ + int ret = SDL_InitSubSystem( SDL_INIT_TIMER ); SDLTest_AssertPass("Call to SDL_InitSubSystem(SDL_INIT_TIMER)"); - SDLTest_AssertCheck(ret==0, "Check result from SDL_InitSubSystem(SDL_INIT_TIMER)"); - if (ret != 0) { + SDLTest_AssertCheck(ret==0, "Check result from SDL_InitSubSystem(SDL_INIT_TIMER)"); + if (ret != 0) { SDLTest_LogError("%s", SDL_GetError()); } } @@ -39,11 +39,11 @@ int timer_getPerformanceCounter(void *arg) { Uint64 result; - + result = SDL_GetPerformanceCounter(); SDLTest_AssertPass("Call to SDL_GetPerformanceCounter()"); SDLTest_AssertCheck(result > 0, "Check result value, expected: >0, got: %lu", result); - + return TEST_COMPLETED; } @@ -54,11 +54,11 @@ int timer_getPerformanceFrequency(void *arg) { Uint64 result; - + result = SDL_GetPerformanceFrequency(); SDLTest_AssertPass("Call to SDL_GetPerformanceFrequency()"); SDLTest_AssertCheck(result > 0, "Check result value, expected: >0, got: %lu", result); - + return TEST_COMPLETED; } @@ -74,18 +74,18 @@ timer_delayAndGetTicks(void *arg) Uint32 result2; Uint32 difference; - /* Zero delay */ + /* Zero delay */ SDL_Delay(0); SDLTest_AssertPass("Call to SDL_Delay(0)"); - + /* Non-zero delay */ SDL_Delay(1); SDLTest_AssertPass("Call to SDL_Delay(1)"); SDL_Delay(SDLTest_RandomIntegerInRange(5, 15)); SDLTest_AssertPass("Call to SDL_Delay()"); - - /* Get ticks count - should be non-zero by now */ + + /* Get ticks count - should be non-zero by now */ result = SDL_GetTicks(); SDLTest_AssertPass("Call to SDL_GetTicks()"); SDLTest_AssertCheck(result > 0, "Check result value, expected: >0, got: %d", result); @@ -99,7 +99,7 @@ timer_delayAndGetTicks(void *arg) difference = result2 - result; SDLTest_AssertCheck(difference > (testDelay - marginOfError), "Check difference, expected: >%d, got: %d", testDelay - marginOfError, difference); SDLTest_AssertCheck(difference < (testDelay + marginOfError), "Check difference, expected: <%d, got: %d", testDelay + marginOfError, difference); - + return TEST_COMPLETED; } @@ -107,14 +107,14 @@ timer_delayAndGetTicks(void *arg) Uint32 _timerTestCallback(Uint32 interval, void *param) { _timerCallbackCalled = 1; - + if (_paramCheck != 0) { SDLTest_AssertCheck(param != NULL, "Check param pointer, expected: non-NULL, got: %s", (param != NULL) ? "non-NULL" : "NULL"); if (param != NULL) { SDLTest_AssertCheck(*(int *)param == _paramValue, "Check param value, expected: %i, got: %i", _paramValue, *(int *)param); } } - + return 0; } @@ -131,12 +131,12 @@ timer_addRemoveTimer(void *arg) /* Reset state */ _paramCheck = 0; _timerCallbackCalled = 0; - - /* Set timer with a long delay */ + + /* Set timer with a long delay */ id = SDL_AddTimer(10000, _timerTestCallback, NULL); SDLTest_AssertPass("Call to SDL_AddTimer(10000,...)"); SDLTest_AssertCheck(id > 0, "Check result value, expected: >0, got: %d", id); - + /* Remove timer again and check that callback was not called */ result = SDL_RemoveTimer(id); SDLTest_AssertPass("Call to SDL_RemoveTimer()"); @@ -154,21 +154,21 @@ timer_addRemoveTimer(void *arg) _paramValue = param; _timerCallbackCalled = 0; - /* Set timer with a short delay */ + /* Set timer with a short delay */ id = SDL_AddTimer(10, _timerTestCallback, (void *)¶m); SDLTest_AssertPass("Call to SDL_AddTimer(10, param)"); SDLTest_AssertCheck(id > 0, "Check result value, expected: >0, got: %d", id); - + /* Wait to let timer trigger callback */ SDL_Delay(100); SDLTest_AssertPass("Call to SDL_Delay(100)"); - + /* Remove timer again and check that callback was called */ result = SDL_RemoveTimer(id); SDLTest_AssertPass("Call to SDL_RemoveTimer()"); SDLTest_AssertCheck(result == SDL_FALSE, "Check result value, expected: %i, got: %i", SDL_FALSE, result); SDLTest_AssertCheck(_timerCallbackCalled == 1, "Check callback WAS called, expected: 1, got: %i", _timerCallbackCalled); - + return TEST_COMPLETED; } @@ -176,26 +176,26 @@ timer_addRemoveTimer(void *arg) /* Timer test cases */ static const SDLTest_TestCaseReference timerTest1 = - { (SDLTest_TestCaseFp)timer_getPerformanceCounter, "timer_getPerformanceCounter", "Call to SDL_GetPerformanceCounter", TEST_ENABLED }; + { (SDLTest_TestCaseFp)timer_getPerformanceCounter, "timer_getPerformanceCounter", "Call to SDL_GetPerformanceCounter", TEST_ENABLED }; static const SDLTest_TestCaseReference timerTest2 = - { (SDLTest_TestCaseFp)timer_getPerformanceFrequency, "timer_getPerformanceFrequency", "Call to SDL_GetPerformanceFrequency", TEST_ENABLED }; + { (SDLTest_TestCaseFp)timer_getPerformanceFrequency, "timer_getPerformanceFrequency", "Call to SDL_GetPerformanceFrequency", TEST_ENABLED }; static const SDLTest_TestCaseReference timerTest3 = - { (SDLTest_TestCaseFp)timer_delayAndGetTicks, "timer_delayAndGetTicks", "Call to SDL_Delay and SDL_GetTicks", TEST_ENABLED }; + { (SDLTest_TestCaseFp)timer_delayAndGetTicks, "timer_delayAndGetTicks", "Call to SDL_Delay and SDL_GetTicks", TEST_ENABLED }; static const SDLTest_TestCaseReference timerTest4 = - { (SDLTest_TestCaseFp)timer_addRemoveTimer, "timer_addRemoveTimer", "Call to SDL_AddTimer and SDL_RemoveTimer", TEST_ENABLED }; + { (SDLTest_TestCaseFp)timer_addRemoveTimer, "timer_addRemoveTimer", "Call to SDL_AddTimer and SDL_RemoveTimer", TEST_ENABLED }; /* Sequence of Timer test cases */ static const SDLTest_TestCaseReference *timerTests[] = { - &timerTest1, &timerTest2, &timerTest3, &timerTest4, NULL + &timerTest1, &timerTest2, &timerTest3, &timerTest4, NULL }; /* Timer test suite (global) */ SDLTest_TestSuiteReference timerTestSuite = { - "Timer", - _timerSetUp, - timerTests, - NULL + "Timer", + _timerSetUp, + timerTests, + NULL }; diff --git a/test/testautomation_video.c b/test/testautomation_video.c index 9abf32aa1..f35e06392 100644 --- a/test/testautomation_video.c +++ b/test/testautomation_video.c @@ -20,7 +20,7 @@ /* Private helpers */ -/* +/* * Create a test window */ SDL_Window *_createVideoSuiteTestWindow(const char *title) @@ -35,7 +35,7 @@ SDL_Window *_createVideoSuiteTestWindow(const char *title) w = SDLTest_RandomIntegerInRange(320, 1024); h = SDLTest_RandomIntegerInRange(320, 768); flags = SDL_WINDOW_SHOWN | SDL_WINDOW_RESIZABLE | SDL_WINDOW_BORDERLESS; - + window = SDL_CreateWindow(title, x, y, w, h, flags); SDLTest_AssertPass("Call to SDL_CreateWindow('Title',%d,%d,%d,%d,%d)", x, y, w, h, flags); SDLTest_AssertCheck(window != NULL, "Validate that returned window struct is not NULL"); @@ -44,11 +44,11 @@ SDL_Window *_createVideoSuiteTestWindow(const char *title) } /* - * Destroy test window + * Destroy test window */ void _destroyVideoSuiteTestWindow(SDL_Window *window) { - if (window != NULL) { + if (window != NULL) { SDL_DestroyWindow(window); window = NULL; SDLTest_AssertPass("Call to SDL_DestroyWindow"); @@ -63,50 +63,50 @@ void _destroyVideoSuiteTestWindow(SDL_Window *window) int video_enableDisableScreensaver(void *arg) { - SDL_bool initialResult; - SDL_bool result; + SDL_bool initialResult; + SDL_bool result; - /* Get current state and proceed according to current state */ - initialResult = SDL_IsScreenSaverEnabled(); - SDLTest_AssertPass("Call to SDL_IsScreenSaverEnabled()"); - if (initialResult == SDL_TRUE) { - - /* Currently enabled: disable first, then enable again */ - - /* Disable screensaver and check */ - SDL_DisableScreenSaver(); - SDLTest_AssertPass("Call to SDL_DisableScreenSaver()"); - result = SDL_IsScreenSaverEnabled(); - SDLTest_AssertPass("Call to SDL_IsScreenSaverEnabled()"); - SDLTest_AssertCheck(result == SDL_FALSE, "Verify result from SDL_IsScreenSaverEnabled, expected: %i, got: %i", SDL_FALSE, result); - - /* Enable screensaver and check */ - SDL_EnableScreenSaver(); - SDLTest_AssertPass("Call to SDL_EnableScreenSaver()"); - result = SDL_IsScreenSaverEnabled(); - SDLTest_AssertPass("Call to SDL_IsScreenSaverEnabled()"); - SDLTest_AssertCheck(result == SDL_TRUE, "Verify result from SDL_IsScreenSaverEnabled, expected: %i, got: %i", SDL_TRUE, result); + /* Get current state and proceed according to current state */ + initialResult = SDL_IsScreenSaverEnabled(); + SDLTest_AssertPass("Call to SDL_IsScreenSaverEnabled()"); + if (initialResult == SDL_TRUE) { - } else { + /* Currently enabled: disable first, then enable again */ - /* Currently disabled: enable first, then disable again */ - - /* Enable screensaver and check */ - SDL_EnableScreenSaver(); - SDLTest_AssertPass("Call to SDL_EnableScreenSaver()"); - result = SDL_IsScreenSaverEnabled(); - SDLTest_AssertPass("Call to SDL_IsScreenSaverEnabled()"); - SDLTest_AssertCheck(result == SDL_TRUE, "Verify result from SDL_IsScreenSaverEnabled, expected: %i, got: %i", SDL_TRUE, result); + /* Disable screensaver and check */ + SDL_DisableScreenSaver(); + SDLTest_AssertPass("Call to SDL_DisableScreenSaver()"); + result = SDL_IsScreenSaverEnabled(); + SDLTest_AssertPass("Call to SDL_IsScreenSaverEnabled()"); + SDLTest_AssertCheck(result == SDL_FALSE, "Verify result from SDL_IsScreenSaverEnabled, expected: %i, got: %i", SDL_FALSE, result); - /* Disable screensaver and check */ - SDL_DisableScreenSaver(); - SDLTest_AssertPass("Call to SDL_DisableScreenSaver()"); - result = SDL_IsScreenSaverEnabled(); - SDLTest_AssertPass("Call to SDL_IsScreenSaverEnabled()"); - SDLTest_AssertCheck(result == SDL_FALSE, "Verify result from SDL_IsScreenSaverEnabled, expected: %i, got: %i", SDL_FALSE, result); - } - - return TEST_COMPLETED; + /* Enable screensaver and check */ + SDL_EnableScreenSaver(); + SDLTest_AssertPass("Call to SDL_EnableScreenSaver()"); + result = SDL_IsScreenSaverEnabled(); + SDLTest_AssertPass("Call to SDL_IsScreenSaverEnabled()"); + SDLTest_AssertCheck(result == SDL_TRUE, "Verify result from SDL_IsScreenSaverEnabled, expected: %i, got: %i", SDL_TRUE, result); + + } else { + + /* Currently disabled: enable first, then disable again */ + + /* Enable screensaver and check */ + SDL_EnableScreenSaver(); + SDLTest_AssertPass("Call to SDL_EnableScreenSaver()"); + result = SDL_IsScreenSaverEnabled(); + SDLTest_AssertPass("Call to SDL_IsScreenSaverEnabled()"); + SDLTest_AssertCheck(result == SDL_TRUE, "Verify result from SDL_IsScreenSaverEnabled, expected: %i, got: %i", SDL_TRUE, result); + + /* Disable screensaver and check */ + SDL_DisableScreenSaver(); + SDLTest_AssertPass("Call to SDL_DisableScreenSaver()"); + result = SDL_IsScreenSaverEnabled(); + SDLTest_AssertPass("Call to SDL_IsScreenSaverEnabled()"); + SDLTest_AssertCheck(result == SDL_FALSE, "Verify result from SDL_IsScreenSaverEnabled, expected: %i, got: %i", SDL_FALSE, result); + } + + return TEST_COMPLETED; } /** @@ -119,73 +119,73 @@ video_createWindowVariousPositions(void *arg) const char* title = "video_createWindowVariousPositions Test Window"; int x, y, w, h; int xVariation, yVariation; - + for (xVariation = 0; xVariation < 6; xVariation++) { for (yVariation = 0; yVariation < 6; yVariation++) { switch(xVariation) { case 0: - /* Zero X Position */ + /* Zero X Position */ x = 0; break; case 1: - /* Random X position inside screen */ + /* Random X position inside screen */ x = SDLTest_RandomIntegerInRange(1, 100); break; case 2: - /* Random X position outside screen (positive) */ + /* Random X position outside screen (positive) */ x = SDLTest_RandomIntegerInRange(10000, 11000); break; case 3: - /* Random X position outside screen (negative) */ + /* Random X position outside screen (negative) */ x = SDLTest_RandomIntegerInRange(-1000, -100); break; case 4: - /* Centered X position */ + /* Centered X position */ x = SDL_WINDOWPOS_CENTERED; break; case 5: - /* Undefined X position */ + /* Undefined X position */ x = SDL_WINDOWPOS_UNDEFINED; break; } switch(yVariation) { case 0: - /* Zero X Position */ + /* Zero X Position */ y = 0; break; case 1: - /* Random X position inside screen */ + /* Random X position inside screen */ y = SDLTest_RandomIntegerInRange(1, 100); break; case 2: - /* Random X position outside screen (positive) */ + /* Random X position outside screen (positive) */ y = SDLTest_RandomIntegerInRange(10000, 11000); break; case 3: - /* Random Y position outside screen (negative) */ + /* Random Y position outside screen (negative) */ y = SDLTest_RandomIntegerInRange(-1000, -100); break; case 4: - /* Centered Y position */ + /* Centered Y position */ y = SDL_WINDOWPOS_CENTERED; break; case 5: - /* Undefined Y position */ + /* Undefined Y position */ y = SDL_WINDOWPOS_UNDEFINED; break; } - + w = SDLTest_RandomIntegerInRange(32, 96); h = SDLTest_RandomIntegerInRange(32, 96); window = SDL_CreateWindow(title, x, y, w, h, SDL_WINDOW_SHOWN); SDLTest_AssertPass("Call to SDL_CreateWindow('Title',%d,%d,%d,%d,SHOWN)", x, y, w, h); SDLTest_AssertCheck(window != NULL, "Validate that returned window struct is not NULL"); - /* Clean up */ + /* Clean up */ _destroyVideoSuiteTestWindow(window); } - } + } return TEST_COMPLETED; } @@ -200,49 +200,49 @@ video_createWindowVariousSizes(void *arg) const char* title = "video_createWindowVariousSizes Test Window"; int x, y, w, h; int wVariation, hVariation; - + x = SDLTest_RandomIntegerInRange(1, 100); y = SDLTest_RandomIntegerInRange(1, 100); for (wVariation = 0; wVariation < 3; wVariation++) { for (hVariation = 0; hVariation < 3; hVariation++) { switch(wVariation) { case 0: - /* Width of 1 */ + /* Width of 1 */ w = 1; break; case 1: - /* Random "normal" width */ + /* Random "normal" width */ w = SDLTest_RandomIntegerInRange(320, 1920); break; case 2: - /* Random "large" width */ + /* Random "large" width */ w = SDLTest_RandomIntegerInRange(2048, 4095); break; } switch(hVariation) { case 0: - /* Height of 1 */ + /* Height of 1 */ h = 1; break; case 1: - /* Random "normal" height */ + /* Random "normal" height */ h = SDLTest_RandomIntegerInRange(320, 1080); break; case 2: - /* Random "large" height */ + /* Random "large" height */ h = SDLTest_RandomIntegerInRange(2048, 4095); break; } - + window = SDL_CreateWindow(title, x, y, w, h, SDL_WINDOW_SHOWN); SDLTest_AssertPass("Call to SDL_CreateWindow('Title',%d,%d,%d,%d,SHOWN)", x, y, w, h); SDLTest_AssertCheck(window != NULL, "Validate that returned window struct is not NULL"); - /* Clean up */ + /* Clean up */ _destroyVideoSuiteTestWindow(window); } - } + } return TEST_COMPLETED; } @@ -258,7 +258,7 @@ video_createWindowVariousFlags(void *arg) int x, y, w, h; int fVariation; SDL_WindowFlags flags; - + /* Standard window */ x = SDLTest_RandomIntegerInRange(1, 100); y = SDLTest_RandomIntegerInRange(1, 100); @@ -270,54 +270,54 @@ video_createWindowVariousFlags(void *arg) case 0: flags = SDL_WINDOW_FULLSCREEN; /* Skip - blanks screen; comment out next line to run test */ - continue; + continue; break; case 1: flags = SDL_WINDOW_FULLSCREEN_DESKTOP; /* Skip - blanks screen; comment out next line to run test */ - continue; + continue; break; case 2: flags = SDL_WINDOW_OPENGL; - break; + break; case 3: flags = SDL_WINDOW_SHOWN; - break; - case 4: + break; + case 4: flags = SDL_WINDOW_HIDDEN; - break; + break; case 5: flags = SDL_WINDOW_BORDERLESS; - break; + break; case 6: flags = SDL_WINDOW_RESIZABLE; - break; + break; case 7: flags = SDL_WINDOW_MINIMIZED; - break; + break; case 8: flags = SDL_WINDOW_MAXIMIZED; break; - case 9: + case 9: flags = SDL_WINDOW_INPUT_GRABBED; break; - case 10: + case 10: flags = SDL_WINDOW_INPUT_FOCUS; - break; - case 11: + break; + case 11: flags = SDL_WINDOW_MOUSE_FOCUS; break; - case 12: + case 12: flags = SDL_WINDOW_FOREIGN; break; } - + window = SDL_CreateWindow(title, x, y, w, h, flags); SDLTest_AssertPass("Call to SDL_CreateWindow('Title',%d,%d,%d,%d,%d)", x, y, w, h, flags); SDLTest_AssertCheck(window != NULL, "Validate that returned window struct is not NULL"); - /* Clean up */ - _destroyVideoSuiteTestWindow(window); + /* Clean up */ + _destroyVideoSuiteTestWindow(window); } return TEST_COMPLETED; @@ -334,11 +334,11 @@ video_getWindowFlags(void *arg) const char* title = "video_getWindowFlags Test Window"; SDL_WindowFlags flags; Uint32 actualFlags; - + /* Reliable flag set always set in test window */ flags = SDL_WINDOW_SHOWN; - - /* Call against new test window */ + + /* Call against new test window */ window = _createVideoSuiteTestWindow(title); if (window != NULL) { actualFlags = SDL_GetWindowFlags(window); @@ -346,9 +346,9 @@ video_getWindowFlags(void *arg) SDLTest_AssertCheck((flags & actualFlags) == flags, "Verify returned value has flags %d set, got: %d", flags, actualFlags); } - /* Clean up */ + /* Clean up */ _destroyVideoSuiteTestWindow(window); - + return TEST_COMPLETED; } @@ -366,7 +366,7 @@ video_getNumDisplayModes(void *arg) displayNum = SDL_GetNumVideoDisplays(); SDLTest_AssertPass("Call to SDL_GetNumVideoDisplays"); - /* Make call for each display */ + /* Make call for each display */ for (i=0; i= 0.0 && result <= 1.0, "Validate range of result value; expected: [0.0, 1.0], got: %f", result); } - /* Clean up */ + /* Clean up */ _destroyVideoSuiteTestWindow(window); - + return TEST_COMPLETED; } @@ -544,7 +544,7 @@ video_getWindowBrightnessNegative(void *arg) const char* title = "video_getWindowBrightnessNegative Test Window"; float result; - /* Call against invalid window */ + /* Call against invalid window */ result = SDL_GetWindowBrightness(NULL); SDLTest_AssertPass("Call to SDL_GetWindowBrightness(window=NULL)"); SDLTest_AssertCheck(result == 1.0, "Validate result value; expected: 1.0, got: %f", result); @@ -579,7 +579,7 @@ video_getWindowDisplayMode(void *arg) mode.h = -1; mode.refresh_rate = -1; - /* Call against new test window */ + /* Call against new test window */ window = _createVideoSuiteTestWindow(title); if (window != NULL) { result = SDL_GetWindowDisplayMode(window, &mode); @@ -590,9 +590,9 @@ video_getWindowDisplayMode(void *arg) SDLTest_AssertCheck(mode.refresh_rate > 0, "Validate mode.refresh_rate content; expected: >0, got: %d", mode.refresh_rate); } - /* Clean up */ + /* Clean up */ _destroyVideoSuiteTestWindow(window); - + return TEST_COMPLETED; } @@ -611,7 +611,7 @@ void _checkInvalidWindowError() invalidWindowError, lastError); SDL_ClearError(); - SDLTest_AssertPass("Call to SDL_ClearError()"); + SDLTest_AssertPass("Call to SDL_ClearError()"); } } @@ -630,7 +630,7 @@ video_getWindowDisplayModeNegative(void *arg) SDL_DisplayMode mode; int result; - /* Call against new test window */ + /* Call against new test window */ window = _createVideoSuiteTestWindow(title); if (window != NULL) { result = SDL_GetWindowDisplayMode(window, NULL); @@ -640,16 +640,16 @@ video_getWindowDisplayModeNegative(void *arg) SDLTest_AssertPass("SDL_GetError()"); SDLTest_AssertCheck(lastError != NULL, "Verify error message is not NULL"); if (lastError != NULL) { - SDLTest_AssertCheck(SDL_strcmp(lastError, expectedError) == 0, + SDLTest_AssertCheck(SDL_strcmp(lastError, expectedError) == 0, "SDL_GetError(): expected message '%s', was message: '%s'", expectedError, lastError); } } - /* Clean up */ + /* Clean up */ _destroyVideoSuiteTestWindow(window); - + /* Call against invalid window */ result = SDL_GetWindowDisplayMode(NULL, &mode); SDLTest_AssertPass("Call to SDL_GetWindowDisplayMode(window=NULL,...)"); @@ -674,10 +674,10 @@ video_getWindowGammaRamp(void *arg) Uint16 blue[256]; int result; - /* Call against new test window */ + /* Call against new test window */ window = _createVideoSuiteTestWindow(title); if (window == NULL) return TEST_ABORTED; - + /* Retrieve no channel */ result = SDL_GetWindowGammaRamp(window, NULL, NULL, NULL); SDLTest_AssertPass("Call to SDL_GetWindowGammaRamp(all NULL)"); @@ -714,9 +714,9 @@ video_getWindowGammaRamp(void *arg) SDLTest_AssertPass("Call to SDL_GetWindowGammaRamp(r,g,b)"); SDLTest_AssertCheck(result == 0, "Validate result value; expected: 0, got: %d", result); - /* Clean up */ + /* Clean up */ _destroyVideoSuiteTestWindow(window); - + return TEST_COMPLETED; } @@ -737,21 +737,21 @@ video_getWindowGammaRampNegative(void *arg) SDL_ClearError(); SDLTest_AssertPass("Call to SDL_ClearError()"); - /* Call against invalid window */ + /* Call against invalid window */ result = SDL_GetWindowGammaRamp(NULL, red, green, blue); SDLTest_AssertPass("Call to SDL_GetWindowGammaRamp(window=NULL,r,g,b)"); SDLTest_AssertCheck(result == -1, "Validate result value; expected: -1, got: %f", result); _checkInvalidWindowError(); - + return TEST_COMPLETED; } /* Helper for setting and checking the window grab state */ -void +void _setAndCheckWindowGrabState(SDL_Window* window, SDL_bool desiredState) { SDL_bool currentState; - + /* Set state */ SDL_SetWindowGrab(window, desiredState); SDLTest_AssertPass("Call to SDL_SetWindowGrab(%s)", (desiredState == SDL_FALSE) ? "SDL_FALSE" : "SDL_TRUE"); @@ -760,8 +760,8 @@ _setAndCheckWindowGrabState(SDL_Window* window, SDL_bool desiredState) currentState = SDL_GetWindowGrab(window); SDLTest_AssertPass("Call to SDL_GetWindowGrab()"); SDLTest_AssertCheck( - currentState == desiredState, - "Validate returned state; expected: %s, got: %s", + currentState == desiredState, + "Validate returned state; expected: %s, got: %s", (desiredState == SDL_FALSE) ? "SDL_FALSE" : "SDL_TRUE", (currentState == SDL_FALSE) ? "SDL_FALSE" : "SDL_TRUE"); } @@ -779,11 +779,11 @@ video_getSetWindowGrab(void *arg) SDL_Window* window; SDL_bool originalState, dummyState, currentState, desiredState; - /* Call against new test window */ + /* Call against new test window */ window = _createVideoSuiteTestWindow(title); if (window == NULL) return TEST_ABORTED; - /* Get state */ + /* Get state */ originalState = SDL_GetWindowGrab(window); SDLTest_AssertPass("Call to SDL_GetWindowGrab()"); @@ -792,7 +792,7 @@ video_getSetWindowGrab(void *arg) /* F --> F */ _setAndCheckWindowGrabState(window, SDL_FALSE); - + /* F --> T */ _setAndCheckWindowGrabState(window, SDL_TRUE); @@ -801,7 +801,7 @@ video_getSetWindowGrab(void *arg) /* T --> F */ _setAndCheckWindowGrabState(window, SDL_FALSE); - + /* Negative tests */ dummyState = SDL_GetWindowGrab(NULL); SDLTest_AssertPass("Call to SDL_GetWindowGrab(window=NULL)"); @@ -814,21 +814,21 @@ video_getSetWindowGrab(void *arg) SDL_SetWindowGrab(NULL, SDL_TRUE); SDLTest_AssertPass("Call to SDL_SetWindowGrab(window=NULL,SDL_FALSE)"); _checkInvalidWindowError(); - + /* State should still be F */ desiredState = SDL_FALSE; currentState = SDL_GetWindowGrab(window); SDLTest_AssertPass("Call to SDL_GetWindowGrab()"); SDLTest_AssertCheck( - currentState == desiredState, - "Validate returned state; expected: %s, got: %s", + currentState == desiredState, + "Validate returned state; expected: %s, got: %s", (desiredState == SDL_FALSE) ? "SDL_FALSE" : "SDL_TRUE", (currentState == SDL_FALSE) ? "SDL_FALSE" : "SDL_TRUE"); - - /* Restore state */ + + /* Restore state */ _setAndCheckWindowGrabState(window, originalState); - /* Clean up */ + /* Clean up */ _destroyVideoSuiteTestWindow(window); return TEST_COMPLETED; @@ -849,7 +849,7 @@ video_getWindowId(void *arg) SDL_Window* result; Uint32 id, randomId; - /* Call against new test window */ + /* Call against new test window */ window = _createVideoSuiteTestWindow(title); if (window == NULL) return TEST_ABORTED; @@ -873,9 +873,9 @@ video_getWindowId(void *arg) result = SDL_GetWindowFromID(UINT32_MAX); SDLTest_AssertPass("Call to SDL_GetWindowID(UINT32_MAX)"); - /* Clean up */ + /* Clean up */ _destroyVideoSuiteTestWindow(window); - + /* Get window from ID for closed window*/ result = SDL_GetWindowFromID(id); SDLTest_AssertPass("Call to SDL_GetWindowID(%d/closed_window)", id); @@ -887,7 +887,7 @@ video_getWindowId(void *arg) id = SDL_GetWindowID(NULL); SDLTest_AssertPass("Call to SDL_GetWindowID(window=NULL)"); _checkInvalidWindowError(); - + return TEST_COMPLETED; } @@ -903,7 +903,7 @@ video_getWindowPixelFormat(void *arg) SDL_Window* window; Uint32 format; - /* Call against new test window */ + /* Call against new test window */ window = _createVideoSuiteTestWindow(title); if (window == NULL) return TEST_ABORTED; @@ -911,10 +911,10 @@ video_getWindowPixelFormat(void *arg) format = SDL_GetWindowPixelFormat(window); SDLTest_AssertPass("Call to SDL_GetWindowPixelFormat()"); SDLTest_AssertCheck(format != SDL_PIXELFORMAT_UNKNOWN, "Verify that returned format is valid; expected: != %d, got: %d", SDL_PIXELFORMAT_UNKNOWN, format); - - /* Clean up */ + + /* Clean up */ _destroyVideoSuiteTestWindow(window); - + /* Negative test */ SDL_ClearError(); SDLTest_AssertPass("Call to SDL_ClearError()"); @@ -941,46 +941,46 @@ video_getSetWindowPosition(void *arg) int currentX, currentY; int desiredX, desiredY; - /* Call against new test window */ + /* Call against new test window */ window = _createVideoSuiteTestWindow(title); if (window == NULL) return TEST_ABORTED; - + for (xVariation = 0; xVariation < 4; xVariation++) { for (yVariation = 0; yVariation < 4; yVariation++) { switch(xVariation) { case 0: - /* Zero X Position */ + /* Zero X Position */ desiredX = 0; break; case 1: - /* Random X position inside screen */ + /* Random X position inside screen */ desiredX = SDLTest_RandomIntegerInRange(1, 100); break; case 2: - /* Random X position outside screen (positive) */ + /* Random X position outside screen (positive) */ desiredX = SDLTest_RandomIntegerInRange(10000, 11000); break; case 3: - /* Random X position outside screen (negative) */ + /* Random X position outside screen (negative) */ desiredX = SDLTest_RandomIntegerInRange(-1000, -100); break; } switch(yVariation) { case 0: - /* Zero X Position */ + /* Zero X Position */ desiredY = 0; break; case 1: - /* Random X position inside screen */ + /* Random X position inside screen */ desiredY = SDLTest_RandomIntegerInRange(1, 100); break; case 2: - /* Random X position outside screen (positive) */ + /* Random X position outside screen (positive) */ desiredY = SDLTest_RandomIntegerInRange(10000, 11000); break; case 3: - /* Random Y position outside screen (negative) */ + /* Random Y position outside screen (negative) */ desiredY = SDLTest_RandomIntegerInRange(-1000, -100); break; } @@ -988,7 +988,7 @@ video_getSetWindowPosition(void *arg) /* Set position */ SDL_SetWindowPosition(window, desiredX, desiredY); SDLTest_AssertPass("Call to SDL_SetWindowPosition(...,%d,%d)", desiredX, desiredY); - + /* Get position */ currentX = desiredX + 1; currentY = desiredY + 1; @@ -998,7 +998,7 @@ video_getSetWindowPosition(void *arg) SDLTest_AssertCheck(desiredY == currentY, "Verify returned Y position; expected: %d, got: %d", desiredY, currentY); /* Get position X */ - currentX = desiredX + 1; + currentX = desiredX + 1; SDL_GetWindowPosition(window, ¤tX, NULL); SDLTest_AssertPass("Call to SDL_GetWindowPosition(&y=NULL)"); SDLTest_AssertCheck(desiredX == currentX, "Verify returned X position; expected: %d, got: %d", desiredX, currentX); @@ -1014,10 +1014,10 @@ video_getSetWindowPosition(void *arg) /* Dummy call with both pointers NULL */ SDL_GetWindowPosition(window, NULL, NULL); SDLTest_AssertPass("Call to SDL_GetWindowPosition(&x=NULL,&y=NULL)"); - - /* Clean up */ + + /* Clean up */ _destroyVideoSuiteTestWindow(window); - + /* Set some 'magic' value for later check that nothing was changed */ referenceX = SDLTest_RandomSint32(); referenceY = SDLTest_RandomSint32(); @@ -1028,14 +1028,14 @@ video_getSetWindowPosition(void *arg) /* Negative tests */ SDL_ClearError(); - SDLTest_AssertPass("Call to SDL_ClearError()"); + SDLTest_AssertPass("Call to SDL_ClearError()"); SDL_GetWindowPosition(NULL, ¤tX, ¤tY); SDLTest_AssertPass("Call to SDL_GetWindowPosition(window=NULL)"); SDLTest_AssertCheck( - currentX == referenceX && currentY == referenceY, - "Verify that content of X and Y pointers has not been modified; expected: %d,%d; got: %d,%d", - referenceX, referenceY, - currentX, currentY); + currentX == referenceX && currentY == referenceY, + "Verify that content of X and Y pointers has not been modified; expected: %d,%d; got: %d,%d", + referenceX, referenceY, + currentX, currentY); _checkInvalidWindowError(); SDL_GetWindowPosition(NULL, NULL, NULL); @@ -1045,7 +1045,7 @@ video_getSetWindowPosition(void *arg) SDL_SetWindowPosition(NULL, desiredX, desiredY); SDLTest_AssertPass("Call to SDL_SetWindowPosition(window=NULL)"); _checkInvalidWindowError(); - + return TEST_COMPLETED; } @@ -1064,7 +1064,7 @@ void _checkInvalidParameterError() invalidParameterError, lastError); SDL_ClearError(); - SDLTest_AssertPass("Call to SDL_ClearError()"); + SDLTest_AssertPass("Call to SDL_ClearError()"); } } @@ -1091,47 +1091,47 @@ video_getSetWindowSize(void *arg) SDLTest_AssertPass("SDL_GetDisplayBounds()"); SDLTest_AssertCheck(result == 0, "Verify return value; expected: 0, got: %d", result); if (result != 0) return TEST_ABORTED; - - /* Call against new test window */ + + /* Call against new test window */ window = _createVideoSuiteTestWindow(title); if (window == NULL) return TEST_ABORTED; - + for (wVariation = 0; wVariation < 4; wVariation++) { for (hVariation = 0; hVariation < 4; hVariation++) { switch(wVariation) { case 0: - /* 1 Pixel Wide */ + /* 1 Pixel Wide */ desiredW = 1; break; case 1: - /* Random width inside screen */ + /* Random width inside screen */ desiredW = SDLTest_RandomIntegerInRange(1, 100); break; case 2: - /* Width at screen size */ + /* Width at screen size */ desiredW = display.w; break; case 3: - /* Width 1 pixel larger than screen */ + /* Width 1 pixel larger than screen */ desiredW = display.w + 1; break; } switch(hVariation) { case 0: - /* 1 Pixel High */ + /* 1 Pixel High */ desiredH = 1; break; case 1: - /* Random height inside screen */ + /* Random height inside screen */ desiredH = SDLTest_RandomIntegerInRange(1, 100); break; case 2: - /* Height at screen size */ + /* Height at screen size */ desiredH = display.h; break; case 3: - /* Height 1 pixel larger than screen */ + /* Height 1 pixel larger than screen */ desiredH = display.h + 1; break; } @@ -1139,7 +1139,7 @@ video_getSetWindowSize(void *arg) /* Set size */ SDL_SetWindowSize(window, desiredW, desiredH); SDLTest_AssertPass("Call to SDL_SetWindowSize(...,%d,%d)", desiredW, desiredH); - + /* Get size */ currentW = desiredW + 1; currentH = desiredH + 1; @@ -1149,7 +1149,7 @@ video_getSetWindowSize(void *arg) SDLTest_AssertCheck(desiredH == currentH, "Verify returned height; expected: %d, got: %d", desiredH, currentH); /* Get just width */ - currentW = desiredW + 1; + currentW = desiredW + 1; SDL_GetWindowSize(window, ¤tW, NULL); SDLTest_AssertPass("Call to SDL_GetWindowSize(&h=NULL)"); SDLTest_AssertCheck(desiredW == currentW, "Verify returned width; expected: %d, got: %d", desiredW, currentH); @@ -1168,20 +1168,20 @@ video_getSetWindowSize(void *arg) /* Negative tests for parameter input */ SDL_ClearError(); - SDLTest_AssertPass("Call to SDL_ClearError()"); + SDLTest_AssertPass("Call to SDL_ClearError()"); for (desiredH = -2; desiredH < 2; desiredH++) { for (desiredW = -2; desiredW < 2; desiredW++) { - if (desiredW <= 0 || desiredH <= 0) { + if (desiredW <= 0 || desiredH <= 0) { SDL_SetWindowSize(window, desiredW, desiredH); SDLTest_AssertPass("Call to SDL_SetWindowSize(...,%d,%d)", desiredW, desiredH); _checkInvalidParameterError(); } } } - - /* Clean up */ + + /* Clean up */ _destroyVideoSuiteTestWindow(window); - + /* Set some 'magic' value for later check that nothing was changed */ referenceW = SDLTest_RandomSint32(); referenceH = SDLTest_RandomSint32(); @@ -1189,17 +1189,17 @@ video_getSetWindowSize(void *arg) currentH = referenceH; desiredW = SDLTest_RandomSint32(); desiredH = SDLTest_RandomSint32(); - + /* Negative tests for window input */ SDL_ClearError(); SDLTest_AssertPass("Call to SDL_ClearError()"); SDL_GetWindowSize(NULL, ¤tW, ¤tH); SDLTest_AssertPass("Call to SDL_GetWindowSize(window=NULL)"); SDLTest_AssertCheck( - currentW == referenceW && currentH == referenceH, - "Verify that content of W and H pointers has not been modified; expected: %d,%d; got: %d,%d", - referenceW, referenceH, - currentW, currentH); + currentW == referenceW && currentH == referenceH, + "Verify that content of W and H pointers has not been modified; expected: %d,%d; got: %d,%d", + referenceW, referenceH, + currentW, currentH); _checkInvalidWindowError(); SDL_GetWindowSize(NULL, NULL, NULL); @@ -1209,7 +1209,7 @@ video_getSetWindowSize(void *arg) SDL_SetWindowSize(NULL, desiredW, desiredH); SDLTest_AssertPass("Call to SDL_SetWindowSize(window=NULL)"); _checkInvalidWindowError(); - + return TEST_COMPLETED; } @@ -1235,42 +1235,42 @@ video_getSetWindowMinimumSize(void *arg) SDLTest_AssertCheck(result == 0, "Verify return value; expected: 0, got: %d", result); if (result != 0) return TEST_ABORTED; - /* Call against new test window */ + /* Call against new test window */ window = _createVideoSuiteTestWindow(title); if (window == NULL) return TEST_ABORTED; - + for (wVariation = 0; wVariation < 5; wVariation++) { for (hVariation = 0; hVariation < 5; hVariation++) { switch(wVariation) { case 0: - /* 1 Pixel Wide */ + /* 1 Pixel Wide */ desiredW = 1; break; case 1: - /* Random width inside screen */ + /* Random width inside screen */ desiredW = SDLTest_RandomIntegerInRange(2, display.w - 1); break; case 2: - /* Width at screen size */ + /* Width at screen size */ desiredW = display.w; break; } switch(hVariation) { case 0: - /* 1 Pixel High */ + /* 1 Pixel High */ desiredH = 1; break; case 1: - /* Random height inside screen */ + /* Random height inside screen */ desiredH = SDLTest_RandomIntegerInRange(2, display.h - 1); break; case 2: - /* Height at screen size */ + /* Height at screen size */ desiredH = display.h; break; case 4: - /* Height 1 pixel larger than screen */ + /* Height 1 pixel larger than screen */ desiredH = display.h + 1; break; } @@ -1278,7 +1278,7 @@ video_getSetWindowMinimumSize(void *arg) /* Set size */ SDL_SetWindowMinimumSize(window, desiredW, desiredH); SDLTest_AssertPass("Call to SDL_SetWindowMinimumSize(...,%d,%d)", desiredW, desiredH); - + /* Get size */ currentW = desiredW + 1; currentH = desiredH + 1; @@ -1288,7 +1288,7 @@ video_getSetWindowMinimumSize(void *arg) SDLTest_AssertCheck(desiredH == currentH, "Verify returned height; expected: %d, got: %d", desiredH, currentH); /* Get just width */ - currentW = desiredW + 1; + currentW = desiredW + 1; SDL_GetWindowMinimumSize(window, ¤tW, NULL); SDLTest_AssertPass("Call to SDL_GetWindowMinimumSize(&h=NULL)"); SDLTest_AssertCheck(desiredW == currentW, "Verify returned width; expected: %d, got: %d", desiredW, currentH); @@ -1307,20 +1307,20 @@ video_getSetWindowMinimumSize(void *arg) /* Negative tests for parameter input */ SDL_ClearError(); - SDLTest_AssertPass("Call to SDL_ClearError()"); + SDLTest_AssertPass("Call to SDL_ClearError()"); for (desiredH = -2; desiredH < 2; desiredH++) { for (desiredW = -2; desiredW < 2; desiredW++) { - if (desiredW <= 0 || desiredH <= 0) { + if (desiredW <= 0 || desiredH <= 0) { SDL_SetWindowMinimumSize(window, desiredW, desiredH); SDLTest_AssertPass("Call to SDL_SetWindowMinimumSize(...,%d,%d)", desiredW, desiredH); _checkInvalidParameterError(); } } } - - /* Clean up */ + + /* Clean up */ _destroyVideoSuiteTestWindow(window); - + /* Set some 'magic' value for later check that nothing was changed */ referenceW = SDLTest_RandomSint32(); referenceH = SDLTest_RandomSint32(); @@ -1328,17 +1328,17 @@ video_getSetWindowMinimumSize(void *arg) currentH = referenceH; desiredW = SDLTest_RandomSint32(); desiredH = SDLTest_RandomSint32(); - + /* Negative tests for window input */ SDL_ClearError(); SDLTest_AssertPass("Call to SDL_ClearError()"); SDL_GetWindowMinimumSize(NULL, ¤tW, ¤tH); SDLTest_AssertPass("Call to SDL_GetWindowMinimumSize(window=NULL)"); SDLTest_AssertCheck( - currentW == referenceW && currentH == referenceH, - "Verify that content of W and H pointers has not been modified; expected: %d,%d; got: %d,%d", - referenceW, referenceH, - currentW, currentH); + currentW == referenceW && currentH == referenceH, + "Verify that content of W and H pointers has not been modified; expected: %d,%d; got: %d,%d", + referenceW, referenceH, + currentW, currentH); _checkInvalidWindowError(); SDL_GetWindowMinimumSize(NULL, NULL, NULL); @@ -1348,7 +1348,7 @@ video_getSetWindowMinimumSize(void *arg) SDL_SetWindowMinimumSize(NULL, desiredW, desiredH); SDLTest_AssertPass("Call to SDL_SetWindowMinimumSize(window=NULL)"); _checkInvalidWindowError(); - + return TEST_COMPLETED; } @@ -1374,38 +1374,38 @@ video_getSetWindowMaximumSize(void *arg) SDLTest_AssertCheck(result == 0, "Verify return value; expected: 0, got: %d", result); if (result != 0) return TEST_ABORTED; - /* Call against new test window */ + /* Call against new test window */ window = _createVideoSuiteTestWindow(title); if (window == NULL) return TEST_ABORTED; - + for (wVariation = 0; wVariation < 3; wVariation++) { for (hVariation = 0; hVariation < 3; hVariation++) { switch(wVariation) { case 0: - /* 1 Pixel Wide */ + /* 1 Pixel Wide */ desiredW = 1; break; case 1: - /* Random width inside screen */ + /* Random width inside screen */ desiredW = SDLTest_RandomIntegerInRange(2, display.w - 1); break; case 2: - /* Width at screen size */ + /* Width at screen size */ desiredW = display.w; break; } switch(hVariation) { case 0: - /* 1 Pixel High */ + /* 1 Pixel High */ desiredH = 1; break; case 1: - /* Random height inside screen */ + /* Random height inside screen */ desiredH = SDLTest_RandomIntegerInRange(2, display.h - 1); break; case 2: - /* Height at screen size */ + /* Height at screen size */ desiredH = display.h; break; } @@ -1413,7 +1413,7 @@ video_getSetWindowMaximumSize(void *arg) /* Set size */ SDL_SetWindowMaximumSize(window, desiredW, desiredH); SDLTest_AssertPass("Call to SDL_SetWindowMaximumSize(...,%d,%d)", desiredW, desiredH); - + /* Get size */ currentW = desiredW + 1; currentH = desiredH + 1; @@ -1423,7 +1423,7 @@ video_getSetWindowMaximumSize(void *arg) SDLTest_AssertCheck(desiredH == currentH, "Verify returned height; expected: %d, got: %d", desiredH, currentH); /* Get just width */ - currentW = desiredW + 1; + currentW = desiredW + 1; SDL_GetWindowMaximumSize(window, ¤tW, NULL); SDLTest_AssertPass("Call to SDL_GetWindowMaximumSize(&h=NULL)"); SDLTest_AssertCheck(desiredW == currentW, "Verify returned width; expected: %d, got: %d", desiredW, currentH); @@ -1442,20 +1442,20 @@ video_getSetWindowMaximumSize(void *arg) /* Negative tests for parameter input */ SDL_ClearError(); - SDLTest_AssertPass("Call to SDL_ClearError()"); + SDLTest_AssertPass("Call to SDL_ClearError()"); for (desiredH = -2; desiredH < 2; desiredH++) { for (desiredW = -2; desiredW < 2; desiredW++) { - if (desiredW <= 0 || desiredH <= 0) { + if (desiredW <= 0 || desiredH <= 0) { SDL_SetWindowMaximumSize(window, desiredW, desiredH); SDLTest_AssertPass("Call to SDL_SetWindowMaximumSize(...,%d,%d)", desiredW, desiredH); _checkInvalidParameterError(); } } } - - /* Clean up */ + + /* Clean up */ _destroyVideoSuiteTestWindow(window); - + /* Set some 'magic' value for later check that nothing was changed */ referenceW = SDLTest_RandomSint32(); referenceH = SDLTest_RandomSint32(); @@ -1463,17 +1463,17 @@ video_getSetWindowMaximumSize(void *arg) currentH = referenceH; desiredW = SDLTest_RandomSint32(); desiredH = SDLTest_RandomSint32(); - + /* Negative tests */ SDL_ClearError(); SDLTest_AssertPass("Call to SDL_ClearError()"); SDL_GetWindowMaximumSize(NULL, ¤tW, ¤tH); SDLTest_AssertPass("Call to SDL_GetWindowMaximumSize(window=NULL)"); SDLTest_AssertCheck( - currentW == referenceW && currentH == referenceH, - "Verify that content of W and H pointers has not been modified; expected: %d,%d; got: %d,%d", - referenceW, referenceH, - currentW, currentH); + currentW == referenceW && currentH == referenceH, + "Verify that content of W and H pointers has not been modified; expected: %d,%d; got: %d,%d", + referenceW, referenceH, + currentW, currentH); _checkInvalidWindowError(); SDL_GetWindowMaximumSize(NULL, NULL, NULL); @@ -1483,7 +1483,7 @@ video_getSetWindowMaximumSize(void *arg) SDL_SetWindowMaximumSize(NULL, desiredW, desiredH); SDLTest_AssertPass("Call to SDL_SetWindowMaximumSize(window=NULL)"); _checkInvalidWindowError(); - + return TEST_COMPLETED; } @@ -1512,47 +1512,47 @@ video_getSetWindowData(void *arg) char *result; int iteration; - /* Call against new test window */ + /* Call against new test window */ window = _createVideoSuiteTestWindow(title); if (window == NULL) return TEST_ABORTED; /* Create testdata */ - datasize = SDLTest_RandomIntegerInRange(1, 32); + datasize = SDLTest_RandomIntegerInRange(1, 32); referenceUserdata = SDLTest_RandomAsciiStringOfSize(datasize); - if (referenceUserdata == NULL) { - returnValue = TEST_ABORTED; - goto cleanup; + if (referenceUserdata == NULL) { + returnValue = TEST_ABORTED; + goto cleanup; } userdata = SDL_strdup(referenceUserdata); if (userdata == NULL) { - returnValue = TEST_ABORTED; - goto cleanup; + returnValue = TEST_ABORTED; + goto cleanup; } - datasize = SDLTest_RandomIntegerInRange(1, 32); + datasize = SDLTest_RandomIntegerInRange(1, 32); referenceUserdata2 = SDLTest_RandomAsciiStringOfSize(datasize); - if (referenceUserdata2 == NULL) { - returnValue = TEST_ABORTED; - goto cleanup; + if (referenceUserdata2 == NULL) { + returnValue = TEST_ABORTED; + goto cleanup; } userdata2 = (char *)SDL_strdup(referenceUserdata2); if (userdata2 == NULL) { - returnValue = TEST_ABORTED; - goto cleanup; + returnValue = TEST_ABORTED; + goto cleanup; } - + /* Get non-existent data */ result = (char *)SDL_GetWindowData(window, name); SDLTest_AssertPass("Call to SDL_GetWindowData(..,%s)", name); SDLTest_AssertCheck(result == NULL, "Validate that result is NULL"); SDLTest_AssertCheck(SDL_strcmp(referenceName, name) == 0, "Validate that name was not changed, expected: %s, got: %s", referenceName, name); - + /* Set data */ result = (char *)SDL_SetWindowData(window, name, userdata); SDLTest_AssertPass("Call to SDL_SetWindowData(...%s,%s)", name, userdata); SDLTest_AssertCheck(result == NULL, "Validate that result is NULL"); SDLTest_AssertCheck(SDL_strcmp(referenceName, name) == 0, "Validate that name was not changed, expected: %s, got: %s", referenceName, name); SDLTest_AssertCheck(SDL_strcmp(referenceUserdata, userdata) == 0, "Validate that userdata was not changed, expected: %s, got: %s", referenceUserdata, userdata); - + /* Get data (twice) */ for (iteration = 1; iteration <= 2; iteration++) { result = (char *)SDL_GetWindowData(window, name); @@ -1560,7 +1560,7 @@ video_getSetWindowData(void *arg) SDLTest_AssertCheck(SDL_strcmp(referenceUserdata, result) == 0, "Validate that correct result was returned; expected: %s, got: %s", referenceUserdata, result); SDLTest_AssertCheck(SDL_strcmp(referenceName, name) == 0, "Validate that name was not changed, expected: %s, got: %s", referenceName, name); } - + /* Set data again twice */ for (iteration = 1; iteration <= 2; iteration++) { result = (char *)SDL_SetWindowData(window, name, userdata); @@ -1569,7 +1569,7 @@ video_getSetWindowData(void *arg) SDLTest_AssertCheck(SDL_strcmp(referenceName, name) == 0, "Validate that name was not changed, expected: %s, got: %s", referenceName, name); SDLTest_AssertCheck(SDL_strcmp(referenceUserdata, userdata) == 0, "Validate that userdata was not changed, expected: %s, got: %s", referenceUserdata, userdata); } - + /* Get data again */ result = (char *)SDL_GetWindowData(window, name); SDLTest_AssertPass("Call to SDL_GetWindowData(..,%s) [again]", name); @@ -1591,7 +1591,7 @@ video_getSetWindowData(void *arg) SDLTest_AssertCheck(SDL_strcmp(referenceName, name) == 0, "Validate that name was not changed, expected: %s, got: %s", referenceName, name); SDLTest_AssertCheck(SDL_strcmp(referenceUserdata, userdata) == 0, "Validate that userdata was not changed, expected: %s, got: %s", referenceUserdata, userdata); SDLTest_AssertCheck(SDL_strcmp(referenceUserdata2, userdata2) == 0, "Validate that userdata2 was not changed, expected: %s, got: %s", referenceUserdata2, userdata2); - + /* Get new data */ result = (char *)SDL_GetWindowData(window, name); SDLTest_AssertPass("Call to SDL_GetWindowData(..,%s)", name); @@ -1613,7 +1613,7 @@ video_getSetWindowData(void *arg) SDLTest_AssertCheck(SDL_strcmp(referenceName, name) == 0, "Validate that name was not changed, expected: %s, got: %s", referenceName, name); SDLTest_AssertCheck(SDL_strcmp(referenceUserdata, userdata) == 0, "Validate that userdata was not changed, expected: %s, got: %s", referenceUserdata, userdata); SDLTest_AssertCheck(SDL_strcmp(referenceUserdata2, userdata2) == 0, "Validate that userdata2 was not changed, expected: %s, got: %s", referenceUserdata2, userdata2); - + /* Get non-existent data */ result = (char *)SDL_GetWindowData(window, name); SDLTest_AssertPass("Call to SDL_GetWindowData(..,%s)", name); @@ -1632,7 +1632,7 @@ video_getSetWindowData(void *arg) SDLTest_AssertCheck(result == NULL, "Validate that result is NULL"); SDLTest_AssertCheck(SDL_strcmp(referenceName, name) == 0, "Validate that name was not changed, expected: %s, got: %s", referenceName, name); SDLTest_AssertCheck(SDL_strcmp(referenceUserdata, userdata) == 0, "Validate that userdata was not changed, expected: %s, got: %s", referenceUserdata, userdata); - + /* Get data (again) */ result = (char *)SDL_GetWindowData(window, name); SDLTest_AssertPass("Call to SDL_GetWindowData(..,%s) [again, after clear]", name); @@ -1643,12 +1643,12 @@ video_getSetWindowData(void *arg) SDL_ClearError(); SDLTest_AssertPass("Call to SDL_ClearError()"); - /* Set with invalid window */ + /* Set with invalid window */ result = (char *)SDL_SetWindowData(NULL, name, userdata); SDLTest_AssertPass("Call to SDL_SetWindowData(window=NULL)"); SDLTest_AssertCheck(result == NULL, "Validate that result is NULL"); _checkInvalidWindowError(); - + /* Set data with NULL name, valid userdata */ result = (char *)SDL_SetWindowData(window, NULL, userdata); SDLTest_AssertPass("Call to SDL_SetWindowData(name=NULL)"); @@ -1678,7 +1678,7 @@ video_getSetWindowData(void *arg) SDLTest_AssertPass("Call to SDL_GetWindowData(window=NULL)"); SDLTest_AssertCheck(result == NULL, "Validate that result is NULL"); _checkInvalidWindowError(); - + /* Get data with NULL name */ result = (char *)SDL_GetWindowData(window, NULL); SDLTest_AssertPass("Call to SDL_GetWindowData(name=NULL)"); @@ -1693,13 +1693,13 @@ video_getSetWindowData(void *arg) /* Clean up */ _destroyVideoSuiteTestWindow(window); - + cleanup: if (referenceUserdata != NULL) SDL_free(referenceUserdata); if (referenceUserdata2 != NULL) SDL_free(referenceUserdata2); if (userdata != NULL) SDL_free(userdata); if (userdata2 != NULL) SDL_free(userdata2); - + return returnValue; } @@ -1708,87 +1708,87 @@ video_getSetWindowData(void *arg) /* Video test cases */ static const SDLTest_TestCaseReference videoTest1 = - { (SDLTest_TestCaseFp)video_enableDisableScreensaver, "video_enableDisableScreensaver", "Enable and disable screenaver while checking state", TEST_ENABLED }; + { (SDLTest_TestCaseFp)video_enableDisableScreensaver, "video_enableDisableScreensaver", "Enable and disable screenaver while checking state", TEST_ENABLED }; static const SDLTest_TestCaseReference videoTest2 = - { (SDLTest_TestCaseFp)video_createWindowVariousPositions, "video_createWindowVariousPositions", "Create windows at various locations", TEST_ENABLED }; + { (SDLTest_TestCaseFp)video_createWindowVariousPositions, "video_createWindowVariousPositions", "Create windows at various locations", TEST_ENABLED }; static const SDLTest_TestCaseReference videoTest3 = - { (SDLTest_TestCaseFp)video_createWindowVariousSizes, "video_createWindowVariousSizes", "Create windows with various sizes", TEST_ENABLED }; + { (SDLTest_TestCaseFp)video_createWindowVariousSizes, "video_createWindowVariousSizes", "Create windows with various sizes", TEST_ENABLED }; static const SDLTest_TestCaseReference videoTest4 = - { (SDLTest_TestCaseFp)video_createWindowVariousFlags, "video_createWindowVariousFlags", "Create windows using various flags", TEST_ENABLED }; + { (SDLTest_TestCaseFp)video_createWindowVariousFlags, "video_createWindowVariousFlags", "Create windows using various flags", TEST_ENABLED }; static const SDLTest_TestCaseReference videoTest5 = - { (SDLTest_TestCaseFp)video_getWindowFlags, "video_getWindowFlags", "Get window flags set during SDL_CreateWindow", TEST_ENABLED }; + { (SDLTest_TestCaseFp)video_getWindowFlags, "video_getWindowFlags", "Get window flags set during SDL_CreateWindow", TEST_ENABLED }; static const SDLTest_TestCaseReference videoTest6 = - { (SDLTest_TestCaseFp)video_getNumDisplayModes, "video_getNumDisplayModes", "Use SDL_GetNumDisplayModes function to get number of display modes", TEST_ENABLED }; + { (SDLTest_TestCaseFp)video_getNumDisplayModes, "video_getNumDisplayModes", "Use SDL_GetNumDisplayModes function to get number of display modes", TEST_ENABLED }; static const SDLTest_TestCaseReference videoTest7 = - { (SDLTest_TestCaseFp)video_getNumDisplayModesNegative, "video_getNumDisplayModesNegative", "Negative tests for SDL_GetNumDisplayModes", TEST_ENABLED }; + { (SDLTest_TestCaseFp)video_getNumDisplayModesNegative, "video_getNumDisplayModesNegative", "Negative tests for SDL_GetNumDisplayModes", TEST_ENABLED }; static const SDLTest_TestCaseReference videoTest8 = - { (SDLTest_TestCaseFp)video_getClosestDisplayModeCurrentResolution, "video_getClosestDisplayModeCurrentResolution", "Use function to get closes match to requested display mode for current resolution", TEST_ENABLED }; + { (SDLTest_TestCaseFp)video_getClosestDisplayModeCurrentResolution, "video_getClosestDisplayModeCurrentResolution", "Use function to get closes match to requested display mode for current resolution", TEST_ENABLED }; static const SDLTest_TestCaseReference videoTest9 = - { (SDLTest_TestCaseFp)video_getClosestDisplayModeRandomResolution, "video_getClosestDisplayModeRandomResolution", "Use function to get closes match to requested display mode for random resolution", TEST_ENABLED }; + { (SDLTest_TestCaseFp)video_getClosestDisplayModeRandomResolution, "video_getClosestDisplayModeRandomResolution", "Use function to get closes match to requested display mode for random resolution", TEST_ENABLED }; static const SDLTest_TestCaseReference videoTest10 = - { (SDLTest_TestCaseFp)video_getWindowBrightness, "video_getWindowBrightness", "Get window brightness", TEST_ENABLED }; + { (SDLTest_TestCaseFp)video_getWindowBrightness, "video_getWindowBrightness", "Get window brightness", TEST_ENABLED }; static const SDLTest_TestCaseReference videoTest11 = - { (SDLTest_TestCaseFp)video_getWindowBrightnessNegative, "video_getWindowBrightnessNegative", "Get window brightness with invalid input", TEST_ENABLED }; + { (SDLTest_TestCaseFp)video_getWindowBrightnessNegative, "video_getWindowBrightnessNegative", "Get window brightness with invalid input", TEST_ENABLED }; static const SDLTest_TestCaseReference videoTest12 = - { (SDLTest_TestCaseFp)video_getWindowDisplayMode, "video_getWindowDisplayMode", "Get window display mode", TEST_ENABLED }; + { (SDLTest_TestCaseFp)video_getWindowDisplayMode, "video_getWindowDisplayMode", "Get window display mode", TEST_ENABLED }; static const SDLTest_TestCaseReference videoTest13 = - { (SDLTest_TestCaseFp)video_getWindowDisplayModeNegative, "video_getWindowDisplayModeNegative", "Get window display mode with invalid input", TEST_ENABLED }; + { (SDLTest_TestCaseFp)video_getWindowDisplayModeNegative, "video_getWindowDisplayModeNegative", "Get window display mode with invalid input", TEST_ENABLED }; static const SDLTest_TestCaseReference videoTest14 = - { (SDLTest_TestCaseFp)video_getWindowGammaRamp, "video_getWindowGammaRamp", "Get window gamma ramp", TEST_ENABLED }; + { (SDLTest_TestCaseFp)video_getWindowGammaRamp, "video_getWindowGammaRamp", "Get window gamma ramp", TEST_ENABLED }; static const SDLTest_TestCaseReference videoTest15 = - { (SDLTest_TestCaseFp)video_getWindowGammaRampNegative, "video_getWindowGammaRampNegative", "Get window gamma ramp against invalid input", TEST_ENABLED }; + { (SDLTest_TestCaseFp)video_getWindowGammaRampNegative, "video_getWindowGammaRampNegative", "Get window gamma ramp against invalid input", TEST_ENABLED }; static const SDLTest_TestCaseReference videoTest16 = - { (SDLTest_TestCaseFp)video_getSetWindowGrab, "video_getSetWindowGrab", "Checks SDL_GetWindowGrab and SDL_SetWindowGrab positive and negative cases", TEST_ENABLED }; + { (SDLTest_TestCaseFp)video_getSetWindowGrab, "video_getSetWindowGrab", "Checks SDL_GetWindowGrab and SDL_SetWindowGrab positive and negative cases", TEST_ENABLED }; static const SDLTest_TestCaseReference videoTest17 = - { (SDLTest_TestCaseFp)video_getWindowId, "video_getWindowId", "Checks SDL_GetWindowID and SDL_GetWindowFromID", TEST_ENABLED }; + { (SDLTest_TestCaseFp)video_getWindowId, "video_getWindowId", "Checks SDL_GetWindowID and SDL_GetWindowFromID", TEST_ENABLED }; static const SDLTest_TestCaseReference videoTest18 = - { (SDLTest_TestCaseFp)video_getWindowPixelFormat, "video_getWindowPixelFormat", "Checks SDL_GetWindowPixelFormat", TEST_ENABLED }; + { (SDLTest_TestCaseFp)video_getWindowPixelFormat, "video_getWindowPixelFormat", "Checks SDL_GetWindowPixelFormat", TEST_ENABLED }; static const SDLTest_TestCaseReference videoTest19 = - { (SDLTest_TestCaseFp)video_getSetWindowPosition, "video_getSetWindowPosition", "Checks SDL_GetWindowPosition and SDL_SetWindowPosition positive and negative cases", TEST_ENABLED }; + { (SDLTest_TestCaseFp)video_getSetWindowPosition, "video_getSetWindowPosition", "Checks SDL_GetWindowPosition and SDL_SetWindowPosition positive and negative cases", TEST_ENABLED }; static const SDLTest_TestCaseReference videoTest20 = - { (SDLTest_TestCaseFp)video_getSetWindowSize, "video_getSetWindowSize", "Checks SDL_GetWindowSize and SDL_SetWindowSize positive and negative cases", TEST_ENABLED }; + { (SDLTest_TestCaseFp)video_getSetWindowSize, "video_getSetWindowSize", "Checks SDL_GetWindowSize and SDL_SetWindowSize positive and negative cases", TEST_ENABLED }; static const SDLTest_TestCaseReference videoTest21 = - { (SDLTest_TestCaseFp)video_getSetWindowMinimumSize, "video_getSetWindowMinimumSize", "Checks SDL_GetWindowMinimumSize and SDL_SetWindowMinimumSize positive and negative cases", TEST_ENABLED }; + { (SDLTest_TestCaseFp)video_getSetWindowMinimumSize, "video_getSetWindowMinimumSize", "Checks SDL_GetWindowMinimumSize and SDL_SetWindowMinimumSize positive and negative cases", TEST_ENABLED }; static const SDLTest_TestCaseReference videoTest22 = - { (SDLTest_TestCaseFp)video_getSetWindowMaximumSize, "video_getSetWindowMaximumSize", "Checks SDL_GetWindowMaximumSize and SDL_SetWindowMaximumSize positive and negative cases", TEST_ENABLED }; + { (SDLTest_TestCaseFp)video_getSetWindowMaximumSize, "video_getSetWindowMaximumSize", "Checks SDL_GetWindowMaximumSize and SDL_SetWindowMaximumSize positive and negative cases", TEST_ENABLED }; static const SDLTest_TestCaseReference videoTest23 = - { (SDLTest_TestCaseFp)video_getSetWindowData, "video_getSetWindowData", "Checks SDL_SetWindowData and SDL_GetWindowData positive and negative cases", TEST_ENABLED }; + { (SDLTest_TestCaseFp)video_getSetWindowData, "video_getSetWindowData", "Checks SDL_SetWindowData and SDL_GetWindowData positive and negative cases", TEST_ENABLED }; /* Sequence of Video test cases */ static const SDLTest_TestCaseReference *videoTests[] = { - &videoTest1, &videoTest2, &videoTest3, &videoTest4, &videoTest5, &videoTest6, - &videoTest7, &videoTest8, &videoTest9, &videoTest10, &videoTest11, &videoTest12, - &videoTest13, &videoTest14, &videoTest15, &videoTest16, &videoTest17, - &videoTest18, &videoTest19, &videoTest20, &videoTest21, &videoTest22, - &videoTest23, NULL + &videoTest1, &videoTest2, &videoTest3, &videoTest4, &videoTest5, &videoTest6, + &videoTest7, &videoTest8, &videoTest9, &videoTest10, &videoTest11, &videoTest12, + &videoTest13, &videoTest14, &videoTest15, &videoTest16, &videoTest17, + &videoTest18, &videoTest19, &videoTest20, &videoTest21, &videoTest22, + &videoTest23, NULL }; /* Video test suite (global) */ SDLTest_TestSuiteReference videoTestSuite = { - "Video", - NULL, - videoTests, - NULL + "Video", + NULL, + videoTests, + NULL }; diff --git a/test/testdraw2.c b/test/testdraw2.c index 3fced878d..272c5067b 100644 --- a/test/testdraw2.c +++ b/test/testdraw2.c @@ -18,7 +18,7 @@ #include "SDL_test_common.h" -#define NUM_OBJECTS 100 +#define NUM_OBJECTS 100 static SDLTest_CommonState *state; static int num_objects; diff --git a/test/testfile.c b/test/testfile.c index 3ee75ba91..6496eccd3 100644 --- a/test/testfile.c +++ b/test/testfile.c @@ -30,11 +30,11 @@ /* WARNING ! those 2 files will be destroyed by this test program */ #ifdef __IPHONEOS__ -#define FBASENAME1 "../Documents/sdldata1" /* this file will be created during tests */ +#define FBASENAME1 "../Documents/sdldata1" /* this file will be created during tests */ #define FBASENAME2 "../Documents/sdldata2" /* this file should not exist before starting test */ #else -#define FBASENAME1 "sdldata1" /* this file will be created during tests */ -#define FBASENAME2 "sdldata2" /* this file should not exist before starting test */ +#define FBASENAME1 "sdldata1" /* this file will be created during tests */ +#define FBASENAME2 "sdldata2" /* this file should not exist before starting test */ #endif #ifndef NULL @@ -61,7 +61,7 @@ rwops_error_quit(unsigned line, SDL_RWops * rwops) exit(1); /* quit with rwops error (test failed) */ } -#define RWOP_ERR_QUIT(x) rwops_error_quit( __LINE__, (x) ) +#define RWOP_ERR_QUIT(x) rwops_error_quit( __LINE__, (x) ) @@ -93,9 +93,9 @@ main(int argc, char *argv[]) printf("test1 OK\n"); /* test 2 : check that inexistant file is not successfully opened/created when required */ -/* modes : r, r+ implie that file MUST exist +/* modes : r, r+ implie that file MUST exist modes : a, a+, w, w+ checks that it succeeds (file may not exists) - + */ rwops = SDL_RWFromFile(FBASENAME2, "rb"); /* this file doesn't exist that call must fail */ if (rwops) @@ -125,8 +125,8 @@ main(int argc, char *argv[]) unlink(FBASENAME2); printf("test2 OK\n"); -/* test 3 : creation, writing , reading, seeking, - test : w mode, r mode, w+ mode +/* test 3 : creation, writing , reading, seeking, + test : w mode, r mode, w+ mode */ rwops = SDL_RWFromFile(FBASENAME1, "wb"); /* write only */ if (!rwops) diff --git a/test/testgamecontroller.c b/test/testgamecontroller.c index 2e9d98ad5..0ca424627 100644 --- a/test/testgamecontroller.c +++ b/test/testgamecontroller.c @@ -125,7 +125,7 @@ WatchGameController(SDL_GameController * gamecontroller) /* Print info about the controller we are watching */ printf("Watching controller %s\n", name ? name : "Unknown Controller"); - + /* Loop, getting controller events! */ while (!done) { /* blank screen, set up for drawing this frame. */ @@ -199,7 +199,7 @@ WatchGameController(SDL_GameController * gamecontroller) SDL_SetRenderDrawColor(screen, 0x00, 0x00, 0xFF, SDL_ALPHA_OPAQUE); SDL_RenderPresent(screen); - + if ( !done ) done = SDL_GameControllerGetAttached( gamecontroller ) == 0; } diff --git a/test/testgesture.c b/test/testgesture.c index 53e7e8a55..0f5356191 100644 --- a/test/testgesture.c +++ b/test/testgesture.c @@ -93,12 +93,12 @@ void setpix(SDL_Surface *screen, float _x, float _y, unsigned int col) int x = (int)_x; int y = (int)_y; float a; - + if(x < 0 || x >= screen->w) return; if(y < 0 || y >= screen->h) return; pixmem32 = (Uint32*) screen->pixels + y*screen->pitch/BPP + x; - + SDL_memcpy(&colour,pixmem32,screen->format->BytesPerPixel); SDL_GetRGB(colour,screen->format,&r,&g,&b); @@ -110,7 +110,7 @@ void setpix(SDL_Surface *screen, float _x, float _y, unsigned int col) g = (Uint8)(g*(1-a) + ((col>> 8)&0xFF)*(a)); b = (Uint8)(b*(1-a) + ((col>> 0)&0xFF)*(a)); colour = SDL_MapRGB( screen->format,r, g, b); - + *pixmem32 = colour; } @@ -129,7 +129,7 @@ void drawCircle(SDL_Surface* screen,float x,float y,float r,unsigned int c) xr = (float)sqrt(r*r - ty*ty); if(r > 0) { //r > 0 ==> filled circle for(tx=-xr+.5f;tx<=xr-.5;tx++) { - setpix(screen,x+tx,y+ty,c); + setpix(screen,x+tx,y+ty,c); } } else { @@ -140,9 +140,9 @@ void drawCircle(SDL_Surface* screen,float x,float y,float r,unsigned int c) } void drawKnob(SDL_Surface* screen,Knob k) { - drawCircle(screen,k.p.x*screen->w,k.p.y*screen->h,k.r*screen->w,0xFFFFFF); + drawCircle(screen,k.p.x*screen->w,k.p.y*screen->h,k.r*screen->w,0xFFFFFF); drawCircle(screen,(k.p.x+k.r/2*cosf(k.ang))*screen->w, - (k.p.y+k.r/2*sinf(k.ang))*screen->h,k.r/4*screen->w,0); + (k.p.y+k.r/2*sinf(k.ang))*screen->h,k.r/4*screen->w,0); } void DrawScreen(SDL_Surface* screen) @@ -154,36 +154,36 @@ void DrawScreen(SDL_Surface* screen) int x, y; for(y = 0;y < screen->h;y++) for(x = 0;x < screen->w;x++) - setpix(screen,(float)x,(float)y,((x%255)<<16) + ((y%255)<<8) + (x+y)%255); + setpix(screen,(float)x,(float)y,((x%255)<<16) + ((y%255)<<8) + (x+y)%255); #endif //draw Touch History for(i = eventWrite; i < eventWrite+EVENT_BUF_SIZE; ++i) { const SDL_Event *event = &events[i&(EVENT_BUF_SIZE-1)]; float age = (float)(i - eventWrite) / EVENT_BUF_SIZE; - float x, y; - unsigned int c, col; + float x, y; + unsigned int c, col; - if(event->type == SDL_FINGERMOTION || + if(event->type == SDL_FINGERMOTION || event->type == SDL_FINGERDOWN || event->type == SDL_FINGERUP) { x = event->tfinger.x; y = event->tfinger.y; - - //draw the touch: - c = colors[event->tfinger.fingerId%7]; + + //draw the touch: + c = colors[event->tfinger.fingerId%7]; col = ((unsigned int)(c*(.1+.85))) | (unsigned int)(0xFF*age)<<24; if(event->type == SDL_FINGERMOTION) - drawCircle(screen,x*screen->w,y*screen->h,5,col); + drawCircle(screen,x*screen->w,y*screen->h,5,col); else if(event->type == SDL_FINGERDOWN) - drawCircle(screen,x*screen->w,y*screen->h,-10,col); + drawCircle(screen,x*screen->w,y*screen->h,-10,col); } } - + if(knob.p.x > 0) drawKnob(screen,knob); - + SDL_UpdateWindowSurface(window); } @@ -201,7 +201,7 @@ SDL_Surface* initScreen(int width,int height) } int main(int argc, char* argv[]) -{ +{ SDL_Surface *screen; SDL_Event event; SDL_bool quitting = SDL_FALSE; @@ -212,7 +212,7 @@ int main(int argc, char* argv[]) knob.ang = 0; if (SDL_Init(SDL_INIT_VIDEO) < 0 ) return 1; - + if (!(screen = initScreen(WIDTH,HEIGHT))) { SDL_Quit(); @@ -220,92 +220,92 @@ int main(int argc, char* argv[]) } while(!quitting) { - while(SDL_PollEvent(&event)) + while(SDL_PollEvent(&event)) { - //Record _all_ events - events[eventWrite & (EVENT_BUF_SIZE-1)] = event; - eventWrite++; - - switch (event.type) - { - case SDL_QUIT: - quitting = SDL_TRUE; - break; - case SDL_KEYDOWN: - switch (event.key.keysym.sym) - { - case SDLK_SPACE: - SDL_RecordGesture(-1); - break; - case SDLK_s: - src = SDL_RWFromFile("gestureSave","w"); - SDL_Log("Wrote %i templates",SDL_SaveAllDollarTemplates(src)); - SDL_RWclose(src); - break; - case SDLK_l: - src = SDL_RWFromFile("gestureSave","r"); - SDL_Log("Loaded: %i",SDL_LoadDollarTemplates(-1,src)); - SDL_RWclose(src); - break; - case SDLK_ESCAPE: - quitting = SDL_TRUE; - break; - } - break; - case SDL_WINDOWEVENT: + //Record _all_ events + events[eventWrite & (EVENT_BUF_SIZE-1)] = event; + eventWrite++; + + switch (event.type) + { + case SDL_QUIT: + quitting = SDL_TRUE; + break; + case SDL_KEYDOWN: + switch (event.key.keysym.sym) + { + case SDLK_SPACE: + SDL_RecordGesture(-1); + break; + case SDLK_s: + src = SDL_RWFromFile("gestureSave","w"); + SDL_Log("Wrote %i templates",SDL_SaveAllDollarTemplates(src)); + SDL_RWclose(src); + break; + case SDLK_l: + src = SDL_RWFromFile("gestureSave","r"); + SDL_Log("Loaded: %i",SDL_LoadDollarTemplates(-1,src)); + SDL_RWclose(src); + break; + case SDLK_ESCAPE: + quitting = SDL_TRUE; + break; + } + break; + case SDL_WINDOWEVENT: if (event.window.event == SDL_WINDOWEVENT_RESIZED) { - if (!(screen = initScreen(event.window.data1, event.window.data2))) - { - SDL_Quit(); - return 1; - } + if (!(screen = initScreen(event.window.data1, event.window.data2))) + { + SDL_Quit(); + return 1; + } } - break; - case SDL_FINGERMOTION: + break; + case SDL_FINGERMOTION: #if VERBOSE - SDL_Log("Finger: %i,x: %i, y: %i",event.tfinger.fingerId, - event.tfinger.x,event.tfinger.y); + SDL_Log("Finger: %i,x: %i, y: %i",event.tfinger.fingerId, + event.tfinger.x,event.tfinger.y); #endif - break; - case SDL_FINGERDOWN: + break; + case SDL_FINGERDOWN: #if VERBOSE - SDL_Log("Finger: %"PRIs64" down - x: %i, y: %i", - event.tfinger.fingerId,event.tfinger.x,event.tfinger.y); + SDL_Log("Finger: %"PRIs64" down - x: %i, y: %i", + event.tfinger.fingerId,event.tfinger.x,event.tfinger.y); #endif - break; - case SDL_FINGERUP: + break; + case SDL_FINGERUP: #if VERBOSE - SDL_Log("Finger: %"PRIs64" up - x: %i, y: %i", - event.tfinger.fingerId,event.tfinger.x,event.tfinger.y); + SDL_Log("Finger: %"PRIs64" up - x: %i, y: %i", + event.tfinger.fingerId,event.tfinger.x,event.tfinger.y); #endif - break; - case SDL_MULTIGESTURE: -#if VERBOSE - SDL_Log("Multi Gesture: x = %f, y = %f, dAng = %f, dR = %f", - event.mgesture.x, - event.mgesture.y, - event.mgesture.dTheta, - event.mgesture.dDist); - SDL_Log("MG: numDownTouch = %i",event.mgesture.numFingers); + break; + case SDL_MULTIGESTURE: +#if VERBOSE + SDL_Log("Multi Gesture: x = %f, y = %f, dAng = %f, dR = %f", + event.mgesture.x, + event.mgesture.y, + event.mgesture.dTheta, + event.mgesture.dDist); + SDL_Log("MG: numDownTouch = %i",event.mgesture.numFingers); #endif - knob.p.x = event.mgesture.x; - knob.p.y = event.mgesture.y; - knob.ang += event.mgesture.dTheta; - knob.r += event.mgesture.dDist; - break; - case SDL_DOLLARGESTURE: - SDL_Log("Gesture %"PRIs64" performed, error: %f", - event.dgesture.gestureId, - event.dgesture.error); - break; - case SDL_DOLLARRECORD: - SDL_Log("Recorded gesture: %"PRIs64"",event.dgesture.gestureId); - break; - } + knob.p.x = event.mgesture.x; + knob.p.y = event.mgesture.y; + knob.ang += event.mgesture.dTheta; + knob.r += event.mgesture.dDist; + break; + case SDL_DOLLARGESTURE: + SDL_Log("Gesture %"PRIs64" performed, error: %f", + event.dgesture.gestureId, + event.dgesture.error); + break; + case SDL_DOLLARRECORD: + SDL_Log("Recorded gesture: %"PRIs64"",event.dgesture.gestureId); + break; + } } DrawScreen(screen); - } - SDL_Quit(); + } + SDL_Quit(); return 0; } diff --git a/test/testime.c b/test/testime.c index e9a469328..2fa65e6e1 100644 --- a/test/testime.c +++ b/test/testime.c @@ -238,7 +238,7 @@ int main(int argc, char *argv[]) { } } } - + if (!SDLTest_CommonInit(state)) { return 2; } @@ -267,7 +267,7 @@ int main(int argc, char *argv[]) { SDL_SetRenderDrawColor(renderer, 0xA0, 0xA0, 0xA0, 0xFF); SDL_RenderClear(renderer); } - Redraw(); + Redraw(); /* Main render loop */ done = 0; while (!done) { @@ -356,7 +356,7 @@ int main(int argc, char *argv[]) { break; } break; - + } } } diff --git a/test/testintersections.c b/test/testintersections.c index e892f8d87..c93f04ed9 100644 --- a/test/testintersections.c +++ b/test/testintersections.c @@ -19,7 +19,7 @@ #include "SDL_test_common.h" #define SWAP(typ,a,b) do{typ t=a;a=b;b=t;}while(0) -#define NUM_OBJECTS 100 +#define NUM_OBJECTS 100 static SDLTest_CommonState *state; static int num_objects; diff --git a/test/testjoystick.c b/test/testjoystick.c index df94631f1..7132e667a 100644 --- a/test/testjoystick.c +++ b/test/testjoystick.c @@ -21,11 +21,11 @@ #ifndef SDL_JOYSTICK_DISABLED #ifdef __IPHONEOS__ -#define SCREEN_WIDTH 320 -#define SCREEN_HEIGHT 480 +#define SCREEN_WIDTH 320 +#define SCREEN_HEIGHT 480 #else -#define SCREEN_WIDTH 640 -#define SCREEN_HEIGHT 480 +#define SCREEN_WIDTH 640 +#define SCREEN_HEIGHT 480 #endif diff --git a/test/testlock.c b/test/testlock.c index 04abf3d7f..e77a2c42d 100644 --- a/test/testlock.c +++ b/test/testlock.c @@ -10,7 +10,7 @@ freely. */ -/* Test the thread and mutex locking functions +/* Test the thread and mutex locking functions Also exercises the system's signal/thread interaction */ diff --git a/test/testnative.c b/test/testnative.c index ec66c18aa..2579b18b9 100644 --- a/test/testnative.c +++ b/test/testnative.c @@ -18,7 +18,7 @@ #define WINDOW_W 640 #define WINDOW_H 480 #define NUM_SPRITES 100 -#define MAX_SPEED 1 +#define MAX_SPEED 1 static NativeWindowFactory *factories[] = { #ifdef TEST_NATIVE_WINDOWS diff --git a/test/testrelative.c b/test/testrelative.c index 44ffaf028..6cb9d364e 100644 --- a/test/testrelative.c +++ b/test/testrelative.c @@ -35,7 +35,7 @@ main(int argc, char *argv[]) int i, done; SDL_Event event; - + /* Initialize test framework */ state = SDLTest_CommonCreateState(argv, SDL_INIT_VIDEO); if (!state) { diff --git a/test/testsem.c b/test/testsem.c index 9d5d027a3..6f463747a 100644 --- a/test/testsem.c +++ b/test/testsem.c @@ -74,7 +74,7 @@ TestWaitTimeout(void) fprintf(stderr, "Wait took %d milliseconds\n", duration); /* Check to make sure the return value indicates timed out */ - if (retval != SDL_MUTEX_TIMEDOUT) + if (retval != SDL_MUTEX_TIMEDOUT) fprintf(stderr, "SDL_SemWaitTimeout returned: %d; expected: %d\n", retval, SDL_MUTEX_TIMEDOUT); } diff --git a/test/testshader.c b/test/testshader.c index 5d3963652..c555335d2 100644 --- a/test/testshader.c +++ b/test/testshader.c @@ -119,7 +119,7 @@ static ShaderData shaders[NUM_SHADERS] = { "}" }, }; - + static PFNGLATTACHOBJECTARBPROC glAttachObjectARB; static PFNGLCOMPILESHADERARBPROC glCompileShaderARB; static PFNGLCREATEPROGRAMOBJECTARBPROC glCreateProgramObjectARB; @@ -195,7 +195,7 @@ static SDL_bool CompileShaderProgram(ShaderData *data) } } glUseProgramObjectARB(0); - + return (glGetError() == GL_NO_ERROR); } @@ -382,7 +382,7 @@ void DrawGLScene(GLuint texture, GLfloat * texcoord) glLoadIdentity(); // Reset The View glTranslatef(-1.5f,0.0f,0.0f); // Move Left 1.5 Units - + // draw a triangle (in smooth coloring mode) glBegin(GL_POLYGON); // start drawing a polygon glColor3f(1.0f,0.0f,0.0f); // Set The Color To Red @@ -390,8 +390,8 @@ void DrawGLScene(GLuint texture, GLfloat * texcoord) glColor3f(0.0f,1.0f,0.0f); // Set The Color To Green glVertex3f( 1.0f,-1.0f, 0.0f); // Bottom Right glColor3f(0.0f,0.0f,1.0f); // Set The Color To Blue - glVertex3f(-1.0f,-1.0f, 0.0f); // Bottom Left - glEnd(); // we're done with the polygon (smooth color interpolation) + glVertex3f(-1.0f,-1.0f, 0.0f); // Bottom Left + glEnd(); // we're done with the polygon (smooth color interpolation) glTranslatef(3.0f,0.0f,0.0f); // Move Right 3 Units @@ -416,7 +416,7 @@ void DrawGLScene(GLuint texture, GLfloat * texcoord) glTexCoord2f(texcoord[MAXX], texcoord[MAXY]); glVertex3f( 1.0f,-1.0f, 0.0f); // Bottom Right glTexCoord2f(texcoord[MINX], texcoord[MAXY]); - glVertex3f(-1.0f,-1.0f, 0.0f); // Bottom Left + glVertex3f(-1.0f,-1.0f, 0.0f); // Bottom Left glEnd(); // done with the polygon if (shaders_supported) { @@ -428,8 +428,8 @@ void DrawGLScene(GLuint texture, GLfloat * texcoord) SDL_GL_SwapBuffers(); } -int main(int argc, char **argv) -{ +int main(int argc, char **argv) +{ int done; SDL_Surface *surface; GLuint texture; diff --git a/test/testshape.c b/test/testshape.c index 3afb19406..7eb8d9c75 100644 --- a/test/testshape.c +++ b/test/testshape.c @@ -32,10 +32,10 @@ void render(SDL_Renderer *renderer,SDL_Texture *texture,SDL_Rect texture_dimensi //Clear render-target to blue. SDL_SetRenderDrawColor(renderer,0x00,0x00,0xff,0xff); SDL_RenderClear(renderer); - + //Render the texture. SDL_RenderCopy(renderer,texture,&texture_dimensions,&texture_dimensions); - + SDL_RenderPresent(renderer); } @@ -72,12 +72,12 @@ int main(int argc,char** argv) printf("SDL_Shape requires at least one bitmap file as argument.\n"); exit(-1); } - + if(SDL_VideoInit(NULL) == -1) { printf("Could not initialize SDL video.\n"); exit(-2); } - + num_pictures = argc - 1; pictures = (LoadedPicture *)malloc(sizeof(LoadedPicture)*num_pictures); for(i=0;i Date: Sat, 18 May 2013 14:51:29 -0700 Subject: [PATCH 110/542] Fixed black screen on iOS --- src/video/uikit/SDL_uikitwindow.m | 1 - 1 file changed, 1 deletion(-) diff --git a/src/video/uikit/SDL_uikitwindow.m b/src/video/uikit/SDL_uikitwindow.m index 6be691518..b3f7ac9f4 100644 --- a/src/video/uikit/SDL_uikitwindow.m +++ b/src/video/uikit/SDL_uikitwindow.m @@ -91,7 +91,6 @@ static int SetupWindowData(_THIS, SDL_Window *window, UIWindow *uiwindow, SDL_bo /* only one window on iOS, always shown */ window->flags &= ~SDL_WINDOW_HIDDEN; - window->flags |= SDL_WINDOW_SHOWN; /* SDL_WINDOW_BORDERLESS controls whether status bar is hidden. * This is only set if the window is on the main screen. Other screens From 750f6fb9d9556d9c71decfa1df7e3164fda8ca9e Mon Sep 17 00:00:00 2001 From: Andreas Schiffler Date: Sat, 18 May 2013 23:32:53 -0700 Subject: [PATCH 111/542] Deprecate test/automated and test/test-automation (replaced by test/testautomation*.*) --- .../tests/automated/automated_VS2008.vcproj | 263 - .../tests/automated/automated_VS2010.vcxproj | 189 - .../tests/automated/automated_VS2012.vcxproj | 193 - Xcode-iOS/SDL/SDL.xcodeproj/project.pbxproj | 102 - Xcode/SDL/SDL.xcodeproj/project.pbxproj | 102 - debian/copyright | 20 - test/automated/Makefile | 60 - test/automated/README | 59 - test/automated/SDL_at.c | 331 - test/automated/SDL_at.h | 158 - test/automated/audio/audio.c | 89 - test/automated/audio/audio.h | 18 - test/automated/common/common.c | 110 - test/automated/common/common.h | 42 - test/automated/common/images.h | 22 - test/automated/common/img_blit.c | 1454 --- test/automated/common/img_blitblend.c | 2690 ------ test/automated/common/img_face.c | 196 - test/automated/common/img_primitives.c | 463 - test/automated/common/img_primitivesblend.c | 645 -- test/automated/platform/platform.c | 169 - test/automated/platform/platform.h | 18 - test/automated/rect/rect.c | 156 - test/automated/rect/rect.h | 18 - test/automated/render/render.c | 1082 --- test/automated/render/render.h | 18 - test/automated/rwops/TestSupportRWops.h | 14 - test/automated/rwops/TestSupportRWops_Cocoa.m | 89 - .../rwops/TestSupportRWops_Generic.c | 32 - test/automated/rwops/read | 1 - test/automated/rwops/rwops.c | 272 - test/automated/rwops/rwops.h | 18 - test/automated/surface/surface.c | 450 - test/automated/surface/surface.h | 18 - test/automated/testsdl.c | 185 - test/test-automation/AUTHORS | 0 test/test-automation/COPYING | 24 - test/test-automation/ChangeLog | 0 test/test-automation/DoxyFile | 1473 --- test/test-automation/INSTALL | 18 - test/test-automation/Makefile.am | 26 - test/test-automation/NEWS | 0 test/test-automation/README | 12 - test/test-automation/TODO | 11 - test/test-automation/acinclude/libtool.m4 | 7359 --------------- test/test-automation/acinclude/ltoptions.m4 | 368 - test/test-automation/acinclude/ltsugar.m4 | 123 - test/test-automation/acinclude/ltversion.m4 | 23 - test/test-automation/acinclude/lt~obsolete.m4 | 92 - test/test-automation/aclocal.m4 | 991 -- test/test-automation/autogen.sh | 11 - test/test-automation/build-scripts/compile | 143 - .../build-scripts/config.guess | 1502 --- test/test-automation/build-scripts/config.sub | 1714 ---- test/test-automation/build-scripts/depcomp | 630 -- .../build-scripts/distclean.sh | 17 - .../build-scripts/install-runner.sh | 13 - test/test-automation/build-scripts/install-sh | 520 - .../build-scripts/install-tests.sh | 25 - test/test-automation/build-scripts/ltmain.sh | 8406 ----------------- test/test-automation/build-scripts/missing | 376 - test/test-automation/config.h.in | 86 - test/test-automation/configure.ac | 57 - test/test-automation/data/images/icon.bmp | Bin 578 -> 0 bytes test/test-automation/include/SDL_test.h | 123 - test/test-automation/skeleton.xsl | 158 - .../src/libSDLtest/Makefile.am | 23 - .../test-automation/src/libSDLtest/SDL_test.c | 187 - .../src/libSDLtest/common/common.c | 110 - .../src/libSDLtest/common/common.h | 43 - .../src/libSDLtest/common/images.h | 22 - .../src/libSDLtest/common/img_blit.c | 1456 --- .../src/libSDLtest/common/img_blitblend.c | 2691 ------ .../src/libSDLtest/common/img_face.c | 197 - .../src/libSDLtest/common/img_primitives.c | 464 - .../libSDLtest/common/img_primitivesblend.c | 646 -- .../src/libSDLtest/fuzzer/fuzzer.c | 662 -- .../src/libSDLtest/fuzzer/fuzzer.h | 361 - .../src/libSDLtest/fuzzer/utl_crc32.c | 125 - .../src/libSDLtest/fuzzer/utl_crc32.h | 113 - .../src/libSDLtest/fuzzer/utl_md5.c | 314 - .../src/libSDLtest/fuzzer/utl_md5.h | 125 - .../src/libSDLtest/fuzzer/utl_random.c | 63 - .../src/libSDLtest/fuzzer/utl_random.h | 112 - .../src/libSDLtest/logger_helpers.c | 182 - .../src/libSDLtest/logger_helpers.h | 40 - .../src/libSDLtest/plain_logger.c | 225 - .../src/libSDLtest/plain_logger.h | 142 - test/test-automation/src/libSDLtest/xml.c | 376 - test/test-automation/src/libSDLtest/xml.h | 76 - .../src/libSDLtest/xml_logger.c | 674 -- .../src/libSDLtest/xml_logger.h | 140 - test/test-automation/src/runner/Makefile.am | 7 - test/test-automation/src/runner/logger.h | 91 - test/test-automation/src/runner/runner.c | 1506 --- test/test-automation/src/runner/support.c | 75 - test/test-automation/src/runner/support.h | 39 - test/test-automation/style.xsl | 248 - .../tests/testaudio/Makefile.am | 4 - .../tests/testaudio/testaudio.c | 182 - .../tests/testclipboard/Makefile.am | 4 - .../tests/testclipboard/testclipboard.c | 168 - .../tests/testdummy/Makefile.am | 4 - .../tests/testdummy/testdummy.c | 172 - .../tests/testevents/Makefile.am | 4 - .../tests/testevents/testevents.c | 34 - .../tests/testkeyboard/Makefile.am | 4 - .../tests/testkeyboard/testkeyboard.c | 34 - .../tests/testplatform/Makefile.am | 4 - .../tests/testplatform/testplatform.c | 508 - .../tests/testrect/Makefile.am | 4 - .../test-automation/tests/testrect/testrect.c | 1600 ---- .../tests/testrender/Makefile.am | 4 - .../tests/testrender/testrender.c | 925 -- .../tests/testrwops/Makefile.am | 4 - .../tests/testrwops/TestSupportRWops.h | 12 - test/test-automation/tests/testrwops/read | 1 - .../tests/testrwops/testrwops.c | 284 - .../tests/testsurface/Makefile.am | 4 - .../tests/testsurface/testsurface.c | 675 -- .../tests/testsyswm/Makefile.am | 4 - .../tests/testsyswm/testsyswm.c | 34 - .../tests/testvideo/Makefile.am | 4 - .../tests/testvideo/testvideo.c | 34 - 124 files changed, 50293 deletions(-) delete mode 100644 VisualC/tests/automated/automated_VS2008.vcproj delete mode 100644 VisualC/tests/automated/automated_VS2010.vcxproj delete mode 100644 VisualC/tests/automated/automated_VS2012.vcxproj delete mode 100644 test/automated/Makefile delete mode 100644 test/automated/README delete mode 100644 test/automated/SDL_at.c delete mode 100644 test/automated/SDL_at.h delete mode 100644 test/automated/audio/audio.c delete mode 100644 test/automated/audio/audio.h delete mode 100644 test/automated/common/common.c delete mode 100644 test/automated/common/common.h delete mode 100644 test/automated/common/images.h delete mode 100644 test/automated/common/img_blit.c delete mode 100644 test/automated/common/img_blitblend.c delete mode 100644 test/automated/common/img_face.c delete mode 100644 test/automated/common/img_primitives.c delete mode 100644 test/automated/common/img_primitivesblend.c delete mode 100644 test/automated/platform/platform.c delete mode 100644 test/automated/platform/platform.h delete mode 100644 test/automated/rect/rect.c delete mode 100644 test/automated/rect/rect.h delete mode 100644 test/automated/render/render.c delete mode 100644 test/automated/render/render.h delete mode 100644 test/automated/rwops/TestSupportRWops.h delete mode 100644 test/automated/rwops/TestSupportRWops_Cocoa.m delete mode 100644 test/automated/rwops/TestSupportRWops_Generic.c delete mode 100644 test/automated/rwops/read delete mode 100644 test/automated/rwops/rwops.c delete mode 100644 test/automated/rwops/rwops.h delete mode 100644 test/automated/surface/surface.c delete mode 100644 test/automated/surface/surface.h delete mode 100644 test/automated/testsdl.c delete mode 100644 test/test-automation/AUTHORS delete mode 100644 test/test-automation/COPYING delete mode 100644 test/test-automation/ChangeLog delete mode 100644 test/test-automation/DoxyFile delete mode 100644 test/test-automation/INSTALL delete mode 100644 test/test-automation/Makefile.am delete mode 100644 test/test-automation/NEWS delete mode 100644 test/test-automation/README delete mode 100644 test/test-automation/TODO delete mode 100644 test/test-automation/acinclude/libtool.m4 delete mode 100644 test/test-automation/acinclude/ltoptions.m4 delete mode 100644 test/test-automation/acinclude/ltsugar.m4 delete mode 100644 test/test-automation/acinclude/ltversion.m4 delete mode 100644 test/test-automation/acinclude/lt~obsolete.m4 delete mode 100644 test/test-automation/aclocal.m4 delete mode 100755 test/test-automation/autogen.sh delete mode 100755 test/test-automation/build-scripts/compile delete mode 100755 test/test-automation/build-scripts/config.guess delete mode 100755 test/test-automation/build-scripts/config.sub delete mode 100755 test/test-automation/build-scripts/depcomp delete mode 100755 test/test-automation/build-scripts/distclean.sh delete mode 100755 test/test-automation/build-scripts/install-runner.sh delete mode 100755 test/test-automation/build-scripts/install-sh delete mode 100755 test/test-automation/build-scripts/install-tests.sh delete mode 100755 test/test-automation/build-scripts/ltmain.sh delete mode 100755 test/test-automation/build-scripts/missing delete mode 100644 test/test-automation/config.h.in delete mode 100644 test/test-automation/configure.ac delete mode 100644 test/test-automation/data/images/icon.bmp delete mode 100644 test/test-automation/include/SDL_test.h delete mode 100644 test/test-automation/skeleton.xsl delete mode 100644 test/test-automation/src/libSDLtest/Makefile.am delete mode 100644 test/test-automation/src/libSDLtest/SDL_test.c delete mode 100644 test/test-automation/src/libSDLtest/common/common.c delete mode 100644 test/test-automation/src/libSDLtest/common/common.h delete mode 100644 test/test-automation/src/libSDLtest/common/images.h delete mode 100644 test/test-automation/src/libSDLtest/common/img_blit.c delete mode 100644 test/test-automation/src/libSDLtest/common/img_blitblend.c delete mode 100644 test/test-automation/src/libSDLtest/common/img_face.c delete mode 100644 test/test-automation/src/libSDLtest/common/img_primitives.c delete mode 100644 test/test-automation/src/libSDLtest/common/img_primitivesblend.c delete mode 100644 test/test-automation/src/libSDLtest/fuzzer/fuzzer.c delete mode 100644 test/test-automation/src/libSDLtest/fuzzer/fuzzer.h delete mode 100644 test/test-automation/src/libSDLtest/fuzzer/utl_crc32.c delete mode 100644 test/test-automation/src/libSDLtest/fuzzer/utl_crc32.h delete mode 100644 test/test-automation/src/libSDLtest/fuzzer/utl_md5.c delete mode 100644 test/test-automation/src/libSDLtest/fuzzer/utl_md5.h delete mode 100644 test/test-automation/src/libSDLtest/fuzzer/utl_random.c delete mode 100644 test/test-automation/src/libSDLtest/fuzzer/utl_random.h delete mode 100644 test/test-automation/src/libSDLtest/logger_helpers.c delete mode 100644 test/test-automation/src/libSDLtest/logger_helpers.h delete mode 100644 test/test-automation/src/libSDLtest/plain_logger.c delete mode 100644 test/test-automation/src/libSDLtest/plain_logger.h delete mode 100644 test/test-automation/src/libSDLtest/xml.c delete mode 100644 test/test-automation/src/libSDLtest/xml.h delete mode 100644 test/test-automation/src/libSDLtest/xml_logger.c delete mode 100644 test/test-automation/src/libSDLtest/xml_logger.h delete mode 100644 test/test-automation/src/runner/Makefile.am delete mode 100644 test/test-automation/src/runner/logger.h delete mode 100644 test/test-automation/src/runner/runner.c delete mode 100644 test/test-automation/src/runner/support.c delete mode 100644 test/test-automation/src/runner/support.h delete mode 100644 test/test-automation/style.xsl delete mode 100644 test/test-automation/tests/testaudio/Makefile.am delete mode 100644 test/test-automation/tests/testaudio/testaudio.c delete mode 100644 test/test-automation/tests/testclipboard/Makefile.am delete mode 100644 test/test-automation/tests/testclipboard/testclipboard.c delete mode 100644 test/test-automation/tests/testdummy/Makefile.am delete mode 100644 test/test-automation/tests/testdummy/testdummy.c delete mode 100644 test/test-automation/tests/testevents/Makefile.am delete mode 100644 test/test-automation/tests/testevents/testevents.c delete mode 100644 test/test-automation/tests/testkeyboard/Makefile.am delete mode 100644 test/test-automation/tests/testkeyboard/testkeyboard.c delete mode 100644 test/test-automation/tests/testplatform/Makefile.am delete mode 100644 test/test-automation/tests/testplatform/testplatform.c delete mode 100644 test/test-automation/tests/testrect/Makefile.am delete mode 100644 test/test-automation/tests/testrect/testrect.c delete mode 100644 test/test-automation/tests/testrender/Makefile.am delete mode 100644 test/test-automation/tests/testrender/testrender.c delete mode 100644 test/test-automation/tests/testrwops/Makefile.am delete mode 100644 test/test-automation/tests/testrwops/TestSupportRWops.h delete mode 100644 test/test-automation/tests/testrwops/read delete mode 100644 test/test-automation/tests/testrwops/testrwops.c delete mode 100644 test/test-automation/tests/testsurface/Makefile.am delete mode 100644 test/test-automation/tests/testsurface/testsurface.c delete mode 100644 test/test-automation/tests/testsyswm/Makefile.am delete mode 100644 test/test-automation/tests/testsyswm/testsyswm.c delete mode 100644 test/test-automation/tests/testvideo/Makefile.am delete mode 100644 test/test-automation/tests/testvideo/testvideo.c diff --git a/VisualC/tests/automated/automated_VS2008.vcproj b/VisualC/tests/automated/automated_VS2008.vcproj deleted file mode 100644 index 97eb4c71e..000000000 --- a/VisualC/tests/automated/automated_VS2008.vcproj +++ /dev/null @@ -1,263 +0,0 @@ - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - diff --git a/VisualC/tests/automated/automated_VS2010.vcxproj b/VisualC/tests/automated/automated_VS2010.vcxproj deleted file mode 100644 index de7fa16fc..000000000 --- a/VisualC/tests/automated/automated_VS2010.vcxproj +++ /dev/null @@ -1,189 +0,0 @@ - - - - - Debug - Win32 - - - Debug - x64 - - - Release - Win32 - - - Release - x64 - - - - automated - {DDD710DB-EC7B-4CCB-BD75-535D401A2FE0} - automated - Win32Proj - - - - Application - Unicode - true - - - Application - Unicode - true - - - Application - Unicode - - - Application - MultiByte - - - - - - - - - - - - - - - - - - - <_ProjectFileVersion>10.0.30319.1 - $(Platform)\$(Configuration)\ - $(Platform)\$(Configuration)\ - $(Platform)\$(Configuration)\ - $(Platform)\$(Configuration)\ - true - true - $(Platform)\$(Configuration)\ - $(Platform)\$(Configuration)\ - $(Platform)\$(Configuration)\ - $(Platform)\$(Configuration)\ - false - false - - - - Disabled - $(SolutionDir)..\include;%(AdditionalIncludeDirectories) - WIN32;_DEBUG;_WINDOWS;%(PreprocessorDefinitions) - true - EnableFastChecks - MultiThreadedDebugDLL - - - Level3 - EditAndContinue - - - true - Windows - MachineX86 - - - - - Disabled - $(SolutionDir)..\include;%(AdditionalIncludeDirectories) - WIN32;_DEBUG;_WINDOWS;%(PreprocessorDefinitions) - EnableFastChecks - MultiThreadedDebugDLL - - - Level3 - ProgramDatabase - - - true - Windows - - - copy "$(SolutionDir)\SDL\$(Platform)\$(Configuration)\SDL2.d.." "$(TargetDir)\SDL2.d.." - - - Copy SDL - - - - - MaxSpeed - true - $(SolutionDir)..\include;%(AdditionalIncludeDirectories) - WIN32;NDEBUG;_WINDOWS;%(PreprocessorDefinitions) - MultiThreadedDLL - true - - - Level3 - ProgramDatabase - - - true - Windows - true - true - MachineX86 - - - - - MaxSpeed - true - $(SolutionDir)..\include;%(AdditionalIncludeDirectories) - WIN32;NDEBUG;_WINDOWS;%(PreprocessorDefinitions) - MultiThreadedDLL - true - - - Level3 - ProgramDatabase - - - true - Windows - true - true - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - diff --git a/VisualC/tests/automated/automated_VS2012.vcxproj b/VisualC/tests/automated/automated_VS2012.vcxproj deleted file mode 100644 index 5854da931..000000000 --- a/VisualC/tests/automated/automated_VS2012.vcxproj +++ /dev/null @@ -1,193 +0,0 @@ - - - - - Debug - Win32 - - - Debug - x64 - - - Release - Win32 - - - Release - x64 - - - - automated - {DDD710DB-EC7B-4CCB-BD75-535D401A2FE0} - automated - Win32Proj - - - - Application - Unicode - true - v110 - - - Application - Unicode - true - v110 - - - Application - Unicode - v110 - - - Application - MultiByte - v110 - - - - - - - - - - - - - - - - - - - <_ProjectFileVersion>10.0.30319.1 - $(Platform)\$(Configuration)\ - $(Platform)\$(Configuration)\ - $(Platform)\$(Configuration)\ - $(Platform)\$(Configuration)\ - true - true - $(Platform)\$(Configuration)\ - $(Platform)\$(Configuration)\ - $(Platform)\$(Configuration)\ - $(Platform)\$(Configuration)\ - false - false - - - - Disabled - $(SolutionDir)..\include;%(AdditionalIncludeDirectories) - WIN32;_DEBUG;_WINDOWS;%(PreprocessorDefinitions) - true - EnableFastChecks - MultiThreadedDebugDLL - - - Level3 - EditAndContinue - - - true - Windows - MachineX86 - - - - - Disabled - $(SolutionDir)..\include;%(AdditionalIncludeDirectories) - WIN32;_DEBUG;_WINDOWS;%(PreprocessorDefinitions) - EnableFastChecks - MultiThreadedDebugDLL - - - Level3 - ProgramDatabase - - - true - Windows - - - copy "$(SolutionDir)\SDL\$(Platform)\$(Configuration)\SDL.dll" "$(TargetDir)\SDL.dll" - - - Copy SDL - - - - - MaxSpeed - true - $(SolutionDir)..\include;%(AdditionalIncludeDirectories) - WIN32;NDEBUG;_WINDOWS;%(PreprocessorDefinitions) - MultiThreadedDLL - true - - - Level3 - ProgramDatabase - - - true - Windows - true - true - MachineX86 - - - - - MaxSpeed - true - $(SolutionDir)..\include;%(AdditionalIncludeDirectories) - WIN32;NDEBUG;_WINDOWS;%(PreprocessorDefinitions) - MultiThreadedDLL - true - - - Level3 - ProgramDatabase - - - true - Windows - true - true - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - \ No newline at end of file diff --git a/Xcode-iOS/SDL/SDL.xcodeproj/project.pbxproj b/Xcode-iOS/SDL/SDL.xcodeproj/project.pbxproj index a907fb009..0db2b2037 100755 --- a/Xcode-iOS/SDL/SDL.xcodeproj/project.pbxproj +++ b/Xcode-iOS/SDL/SDL.xcodeproj/project.pbxproj @@ -280,7 +280,6 @@ 006E983B119550FB001DE610 /* img_primitivesblend.c */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.c; path = img_primitivesblend.c; sourceTree = ""; }; 006E983D119550FB001DE610 /* platform.c */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.c; path = platform.c; sourceTree = ""; }; 006E983E119550FB001DE610 /* platform.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = platform.h; sourceTree = ""; }; - 006E983F119550FB001DE610 /* README */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = text; name = README; path = ../../test/automated/README; sourceTree = SOURCE_ROOT; }; 006E9841119550FB001DE610 /* rect.c */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.c; path = rect.c; sourceTree = ""; }; 006E9842119550FB001DE610 /* rect.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = rect.h; sourceTree = ""; }; 006E9844119550FB001DE610 /* render.c */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.c; path = render.c; sourceTree = ""; }; @@ -288,11 +287,8 @@ 006E9847119550FB001DE610 /* read */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = text; path = read; sourceTree = ""; }; 006E9848119550FB001DE610 /* rwops.c */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.c; path = rwops.c; sourceTree = ""; }; 006E9849119550FB001DE610 /* rwops.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = rwops.h; sourceTree = ""; }; - 006E984C119550FB001DE610 /* SDL_at.c */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.c; name = SDL_at.c; path = ../../test/automated/SDL_at.c; sourceTree = SOURCE_ROOT; }; - 006E984D119550FB001DE610 /* SDL_at.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; name = SDL_at.h; path = ../../test/automated/SDL_at.h; sourceTree = SOURCE_ROOT; }; 006E984F119550FB001DE610 /* surface.c */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.c; path = surface.c; sourceTree = ""; }; 006E9850119550FB001DE610 /* surface.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = surface.h; sourceTree = ""; }; - 006E9851119550FB001DE610 /* testsdl.c */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.c; name = testsdl.c; path = ../../test/automated/testsdl.c; sourceTree = SOURCE_ROOT; }; 006E98631195513D001DE610 /* icon.bmp */ = {isa = PBXFileReference; lastKnownFileType = image.bmp; name = icon.bmp; path = ../../test/icon.bmp; sourceTree = SOURCE_ROOT; }; 006E98641195513D001DE610 /* moose.dat */ = {isa = PBXFileReference; lastKnownFileType = file; name = moose.dat; path = ../../test/moose.dat; sourceTree = SOURCE_ROOT; }; 006E98651195513D001DE610 /* picture.xbm */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = text; name = picture.xbm; path = ../../test/picture.xbm; sourceTree = SOURCE_ROOT; }; @@ -541,24 +537,6 @@ /* End PBXFrameworksBuildPhase section */ /* Begin PBXGroup section */ - 006E982E119550D8001DE610 /* AutomatedTests */ = { - isa = PBXGroup; - children = ( - 006E9830119550FB001DE610 /* audio */, - 006E9833119550FB001DE610 /* common */, - 006E983C119550FB001DE610 /* platform */, - 006E983F119550FB001DE610 /* README */, - 006E9840119550FB001DE610 /* rect */, - 006E9843119550FB001DE610 /* render */, - 006E9846119550FB001DE610 /* rwops */, - 006E984C119550FB001DE610 /* SDL_at.c */, - 006E984D119550FB001DE610 /* SDL_at.h */, - 006E984E119550FB001DE610 /* surface */, - 006E9851119550FB001DE610 /* testsdl.c */, - ); - name = AutomatedTests; - sourceTree = ""; - }; 006E982F119550E4001DE610 /* TestResources */ = { isa = PBXGroup; children = ( @@ -572,85 +550,6 @@ name = TestResources; sourceTree = ""; }; - 006E9830119550FB001DE610 /* audio */ = { - isa = PBXGroup; - children = ( - 006E9831119550FB001DE610 /* audio.c */, - 006E9832119550FB001DE610 /* audio.h */, - ); - name = audio; - path = ../../test/automated/audio; - sourceTree = SOURCE_ROOT; - }; - 006E9833119550FB001DE610 /* common */ = { - isa = PBXGroup; - children = ( - 006E9834119550FB001DE610 /* common.c */, - 006E9835119550FB001DE610 /* common.h */, - 006E9836119550FB001DE610 /* images.h */, - 006E9837119550FB001DE610 /* img_blit.c */, - 006E9838119550FB001DE610 /* img_blitblend.c */, - 006E9839119550FB001DE610 /* img_face.c */, - 006E983A119550FB001DE610 /* img_primitives.c */, - 006E983B119550FB001DE610 /* img_primitivesblend.c */, - ); - name = common; - path = ../../test/automated/common; - sourceTree = SOURCE_ROOT; - }; - 006E983C119550FB001DE610 /* platform */ = { - isa = PBXGroup; - children = ( - 006E983D119550FB001DE610 /* platform.c */, - 006E983E119550FB001DE610 /* platform.h */, - ); - name = platform; - path = ../../test/automated/platform; - sourceTree = SOURCE_ROOT; - }; - 006E9840119550FB001DE610 /* rect */ = { - isa = PBXGroup; - children = ( - 006E9841119550FB001DE610 /* rect.c */, - 006E9842119550FB001DE610 /* rect.h */, - ); - name = rect; - path = ../../test/automated/rect; - sourceTree = SOURCE_ROOT; - }; - 006E9843119550FB001DE610 /* render */ = { - isa = PBXGroup; - children = ( - 006E9844119550FB001DE610 /* render.c */, - 006E9845119550FB001DE610 /* render.h */, - ); - name = render; - path = ../../test/automated/render; - sourceTree = SOURCE_ROOT; - }; - 006E9846119550FB001DE610 /* rwops */ = { - isa = PBXGroup; - children = ( - 001E39A51196EE6F00A3F5B8 /* TestSupportRWops_Cocoa.m */, - 001E39A61196EE6F00A3F5B8 /* TestSupportRWops.h */, - 006E9847119550FB001DE610 /* read */, - 006E9848119550FB001DE610 /* rwops.c */, - 006E9849119550FB001DE610 /* rwops.h */, - ); - name = rwops; - path = ../../test/automated/rwops; - sourceTree = SOURCE_ROOT; - }; - 006E984E119550FB001DE610 /* surface */ = { - isa = PBXGroup; - children = ( - 006E984F119550FB001DE610 /* surface.c */, - 006E9850119550FB001DE610 /* surface.h */, - ); - name = surface; - path = ../../test/automated/surface; - sourceTree = SOURCE_ROOT; - }; 006E9885119552DD001DE610 /* cocoa */ = { isa = PBXGroup; children = ( @@ -768,7 +667,6 @@ children = ( FD99B8BC0DD52E5C00FB1D6B /* Public Headers */, FD99B8BD0DD52E6D00FB1D6B /* Library Source */, - 006E982E119550D8001DE610 /* AutomatedTests */, 006E982F119550E4001DE610 /* TestResources */, 29B97323FDCFA39411CA2CEA /* Frameworks */, 19C28FACFE9D520D11CA2CBB /* Products */, diff --git a/Xcode/SDL/SDL.xcodeproj/project.pbxproj b/Xcode/SDL/SDL.xcodeproj/project.pbxproj index 370e4de6d..7cfd9ddb7 100755 --- a/Xcode/SDL/SDL.xcodeproj/project.pbxproj +++ b/Xcode/SDL/SDL.xcodeproj/project.pbxproj @@ -635,7 +635,6 @@ 00D8DA061195093100638393 /* img_primitivesblend.c */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.c; path = img_primitivesblend.c; sourceTree = ""; }; 00D8DA081195093100638393 /* platform.c */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.c; path = platform.c; sourceTree = ""; }; 00D8DA091195093100638393 /* platform.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = platform.h; sourceTree = ""; }; - 00D8DA0A1195093100638393 /* README */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = text; name = README; path = ../../test/automated/README; sourceTree = SOURCE_ROOT; }; 00D8DA0C1195093100638393 /* rect.c */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.c; path = rect.c; sourceTree = ""; }; 00D8DA0D1195093100638393 /* rect.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = rect.h; sourceTree = ""; }; 00D8DA0F1195093100638393 /* render.c */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.c; path = render.c; sourceTree = ""; }; @@ -643,11 +642,8 @@ 00D8DA121195093100638393 /* read */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = text; path = read; sourceTree = ""; }; 00D8DA131195093100638393 /* rwops.c */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.c; path = rwops.c; sourceTree = ""; }; 00D8DA141195093100638393 /* rwops.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = rwops.h; sourceTree = ""; }; - 00D8DA151195093100638393 /* SDL_at.c */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.c; name = SDL_at.c; path = ../../test/automated/SDL_at.c; sourceTree = SOURCE_ROOT; }; - 00D8DA161195093100638393 /* SDL_at.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; name = SDL_at.h; path = ../../test/automated/SDL_at.h; sourceTree = SOURCE_ROOT; }; 00D8DA181195093100638393 /* surface.c */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.c; path = surface.c; sourceTree = ""; }; 00D8DA191195093100638393 /* surface.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = surface.h; sourceTree = ""; }; - 00D8DA1A1195093100638393 /* testsdl.c */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.c; name = testsdl.c; path = ../../test/automated/testsdl.c; sourceTree = SOURCE_ROOT; }; 00F5D79E0990CA0D0051C449 /* UniversalBinaryNotes.rtf */ = {isa = PBXFileReference; lastKnownFileType = text.rtf; path = UniversalBinaryNotes.rtf; sourceTree = ""; }; 04043BBA12FEB1BE0076DB1F /* SDL_glfuncs.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = SDL_glfuncs.h; sourceTree = ""; }; 041B2C9E12FA0D680087D585 /* SDL_render.c */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.c; path = SDL_render.c; sourceTree = ""; }; @@ -968,103 +964,6 @@ name = TestResources; sourceTree = ""; }; - 00D8D9FA1195091500638393 /* AutomatedTests */ = { - isa = PBXGroup; - children = ( - 00D8D9FB1195093100638393 /* audio */, - 00D8D9FE1195093100638393 /* common */, - 00D8DA071195093100638393 /* platform */, - 00D8DA0A1195093100638393 /* README */, - 00D8DA0B1195093100638393 /* rect */, - 00D8DA0E1195093100638393 /* render */, - 00D8DA111195093100638393 /* rwops */, - 00D8DA151195093100638393 /* SDL_at.c */, - 00D8DA161195093100638393 /* SDL_at.h */, - 00D8DA171195093100638393 /* surface */, - 00D8DA1A1195093100638393 /* testsdl.c */, - ); - name = AutomatedTests; - sourceTree = ""; - }; - 00D8D9FB1195093100638393 /* audio */ = { - isa = PBXGroup; - children = ( - 00D8D9FC1195093100638393 /* audio.c */, - 00D8D9FD1195093100638393 /* audio.h */, - ); - name = audio; - path = ../../test/automated/audio; - sourceTree = SOURCE_ROOT; - }; - 00D8D9FE1195093100638393 /* common */ = { - isa = PBXGroup; - children = ( - 00D8D9FF1195093100638393 /* common.c */, - 00D8DA001195093100638393 /* common.h */, - 00D8DA011195093100638393 /* images.h */, - 00D8DA021195093100638393 /* img_blit.c */, - 00D8DA031195093100638393 /* img_blitblend.c */, - 00D8DA041195093100638393 /* img_face.c */, - 00D8DA051195093100638393 /* img_primitives.c */, - 00D8DA061195093100638393 /* img_primitivesblend.c */, - ); - name = common; - path = ../../test/automated/common; - sourceTree = SOURCE_ROOT; - }; - 00D8DA071195093100638393 /* platform */ = { - isa = PBXGroup; - children = ( - 00D8DA081195093100638393 /* platform.c */, - 00D8DA091195093100638393 /* platform.h */, - ); - name = platform; - path = ../../test/automated/platform; - sourceTree = SOURCE_ROOT; - }; - 00D8DA0B1195093100638393 /* rect */ = { - isa = PBXGroup; - children = ( - 00D8DA0C1195093100638393 /* rect.c */, - 00D8DA0D1195093100638393 /* rect.h */, - ); - name = rect; - path = ../../test/automated/rect; - sourceTree = SOURCE_ROOT; - }; - 00D8DA0E1195093100638393 /* render */ = { - isa = PBXGroup; - children = ( - 00D8DA0F1195093100638393 /* render.c */, - 00D8DA101195093100638393 /* render.h */, - ); - name = render; - path = ../../test/automated/render; - sourceTree = SOURCE_ROOT; - }; - 00D8DA111195093100638393 /* rwops */ = { - isa = PBXGroup; - children = ( - 001E39EC1196F75000A3F5B8 /* TestSupportRWops_Cocoa.m */, - 001E39ED1196F75000A3F5B8 /* TestSupportRWops.h */, - 00D8DA121195093100638393 /* read */, - 00D8DA131195093100638393 /* rwops.c */, - 00D8DA141195093100638393 /* rwops.h */, - ); - name = rwops; - path = ../../test/automated/rwops; - sourceTree = SOURCE_ROOT; - }; - 00D8DA171195093100638393 /* surface */ = { - isa = PBXGroup; - children = ( - 00D8DA181195093100638393 /* surface.c */, - 00D8DA191195093100638393 /* surface.h */, - ); - name = surface; - path = ../../test/automated/surface; - sourceTree = SOURCE_ROOT; - }; 0153844A006D81B07F000001 /* Public Headers */ = { isa = PBXGroup; children = ( @@ -1565,7 +1464,6 @@ F59C70FC00D5CB5801000001 /* pkg-support */, 0153844A006D81B07F000001 /* Public Headers */, 08FB77ACFE841707C02AAC07 /* Library Source */, - 00D8D9FA1195091500638393 /* AutomatedTests */, 006E949B11951160001DE610 /* TestResources */, 034768DDFF38A45A11DB9C8B /* Products */, BECDF66B0761BA81005FE872 /* Info-Framework.plist */, diff --git a/debian/copyright b/debian/copyright index 09e14f7f5..a53d19be0 100644 --- a/debian/copyright +++ b/debian/copyright @@ -49,22 +49,6 @@ Files: src/video/x11/imKStoUCS.c Copyright: 1994-2003 The XFree86 Project, Inc. License: MIT/X11 -Files: test/test-automation/* -Copyright: 2011 Markus Kauppila -License: zlib/libpng - -Files: test/automated/* - test/test-automation/src/libSDLtest/common/* -Copyright: Edgar Simo "bobbens" -License: PublicDomain_Edgar_Simo - -Files: test/automated/common/im* -Copyright: none -License: zlib/libpng -Comment: - Auto-generated code from images, no specific information about the original - image - Files: test/testhaptic.c Copyright: 1997-2011 Sam Lantinga 2008 Edgar Simo Serra @@ -75,10 +59,6 @@ Copyright: 1997-2011 Sam Lantinga 2011 Edgar Simo Serra License: BSD_3_clause -Files: test/test-automation/src/libSDLtest/fuzzer/utl_md5.* -Copyright: 1990-1991 RSA Data Security, Inc. -License: RSA_Data_Security - Files: test/shapes/* Copyright: none License: zlib/libpng diff --git a/test/automated/Makefile b/test/automated/Makefile deleted file mode 100644 index ff18eea40..000000000 --- a/test/automated/Makefile +++ /dev/null @@ -1,60 +0,0 @@ - - -CFLAGS := -W -Wall -Wextra -g `sdl2-config --prefix=/usr/local --cflags` -DSDL_NO_COMPAT -LDFLAGS := `sdl2-config --prefix=/usr/local --libs` - -# If it doesn't pick up defaults -#CFLAGS := -D_GNU_SOURCE=1 -D_REENTRANT -I/usr/local/include/SDL2 -#LDFLAGS := -lm -ldl -lesd -lpthread - -SRC := testsdl.c \ - platform/platform.c \ - rect/rect.c \ - surface/surface.c \ - render/render.c \ - audio/audio.c -COMMON_SRC := SDL_at.c common/common.c -COMMON_INCLUDE := SDL_at.h - -RWOPS_SRC := rwops/rwops.c rwops/TestSupportRWops_Generic.c - -TESTS_ALL := testsdl \ - platform/platform \ - rwops/rwops \ - rect/rect \ - surface/surface \ - render/render \ - audio/audio - - -.PHONY: all clean test - - -all: $(TESTS_ALL) - -test: all - @./testsdl - -testsdl: $(SRC) $(RWOPS_SRC) $(COMMON_SRC) - $(CC) $(CFLAGS) -o $@ $(SRC) $(RWOPS_SRC) $(COMMON_SRC) $(LDFLAGS) - -platform/platform: platform/platform.c $(COMMON_INCLUDE) $(COMMON_SRC) - $(CC) $(CFLAGS) -o $@ platform/platform.c $(COMMON_SRC) -DTEST_STANDALONE $(LDFLAGS) - -rwops/rwops: $(RWOPS_SRC) $(COMMON_INCLUDE) $(COMMON_SRC) - $(CC) $(CFLAGS) -o $@ $(RWOPS_SRC) $(COMMON_SRC) -DTEST_STANDALONE $(LDFLAGS) - -rect/rect: rect/rect.c $(COMMON_INCLUDE) $(COMMON_SRC) - $(CC) $(CFLAGS) -o $@ rect/rect.c $(COMMON_SRC) -DTEST_STANDALONE $(LDFLAGS) - -surface/surface: surface/surface.c $(COMMON_INCLUDE) $(COMMON_SRC) - $(CC) $(CFLAGS) -o $@ surface/surface.c $(COMMON_SRC) -DTEST_STANDALONE $(LDFLAGS) - -render/render: render/render.c $(COMMON_INCLUDE) $(COMMON_SRC) - $(CC) $(CFLAGS) -o $@ render/render.c $(COMMON_SRC) -DTEST_STANDALONE $(LDFLAGS) - -audio/audio: audio/audio.c $(COMMON_INCLUDE) $(COMMON_SRC) - $(CC) $(CFLAGS) -o $@ audio/audio.c $(COMMON_SRC) -DTEST_STANDALONE $(LDFLAGS) - -clean: - $(RM) $(TESTS_ALL) diff --git a/test/automated/README b/test/automated/README deleted file mode 100644 index e6984a12b..000000000 --- a/test/automated/README +++ /dev/null @@ -1,59 +0,0 @@ - - - SDL Automated Testing Framework User Documentation - by Edgar Simo Serra - - - - Abstract - - The SDL Automated Testing Framework, hereby after called SDL_AT, is a meant -to test the SDL code for regressions and other possible failures. It can also -be used to display what your SDL set up supports. - - - - Basics - - The main way to use the framework is to compile it and run it, that can be -done with the following command: - - $> make test - - It should then display something like: - - Platform : All tests successful (2) - SDL_RWops : All tests successful (5) - SDL_Surface : All tests successful (6) - Rendering with x11 driver : All tests successful (4) - - Indicating that all tests were successful. If however a test fails output it -will report the failure to stderr indicating where and why it happened. This -output can then be sent to the developers so they can attempt to fix the -problem. - - - - Advanced - - By passing the "-h" or "--help" parameter to testsdl you can get an overview -of all the possible options you can set to furthur tweak the testing. A sample -of the options would be the following: - - Usage: ./testsdl [OPTIONS] - Options are: - -m, --manual enables tests that require user interaction - --noplatform do not run the platform tests - --norwops do not run the rwops tests - --nosurface do not run the surface tests - --norender do not run the render tests - -v, --verbose increases verbosity level by 1 for each -v - -q, --quiet only displays errors - -h, --help display this message and exit - - - - Developers - - See SDL_at.h for developer information. - diff --git a/test/automated/SDL_at.c b/test/automated/SDL_at.c deleted file mode 100644 index 97cd92d51..000000000 --- a/test/automated/SDL_at.c +++ /dev/null @@ -1,331 +0,0 @@ -/* - * Common code for automated test suite. - * - * Written by Edgar Simo "bobbens" - * - * Released under Public Domain. - */ - - -#include "SDL_at.h" -#include "SDL_stdinc.h" -#include "SDL_error.h" - -#include /* printf/fprintf */ -#include /* va_list */ - - -/* - * Internal usage SDL_AT variables. - */ -static char *at_suite_msg = NULL; /**< Testsuite message. */ -static char *at_test_msg = NULL; /**< Testcase message. */ -static int at_success = 0; /**< Number of successful testcases. */ -static int at_failure = 0; /**< Number of failed testcases. */ - - -/* - * Global properties. - */ -static int at_verbose = 0; /**< Verbosity. */ -static int at_quiet = 0; /**< Quietness. */ - - -/* - * Prototypes. - */ -static void SDL_ATcleanup (void); -static void SDL_ATendWith( int success ); -static void SDL_ATassertFailed( const char *msg ); - - -/** - * @brief Cleans up the automated testsuite state. - */ -static void SDL_ATcleanup (void) -{ - if (at_suite_msg != NULL) - SDL_free(at_suite_msg); - at_suite_msg = NULL; - if (at_test_msg != NULL) - SDL_free(at_test_msg); - at_test_msg = NULL; - at_success = 0; - at_failure = 0; -} - - -/** - * @brief Begin testsuite. - */ -void SDL_ATinit( const char *suite ) -{ - /* Do not open twice. */ - if (at_suite_msg) { - SDL_ATprintErr( "AT suite '%s' not closed before opening suite '%s'\n", - at_suite_msg, suite ); - } - /* Must have a name. */ - if (suite == NULL) { - SDL_ATprintErr( "AT testsuite does not have a name.\n"); - } - SDL_ATcleanup(); - at_suite_msg = SDL_strdup(suite); - - /* Verbose message. */ - SDL_ATprintVerbose( 2, "--+---> Started Test Suite '%s'\n", at_suite_msg ); -} - - -/** - * @brief Finish testsuite. - */ -int SDL_ATfinish (void) -{ - int failed; - - /* Make sure initialized. */ - if (at_suite_msg == NULL) { - SDL_ATprintErr("Ended testcase without initializing.\n"); - return 1; - } - - /* Finished without closing testcase. */ - if (at_test_msg) { - SDL_ATprintErr( "AT suite '%s' finished without closing testcase '%s'\n", - at_suite_msg, at_test_msg ); - } - - /* Verbose message. */ - SDL_ATprintVerbose( 2, "<-+---- Finished Test Suite '%s'\n", at_suite_msg ); - - /* Display message if verbose on failed. */ - failed = at_failure; - if (at_failure > 0) { - SDL_ATprintErr( "%s : Failed %d out of %d testcases!\n", - at_suite_msg, at_failure, at_failure+at_success ); - } - else { - SDL_ATprint( "%s : All tests successful (%d)\n", - at_suite_msg, at_success ); - } - - /* Clean up. */ - SDL_ATcleanup(); - - /* Return failed. */ - return failed; -} - - -/** - * @brief Sets a property. - */ -void SDL_ATseti( int property, int value ) -{ - switch (property) { - case SDL_AT_VERBOSE: - at_verbose = value; - break; - - case SDL_AT_QUIET: - at_quiet = value; - break; - } -} - - -/** - * @brief Gets a property. - */ -void SDL_ATgeti( int property, int *value ) -{ - switch (property) { - case SDL_AT_VERBOSE: - *value = at_verbose; - break; - - case SDL_AT_QUIET: - *value = at_quiet; - break; - } -} - - -/** - * @brief Begin testcase. - */ -void SDL_ATbegin( const char *testcase ) -{ - /* Do not open twice. */ - if (at_test_msg) { - SDL_ATprintErr( "AT testcase '%s' not closed before opening testcase '%s'\n", - at_test_msg, testcase ); - } - /* Must have a name. */ - if (testcase == NULL) { - SDL_ATprintErr( "AT testcase does not have a name.\n"); - } - at_test_msg = SDL_strdup(testcase); - - /* Verbose message. */ - SDL_ATprintVerbose( 2, " +---> StartedTest Case '%s'\n", testcase ); -} - - -/** - * @brief Ends the testcase with a succes or failure. - */ -static void SDL_ATendWith( int success ) -{ - /* Make sure initialized. */ - if (at_test_msg == NULL) { - SDL_ATprintErr("Ended testcase without initializing.\n"); - return; - } - - /* Mark as success or failure. */ - if (success) - at_success++; - else - at_failure++; - - /* Verbose message. */ - SDL_ATprintVerbose( 2, " +---- Finished Test Case '%s'\n", at_test_msg ); - - /* Clean up. */ - if (at_test_msg != NULL) - SDL_free(at_test_msg); - at_test_msg = NULL; -} - - -/** - * @brief Display failed assert message. - */ -static void SDL_ATassertFailed( const char *msg ) -{ - /* Print. */ - SDL_ATprintErr( "Assert Failed!\n" ); - SDL_ATprintErr( " %s\n", msg ); - SDL_ATprintErr( " Test Case '%s'\n", at_test_msg ); - SDL_ATprintErr( " Test Suite '%s'\n", at_suite_msg ); - SDL_ATprintErr( " Last SDL error '%s'\n", SDL_GetError() ); - /* End. */ - SDL_ATendWith(0); -} - - -/** - * @brief Testcase test. - */ -int SDL_ATassert( const char *msg, int condition ) -{ - /* Condition failed. */ - if (!condition) { - /* Failed message. */ - SDL_ATassertFailed(msg); - } - return !condition; -} - - -/** - * @brief Testcase test. - */ -int SDL_ATvassert( int condition, const char *msg, ... ) -{ - va_list args; - char buf[256]; - - /* Condition failed. */ - if (!condition) { - /* Get message. */ - va_start( args, msg ); - SDL_vsnprintf( buf, sizeof(buf), msg, args ); - va_end( args ); - /* Failed message. */ - SDL_ATassertFailed( buf ); - } - return !condition; -} - - -/** - * @brief End testcase. - */ -void SDL_ATend (void) -{ - SDL_ATendWith(1); -} - - -/** - * @brief Displays an error. - */ -int SDL_ATprintErr( const char *msg, ... ) -{ - va_list ap; - int ret; - - /* Make sure there is something to print. */ - if (msg == NULL) - return 0; - else { - va_start(ap, msg); - ret = vfprintf( stderr, msg, ap ); - va_end(ap); - } - - return ret; -} - - -/** - * @brief Displays a message. - */ -int SDL_ATprint( const char *msg, ... ) -{ - va_list ap; - int ret; - - /* Only print if not quiet. */ - if (at_quiet) - return 0; - - /* Make sure there is something to print. */ - if (msg == NULL) - return 0; - else { - va_start(ap, msg); - ret = vfprintf( stdout, msg, ap ); - va_end(ap); - } - - return ret; -} - - -/** - * @brief Displays a verbose message. - */ -int SDL_ATprintVerbose( int level, const char *msg, ... ) -{ - va_list ap; - int ret; - - /* Only print if not quiet. */ - if (at_quiet || (at_verbose < level)) - return 0; - - /* Make sure there is something to print. */ - if (msg == NULL) - return 0; - else { - va_start(ap, msg); - ret = vfprintf( stdout, msg, ap ); - va_end(ap); - } - - return ret; -} diff --git a/test/automated/SDL_at.h b/test/automated/SDL_at.h deleted file mode 100644 index 6bd9680bd..000000000 --- a/test/automated/SDL_at.h +++ /dev/null @@ -1,158 +0,0 @@ -/* - * Common code for automated test suite. - * - * Written by Edgar Simo "bobbens" - * - * Released under Public Domain. - */ - - -/** - * @file SDL_at.h - * - * @brief Handles automatic testing functionality. - * - * The basic approach with SDL_AT is to divide the tests into what are called - * test suites and test cases. Each test suite should have multiple test - * cases, each test case can have multiple asserts. - * - * To actually test for conditions within the testcase you check asserts, if - * the asserts fail the failures will be logged in the testsuite and - * displayed. - * - * Syntax is similar to OpenGL. An example would be: - * - * @code - * int f; // Number failed - * SDL_ATinit( "My testsuite" ); - * - * SDL_ATbegin( "My first testcase" ); - * if (!SDL_ATassert( (1+1)==2, "Trying '1+1=2'.")) - * return; // Implicitly calls SDL_ATend if assert fails - * SDL_ATend(); // Finish testcase - * - * SDL_ATbegin( "My second testcase" ); - * if (!SDL_ATassert( (4/2)==2, "Trying '4/2=2'.")) - * return; // Implicitly calls SDL_ATend if assert fails - * SDL_ATend(); // Finish testcase - * - * f = SDL_ATfinish(); - * @endcode - * - * @author Edgar Simo "bobbens" - */ - - -#ifndef _SDL_AT_H -# define _SDL_AT_H - - - -enum { - SDL_AT_VERBOSE, /**< Sets the verbose level. */ - SDL_AT_QUIET /**< Sets quietness. */ -}; - - -/* - * Suite level actions. - */ -/** - * @brief Starts the testsuite. - * - * @param suite Name of the suite to start testing. - */ -void SDL_ATinit( const char *suite ); -/** - * @brief Finishes the testsuite printing out global results if verbose. - * - * @return 0 if no errors occurred, otherwise number of failures. - */ -int SDL_ATfinish (void); -/** - * @brief Sets a global property value. - * - * @param property Property to set. - * @param value Value to set property to. - */ -void SDL_ATseti( int property, int value ); -/** - * @brief Gets a global property value. - * - * @param property Property to get. - * @param[out] value Value of the property. - */ -void SDL_ATgeti( int property, int *value ); - - -/* - * Testcase level actions. - */ -/** - * @brief Begins a testcase. - * - * @param testcase Name of the testcase to begin. - */ -void SDL_ATbegin( const char *testcase ); -/** - * @brief Checks a condition in the testcase. - * - * Will automatically call SDL_ATend if the condition isn't met. - * - * @param condition Condition to make sure is true. - * @param msg Message to display for failure. - * @return Returns 1 if the condition isn't met. - */ -int SDL_ATassert( const char *msg, int condition ); -/** - * @brief Checks a condition in the testcase. - * - * Will automatically call SDL_ATend if the condition isn't met. - * - * @param condition Condition to make sure is true. - * @param msg Message to display for failure with printf style formatting. - * @return Returns 1 if the condition isn't met. - */ -int SDL_ATvassert( int condition, const char *msg, ... ); -/** - * @brief Ends a testcase. - */ -void SDL_ATend (void); - - -/* - * Misc functions. - */ -/** - * @brief Prints an error. - * - * @param msg printf formatted string to display. - * @return Number of character printed. - */ -int SDL_ATprintErr( const char *msg, ... ); -/** - * @brief Prints some text. - * - * @param msg printf formatted string to display. - * @return Number of character printed. - */ -int SDL_ATprint( const char *msg, ... ); -/** - * @brief Prints some verbose text. - * - * Verbosity levels are as follows: - * - * - 0 standard stdout, enabled by default - * - 1 additional information - * - 2 detailed information (spammy) - * - * @param level Level of verbosity to print at. - * @param msg printf formatted string to display. - * @return Number of character printed. - */ -int SDL_ATprintVerbose( int level, const char *msg, ... ); - - -#endif /* _SDL_AT_H */ - - diff --git a/test/automated/audio/audio.c b/test/automated/audio/audio.c deleted file mode 100644 index 0712c396d..000000000 --- a/test/automated/audio/audio.c +++ /dev/null @@ -1,89 +0,0 @@ -/** - * Automated SDL_RWops test. - * - * Written by Edgar Simo "bobbens" - * - * Released under Public Domain. - */ - - -#include "SDL.h" -#include "../SDL_at.h" - - -/** - * @brief Prints available devices. - */ -static int audio_printDevices( int iscapture ) -{ - int i, n; - - /* Get number of devices. */ - n = SDL_GetNumAudioDevices(iscapture); - SDL_ATprintVerbose( 1, "%d %s Audio Devices\n", - n, iscapture ? "Capture" : "Output" ); - - /* List devices. */ - for (i=0; iw != img->width) || (sur->h != img->height)) - return -1; - - SDL_LockSurface( sur ); - - ret = 0; - bpp = sur->format->BytesPerPixel; - - /* Compare image - should be same format. */ - for (j=0; jh; j++) { - for (i=0; iw; i++) { - p = (Uint8 *)sur->pixels + j * sur->pitch + i * bpp; - pd = (Uint8 *)img->pixel_data + (j*img->width + i) * img->bytes_per_pixel; - switch (bpp) { - case 1: - case 2: - case 3: - ret += 1; - /*printf("%d BPP not supported yet.\n",bpp);*/ - break; - - case 4: - { - int dist = 0; - Uint8 R, G, B, A; - - SDL_GetRGBA(*(Uint32*)p, sur->format, &R, &G, &B, &A); - - if (img->bytes_per_pixel == 3) { - dist += (R-pd[0])*(R-pd[0]); - dist += (G-pd[1])*(G-pd[1]); - dist += (B-pd[2])*(B-pd[2]); - } else { - dist += (R-pd[0])*(R-pd[0]); - dist += (G-pd[1])*(G-pd[1]); - dist += (B-pd[2])*(B-pd[2]); - dist += (A-pd[3])*(A-pd[3]); - } - /* Allow some difference in blending accuracy */ - if (dist > allowable_error) { - /*printf("pixel %d,%d varies by %d\n", i, j, dist);*/ - ++ret; - } - } - break; - } - } - } - - SDL_UnlockSurface( sur ); - - if (ret) { - SDL_SaveBMP(sur, "fail.bmp"); - - SDL_LockSurface( sur ); - - bpp = sur->format->BytesPerPixel; - - if (bpp == 4) { - for (j=0; jh; j++) { - for (i=0; iw; i++) { - Uint8 R, G, B, A; - p = (Uint8 *)sur->pixels + j * sur->pitch + i * bpp; - pd = (Uint8 *)img->pixel_data + (j*img->width + i) * img->bytes_per_pixel; - - R = pd[0]; - G = pd[1]; - B = pd[2]; - if (img->bytes_per_pixel == 4) { - A = pd[3]; - } else { - A = 0; - } - *(Uint32*)p = (A << 24) | (R << 16) | (G << 8) | B; - } - } - } - - SDL_UnlockSurface( sur ); - - SDL_SaveBMP(sur, "good.bmp"); - } - return ret; -} diff --git a/test/automated/common/common.h b/test/automated/common/common.h deleted file mode 100644 index 299f8197e..000000000 --- a/test/automated/common/common.h +++ /dev/null @@ -1,42 +0,0 @@ -/** - * Automated SDL test common framework. - * - * Written by Edgar Simo "bobbens" - * - * Released under Public Domain. - */ - - -#ifndef COMMON_H -# define COMMON_H - - -# define FORMAT SDL_PIXELFORMAT_ARGB8888 -# define AMASK 0xff000000 /**< Alpha bit mask. */ -# define RMASK 0x00ff0000 /**< Red bit mask. */ -# define GMASK 0x0000ff00 /**< Green bit mask. */ -# define BMASK 0x000000ff /**< Blue bit mask. */ - - -typedef struct SurfaceImage_s { - int width; - int height; - unsigned int bytes_per_pixel; /* 3:RGB, 4:RGBA */ - const char *pixel_data; -} SurfaceImage_t; - -#define ALLOWABLE_ERROR_OPAQUE 0 -#define ALLOWABLE_ERROR_BLENDED 64 - -/** - * @brief Compares a surface and a surface image for equality. - * - * @param sur Surface to compare. - * @param img Image to compare against. - * @return 0 if they are the same, -1 on error and positive if different. - */ -int surface_compare( SDL_Surface *sur, const SurfaceImage_t *img, int allowable_error ); - - -#endif /* COMMON_H */ - diff --git a/test/automated/common/images.h b/test/automated/common/images.h deleted file mode 100644 index 4ee3a94fd..000000000 --- a/test/automated/common/images.h +++ /dev/null @@ -1,22 +0,0 @@ - - -#ifndef IMAGES_H -# define IMAGES_H - - -#include "common.h" - - -/* - * Pull in images for testcases. - */ -#include "img_primitives.c" -#include "img_primitivesblend.c" -#include "img_face.c" -#include "img_blit.c" -#include "img_blitblend.c" - - -#endif /* IMAGES_H */ - - diff --git a/test/automated/common/img_blit.c b/test/automated/common/img_blit.c deleted file mode 100644 index 85a1c7a0c..000000000 --- a/test/automated/common/img_blit.c +++ /dev/null @@ -1,1454 +0,0 @@ -/* GIMP RGB C-Source image dump (blit.c) */ - -static const SurfaceImage_t img_blit = { - 80, 60, 3, - "\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0" - "\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0" - "\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0" - "\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0" - "\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0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0\0\0\0\0\0\0\0\0\0\0\0\0\0\0" - "\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0" - "\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0" - "\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0" - "\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0" - "\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0" - "\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0" - "\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0" - "\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0" - "\0\0\0\0\0\0\0\0\0\0\0\0\377\377\0\377\377\0\0\0\0\0\0\0\377\377\0\377\377" - "\0\0\0\0\0\0\0\377\377\0\377\377\0\0\0\0\0\0\0\377\377\0\377\377\0\0\0\0" - "\0\0\0\377\377\0\377\377\0\0\0\0\0\0\0\377\377\0\377\377\0\0\0\0\0\0\0\377" - "\377\0\377\377\0\0\0\0\0\0\0\377\377\0\377\377\0\0\0\0\0\0\0\377\377\0\377" - "\377\0\0\0\0\0\0\0\377\377\0\377\377\0\0\0\0\0\0\0\377\377\0\377\377\0\0" - "\0\0\0\0\0\377\377\0\377\377\0\0\0\0\0\0\0\377\377\0\377\377\0\377\377\0" - "\377\377\0\377\377\0\377\377\0\377\377\0\377\377\0\0\0\0\0\0\0\0\0\0\0\0" - "\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0" - "\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\377\377\0\377\377\0\377\377\0\0\0" - "\0\377\377\0\377\377\0\377\377\0\0\0\0\377\377\0\377\377\0\377\377\0\0\0" - "\0\377\377\0\377\377\0\377\377\0\0\0\0\377\377\0\377\377\0\377\377\0\0\0" - "\0\377\377\0\377\377\0\377\377\0\0\0\0\377\377\0\377\377\0\377\377\0\0\0" - "\0\377\377\0\377\377\0\377\377\0\0\0\0\377\377\0\377\377\0\377\377\0\0\0" - "\0\377\377\0\377\377\0\377\377\0\0\0\0\377\377\0\377\377\0\377\377\0\0\0" - "\0\377\377\0\377\377\0\377\377\0\0\0\0\377\377\0\377\377\0\377\377\0\377" - "\377\0\377\377\0\377\377\0\377\377\0\377\377\0\377\377\0\377\377\0\377\377" - "\0\377\377\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0" - "\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\377\377\0\377\377" - "\0\377\377\0\0\0\0\377\377\0\377\377\0\377\377\0\0\0\0\377\377\0\377\377" - "\0\377\377\0\0\0\0\377\377\0\377\377\0\377\377\0\0\0\0\377\377\0\377\377" - "\0\377\377\0\0\0\0\377\377\0\377\377\0\377\377\0\0\0\0\377\377\0\377\377" - "\0\377\377\0\0\0\0\377\377\0\377\377\0\377\377\0\0\0\0\377\377\0\377\377" - "\0\377\377\0\0\0\0\377\377\0\377\377\0\377\377\0\0\0\0\377\377\0\377\377" - "\0\377\377\0\0\0\0\377\377\0\377\377\0\377\377\0\0\0\0\377\377\0\377\377" - "\0\377\377\0\377\377\0\377\377\0\377\377\0\377\377\0\377\377\0\377\377\0" - "\377\377\0\377\377\0\377\377\0\377\377\0\377\377\0\0\0\0\0\0\0\0\0\0\0\0" - "\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0" - "\0\0\0\0\377\377\0\377\377\0\377\377\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0" - "\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0" - "\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0" - "\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0" - "\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0" - "\0\0\0\0\0\0\0\0\0\0\377\377\0\377\377\0\377\377\0\377\377\0\0\0\0\0\0\0" - "\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0" - "\0\0\0\377\377\0\377\377\0\377\377\0\0\0\0\0\0\0\377\377\0\377\377\0\0\0" - "\0\0\0\0\377\377\0\377\377\0\0\0\0\0\0\0\377\377\0\377\377\0\0\0\0\0\0\0" - "\377\377\0\377\377\0\0\0\0\0\0\0\377\377\0\377\377\0\0\0\0\0\0\0\377\377" - "\0\377\377\0\0\0\0\0\0\0\377\377\0\377\377\0\0\0\0\0\0\0\377\377\0\377\377" - "\0\0\0\0\0\0\0\377\377\0\377\377\0\0\0\0\0\0\0\377\377\0\377\377\0\0\0\0" - "\0\0\0\377\377\0\377\377\0\0\0\0\0\0\0\377\377\0\377\377\0\0\0\0\0\0\0\377" - "\377\0\377\377\0\377\377\0\377\377\0\377\377\0\377\377\0\377\377\0\377\377" - "\0\0\0\0\0\0\0\377\377\0\377\377\0\377\377\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0" - "\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\377\377\0\377\377" - "\0\0\0\0\377\377\0\377\377\0\377\377\0\0\0\0\377\377\0\377\377\0\377\377" - "\0\0\0\0\377\377\0\377\377\0\377\377\0\0\0\0\377\377\0\377\377\0\377\377" - "\0\0\0\0\377\377\0\377\377\0\377\377\0\0\0\0\377\377\0\377\377\0\377\377" - "\0\0\0\0\377\377\0\377\377\0\377\377\0\0\0\0\377\377\0\377\377\0\377\377" - "\0\0\0\0\377\377\0\377\377\0\377\377\0\0\0\0\377\377\0\377\377\0\377\377" - "\0\0\0\0\377\377\0\377\377\0\377\377\0\0\0\0\377\377\0\377\377\0\377\377" - "\0\0\0\0\377\377\0\377\377\0\377\377\0\377\377\0\377\377\0\377\377\0\377" - "\377\0\377\377\0\377\377\0\377\377\0\377\377\0\377\377\0\0\0\0\377\377\0" - "\377\377\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0" - "\0\0\0\0\0\0\0\0\377\377\0\377\377\0\0\0\0\377\377\0\377\377\0\377\377\0" - "\0\0\0\377\377\0\377\377\0\377\377\0\0\0\0\377\377\0\377\377\0\377\377\0" - "\0\0\0\377\377\0\377\377\0\377\377\0\0\0\0\377\377\0\377\377\0\377\377\0" - "\0\0\0\377\377\0\377\377\0\377\377\0\0\0\0\377\377\0\377\377\0\377\377\0" - "\0\0\0\377\377\0\377\377\0\377\377\0\0\0\0\377\377\0\377\377\0\377\377\0" - "\0\0\0\377\377\0\377\377\0\377\377\0\0\0\0\377\377\0\377\377\0\377\377\0" - "\0\0\0\377\377\0\377\377\0\377\377\0\0\0\0\377\377\0\377\377\0\377\377\0" - "\377\377\0\377\377\0\377\377\0\377\377\0\377\377\0\377\377\0\377\377\0\377" - "\377\0\377\377\0\377\377\0\377\377\0\0\0\0\377\377\0\377\377\0\0\0\0\0\0" - "\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\377\377\0" - "\0\0\0\377\377\0\377\377\0\377\377\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0" - "\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0" - "\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0" - "\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0" - "\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0" - "\0\0\0\0\0\0\0\0\0\377\377\0\377\377\0\377\377\0\377\377\0\0\0\0\377\377" - "\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0" - "\0\0\0\0\377\377\0\377\377\0\377\377\0\0\0\0\0\0\0\377\377\0\377\377\0\0" - "\0\0\0\0\0\377\377\0\377\377\0\0\0\0\0\0\0\377\377\0\377\377\0\0\0\0\0\0" - "\0\377\377\0\377\377\0\0\0\0\0\0\0\377\377\0\377\377\0\0\0\0\0\0\0\377\377" - "\0\377\377\0\0\0\0\0\0\0\377\377\0\377\377\0\0\0\0\0\0\0\377\377\0\377\377" - "\0\0\0\0\0\0\0\377\377\0\377\377\0\0\0\0\0\0\0\377\377\0\377\377\0\0\0\0" - "\0\0\0\377\377\0\377\377\0\0\0\0\0\0\0\377\377\0\377\377\0\0\0\0\0\0\0\377" - "\377\0\377\377\0\377\377\0\377\377\0\377\377\0\377\377\0\377\377\0\377\377" - "\0\0\0\0\0\0\0\377\377\0\377\377\0\377\377\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0" - "\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\377\377\0\377\377" - "\0\0\0\0\377\377\0\377\377\0\377\377\0\0\0\0\377\377\0\377\377\0\377\377" - "\0\0\0\0\377\377\0\377\377\0\377\377\0\0\0\0\377\377\0\377\377\0\377\377" - "\0\0\0\0\377\377\0\377\377\0\377\377\0\0\0\0\377\377\0\377\377\0\377\377" - "\0\0\0\0\377\377\0\377\377\0\377\377\0\0\0\0\377\377\0\377\377\0\377\377" - "\0\0\0\0\377\377\0\377\377\0\377\377\0\0\0\0\377\377\0\377\377\0\377\377" - "\0\0\0\0\377\377\0\377\377\0\377\377\0\0\0\0\377\377\0\377\377\0\377\377" - "\0\0\0\0\377\377\0\377\377\0\377\377\0\377\377\0\377\377\0\377\377\0\377" - "\377\0\377\377\0\377\377\0\377\377\0\377\377\0\377\377\0\0\0\0\377\377\0" - "\377\377\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0" - "\0\0\0\0\0\0\0\0\377\377\0\377\377\0\0\0\0\377\377\0\377\377\0\377\377\0" - "\0\0\0\377\377\0\377\377\0\377\377\0\0\0\0\377\377\0\377\377\0\377\377\0" - "\0\0\0\377\377\0\377\377\0\377\377\0\0\0\0\377\377\0\377\377\0\377\377\0" - "\0\0\0\377\377\0\377\377\0\377\377\0\0\0\0\377\377\0\377\377\0\377\377\0" - "\0\0\0\377\377\0\377\377\0\377\377\0\0\0\0\377\377\0\377\377\0\377\377\0" - "\0\0\0\377\377\0\377\377\0\377\377\0\0\0\0\377\377\0\377\377\0\377\377\0" - "\0\0\0\377\377\0\377\377\0\377\377\0\0\0\0\377\377\0\377\377\0\377\377\0" - "\377\377\0\377\377\0\377\377\0\377\377\0\377\377\0\377\377\0\377\377\0\377" - "\377\0\377\377\0\377\377\0\377\377\0\0\0\0\377\377\0\377\377\0\0\0\0\0\0" - "\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\377\377\0" - "\0\0\0\377\377\0\377\377\0\377\377\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0" - "\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0" - "\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0" - "\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0" - "\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0" - "\0\0\0\0\0\0\0\0\0\377\377\0\377\377\0\377\377\0\377\377\0\0\0\0\377\377" - "\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0" - "\0\0\0\0\377\377\0\377\377\0\377\377\0\0\0\0\0\0\0\377\377\0\377\377\0\0" - "\0\0\0\0\0\377\377\0\377\377\0\0\0\0\0\0\0\377\377\0\377\377\0\0\0\0\0\0" - "\0\377\377\0\377\377\0\0\0\0\0\0\0\377\377\0\377\377\0\0\0\0\0\0\0\377\377" - "\0\377\377\0\0\0\0\0\0\0\377\377\0\377\377\0\0\0\0\0\0\0\377\377\0\377\377" - "\0\0\0\0\0\0\0\377\377\0\377\377\0\0\0\0\0\0\0\377\377\0\377\377\0\0\0\0" - "\0\0\0\377\377\0\377\377\0\0\0\0\0\0\0\377\377\0\377\377\0\0\0\0\0\0\0\377" - "\377\0\377\377\0\377\377\0\377\377\0\377\377\0\377\377\0\377\377\0\377\377" - "\0\0\0\0\0\0\0\377\377\0\377\377\0\377\377\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0" - "\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\377\377\0\377\377" - "\0\0\0\0\377\377\0\377\377\0\377\377\0\0\0\0\377\377\0\377\377\0\377\377" - "\0\0\0\0\377\377\0\377\377\0\377\377\0\0\0\0\377\377\0\377\377\0\377\377" - "\0\0\0\0\377\377\0\377\377\0\377\377\0\0\0\0\377\377\0\377\377\0\377\377" - "\0\0\0\0\377\377\0\377\377\0\377\377\0\0\0\0\377\377\0\377\377\0\377\377" - "\0\0\0\0\377\377\0\377\377\0\377\377\0\0\0\0\377\377\0\377\377\0\377\377" - "\0\0\0\0\377\377\0\377\377\0\377\377\0\0\0\0\377\377\0\377\377\0\377\377" - "\0\0\0\0\377\377\0\377\377\0\377\377\0\377\377\0\377\377\0\377\377\0\377" - "\377\0\377\377\0\377\377\0\377\377\0\377\377\0\377\377\0\0\0\0\377\377\0" - "\377\377\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0" - "\0\0\0\0\0\0\0\0\377\377\0\377\377\0\0\0\0\377\377\0\377\377\0\377\377\0" - "\0\0\0\377\377\0\377\377\0\377\377\0\0\0\0\377\377\0\377\377\0\377\377\0" - "\0\0\0\377\377\0\377\377\0\377\377\0\0\0\0\377\377\0\377\377\0\377\377\0" - "\0\0\0\377\377\0\377\377\0\377\377\0\0\0\0\377\377\0\377\377\0\377\377\0" - "\0\0\0\377\377\0\377\377\0\377\377\0\0\0\0\377\377\0\377\377\0\377\377\0" - "\0\0\0\377\377\0\377\377\0\377\377\0\0\0\0\377\377\0\377\377\0\377\377\0" - "\0\0\0\377\377\0\377\377\0\377\377\0\0\0\0\377\377\0\377\377\0\377\377\0" - "\377\377\0\377\377\0\377\377\0\377\377\0\377\377\0\377\377\0\377\377\0\377" - "\377\0\377\377\0\377\377\0\377\377\0\0\0\0\377\377\0\377\377\0\0\0\0\0\0" - "\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\377\377\0" - "\0\0\0\377\377\0\377\377\0\377\377\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0" - "\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0" - "\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0" - "\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0" - "\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0" - "\0\0\0\0\0\0\0\0\0\377\377\0\377\377\0\377\377\0\377\377\0\0\0\0\377\377" - "\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0" - "\0\0\0\0\377\377\0\377\377\0\377\377\0\0\0\0\0\0\0\377\377\0\377\377\0\0" - "\0\0\0\0\0\377\377\0\377\377\0\0\0\0\0\0\0\377\377\0\377\377\0\0\0\0\0\0" - "\0\377\377\0\377\377\0\0\0\0\0\0\0\377\377\0\377\377\0\0\0\0\0\0\0\377\377" - "\0\377\377\0\0\0\0\0\0\0\377\377\0\377\377\0\0\0\0\0\0\0\377\377\0\377\377" - "\0\0\0\0\0\0\0\377\377\0\377\377\0\0\0\0\0\0\0\377\377\0\377\377\0\0\0\0" - "\0\0\0\377\377\0\377\377\0\0\0\0\0\0\0\377\377\0\377\377\0\0\0\0\0\0\0\377" - "\377\0\377\377\0\377\377\0\377\377\0\377\377\0\377\377\0\377\377\0\377\377" - "\0\0\0\0\0\0\0\377\377\0\377\377\0\377\377\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0" - "\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\377\377\0\377\377" - "\0\0\0\0\377\377\0\377\377\0\377\377\0\0\0\0\377\377\0\377\377\0\377\377" - "\0\0\0\0\377\377\0\377\377\0\377\377\0\0\0\0\377\377\0\377\377\0\377\377" - "\0\0\0\0\377\377\0\377\377\0\377\377\0\0\0\0\377\377\0\377\377\0\377\377" - "\0\0\0\0\377\377\0\377\377\0\377\377\0\0\0\0\377\377\0\377\377\0\377\377" - "\0\0\0\0\377\377\0\377\377\0\377\377\0\0\0\0\377\377\0\377\377\0\377\377" - "\0\0\0\0\377\377\0\377\377\0\377\377\0\0\0\0\377\377\0\377\377\0\377\377" - "\0\0\0\0\377\377\0\377\377\0\377\377\0\377\377\0\377\377\0\377\377\0\377" - "\377\0\377\377\0\377\377\0\377\377\0\377\377\0\377\377\0\0\0\0\377\377\0" - "\377\377\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0" - "\0\0\0\0\0\0\0\0\377\377\0\377\377\0\0\0\0\377\377\0\377\377\0\377\377\0" - "\0\0\0\377\377\0\377\377\0\377\377\0\0\0\0\377\377\0\377\377\0\377\377\0" - "\0\0\0\377\377\0\377\377\0\377\377\0\0\0\0\377\377\0\377\377\0\377\377\0" - "\0\0\0\377\377\0\377\377\0\377\377\0\0\0\0\377\377\0\377\377\0\377\377\0" - "\0\0\0\377\377\0\377\377\0\377\377\0\0\0\0\377\377\0\377\377\0\377\377\0" - "\0\0\0\377\377\0\377\377\0\377\377\0\0\0\0\377\377\0\377\377\0\377\377\0" - "\0\0\0\377\377\0\377\377\0\377\377\0\0\0\0\377\377\0\377\377\0\377\377\0" - "\377\377\0\377\377\0\377\377\0\377\377\0\377\377\0\377\377\0\377\377\0\377" - "\377\0\377\377\0\377\377\0\377\377\0\0\0\0\377\377\0\377\377\0\0\0\0\0\0" - "\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\377\377\0" - "\0\0\0\377\377\0\377\377\0\377\377\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0" - "\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0" - "\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0" - "\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0" - "\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0" - "\0\0\0\0\0\0\0\0\0\377\377\0\377\377\0\377\377\0\377\377\0\0\0\0\377\377" - "\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0" - "\0\0\0\0\377\377\0\377\377\0\377\377\0\0\0\0\0\0\0\377\377\0\377\377\0\0" - "\0\0\0\0\0\377\377\0\377\377\0\0\0\0\0\0\0\377\377\0\377\377\0\0\0\0\0\0" - "\0\377\377\0\377\377\0\0\0\0\0\0\0\377\377\0\377\377\0\0\0\0\0\0\0\377\377" - "\0\377\377\0\0\0\0\0\0\0\377\377\0\377\377\0\0\0\0\0\0\0\377\377\0\377\377" - "\0\0\0\0\0\0\0\377\377\0\377\377\0\0\0\0\0\0\0\377\377\0\377\377\0\0\0\0" - "\0\0\0\377\377\0\377\377\0\0\0\0\0\0\0\377\377\0\377\377\0\0\0\0\0\0\0\377" - "\377\0\377\377\0\377\377\0\377\377\0\377\377\0\377\377\0\377\377\0\377\377" - "\0\0\0\0\0\0\0\377\377\0\377\377\0\377\377\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0" - "\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\377\377\0\377\377" - "\0\0\0\0\377\377\0\377\377\0\377\377\0\0\0\0\377\377\0\377\377\0\377\377" - "\0\0\0\0\377\377\0\377\377\0\377\377\0\0\0\0\377\377\0\377\377\0\377\377" - "\0\0\0\0\377\377\0\377\377\0\377\377\0\0\0\0\377\377\0\377\377\0\377\377" - "\0\0\0\0\377\377\0\377\377\0\377\377\0\0\0\0\377\377\0\377\377\0\377\377" - "\0\0\0\0\377\377\0\377\377\0\377\377\0\0\0\0\377\377\0\377\377\0\377\377" - "\0\0\0\0\377\377\0\377\377\0\377\377\0\0\0\0\377\377\0\377\377\0\377\377" - "\0\0\0\0\377\377\0\377\377\0\377\377\0\377\377\0\377\377\0\377\377\0\377" - "\377\0\377\377\0\377\377\0\377\377\0\377\377\0\377\377\0\0\0\0\377\377\0" - "\377\377\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0" - "\0\0\0\0\0\0\0\0\377\377\0\377\377\0\0\0\0\377\377\0\377\377\0\377\377\0" - "\0\0\0\377\377\0\377\377\0\377\377\0\0\0\0\377\377\0\377\377\0\377\377\0" - "\0\0\0\377\377\0\377\377\0\377\377\0\0\0\0\377\377\0\377\377\0\377\377\0" - "\0\0\0\377\377\0\377\377\0\377\377\0\0\0\0\377\377\0\377\377\0\377\377\0" - "\0\0\0\377\377\0\377\377\0\377\377\0\0\0\0\377\377\0\377\377\0\377\377\0" - "\0\0\0\377\377\0\377\377\0\377\377\0\0\0\0\377\377\0\377\377\0\377\377\0" - "\0\0\0\377\377\0\377\377\0\377\377\0\0\0\0\377\377\0\377\377\0\377\377\0" - "\377\377\0\377\377\0\377\377\0\377\377\0\377\377\0\377\377\0\377\377\0\377" - "\377\0\377\377\0\377\377\0\377\377\0\0\0\0\377\377\0\377\377\0\0\0\0\0\0" - "\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\377\377\0" - "\0\0\0\377\377\0\377\377\0\377\377\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0" - "\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0" - "\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0" - "\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0" - "\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0" - "\0\0\0\0\0\0\0\0\0\377\377\0\377\377\0\377\377\0\377\377\0\0\0\0\377\377" - "\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0" - "\0\0\0\0\377\377\0\377\377\0\377\377\0\0\0\0\0\0\0\377\377\0\377\377\0\0" - "\0\0\0\0\0\377\377\0\377\377\0\0\0\0\0\0\0\377\377\0\377\377\0\0\0\0\0\0" - "\0\377\377\0\377\377\0\0\0\0\0\0\0\377\377\0\377\377\0\0\0\0\0\0\0\377\377" - "\0\377\377\0\0\0\0\0\0\0\377\377\0\377\377\0\0\0\0\0\0\0\377\377\0\377\377" - "\0\0\0\0\0\0\0\377\377\0\377\377\0\0\0\0\0\0\0\377\377\0\377\377\0\0\0\0" - "\0\0\0\377\377\0\377\377\0\0\0\0\0\0\0\377\377\0\377\377\0\0\0\0\0\0\0\377" - "\377\0\377\377\0\377\377\0\377\377\0\377\377\0\377\377\0\377\377\0\377\377" - "\0\0\0\0\0\0\0\377\377\0\377\377\0\377\377\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0" - "\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\377\377\0\377\377" - "\0\0\0\0\377\377\0\377\377\0\377\377\0\0\0\0\377\377\0\377\377\0\377\377" - "\0\0\0\0\377\377\0\377\377\0\377\377\0\0\0\0\377\377\0\377\377\0\377\377" - "\0\0\0\0\377\377\0\377\377\0\377\377\0\0\0\0\377\377\0\377\377\0\377\377" - "\0\0\0\0\377\377\0\377\377\0\377\377\0\0\0\0\377\377\0\377\377\0\377\377" - "\0\0\0\0\377\377\0\377\377\0\377\377\0\0\0\0\377\377\0\377\377\0\377\377" - "\0\0\0\0\377\377\0\377\377\0\377\377\0\0\0\0\377\377\0\377\377\0\377\377" - "\0\0\0\0\377\377\0\377\377\0\377\377\0\377\377\0\377\377\0\377\377\0\377" - "\377\0\377\377\0\377\377\0\377\377\0\377\377\0\377\377\0\0\0\0\377\377\0" - "\377\377\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0" - "\0\0\0\0\0\0\0\0\377\377\0\377\377\0\0\0\0\377\377\0\377\377\0\377\377\0" - "\0\0\0\377\377\0\377\377\0\377\377\0\0\0\0\377\377\0\377\377\0\377\377\0" - "\0\0\0\377\377\0\377\377\0\377\377\0\0\0\0\377\377\0\377\377\0\377\377\0" - "\0\0\0\377\377\0\377\377\0\377\377\0\0\0\0\377\377\0\377\377\0\377\377\0" - "\0\0\0\377\377\0\377\377\0\377\377\0\0\0\0\377\377\0\377\377\0\377\377\0" - "\0\0\0\377\377\0\377\377\0\377\377\0\0\0\0\377\377\0\377\377\0\377\377\0" - "\0\0\0\377\377\0\377\377\0\377\377\0\0\0\0\377\377\0\377\377\0\377\377\0" - "\377\377\0\377\377\0\377\377\0\377\377\0\377\377\0\377\377\0\377\377\0\377" - "\377\0\377\377\0\377\377\0\377\377\0\0\0\0\377\377\0\377\377\0\0\0\0\0\0" - "\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\377\377\0" - "\0\0\0\377\377\0\377\377\0\377\377\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0" - "\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0" - "\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0" - "\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0" - "\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0" - "\0\0\0\0\0\0\0\0\0\377\377\0\377\377\0\377\377\0\377\377\0\0\0\0\377\377" - "\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0" - "\0\0\0\0\377\377\0\377\377\0\377\377\0\0\0\0\0\0\0\377\377\0\377\377\0\0" - "\0\0\0\0\0\377\377\0\377\377\0\0\0\0\0\0\0\377\377\0\377\377\0\0\0\0\0\0" - "\0\377\377\0\377\377\0\0\0\0\0\0\0\377\377\0\377\377\0\0\0\0\0\0\0\377\377" - "\0\377\377\0\0\0\0\0\0\0\377\377\0\377\377\0\0\0\0\0\0\0\377\377\0\377\377" - "\0\0\0\0\0\0\0\377\377\0\377\377\0\0\0\0\0\0\0\377\377\0\377\377\0\0\0\0" - "\0\0\0\377\377\0\377\377\0\0\0\0\0\0\0\377\377\0\377\377\0\0\0\0\0\0\0\377" - "\377\0\377\377\0\377\377\0\377\377\0\377\377\0\377\377\0\377\377\0\377\377" - "\0\0\0\0\0\0\0\377\377\0\377\377\0\377\377\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0" - "\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\377\377\0\377\377" - "\0\0\0\0\377\377\0\377\377\0\377\377\0\0\0\0\377\377\0\377\377\0\377\377" - "\0\0\0\0\377\377\0\377\377\0\377\377\0\0\0\0\377\377\0\377\377\0\377\377" - "\0\0\0\0\377\377\0\377\377\0\377\377\0\0\0\0\377\377\0\377\377\0\377\377" - "\0\0\0\0\377\377\0\377\377\0\377\377\0\0\0\0\377\377\0\377\377\0\377\377" - "\0\0\0\0\377\377\0\377\377\0\377\377\0\0\0\0\377\377\0\377\377\0\377\377" - "\0\0\0\0\377\377\0\377\377\0\377\377\0\0\0\0\377\377\0\377\377\0\377\377" - "\0\0\0\0\377\377\0\377\377\0\377\377\0\377\377\0\377\377\0\377\377\0\377" - "\377\0\377\377\0\377\377\0\377\377\0\377\377\0\377\377\0\0\0\0\377\377\0" - "\377\377\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0" - "\0\0\0\0\0\0\0\0\377\377\0\377\377\0\0\0\0\377\377\0\377\377\0\377\377\0" - "\0\0\0\377\377\0\377\377\0\377\377\0\0\0\0\377\377\0\377\377\0\377\377\0" - "\0\0\0\377\377\0\377\377\0\377\377\0\0\0\0\377\377\0\377\377\0\377\377\0" - "\0\0\0\377\377\0\377\377\0\377\377\0\0\0\0\377\377\0\377\377\0\377\377\0" - "\0\0\0\377\377\0\377\377\0\377\377\0\0\0\0\377\377\0\377\377\0\377\377\0" - "\0\0\0\377\377\0\377\377\0\377\377\0\0\0\0\377\377\0\377\377\0\377\377\0" - "\0\0\0\377\377\0\377\377\0\377\377\0\0\0\0\377\377\0\377\377\0\377\377\0" - "\377\377\0\377\377\0\377\377\0\377\377\0\377\377\0\377\377\0\377\377\0\377" - "\377\0\377\377\0\377\377\0\377\377\0\0\0\0\377\377\0\377\377\0\0\0\0\0\0" - "\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\377\377\0" - "\0\0\0\377\377\0\377\377\0\377\377\0\0\0\0\377\377\0\377\377\0\377\377\0" - "\0\0\0\377\377\0\377\377\0\377\377\0\0\0\0\377\377\0\377\377\0\377\377\0" - "\0\0\0\377\377\0\377\377\0\377\377\0\0\0\0\377\377\0\377\377\0\377\377\0" - "\0\0\0\377\377\0\377\377\0\377\377\0\0\0\0\377\377\0\377\377\0\377\377\0" - "\0\0\0\377\377\0\377\377\0\377\377\0\0\0\0\377\377\0\377\377\0\377\377\0" - "\0\0\0\377\377\0\377\377\0\377\377\0\0\0\0\377\377\0\377\377\0\377\377\0" - "\0\0\0\377\377\0\377\377\0\377\377\0\377\377\0\377\377\0\377\377\0\377\377" - "\0\377\377\0\377\377\0\377\377\0\377\377\0\377\377\0\377\377\0\377\377\0" - "\377\377\0\377\377\0\0\0\0\377\377\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0" - "\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\377\377\0\377\377\0\377\377\0" - "\0\0\0\377\377\0\377\377\0\377\377\0\0\0\0\377\377\0\377\377\0\377\377\0" - "\0\0\0\377\377\0\377\377\0\377\377\0\0\0\0\377\377\0\377\377\0\377\377\0" - "\0\0\0\377\377\0\377\377\0\377\377\0\0\0\0\377\377\0\377\377\0\377\377\0" - "\0\0\0\377\377\0\377\377\0\377\377\0\0\0\0\377\377\0\377\377\0\377\377\0" - "\0\0\0\377\377\0\377\377\0\377\377\0\0\0\0\377\377\0\377\377\0\377\377\0" - "\0\0\0\377\377\0\377\377\0\377\377\0\0\0\0\377\377\0\377\377\0\377\377\0" - "\377\377\0\377\377\0\377\377\0\377\377\0\377\377\0\377\377\0\377\377\0\377" - "\377\0\377\377\0\377\377\0\377\377\0\377\377\0\377\377\0\377\377\0\377\377" - "\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0" - "\0\0\0\0\0\0\0\377\377\0\377\377\0\377\377\0\0\0\0\377\377\0\377\377\0\377" - "\377\0\0\0\0\377\377\0\377\377\0\377\377\0\0\0\0\377\377\0\377\377\0\377" - "\377\0\0\0\0\377\377\0\377\377\0\377\377\0\0\0\0\377\377\0\377\377\0\377" - "\377\0\0\0\0\377\377\0\377\377\0\377\377\0\0\0\0\377\377\0\377\377\0\377" - "\377\0\0\0\0\377\377\0\377\377\0\377\377\0\0\0\0\377\377\0\377\377\0\377" - "\377\0\0\0\0\377\377\0\377\377\0\377\377\0\0\0\0\377\377\0\377\377\0\377" - "\377\0\0\0\0\377\377\0\377\377\0\377\377\0\0\0\0\0\0\0\0\0\0\0\0\0\377\377" - "\0\377\377\0\377\377\0\377\377\0\0\0\0\0\0\0\0\0\0\0\0\0\377\377\0\377\377" - "\0\377\377\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0" - "\0\0\0\0\0\0\0\0\0\377\377\0\377\377\0\377\377\0\0\0\0\377\377\0\377\377" - "\0\377\377\0\0\0\0\377\377\0\377\377\0\377\377\0\0\0\0\377\377\0\377\377" - "\0\377\377\0\0\0\0\377\377\0\377\377\0\377\377\0\0\0\0\377\377\0\377\377" - "\0\377\377\0\0\0\0\377\377\0\377\377\0\377\377\0\0\0\0\377\377\0\377\377" - "\0\377\377\0\0\0\0\377\377\0\377\377\0\377\377\0\0\0\0\377\377\0\377\377" - "\0\377\377\0\0\0\0\377\377\0\377\377\0\377\377\0\0\0\0\377\377\0\377\377" - "\0\377\377\0\0\0\0\377\377\0\377\377\0\377\377\0\377\377\0\0\0\0\0\0\0\377" - "\377\0\0\0\0\377\377\0\377\377\0\377\377\0\377\377\0\0\0\0\0\0\0\377\377" - "\0\0\0\0\377\377\0\377\377\0\377\377\0\377\377\0\0\0\0\0\0\0\0\0\0\0\0\0" - "\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\377\377\0\377\377\0\377" - "\377\0\0\0\0\377\377\0\377\377\0\377\377\0\0\0\0\377\377\0\377\377\0\377" - "\377\0\0\0\0\377\377\0\377\377\0\377\377\0\0\0\0\377\377\0\377\377\0\377" - "\377\0\0\0\0\377\377\0\377\377\0\377\377\0\0\0\0\377\377\0\377\377\0\377" - "\377\0\0\0\0\377\377\0\377\377\0\377\377\0\0\0\0\377\377\0\377\377\0\377" - "\377\0\0\0\0\377\377\0\377\377\0\377\377\0\0\0\0\377\377\0\377\377\0\377" - "\377\0\0\0\0\377\377\0\377\377\0\377\377\0\0\0\0\377\377\0\377\377\0\377" - "\377\0\377\377\0\0\0\0\0\0\0\0\0\0\0\0\0\377\377\0\377\377\0\377\377\0\377" - "\377\0\0\0\0\0\0\0\0\0\0\0\0\0\377\377\0\377\377\0\377\377\0\377\377\0\0" - "\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\377" - "\377\0\377\377\0\377\377\0\0\0\0\377\377\0\377\377\0\377\377\0\0\0\0\377" - "\377\0\377\377\0\377\377\0\0\0\0\377\377\0\377\377\0\377\377\0\0\0\0\377" - "\377\0\377\377\0\377\377\0\0\0\0\377\377\0\377\377\0\377\377\0\0\0\0\377" - "\377\0\377\377\0\377\377\0\0\0\0\377\377\0\377\377\0\377\377\0\0\0\0\377" - "\377\0\377\377\0\377\377\0\0\0\0\377\377\0\377\377\0\377\377\0\0\0\0\377" - "\377\0\377\377\0\377\377\0\0\0\0\377\377\0\377\377\0\377\377\0\0\0\0\377" - "\377\0\377\377\0\377\377\0\377\377\0\377\377\0\377\377\0\377\377\0\377\377" - "\0\377\377\0\377\377\0\377\377\0\377\377\0\377\377\0\377\377\0\377\377\0" - "\377\377\0\377\377\0\377\377\0\377\377\0\377\377\0\0\0\0\0\0\0\0\0\0\0\0" - "\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\377\377\0\377\377\0\377" - "\377\0\0\0\0\377\377\0\377\377\0\377\377\0\0\0\0\377\377\0\377\377\0\377" - "\377\0\0\0\0\377\377\0\377\377\0\377\377\0\0\0\0\377\377\0\377\377\0\377" - "\377\0\0\0\0\377\377\0\377\377\0\377\377\0\0\0\0\377\377\0\377\377\0\377" - "\377\0\0\0\0\377\377\0\377\377\0\377\377\0\0\0\0\377\377\0\377\377\0\377" - "\377\0\0\0\0\377\377\0\377\377\0\377\377\0\0\0\0\377\377\0\377\377\0\377" - "\377\0\0\0\0\377\377\0\377\377\0\377\377\0\0\0\0\377\377\0\377\377\0\377" - "\377\0\377\377\0\377\377\0\377\377\0\377\377\0\377\377\0\377\377\0\377\377" - "\0\377\377\0\377\377\0\377\377\0\377\377\0\377\377\0\377\377\0\377\377\0" - "\377\377\0\377\377\0\377\377\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0" - "\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\377\377\0\377\377\0\377\377\0\0\0\0\377\377" - "\0\377\377\0\377\377\0\0\0\0\377\377\0\377\377\0\377\377\0\0\0\0\377\377" - "\0\377\377\0\377\377\0\0\0\0\377\377\0\377\377\0\377\377\0\0\0\0\377\377" - "\0\377\377\0\377\377\0\0\0\0\377\377\0\377\377\0\377\377\0\0\0\0\377\377" - "\0\377\377\0\377\377\0\0\0\0\377\377\0\377\377\0\377\377\0\0\0\0\377\377" - "\0\377\377\0\377\377\0\0\0\0\377\377\0\377\377\0\377\377\0\0\0\0\377\377" - "\0\377\377\0\377\377\0\0\0\0\377\377\0\377\377\0\377\377\0\377\377\0\377" - "\377\0\377\377\0\377\377\0\377\377\0\377\377\0\0\0\0\0\0\0\377\377\0\377" - "\377\0\377\377\0\377\377\0\377\377\0\377\377\0\377\377\0\377\377\0\377\377" - "\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0" - "\0\377\377\0\377\377\0\377\377\0\0\0\0\377\377\0\377\377\0\377\377\0\0\0" - "\0\377\377\0\377\377\0\377\377\0\0\0\0\377\377\0\377\377\0\377\377\0\0\0" - "\0\377\377\0\377\377\0\377\377\0\0\0\0\377\377\0\377\377\0\377\377\0\0\0" - "\0\377\377\0\377\377\0\377\377\0\0\0\0\377\377\0\377\377\0\377\377\0\0\0" - "\0\377\377\0\377\377\0\377\377\0\0\0\0\377\377\0\377\377\0\377\377\0\0\0" - "\0\377\377\0\377\377\0\377\377\0\0\0\0\377\377\0\377\377\0\377\377\0\0\0" - "\0\377\377\0\377\377\0\377\377\0\377\377\0\377\377\0\377\377\0\377\377\0" - "\377\377\0\377\377\0\0\0\0\0\0\0\377\377\0\377\377\0\377\377\0\377\377\0" - "\377\377\0\377\377\0\377\377\0\377\377\0\377\377\0\0\0\0\0\0\0\0\0\0\0\0" - "\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\377\377\0\377\377\0\377" - "\377\0\0\0\0\377\377\0\377\377\0\377\377\0\0\0\0\377\377\0\377\377\0\377" - "\377\0\0\0\0\377\377\0\377\377\0\377\377\0\0\0\0\377\377\0\377\377\0\377" - "\377\0\0\0\0\377\377\0\377\377\0\377\377\0\0\0\0\377\377\0\377\377\0\377" - "\377\0\0\0\0\377\377\0\377\377\0\377\377\0\0\0\0\377\377\0\377\377\0\377" - "\377\0\0\0\0\377\377\0\377\377\0\377\377\0\0\0\0\377\377\0\377\377\0\377" - "\377\0\0\0\0\377\377\0\377\377\0\377\377\0\0\0\0\377\377\0\377\377\0\377" - "\377\0\377\377\0\377\377\0\377\377\0\377\377\0\377\377\0\377\377\0\377\377" - "\0\377\377\0\377\377\0\377\377\0\377\377\0\377\377\0\377\377\0\377\377\0" - "\377\377\0\377\377\0\377\377\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0" - "\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\377\377\0\377\377\0\377\377\0\0\0\0" - "\377\377\0\377\377\0\377\377\0\0\0\0\377\377\0\377\377\0\377\377\0\0\0\0" - "\377\377\0\377\377\0\377\377\0\0\0\0\377\377\0\377\377\0\377\377\0\0\0\0" - "\377\377\0\377\377\0\377\377\0\0\0\0\377\377\0\377\377\0\377\377\0\0\0\0" - "\377\377\0\377\377\0\377\377\0\0\0\0\377\377\0\377\377\0\377\377\0\0\0\0" - "\377\377\0\377\377\0\377\377\0\0\0\0\377\377\0\377\377\0\377\377\0\0\0\0" - "\377\377\0\377\377\0\377\377\0\0\0\0\377\377\0\377\377\0\377\377\0\377\377" - "\0\377\377\0\377\377\0\377\377\0\377\377\0\377\377\0\377\377\0\377\377\0" - "\377\377\0\377\377\0\377\377\0\377\377\0\377\377\0\377\377\0\377\377\0\0" - "\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0" - "\0\0\0\0\0\377\377\0\377\377\0\0\0\0\0\0\0\377\377\0\377\377\0\0\0\0\0\0" - "\0\377\377\0\377\377\0\0\0\0\0\0\0\377\377\0\377\377\0\0\0\0\0\0\0\377\377" - "\0\377\377\0\0\0\0\0\0\0\377\377\0\377\377\0\0\0\0\0\0\0\377\377\0\377\377" - "\0\0\0\0\0\0\0\377\377\0\377\377\0\0\0\0\0\0\0\377\377\0\377\377\0\0\0\0" - "\0\0\0\377\377\0\377\377\0\0\0\0\0\0\0\377\377\0\377\377\0\0\0\0\0\0\0\377" - "\377\0\377\377\0\0\0\0\0\0\0\377\377\0\377\377\0\0\0\0\0\0\0\0\0\0\377\377" - "\0\377\377\0\377\377\0\377\377\0\377\377\0\377\377\0\377\377\0\377\377\0" - "\0\0\0\0\0\0\0\0\0\377\377\0\377\377\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0" - "\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\377\377\0\377\377" - "\0\0\0\0\0\0\0\377\377\0\377\377\0\0\0\0\0\0\0\377\377\0\377\377\0\0\0\0" - "\0\0\0\377\377\0\377\377\0\0\0\0\0\0\0\377\377\0\377\377\0\0\0\0\0\0\0\377" - "\377\0\377\377\0\0\0\0\0\0\0\377\377\0\377\377\0\0\0\0\0\0\0\377\377\0\377" - "\377\0\0\0\0\0\0\0\377\377\0\377\377\0\0\0\0\0\0\0\377\377\0\377\377\0\0" - "\0\0\0\0\0\377\377\0\377\377\0\0\0\0\0\0\0\377\377\0\377\377\0\0\0\0\0\0" - "\0\377\377\0\377\377\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0" - "\0\0\0\0\0\0\0\0\0\0\0\377\377\0\377\377\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0" - "\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0" - "\377\377\0\377\377\0\0\0\0\0\0\0\377\377\0\377\377\0\0\0\0\0\0\0\377\377" - "\0\377\377\0\0\0\0\0\0\0\377\377\0\377\377\0\0\0\0\0\0\0\377\377\0\377\377" - "\0\0\0\0\0\0\0\377\377\0\377\377\0\0\0\0\0\0\0\377\377\0\377\377\0\0\0\0" - "\0\0\0\377\377\0\377\377\0\0\0\0\0\0\0\377\377\0\377\377\0\0\0\0\0\0\0\377" - "\377\0\377\377\0\0\0\0\0\0\0\377\377\0\377\377\0\0\0\0\0\0\0\377\377\0\377" - "\377\0\0\0\0\0\0\0\377\377\0\377\377\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0" - "\0\0\0\0\0\0\0\0\0\0\0\0\0\377\377\0\377\377\0\0\0\0\0\0\0\0\0\0\0\0\0\0" - "\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0" - "\0\0\0\0\0\0\0\0\377\377\0\377\377\0\377\377\0\0\0\0\377\377\0\377\377\0" - "\377\377\0\0\0\0\377\377\0\377\377\0\377\377\0\0\0\0\377\377\0\377\377\0" - "\377\377\0\0\0\0\377\377\0\377\377\0\377\377\0\0\0\0\377\377\0\377\377\0" - "\377\377\0\0\0\0\377\377\0\377\377\0\377\377\0\0\0\0\377\377\0\377\377\0" - "\377\377\0\0\0\0\377\377\0\377\377\0\377\377\0\0\0\0\377\377\0\377\377\0" - "\377\377\0\0\0\0\377\377\0\377\377\0\377\377\0\0\0\0\377\377\0\377\377\0" - "\377\377\0\0\0\0\377\377\0\377\377\0\377\377\0\0\0\0\0\0\0\0\0\0\0\0\0\0" - "\0\0\0\0\0\377\377\0\377\377\0\377\377\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0" - "\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0" - "\0\0\0\0\0\0\0\0\0\0\0\0\0\0\377\377\0\377\377\0\0\0\0\0\0\0\377\377\0\377" - "\377\0\0\0\0\0\0\0\377\377\0\377\377\0\0\0\0\0\0\0\377\377\0\377\377\0\0" - "\0\0\0\0\0\377\377\0\377\377\0\0\0\0\0\0\0\377\377\0\377\377\0\0\0\0\0\0" - "\0\377\377\0\377\377\0\0\0\0\0\0\0\377\377\0\377\377\0\0\0\0\0\0\0\377\377" - "\0\377\377\0\0\0\0\0\0\0\377\377\0\377\377\0\0\0\0\0\0\0\377\377\0\377\377" - "\0\0\0\0\0\0\0\377\377\0\377\377\0\0\0\0\0\0\0\377\377\0\377\377\0\377\377" - "\0\377\377\0\377\377\0\377\377\0\377\377\0\377\377\0\0\0\0\0\0\0\0\0\0\0" - "\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0" - "\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0" - "\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0" - "\0\0\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0\0" - "\0\334\0\0\334\0\0\334\0\0\0\0\0\360\0\0\360\0\0\360\0\0\360\0\0\360\0\0" - "\360\0\0\360\0\0\360\0\0\360\0\0\360\0\0\360\0\0\360\0\0\0\0\0\0\0\0\0\0" - "\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0" - "\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\24\0\0\24\0\0\24\0\0\0" - "\0\0(\0\0(\0\0(\0\0\0\0\0<\0\0<\0\0<\0\0\0\0\0P\0\0P\0\0P\0\0\0\0\0d\0\0" - "d\0\0d\0\0\0\0\0x\0\0x\0\0x\0\0\0\0\0\214\0\0\214\0\0\214\0\0\0\0\0\240\0" - "\0\240\0\0\240\0\0\0\0\0\264\0\0\264\0\0\264\0\0\0\0\0\310\0\0\310\0\0\310" - "\0\0\0\0\0\334\0\0\334\0\0\334\0\0\0\0\0\360\0\0\360\0\0\360\0\0\360\0\0" - "\360\0\0\360\0\0\360\0\0\360\0\0\360\0\0\360\0\0\360\0\0\360\0\0\360\0\0" - "\360\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0" - "\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0" - "\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0" - "\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0" - "\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0" - "\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0" - "\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\360\0\0\360\0\0\360\0\0\360\0\0\0" - "\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0" - "\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0$\0\0$\0\0\0\0\0\0\0\0$\24\0" - "$\24\0\0\0\0\0\0\0$(\0$(\0\0\0\0\0\0\0$<\0$<\0\0\0\0\0\0\0$P\0$P\0\0\0\0" - "\0\0\0$d\0$d\0\0\0\0\0\0\0$x\0$x\0\0\0\0\0\0\0$\214\0$\214\0\0\0\0\0\0\0" - "$\240\0$\240\0\0\0\0\0\0\0$\264\0$\264\0\0\0\0\0\0\0$\310\0$\310\0\0\0\0" - "\0\0\0$\334\0$\334\0\0\0\0\0\0\0$\360\0$\360\0$\360\0$\360\0$\360\0$\360" - "\0$\360\0$\360\0\0\0\0\0\0\0\0\360\0\0\360\0\0\360\0\0\0\0\0\0\0\0\0\0\0" - "\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0" - "\0\0\0\0\0$\0\0$\0\0$\0\0\0\0\0$\24\0$\24\0$\24\0\0\0\0$(\0$(\0$(\0\0\0\0" - "$<\0$<\0$<\0\0\0\0$P\0$P\0$P\0\0\0\0$d\0$d\0$d\0\0\0\0$x\0$x\0$x\0\0\0\0" - "$\214\0$\214\0$\214\0\0\0\0$\240\0$\240\0$\240\0\0\0\0$\264\0$\264\0$\264" - "\0\0\0\0$\310\0$\310\0$\310\0\0\0\0$\334\0$\334\0$\334\0\0\0\0$\360\0$\360" - "\0$\360\0$\360\0$\360\0$\360\0$\360\0$\360\0$\360\0$\360\0$\360\0$\360\0" - "\0\0\0\0\360\0\0\360\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0" - "\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0$\0\0$\0\0$\0\0\0\0\0$\24\0" - "$\24\0$\24\0\0\0\0$(\0$(\0$(\0\0\0\0$<\0$<\0$<\0\0\0\0$P\0$P\0$P\0\0\0\0" - "$d\0$d\0$d\0\0\0\0$x\0$x\0$x\0\0\0\0$\214\0$\214\0$\214\0\0\0\0$\240\0$\240" - "\0$\240\0\0\0\0$\264\0$\264\0$\264\0\0\0\0$\310\0$\310\0$\310\0\0\0\0$\334" - "\0$\334\0$\334\0\0\0\0$\360\0$\360\0$\360\0$\360\0$\360\0$\360\0$\360\0$" - "\360\0$\360\0$\360\0$\360\0$\360\0$\360\0$\360\0\0\0\0\0\360\0\0\360\0\0" - "\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0" - "\0\0\0\0\0$\0\0$\0\0$\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0" - "\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0" - "\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0" - "\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0" - "\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0" - "\0\0\0$\360\0$\360\0$\360\0$\360\0\0\0\0\0\360\0\0\0\0\0\0\0\0\0\0\0\0\0" - "\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0$\0\0$\0\0$\0\0\0\0" - "\0\0\0\0H\0\0H\0\0\0\0\0\0\0\0H\24\0H\24\0\0\0\0\0\0\0H(\0H(\0\0\0\0\0\0" - "\0H<\0H<\0\0\0\0\0\0\0HP\0HP\0\0\0\0\0\0\0Hd\0Hd\0\0\0\0\0\0\0Hx\0Hx\0\0" - "\0\0\0\0\0H\214\0H\214\0\0\0\0\0\0\0H\240\0H\240\0\0\0\0\0\0\0H\264\0H\264" - "\0\0\0\0\0\0\0H\310\0H\310\0\0\0\0\0\0\0H\334\0H\334\0\0\0\0\0\0\0H\360\0" - "H\360\0H\360\0H\360\0H\360\0H\360\0H\360\0H\360\0\0\0\0\0\0\0$\360\0$\360" - "\0$\360\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0" - "\0\0\0\0\0\0\0\0\0\0$\0\0$\0\0\0\0\0H\0\0H\0\0H\0\0\0\0\0H\24\0H\24\0H\24" - "\0\0\0\0H(\0H(\0H(\0\0\0\0H<\0H<\0H<\0\0\0\0HP\0HP\0HP\0\0\0\0Hd\0Hd\0Hd" - "\0\0\0\0Hx\0Hx\0Hx\0\0\0\0H\214\0H\214\0H\214\0\0\0\0H\240\0H\240\0H\240" - "\0\0\0\0H\264\0H\264\0H\264\0\0\0\0H\310\0H\310\0H\310\0\0\0\0H\334\0H\334" - "\0H\334\0\0\0\0H\360\0H\360\0H\360\0H\360\0H\360\0H\360\0H\360\0H\360\0H" - "\360\0H\360\0H\360\0H\360\0\0\0\0$\360\0$\360\0\0\0\0\0\0\0\0\0\0\0\0\0\0" - "\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0$\0\0$\0\0\0\0\0H\0\0" - "H\0\0H\0\0\0\0\0H\24\0H\24\0H\24\0\0\0\0H(\0H(\0H(\0\0\0\0H<\0H<\0H<\0\0" - "\0\0HP\0HP\0HP\0\0\0\0Hd\0Hd\0Hd\0\0\0\0Hx\0Hx\0Hx\0\0\0\0H\214\0H\214\0" - "H\214\0\0\0\0H\240\0H\240\0H\240\0\0\0\0H\264\0H\264\0H\264\0\0\0\0H\310" - "\0H\310\0H\310\0\0\0\0H\334\0H\334\0H\334\0\0\0\0H\360\0H\360\0H\360\0H\360" - "\0H\360\0H\360\0H\360\0H\360\0H\360\0H\360\0H\360\0H\360\0H\360\0H\360\0" - "\0\0\0$\360\0$\360\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0" - "\0\0\0\0\0\0\0\0\0\0$\0\0\0\0\0H\0\0H\0\0H\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0" - "\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0" - "\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0" - "\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0" - "\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0" - "\0\0\0\0\0\0\0\0\0\0\0\0\0\0H\360\0H\360\0H\360\0H\360\0\0\0\0$\360\0\0\0" - "\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0" - "\0H\0\0H\0\0H\0\0\0\0\0\0\0\0l\0\0l\0\0\0\0\0\0\0\0l\24\0l\24\0\0\0\0\0\0" - "\0l(\0l(\0\0\0\0\0\0\0l<\0l<\0\0\0\0\0\0\0lP\0lP\0\0\0\0\0\0\0ld\0ld\0\0" - "\0\0\0\0\0lx\0lx\0\0\0\0\0\0\0l\214\0l\214\0\0\0\0\0\0\0l\240\0l\240\0\0" - "\0\0\0\0\0l\264\0l\264\0\0\0\0\0\0\0l\310\0l\310\0\0\0\0\0\0\0l\334\0l\334" - "\0\0\0\0\0\0\0l\360\0l\360\0l\360\0l\360\0l\360\0l\360\0l\360\0l\360\0\0" - "\0\0\0\0\0H\360\0H\360\0H\360\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0" - "\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0H\0\0H\0\0\0\0\0l\0\0l\0\0l\0\0" - "\0\0\0l\24\0l\24\0l\24\0\0\0\0l(\0l(\0l(\0\0\0\0l<\0l<\0l<\0\0\0\0lP\0lP" - "\0lP\0\0\0\0ld\0ld\0ld\0\0\0\0lx\0lx\0lx\0\0\0\0l\214\0l\214\0l\214\0\0\0" - "\0l\240\0l\240\0l\240\0\0\0\0l\264\0l\264\0l\264\0\0\0\0l\310\0l\310\0l\310" - "\0\0\0\0l\334\0l\334\0l\334\0\0\0\0l\360\0l\360\0l\360\0l\360\0l\360\0l\360" - "\0l\360\0l\360\0l\360\0l\360\0l\360\0l\360\0\0\0\0H\360\0H\360\0\0\0\0\0" - "\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0H\0" - "\0H\0\0\0\0\0l\0\0l\0\0l\0\0\0\0\0l\24\0l\24\0l\24\0\0\0\0l(\0l(\0l(\0\0" - "\0\0l<\0l<\0l<\0\0\0\0lP\0lP\0lP\0\0\0\0ld\0ld\0ld\0\0\0\0lx\0lx\0lx\0\0" - "\0\0l\214\0l\214\0l\214\0\0\0\0l\240\0l\240\0l\240\0\0\0\0l\264\0l\264\0" - "l\264\0\0\0\0l\310\0l\310\0l\310\0\0\0\0l\334\0l\334\0l\334\0\0\0\0l\360" - "\0l\360\0l\360\0l\360\0l\360\0l\360\0l\360\0l\360\0l\360\0l\360\0l\360\0" - "l\360\0l\360\0l\360\0\0\0\0H\360\0H\360\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0" - "\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0H\0\0\0\0\0l\0\0l\0\0l\0\0\0\0\0" - "\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0" - "\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0" - "\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0" - "\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0" - "\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0l\360\0l\360\0l\360\0l\360" - "\0\0\0\0H\360\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0" - "\0\0\0\0\0\0\0\0\0\0l\0\0l\0\0l\0\0\0\0\0\0\0\0\220\0\0\220\0\0\0\0\0\0\0" - "\0\220\24\0\220\24\0\0\0\0\0\0\0\220(\0\220(\0\0\0\0\0\0\0\220<\0\220<\0" - "\0\0\0\0\0\0\220P\0\220P\0\0\0\0\0\0\0\220d\0\220d\0\0\0\0\0\0\0\220x\0\220" - "x\0\0\0\0\0\0\0\220\214\0\220\214\0\0\0\0\0\0\0\220\240\0\220\240\0\0\0\0" - "\0\0\0\220\264\0\220\264\0\0\0\0\0\0\0\220\310\0\220\310\0\0\0\0\0\0\0\220" - "\334\0\220\334\0\0\0\0\0\0\0\220\360\0\220\360\0\220\360\0\220\360\0\220" - "\360\0\220\360\0\220\360\0\220\360\0\0\0\0\0\0\0l\360\0l\360\0l\360\0\0\0" - "\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0" - "\0\0\0\0l\0\0l\0\0\0\0\0\220\0\0\220\0\0\220\0\0\0\0\0\220\24\0\220\24\0" - "\220\24\0\0\0\0\220(\0\220(\0\220(\0\0\0\0\220<\0\220<\0\220<\0\0\0\0\220" - "P\0\220P\0\220P\0\0\0\0\220d\0\220d\0\220d\0\0\0\0\220x\0\220x\0\220x\0\0" - "\0\0\220\214\0\220\214\0\220\214\0\0\0\0\220\240\0\220\240\0\220\240\0\0" - "\0\0\220\264\0\220\264\0\220\264\0\0\0\0\220\310\0\220\310\0\220\310\0\0" - "\0\0\220\334\0\220\334\0\220\334\0\0\0\0\220\360\0\220\360\0\220\360\0\220" - "\360\0\220\360\0\220\360\0\220\360\0\220\360\0\220\360\0\220\360\0\220\360" - "\0\220\360\0\0\0\0l\360\0l\360\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0" - "\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0l\0\0l\0\0\0\0\0\220\0\0\220\0\0\220" - "\0\0\0\0\0\220\24\0\220\24\0\220\24\0\0\0\0\220(\0\220(\0\220(\0\0\0\0\220" - "<\0\220<\0\220<\0\0\0\0\220P\0\220P\0\220P\0\0\0\0\220d\0\220d\0\220d\0\0" - "\0\0\220x\0\220x\0\220x\0\0\0\0\220\214\0\220\214\0\220\214\0\0\0\0\220\240" - "\0\220\240\0\220\240\0\0\0\0\220\264\0\220\264\0\220\264\0\0\0\0\220\310" - "\0\220\310\0\220\310\0\0\0\0\220\334\0\220\334\0\220\334\0\0\0\0\220\360" - "\0\220\360\0\220\360\0\220\360\0\220\360\0\220\360\0\220\360\0\220\360\0" - "\220\360\0\220\360\0\220\360\0\220\360\0\220\360\0\220\360\0\0\0\0l\360\0" - "l\360\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0" - "\0\0\0l\0\0\0\0\0\220\0\0\220\0\0\220\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0" - "\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0" - "\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0" - "\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0" - "\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0" - "\0\0\0\0\0\0\0\0\0\0\0\220\360\0\220\360\0\220\360\0\220\360\0\0\0\0l\360" - "\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0" - "\0\0\0\0\220\0\0\220\0\0\220\0\0\0\0\0\0\0\0\264\0\0\264\0\0\0\0\0\0\0\0" - "\264\24\0\264\24\0\0\0\0\0\0\0\264(\0\264(\0\0\0\0\0\0\0\264<\0\264<\0\0" - "\0\0\0\0\0\264P\0\264P\0\0\0\0\0\0\0\264d\0\264d\0\0\0\0\0\0\0\264x\0\264" - "x\0\0\0\0\0\0\0\264\214\0\264\214\0\0\0\0\0\0\0\264\240\0\264\240\0\0\0\0" - "\0\0\0\264\264\0\264\264\0\0\0\0\0\0\0\264\310\0\264\310\0\0\0\0\0\0\0\264" - "\334\0\264\334\0\0\0\0\0\0\0\264\360\0\264\360\0\264\360\0\264\360\0\264" - "\360\0\264\360\0\264\360\0\264\360\0\0\0\0\0\0\0\220\360\0\220\360\0\220" - "\360\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0" - "\0\0\0\0\0\0\0\0\0\220\0\0\220\0\0\0\0\0\264\0\0\264\0\0\264\0\0\0\0\0\264" - "\24\0\264\24\0\264\24\0\0\0\0\264(\0\264(\0\264(\0\0\0\0\264<\0\264<\0\264" - "<\0\0\0\0\264P\0\264P\0\264P\0\0\0\0\264d\0\264d\0\264d\0\0\0\0\264x\0\264" - "x\0\264x\0\0\0\0\264\214\0\264\214\0\264\214\0\0\0\0\264\240\0\264\240\0" - "\264\240\0\0\0\0\264\264\0\264\264\0\264\264\0\0\0\0\264\310\0\264\310\0" - "\264\310\0\0\0\0\264\334\0\264\334\0\264\334\0\0\0\0\264\360\0\264\360\0" - "\264\360\0\264\360\0\264\360\0\264\360\0\264\360\0\264\360\0\264\360\0\264" - "\360\0\264\360\0\264\360\0\0\0\0\220\360\0\220\360\0\0\0\0\0\0\0\0\0\0\0" - "\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\220\0\0\220\0" - "\0\0\0\0\264\0\0\264\0\0\264\0\0\0\0\0\264\24\0\264\24\0\264\24\0\0\0\0\264" - "(\0\264(\0\264(\0\0\0\0\264<\0\264<\0\264<\0\0\0\0\264P\0\264P\0\264P\0\0" - "\0\0\264d\0\264d\0\264d\0\0\0\0\264x\0\264x\0\264x\0\0\0\0\264\214\0\264" - "\214\0\264\214\0\0\0\0\264\240\0\264\240\0\264\240\0\0\0\0\264\264\0\264" - "\264\0\264\264\0\0\0\0\264\310\0\264\310\0\264\310\0\0\0\0\264\334\0\264" - "\334\0\264\334\0\0\0\0\264\360\0\264\360\0\264\360\0\264\360\0\264\360\0" - "\264\360\0\264\360\0\264\360\0\264\360\0\264\360\0\264\360\0\264\360\0\264" - "\360\0\264\360\0\0\0\0\220\360\0\220\360\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0" - "\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\220\0\0\0\0\0\264\0\0\264\0\0" - "\264\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0" - "\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0" - "\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0" - "\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0" - "\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\264\360\0" - "\264\360\0\264\360\0\264\360\0\0\0\0\220\360\0\0\0\0\0\0\0\0\0\0\0\0\0\0" - "\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\264\0\0\264\0\0\264" - "\0\0\0\0\0\0\0\0\330\0\0\330\0\0\0\0\0\0\0\0\330\24\0\330\24\0\0\0\0\0\0" - "\0\330(\0\330(\0\0\0\0\0\0\0\330<\0\330<\0\0\0\0\0\0\0\330P\0\330P\0\0\0" - "\0\0\0\0\330d\0\330d\0\0\0\0\0\0\0\330x\0\330x\0\0\0\0\0\0\0\330\214\0\330" - "\214\0\0\0\0\0\0\0\330\240\0\330\240\0\0\0\0\0\0\0\330\264\0\330\264\0\0" - "\0\0\0\0\0\330\310\0\330\310\0\0\0\0\0\0\0\330\334\0\330\334\0\0\0\0\0\0" - "\0\330\360\0\330\360\0\330\360\0\330\360\0\330\360\0\330\360\0\330\360\0" - "\330\360\0\0\0\0\0\0\0\264\360\0\264\360\0\264\360\0\0\0\0\0\0\0\0\0\0\0" - "\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\264\0\0" - "\264\0\0\0\0\0\330\0\0\330\0\0\330\0\0\0\0\0\330\24\0\330\24\0\330\24\0\0" - "\0\0\330(\0\330(\0\330(\0\0\0\0\330<\0\330<\0\330<\0\0\0\0\330P\0\330P\0" - "\330P\0\0\0\0\330d\0\330d\0\330d\0\0\0\0\330x\0\330x\0\330x\0\0\0\0\330\214" - "\0\330\214\0\330\214\0\0\0\0\330\240\0\330\240\0\330\240\0\0\0\0\330\264" - "\0\330\264\0\330\264\0\0\0\0\330\310\0\330\310\0\330\310\0\0\0\0\330\334" - "\0\330\334\0\330\334\0\0\0\0\330\360\0\330\360\0\330\360\0\330\360\0\330" - "\360\0\330\360\0\330\360\0\330\360\0\330\360\0\330\360\0\330\360\0\330\360" - "\0\0\0\0\264\360\0\264\360\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0" - "\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\264\0\0\264\0\0\0\0\0\330\0\0\330\0\0" - "\330\0\0\0\0\0\330\24\0\330\24\0\330\24\0\0\0\0\330(\0\330(\0\330(\0\0\0" - "\0\330<\0\330<\0\330<\0\0\0\0\330P\0\330P\0\330P\0\0\0\0\330d\0\330d\0\330" - "d\0\0\0\0\330x\0\330x\0\330x\0\0\0\0\330\214\0\330\214\0\330\214\0\0\0\0" - "\330\240\0\330\240\0\330\240\0\0\0\0\330\264\0\330\264\0\330\264\0\0\0\0" - "\330\310\0\330\310\0\330\310\0\0\0\0\330\334\0\330\334\0\330\334\0\0\0\0" - "\330\360\0\330\360\0\330\360\0\330\360\0\330\360\0\330\360\0\330\360\0\330" - "\360\0\330\360\0\330\360\0\330\360\0\330\360\0\330\360\0\330\360\0\0\0\0" - "\264\360\0\264\360\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0" - "\0\0\0\0\0\0\0\0\0\0\264\0\0\0\0\0\330\0\0\330\0\0\330\0\0\0\0\0\0\0\0\0" - "\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0" - "\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0" - "\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0" - "\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0" - "\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\330\360\0\330\360\0\330\360\0\330" - "\360\0\0\0\0\264\360\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0" - "\0\0\0\0\0\0\0\0\0\0\0\0\0\0\330\0\0\330\0\0\330\0\0\0\0\0\0\0\0\374\0\0" - "\374\0\0\0\0\0\0\0\0\374\24\0\374\24\0\0\0\0\0\0\0\374(\0\374(\0\0\0\0\0" - "\0\0\374<\0\374<\0\0\0\0\0\0\0\374P\0\374P\0\0\0\0\0\0\0\374d\0\374d\0\0" - "\0\0\0\0\0\374x\0\374x\0\0\0\0\0\0\0\374\214\0\374\214\0\0\0\0\0\0\0\374" - "\240\0\374\240\0\0\0\0\0\0\0\374\264\0\374\264\0\0\0\0\0\0\0\374\310\0\374" - "\310\0\0\0\0\0\0\0\374\334\0\374\334\0\0\0\0\0\0\0\374\360\0\374\360\0\374" - "\360\0\374\360\0\374\360\0\374\360\0\374\360\0\374\360\0\0\0\0\0\0\0\330" - "\360\0\330\360\0\330\360\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0" - "\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\330\0\0\330\0\0\0\0\0\374\0\0\374" - "\0\0\374\0\0\0\0\0\374\24\0\374\24\0\374\24\0\0\0\0\374(\0\374(\0\374(\0" - "\0\0\0\374<\0\374<\0\374<\0\0\0\0\374P\0\374P\0\374P\0\0\0\0\374d\0\374d" - "\0\374d\0\0\0\0\374x\0\374x\0\374x\0\0\0\0\374\214\0\374\214\0\374\214\0" - "\0\0\0\374\240\0\374\240\0\374\240\0\0\0\0\374\264\0\374\264\0\374\264\0" - "\0\0\0\374\310\0\374\310\0\374\310\0\0\0\0\374\334\0\374\334\0\374\334\0" - "\0\0\0\374\360\0\374\360\0\374\360\0\374\360\0\374\360\0\374\360\0\374\360" - "\0\374\360\0\374\360\0\374\360\0\374\360\0\374\360\0\0\0\0\330\360\0\330" - "\360\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0" - "\0\0\0\0\0\0\330\0\0\330\0\0\0\0\0\374\0\0\374\0\0\374\0\0\0\0\0\374\24\0" - "\374\24\0\374\24\0\0\0\0\374(\0\374(\0\374(\0\0\0\0\374<\0\374<\0\374<\0" - "\0\0\0\374P\0\374P\0\374P\0\0\0\0\374d\0\374d\0\374d\0\0\0\0\374x\0\374x" - "\0\374x\0\0\0\0\374\214\0\374\214\0\374\214\0\0\0\0\374\240\0\374\240\0\374" - "\240\0\0\0\0\374\264\0\374\264\0\374\264\0\0\0\0\374\310\0\374\310\0\374" - "\310\0\0\0\0\374\334\0\374\334\0\374\334\0\0\0\0\374\360\0\374\360\0\374" - "\360\0\374\360\0\374\360\0\374\360\0\374\360\0\374\360\0\374\360\0\374\360" - "\0\374\360\0\374\360\0\374\360\0\374\360\0\0\0\0\330\360\0\330\360\0\0\0" - "\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\330" - "\0\0\0\0\0\374\0\0\374\0\0\374\0\0\0\0\0\374\24\0\374\24\0\374\24\0\0\0\0" - "\374(\0\374(\0\374(\0\0\0\0\374<\0\374<\0\374<\0\0\0\0\374P\0\374P\0\374" - "P\0\0\0\0\374d\0\374d\0\374d\0\0\0\0\374x\0\374x\0\374x\0\0\0\0\374\214\0" - "\374\214\0\374\214\0\0\0\0\374\240\0\374\240\0\374\240\0\0\0\0\374\264\0" - "\374\264\0\374\264\0\0\0\0\374\310\0\374\310\0\374\310\0\0\0\0\374\334\0" - "\374\334\0\374\334\0\0\0\0\374\360\0\374\360\0\374\360\0\374\360\0\374\360" - "\0\374\360\0\374\360\0\374\360\0\374\360\0\374\360\0\374\360\0\374\360\0" - "\374\360\0\374\360\0\374\360\0\374\360\0\0\0\0\330\360\0\0\0\0\0\0\0\0\0" - "\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\374\0\0\374" - "\0\0\374\0\0\0\0\0\374\24\0\374\24\0\374\24\0\0\0\0\374(\0\374(\0\374(\0" - "\0\0\0\374<\0\374<\0\374<\0\0\0\0\374P\0\374P\0\374P\0\0\0\0\374d\0\374d" - "\0\374d\0\0\0\0\374x\0\374x\0\374x\0\0\0\0\374\214\0\374\214\0\374\214\0" - "\0\0\0\374\240\0\374\240\0\374\240\0\0\0\0\374\264\0\374\264\0\374\264\0" - "\0\0\0\374\310\0\374\310\0\374\310\0\0\0\0\374\334\0\374\334\0\374\334\0" - "\0\0\0\374\360\0\374\360\0\374\360\0\374\360\0\374\360\0\374\360\0\374\360" - "\0\374\360\0\374\360\0\374\360\0\374\360\0\374\360\0\374\360\0\374\360\0" - "\374\360\0\374\360\0\374\360\0\374\360\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0" - "\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\374\0\0\374\0\0\374" - "\0\0\0\0\0\374\24\0\374\24\0\374\24\0\0\0\0\374(\0\374(\0\374(\0\0\0\0\374" - "<\0\374<\0\374<\0\0\0\0\374P\0\374P\0\374P\0\0\0\0\374d\0\374d\0\374d\0\0" - "\0\0\374x\0\374x\0\374x\0\0\0\0\374\214\0\374\214\0\374\214\0\0\0\0\374\240" - "\0\374\240\0\374\240\0\0\0\0\374\264\0\374\264\0\374\264\0\0\0\0\374\310" - "\0\374\310\0\374\310\0\0\0\0\374\334\0\374\334\0\374\334\0\0\0\0\374\360" - "\0\374\360\0\374\360\0\0\0\0\0\0\0\0\0\0\0\0\0\374\360\0\374\360\0\374\360" - "\0\374\360\0\0\0\0\0\0\0\0\0\0\0\0\0\374\360\0\374\360\0\374\360\0\0\0\0" - "\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0" - "\374\0\0\374\0\0\374\0\0\0\0\0\374\24\0\374\24\0\374\24\0\0\0\0\374(\0\374" - "(\0\374(\0\0\0\0\374<\0\374<\0\374<\0\0\0\0\374P\0\374P\0\374P\0\0\0\0\374" - "d\0\374d\0\374d\0\0\0\0\374x\0\374x\0\374x\0\0\0\0\374\214\0\374\214\0\374" - "\214\0\0\0\0\374\240\0\374\240\0\374\240\0\0\0\0\374\264\0\374\264\0\374" - "\264\0\0\0\0\374\310\0\374\310\0\374\310\0\0\0\0\374\334\0\374\334\0\374" - "\334\0\0\0\0\374\360\0\374\360\0\374\360\0\374\360\0\0\0\0\0\0\0\374\334" - "\0\0\0\0\374\360\0\374\360\0\374\360\0\374\360\0\0\0\0\0\0\0\374\334\0\0" - "\0\0\374\360\0\374\360\0\374\360\0\374\360\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0" - "\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\374\0\0\374\0\0\374\0\0\0\0" - "\0\374\24\0\374\24\0\374\24\0\0\0\0\374(\0\374(\0\374(\0\0\0\0\374<\0\374" - "<\0\374<\0\0\0\0\374P\0\374P\0\374P\0\0\0\0\374d\0\374d\0\374d\0\0\0\0\374" - "x\0\374x\0\374x\0\0\0\0\374\214\0\374\214\0\374\214\0\0\0\0\374\240\0\374" - "\240\0\374\240\0\0\0\0\374\264\0\374\264\0\374\264\0\0\0\0\374\310\0\374" - "\310\0\374\310\0\0\0\0\374\334\0\374\334\0\374\334\0\0\0\0\374\360\0\374" - "\360\0\374\360\0\374\360\0\0\0\0\0\0\0\0\0\0\0\0\0\374\360\0\374\360\0\374" - "\360\0\374\360\0\0\0\0\0\0\0\0\0\0\0\0\0\374\360\0\374\360\0\374\360\0\374" - "\360\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0" - "\0\0\0\374\0\0\374\0\0\374\0\0\0\0\0\374\24\0\374\24\0\374\24\0\0\0\0\374" - "(\0\374(\0\374(\0\0\0\0\374<\0\374<\0\374<\0\0\0\0\374P\0\374P\0\374P\0\0" - "\0\0\374d\0\374d\0\374d\0\0\0\0\374x\0\374x\0\374x\0\0\0\0\374\214\0\374" - "\214\0\374\214\0\0\0\0\374\240\0\374\240\0\374\240\0\0\0\0\374\264\0\374" - "\264\0\374\264\0\0\0\0\374\310\0\374\310\0\374\310\0\0\0\0\374\334\0\374" - "\334\0\374\334\0\0\0\0\374\360\0\374\360\0\374\360\0\374\360\0\374\360\0" - "\374\360\0\374\360\0\374\360\0\374\360\0\374\360\0\374\360\0\374\360\0\374" - "\360\0\374\360\0\374\360\0\374\360\0\374\360\0\374\360\0\374\360\0\374\360" - "\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0" - "\0\374\0\0\374\0\0\374\0\0\0\0\0\374\24\0\374\24\0\374\24\0\0\0\0\374(\0" - "\374(\0\374(\0\0\0\0\374<\0\374<\0\374<\0\0\0\0\374P\0\374P\0\374P\0\0\0" - "\0\374d\0\374d\0\374d\0\0\0\0\374x\0\374x\0\374x\0\0\0\0\374\214\0\374\214" - "\0\374\214\0\0\0\0\374\240\0\374\240\0\374\240\0\0\0\0\374\264\0\374\264" - "\0\374\264\0\0\0\0\374\310\0\374\310\0\374\310\0\0\0\0\374\334\0\374\334" - "\0\374\334\0\0\0\0\374\360\0\374\360\0\374\360\0\374\360\0\374\360\0\374" - "\360\0\374\360\0\374\360\0\374\360\0\374\360\0\374\360\0\374\360\0\374\360" - "\0\374\360\0\374\360\0\374\360\0\374\360\0\374\360\0\374\360\0\374\360\0" - "\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0" - "\374\0\0\374\0\0\374\0\0\0\0\0\374\24\0\374\24\0\374\24\0\0\0\0\374(\0\374" - "(\0\374(\0\0\0\0\374<\0\374<\0\374<\0\0\0\0\374P\0\374P\0\374P\0\0\0\0\374" - "d\0\374d\0\374d\0\0\0\0\374x\0\374x\0\374x\0\0\0\0\374\214\0\374\214\0\374" - "\214\0\0\0\0\374\240\0\374\240\0\374\240\0\0\0\0\374\264\0\374\264\0\374" - "\264\0\0\0\0\374\310\0\374\310\0\374\310\0\0\0\0\374\334\0\374\334\0\374" - "\334\0\0\0\0\374\360\0\374\360\0\374\360\0\374\360\0\374\360\0\374\360\0" - "\374\360\0\374\360\0\374\360\0\0\0\0\0\0\0\374\360\0\374\360\0\374\360\0" - "\374\360\0\374\360\0\374\360\0\374\360\0\374\360\0\374\360\0\0\0\0\0\0\0" - "\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\374\0\0\374" - "\0\0\374\0\0\0\0\0\374\24\0\374\24\0\374\24\0\0\0\0\374(\0\374(\0\374(\0" - "\0\0\0\374<\0\374<\0\374<\0\0\0\0\374P\0\374P\0\374P\0\0\0\0\374d\0\374d" - "\0\374d\0\0\0\0\374x\0\374x\0\374x\0\0\0\0\374\214\0\374\214\0\374\214\0" - "\0\0\0\374\240\0\374\240\0\374\240\0\0\0\0\374\264\0\374\264\0\374\264\0" - "\0\0\0\374\310\0\374\310\0\374\310\0\0\0\0\374\334\0\374\334\0\374\334\0" - "\0\0\0\374\360\0\374\360\0\374\360\0\374\360\0\374\360\0\374\360\0\374\360" - "\0\374\360\0\374\360\0\0\0\0\0\0\0\374\360\0\374\360\0\374\360\0\374\360" - "\0\374\360\0\374\360\0\374\360\0\374\360\0\374\360\0\0\0\0\0\0\0\0\0\0\0" - "\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\374\0\0\374\0\0\374" - "\0\0\0\0\0\374\24\0\374\24\0\374\24\0\0\0\0\374(\0\374(\0\374(\0\0\0\0\374" - "<\0\374<\0\374<\0\0\0\0\374P\0\374P\0\374P\0\0\0\0\374d\0\374d\0\374d\0\0" - "\0\0\374x\0\374x\0\374x\0\0\0\0\374\214\0\374\214\0\374\214\0\0\0\0\374\240" - "\0\374\240\0\374\240\0\0\0\0\374\264\0\374\264\0\374\264\0\0\0\0\374\310" - "\0\374\310\0\374\310\0\0\0\0\374\334\0\374\334\0\374\334\0\0\0\0\374\360" - "\0\374\360\0\374\360\0\374\360\0\374\360\0\374\360\0\374\360\0\374\360\0" - "\374\360\0\374\360\0\374\360\0\374\360\0\374\360\0\374\360\0\374\360\0\374" - "\360\0\374\360\0\374\360\0\374\360\0\374\360\0\0\0\0\0\0\0\0\0\0\0\0\0\0" - "\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\374\0\0\374\0\0\374" - "\0\0\0\0\0\374\24\0\374\24\0\374\24\0\0\0\0\374(\0\374(\0\374(\0\0\0\0\374" - "<\0\374<\0\374<\0\0\0\0\374P\0\374P\0\374P\0\0\0\0\374d\0\374d\0\374d\0\0" - "\0\0\374x\0\374x\0\374x\0\0\0\0\374\214\0\374\214\0\374\214\0\0\0\0\374\240" - "\0\374\240\0\374\240\0\0\0\0\374\264\0\374\264\0\374\264\0\0\0\0\374\310" - "\0\374\310\0\374\310\0\0\0\0\374\334\0\374\334\0\374\334\0\0\0\0\374\360" - "\0\374\360\0\374\360\0\374\360\0\374\360\0\374\360\0\374\360\0\374\360\0" - "\374\360\0\374\360\0\374\360\0\374\360\0\374\360\0\374\360\0\374\360\0\374" - "\360\0\374\360\0\374\360\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0" - "\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\374\0\0\374\0\0\0\0\0\0\0\0\374\24" - "\0\374\24\0\0\0\0\0\0\0\374(\0\374(\0\0\0\0\0\0\0\374<\0\374<\0\0\0\0\0\0" - "\0\374P\0\374P\0\0\0\0\0\0\0\374d\0\374d\0\0\0\0\0\0\0\374x\0\374x\0\0\0" - "\0\0\0\0\374\214\0\374\214\0\0\0\0\0\0\0\374\240\0\374\240\0\0\0\0\0\0\0" - "\374\264\0\374\264\0\0\0\0\0\0\0\374\310\0\374\310\0\0\0\0\0\0\0\374\334" - "\0\374\334\0\0\0\0\0\0\0\374\360\0\374\360\0\0\0\0\0\0\0\0\0\0\374\360\0" - "\374\360\0\374\360\0\374\360\0\374\360\0\374\360\0\374\360\0\374\360\0\0" - "\0\0\0\0\0\0\0\0\374\360\0\374\360\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0" - "\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\374\0\0\374\0\0\0" - "\0\0\0\0\0\374\24\0\374\24\0\0\0\0\0\0\0\374(\0\374(\0\0\0\0\0\0\0\374<\0" - "\374<\0\0\0\0\0\0\0\374P\0\374P\0\0\0\0\0\0\0\374d\0\374d\0\0\0\0\0\0\0\374" - "x\0\374x\0\0\0\0\0\0\0\374\214\0\374\214\0\0\0\0\0\0\0\374\240\0\374\240" - "\0\0\0\0\0\0\0\374\264\0\374\264\0\0\0\0\0\0\0\374\310\0\374\310\0\0\0\0" - "\0\0\0\374\334\0\374\334\0\0\0\0\0\0\0\374\360\0\374\360\0\0\0\0\0\0\0\0" - "\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\374\360\0\374" - "\360\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0" - "\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\374\0\0\374\0\0\0\0\0\0\0\0\374\24\0" - "\374\24\0\0\0\0\0\0\0\374(\0\374(\0\0\0\0\0\0\0\374<\0\374<\0\0\0\0\0\0\0" - "\374P\0\374P\0\0\0\0\0\0\0\374d\0\374d\0\0\0\0\0\0\0\374x\0\374x\0\0\0\0" - "\0\0\0\374\214\0\374\214\0\0\0\0\0\0\0\374\240\0\374\240\0\0\0\0\0\0\0\374" - "\264\0\374\264\0\0\0\0\0\0\0\374\310\0\374\310\0\0\0\0\0\0\0\374\334\0\374" - "\334\0\0\0\0\0\0\0\374\360\0\374\360\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0" - "\0\0\0\0\0\0\0\0\0\0\0\0\0\374\360\0\374\360\0\0\0\0\0\0\0\0\0\0\0\0\0\0" - "\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0" - "\0\0\0\0\0\0\0\0\374\0\0\374\0\0\374\0\0\0\0\0\374\24\0\374\24\0\374\24\0" - "\0\0\0\374(\0\374(\0\374(\0\0\0\0\374<\0\374<\0\374<\0\0\0\0\374P\0\374P" - "\0\374P\0\0\0\0\374d\0\374d\0\374d\0\0\0\0\374x\0\374x\0\374x\0\0\0\0\374" - "\214\0\374\214\0\374\214\0\0\0\0\374\240\0\374\240\0\374\240\0\0\0\0\374" - "\264\0\374\264\0\374\264\0\0\0\0\374\310\0\374\310\0\374\310\0\0\0\0\374" - "\334\0\374\334\0\374\334\0\0\0\0\374\360\0\374\360\0\374\360\0\0\0\0\0\0" - "\0\0\0\0\0\0\0\0\0\0\0\0\0\374\360\0\374\360\0\374\360\0\0\0\0\0\0\0\0\0" - "\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0" - "\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\374\0\0\374\0\0\0\0\0\0\0\0" - "\374\24\0\374\24\0\0\0\0\0\0\0\374(\0\374(\0\0\0\0\0\0\0\374<\0\374<\0\0" - "\0\0\0\0\0\374P\0\374P\0\0\0\0\0\0\0\374d\0\374d\0\0\0\0\0\0\0\374x\0\374" - "x\0\0\0\0\0\0\0\374\214\0\374\214\0\0\0\0\0\0\0\374\240\0\374\240\0\0\0\0" - "\0\0\0\374\264\0\374\264\0\0\0\0\0\0\0\374\310\0\374\310\0\0\0\0\0\0\0\374" - "\334\0\374\334\0\0\0\0\0\0\0\374\360\0\374\360\0\374\360\0\374\360\0\374" - "\360\0\374\360\0\374\360\0\374\360\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0" - "\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0" - "\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0" - "\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0" - "\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0" - "\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0" - "\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0" - "\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0" - "\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0" - "\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0" - "\0\0\0\0\0\0\0\0\0\0\0\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""00\0""00\0\356\356\0\356\356" - "\0\40\40\0\40\40\0\367\367\0\367\367\0\16\16\0\16\16\0\374\374\0\374\374" - "\0\374\374\0\374\374\0\360\360\0\360\360\0\360\360\0\360\360\0\0\0\0\0\0" - "\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0" - "\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0" - "\0\24\24\0\24\24\0\24\24\0\20\20\0""88\0""88\0""88\0**\0ff\0ff\0ff\0FF\0" - "\215\215\0\215\215\0\215\215\0UU\0\255\255\0\255\255\0\255\255\0[[\0\306" - "\306\0\306\306\0\306\306\0YY\0\331\331\0\331\331\0\331\331\0PP\0\350\350" - "\0\350\350\0\350\350\0DD\0\362\362\0\362\362\0\362\362\0""44\0\370\370\0" - "\370\370\0\370\370\0\"\"\0\374\374\0\374\374\0\374\374\0\16\16\0\376\376" - "\0\376\376\0\376\376\0\376\376\0\374\374\0\374\374\0\374\374\0\374\374\0" - "\360\360\0\360\360\0\360\360\0\360\360\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0" - "\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0" - "\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\24\24\0\24\24\0\24\24\0\20\20\0""88\0" - """88\0""88\0**\0ff\0ff\0ff\0FF\0\226\226\0\226\226\0\215\215\0UU\0\271\271" - "\0\271\271\0\255\255\0[[\0\323\323\0\323\323\0\306\306\0YY\0\345\345\0\345" - "\345\0\331\331\0PP\0\360\360\0\360\360\0\350\350\0DD\0\370\370\0\370\370" - "\0\362\362\0""44\0\374\374\0\374\374\0\370\370\0\"\"\0\376\376\0\376\376" - "\0\374\374\0\16\16\0\376\376\0\376\376\0\376\376\0\376\376\0\376\376\0\376" - "\376\0\374\374\0\374\374\0\374\374\0\374\374\0\360\360\0\360\360\0\360\360" - "\0\360\360\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0" - "\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\24\24" - "\0\24\24\0\24\24\0\20\20\0""33\0""33\0""33\0&&\0OO\0OO\0OO\0""55\0``\0``" - "\0``\0::\0``\0``\0``\0""22\0WW\0WW\0WW\0''\0II\0II\0II\0\33\33\0""99\0""9" - "9\0""99\0\20\20\0))\0))\0))\0\10\10\0\33\33\0\33\33\0\33\33\0\3\3\0\17\17" - "\0\17\17\0\17\17\0\0\0\0\7\7\0\7\7\0\7\7\0\7\7\0\2\2\0\2\2\0\2\2\0\2\2\0" - "\16\16\0\16\16\0\16\16\0\16\16\0\360\360\0\360\360\0\360\360\0\360\360\0" - "\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0" - "\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\24\24\0\24\24\0\24\24\0\16\16" - "\0""33\0GG\0GG\0""00\0``\0\210\210\0\210\210\0TT\0\204\204\0\263\263\0\263" - "\263\0ee\0\222\222\0\315\315\0\312\312\0gg\0\216\216\0\331\331\0\327\327" - "\0cc\0\202\202\0\340\340\0\337\337\0YY\0qq\0\345\345\0\344\344\0NN\0^^\0" - "\352\352\0\352\352\0@@\0JJ\0\357\357\0\357\357\0""11\0""66\0\364\364\0\364" - "\364\0\40\40\0\"\"\0\371\371\0\371\371\0\16\16\0\16\16\0\375\375\0\375\375" - "\0\376\376\0\376\376\0\362\362\0\362\362\0\376\376\0\376\376\0\16\16\0\16" - "\16\0\360\360\0\360\360\0\360\360\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0" - "\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\24" - "\24\0\24\24\0\22\22\0\24\24\0""88\0""88\0//\0BB\0pp\0pp\0UU\0ss\0\242\242" - "\0\242\242\0oo\0\230\230\0\306\306\0\306\306\0ww\0\265\265\0\335\335\0\335" - "\335\0ss\0\313\313\0\353\353\0\353\353\0ii\0\333\333\0\364\364\0\364\364" - "\0ZZ\0\351\351\0\371\371\0\371\371\0II\0\362\362\0\374\374\0\374\374\0""6" - "6\0\370\370\0\376\376\0\376\376\0\"\"\0\374\374\0\376\376\0\376\376\0\16" - "\16\0\376\376\0\376\376\0\376\376\0\376\376\0\375\375\0\376\376\0\376\376" - "\0\376\376\0\360\360\0\360\360\0\360\360\0\360\360\0\16\16\0\360\360\0\360" - "\360\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0" - "\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\24\24\0\24\24\0\22\22\0\"\"\0""88\0" - """88\0//\0OO\0pp\0pp\0WW\0\203\203\0\242\242\0\242\242\0qq\0\256\256\0\312" - "\312\0\301\301\0||\0\313\313\0\342\342\0\325\325\0yy\0\336\336\0\360\360" - "\0\342\342\0mm\0\353\353\0\367\367\0\354\354\0\\\\\0\363\363\0\373\373\0" - "\362\362\0JJ\0\371\371\0\375\375\0\367\367\0""66\0\374\374\0\376\376\0\373" - "\373\0\"\"\0\376\376\0\376\376\0\375\375\0\16\16\0\376\376\0\376\376\0\376" - "\376\0\376\376\0\376\376\0\376\376\0\375\375\0\376\376\0\376\376\0\375\375" - "\0\360\360\0\374\374\0\360\360\0\376\376\0\16\16\0\360\360\0\360\360\0\0" - "\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0" - "\0\0\0\0\0\0\0\0\0\0\0\24\24\0\22\22\0&&\0\"\"\0""88\0//\0PP\0HH\0gg\0NN" - "\0pp\0ee\0}}\0VV\0{{\0oo\0\202\202\0NN\0qq\0jj\0vv\0>>\0``\0\\\\\0cc\0,," - "\0MM\0KK\0OO\0\35\35\0::\0""99\0;;\0\21\21\0**\0))\0**\0\10\10\0\33\33\0" - "\33\33\0\33\33\0\3\3\0\17\17\0\17\17\0\17\17\0\0\0\0\7\7\0\7\7\0\7\7\0\7" - "\7\0\2\2\0\2\2\0\2\2\0\2\2\0\16\16\0\16\16\0\16\16\0\16\16\0\360\360\0\360" - "\360\0\376\376\0\376\376\0\16\16\0\360\360\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0" - "\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\22\22" - "\0&&\0&&\0\"\"\0""66\0[[\0oo\0ee\0``\0\220\220\0\270\270\0\250\250\0xx\0" - "\250\250\0\327\327\0\311\311\0zz\0\246\246\0\341\341\0\325\325\0rr\0\230" - "\230\0\343\343\0\334\334\0gg\0\205\205\0\344\344\0\340\340\0[[\0rr\0\346" - "\346\0\344\344\0NN\0^^\0\352\352\0\352\352\0AA\0JJ\0\357\357\0\357\357\0" - """11\0""66\0\364\364\0\364\364\0\40\40\0\"\"\0\371\371\0\371\371\0\16\16" - "\0\16\16\0\375\375\0\375\375\0\376\376\0\376\376\0\362\362\0\362\362\0\376" - "\376\0\376\376\0\16\16\0\16\16\0\376\376\0\376\376\0\376\376\0\16\16\0\0" - "\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0" - "\0\0\0\0\0\0\0\0\0\0\0\22\22\0&&\0&&\0\37\37\0;;\0``\0``\0HH\0qq\0\237\237" - "\0\237\237\0nn\0\227\227\0\306\306\0\306\306\0}}\0\254\254\0\334\334\0\334" - "\334\0}}\0\275\275\0\347\347\0\347\347\0vv\0\316\316\0\357\357\0\357\357" - "\0ii\0\334\334\0\365\365\0\365\365\0ZZ\0\351\351\0\371\371\0\371\371\0II" - "\0\362\362\0\374\374\0\374\374\0""66\0\370\370\0\376\376\0\376\376\0\"\"" - "\0\374\374\0\376\376\0\376\376\0\16\16\0\376\376\0\376\376\0\376\376\0\376" - "\376\0\375\375\0\376\376\0\376\376\0\376\376\0\360\360\0\360\360\0\360\360" - "\0\360\360\0\16\16\0\376\376\0\376\376\0\16\16\0\0\0\0\0\0\0\0\0\0\0\0\0" - "\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0" - "&&\0&&\0##\0--\0``\0``\0TT\0cc\0\237\237\0\231\231\0||\0\223\223\0\306\306" - "\0\301\301\0\217\217\0\267\267\0\336\336\0\322\322\0\220\220\0\317\317\0" - "\352\352\0\334\334\0\202\202\0\337\337\0\362\362\0\345\345\0qq\0\353\353" - "\0\370\370\0\354\354\0^^\0\363\363\0\373\373\0\362\362\0JJ\0\371\371\0\375" - "\375\0\367\367\0""66\0\374\374\0\376\376\0\373\373\0\"\"\0\376\376\0\376" - "\376\0\375\375\0\16\16\0\376\376\0\376\376\0\376\376\0\376\376\0\376\376" - "\0\376\376\0\375\375\0\376\376\0\376\376\0\375\375\0\360\360\0\376\376\0" - "\360\360\0\376\376\0\16\16\0\376\376\0\376\376\0\0\0\0\0\0\0\0\0\0\0\0\0" - "\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0" - "&&\0##\0""77\0--\0``\0PP\0nn\0[[\0\222\222\0kk\0\211\211\0qq\0\231\231\0" - "ff\0\210\210\0uu\0\217\217\0UU\0vv\0ll\0zz\0@@\0aa\0]]\0dd\0,,\0MM\0KK\0" - "OO\0\35\35\0::\0""99\0;;\0\21\21\0**\0))\0**\0\10\10\0\33\33\0\33\33\0\33" - "\33\0\3\3\0\17\17\0\17\17\0\17\17\0\0\0\0\7\7\0\7\7\0\7\7\0\7\7\0\2\2\0\2" - "\2\0\2\2\0\2\2\0\16\16\0\16\16\0\16\16\0\16\16\0\360\360\0\360\360\0\376" - "\376\0\376\376\0\16\16\0\376\376\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0" - "\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0##\0""77\0""77" - "\0--\0UU\0zz\0\216\216\0ww\0}}\0\254\254\0\324\324\0\264\264\0\207\207\0" - "\266\266\0\345\345\0\316\316\0\177\177\0\254\254\0\346\346\0\326\326\0rr" - "\0\231\231\0\344\344\0\334\334\0gg\0\206\206\0\344\344\0\340\340\0[[\0rr" - "\0\346\346\0\344\344\0NN\0^^\0\352\352\0\352\352\0AA\0JJ\0\357\357\0\357" - "\357\0""11\0""66\0\364\364\0\364\364\0\40\40\0\"\"\0\371\371\0\371\371\0" - "\16\16\0\16\16\0\375\375\0\375\375\0\376\376\0\376\376\0\362\362\0\362\362" - "\0\376\376\0\376\376\0\16\16\0\16\16\0\376\376\0\376\376\0\376\376\0\16\16" - "\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0" - "\0\0\0\0\0\0\0\0\0\0\0\0\0\22\22\0""77\0""77\0--\0CC\0~~\0~~\0\\\\\0||\0" - "\274\274\0\274\274\0||\0\235\235\0\325\325\0\325\325\0\204\204\0\256\256" - "\0\340\340\0\340\340\0\177\177\0\275\275\0\351\351\0\351\351\0vv\0\316\316" - "\0\360\360\0\360\360\0ii\0\334\334\0\365\365\0\365\365\0ZZ\0\351\351\0\371" - "\371\0\371\371\0II\0\362\362\0\374\374\0\374\374\0""66\0\370\370\0\376\376" - "\0\376\376\0\"\"\0\374\374\0\376\376\0\376\376\0\16\16\0\376\376\0\376\376" - "\0\376\376\0\376\376\0\375\375\0\376\376\0\376\376\0\376\376\0\360\360\0" - "\360\360\0\360\360\0\360\360\0\16\16\0\376\376\0\376\376\0\16\16\0\0\0\0" - "\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0" - "\0\0\0\0\0\0\0\0\0&&\0""77\0""22\0--\0``\0vv\0pp\0gg\0\243\243\0\255\255" - "\0\225\225\0\231\231\0\311\311\0\314\314\0\235\235\0\271\271\0\337\337\0" - "\326\326\0\224\224\0\320\320\0\352\352\0\336\336\0\204\204\0\337\337\0\362" - "\362\0\345\345\0qq\0\353\353\0\370\370\0\354\354\0^^\0\363\363\0\373\373" - "\0\362\362\0JJ\0\371\371\0\375\375\0\367\367\0""66\0\374\374\0\376\376\0" - "\373\373\0\"\"\0\376\376\0\376\376\0\375\375\0\16\16\0\376\376\0\376\376" - "\0\376\376\0\376\376\0\376\376\0\376\376\0\375\375\0\376\376\0\376\376\0" - "\375\375\0\360\360\0\376\376\0\360\360\0\376\376\0\16\16\0\376\376\0\376" - "\376\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0" - "\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0&&\0##\0FF\0""99\0``\0PP\0\200\200\0dd\0\222" - "\222\0kk\0\222\222\0vv\0\231\231\0ff\0\213\213\0ww\0\217\217\0UU\0xx\0mm" - "\0zz\0@@\0bb\0]]\0dd\0,,\0MM\0KK\0OO\0\35\35\0::\0""99\0;;\0\21\21\0**\0" - "))\0**\0\10\10\0\33\33\0\33\33\0\33\33\0\3\3\0\17\17\0\17\17\0\17\17\0\0" - "\0\0\7\7\0\7\7\0\7\7\0\7\7\0\2\2\0\2\2\0\2\2\0\2\2\0\16\16\0\16\16\0\16\16" - "\0\16\16\0\360\360\0\360\360\0\376\376\0\376\376\0\16\16\0\376\376\0\0\0" - "\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0" - "\0\0\0\0\0\0\0\0\0\0##\0""77\0""77\0""99\0^^\0zz\0\216\216\0\201\201\0\203" - "\203\0\254\254\0\324\324\0\271\271\0\211\211\0\266\266\0\345\345\0\317\317" - "\0\200\200\0\254\254\0\346\346\0\326\326\0ss\0\231\231\0\344\344\0\334\334" - "\0gg\0\206\206\0\344\344\0\340\340\0[[\0rr\0\346\346\0\344\344\0NN\0^^\0" - "\352\352\0\352\352\0AA\0JJ\0\357\357\0\357\357\0""11\0""66\0\364\364\0\364" - "\364\0\40\40\0\"\"\0\371\371\0\371\371\0\16\16\0\16\16\0\375\375\0\375\375" - "\0\376\376\0\376\376\0\362\362\0\362\362\0\376\376\0\376\376\0\16\16\0\16" - "\16\0\376\376\0\376\376\0\376\376\0\16\16\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0" - "\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\22\22" - "\0""77\0""77\0--\0MM\0\210\210\0\210\210\0\\\\\0\202\202\0\302\302\0\302" - "\302\0||\0\240\240\0\330\330\0\330\330\0\204\204\0\257\257\0\341\341\0\341" - "\341\0\177\177\0\275\275\0\351\351\0\351\351\0vv\0\316\316\0\360\360\0\360" - "\360\0ii\0\334\334\0\365\365\0\365\365\0ZZ\0\351\351\0\371\371\0\371\371" - "\0II\0\362\362\0\374\374\0\374\374\0""66\0\370\370\0\376\376\0\376\376\0" - "\"\"\0\374\374\0\376\376\0\376\376\0\16\16\0\376\376\0\376\376\0\376\376" - "\0\376\376\0\375\375\0\376\376\0\376\376\0\376\376\0\360\360\0\360\360\0" - "\360\360\0\360\360\0\16\16\0\376\376\0\376\376\0\16\16\0\0\0\0\0\0\0\0\0" - "\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0" - "\0\0\0\0&&\0""77\0""22\0--\0``\0vv\0xx\0kk\0\245\245\0\257\257\0\235\235" - "\0\234\234\0\312\312\0\315\315\0\241\241\0\272\272\0\337\337\0\326\326\0" - "\225\225\0\320\320\0\352\352\0\336\336\0\204\204\0\337\337\0\362\362\0\345" - "\345\0qq\0\353\353\0\370\370\0\354\354\0^^\0\363\363\0\373\373\0\362\362" - "\0JJ\0\371\371\0\375\375\0\367\367\0""66\0\374\374\0\376\376\0\373\373\0" - "\"\"\0\376\376\0\376\376\0\375\375\0\16\16\0\376\376\0\376\376\0\376\376" - "\0\376\376\0\376\376\0\376\376\0\375\375\0\376\376\0\376\376\0\375\375\0" - "\360\360\0\376\376\0\360\360\0\376\376\0\16\16\0\376\376\0\376\376\0\0\0" - "\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0" - "\0\0\0\0\0\0\0\0\0\0&&\0##\0FF\0""99\0``\0PP\0\200\200\0dd\0\222\222\0kk" - "\0\222\222\0vv\0\231\231\0ff\0\213\213\0ww\0\217\217\0UU\0xx\0mm\0zz\0@@" - "\0bb\0]]\0dd\0,,\0MM\0KK\0OO\0\35\35\0::\0""99\0;;\0\21\21\0**\0))\0**\0" - "\10\10\0\33\33\0\33\33\0\33\33\0\3\3\0\17\17\0\17\17\0\17\17\0\0\0\0\7\7" - "\0\7\7\0\7\7\0\7\7\0\2\2\0\2\2\0\2\2\0\2\2\0\16\16\0\16\16\0\16\16\0\16\16" - "\0\360\360\0\360\360\0\376\376\0\376\376\0\16\16\0\376\376\0\0\0\0\0\0\0" - "\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0" - "\0\0\0\0\0\0##\0""77\0""77\0""99\0^^\0zz\0\216\216\0\201\201\0\203\203\0" - "\254\254\0\324\324\0\271\271\0\211\211\0\266\266\0\345\345\0\317\317\0\200" - "\200\0\254\254\0\346\346\0\326\326\0ss\0\231\231\0\344\344\0\334\334\0gg" - "\0\206\206\0\344\344\0\340\340\0[[\0rr\0\346\346\0\344\344\0NN\0^^\0\352" - "\352\0\352\352\0AA\0JJ\0\357\357\0\357\357\0""11\0""66\0\364\364\0\364\364" - "\0\40\40\0\"\"\0\371\371\0\371\371\0\16\16\0\16\16\0\375\375\0\375\375\0" - "\376\376\0\376\376\0\362\362\0\362\362\0\376\376\0\376\376\0\16\16\0\16\16" - "\0\376\376\0\376\376\0\376\376\0\16\16\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0" - "\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\22\22\0" - """77\0""77\0--\0MM\0\210\210\0\210\210\0\\\\\0\202\202\0\302\302\0\302\302" - "\0||\0\240\240\0\330\330\0\330\330\0\204\204\0\257\257\0\341\341\0\341\341" - "\0\177\177\0\275\275\0\351\351\0\351\351\0vv\0\316\316\0\360\360\0\360\360" - "\0ii\0\334\334\0\365\365\0\365\365\0ZZ\0\351\351\0\371\371\0\371\371\0II" - "\0\362\362\0\374\374\0\374\374\0""66\0\370\370\0\376\376\0\376\376\0\"\"" - "\0\374\374\0\376\376\0\376\376\0\16\16\0\376\376\0\376\376\0\376\376\0\376" - "\376\0\375\375\0\376\376\0\376\376\0\376\376\0\360\360\0\360\360\0\360\360" - "\0\360\360\0\16\16\0\376\376\0\376\376\0\16\16\0\0\0\0\0\0\0\0\0\0\0\0\0" - "\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0" - "&&\0""77\0""22\0--\0``\0vv\0xx\0kk\0\245\245\0\257\257\0\235\235\0\234\234" - "\0\312\312\0\315\315\0\241\241\0\272\272\0\337\337\0\326\326\0\225\225\0" - "\320\320\0\352\352\0\336\336\0\204\204\0\337\337\0\362\362\0\345\345\0qq" - "\0\353\353\0\370\370\0\354\354\0^^\0\363\363\0\373\373\0\362\362\0JJ\0\371" - "\371\0\375\375\0\367\367\0""66\0\374\374\0\376\376\0\373\373\0\"\"\0\376" - "\376\0\376\376\0\375\375\0\16\16\0\376\376\0\376\376\0\376\376\0\376\376" - "\0\376\376\0\376\376\0\375\375\0\376\376\0\376\376\0\375\375\0\360\360\0" - "\376\376\0\360\360\0\376\376\0\16\16\0\376\376\0\376\376\0\0\0\0\0\0\0\0" - "\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0" - "\0\0\0\0\0&&\0##\0FF\0""99\0``\0PP\0\200\200\0dd\0\222\222\0kk\0\222\222" - "\0vv\0\231\231\0ff\0\213\213\0ww\0\217\217\0UU\0xx\0mm\0zz\0@@\0bb\0]]\0" - "dd\0,,\0MM\0KK\0OO\0\35\35\0::\0""99\0;;\0\21\21\0**\0))\0**\0\10\10\0\33" - "\33\0\33\33\0\33\33\0\3\3\0\17\17\0\17\17\0\17\17\0\0\0\0\7\7\0\7\7\0\7\7" - "\0\7\7\0\2\2\0\2\2\0\2\2\0\2\2\0\16\16\0\16\16\0\16\16\0\16\16\0\360\360" - "\0\360\360\0\376\376\0\376\376\0\16\16\0\376\376\0\0\0\0\0\0\0\0\0\0\0\0" - "\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0" - "\0##\0""77\0""77\0""99\0^^\0zz\0\216\216\0\201\201\0\203\203\0\254\254\0" - "\324\324\0\271\271\0\211\211\0\266\266\0\345\345\0\317\317\0\200\200\0\254" - "\254\0\346\346\0\326\326\0ss\0\231\231\0\344\344\0\334\334\0gg\0\206\206" - "\0\344\344\0\340\340\0[[\0rr\0\346\346\0\344\344\0NN\0^^\0\352\352\0\352" - "\352\0AA\0JJ\0\357\357\0\357\357\0""11\0""66\0\364\364\0\364\364\0\40\40" - "\0\"\"\0\371\371\0\371\371\0\16\16\0\16\16\0\375\375\0\375\375\0\376\376" - "\0\376\376\0\362\362\0\362\362\0\376\376\0\376\376\0\16\16\0\16\16\0\376" - "\376\0\376\376\0\376\376\0\16\16\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0" - "\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\22\22\0""77\0" - """77\0--\0MM\0\210\210\0\210\210\0\\\\\0\202\202\0\302\302\0\302\302\0||" - "\0\240\240\0\330\330\0\330\330\0\204\204\0\257\257\0\341\341\0\341\341\0" - "\177\177\0\275\275\0\351\351\0\351\351\0vv\0\316\316\0\360\360\0\360\360" - "\0ii\0\334\334\0\365\365\0\365\365\0ZZ\0\351\351\0\371\371\0\371\371\0II" - "\0\362\362\0\374\374\0\374\374\0""66\0\370\370\0\376\376\0\376\376\0\"\"" - "\0\374\374\0\376\376\0\376\376\0\16\16\0\376\376\0\376\376\0\376\376\0\376" - "\376\0\375\375\0\376\376\0\376\376\0\376\376\0\360\360\0\360\360\0\360\360" - "\0\360\360\0\16\16\0\376\376\0\376\376\0\16\16\0\0\0\0\0\0\0\0\0\0\0\0\0" - "\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0" - "&&\0""77\0""22\0--\0``\0vv\0xx\0kk\0\245\245\0\257\257\0\235\235\0\234\234" - "\0\312\312\0\315\315\0\241\241\0\272\272\0\337\337\0\326\326\0\225\225\0" - "\320\320\0\352\352\0\336\336\0\204\204\0\337\337\0\362\362\0\345\345\0qq" - "\0\353\353\0\370\370\0\354\354\0^^\0\363\363\0\373\373\0\362\362\0JJ\0\371" - "\371\0\375\375\0\367\367\0""66\0\374\374\0\376\376\0\373\373\0\"\"\0\376" - "\376\0\376\376\0\375\375\0\16\16\0\376\376\0\376\376\0\376\376\0\376\376" - "\0\376\376\0\376\376\0\375\375\0\376\376\0\376\376\0\375\375\0\360\360\0" - "\376\376\0\360\360\0\376\376\0\16\16\0\376\376\0\376\376\0\0\0\0\0\0\0\0" - "\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0" - "\0\0\0\0\0&&\0##\0FF\0""99\0``\0PP\0\200\200\0dd\0\222\222\0kk\0\222\222" - "\0vv\0\231\231\0ff\0\213\213\0ww\0\217\217\0UU\0xx\0mm\0zz\0@@\0bb\0]]\0" - "dd\0,,\0MM\0KK\0OO\0\35\35\0::\0""99\0;;\0\21\21\0**\0))\0**\0\10\10\0\33" - "\33\0\33\33\0\33\33\0\3\3\0\17\17\0\17\17\0\17\17\0\0\0\0\7\7\0\7\7\0\7\7" - "\0\7\7\0\2\2\0\2\2\0\2\2\0\2\2\0\16\16\0\16\16\0\16\16\0\16\16\0\360\360" - "\0\360\360\0\376\376\0\376\376\0\16\16\0\376\376\0\0\0\0\0\0\0\0\0\0\0\0" - "\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0" - "\0##\0""77\0""77\0""99\0^^\0zz\0\216\216\0\201\201\0\203\203\0\254\254\0" - "\324\324\0\271\271\0\211\211\0\266\266\0\345\345\0\317\317\0\200\200\0\254" - "\254\0\346\346\0\326\326\0ss\0\231\231\0\344\344\0\334\334\0gg\0\206\206" - "\0\344\344\0\340\340\0[[\0rr\0\346\346\0\344\344\0NN\0^^\0\352\352\0\352" - "\352\0AA\0JJ\0\357\357\0\357\357\0""11\0""66\0\364\364\0\364\364\0\40\40" - "\0\"\"\0\371\371\0\371\371\0\16\16\0\16\16\0\375\375\0\375\375\0\376\376" - "\0\376\376\0\362\362\0\362\362\0\376\376\0\376\376\0\16\16\0\16\16\0\376" - "\376\0\376\376\0\376\376\0\16\16\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0" - "\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\22\22\0""77\0" - """77\0--\0MM\0\210\210\0\210\210\0\\\\\0\202\202\0\302\302\0\302\302\0||" - "\0\240\240\0\330\330\0\330\330\0\204\204\0\257\257\0\341\341\0\341\341\0" - "\177\177\0\275\275\0\351\351\0\351\351\0vv\0\316\316\0\360\360\0\360\360" - "\0ii\0\334\334\0\365\365\0\365\365\0ZZ\0\351\351\0\371\371\0\371\371\0II" - "\0\362\362\0\374\374\0\374\374\0""66\0\370\370\0\376\376\0\376\376\0\"\"" - "\0\374\374\0\376\376\0\376\376\0\16\16\0\376\376\0\376\376\0\376\376\0\376" - "\376\0\375\375\0\376\376\0\376\376\0\376\376\0\360\360\0\360\360\0\360\360" - "\0\360\360\0\16\16\0\376\376\0\376\376\0\16\16\0\0\0\0\0\0\0\0\0\0\0\0\0" - "\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0" - "&&\0""77\0""22\0--\0``\0vv\0xx\0kk\0\245\245\0\257\257\0\235\235\0\234\234" - "\0\312\312\0\315\315\0\241\241\0\272\272\0\337\337\0\326\326\0\225\225\0" - "\320\320\0\352\352\0\336\336\0\204\204\0\337\337\0\362\362\0\345\345\0qq" - "\0\353\353\0\370\370\0\354\354\0^^\0\363\363\0\373\373\0\362\362\0JJ\0\371" - "\371\0\375\375\0\367\367\0""66\0\374\374\0\376\376\0\373\373\0\"\"\0\376" - "\376\0\376\376\0\375\375\0\16\16\0\376\376\0\376\376\0\376\376\0\376\376" - "\0\376\376\0\376\376\0\375\375\0\376\376\0\376\376\0\375\375\0\360\360\0" - "\376\376\0\360\360\0\376\376\0\16\16\0\376\376\0\376\376\0\0\0\0\0\0\0\0" - "\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0" - "\0\0\0\0\0&&\0##\0FF\0""99\0``\0PP\0\213\213\0mm\0\237\237\0uu\0\275\275" - "\0\232\232\0\306\306\0\204\204\0\331\331\0\272\272\0\336\336\0\205\205\0" - "\345\345\0\320\320\0\352\352\0{{\0\355\355\0\337\337\0\362\362\0mm\0\363" - "\363\0\353\353\0\370\370\0\\\\\0\367\367\0\363\363\0\373\373\0II\0\373\373" - "\0\371\371\0\375\375\0""66\0\375\375\0\374\374\0\376\376\0\"\"\0\376\376" - "\0\376\376\0\376\376\0\16\16\0\376\376\0\376\376\0\376\376\0\376\376\0\376" - "\376\0\376\376\0\376\376\0\376\376\0\375\375\0\376\376\0\375\375\0\375\375" - "\0\360\360\0\360\360\0\376\376\0\376\376\0\16\16\0\376\376\0\0\0\0\0\0\0" - "\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0" - "\0\0\0\0\0\0##\0""77\0""77\0""99\0gg\0\205\205\0\205\205\0ww\0\224\224\0" - "\310\310\0\310\310\0\247\247\0\240\240\0\354\354\0\354\354\0\306\306\0\227" - "\227\0\372\372\0\372\372\0\325\325\0\205\205\0\375\375\0\375\375\0\342\342" - "\0rr\0\376\376\0\376\376\0\354\354\0^^\0\376\376\0\376\376\0\363\363\0JJ" - "\0\376\376\0\376\376\0\370\370\0""66\0\376\376\0\376\376\0\374\374\0\"\"" - "\0\376\376\0\376\376\0\376\376\0\16\16\0\376\376\0\376\376\0\376\376\0\376" - "\376\0\376\376\0\376\376\0\376\376\0\376\376\0\376\376\0\376\376\0\375\375" - "\0\376\376\0\376\376\0\376\376\0\362\362\0\376\376\0\376\376\0\376\376\0" - "\16\16\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0" - "\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\22\22\0""77\0""77\0""11\0>>\0~~\0~~\0bb" - "\0__\0\261\261\0\261\261\0\212\212\0``\0\277\277\0\277\277\0\230\230\0SS" - "\0\275\275\0\275\275\0\233\233\0@@\0\273\273\0\273\273\0\240\240\0//\0\274" - "\274\0\274\274\0\252\252\0!!\0\301\301\0\301\301\0\266\266\0\25\25\0\311" - "\311\0\311\311\0\303\303\0\14\14\0\324\324\0\324\324\0\322\322\0\6\6\0\342" - "\342\0\342\342\0\341\341\0\1\1\0\361\361\0\361\361\0\361\361\0\15\15\0\15" - "\15\0\15\15\0\15\15\0\362\362\0\362\362\0\362\362\0\360\360\0\16\16\0\16" - "\16\0\16\16\0\2\2\0\376\376\0\376\376\0\376\376\0\16\16\0\0\0\0\0\0\0\0\0" - "\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0" - "\0\0\0\0&&\0""77\0""77\0\34\34\0SS\0kk\0\206\206\0BB\0\214\214\0\232\232" - "\0\302\302\0YY\0\250\250\0\255\255\0\340\340\0XX\0\264\264\0\264\264\0\355" - "\355\0SS\0\265\265\0\266\266\0\364\364\0JJ\0\270\270\0\272\272\0\371\371" - "\0AA\0\277\277\0\300\300\0\374\374\0""66\0\310\310\0\311\311\0\375\375\0" - "**\0\324\324\0\324\324\0\376\376\0\34\34\0\341\341\0\342\342\0\376\376\0" - "\15\15\0\361\361\0\361\361\0\376\376\0\361\361\0\15\15\0\15\15\0\376\376" - "\0\15\15\0\361\361\0\361\361\0\373\373\0\362\362\0\15\15\0\16\16\0\376\376" - "\0\16\16\0\361\361\0\376\376\0\376\376\0\376\376\0\0\0\0\0\0\0\0\0\0\0\0" - "\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0" - "\0&&\0&&\0""77\0))\0SS\0SS\0kk\0DD\0\205\205\0}}\0\222\222\0WW\0\241\241" - "\0\230\230\0\245\245\0XX\0\261\261\0\252\252\0\261\261\0SS\0\264\264\0\263" - "\263\0\265\265\0JJ\0\270\270\0\271\271\0\272\272\0AA\0\276\276\0\300\300" - "\0\300\300\0""66\0\310\310\0\311\311\0\311\311\0**\0\324\324\0\324\324\0" - "\324\324\0\34\34\0\341\341\0\342\342\0\342\342\0\15\15\0\361\361\0\361\361" - "\0\361\361\0\361\361\0\15\15\0\15\15\0\15\15\0\15\15\0\361\361\0\361\361" - "\0\361\361\0\362\362\0\15\15\0\16\16\0\16\16\0\16\16\0\361\361\0\376\376" - "\0\376\376\0\376\376\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0" - "\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0&&\0&&\0&&\0))\0pp\0cc\0cc" - "\0QQ\0\261\261\0\244\244\0\244\244\0ll\0\335\335\0\323\323\0\323\323\0ww" - "\0\364\364\0\356\356\0\356\356\0ss\0\370\370\0\371\371\0\371\371\0ii\0\372" - "\372\0\375\375\0\375\375\0YY\0\374\374\0\376\376\0\376\376\0HH\0\375\375" - "\0\376\376\0\376\376\0""66\0\376\376\0\376\376\0\376\376\0\"\"\0\376\376" - "\0\376\376\0\376\376\0\16\16\0\376\376\0\376\376\0\376\376\0\376\376\0\376" - "\376\0\376\376\0\376\376\0\376\376\0\376\376\0\376\376\0\376\376\0\376\376" - "\0\375\375\0\376\376\0\376\376\0\376\376\0\361\361\0\376\376\0\376\376\0" - "\376\376\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0" - "\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\24\24\0&&\0&&\0\40\40\0QQ\0pp\0pp\0KK" - "\0\215\215\0\261\261\0\261\261\0pp\0\274\274\0\337\337\0\337\337\0\200\200" - "\0\332\332\0\364\364\0\364\364\0}}\0\350\350\0\373\373\0\373\373\0oo\0\361" - "\361\0\375\375\0\375\375\0]]\0\367\367\0\376\376\0\376\376\0JJ\0\373\373" - "\0\376\376\0\376\376\0""66\0\375\375\0\376\376\0\376\376\0\"\"\0\376\376" - "\0\376\376\0\376\376\0\16\16\0\376\376\0\376\376\0\376\376\0\376\376\0\376" - "\376\0\376\376\0\376\376\0\376\376\0\376\376\0\376\376\0\376\376\0\376\376" - "\0\375\375\0\376\376\0\376\376\0\376\376\0\361\361\0\376\376\0\376\376\0" - "\360\360\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0" - "\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\24\24\0&&\0&&\0\20\20\0""88\0WW\0pp\0" - "==\0ss\0\212\212\0\252\252\0dd\0\250\250\0\264\264\0\312\312\0rr\0\313\313" - "\0\315\315\0\331\331\0rr\0\340\340\0\331\331\0\340\340\0hh\0\355\355\0\341" - "\341\0\345\345\0YY\0\366\366\0\350\350\0\352\352\0HH\0\372\372\0\356\356" - "\0\357\357\0""66\0\375\375\0\364\364\0\364\364\0\"\"\0\376\376\0\371\371" - "\0\371\371\0\16\16\0\376\376\0\375\375\0\375\375\0\376\376\0\376\376\0\361" - "\361\0\362\362\0\376\376\0\376\376\0\16\16\0\16\16\0\376\376\0\375\375\0" - "\376\376\0\375\375\0\374\374\0\360\360\0\376\376\0\376\376\0\360\360\0\0" - "\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0" - "\0\0\0\0\0\0\0\0\0\0\0\24\24\0\24\24\0&&\0\40\40\0""88\0""88\0WW\0BB\0ff" - "\0ZZ\0}}\0^^\0\226\226\0\201\201\0\241\241\0nn\0\301\301\0\246\246\0\277" - "\277\0rr\0\333\333\0\301\301\0\321\321\0ii\0\353\353\0\323\323\0\335\335" - "\0[[\0\365\365\0\341\341\0\346\346\0II\0\372\372\0\353\353\0\356\356\0""6" - "6\0\375\375\0\363\363\0\364\364\0\"\"\0\376\376\0\371\371\0\371\371\0\16" - "\16\0\376\376\0\375\375\0\375\375\0\376\376\0\376\376\0\361\361\0\361\361" - "\0\376\376\0\376\376\0\16\16\0\16\16\0\376\376\0\374\374\0\375\375\0\374" - "\374\0\374\374\0\361\361\0\376\376\0\360\360\0\360\360\0\0\0\0\0\0\0\0\0" - "\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0" - "\0\0\0\0\24\24\0\24\24\0\24\24\0\40\40\0HH\0""88\0""88\0BB\0~~\0ff\0ff\0" - "^^\0\256\256\0\226\226\0\226\226\0qq\0\325\325\0\277\277\0\277\277\0ss\0" - "\350\350\0\331\331\0\331\331\0jj\0\363\363\0\353\353\0\353\353\0[[\0\371" - "\371\0\365\365\0\365\365\0II\0\374\374\0\372\372\0\372\372\0""66\0\375\375" - "\0\375\375\0\375\375\0\"\"\0\376\376\0\376\376\0\376\376\0\16\16\0\376\376" - "\0\376\376\0\376\376\0\376\376\0\376\376\0\376\376\0\376\376\0\376\376\0" - "\376\376\0\376\376\0\376\376\0\376\376\0\374\374\0\374\374\0\374\374\0\376" - "\376\0\361\361\0\360\360\0\360\360\0\360\360\0\0\0\0\0\0\0\0\0\0\0\0\0\0" - "\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0" - "\0\0\24\24\0\24\24\0\24\24\0\40\40\0HH\0HH\0""88\0BB\0~~\0~~\0ff\0^^\0\263" - "\263\0\263\263\0\231\231\0nn\0\330\330\0\330\330\0\274\274\0pp\0\353\353" - "\0\353\353\0\324\324\0hh\0\365\365\0\365\365\0\345\345\0ZZ\0\373\373\0\373" - "\373\0\361\361\0II\0\375\375\0\375\375\0\370\370\0""66\0\376\376\0\376\376" - "\0\374\374\0\"\"\0\376\376\0\376\376\0\376\376\0\16\16\0\376\376\0\376\376" - "\0\376\376\0\376\376\0\376\376\0\376\376\0\376\376\0\376\376\0\376\376\0" - "\376\376\0\374\374\0\374\374\0\376\376\0\376\376\0\361\361\0\360\360\0\360" - "\360\0\360\360\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0" - "\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\24\24\0\24\24\0\0\0" - "\0\0\0\0((\0HH\0\40\40\0\25\25\0QQ\0\207\207\0KK\0--\0}}\0\262\262\0bb\0" - """44\0\235\235\0\320\320\0ff\0""00\0\257\257\0\341\341\0cc\0))\0\272\272" - "\0\354\354\0ZZ\0\37\37\0\303\303\0\363\363\0OO\0\26\26\0\314\314\0\370\370" - "\0AA\0\15\15\0\326\326\0\373\373\0""22\0\6\6\0\343\343\0\375\375\0!!\0\1" - "\1\0\362\362\0\376\376\0\16\16\0\16\16\0\16\16\0\375\375\0\375\375\0\375" - "\375\0\376\376\0\362\362\0\360\360\0\361\361\0\376\376\0\14\14\0\0\0\0\0" - "\0\0\360\360\0\360\360\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0" - "\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\24\24" - "\0\24\24\0\0\0\0\0\0\0((\0((\0\0\0\0\0\0\0<<\0<<\0\0\0\0\0\0\0PP\0PP\0\10" - "\10\0\4\4\0dd\0dd\0\14\14\0\6\6\0xx\0xx\0\14\14\0\5\5\0\214\214\0\214\214" - "\0\13\13\0\4\4\0\240\240\0\240\240\0\10\10\0\2\2\0\264\264\0\264\264\0\5" - "\5\0\1\1\0\310\310\0\310\310\0\3\3\0\0\0\0\334\334\0\334\334\0\1\1\0\0\0" - "\0\360\360\0\360\360\0\0\0\0\0\0\0\0\0\0\0\0\0\1\1\0\1\1\0\0\0\0\0\0\0\14" - "\14\0\14\14\0\0\0\0\0\0\0\360\360\0\360\360\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0" - "\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0" - "\0\0\0\0\0\0\0\0\0\0\0\0\0\24\24\0\24\24\0\0\0\0\0\0\0((\0((\0\0\0\0\0\0" - "\0<<\0<<\0\0\0\0\0\0\0XX\0XX\0\0\0\0\0\0\0pp\0pp\0\0\0\0\0\0\0\204\204\0" - "\204\204\0\0\0\0\0\0\0\227\227\0\227\227\0\0\0\0\0\0\0\250\250\0\250\250" - "\0\0\0\0\0\0\0\271\271\0\271\271\0\0\0\0\0\0\0\313\313\0\313\313\0\0\0\0" - "\0\0\0\335\335\0\335\335\0\0\0\0\0\0\0\360\360\0\360\360\0\0\0\0\0\0\0\1" - "\1\0\1\1\0\0\0\0\0\0\0\14\14\0\14\14\0\0\0\0\0\0\0\360\360\0\360\360\0\0" - "\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0" - "\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\24\24\0" - "\24\24\0\24\24\0\0\0\0((\0((\0((\0\0\0\0<<\0HH\0HH\0\10\10\0PP\0dd\0dd\0" - "\14\14\0dd\0||\0||\0\14\14\0xx\0\221\221\0\221\221\0\13\13\0\214\214\0\243" - "\243\0\243\243\0\10\10\0\240\240\0\264\264\0\264\264\0\5\5\0\264\264\0\303" - "\303\0\303\303\0\3\3\0\310\310\0\322\322\0\322\322\0\1\1\0\334\334\0\341" - "\341\0\341\341\0\0\0\0\360\360\0\361\361\0\361\361\0\1\1\0\0\0\0\14\14\0" - "\14\14\0\14\14\0\0\0\0\360\360\0\360\360\0\360\360\0\0\0\0\0\0\0\0\0\0\0" - "\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0" - "\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\24\24\0" - "\24\24\0\20\20\0\20\20\0""88\0""88\0**\0**\0ZZ\0ZZ\0==\0==\0yy\0yy\0II\0" - "II\0\224\224\0\224\224\0NN\0NN\0\254\254\0\254\254\0MM\0MM\0\302\302\0\302" - "\302\0HH\0HH\0\324\324\0\324\324\0>>\0>>\0\343\343\0\343\343\0""00\0""00" - "\0\356\356\0\356\356\0\40\40\0\40\40\0\367\367\0\367\367\0\16\16\0\16\16" - "\0\374\374\0\374\374\0\374\374\0\374\374\0\360\360\0\360\360\0\360\360\0" - "\360\360\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0" - "\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0" - "\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0" - "\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0" - "\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0" - "\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0" - "\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0" - "\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0" - "\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0" - "\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0" - "\0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0\0\0\0\0\0\0\0\0\0\0" - "\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0" - "\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0" - "\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0" - "\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0" - "\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0" - "\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0" - "\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0" - "\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0" - "\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0" - "\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0" - "\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0", -}; - diff --git a/test/automated/common/img_blitblend.c b/test/automated/common/img_blitblend.c deleted file mode 100644 index 4f13de18e..000000000 --- a/test/automated/common/img_blitblend.c +++ /dev/null @@ -1,2690 +0,0 @@ -/* GIMP RGB C-Source image dump (alpha.c) */ - -static const SurfaceImage_t img_blendAdd = { - 80, 60, 3, - "\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0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310\310\0\310\310\0\310\310" - "\0\310\310\0\310\310\0\310\310\0\310\310\0\310\310\0\310\310\0\310\310\0" - "\310\310\0\310\310\0\310\310\0\310\310\0\310\310\0\310\310\0\310\310\0\310" - "\310\0\310\310\0\310\310\0\310\310\0\310\310\0\310\310\0\310\310\0\310\310" - "\0\310\310\0\310\310\0\310\310\0\310\310\0\310\310\0\310\310\0\310\310\0" - "\310\310\0\310\310\0\310\310\0\310\310\0\310\310\0\310\310\0\310\310\0\310" - "\310\0dd\0dd\0dd\0dd\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0" - "\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0" - "\0\0\0\0\0dd\0dd\0dd\0dd\0\310\310\0\310\310\0\310\310\0\310\310\0\377\377" - "\0\377\377\0\377\377\0\377\377\0\377\377\0\377\377\0\377\377\0\377\377\0" - "\377\377\0\377\377\0\377\377\0\377\377\0\377\377\0\377\377\0\377\377\0\377" - "\377\0\377\377\0\377\377\0\377\377\0\377\377\0\377\377\0\377\377\0\377\377" - "\0\377\377\0\377\377\0\377\377\0\377\377\0\377\377\0\377\377\0\377\377\0" - "\377\377\0\377\377\0\377\377\0\377\377\0\377\377\0\377\377\0\377\377\0\377" - "\377\0\377\377\0\377\377\0\377\377\0\377\377\0\377\377\0\377\377\0\310\310" - "\0\310\310\0\310\310\0\310\310\0dd\0dd\0dd\0dd\0\0\0\0\0\0\0\0\0\0\0\0\0" - "\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0" - "\0\0\0\0\0\0\0\0\0dd\0dd\0dd\0dd\0\310\310\0\310\310\0\310\310\0\310\310" - "\0\377\377\0\377\377\0\377\377\0\377\377\0\377\377\0\377\377\0\377\377\0" - "\377\377\0\377\377\0\377\377\0\377\377\0\377\377\0\377\377\0\377\377\0\377" - "\377\0\377\377\0\377\377\0\377\377\0\377\377\0\377\377\0\377\377\0\377\377" - "\0\377\377\0\377\377\0\377\377\0\377\377\0\377\377\0\377\377\0\377\377\0" - "\377\377\0\377\377\0\377\377\0\377\377\0\377\377\0\377\377\0\377\377\0\377" - "\377\0\377\377\0\377\377\0\377\377\0\377\377\0\377\377\0\377\377\0\377\377" - "\0\377\377\0\377\377\0\310\310\0\310\310\0\310\310\0\310\310\0dd\0dd\0dd" - "\0dd\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0" - "\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0dd\0dd\0dd\0dd\0\310\310\0\310\310\0" - "\310\310\0\310\310\0\377\377\0\377\377\0\377\377\0\377\377\0\377\377\0\377" - "\377\0\377\377\0\377\377\0\377\377\0\377\377\0\377\377\0\377\377\0\377\377" - "\0\377\377\0\377\377\0\377\377\0\377\377\0\377\377\0\377\377\0\377\377\0" - "\377\377\0\377\377\0\377\377\0\377\377\0\377\377\0\377\377\0\377\377\0\377" - "\377\0\377\377\0\377\377\0\377\377\0\377\377\0\377\377\0\377\377\0\377\377" - "\0\377\377\0\377\377\0\377\377\0\377\377\0\377\377\0\377\377\0\377\377\0" - "\377\377\0\377\377\0\377\377\0\377\377\0\377\377\0\377\377\0\310\310\0\310" - "\310\0\310\310\0\310\310\0dd\0dd\0dd\0dd\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0" - "\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0dd\0dd\0dd\0" - "dd\0\310\310\0\377\377\0\377\377\0\377\377\0\377\377\0\377\377\0\377\377" - "\0\377\377\0\377\377\0\377\377\0\377\377\0\377\377\0\377\377\0\377\377\0" - "\377\377\0\377\377\0\377\377\0\377\377\0\377\377\0\377\377\0\377\377\0\377" - "\377\0\377\377\0\377\377\0\377\377\0\377\377\0\377\377\0\377\377\0\377\377" - "\0\377\377\0\377\377\0\377\377\0\377\377\0\377\377\0\377\377\0\377\377\0" - "\377\377\0\377\377\0\377\377\0\377\377\0\377\377\0\377\377\0\377\377\0\377" - "\377\0\377\377\0\377\377\0\377\377\0\377\377\0\377\377\0\377\377\0\377\377" - "\0\377\377\0\377\377\0\377\377\0\377\377\0\377\377\0\377\377\0\310\310\0" - "dd\0dd\0dd\0dd\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0" - "\0\0\0\0\0\0\0\0\0\0\0\0\0\0dd\0dd\0dd\0dd\0\310\310\0\310\310\0\310\310" - "\0\377\377\0\377\377\0\377\377\0\377\377\0\377\377\0\377\377\0\377\377\0" - "\377\377\0\377\377\0\377\377\0\377\377\0\377\377\0\377\377\0\377\377\0\377" - "\377\0\377\377\0\377\377\0\377\377\0\377\377\0\377\377\0\377\377\0\377\377" - "\0\377\377\0\377\377\0\377\377\0\377\377\0\377\377\0\377\377\0\377\377\0" - "\377\377\0\377\377\0\377\377\0\377\377\0\377\377\0\377\377\0\377\377\0\377" - "\377\0\377\377\0\377\377\0\377\377\0\377\377\0\377\377\0\377\377\0\377\377" - "\0\377\377\0\377\377\0\377\377\0\377\377\0\377\377\0\377\377\0\377\377\0" - "\377\377\0\310\310\0\310\310\0\310\310\0dd\0dd\0dd\0dd\0\0\0\0\0\0\0\0\0" - "\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0dd\0dd\0dd" - "\0\310\310\0\310\310\0\310\310\0\310\310\0\377\377\0\377\377\0\377\377\0" - "\377\377\0\377\377\0\377\377\0\377\377\0\377\377\0\377\377\0\377\377\0\377" - "\377\0\377\377\0\377\377\0\377\377\0\377\377\0\377\377\0\377\377\0\377\377" - "\0\377\377\0\377\377\0\377\377\0\377\377\0\377\377\0\377\377\0\377\377\0" - "\377\377\0\377\377\0\377\377\0\377\377\0\377\377\0\377\377\0\377\377\0\377" - "\377\0\377\377\0\377\377\0\377\377\0\377\377\0\377\377\0\377\377\0\377\377" - "\0\377\377\0\377\377\0\377\377\0\377\377\0\377\377\0\377\377\0\377\377\0" - "\377\377\0\377\377\0\377\377\0\377\377\0\377\377\0\377\377\0\377\377\0\310" - "\310\0\310\310\0\310\310\0\310\310\0dd\0dd\0dd\0\0\0\0\0\0\0\0\0\0\0\0\0" - "\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0dd\0dd\0\310\310\0\310\310" - "\0\310\310\0\310\310\0\377\377\0\377\377\0\377\377\0\377\377\0\377\377\0" - "\377\377\0\377\377\0\377\377\0\377\377\0\377\377\0\377\377\0\377\377\0\377" - "\377\0\377\377\0\377\377\0\377\377\0\377\377\0\377\377\0\377\377\0\377\377" - "\0\377\377\0\377\377\0\377\377\0\377\377\0\377\377\0\377\377\0\377\377\0" - "\377\377\0\377\377\0\377\377\0\377\377\0\377\377\0\377\377\0\377\377\0\377" - "\377\0\377\377\0\377\377\0\377\377\0\377\377\0\377\377\0\377\377\0\377\377" - "\0\377\377\0\377\377\0\377\377\0\377\377\0\377\377\0\377\377\0\377\377\0" - "\377\377\0\377\377\0\377\377\0\377\377\0\377\377\0\377\377\0\377\377\0\310" - "\310\0\310\310\0\310\310\0\310\310\0dd\0dd\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0" - "\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0dd\0\310\310\0\310\310\0\310" - "\310\0\377\377\0\377\377\0\377\377\0\377\377\0\377\377\0\377\377\0\377\377" - "\0\377\377\0\377\377\0\377\377\0\377\377\0\377\377\0\377\377\0\377\377\0" - "\377\377\0\377\377\0\377\377\0\377\377\0\377\377\0\377\377\0\377\377\0\377" - "\377\0\377\377\0\377\377\0\377\377\0\377\377\0\377\377\0\377\377\0\377\377" - "\0\377\377\0\377\377\0\377\377\0\377\377\0\377\377\0\377\377\0\377\377\0" - "\377\377\0\377\377\0\377\377\0\377\377\0\377\377\0\377\377\0\377\377\0\377" - "\377\0\377\377\0\377\377\0\377\377\0\377\377\0\377\377\0\377\377\0\377\377" - "\0\377\377\0\377\377\0\377\377\0\377\377\0\377\377\0\377\377\0\377\377\0" - "\377\377\0\377\377\0\310\310\0\310\310\0\310\310\0dd\0\0\0\0\0\0\0\0\0\0" - "\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0dd\0\310\310\0\310" - "\310\0\310\310\0\377\377\0\377\377\0\377\377\0\377\377\0\377\377\0\377\377" - "\0\377\377\0\377\377\0\377\377\0\377\377\0\377\377\0\377\377\0\377\377\0" - "\377\377\0\377\377\0\377\377\0\377\377\0\377\377\0\377\377\0\377\377\0\377" - "\377\0\377\377\0\377\377\0\377\377\0\377\377\0\377\377\0\377\377\0\377\377" - "\0\377\377\0\377\377\0\377\377\0\377\377\0\377\377\0\377\377\0\377\377\0" - "\377\377\0\377\377\0\377\377\0\377\377\0\377\377\0\377\377\0\377\377\0\377" - "\377\0\377\377\0\377\377\0\377\377\0\377\377\0\377\377\0\377\377\0\377\377" - "\0\377\377\0\377\377\0\377\377\0\377\377\0\377\377\0\377\377\0\377\377\0" - "\377\377\0\377\377\0\377\377\0\310\310\0\310\310\0\310\310\0dd\0\0\0\0\0" - "\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\310\310" - "\0\310\310\0\310\310\0\377\377\0\377\377\0\377\377\0\377\377\0\377\377\0" - "\377\377\0\377\377\0\377\377\0\377\377\0\377\377\0\377\377\0\377\377\0\377" - "\377\0\377\377\0\377\377\0\377\377\0\377\377\0\377\377\0\377\377\0\377\377" - "\0\377\377\0\377\377\0\377\377\0\377\377\0\377\377\0\377\377\0\377\377\0" - "\377\377\0\377\377\0\377\377\0\377\377\0\377\377\0\377\377\0\377\377\0\377" - "\377\0\377\377\0\377\377\0\377\377\0\377\377\0\377\377\0\377\377\0\377\377" - "\0\377\377\0\377\377\0\377\377\0\377\377\0\377\377\0\377\377\0\377\377\0" - "\377\377\0\377\377\0\377\377\0\377\377\0\377\377\0\377\377\0\377\377\0\377" - "\377\0\377\377\0\377\377\0\377\377\0\377\377\0\377\377\0\310\310\0\310\310" - "\0\310\310\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0" - "\0\0\0\0\0\0\310\310\0\310\310\0\377\377\0\377\377\0\377\377\0\377\377\0" - "\377\377\0\377\377\0\377\377\0\377\377\0\377\377\0\377\377\0\377\377\0\377" - "\377\0\377\377\0\377\377\0\377\377\0\377\377\0\377\377\0\377\377\0\377\377" - "\0\377\377\0\377\377\0\377\377\0\377\377\0\377\377\0\377\377\0\377\377\0" - "\377\377\0\377\377\0\377\377\0\377\377\0\377\377\0\377\377\0\377\377\0\377" - "\377\0\377\377\0\377\377\0\377\377\0\377\377\0\377\377\0\377\377\0\377\377" - "\0\377\377\0\377\377\0\377\377\0\377\377\0\377\377\0\377\377\0\377\377\0" - "\377\377\0\377\377\0\377\377\0\377\377\0\377\377\0\377\377\0\377\377\0\377" - "\377\0\377\377\0\377\377\0\377\377\0\377\377\0\377\377\0\377\377\0\377\377" - "\0\377\377\0\310\310\0\310\310\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0" - "\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\310\310\0\377\377\0\377\377\0\377\377\0" - "\377\377\0\377\377\0\377\377\0\377\377\0\377\377\0\377\377\0\377\377\0\377" - "\377\0\377\377\0\377\377\0\377\377\0\377\377\0\377\377\0\377\377\0\377\377" - "\0\377\377\0\377\377\0\377\377\0\377\377\0\377\377\0\377\377\0\377\377\0" - "\377\377\0\377\377\0\377\377\0\377\377\0\377\377\0\377\377\0\377\377\0\377" - "\377\0\377\377\0\377\377\0\377\377\0\377\377\0\377\377\0\377\377\0\377\377" - "\0\377\377\0\377\377\0\377\377\0\377\377\0\377\377\0\377\377\0\377\377\0" - "\377\377\0\377\377\0\377\377\0\377\377\0\377\377\0\377\377\0\377\377\0\377" - "\377\0\377\377\0\377\377\0\377\377\0\377\377\0\377\377\0\377\377\0\377\377" - "\0\377\377\0\377\377\0\377\377\0\377\377\0\310\310\0\0\0\0\0\0\0\0\0\0\0" - "\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0dd\0\377\377\0\377\377" - "\0\377\377\0\377\377\0\377\377\0\377\377\0\377\377\0\377\377\0\377\377\0" - "\377\377\0\377\377\0\377\377\0\377\377\0\377\377\0\377\377\0\377\377\0\377" - "\377\0\377\377\0\377\377\0\377\377\0\377\377\0\377\377\0\377\377\0\377\377" - "\0\377\377\0\377\377\0\377\377\0\377\377\0\377\377\0\377\377\0\377\377\0" - "\377\377\0\377\377\0\377\377\0\377\377\0\377\377\0\377\377\0\377\377\0\377" - "\377\0\377\377\0\377\377\0\377\377\0\377\377\0\377\377\0\377\377\0\377\377" - "\0\377\377\0\377\377\0\377\377\0\377\377\0\377\377\0\377\377\0\377\377\0" - "\377\377\0\377\377\0\377\377\0\377\377\0\377\377\0\377\377\0\377\377\0\377" - "\377\0\377\377\0\377\377\0\377\377\0\377\377\0\377\377\0dd\0\0\0\0\0\0\0" - "\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\310\310\0\377" - "\377\0\377\377\0\377\377\0\377\377\0\377\377\0\377\377\0\377\377\0\377\377" - "\0\377\377\0\377\377\0\377\377\0\377\377\0\377\377\0\377\377\0\377\377\0" - "\377\377\0\377\377\0\377\377\0\377\377\0\377\377\0\377\377\0\377\377\0\377" - "\377\0\377\377\0\377\377\0\377\377\0\377\377\0\377\377\0\377\377\0\377\377" - "\0\377\377\0\377\377\0\377\377\0\377\377\0\377\377\0\377\377\0\377\377\0" - "\377\377\0\377\377\0\377\377\0\377\377\0\377\377\0\377\377\0\377\377\0\377" - "\377\0\377\377\0\377\377\0\377\377\0\377\377\0\377\377\0\377\377\0\377\377" - "\0\377\377\0\377\377\0\377\377\0\377\377\0\377\377\0\377\377\0\377\377\0" - "\377\377\0\377\377\0\377\377\0\377\377\0\377\377\0\377\377\0\377\377\0\310" - "\310\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0" - "\0\0\0\310\310\0\310\310\0\377\377\0\377\377\0\377\377\0\377\377\0\377\377" - "\0\377\377\0\377\377\0\377\377\0\377\377\0\377\377\0\377\377\0\377\377\0" - "\377\377\0\377\377\0\377\377\0\377\377\0\377\377\0\377\377\0\377\377\0\377" - "\377\0\377\377\0\377\377\0\377\377\0\377\377\0\377\377\0\377\377\0\377\377" - "\0\377\377\0\377\377\0\377\377\0\377\377\0\377\377\0\377\377\0\377\377\0" - "\377\377\0\377\377\0\377\377\0\377\377\0\377\377\0\377\377\0\377\377\0\377" - "\377\0\377\377\0\377\377\0\377\377\0\377\377\0\377\377\0\377\377\0\377\377" - "\0\377\377\0\377\377\0\377\377\0\377\377\0\377\377\0\377\377\0\377\377\0" - "\377\377\0\377\377\0\377\377\0\377\377\0\377\377\0\377\377\0\377\377\0\377" - "\377\0\310\310\0\310\310\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0" - "\0\0\0\0\0\0\0\0\0\0\0\0\0\310\310\0\377\377\0\377\377\0\377\377\0\377\377" - "\0\377\377\0\377\377\0\377\377\0\377\377\0\377\377\0\377\377\0\377\377\0" - "\377\377\0\377\377\0\377\377\0\377\377\0\377\377\0\377\377\0\377\377\0\377" - "\377\0\377\377\0\377\377\0\377\377\0\377\377\0\377\377\0\377\377\0\377\377" - "\0\377\377\0\377\377\0\377\377\0\377\377\0\377\377\0\377\377\0\377\377\0" - "\377\377\0\377\377\0\377\377\0\377\377\0\377\377\0\377\377\0\377\377\0\377" - "\377\0\377\377\0\377\377\0\377\377\0\377\377\0\377\377\0\377\377\0\377\377" - "\0\377\377\0\377\377\0\377\377\0\377\377\0\377\377\0\377\377\0\377\377\0" - "\377\377\0\377\377\0\377\377\0\377\377\0\377\377\0\377\377\0\377\377\0\377" - "\377\0\377\377\0\377\377\0\377\377\0\310\310\0\0\0\0\0\0\0\0\0\0\0\0\0\0" - "\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0dd\0\377\377\0\377\377\0\377" - "\377\0\377\377\0\377\377\0\377\377\0\377\377\0\377\377\0\377\377\0\377\377" - "\0\377\377\0\377\377\0\377\377\0\377\377\0\377\377\0\377\377\0\377\377\0" - "\377\377\0\377\377\0\377\377\0\377\377\0\377\377\0\377\377\0\377\377\0\377" - "\377\0\377\377\0\377\377\0\377\377\0\377\377\0\377\377\0\377\377\0\377\377" - "\0\377\377\0\377\377\0\377\377\0\377\377\0\377\377\0\377\377\0\377\377\0" - "\377\377\0\377\377\0\377\377\0\377\377\0\377\377\0\377\377\0\377\377\0\377" - "\377\0\377\377\0\377\377\0\377\377\0\377\377\0\377\377\0\377\377\0\377\377" - "\0\377\377\0\377\377\0\377\377\0\377\377\0\377\377\0\377\377\0\377\377\0" - "\377\377\0\377\377\0\377\377\0\377\377\0\377\377\0dd\0\0\0\0\0\0\0\0\0\0" - "\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\310\310\0\377\377" - "\0\377\377\0\377\377\0\377\377\0\377\377\0\377\377\0\377\377\0\377\377\0" - "\377\377\0\377\377\0\377\377\0\377\377\0\377\377\0\377\377\0\377\377\0\377" - "\377\0\377\377\0\377\377\0\377\377\0\377\377\0\377\377\0\377\377\0\377\377" - "\0\377\377\0\377\377\0\377\377\0\377\377\0\377\377\0\377\377\0\377\377\0" - "\377\377\0\377\377\0\377\377\0\377\377\0\377\377\0\377\377\0\377\377\0\377" - "\377\0\377\377\0\377\377\0\377\377\0\377\377\0\377\377\0\377\377\0\377\377" - "\0\377\377\0\377\377\0\377\377\0\377\377\0\377\377\0\377\377\0\377\377\0" - "\377\377\0\377\377\0\377\377\0\377\377\0\377\377\0\377\377\0\377\377\0\377" - "\377\0\377\377\0\377\377\0\377\377\0\377\377\0\377\377\0\377\377\0\310\310" - "\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0" - "\0\310\310\0\310\310\0\377\377\0\377\377\0\377\377\0\377\377\0\377\377\0" - "\377\377\0\377\377\0\377\377\0\377\377\0\377\377\0\377\377\0\377\377\0\377" - "\377\0\377\377\0\377\377\0\377\377\0\377\377\0\377\377\0\377\377\0\377\377" - "\0\377\377\0\377\377\0\377\377\0\377\377\0\377\377\0\377\377\0\377\377\0" - "\377\377\0\377\377\0\377\377\0\377\377\0\377\377\0\377\377\0\377\377\0\377" - "\377\0\377\377\0\377\377\0\377\377\0\377\377\0\377\377\0\377\377\0\377\377" - "\0\377\377\0\377\377\0\377\377\0\377\377\0\377\377\0\377\377\0\377\377\0" - "\377\377\0\377\377\0\377\377\0\377\377\0\377\377\0\377\377\0\377\377\0\377" - "\377\0\377\377\0\377\377\0\377\377\0\377\377\0\377\377\0\377\377\0\377\377" - "\0\310\310\0\310\310\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0" - "\0\0\0\0\0\0\0\0\0\0\0\310\310\0\377\377\0\377\377\0\377\377\0\377\377\0" - "\377\377\0\377\377\0\377\377\0\377\377\0\377\377\0\377\377\0\377\377\0\377" - "\377\0\377\377\0\377\377\0\377\377\0\377\377\0\377\377\0\377\377\0\377\377" - "\0\377\377\0\377\377\0\377\377\0\377\377\0\377\377\0\377\377\0\377\377\0" - "\377\377\0\377\377\0\377\377\0\377\377\0\377\377\0\377\377\0\377\377\0\377" - "\377\0\377\377\0\377\377\0\377\377\0\377\377\0\377\377\0\377\377\0\377\377" - "\0\377\377\0\377\377\0\377\377\0\377\377\0\377\377\0\377\377\0\377\377\0" - "\377\377\0\377\377\0\377\377\0\377\377\0\377\377\0\377\377\0\377\377\0\377" - "\377\0\377\377\0\377\377\0\377\377\0\377\377\0\377\377\0\377\377\0\377\377" - "\0\377\377\0\377\377\0\377\377\0\310\310\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0" - "\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0dd\0\377\377\0\377\377\0\377\377" - "\0\377\377\0\377\377\0\377\377\0\377\377\0\377\377\0\377\377\0\377\377\0" - "\377\377\0\377\377\0\377\377\0\377\377\0\377\377\0\377\377\0\377\377\0\377" - "\377\0\377\377\0\377\377\0\377\377\0\377\377\0\377\377\0\377\377\0\377\377" - "\0\377\377\0\377\377\0\377\377\0\377\377\0\377\377\0\377\377\0\377\377\0" - "\377\377\0\377\377\0\377\377\0\377\377\0\377\377\0\377\377\0\377\377\0\377" - "\377\0\377\377\0\377\377\0\377\377\0\377\377\0\377\377\0\377\377\0\377\377" - "\0\377\377\0\377\377\0\377\377\0\377\377\0\377\377\0\377\377\0\377\377\0" - "\377\377\0\377\377\0\377\377\0\377\377\0\377\377\0\377\377\0\377\377\0\377" - "\377\0\377\377\0\377\377\0\377\377\0\377\377\0dd\0\0\0\0\0\0\0\0\0\0\0\0" - "\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\310\310\0\377\377\0\377" - "\377\0\377\377\0\377\377\0\377\377\0\377\377\0\377\377\0\377\377\0\377\377" - "\0\377\377\0\377\377\0\377\377\0\377\377\0\377\377\0\377\377\0\377\377\0" - "\377\377\0\377\377\0\377\377\0\377\377\0\377\377\0\377\377\0\377\377\0\377" - "\377\0\377\377\0\377\377\0\377\377\0\377\377\0\377\377\0\377\377\0\377\377" - "\0\377\377\0\377\377\0\377\377\0\377\377\0\377\377\0\377\377\0\377\377\0" - "\377\377\0\377\377\0\377\377\0\377\377\0\377\377\0\377\377\0\377\377\0\377" - "\377\0\377\377\0\377\377\0\377\377\0\377\377\0\377\377\0\377\377\0\377\377" - "\0\377\377\0\377\377\0\377\377\0\377\377\0\377\377\0\377\377\0\377\377\0" - "\377\377\0\377\377\0\377\377\0\377\377\0\377\377\0\377\377\0\310\310\0\0" - "\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\310" - "\310\0\310\310\0\377\377\0\377\377\0\377\377\0\377\377\0\377\377\0\377\377" - "\0\377\377\0\377\377\0\377\377\0\377\377\0\377\377\0\377\377\0\377\377\0" - "\377\377\0\377\377\0\377\377\0\377\377\0\377\377\0\377\377\0\377\377\0\377" - "\377\0\377\377\0\377\377\0\377\377\0\377\377\0\377\377\0\377\377\0\377\377" - "\0\377\377\0\377\377\0\377\377\0\377\377\0\377\377\0\377\377\0\377\377\0" - "\377\377\0\377\377\0\377\377\0\377\377\0\377\377\0\377\377\0\377\377\0\377" - "\377\0\377\377\0\377\377\0\377\377\0\377\377\0\377\377\0\377\377\0\377\377" - "\0\377\377\0\377\377\0\377\377\0\377\377\0\377\377\0\377\377\0\377\377\0" - "\377\377\0\377\377\0\377\377\0\377\377\0\377\377\0\377\377\0\377\377\0\310" - "\310\0\310\310\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0" - "\0\0\0\0\0\0\0\0\310\310\0\377\377\0\377\377\0\377\377\0\377\377\0\377\377" - "\0\377\377\0\377\377\0\377\377\0\377\377\0\377\377\0\377\377\0\377\377\0" - "\377\377\0\377\377\0\377\377\0\377\377\0\377\377\0\377\377\0\377\377\0\377" - "\377\0\377\377\0\377\377\0\377\377\0\377\377\0\377\377\0\377\377\0\377\377" - "\0\377\377\0\377\377\0\377\377\0\377\377\0\377\377\0\377\377\0\377\377\0" - "\377\377\0\377\377\0\377\377\0\377\377\0\377\377\0\377\377\0\377\377\0\377" - "\377\0\377\377\0\377\377\0\377\377\0\377\377\0\377\377\0\377\377\0\377\377" - "\0\377\377\0\377\377\0\377\377\0\377\377\0\377\377\0\377\377\0\377\377\0" - "\377\377\0\377\377\0\377\377\0\377\377\0\377\377\0\377\377\0\377\377\0\377" - "\377\0\377\377\0\377\377\0\310\310\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0" - "\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0dd\0\377\377\0\377\377\0\377\377\0\377" - "\377\0\377\377\0\377\377\0\377\377\0\377\377\0\377\377\0\377\377\0\377\377" - "\0\377\377\0\377\377\0\377\377\0\377\377\0\377\377\0\377\377\0\377\377\0" - "\377\377\0\377\377\0\377\377\0\377\377\0\377\377\0\377\377\0\377\377\0\377" - "\377\0\377\377\0\377\377\0\377\377\0\377\377\0\377\377\0\377\377\0\377\377" - "\0\377\377\0\377\377\0\377\377\0\377\377\0\377\377\0\377\377\0\377\377\0" - "\377\377\0\377\377\0\377\377\0\377\377\0\377\377\0\377\377\0\377\377\0\377" - "\377\0\377\377\0\377\377\0\377\377\0\377\377\0\377\377\0\377\377\0\377\377" - "\0\377\377\0\377\377\0\377\377\0\377\377\0\377\377\0\377\377\0\377\377\0" - "\377\377\0\377\377\0\377\377\0\377\377\0dd\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0" - "\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\310\310\0\377\377\0\377\377" - "\0\377\377\0\377\377\0\377\377\0\377\377\0\377\377\0\377\377\0\377\377\0" - "\377\377\0\377\377\0\377\377\0\377\377\0\377\377\0\377\377\0\377\377\0\377" - "\377\0\377\377\0\377\377\0\377\377\0\377\377\0\377\377\0\377\377\0\377\377" - "\0\377\377\0\377\377\0\377\377\0\377\377\0\377\377\0\377\377\0\377\377\0" - "\377\377\0\377\377\0\377\377\0\377\377\0\377\377\0\377\377\0\377\377\0\377" - "\377\0\377\377\0\377\377\0\377\377\0\377\377\0\377\377\0\377\377\0\377\377" - "\0\377\377\0\377\377\0\377\377\0\377\377\0\377\377\0\377\377\0\377\377\0" - "\377\377\0\377\377\0\377\377\0\377\377\0\377\377\0\377\377\0\377\377\0\377" - "\377\0\377\377\0\377\377\0\377\377\0\377\377\0\377\377\0\310\310\0\0\0\0" - "\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\310\310" - "\0\310\310\0\377\377\0\377\377\0\377\377\0\377\377\0\377\377\0\377\377\0" - "\377\377\0\377\377\0\377\377\0\377\377\0\377\377\0\377\377\0\377\377\0\377" - "\377\0\377\377\0\377\377\0\377\377\0\377\377\0\377\377\0\377\377\0\377\377" - "\0\377\377\0\377\377\0\377\377\0\377\377\0\377\377\0\377\377\0\377\377\0" - "\377\377\0\377\377\0\377\377\0\377\377\0\377\377\0\377\377\0\377\377\0\377" - "\377\0\377\377\0\377\377\0\377\377\0\377\377\0\377\377\0\377\377\0\377\377" - "\0\377\377\0\377\377\0\377\377\0\377\377\0\377\377\0\377\377\0\377\377\0" - "\377\377\0\377\377\0\377\377\0\377\377\0\377\377\0\377\377\0\377\377\0\377" - "\377\0\377\377\0\377\377\0\377\377\0\377\377\0\377\377\0\377\377\0\310\310" - "\0\310\310\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0" - "\0\0\0\0\0\0\310\310\0\377\377\0\377\377\0\377\377\0\377\377\0\377\377\0" - "\377\377\0\377\377\0\377\377\0\377\377\0\377\377\0\377\377\0\377\377\0\377" - "\377\0\377\377\0\377\377\0\377\377\0\377\377\0\377\377\0\377\377\0\377\377" - "\0\377\377\0\377\377\0\377\377\0\377\377\0\377\377\0\377\377\0\377\377\0" - "\377\377\0\377\377\0\377\377\0\377\377\0\377\377\0\377\377\0\377\377\0\377" - "\377\0\377\377\0\377\377\0\377\377\0\377\377\0\377\377\0\377\377\0\377\377" - "\0\377\377\0\377\377\0\377\377\0\377\377\0\377\377\0\377\377\0\377\377\0" - "\377\377\0\377\377\0\377\377\0\377\377\0\377\377\0\377\377\0\377\377\0\377" - "\377\0\377\377\0\377\377\0\377\377\0\377\377\0\377\377\0\377\377\0\377\377" - "\0\377\377\0\377\377\0\310\310\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0" - "\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0dd\0\377\377\0\377\377\0\377\377\0\377\377" - "\0\377\377\0\377\377\0\377\377\0\377\377\0\377\377\0\377\377\0\377\377\0" - "\377\377\0\377\377\0\377\377\0\377\377\0\377\377\0\377\377\0\377\377\0\377" - "\377\0\377\377\0\377\377\0\377\377\0\377\377\0\377\377\0\377\377\0\377\377" - "\0\377\377\0\377\377\0\377\377\0\377\377\0\377\377\0\377\377\0\377\377\0" - "\377\377\0\377\377\0\377\377\0\377\377\0\377\377\0\377\377\0\377\377\0\377" - "\377\0\377\377\0\377\377\0\377\377\0\377\377\0\377\377\0\377\377\0\377\377" - "\0\377\377\0\377\377\0\377\377\0\377\377\0\377\377\0\377\377\0\377\377\0" - "\377\377\0\377\377\0\377\377\0\377\377\0\377\377\0\377\377\0\377\377\0\377" - "\377\0\377\377\0\377\377\0\377\377\0dd\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0" - "\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\310\310\0\377\377\0\377\377\0\377" - "\377\0\377\377\0\377\377\0\377\377\0\377\377\0\377\377\0\377\377\0\377\377" - "\0\377\377\0\377\377\0\377\377\0\377\377\0\377\377\0\377\377\0\377\377\0" - "\377\377\0\377\377\0\377\377\0\377\377\0\377\377\0\377\377\0\377\377\0\377" - "\377\0\377\377\0\377\377\0\377\377\0\377\377\0\377\377\0\377\377\0\377\377" - "\0\377\377\0\377\377\0\377\377\0\377\377\0\377\377\0\377\377\0\377\377\0" - "\377\377\0\377\377\0\377\377\0\377\377\0\377\377\0\377\377\0\377\377\0\377" - "\377\0\377\377\0\377\377\0\377\377\0\377\377\0\377\377\0\377\377\0\377\377" - "\0\377\377\0\377\377\0\377\377\0\377\377\0\377\377\0\377\377\0\377\377\0" - "\377\377\0\377\377\0\377\377\0\377\377\0\377\377\0\310\310\0\0\0\0\0\0\0" - "\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\310\310\0\310" - "\310\0\377\377\0\377\377\0\377\377\0\377\377\0\377\377\0\377\377\0\377\377" - "\0\377\377\0\377\377\0\377\377\0\377\377\0\377\377\0\377\377\0\377\377\0" - "\377\377\0\377\377\0\377\377\0\377\377\0\377\377\0\377\377\0\377\377\0\377" - "\377\0\377\377\0\377\377\0\377\377\0\377\377\0\377\377\0\377\377\0\377\377" - "\0\377\377\0\377\377\0\377\377\0\377\377\0\377\377\0\377\377\0\377\377\0" - "\377\377\0\377\377\0\377\377\0\377\377\0\377\377\0\377\377\0\377\377\0\377" - "\377\0\377\377\0\377\377\0\377\377\0\377\377\0\377\377\0\377\377\0\377\377" - "\0\377\377\0\377\377\0\377\377\0\377\377\0\377\377\0\377\377\0\377\377\0" - "\377\377\0\377\377\0\377\377\0\377\377\0\377\377\0\377\377\0\310\310\0\310" - "\310\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0" - "\0\0\0\310\310\0\377\377\0\377\377\0\377\377\0\377\377\0\377\377\0\377\377" - "\0\377\377\0\377\377\0\377\377\0\377\377\0\377\377\0\377\377\0\377\377\0" - "\377\377\0\377\377\0\377\377\0\377\377\0\377\377\0\377\377\0\377\377\0\377" - "\377\0\377\377\0\377\377\0\377\377\0\377\377\0\377\377\0\377\377\0\377\377" - "\0\377\377\0\377\377\0\377\377\0\377\377\0\377\377\0\377\377\0\377\377\0" - "\377\377\0\377\377\0\377\377\0\377\377\0\377\377\0\377\377\0\377\377\0\377" - "\377\0\377\377\0\377\377\0\377\377\0\377\377\0\377\377\0\377\377\0\377\377" - "\0\377\377\0\377\377\0\377\377\0\377\377\0\377\377\0\377\377\0\377\377\0" - "\377\377\0\377\377\0\377\377\0\377\377\0\377\377\0\377\377\0\377\377\0\377" - "\377\0\377\377\0\310\310\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0" - "\0\0\0\0\0\0\0\0\0\0\0\0\0dd\0\377\377\0\377\377\0\377\377\0\377\377\0\377" - "\377\0\377\377\0\377\377\0\377\377\0\377\377\0\377\377\0\377\377\0\377\377" - "\0\377\377\0\377\377\0\377\377\0\377\377\0\377\377\0\377\377\0\377\377\0" - "\377\377\0\377\377\0\377\377\0\377\377\0\377\377\0\377\377\0\377\377\0\377" - "\377\0\377\377\0\377\377\0\377\377\0\377\377\0\377\377\0\377\377\0\377\377" - "\0\377\377\0\377\377\0\377\377\0\377\377\0\377\377\0\377\377\0\377\377\0" - "\377\377\0\377\377\0\377\377\0\377\377\0\377\377\0\377\377\0\377\377\0\377" - "\377\0\377\377\0\377\377\0\377\377\0\377\377\0\377\377\0\377\377\0\377\377" - "\0\377\377\0\377\377\0\377\377\0\377\377\0\377\377\0\377\377\0\377\377\0" - "\377\377\0\377\377\0\377\377\0dd\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0" - "\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\310\310\0\377\377\0\377\377\0\310\310" - "\0\377\377\0\377\377\0\377\377\0\377\377\0\377\377\0\377\377\0\377\377\0" - "\377\377\0\377\377\0\377\377\0\377\377\0\377\377\0\377\377\0\377\377\0\377" - "\377\0\377\377\0\377\377\0\377\377\0\377\377\0\377\377\0\377\377\0\377\377" - "\0\377\377\0\377\377\0\377\377\0\377\377\0\377\377\0\377\377\0\377\377\0" - "\377\377\0\377\377\0\377\377\0\377\377\0\377\377\0\377\377\0\377\377\0\377" - "\377\0\377\377\0\377\377\0\377\377\0\377\377\0\377\377\0\377\377\0\377\377" - "\0\377\377\0\377\377\0\377\377\0\377\377\0\377\377\0\377\377\0\377\377\0" - "\377\377\0\377\377\0\377\377\0\377\377\0\377\377\0\377\377\0\377\377\0\377" - "\377\0\377\377\0\310\310\0\377\377\0\377\377\0\310\310\0\0\0\0\0\0\0\0\0" - "\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\310\310\0\310\310" - "\0\377\377\0\377\377\0\377\377\0\377\377\0\377\377\0\377\377\0\377\377\0" - "\377\377\0\377\377\0\377\377\0\377\377\0\377\377\0\377\377\0\377\377\0\377" - "\377\0\377\377\0\377\377\0\377\377\0\377\377\0\377\377\0\377\377\0\377\377" - "\0\377\377\0\377\377\0\377\377\0\377\377\0\377\377\0\377\377\0\377\377\0" - "\377\377\0\377\377\0\377\377\0\377\377\0\377\377\0\377\377\0\377\377\0\377" - "\377\0\377\377\0\377\377\0\377\377\0\377\377\0\377\377\0\377\377\0\377\377" - "\0\377\377\0\377\377\0\377\377\0\377\377\0\377\377\0\377\377\0\377\377\0" - "\377\377\0\377\377\0\377\377\0\377\377\0\377\377\0\377\377\0\377\377\0\377" - "\377\0\377\377\0\377\377\0\377\377\0\377\377\0\377\377\0\310\310\0\310\310" - "\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0" - "\0\310\310\0\310\310\0\310\310\0\377\377\0\377\377\0\377\377\0\377\377\0" - "\377\377\0\377\377\0\377\377\0\377\377\0\377\377\0\377\377\0\377\377\0\377" - "\377\0\377\377\0\377\377\0\377\377\0\377\377\0\377\377\0\377\377\0\377\377" - "\0\377\377\0\377\377\0\377\377\0\377\377\0\377\377\0\377\377\0\377\377\0" - "\377\377\0\377\377\0\377\377\0\377\377\0\377\377\0\377\377\0\377\377\0\377" - "\377\0\377\377\0\377\377\0\377\377\0\377\377\0\377\377\0\377\377\0\377\377" - "\0\377\377\0\377\377\0\377\377\0\377\377\0\377\377\0\377\377\0\377\377\0" - "\377\377\0\377\377\0\377\377\0\377\377\0\377\377\0\377\377\0\377\377\0\377" - "\377\0\377\377\0\377\377\0\377\377\0\377\377\0\377\377\0\377\377\0\310\310" - "\0\310\310\0\310\310\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0" - "\0\0\0\0\0\0\0\0\0\0\0dd\0\310\310\0\310\310\0\310\310\0\377\377\0\377\377" - "\0\377\377\0\377\377\0\377\377\0\377\377\0\377\377\0\377\377\0\377\377\0" - "\377\377\0\377\377\0\377\377\0\377\377\0\377\377\0\377\377\0\377\377\0\377" - "\377\0\377\377\0\377\377\0\377\377\0\377\377\0\377\377\0\377\377\0\377\377" - "\0\377\377\0\377\377\0\377\377\0\377\377\0\377\377\0\377\377\0\377\377\0" - "\377\377\0\377\377\0\377\377\0\377\377\0\377\377\0\377\377\0\377\377\0\377" - "\377\0\377\377\0\377\377\0\377\377\0\377\377\0\377\377\0\377\377\0\377\377" - "\0\377\377\0\377\377\0\377\377\0\377\377\0\377\377\0\377\377\0\377\377\0" - "\377\377\0\377\377\0\377\377\0\377\377\0\377\377\0\377\377\0\377\377\0\310" - "\310\0\310\310\0\310\310\0dd\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0" - "\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0dd\0\310\310\0\310\310\0dd\0\310\310\0\377" - "\377\0\377\377\0\377\377\0\377\377\0\377\377\0\377\377\0\377\377\0\377\377" - "\0\377\377\0\377\377\0\377\377\0\377\377\0\377\377\0\377\377\0\377\377\0" - "\377\377\0\377\377\0\377\377\0\377\377\0\377\377\0\377\377\0\377\377\0\377" - "\377\0\377\377\0\377\377\0\377\377\0\377\377\0\377\377\0\377\377\0\377\377" - "\0\377\377\0\377\377\0\377\377\0\377\377\0\377\377\0\377\377\0\377\377\0" - "\377\377\0\377\377\0\377\377\0\377\377\0\377\377\0\377\377\0\377\377\0\377" - "\377\0\377\377\0\377\377\0\377\377\0\377\377\0\377\377\0\377\377\0\377\377" - "\0\377\377\0\377\377\0\377\377\0\377\377\0\377\377\0\377\377\0\310\310\0" - "dd\0\310\310\0\310\310\0dd\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0" - "\0\0\0\0\0\0\0\0\0\0\0\0\0\0dd\0dd\0\310\310\0\310\310\0\310\310\0\310\310" - "\0\377\377\0\377\377\0\377\377\0\310\310\0\377\377\0\377\377\0\377\377\0" - "\377\377\0\377\377\0\377\377\0\377\377\0\377\377\0\377\377\0\377\377\0\377" - "\377\0\377\377\0\377\377\0\377\377\0\377\377\0\377\377\0\377\377\0\377\377" - "\0\377\377\0\377\377\0\377\377\0\377\377\0\377\377\0\377\377\0\377\377\0" - "\377\377\0\377\377\0\377\377\0\377\377\0\377\377\0\377\377\0\377\377\0\377" - "\377\0\377\377\0\377\377\0\377\377\0\377\377\0\377\377\0\377\377\0\377\377" - "\0\377\377\0\377\377\0\377\377\0\377\377\0\377\377\0\377\377\0\377\377\0" - "\377\377\0\310\310\0\377\377\0\377\377\0\377\377\0\310\310\0\310\310\0\310" - "\310\0\310\310\0dd\0dd\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0" - "\0\0\0\0\0\0\0\0\0\0\0\0dd\0dd\0dd\0\310\310\0\377\377\0\310\310\0\310\310" - "\0\377\377\0\377\377\0\377\377\0\377\377\0\377\377\0\377\377\0\377\377\0" - "\377\377\0\377\377\0\377\377\0\377\377\0\377\377\0\377\377\0\377\377\0\377" - "\377\0\377\377\0\377\377\0\377\377\0\377\377\0\377\377\0\377\377\0\377\377" - "\0\377\377\0\377\377\0\377\377\0\377\377\0\377\377\0\377\377\0\377\377\0" - "\377\377\0\377\377\0\377\377\0\377\377\0\377\377\0\377\377\0\377\377\0\377" - "\377\0\377\377\0\377\377\0\377\377\0\377\377\0\377\377\0\377\377\0\377\377" - "\0\377\377\0\377\377\0\377\377\0\377\377\0\377\377\0\377\377\0\377\377\0" - "\377\377\0\377\377\0\377\377\0\310\310\0\310\310\0\377\377\0\310\310\0dd" - "\0dd\0dd\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0" - "\0\0\0\0\0\0\0\0dd\0dd\0dd\0\310\310\0\377\377\0\377\377\0\310\310\0\377" - "\377\0\377\377\0\377\377\0\377\377\0\377\377\0\377\377\0\377\377\0\377\377" - "\0\377\377\0\377\377\0\377\377\0\377\377\0\377\377\0\377\377\0\377\377\0" - "\377\377\0\377\377\0\377\377\0\377\377\0\377\377\0\377\377\0\377\377\0\377" - "\377\0\377\377\0\377\377\0\377\377\0\377\377\0\377\377\0\377\377\0\377\377" - "\0\377\377\0\377\377\0\377\377\0\377\377\0\377\377\0\377\377\0\377\377\0" - "\377\377\0\377\377\0\377\377\0\377\377\0\377\377\0\377\377\0\377\377\0\377" - "\377\0\377\377\0\377\377\0\377\377\0\377\377\0\377\377\0\377\377\0\377\377" - "\0\310\310\0\377\377\0\377\377\0\310\310\0dd\0dd\0dd\0\0\0\0\0\0\0\0\0\0" - "\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0dd\0dd" - "\0\0\0\0\0\0\0dd\0\377\377\0\310\310\0\310\310\0\377\377\0\377\377\0\377" - "\377\0\377\377\0\377\377\0\377\377\0\377\377\0\377\377\0\377\377\0\377\377" - "\0\377\377\0\377\377\0\377\377\0\377\377\0\377\377\0\377\377\0\377\377\0" - "\377\377\0\377\377\0\377\377\0\377\377\0\377\377\0\377\377\0\377\377\0\377" - "\377\0\377\377\0\377\377\0\377\377\0\377\377\0\377\377\0\377\377\0\377\377" - "\0\377\377\0\377\377\0\377\377\0\377\377\0\377\377\0\377\377\0\377\377\0" - "\377\377\0\377\377\0\377\377\0\377\377\0\377\377\0\377\377\0\377\377\0\377" - "\377\0\377\377\0\377\377\0\377\377\0\310\310\0\310\310\0\377\377\0dd\0\0" - "\0\0\0\0\0dd\0dd\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0" - "\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0dd\0dd\0\0\0\0\0\0\0dd\0dd\0\0\0\0\0" - "\0\0dd\0dd\0\0\0\0\0\0\0dd\0dd\0dd\0dd\0dd\0dd\0dd\0dd\0dd\0dd\0dd\0dd\0" - "dd\0dd\0dd\0dd\0dd\0dd\0dd\0dd\0dd\0dd\0dd\0dd\0dd\0dd\0dd\0dd\0dd\0dd\0" - "dd\0dd\0dd\0dd\0dd\0dd\0dd\0dd\0dd\0dd\0\0\0\0\0\0\0dd\0dd\0\0\0\0\0\0\0" - "dd\0dd\0\0\0\0\0\0\0dd\0dd\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0" - "\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0dd\0dd\0\0\0\0" - "\0\0\0dd\0dd\0\0\0\0\0\0\0dd\0dd\0\0\0\0\0\0\0\310\310\0\310\310\0\0\0\0" - "\0\0\0\310\310\0\310\310\0\0\0\0\0\0\0\310\310\0\310\310\0\0\0\0\0\0\0\310" - "\310\0\310\310\0\0\0\0\0\0\0\310\310\0\310\310\0\0\0\0\0\0\0\310\310\0\310" - "\310\0\0\0\0\0\0\0\310\310\0\310\310\0\0\0\0\0\0\0\310\310\0\310\310\0\0" - "\0\0\0\0\0\310\310\0\310\310\0\0\0\0\0\0\0\310\310\0\310\310\0\0\0\0\0\0" - "\0dd\0dd\0\0\0\0\0\0\0dd\0dd\0\0\0\0\0\0\0dd\0dd\0\0\0\0\0\0\0\0\0\0\0\0" - "\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0" - "\0\0\0\0\0\0\0\0\0\0dd\0dd\0dd\0\0\0\0dd\0dd\0dd\0\0\0\0dd\0\310\310\0\310" - "\310\0dd\0dd\0\310\310\0\310\310\0dd\0dd\0\310\310\0\310\310\0dd\0dd\0\310" - "\310\0\310\310\0dd\0dd\0\310\310\0\310\310\0dd\0dd\0\310\310\0\310\310\0" - "dd\0dd\0\310\310\0\310\310\0dd\0dd\0\310\310\0\310\310\0dd\0dd\0\310\310" - "\0\310\310\0dd\0dd\0\310\310\0\310\310\0dd\0dd\0\310\310\0\310\310\0dd\0" - "\0\0\0dd\0dd\0dd\0\0\0\0dd\0dd\0dd\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0" - "\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0" - "\0\0\0\0\0\0\0\0\0\0\0\0dd\0dd\0dd\0dd\0\310\310\0\310\310\0\310\310\0\310" - "\310\0\310\310\0\310\310\0\310\310\0\310\310\0\310\310\0\310\310\0\310\310" - "\0\310\310\0\310\310\0\310\310\0\310\310\0\310\310\0\310\310\0\310\310\0" - "\310\310\0\310\310\0\310\310\0\310\310\0\310\310\0\310\310\0\310\310\0\310" - "\310\0\310\310\0\310\310\0\310\310\0\310\310\0\310\310\0\310\310\0\310\310" - "\0\310\310\0\310\310\0\310\310\0\310\310\0\310\310\0\310\310\0\310\310\0" - "\310\310\0\310\310\0\310\310\0\310\310\0\310\310\0\310\310\0\310\310\0\310" - "\310\0dd\0dd\0dd\0dd\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0" - "\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0" - "\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0" - "\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\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\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0" - "\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0" - "\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0" - "\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0" - "\0\0\0\0\0\0\0\0\0\0\0\0dd\0dd\0<<\0<<\0\240\240\0\240\240\0aa\0aa\0\240" - "\240\0\240\240\0aa\0aa\0\240\240\0\240\240\0aa\0aa\0\240\240\0\240\240\0" - "aa\0aa\0\240\240\0\240\240\0aa\0aa\0\240\240\0\240\240\0aa\0aa\0\240\240" - "\0\240\240\0aa\0aa\0\240\240\0\240\240\0aa\0aa\0\240\240\0\240\240\0aa\0" - "aa\0\240\240\0\240\240\0aa\0aa\0\240\240\0\240\240\0aa\0aa\0\240\240\0\240" - "\240\0\240\240\0\240\240\0dd\0dd\0dd\0dd\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0" - "\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0" - "\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0dd\0dd\0dd\0<<\0\240\240\0\240\240\0\240\240" - "\0aa\0\305\305\0\305\305\0\305\305\0ww\0\305\305\0\305\305\0\305\305\0ww" - "\0\305\305\0\305\305\0\305\305\0ww\0\305\305\0\305\305\0\305\305\0ww\0\305" - "\305\0\305\305\0\305\305\0ww\0\305\305\0\305\305\0\305\305\0ww\0\305\305" - "\0\305\305\0\305\305\0ww\0\305\305\0\305\305\0\305\305\0ww\0\305\305\0\305" - "\305\0\305\305\0ww\0\305\305\0\305\305\0\305\305\0ww\0\305\305\0\305\305" - "\0\305\305\0\305\305\0\240\240\0\240\240\0\240\240\0\240\240\0dd\0dd\0dd" - "\0dd\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0" - "\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0dd\0dd\0dd\0<<\0\240\240" - "\0\240\240\0\240\240\0aa\0\305\305\0\305\305\0\305\305\0ww\0\333\333\0\333" - "\333\0\305\305\0ww\0\333\333\0\333\333\0\305\305\0ww\0\333\333\0\333\333" - "\0\305\305\0ww\0\333\333\0\333\333\0\305\305\0ww\0\333\333\0\333\333\0\305" - "\305\0ww\0\333\333\0\333\333\0\305\305\0ww\0\333\333\0\333\333\0\305\305" - "\0ww\0\333\333\0\333\333\0\305\305\0ww\0\333\333\0\333\333\0\305\305\0ww" - "\0\333\333\0\333\333\0\305\305\0\305\305\0\305\305\0\305\305\0\240\240\0" - "\240\240\0\240\240\0\240\240\0dd\0dd\0dd\0dd\0\0\0\0\0\0\0\0\0\0\0\0\0\0" - "\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0" - "\0\0dd\0dd\0dd\0<<\0aa\0aa\0aa\0::\0HH\0HH\0HH\0++\0PP\0PP\0PP\0""00\0PP" - "\0PP\0PP\0""00\0PP\0PP\0PP\0""00\0PP\0PP\0PP\0""00\0PP\0PP\0PP\0""00\0PP" - "\0PP\0PP\0""00\0PP\0PP\0PP\0""00\0PP\0PP\0PP\0""00\0PP\0PP\0PP\0""00\0PP" - "\0PP\0PP\0PP\0HH\0HH\0HH\0HH\0aa\0aa\0aa\0aa\0dd\0dd\0dd\0dd\0\0\0\0\0\0" - "\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0" - "\0\0\0\0dd\0dd\0dd\0$$\0aa\0\305\305\0\305\305\0``\0\205\205\0\351\351\0" - "\351\351\0||\0\222\222\0\321\321\0\321\321\0\177\177\0\225\225\0\324\324" - "\0\321\321\0\177\177\0\225\225\0\324\324\0\321\321\0\177\177\0\225\225\0" - "\324\324\0\321\321\0\177\177\0\225\225\0\324\324\0\321\321\0\177\177\0\225" - "\225\0\324\324\0\321\321\0\177\177\0\225\225\0\324\324\0\321\321\0\177\177" - "\0\225\225\0\324\324\0\321\321\0\177\177\0\225\225\0\324\324\0\321\321\0" - "\177\177\0\225\225\0\324\324\0\321\321\0\222\222\0\222\222\0\321\321\0\314" - "\314\0\351\351\0\351\351\0\254\254\0\236\236\0\305\305\0\305\305\0aa\0<<" - "\0dd\0dd\0dd\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0" - "\0\0\0\0\0\0\0\0\0\0\0\0\0dd\0dd\0<<\0dd\0\240\240\0\240\240\0aa\0\255\255" - "\0\322\322\0\322\322\0\177\177\0\315\315\0\343\343\0\343\343\0\211\211\0" - "\313\313\0\346\346\0\346\346\0\211\211\0\313\313\0\346\346\0\346\346\0\211" - "\211\0\313\313\0\346\346\0\346\346\0\211\211\0\313\313\0\346\346\0\346\346" - "\0\211\211\0\313\313\0\346\346\0\346\346\0\211\211\0\313\313\0\346\346\0" - "\346\346\0\211\211\0\313\313\0\346\346\0\346\346\0\211\211\0\313\313\0\346" - "\346\0\346\346\0\211\211\0\313\313\0\346\346\0\346\346\0\211\211\0\320\320" - "\0\327\327\0\327\327\0\322\322\0\276\276\0\322\322\0\322\322\0\305\305\0" - "yy\0\210\210\0\210\210\0dd\0<<\0dd\0dd\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0" - "\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0dd\0dd\0<<\0\210\210\0\240" - "\240\0\240\240\0aa\0\266\266\0\322\322\0\322\322\0\205\205\0\327\327\0\343" - "\343\0\343\343\0\215\215\0\346\346\0\357\357\0\331\331\0\222\222\0\347\347" - "\0\357\357\0\331\331\0\222\222\0\347\347\0\357\357\0\331\331\0\222\222\0" - "\347\347\0\357\357\0\331\331\0\222\222\0\347\347\0\357\357\0\331\331\0\222" - "\222\0\347\347\0\357\357\0\331\331\0\222\222\0\347\347\0\357\357\0\331\331" - "\0\222\222\0\347\347\0\357\357\0\331\331\0\222\222\0\347\347\0\357\357\0" - "\331\331\0\222\222\0\357\357\0\346\346\0\320\320\0\351\351\0\327\327\0\343" - "\343\0\276\276\0\333\333\0\322\322\0\266\266\0yy\0\240\240\0\210\210\0\240" - "\240\0<<\0dd\0dd\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0" - "\0\0\0\0\0\0\0\0\0dd\0<<\0\240\240\0\210\210\0\240\240\0aa\0ww\0nn\0\177" - "\177\0MM\0SS\0OO\0SS\0""22\0WW\0TT\0XX\0""55\0UU\0UU\0XX\0""55\0UU\0UU\0" - "XX\0""55\0UU\0UU\0XX\0""55\0UU\0UU\0XX\0""55\0UU\0UU\0XX\0""55\0UU\0UU\0" - "XX\0""55\0UU\0UU\0XX\0""55\0UU\0UU\0XX\0""55\0UU\0XX\0TT\0TT\0LL\0OO\0SS" - "\0SS\0ss\0\177\177\0nn\0nn\0yy\0\210\210\0\240\240\0\240\240\0<<\0dd\0\0" - "\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0<<" - "\0\240\240\0\240\240\0\210\210\0HH\0\205\205\0\351\351\0\333\333\0pp\0\225" - "\225\0\371\371\0\363\363\0\202\202\0\231\231\0\330\330\0\325\325\0\203\203" - "\0\231\231\0\331\331\0\324\324\0\203\203\0\231\231\0\331\331\0\324\324\0" - "\203\203\0\231\231\0\331\331\0\324\324\0\203\203\0\231\231\0\331\331\0\324" - "\324\0\203\203\0\231\231\0\331\331\0\324\324\0\203\203\0\231\231\0\331\331" - "\0\324\324\0\203\203\0\231\231\0\331\331\0\324\324\0\203\203\0\231\231\0" - "\331\331\0\324\324\0\203\203\0\231\231\0\331\331\0\325\325\0\231\231\0\231" - "\231\0\330\330\0\323\323\0\371\371\0\371\371\0\274\274\0\257\257\0\351\351" - "\0\351\351\0\205\205\0``\0\240\240\0\240\240\0\240\240\0<<\0\0\0\0\0\0\0" - "\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0<<\0\240\240" - "\0\240\240\0RR\0\207\207\0\304\304\0\304\304\0nn\0\275\275\0\343\343\0\343" - "\343\0\205\205\0\324\324\0\352\352\0\352\352\0\214\214\0\316\316\0\352\352" - "\0\352\352\0\213\213\0\316\316\0\352\352\0\352\352\0\213\213\0\316\316\0" - "\352\352\0\352\352\0\213\213\0\316\316\0\352\352\0\352\352\0\213\213\0\316" - "\316\0\352\352\0\352\352\0\213\213\0\316\316\0\352\352\0\352\352\0\213\213" - "\0\316\316\0\352\352\0\352\352\0\213\213\0\316\316\0\352\352\0\352\352\0" - "\213\213\0\316\316\0\352\352\0\352\352\0\214\214\0\324\324\0\336\336\0\336" - "\336\0\331\331\0\310\310\0\343\343\0\343\343\0\325\325\0\217\217\0\254\254" - "\0\254\254\0\207\207\0aa\0\240\240\0\240\240\0<<\0\0\0\0\0\0\0\0\0\0\0\0" - "\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\240\240\0\240\240\0aa" - "\0\225\225\0\304\304\0\304\304\0\205\205\0\276\276\0\343\343\0\340\340\0" - "\222\222\0\333\333\0\352\352\0\351\351\0\226\226\0\347\347\0\362\362\0\333" - "\333\0\230\230\0\351\351\0\361\361\0\333\333\0\230\230\0\351\351\0\361\361" - "\0\333\333\0\230\230\0\351\351\0\361\361\0\333\333\0\230\230\0\351\351\0" - "\361\361\0\333\333\0\230\230\0\351\351\0\361\361\0\333\333\0\230\230\0\351" - "\351\0\361\361\0\333\333\0\230\230\0\351\351\0\361\361\0\333\333\0\230\230" - "\0\351\351\0\361\361\0\333\333\0\230\230\0\362\362\0\351\351\0\323\323\0" - "\366\366\0\336\336\0\351\351\0\304\304\0\351\351\0\343\343\0\304\304\0\217" - "\217\0\333\333\0\254\254\0\266\266\0aa\0\240\240\0\240\240\0\0\0\0\0\0\0" - "\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\240\240\0aa" - "\0\305\305\0\225\225\0\304\304\0ww\0\205\205\0ss\0\211\211\0RR\0VV\0PP\0" - "VV\0""33\0XX\0UU\0YY\0""66\0UU\0UU\0XX\0""66\0UU\0UU\0XX\0""66\0UU\0UU\0" - "XX\0""66\0UU\0UU\0XX\0""66\0UU\0UU\0XX\0""66\0UU\0UU\0XX\0""66\0UU\0UU\0" - "XX\0""66\0UU\0UU\0XX\0""66\0UU\0YY\0UU\0UU\0MM\0QQ\0UU\0UU\0ww\0\211\211" - "\0ww\0||\0\217\217\0\254\254\0\266\266\0\305\305\0aa\0\240\240\0\0\0\0\0" - "\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0aa\0\305" - "\305\0\305\305\0\225\225\0UU\0\222\222\0\366\366\0\340\340\0tt\0\231\231" - "\0\375\375\0\364\364\0\203\203\0\231\231\0\331\331\0\326\326\0\203\203\0" - "\231\231\0\331\331\0\324\324\0\203\203\0\231\231\0\331\331\0\324\324\0\203" - "\203\0\231\231\0\331\331\0\324\324\0\203\203\0\231\231\0\331\331\0\324\324" - "\0\203\203\0\231\231\0\331\331\0\324\324\0\203\203\0\231\231\0\331\331\0" - "\324\324\0\203\203\0\231\231\0\331\331\0\324\324\0\203\203\0\231\231\0\331" - "\331\0\324\324\0\203\203\0\231\231\0\331\331\0\326\326\0\231\231\0\231\231" - "\0\331\331\0\324\324\0\373\373\0\375\375\0\300\300\0\263\263\0\361\361\0" - "\366\366\0\222\222\0mm\0\266\266\0\305\305\0\305\305\0aa\0\0\0\0\0\0\0\0" - "\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0<<\0\305\305\0" - "\305\305\0``\0\214\214\0\321\321\0\321\321\0rr\0\277\277\0\346\346\0\346" - "\346\0\206\206\0\324\324\0\353\353\0\353\353\0\215\215\0\316\316\0\353\353" - "\0\353\353\0\213\213\0\316\316\0\353\353\0\353\353\0\213\213\0\316\316\0" - "\353\353\0\353\353\0\213\213\0\316\316\0\353\353\0\353\353\0\213\213\0\316" - "\316\0\353\353\0\353\353\0\213\213\0\316\316\0\353\353\0\353\353\0\213\213" - "\0\316\316\0\353\353\0\353\353\0\213\213\0\316\316\0\353\353\0\353\353\0" - "\213\213\0\316\316\0\353\353\0\353\353\0\215\215\0\324\324\0\337\337\0\337" - "\337\0\331\331\0\312\312\0\346\346\0\346\346\0\330\330\0\224\224\0\271\271" - "\0\271\271\0\217\217\0nn\0\305\305\0\305\305\0<<\0\0\0\0\0\0\0\0\0\0\0\0" - "\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\240\240\0\305\305\0ww" - "\0\225\225\0\304\304\0\314\314\0\222\222\0\277\277\0\343\343\0\342\342\0" - "\226\226\0\333\333\0\352\352\0\351\351\0\227\227\0\350\350\0\362\362\0\333" - "\333\0\230\230\0\351\351\0\361\361\0\333\333\0\230\230\0\351\351\0\361\361" - "\0\333\333\0\230\230\0\351\351\0\361\361\0\333\333\0\230\230\0\351\351\0" - "\361\361\0\333\333\0\230\230\0\351\351\0\361\361\0\333\333\0\230\230\0\351" - "\351\0\361\361\0\333\333\0\230\230\0\351\351\0\361\361\0\333\333\0\230\230" - "\0\351\351\0\361\361\0\333\333\0\230\230\0\362\362\0\351\351\0\323\323\0" - "\370\370\0\336\336\0\352\352\0\306\306\0\354\354\0\344\344\0\305\305\0\227" - "\227\0\343\343\0\254\254\0\266\266\0ww\0\305\305\0\240\240\0\0\0\0\0\0\0" - "\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\240\240\0aa" - "\0\333\333\0\236\236\0\304\304\0ww\0\210\210\0tt\0\211\211\0RR\0VV\0PP\0" - "VV\0""33\0XX\0UU\0YY\0""66\0UU\0UU\0XX\0""66\0UU\0UU\0XX\0""66\0UU\0UU\0" - "XX\0""66\0UU\0UU\0XX\0""66\0UU\0UU\0XX\0""66\0UU\0UU\0XX\0""66\0UU\0UU\0" - "XX\0""66\0UU\0UU\0XX\0""66\0UU\0YY\0UU\0UU\0MM\0QQ\0UU\0UU\0ww\0\211\211" - "\0ww\0}}\0\217\217\0\254\254\0\276\276\0\333\333\0aa\0\240\240\0\0\0\0\0" - "\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0aa\0\305" - "\305\0\305\305\0\236\236\0XX\0\222\222\0\366\366\0\341\341\0tt\0\231\231" - "\0\375\375\0\364\364\0\203\203\0\231\231\0\331\331\0\326\326\0\203\203\0" - "\231\231\0\331\331\0\324\324\0\203\203\0\231\231\0\331\331\0\324\324\0\203" - "\203\0\231\231\0\331\331\0\324\324\0\203\203\0\231\231\0\331\331\0\324\324" - "\0\203\203\0\231\231\0\331\331\0\324\324\0\203\203\0\231\231\0\331\331\0" - "\324\324\0\203\203\0\231\231\0\331\331\0\324\324\0\203\203\0\231\231\0\331" - "\331\0\324\324\0\203\203\0\231\231\0\331\331\0\326\326\0\231\231\0\231\231" - "\0\331\331\0\324\324\0\373\373\0\375\375\0\300\300\0\263\263\0\361\361\0" - "\366\366\0\222\222\0pp\0\276\276\0\305\305\0\305\305\0aa\0\0\0\0\0\0\0\0" - "\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0<<\0\305\305\0" - "\305\305\0``\0\217\217\0\324\324\0\324\324\0rr\0\300\300\0\347\347\0\347" - "\347\0\206\206\0\324\324\0\353\353\0\353\353\0\215\215\0\316\316\0\353\353" - "\0\353\353\0\213\213\0\316\316\0\353\353\0\353\353\0\213\213\0\316\316\0" - "\353\353\0\353\353\0\213\213\0\316\316\0\353\353\0\353\353\0\213\213\0\316" - "\316\0\353\353\0\353\353\0\213\213\0\316\316\0\353\353\0\353\353\0\213\213" - "\0\316\316\0\353\353\0\353\353\0\213\213\0\316\316\0\353\353\0\353\353\0" - "\213\213\0\316\316\0\353\353\0\353\353\0\215\215\0\324\324\0\337\337\0\337" - "\337\0\332\332\0\312\312\0\347\347\0\347\347\0\330\330\0\224\224\0\274\274" - "\0\274\274\0\222\222\0nn\0\305\305\0\305\305\0<<\0\0\0\0\0\0\0\0\0\0\0\0" - "\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\240\240\0\305\305\0ww" - "\0\225\225\0\304\304\0\314\314\0\225\225\0\300\300\0\344\344\0\342\342\0" - "\226\226\0\333\333\0\352\352\0\351\351\0\227\227\0\350\350\0\362\362\0\333" - "\333\0\230\230\0\351\351\0\361\361\0\333\333\0\230\230\0\351\351\0\361\361" - "\0\333\333\0\230\230\0\351\351\0\361\361\0\333\333\0\230\230\0\351\351\0" - "\361\361\0\333\333\0\230\230\0\351\351\0\361\361\0\333\333\0\230\230\0\351" - "\351\0\361\361\0\333\333\0\230\230\0\351\351\0\361\361\0\333\333\0\230\230" - "\0\351\351\0\361\361\0\333\333\0\230\230\0\362\362\0\351\351\0\323\323\0" - "\370\370\0\337\337\0\352\352\0\306\306\0\355\355\0\345\345\0\306\306\0\231" - "\231\0\343\343\0\254\254\0\266\266\0ww\0\305\305\0\240\240\0\0\0\0\0\0\0" - "\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\240\240\0aa" - "\0\333\333\0\236\236\0\304\304\0ww\0\210\210\0tt\0\211\211\0RR\0VV\0PP\0" - "VV\0""33\0XX\0UU\0YY\0""66\0UU\0UU\0XX\0""66\0UU\0UU\0XX\0""66\0UU\0UU\0" - "XX\0""66\0UU\0UU\0XX\0""66\0UU\0UU\0XX\0""66\0UU\0UU\0XX\0""66\0UU\0UU\0" - "XX\0""66\0UU\0UU\0XX\0""66\0UU\0YY\0UU\0UU\0MM\0QQ\0UU\0UU\0ww\0\211\211" - "\0ww\0}}\0\217\217\0\254\254\0\276\276\0\333\333\0aa\0\240\240\0\0\0\0\0" - "\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0aa\0\305" - "\305\0\305\305\0\236\236\0XX\0\222\222\0\366\366\0\341\341\0tt\0\231\231" - "\0\375\375\0\364\364\0\203\203\0\231\231\0\331\331\0\326\326\0\203\203\0" - "\231\231\0\331\331\0\324\324\0\203\203\0\231\231\0\331\331\0\324\324\0\203" - "\203\0\231\231\0\331\331\0\324\324\0\203\203\0\231\231\0\331\331\0\324\324" - "\0\203\203\0\231\231\0\331\331\0\324\324\0\203\203\0\231\231\0\331\331\0" - "\324\324\0\203\203\0\231\231\0\331\331\0\324\324\0\203\203\0\231\231\0\331" - "\331\0\324\324\0\203\203\0\231\231\0\331\331\0\326\326\0\231\231\0\231\231" - "\0\331\331\0\324\324\0\373\373\0\375\375\0\300\300\0\263\263\0\361\361\0" - "\366\366\0\222\222\0pp\0\276\276\0\305\305\0\305\305\0aa\0\0\0\0\0\0\0\0" - "\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0<<\0\305\305\0" - "\305\305\0``\0\217\217\0\324\324\0\324\324\0rr\0\300\300\0\347\347\0\347" - "\347\0\206\206\0\324\324\0\353\353\0\353\353\0\215\215\0\316\316\0\353\353" - "\0\353\353\0\213\213\0\316\316\0\353\353\0\353\353\0\213\213\0\316\316\0" - "\353\353\0\353\353\0\213\213\0\316\316\0\353\353\0\353\353\0\213\213\0\316" - "\316\0\353\353\0\353\353\0\213\213\0\316\316\0\353\353\0\353\353\0\213\213" - "\0\316\316\0\353\353\0\353\353\0\213\213\0\316\316\0\353\353\0\353\353\0" - "\213\213\0\316\316\0\353\353\0\353\353\0\215\215\0\324\324\0\337\337\0\337" - "\337\0\332\332\0\312\312\0\347\347\0\347\347\0\330\330\0\224\224\0\274\274" - "\0\274\274\0\222\222\0nn\0\305\305\0\305\305\0<<\0\0\0\0\0\0\0\0\0\0\0\0" - "\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\240\240\0\305\305\0ww" - "\0\225\225\0\304\304\0\314\314\0\225\225\0\300\300\0\344\344\0\342\342\0" - "\226\226\0\333\333\0\352\352\0\351\351\0\227\227\0\350\350\0\362\362\0\333" - "\333\0\230\230\0\351\351\0\361\361\0\333\333\0\230\230\0\351\351\0\361\361" - "\0\333\333\0\230\230\0\351\351\0\361\361\0\333\333\0\230\230\0\351\351\0" - "\361\361\0\333\333\0\230\230\0\351\351\0\361\361\0\333\333\0\230\230\0\351" - "\351\0\361\361\0\333\333\0\230\230\0\351\351\0\361\361\0\333\333\0\230\230" - "\0\351\351\0\361\361\0\333\333\0\230\230\0\362\362\0\351\351\0\323\323\0" - "\370\370\0\337\337\0\352\352\0\306\306\0\355\355\0\345\345\0\306\306\0\231" - "\231\0\343\343\0\254\254\0\266\266\0ww\0\305\305\0\240\240\0\0\0\0\0\0\0" - "\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\240\240\0aa" - "\0\333\333\0\236\236\0\304\304\0ww\0\210\210\0tt\0\211\211\0RR\0VV\0PP\0" - "VV\0""33\0XX\0UU\0YY\0""66\0UU\0UU\0XX\0""66\0UU\0UU\0XX\0""66\0UU\0UU\0" - "XX\0""66\0UU\0UU\0XX\0""66\0UU\0UU\0XX\0""66\0UU\0UU\0XX\0""66\0UU\0UU\0" - "XX\0""66\0UU\0UU\0XX\0""66\0UU\0YY\0UU\0UU\0MM\0QQ\0UU\0UU\0ww\0\211\211" - "\0ww\0}}\0\217\217\0\254\254\0\276\276\0\333\333\0aa\0\240\240\0\0\0\0\0" - "\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0aa\0\305" - "\305\0\305\305\0\236\236\0XX\0\222\222\0\366\366\0\341\341\0tt\0\231\231" - "\0\375\375\0\364\364\0\203\203\0\231\231\0\331\331\0\326\326\0\203\203\0" - "\231\231\0\331\331\0\324\324\0\203\203\0\231\231\0\331\331\0\324\324\0\203" - "\203\0\231\231\0\331\331\0\324\324\0\203\203\0\231\231\0\331\331\0\324\324" - "\0\203\203\0\231\231\0\331\331\0\324\324\0\203\203\0\231\231\0\331\331\0" - "\324\324\0\203\203\0\231\231\0\331\331\0\324\324\0\203\203\0\231\231\0\331" - "\331\0\324\324\0\203\203\0\231\231\0\331\331\0\326\326\0\231\231\0\231\231" - "\0\331\331\0\324\324\0\373\373\0\375\375\0\300\300\0\263\263\0\361\361\0" - "\366\366\0\222\222\0pp\0\276\276\0\305\305\0\305\305\0aa\0\0\0\0\0\0\0\0" - "\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0<<\0\305\305\0" - "\305\305\0``\0\217\217\0\324\324\0\324\324\0rr\0\300\300\0\347\347\0\347" - "\347\0\206\206\0\324\324\0\353\353\0\353\353\0\215\215\0\316\316\0\353\353" - "\0\353\353\0\213\213\0\316\316\0\353\353\0\353\353\0\213\213\0\316\316\0" - "\353\353\0\353\353\0\213\213\0\316\316\0\353\353\0\353\353\0\213\213\0\316" - "\316\0\353\353\0\353\353\0\213\213\0\316\316\0\353\353\0\353\353\0\213\213" - "\0\316\316\0\353\353\0\353\353\0\213\213\0\316\316\0\353\353\0\353\353\0" - "\213\213\0\316\316\0\353\353\0\353\353\0\215\215\0\324\324\0\337\337\0\337" - "\337\0\332\332\0\312\312\0\347\347\0\347\347\0\330\330\0\224\224\0\274\274" - "\0\274\274\0\222\222\0nn\0\305\305\0\305\305\0<<\0\0\0\0\0\0\0\0\0\0\0\0" - "\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\240\240\0\305\305\0ww" - "\0\225\225\0\304\304\0\314\314\0\225\225\0\300\300\0\344\344\0\342\342\0" - "\226\226\0\333\333\0\352\352\0\351\351\0\227\227\0\350\350\0\362\362\0\333" - "\333\0\230\230\0\351\351\0\361\361\0\333\333\0\230\230\0\351\351\0\361\361" - "\0\333\333\0\230\230\0\351\351\0\361\361\0\333\333\0\230\230\0\351\351\0" - "\361\361\0\333\333\0\230\230\0\351\351\0\361\361\0\333\333\0\230\230\0\351" - "\351\0\361\361\0\333\333\0\230\230\0\351\351\0\361\361\0\333\333\0\230\230" - "\0\351\351\0\361\361\0\333\333\0\230\230\0\362\362\0\351\351\0\323\323\0" - "\370\370\0\337\337\0\352\352\0\306\306\0\355\355\0\345\345\0\306\306\0\231" - "\231\0\343\343\0\254\254\0\266\266\0ww\0\305\305\0\240\240\0\0\0\0\0\0\0" - "\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\240\240\0aa" - "\0\333\333\0\236\236\0\304\304\0ww\0\210\210\0tt\0\211\211\0RR\0VV\0PP\0" - "VV\0""33\0XX\0UU\0YY\0""66\0UU\0UU\0XX\0""66\0UU\0UU\0XX\0""66\0UU\0UU\0" - "XX\0""66\0UU\0UU\0XX\0""66\0UU\0UU\0XX\0""66\0UU\0UU\0XX\0""66\0UU\0UU\0" - "XX\0""66\0UU\0UU\0XX\0""66\0UU\0YY\0UU\0UU\0MM\0QQ\0UU\0UU\0ww\0\211\211" - "\0ww\0}}\0\217\217\0\254\254\0\276\276\0\333\333\0aa\0\240\240\0\0\0\0\0" - "\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0aa\0\305" - "\305\0\305\305\0\236\236\0XX\0\222\222\0\366\366\0\341\341\0tt\0\231\231" - "\0\375\375\0\364\364\0\203\203\0\231\231\0\331\331\0\326\326\0\203\203\0" - "\231\231\0\331\331\0\324\324\0\203\203\0\231\231\0\331\331\0\324\324\0\203" - "\203\0\231\231\0\331\331\0\324\324\0\203\203\0\231\231\0\331\331\0\324\324" - "\0\203\203\0\231\231\0\331\331\0\324\324\0\203\203\0\231\231\0\331\331\0" - "\324\324\0\203\203\0\231\231\0\331\331\0\324\324\0\203\203\0\231\231\0\331" - "\331\0\324\324\0\203\203\0\231\231\0\331\331\0\326\326\0\231\231\0\231\231" - "\0\331\331\0\324\324\0\373\373\0\375\375\0\300\300\0\263\263\0\361\361\0" - "\366\366\0\222\222\0pp\0\276\276\0\305\305\0\305\305\0aa\0\0\0\0\0\0\0\0" - "\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0<<\0\305\305\0" - "\305\305\0``\0\217\217\0\324\324\0\324\324\0rr\0\300\300\0\347\347\0\347" - "\347\0\206\206\0\324\324\0\353\353\0\353\353\0\215\215\0\316\316\0\353\353" - "\0\353\353\0\213\213\0\316\316\0\353\353\0\353\353\0\213\213\0\316\316\0" - "\353\353\0\353\353\0\213\213\0\316\316\0\353\353\0\353\353\0\213\213\0\316" - "\316\0\353\353\0\353\353\0\213\213\0\316\316\0\353\353\0\353\353\0\213\213" - "\0\316\316\0\353\353\0\353\353\0\213\213\0\316\316\0\353\353\0\353\353\0" - "\213\213\0\316\316\0\353\353\0\353\353\0\215\215\0\324\324\0\337\337\0\337" - "\337\0\332\332\0\312\312\0\347\347\0\347\347\0\330\330\0\224\224\0\274\274" - "\0\274\274\0\222\222\0nn\0\305\305\0\305\305\0<<\0\0\0\0\0\0\0\0\0\0\0\0" - "\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\240\240\0\305\305\0ww" - "\0\225\225\0\304\304\0\314\314\0\225\225\0\300\300\0\344\344\0\342\342\0" - "\226\226\0\333\333\0\352\352\0\351\351\0\227\227\0\350\350\0\362\362\0\333" - "\333\0\230\230\0\351\351\0\361\361\0\333\333\0\230\230\0\351\351\0\361\361" - "\0\333\333\0\230\230\0\351\351\0\361\361\0\333\333\0\230\230\0\351\351\0" - "\361\361\0\333\333\0\230\230\0\351\351\0\361\361\0\333\333\0\230\230\0\351" - "\351\0\361\361\0\333\333\0\230\230\0\351\351\0\361\361\0\333\333\0\230\230" - "\0\351\351\0\361\361\0\333\333\0\230\230\0\362\362\0\351\351\0\323\323\0" - "\370\370\0\337\337\0\352\352\0\306\306\0\355\355\0\345\345\0\306\306\0\231" - "\231\0\343\343\0\254\254\0\266\266\0ww\0\305\305\0\240\240\0\0\0\0\0\0\0" - "\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\240\240\0aa" - "\0\333\333\0\236\236\0\304\304\0ww\0\340\340\0\300\300\0\343\343\0\210\210" - "\0\354\354\0\333\333\0\352\352\0\215\215\0\361\361\0\350\350\0\362\362\0" - "\223\223\0\351\351\0\351\351\0\361\361\0\223\223\0\351\351\0\351\351\0\361" - "\361\0\223\223\0\351\351\0\351\351\0\361\361\0\223\223\0\351\351\0\351\351" - "\0\361\361\0\223\223\0\351\351\0\351\351\0\361\361\0\223\223\0\351\351\0" - "\351\351\0\361\361\0\223\223\0\351\351\0\351\351\0\361\361\0\223\223\0\351" - "\351\0\351\351\0\361\361\0\223\223\0\351\351\0\362\362\0\351\351\0\351\351" - "\0\323\323\0\336\336\0\351\351\0\351\351\0\304\304\0\343\343\0\305\305\0" - "\317\317\0\217\217\0\254\254\0\276\276\0\333\333\0aa\0\240\240\0\0\0\0\0" - "\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0aa\0\305" - "\305\0\305\305\0\236\236\0\222\222\0\361\361\0\361\361\0\316\316\0\230\230" - "\0\373\373\0\373\373\0\344\344\0\231\231\0\375\375\0\375\375\0\357\357\0" - "\231\231\0\375\375\0\375\375\0\347\347\0\231\231\0\375\375\0\375\375\0\347" - "\347\0\231\231\0\375\375\0\375\375\0\347\347\0\231\231\0\375\375\0\375\375" - "\0\347\347\0\231\231\0\375\375\0\375\375\0\347\347\0\231\231\0\375\375\0" - "\375\375\0\347\347\0\231\231\0\375\375\0\375\375\0\347\347\0\231\231\0\375" - "\375\0\375\375\0\347\347\0\231\231\0\375\375\0\375\375\0\360\360\0\373\373" - "\0\375\375\0\375\375\0\347\347\0\367\367\0\373\373\0\373\373\0\326\326\0" - "\351\351\0\361\361\0\361\361\0\271\271\0\276\276\0\305\305\0\305\305\0aa" - "\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0" - "\0<<\0\305\305\0\305\305\0\236\236\0HH\0\271\271\0\271\271\0\224\224\0VV" - "\0\277\277\0\277\277\0\251\251\0DD\0\252\252\0\252\252\0\235\235\0FF\0\253" - "\253\0\253\253\0\224\224\0EE\0\253\253\0\253\253\0\224\224\0EE\0\253\253" - "\0\253\253\0\224\224\0EE\0\253\253\0\253\253\0\224\224\0EE\0\253\253\0\253" - "\253\0\224\224\0EE\0\253\253\0\253\253\0\224\224\0EE\0\253\253\0\253\253" - "\0\224\224\0EE\0\253\253\0\253\253\0\224\224\0EE\0\253\253\0\253\253\0\235" - "\235\0rr\0uu\0uu\0^^\0\272\272\0\277\277\0\277\277\0\230\230\0\205\205\0" - "\222\222\0\222\222\0MM\0\266\266\0\305\305\0\305\305\0<<\0\0\0\0\0\0\0\0" - "\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\240\240\0\305" - "\305\0\305\305\0RR\0\236\236\0\254\254\0\361\361\0VV\0\267\267\0\263\263" - "\0\356\356\0ee\0\247\247\0\244\244\0\356\356\0^^\0\251\251\0\247\247\0\365" - "\365\0bb\0\242\242\0\247\247\0\365\365\0bb\0\242\242\0\247\247\0\365\365" - "\0bb\0\242\242\0\247\247\0\365\365\0bb\0\242\242\0\247\247\0\365\365\0bb" - "\0\242\242\0\247\247\0\365\365\0bb\0\242\242\0\247\247\0\365\365\0bb\0\242" - "\242\0\247\247\0\365\365\0bb\0\242\242\0\247\247\0\365\365\0\252\252\0ee" - "\0jj\0\345\345\0tt\0\246\246\0\251\251\0\321\321\0\272\272\0ff\0\222\222" - "\0\322\322\0ww\0\210\210\0\305\305\0\305\305\0\240\240\0\0\0\0\0\0\0\0\0" - "\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\240\240\0\240\240" - "\0\305\305\0``\0\236\236\0\236\236\0\254\254\0VV\0\264\264\0\254\254\0\261" - "\261\0dd\0\246\246\0\240\240\0\243\243\0^^\0\251\251\0\246\246\0\246\246" - "\0bb\0\242\242\0\246\246\0\246\246\0bb\0\242\242\0\246\246\0\246\246\0bb" - "\0\242\242\0\246\246\0\246\246\0bb\0\242\242\0\246\246\0\246\246\0bb\0\242" - "\242\0\246\246\0\246\246\0bb\0\242\242\0\246\246\0\246\246\0bb\0\242\242" - "\0\246\246\0\246\246\0bb\0\242\242\0\246\246\0\246\246\0\251\251\0dd\0hh" - "\0hh\0pp\0\243\243\0\240\240\0\236\236\0\264\264\0cc\0\177\177\0ww\0ww\0" - "\225\225\0\305\305\0\240\240\0\240\240\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0" - "\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\240\240\0\240\240\0\240\240\0``" - "\0\351\351\0\333\333\0\333\333\0||\0\366\366\0\361\361\0\361\361\0\211\211" - "\0\373\373\0\371\371\0\371\371\0\221\221\0\375\375\0\374\374\0\374\374\0" - "\224\224\0\365\365\0\374\374\0\374\374\0\224\224\0\365\365\0\374\374\0\374" - "\374\0\224\224\0\365\365\0\374\374\0\374\374\0\224\224\0\365\365\0\374\374" - "\0\374\374\0\224\224\0\365\365\0\374\374\0\374\374\0\224\224\0\365\365\0" - "\374\374\0\374\374\0\224\224\0\365\365\0\374\374\0\374\374\0\224\224\0\365" - "\365\0\374\374\0\374\374\0\375\375\0\356\356\0\371\371\0\371\371\0\372\372" - "\0\340\340\0\361\361\0\361\361\0\364\364\0\307\307\0\333\333\0\333\333\0" - "\351\351\0\225\225\0\240\240\0\240\240\0\240\240\0\0\0\0\0\0\0\0\0\0\0\0" - "\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0dd\0\240\240\0\240\240" - "\0aa\0\304\304\0\351\351\0\351\351\0\205\205\0\340\340\0\366\366\0\366\366" - "\0\222\222\0\355\355\0\373\373\0\373\373\0\227\227\0\364\364\0\375\375\0" - "\375\375\0\230\230\0\360\360\0\375\375\0\375\375\0\230\230\0\360\360\0\375" - "\375\0\375\375\0\230\230\0\360\360\0\375\375\0\375\375\0\230\230\0\360\360" - "\0\375\375\0\375\375\0\230\230\0\360\360\0\375\375\0\375\375\0\230\230\0" - "\360\360\0\375\375\0\375\375\0\230\230\0\360\360\0\375\375\0\375\375\0\230" - "\230\0\360\360\0\375\375\0\375\375\0\373\373\0\356\356\0\373\373\0\373\373" - "\0\367\367\0\340\340\0\364\364\0\364\364\0\354\354\0\304\304\0\351\351\0" - "\351\351\0\322\322\0\210\210\0\240\240\0\240\240\0dd\0\0\0\0\0\0\0\0\0\0" - "\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0dd\0\240\240\0\240" - "\240\0<<\0\240\240\0\305\305\0\351\351\0ww\0\320\320\0\301\301\0\324\324" - "\0\211\211\0\345\345\0\316\316\0\324\324\0\217\217\0\356\356\0\323\323\0" - "\326\326\0\223\223\0\354\354\0\323\323\0\326\326\0\223\223\0\354\354\0\323" - "\323\0\326\326\0\223\223\0\354\354\0\323\323\0\326\326\0\223\223\0\354\354" - "\0\323\323\0\326\326\0\223\223\0\354\354\0\323\323\0\326\326\0\223\223\0" - "\354\354\0\323\323\0\326\326\0\223\223\0\354\354\0\323\323\0\326\326\0\223" - "\223\0\354\354\0\323\323\0\326\326\0\362\362\0\344\344\0\261\261\0\272\272" - "\0\364\364\0\340\340\0\225\225\0\205\205\0\340\340\0\276\276\0\351\351\0" - "\266\266\0\240\240\0dd\0\240\240\0\240\240\0dd\0\0\0\0\0\0\0\0\0\0\0\0\0" - "\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0dd\0dd\0\240\240\0aa\0\240" - "\240\0\240\240\0\305\305\0ww\0\305\305\0\240\240\0\266\266\0\205\205\0\333" - "\333\0\266\266\0\304\304\0\215\215\0\352\352\0\305\305\0\314\314\0\222\222" - "\0\352\352\0\305\305\0\314\314\0\222\222\0\352\352\0\305\305\0\314\314\0" - "\222\222\0\352\352\0\305\305\0\314\314\0\222\222\0\352\352\0\305\305\0\314" - "\314\0\222\222\0\352\352\0\305\305\0\314\314\0\222\222\0\352\352\0\305\305" - "\0\314\314\0\222\222\0\352\352\0\305\305\0\314\314\0\222\222\0\352\352\0" - "\305\305\0\314\314\0\361\361\0\335\335\0\242\242\0\236\236\0\333\333\0\312" - "\312\0ii\0aa\0\305\305\0\255\255\0\266\266\0\240\240\0\240\240\0\210\210" - "\0\240\240\0dd\0dd\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0" - "\0\0\0\0\0\0\0\0\0\0dd\0dd\0dd\0aa\0\305\305\0\240\240\0\240\240\0ww\0\333" - "\333\0\305\305\0\305\305\0\205\205\0\351\351\0\333\333\0\333\333\0\217\217" - "\0\363\363\0\351\351\0\351\351\0\223\223\0\357\357\0\351\351\0\351\351\0" - "\223\223\0\357\357\0\351\351\0\351\351\0\223\223\0\357\357\0\351\351\0\351" - "\351\0\223\223\0\357\357\0\351\351\0\351\351\0\223\223\0\357\357\0\351\351" - "\0\351\351\0\223\223\0\357\357\0\351\351\0\351\351\0\223\223\0\357\357\0" - "\351\351\0\351\351\0\223\223\0\357\357\0\351\351\0\351\351\0\363\363\0\345" - "\345\0\333\333\0\333\333\0\340\340\0\312\312\0\305\305\0\305\305\0\322\322" - "\0\255\255\0\240\240\0\240\240\0\305\305\0\210\210\0dd\0dd\0dd\0\0\0\0\0" - "\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0dd" - "\0dd\0dd\0aa\0\305\305\0\305\305\0\240\240\0ww\0\333\333\0\333\333\0\305" - "\305\0\205\205\0\355\355\0\355\355\0\336\336\0\215\215\0\364\364\0\364\364" - "\0\335\335\0\215\215\0\364\364\0\364\364\0\335\335\0\215\215\0\364\364\0" - "\364\364\0\335\335\0\215\215\0\364\364\0\364\364\0\335\335\0\215\215\0\364" - "\364\0\364\364\0\335\335\0\215\215\0\364\364\0\364\364\0\335\335\0\215\215" - "\0\364\364\0\364\364\0\335\335\0\215\215\0\364\364\0\364\364\0\335\335\0" - "\215\215\0\364\364\0\364\364\0\335\335\0\351\351\0\355\355\0\355\355\0\312" - "\312\0\305\305\0\322\322\0\322\322\0\255\255\0\240\240\0\305\305\0\305\305" - "\0\210\210\0dd\0dd\0dd\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0" - "\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0dd\0dd\0\0\0\0\0\0\0dd\0\305\305\0aa" - "\0""11\0\225\225\0\351\351\0\205\205\0HH\0\254\254\0\333\333\0ww\0BB\0\264" - "\264\0\340\340\0nn\0BB\0\264\264\0\340\340\0nn\0BB\0\264\264\0\340\340\0" - "nn\0BB\0\264\264\0\340\340\0nn\0BB\0\264\264\0\340\340\0nn\0BB\0\264\264" - "\0\340\340\0nn\0BB\0\264\264\0\340\340\0nn\0BB\0\264\264\0\340\340\0nn\0" - "BB\0\264\264\0\340\340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\0\0" - "\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0dd\0dd\0dd\0\0\0\0dd\0dd\0dd\0\0\0\0dd" - "\0\210\210\0\210\210\0\25\25\0dd\0\210\210\0\210\210\0\25\25\0dd\0\210\210" - "\0\210\210\0\25\25\0dd\0\210\210\0\210\210\0\25\25\0dd\0\210\210\0\210\210" - "\0\25\25\0dd\0\210\210\0\210\210\0\25\25\0dd\0\210\210\0\210\210\0\25\25" - "\0dd\0\210\210\0\210\210\0\25\25\0dd\0\210\210\0\210\210\0\25\25\0dd\0\210" - "\210\0\210\210\0\25\25\0dd\0\210\210\0\210\210\0$$\0\0\0\0<<\0<<\0<<\0\0" - "\0\0dd\0dd\0dd\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0" - "\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0" - "\0\0dd\0dd\0<<\0<<\0\240\240\0\240\240\0aa\0aa\0\240\240\0\240\240\0aa\0" - "aa\0\240\240\0\240\240\0aa\0aa\0\240\240\0\240\240\0aa\0aa\0\240\240\0\240" - "\240\0aa\0aa\0\240\240\0\240\240\0aa\0aa\0\240\240\0\240\240\0aa\0aa\0\240" - "\240\0\240\240\0aa\0aa\0\240\240\0\240\240\0aa\0aa\0\240\240\0\240\240\0" - "aa\0aa\0\240\240\0\240\240\0aa\0aa\0\240\240\0\240\240\0\240\240\0\240\240" - "\0dd\0dd\0dd\0dd\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0" - "\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0" - "\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0" - "\0\0\0\0\0\0\0\0\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\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0" - "\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0" - "\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0" - "\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0" - "\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0" - "\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0" - "\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0" - "\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0" - "\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0", -}; - -static const SurfaceImage_t img_blendNone = { - 80, 60, 3, - "\377\377\377\377\377\377\377\377\377\377\377\377\377\377\377\377\377\377" - "\377\377\377\377\377\377\377\377\377\377\377\377\377\377\377\377\377\377" - "\377\377\377\377\377\377\377\377\377\377\377\377\377\377\377\377\377\377" - "\377\377\377\377\377\377\377\377\377\377\377\377\377\377\377\377\377\377" - "\377\377\377\377\377\377\377\377\377\377\377\377\377\377\377\377\377\377" - "\377\377\377\377\377\377\377\377\377\377\377\377\377\377\377\377\377\377" - "\377\377\377\377\377\377\377\377\377\377\377\377\377\377\377\377\377\377" - "\377\377\377\377\377\377\377\377\377\377\377\377\377\377\377\377\377\377" - "\377\377\377\377\377\377\377\377\377\377\377\377\377\377\377\377\377\377" - "\377\377\377\377\377\377\377\377\377\377\377\377\377\377\377\377\377\377" - "\377\377\377\377\377\377\377\377\377\377\377\377\377\377\377\377\377\377" - "\377\377\377\377\377\377\377\377\377\377\377\377\377\377\377\377\377\377" - "\377\377\377\377\377\377\377\377\377\377\377\377\377\377\377\377\377\377" - "\377\377\377\377\377\377\377\377\377\377\377\377\377\377\377\377\377\377" - "\377\377\377\377\377\377\377\377\377\377\377\377\377\377\377\377\377\377" - "\377\377\377\377\377\377\377\377\377\377\377\377\377\377\377\377\377\377" - "\377\377\377\377\377\377\377\377\377\377\377\377\377\377\377\377\377\377" - "\377\377\377\377\377\377\377\377\377\377\377\377\377\377\377\377\377\377" - "\377\377\377\377\377\377\377\377\377\377\377\377\377\377\377\377\377\377" - "\377\377\377\377\377\377\377\377\377\377\377\377\377\377\377\377\377\377" - "\377\377\377\377\377\377\377\377\377\377\377\377\377\377\377\377\377\377" - "\377\377\377\377\377\377\377\377\377\377\377\377\377\377\377\377\377\377" - "\377\377\377\377\377\377\377\377\377\377\377\377\377\377\377\377\377\377" - "\377\377\377\377\377\377\377\377\377\377\377\377\377\377\377\377\377\377" - "\377\377\377\377\377\377\377\377\377\377\377\377\377\377\377\377\377\377" - "\377\377\377\377\377\377\377\377\377\377\377\377\377\377\377\377\377\377" - "\377\377\377\377\377\377\377\377\377\377\377\377\377\377\377\377\377\377" - "\377\377\377\377\377\377\377\377\377\377\377\377\377\377\377\377\377\377" - "\377\377\377\377\377\377\377\377\377\377\377\377\377\377\377\377\377\377" - "\377\377\377\377\377\377\377\377\377\377\377\377\377\377\377\377\377\377" - "\377\377\377\377\377\377\377\377\377\377\377\377\377\377\377\377\377\377" - "\377\377\377\377\377\377\377\377\377\377\377\377\377\377\377\377\377\377" - "\377\377\377\377\377\377\377\377\377\377\377\377\377\377\377\377\377\377" - "\377\377\377\377\377\377\377\377\377\377\377\377\377\377\377\377\377\377" - "\377\377\377\377\377\377\377\377\377\377\377\377\377\377\377\377\377\377" - "\377\377\377\377\377\377\377\377\377\377\377\377\377\377\377\377\377\377" - "\377\377\377\377\377\377\377\377\377\377\377\377\377\377\377\377\377\377" - "\377\377\377\377\377\377\377\377\377\377\377\377\377\377\377\377\377\377" - "\377\377\377\377\377\377\377\377\377\377\377\377\377\377\377\377\377\377" - "\377\377\377\377\377\377\377\377\377\377\377\377\377\377\377\377\377\377" - "\377\377\377\377\377\377\377\377\377\377\377\377\377\377\377\377\377\377" - "\377\377\377\377\377\377\377\377\377\377\377\377\377\377\377\377\377\377" - "\377\377\377\377\377\377\377\377\377\377\377\377\377\377\377\377\377\377" - "\377\377\377\377\377\377\377\377\377\377\377\377\377\377\377\377\377\377" - "\377\377\377\377\377\377\377\377\377\377\377\377\377\377\377\377\377\377" - "\377\377\377\377\377\377\377\377\377\377\377\377\377\377\377\377\377\377" - "\377\377\377\377\377\377\377\377\377\377\377\377\377\377\377\377\377\377" - "\377\377\377\377\377\377\377\377\377\377\377\377\377\377\377\377\377\377" - "\377\377\377\377\377\377\377\377\377\377\377\377\377\377\377\377\377\377" - "\377\377\377\377\377\377\377\377\377\377\377\377\377\377\377\377\377\377" - "\377\377\377\377\377\377\377\377\377\377\377\377\377\377\377\377\377\377" - "\377\377\377\377\377\377\377\377\377\377\377\377\377\377\377\377\377\377" - "\377\377\377\377\377\377\377\377\377\377\377\377\377\377\377\377\377\377" - "\377\377\377\377\377\377\377\377\377\377\377\377\377\377\377\377\377\377" - "\377\377\377\377\377\377\377\377\377\377\377\377\377\377\377\377\377\377" - "\377\377\377\377\377\377\377\377\377\377\377\377\377\377\377\377\377\377" - "\377\377\377\377\377\377\377\377\377\377\377\377\377\377\377\377\377\377" - "\377\377\377\377\377\377\377\377\377\377\377\377\377\377\377\377\377\377" - "\377\377\377\377\377\377\377\377\377\377\377\377\377\377\377\377\377\377" - "\377\377\377\377\377\377\377\377\377\377\377\377\377\377\377\377\377\377" - "\377\377\377\377\377\377\377\377\377\377\377\377\377\377\377\377\377\377" - "\377\377\377\377\377\377\377\377\377\377\377\377\377\377\377\377\377\377" - "\377\377\377\377\377\377\377\377\377\377\377\377\377\377\377\377\377\377" - "\377\377\377\377\377\377\377\377\377\377\377\377\377\377\377\377\377\377" - "\377\377\377\377\377\377\377\377\377\377\377\377\377\377\377\377\377\377" - "\377\377\377\377\377\377\377\377\377\377\377\377\377\377\377\377\377\377" - "\377\377\377\377\377\377\377\377\377\377\377\377\377\377\377\377\377\377" - "\377\377\377\377\377\377\377\377\377\377\377\377\377\377\377\377\377\377" - "\377\377\377\377\377\377\377\377\377\377\377\377\377\377\377\377\377\377" - "\377\377\377\377\377\377\377\377\377\377\377\377\377\377\377\377\377\377" - "\377\377\377\377\377\377\377\377\377\377\377\377\377\377\377\377\377\377" - "\377\377\377\377\377\377\377\377\377\377\377\377\377\377\377\377\377\377" - "\377\377\377\377\377\377\377\377\377\377\377\377\377\377\377\377\377\377" - "\377\377\377\377\377\377\377\377\377\377\377\377\377\377\377\377\377\377" - "\377\377\377\377\377\377\377\377\377\377\377\377\377\377\377\377\377\377" - "\377\377\377\377\377\377\377\377\377\377\377\377\377\377\377\377\377\377" - "\377\377\377\377\377\377\377\377\377\377\377\377\377\377\377\377\377\377" - "\377\377\377\377\377\377\377\377\377\377\377\377\377\377\377\377\377\377" - "\377\377\377\377\377\377\377\377\377\377\377\377\377\377\377\377\377\377" - "\377\377\377\377\377\377\377\377\377\377\377\377\377\377\377\377\377\377" - "\377\377\377\377\377\377\377\377\377\377\377\377\377\377\377\377\377\377" - "\377\377\377\377\377\377\377\377\377\377\377\377\377\377\377\377\377\377" - "\377\377\377\377\377\377\377\377\377\377\377\377\377\377\377\377\377\377" - "\377\377\377\377\377\377\377\377\377\377\377\377\377\377\377\377\377\377" - "\377\377\377\377\377\377\377\377\377\377\377\377\377\377\377\377\377\377" - "\377\377\377\377\377\377\377\377\377\377\377\377\377\377\377\377\377\377" - "\377\377\377\377\377\377\377\377\377\377\377\377\377\377\377\377\377\377" - "\377\377\377\377\377\377\377\377\377\377\377\377\377\377\377\377\377\377" - "\377\377\377\377\377\377\377\377\377\377\377\377\377\377\377\377\377\377" - "\377\377\377\377\377\377\377\377\377\377\377\377\377\377\377\377\377\377" - "\377\377\377\377\377\377\377\377\377\377\377\377\377\377\377\377\377\377" - "\377\377\377\377\377\377\377\377\377\377\377\377\377\377\377\377\377\377" - "\377\377\377\377\377\377\377\377\377\377\377\377\377\377\377\377\377\377" - "\377\377\377\377\377\377\377\377\377\377\377\377\377\377\377\377\377\377" - "\377\377\377\377\377\377\377\377\377\377\377\377\377\377\377\377\377\377" - "\377\377\377\377\377\377\377\377\377\377\377\377\377\377\377\377\377\377" - "\377\377\377\377\377\377\377\377\377\377\377\377\377\377\377\377\377\377" - "\377\377\377\377\377\377\377\377\377\377\377\377\377\377\377\377\377\377" - "\377\377\377\377\377\377\377\377\377\377\377\377\377\377\377\377\377\377" - "\377\377\377\377\377\377\377\377\377\377\377\377\377\377\377\377\377\377" - "\377\377\377\377\377\377\377\377\377\377\377\377\377\377\377\377\377\377" - "\377\377\377\377\377\377\377\377\377\377\377\377\377\377\377\377\377\377" - "\377\377\377\377\377\377\377\377\377\377\377\377\377\377\377\377\377\377" - "\377\377\377\377\377\377\377\377\377\377\377\377\377\377\377\377\377\377" - "\377\377\377\377\377\377\377\377\377\377\377\377\377\377\377\377\377\377" - "\377\377\377\377\377\377\377\377\377\377\377\377\377\377\377\377\377\377" - "\377\377\377\377\377\377\377\377\377\377\377\377\377\377\377\377\377\377" - "\377\377\377\377\377\377\377\377\377\377\377\377\377\377\377\377\377\377" - "\377\377\377\377\377\377\377\377\377\377\377\377\377\377\377\377\377\377" - "\377\377\377\377\377\377\377\377\377\377\377\377\377\377\377\377\377\377" - "\377\377\377\377\377\377\377\377\377\377\377\377\377\377\377\377\377\377" - "\377\377\377\377\377\377\377\377\377\377\377\377\377\377\377\377\377\377" - "\377\377\377\377\377\377\377\377\377\377\377\377\377\377\377\377\377\377" - "\377\377\377\377\377\377\377\377\377\377\377\377\377\377\377\377\377\377" - "\377\377\377\377\377\377\377\377\377\377\377\377\377\377\377\377\377\377" - "\377\377\377\377\377\377\377\377\377\377\377\377\377\377\377\377\377\377" - "\377\377\377\377\377\377\377\377\377\377\377\377\377\377\377\377\377\377" - "\377\377\377\377\377\377\377\377\377\377\377\377\377\377\377\377\377\377" - "\377\377\377\377\377\377\377\377\377\377\377\377\377\377\377\377\377\377" - "\377\377\377\377\377\377\377\377\377\377\377\377\377\377\377\377\377\377" - "\377\377\377\377\377\377\377\377\377\377\377\377\377\377\377\377\377\377" - "\377\377\377\377\377\377\377\377\377\377\377\377\377\377\377\377\377\377" - "\377\377\377\377\377\377\377\377\377\377\377\377\377\377\377\377\377\377" - "\377\377\377\377\377\377\377\377\377\377\377\377\377\377\377\377\377\377" - "\377\377\377\377\377\377\377\377\377\377\377\377\377\377\377\377\377\377" - "\377\377\377\377\377\377\377\377\377\377\377\377\377\377\377\377\377\377" - "\377\377\377\377\377\377\377\377\377\377\377\377\377\377\377\377\377\377" - "\377\377\377\377\377\377\377\377\377\377\377\377\377\377\377\377\377\377" - "\377\377\377\377\377\377\377\377\377\377\377\377\377\377\377\377\377\377" - "\377\377\377\377\377\377\377\377\377\377\377\377\377\377\377\377\377\377" - "\377\377\377\377\377\377\377\377\377\377\377\377\377\377\377\377\377\377" - "\377\377\377\377\377\377\377\377\377\377\377\377\377\377\377\377\377\377" - "\377\377\377\377\377\377\377\377\377\377\377\377\377\377\377\377\377\377" - "\377\377\377\377\377\377\377\377\377\377\377\377\377\377\377\377\377\377" - "\377\377\377\377\377\377\377\377\377\377\377\377\377\377\377\377\377\377" - "\377\377\377\377\377\377\377\377\377\377\377\377\377\377\377\377\377\377" - "\377\377\377\377\377\377\377\377\377\377\377\377\377\377\377\377\377\377" - "\377\377\377\377\377\377\377\377\377\377\377\377\377\377\377\377\377\377" - "\377\377\377\377\377\377\377\377\377\377\377\377\377\377\377\377\377\377" - "\377\377\377\377\377\377\377\377\377\377\377\377\377\377\377\377\377\377" - "\377\377\377\377\377\377\377\377\377\377\377\377\377\377\377\377\377\377" - "\377\377\377\377\377\377\377\377\377\377\377\377\377\377\377\377\377\377" - "\377\377\377\377\377\377\377\377\377\377\377\377\377\377\377\377\377\377" - "\377\377\377\377\377\377\377\377\377\377\377\377\377\377\377\377\377\377" - "\377\377\377\377\377\377\377\377\377\377\377\377\377\377\377\377\377\377" - "\377\377\377\377\377\377\377\377\377\377\377\377\377\377\377\377\377\377" - "\377\377\377\377\377\377\377\377\377\377\377\377\377\377\377\377\377\377" - "\377\377\377\377\377\377\377\377\377\377\377\377\377\377\377\377\377\377" - "\377\377\377\377\377\377\377\377\377\377\377\377\377\377\377\377\377\377" - "\377\377\377\377\377\377\377\377\377\377\377\377\377\377\377\377\377\377" - "\377\377\377\377\377\377\377\377\377\377\377\377\377\377\377\377\377\377" - "\377\377\377\377\377\377\377\377\377\377\377\377\377\377\377\377\377\377" - "\377\377\377\377\377\377\377\377\377\377\377\377\377\377\377\377\377\377" - "\377\377\377\377\377\377\377\377\377\377\377\377\377\377\377\377\377\377" - "\377\377\377\377\377\377\377\377\377\377\377\377\377\377\377\377\377\377" - "\377\377\377\377\377\377\377\377\377\377\377\377\377\377\377\377\377\377" - "\377\377\377\377\377\377\377\377\377\377\377\377\377\377\377\377\377\377" - "\377\377\377\377\377\377\377\377\377\377\377\377\377\377\377\377\377\377" - "\377\377\377\377\377\377\377\377\377\377\377\377\377\377\377\377\377\377" - "\377\377\377\377\377\377\377\377\377\377\377\377\377\377\377\377\377\377" - "\377\377\377\377\377\377\377\377\377\377\377\377\377\377\377\377\377\377" - "\377\377\377\377\377\377\377\377\377\377\377\377\377\377\377\377\377\377" - "\377\377\377\377\377\377\377\377\377\377\377\377\377\377\377\377\377\377" - "\377\377\377\377\377\377\377\377\377\377\377\377\377\377\377\377\377\377" - "\377\377\377\377\377\377\377\377\377\377\377\377\377\377\377\377\377\377" - "\377\377\377\377\377\377\377\377\377\377\377\377\377\377\377\377\377\377" - "\377\377\377\377\377\377\377\377\377\377\377\377\377\377\377\377\377\377" - "\377\377\377\377\377\377\377\377\377\377\377\377\377\377\377\377\377\377" - "\377\377\377\377\377\377\377\377\377\377\377\377\377\377\377\377\377\377" - "\377\377\377\377\377\377\377\377\377\377\377\377\377\377\377\377\377\377" - "\377\377\377\377\377\377\377\377\377\377\377\377\377\377\377\377\377\377" - "\377\377\377\377\377\377\377\377\377\377\377\377\377\377\377\377\377\377" - "\377\377\377\377\377\377\377\377\377\377\377\377\377\377\377\377\377\377" - "\377\377\377\377\377\377\377\377\377\377\377\377\377\377\377\377\377\377" - "\377\377\377\377\377\377\377\377\377\377\377\377\377\377\377\377\377\377" - "\377\377\377\377\377\377\377\377\377\377\377\377\377\377\377\377\377\377" - "\377\377\377\377\377\377\377\377\377\377\377\377\377\377\377\377\377\377" - "\377\377\377\377\377\377\377\377\377\377\377\377\377\377\377\377\377\377" - "\377\377\377\377\377\377\377\377\377\377\377\377\377\377\377\377\377\377" - "\377\377\377\377\377\377\377\377\377\377\377\377\377\377\377\377\377\377" - "\377\377\377\377\377\377\377\377\377\377\377\377\377\377\377\377\377\377" - "\377\377\377\377\377\377\377\377\377\377\377\377\377\377\377\377\377\377" - "\377\377\377\377\377\377\377\377\377\377\377\377\377\377\377\377\377\377" - "\377\377\377\377\377\377\377\377\377\377\377\377\377\377\377\377\377\377" - "\377\377\377\377\377\377\377\377\377\377\377\377\377\377\377\377\377\377" - "\377\377\377\377\377\377\377\377\377\377\377\377\377\377\377\377\377\377" - "\377\377\377\377\377\377\377\377\377\377\377\377\377\377\377\377\377\377" - "\377\377\377\377\377\377\377\377\377\377\377\377\377\377\377\377\377\377" - "\377\377\377\377\377\377\377\377\377\377\377\377\377\377\377\377\377\377" - "\377\377\377\377\377\377\377\377\377\377\377\377\377\377\377\377\377\377" - "\377\377\377\377\377\377\377\377\377\377\377\377\377\377\377\377\377\377" - "\377\377\377\377\377\377\377\377\377\377\377\377\377\377\377\377\377\377" - "\377\377\377\377\377\377\377\377\377\377\377\377\377\377\377\377\377\377" - "\377\377\377\377\377\377\377\377\377\377\377\377\377\377\377\377\377\377" - "\377\377\377\377\377\377\377\377\377\377\377\377\377\377\377\377\377\377" - "\377\377\377\377\377\377\377\377\377\377\377\377\377\377\377\377\377\377" - "\377\377\377\377\377\377\377\377\377\377\377\377\377\377\377\377\377\377" - "\377\377\377\377\377\377\377\377\377\377\377\377\377\377\377\377\377\377" - "\377\377\377\377\377\377\377\377\377\377\377\377\377\377\377\377\377\377" - "\377\377\377\377\377\377\377\377\377\377\377\377\377\377\377\377\377\377" - "\377\377\377\377\377\377\377\377\377\377\377\377\377\377\377\377\377\377" - "\377\377\377\377\377\377\377\377\377\377\377\377\377\377\377\377\377\377" - "\377\377\377\377\377\377\377\377\377\377\377\377\377\377\377\377\377\377" - "\377\377\377\377\377\377\377\377\377\377\377\377\377\377\377\377\377\377" - "\377\377\377\377\377\377\377\377\377\377\377\377\377\377\377\377\377\377" - "\377\377\377\377\377\377\377\377\377\377\377\377\377\377\377\377\377\377" - "\377\377\377\377\377\377\377\377\377\377\377\377\377\377\377\377\377\377" - "\377\377\377\377\377\377\377\377\377\377\377\377\377\377\377\377\377\377" - "\377\377\377\377\377\377\377\377\377\377\377\377\377\377\377\377\377\377" - "\377\377\377\377\377\377\377\377\377\377\377\377\377\377\377\377\377\377" - "\377\377\377\377\377\377\377\377\377\377\377\377\377\377\377\377\377\377" - "\377\377\377\377\377\377\377\377\377\377\377\377\377\377\377\377\377\377" - "\377\377\377\377\377\377\377\377\377\377\377\377\377\377\377\377\377\377" - "\377\377\377\377\377\377\377\377\377\377\377\377\377\377\377\377\377\377" - "\377\377\377\377\377\377\377\377\377\377\377\377\377\377\377\377\377\377" - "\377\377\377\377\377\377\377\377\377\377\377\377\377\377\377\377\377\377" - "\377\377\377\377\377\377\377\377\377\377\377\377\377\377\377\377\377\377" - "\377\377\377\377\377\377\377\377\377\377\377\377\377\377\377\377\377\377" - "\377\377\377\377\377\377\377\377\377\377\377\377\377\377\377\377\377\377" - "\377\377\377\377\377\377\377\377\377\377\377\377\377\377\377\377\377\377" - "\377\377\377\377\377\377\377\377\377\377\377\377\377\377\377\377\377\377" - "\377\377\377\377\377\377\377\377\377\377\377\377\377\377\377\377\377\377" - "\377\377\377\377\377\377\377\377\377\377\377\377\377\377\377\377\377\377" - "\377\377\377\377\377\377\377\377\377\377\377\377\377\377\377\377\377\377" - "\377\377\377\377\377\377\377\377\377\377\377\377\377\377\377\377\377\377" - "\377\377\377\377\377\377\377\377\377\377\377\377\377\377\377\377\377\377" - "\377\377\377\377\377\377\377\377\377\377\377\377\377\377\377\377\377\377" - "\377\377\377\377\377\377\377\377\377\377\377\377\377\377\377\377\377\377" - "\377\377\377\377\377\377\377\377\377\377\377\377\377\377\377\377\377\377" - "\377\377\377\377\377\377\377\377\377\377\377\377\377\377\377\377\377\377" - "\377\377\377\377\377\377\377\377\377\377\377\377\377\377\377\377\377\377" - "\377\377\377\377\377\377\377\377\377\377\377\377\377\377\377\377\377\377" - "\377\377\377\377\377\377\377\377\377\377\377\377\377\377\377\377\377\377" - "\377\377\377\377\377\377\377\377\377\377\377\377\377\377\377\377\377\377" - "\377\377\377\377\377\377\377\377\377\377\377\377\377\377\377\377\377\377" - "\377\377\377\377\377\377\377\377\377\377\377\377\377\377\377\377\377\377" - "\377\377\377\377\377\377\377\377\377\377\377\377\377\377\377\377\377\377" - "\377\377\377\377\377\377\377\377\377\377\377\377\377\377\377\377\377\377" - "\377\377\377\377\377\377\377\377\377\377\377\377\377\377\377\377\377\377" - "\377\377\377\377\377\377\377\377\377\377\377\377\377\377\377\377\377\377" - "\377\377\377\377\377\377\377\377\377\377\377\377\377\377\377\377\377\377" - "\377\377\377\377\377\377\377\377\377\377\377\377\377\377\377\377\377\377" - "\377\377\377\377\377\377\377\377\377\377\377\377\377\377\377\377\377\377" - "\377\377\377\377\377\377\377\377\377\377\377\377\377\377\377\377\377\377" - "\377\377\377\377\377\377\377\377\377\377\377\377\377\377\377\377\377\377" - "\377\377\377\377\377\377\377\377\377\377\377\377\377\377\377\377\377\377" - "\377\377\377\377\377\377\377\377\377\377\377\377\377\377\377\377\377\377" - "\377\377\377\377\377\377\377\377\377\377\377\377\377\377\377\377\377\377" - "\377\377\377\377\377\377\377\377\377\377\377\377\377\377\377\377\377\377" - "\377\377\377\377\377\377\377\377\377\377\377\377\377\377\377\377\377\377" - "\377\377\377\377\377\377\377\377\377\377\377\377\377\377\377\377\377\377" - "\377\377\377\377\377\377\377\377\377\377\377\377\377\377\377\377\377\377" - "\377\377\377\377\377\377\377\377\377\377\377\377\377\377\377\377\377\377" - "\377\377\377\377\377\377\377\377\377\377\377\377\377\377\377\377\377\377" - "\377\377\377\377\377\377\377\377\377\377\377\377\377\377\377\377\377\377" - "\377\377\377\377\377\377\377\377\377\377\377\377\377\377\377\377\377\377" - "\377\377\377\377\377\377\377\377\377\377\377\377\377\377\377\377\377\377" - "\377\377\377\377\377\377\377\377\377\377\377\377\377\377\377\377\377\377" - "\377\377\377\377\377\377\377\377\377\377\377\377\377\377\377\377\377\377" - "\377\377\377\377\377\377\377\377\377\377\377\377\377\377\377\377\377\377" - "\377\377\377\377\377\377\377\377\377\377\377\377\377\377\377\377\377\377" - "\377\377\377\377\377\377\377\377\377\377\377\377\377\377\377\377\377\377" - "\377\377\377\377\377\377\377\377\377\377\377\377\377\377\377\377\377\377" - "\377\377\377\377\377\377\377\377\377\377\377\377\377\377\377\377\377\377" - "\377\377\377\377\377\377\377\377\377\377\377\377\377\377\377\377\377\377" - "\377\377\377\377\377\377\377\377\377\377\377\377\377\377\377\377\377\377" - "\377\377\377\377\377\377\377\377\377\377\377\377\377\377\377\377\377\377" - "\377\377\377\377\377\377\377\377\377\377\377\377\377\377\377\377\377\377" - "\377\377\377\377\377\377\377\377\377\377\377\377\377\377\377\377\377\377" - "\377\377\377\377\377\377\377\377\377\377\377\377\377\377\377\377\377\377" - "\377\377\377\377\377\377\377\377\377\377\377\377\377\377\377\377\377\377" - "\377\377\377\377\377\377\377\377\377\377\377\377\377\377\377\377\377\377" - "\377\377\377\377\377\377\377\377\377\377\377\377\377\377\377\377\377\377" - "\377\377\377\377\377\377\377\377\377\377\377\377\377\377\377\377\377\377" - "\377\377\377\377\377\377\377\377\377\377\377\377\377\377\377\377\377\377" - "\377\377\377\377\377\377\377\377\377\377\377\377\377\377\377\377\377\377" - "\377\377\377\377\377\377\377\377\377\377\377\377\377\377\377\377\377\377" - "\377\377\377\377\377\377\377\377\377\377\377\377\377\377\377\377\377\377" - "\377\377\377\377\377\377\377\377\377\377\377\377\377\377\377\377\377\377" - "\377\377\377\377\377\377\377\377\377\377\377\377\377\377\377\377\377\377" - "\377\377\377\377\377\377\377\377\377\377\377\377\377\377\377\377\377\377" - "\377\377\377\377\377\377\377\377\377\377\377\377\377\377\377\377\377\377" - "\377\377\377\377\377\377\377\377\377\377\377\377\377\377\377\377\377\377" - "\377\377\377\377\377\377\377\377\377\377\377\377\377\377\377\377\377\377" - "\377\377\377\377\377\377\377\377\377\377\377\377\377\377\377\377\377\377" - "\377\377\377\377\377\377\377\377\377\377\377\377\377\377\377\377\377\377" - "\377\377\377\377\377\377\377\377\377\377\377\377\377\377\377\377\377\377" - "\377\377\377\377\377\377\377\377\377\377\377\377\377\377\377\377\377\377" - "\377\377\377\377\377\377\377\377\377\377\377\377\377\377\377\377\377\377" - "\377\377\377\377\377\377\377\377\377\377\377\377\377\377\377\377\377\377" - "\377\377\377\377\377\377\377\377\377\377\377\377\377\377\377\377\377\377" - "\377\377\377\377\377\377\377\377\377\377\377\377\377\377\377\377\377\377" - "\377\377\377\377\377\377\377\377\377\377\377\377\377\377\377\377\377\377" - "\377\377\377\377\377\377\377\377\377\377\377\377\377\377\377\377\377\377" - "\377\377\377\377\377\377\377\377\377\377\377\377\377\377\377\377\377\377" - "\377\377\377\377\377\377\377\377\377\377\377\377\377\377\377\377\377\377" - "\377\377\377\377\377\377\377\377\377\377\377\377\377\377\377\377\377\377" - "\377\377\377\377\377\377\377\377\377\377\377\377\377\377\377\377\377\377" - "\377\377\377\377\377\377\377\377\377\377\377\377\377\377\377\377\377\377" - "\377\377\377\377\377\377\377\377\377\377\377\377\377\377\377\377\377\377" - "\377\377\377\377\377\377\377\377\377\377\377\377\377\377\377\377\377\377" - "\377\377\377\377\377\377\377\377\377\377\377\377\377\377\377\377\377\377" - "\377\377\377\377\377\377\377\377\377\377\377\377\377\377\377\377\377\377" - "\377\377\377\377\377\377\377\377\377\377\377\377\377\377\377\377\377\377" - "\377\377\377\377\377\377\377\377\377\377\377\377\377\377\377\377\377\377" - "\377\377\377\377\377\377\377\377\377\377\377\377\377\377\377\377\377\377" - "\377\377\377\377\377\377\377\377\377\377\377\377\377\377\377\377\377\377" - "\377\377\377\377\377\377\377\377\377\377\377\377\377\377\377\377\377\377" - "\377\377\377\377\377\377\377\377\377\377\377\377\377\377\377\377\377\377" - "\377\377\377\377\377\377\377\377\377\377\377\377\377\377\377\377\377\377" - "\377\377\377\377\377\377\377\377\377\377\377\377\377\377\377\377\377\377" - "\377\377\377\377\377\377\377\377\377\377\377\377\377\377\377\377\377\377" - "\377\377\377\377\377\377\377\377\377\377\377\377\377\377\377\377\377\377" - "\377\377\377\377\377\377\377\377\377\377\377\377\377\377\377\377\377\377" - "\377\377\377\377\377\377\377\377\377\377\377\377\377\377\377\377\377\377" - "\377\377\377\377\377\377\377\377\377\377\377\377\377\377\377\377\377\377" - "\377\377\377\377\377\377\377\377\377\377\377\377\377\377\377\377\377\377" - "\377\377\377\377\377\377\377\377\377\377\377\377\377\377\377\377\377\377" - "\377\377\377\377\377\377\377\377\377\377\377\377\377\377\377\377\377\377" - "\377\377\377\377\377\377\377\377\377\377\377\377\377\377\377\377\377\377" - "\377\377\377\377\377\377\377\377\377\377\377\377\377\377\377\377\377\377" - "\377\377\377\377\377\377\377\377\377\377\377\377\377\377\377\377\377\377" - "\377\377\377\377\377\377\377\377\377\377\377\377\377\377\377\377\377\377" - "\377\377\377\377\377\377\377\377\377\377\377\377\377\377\377\377\377\377" - "\377\377\377\377\377\377\377\377\377\377\377\377\377\377\377\377\377\377" - "\377\377\377\377\377\377\377\377\377\377\377\377\377\377\377\377\377\377" - "\377\377\377\377\377\377\377\377\377\377\377\377\377\377\377\377\377\377" - "\377\377\377\377\377\377\377\377\377\377\377\377\377\377\377\377\377\377" - "\377\377\377\377\377\377\377\377\377\377\377\377\377\377\377\377\377\377" - "\377\377\377\377\377\377\377\377\377\377\377\377\377\377\377\377\377\377" - "\377\377\377\377\377\377\377\377\377\377\377\377\377\377\377\377\377\377" - "\377\377\377\377\377\377\377\377\377\377\377\377\377\377\377\377\377\377" - "\377\377\377\377\377\377\377\377\377\377\377\377\377\377\377\377\377\377" - "\377\377\377\377\377\377\377\377\377\377\377\377\377\377\377\377\377\377" - "\377\377\377\377\377\377\377\377\377\377\377\377\377\377\377\377\377\377" - "\377\377\377\377\377\377\377\377\377\377\377\377\377\377\377\377\377\377" - "\377\377\377\377\377\377\377\377\377\377\377\377\377\377\377\377\377\377" - "\377\377\377\377\377\377\377\377\377\377\377\377\377\377\377\377\377\377" - "\377\377\377\377\377\377\377\377\377\377\377\377\377\377\377\377\377\377" - "\377\377\377\377\377\377\377\377\377\377\377\377\377\377\377\377\377\377" - "\377\377\377\377\377\377\377\377\377\377\377\377\377\377\377\377\377\377" - "\377\377\377\377\377\377\377\377\377\377\377\377\377\377\377\377\377\377" - "\377\377\377\377\377\377\377\377\377\377\377\377\377\377\377\377\377\377" - "\377\377\377\377\377\377\377\377\377\377\377\377\377\377\377\377\377\377" - "\377\377\377\377\377\377\377\377\377\377\377\377\377\377\377\377\377\377" - "\377\377\377\377\377\377\377\377\377\377\377\377\377\377\377\377\377\377" - "\377\377\377\377\377\377\377\377\377\377\377\377\377\377\377\377\377\377" - "\377\377\377\377\377\377\377\377\377\377\377\377\377\377\377\377\377\377" - "\377\377\377\377\377\377\377\377\377\377\377\377\377\377\377\377\377\377" - "\377\377\377\377\377\377\377\377\377\377\377\377\377\377\377\377\377\377" - "\377\377\377\377\377\377\377\377\377\377\377\377\377\377\377\377\377\377" - "\377\377\377\377\377\377\377\377\377\377\377\377\377\377\377\377\377\377" - "\377\377\377\377\377\377\377\377\377\377\377\377\377\377\377\377\377\377" - "\377\377\377\377\377\377\377\377\377\377\377\377\377\377\377\377\377\377" - "\377\377\377\377\377\377\377\377\377\377\377\377\377\377\377\377\377\377" - "\377\377\377\377\377\377\377\377\377\377\377\377\377\377\377\377\377\377" - "\377\377\377\377\377\377\377\377\377\377\377\377\377\377\377\377\377\377" - "\377\377\377\377\377\377\377\377\377\377\377\377\377\377\377\377\377\377" - "\377\377\377\377\377\377\377\377\377\377\377\377\377\377\377\377\377\377" - "\377\377\377\377\377\377\377\377\377\377\377\377\377\377\377\377\377\377" - "\377\377\377\377\377\377\377\377\377\377\377\377\377\377\377\377\377\377" - "\377\377\377\377\377\377\377\377\377\377\377\377\377\377\377\377\377\377" - "\377\377\377\377\377\377\377\377\377\377\377\377\377\377\377\377\377\377" - "\377\377\377\377\377\377\377\377\377\377\377\377\377\377\377\377\377\377" - "\377\377\377\377\377\377\377\377\377\377\377\377\377\377\377\377\377\377" - "\377\377\377\377\377\377\377\377\377\377\377\377\377\377\377\377\377\377" - "\377\377\377\377\377\377\377\377\377\377\377\377\377\377\377\377\377\377" - "\377\377\377\377\377\377\377\377\377\377\377\377\377\377\377\377\377\377" - "\377\377\377\377\377\377\377\377\377\377\377\377\377\377\377\377\377\377" - "\377\377\377\377\377\377\377\377\377\377\377\377\377\377\377\377\377\377" - "\377\377\377\377\377\377\377\377\377\377\377\377\377\377\377\377\377\377" - "\377\377\377\377\377\377\377\377\377\377\377\377\377\377\377\377\377\377" - "\377\377\377\377\377\377\377\377\377\377\377\377\377\377\377\377\377\377" - "\377\377\377\377\377\377\377\377\377\377\377\377\377\377\377\377\377\377" - "\377\377\377\377\377\377\377\377\377\377\377\377\377\377\377\377\377\377" - "\377\377\377\377\377\377\377\377\377\377\377\377\377\377\377\377\377\377" - "\377\377\377\377\377\377\377\377\377\377\377\377\377\377\377\377\377\377" - "\377\377\377\377\377\377\377\377\377\377\377\377\377\377\377\377\377\377" - "\377\377\377\377\377\377\377\377\377\377\377\377\377\377\377\377\377\377" - "\377\377\377\377\377\377\377\377\377\377\377\377\377\377\377\377\377\377" - "\377\377\377\377\377\377\377\377\377\377\377\377\377\377\377\377\377\377" - "\377\377\377\377\377\377\377\377\377\377\377\377\377\377\377\377\377\377" - "\377\377\377\377\377\377\377\377\377\377\377\377\377\377\377\377\377\377" - "\377\377\377\377\377\377\377\377\377\377\377\377\377\377\377\377\377\377" - "\377\377\377\377\377\377\377\377\377\377\377\377\377\377\377\377\377\377" - "\377\377\377\377\377\377\377\377\377\377\377\377\377\377\377\377\377\377" - "\377\377\377\377\377\377\377\377\377\377\377\377\377\377\377\377\377\377" - "\377\377\377\377\377\377\377\377\377\377\377\377\377\377\377\377\377\377" - "\377\377\377\377\377\377\377\377\377\377\377\377\377\377\377\377\377\377" - "\377\377\377\377\377\377\377\377\377\377\377\377\377\377\377\377\377\377" - "\377\377\377\377\377\377\377\377\377\377\377\377\377\377\377\377\377\377" - "\377\377\377\377\377\377\377\377\377\377\377\377\377\377\377\377\377\377" - "\377\377\377\377\377\377\377\377\377\377\377\377\377\377\377\377\377\377" - "\377\377\377\377\377\377\377\377\377\377\377\377\377\377\377\377\377\377" - "\377\377\377\377\377\377\377\377\377\377\377\377\377\377\377\377\377\377" - "\377\377\377\377\377\377\377\377\377\377\377\377\377\377\377\377\377\377" - "\377\377\377\377\377\377\377\377\377\377\377\377\377\377\377\377\377\377" - "\377\377\377\377\377\377\377\377\377\377\377\377\377\377\377\377\377\377" - "\377\377\377\377\377\377\377\377\377\377\377\377\377\377\377\377\377\377" - "\377\377\377\377\377\377\377\377\377\377\377\377\377\377\377\377\377\377" - "\377\377\377\377\377\377\377\377\377\377\377\377\377\377\377\377\377\377" - "\377\377\377\377\377\377\377\377\377\377\377\377\377\377\377\377\377\377" - "\377\377\377\377\377\377\377\377\377\377\377\377\377\377\377\377\377\377" - "\377\377\377\377\377\377\377\377\377\377\377\377\377\377\377\377\377\377" - "\377\377\377\377\377\377\377\377\377\377\377\377\377\377\377\377\377\377" - "\377\377\377\377\377\377\377\377\377\377\377\377\377\377\377\377\377\377" - "\377\377\377\377\377\377\377\377\377\377\377\377\377\377\377\377\377\377" - "\377\377\377\377\377\377\377\377\377\377\377\377\377\377\377\377\377\377" - "\377\377\377\377\377\377\377\377\377\377\377\377\377\377\377\377\377\377" - "\377\377\377\377\377\377\377\377\377\377\377\377\377\377\377\377\377\377" - "\377\377\377\377\377\377\377\377\377\377\377\377\377\377\377\377\377\377" - "\377\377\377\377\377\377\377\377\377\377\377\377\377\377\377\377\377\377" - "\377\377\377\377\377\377\377\377\377\377\377\377\377\377\377\377\377\377" - "\377\377\377\377\377\377\377\377\377\377\377\377\377\377\377\377\377\377" - "\377\377\377\377\377\377\377\377\377\377\377\377\377\377\377\377\377\377" - "\377\377\377\377\377\377\377\377\377\377\377\377\377\377\377\377\377\377" - "\377\377\377\377\377\377\377\377\377\377\377\377\377\377\377\377\377\377" - "\377\377\377\377\377\377\377\377\377\377\377\377\377\377\377\377\377\377" - "\377\377\377\377\377\377\377\377\377\377\377\377\377\377\377\377\377\377" - "\377\377\377\377\377\377\377\377\377\377\377\377\377\377\377\377\377\377" - "\377\377\377\377\377\377\377\377\377\377\377\377\377\377\377\377\377\377" - "\377\377\377\377\377\377\377\377\377\377\377\377\377\377\377\377\377\377" - "\377\377\377\377\377\377\377\377\377\377\377\377\377\377\377\377\377\377" - "\377\377\377\377\377\377\377\377\377\377\377\377\377\377\377\377\377\377" - "\377\377\377\377\377\377\377\377\377\377\377\377\377\377\377\377\377\377" - "\377\377\377\377\377\377\377\377\377\377\377\377\377\377\377\377\377\377" - "\377\377\377\377\377\377\377\377\377\377\377\377\377\377\377\377\377\377" - "\377\377\377\377\377\377\377\377\377\377\377\377\377\377\377\377\377\377" - "\377\377\377\377\377\377\377\377\377\377\377\377\377\377\377\377\377\377" - "\377\377\377\377\377\377\377\377\377\377\377\377\377\377\377\377\377\377" - "\377\377\377\377\377\377\377\377\377\377\377\377\377\377\377\377\377\377" - "\377\377\377\377\377\377\377\377\377\377\377\377\377\377\377\377\377\377" - "\377\377\377\377\377\377\377\377\377\377\377\377\377\377\377\377\377\377" - "\377\377\377\377\377\377\377\377\377\377\377\377\377\377\377\377\377\377" - "\377\377\377\377\377\377\377\377\377\377\377\377\377\377\377\377\377\377" - "\377\377\377\377\377\377\377\377\377\377\377\377\377\377\377\377\377\377" - "\377\377\377\377\377\377\377\377\377\377\377\377\377\377\377\377\377\377" - "\377\377\377\377\377\377\377\377\377\377\377\377\377\377\377\377\377\377" - "\377\377\377\377\377\377\377\377\377\377\377\377\377\377\377\377\377\377" - "\377\377\377\377\377\377\377\377\377\377\377\377\377\377\377\377\377\377" - "\377\377\377\377\377\377\377\377\377\377\377\377\377\377\377\377\377\377" - "\377\377\377\377\377\377\377\377\377\377\377\377\377\377\377\377\377\377" - "\377\377\377\377\377\377\377\377\377\377\377\377\377\377\377\377\377\377" - "\377\377\377\377\377\377\377\377\377\377\377\377\377\377\377\377\377\377" - "\377\377\377\377\377\377\377\377\377\377\377\377\377\377\377\377\377\377" - "\377\377\377\377\377\377\377\377\377\377\377\377\377\377\377\377\377\377" - "\377\377\377\377\377\377\377\377\377\377\377\377\377\377\377\377\377\377" - "\377\377\377\377\377\377\377\377\377\377\377\377\377\377\377\377\377\377" - "\377\377\377\377\377\377\377\377\377\377\377\377\377\377\377\377\377\377" - "\377\377\377\377\377\377\377\377\377\377\377\377\377\377\377\377\377\377" - "\377\377\377\377\377\377\377\377\377\377\377\377\377\377\377\377\377\377" - "\377\377\377\377\377\377\377\377\377\377\377\377\377\377\377\377\377\377" - "\377\377\377\377\377\377\377\377\377\377\377\377\377\377\377\377\377\377" - "\377\377\377\377\377\377\377\377\377\377\377\377\377\377\377\377\377\377" - "\377\377\377\377\377\377\377\377\377\377\377\377\377\377\377\377\377\377" - "\377\377\377\377\377\377\377\377\377\377\377\377\377\377\377\377\377\377" - "\377\377\377\377\377\377\377\377\377\377\377\377\377\377\377\377\377\377" - "\377\377\377\377\377\377\377\377\377\377\377\377\377\377\377\377\377\377" - "\377\377\377\377\377\377\377\377\377\377\377\377\377\377\377\377\377\377" - "\377\377\377\377\377\377\377\377\377\377\377\377\377\377\377\377\377\377" - "\377\377\377\377\377\377\377\377\377\377\377\377\377\377\377\377\377\377" - "\377\377\377\377\377\377\377\377\377\377\377\377\377\377\377\377\377\377" - "\377\377\377\377\377\377\377\377\377\377\377\377\377\377\377\377\377\377" - "\377\377\377\377\377\377\377\377\377\377\377\377\377\377\377\377\377\377" - "\377\377\377\377\377\377\377\377\377\377\377\377\377\377\377\377\377\377" - "\377\377\377\377\377\377\377\377\377\377\377\377\377\377\377\377\377\377" - "\377\377\377\377\377\377\377\377\377\377\377\377\377\377\377\377\377\377" - "\377\377\377\377\377\377\377\377\377\377\377\377\377\377\377\377\377\377" - "\377\377\377\377\377\377\377\377\377\377\377\377\377\377\377\377\377\377" - "\377\377\377\377\377\377\377\377\377\377\377\377\377\377\377\377\377\377" - "\377\377\377\377\377\377\377\377\377\377\377\377\377\377\377\377\377\377" - "\377\377\377\377\377\377\377\377\377\377\377\377\377\377\377\377\377\377" - "\377\377\377\377\377\377\377\377\377\377\377\377\377\377\377\377\377\377" - "\377\377\377\377\377\377\377\377\377\377\377\377\377\377\377\377\377\377" - "\377\377\377\377\377\377\377\377\377\377\377\377\377\377\377\377\377\377" - "\377\377\377\377\377\377\377\377\377\377\377\377\377\377\377\377\377\377" - "\377\377\377\377\377\377\377\377\377\377\377\377\0\0\0\0\0\0\0\0\0\0\0\0" - "\0\0\0\0\0\0\0\0\0\0\0\0\377\377\377\377\377\377\377\377\377\377\377\377" - "\377\377\377\377\377\377\377\377\377\377\377\377\377\377\377\377\377\377" - "\377\377\377\377\377\377\377\377\377\377\377\377\377\377\377\377\377\377" - "\377\377\377\377\377\377\377\377\377\377\377\377\377\377\377\377\377\377" - "\377\377\377\377\377\377\377\377\377\377\377\377\377\377\377\377\377\377" - "\377\377\377\377\377\377\377\377\377\377\377\377\377\377\377\377\377\377" - "\377\377\377\377\377\377\377\377\377\377\377\377\377\377\377\377\377\377" - "\377\377\377\377\377\377\377\377\377\377\377\377\377\377\377\377\377\377" - "\377\377\377\377\377\377\377\377\377\377\377\377\377\377\377\377\377\377" - "\377\377\377\377\377\377\377\377\377\377\377\377\377\377\377\377\377\377" - "\377\377\377\377\377\377\377\377\377\377\377\377\377\377\377\377\377\377" - "\377\377\377\377\377\377\377\377\377\377\377\377\377\377\377\377\377\377" - "\0\0\0\0\0\0\377\377\0\377\377\0\377\377\0\377\377\0\377\377\0\377\377\0" - "\377\377\0\377\377\0\0\0\0\0\0\0\377\377\377\377\377\377\377\377\377\377" - "\377\377\377\377\377\377\377\377\377\377\377\377\377\377\377\377\377\377" - "\377\377\377\377\377\377\377\377\377\377\377\377\377\377\377\377\377\377" - "\377\377\377\377\377\377\377\377\377\377\377\377\377\377\377\377\377\377" - "\377\377\377\377\377\377\377\377\377\377\377\377\377\377\377\377\377\377" - "\377\377\377\377\377\377\377\377\377\377\377\377\377\377\377\377\377\377" - "\377\377\377\377\377\377\377\377\377\377\377\377\377\377\377\377\377\377" - "\377\377\377\377\377\377\377\377\377\377\377\377\377\377\377\377\377\377" - "\377\377\377\377\377\377\377\377\377\377\377\377\377\377\377\377\377\377" - "\377\377\377\377\377\377\377\377\377\377\377\377\377\377\377\377\377\377" - "\377\377\377\377\377\377\377\377\377\377\377\377\377\377\377\377\377\377" - "\377\377\377\377\377\377\377\377\377\377\377\0\0\0\377\377\0\377\377\0\377" - "\377\0\377\377\0\377\377\0\377\377\0\377\377\0\377\377\0\377\377\0\377\377" - "\0\377\377\0\377\377\0\0\0\0\377\377\377\377\377\377\377\377\377\377\377" - "\377\377\377\377\377\377\377\377\377\377\377\377\377\377\377\377\377\377" - "\377\377\377\377\377\377\377\377\377\377\377\377\377\377\377\377\377\377" - "\377\377\377\377\377\377\377\377\377\377\377\377\377\377\377\377\377\377" - "\377\377\377\377\377\377\377\377\377\377\377\377\377\377\377\377\377\377" - "\377\377\377\377\377\377\377\377\377\377\377\377\377\377\377\377\377\377" - "\377\377\377\377\377\377\377\377\377\377\377\377\377\377\377\377\377\377" - "\377\377\377\377\377\377\377\377\377\377\377\377\377\377\377\377\377\377" - "\377\377\377\377\377\377\377\377\377\377\377\377\377\377\377\377\377\377" - "\377\377\377\377\377\377\377\377\377\377\377\377\377\377\377\377\377\377" - "\377\377\377\377\377\377\377\377\377\377\377\377\377\377\377\377\377\377" - "\377\377\377\377\0\0\0\377\377\0\377\377\0\377\377\0\377\377\0\377\377\0" - "\377\377\0\377\377\0\377\377\0\377\377\0\377\377\0\377\377\0\377\377\0\377" - "\377\0\377\377\0\0\0\0\377\377\377\377\377\377\377\377\377\377\377\377\377" - "\377\377\377\377\377\377\377\377\377\377\377\377\377\377\377\377\377\377" - "\377\377\377\377\377\377\377\377\377\377\377\377\377\377\377\377\377\377" - "\377\377\377\377\377\377\377\377\377\377\377\377\377\377\377\377\377\377" - "\377\377\377\377\377\377\377\377\377\377\377\377\377\377\377\377\377\377" - "\377\377\377\377\377\377\377\377\377\377\377\377\377\377\377\377\377\377" - "\377\377\377\377\377\377\377\377\377\377\377\377\377\377\377\377\377\377" - "\377\377\377\377\377\377\377\377\377\377\377\377\377\377\377\377\377\377" - "\377\377\377\377\377\377\377\377\377\377\377\377\377\377\377\377\377\377" - "\377\377\377\377\377\377\377\377\377\377\377\377\377\377\377\377\377\377" - "\377\377\377\377\377\377\377\377\377\377\377\377\377\377\0\0\0\377\377\0" - "\377\377\0\377\377\0\377\377\0\377\377\0\377\377\0\377\377\0\377\377\0\377" - "\377\0\377\377\0\377\377\0\377\377\0\377\377\0\377\377\0\377\377\0\377\377" - "\0\0\0\0\377\377\377\377\377\377\377\377\377\377\377\377\377\377\377\377" - "\377\377\377\377\377\377\377\377\377\377\377\377\377\377\377\377\377\377" - "\377\377\377\377\377\377\377\377\377\377\377\377\377\377\377\377\377\377" - "\377\377\377\377\377\377\377\377\377\377\377\377\377\377\377\377\377\377" - "\377\377\377\377\377\377\377\377\377\377\377\377\377\377\377\377\377\377" - "\377\377\377\377\377\377\377\377\377\377\377\377\377\377\377\377\377\377" - "\377\377\377\377\377\377\377\377\377\377\377\377\377\377\377\377\377\377" - "\377\377\377\377\377\377\377\377\377\377\377\377\377\377\377\377\377\377" - "\377\377\377\377\377\377\377\377\377\377\377\377\377\377\377\377\377\377" - "\377\377\377\377\377\377\377\377\377\377\377\377\377\377\377\377\377\377" - "\377\377\377\377\377\0\0\0\377\377\0\377\377\0\377\377\0\377\377\0\377\377" - "\0\377\377\0\377\377\0\377\377\0\377\377\0\377\377\0\377\377\0\377\377\0" - "\377\377\0\377\377\0\377\377\0\377\377\0\377\377\0\377\377\0\0\0\0\377\377" - "\377\377\377\377\377\377\377\377\377\377\377\377\377\377\377\377\377\377" - "\377\377\377\377\377\377\377\377\377\377\377\377\377\377\377\377\377\377" - "\377\377\377\377\377\377\377\377\377\377\377\377\377\377\377\377\377\377" - "\377\377\377\377\377\377\377\377\377\377\377\377\377\377\377\377\377\377" - "\377\377\377\377\377\377\377\377\377\377\377\377\377\377\377\377\377\377" - "\377\377\377\377\377\377\377\377\377\377\377\377\377\377\377\377\377\377" - "\377\377\377\377\377\377\377\377\377\377\377\377\377\377\377\377\377\377" - "\377\377\377\377\377\377\377\377\377\377\377\377\377\377\377\377\377\377" - "\377\377\377\377\377\377\377\377\377\377\377\377\377\377\377\377\377\377" - "\377\377\377\377\377\377\377\377\377\377\377\377\377\377\377\377\0\0\0\377" - "\377\0\377\377\0\377\377\0\0\0\0\0\0\0\0\0\0\0\0\0\377\377\0\377\377\0\377" - "\377\0\377\377\0\0\0\0\0\0\0\0\0\0\0\0\0\377\377\0\377\377\0\377\377\0\0" - "\0\0\377\377\377\377\377\377\377\377\377\377\377\377\377\377\377\377\377" - "\377\377\377\377\377\377\377\377\377\377\377\377\377\377\377\377\377\377" - "\377\377\377\377\377\377\377\377\377\377\377\377\377\377\377\377\377\377" - "\377\377\377\377\377\377\377\377\377\377\377\377\377\377\377\377\377\377" - "\377\377\377\377\377\377\377\377\377\377\377\377\377\377\377\377\377\377" - "\377\377\377\377\377\377\377\377\377\377\377\377\377\377\377\377\377\377" - "\377\377\377\377\377\377\377\377\377\377\377\377\377\377\377\377\377\377" - "\377\377\377\377\377\377\377\377\377\377\377\377\377\377\377\377\377\377" - "\377\377\377\377\377\377\377\377\377\377\377\377\377\377\377\377\377\377" - "\377\377\377\377\377\377\377\377\377\377\377\377\377\377\377\377\0\0\0\377" - "\377\0\377\377\0\377\377\0\377\377\0\0\0\0\0\0\0\377\377\377\0\0\0\377\377" - "\0\377\377\0\377\377\0\377\377\0\0\0\0\0\0\0\377\377\377\0\0\0\377\377\0" - "\377\377\0\377\377\0\377\377\0\0\0\0\377\377\377\377\377\377\377\377\377" - "\377\377\377\377\377\377\377\377\377\377\377\377\377\377\377\377\377\377" - "\377\377\377\377\377\377\377\377\377\377\377\377\377\377\377\377\377\377" - "\377\377\377\377\377\377\377\377\377\377\377\377\377\377\377\377\377\377" - "\377\377\377\377\377\377\377\377\377\377\377\377\377\377\377\377\377\377" - "\377\377\377\377\377\377\377\377\377\377\377\377\377\377\377\377\377\377" - "\377\377\377\377\377\377\377\377\377\377\377\377\377\377\377\377\377\377" - "\377\377\377\377\377\377\377\377\377\377\377\377\377\377\377\377\377\377" - "\377\377\377\377\377\377\377\377\377\377\377\377\377\377\377\377\377\377" - "\377\377\377\377\377\377\377\377\377\377\377\377\377\377\377\377\377\377" - "\377\377\377\0\0\0\377\377\0\377\377\0\377\377\0\377\377\0\0\0\0\0\0\0\0" - "\0\0\0\0\0\377\377\0\377\377\0\377\377\0\377\377\0\0\0\0\0\0\0\0\0\0\0\0" - "\0\377\377\0\377\377\0\377\377\0\377\377\0\0\0\0\377\377\377\377\377\377" - "\377\377\377\377\377\377\377\377\377\377\377\377\377\377\377\377\377\377" - "\377\377\377\377\377\377\377\377\377\377\377\377\377\377\377\377\377\377" - "\377\377\377\377\377\377\377\377\377\377\377\377\377\377\377\377\377\377" - "\377\377\377\377\377\377\377\377\377\377\377\377\377\377\377\377\377\377" - "\377\377\377\377\377\377\377\377\377\377\377\377\377\377\377\377\377\377" - "\377\377\377\377\377\377\377\377\377\377\377\377\377\377\377\377\377\377" - "\377\377\377\377\377\377\377\377\377\377\377\377\377\377\377\377\377\377" - "\377\377\377\377\377\377\377\377\377\377\377\377\377\377\377\377\377\377" - "\377\377\377\377\377\377\377\377\377\377\377\377\377\377\377\377\377\377" - "\377\377\377\377\377\377\0\0\0\377\377\0\377\377\0\377\377\0\377\377\0\377" - "\377\0\377\377\0\377\377\0\377\377\0\377\377\0\377\377\0\377\377\0\377\377" - "\0\377\377\0\377\377\0\377\377\0\377\377\0\377\377\0\377\377\0\377\377\0" - "\377\377\0\0\0\0\377\377\377\377\377\377\377\377\377\377\377\377\377\377" - "\377\377\377\377\377\377\377\377\377\377\377\377\377\377\377\377\377\377" - "\377\377\377\377\377\377\377\377\377\377\377\377\377\377\377\377\377\377" - "\377\377\377\377\377\377\377\377\377\377\377\377\377\377\377\377\377\377" - "\377\377\377\377\377\377\377\377\377\377\377\377\377\377\377\377\377\377" - "\377\377\377\377\377\377\377\377\377\377\377\377\377\377\377\377\377\377" - "\377\377\377\377\377\377\377\377\377\377\377\377\377\377\377\377\377\377" - "\377\377\377\377\377\377\377\377\377\377\377\377\377\377\377\377\377\377" - "\377\377\377\377\377\377\377\377\377\377\377\377\377\377\377\377\377\377" - "\377\377\377\377\377\377\377\377\377\377\377\377\377\377\377\377\0\0\0\377" - "\377\0\377\377\0\377\377\0\377\377\0\377\377\0\377\377\0\377\377\0\377\377" - "\0\377\377\0\377\377\0\377\377\0\377\377\0\377\377\0\377\377\0\377\377\0" - "\377\377\0\377\377\0\377\377\0\377\377\0\377\377\0\0\0\0\377\377\377\377" - "\377\377\377\377\377\377\377\377\377\377\377\377\377\377\377\377\377\377" - "\377\377\377\377\377\377\377\377\377\377\377\377\377\377\377\377\377\377" - "\377\377\377\377\377\377\377\377\377\377\377\377\377\377\377\377\377\377" - "\377\377\377\377\377\377\377\377\377\377\377\377\377\377\377\377\377\377" - "\377\377\377\377\377\377\377\377\377\377\377\377\377\377\377\377\377\377" - "\377\377\377\377\377\377\377\377\377\377\377\377\377\377\377\377\377\377" - "\377\377\377\377\377\377\377\377\377\377\377\377\377\377\377\377\377\377" - "\377\377\377\377\377\377\377\377\377\377\377\377\377\377\377\377\377\377" - "\377\377\377\377\377\377\377\377\377\377\377\377\377\377\377\377\377\377" - "\377\377\377\377\377\377\377\377\0\0\0\377\377\0\377\377\0\377\377\0\377" - "\377\0\377\377\0\377\377\0\377\377\0\377\377\0\377\377\0\0\0\0\0\0\0\377" - "\377\0\377\377\0\377\377\0\377\377\0\377\377\0\377\377\0\377\377\0\377\377" - "\0\377\377\0\0\0\0\377\377\377\377\377\377\377\377\377\377\377\377\377\377" - "\377\377\377\377\377\377\377\377\377\377\377\377\377\377\377\377\377\377" - "\377\377\377\377\377\377\377\377\377\377\377\377\377\377\377\377\377\377" - "\377\377\377\377\377\377\377\377\377\377\377\377\377\377\377\377\377\377" - "\377\377\377\377\377\377\377\377\377\377\377\377\377\377\377\377\377\377" - "\377\377\377\377\377\377\377\377\377\377\377\377\377\377\377\377\377\377" - "\377\377\377\377\377\377\377\377\377\377\377\377\377\377\377\377\377\377" - "\377\377\377\377\377\377\377\377\377\377\377\377\377\377\377\377\377\377" - "\377\377\377\377\377\377\377\377\377\377\377\377\377\377\377\377\377\377" - "\377\377\377\377\377\377\377\377\377\377\377\377\377\377\377\377\0\0\0\377" - "\377\0\377\377\0\377\377\0\377\377\0\377\377\0\377\377\0\377\377\0\377\377" - "\0\377\377\0\0\0\0\0\0\0\377\377\0\377\377\0\377\377\0\377\377\0\377\377" - "\0\377\377\0\377\377\0\377\377\0\377\377\0\0\0\0\377\377\377\377\377\377" - "\377\377\377\377\377\377\377\377\377\377\377\377\377\377\377\377\377\377" - "\377\377\377\377\377\377\377\377\377\377\377\377\377\377\377\377\377\377" - "\377\377\377\377\377\377\377\377\377\377\377\377\377\377\377\377\377\377" - "\377\377\377\377\377\377\377\377\377\377\377\377\377\377\377\377\377\377" - "\377\377\377\377\377\377\377\377\377\377\377\377\377\377\377\377\377\377" - "\377\377\377\377\377\377\377\377\377\377\377\377\377\377\377\377\377\377" - "\377\377\377\377\377\377\377\377\377\377\377\377\377\377\377\377\377\377" - "\377\377\377\377\377\377\377\377\377\377\377\377\377\377\377\377\377\377" - "\377\377\377\377\377\377\377\377\377\377\377\377\377\377\377\377\377\377" - "\377\377\377\377\377\377\0\0\0\377\377\0\377\377\0\377\377\0\377\377\0\377" - "\377\0\377\377\0\377\377\0\377\377\0\377\377\0\377\377\0\377\377\0\377\377" - "\0\377\377\0\377\377\0\377\377\0\377\377\0\377\377\0\377\377\0\377\377\0" - "\377\377\0\0\0\0\377\377\377\377\377\377\377\377\377\377\377\377\377\377" - "\377\377\377\377\377\377\377\377\377\377\377\377\377\377\377\377\377\377" - "\377\377\377\377\377\377\377\377\377\377\377\377\377\377\377\377\377\377" - "\377\377\377\377\377\377\377\377\377\377\377\377\377\377\377\377\377\377" - "\377\377\377\377\377\377\377\377\377\377\377\377\377\377\377\377\377\377" - "\377\377\377\377\377\377\377\377\377\377\377\377\377\377\377\377\377\377" - "\377\377\377\377\377\377\377\377\377\377\377\377\377\377\377\377\377\377" - "\377\377\377\377\377\377\377\377\377\377\377\377\377\377\377\377\377\377" - "\377\377\377\377\377\377\377\377\377\377\377\377\377\377\377\377\377\377" - "\377\377\377\377\377\377\377\377\377\377\377\377\377\377\377\377\377\377" - "\377\0\0\0\377\377\0\377\377\0\377\377\0\377\377\0\377\377\0\377\377\0\377" - "\377\0\377\377\0\377\377\0\377\377\0\377\377\0\377\377\0\377\377\0\377\377" - "\0\377\377\0\377\377\0\377\377\0\377\377\0\0\0\0\377\377\377\377\377\377" - "\377\377\377\377\377\377\377\377\377\377\377\377\377\377\377\377\377\377" - "\377\377\377\377\377\377\377\377\377\377\377\377\377\377\377\377\377\377" - "\377\377\377\377\377\377\377\377\377\377\377\377\377\377\377\377\377\377" - "\377\377\377\377\377\377\377\377\377\377\377\377\377\377\377\377\377\377" - "\377\377\377\377\377\377\377\377\377\377\377\377\377\377\377\377\377\377" - "\377\377\377\377\377\377\377\377\377\377\377\377\377\377\377\377\377\377" - "\377\377\377\377\377\377\377\377\377\377\377\377\377\377\377\377\377\377" - "\377\377\377\377\377\377\377\377\377\377\377\377\377\377\377\377\377\377" - "\377\377\377\377\377\377\377\377\377\377\377\377\377\377\377\377\377\377" - "\377\377\377\377\377\377\377\377\377\377\377\377\0\0\0\377\377\0\377\377" - "\0\0\0\0\0\0\0\0\0\0\377\377\0\377\377\0\377\377\0\377\377\0\377\377\0\377" - "\377\0\377\377\0\377\377\0\0\0\0\0\0\0\0\0\0\377\377\0\377\377\0\0\0\0\377" - "\377\377\377\377\377\377\377\377\377\377\377\377\377\377\377\377\377\377" - "\377\377\377\377\377\377\377\377\377\377\377\377\377\377\377\377\377\377" - "\377\377\377\377\377\377\377\377\377\377\377\377\377\377\377\377\377\377" - "\377\377\377\377\377\377\377\377\377\377\377\377\377\377\377\377\377\377" - "\377\377\377\377\377\377\377\377\377\377\377\377\377\377\377\377\377\377" - "\377\377\377\377\377\377\377\377\377\377\377\377\377\377\377\377\377\377" - "\377\377\377\377\377\377\377\377\377\377\377\377\377\377\377\377\377\377" - "\377\377\377\377\377\377\377\377\377\377\377\377\377\377\377\377\377\377" - "\377\377\377\377\377\377\377\377\377\377\377\377\377\377\377\377\377\377" - "\377\377\377\377\377\377\377\377\377\377\377\377\377\377\377\377\377\377" - "\377\377\0\0\0\377\377\0\377\377\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0" - "\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\377\377\0\377\377\0\0\0\0\377\377\377" - "\377\377\377\377\377\377\377\377\377\377\377\377\377\377\377\377\377\377" - "\377\377\377\377\377\377\377\377\377\377\377\377\377\377\377\377\377\377" - "\377\377\377\377\377\377\377\377\377\377\377\377\377\377\377\377\377\377" - "\377\377\377\377\377\377\377\377\377\377\377\377\377\377\377\377\377\377" - "\377\377\377\377\377\377\377\377\377\377\377\377\377\377\377\377\377\377" - "\377\377\377\377\377\377\377\377\377\377\377\377\377\377\377\377\377\377" - "\377\377\377\377\377\377\377\377\377\377\377\377\377\377\377\377\377\377" - "\377\377\377\377\377\377\377\377\377\377\377\377\377\377\377\377\377\377" - "\377\377\377\377\377\377\377\377\377\377\377\377\377\377\377\377\377\377" - "\377\377\377\377\377\377\377\377\377\377\377\377\377\377\377\377\377\377" - "\377\377\377\377\377\377\0\0\0\377\377\0\377\377\0\0\0\0\0\0\0\0\0\0\0\0" - "\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\377\377\0\377\377\0\0\0\0\377\377" - "\377\377\377\377\377\377\377\377\377\377\377\377\377\377\377\377\377\377" - "\377\377\377\377\377\377\377\377\377\377\377\377\377\377\377\377\377\377" - "\377\377\377\377\377\377\377\377\377\377\377\377\377\377\377\377\377\377" - "\377\377\377\377\377\377\377\377\377\377\377\377\377\377\377\377\377\377" - "\377\377\377\377\377\377\377\377\377\377\377\377\377\377\377\377\377\377" - "\377\377\377\377\377\377\377\377\377\377\377\377\377\377\377\377\377\377" - "\377\377\377\377\377\377\377\377\377\377\377\377\377\377\377\377\377\377" - "\377\377\377\377\377\377\377\377\377\377\377\377\377\377\377\377\377\377" - "\377\377\377\377\377\377\377\377\377\377\377\377\377\377\377\377\377\377" - "\377\377\377\377\377\377\377\377\377\377\377\377\377\377\377\377\377\377" - "\377\377\377\377\377\377\377\377\377\377\377\377\377\0\0\0\377\377\0\377" - "\377\0\377\377\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\377\377\0\377\377\0" - "\377\377\0\0\0\0\377\377\377\377\377\377\377\377\377\377\377\377\377\377" - "\377\377\377\377\377\377\377\377\377\377\377\377\377\377\377\377\377\377" - "\377\377\377\377\377\377\377\377\377\377\377\377\377\377\377\377\377\377" - "\377\377\377\377\377\377\377\377\377\377\377\377\377\377\377\377\377\377" - "\377\377\377\377\377\377\377\377\377\377\377\377\377\377\377\377\377\377" - "\377\377\377\377\377\377\377\377\377\377\377\377\377\377\377\377\377\377" - "\377\377\377\377\377\377\377\377\377\377\377\377\377\377\377\377\377\377" - "\377\377\377\377\377\377\377\377\377\377\377\377\377\377\377\377\377\377" - "\377\377\377\377\377\377\377\377\377\377\377\377\377\377\377\377\377\377" - "\377\377\377\377\377\377\377\377\377\377\377\377\377\377\377\377\377\377" - "\377\377\377\377\377\377\377\377\377\377\377\377\377\377\377\377\377\377" - "\377\377\377\377\377\377\377\0\0\0\0\0\0\377\377\0\377\377\0\377\377\0\377" - "\377\0\377\377\0\377\377\0\377\377\0\377\377\0\0\0\0\0\0\0\377\377\377\377" - "\377\377\377\377\377\377\377\377\377\377\377\377\377\377\377\377\377\377" - "\377\377\377\377\377\377\377\377\377\377\377\377\377\377\377\377\377\377" - "\377\377\377\377\377\377\377\377\377\377\377\377\377\377\377\377\377\377" - "\377\377\377\377\377\377\377\377\377\377\377\377\377\377\377\377\377\377" - "\377\377\377\377\377\377\377\377\377\377\377\377\377\377\377\377\377\377" - "\377\377\377\377\377\377\377\377\377\377\377\377\377\377\377\377\377\377" - "\377\377\377\377\377\377\377\377\377\377\377\377\377\377\377\377\377\377" - "\377\377\377\377\377\377\377\377\377\377\377\377\377\377\377\377\377\377" - "\377\377\377\377\377\377\377\377\377\377\377\377\377\377\377\377\377\377" - "\377\377\377\377\377\377\377\377\377\377\377\377\377\377\377\377\377\377" - "\377\377\377\377\377\377\377\377\377\377\377\377\377\377\377\377\377\377" - "\377\377\377\377\377\377\377\377\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0" - "\0\0\0\0\377\377\377\377\377\377\377\377\377\377\377\377\377\377\377\377" - "\377\377\377\377\377\377\377\377\377\377\377\377\377\377\377\377\377\377" - "\377\377\377\377\377\377\377\377\377\377\377\377\377\377\377\377\377\377" - "\377\377\377\377\377\377\377\377\377\377\377\377\377\377\377\377\377\377" - "\377\377\377\377\377\377\377\377\377\377\377\377\377\377\377\377\377\377" - "\377\377\377\377\377\377\377\377\377\377\377\377\377\377\377\377\377\377" - "\377\377\377\377\377\377\377\377\377\377\377\377\377\377\377\377\377\377" - "\377\377\377\377\377\377\377\377\377\377\377\377\377\377\377\377\377\377" - "\377\377\377\377\377\377\377\377\377\377\377\377\377\377\377\377\377\377" - "\377\377\377\377\377\377\377\377\377\377\377\377\377\377\377\377\377\377" - "\377\377\377\377\377\377\377\377\377\377\377\377\377\377\377\377\377\377" - "\377\377\377\377\377\377\377\377\377\377\377\377\377\377\377\377\377\377" - "\377\377\377\377\377\377\377\377\377\377\377\377\377\377\377\377\377\377" - "\377\377\377\377\377\377\377\377\377\377\377\377\377\377\377\377\377\377" - "\377\377\377\377\377\377\377\377\377\377\377\377\377\377\377\377\377\377" - "\377\377\377\377\377\377\377\377\377\377\377\377\377\377\377\377\377\377" - "\377\377\377\377\377\377\377\377\377\377\377\377\377\377\377\377\377\377" - "\377\377\377\377\377\377\377\377\377\377\377\377\377\377\377\377\377\377" - "\377\377\377\377\377\377\377\377\377\377\377\377\377\377\377\377\377\377" - "\377\377\377\377\377\377\377\377\377\377\377\377\377\377\377\377\377\377" - "\377\377\377\377\377\377\377\377\377\377\377\377\377\377\377\377\377\377" - "\377\377\377\377\377\377\377\377\377\377\377\377\377\377\377\377\377\377" - "\377\377\377\377\377\377\377\377\377\377\377\377\377\377\377\377\377\377" - "\377\377\377\377\377\377\377\377\377\377\377\377\377\377\377\377\377\377" - "\377\377\377\377\377\377\377\377\377\377\377\377\377\377\377\377\377\377" - "\377\377\377\377\377\377\377\377\377\377\377\377\377\377\377\377\377\377" - "\377\377\377\377\377\377\377\377\377\377\377\377\377\377\377\377\377\377" - "\377\377\377\377\377\377\377\377\377\377\377\377\377\377\377\377\377\377" - "\377\377\377\377\377\377\377\377\377\377\377\377\377\377\377\377\377\377" - "\377\377\377\377\377\377\377\377\377\377\377\377\377\377\377\377\377\377" - "\377\377\377\377\377\377\377\377\377\377\377\377\377\377\377\377\377\377" - "\377\377\377\377\377\377\377\377\377\377\377\377\377\377\377\377\377\377" - "\377\377\377\377\377\377\377\377\377\377\377\377\377\377\377\377\377\377" - "\377\377\377\377\377\377\377\377\377\377\377\377\377\377\377\377\377\377" - "\377\377\377\377\377\377\377\377\377\377\377\377\377\377\377\377\377\377" - "\377\377\377\377\377\377\377\377\377\377\377\377\377\377\377\377\377\377" - "\377\377\377\377\377\377\377\377\377\377\377\377\377\377\377\377\377\377" - "\377\377\377\377\377\377\377\377\377\377\377\377\377\377\377\377\377\377" - "\377\377\377\377\377\377\377\377\377\377\377\377\377\377\377\377\377\377" - "\377\377\377\377\377\377\377\377\377\377\377\377\377\377\377\377\377\377" - "\377\377\377\377\377\377\377\377\377\377\377\377\377\377\377\377\377\377" - "\377\377\377\377\377\377\377\377\377\377\377\377\377\377\377\377\377\377" - "\377\377\377\377\377\377\377\377\377\377\377\377\377\377\377\377\377\377" - "\377\377\377\377\377\377\377\377\377\377\377\377\377\377\377\377\377\377" - "\377\377\377\377\377\377\377\377\377\377\377\377\377\377\377\377\377\377" - "\377\377\377\377\377\377\377\377\377\377\377\377\377\377\377\377\377\377" - "\377\377\377\377\377\377\377\377\377\377\377\377\377\377\377\377\377\377" - "\377\377\377\377\377\377\377\377\377\377\377\377\377\377\377\377\377\377" - "\377\377\377\377\377\377\377\377\377\377\377\377\377\377\377\377\377\377" - "\377\377\377\377\377\377\377\377\377\377\377\377\377\377\377\377\377\377" - "\377\377\377\377\377\377\377\377\377\377\377\377\377\377\377\377\377\377" - "\377\377\377\377\377\377\377\377\377\377\377\377\377\377\377\377\377\377" - "\377\377\377\377\377\377\377\377\377\377\377\377\377\377\377\377\377\377" - "\377\377\377\377\377\377\377\377\377\377\377\377\377\377\377\377\377\377" - "\377\377\377\377\377\377\377\377\377\377\377\377\377\377\377\377\377\377" - "\377\377\377\377\377\377\377\377", -}; - -static const SurfaceImage_t img_blendAll = { - 80, 60, 3, - "\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0" - "\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0" - "\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0" - "\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0" - "\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0" - "\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0" - "\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0" - "\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0" - "\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0" - "\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0" - "\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0" - "\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0" - "\0\0\0\0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\0\0\0\0\1" - "\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\1\0\0\0\0\0\0\0\0\0\0\0\0" - "\0\0\0\0\0\0\0\0\0\0\0\0\0\0\1\0\0\1\0\0\0\0\0\0\0\0\1\0\0\1\0\0\1\0\0\1" - "\0\0\4\0\0\4\0\0\0\0\0\0\0\0\7\0\0\7\0\0\0\0\0\0\0\0&\0\0&\0\0\32\0\0\32" - "\0\0&\0\0&\0\0&\0\0&\0\0C\0\0C\0\0\0\0\0\0\0\0^\0\0^\0\0\0\0\0\0\0\17\251" - "\0\17\251\0\17\251\0\17\251\0\17\251\0\17\251\0\17\251\0\17\251\0\0\0\0\0" - "\0\0\0\317\0\0\317\0\0\317\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0" - "\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\1\0\0" - "\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\1\0\0\0\0\0\0\0\0\0\0\0\0\0\0" - "\0\0\0\0\0\6\2\0\6\2\0\0\1\0\0\0\0\0\1\0\0\1\0\0\1\0\0\1\0\0\1\0\0\1\0\0" - "\17\0\0\0\0\0\4\0\0\11\0\0\11\0\0\0\0\6+\0\6+\0\0&\0\0\32\0\0&\0\0&\0\0&" - "\0\0&\0\0""5\0\0""5\0\2\210\0\0\0\0\0C\0\0|\0\0|\0\0\0\0\17\251\0\17\251" - "\0\17\251\0\17\251\0\17\251\0\17\251\0\17\251\0\17\251\0\17\251\0\17\251" - "\0$\360\0$\360\0\0\0\0\0\317\0\0\317\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0" - "\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\1" - "\0\0\1\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\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"\0\14\1\0\15\1\0\15\1\0\0\0\0\0\0\0\14\2\0\14\2\0\14\2\0\14\2\0\16\2\0\16" - "\2\0\0\0\0\0\0\0\14!\0\14!\0\14!\0\14!\0\17(\0\17(\0\0\0\0\0\0\0\14+\0\14" - "+\0\14+\0\14+\0\20""9\0\20""9\0\0\0\0\0\0\0\36\215\0\36\215\0\36\215\0\36" - "\215\0(\264\0(\264\0\0\0\0\0\0\0\36\251\0\36\251\0\36\251\0\36\251\0\36\251" - "\0\36\251\0\36\251\0\36\251\0\0\0\0\0\0\0$\360\0$\360\0$\360\0\0\0\0\0\0" - "\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0" - "\0\0\0\0\0\0\0\0\0\0\0\1\0\0\1\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\36\3" - "\0\36\3\0\14\1\0\14\1\0\15\1\0\15\1\0\15\1\0\0\0\0\14\2\0\14\2\0\14\2\0\14" - "\2\0\16\2\0\16\2\0\16\2\0\0\0\0\14\3\0\14\3\0\14!\0\14!\0\17(\0\17(\0\17" - "(\0\0\0\0\14+\0\14+\0\14+\0\14+\0\20""9\0\20""9\0\20""9\0\0\0\0\14""7\0\14" - """7\0\36\215\0\36\215\0(\264\0(\264\0(\264\0\0\0\0\36\251\0\36\251\0\36\251" - "\0\36\251\0\36\251\0\36\251\0\36\251\0\36\251\0\36\251\0\36\251\0H\360\0" - "H\360\0\0\0\0$\360\0$\360\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0" - "\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\1\0\0\1\0\0\0" - "\0\0\0\0\0\0\0\0\0\0\0\0\0\36\3\0\36\3\0\36\3\0\14\1\0\15\1\0\15\1\0\15\1" - "\0\0\0\0\14\2\0\14\2\0\14\2\0\14\2\0\16\2\0\16\2\0\16\2\0\0\0\0\14\3\0\14" - "\3\0\14\3\0\14!\0\17(\0\17(\0\17(\0\0\0\0\14+\0\14+\0\14+\0\14+\0\20""9\0" - "\20""9\0\20""9\0\0\0\0\14""7\0\14""7\0\14""7\0\36\215\0(\264\0(\264\0(\264" - "\0\0\0\0\36\251\0\36\251\0\36\251\0\36\251\0\36\251\0\36\251\0\36\251\0\36" - "\251\0\36\251\0\36\251\0\36\251\0H\360\0H\360\0H\360\0\0\0\0$\360\0$\360" - "\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0" - "\0\0\0\0\0\0\0\0\0\0\0\0\0\0\1\0\0\1\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0" - "\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\13\1\0\13\1\0\13\1\0\13\1\0\0\0\0" - "\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\11!\0" - "\11!\0\11!\0\11!\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0" - "\0\0\0\0\0\0\0\0\0\23n\0\23n\0\23n\0\23n\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0" - "\0\0\0\0\0\0\0\0\0H\360\0H\360\0H\360\0H\360\0\0\0\0$\360\0\0\0\0\0\0\0\0" - "\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0" - "\0\0\0\0\0\0\1\0\1\1\0\0\0\0\0\0\0\0\0\0\0\0\0\25\0\0\25\0\0\25\0\0\27\0" - "\0\13\0\0\13\0\0\1\0\0\11\0\0\4\0\0\4\0\0\0\0\0\0\0\0\25\3\0\25\3\0\0\0\0" - "\0\0\0\25\3\0\25\3\0\25\3\0\25\3\0\3\1\0\3\1\0\2\1\0\7\5\0\7\3\0\7\3\0\0" - "\0\0\0\0\0\25""4\0\25""4\0\0\0\0\0\0\0\25""4\0\25""4\0\25""4\0\25""4\0\20" - "\35\0\20\35\0\11\22\0\23F\0\34""6\0\34""6\0\0\0\0\0\0\0L\317\0L\317\0L\317" - "\0L\317\0L\317\0L\317\0L\317\0L\317\0\0\0\0\0\0\0""2\317\0""2\317\0""2\317" - "\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0" - "\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\1\1\0\0\0\0\0\0\0\0\0\0\25\0\0\25" - "\0\0\25\0\0\4\0\0\5\0\0\2\0\0\1\0\0\4\0\0\14\0\0\14\0\0\0\0\0\37\7\0\37\7" - "\0\25\3\0\0\0\0\25\3\0\25\3\0\25\3\0\25\3\0\37\6\0\37\6\0\15\4\0\11\3\0\7" - "\3\0\14\10\0\14\10\0\0\0\0\25\16\0\25\16\0\25""4\0\0\0\0\25""4\0\25""4\0" - "\25""4\0\25""4\0&Q\0&Q\0&Q\0\31""5\0\34""6\0&j\0&j\0\0\0\0""5q\0""5q\0L\317" - "\0L\317\0L\317\0L\317\0L\317\0L\317\0L\317\0L\317\0L\317\0L\317\0\0\0\0""2" - "\317\0""2\317\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0" - "\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\1\0\0\1\1\0\0\0\0\0\0\0\25\0" - "\0\25\0\0\25\0\0\31\1\0\5\0\0\5\0\0\2\0\0\4\0\0\14\0\0\14\0\0\0\0\0\37\7" - "\0\37\7\0\37\7\0\0\0\0\25\3\0\25\3\0\25\3\0\25\3\0\37\6\0\37\6\0\37\6\0\11" - "\3\0\16\6\0\16\6\0\7\3\0\0\0\0\25\16\0\25\16\0\25\16\0\0\0\0\25""4\0\25""4"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\0\0\0e\317\0e\317\0e\317\0e\317\0e\317\0e\317" - "\0e\317\0e\317\0\0\0\0\0\0\0L\317\0L\317\0L\317\0\0\0\0\0\0\0\0\0\0\0\0\0" - "\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0" - "\0\0\0\0\0\0\1\0\0\0\0\0\0\0\0e\4\0e\4\0e\4\0\0\0\0e\11\0e\11\0e\11\0\0\0" - "\0e\16\0e\16\0e\16\0\0\0\0e\22\0e\22\0G\11\0\0\0\0G\14\0G\14\0G\14\0\0\0" - "\0G\17\0G\17\0G\17\0\0\0\0G\21\0G\21\0G\21\0\0\0\0G\24\0G\24\0GK\0\0\0\0" - "GT\0GT\0GT\0\0\0\0G^\0G^\0G^\0\0\0\0Gg\0Gg\0Gg\0\0\0\0Gq\0Gq\0e\317\0e\317" - "\0e\317\0e\317\0e\317\0e\317\0e\317\0e\317\0e\317\0e\317\0\0\0\0L\317\0L" - "\317\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0" - "\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\1\0\0\0\0\0e\4\0e\4\0e\4\0\0\0" - "\0e\11\0e\11\0e\11\0\0\0\0e\16\0e\16\0e\16\0\0\0\0e\22\0e\22\0e\22\0\0\0" - "\0G\14\0G\14\0G\14\0\0\0\0G\17\0G\17\0G\17\0\0\0\0G\21\0G\21\0G\21\0\0\0" - "\0G\24\0G\24\0G\24\0\0\0\0GT\0GT\0GT\0\0\0\0G^\0G^\0G^\0\0\0\0Gg\0Gg\0Gg" - "\0\0\0\0Gq\0Gq\0Gq\0e\317\0e\317\0e\317\0e\317\0e\317\0e\317\0e\317\0e\317" - "\0e\317\0e\317\0e\317\0\0\0\0L\317\0L\317\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0" - "\0\0\0\0\0\0\0\0\0\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0\0\12\0\0k\1\0i\0\0" - "\0\0\0\11\0\0i\0\0i\0\0\0\0\0\256\2\0\256\2\0{\1\0f\0\0z\1\0z\1\0z\1\0z\1" - "\0\221\1\0\221\1\0\221\17\0\0\0\0)\4\0c\11\0c\11\0\0\0\0\256+\0\256+\0{&" - "\0W\32\0z&\0z&\0z&\0z&\0\2415\0\2415\0\243\210\0\0\0\0IC\0{|\0{|\0\0\0\0" - "\261\251\0\261\251\0\261\251\0\261\251\0\261\251\0\261\251\0\261\251\0\261" - "\251\0\261\251\0\261\251\0\264\360\0\264\360\0\0\0\0e\317\0e\317\0\0\0\0" - "\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0" - "\0\0\0\0\0\0\0\0\0\0\0\0\216\1\0\216\1\0`\0\0\2\0\0c\0\0c\0\0c\0\0\12\0\0" - "k\1\0k\1\0\0\0\0\11\0\0i\0\0i\0\0\0\0\0\256\2\0\256\2\0\256\2\0f\0\0z\1\0" - "z\1\0z\1\0z\1\0\221\1\0\221\1\0\221\1\0\0\0\0\221\17\0\221\17\0)\4\0\0\0" - "\0\256+\0\256+\0\256+\0W\32\0z&\0z&\0z&\0z&\0\2415\0\2415\0\2415\0\0\0\0" - "\243\210\0\243\210\0IC\0\0\0\0\261\251\0\261\251\0\261\251\0\261\251\0\261" - "\251\0\261\251\0\261\251\0\261\251\0\261\251\0\261\251\0\261\251\0\264\360" - "\0\264\360\0\264\360\0\0\0\0e\317\0e\317\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0" - "\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\216\1" - "\0\211\1\0c\0\0\2\0\0c\0\0c\0\0k\0\0\12\0\0k\1\0\0\0\0\0\0\0\0\0\0\0\0\0" - "\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0" - "\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0" - "\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0" - "\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\264\360\0\264\360" - "\0\264\360\0\264\360\0\0\0\0e\317\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0" - "\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\211\1\0\216\1" - "\0c\0\0\2\0\0c\0\0k\0\0q\0\0\20\0\0\0\0\0\0\0\0\322\1\0\322\1\0\322\1\0\322" - "\1\0\346\1\0\346\1\0\0\0\0\0\0\0\322\2\0\322\2\0\322\2\0\322\2\0\363\2\0" - "\363\2\0\0\0\0\0\0\0\322!\0\322!\0\322!\0\322!\0\371(\0\371(\0\0\0\0\0\0" - "\0\322+\0\322+\0\322+\0\322+\0\3719\0\3719\0\0\0\0\0\0\0\325\215\0\325\215" - "\0\325\215\0\325\215\0\374\264\0\374\264\0\0\0\0\0\0\0\325\251\0\325\251" - "\0\325\251\0\325\251\0\325\251\0\325\251\0\325\251\0\325\251\0\0\0\0\0\0" - "\0\264\360\0\264\360\0\264\360\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0" - "\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\211\1\0\216" - "\1\0c\0\0\2\0\0f\0\0m\0\0m\0\0\0\0\0\325\3\0\325\3\0\322\1\0\322\1\0\346" - "\1\0\346\1\0\346\1\0\0\0\0\322\2\0\322\2\0\322\2\0\322\2\0\363\2\0\363\2" - "\0\363\2\0\0\0\0\322\3\0\322\3\0\322!\0\322!\0\371(\0\371(\0\371(\0\0\0\0" - "\322+\0\322+\0\322+\0\322+\0\3719\0\3719\0\3719\0\0\0\0\3227\0\3227\0\325" - "\215\0\325\215\0\374\264\0\374\264\0\374\264\0\0\0\0\325\251\0\325\251\0" - "\325\251\0\325\251\0\325\251\0\325\251\0\325\251\0\325\251\0\325\251\0\325" - "\251\0\330\360\0\330\360\0\0\0\0\264\360\0\264\360\0\0\0\0\0\0\0\0\0\0\0" - "\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0" - "\0\0\0\0\0\216\1\0\216\1\0c\0\0\10\0\0m\0\0m\0\0\0\0\0\325\3\0\325\3\0\325" - "\3\0\322\1\0\346\1\0\346\1\0\346\1\0\0\0\0\322\2\0\322\2\0\322\2\0\322\2" - "\0\363\2\0\363\2\0\363\2\0\0\0\0\322\3\0\322\3\0\322\3\0\322!\0\371(\0\371" - "(\0\371(\0\0\0\0\322+\0\322+\0\322+\0\322+\0\3719\0\3719\0\3719\0\0\0\0\322" - "7\0\3227\0\3227\0\325\215\0\374\264\0\374\264\0\374\264\0\0\0\0\325\251\0" - "\325\251\0\325\251\0\325\251\0\325\251\0\325\251\0\325\251\0\325\251\0\325" - "\251\0\325\251\0\325\251\0\330\360\0\330\360\0\330\360\0\0\0\0\264\360\0" - "\264\360\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0" - "\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\216\1\0\216\1\0i\0\0\10\0\0m\0\0\0\0\0" - "\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\275\1\0\275\1\0\275\1\0" - "\275\1\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0" - "\0\0\0\0\244!\0\244!\0\244!\0\244!\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0" - "\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\213n\0\213n\0\213n\0\213n\0\0\0\0\0" - "\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\330\360\0\330\360\0\330\360\0\330" - "\360\0\0\0\0\264\360\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0" - "\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\216\1\0\224\1\0i\0\0\10\0" - "\0\0\0\0\0\0\0\325\3\0\325\3\0\325\3\0\351\3\0\365\1\0\365\1\0\14\0\0\313" - "\2\0#\2\0#\2\0\0\0\0\0\0\0\371\37\0\371\37\0\0\0\0\0\0\0\371\37\0\371\37" - "\0\371\37\0\371\37\0.\17\0.\17\0#\14\0\304-\0Y!\0Y!\0\0\0\0\0\0\0\371p\0" - "\371p\0\0\0\0\0\0\0\371p\0\371p\0\371p\0\371p\0O>\0O>\0""3(\0\247\227\0\211" - "s\0\211s\0\0\0\0\0\0\0\374\360\0\374\360\0\374\360\0\374\360\0\374\360\0" - "\374\360\0\374\360\0\374\360\0\0\0\0\0\0\0\330\360\0\330\360\0\330\360\0" - "\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0" - "\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\4\0\0\224\1\0i\0\0\0\0\0\0\0\0\325\3\0\325" - "\3\0\325\3\0\17\2\0\"\2\0!\0\0\35\0\0#\2\0\342\4\0\342\4\0\0\0\0\371\37\0" - "\371\37\0\371\37\0\0\0\0\371\37\0\371\37\0\371\37\0\371\37\0\3775\0\3775" - "\0\374%\0\304\34\0Y!\0\373C\0\373C\0\0\0\0\371p\0\371p\0\371p\0\0\0\0\371" - "p\0\371p\0\371p\0\371p\0\377\256\0\377\256\0\377\256\0\247q\0\211s\0\375" - "\342\0\375\342\0\0\0\0\374\360\0\374\360\0\374\360\0\374\360\0\374\360\0" - "\374\360\0\374\360\0\374\360\0\374\360\0\374\360\0\374\360\0\374\360\0\0" - "\0\0\330\360\0\330\360\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0" - "\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\12\0\0\224\1\0\0\0" - "\0\0\0\0\325\3\0\325\3\0\325\3\0\344\5\0\"\2\0\"\2\0\200\0\0#\2\0\342\4\0" - "\342\4\0\0\0\0\371\37\0\371\37\0\371\37\0\0\0\0\371\37\0\371\37\0\371\37" - "\0\371\37\0\3775\0\3775\0\3775\0\304\34\0\3732\0\3732\0Y!\0\0\0\0\371p\0" - "\371p\0\371p\0\0\0\0\371p\0\371p\0\371p\0\371p\0\377\256\0\377\256\0\377" - "\256\0\247q\0\375\274\0\375\274\0\211s\0\0\0\0\374\360\0\374\360\0\374\360" - "\0\374\360\0\374\360\0\374\360\0\374\360\0\374\360\0\374\360\0\374\360\0" - "\374\360\0\374\360\0\374\360\0\374\360\0\0\0\0\330\360\0\330\360\0\0\0\0" - "\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0" - "\0\0\0\0\0\0\0\0\0\12\0\0\0\0\0i\0\0\0\0\0\325\3\0\325\3\0\344\5\0\344\5" - "\0\"\2\0\36\1\0""4\2\0#\2\0\342\4\0\0\0\0\371\37\0\371\37\0\371\37\0\0\0" - "\0\371\37\0\371\37\0\371\37\0\371\37\0\3775\0\3775\0\3775\0\307)\0\3732\0" - "\3732\0\3732\0\0\0\0\371p\0\371p\0\371p\0\0\0\0\371p\0\371p\0\371p\0\371" - "p\0\377\256\0\377\256\0\377\256\0\247q\0\375\274\0\375\274\0\375\274\0\0" - "\0\0\374\360\0\374\360\0\374\360\0\374\360\0\374\360\0\374\360\0\374\360" - "\0\374\360\0\374\360\0\374\360\0\374\360\0\374\360\0\374\360\0\374\360\0" - "\374\360\0\374\360\0\0\0\0\330\360\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0" - "\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\12\0\0" - "\10\0\0\0\0\0\325\3\0\344\5\0\344\5\0\344\5\0\340\4\0\367\11\0\364\3\0#\2" - "\0\0\0\0\371\37\0\371\37\0\371\37\0\0\0\0\371\37\0\371\37\0\371\37\0\371" - "\37\0\3775\0\3775\0\3775\0\307)\0\376G\0\3732\0\3732\0\0\0\0\371p\0\371p" - "\0\371p\0\0\0\0\371p\0\371p\0\371p\0\371p\0\377\256\0\377\256\0\377\256\0" - "\247q\0\375\274\0\375\274\0\375\274\0\0\0\0\374\360\0\374\360\0\374\360\0" - "\374\360\0\374\360\0\374\360\0\374\360\0\374\360\0\374\360\0\374\360\0\374" - "\360\0\374\360\0\374\360\0\374\360\0\374\360\0\374\360\0\374\360\0\374\360" - "\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0" - "\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\12\0\0\10\0\0\0\0\0\0\0\0\17\2\0\17" - "\2\0\17\2\0\323\2\0\352\7\0\347\2\0\26\1\0\0\0\0\371\37\0\371\37\0\371\37" - "\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0/\26\0/\26\0/\26\0\0\0\0""7\36\0""6\25\0" - """6\25\0\0\0\0\371p\0\371p\0\371p\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0O>\0O>\0" - "O>\0\0\0\0VK\0VK\0VK\0\0\0\0\374\360\0\374\360\0\374\360\0\0\0\0\0\0\0\0" - "\0\0\0\0\0\374\360\0\374\360\0\374\360\0\374\360\0\0\0\0\0\0\0\0\0\0\0\0" - "\0\374\360\0\374\360\0\374\360\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0" - "\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\5\0\0\12\0" - "\0\10\0\0\0\0\0\17\2\0\17\2\0\344\5\0\15\1\0\352\7\0\352\7\0\347\2\0\0\0" - "\0\371\37\0\371\37\0\371\37\0\0\0\0\0\0\0\0\0\0\362\4\0\0\0\0/\26\0/\26\0" - "\3775\0$\21\0""7\36\0""7\36\0\3672\0\0\0\0\371p\0\371p\0\371p\0\0\0\0\0\0" - "\0\0\0\0\370A\0\0\0\0O>\0O>\0\377\256\0""3(\0VK\0VK\0\372\264\0\0\0\0\374" - "\360\0\374\360\0\374\360\0\374\360\0\0\0\0\0\0\0\341\271\0\0\0\0\374\360" - "\0\374\360\0\374\360\0\374\360\0\0\0\0\0\0\0\343\350\0\0\0\0\374\360\0\374" - "\360\0\374\360\0\374\360\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0" - "\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\5\0\0\5\0\0\10\0\0\0\0" - "\0\17\2\0\17\2\0\17\2\0\15\1\0\352\7\0\352\7\0\347\2\0\0\0\0\371\37\0\371" - "\37\0\371\37\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0/\26\0/\26\0/\26\0$\21\0""7\36" - "\0""7\36\0""6\25\0\0\0\0\371p\0\371p\0\371p\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0" - "\0O>\0O>\0O>\0""3(\0VK\0VK\0VK\0\0\0\0\374\360\0\374\360\0\374\360\0\374" - "\360\0\0\0\0\0\0\0\0\0\0\0\0\0\374\360\0\374\360\0\374\360\0\374\360\0\0" - "\0\0\0\0\0\0\0\0\0\0\0\374\360\0\374\360\0\374\360\0\374\360\0\0\0\0\0\0" - "\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0" - "\0\0\0\0\0\0\0\5\0\0\5\0\0\5\0\0\0\0\0\344\5\0\344\5\0\344\5\0\316\4\0\367" - "\11\0\367\11\0\364\3\0\0\0\0\371\37\0\371\37\0\371\37\0\0\0\0\371\37\0\371" - "\37\0\371\37\0\371\37\0\3775\0\3775\0\3775\0\307)\0\376G\0\376G\0\3732\0" - "\0\0\0\371p\0\371p\0\371p\0\0\0\0\371p\0\371p\0\371p\0\371p\0\377\256\0\377" - "\256\0\377\256\0\247q\0\375\274\0\375\274\0\375\274\0\0\0\0\374\360\0\374" - "\360\0\374\360\0\374\360\0\374\360\0\374\360\0\374\360\0\374\360\0\374\360" - "\0\374\360\0\374\360\0\374\360\0\374\360\0\374\360\0\374\360\0\374\360\0" - "\374\360\0\374\360\0\374\360\0\374\360\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0" - "\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\5" - "\0\0\5\0\0\5\0\0\17\2\0\344\5\0\344\5\0\316\4\0\345\11\0\367\11\0\364\3\0" - "\0\0\0\371\37\0\371\37\0\371\37\0\0\0\0\371\37\0\371\37\0\371\37\0\371\37" - "\0\3775\0\3775\0\3775\0\307)\0\376G\0\376G\0\3732\0\0\0\0\371p\0\371p\0\371" - "p\0\0\0\0\371p\0\371p\0\371p\0\371p\0\377\256\0\377\256\0\377\256\0\247q" - "\0\375\274\0\375\274\0\375\274\0\0\0\0\374\360\0\374\360\0\374\360\0\374" - "\360\0\374\360\0\374\360\0\374\360\0\374\360\0\374\360\0\374\360\0\374\360" - "\0\374\360\0\374\360\0\374\360\0\374\360\0\374\360\0\374\360\0\374\360\0" - "\374\360\0\374\360\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0" - "\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\5\0\0\5\0\0\0\0\0\17\2" - "\0\344\5\0\344\5\0\15\1\0$\6\0$\6\0#\2\0\0\0\0\371\37\0\371\37\0\371\37\0" - "\0\0\0\371\37\0\371\37\0\371\37\0\371\37\0\3775\0/\26\0/\26\0\307)\0\376" - "G\0[/\0Y!\0\0\0\0\371p\0\371p\0\371p\0\0\0\0\371p\0\371p\0\371p\0\371p\0" - "\377\256\0O>\0O>\0\247q\0\375\274\0\211s\0\211s\0\0\0\0\374\360\0\374\360" - "\0\374\360\0\374\360\0\374\360\0\374\360\0\374\360\0\374\360\0\374\360\0" - "\0\0\0\0\0\0\374\360\0\374\360\0\374\360\0\374\360\0\374\360\0\374\360\0" - "\374\360\0\374\360\0\374\360\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0" - "\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\5\0\0" - "\5\0\0\17\2\0\17\2\0\344\5\0\316\4\0$\6\0$\6\0#\2\0\0\0\0\371\37\0\371\37" - "\0\371\37\0\0\0\0\371\37\0\371\37\0\371\37\0\371\37\0\3775\0/\26\0/\26\0" - "\307)\0\376G\0[/\0Y!\0\0\0\0\371p\0\371p\0\371p\0\0\0\0\371p\0\371p\0\371" - "p\0\371p\0\377\256\0O>\0O>\0\247q\0\375\274\0\211s\0\211s\0\0\0\0\374\360" - "\0\374\360\0\374\360\0\374\360\0\374\360\0\374\360\0\374\360\0\374\360\0" - "\374\360\0\0\0\0\0\0\0\374\360\0\374\360\0\374\360\0\374\360\0\374\360\0" - "\374\360\0\374\360\0\374\360\0\374\360\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0" - "\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0" - "\0\0\0\0\0\5\0\0\24\2\0\17\2\0\17\2\0\316\4\0\345\11\0$\6\0#\2\0\0\0\0\371" - "\37\0\371\37\0\371\37\0\0\0\0\371\37\0\371\37\0\371\37\0\371\37\0\3775\0" - "\3775\0\3775\0\307)\0\376G\0\376G\0\3732\0\0\0\0\371p\0\371p\0\371p\0\0\0" - "\0\371p\0\371p\0\371p\0\371p\0\377\256\0\377\256\0\377\256\0\247q\0\375\274" - "\0\375\274\0\375\274\0\0\0\0\374\360\0\374\360\0\374\360\0\374\360\0\374" - "\360\0\374\360\0\374\360\0\374\360\0\374\360\0\374\360\0\374\360\0\374\360" - "\0\374\360\0\374\360\0\374\360\0\374\360\0\374\360\0\374\360\0\374\360\0" - "\374\360\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0" - "\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\5\0\0\24\2\0\24" - "\2\0\17\2\0\316\4\0\345\11\0\342\3\0#\2\0\0\0\0\371\37\0\371\37\0\371\37" - "\0\0\0\0\371\37\0\371\37\0\371\37\0\371\37\0\3775\0\3775\0\3775\0\307)\0" - "\376G\0\3732\0\3732\0\0\0\0\371p\0\371p\0\371p\0\0\0\0\371p\0\371p\0\371" - "p\0\371p\0\377\256\0\377\256\0\377\256\0\247q\0\375\274\0\375\274\0\375\274" - "\0\0\0\0\374\360\0\374\360\0\374\360\0\374\360\0\374\360\0\374\360\0\374" - "\360\0\374\360\0\374\360\0\374\360\0\374\360\0\374\360\0\374\360\0\374\360" - "\0\374\360\0\374\360\0\374\360\0\374\360\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0" - "\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0" - "\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\17\2\0\24\2\0\5\0\0\0\0\0\27\5\0\342\3\0\313" - "\1\0\0\0\0\371\37\0\371\37\0\0\0\0\0\0\0\0\0\0\371\37\0\0\0\0\0\0\0/\26\0" - "\3775\0\371\37\0\302\30\0\3716\0Y!\0#\14\0\0\0\0\371p\0\371p\0\0\0\0\0\0" - "\0\0\0\0\371p\0\0\0\0\0\0\0O>\0\377\256\0\371p\0\243I\0\371\224\0\211s\0" - """3(\0\0\0\0\374\360\0\374\360\0\0\0\0\0\0\0\0\0\0\374\360\0\374\360\0\374" - "\360\0\374\360\0\374\360\0\374\360\0\374\360\0\374\360\0\0\0\0\0\0\0\0\0" - "\0\374\360\0\374\360\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0" - "\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0" - "\0\0\0\0\0\0\0\0\17\2\0\17\2\0\0\0\0\0\0\0\26\1\0\26\1\0\0\0\0\0\0\0\371" - "\37\0\371\37\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0/\26\0/\26\0\0\0\0\0\0" - "\0""6\25\0""6\25\0\0\0\0\0\0\0\371p\0\371p\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0" - "\0\0\0\0O>\0O>\0\0\0\0\0\0\0VK\0VK\0\0\0\0\0\0\0\374\360\0\374\360\0\0\0" - "\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\374" - "\360\0\374\360\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0" - "\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0" - "\0\0\0\0\0\0\0\0\0\0\0\17\2\0\17\2\0\0\0\0\0\0\0\26\1\0\26\1\0\0\0\0\0\0" - "\0\371\37\0\371\37\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0/\26\0/\26\0\0\0" - "\0\0\0\0""6\25\0""6\25\0\0\0\0\0\0\0\371p\0\371p\0\0\0\0\0\0\0\0\0\0\0\0" - "\0\0\0\0\0\0\0O>\0O>\0\0\0\0\0\0\0VK\0VK\0\0\0\0\0\0\0\374\360\0\374\360" - "\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\374\360\0" - "\374\360\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0" - "\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0" - "\0\0\0\0\0\0\0\0\0\0\0\0\0\0\17\2\0\17\2\0\16\0\0\0\0\0\26\1\0\26\1\0\26" - "\1\0\0\0\0\371\37\0\371\37\0\371\37\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0/\26\0" - "/\26\0.\17\0\0\0\0""6\25\0""6\25\0""6\25\0\0\0\0\371p\0\371p\0\371p\0\0\0" - "\0\0\0\0\0\0\0\0\0\0\0\0\0O>\0O>\0O>\0\0\0\0VK\0VK\0VK\0\0\0\0\374\360\0" - "\374\360\0\374\360\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\374\360\0\374\360" - "\0\374\360\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0" - "\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0" - "\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\16\0\0\16\0\0\14\0\0\14" - "\0\0#\2\0#\2\0\0\0\0\0\0\0\371\37\0\371\37\0\0\0\0\0\0\0\371\37\0\371\37" - "\0\371\37\0\371\37\0.\17\0.\17\0#\14\0#\14\0Y!\0Y!\0\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0\0\0\0\0\0\0\0\0\0\0\0\0\0" - "\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0" - "\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0" - "\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0" - "\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0" - "\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0" - "\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0" - "\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0" - "\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0" - "\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0", -}; - diff --git a/test/automated/common/img_face.c b/test/automated/common/img_face.c deleted file mode 100644 index 4bfe3cb85..000000000 --- a/test/automated/common/img_face.c +++ /dev/null @@ -1,196 +0,0 @@ -/* GIMP RGBA C-Source image dump (face.c) */ - -static const SurfaceImage_t img_face = { - 32, 32, 4, - "\377\377\377\0\377\377\377\0\377\377\377\0\377\377\377\0\377\377\377\0\377" - "\377\377\0\377\377\377\0\377\377\377\0\377\377\377\0\377\377\377\0\377\377" - "\377\0\377\377\377\0\377\377\377\0\377\377\377\0\377\377\377\0\377\377\377" - "\0\377\377\377\0\377\377\377\0\377\377\377\0\377\377\377\0\377\377\377\0" - "\377\377\377\0\377\377\377\0\377\377\377\0\377\377\377\0\377\377\377\0\377" - "\377\377\0\377\377\377\0\377\377\377\0\377\377\377\0\377\377\377\0\377\377" - "\377\0\377\377\377\0\377\377\377\0\377\377\377\0\377\377\377\0\377\377\377" - "\0\377\377\377\0\377\377\377\0\377\377\377\0\377\377\377\0\377\377\377\0" - "\377\377\377\0\377\377\377\0\377\377\377\0\377\377\377\0\377\377\377\0\377" - "\377\377\0\377\377\377\0\377\377\377\0\377\377\377\0\377\377\377\0\377\377" - "\377\0\377\377\377\0\377\377\377\0\377\377\377\0\377\377\377\0\377\377\377" - "\0\377\377\377\0\377\377\377\0\377\377\377\0\377\377\377\0\377\377\377\0" - "\377\377\377\0\377\377\377\0\377\377\377\0\377\377\377\0\377\377\377\0\377" - "\377\377\0\377\377\377\0\377\377\377\0\377\377\377\0\377\377\377\0\377\377" - "\377\0\377\377\377\0\377\377\377\0\377\377\377\0\377\377\377\0\377\377\377" - "\0\377\377\377\0\377\377\377\0\377\377\377\0\377\377\377\0\377\377\377\0" - "\377\377\377\0\377\377\377\0\377\377\377\0\377\377\377\0\377\377\377\0\377" - "\377\377\0\377\377\377\0\377\377\377\0\377\377\377\0\377\377\377\0\377\377" - "\377\0\377\377\377\0\377\377\377\0\377\377\377\0\377\377\377\0\377\377\377" - "\0\377\377\377\0\377\377\377\0\377\377\377\0\377\377\377\0\377\377\377\0" - "\377\377\377\0\377\377\377\0\377\377\377\0\377\377\377\0\377\377\377\0\377" - "\377\377\0\377\377\377\0\377\377\377\0\377\377\377\0\377\377\377\0\377\377" - "\377\0\377\377\377\0\377\377\377\0\377\377\377\0\377\377\377\0\377\377\377" - "\0\377\377\377\0\377\377\377\0\377\377\377\0\377\377\377\0\377\377\377\0" - "\377\377\377\0\377\377\377\0\377\377\377\0\377\377\377\0\377\377\377\0\377" - "\377\377\0\377\377\377\0\377\377\377\0\377\377\377\0\377\377\377\0\377\377" - "\377\0\377\377\377\0\377\377\377\0\377\377\377\0\377\377\377\0\377\377\377" - "\0\377\377\377\0\377\377\377\0\377\377\377\0\377\377\377\0\377\377\377\0" - "\377\377\377\0\377\377\377\0\377\377\377\0\377\377\377\0\377\377\377\0\377" - "\377\377\0\377\377\377\0\377\377\377\0\377\377\377\0\377\377\377\0\377\377" - "\377\0\377\377\377\0\377\377\377\0\377\377\377\0\377\377\377\0\377\377\377" - "\0\377\377\377\0\377\377\377\0\377\377\377\0\377\377\377\0\377\377\377\0" - "\377\377\377\0\377\377\377\0\377\377\377\0\377\377\377\0\377\377\377\0\377" - "\377\377\0\377\377\377\0\377\377\377\0\377\377\377\0\377\377\377\0\377\377" - "\377\0\377\377\377\0\377\377\377\0\377\377\377\0\377\377\377\0\377\377\377" - "\0\377\377\377\0\377\377\377\0\377\377\377\0\377\377\377\0\377\377\377\0" - "\377\377\377\0\377\377\377\0\377\377\377\0\377\377\377\0\377\377\377\0\377" - "\377\377\0\377\377\377\0\377\377\377\0\377\377\377\0\377\377\377\0\377\377" - "\377\0\377\377\377\0\377\377\377\0\377\377\377\0\377\377\377\0\377\377\377" - "\0\377\377\377\0\377\377\377\0\377\377\377\0\377\377\377\0\377\377\377\0" - "\377\377\377\0\377\377\377\0\377\377\377\0\377\377\377\0\377\377\377\0\377" - "\377\377\0\377\377\377\0\377\377\377\0\377\377\377\0\377\377\377\0\377\377" - "\377\0\377\377\377\0\377\377\377\0\377\377\377\0\377\377\377\0\377\377\377" - "\0\377\377\377\0\377\377\377\0\377\377\377\0\377\377\377\0\377\377\377\0" - "\377\377\377\0\377\377\377\0\377\377\377\0\377\377\377\0\377\377\377\0\0" - "\0\0\377\0\0\0\377\0\0\0\377\0\0\0\377\0\0\0\377\0\0\0\377\0\0\0\377\0\0" - "\0\377\377\377\377\0\377\377\377\0\377\377\377\0\377\377\377\0\377\377\377" - "\0\377\377\377\0\377\377\377\0\377\377\377\0\377\377\377\0\377\377\377\0" - "\377\377\377\0\377\377\377\0\377\377\377\0\377\377\377\0\377\377\377\0\377" - "\377\377\0\377\377\377\0\377\377\377\0\377\377\377\0\377\377\377\0\377\377" - "\377\0\377\377\377\0\0\0\0\377\0\0\0\377\377\377\0\377\377\377\0\377\377" - "\377\0\377\377\377\0\377\377\377\0\377\377\377\0\377\377\377\0\377\377\377" - "\0\377\0\0\0\377\0\0\0\377\377\377\377\0\377\377\377\0\377\377\377\0\377" - "\377\377\0\377\377\377\0\377\377\377\0\377\377\377\0\377\377\377\0\377\377" - "\377\0\377\377\377\0\377\377\377\0\377\377\377\0\377\377\377\0\377\377\377" - "\0\377\377\377\0\377\377\377\0\377\377\377\0\377\377\377\0\377\377\377\0" - "\0\0\0\377\377\377\0\377\377\377\0\377\377\377\0\377\377\377\0\377\377\377" - "\0\377\377\377\0\377\377\377\0\377\377\377\0\377\377\377\0\377\377\377\0" - "\377\377\377\0\377\377\377\0\377\0\0\0\377\377\377\377\0\377\377\377\0\377" - "\377\377\0\377\377\377\0\377\377\377\0\377\377\377\0\377\377\377\0\377\377" - "\377\0\377\377\377\0\377\377\377\0\377\377\377\0\377\377\377\0\377\377\377" - "\0\377\377\377\0\377\377\377\0\377\377\377\0\377\377\377\0\0\0\0\377\377" - "\377\0\377\377\377\0\377\377\377\0\377\377\377\0\377\377\377\0\377\377\377" - "\0\377\377\377\0\377\377\377\0\377\377\377\0\377\377\377\0\377\377\377\0" - "\377\377\377\0\377\377\377\0\377\377\377\0\377\0\0\0\377\377\377\377\0\377" - "\377\377\0\377\377\377\0\377\377\377\0\377\377\377\0\377\377\377\0\377\377" - "\377\0\377\377\377\0\377\377\377\0\377\377\377\0\377\377\377\0\377\377\377" - "\0\377\377\377\0\377\377\377\0\377\377\377\0\0\0\0\377\377\377\0\377\377" - "\377\0\377\377\377\0\377\377\377\0\377\377\377\0\377\377\377\0\377\377\377" - "\0\377\377\377\0\377\377\377\0\377\377\377\0\377\377\377\0\377\377\377\0" - "\377\377\377\0\377\377\377\0\377\377\377\0\377\377\377\0\377\0\0\0\377\377" - "\377\377\0\377\377\377\0\377\377\377\0\377\377\377\0\377\377\377\0\377\377" - "\377\0\377\377\377\0\377\377\377\0\377\377\377\0\377\377\377\0\377\377\377" - "\0\377\377\377\0\377\377\377\0\0\0\0\377\377\377\0\377\377\377\0\377\377" - "\377\0\377\377\377\0\377\377\377\0\377\377\377\0\377\377\377\0\377\377\377" - "\0\377\377\377\0\377\377\377\0\377\377\377\0\377\377\377\0\377\377\377\0" - "\377\377\377\0\377\377\377\0\377\377\377\0\377\377\377\0\377\377\377\0\377" - "\0\0\0\377\377\377\377\0\377\377\377\0\377\377\377\0\377\377\377\0\377\377" - "\377\0\377\377\377\0\377\377\377\0\377\377\377\0\377\377\377\0\377\377\377" - "\0\377\377\377\0\377\377\377\0\0\0\0\377\377\377\0\377\377\377\0\377\377" - "\377\0\377\0\0\0\377\0\0\0\377\0\0\0\377\0\0\0\377\377\377\0\377\377\377" - "\0\377\377\377\0\377\377\377\0\377\0\0\0\377\0\0\0\377\0\0\0\377\0\0\0\377" - "\377\377\0\377\377\377\0\377\377\377\0\377\0\0\0\377\377\377\377\0\377\377" - "\377\0\377\377\377\0\377\377\377\0\377\377\377\0\377\377\377\0\377\377\377" - "\0\377\377\377\0\377\377\377\0\377\377\377\0\377\377\377\0\0\0\0\377\377" - "\377\0\377\377\377\0\377\377\377\0\377\377\377\0\377\0\0\0\377\0\0\0\377" - "\377\377\377\0\0\0\0\377\377\377\0\377\377\377\0\377\377\377\0\377\377\377" - "\0\377\0\0\0\377\0\0\0\377\377\377\377\0\0\0\0\377\377\377\0\377\377\377" - "\0\377\377\377\0\377\377\377\0\377\0\0\0\377\377\377\377\0\377\377\377\0" - "\377\377\377\0\377\377\377\0\377\377\377\0\377\377\377\0\377\377\377\0\377" - "\377\377\0\377\377\377\0\377\377\377\0\0\0\0\377\377\377\0\377\377\377\0" - "\377\377\377\0\377\377\377\0\377\0\0\0\377\0\0\0\377\0\0\0\377\0\0\0\377" - "\377\377\0\377\377\377\0\377\377\377\0\377\377\377\0\377\0\0\0\377\0\0\0" - "\377\0\0\0\377\0\0\0\377\377\377\0\377\377\377\0\377\377\377\0\377\377\377" - "\0\377\0\0\0\377\377\377\377\0\377\377\377\0\377\377\377\0\377\377\377\0" - "\377\377\377\0\377\377\377\0\377\377\377\0\377\377\377\0\377\377\377\0\377" - "\377\377\0\0\0\0\377\377\377\0\377\377\377\0\377\377\377\0\377\377\377\0" - "\377\377\377\0\377\377\377\0\377\377\377\0\377\377\377\0\377\377\377\0\377" - "\377\377\0\377\377\377\0\377\377\377\0\377\377\377\0\377\377\377\0\377\377" - "\377\0\377\377\377\0\377\377\377\0\377\377\377\0\377\377\377\0\377\377\377" - "\0\377\0\0\0\377\377\377\377\0\377\377\377\0\377\377\377\0\377\377\377\0" - "\377\377\377\0\377\377\377\0\377\377\377\0\377\377\377\0\377\377\377\0\377" - "\377\377\0\0\0\0\377\377\377\0\377\377\377\0\377\377\377\0\377\377\377\0" - "\377\377\377\0\377\377\377\0\377\377\377\0\377\377\377\0\377\377\377\0\377" - "\377\377\0\377\377\377\0\377\377\377\0\377\377\377\0\377\377\377\0\377\377" - "\377\0\377\377\377\0\377\377\377\0\377\377\377\0\377\377\377\0\377\377\377" - "\0\377\0\0\0\377\377\377\377\0\377\377\377\0\377\377\377\0\377\377\377\0" - "\377\377\377\0\377\377\377\0\377\377\377\0\377\377\377\0\377\377\377\0\377" - "\377\377\0\0\0\0\377\377\377\0\377\377\377\0\377\377\377\0\377\377\377\0" - "\377\377\377\0\377\377\377\0\377\377\377\0\377\377\377\0\377\377\377\0\377" - "\0\0\0\377\0\0\0\377\377\377\0\377\377\377\0\377\377\377\0\377\377\377\0" - "\377\377\377\0\377\377\377\0\377\377\377\0\377\377\377\0\377\377\377\0\377" - "\0\0\0\377\377\377\377\0\377\377\377\0\377\377\377\0\377\377\377\0\377\377" - "\377\0\377\377\377\0\377\377\377\0\377\377\377\0\377\377\377\0\377\377\377" - "\0\0\0\0\377\377\377\0\377\377\377\0\377\377\377\0\377\377\377\0\377\377" - "\377\0\377\377\377\0\377\377\377\0\377\377\377\0\377\377\377\0\377\0\0\0" - "\377\0\0\0\377\377\377\0\377\377\377\0\377\377\377\0\377\377\377\0\377\377" - "\377\0\377\377\377\0\377\377\377\0\377\377\377\0\377\377\377\0\377\0\0\0" - "\377\377\377\377\0\377\377\377\0\377\377\377\0\377\377\377\0\377\377\377" - "\0\377\377\377\0\377\377\377\0\377\377\377\0\377\377\377\0\377\377\377\0" - "\0\0\0\377\377\377\0\377\377\377\0\377\377\377\0\377\377\377\0\377\377\377" - "\0\377\377\377\0\377\377\377\0\377\377\377\0\377\377\377\0\377\377\377\0" - "\377\377\377\0\377\377\377\0\377\377\377\0\377\377\377\0\377\377\377\0\377" - "\377\377\0\377\377\377\0\377\377\377\0\377\377\377\0\377\377\377\0\377\0" - "\0\0\377\377\377\377\0\377\377\377\0\377\377\377\0\377\377\377\0\377\377" - "\377\0\377\377\377\0\377\377\377\0\377\377\377\0\377\377\377\0\377\377\377" - "\0\377\377\377\0\0\0\0\377\377\377\0\377\377\377\0\377\377\377\0\377\377" - "\377\0\377\377\377\0\377\377\377\0\377\377\377\0\377\377\377\0\377\377\377" - "\0\377\377\377\0\377\377\377\0\377\377\377\0\377\377\377\0\377\377\377\0" - "\377\377\377\0\377\377\377\0\377\377\377\0\377\377\377\0\377\0\0\0\377\377" - "\377\377\0\377\377\377\0\377\377\377\0\377\377\377\0\377\377\377\0\377\377" - "\377\0\377\377\377\0\377\377\377\0\377\377\377\0\377\377\377\0\377\377\377" - "\0\377\377\377\0\0\0\0\377\377\377\0\377\377\377\0\377\0\0\0\377\0\0\0\377" - "\0\0\0\377\377\377\0\377\377\377\0\377\377\377\0\377\377\377\0\377\377\377" - "\0\377\377\377\0\377\377\377\0\377\377\377\0\377\0\0\0\377\0\0\0\377\0\0" - "\0\377\377\377\0\377\377\377\0\377\0\0\0\377\377\377\377\0\377\377\377\0" - "\377\377\377\0\377\377\377\0\377\377\377\0\377\377\377\0\377\377\377\0\377" - "\377\377\0\377\377\377\0\377\377\377\0\377\377\377\0\377\377\377\0\377\377" - "\377\0\0\0\0\377\377\377\0\377\377\377\0\377\0\0\0\377\0\0\0\377\0\0\0\377" - "\0\0\0\377\0\0\0\377\0\0\0\377\0\0\0\377\0\0\0\377\0\0\0\377\0\0\0\377\0" - "\0\0\377\0\0\0\377\377\377\0\377\377\377\0\377\0\0\0\377\377\377\377\0\377" - "\377\377\0\377\377\377\0\377\377\377\0\377\377\377\0\377\377\377\0\377\377" - "\377\0\377\377\377\0\377\377\377\0\377\377\377\0\377\377\377\0\377\377\377" - "\0\377\377\377\0\377\377\377\0\377\377\377\0\0\0\0\377\377\377\0\377\377" - "\377\0\377\0\0\0\377\0\0\0\377\0\0\0\377\0\0\0\377\0\0\0\377\0\0\0\377\0" - "\0\0\377\0\0\0\377\0\0\0\377\0\0\0\377\377\377\0\377\377\377\0\377\0\0\0" - "\377\377\377\377\0\377\377\377\0\377\377\377\0\377\377\377\0\377\377\377" - "\0\377\377\377\0\377\377\377\0\377\377\377\0\377\377\377\0\377\377\377\0" - "\377\377\377\0\377\377\377\0\377\377\377\0\377\377\377\0\377\377\377\0\377" - "\377\377\0\377\377\377\0\0\0\0\377\377\377\0\377\377\377\0\377\377\377\0" - "\377\0\0\0\377\0\0\0\377\0\0\0\377\0\0\0\377\0\0\0\377\0\0\0\377\377\377" - "\0\377\377\377\0\377\377\377\0\377\0\0\0\377\377\377\377\0\377\377\377\0" - "\377\377\377\0\377\377\377\0\377\377\377\0\377\377\377\0\377\377\377\0\377" - "\377\377\0\377\377\377\0\377\377\377\0\377\377\377\0\377\377\377\0\377\377" - "\377\0\377\377\377\0\377\377\377\0\377\377\377\0\377\377\377\0\377\377\377" - "\0\377\377\377\0\0\0\0\377\0\0\0\377\377\377\0\377\377\377\0\377\377\377" - "\0\377\377\377\0\377\377\377\0\377\377\377\0\377\377\377\0\377\377\377\0" - "\377\0\0\0\377\0\0\0\377\377\377\377\0\377\377\377\0\377\377\377\0\377\377" - "\377\0\377\377\377\0\377\377\377\0\377\377\377\0\377\377\377\0\377\377\377" - "\0\377\377\377\0\377\377\377\0\377\377\377\0\377\377\377\0\377\377\377\0" - "\377\377\377\0\377\377\377\0\377\377\377\0\377\377\377\0\377\377\377\0\377" - "\377\377\0\377\377\377\0\377\377\377\0\0\0\0\377\0\0\0\377\0\0\0\377\0\0" - "\0\377\0\0\0\377\0\0\0\377\0\0\0\377\0\0\0\377\377\377\377\0\377\377\377" - "\0\377\377\377\0\377\377\377\0\377\377\377\0\377\377\377\0\377\377\377\0" - "\377\377\377\0\377\377\377\0\377\377\377\0\377\377\377\0\377\377\377\0\377" - "\377\377\0\377\377\377\0\377\377\377\0\377\377\377\0\377\377\377\0\377\377" - "\377\0\377\377\377\0\377\377\377\0\377\377\377\0\377\377\377\0\377\377\377" - "\0\377\377\377\0\377\377\377\0\377\377\377\0\377\377\377\0\377\377\377\0" - "\377\377\377\0\377\377\377\0\377\377\377\0\377\377\377\0\377\377\377\0\377" - "\377\377\0\377\377\377\0\377\377\377\0\377\377\377\0\377\377\377\0\377\377" - "\377\0\377\377\377\0\377\377\377\0\377\377\377\0\377\377\377\0\377\377\377" - "\0\377\377\377\0\377\377\377\0\377\377\377\0\377\377\377\0\377\377\377\0" - "\377\377\377\0\377\377\377\0\377\377\377\0\377\377\377\0\377\377\377\0\377" - "\377\377\0\377\377\377\0\377\377\377\0\377\377\377\0\377\377\377\0\377\377" - "\377\0\377\377\377\0\377\377\377\0\377\377\377\0\377\377\377\0\377\377\377" - "\0\377\377\377\0\377\377\377\0\377\377\377\0\377\377\377\0\377\377\377\0" - "\377\377\377\0\377\377\377\0\377\377\377\0\377\377\377\0\377\377\377\0\377" - "\377\377\0\377\377\377\0\377\377\377\0\377\377\377\0\377\377\377\0\377\377" - "\377\0\377\377\377\0\377\377\377\0\377\377\377\0\377\377\377\0\377\377\377" - "\0\377\377\377\0\377\377\377\0\377\377\377\0\377\377\377\0\377\377\377\0" - "\377\377\377\0\377\377\377\0\377\377\377\0\377\377\377\0\377\377\377\0\377" - "\377\377\0\377\377\377\0\377\377\377\0\377\377\377\0\377\377\377\0\377\377" - "\377\0\377\377\377\0\377\377\377\0\377\377\377\0\377\377\377\0\377\377\377" - "\0\377\377\377\0\377\377\377\0\377\377\377\0\377\377\377\0\377\377\377\0" - "\377\377\377\0\377\377\377\0\377\377\377\0\377\377\377\0\377\377\377\0\377" - "\377\377\0\377\377\377\0\377\377\377\0\377\377\377\0\377\377\377\0\377\377" - "\377\0\377\377\377\0\377\377\377\0\377\377\377\0\377\377\377\0\377\377\377" - "\0\377\377\377\0\377\377\377\0\377\377\377\0\377\377\377\0\377\377\377\0" - "\377\377\377\0\377\377\377\0\377\377\377\0\377\377\377\0\377\377\377\0\377" - "\377\377\0\377\377\377\0", -}; - diff --git a/test/automated/common/img_primitives.c b/test/automated/common/img_primitives.c deleted file mode 100644 index e023a8d63..000000000 --- a/test/automated/common/img_primitives.c +++ /dev/null @@ -1,463 +0,0 @@ -/* GIMP RGB C-Source image dump (primitives.c) */ - -static const SurfaceImage_t img_primitives = { - 80, 60, 3, - "\5ii\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0" - "\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0" - "\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0" - "\0\0\0\0\0\0\0\0\0\0\0\0\0\0\15I\310\0\0\0\15I\310\0\0\0\15I\310\0\0\0\15" - "I\310\0\0\0\15I\310\0\0\0\15I\310\0\0\0\15I\310\0\0\0\15I\310\0\0\0\15I\310" - "\0\0\0\15I\310\0\0\0\15I\310\0\0\0\15I\310\0\0\0\15I\310\0\0\0\15I\310\0" - "\0\0\15I\310\0\0\0\15I\310\0\0\0\15I\310\0\0\0\15I\310\0\0\0\15I\310\0\0" - "\0\5ii\0\0\0\5ii\0\0\0\3\1\1\0\0\0\5\2\1\0\0\0\7\3\2\0\0\0\11\4\3\0\0\0\13" - "\5\3\0\0\0\15\6\4\0\0\0\17\7\5\0\0\0\21\10\5\0\0\0\23\11\6\0\0\0\25\12\7" - "\0\0\0\27\13\7\0\0\0\31\14\10\0\0\0\33\15\11\0\0\0\35\16\11\0\0\0\37\17\12" - "\0\0\0!\20\13\0\0\0#\21\13\0\0\0%\22\14\0\0\0'\23\15\15I\310)\24\15\15I\310" - "+\25\16\15I\310-\26\17\15I\310/\27\17\15I\3101\30\20\15I\3103\31\21\15I\310" - "5\32\21\15I\3107\33\22\15I\3109\34\23\15I\310;\35\23\15I\310=\36\24\15I\310" - "?\37\25\15I\310A\40\25\15I\310C!\26\15I\310E\"\27\15I\310G#\27\15I\310I$" - "\30\15I\310K%\31\15I\310M&\31\5iiO'\32\0\0\0\0\0\0\5ii\0\0\0\10\4\2\0\0\0" - "\14\6\4\0\0\0\20\10\5\0\0\0\24\12\6\0\0\0\30\14\10\0\0\0\34\16\11\0\0\0\40" - "\20\12\0\0\0$\22\14\0\0\0(\24\15\0\0\0,\26\16\0\0\0""0\30\20\0\0\0""4\32" - "\21\0\0\0""8\34\22\0\0\0<\36\24\0\0\0@\40\25\0\0\0D\"\26\0\0\0H$\30\0\0\0" - "L&\31\0\0\0P(\32\15I\310T*\34\15I\310X,\35\15I\310\\.\36\15I\310`0\40\15" - "I\310d2!\15I\310h4\"\15I\310l6$\15I\310p8%\15I\310t:&\15I\310x<(\15I\310" - "|>)\15I\310\200@*\15I\310\204B,\15I\310\210D-\15I\310\214F.\15I\310\220H" - "0\15I\310\224J1\15I\310\230L2\5ii\234N4\15I\310\0\0\0\0\0\0\0\0\0\5ii\0\0" - "\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0" - "\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0" - "\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\15I" - "\310\15I\310\15I\310\15I\310\15I\310\15I\310\15I\310\15I\310\15I\310\15I" - "\310\15I\310\15I\310\15I\310\15I\310\15I\310\15I\310\15I\310\15I\310\15I" - "\310\15I\310\15I\310\15I\310\15I\310\15I\310\15I\310\15I\310\15I\310\15I" - "\310\15I\310\15I\310\15I\310\15I\310\15I\310\15I\310\15I\310\15I\310\5ii" - "\15I\310\15I\310\15I\310\0\0\0\0\0\0\0\0\0\0\0\0\5ii\0\0\0\0\0\0\0\0\0\0" - "\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0" - "\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0" - "\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\15I\310\15I\310\15I\310\15" - "I\310\15I\310\15I\310\15I\310\15I\310\15I\310\15I\310\15I\310\15I\310\15" - "I\310\15I\310\15I\310\15I\310\15I\310\15I\310\15I\310\15I\310\15I\310\15" - "I\310\15I\310\15I\310\15I\310\15I\310\15I\310\15I\310\15I\310\15I\310\15" - "I\310\15I\310\15I\310\15I\310\15I\310\5ii\15I\310\15I\310\15I\310\15I\310" - "\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\5ii\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0" - "\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0" - "\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0" - "\0\0\0\0\0\0\0\0\0\0\0\15I\310\15I\310\15I\310\15I\310\15I\310\15I\310\15" - "I\310\15I\310\15I\310\15I\310\15I\310\15I\310\15I\310\15I\310\15I\310\15" - "I\310\15I\310\15I\310\15I\310\15I\310\15I\310\15I\310\15I\310\15I\310\15" - "I\310\15I\310\15I\310\15I\310\15I\310\15I\310\15I\310\15I\310\15I\310\15" - "I\310\5ii\15I\310\15I\310\15I\310\15I\310\15I\310\0\0\0\0\0\0\0\0\0\0\0\0" - "\0\0\0\0\0\0\5ii\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0" - "\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0" - "\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\15" - "I\310\15I\310\15I\310\15I\310\15I\310\15I\310\15I\310\15I\310\15I\310\15" - "I\310\15I\310\15I\310\15I\310\15I\310\15I\310\15I\310\15I\310\15I\310\15" - "I\310\15I\310\15I\310\15I\310\15I\310\15I\310\15I\310\15I\310\15I\310\15" - "I\310\15I\310\15I\310\15I\310\15I\310\15I\310\5ii\15I\310\15I\310\15I\310" - "\15I\310\15I\310\15I\310\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\5ii\0" - "\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0" - "\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0" - "\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\15I\310\15I\310\15I\310\15" - "I\310\15I\310\15I\310\15I\310\15I\310\15I\310\15I\310\15I\310\15I\310\15" - "I\310\15I\310\15I\310\15I\310\15I\310\15I\310\15I\310\15I\310\15I\310\15" - "I\310\15I\310\15I\310\15I\310\15I\310\15I\310\15I\310\15I\310\15I\310\15" - "I\310\15I\310\5ii\15I\310\15I\310\15I\310\15I\310\15I\310\15I\310\15I\310" - "\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\5ii\0\0\0\0\0\0\0\0\0\0" - "\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0" - "\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0" - "\0\0\0\0\0\0\0\0\0\0\0\15I\310\15I\310\15I\310\15I\310\15I\310\15I\310\15" - "I\310\15I\310\15I\310\15I\310\15I\310\15I\310\15I\310\15I\310\15I\310\15" - "I\310\15I\310\15I\310\15I\310\15I\310\15I\310\15I\310\15I\310\15I\310\15" - "I\310\15I\310\15I\310\15I\310\15I\310\15I\310\15I\310\5ii\15I\310\15I\310" - "\15I\310\15I\310\15I\310\15I\310\15I\310\15I\310\0\0\0\0\0\0\0\0\0\0\0\0" - "\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\5ii\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0" - "\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0" - "\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\15" - "I\310\15I\310\15I\310\15I\310\15I\310\15I\310\15I\310\15I\310\15I\310\15" - "I\310\15I\310\15I\310\15I\310\15I\310\15I\310\15I\310\15I\310\15I\310\15" - "I\310\15I\310\15I\310\15I\310\15I\310\15I\310\15I\310\15I\310\15I\310\15" - "I\310\15I\310\15I\310\5ii\15I\310\15I\310\15I\310\15I\310\15I\310\15I\310" - "\15I\310\15I\310\15I\310\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0" - "\0\0\0\0\0\0\5ii\310\0d\310\0d\310\0d\310\0d\310\0d\310\0d\310\0d\310\0d" - "\310\0d\310\0d\310\0d\310\0d\310\0d\310\0d\310\0d\310\0d\310\0d\310\0d\310" - "\0d\310\0d\310\0d\310\0d\310\0d\310\0d\310\0d\310\0d\310\0d\310\0d\310\0" - "d\310\0d\310\0d\310\0d\310\0d\310\0d\310\0d\310\0d\310\0d\310\0d\310\0d\310" - "\0d\310\0d\310\0d\310\0d\310\0d\310\0d\310\0d\310\0d\310\0d\310\0d\310\0" - "d\310\0d\310\0d\310\0d\310\0d\310\0d\310\0d\310\0d\310\0d\5ii\15I\310\15" - "I\310\15I\310\15I\310\15I\310\15I\310\15I\310\15I\310\15I\310\15I\310\0\0" - "\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\310\0d\5ii\310\0" - "d\310\0d\310\0d\310\0d\310\0d\310\0d\310\0d\310\0d\310\0d\310\0d\310\0d\310" - "\0d\310\0d\310\0d\310\0d\310\0d\310\0d\310\0d\310\0d\310\0d\310\0d\310\0" - "d\310\0d\310\0d\310\0d\310\0d\310\0d\310\0d\310\0d\310\0d\310\0d\310\0d\310" - "\0d\310\0d\310\0d\310\0d\310\0d\310\0d\310\0d\310\0d\310\0d\310\0d\310\0" - "d\310\0d\310\0d\310\0d\310\0d\310\0d\310\0d\310\0d\310\0d\310\0d\310\0d\310" - "\0d\310\0d\310\0d\5ii\310\0d\15I\310\15I\310\15I\310\15I\310\15I\310\15I" - "\310\15I\310\15I\310\15I\310\15I\310\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0" - "\0\0\0\0\0\0\0\0\0\0\0\0\310\0d\310\0d\5ii\310\0d\310\0d\310\0d\310\0d\310" - "\0d\310\0d\310\0d\310\0d\310\0d\310\0d\310\0d\310\0d\310\0d\310\0d\310\0" - "d\310\0d\310\0d\310\0d\310\0d\310\0d\310\0d\310\0d\310\0d\310\0d\310\0d\310" - "\0d\310\0d\310\0d\310\0d\310\0d\310\0d\310\0d\310\0d\310\0d\310\0d\310\0" - "d\310\0d\310\0d\310\0d\310\0d\310\0d\310\0d\310\0d\310\0d\310\0d\310\0d\310" - "\0d\310\0d\310\0d\310\0d\310\0d\310\0d\310\0d\310\0d\5ii\310\0d\310\0d\15" - "I\310\15I\310\15I\310\15I\310\15I\310\15I\310\15I\310\15I\310\15I\310\15" - "I\310\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\310\0d" - "\310\0d\310\0d\5ii\310\0d\310\0d\310\0d\310\0d\310\0d\310\0d\310\0d\310\0" - "d\310\0d\310\0d\310\0d\310\0d\310\0d\310\0d\310\0d\310\0d\310\0d\310\0d\310" - "\0d\310\0d\310\0d\310\0d\310\0d\310\0d\310\0d\310\0d\310\0d\310\0d\310\0" - "d\310\0d\310\0d\310\0d\310\0d\310\0d\310\0d\310\0d\310\0d\310\0d\310\0d\310" - "\0d\310\0d\310\0d\310\0d\310\0d\310\0d\310\0d\310\0d\310\0d\310\0d\310\0" - "d\310\0d\310\0d\5ii\310\0d\310\0d\310\0d\15I\310\15I\310\15I\310\15I\310" - "\15I\310\15I\310\15I\310\15I\310\15I\310\15I\310\0\0\0\0\0\0\0\0\0\0\0\0" - "\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\310\0d\310\0d\310\0d\310\0d\5ii\310" - "\0d\310\0d\310\0d\310\0d\310\0d\310\0d\310\0d\310\0d\310\0d\310\0d\310\0" - "d\310\0d\310\0d\310\0d\310\0d\310\0d\310\0d\310\0d\310\0d\310\0d\310\0d\310" - "\0d\310\0d\310\0d\310\0d\310\0d\310\0d\310\0d\310\0d\310\0d\310\0d\310\0" - "d\310\0d\310\0d\310\0d\310\0d\310\0d\310\0d\310\0d\310\0d\310\0d\310\0d\310" - "\0d\310\0d\310\0d\310\0d\310\0d\310\0d\310\0d\310\0d\5ii\310\0d\310\0d\310" - "\0d\310\0d\15I\310\15I\310\15I\310\15I\310\15I\310\15I\310\15I\310\15I\310" - "\15I\310\15I\310\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0" - "\0\0\310\0d\310\0d\310\0d\310\0d\310\0d\5ii\310\0d\310\0d\310\0d\310\0d\310" - "\0d\310\0d\310\0d\310\0d\310\0d\310\0d\310\0d\310\0d\310\0d\310\0d\310\0" - "d\310\0d\310\0d\310\0d\310\0d\310\0d\310\0d\310\0d\310\0d\310\0d\310\0d\310" - "\0d\310\0d\310\0d\310\0d\310\0d\310\0d\310\0d\310\0d\310\0d\310\0d\310\0" - "d\310\0d\310\0d\310\0d\310\0d\310\0d\310\0d\310\0d\310\0d\310\0d\310\0d\310" - "\0d\310\0d\5ii\310\0d\310\0d\310\0d\310\0d\310\0d\15I\310\15I\310\15I\310" - "\15I\310\15I\310\15I\310\15I\310\15I\310\15I\310\15I\310\0\0\0\0\0\0\0\0" - "\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\310\0d\310\0d\310\0d\310\0d" - "\310\0d\310\0d\5ii\310\0d\310\0d\310\0d\310\0d\310\0d\310\0d\310\0d\310\0" - "d\310\0d\310\0d\310\0d\310\0d\310\0d\310\0d\310\0d\310\0d\310\0d\310\0d\310" - "\0d\310\0d\310\0d\310\0d\310\0d\310\0d\310\0d\310\0d\310\0d\310\0d\310\0" - "d\310\0d\310\0d\310\0d\310\0d\310\0d\310\0d\310\0d\310\0d\310\0d\310\0d\310" - "\0d\310\0d\310\0d\310\0d\310\0d\310\0d\310\0d\5ii\310\0d\310\0d\310\0d\310" - "\0d\310\0d\310\0d\15I\310\15I\310\15I\310\15I\310\15I\310\15I\310\15I\310" - "\15I\310\15I\310\15I\310\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0" - "\0\0\0\0\0\0\310\0d\310\0d\310\0d\310\0d\310\0d\310\0d\310\0d\5ii\310\0d" - "\310\0d\310\0d\310\0d\310\0d\310\0d\310\0d\310\0d\310\0d\310\0d\310\0d\310" - "\0d\310\0d\310\0d\310\0d\310\0d\310\0d\310\0d\310\0d\310\0d\310\0d\310\0" - "d\310\0d\310\0d\310\0d\310\0d\310\0d\310\0d\310\0d\310\0d\310\0d\310\0d\310" - "\0d\310\0d\310\0d\310\0d\310\0d\310\0d\310\0d\310\0d\310\0d\310\0d\310\0" - "d\310\0d\5ii\310\0d\310\0d\310\0d\310\0d\310\0d\310\0d\310\0d\15I\310\15" - "I\310\15I\310\15I\310\15I\310\15I\310\15I\310\15I\310\15I\310\15I\310\0\0" - "\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\310\0d\310\0d\310" - "\0d\310\0d\310\0d\310\0d\310\0d\310\0d\5ii\310\0d\310\0d\310\0d\310\0d\310" - "\0d\310\0d\310\0d\310\0d\310\0d\310\0d\310\0d\310\0d\310\0d\310\0d\310\0" - "d\310\0d\310\0d\310\0d\310\0d\310\0d\310\0d\310\0d\310\0d\310\0d\310\0d\310" - "\0d\310\0d\310\0d\310\0d\310\0d\310\0d\310\0d\310\0d\310\0d\310\0d\310\0" - "d\310\0d\310\0d\310\0d\310\0d\310\0d\310\0d\5ii\310\0d\310\0d\310\0d\310" - "\0d\310\0d\310\0d\310\0d\310\0d\15I\310\15I\310\15I\310\15I\310\15I\310\15" - "I\310\15I\310\15I\310\15I\310\15I\310\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0" - "\0\0\0\0\0\0\0\0\0\0\0\0\310\0d\310\0d\310\0d\310\0d\310\0d\310\0d\310\0" - "d\310\0d\310\0d\5ii\310\0d\310\0d\310\0d\310\0d\310\0d\310\0d\310\0d\310" - "\0d\310\0d\310\0d\310\0d\310\0d\310\0d\310\0d\310\0d\310\0d\310\0d\310\0" - "d\310\0d\310\0d\310\0d\310\0d\310\0d\310\0d\310\0d\310\0d\310\0d\310\0d\310" - "\0d\310\0d\310\0d\310\0d\310\0d\310\0d\310\0d\310\0d\310\0d\310\0d\310\0" - "d\310\0d\5ii\310\0d\310\0d\310\0d\310\0d\310\0d\310\0d\310\0d\310\0d\310" - "\0d\15I\310\15I\310\15I\310\15I\310\15I\310\15I\310\15I\310\15I\310\15I\310" - "\15I\310\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\310" - "\0d\310\0d\310\0d\310\0d\310\0d\310\0d\310\0d\310\0d\310\0d\310\0d\5ii\310" - "\0d\310\0d\310\0d\310\0d\310\0d\310\0d\310\0d\310\0d\310\0d\310\0d\310\0" - "d\310\0d\310\0d\310\0d\310\0d\310\0d\310\0d\310\0d\310\0d\310\0d\310\0d\310" - "\0d\310\0d\310\0d\310\0d\310\0d\310\0d\310\0d\310\0d\310\0d\310\0d\310\0" - "d\310\0d\310\0d\310\0d\310\0d\310\0d\310\0d\5ii\310\0d\310\0d\310\0d\310" - "\0d\310\0d\310\0d\310\0d\310\0d\310\0d\310\0d\15I\310\15I\310\15I\310\15" - "I\310\15I\310\15I\310\15I\310\15I\310\15I\310\15I\310\0\0\0\0\0\0\0\0\0\0" - "\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\310\0d\310\0d\310\0d\310\0d\310" - "\0d\310\0d\310\0d\310\0d\310\0d\310\0d\310\0d\5ii\310\0d\310\0d\310\0d\310" - "\0d\310\0d\310\0d\310\0d\310\0d\310\0d\310\0d\310\0d\310\0d\310\0d\310\0" - "d\310\0d\310\0d\310\0d\310\0d\310\0d\310\0d\310\0d\310\0d\310\0d\310\0d\310" - "\0d\310\0d\310\0d\310\0d\310\0d\310\0d\310\0d\310\0d\310\0d\310\0d\310\0" - "d\310\0d\5ii\310\0d\310\0d\310\0d\310\0d\310\0d\310\0d\310\0d\310\0d\310" - "\0d\310\0d\310\0d\15I\310\15I\310\15I\310\15I\310\15I\310\15I\310\15I\310" - "\15I\310\15I\310\15I\310\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0" - "\0\0\0\0\0\0\310\0d\310\0d\310\0d\310\0d\310\0d\310\0d\310\0d\310\0d\310" - "\0d\310\0d\310\0d\310\0d\5ii\310\0d\310\0d\310\0d\310\0d\310\0d\310\0d\310" - "\0d\310\0d\310\0d\310\0d\310\0d\310\0d\310\0d\310\0d\310\0d\310\0d\310\0" - "d\310\0d\310\0d\310\0d\310\0d\310\0d\310\0d\310\0d\310\0d\310\0d\310\0d\310" - "\0d\310\0d\310\0d\310\0d\310\0d\310\0d\310\0d\5ii\310\0d\310\0d\310\0d\310" - "\0d\310\0d\310\0d\310\0d\310\0d\310\0d\310\0d\310\0d\310\0d\15I\310\15I\310" - "\15I\310\15I\310\15I\310\15I\310\15I\310\15I\310\15I\310\15I\310\0\0\0\0" - "\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\310\0d\310\0d\310\0" - "d\310\0d\310\0d\310\0d\310\0d\310\0d\310\0d\310\0d\310\0d\310\0d\310\0d\5" - "ii\310\0d\310\0d\310\0d\310\0d\310\0d\310\0d\310\0d\310\0d\310\0d\310\0d" - "\310\0d\310\0d\310\0d\310\0d\310\0d\310\0d\310\0d\310\0d\310\0d\310\0d\310" - "\0d\310\0d\310\0d\310\0d\310\0d\310\0d\310\0d\310\0d\310\0d\310\0d\310\0" - "d\310\0d\5ii\310\0d\310\0d\310\0d\310\0d\310\0d\310\0d\310\0d\310\0d\310" - "\0d\310\0d\310\0d\310\0d\310\0d\15I\310\15I\310\15I\310\15I\310\15I\310\15" - "I\310\15I\310\15I\310\15I\310\15I\310\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0" - "\0\0\0\0\0\0\0\0\0\0\0\0\310\0d\310\0d\310\0d\310\0d\310\0d\310\0d\310\0" - "d\310\0d\310\0d\310\0d\310\0d\310\0d\310\0d\310\0d\5ii\310\0d\310\0d\310" - "\0d\310\0d\310\0d\310\0d\310\0d\310\0d\310\0d\310\0d\310\0d\310\0d\310\0" - "d\310\0d\310\0d\310\0d\310\0d\310\0d\310\0d\310\0d\310\0d\310\0d\310\0d\310" - "\0d\310\0d\310\0d\310\0d\310\0d\310\0d\310\0d\5ii\310\0d\310\0d\310\0d\310" - "\0d\310\0d\310\0d\310\0d\310\0d\310\0d\310\0d\310\0d\310\0d\310\0d\310\0" - "d\15I\310\15I\310\15I\310\15I\310\15I\310\15I\310\15I\310\15I\310\15I\310" - "\15I\310\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\310" - "\0d\310\0d\310\0d\310\0d\310\0d\310\0d\310\0d\310\0d\310\0d\310\0d\310\0" - "d\310\0d\310\0d\310\0d\310\0d\5ii\310\0d\310\0d\310\0d\310\0d\310\0d\310" - "\0d\310\0d\310\0d\310\0d\310\0d\310\0d\310\0d\310\0d\310\0d\310\0d\310\0" - "d\310\0d\310\0d\310\0d\310\0d\310\0d\310\0d\310\0d\310\0d\310\0d\310\0d\310" - "\0d\310\0d\5ii\310\0d\310\0d\310\0d\310\0d\310\0d\310\0d\310\0d\310\0d\310" - "\0d\310\0d\310\0d\310\0d\310\0d\310\0d\310\0d\15I\310\15I\310\15I\310\15" - "I\310\15I\310\15I\310\15I\310\15I\310\15I\310\15I\310\0\0\0\0\0\0\0\0\0\0" - "\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\310\0d\310\0d\310\0d\310\0d\310" - "\0d\310\0d\310\0d\310\0d\310\0d\310\0d\310\0d\310\0d\310\0d\310\0d\310\0" - "d\310\0d\5ii\310\0d\310\0d\310\0d\310\0d\310\0d\310\0d\310\0d\310\0d\310" - "\0d\310\0d\310\0d\310\0d\310\0d\310\0d\310\0d\310\0d\310\0d\310\0d\310\0" - "d\310\0d\310\0d\310\0d\310\0d\310\0d\310\0d\310\0d\5ii\310\0d\310\0d\310" - "\0d\310\0d\310\0d\310\0d\310\0d\310\0d\310\0d\310\0d\310\0d\310\0d\310\0" - "d\310\0d\310\0d\310\0d\15I\310\15I\310\15I\310\15I\310\15I\310\15I\310\15" - "I\310\15I\310\15I\310\15I\310\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0" - "\0\0\0\0\0\0\0\0\310\0d\310\0d\310\0d\310\0d\310\0d\310\0d\310\0d\310\0d" - "\310\0d\310\0d\310\0d\310\0d\310\0d\310\0d\310\0d\310\0d\310\0d\5ii\310\0" - "d\310\0d\310\0d\310\0d\310\0d\310\0d\310\0d\310\0d\310\0d\310\0d\310\0d\310" - "\0d\310\0d\310\0d\310\0d\310\0d\310\0d\310\0d\310\0d\310\0d\310\0d\310\0" - "d\310\0d\310\0d\5ii\310\0d\310\0d\310\0d\310\0d\310\0d\310\0d\310\0d\310" - "\0d\310\0d\310\0d\310\0d\310\0d\310\0d\310\0d\310\0d\310\0d\310\0d\15I\310" - "\15I\310\15I\310\15I\310\15I\310\15I\310\15I\310\15I\310\15I\310\15I\310" - "\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\310\0d\310\0" - "d\310\0d\310\0d\310\0d\310\0d\310\0d\310\0d\310\0d\310\0d\310\0d\310\0d\310" - "\0d\310\0d\310\0d\310\0d\310\0d\310\0d\5ii\310\0d\310\0d\310\0d\310\0d\310" - "\0d\310\0d\310\0d\310\0d\310\0d\310\0d\310\0d\310\0d\310\0d\310\0d\310\0" - "d\310\0d\310\0d\310\0d\310\0d\310\0d\310\0d\310\0d\5ii\310\0d\310\0d\310" - "\0d\310\0d\310\0d\310\0d\310\0d\310\0d\310\0d\310\0d\310\0d\310\0d\310\0" - "d\310\0d\310\0d\310\0d\310\0d\310\0d\15I\310\15I\310\15I\310\15I\310\15I" - "\310\15I\310\15I\310\15I\310\15I\310\15I\310\0\0\0\0\0\0\0\0\0\0\0\0\0\0" - "\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\310\0d\310\0d\310\0d\310\0d\310\0d\310\0" - "d\310\0d\310\0d\310\0d\310\0d\310\0d\310\0d\310\0d\310\0d\310\0d\310\0d\310" - "\0d\310\0d\310\0d\5ii\310\0d\310\0d\310\0d\310\0d\310\0d\310\0d\310\0d\310" - "\0d\310\0d\310\0d\310\0d\310\0d\310\0d\310\0d\310\0d\310\0d\310\0d\310\0" - "d\310\0d\310\0d\5ii\310\0d\310\0d\310\0d\310\0d\310\0d\310\0d\310\0d\310" - "\0d\310\0d\310\0d\310\0d\310\0d\310\0d\310\0d\310\0d\310\0d\310\0d\310\0" - "d\310\0d\15I\310\15I\310\15I\310\15I\310\15I\310\15I\310\15I\310\15I\310" - "\15I\310\15I\310\0\377\0\0\377\0\0\377\0\0\377\0\0\377\0\0\377\0\0\377\0" - "\0\377\0\0\377\0\0\377\0\0\377\0\0\377\0\0\377\0\0\377\0\0\377\0\0\377\0" - "\0\377\0\0\377\0\0\377\0\0\377\0\0\377\0\0\377\0\0\377\0\0\377\0\0\377\0" - "\0\377\0\0\377\0\0\377\0\0\377\0\5ii\0\377\0\0\377\0\0\377\0\0\377\0\0\377" - "\0\0\377\0\0\377\0\0\377\0\0\377\0\0\377\0""77\5\0\377\0\0\377\0\0\377\0" - "\0\377\0\0\377\0\0\377\0\0\377\0\0\377\0\0\377\0\5ii\0\377\0\0\377\0\0\377" - "\0\0\377\0\0\377\0\0\377\0\0\377\0\0\377\0\0\377\0\0\377\0\0\377\0\0\377" - "\0\0\377\0\0\377\0\0\377\0\0\377\0\0\377\0\0\377\0\0\377\0\0\377\0\0\377" - "\0\0\377\0\0\377\0\0\377\0\0\377\0\0\377\0\0\377\0\0\377\0\0\377\0\0\0\0" - "\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\310\0d\310\0d\310" - "\0d\310\0d\310\0d\310\0d\310\0d\310\0d\310\0d\310\0d\310\0d\310\0d\310\0" - "d\310\0d\310\0d\310\0d\310\0d\310\0d\5ii\310\0d\310\0d\310\0d\310\0d\310" - "\0d\310\0d\310\0d\310\0d\310\0d\310\0d\310\0d77\5\310\0d\310\0d\310\0d\310" - "\0d\310\0d\310\0d\310\0d\310\0d\310\0d\310\0d\5ii\310\0d\310\0d\310\0d\310" - "\0d\310\0d\310\0d\310\0d\310\0d\310\0d\310\0d\310\0d\310\0d\310\0d\310\0" - "d\310\0d\310\0d\310\0d\310\0d\15I\310\15I\310\15I\310\15I\310\15I\310\15" - "I\310\15I\310\15I\310\15I\310\15I\310\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0" - "\0\0\0\0\0\0\0\0\0\0\0\0\310\0d\310\0d\310\0d\310\0d\310\0d\310\0d\310\0" - "d\310\0d\310\0d\310\0d\310\0d\310\0d\310\0d\310\0d\310\0d\310\0d\310\0d\5" - "ii\310\0d\310\0d\310\0d\310\0d\310\0d\310\0d\310\0d\310\0d\310\0d\310\0d" - "\310\0d\310\0d77\5\310\0d\310\0d\310\0d\310\0d\310\0d\310\0d\310\0d\310\0" - "d\310\0d\310\0d\310\0d\5ii\310\0d\310\0d\310\0d\310\0d\310\0d\310\0d\310" - "\0d\310\0d\310\0d\310\0d\310\0d\310\0d\310\0d\310\0d\310\0d\310\0d\310\0" - "d\15I\310\15I\310\15I\310\15I\310\15I\310\15I\310\15I\310\15I\310\15I\310" - "\15I\310\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\310" - "\0d\310\0d\310\0d\310\0d\310\0d\310\0d\310\0d\310\0d\310\0d\310\0d\310\0" - "d\310\0d\310\0d\310\0d\310\0d\310\0d\5ii\310\0d\310\0d\310\0d\310\0d\310" - "\0d\310\0d\310\0d\310\0d\310\0d\310\0d\310\0d\310\0d\310\0d77\5\310\0d\310" - "\0d\310\0d\310\0d\310\0d\310\0d\310\0d\310\0d\310\0d\310\0d\310\0d\310\0" - "d\5ii\310\0d\310\0d\310\0d\310\0d\310\0d\310\0d\310\0d\310\0d\310\0d\310" - "\0d\310\0d\310\0d\310\0d\310\0d\310\0d\310\0d\15I\310\15I\310\15I\310\15" - "I\310\15I\310\15I\310\15I\310\15I\310\15I\310\15I\310\0\0\0\0\0\0\0\0\0\0" - "\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\310\0d\310\0d\310\0d\310\0d\310" - "\0d\310\0d\310\0d\310\0d\310\0d\310\0d\310\0d\310\0d\310\0d\310\0d\310\0" - "d\5ii\310\0d\310\0d\310\0d\310\0d\310\0d\310\0d\310\0d\310\0d\310\0d\310" - "\0d\310\0d\310\0d\310\0d\310\0d77\5\310\0d\310\0d\310\0d\310\0d\310\0d\310" - "\0d\310\0d\310\0d\310\0d\310\0d\310\0d\310\0d\310\0d\5ii\310\0d\310\0d\310" - "\0d\310\0d\310\0d\310\0d\310\0d\310\0d\310\0d\310\0d\310\0d\310\0d\310\0" - "d\310\0d\310\0d\15I\310\15I\310\15I\310\15I\310\15I\310\15I\310\15I\310\15" - "I\310\15I\310\15I\310\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0" - "\0\0\0\0\310\0d\310\0d\310\0d\310\0d\310\0d\310\0d\310\0d\310\0d\310\0d\310" - "\0d\310\0d\310\0d\310\0d\310\0d\5ii\310\0d\310\0d\310\0d\310\0d\310\0d\310" - "\0d\310\0d\310\0d\310\0d\310\0d\310\0d\310\0d\310\0d\310\0d\310\0d77\5\310" - "\0d\310\0d\310\0d\310\0d\310\0d\310\0d\310\0d\310\0d\310\0d\310\0d\310\0" - "d\310\0d\310\0d\310\0d\5ii\310\0d\310\0d\310\0d\310\0d\310\0d\310\0d\310" - "\0d\310\0d\310\0d\310\0d\310\0d\310\0d\310\0d\310\0d\15I\310\15I\310\15I" - "\310\15I\310\15I\310\15I\310\15I\310\15I\310\15I\310\15I\310\0\0\0\0\0\0" - "\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\310\0d\310\0d\310\0d\310" - "\0d\310\0d\310\0d\310\0d\310\0d\310\0d\310\0d\310\0d\310\0d\310\0d\5ii\310" - "\0d\310\0d\310\0d\310\0d\310\0d\310\0d\310\0d\310\0d\310\0d\310\0d\310\0" - "d\310\0d\310\0d\310\0d\310\0d\310\0d77\5\310\0d\310\0d\310\0d\310\0d\310" - "\0d\310\0d\310\0d\310\0d\310\0d\310\0d\310\0d\310\0d\310\0d\310\0d\310\0" - "d\5ii\310\0d\310\0d\310\0d\310\0d\310\0d\310\0d\310\0d\310\0d\310\0d\310" - "\0d\310\0d\310\0d\310\0d\15I\310\15I\310\15I\310\15I\310\15I\310\15I\310" - "\15I\310\15I\310\15I\310\15I\310\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0" - "\0\0\0\0\0\0\0\0\0\0\310\0d\310\0d\310\0d\310\0d\310\0d\310\0d\310\0d\310" - "\0d\310\0d\310\0d\310\0d\310\0d\5ii\310\0d\310\0d\310\0d\310\0d\310\0d\310" - "\0d\310\0d\310\0d\310\0d\310\0d\310\0d\310\0d\310\0d\310\0d\310\0d\310\0" - "d\310\0d77\5\310\0d\310\0d\310\0d\310\0d\310\0d\310\0d\310\0d\310\0d\310" - "\0d\310\0d\310\0d\310\0d\310\0d\310\0d\310\0d\310\0d\5ii\310\0d\310\0d\310" - "\0d\310\0d\310\0d\310\0d\310\0d\310\0d\310\0d\310\0d\310\0d\310\0d\15I\310" - "\15I\310\15I\310\15I\310\15I\310\15I\310\15I\310\15I\310\15I\310\15I\310" - "\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\310\0d\310\0" - "d\310\0d\310\0d\310\0d\310\0d\310\0d\310\0d\310\0d\310\0d\310\0d\5ii\310" - "\0d\310\0d\310\0d\310\0d\310\0d\310\0d\310\0d\310\0d\310\0d\310\0d\310\0" - "d\310\0d\310\0d\310\0d\310\0d\310\0d\310\0d\310\0d77\5\310\0d\310\0d\310" - "\0d\310\0d\310\0d\310\0d\310\0d\310\0d\310\0d\310\0d\310\0d\310\0d\310\0" - "d\310\0d\310\0d\310\0d\310\0d\5ii\310\0d\310\0d\310\0d\310\0d\310\0d\310" - "\0d\310\0d\310\0d\310\0d\310\0d\310\0d\15I\310\15I\310\15I\310\15I\310\15" - "I\310\15I\310\15I\310\15I\310\15I\310\15I\310\0\0\0\0\0\0\0\0\0\0\0\0\0\0" - "\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\310\0d\310\0d\310\0d\310\0d\310\0d\310\0" - "d\310\0d\310\0d\310\0d\310\0d\5ii\310\0d\310\0d\310\0d\310\0d\310\0d\310" - "\0d\310\0d\310\0d\310\0d\310\0d\310\0d\310\0d\310\0d\310\0d\310\0d\310\0" - "d\310\0d\310\0d\310\0d77\5\310\0d\310\0d\310\0d\310\0d\310\0d\310\0d\310" - "\0d\310\0d\310\0d\310\0d\310\0d\310\0d\310\0d\310\0d\310\0d\310\0d\310\0" - "d\310\0d\5ii\310\0d\310\0d\310\0d\310\0d\310\0d\310\0d\310\0d\310\0d\310" - "\0d\310\0d\15I\310\15I\310\15I\310\15I\310\15I\310\15I\310\15I\310\15I\310" - "\15I\310\15I\310\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0" - "\0\0\310\0d\310\0d\310\0d\310\0d\310\0d\310\0d\310\0d\310\0d\310\0d\5ii\310" - "\0d\310\0d\310\0d\310\0d\310\0d\310\0d\310\0d\310\0d\310\0d\310\0d\310\0" - "d\310\0d\310\0d\310\0d\310\0d\310\0d\310\0d\310\0d\310\0d\310\0d77\5\310" - "\0d\310\0d\310\0d\310\0d\310\0d\310\0d\310\0d\310\0d\310\0d\310\0d\310\0" - "d\310\0d\310\0d\310\0d\310\0d\310\0d\310\0d\310\0d\310\0d\5ii\310\0d\310" - "\0d\310\0d\310\0d\310\0d\310\0d\310\0d\310\0d\310\0d\15I\310\15I\310\15I" - "\310\15I\310\15I\310\15I\310\15I\310\15I\310\15I\310\15I\310\0\0\0\0\0\0" - "\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\310\0d\310\0d\310\0d\310" - "\0d\310\0d\310\0d\310\0d\310\0d\5ii\310\0d\310\0d\310\0d\310\0d\310\0d\310" - "\0d\310\0d\310\0d\310\0d\310\0d\310\0d\310\0d\310\0d\310\0d\310\0d\310\0" - "d\310\0d\310\0d\310\0d\310\0d\310\0d77\5\310\0d\310\0d\310\0d\310\0d\310" - "\0d\310\0d\310\0d\310\0d\310\0d\310\0d\310\0d\310\0d\310\0d\310\0d\310\0" - "d\310\0d\310\0d\310\0d\310\0d\310\0d\5ii\310\0d\310\0d\310\0d\310\0d\310" - "\0d\310\0d\310\0d\310\0d\15I\310\15I\310\15I\310\15I\310\15I\310\15I\310" - "\15I\310\15I\310\15I\310\15I\310\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0" - "\0\0\0\0\0\0\0\0\0\0\310\0d\310\0d\310\0d\310\0d\310\0d\310\0d\310\0d\5i" - "i\310\0d\310\0d\310\0d\310\0d\310\0d\310\0d\310\0d\310\0d\310\0d\310\0d\310" - "\0d\310\0d\310\0d\310\0d\310\0d\310\0d\310\0d\310\0d\310\0d\310\0d\310\0" - "d\310\0d77\5\310\0d\310\0d\310\0d\310\0d\310\0d\310\0d\310\0d\310\0d\310" - "\0d\310\0d\310\0d\310\0d\310\0d\310\0d\310\0d\310\0d\310\0d\310\0d\310\0" - "d\310\0d\310\0d\5ii\310\0d\310\0d\310\0d\310\0d\310\0d\310\0d\310\0d\15I" - "\310\15I\310\15I\310\15I\310\15I\310\15I\310\15I\310\15I\310\15I\310\15I" - "\310\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\310\0d\310" - "\0d\310\0d\310\0d\310\0d\310\0d\5ii\310\0d\310\0d\310\0d\310\0d\310\0d\310" - "\0d\310\0d\310\0d\310\0d\310\0d\310\0d\310\0d\310\0d\310\0d\310\0d\310\0" - "d\310\0d\310\0d\310\0d\310\0d\310\0d\310\0d\310\0d77\5\310\0d\310\0d\310" - "\0d\310\0d\310\0d\310\0d\310\0d\310\0d\310\0d\310\0d\310\0d\310\0d\310\0" - "d\310\0d\310\0d\310\0d\310\0d\310\0d\310\0d\310\0d\310\0d\310\0d\5ii\310" - "\0d\310\0d\310\0d\310\0d\310\0d\310\0d\15I\310\15I\310\15I\310\15I\310\15" - "I\310\15I\310\15I\310\15I\310\15I\310\15I\310\0\0\0\0\0\0\0\0\0\0\0\0\0\0" - "\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\310\0d\310\0d\310\0d\310\0d\310\0d\5ii\310" - "\0d\310\0d\310\0d\310\0d\310\0d\310\0d\310\0d\310\0d\310\0d\310\0d\310\0" - "d\310\0d\310\0d\310\0d\310\0d\310\0d\310\0d\310\0d\310\0d\310\0d\310\0d\310" - "\0d\310\0d\310\0d77\5\310\0d\310\0d\310\0d\310\0d\310\0d\310\0d\310\0d\310" - "\0d\310\0d\310\0d\310\0d\310\0d\310\0d\310\0d\310\0d\310\0d\310\0d\310\0" - "d\310\0d\310\0d\310\0d\310\0d\310\0d\5ii\310\0d\310\0d\310\0d\310\0d\310" - "\0d\15I\310\15I\310\15I\310\15I\310\15I\310\15I\310\15I\310\15I\310\15I\310" - "\15I\310\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\310" - "\0d\310\0d\310\0d\310\0d\5ii\310\0d\310\0d\310\0d\310\0d\310\0d\310\0d\310" - "\0d\310\0d\310\0d\310\0d\310\0d\310\0d\310\0d\310\0d\310\0d\310\0d\310\0" - "d\310\0d\310\0d\310\0d\310\0d\310\0d\310\0d\310\0d\310\0d77\5\310\0d\310" - "\0d\310\0d\310\0d\310\0d\310\0d\310\0d\310\0d\310\0d\310\0d\310\0d\310\0" - "d\310\0d\310\0d\310\0d\310\0d\310\0d\310\0d\310\0d\310\0d\310\0d\310\0d\310" - "\0d\310\0d\5ii\310\0d\310\0d\310\0d\310\0d\15I\310\15I\310\15I\310\15I\310" - "\15I\310\15I\310\15I\310\15I\310\15I\310\15I\310\0\0\0\0\0\0\0\0\0\0\0\0" - "\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\310\0d\310\0d\310\0d\5ii\310\0d\310" - "\0d\310\0d\310\0d\310\0d\310\0d\310\0d\310\0d\310\0d\310\0d\310\0d\310\0" - "d\310\0d\310\0d\310\0d\310\0d\310\0d\310\0d\310\0d\310\0d\310\0d\310\0d\310" - "\0d\310\0d\310\0d\310\0d77\5\310\0d\310\0d\310\0d\310\0d\310\0d\310\0d\310" - "\0d\310\0d\310\0d\310\0d\310\0d\310\0d\310\0d\310\0d\310\0d\310\0d\310\0" - "d\310\0d\310\0d\310\0d\310\0d\310\0d\310\0d\310\0d\310\0d\5ii\310\0d\310" - "\0d\310\0d\15I\310\15I\310\15I\310\15I\310\15I\310\15I\310\15I\310\15I\310" - "\15I\310\15I\310\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0" - "\0\0\310\0d\310\0d\5ii\310\0d\310\0d\310\0d\310\0d\310\0d\310\0d\310\0d\310" - "\0d\310\0d\310\0d\310\0d\310\0d\310\0d\310\0d\310\0d\310\0d\310\0d\310\0" - "d\310\0d\310\0d\310\0d\310\0d\310\0d\310\0d\310\0d\310\0d\310\0d77\5\310" - "\0d\310\0d\310\0d\310\0d\310\0d\310\0d\310\0d\310\0d\310\0d\310\0d\310\0" - "d\310\0d\310\0d\310\0d\310\0d\310\0d\310\0d\310\0d\310\0d\310\0d\310\0d\310" - "\0d\310\0d\310\0d\310\0d\310\0d\5ii\310\0d\310\0d\15I\310\15I\310\15I\310" - "\15I\310\15I\310\15I\310\15I\310\15I\310\15I\310\15I\310\0\0\0\0\0\0\0\0" - "\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\310\0d\5ii\310\0d\310\0d\310" - "\0d\310\0d\310\0d\310\0d\310\0d\310\0d\310\0d\310\0d\310\0d\310\0d\310\0" - "d\310\0d\310\0d\310\0d\310\0d\310\0d\310\0d\310\0d\310\0d\310\0d\310\0d\310" - "\0d\310\0d\310\0d\310\0d\310\0d77\5\310\0d\310\0d\310\0d\310\0d\310\0d\310" - "\0d\310\0d\310\0d\310\0d\310\0d\310\0d\310\0d\310\0d\310\0d\310\0d\310\0" - "d\310\0d\310\0d\310\0d\310\0d\310\0d\310\0d\310\0d\310\0d\310\0d\310\0d\310" - "\0d\5ii\310\0d\15I\310\15I\310\15I\310\15I\310\15I\310\15I\310\15I\310\15" - "I\310\15I\310\15I\310\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0" - "\0\0\0\0\5ii\310\0d\310\0d\310\0d\310\0d\310\0d\310\0d\310\0d\310\0d\310" - "\0d\310\0d\310\0d\310\0d\310\0d\310\0d\310\0d\310\0d\310\0d\310\0d\310\0" - "d\310\0d\310\0d\310\0d\310\0d\310\0d\310\0d\310\0d\310\0d\310\0d\310\0d7" - "7\5\310\0d\310\0d\310\0d\310\0d\310\0d\310\0d\310\0d\310\0d\310\0d\310\0" - "d\310\0d\310\0d\310\0d\310\0d\310\0d\310\0d\310\0d\310\0d\310\0d\310\0d\310" - "\0d\310\0d\310\0d\310\0d\310\0d\310\0d\310\0d\310\0d\5ii\15I\310\15I\310" - "\15I\310\15I\310\15I\310\15I\310\15I\310\15I\310\15I\310\15I\310\0\0\0\0" - "\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\5ii\0\0\0\0\0\0\0\0\0\0\0" - "\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0" - "\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0" - "\0\0\0\0\0\0\0""77\5\15I\310\15I\310\15I\310\15I\310\15I\310\15I\310\15I" - "\310\15I\310\15I\310\15I\310\15I\310\15I\310\15I\310\15I\310\15I\310\15I" - "\310\15I\310\15I\310\15I\310\15I\310\15I\310\15I\310\15I\310\15I\310\15I" - "\310\15I\310\15I\310\15I\310\15I\310\5ii\15I\310\15I\310\15I\310\15I\310" - "\15I\310\15I\310\15I\310\15I\310\15I\310\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0" - "\0\0\0\0\0\0\0\0\5ii\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0" - "\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0" - "\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0""77\5\15I" - "\310\15I\310\15I\310\15I\310\15I\310\15I\310\15I\310\15I\310\15I\310\15I" - "\310\15I\310\15I\310\15I\310\15I\310\15I\310\15I\310\15I\310\15I\310\15I" - "\310\15I\310\15I\310\15I\310\15I\310\15I\310\15I\310\15I\310\15I\310\15I" - "\310\15I\310\15I\310\5ii\15I\310\15I\310\15I\310\15I\310\15I\310\15I\310" - "\15I\310\15I\310\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\5ii\0\0\0\0\0" - "\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0" - "\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0" - "\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0""77\5\15I\310\15I\310\15I\310\15I" - "\310\15I\310\15I\310\15I\310\15I\310\15I\310\15I\310\15I\310\15I\310\15I" - "\310\15I\310\15I\310\15I\310\15I\310\15I\310\15I\310\15I\310\15I\310\15I" - "\310\15I\310\15I\310\15I\310\15I\310\15I\310\15I\310\15I\310\15I\310\15I" - "\310\5ii\15I\310\15I\310\15I\310\15I\310\15I\310\15I\310\15I\310\0\0\0\0" - "\0\0\0\0\0\0\0\0\0\0\0\0\0\0\5ii\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0" - "\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0" - "\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0" - "\0\0\0\0\0\0\0""77\5\15I\310\15I\310\15I\310\15I\310\15I\310\15I\310\15I" - "\310\15I\310\15I\310\15I\310\15I\310\15I\310\15I\310\15I\310\15I\310\15I" - "\310\15I\310\15I\310\15I\310\15I\310\15I\310\15I\310\15I\310\15I\310\15I" - "\310\15I\310\15I\310\15I\310\15I\310\15I\310\15I\310\15I\310\5ii\15I\310" - "\15I\310\15I\310\15I\310\15I\310\15I\310\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\5" - "ii\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0" - "\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0" - "\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0""77\5\15I" - "\310\15I\310\15I\310\15I\310\15I\310\15I\310\15I\310\15I\310\15I\310\15I" - "\310\15I\310\15I\310\15I\310\15I\310\15I\310\15I\310\15I\310\15I\310\15I" - "\310\15I\310\15I\310\15I\310\15I\310\15I\310\15I\310\15I\310\15I\310\15I" - "\310\15I\310\15I\310\15I\310\15I\310\15I\310\5ii\15I\310\15I\310\15I\310" - "\15I\310\15I\310\0\0\0\0\0\0\0\0\0\0\0\0\5ii\0\0\0\0\0\0\0\0\0\0\0\0\0\0" - "\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0" - "\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0" - "\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0""77\5\15I\310\15I\310\15I\310\15I" - "\310\15I\310\15I\310\15I\310\15I\310\15I\310\15I\310\15I\310\15I\310\15I" - "\310\15I\310\15I\310\15I\310\15I\310\15I\310\15I\310\15I\310\15I\310\15I" - "\310\15I\310\15I\310\15I\310\15I\310\15I\310\15I\310\15I\310\15I\310\15I" - "\310\15I\310\15I\310\15I\310\5ii\15I\310\15I\310\15I\310\15I\310\0\0\0\0" - "\0\0\0\0\0\5ii\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0" - "\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0" - "\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0" - "\0\0\0\0\0\0\0""77\5\15I\310\15I\310\15I\310\15I\310\15I\310\15I\310\15I" - "\310\15I\310\15I\310\15I\310\15I\310\15I\310\15I\310\15I\310\15I\310\15I" - "\310\15I\310\15I\310\15I\310\15I\310\15I\310\15I\310\15I\310\15I\310\15I" - "\310\15I\310\15I\310\15I\310\15I\310\15I\310\15I\310\15I\310\15I\310\15I" - "\310\15I\310\5ii\15I\310\15I\310\15I\310\0\0\0\0\0\0\5ii\0\0\0\0\0\0\0\0" - "\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0" - "\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0" - "\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0""77\5\15I" - "\310\15I\310\15I\310\15I\310\15I\310\15I\310\15I\310\15I\310\15I\310\15I" - "\310\15I\310\15I\310\15I\310\15I\310\15I\310\15I\310\15I\310\15I\310\15I" - "\310\15I\310\15I\310\15I\310\15I\310\15I\310\15I\310\15I\310\15I\310\15I" - "\310\15I\310\15I\310\15I\310\15I\310\15I\310\15I\310\15I\310\15I\310\5ii" - "\15I\310\15I\310\0\0\0\5ii\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0" - "\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0" - "\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0" - "\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0""77\5\15I\310\15I\310\15I\310\15I" - "\310\15I\310\15I\310\15I\310\15I\310\15I\310\15I\310\15I\310\15I\310\15I" - "\310\15I\310\15I\310\15I\310\15I\310\15I\310\15I\310\15I\310\15I\310\15I" - "\310\15I\310\15I\310\15I\310\15I\310\15I\310\15I\310\15I\310\15I\310\15I" - "\310\15I\310\15I\310\15I\310\15I\310\15I\310\15I\310\5ii\15I\310\5ii\0\0" - "\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0" - "\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0" - "\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0" - "\0\0\0\0\0\0\0""77\5\15I\310\15I\310\15I\310\15I\310\15I\310\15I\310\15I" - "\310\15I\310\15I\310\15I\310\15I\310\15I\310\15I\310\15I\310\15I\310\15I" - "\310\15I\310\15I\310\15I\310\15I\310\15I\310\15I\310\15I\310\15I\310\15I" - "\310\15I\310\15I\310\15I\310\15I\310\15I\310\15I\310\15I\310\15I\310\15I" - "\310\15I\310\15I\310\15I\310\15I\310\5ii", -}; - diff --git a/test/automated/common/img_primitivesblend.c b/test/automated/common/img_primitivesblend.c deleted file mode 100644 index 16132ce9b..000000000 --- a/test/automated/common/img_primitivesblend.c +++ /dev/null @@ -1,645 +0,0 @@ -/* GIMP RGB C-Source image dump (alpha.c) */ - -static const SurfaceImage_t img_blend = { - 80, 60, 3, - "\260e\15\222\356/\37\313\15\36\330\17K\3745D\3471\0\20\0D\3502D\3502<\321" - ",\377\377\377\377\377\377\377\377\377\377\377\377\377\377\377\0-\0\377\377" - "\377\377\377\377\311\324\311\377\377\377\377\377\377\377\377\377\377\377" - "\377\377\377\377\0H\0\377\377\377\377\377\377\256\307\256\377\377\377\377" - "\377\377\377\377\377\377\377\377\377\377\377\0c\0\377\377\377\377\377\377" - "\223\300\223\377\377\377\377\377\377\377\377\377\377\377\377\377\377\377" - "\0~\0\377\377\377\377\377\377x\277x\377\377\377\377\377\377\377\377\377\377" - "\377\377\377\377\377\0\231\0\377\377\377\377\377\377]\303]\377\377\377\377" - "\377\377\377\377\377\377\377\377\377\377\377\0\264\0\377\377\377\377\377" - "\377B\316B\377\377\377\377\377\377\377\377\377\377\377\377\377\377\377\0" - "\317\0\377\377\377\377\377\377'\335'\377\377\377\377\377\377\377\377\377" - "\377\377\377\377\377\377\0\352\0\377\377\377#\262\6\260d\15\260e\15\224\357" - "/&\262\6\34\300\5.\314\22\40\315\12[\3747M\332/\27\331\12\27\331\12K\374" - "5K\3745K\3745D\3471D\3471D\3471D\3471D\3471D\3502D\3502D\3502D\3502D\350" - "2D\3502D\3502D\3502D\3502D\3502\377\377\377\377\377\377\377\377\377\377\377" - "\377\377\377\377\377\377\377\377\377\377\377\377\377\377\377\377\377\377" - "\377\377\377\377\377\377\377\377\377\377\377\377\377\377\377\377\377\377" - "\377\377\377\377\377\377\377\377\377\377\377\377\377\377\377\377\377\377" - "\377\377\377\377\377\377\377\377\377\377\377\377\377\377\377\377\377\377" - "\377\377\377\377\377\377\377\377\377\377\377\377\377\377\377\377\377\377" - "\377\377\377\377\377\377\377\377\377\377\377\377\377\377\377\377\377\377" - "\377\377\377\377\377\377\377\377\377\377\377\377\377\377\377\377\377\377" - "\377\377\377\377\377\377\377\377\377\377\377\377\377,\372\27\273\3465\327" - "Q.\260d\15\213\213\40\241\3601\200\366*=\265\13?\301\25s\375\265\14\177\252+\201\210\16\245\204" - "*\377\314U\312\\,\224'\11\260i\17\244\210\40\232\2211\331\353J\215\2351\377" - "\377\276\200\2521\200\2542\375\377\310u\2661t\2702t\2702\367\377\324\325" - "\355\305h\3021h\3042h\3042\377\377\377\377\377\377\364\377\336\335\364\323" - "\335\364\323\335\364\323\\\3202\\\3202\\\3202\\\3202\\\3202\377\377\377\377" - "\377\377\377\377\377\377\377\377\377\377\377\346\371\342\346\371\342\346" - "\371\342\346\371\342\346\371\342\346\371\342\346\371\342\377\377\377\377" - "\377\377P\3342P\3342P\3342P\3342P\3342P\3342P\3342P\3342\377\377\377\377" - "\377\377\377\377\377\377\377\377\377\377\377\377\377\377\377\377\377\377" - "\377\377\377\377\377\377\377\377\377\377\377\377\377\377\377\377\377\377" - "\377\377\377\377\377\377\377\377\377\377\377\377\377\377\377\377\377\377" - "\377\377\377\377\377\27\331\12Y\316-h\3021\243\370Cg\230\15\230\224\"\245" - "\204*\377\314U\310J\21\327Q.\260b\21\245\2041\370\343N\230\2242\331\353J" - "\214\2402\377\377\276\200\2521\200\2542\375\377\310\317\344\266u\2661t\270" - "2\377\377\377\367\377\324\325\355\305h\3021h\3042h\3042h\3042\377\377\377" - "\377\377\377\364\377\336\335\364\323\335\364\323\335\364\323\335\364\323" - "\\\3202\\\3202\\\3202\\\3202\377\377\377\377\377\377\377\377\377\377\377" - "\377\377\377\377\377\377\377\377\377\377\377\377\377\346\371\342\346\371" - "\342\346\371\342\346\371\342\346\371\342\346\371\342\377\377\377\377\377" - "\377\377\377\377\377\377\377P\3342P\3342P\3342P\3342P\3342P\3342P\3342P\334" - "2\377\377\377\377\377\377\377\377\377\377\377\377\377\377\377\377\377\377" - "\377\377\377\377\377\377\377\377\377\377\377\377\377\377\377\377\377\377" - "\377\377\377K\3745!\315\13d\304,p\270)\177\252+\23\13\6\232\2211\245\204" - "1\347\270O\377\277Y\324<\22\265V\24\377\330Q\244\210\40#(\13\230\224\"\331" - "\353Ju\211.\377\377\276\200\2521\210\273:\200\2542\375\377\310\20""3\6u\266" - "1t\2702\271\307\271\367\377\324\325\355\305\341\377\321h\3021h\3042\16L\7" - "h\3042\377\377\377\242\300\242\377\377\377\335\364\323\355\377\343\335\364" - "\323\335\364\323\14f\7\\\3202\\\3202>\250*\\\3202\377\377\377\377\377\377" - "\377\377\377\377\377\377$\231$\377\377\377\377\377\377s\303s\377\377\377" - "\346\371\342\376\377\372\346\371\342\346\371\342\40\257\37\346\371\342\346" - "\371\342\\\316\\\377\377\377\377\377\377\377\377\377\377\377\377P\3342\13" - "\262\7P\3342P\3342*\327%P\3342P\3342o\377Q\377\377\377\377\377\377$\352$" - "\377\377\377\377\377\377K\3745]\3749s\375<\212\373@\243\370C\274\363G\331" - "\353J\370\343N\377\330Q\377\314U\377\277Y\377\260\\\224(\11\260|\36\245\204" - "1\377\377\250\232\2211\230\224\"\215\2351\214\2402\377\377\276\312\332\250" - "\200\2521\200\2542\377\377\377\317\344\266u\2661t\2702t\2702\377\377\377" - "\377\377\377\325\355\305\325\355\305\325\355\305h\3042h\3042h\3042\377\377" - "\377\377\377\377\377\377\377\377\377\377\335\364\323\335\364\323\335\364" - "\323\335\364\323\335\364\323\\\3202\\\3202\\\3202\\\3202\\\3202\377\377\377" - "\377\377\377\377\377\377\377\377\377\377\377\377\377\377\377\377\377\377" - "\377\377\377\377\377\377\377\377\377\377\377\377\346\371\342\346\371\342" - "\346\371\342\346\371\342\346\371\342\346\371\342\346\371\342\377\377\377" - "\377\377\377\377\377\377\377\377\377\377\377\377\377\377\377P\3342P\3342" - "P\3342P\3342\377\377\377K\3745O\3321\\\3161h\3021t\2702~\254'\214\240%\377" - "\377\262\370\343N\377\330Q\262x1\277l1\312`1\327R.\260X\23\377\330Q\244\210" - "2\377\377\250\230\2242\377\377\262\215\2351\214\2402\377\377\377\312\332" - "\250\200\2521\200\2542\377\377\377\375\377\310\317\344\266u\2661t\2702t\270" - "2\377\377\377\377\377\377\325\355\305\325\355\305\325\355\305h\3042h\304" - "2h\3042h\3042\377\377\377\377\377\377\377\377\377\377\377\377\377\377\377" - "\335\364\323\335\364\323\335\364\323\335\364\323\377\377\377\\\3202\\\320" - "2\\\3202\\\3202\\\3202\377\377\377\377\377\377\377\377\377\377\377\377\377" - "\377\377\377\377\377\377\377\377\377\377\377\377\377\377\377\377\377\377" - "\377\377\377\377\377\377\377\377\346\371\342\346\371\342\346\371\342\346" - "\371\342\346\371\342\346\371\342\377\377\377\377\377\377\377\377\377\377" - "\377\377\377\377\377D\3471O\3321\21\7\11c\304+\367\377\324o\2520\200\252" - "1\214\2402\235\226'\377\377\250\377\330Q!\20\11\277l1\310d2\266?\33\224(" - "\11\260|\36\257\217;\377\377\250\232\2211\34$\11\377\377\262\215\2351q\206" - "0\377\377\377\312\332\250\217\303@\200\2542\200\25420Z0\317\344\266\317\344" - "\266X\2260t\2702t\2702\377\377\377\377\377\377\325\355\305(l%\325\355\305" - "\325\355\305K\2410h\3042h\3042\377\377\377\377\377\377\377\377\3770\2200" - "\377\377\377\377\377\377t\274p\335\364\323\335\364\323\373\377\361\377\377" - "\377\377\377\377\21\213\11\\\3202\\\3202<\274/\\\3202\377\377\377\377\377" - "\377\377\377\377\377\377\3770\3060\377\377\377\377\377\377V\330V\377\377" - "\377\377\377\377\377\377\377\377\377\377\377\377\3770\3410\346\371\342\346" - "\371\342>\352>\346\371\342\377\377\377D\3471P\3342\364\377\352s\375\3369\\\3202\377\377\377\377\377\377\377\377\377\377\377\377D\3502\371\377" - "\364O\3321\\\3202\364\377\336h\3042\367\377\324u\2661\200\2542\377\377\276" - "\215\2351\230\2242\307\300\213\244\2102\377\377\234\262x1\274p2\377\337\207" - "\312`1\324E\30\327T1\260|2\377\377\234\245\2041\244\2102\377\377\250\232" - "\2211\230\2242\377\377\377\310\316\231\215\2351\214\2402\377\377\377\377" - "\377\377\312\332\250\312\332\250\200\2542\200\2542\377\377\377\377\377\377" - "\317\344\266\317\344\266\317\344\266t\2702t\2702t\2702\377\377\377\377\377" - "\377\377\377\377\377\377\377\377\377\377\325\355\305\325\355\305\325\355" - "\305\377\377\377h\3042h\3042h\3042h\3042\377\377\377\377\377\377\377\377" - "\377\377\377\377\377\377\377\377\377\377\377\377\377\377\377\377\377\377" - "\377\335\364\323\335\364\323\335\364\323\335\364\323\377\377\377\377\377" - "\377\377\377\377\377\377\377\\\3202\\\3202\\\3202\377\377\377D\3502\371\377" - "\364O\3321\377\377\377\\\3161h\3042\367\377\324t\2702\375\377\310\200\252" - "1\377\377\377\215\2351\230\2242\377\377\250\244\2102\377\377\234\262x1\274" - "p2\316\214_\310d2\377\310|\327T1\227/\14\377\377\377\307\260|\244\2102\377" - "\377\377\307\300\213\230\2242\230\2242\377\377\377\310\316\231\214\2402\214" - "\2402\377\377\377\377\377\377\312\332\250\312\332\250\200\2542\200\2542\377" - "\377\377\377\377\377\377\377\377\317\344\266\317\344\266\317\344\266t\270" - "2t\2702t\2702\377\377\377\377\377\377\377\377\377\377\377\377\377\377\377" - "\325\355\305\325\355\305\325\355\305\377\377\377\377\377\377h\3042h\3042" - "h\3042\377\377\377\377\377\377\377\377\377\377\377\377\377\377\377\377\377" - "\377\377\377\377\377\377\377\377\377\377\377\377\377\335\364\323\335\364" - "\323\335\364\323\335\364\323\377\377\377\377\377\377\377\377\377\377\377" - "\377D\3502\371\377\364R\3344\364\377\352\\\3161H\22Hh\3021\377\377\377o\244" - "2\200\2542\312\332\250\226\245<\377\377\262\230\2242H-/\245\2041\377\377" - "\377\233i5\274p2\277l1\331sC\377\310|\324X2*\15\3\260|2\377\377\234\206s" - "7\244\2102\377\377\250\340\337\244\230\2242\377\377\377Hc2\310\316\231\214" - "\2402n\211:\377\377\377\377\377\377\353\377\311\312\332\250\200\2542$T\16" - "\377\377\377\377\377\377\236\277\236\377\377\377\317\344\266\367\377\336" - "\377\377\377t\2702\40n\16t\2702\377\377\377\212\303\212\377\377\377\377\377" - "\377\377\377\377\325\355\305\325\355\305<\2477\377\377\377\377\377\377O\276" - "Ah\3042h\3042\237\377i\377\377\377\377\377\377H\317H\377\377\377\377\377" - "\377c\335c\377\377\377\377\377\377\377\377\377\377\377\377\335\364\323>\337" - ";\335\364\323\377\377\377D\3502\362\375\360P\3342\346\371\342\\\3202\364" - "\377\336h\3042\367\377\324t\2702\375\377\310\200\2542\377\377\276\214\240" - "2\377\377\262\232\2211\377\377\377\245\2041\377\377\377\262x1\377\377\377" - "\277l1\310d2\312`1\324X2\327T1\260|2\377\377\377\307\260|\244\2102\377\377" - "\377\307\300\213\232\2211\230\2242\377\377\377\377\377\262\310\316\231\214" - "\2402\214\2402\377\377\377\377\377\377\312\332\250\312\332\250\200\2542\200" - "\2542\200\2542\377\377\377\377\377\377\377\377\377\317\344\266\317\344\266" - "\317\344\266\377\377\377t\2702t\2702t\2702\377\377\377\377\377\377\377\377" - "\377\377\377\377\377\377\377\325\355\305\325\355\305\325\355\305\325\355" - "\305\377\377\377\377\377\377h\3042h\3042h\3042h\3042\377\377\377\377\377" - "\377\377\377\377\377\377\377\377\377\377\377\377\377\377\377\377\377\377" - "\377\377\377\377\377\377\377D\3502\362\375\360P\3342\346\371\342\\\3202\335" - "\364\323h\3042\325\355\305t\2702\317\344\266\377\377\377\200\2521\377\377" - "\377\215\2351\377\377\377\232\2211\377\377\377\245\2041\377\377\377\262x" - "1\377\377\377\277l1\377\377\377\312`1\377\310|\327T1\227/\14\377\377\377" - "\307\260|\244\2102\244\2102\377\377\377\307\300\213\230\2242\230\2242\377" - "\377\377\310\316\231\310\316\231\214\2402\214\2402\377\377\377\377\377\377" - "\312\332\250\312\332\250\377\377\377\200\2542\200\2542\377\377\377\377\377" - "\377\377\377\377\377\377\377\317\344\266\317\344\266\377\377\377\377\377" - "\377t\2702t\2702\377\377\377\377\377\377\377\377\377\377\377\377\377\377" - "\377\377\377\377\377\377\377\325\355\305\325\355\305\325\355\305\377\377" - "\377\377\377\377\377\377\377h\3042h\3042h\3042\377\377\377\377\377\377\377" - "\377\377\377\377\377\377\377\377\377\377\377\377\377\377D\3502\362\375\360" - "T\11TO\3321\377\377\377Z\3002\377\377\377h\3042\377\377\334t\2702\375\377" - "\310*\30\20\312\332\250\214\2402\262\260\214\230\2242\307\300\213\377\377" - "\377\245\2041\377\377\377:\35\20\377\377\377\277l1\316\264w\310d2\377\310" - "|\356qL\227/\14\260|2TZ3\307\260|\244\2102\274\302\274\307\300\213\307\300" - "\213\273\301U\377\377\377\377\377\377A^2\310\316\231\214\2402o\216B\377\377" - "\377\377\377\377\366\377\324\312\332\250\312\332\250*a\20\200\2542\377\377" - "\377\230\301\230\377\377\377\377\377\377\377\377\353\317\344\266\317\344" - "\266T\253Tt\2702t\2702]\265I\377\377\377\377\377\377\377\377\377\377\377" - "\377\377\377\377T\306T\377\377\377\325\355\305l\324i\325\355\305\377\377" - "\377\377\377\377\377\377\377h\3042\"\254\20h\3042h\3042b\353b\377\377\377" - "\377\377\377D\3502\362\375\360\377\377\377O\3321\377\377\377\\\3202\364\377" - "\336h\3042\325\355\305t\2702\317\344\266\377\377\377\200\2521\377\377\377" - "\214\2402\377\377\262\230\2242\307\300\213\244\2102\307\260|\377\377\377" - "\262x1\377\377\377\274p2\377\337\207\310d2\377\310|\324X2\333bB\260|2\377" - "\377\377\307\260|\244\2102\244\2102\377\377\377\307\300\213\232\2211\230" - "\2242\377\377\377\377\377\377\310\316\231\310\316\231\214\2402\214\2402\377" - "\377\377\377\377\377\377\377\377\312\332\250\312\332\250\200\2542\200\254" - "2\200\2542\377\377\377\377\377\377\377\377\377\377\377\377\317\344\266\317" - "\344\266\317\344\266\377\377\377t\2702t\2702t\2702\377\377\377\377\377\377" - "\377\377\377\377\377\377\377\377\377\377\377\377\377\377\377\325\355\305" - "\325\355\305\325\355\305\325\355\305\377\377\377\377\377\377\377\377\377" - "h\3042h\3042\377\377\377\377\377\377D\3471\377\377\377P\3342\364\377\352" - "\\\3202\335\364\323\377\377\377h\3021\377\377\377t\2702\375\377\310\200\254" - "2\312\332\250\377\377\377\215\2351\377\377\377\230\2242\377\377\250\244\210" - "2\307\260|\377\377\377\262x1\377\377\377\274p2\377\337\207\310d2\323xQ\324" - "X2\327T1\227/\14\260|2\377\377\234\307\260|\244\2102\377\377\377\377\377" - "\377\307\300\213\230\2242\230\2242\377\377\377\377\377\377\310\316\231\310" - "\316\231\214\2402\214\2402\377\377\377\377\377\377\377\377\377\312\332\250" - "\312\332\250\377\377\377\200\2542\200\2542\377\377\377\377\377\377\377\377" - "\377\377\377\377\377\377\377\317\344\266\317\344\266\377\377\377\377\377" - "\377t\2702t\2702t\2702\377\377\377\377\377\377\377\377\377\377\377\377\377" - "\377\377\377\377\377\377\377\377\377\377\377\325\355\305\325\355\305\325" - "\355\305\377\377\377\377\377\377`\0`\377\377\377D\3471\371\366\371P\3342" - "\346\371\342\377\377\377\\\3161\377\377\377'\24\22\325\355\305t\2702\276" - "\310\251\377\377\377\200\2542\377\377\316\214\2402\310\316\231`6`\230\224" - "2\377\377\250\222u<\307\260|\377\377\377\315\214L\377\377\377\274p2M,#\310" - "d2\312`1\306\304\306\324X2\333bB\325\242W\377\377\377\307\260|=9\22\244\210" - "2\377\377\377\227\234w\307\300\213\230\2242\307\322a\377\377\377\377\377" - "\377Km9\310\316\231\214\2402r\226K\377\377\377\377\377\377\377\377\377\312" - "\332\250\312\332\250`\242`\200\2542\200\2542\224\306\224\377\377\377\377" - "\377\377\377\377\377\377\377\377\317\344\266M\250D\317\344\266\377\377\377" - "\203\322\203t\2702t\2702\301\377\177\377\377\377\377\377\377`\330`\377\377" - "\377\377\377\377r\344r\377\377\377\377\377\377\377\377\377\325\355\305\377" - "\377\377\377\377\377D\3502\371\377\364P\3342\346\371\342\377\377\377\\\320" - "2\364\377\336h\3042\325\355\305\377\377\377t\2702\317\344\266\200\2542\312" - "\332\250\377\377\377\214\2402\310\316\231\230\2242\307\300\213\377\377\377" - "\244\2102\307\260|\377\377\377\200U0\220^\377\7\4/\227U[\246]\377\255Q1\377" - "\242y\10\3/\306M@\6\4/{^\377mVvmVv\6\5/h\\\377h\\\377\\U\204\12\12\360\5" - "\5/VX\377VX\377\12\12\360LR\221\12\12\360\5\6/\214\2402\377\377\377\377\377" - "\377\377\377\377\312\332\250\312\332\250\377\377\377\200\2542\200\2542\200" - "\2542\377\377\377\377\377\377\377\377\377\377\377\377\377\377\377\317\344" - "\266\317\344\266\317\344\266\377\377\377\377\377\377t\2702t\2702\377\377" - "\377\377\377\377\377\377\377\377\377\377\377\377\377\377\377\377\377\377" - "\377\377\377\377\377\377\377\377\377\377D\3502\362\375\360P\3342\346\371" - "\342\377\377\377\\\3202\335\364\323\377\377\377h\3042\367\377\324t\2702\317" - "\344\266\377\377\377\200\2542\312\332\250\377\377\377\214\2402\377\377\262" - "\230\2242\307\300\213\377\377\377\244\2102\307\260|{^\377\200U0\220^\377" - "\7\4/\227U[\246]\377\7\3/\377\242y\236\37""2\306M0\210%\14T-2{^\377mVv\6" - "\5/\6\5/h\\\377\\U\204\\U\204\5\5/\5\5/VX\377VX\377LR\221LR\221\377\377\377" - "\214\2402\214\2402\377\377\377\377\377\377\377\377\377\312\332\250\312\332" - "\250\312\332\250\377\377\377\200\2542\200\2542\377\377\377\377\377\377\377" - "\377\377\377\377\377\377\377\377\377\377\377\317\344\266\317\344\266\377" - "\377\377\377\377\377t\2702t\2702t\2702\377\377\377\377\377\377\377\377\377" - "\377\377\377\377\377\377\377\377\377\377\377\377D\3502\365\375\363\377\377" - "\377O\3321l\22l\\\3202\335\364\323\357\346\357h\3042\325\355\305\377\377" - "\377t\2702\317\344\266l-l\200\2521\377\377\377\204\211=\310\316\231\377\377" - "\377\262\243L\307\300\213\377\377\377E&\25mVv{^\377ySB\220^\377\7\4/\275" - "t\201\246]\377\7\3/I\37!\277Z\377\10\3/\237YQ\6\4/{^\377\236\213\247mVv\6" - "\5/,-lh\\\377\\U\204dow\5\5/\5\5/\222\251\377VX\377\310\316\231T{@\377\377" - "\377\214\2402w\240V\377\377\377\377\377\377\377\377\377\377\377\377\312\332" - "\250U\231G\377\377\377\200\2542q\270\\\377\377\377\377\377\377\377\377\377" - "\377\377\377\377\377\377l\317l\317\344\266\317\344\266z\330v\377\377\377" - "\377\377\377\323\377\221t\2702t\2702l\352l\377\377\377\377\377\377\377\377" - "\377D\3502\362\375\360\377\377\377P\3342\346\371\342\377\377\377\\\3202\364" - "\377\336h\3042\325\355\305\377\377\377t\2702\317\344\266\377\377\377\200" - "\2542\312\332\250\377\377\377\214\2402\310\316\231\377\377\377\230\2242\307" - "\300\213\377\377\377\6\5/mVv{^\377\200U0\220^\377\7\4/\227U[\246]\377\7\3" - "/\255RN\277Z\377\10\3/\306M@\6\4/{^\377{^\377mVv\6\5/\6\5/h\\\377h\\\377" - "\\U\204\12\12\360\5\5/\12\12\360\377\377\377\377\377\377\310\316\231\310" - "\316\231\377\377\377\214\2402\214\2402\377\377\377\377\377\377\377\377\377" - "\377\377\377\312\332\250\312\332\250\377\377\377\200\2542\200\2542\200\254" - "2\377\377\377\377\377\377\377\377\377\377\377\377\377\377\377\377\377\377" - "\317\344\266\317\344\266\317\344\266\377\377\377\377\377\377t\2702t\2702" - "\377\377\377\377\377\377D\3502\362\375\360\377\377\377P\3342\346\371\342" - "\377\377\377\\\3202\335\364\323\377\377\377h\3042\325\355\305\377\377\377" - "t\2702\317\344\266\377\377\377\200\2542\312\332\250\377\377\377\214\2402" - "\310\316\231\377\377\377\230\2242\307\300\213h\\\377\6\5/mVv{^\377\200U0" - "\220^\377\7\4/\227U[\246]\377\7\3/\255RN\277Z\377\10\3/\306M@\6\4/\6\4/{" - "^\377mVvmVv\6\5/\12\12\360h\\\377\\U\204\\U\204\5\5/\230\2242\377\377\377" - "\377\377\377\377\377\377\310\316\231\310\316\231\377\377\377\214\2402\214" - "\2402\377\377\377\377\377\377\377\377\377\377\377\377\312\332\250\312\332" - "\250\377\377\377\377\377\377\200\2542\200\2542\377\377\377\377\377\377\377" - "\377\377\377\377\377\377\377\377\377\377\377\377\377\377\317\344\266\317" - "\344\266\377\377\377\377\377\377\377\377\377\377\377\377D\3502q\10p\377\377" - "\377P\3342\335\350\332\377\377\377\\\3202\351\366\337\377\377\377h\3042d" - "!\\\377\377\377t\2702\277\302\252\377\377\377\200\2542\343\345\301\377\377" - "\377\214\2402^2H\377\377\377\230\2242\257\235\204h\\\377\6\5/\223o\234{^" - "\377\6\4/<\36""1\377\252\215j)2\211XK\377\250\203\202$2\337~c\377\242y\236" - "\37""2]#\26\306M@\6\4/ym\274{^\377mVvELn\6\5/h\\\37703x\\U\204\307\300\213" - "\204\226\\\230\2242\377\377\377\377\377\377\377\377\377\310\316\231^\212" - "H\377\377\377\214\2402}\256b\377\377\377\377\377\377\377\377\377\377\377" - "\377\312\332\250_\251O\377\377\377\377\377\377y\310j\200\2542\377\377\377" - "\377\377\377\377\377\377\377\377\377x\341x\377\377\377\377\377\377\177\350" - "|\317\344\266\377\377\377\377\377\377D\3502\362\375\360\377\377\377P\334" - "2\346\371\342\377\377\377\\\3202\335\364\323\377\377\377\377\377\377h\304" - "2\325\355\305\377\377\377t\2702\317\344\266\377\377\377\200\2542\312\332" - "\250\377\377\377\214\2402\310\316\231\377\377\377\230\2242\\U\204h\\\377" - "\6\5/mVv{^\377\6\4/\12\12\360\201Vi\220^\377\7\4/\227U[\246]\377\7\3/\255" - "RN\277Z\377\10\3/\306M@\6\4/\12\12\360{^\377mVvmVv\6\5/\12\12\360h\\\377" - "\377\377\377\307\300\213\377\377\377\230\2242\230\2242\377\377\377\377\377" - "\377\377\377\377\310\316\231\310\316\231\377\377\377\214\2402\214\2402\377" - "\377\377\377\377\377\377\377\377\377\377\377\312\332\250\312\332\250\312" - "\332\250\377\377\377\200\2542\200\2542\200\2542\377\377\377\377\377\377\377" - "\377\377\377\377\377\377\377\377\377\377\377\377\377\377\377\377\377D\350" - "2\362\375\360\377\377\377P\3342\377\377\377\346\371\342\377\377\377\\\320" - "2\335\364\323\377\377\377h\3042\325\355\305\377\377\377t\2702\317\344\266" - "\377\377\377\200\2542\377\377\377\312\332\250\377\377\377\214\2402\310\316" - "\231\377\377\377\5\5/\\U\204h\\\377\6\5/mVv{^\377\6\4/\12\12\360\201Vi\220" - "^\377\7\4/\227U[\246]\377\7\3/\255RN\277Z\377\10\3/\306M@\6\4/\6\4/{^\377" - "\12\12\360mVv\6\5/\6\5/\377\377\377\377\377\377\307\300\213\307\300\213\377" - "\377\377\230\2242\377\377\377\377\377\377\377\377\377\377\377\377\310\316" - "\231\310\316\231\377\377\377\214\2402\214\2402\377\377\377\377\377\377\377" - "\377\377\377\377\377\377\377\377\312\332\250\312\332\250\377\377\377\377" - "\377\377\200\2542\200\2542\377\377\377\377\377\377\377\377\377\377\377\377" - "\204\0\204\377\377\377D\3502\355\364\353\377\377\377\377\377\377Y\335;\346" - "\371\342\377\377\377/\26\31\335\364\323\377\377\377k\255<\325\355\305\377" - "\377\377\377\377\377t\2702\317\344\266\2046\204\200\2542\312\332\250\340" - "\317\340\214\2402\310\316\231\377\377\377VX\377\5\5//\33Dh\\\377\6\5/tVz" - "{^\377\6\4/=0\377\201Vi\220^\377\3\1\30\227U[\246]\377?6U\255RN\277Z\377" - "\337]s\306M0\306M@\3\2\30{^\377{^\377yv}mVv\244\2102\377\377\377\377\377" - "\377\377\377\377gyG\307\300\213\230\2242\212\242h\377\377\377\377\377\377" - "\377\377\377\377\377\377\310\316\231g\230O\377\377\377\214\2402\205\274q" - "\377\377\377\377\377\377\377\377\377\377\377\377\377\377\377h\270V\312\332" - "\250\377\377\377\222\344\222\200\2542\200\2542\377\377\377\377\377\377\377" - "\377\377\377\377\377D\3502\362\375\360\377\377\377\377\377\377P\3342\346" - "\371\342\377\377\377\\\3202\335\364\323\377\377\377\377\377\377h\3042\325" - "\355\305\377\377\377t\2702\317\344\266\377\377\377\377\377\377\200\2542\312" - "\332\250\377\377\377\214\2402\310\316\231VX\377\12\12\360\5\5/\\U\204h\\" - "\377\6\5/mVv{^\377\6\4/\12\12\360\201Vi\220^\377\7\4/\227U[\246]\377\7\3" - "/\255RN\255RN\277Z\377\10\3/\306M@\6\4/\12\12\360{^\377\12\12\360\307\260" - "|\244\2102\244\2102\377\377\377\377\377\377\377\377\377\307\300\213\377\377" - "\377\230\2242\230\2242\377\377\377\377\377\377\377\377\377\377\377\377\310" - "\316\231\377\377\377\377\377\377\214\2402\214\2402\377\377\377\377\377\377" - "\377\377\377\377\377\377\377\377\377\312\332\250\312\332\250\377\377\377" - "\377\377\377\200\2542\200\2542\377\377\377\377\377\377D\3502\377\377\377" - "\362\375\360\377\377\377P\3342\346\371\342\377\377\377\\\3202\377\377\377" - "\335\364\323\377\377\377h\3042\325\355\305\377\377\377\377\377\377t\2702" - "\317\344\266\377\377\377\200\2542\312\332\250\377\377\377\377\377\377\214" - "\2402LR\221VX\377\5\5/\\U\204\12\12\360h\\\377\6\5/mVv{^\377\6\4/\12\12\360" - "\201Vi\220^\377\7\4/\227U[\246]\377\7\3/\7\3/\255RN\277Z\377\10\3/\306M@" - "\6\4/\6\4/{^\377\377\377\377\307\260|\377\377\377\244\2102\377\377\377\377" - "\377\377\377\377\377\307\300\213\307\300\213\377\377\377\230\2242\377\377" - "\377\377\377\377\377\377\377\377\377\377\310\316\231\310\316\231\377\377" - "\377\377\377\377\214\2402\214\2402\377\377\377\377\377\377\377\377\377\377" - "\377\377\377\377\377\312\332\250\312\332\250\377\377\377\377\377\377\377" - "\377\377\377\377\377D\3502\377\377\377\362\375\360\377\377\377-\17\34\346" - "\371\342\377\377\377\363\346\363\\\3202\335\364\323\377\377\377h\3042\377" - "\377\377x)o\377\377\377t\2702\301\276\255\377\377\377\377\377\377\243\273" - "U\312\332\250\377\377\377O-\34\12\12\360LR\221gU\333\5\5/\\U\204<)\377h\\" - "\377\6\5/=!B{^\377\6\4/A2\306\201Vi\220^\377I9q\227U[\246]\377]-\220\7\3" - "/\255RN\245q\304\10\3/\306M0\377\236\221\6\4/\377\377\377\220\231\220\307" - "\260|\307\260|\226\227m\244\2102\377\377\377\377\377\377\377\377\377\307" - "\300\213p\207N\230\2242\230\2242\254\316\254\377\377\377\377\377\377\377" - "\377\377\310\316\231\310\316\231\220\317\220\377\377\377\214\2402\216\316" - "\200\377\377\377\377\377\377\377\377\377\377\377\377\377\377\377r\310^\312" - "\332\250\377\377\377\377\377\377\377\377\377D\3502\362\375\360\377\377\377" - "P\3342\377\377\377\346\371\342\377\377\377\\\3202\335\364\323\377\377\377" - "\377\377\377h\3042\325\355\305\377\377\377\377\377\377t\2702\317\344\266" - "\377\377\377\200\2542\377\377\377\312\332\250\377\377\377\5\6/LR\221\12\12" - "\360VX\377\5\5/\\U\204h\\\377\12\12\360\6\5/mVv{^\377\6\4/\12\12\360\201" - "Vi\220^\377\7\4/\227U[\12\12\360\246]\377\7\3/\255RN\277Z\377\277Z\377\10" - "\3/\306M@\260|2\260|2\377\377\377\377\377\377\307\260|\377\377\377\244\210" - "2\377\377\377\377\377\377\377\377\377\377\377\377\307\300\213\377\377\377" - "\230\2242\230\2242\377\377\377\377\377\377\377\377\377\377\377\377\310\316" - "\231\310\316\231\377\377\377\377\377\377\214\2402\214\2402\377\377\377\377" - "\377\377\377\377\377\377\377\377\377\377\377\377\377\377\377\377\377\377" - "\377\377D\3502\362\375\360\377\377\377P\3342\377\377\377\346\371\342\377" - "\377\377\\\3202\377\377\377\335\364\323\377\377\377h\3042\325\355\305\377" - "\377\377\377\377\377t\2702\317\344\266\377\377\377\377\377\377\200\2542\312" - "\332\250\377\377\377\12\12\360\5\6/LR\221VX\377\12\12\360\5\5/\\U\204h\\" - "\377\6\5/\12\12\360mVv{^\377\6\4/\12\12\360\201Vi\220^\377\7\4/\227U[\227" - "U[\246]\377\7\3/\255RN\12\12\360\277Z\377\10\3/\333bB\377\377\377\260|2\377" - "\377\377\377\377\377\307\260|\307\260|\244\2102\244\2102\377\377\377\377" - "\377\377\377\377\377\307\300\213\307\300\213\377\377\377\230\2242\230\224" - "2\377\377\377\377\377\377\377\377\377\377\377\377\310\316\231\310\316\231" - "\377\377\377\377\377\377\214\2402\214\2402\377\377\377\377\377\377\377\377" - "\377\377\377\377\377\377\377\377\377\377)\10\36\362\375\360\377\377\377\370" - "\356\370P\3342\346\371\342\377\377\377\377\377\377\\\3202\207\"\201\377\377" - "\377\377\377\377p\250D\325\355\305\377\377\377\377\377\377t\2702\317\344" - "\266\234?\234\200\2542\377\377\377\274\260\244FS\377\5\6/;#\377LR\221VX\377" - "\3\1\34\12\12\360\\U\204{^\330\6\5/\12\12\360\257\203\270{^\377\6\4/\6\4" - "\222\201Vi\220^\377P@d\12\12\360\227U[\370\244\377\7\3/\255RNi./\277Z\377" - "\324X2\264\202w\333bB\260|2\377\377\377\377\377\377\377\377\377yvK\377\377" - "\377\244\2102\236\247|\377\377\377\377\377\377\377\377\377\307\300\213\307" - "\300\213\234\306\234\230\2242\377\377\377\256\330\256\377\377\377\377\377" - "\377\377\377\377\310\316\231\310\316\231\234\341\234\377\377\377\214\240" - "2\232\343\223\377\377\377\377\377\377\377\377\377\377\377\377D\3502\362\375" - "\360\377\377\377\377\377\377P\3342\346\371\342\377\377\377\377\377\377\\" - "\3202\335\364\323\377\377\377\377\377\377h\3042\325\355\305\377\377\377\377" - "\377\377t\2702\317\344\266\377\377\377\377\377\377\200\2542\312\332\250\12" - "\12\360FS\377\5\6/LR\221\12\12\360RW\255\3\5\35\6\11\224ZT\\d[\261\3\4\35" - "\6\11\224lVTw]\264\4\4\35\6\11\224\200VN\214]\270\4\3\35\6\11\224\226UG\242" - "\\\274\4\3\35\4\3\35\254R@\377\377\311\203U\36\203U\36\323a:my\36my\36\377" - "\377\276\377\377\276\243\255X\243\255X\236\371\236e\204\36\236\371\236\374" - "\377\273\236\371\236\236\371\236\234\275`\236\371\236^\220\36^\220\36\236" - "\371\236\352\377\267\352\377\267\236\371\236\236\371\236\310\316\231\310" - "\316\231\377\377\377\377\377\377\214\2402\377\377\377\377\377\377\377\377" - "\377D\3502\362\375\360\377\377\377\377\377\377P\3342\346\371\342\377\377" - "\377\377\377\377\\\3202\377\377\377\335\364\323\377\377\377h\3042\377\377" - "\377\325\355\305\377\377\377t\2702\377\377\377\317\344\266\377\377\377\377" - "\377\377\200\2542\346\3\4\35lVT\4\4hw]\264\4\4\35aK\244\200VN\214]\270kZ\371\4\3\35" - "\270\212Io\225o\377\377\306{a\36\253\300\253\304wB\377\377\311\377\377\377" - "\203U\36\323a:\224D(my\36\236\371\236\307\316\266\377\377\276\236\371\236" - "\377\377\343\236\371\236e\204\36Gk\25\236\371\236\374\377\273\260\334\260" - "\236\371\236\234\275`\377\377\377\377\377\377\230\2242k\207#\377\377\377" - "\377\377\377\377\377\377\377\377\377D\3502\377\377\377\362\375\360\377\377" - "\377\377\377\377P\3342\346\371\342\377\377\377\377\377\377\\\3202\377\377" - "\377\335\364\323\377\377\377\377\377\377h\3042\377\377\377\325\355\305\377" - "\377\377\377\377\377t\2702\317\344\266\377\377\3778L\377\12\12\360\5\6/<" - "L\237\12\12\360BR\252\3\5\35\6\11\224JQbRW\255\6\11\224\3\5\35ZT\\\6\11\224" - "d[\261\6\11\224\3\4\35lVT\6\11\224w]\264\4\4\35\6\11\224\200VN\214]\270\6" - "\11\224tm\36\270\212I\270\212I\377\377\306{a\36{a\36\304wB\236\371\236\377" - "\377\311\203U\36\236\371\236\323a:my\36my\36\236\371\236\377\377\276\236" - "\371\236\243\255X\243\255X\236\371\236e\204\36\236\371\236\374\377\273\374" - "\377\273\236\371\236\307\300\213\307\300\213\377\377\377\377\377\377\230" - "\2242\377\377\377\377\377\377\377\377\377D\3502\377\377\377\362\375\360\377" - "\377\377\377\377\377P\3342\377\377\377\346\371\342\377\377\377\377\377\377" - "\\\3202\335\364\323\377\377\377\377\377\377\377\377\377h\3042\325\355\305" - "\377\377\377\377\377\377t\2702\377\377\377\317\344\2668L\377\12\12\360\5" - "\6/\12\12\360> 4) == 0x1) { - real_byteorder = SDL_BIG_ENDIAN; - } else { - real_byteorder = SDL_LIL_ENDIAN; - } - if (SDL_ATvassert( real_byteorder == SDL_BYTEORDER, - "Machine detected as %s endian but appears to be %s endian.", - (SDL_BYTEORDER == SDL_LIL_ENDIAN) ? "little" : "big", - (real_byteorder == SDL_LIL_ENDIAN) ? "little" : "big" )) - return; - - /* Test 16 swap. */ - if (SDL_ATvassert( SDL_Swap16(value16) == swapped16, - "16 bit swapped incorrectly: 0x%X => 0x%X", - value16, SDL_Swap16(value16) )) - return; - - /* Test 32 swap. */ - if (SDL_ATvassert( SDL_Swap32(value32) == swapped32, - "32 bit swapped incorrectly: 0x%X => 0x%X", - value32, SDL_Swap32(value32) )) - return; - - /* Test 64 swap. */ - if (SDL_ATvassert( SDL_Swap64(value64) == swapped64, -#ifdef _MSC_VER - "64 bit swapped incorrectly: 0x%I64X => 0x%I64X", -#else - "64 bit swapped incorrectly: 0x%llX => 0x%llX", -#endif - value64, SDL_Swap64(value64) )) - return; - - SDL_ATend(); -} - - -/** - * @brief Platform test entrypoint. - */ -#ifdef TEST_STANDALONE -int main( int argc, const char *argv[] ) -{ - (void) argc; - (void) argv; -#else /* TEST_STANDALONE */ -int test_platform (void) -{ -#endif /* TEST_STANDALONE */ - - SDL_ATinit( "Platform" ); - - /* Debug information. */ - SDL_ATprintVerbose( 1, "%s System detected\n", SDL_GetPlatform() ); - SDL_ATprintVerbose( 1, "System is %s endian\n", -#ifdef SDL_LIL_ENDIAN - "little" -#else - "big" -#endif - ); - SDL_ATprintVerbose( 1, "CPU count: %d\n", SDL_GetCPUCount()); - SDL_ATprintVerbose( 1, "Available extensions:\n" ); - SDL_ATprintVerbose( 1, " RDTSC %s\n", SDL_HasRDTSC()? "detected" : "not detected" ); - SDL_ATprintVerbose( 1, " AltiVec %s\n", SDL_HasAltiVec()? "detected" : "not detected" ); - SDL_ATprintVerbose( 1, " MMX %s\n", SDL_HasMMX()? "detected" : "not detected" ); - SDL_ATprintVerbose( 1, " 3DNow! %s\n", SDL_Has3DNow()? "detected" : "not detected" ); - SDL_ATprintVerbose( 1, " SSE %s\n", SDL_HasSSE()? "detected" : "not detected" ); - SDL_ATprintVerbose( 1, " SSE2 %s\n", SDL_HasSSE2()? "detected" : "not detected" ); - SDL_ATprintVerbose( 1, " SSE3 %s\n", SDL_HasSSE3()? "detected" : "not detected" ); - SDL_ATprintVerbose( 1, " SSE4.1 %s\n", SDL_HasSSE41()? "detected" : "not detected" ); - SDL_ATprintVerbose( 1, " SSE4.2 %s\n", SDL_HasSSE42()? "detected" : "not detected" ); - - plat_testTypes(); - plat_testEndian(); - - return SDL_ATfinish(); -} diff --git a/test/automated/platform/platform.h b/test/automated/platform/platform.h deleted file mode 100644 index d8310e0c0..000000000 --- a/test/automated/platform/platform.h +++ /dev/null @@ -1,18 +0,0 @@ -/** - * Part of SDL test suite. - * - * Written by Edgar Simo "bobbens" - * - * Released under Public Domain. - */ - - -#ifndef _TEST_PLATFORM -# define _TEST_PLATFORM - - -int test_platform (void); - - -#endif /* _TEST_PLATFORM */ - diff --git a/test/automated/rect/rect.c b/test/automated/rect/rect.c deleted file mode 100644 index 3ae2fc534..000000000 --- a/test/automated/rect/rect.c +++ /dev/null @@ -1,156 +0,0 @@ -/** - * Automated SDL rect test. - * - * Written by Edgar Simo "bobbens" - * - * Released under Public Domain. - */ - - - - -#include "SDL_rect.h" -#include "../SDL_at.h" - - -/* - * Prototypes. - */ -static void rect_testIntersectRectAndLine (void); - - -/** - * @brief Tests SDL_IntersectRectAndLine() - */ -static void rect_testIntersectRectAndLine (void) -{ - SDL_Rect rect = { 0, 0, 32, 32 }; - int x1, y1; - int x2, y2; - SDL_bool clipped; - - SDL_ATbegin( "IntersectRectAndLine" ); - - x1 = -10; - y1 = 0; - x2 = -10; - y2 = 31; - clipped = SDL_IntersectRectAndLine(&rect, &x1, &y1, &x2, &y2); - SDL_ATvassert( !clipped && - x1 == -10 && y1 == 0 && x2 == -10 && y2 == 31, - "line outside to the left was incorrectly clipped: %d,%d - %d,%d", - x1, y1, x2, y2); - - x1 = 40; - y1 = 0; - x2 = 40; - y2 = 31; - clipped = SDL_IntersectRectAndLine(&rect, &x1, &y1, &x2, &y2); - SDL_ATvassert( !clipped && - x1 == 40 && y1 == 0 && x2 == 40 && y2 == 31, - "line outside to the right was incorrectly clipped: %d,%d - %d,%d", - x1, y1, x2, y2); - - x1 = 0; - y1 = -10; - x2 = 31; - y2 = -10; - clipped = SDL_IntersectRectAndLine(&rect, &x1, &y1, &x2, &y2); - SDL_ATvassert( !clipped && - x1 == 0 && y1 == -10 && x2 == 31 && y2 == -10, - "line outside above was incorrectly clipped: %d,%d - %d,%d", - x1, y1, x2, y2); - - x1 = 0; - y1 = 40; - x2 = 31; - y2 = 40; - clipped = SDL_IntersectRectAndLine(&rect, &x1, &y1, &x2, &y2); - SDL_ATvassert( !clipped && - x1 == 0 && y1 == 40 && x2 == 31 && y2 == 40, - "line outside below was incorrectly clipped: %d,%d - %d,%d", - x1, y1, x2, y2); - - x1 = 0; - y1 = 0; - x2 = 31; - y2 = 31; - clipped = SDL_IntersectRectAndLine(&rect, &x1, &y1, &x2, &y2); - SDL_ATvassert( clipped && - x1 == 0 && y1 == 0 && x2 == 31 && y2 == 31, - "line fully inside rect was clipped: %d,%d - %d,%d", - x1, y1, x2, y2); - - x1 = -10; - y1 = 15; - x2 = 40; - y2 = 15; - clipped = SDL_IntersectRectAndLine(&rect, &x1, &y1, &x2, &y2); - SDL_ATvassert( clipped && - x1 == 0 && y1 == 15 && x2 == 31 && y2 == 15, - "horizontal line rect was incorrectly clipped: %d,%d - %d,%d", - x1, y1, x2, y2); - - x1 = -32; - y1 = -32; - x2 = 63; - y2 = 63; - clipped = SDL_IntersectRectAndLine(&rect, &x1, &y1, &x2, &y2); - SDL_ATvassert( clipped && - x1 == 0 && y1 == 0 && x2 == 31 && y2 == 31, - "diagonal line to lower right was incorrectly clipped: %d,%d - %d,%d", - x1, y1, x2, y2); - - x1 = 63; - y1 = 63; - x2 = -32; - y2 = -32; - clipped = SDL_IntersectRectAndLine(&rect, &x1, &y1, &x2, &y2); - SDL_ATvassert( clipped && - x1 == 31 && y1 == 31 && x2 == 0 && y2 == 0, - "diagonal line to upper left was incorrectly clipped: %d,%d - %d,%d", - x1, y1, x2, y2); - - x1 = 63; - y1 = -32; - x2 = -32; - y2 = 63; - clipped = SDL_IntersectRectAndLine(&rect, &x1, &y1, &x2, &y2); - SDL_ATvassert( clipped && - x1 == 31 && y1 == 0 && x2 == 0 && y2 == 31, - "diagonal line to lower left was incorrectly clipped: %d,%d - %d,%d", - x1, y1, x2, y2); - - x1 = -32; - y1 = 63; - x2 = 63; - y2 = -32; - clipped = SDL_IntersectRectAndLine(&rect, &x1, &y1, &x2, &y2); - SDL_ATvassert( clipped && - x1 == 0 && y1 == 31 && x2 == 31 && y2 == 0, - "diagonal line to upper right was incorrectly clipped: %d,%d - %d,%d", - x1, y1, x2, y2); - - SDL_ATend(); -} - - -/** - * @brief Rect test entrypoint. - */ -#ifdef TEST_STANDALONE -int main( int argc, const char *argv[] ) -{ - (void) argc; - (void) argv; -#else /* TEST_STANDALONE */ -int test_rect (void) -{ -#endif /* TEST_STANDALONE */ - - SDL_ATinit( "Rect" ); - - rect_testIntersectRectAndLine(); - - return SDL_ATfinish(); -} diff --git a/test/automated/rect/rect.h b/test/automated/rect/rect.h deleted file mode 100644 index 9a0806151..000000000 --- a/test/automated/rect/rect.h +++ /dev/null @@ -1,18 +0,0 @@ -/** - * Part of SDL test suite. - * - * Written by Edgar Simo "bobbens" - * - * Released under Public Domain. - */ - - -#ifndef _TEST_RECT -# define _TEST_RECT - - -int test_rect (void); - - -#endif /* _TEST_RECT */ - diff --git a/test/automated/render/render.c b/test/automated/render/render.c deleted file mode 100644 index 82f56ef6c..000000000 --- a/test/automated/render/render.c +++ /dev/null @@ -1,1082 +0,0 @@ -/** - * Automated SDL_Surface test. - * - * Written by Edgar Simo "bobbens" - * - * Released under Public Domain. - */ - - -#include "SDL.h" -#include "../SDL_at.h" - -#include "../common/common.h" - - -/* - * Pull in images for testcases. - */ -#include "../common/images.h" - - -#define SCREEN_W 80 -#define SCREEN_H 60 - -#define FACE_W img_face.width -#define FACE_H img_face.height - -static SDL_Renderer *renderer; - -/* - * Prototypes. - */ -static int render_compare( const char *msg, const SurfaceImage_t *s, int allowable_error ); -static int render_isSupported( int code ); -static int render_hasDrawColor (void); -static int render_hasBlendModes (void); -static int render_hasTexColor (void); -static int render_hasTexAlpha (void); -static int render_clearScreen (void); -/* Testcases. */ -static int render_testPrimitives (void); -static int render_testPrimitivesBlend (void); -static int render_testBlit (void); -static int render_testBlitColour (void); -static int render_testBlitAlpha (void); -static int render_testBlitBlendMode( SDL_Texture * tface, int mode ); -static int render_testBlitBlend (void); - - -/** - * @brief Compares screen pixels with image pixels. - * - * @param msg Message on failure. - * @param s Image to compare against. - * @return 0 on success. - */ -static int render_compare( const char *msg, const SurfaceImage_t *s, int allowable_error ) -{ - int ret; - SDL_Rect rect; - Uint8 pix[4*80*60]; - SDL_Surface *testsur; - - /* Read pixels. */ - /* Explicitly specify the rect in case the window isn't expected size... */ - rect.x = 0; - rect.y = 0; - rect.w = 80; - rect.h = 60; - ret = SDL_RenderReadPixels(renderer, &rect, FORMAT, pix, 80*4 ); - if (SDL_ATassert( "SDL_RenderReadPixels", ret==0) ) - return 1; - - /* Create surface. */ - testsur = SDL_CreateRGBSurfaceFrom( pix, 80, 60, 32, 80*4, - RMASK, GMASK, BMASK, AMASK); - if (SDL_ATassert( "SDL_CreateRGBSurfaceFrom", testsur!=NULL )) - return 1; - - /* Compare surface. */ - ret = surface_compare( testsur, s, allowable_error ); - if (SDL_ATassert( msg, ret==0 )) - return 1; - - /* Clean up. */ - SDL_FreeSurface( testsur ); - - return 0; -} - -#if 0 -static int dump_screen( int index ) -{ - int ret; - char name[1024]; - Uint8 pix[4*80*60]; - SDL_Surface *testsur; - SDL_RendererInfo info; - - /* Read pixels. */ - ret = SDL_RenderReadPixels(renderer, NULL, FORMAT, pix, 80*4 ); - if (SDL_ATassert( "SDL_RenderReadPixels", ret==0) ) - return 1; - - /* Create surface. */ - testsur = SDL_CreateRGBSurfaceFrom( pix, 80, 60, 32, 80*4, - RMASK, GMASK, BMASK, AMASK); - if (SDL_ATassert( "SDL_CreateRGBSurfaceFrom", testsur!=NULL )) - return 1; - - /* Dump surface. */ - SDL_GetRendererInfo(renderer,&info); - sprintf(name, "%s-%s-%d.bmp", SDL_GetCurrentVideoDriver(), info.name, index); - SDL_SaveBMP(testsur, name); - - /* Clean up. */ - SDL_FreeSurface( testsur ); - - return 0; -} -#endif - -/** - * @brief Checks to see if functionality is supported. - */ -static int render_isSupported( int code ) -{ - return (code == 0); -} - - -/** - * @brief Test to see if we can vary the draw colour. - */ -static int render_hasDrawColor (void) -{ - int ret, fail; - Uint8 r, g, b, a; - - fail = 0; - - /* Set colour. */ - ret = SDL_SetRenderDrawColor(renderer, 100, 100, 100, 100 ); - if (!render_isSupported(ret)) - fail = 1; - ret = SDL_GetRenderDrawColor(renderer, &r, &g, &b, &a ); - if (!render_isSupported(ret)) - fail = 1; - /* Restore natural. */ - ret = SDL_SetRenderDrawColor(renderer, 0, 0, 0, SDL_ALPHA_OPAQUE ); - if (!render_isSupported(ret)) - fail = 1; - - /* Something failed, consider not available. */ - if (fail) - return 0; - /* Not set properly, consider failed. */ - else if ((r != 100) || (g != 100) || (b != 100) || (a != 100)) - return 0; - return 1; -} - - -/** - * @brief Test to see if we can vary the blend mode. - */ -static int render_hasBlendModes (void) -{ - int fail; - int ret; - SDL_BlendMode mode; - - fail = 0; - - ret = SDL_SetRenderDrawBlendMode(renderer, SDL_BLENDMODE_BLEND ); - if (!render_isSupported(ret)) - fail = 1; - ret = SDL_GetRenderDrawBlendMode(renderer, &mode ); - if (!render_isSupported(ret)) - fail = 1; - ret = (mode != SDL_BLENDMODE_BLEND); - if (!render_isSupported(ret)) - fail = 1; - ret = SDL_SetRenderDrawBlendMode(renderer, SDL_BLENDMODE_ADD ); - if (!render_isSupported(ret)) - fail = 1; - ret = SDL_GetRenderDrawBlendMode(renderer, &mode ); - if (!render_isSupported(ret)) - fail = 1; - ret = (mode != SDL_BLENDMODE_ADD); - if (!render_isSupported(ret)) - fail = 1; - ret = SDL_SetRenderDrawBlendMode(renderer, SDL_BLENDMODE_MOD ); - if (!render_isSupported(ret)) - fail = 1; - ret = SDL_GetRenderDrawBlendMode(renderer, &mode ); - if (!render_isSupported(ret)) - fail = 1; - ret = (mode != SDL_BLENDMODE_MOD); - if (!render_isSupported(ret)) - fail = 1; - ret = SDL_SetRenderDrawBlendMode(renderer, SDL_BLENDMODE_NONE ); - if (!render_isSupported(ret)) - fail = 1; - ret = SDL_GetRenderDrawBlendMode(renderer, &mode ); - if (!render_isSupported(ret)) - fail = 1; - ret = (mode != SDL_BLENDMODE_NONE); - if (!render_isSupported(ret)) - fail = 1; - - return !fail; -} - - -/** - * @brief Loads the test face. - */ -static SDL_Texture * render_loadTestFace (void) -{ - SDL_Surface *face; - SDL_Texture *tface; - - /* Create face surface. */ - face = SDL_CreateRGBSurfaceFrom( (void*)img_face.pixel_data, - img_face.width, img_face.height, 32, img_face.width*4, -#if (SDL_BYTEORDER == SDL_BIG_ENDIAN) - 0xff000000, /* Red bit mask. */ - 0x00ff0000, /* Green bit mask. */ - 0x0000ff00, /* Blue bit mask. */ - 0x000000ff /* Alpha bit mask. */ -#else - 0x000000ff, /* Red bit mask. */ - 0x0000ff00, /* Green bit mask. */ - 0x00ff0000, /* Blue bit mask. */ - 0xff000000 /* Alpha bit mask. */ -#endif - ); - if (face == NULL) - return 0; - tface = SDL_CreateTextureFromSurface(renderer, face); - SDL_FreeSurface(face); - - return tface; -} - - -/** - * @brief Test to see if can set texture colour mode. - */ -static int render_hasTexColor (void) -{ - int fail; - int ret; - SDL_Texture *tface; - Uint8 r, g, b; - - /* Get test face. */ - tface = render_loadTestFace(); - if (tface == 0) - return 0; - - /* See if supported. */ - fail = 0; - ret = SDL_SetTextureColorMod( tface, 100, 100, 100 ); - if (!render_isSupported(ret)) - fail = 1; - ret = SDL_GetTextureColorMod( tface, &r, &g, &b ); - if (!render_isSupported(ret)) - fail = 1; - - /* Clean up. */ - SDL_DestroyTexture( tface ); - - if (fail) - return 0; - else if ((r != 100) || (g != 100) || (b != 100)) - return 0; - return 1; -} - - -/** - * @brief Test to see if we can vary the alpha of the texture. - */ -static int render_hasTexAlpha (void) -{ - int fail; - int ret; - SDL_Texture *tface; - Uint8 a; - - /* Get test face. */ - tface = render_loadTestFace(); - if (tface == 0) - return 0; - - /* See if supported. */ - fail = 0; - ret = SDL_SetTextureAlphaMod( tface, 100 ); - if (!render_isSupported(ret)) - fail = 1; - ret = SDL_GetTextureAlphaMod( tface, &a ); - if (!render_isSupported(ret)) - fail = 1; - - /* Clean up. */ - SDL_DestroyTexture( tface ); - - if (fail) - return 0; - else if (a != 100) - return 0; - return 1; -} - - -/** - * @brief Clears the screen. - * - * @note We don't test for errors, but they shouldn't happen. - */ -static int render_clearScreen (void) -{ - int ret; - - /* Set colour. */ - ret = SDL_SetRenderDrawColor(renderer, 0, 0, 0, SDL_ALPHA_OPAQUE ); - /* - if (SDL_ATassert( "SDL_SetRenderDrawColor", ret == 0)) - return -1; - */ - - /* Clear screen. */ - ret = SDL_RenderFillRect(renderer, NULL ); - /* - if (SDL_ATassert( "SDL_RenderFillRect", ret == 0)) - return -1; - */ - - /* Set defaults. */ - ret = SDL_SetRenderDrawBlendMode(renderer, SDL_BLENDMODE_NONE ); - /* - if (SDL_ATassert( "SDL_SetRenderDrawBlendMode", ret == 0)) - return -1; - */ - ret = SDL_SetRenderDrawColor(renderer, 255, 255, 255, SDL_ALPHA_OPAQUE ); - /* - if (SDL_ATassert( "SDL_SetRenderDrawColor", ret == 0)) - return -1; - */ - - return 0; -} - - -/** - * @brief Tests the SDL primitives for rendering. - */ -static int render_testPrimitives (void) -{ - int ret; - int x, y; - SDL_Rect rect; - - /* Clear surface. */ - if (render_clearScreen()) - return -1; - - /* Need drawcolour or just skip test. */ - if (!render_hasDrawColor()) - return 0; - - /* Draw a rectangle. */ - rect.x = 40; - rect.y = 0; - rect.w = 40; - rect.h = 80; - ret = SDL_SetRenderDrawColor(renderer, 13, 73, 200, SDL_ALPHA_OPAQUE ); - if (SDL_ATassert( "SDL_SetRenderDrawColor", ret == 0)) - return -1; - ret = SDL_RenderFillRect(renderer, &rect ); - if (SDL_ATassert( "SDL_RenderFillRect", ret == 0)) - return -1; - - /* Draw a rectangle. */ - rect.x = 10; - rect.y = 10; - rect.w = 60; - rect.h = 40; - ret = SDL_SetRenderDrawColor(renderer, 200, 0, 100, SDL_ALPHA_OPAQUE ); - if (SDL_ATassert( "SDL_SetRenderDrawColor", ret == 0)) - return -1; - ret = SDL_RenderFillRect(renderer, &rect ); - if (SDL_ATassert( "SDL_RenderFillRect", ret == 0)) - return -1; - - /* Draw some points like so: - * X.X.X.X.. - * .X.X.X.X. - * X.X.X.X.. */ - for (y=0; y<3; y++) { - x = y % 2; - for (; x<80; x+=2) { - ret = SDL_SetRenderDrawColor(renderer, x*y, x*y/2, x*y/3, SDL_ALPHA_OPAQUE ); - if (SDL_ATassert( "SDL_SetRenderDrawColor", ret == 0)) - return -1; - ret = SDL_RenderDrawPoint(renderer, x, y ); - if (SDL_ATassert( "SDL_RenderDrawPoint", ret == 0)) - return -1; - } - } - - /* Draw some lines. */ - ret = SDL_SetRenderDrawColor(renderer, 0, 255, 0, SDL_ALPHA_OPAQUE ); - if (SDL_ATassert( "SDL_SetRenderDrawColor", ret == 0)) - return -1; - ret = SDL_RenderDrawLine(renderer, 0, 30, 80, 30 ); - if (SDL_ATassert( "SDL_RenderDrawLine", ret == 0)) - return -1; - ret = SDL_SetRenderDrawColor(renderer, 55, 55, 5, SDL_ALPHA_OPAQUE ); - if (SDL_ATassert( "SDL_SetRenderDrawColor", ret == 0)) - return -1; - ret = SDL_RenderDrawLine(renderer, 40, 30, 40, 60 ); - if (SDL_ATassert( "SDL_RenderDrawLine", ret == 0)) - return -1; - ret = SDL_SetRenderDrawColor(renderer, 5, 105, 105, SDL_ALPHA_OPAQUE ); - if (SDL_ATassert( "SDL_SetRenderDrawColor", ret == 0)) - return -1; - ret = SDL_RenderDrawLine(renderer, 0, 0, 29, 29 ); - if (SDL_ATassert( "SDL_RenderDrawLine", ret == 0)) - return -1; - ret = SDL_RenderDrawLine(renderer, 29, 30, 0, 59 ); - if (SDL_ATassert( "SDL_RenderDrawLine", ret == 0)) - return -1; - ret = SDL_RenderDrawLine(renderer, 79, 0, 50, 29 ); - if (SDL_ATassert( "SDL_RenderDrawLine", ret == 0)) - return -1; - ret = SDL_RenderDrawLine(renderer, 79, 59, 50, 30 ); - if (SDL_ATassert( "SDL_RenderDrawLine", ret == 0)) - return -1; - - /* See if it's the same. */ - if (render_compare( "Primitives output not the same.", &img_primitives, ALLOWABLE_ERROR_OPAQUE )) - return -1; - - return 0; -} - - -/** - * @brief Tests the SDL primitives with alpha for rendering. - */ -static int render_testPrimitivesBlend (void) -{ - int ret; - int i, j; - SDL_Rect rect; - - /* Clear surface. */ - if (render_clearScreen()) - return -1; - - /* Need drawcolour and blendmode or just skip test. */ - if (!render_hasDrawColor() || !render_hasBlendModes()) - return 0; - - /* Create some rectangles for each blend mode. */ - ret = SDL_SetRenderDrawColor(renderer, 255, 255, 255, 0 ); - if (SDL_ATassert( "SDL_SetRenderDrawColor", ret == 0)) - return -1; - ret = SDL_SetRenderDrawBlendMode(renderer, SDL_BLENDMODE_NONE ); - if (SDL_ATassert( "SDL_SetRenderDrawBlendMode", ret == 0)) - return -1; - ret = SDL_RenderFillRect(renderer, NULL ); - if (SDL_ATassert( "SDL_RenderFillRect", ret == 0)) - return -1; - rect.x = 10; - rect.y = 25; - rect.w = 40; - rect.h = 25; - ret = SDL_SetRenderDrawColor(renderer, 240, 10, 10, 75 ); - if (SDL_ATassert( "SDL_SetRenderDrawColor", ret == 0)) - return -1; - ret = SDL_SetRenderDrawBlendMode(renderer, SDL_BLENDMODE_ADD ); - if (SDL_ATassert( "SDL_SetRenderDrawBlendMode", ret == 0)) - return -1; - ret = SDL_RenderFillRect(renderer, &rect ); - if (SDL_ATassert( "SDL_RenderFillRect", ret == 0)) - return -1; - rect.x = 30; - rect.y = 40; - rect.w = 45; - rect.h = 15; - ret = SDL_SetRenderDrawColor(renderer, 10, 240, 10, 100 ); - if (SDL_ATassert( "SDL_SetRenderDrawColor", ret == 0)) - return -1; - ret = SDL_SetRenderDrawBlendMode(renderer, SDL_BLENDMODE_BLEND ); - if (SDL_ATassert( "SDL_SetRenderDrawBlendMode", ret == 0)) - return -1; - ret = SDL_RenderFillRect(renderer, &rect ); - if (SDL_ATassert( "SDL_RenderFillRect", ret == 0)) - return -1; - rect.x = 25; - rect.y = 25; - rect.w = 25; - rect.h = 25; - ret = SDL_SetRenderDrawColor(renderer, 10, 10, 240, 125 ); - if (SDL_ATassert( "SDL_SetRenderDrawColor", ret == 0)) - return -1; - ret = SDL_SetRenderDrawBlendMode(renderer, SDL_BLENDMODE_NONE ); - if (SDL_ATassert( "SDL_SetRenderDrawBlendMode", ret == 0)) - return -1; - ret = SDL_RenderFillRect(renderer, &rect ); - if (SDL_ATassert( "SDL_RenderFillRect", ret == 0)) - return -1; - - /* Draw blended lines, lines for everyone. */ - for (i=0; i=0)) - goto err_cleanup; - SDL_ATprintVerbose( 1, " %d Render Drivers\n", nr ); - SDL_ATend(); - for (j=0; j -#include "SDL.h" - -#ifndef TestSupportRWops_h -#define TestSupportRWops_h - -FILE* TestSupportRWops_OpenFPFromReadDir(const char *file, const char *mode); -FILE* TestSupportRWops_OpenFPFromWriteDir(const char *file, const char *mode); -SDL_RWops* TestSupportRWops_OpenRWopsFromReadDir(const char *file, const char *mode); -SDL_RWops* TestSupportRWops_OpenRWopsFromWriteDir(const char *file, const char *mode); - - -#endif diff --git a/test/automated/rwops/TestSupportRWops_Cocoa.m b/test/automated/rwops/TestSupportRWops_Cocoa.m deleted file mode 100644 index 153fd8d4d..000000000 --- a/test/automated/rwops/TestSupportRWops_Cocoa.m +++ /dev/null @@ -1,89 +0,0 @@ -#import "TestSupportRWops.h" -#import -#include "SDL.h" - -/* For proper OS X applications, the resources are contained inside the application bundle. - So the strategy is to first check the application bundle for the file, then fallback to the current working directory. - Note: One additional corner-case is if the resource is in a framework's resource bundle instead of the app. - We might want to use bundle identifiers, e.g. org.libsdl.sdl to get the bundle for the framework, - but we would somehow need to know what the bundle identifiers we need to search are. - Conversely, write directories are usually not in the bundles. This implementation uses NSTemporaryDirectory, - but consider Preferences, Application Support, Documents, etc. - Also, note the bundle layouts are different for iPhone and Mac. -*/ - -const char* RWOPS_READ = "rwops/read"; -const char* RWOPS_WRITE = "write"; - - -FILE* TestSupportRWops_OpenFPFromReadDir(const char *file, const char *mode) -{ - FILE* fp = NULL; - - /* If the file mode is writable, skip all the bundle stuff because generally the bundle is read-only. */ - if(strcmp("r", mode) && strcmp("rb", mode)) - { - return fopen(file, mode); - } - - NSAutoreleasePool* autorelease_pool = [[NSAutoreleasePool alloc] init]; - - - NSFileManager* file_manager = [NSFileManager defaultManager]; - NSString* resource_path = [[NSBundle mainBundle] resourcePath]; - - NSString* ns_string_file_component = [file_manager stringWithFileSystemRepresentation:file length:strlen(file)]; - - NSString* full_path_with_file_to_try = [resource_path stringByAppendingPathComponent:ns_string_file_component]; - if([file_manager fileExistsAtPath:full_path_with_file_to_try]) - { - fp = fopen([full_path_with_file_to_try fileSystemRepresentation], mode); - } - else - { - fp = fopen(file, mode); - } - - [autorelease_pool drain]; - - return fp; -} - -FILE* TestSupportRWops_OpenFPFromWriteDir(const char *file, const char *mode) -{ - FILE* fp = NULL; - - NSAutoreleasePool* autorelease_pool = [[NSAutoreleasePool alloc] init]; - - NSFileManager* file_manager = [NSFileManager defaultManager]; - NSString* ns_string_file_component = [file_manager stringWithFileSystemRepresentation:file length:strlen(file)]; - NSString* full_path_with_file_to_try = [NSTemporaryDirectory() stringByAppendingPathComponent:ns_string_file_component]; - - fp = fopen([full_path_with_file_to_try fileSystemRepresentation], mode); - - [autorelease_pool drain]; - - return fp; -} - -SDL_RWops* TestSupportRWops_OpenRWopsFromReadDir(const char *file, const char *mode) -{ - return SDL_RWFromFile(file, mode); -} - -SDL_RWops* TestSupportRWops_OpenRWopsFromWriteDir(const char *file, const char *mode) -{ - SDL_RWops* rw = NULL; - - NSAutoreleasePool* autorelease_pool = [[NSAutoreleasePool alloc] init]; - - NSFileManager* file_manager = [NSFileManager defaultManager]; - NSString* ns_string_file_component = [file_manager stringWithFileSystemRepresentation:file length:strlen(file)]; - NSString* full_path_with_file_to_try = [NSTemporaryDirectory() stringByAppendingPathComponent:ns_string_file_component]; - - rw = SDL_RWFromFile( [full_path_with_file_to_try fileSystemRepresentation], mode ); - - [autorelease_pool drain]; - return rw; -} - diff --git a/test/automated/rwops/TestSupportRWops_Generic.c b/test/automated/rwops/TestSupportRWops_Generic.c deleted file mode 100644 index 36128bf3a..000000000 --- a/test/automated/rwops/TestSupportRWops_Generic.c +++ /dev/null @@ -1,32 +0,0 @@ -/* Generic implementation for file opening routines. -* Customizations for specific platforms should go in alternative files. -*/ - -/* quiet windows compiler warnings */ -#define _CRT_SECURE_NO_WARNINGS - -#include -#include "SDL.h" - -const char* RWOPS_READ = "rwops/read"; -const char* RWOPS_WRITE = "rwops/write"; - -FILE* TestSupportRWops_OpenFPFromReadDir(const char *file, const char *mode) -{ - return fopen(file, mode); -} - -FILE* TestSupportRWops_OpenFPFromWriteDir(const char *file, const char *mode) -{ - return fopen(file, mode); -} - -SDL_RWops* TestSupportRWops_OpenRWopsFromReadDir(const char *file, const char *mode) -{ - return SDL_RWFromFile(file, mode); -} - -SDL_RWops* TestSupportRWops_OpenRWopsFromWriteDir(const char *file, const char *mode) -{ - return SDL_RWFromFile(file, mode); -} diff --git a/test/automated/rwops/read b/test/automated/rwops/read deleted file mode 100644 index c57eff55e..000000000 --- a/test/automated/rwops/read +++ /dev/null @@ -1 +0,0 @@ -Hello World! \ No newline at end of file diff --git a/test/automated/rwops/rwops.c b/test/automated/rwops/rwops.c deleted file mode 100644 index c3f236c3e..000000000 --- a/test/automated/rwops/rwops.c +++ /dev/null @@ -1,272 +0,0 @@ -/** - * Automated SDL_RWops test. - * - * Written by Edgar Simo "bobbens" - * - * Released under Public Domain. - */ - - -#include "SDL.h" -#include "../SDL_at.h" -#include "TestSupportRWops.h" - -/* Defined in TestSupportRWops implementation to allow flexibility. */ -extern const char* RWOPS_READ; -extern const char* RWOPS_WRITE; - -static const char hello_world[] = "Hello World!"; - - -/** - * @brief Makes sure parameters work properly. - */ -static void rwops_testParam (void) -{ - SDL_RWops *rwops; - - /* Begin testcase. */ - SDL_ATbegin( "RWops Parameters" ); - - /* These should all fail. */ - rwops = SDL_RWFromFile(NULL, NULL); - if (SDL_ATassert( "SDL_RWFromFile(NULL, NULL) worked", rwops == NULL )) - return; - rwops = SDL_RWFromFile(NULL, "ab+"); - if (SDL_ATassert( "SDL_RWFromFile(NULL, \"ab+\") worked", rwops == NULL )) - return; - rwops = SDL_RWFromFile(NULL, "sldfkjsldkfj"); - if (SDL_ATassert( "SDL_RWFromFile(NULL, \"sldfkjsldkfj\") worked", rwops == NULL )) - return; - rwops = SDL_RWFromFile("something", ""); - if (SDL_ATassert( "SDL_RWFromFile(\"something\", \"\") worked", rwops == NULL )) - return; - rwops = SDL_RWFromFile("something", NULL); - if (SDL_ATassert( "SDL_RWFromFile(\"something\", NULL) worked", rwops == NULL )) - return; - - - /* End testcase. */ - SDL_ATend(); -} - - -/** - * @brief Does a generic rwops test. - * - * RWops should have "Hello World!" in it already if write is disabled. - * - * @param write Test writing also. - * @return 1 if an assert is failed. - */ -static int rwops_testGeneric( SDL_RWops *rw, int write ) -{ - char buf[sizeof(hello_world)]; - Sint64 i; - - /* Set to start. */ - i = SDL_RWseek( rw, 0, RW_SEEK_SET ); - if (SDL_ATvassert( i == 0, - "Seeking with SDL_RWseek (RW_SEEK_SET): got %d, expected %d", - (int)i, 0 )) - return 1; - - /* Test write. */ - i = SDL_RWwrite( rw, hello_world, sizeof(hello_world)-1, 1 ); - if (write) { - if (SDL_ATassert( "Writing with SDL_RWwrite (failed to write)", i == 1 )) - return 1; - } - else { - if (SDL_ATassert( "Writing with SDL_RWwrite (wrote when shouldn't have)", i <= 0 )) - return 1; - } - - /* Test seek. */ - i = SDL_RWseek( rw, 6, RW_SEEK_SET ); - if (SDL_ATvassert( i == 6, - "Seeking with SDL_RWseek (RW_SEEK_SET): got %d, expected %d", - (int)i, 0 )) - return 1; - - /* Test seek. */ - i = SDL_RWseek( rw, 0, RW_SEEK_SET ); - if (SDL_ATvassert( i == 0, - "Seeking with SDL_RWseek (RW_SEEK_SET): got %d, expected %d", - (int)i, 0 )) - return 1; - - /* Test read. */ - i = SDL_RWread( rw, buf, 1, sizeof(hello_world)-1 ); - if (SDL_ATassert( "Reading with SDL_RWread", i == sizeof(hello_world)-1 )) - return 1; - if (SDL_ATassert( "Memory read does not match memory written", - SDL_memcmp( buf, hello_world, sizeof(hello_world)-1 ) == 0 )) - return 1; - - /* More seek tests. */ - i = SDL_RWseek( rw, -4, RW_SEEK_CUR ); - if (SDL_ATvassert( i == sizeof(hello_world)-5, - "Seeking with SDL_RWseek (RW_SEEK_CUR): got %d, expected %d", - (int)i, sizeof(hello_world)-5 )) - return 1; - i = SDL_RWseek( rw, -1, RW_SEEK_END ); - if (SDL_ATvassert( i == sizeof(hello_world)-2, - "Seeking with SDL_RWseek (RW_SEEK_END): got %d, expected %d", - (int)i, sizeof(hello_world)-2 )) - return 1; - - return 0; -} - - -/** - * @brief Tests opening from memory. - */ -static void rwops_testMem (void) -{ - char mem[sizeof(hello_world)]; - SDL_RWops *rw; - - /* Begin testcase. */ - SDL_ATbegin( "SDL_RWFromMem" ); - - /* Open. */ - rw = SDL_RWFromMem( mem, sizeof(hello_world)-1 ); - if (SDL_ATassert( "Opening memory with SDL_RWFromMem", rw != NULL )) - return; - - /* Run generic tests. */ - if (rwops_testGeneric( rw, 1 )) - return; - - /* Close. */ - SDL_FreeRW( rw ); - - /* End testcase. */ - SDL_ATend(); -} - - -static const char const_mem[] = "Hello World!"; -/** - * @brief Tests opening from memory. - */ -static void rwops_testConstMem (void) -{ - SDL_RWops *rw; - - /* Begin testcase. */ - SDL_ATbegin( "SDL_RWFromConstMem" ); - - /* Open. */ - rw = SDL_RWFromConstMem( const_mem, sizeof(const_mem)-1 ); - if (SDL_ATassert( "Opening memory with SDL_RWFromConstMem", rw != NULL )) - return; - - /* Run generic tests. */ - if (rwops_testGeneric( rw, 0 )) - return; - - /* Close. */ - SDL_FreeRW( rw ); - - /* End testcase. */ - SDL_ATend(); -} - - -/** - * @brief Tests opening from memory. - */ -static void rwops_testFile (void) -{ - SDL_RWops *rw; - - /* Begin testcase. */ - SDL_ATbegin( "SDL_RWFromFile" ); - - /* Read test. */ - rw = TestSupportRWops_OpenRWopsFromReadDir( RWOPS_READ, "r" ); - if (SDL_ATassert( "Opening memory with SDL_RWFromFile RWOPS_READ", rw != NULL )) - return; - if (rwops_testGeneric( rw, 0 )) - return; - SDL_FreeRW( rw ); - - /* Write test. */ - rw = TestSupportRWops_OpenRWopsFromWriteDir( RWOPS_WRITE, "w+" ); - if (SDL_ATassert( "Opening memory with SDL_RWFromFile RWOPS_WRITE", rw != NULL )) - return; - if (rwops_testGeneric( rw, 1 )) - return; - SDL_FreeRW( rw ); - - /* End testcase. */ - SDL_ATend(); -} - - -/** - * @brief Tests opening from memory. - */ -static void rwops_testFP (void) -{ -#ifdef HAVE_STDIO_H - FILE *fp; - SDL_RWops *rw; - - /* Begin testcase. */ - SDL_ATbegin( "SDL_RWFromFP" ); - - /* Run read tests. */ - fp = TestSupportRWops_OpenFPFromReadDir( RWOPS_READ, "r" ); - if (SDL_ATassert( "Failed to open file 'WOPS_READ", fp != NULL)) - return; - rw = SDL_RWFromFP( fp, 1 ); - if (SDL_ATassert( "Opening memory with SDL_RWFromFP", rw != NULL )) - return; - if (rwops_testGeneric( rw, 0 )) - return; - SDL_FreeRW( rw ); - - /* Run write tests. */ - fp = TestSupportRWops_OpenFPFromWriteDir( RWOPS_WRITE, "w+" ); - if (SDL_ATassert( "Failed to open file RWOPS_WRITE", fp != NULL)) - return; - rw = SDL_RWFromFP( fp, 1 ); - if (SDL_ATassert( "Opening memory with SDL_RWFromFP", rw != NULL )) - return; - if (rwops_testGeneric( rw, 1 )) - return; - SDL_FreeRW( rw ); - - /* End testcase. */ - SDL_ATend(); -#endif /* HAVE_STDIO_H */ -} - - -/** - * @brief Entry point. - */ -#ifdef TEST_STANDALONE -int main( int argc, const char *argv[] ) -{ - (void) argc; - (void) argv; -#else /* TEST_STANDALONE */ -int test_rwops (void) -{ -#endif /* TEST_STANDALONE */ - - SDL_ATinit( "SDL_RWops" ); - - rwops_testParam(); - rwops_testMem(); - rwops_testConstMem(); - rwops_testFile(); - rwops_testFP(); - - return SDL_ATfinish(); -} diff --git a/test/automated/rwops/rwops.h b/test/automated/rwops/rwops.h deleted file mode 100644 index 676e7f886..000000000 --- a/test/automated/rwops/rwops.h +++ /dev/null @@ -1,18 +0,0 @@ -/** - * Part of SDL test suite. - * - * Written by Edgar Simo "bobbens" - * - * Released under Public Domain. - */ - - -#ifndef _TEST_RWOPS -# define _TEST_RWOPS - - -int test_rwops (void); - - -#endif /* _TEST_RWOPS */ - diff --git a/test/automated/surface/surface.c b/test/automated/surface/surface.c deleted file mode 100644 index c3974836c..000000000 --- a/test/automated/surface/surface.c +++ /dev/null @@ -1,450 +0,0 @@ -/** - * Automated SDL_Surface test. - * - * Written by Edgar Simo "bobbens" - * - * Released under Public Domain. - */ - - -#include "SDL.h" -#include "SDL_surface.h" -#include "SDL_video.h" -#include "../SDL_at.h" - -#include "../common/common.h" - - -/* - * Pull in images for testcases. - */ -#include "../common/images.h" - - -/* - * Prototypes. - */ -/* Testcases. */ -static void surface_testLoad( SDL_Surface *testsur ); -static void surface_testBlit( SDL_Surface *testsur ); -static int surface_testBlitBlendMode( SDL_Surface *testsur, SDL_Surface *face, SDL_BlendMode bMode ); -static void surface_testBlitBlend( SDL_Surface *testsur ); - - -/** - * @brief Tests sprite loading. - */ -static void surface_testLoad( SDL_Surface *testsur ) -{ - int ret; - SDL_Surface *face, *rface; - - SDL_ATbegin( "Load Test" ); - - /* Clear surface. */ - ret = SDL_FillRect( testsur, NULL, - SDL_MapRGB( testsur->format, 0, 0, 0 ) ); - if (SDL_ATassert( "SDL_FillRect", ret == 0)) - return; - - /* Create the blit surface. */ -#ifdef __APPLE__ - face = SDL_LoadBMP("icon.bmp"); -#else - face = SDL_LoadBMP("../icon.bmp"); -#endif - - if (SDL_ATassert( "SDL_CreateLoadBmp", face != NULL)) - return; - - /* Set transparent pixel as the pixel at (0,0) */ - if (face->format->palette) { - ret = SDL_SetColorKey(face, SDL_RLEACCEL, *(Uint8 *) face->pixels); - if (SDL_ATassert( "SDL_SetColorKey", ret == 0)) - return; - } - - /* Convert to 32 bit to compare. */ - rface = SDL_ConvertSurface( face, testsur->format, 0 ); - if (SDL_ATassert( "SDL_ConvertSurface", rface != NULL)) - return; - - /* See if it's the same. */ - if (SDL_ATassert( "Primitives output not the same.", - surface_compare( rface, &img_face, 0 )==0 )) - return; - - /* Clean up. */ - SDL_FreeSurface( rface ); - SDL_FreeSurface( face ); - - SDL_ATend(); -} - - -/** - * @brief Tests some blitting routines. - */ -static void surface_testBlit( SDL_Surface *testsur ) -{ - int ret; - SDL_Rect rect; - SDL_Surface *face; - int i, j, ni, nj; - - SDL_ATbegin( "Blit Tests" ); - - /* Clear surface. */ - ret = SDL_FillRect( testsur, NULL, - SDL_MapRGB( testsur->format, 0, 0, 0 ) ); - if (SDL_ATassert( "SDL_FillRect", ret == 0)) - return; - - /* Create face surface. */ - face = SDL_CreateRGBSurfaceFrom( (void*)img_face.pixel_data, - img_face.width, img_face.height, 32, img_face.width*4, -#if (SDL_BYTEORDER == SDL_BIG_ENDIAN) - 0xff000000, /* Red bit mask. */ - 0x00ff0000, /* Green bit mask. */ - 0x0000ff00, /* Blue bit mask. */ - 0x000000ff /* Alpha bit mask. */ -#else - 0x000000ff, /* Red bit mask. */ - 0x0000ff00, /* Green bit mask. */ - 0x00ff0000, /* Blue bit mask. */ - 0xff000000 /* Alpha bit mask. */ -#endif - ); - if (SDL_ATassert( "SDL_CreateRGBSurfaceFrom", face != NULL)) - return; - - /* Constant values. */ - rect.w = face->w; - rect.h = face->h; - ni = testsur->w - face->w; - nj = testsur->h - face->h; - - /* Loop blit. */ - for (j=0; j <= nj; j+=4) { - for (i=0; i <= ni; i+=4) { - /* Blitting. */ - rect.x = i; - rect.y = j; - ret = SDL_BlitSurface( face, NULL, testsur, &rect ); - if (SDL_ATassert( "SDL_BlitSurface", ret == 0)) - return; - } - } - - /* See if it's the same. */ - if (SDL_ATassert( "Blitting output not the same (normal blit).", - surface_compare( testsur, &img_blit, 0 )==0 )) - return; - - /* Clear surface. */ - ret = SDL_FillRect( testsur, NULL, - SDL_MapRGB( testsur->format, 0, 0, 0 ) ); - if (SDL_ATassert( "SDL_FillRect", ret == 0)) - return; - - /* Test blitting with colour mod. */ - for (j=0; j <= nj; j+=4) { - for (i=0; i <= ni; i+=4) { - /* Set colour mod. */ - ret = SDL_SetSurfaceColorMod( face, (255/nj)*j, (255/ni)*i, (255/nj)*j ); - if (SDL_ATassert( "SDL_SetSurfaceColorMod", ret == 0)) - return; - - /* Blitting. */ - rect.x = i; - rect.y = j; - ret = SDL_BlitSurface( face, NULL, testsur, &rect ); - if (SDL_ATassert( "SDL_BlitSurface", ret == 0)) - return; - } - } - - /* See if it's the same. */ - if (SDL_ATassert( "Blitting output not the same (using SDL_SetSurfaceColorMod).", - surface_compare( testsur, &img_blitColour, 0 )==0 )) - return; - - /* Clear surface. */ - ret = SDL_FillRect( testsur, NULL, - SDL_MapRGB( testsur->format, 0, 0, 0 ) ); - if (SDL_ATassert( "SDL_FillRect", ret == 0)) - return; - - /* Restore colour. */ - ret = SDL_SetSurfaceColorMod( face, 255, 255, 255 ); - if (SDL_ATassert( "SDL_SetSurfaceColorMod", ret == 0)) - return; - - /* Test blitting with colour mod. */ - for (j=0; j <= nj; j+=4) { - for (i=0; i <= ni; i+=4) { - /* Set alpha mod. */ - ret = SDL_SetSurfaceAlphaMod( face, (255/ni)*i ); - if (SDL_ATassert( "SDL_SetSurfaceAlphaMod", ret == 0)) - return; - - /* Blitting. */ - rect.x = i; - rect.y = j; - ret = SDL_BlitSurface( face, NULL, testsur, &rect ); - if (SDL_ATassert( "SDL_BlitSurface", ret == 0)) - return; - } - } - - /* See if it's the same. */ - if (SDL_ATassert( "Blitting output not the same (using SDL_SetSurfaceAlphaMod).", - surface_compare( testsur, &img_blitAlpha, 0 )==0 )) - return; - - /* Clean up. */ - SDL_FreeSurface( face ); - - SDL_ATend(); -} - - -/** - * @brief Tests a blend mode. - */ -static int surface_testBlitBlendMode( SDL_Surface *testsur, SDL_Surface *face, SDL_BlendMode bMode ) -{ - int ret; - int i, j, ni, nj; - SDL_Rect rect; - - /* Clear surface. */ - ret = SDL_FillRect( testsur, NULL, - SDL_MapRGB( testsur->format, 0, 0, 0 ) ); - if (SDL_ATassert( "SDL_FillRect", ret == 0)) - return 1; - - /* Steps to take. */ - ni = testsur->w - face->w; - nj = testsur->h - face->h; - - /* Constant values. */ - rect.w = face->w; - rect.h = face->h; - - /* Test blend mode. */ - for (j=0; j <= nj; j+=4) { - for (i=0; i <= ni; i+=4) { - /* Set blend mode. */ - ret = SDL_SetSurfaceBlendMode( face, bMode ); - if (SDL_ATassert( "SDL_SetSurfaceBlendMode", ret == 0)) - return 1; - - /* Blitting. */ - rect.x = i; - rect.y = j; - ret = SDL_BlitSurface( face, NULL, testsur, &rect ); - if (SDL_ATassert( "SDL_BlitSurface", ret == 0)) - return 1; - } - } - - return 0; -} - - -/** - * @brief Tests some more blitting routines. - */ -static void surface_testBlitBlend( SDL_Surface *testsur ) -{ - int ret; - SDL_Rect rect; - SDL_Surface *face; - int i, j, ni, nj; - int mode; - SDL_BlendMode bMode; - - SDL_ATbegin( "Blit Blending Tests" ); - - /* Clear surface. */ - ret = SDL_FillRect( testsur, NULL, - SDL_MapRGB( testsur->format, 0, 0, 0 ) ); - if (SDL_ATassert( "SDL_FillRect", ret == 0)) - return; - - /* Create the blit surface. */ - face = SDL_CreateRGBSurfaceFrom( (void*)img_face.pixel_data, - img_face.width, img_face.height, 32, img_face.width*4, -#if (SDL_BYTEORDER == SDL_BIG_ENDIAN) - 0xff000000, /* Red bit mask. */ - 0x00ff0000, /* Green bit mask. */ - 0x0000ff00, /* Blue bit mask. */ - 0x000000ff /* Alpha bit mask. */ -#else - 0x000000ff, /* Red bit mask. */ - 0x0000ff00, /* Green bit mask. */ - 0x00ff0000, /* Blue bit mask. */ - 0xff000000 /* Alpha bit mask. */ -#endif - ); - if (SDL_ATassert( "SDL_CreateRGBSurfaceFrom", face != NULL)) - return; - - /* Set alpha mod. */ - ret = SDL_SetSurfaceAlphaMod( face, 100 ); - if (SDL_ATassert( "SDL_SetSurfaceAlphaMod", ret == 0)) - return; - - /* Steps to take. */ - ni = testsur->w - face->w; - nj = testsur->h - face->h; - - /* Constant values. */ - rect.w = face->w; - rect.h = face->h; - - /* Test None. */ - if (surface_testBlitBlendMode( testsur, face, SDL_BLENDMODE_NONE )) - return; - if (SDL_ATassert( "Blitting blending output not the same (using SDL_BLENDMODE_NONE).", - surface_compare( testsur, &img_blendNone, 0 )==0 )) - return; - - /* Test Blend. */ - if (surface_testBlitBlendMode( testsur, face, SDL_BLENDMODE_BLEND )) - return; - if (SDL_ATassert( "Blitting blending output not the same (using SDL_BLENDMODE_BLEND).", - surface_compare( testsur, &img_blendBlend, 0 )==0 )) - return; - - /* Test Add. */ - if (surface_testBlitBlendMode( testsur, face, SDL_BLENDMODE_ADD )) - return; - if (SDL_ATassert( "Blitting blending output not the same (using SDL_BLENDMODE_ADD).", - surface_compare( testsur, &img_blendAdd, 0 )==0 )) - return; - - /* Test Mod. */ - if (surface_testBlitBlendMode( testsur, face, SDL_BLENDMODE_MOD )) - return; - if (SDL_ATassert( "Blitting blending output not the same (using SDL_BLENDMODE_MOD).", - surface_compare( testsur, &img_blendMod, 0 )==0 )) - return; - - /* Clear surface. */ - ret = SDL_FillRect( testsur, NULL, - SDL_MapRGB( testsur->format, 0, 0, 0 ) ); - if (SDL_ATassert( "SDL_FillRect", ret == 0)) - return; - - /* Loop blit. */ - for (j=0; j <= nj; j+=4) { - for (i=0; i <= ni; i+=4) { - - /* Set colour mod. */ - ret = SDL_SetSurfaceColorMod( face, (255/nj)*j, (255/ni)*i, (255/nj)*j ); - if (SDL_ATassert( "SDL_SetSurfaceColorMod", ret == 0)) - return; - - /* Set alpha mod. */ - ret = SDL_SetSurfaceAlphaMod( face, (100/ni)*i ); - if (SDL_ATassert( "SDL_SetSurfaceAlphaMod", ret == 0)) - return; - - /* Crazy blending mode magic. */ - mode = (i/4*j/4) % 4; - if (mode==0) bMode = SDL_BLENDMODE_NONE; - else if (mode==1) bMode = SDL_BLENDMODE_BLEND; - else if (mode==2) bMode = SDL_BLENDMODE_ADD; - else if (mode==3) bMode = SDL_BLENDMODE_MOD; - ret = SDL_SetSurfaceBlendMode( face, bMode ); - if (SDL_ATassert( "SDL_SetSurfaceBlendMode", ret == 0)) - return; - - /* Blitting. */ - rect.x = i; - rect.y = j; - ret = SDL_BlitSurface( face, NULL, testsur, &rect ); - if (SDL_ATassert( "SDL_BlitSurface", ret == 0)) - return; - } - } - - /* Check to see if matches. */ - if (SDL_ATassert( "Blitting blending output not the same (using SDL_BLEND_*).", - surface_compare( testsur, &img_blendAll, 0 )==0 )) - return; - - /* Clean up. */ - SDL_FreeSurface( face ); - - SDL_ATend(); -} - - -/** - * @brief Runs all the tests on the surface. - * - * @param testsur Surface to run tests on. - */ -void surface_runTests( SDL_Surface *testsur ) -{ - /* Software surface blitting. */ - surface_testBlit( testsur ); - surface_testBlitBlend( testsur ); -} - - -/** - * @brief Entry point. - */ -#ifdef TEST_STANDALONE -int main( int argc, const char *argv[] ) -{ - (void) argc; - (void) argv; -#else /* TEST_STANDALONE */ -int test_surface (void) -{ -#endif /* TEST_STANDALONE */ - int ret; - SDL_Surface *testsur; - - SDL_ATinit( "SDL_Surface" ); - - SDL_ATbegin( "Initializing" ); - /* Initializes the SDL subsystems. */ - ret = SDL_Init(0); - if (SDL_ATassert( "SDL_Init(0)", ret == 0)) - goto err; - - /* Now run on the video mode. */ - ret = SDL_InitSubSystem( SDL_INIT_VIDEO ); - if (SDL_ATassert( "SDL_InitSubSystem( SDL_INIT_VIDEO )", ret == 0)) - goto err; - - /* - * Surface on surface tests. - */ - /* Create the test surface. */ - testsur = SDL_CreateRGBSurface( 0, 80, 60, 32, - RMASK, GMASK, BMASK, AMASK ); - if (SDL_ATassert( "SDL_CreateRGBSurface", testsur != NULL)) - goto err; - SDL_ATend(); - /* Run surface on surface tests. */ - surface_testLoad( testsur ); - surface_runTests( testsur ); - /* Clean up. */ - SDL_FreeSurface( testsur ); - - /* Exit SDL. */ - SDL_Quit(); - - return SDL_ATfinish(); - -err: - return SDL_ATfinish(); -} - diff --git a/test/automated/surface/surface.h b/test/automated/surface/surface.h deleted file mode 100644 index cc1c89846..000000000 --- a/test/automated/surface/surface.h +++ /dev/null @@ -1,18 +0,0 @@ -/** - * Part of SDL test suite. - * - * Written by Edgar Simo "bobbens" - * - * Released under Public Domain. - */ - - -#ifndef _TEST_SURFACE -# define _TEST_SURFACE - - -int test_surface (void); - - -#endif /* _TEST_SURFACE */ - diff --git a/test/automated/testsdl.c b/test/automated/testsdl.c deleted file mode 100644 index 9d9f037b1..000000000 --- a/test/automated/testsdl.c +++ /dev/null @@ -1,185 +0,0 @@ -/* - * SDL test suite framework code. - * - * Written by Edgar Simo "bobbens" - * - * Released under Public Domain. - */ - -#include "SDL.h" -#include "SDL_at.h" - -#include "platform/platform.h" -#include "rwops/rwops.h" -#include "rect/rect.h" -#include "surface/surface.h" -#include "render/render.h" -#include "audio/audio.h" - -#if defined(WIN32) -#define NO_GETOPT -#endif -#if defined(__QNXNTO__) -#define NO_GETOPT_LONG 1 -#endif /* __QNXNTO__ */ - -#include /* printf */ -#include /* exit */ -#ifndef NO_GETOPT -#include /* getopt */ -#if !defined(NO_GETOPT_LONG) -#include /* getopt_long */ -#endif /* !NO_GETOPT_LONG */ -#endif /* !NO_GETOPT */ - - -/* - * Tests to run. - */ -static int run_manual = 0; /**< Run manual tests. */ -/* Manual. */ -/* Automatic. */ -static int run_platform = 1; /**< Run platform tests. */ -static int run_rwops = 1; /**< Run RWops tests. */ -static int run_rect = 1; /**< Run rect tests. */ -static int run_surface = 1; /**< Run surface tests. */ -static int run_render = 1; /**< Run render tests. */ -static int run_audio = 1; /**< Run audio tests. */ - -/* - * Prototypes. - */ -static void print_usage( const char *name ); -static void parse_options( int argc, char *argv[] ); - - -/** - * @brief Displays program usage. - */ -static void print_usage( const char *name ) -{ - printf("Usage: %s [OPTIONS]\n", name); - printf("Options are:\n"); - printf(" -m, --manual enables tests that require user interaction\n"); - printf(" --noplatform do not run the platform tests\n"); - printf(" --norwops do not run the rwops tests\n"); - printf(" --norect do not run the rect tests\n"); - printf(" --nosurface do not run the surface tests\n"); - printf(" --norender do not run the render tests\n"); - printf(" --noaudio do not run the audio tests\n"); - printf(" -v, --verbose increases verbosity level by 1 for each -v\n"); - printf(" -q, --quiet only displays errors\n"); - printf(" -h, --help display this message and exit\n"); -} - -/** - * @brief Handles the options. - */ -static void parse_options( int argc, char *argv[] ) -{ - int i; - - for (i = 1; i < argc; ++i) { - const char *arg = argv[i]; - if (SDL_strcmp(arg, "-m") == 0 || SDL_strcmp(arg, "--manual") == 0) { - run_manual = 1; - continue; - } - if (SDL_strcmp(arg, "-v") == 0 || SDL_strcmp(arg, "--verbose") == 0) { - int level; - SDL_ATgeti( SDL_AT_VERBOSE, &level ); - SDL_ATseti( SDL_AT_VERBOSE, level+1 ); - continue; - } - if (SDL_strcmp(arg, "-q") == 0 || SDL_strcmp(arg, "--quiet") == 0) { - SDL_ATseti( SDL_AT_QUIET, 1 ); - SDL_setenv("SDL_ASSERT", "abort", 0); - continue; - } - if (SDL_strcmp(arg, "--noplatform") == 0) { - run_platform = 0; - continue; - } - if (SDL_strcmp(arg, "--norwops") == 0) { - run_rwops = 0; - continue; - } - if (SDL_strcmp(arg, "--norect") == 0) { - run_rect = 0; - continue; - } - if (SDL_strcmp(arg, "--nosurface") == 0) { - run_surface = 0; - continue; - } - if (SDL_strcmp(arg, "--norender") == 0) { - run_render = 0; - continue; - } - if (SDL_strcmp(arg, "--noaudio") == 0) { - run_audio = 0; - continue; - } - - /* Print help and exit! */ - print_usage( argv[0] ); - exit(EXIT_FAILURE); - } -} - -/** - * @brief Main entry point. - */ -int main( int argc, char *argv[] ) -{ - int failed; - const char *rev; - SDL_version ver; - - /* Get options. */ - parse_options( argc, argv ); - - /* Defaults. */ - failed = 0; - - /* Print some text if verbose. */ - SDL_GetVersion( &ver ); - rev = SDL_GetRevision(); - SDL_ATprintVerbose( 1, "Running tests with SDL %d.%d.%d revision %s\n", - ver.major, ver.minor, ver.patch, rev ); - - /* Automatic tests. */ - if (run_platform) - failed += test_platform(); - if (run_rwops) - failed += test_rwops(); - if (run_rect) - failed += test_rect(); - if (run_surface) - failed += test_surface(); - if (run_render) - failed += test_render(); - if (run_audio) - failed += test_audio(); - - /* Manual tests. */ - if (run_manual) { - } - - /* Display more information if failed. */ - if (failed > 0) { - SDL_ATprintErr( "Tests run with SDL %d.%d.%d revision %d\n", - ver.major, ver.minor, ver.patch, rev ); - SDL_ATprintErr( "System is running %s and is %s endian\n", - SDL_GetPlatform(), -#if SDL_BYTEORDER == SDL_LIL_ENDIAN - "little" -#else - "big" -#endif - ); - } - - return failed; -} - diff --git a/test/test-automation/AUTHORS b/test/test-automation/AUTHORS deleted file mode 100644 index e69de29bb..000000000 diff --git a/test/test-automation/COPYING b/test/test-automation/COPYING deleted file mode 100644 index 9620b5afa..000000000 --- a/test/test-automation/COPYING +++ /dev/null @@ -1,24 +0,0 @@ -Note: - -The copyright below applies to source code in src/ and its -subdirectories unless otherwise noted. - -====== - -Copyright (C) 2011 Markus Kauppila - -This software is provided 'as-is', without any express or implied -warranty. In no event will the authors be held liable for any damages -arising from the use of this software. - -Permission is granted to anyone to use this software for any purpose, -including commercial applications, and to alter it and redistribute it -freely, subject to the following restrictions: - -1. The origin of this software must not be misrepresented; you must not - claim that you wrote the original software. If you use this software - in a product, an acknowledgment in the product documentation would be - appreciated but is not required. -2. Altered source versions must be plainly marked as such, and must not be - misrepresented as being the original software. -3. This notice may not be removed or altered from any source distribution. diff --git a/test/test-automation/ChangeLog b/test/test-automation/ChangeLog deleted file mode 100644 index e69de29bb..000000000 diff --git a/test/test-automation/DoxyFile b/test/test-automation/DoxyFile deleted file mode 100644 index 89ced195c..000000000 --- a/test/test-automation/DoxyFile +++ /dev/null @@ -1,1473 +0,0 @@ -# Doxyfile 1.5.7.1 - -# This file describes the settings to be used by the documentation system -# doxygen (www.doxygen.org) for a project -# -# All text after a hash (#) is considered a comment and will be ignored -# The format is: -# TAG = value [value, ...] -# For lists items can also be appended using: -# TAG += value [value, ...] -# Values that contain spaces should be placed between quotes (" ") - -#--------------------------------------------------------------------------- -# Project related configuration options -#--------------------------------------------------------------------------- - -# This tag specifies the encoding used for all characters in the config file -# that follow. The default is UTF-8 which is also the encoding used for all -# text before the first occurrence of this tag. Doxygen uses libiconv (or the -# iconv built into libc) for the transcoding. See -# http://www.gnu.org/software/libiconv for the list of possible encodings. - -DOXYFILE_ENCODING = UTF-8 - -# The PROJECT_NAME tag is a single word (or a sequence of words surrounded -# by quotes) that should identify the project. - -PROJECT_NAME = Test Runner - -# The PROJECT_NUMBER tag can be used to enter a project or revision number. -# This could be handy for archiving the generated documentation or -# if some version control system is used. - -PROJECT_NUMBER = - -# The OUTPUT_DIRECTORY tag is used to specify the (relative or absolute) -# base path where the generated documentation will be put. -# If a relative path is entered, it will be relative to the location -# where doxygen was started. If left blank the current directory will be used. - -OUTPUT_DIRECTORY = docs/ - -# If the CREATE_SUBDIRS tag is set to YES, then doxygen will create -# 4096 sub-directories (in 2 levels) under the output directory of each output -# format and will distribute the generated files over these directories. -# Enabling this option can be useful when feeding doxygen a huge amount of -# source files, where putting all generated files in the same directory would -# otherwise cause performance problems for the file system. - -CREATE_SUBDIRS = NO - -# The OUTPUT_LANGUAGE tag is used to specify the language in which all -# documentation generated by doxygen is written. Doxygen will use this -# information to generate all constant output in the proper language. -# The default language is English, other supported languages are: -# Afrikaans, Arabic, Brazilian, Catalan, Chinese, Chinese-Traditional, -# Croatian, Czech, Danish, Dutch, Farsi, Finnish, French, German, Greek, -# Hungarian, Italian, Japanese, Japanese-en (Japanese with English messages), -# Korean, Korean-en, Lithuanian, Norwegian, Macedonian, Persian, Polish, -# Portuguese, Romanian, Russian, Serbian, Serbian-Cyrilic, Slovak, Slovene, -# Spanish, Swedish, and Ukrainian. - -OUTPUT_LANGUAGE = English - -# If the BRIEF_MEMBER_DESC tag is set to YES (the default) Doxygen will -# include brief member descriptions after the members that are listed in -# the file and class documentation (similar to JavaDoc). -# Set to NO to disable this. - -BRIEF_MEMBER_DESC = YES - -# If the REPEAT_BRIEF tag is set to YES (the default) Doxygen will prepend -# the brief description of a member or function before the detailed description. -# Note: if both HIDE_UNDOC_MEMBERS and BRIEF_MEMBER_DESC are set to NO, the -# brief descriptions will be completely suppressed. - -REPEAT_BRIEF = YES - -# This tag implements a quasi-intelligent brief description abbreviator -# that is used to form the text in various listings. Each string -# in this list, if found as the leading text of the brief description, will be -# stripped from the text and the result after processing the whole list, is -# used as the annotated text. Otherwise, the brief description is used as-is. -# If left blank, the following values are used ("$name" is automatically -# replaced with the name of the entity): "The $name class" "The $name widget" -# "The $name file" "is" "provides" "specifies" "contains" -# "represents" "a" "an" "the" - -ABBREVIATE_BRIEF = - -# If the ALWAYS_DETAILED_SEC and REPEAT_BRIEF tags are both set to YES then -# Doxygen will generate a detailed section even if there is only a brief -# description. - -ALWAYS_DETAILED_SEC = NO - -# If the INLINE_INHERITED_MEMB tag is set to YES, doxygen will show all -# inherited members of a class in the documentation of that class as if those -# members were ordinary class members. Constructors, destructors and assignment -# operators of the base classes will not be shown. - -INLINE_INHERITED_MEMB = NO - -# If the FULL_PATH_NAMES tag is set to YES then Doxygen will prepend the full -# path before files name in the file list and in the header files. If set -# to NO the shortest path that makes the file name unique will be used. - -FULL_PATH_NAMES = YES - -# If the FULL_PATH_NAMES tag is set to YES then the STRIP_FROM_PATH tag -# can be used to strip a user-defined part of the path. Stripping is -# only done if one of the specified strings matches the left-hand part of -# the path. The tag can be used to show relative paths in the file list. -# If left blank the directory from which doxygen is run is used as the -# path to strip. - -STRIP_FROM_PATH = - -# The STRIP_FROM_INC_PATH tag can be used to strip a user-defined part of -# the path mentioned in the documentation of a class, which tells -# the reader which header file to include in order to use a class. -# If left blank only the name of the header file containing the class -# definition is used. Otherwise one should specify the include paths that -# are normally passed to the compiler using the -I flag. - -STRIP_FROM_INC_PATH = - -# If the SHORT_NAMES tag is set to YES, doxygen will generate much shorter -# (but less readable) file names. This can be useful is your file systems -# doesn't support long names like on DOS, Mac, or CD-ROM. - -SHORT_NAMES = NO - -# If the JAVADOC_AUTOBRIEF tag is set to YES then Doxygen -# will interpret the first line (until the first dot) of a JavaDoc-style -# comment as the brief description. If set to NO, the JavaDoc -# comments will behave just like regular Qt-style comments -# (thus requiring an explicit @brief command for a brief description.) - -JAVADOC_AUTOBRIEF = NO - -# If the QT_AUTOBRIEF tag is set to YES then Doxygen will -# interpret the first line (until the first dot) of a Qt-style -# comment as the brief description. If set to NO, the comments -# will behave just like regular Qt-style comments (thus requiring -# an explicit \brief command for a brief description.) - -QT_AUTOBRIEF = YES - -# The MULTILINE_CPP_IS_BRIEF tag can be set to YES to make Doxygen -# treat a multi-line C++ special comment block (i.e. a block of //! or /// -# comments) as a brief description. This used to be the default behaviour. -# The new default is to treat a multi-line C++ comment block as a detailed -# description. Set this tag to YES if you prefer the old behaviour instead. - -MULTILINE_CPP_IS_BRIEF = NO - -# If the INHERIT_DOCS tag is set to YES (the default) then an undocumented -# member inherits the documentation from any documented member that it -# re-implements. - -INHERIT_DOCS = YES - -# If the SEPARATE_MEMBER_PAGES tag is set to YES, then doxygen will produce -# a new page for each member. If set to NO, the documentation of a member will -# be part of the file/class/namespace that contains it. - -SEPARATE_MEMBER_PAGES = NO - -# The TAB_SIZE tag can be used to set the number of spaces in a tab. -# Doxygen uses this value to replace tabs by spaces in code fragments. - -TAB_SIZE = 4 - -# This tag can be used to specify a number of aliases that acts -# as commands in the documentation. An alias has the form "name=value". -# For example adding "sideeffect=\par Side Effects:\n" will allow you to -# put the command \sideeffect (or @sideeffect) in the documentation, which -# will result in a user-defined paragraph with heading "Side Effects:". -# You can put \n's in the value part of an alias to insert newlines. - -ALIASES = - -# Set the OPTIMIZE_OUTPUT_FOR_C tag to YES if your project consists of C -# sources only. Doxygen will then generate output that is more tailored for C. -# For instance, some of the names that are used will be different. The list -# of all members will be omitted, etc. - -OPTIMIZE_OUTPUT_FOR_C = YES - -# Set the OPTIMIZE_OUTPUT_JAVA tag to YES if your project consists of Java -# sources only. Doxygen will then generate output that is more tailored for -# Java. For instance, namespaces will be presented as packages, qualified -# scopes will look different, etc. - -OPTIMIZE_OUTPUT_JAVA = NO - -# Set the OPTIMIZE_FOR_FORTRAN tag to YES if your project consists of Fortran -# sources only. Doxygen will then generate output that is more tailored for -# Fortran. - -OPTIMIZE_FOR_FORTRAN = NO - -# Set the OPTIMIZE_OUTPUT_VHDL tag to YES if your project consists of VHDL -# sources. Doxygen will then generate output that is tailored for -# VHDL. - -OPTIMIZE_OUTPUT_VHDL = NO - -# If you use STL classes (i.e. std::string, std::vector, etc.) but do not want -# to include (a tag file for) the STL sources as input, then you should -# set this tag to YES in order to let doxygen match functions declarations and -# definitions whose arguments contain STL classes (e.g. func(std::string); v.s. -# func(std::string) {}). This also make the inheritance and collaboration -# diagrams that involve STL classes more complete and accurate. - -BUILTIN_STL_SUPPORT = NO - -# If you use Microsoft's C++/CLI language, you should set this option to YES to -# enable parsing support. - -CPP_CLI_SUPPORT = NO - -# Set the SIP_SUPPORT tag to YES if your project consists of sip sources only. -# Doxygen will parse them like normal C++ but will assume all classes use public -# instead of private inheritance when no explicit protection keyword is present. - -SIP_SUPPORT = NO - -# For Microsoft's IDL there are propget and propput attributes to indicate getter -# and setter methods for a property. Setting this option to YES (the default) -# will make doxygen to replace the get and set methods by a property in the -# documentation. This will only work if the methods are indeed getting or -# setting a simple type. If this is not the case, or you want to show the -# methods anyway, you should set this option to NO. - -IDL_PROPERTY_SUPPORT = YES - -# If member grouping is used in the documentation and the DISTRIBUTE_GROUP_DOC -# tag is set to YES, then doxygen will reuse the documentation of the first -# member in the group (if any) for the other members of the group. By default -# all members of a group must be documented explicitly. - -DISTRIBUTE_GROUP_DOC = NO - -# Set the SUBGROUPING tag to YES (the default) to allow class member groups of -# the same type (for instance a group of public functions) to be put as a -# subgroup of that type (e.g. under the Public Functions section). Set it to -# NO to prevent subgrouping. Alternatively, this can be done per class using -# the \nosubgrouping command. - -SUBGROUPING = YES - -# When TYPEDEF_HIDES_STRUCT is enabled, a typedef of a struct, union, or enum -# is documented as struct, union, or enum with the name of the typedef. So -# typedef struct TypeS {} TypeT, will appear in the documentation as a struct -# with name TypeT. When disabled the typedef will appear as a member of a file, -# namespace, or class. And the struct will be named TypeS. This can typically -# be useful for C code in case the coding convention dictates that all compound -# types are typedef'ed and only the typedef is referenced, never the tag name. - -TYPEDEF_HIDES_STRUCT = NO - -# The SYMBOL_CACHE_SIZE determines the size of the internal cache use to -# determine which symbols to keep in memory and which to flush to disk. -# When the cache is full, less often used symbols will be written to disk. -# For small to medium size projects (<1000 input files) the default value is -# probably good enough. For larger projects a too small cache size can cause -# doxygen to be busy swapping symbols to and from disk most of the time -# causing a significant performance penality. -# If the system has enough physical memory increasing the cache will improve the -# performance by keeping more symbols in memory. Note that the value works on -# a logarithmic scale so increasing the size by one will rougly double the -# memory usage. The cache size is given by this formula: -# 2^(16+SYMBOL_CACHE_SIZE). The valid range is 0..9, the default is 0, -# corresponding to a cache size of 2^16 = 65536 symbols - -SYMBOL_CACHE_SIZE = 0 - -#--------------------------------------------------------------------------- -# Build related configuration options -#--------------------------------------------------------------------------- - -# If the EXTRACT_ALL tag is set to YES doxygen will assume all entities in -# documentation are documented, even if no documentation was available. -# Private class members and static file members will be hidden unless -# the EXTRACT_PRIVATE and EXTRACT_STATIC tags are set to YES - -EXTRACT_ALL = YES - -# If the EXTRACT_PRIVATE tag is set to YES all private members of a class -# will be included in the documentation. - -EXTRACT_PRIVATE = NO - -# If the EXTRACT_STATIC tag is set to YES all static members of a file -# will be included in the documentation. - -EXTRACT_STATIC = NO - -# If the EXTRACT_LOCAL_CLASSES tag is set to YES classes (and structs) -# defined locally in source files will be included in the documentation. -# If set to NO only classes defined in header files are included. - -EXTRACT_LOCAL_CLASSES = YES - -# This flag is only useful for Objective-C code. When set to YES local -# methods, which are defined in the implementation section but not in -# the interface are included in the documentation. -# If set to NO (the default) only methods in the interface are included. - -EXTRACT_LOCAL_METHODS = NO - -# If this flag is set to YES, the members of anonymous namespaces will be -# extracted and appear in the documentation as a namespace called -# 'anonymous_namespace{file}', where file will be replaced with the base -# name of the file that contains the anonymous namespace. By default -# anonymous namespace are hidden. - -EXTRACT_ANON_NSPACES = NO - -# If the HIDE_UNDOC_MEMBERS tag is set to YES, Doxygen will hide all -# undocumented members of documented classes, files or namespaces. -# If set to NO (the default) these members will be included in the -# various overviews, but no documentation section is generated. -# This option has no effect if EXTRACT_ALL is enabled. - -HIDE_UNDOC_MEMBERS = NO - -# If the HIDE_UNDOC_CLASSES tag is set to YES, Doxygen will hide all -# undocumented classes that are normally visible in the class hierarchy. -# If set to NO (the default) these classes will be included in the various -# overviews. This option has no effect if EXTRACT_ALL is enabled. - -HIDE_UNDOC_CLASSES = NO - -# If the HIDE_FRIEND_COMPOUNDS tag is set to YES, Doxygen will hide all -# friend (class|struct|union) declarations. -# If set to NO (the default) these declarations will be included in the -# documentation. - -HIDE_FRIEND_COMPOUNDS = NO - -# If the HIDE_IN_BODY_DOCS tag is set to YES, Doxygen will hide any -# documentation blocks found inside the body of a function. -# If set to NO (the default) these blocks will be appended to the -# function's detailed documentation block. - -HIDE_IN_BODY_DOCS = NO - -# The INTERNAL_DOCS tag determines if documentation -# that is typed after a \internal command is included. If the tag is set -# to NO (the default) then the documentation will be excluded. -# Set it to YES to include the internal documentation. - -INTERNAL_DOCS = NO - -# If the CASE_SENSE_NAMES tag is set to NO then Doxygen will only generate -# file names in lower-case letters. If set to YES upper-case letters are also -# allowed. This is useful if you have classes or files whose names only differ -# in case and if your file system supports case sensitive file names. Windows -# and Mac users are advised to set this option to NO. - -CASE_SENSE_NAMES = NO - -# If the HIDE_SCOPE_NAMES tag is set to NO (the default) then Doxygen -# will show members with their full class and namespace scopes in the -# documentation. If set to YES the scope will be hidden. - -HIDE_SCOPE_NAMES = NO - -# If the SHOW_INCLUDE_FILES tag is set to YES (the default) then Doxygen -# will put a list of the files that are included by a file in the documentation -# of that file. - -SHOW_INCLUDE_FILES = YES - -# If the INLINE_INFO tag is set to YES (the default) then a tag [inline] -# is inserted in the documentation for inline members. - -INLINE_INFO = YES - -# If the SORT_MEMBER_DOCS tag is set to YES (the default) then doxygen -# will sort the (detailed) documentation of file and class members -# alphabetically by member name. If set to NO the members will appear in -# declaration order. - -SORT_MEMBER_DOCS = YES - -# If the SORT_BRIEF_DOCS tag is set to YES then doxygen will sort the -# brief documentation of file, namespace and class members alphabetically -# by member name. If set to NO (the default) the members will appear in -# declaration order. - -SORT_BRIEF_DOCS = NO - -# If the SORT_GROUP_NAMES tag is set to YES then doxygen will sort the -# hierarchy of group names into alphabetical order. If set to NO (the default) -# the group names will appear in their defined order. - -SORT_GROUP_NAMES = NO - -# If the SORT_BY_SCOPE_NAME tag is set to YES, the class list will be -# sorted by fully-qualified names, including namespaces. If set to -# NO (the default), the class list will be sorted only by class name, -# not including the namespace part. -# Note: This option is not very useful if HIDE_SCOPE_NAMES is set to YES. -# Note: This option applies only to the class list, not to the -# alphabetical list. - -SORT_BY_SCOPE_NAME = NO - -# The GENERATE_TODOLIST tag can be used to enable (YES) or -# disable (NO) the todo list. This list is created by putting \todo -# commands in the documentation. - -GENERATE_TODOLIST = YES - -# The GENERATE_TESTLIST tag can be used to enable (YES) or -# disable (NO) the test list. This list is created by putting \test -# commands in the documentation. - -GENERATE_TESTLIST = YES - -# The GENERATE_BUGLIST tag can be used to enable (YES) or -# disable (NO) the bug list. This list is created by putting \bug -# commands in the documentation. - -GENERATE_BUGLIST = YES - -# The GENERATE_DEPRECATEDLIST tag can be used to enable (YES) or -# disable (NO) the deprecated list. This list is created by putting -# \deprecated commands in the documentation. - -GENERATE_DEPRECATEDLIST= YES - -# The ENABLED_SECTIONS tag can be used to enable conditional -# documentation sections, marked by \if sectionname ... \endif. - -ENABLED_SECTIONS = - -# The MAX_INITIALIZER_LINES tag determines the maximum number of lines -# the initial value of a variable or define consists of for it to appear in -# the documentation. If the initializer consists of more lines than specified -# here it will be hidden. Use a value of 0 to hide initializers completely. -# The appearance of the initializer of individual variables and defines in the -# documentation can be controlled using \showinitializer or \hideinitializer -# command in the documentation regardless of this setting. - -MAX_INITIALIZER_LINES = 30 - -# Set the SHOW_USED_FILES tag to NO to disable the list of files generated -# at the bottom of the documentation of classes and structs. If set to YES the -# list will mention the files that were used to generate the documentation. - -SHOW_USED_FILES = YES - -# If the sources in your project are distributed over multiple directories -# then setting the SHOW_DIRECTORIES tag to YES will show the directory hierarchy -# in the documentation. The default is NO. - -SHOW_DIRECTORIES = NO - -# Set the SHOW_FILES tag to NO to disable the generation of the Files page. -# This will remove the Files entry from the Quick Index and from the -# Folder Tree View (if specified). The default is YES. - -SHOW_FILES = YES - -# Set the SHOW_NAMESPACES tag to NO to disable the generation of the -# Namespaces page. This will remove the Namespaces entry from the Quick Index -# and from the Folder Tree View (if specified). The default is YES. - -SHOW_NAMESPACES = YES - -# The FILE_VERSION_FILTER tag can be used to specify a program or script that -# doxygen should invoke to get the current version for each file (typically from -# the version control system). Doxygen will invoke the program by executing (via -# popen()) the command , where is the value of -# the FILE_VERSION_FILTER tag, and is the name of an input file -# provided by doxygen. Whatever the program writes to standard output -# is used as the file version. See the manual for examples. - -FILE_VERSION_FILTER = - -# The LAYOUT_FILE tag can be used to specify a layout file which will be parsed by -# doxygen. The layout file controls the global structure of the generated output files -# in an output format independent way. The create the layout file that represents -# doxygen's defaults, run doxygen with the -l option. You can optionally specify a -# file name after the option, if omitted DoxygenLayout.xml will be used as the name -# of the layout file. - -LAYOUT_FILE = - -#--------------------------------------------------------------------------- -# configuration options related to warning and progress messages -#--------------------------------------------------------------------------- - -# The QUIET tag can be used to turn on/off the messages that are generated -# by doxygen. Possible values are YES and NO. If left blank NO is used. - -QUIET = NO - -# The WARNINGS tag can be used to turn on/off the warning messages that are -# generated by doxygen. Possible values are YES and NO. If left blank -# NO is used. - -WARNINGS = YES - -# If WARN_IF_UNDOCUMENTED is set to YES, then doxygen will generate warnings -# for undocumented members. If EXTRACT_ALL is set to YES then this flag will -# automatically be disabled. - -WARN_IF_UNDOCUMENTED = YES - -# If WARN_IF_DOC_ERROR is set to YES, doxygen will generate warnings for -# potential errors in the documentation, such as not documenting some -# parameters in a documented function, or documenting parameters that -# don't exist or using markup commands wrongly. - -WARN_IF_DOC_ERROR = YES - -# This WARN_NO_PARAMDOC option can be abled to get warnings for -# functions that are documented, but have no documentation for their parameters -# or return value. If set to NO (the default) doxygen will only warn about -# wrong or incomplete parameter documentation, but not about the absence of -# documentation. - -WARN_NO_PARAMDOC = NO - -# The WARN_FORMAT tag determines the format of the warning messages that -# doxygen can produce. The string should contain the $file, $line, and $text -# tags, which will be replaced by the file and line number from which the -# warning originated and the warning text. Optionally the format may contain -# $version, which will be replaced by the version of the file (if it could -# be obtained via FILE_VERSION_FILTER) - -WARN_FORMAT = "$file:$line: $text" - -# The WARN_LOGFILE tag can be used to specify a file to which warning -# and error messages should be written. If left blank the output is written -# to stderr. - -WARN_LOGFILE = - -#--------------------------------------------------------------------------- -# configuration options related to the input files -#--------------------------------------------------------------------------- - -# The INPUT tag can be used to specify the files and/or directories that contain -# documented source files. You may enter file names like "myfile.cpp" or -# directories like "/usr/src/myproject". Separate the files or directories -# with spaces. - -INPUT = - -# This tag can be used to specify the character encoding of the source files -# that doxygen parses. Internally doxygen uses the UTF-8 encoding, which is -# also the default input encoding. Doxygen uses libiconv (or the iconv built -# into libc) for the transcoding. See http://www.gnu.org/software/libiconv for -# the list of possible encodings. - -INPUT_ENCODING = UTF-8 - -# If the value of the INPUT tag contains directories, you can use the -# FILE_PATTERNS tag to specify one or more wildcard pattern (like *.cpp -# and *.h) to filter out the source-files in the directories. If left -# blank the following patterns are tested: -# *.c *.cc *.cxx *.cpp *.c++ *.java *.ii *.ixx *.ipp *.i++ *.inl *.h *.hh *.hxx -# *.hpp *.h++ *.idl *.odl *.cs *.php *.php3 *.inc *.m *.mm *.py *.f90 - -FILE_PATTERNS = *.c *.h README - -# The RECURSIVE tag can be used to turn specify whether or not subdirectories -# should be searched for input files as well. Possible values are YES and NO. -# If left blank NO is used. - -RECURSIVE = YES - -# The EXCLUDE tag can be used to specify files and/or directories that should -# excluded from the INPUT source files. This way you can easily exclude a -# subdirectory from a directory tree whose root is specified with the INPUT tag. - -EXCLUDE = - -# The EXCLUDE_SYMLINKS tag can be used select whether or not files or -# directories that are symbolic links (a Unix filesystem feature) are excluded -# from the input. - -EXCLUDE_SYMLINKS = NO - -# If the value of the INPUT tag contains directories, you can use the -# EXCLUDE_PATTERNS tag to specify one or more wildcard patterns to exclude -# certain files from those directories. Note that the wildcards are matched -# against the file with absolute path, so to exclude all test directories -# for example use the pattern */test/* - -EXCLUDE_PATTERNS = - -# The EXCLUDE_SYMBOLS tag can be used to specify one or more symbol names -# (namespaces, classes, functions, etc.) that should be excluded from the -# output. The symbol name can be a fully qualified name, a word, or if the -# wildcard * is used, a substring. Examples: ANamespace, AClass, -# AClass::ANamespace, ANamespace::*Test - -EXCLUDE_SYMBOLS = - -# The EXAMPLE_PATH tag can be used to specify one or more files or -# directories that contain example code fragments that are included (see -# the \include command). - -EXAMPLE_PATH = - -# If the value of the EXAMPLE_PATH tag contains directories, you can use the -# EXAMPLE_PATTERNS tag to specify one or more wildcard pattern (like *.cpp -# and *.h) to filter out the source-files in the directories. If left -# blank all files are included. - -EXAMPLE_PATTERNS = - -# If the EXAMPLE_RECURSIVE tag is set to YES then subdirectories will be -# searched for input files to be used with the \include or \dontinclude -# commands irrespective of the value of the RECURSIVE tag. -# Possible values are YES and NO. If left blank NO is used. - -EXAMPLE_RECURSIVE = NO - -# The IMAGE_PATH tag can be used to specify one or more files or -# directories that contain image that are included in the documentation (see -# the \image command). - -IMAGE_PATH = - -# The INPUT_FILTER tag can be used to specify a program that doxygen should -# invoke to filter for each input file. Doxygen will invoke the filter program -# by executing (via popen()) the command , where -# is the value of the INPUT_FILTER tag, and is the name of an -# input file. Doxygen will then use the output that the filter program writes -# to standard output. If FILTER_PATTERNS is specified, this tag will be -# ignored. - -INPUT_FILTER = - -# The FILTER_PATTERNS tag can be used to specify filters on a per file pattern -# basis. Doxygen will compare the file name with each pattern and apply the -# filter if there is a match. The filters are a list of the form: -# pattern=filter (like *.cpp=my_cpp_filter). See INPUT_FILTER for further -# info on how filters are used. If FILTER_PATTERNS is empty, INPUT_FILTER -# is applied to all files. - -FILTER_PATTERNS = - -# If the FILTER_SOURCE_FILES tag is set to YES, the input filter (if set using -# INPUT_FILTER) will be used to filter the input files when producing source -# files to browse (i.e. when SOURCE_BROWSER is set to YES). - -FILTER_SOURCE_FILES = NO - -#--------------------------------------------------------------------------- -# configuration options related to source browsing -#--------------------------------------------------------------------------- - -# If the SOURCE_BROWSER tag is set to YES then a list of source files will -# be generated. Documented entities will be cross-referenced with these sources. -# Note: To get rid of all source code in the generated output, make sure also -# VERBATIM_HEADERS is set to NO. - -SOURCE_BROWSER = YES - -# Setting the INLINE_SOURCES tag to YES will include the body -# of functions and classes directly in the documentation. - -INLINE_SOURCES = NO - -# Setting the STRIP_CODE_COMMENTS tag to YES (the default) will instruct -# doxygen to hide any special comment blocks from generated source code -# fragments. Normal C and C++ comments will always remain visible. - -STRIP_CODE_COMMENTS = NO - -# If the REFERENCED_BY_RELATION tag is set to YES -# then for each documented function all documented -# functions referencing it will be listed. - -REFERENCED_BY_RELATION = NO - -# If the REFERENCES_RELATION tag is set to YES -# then for each documented function all documented entities -# called/used by that function will be listed. - -REFERENCES_RELATION = NO - -# If the REFERENCES_LINK_SOURCE tag is set to YES (the default) -# and SOURCE_BROWSER tag is set to YES, then the hyperlinks from -# functions in REFERENCES_RELATION and REFERENCED_BY_RELATION lists will -# link to the source code. Otherwise they will link to the documentstion. - -REFERENCES_LINK_SOURCE = YES - -# If the USE_HTAGS tag is set to YES then the references to source code -# will point to the HTML generated by the htags(1) tool instead of doxygen -# built-in source browser. The htags tool is part of GNU's global source -# tagging system (see http://www.gnu.org/software/global/global.html). You -# will need version 4.8.6 or higher. - -USE_HTAGS = NO - -# If the VERBATIM_HEADERS tag is set to YES (the default) then Doxygen -# will generate a verbatim copy of the header file for each class for -# which an include is specified. Set to NO to disable this. - -VERBATIM_HEADERS = YES - -#--------------------------------------------------------------------------- -# configuration options related to the alphabetical class index -#--------------------------------------------------------------------------- - -# If the ALPHABETICAL_INDEX tag is set to YES, an alphabetical index -# of all compounds will be generated. Enable this if the project -# contains a lot of classes, structs, unions or interfaces. - -ALPHABETICAL_INDEX = NO - -# If the alphabetical index is enabled (see ALPHABETICAL_INDEX) then -# the COLS_IN_ALPHA_INDEX tag can be used to specify the number of columns -# in which this list will be split (can be a number in the range [1..20]) - -COLS_IN_ALPHA_INDEX = 5 - -# In case all classes in a project start with a common prefix, all -# classes will be put under the same header in the alphabetical index. -# The IGNORE_PREFIX tag can be used to specify one or more prefixes that -# should be ignored while generating the index headers. - -IGNORE_PREFIX = - -#--------------------------------------------------------------------------- -# configuration options related to the HTML output -#--------------------------------------------------------------------------- - -# If the GENERATE_HTML tag is set to YES (the default) Doxygen will -# generate HTML output. - -GENERATE_HTML = YES - -# The HTML_OUTPUT tag is used to specify where the HTML docs will be put. -# If a relative path is entered the value of OUTPUT_DIRECTORY will be -# put in front of it. If left blank `html' will be used as the default path. - -HTML_OUTPUT = html - -# The HTML_FILE_EXTENSION tag can be used to specify the file extension for -# each generated HTML page (for example: .htm,.php,.asp). If it is left blank -# doxygen will generate files with .html extension. - -HTML_FILE_EXTENSION = .html - -# The HTML_HEADER tag can be used to specify a personal HTML header for -# each generated HTML page. If it is left blank doxygen will generate a -# standard header. - -HTML_HEADER = - -# The HTML_FOOTER tag can be used to specify a personal HTML footer for -# each generated HTML page. If it is left blank doxygen will generate a -# standard footer. - -HTML_FOOTER = - -# The HTML_STYLESHEET tag can be used to specify a user-defined cascading -# style sheet that is used by each HTML page. It can be used to -# fine-tune the look of the HTML output. If the tag is left blank doxygen -# will generate a default style sheet. Note that doxygen will try to copy -# the style sheet file to the HTML output directory, so don't put your own -# stylesheet in the HTML output directory as well, or it will be erased! - -HTML_STYLESHEET = - -# If the HTML_ALIGN_MEMBERS tag is set to YES, the members of classes, -# files or namespaces will be aligned in HTML using tables. If set to -# NO a bullet list will be used. - -HTML_ALIGN_MEMBERS = YES - -# If the HTML_DYNAMIC_SECTIONS tag is set to YES then the generated HTML -# documentation will contain sections that can be hidden and shown after the -# page has loaded. For this to work a browser that supports -# JavaScript and DHTML is required (for instance Mozilla 1.0+, Firefox -# Netscape 6.0+, Internet explorer 5.0+, Konqueror, or Safari). - -HTML_DYNAMIC_SECTIONS = NO - -# If the GENERATE_DOCSET tag is set to YES, additional index files -# will be generated that can be used as input for Apple's Xcode 3 -# integrated development environment, introduced with OSX 10.5 (Leopard). -# To create a documentation set, doxygen will generate a Makefile in the -# HTML output directory. Running make will produce the docset in that -# directory and running "make install" will install the docset in -# ~/Library/Developer/Shared/Documentation/DocSets so that Xcode will find -# it at startup. -# See http://developer.apple.com/tools/creatingdocsetswithdoxygen.html for more information. - -GENERATE_DOCSET = NO - -# When GENERATE_DOCSET tag is set to YES, this tag determines the name of the -# feed. A documentation feed provides an umbrella under which multiple -# documentation sets from a single provider (such as a company or product suite) -# can be grouped. - -DOCSET_FEEDNAME = "Doxygen generated docs" - -# When GENERATE_DOCSET tag is set to YES, this tag specifies a string that -# should uniquely identify the documentation set bundle. This should be a -# reverse domain-name style string, e.g. com.mycompany.MyDocSet. Doxygen -# will append .docset to the name. - -DOCSET_BUNDLE_ID = org.doxygen.Project - -# If the GENERATE_HTMLHELP tag is set to YES, additional index files -# will be generated that can be used as input for tools like the -# Microsoft HTML help workshop to generate a compiled HTML help file (.chm) -# of the generated HTML documentation. - -GENERATE_HTMLHELP = NO - -# If the GENERATE_HTMLHELP tag is set to YES, the CHM_FILE tag can -# be used to specify the file name of the resulting .chm file. You -# can add a path in front of the file if the result should not be -# written to the html output directory. - -CHM_FILE = - -# If the GENERATE_HTMLHELP tag is set to YES, the HHC_LOCATION tag can -# be used to specify the location (absolute path including file name) of -# the HTML help compiler (hhc.exe). If non-empty doxygen will try to run -# the HTML help compiler on the generated index.hhp. - -HHC_LOCATION = - -# If the GENERATE_HTMLHELP tag is set to YES, the GENERATE_CHI flag -# controls if a separate .chi index file is generated (YES) or that -# it should be included in the master .chm file (NO). - -GENERATE_CHI = NO - -# If the GENERATE_HTMLHELP tag is set to YES, the CHM_INDEX_ENCODING -# is used to encode HtmlHelp index (hhk), content (hhc) and project file -# content. - -CHM_INDEX_ENCODING = - -# If the GENERATE_HTMLHELP tag is set to YES, the BINARY_TOC flag -# controls whether a binary table of contents is generated (YES) or a -# normal table of contents (NO) in the .chm file. - -BINARY_TOC = YES - -# The TOC_EXPAND flag can be set to YES to add extra items for group members -# to the contents of the HTML help documentation and to the tree view. - -TOC_EXPAND = YES - -# If the GENERATE_QHP tag is set to YES and both QHP_NAMESPACE and QHP_VIRTUAL_FOLDER -# are set, an additional index file will be generated that can be used as input for -# Qt's qhelpgenerator to generate a Qt Compressed Help (.qch) of the generated -# HTML documentation. - -GENERATE_QHP = NO - -# If the QHG_LOCATION tag is specified, the QCH_FILE tag can -# be used to specify the file name of the resulting .qch file. -# The path specified is relative to the HTML output folder. - -QCH_FILE = - -# The QHP_NAMESPACE tag specifies the namespace to use when generating -# Qt Help Project output. For more information please see -# Qt Help Project / Namespace. - -QHP_NAMESPACE = org.doxygen.Project - -# The QHP_VIRTUAL_FOLDER tag specifies the namespace to use when generating -# Qt Help Project output. For more information please see -# Qt Help Project / Virtual Folders. - -QHP_VIRTUAL_FOLDER = doc - -# If the GENERATE_QHP tag is set to YES, the QHG_LOCATION tag can -# be used to specify the location of Qt's qhelpgenerator. -# If non-empty doxygen will try to run qhelpgenerator on the generated -# .qhp file . - -QHG_LOCATION = - -# The DISABLE_INDEX tag can be used to turn on/off the condensed index at -# top of each HTML page. The value NO (the default) enables the index and -# the value YES disables it. - -DISABLE_INDEX = NO - -# This tag can be used to set the number of enum values (range [1..20]) -# that doxygen will group on one line in the generated HTML documentation. - -ENUM_VALUES_PER_LINE = 4 - -# The GENERATE_TREEVIEW tag is used to specify whether a tree-like index -# structure should be generated to display hierarchical information. -# If the tag value is set to FRAME, a side panel will be generated -# containing a tree-like index structure (just like the one that -# is generated for HTML Help). For this to work a browser that supports -# JavaScript, DHTML, CSS and frames is required (for instance Mozilla 1.0+, -# Netscape 6.0+, Internet explorer 5.0+, or Konqueror). Windows users are -# probably better off using the HTML help feature. Other possible values -# for this tag are: HIERARCHIES, which will generate the Groups, Directories, -# and Class Hierarchy pages using a tree view instead of an ordered list; -# ALL, which combines the behavior of FRAME and HIERARCHIES; and NONE, which -# disables this behavior completely. For backwards compatibility with previous -# releases of Doxygen, the values YES and NO are equivalent to FRAME and NONE -# respectively. - -GENERATE_TREEVIEW = NONE - -# If the treeview is enabled (see GENERATE_TREEVIEW) then this tag can be -# used to set the initial width (in pixels) of the frame in which the tree -# is shown. - -TREEVIEW_WIDTH = 250 - -# Use this tag to change the font size of Latex formulas included -# as images in the HTML documentation. The default is 10. Note that -# when you change the font size after a successful doxygen run you need -# to manually remove any form_*.png images from the HTML output directory -# to force them to be regenerated. - -FORMULA_FONTSIZE = 10 - -#--------------------------------------------------------------------------- -# configuration options related to the LaTeX output -#--------------------------------------------------------------------------- - -# If the GENERATE_LATEX tag is set to YES (the default) Doxygen will -# generate Latex output. - -GENERATE_LATEX = NO - -# The LATEX_OUTPUT tag is used to specify where the LaTeX docs will be put. -# If a relative path is entered the value of OUTPUT_DIRECTORY will be -# put in front of it. If left blank `latex' will be used as the default path. - -LATEX_OUTPUT = latex - -# The LATEX_CMD_NAME tag can be used to specify the LaTeX command name to be -# invoked. If left blank `latex' will be used as the default command name. - -LATEX_CMD_NAME = latex - -# The MAKEINDEX_CMD_NAME tag can be used to specify the command name to -# generate index for LaTeX. If left blank `makeindex' will be used as the -# default command name. - -MAKEINDEX_CMD_NAME = makeindex - -# If the COMPACT_LATEX tag is set to YES Doxygen generates more compact -# LaTeX documents. This may be useful for small projects and may help to -# save some trees in general. - -COMPACT_LATEX = NO - -# The PAPER_TYPE tag can be used to set the paper type that is used -# by the printer. Possible values are: a4, a4wide, letter, legal and -# executive. If left blank a4wide will be used. - -PAPER_TYPE = a4wide - -# The EXTRA_PACKAGES tag can be to specify one or more names of LaTeX -# packages that should be included in the LaTeX output. - -EXTRA_PACKAGES = - -# The LATEX_HEADER tag can be used to specify a personal LaTeX header for -# the generated latex document. The header should contain everything until -# the first chapter. If it is left blank doxygen will generate a -# standard header. Notice: only use this tag if you know what you are doing! - -LATEX_HEADER = - -# If the PDF_HYPERLINKS tag is set to YES, the LaTeX that is generated -# is prepared for conversion to pdf (using ps2pdf). The pdf file will -# contain links (just like the HTML output) instead of page references -# This makes the output suitable for online browsing using a pdf viewer. - -PDF_HYPERLINKS = YES - -# If the USE_PDFLATEX tag is set to YES, pdflatex will be used instead of -# plain latex in the generated Makefile. Set this option to YES to get a -# higher quality PDF documentation. - -USE_PDFLATEX = YES - -# If the LATEX_BATCHMODE tag is set to YES, doxygen will add the \\batchmode. -# command to the generated LaTeX files. This will instruct LaTeX to keep -# running if errors occur, instead of asking the user for help. -# This option is also used when generating formulas in HTML. - -LATEX_BATCHMODE = NO - -# If LATEX_HIDE_INDICES is set to YES then doxygen will not -# include the index chapters (such as File Index, Compound Index, etc.) -# in the output. - -LATEX_HIDE_INDICES = NO - -#--------------------------------------------------------------------------- -# configuration options related to the RTF output -#--------------------------------------------------------------------------- - -# If the GENERATE_RTF tag is set to YES Doxygen will generate RTF output -# The RTF output is optimized for Word 97 and may not look very pretty with -# other RTF readers or editors. - -GENERATE_RTF = NO - -# The RTF_OUTPUT tag is used to specify where the RTF docs will be put. -# If a relative path is entered the value of OUTPUT_DIRECTORY will be -# put in front of it. If left blank `rtf' will be used as the default path. - -RTF_OUTPUT = rtf - -# If the COMPACT_RTF tag is set to YES Doxygen generates more compact -# RTF documents. This may be useful for small projects and may help to -# save some trees in general. - -COMPACT_RTF = NO - -# If the RTF_HYPERLINKS tag is set to YES, the RTF that is generated -# will contain hyperlink fields. The RTF file will -# contain links (just like the HTML output) instead of page references. -# This makes the output suitable for online browsing using WORD or other -# programs which support those fields. -# Note: wordpad (write) and others do not support links. - -RTF_HYPERLINKS = NO - -# Load stylesheet definitions from file. Syntax is similar to doxygen's -# config file, i.e. a series of assignments. You only have to provide -# replacements, missing definitions are set to their default value. - -RTF_STYLESHEET_FILE = - -# Set optional variables used in the generation of an rtf document. -# Syntax is similar to doxygen's config file. - -RTF_EXTENSIONS_FILE = - -#--------------------------------------------------------------------------- -# configuration options related to the man page output -#--------------------------------------------------------------------------- - -# If the GENERATE_MAN tag is set to YES (the default) Doxygen will -# generate man pages - -GENERATE_MAN = NO - -# The MAN_OUTPUT tag is used to specify where the man pages will be put. -# If a relative path is entered the value of OUTPUT_DIRECTORY will be -# put in front of it. If left blank `man' will be used as the default path. - -MAN_OUTPUT = man - -# The MAN_EXTENSION tag determines the extension that is added to -# the generated man pages (default is the subroutine's section .3) - -MAN_EXTENSION = .3 - -# If the MAN_LINKS tag is set to YES and Doxygen generates man output, -# then it will generate one additional man file for each entity -# documented in the real man page(s). These additional files -# only source the real man page, but without them the man command -# would be unable to find the correct page. The default is NO. - -MAN_LINKS = NO - -#--------------------------------------------------------------------------- -# configuration options related to the XML output -#--------------------------------------------------------------------------- - -# If the GENERATE_XML tag is set to YES Doxygen will -# generate an XML file that captures the structure of -# the code including all documentation. - -GENERATE_XML = NO - -# The XML_OUTPUT tag is used to specify where the XML pages will be put. -# If a relative path is entered the value of OUTPUT_DIRECTORY will be -# put in front of it. If left blank `xml' will be used as the default path. - -XML_OUTPUT = xml - -# The XML_SCHEMA tag can be used to specify an XML schema, -# which can be used by a validating XML parser to check the -# syntax of the XML files. - -XML_SCHEMA = - -# The XML_DTD tag can be used to specify an XML DTD, -# which can be used by a validating XML parser to check the -# syntax of the XML files. - -XML_DTD = - -# If the XML_PROGRAMLISTING tag is set to YES Doxygen will -# dump the program listings (including syntax highlighting -# and cross-referencing information) to the XML output. Note that -# enabling this will significantly increase the size of the XML output. - -XML_PROGRAMLISTING = YES - -#--------------------------------------------------------------------------- -# configuration options for the AutoGen Definitions output -#--------------------------------------------------------------------------- - -# If the GENERATE_AUTOGEN_DEF tag is set to YES Doxygen will -# generate an AutoGen Definitions (see autogen.sf.net) file -# that captures the structure of the code including all -# documentation. Note that this feature is still experimental -# and incomplete at the moment. - -GENERATE_AUTOGEN_DEF = NO - -#--------------------------------------------------------------------------- -# configuration options related to the Perl module output -#--------------------------------------------------------------------------- - -# If the GENERATE_PERLMOD tag is set to YES Doxygen will -# generate a Perl module file that captures the structure of -# the code including all documentation. Note that this -# feature is still experimental and incomplete at the -# moment. - -GENERATE_PERLMOD = NO - -# If the PERLMOD_LATEX tag is set to YES Doxygen will generate -# the necessary Makefile rules, Perl scripts and LaTeX code to be able -# to generate PDF and DVI output from the Perl module output. - -PERLMOD_LATEX = NO - -# If the PERLMOD_PRETTY tag is set to YES the Perl module output will be -# nicely formatted so it can be parsed by a human reader. This is useful -# if you want to understand what is going on. On the other hand, if this -# tag is set to NO the size of the Perl module output will be much smaller -# and Perl will parse it just the same. - -PERLMOD_PRETTY = YES - -# The names of the make variables in the generated doxyrules.make file -# are prefixed with the string contained in PERLMOD_MAKEVAR_PREFIX. -# This is useful so different doxyrules.make files included by the same -# Makefile don't overwrite each other's variables. - -PERLMOD_MAKEVAR_PREFIX = - -#--------------------------------------------------------------------------- -# Configuration options related to the preprocessor -#--------------------------------------------------------------------------- - -# If the ENABLE_PREPROCESSING tag is set to YES (the default) Doxygen will -# evaluate all C-preprocessor directives found in the sources and include -# files. - -ENABLE_PREPROCESSING = YES - -# If the MACRO_EXPANSION tag is set to YES Doxygen will expand all macro -# names in the source code. If set to NO (the default) only conditional -# compilation will be performed. Macro expansion can be done in a controlled -# way by setting EXPAND_ONLY_PREDEF to YES. - -MACRO_EXPANSION = NO - -# If the EXPAND_ONLY_PREDEF and MACRO_EXPANSION tags are both set to YES -# then the macro expansion is limited to the macros specified with the -# PREDEFINED and EXPAND_AS_DEFINED tags. - -EXPAND_ONLY_PREDEF = NO - -# If the SEARCH_INCLUDES tag is set to YES (the default) the includes files -# in the INCLUDE_PATH (see below) will be search if a #include is found. - -SEARCH_INCLUDES = YES - -# The INCLUDE_PATH tag can be used to specify one or more directories that -# contain include files that are not input files but should be processed by -# the preprocessor. - -INCLUDE_PATH = - -# You can use the INCLUDE_FILE_PATTERNS tag to specify one or more wildcard -# patterns (like *.h and *.hpp) to filter out the header-files in the -# directories. If left blank, the patterns specified with FILE_PATTERNS will -# be used. - -INCLUDE_FILE_PATTERNS = - -# The PREDEFINED tag can be used to specify one or more macro names that -# are defined before the preprocessor is started (similar to the -D option of -# gcc). The argument of the tag is a list of macros of the form: name -# or name=definition (no spaces). If the definition and the = are -# omitted =1 is assumed. To prevent a macro definition from being -# undefined via #undef or recursively expanded use the := operator -# instead of the = operator. - -PREDEFINED = - -# If the MACRO_EXPANSION and EXPAND_ONLY_PREDEF tags are set to YES then -# this tag can be used to specify a list of macro names that should be expanded. -# The macro definition that is found in the sources will be used. -# Use the PREDEFINED tag if you want to use a different macro definition. - -EXPAND_AS_DEFINED = - -# If the SKIP_FUNCTION_MACROS tag is set to YES (the default) then -# doxygen's preprocessor will remove all function-like macros that are alone -# on a line, have an all uppercase name, and do not end with a semicolon. Such -# function macros are typically used for boiler-plate code, and will confuse -# the parser if not removed. - -SKIP_FUNCTION_MACROS = YES - -#--------------------------------------------------------------------------- -# Configuration::additions related to external references -#--------------------------------------------------------------------------- - -# The TAGFILES option can be used to specify one or more tagfiles. -# Optionally an initial location of the external documentation -# can be added for each tagfile. The format of a tag file without -# this location is as follows: -# TAGFILES = file1 file2 ... -# Adding location for the tag files is done as follows: -# TAGFILES = file1=loc1 "file2 = loc2" ... -# where "loc1" and "loc2" can be relative or absolute paths or -# URLs. If a location is present for each tag, the installdox tool -# does not have to be run to correct the links. -# Note that each tag file must have a unique name -# (where the name does NOT include the path) -# If a tag file is not located in the directory in which doxygen -# is run, you must also specify the path to the tagfile here. - -TAGFILES = - -# When a file name is specified after GENERATE_TAGFILE, doxygen will create -# a tag file that is based on the input files it reads. - -GENERATE_TAGFILE = - -# If the ALLEXTERNALS tag is set to YES all external classes will be listed -# in the class index. If set to NO only the inherited external classes -# will be listed. - -ALLEXTERNALS = NO - -# If the EXTERNAL_GROUPS tag is set to YES all external groups will be listed -# in the modules index. If set to NO, only the current project's groups will -# be listed. - -EXTERNAL_GROUPS = YES - -# The PERL_PATH should be the absolute path and name of the perl script -# interpreter (i.e. the result of `which perl'). - -PERL_PATH = /usr/bin/perl - -#--------------------------------------------------------------------------- -# Configuration options related to the dot tool -#--------------------------------------------------------------------------- - -# If the CLASS_DIAGRAMS tag is set to YES (the default) Doxygen will -# generate a inheritance diagram (in HTML, RTF and LaTeX) for classes with base -# or super classes. Setting the tag to NO turns the diagrams off. Note that -# this option is superseded by the HAVE_DOT option below. This is only a -# fallback. It is recommended to install and use dot, since it yields more -# powerful graphs. - -CLASS_DIAGRAMS = YES - -# You can define message sequence charts within doxygen comments using the \msc -# command. Doxygen will then run the mscgen tool (see -# http://www.mcternan.me.uk/mscgen/) to produce the chart and insert it in the -# documentation. The MSCGEN_PATH tag allows you to specify the directory where -# the mscgen tool resides. If left empty the tool is assumed to be found in the -# default search path. - -MSCGEN_PATH = - -# If set to YES, the inheritance and collaboration graphs will hide -# inheritance and usage relations if the target is undocumented -# or is not a class. - -HIDE_UNDOC_RELATIONS = YES - -# If you set the HAVE_DOT tag to YES then doxygen will assume the dot tool is -# available from the path. This tool is part of Graphviz, a graph visualization -# toolkit from AT&T and Lucent Bell Labs. The other options in this section -# have no effect if this option is set to NO (the default) - -HAVE_DOT = NO - -# By default doxygen will write a font called FreeSans.ttf to the output -# directory and reference it in all dot files that doxygen generates. This -# font does not include all possible unicode characters however, so when you need -# these (or just want a differently looking font) you can specify the font name -# using DOT_FONTNAME. You need need to make sure dot is able to find the font, -# which can be done by putting it in a standard location or by setting the -# DOTFONTPATH environment variable or by setting DOT_FONTPATH to the directory -# containing the font. - -DOT_FONTNAME = FreeSans - -# The DOT_FONTSIZE tag can be used to set the size of the font of dot graphs. -# The default size is 10pt. - -DOT_FONTSIZE = 10 - -# By default doxygen will tell dot to use the output directory to look for the -# FreeSans.ttf font (which doxygen will put there itself). If you specify a -# different font using DOT_FONTNAME you can set the path where dot -# can find it using this tag. - -DOT_FONTPATH = - -# If the CLASS_GRAPH and HAVE_DOT tags are set to YES then doxygen -# will generate a graph for each documented class showing the direct and -# indirect inheritance relations. Setting this tag to YES will force the -# the CLASS_DIAGRAMS tag to NO. - -CLASS_GRAPH = YES - -# If the COLLABORATION_GRAPH and HAVE_DOT tags are set to YES then doxygen -# will generate a graph for each documented class showing the direct and -# indirect implementation dependencies (inheritance, containment, and -# class references variables) of the class with other documented classes. - -COLLABORATION_GRAPH = YES - -# If the GROUP_GRAPHS and HAVE_DOT tags are set to YES then doxygen -# will generate a graph for groups, showing the direct groups dependencies - -GROUP_GRAPHS = YES - -# If the UML_LOOK tag is set to YES doxygen will generate inheritance and -# collaboration diagrams in a style similar to the OMG's Unified Modeling -# Language. - -UML_LOOK = NO - -# If set to YES, the inheritance and collaboration graphs will show the -# relations between templates and their instances. - -TEMPLATE_RELATIONS = NO - -# If the ENABLE_PREPROCESSING, SEARCH_INCLUDES, INCLUDE_GRAPH, and HAVE_DOT -# tags are set to YES then doxygen will generate a graph for each documented -# file showing the direct and indirect include dependencies of the file with -# other documented files. - -INCLUDE_GRAPH = YES - -# If the ENABLE_PREPROCESSING, SEARCH_INCLUDES, INCLUDED_BY_GRAPH, and -# HAVE_DOT tags are set to YES then doxygen will generate a graph for each -# documented header file showing the documented files that directly or -# indirectly include this file. - -INCLUDED_BY_GRAPH = YES - -# If the CALL_GRAPH and HAVE_DOT options are set to YES then -# doxygen will generate a call dependency graph for every global function -# or class method. Note that enabling this option will significantly increase -# the time of a run. So in most cases it will be better to enable call graphs -# for selected functions only using the \callgraph command. - -CALL_GRAPH = NO - -# If the CALLER_GRAPH and HAVE_DOT tags are set to YES then -# doxygen will generate a caller dependency graph for every global function -# or class method. Note that enabling this option will significantly increase -# the time of a run. So in most cases it will be better to enable caller -# graphs for selected functions only using the \callergraph command. - -CALLER_GRAPH = NO - -# If the GRAPHICAL_HIERARCHY and HAVE_DOT tags are set to YES then doxygen -# will graphical hierarchy of all classes instead of a textual one. - -GRAPHICAL_HIERARCHY = YES - -# If the DIRECTORY_GRAPH, SHOW_DIRECTORIES and HAVE_DOT tags are set to YES -# then doxygen will show the dependencies a directory has on other directories -# in a graphical way. The dependency relations are determined by the #include -# relations between the files in the directories. - -DIRECTORY_GRAPH = YES - -# The DOT_IMAGE_FORMAT tag can be used to set the image format of the images -# generated by dot. Possible values are png, jpg, or gif -# If left blank png will be used. - -DOT_IMAGE_FORMAT = png - -# The tag DOT_PATH can be used to specify the path where the dot tool can be -# found. If left blank, it is assumed the dot tool can be found in the path. - -DOT_PATH = - -# The DOTFILE_DIRS tag can be used to specify one or more directories that -# contain dot files that are included in the documentation (see the -# \dotfile command). - -DOTFILE_DIRS = - -# The DOT_GRAPH_MAX_NODES tag can be used to set the maximum number of -# nodes that will be shown in the graph. If the number of nodes in a graph -# becomes larger than this value, doxygen will truncate the graph, which is -# visualized by representing a node as a red box. Note that doxygen if the -# number of direct children of the root node in a graph is already larger than -# DOT_GRAPH_MAX_NODES then the graph will not be shown at all. Also note -# that the size of a graph can be further restricted by MAX_DOT_GRAPH_DEPTH. - -DOT_GRAPH_MAX_NODES = 50 - -# The MAX_DOT_GRAPH_DEPTH tag can be used to set the maximum depth of the -# graphs generated by dot. A depth value of 3 means that only nodes reachable -# from the root by following a path via at most 3 edges will be shown. Nodes -# that lay further from the root node will be omitted. Note that setting this -# option to 1 or 2 may greatly reduce the computation time needed for large -# code bases. Also note that the size of a graph can be further restricted by -# DOT_GRAPH_MAX_NODES. Using a depth of 0 means no depth restriction. - -MAX_DOT_GRAPH_DEPTH = 0 - -# Set the DOT_TRANSPARENT tag to YES to generate images with a transparent -# background. This is disabled by default, because dot on Windows does not -# seem to support this out of the box. Warning: Depending on the platform used, -# enabling this option may lead to badly anti-aliased labels on the edges of -# a graph (i.e. they become hard to read). - -DOT_TRANSPARENT = NO - -# Set the DOT_MULTI_TARGETS tag to YES allow dot to generate multiple output -# files in one run (i.e. multiple -o and -T options on the command line). This -# makes dot run faster, but since only newer versions of dot (>1.8.10) -# support this, this feature is disabled by default. - -DOT_MULTI_TARGETS = NO - -# If the GENERATE_LEGEND tag is set to YES (the default) Doxygen will -# generate a legend page explaining the meaning of the various boxes and -# arrows in the dot generated graphs. - -GENERATE_LEGEND = YES - -# If the DOT_CLEANUP tag is set to YES (the default) Doxygen will -# remove the intermediate dot files that are used to generate -# the various graphs. - -DOT_CLEANUP = YES - -#--------------------------------------------------------------------------- -# Configuration::additions related to the search engine -#--------------------------------------------------------------------------- - -# The SEARCHENGINE tag specifies whether or not a search engine should be -# used. If set to NO the values of all tags below this one will be ignored. - -SEARCHENGINE = NO diff --git a/test/test-automation/INSTALL b/test/test-automation/INSTALL deleted file mode 100644 index 69c97ab10..000000000 --- a/test/test-automation/INSTALL +++ /dev/null @@ -1,18 +0,0 @@ -Installation Instructions -************************* - -To compile the project use the following commands: - - ./autogen.sh - ./configure - make - -Then you're ready to test. Run the harness with the following command: - - ./runner - -To view the command line options for the harness use: ./runner --help - -For more information, check out project's wiki at: -https://bitbucket.org/Markusk/sdl-gsoc/wiki/Home - \ No newline at end of file diff --git a/test/test-automation/Makefile.am b/test/test-automation/Makefile.am deleted file mode 100644 index 79e73f169..000000000 --- a/test/test-automation/Makefile.am +++ /dev/null @@ -1,26 +0,0 @@ -ACLOCAL_AMFLAGS = -I acinclude -I build-scripts - -SUBDIRS = src/libSDLtest \ - src/runner \ - tests/testdummy \ - tests/testrect \ - tests/testplatform \ - tests/testaudio \ - tests/testsurface \ - tests/testrwops \ - tests/testrender \ - tests/testvideo \ - tests/testsyswm \ - tests/testclipboard \ - tests/testevents \ - tests/testkeyboard - -install: install-runner install-tests -install-runner: - $(SHELL) build-scripts/install-runner.sh -install-tests: - $(SHELL) build-scripts/install-tests.sh - -distclean-local: - $(SHELL) build-scripts/distclean.sh - diff --git a/test/test-automation/NEWS b/test/test-automation/NEWS deleted file mode 100644 index e69de29bb..000000000 diff --git a/test/test-automation/README b/test/test-automation/README deleted file mode 100644 index e511fda38..000000000 --- a/test/test-automation/README +++ /dev/null @@ -1,12 +0,0 @@ -/*! \mainpage Documentation for SDL test harness - -\section Introduction - -This is doxygen-generated docs for SDL test harness. - -Pull the project with Mercurial: -hg clone https://Markusk@bitbucket.org/Markusk/sdl-gsoc/wiki - -For more information: https://bitbucket.org/Markusk/sdl-gsoc/wiki/Home - -*/ diff --git a/test/test-automation/TODO b/test/test-automation/TODO deleted file mode 100644 index 7de36a279..000000000 --- a/test/test-automation/TODO +++ /dev/null @@ -1,11 +0,0 @@ -- Add proper Tracelog function to logging system. It should be possible - for a test writer to send information to logs for further investigation. - This would replace the current Log(time_t, char *fmt, ...) function - in practice. - -- If running tests with --in-proc option failing asserts - don't bail out from the test case as it should. Fix this. - -- Might be good idea to warn the user if runner is given command line - options that doesn't make sense together. Cases such as using --xsl - without --xml option or --iterations combined with --exec-key diff --git a/test/test-automation/acinclude/libtool.m4 b/test/test-automation/acinclude/libtool.m4 deleted file mode 100644 index 6edf0391b..000000000 --- a/test/test-automation/acinclude/libtool.m4 +++ /dev/null @@ -1,7359 +0,0 @@ -# libtool.m4 - Configure libtool for the host system. -*-Autoconf-*- -# -# Copyright (C) 1996, 1997, 1998, 1999, 2000, 2001, 2003, 2004, 2005, -# 2006, 2007, 2008 Free Software Foundation, Inc. -# Written by Gordon Matzigkeit, 1996 -# -# This file is free software; the Free Software Foundation gives -# unlimited permission to copy and/or distribute it, with or without -# modifications, as long as this notice is preserved. - -m4_define([_LT_COPYING], [dnl -# Copyright (C) 1996, 1997, 1998, 1999, 2000, 2001, 2003, 2004, 2005, -# 2006, 2007, 2008 Free Software Foundation, Inc. -# Written by Gordon Matzigkeit, 1996 -# -# This file is part of GNU Libtool. -# -# GNU Libtool is free software; you can redistribute it and/or -# modify it under the terms of the GNU General Public License as -# published by the Free Software Foundation; either version 2 of -# the License, or (at your option) any later version. -# -# As a special exception to the GNU General Public License, -# if you distribute this file as part of a program or library that -# is built using GNU Libtool, you may include this file under the -# same distribution terms that you use for the rest of that program. -# -# GNU Libtool is distributed in the hope that it will be useful, -# but WITHOUT ANY WARRANTY; without even the implied warranty of -# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the -# GNU General Public License for more details. -# -# You should have received a copy of the GNU General Public License -# along with GNU Libtool; see the file COPYING. If not, a copy -# can be downloaded from http://www.gnu.org/licenses/gpl.html, or -# obtained by writing to the Free Software Foundation, Inc., -# 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA. -]) - -# serial 56 LT_INIT - - -# LT_PREREQ(VERSION) -# ------------------ -# Complain and exit if this libtool version is less that VERSION. -m4_defun([LT_PREREQ], -[m4_if(m4_version_compare(m4_defn([LT_PACKAGE_VERSION]), [$1]), -1, - [m4_default([$3], - [m4_fatal([Libtool version $1 or higher is required], - 63)])], - [$2])]) - - -# _LT_CHECK_BUILDDIR -# ------------------ -# Complain if the absolute build directory name contains unusual characters -m4_defun([_LT_CHECK_BUILDDIR], -[case `pwd` in - *\ * | *\ *) - AC_MSG_WARN([Libtool does not cope well with whitespace in `pwd`]) ;; -esac -]) - - -# LT_INIT([OPTIONS]) -# ------------------ -AC_DEFUN([LT_INIT], -[AC_PREREQ([2.58])dnl We use AC_INCLUDES_DEFAULT -AC_BEFORE([$0], [LT_LANG])dnl -AC_BEFORE([$0], [LT_OUTPUT])dnl -AC_BEFORE([$0], [LTDL_INIT])dnl -m4_require([_LT_CHECK_BUILDDIR])dnl - -dnl Autoconf doesn't catch unexpanded LT_ macros by default: -m4_pattern_forbid([^_?LT_[A-Z_]+$])dnl -m4_pattern_allow([^(_LT_EOF|LT_DLGLOBAL|LT_DLLAZY_OR_NOW|LT_MULTI_MODULE)$])dnl -dnl aclocal doesn't pull ltoptions.m4, ltsugar.m4, or ltversion.m4 -dnl unless we require an AC_DEFUNed macro: -AC_REQUIRE([LTOPTIONS_VERSION])dnl -AC_REQUIRE([LTSUGAR_VERSION])dnl -AC_REQUIRE([LTVERSION_VERSION])dnl -AC_REQUIRE([LTOBSOLETE_VERSION])dnl -m4_require([_LT_PROG_LTMAIN])dnl - -dnl Parse OPTIONS -_LT_SET_OPTIONS([$0], [$1]) - -# This can be used to rebuild libtool when needed -LIBTOOL_DEPS="$ltmain" - -# Always use our own libtool. -LIBTOOL='$(SHELL) $(top_builddir)/libtool' -AC_SUBST(LIBTOOL)dnl - -_LT_SETUP - -# Only expand once: -m4_define([LT_INIT]) -])# LT_INIT - -# Old names: -AU_ALIAS([AC_PROG_LIBTOOL], [LT_INIT]) -AU_ALIAS([AM_PROG_LIBTOOL], [LT_INIT]) -dnl aclocal-1.4 backwards compatibility: -dnl AC_DEFUN([AC_PROG_LIBTOOL], []) -dnl AC_DEFUN([AM_PROG_LIBTOOL], []) - - -# _LT_CC_BASENAME(CC) -# ------------------- -# Calculate cc_basename. Skip known compiler wrappers and cross-prefix. -m4_defun([_LT_CC_BASENAME], -[for cc_temp in $1""; do - case $cc_temp in - compile | *[[\\/]]compile | ccache | *[[\\/]]ccache ) ;; - distcc | *[[\\/]]distcc | purify | *[[\\/]]purify ) ;; - \-*) ;; - *) break;; - esac -done -cc_basename=`$ECHO "X$cc_temp" | $Xsed -e 's%.*/%%' -e "s%^$host_alias-%%"` -]) - - -# _LT_FILEUTILS_DEFAULTS -# ---------------------- -# It is okay to use these file commands and assume they have been set -# sensibly after `m4_require([_LT_FILEUTILS_DEFAULTS])'. -m4_defun([_LT_FILEUTILS_DEFAULTS], -[: ${CP="cp -f"} -: ${MV="mv -f"} -: ${RM="rm -f"} -])# _LT_FILEUTILS_DEFAULTS - - -# _LT_SETUP -# --------- -m4_defun([_LT_SETUP], -[AC_REQUIRE([AC_CANONICAL_HOST])dnl -AC_REQUIRE([AC_CANONICAL_BUILD])dnl -_LT_DECL([], [host_alias], [0], [The host system])dnl -_LT_DECL([], [host], [0])dnl -_LT_DECL([], [host_os], [0])dnl -dnl -_LT_DECL([], [build_alias], [0], [The build system])dnl -_LT_DECL([], [build], [0])dnl -_LT_DECL([], [build_os], [0])dnl -dnl -AC_REQUIRE([AC_PROG_CC])dnl -AC_REQUIRE([LT_PATH_LD])dnl -AC_REQUIRE([LT_PATH_NM])dnl -dnl -AC_REQUIRE([AC_PROG_LN_S])dnl -test -z "$LN_S" && LN_S="ln -s" -_LT_DECL([], [LN_S], [1], [Whether we need soft or hard links])dnl -dnl -AC_REQUIRE([LT_CMD_MAX_LEN])dnl -_LT_DECL([objext], [ac_objext], [0], [Object file suffix (normally "o")])dnl -_LT_DECL([], [exeext], [0], [Executable file suffix (normally "")])dnl -dnl -m4_require([_LT_FILEUTILS_DEFAULTS])dnl -m4_require([_LT_CHECK_SHELL_FEATURES])dnl -m4_require([_LT_CMD_RELOAD])dnl -m4_require([_LT_CHECK_MAGIC_METHOD])dnl -m4_require([_LT_CMD_OLD_ARCHIVE])dnl -m4_require([_LT_CMD_GLOBAL_SYMBOLS])dnl - -_LT_CONFIG_LIBTOOL_INIT([ -# See if we are running on zsh, and set the options which allow our -# commands through without removal of \ escapes INIT. -if test -n "\${ZSH_VERSION+set}" ; then - setopt NO_GLOB_SUBST -fi -]) -if test -n "${ZSH_VERSION+set}" ; then - setopt NO_GLOB_SUBST -fi - -_LT_CHECK_OBJDIR - -m4_require([_LT_TAG_COMPILER])dnl -_LT_PROG_ECHO_BACKSLASH - -case $host_os in -aix3*) - # AIX sometimes has problems with the GCC collect2 program. For some - # reason, if we set the COLLECT_NAMES environment variable, the problems - # vanish in a puff of smoke. - if test "X${COLLECT_NAMES+set}" != Xset; then - COLLECT_NAMES= - export COLLECT_NAMES - fi - ;; -esac - -# Sed substitution that helps us do robust quoting. It backslashifies -# metacharacters that are still active within double-quoted strings. -sed_quote_subst='s/\([["`$\\]]\)/\\\1/g' - -# Same as above, but do not quote variable references. -double_quote_subst='s/\([["`\\]]\)/\\\1/g' - -# Sed substitution to delay expansion of an escaped shell variable in a -# double_quote_subst'ed string. -delay_variable_subst='s/\\\\\\\\\\\$/\\\\\\$/g' - -# Sed substitution to delay expansion of an escaped single quote. -delay_single_quote_subst='s/'\''/'\'\\\\\\\'\''/g' - -# Sed substitution to avoid accidental globbing in evaled expressions -no_glob_subst='s/\*/\\\*/g' - -# Global variables: -ofile=libtool -can_build_shared=yes - -# All known linkers require a `.a' archive for static linking (except MSVC, -# which needs '.lib'). -libext=a - -with_gnu_ld="$lt_cv_prog_gnu_ld" - -old_CC="$CC" -old_CFLAGS="$CFLAGS" - -# Set sane defaults for various variables -test -z "$CC" && CC=cc -test -z "$LTCC" && LTCC=$CC -test -z "$LTCFLAGS" && LTCFLAGS=$CFLAGS -test -z "$LD" && LD=ld -test -z "$ac_objext" && ac_objext=o - -_LT_CC_BASENAME([$compiler]) - -# Only perform the check for file, if the check method requires it -test -z "$MAGIC_CMD" && MAGIC_CMD=file -case $deplibs_check_method in -file_magic*) - if test "$file_magic_cmd" = '$MAGIC_CMD'; then - _LT_PATH_MAGIC - fi - ;; -esac - -# Use C for the default configuration in the libtool script -LT_SUPPORTED_TAG([CC]) -_LT_LANG_C_CONFIG -_LT_LANG_DEFAULT_CONFIG -_LT_CONFIG_COMMANDS -])# _LT_SETUP - - -# _LT_PROG_LTMAIN -# --------------- -# Note that this code is called both from `configure', and `config.status' -# now that we use AC_CONFIG_COMMANDS to generate libtool. Notably, -# `config.status' has no value for ac_aux_dir unless we are using Automake, -# so we pass a copy along to make sure it has a sensible value anyway. -m4_defun([_LT_PROG_LTMAIN], -[m4_ifdef([AC_REQUIRE_AUX_FILE], [AC_REQUIRE_AUX_FILE([ltmain.sh])])dnl -_LT_CONFIG_LIBTOOL_INIT([ac_aux_dir='$ac_aux_dir']) -ltmain="$ac_aux_dir/ltmain.sh" -])# _LT_PROG_LTMAIN - - -## ------------------------------------- ## -## Accumulate code for creating libtool. ## -## ------------------------------------- ## - -# So that we can recreate a full libtool script including additional -# tags, we accumulate the chunks of code to send to AC_CONFIG_COMMANDS -# in macros and then make a single call at the end using the `libtool' -# label. - - -# _LT_CONFIG_LIBTOOL_INIT([INIT-COMMANDS]) -# ---------------------------------------- -# Register INIT-COMMANDS to be passed to AC_CONFIG_COMMANDS later. -m4_define([_LT_CONFIG_LIBTOOL_INIT], -[m4_ifval([$1], - [m4_append([_LT_OUTPUT_LIBTOOL_INIT], - [$1 -])])]) - -# Initialize. -m4_define([_LT_OUTPUT_LIBTOOL_INIT]) - - -# _LT_CONFIG_LIBTOOL([COMMANDS]) -# ------------------------------ -# Register COMMANDS to be passed to AC_CONFIG_COMMANDS later. -m4_define([_LT_CONFIG_LIBTOOL], -[m4_ifval([$1], - [m4_append([_LT_OUTPUT_LIBTOOL_COMMANDS], - [$1 -])])]) - -# Initialize. -m4_define([_LT_OUTPUT_LIBTOOL_COMMANDS]) - - -# _LT_CONFIG_SAVE_COMMANDS([COMMANDS], [INIT_COMMANDS]) -# ----------------------------------------------------- -m4_defun([_LT_CONFIG_SAVE_COMMANDS], -[_LT_CONFIG_LIBTOOL([$1]) -_LT_CONFIG_LIBTOOL_INIT([$2]) -]) - - -# _LT_FORMAT_COMMENT([COMMENT]) -# ----------------------------- -# Add leading comment marks to the start of each line, and a trailing -# full-stop to the whole comment if one is not present already. -m4_define([_LT_FORMAT_COMMENT], -[m4_ifval([$1], [ -m4_bpatsubst([m4_bpatsubst([$1], [^ *], [# ])], - [['`$\]], [\\\&])]m4_bmatch([$1], [[!?.]$], [], [.]) -)]) - - - -## ------------------------ ## -## FIXME: Eliminate VARNAME ## -## ------------------------ ## - - -# _LT_DECL([CONFIGNAME], VARNAME, VALUE, [DESCRIPTION], [IS-TAGGED?]) -# ------------------------------------------------------------------- -# CONFIGNAME is the name given to the value in the libtool script. -# VARNAME is the (base) name used in the configure script. -# VALUE may be 0, 1 or 2 for a computed quote escaped value based on -# VARNAME. Any other value will be used directly. -m4_define([_LT_DECL], -[lt_if_append_uniq([lt_decl_varnames], [$2], [, ], - [lt_dict_add_subkey([lt_decl_dict], [$2], [libtool_name], - [m4_ifval([$1], [$1], [$2])]) - lt_dict_add_subkey([lt_decl_dict], [$2], [value], [$3]) - m4_ifval([$4], - [lt_dict_add_subkey([lt_decl_dict], [$2], [description], [$4])]) - lt_dict_add_subkey([lt_decl_dict], [$2], - [tagged?], [m4_ifval([$5], [yes], [no])])]) -]) - - -# _LT_TAGDECL([CONFIGNAME], VARNAME, VALUE, [DESCRIPTION]) -# -------------------------------------------------------- -m4_define([_LT_TAGDECL], [_LT_DECL([$1], [$2], [$3], [$4], [yes])]) - - -# lt_decl_tag_varnames([SEPARATOR], [VARNAME1...]) -# ------------------------------------------------ -m4_define([lt_decl_tag_varnames], -[_lt_decl_filter([tagged?], [yes], $@)]) - - -# _lt_decl_filter(SUBKEY, VALUE, [SEPARATOR], [VARNAME1..]) -# --------------------------------------------------------- -m4_define([_lt_decl_filter], -[m4_case([$#], - [0], [m4_fatal([$0: too few arguments: $#])], - [1], [m4_fatal([$0: too few arguments: $#: $1])], - [2], [lt_dict_filter([lt_decl_dict], [$1], [$2], [], lt_decl_varnames)], - [3], [lt_dict_filter([lt_decl_dict], [$1], [$2], [$3], lt_decl_varnames)], - [lt_dict_filter([lt_decl_dict], $@)])[]dnl -]) - - -# lt_decl_quote_varnames([SEPARATOR], [VARNAME1...]) -# -------------------------------------------------- -m4_define([lt_decl_quote_varnames], -[_lt_decl_filter([value], [1], $@)]) - - -# lt_decl_dquote_varnames([SEPARATOR], [VARNAME1...]) -# --------------------------------------------------- -m4_define([lt_decl_dquote_varnames], -[_lt_decl_filter([value], [2], $@)]) - - -# lt_decl_varnames_tagged([SEPARATOR], [VARNAME1...]) -# --------------------------------------------------- -m4_define([lt_decl_varnames_tagged], -[m4_assert([$# <= 2])dnl -_$0(m4_quote(m4_default([$1], [[, ]])), - m4_ifval([$2], [[$2]], [m4_dquote(lt_decl_tag_varnames)]), - m4_split(m4_normalize(m4_quote(_LT_TAGS)), [ ]))]) -m4_define([_lt_decl_varnames_tagged], -[m4_ifval([$3], [lt_combine([$1], [$2], [_], $3)])]) - - -# lt_decl_all_varnames([SEPARATOR], [VARNAME1...]) -# ------------------------------------------------ -m4_define([lt_decl_all_varnames], -[_$0(m4_quote(m4_default([$1], [[, ]])), - m4_if([$2], [], - m4_quote(lt_decl_varnames), - m4_quote(m4_shift($@))))[]dnl -]) -m4_define([_lt_decl_all_varnames], -[lt_join($@, lt_decl_varnames_tagged([$1], - lt_decl_tag_varnames([[, ]], m4_shift($@))))dnl -]) - - -# _LT_CONFIG_STATUS_DECLARE([VARNAME]) -# ------------------------------------ -# Quote a variable value, and forward it to `config.status' so that its -# declaration there will have the same value as in `configure'. VARNAME -# must have a single quote delimited value for this to work. -m4_define([_LT_CONFIG_STATUS_DECLARE], -[$1='`$ECHO "X$][$1" | $Xsed -e "$delay_single_quote_subst"`']) - - -# _LT_CONFIG_STATUS_DECLARATIONS -# ------------------------------ -# We delimit libtool config variables with single quotes, so when -# we write them to config.status, we have to be sure to quote all -# embedded single quotes properly. In configure, this macro expands -# each variable declared with _LT_DECL (and _LT_TAGDECL) into: -# -# ='`$ECHO "X$" | $Xsed -e "$delay_single_quote_subst"`' -m4_defun([_LT_CONFIG_STATUS_DECLARATIONS], -[m4_foreach([_lt_var], m4_quote(lt_decl_all_varnames), - [m4_n([_LT_CONFIG_STATUS_DECLARE(_lt_var)])])]) - - -# _LT_LIBTOOL_TAGS -# ---------------- -# Output comment and list of tags supported by the script -m4_defun([_LT_LIBTOOL_TAGS], -[_LT_FORMAT_COMMENT([The names of the tagged configurations supported by this script])dnl -available_tags="_LT_TAGS"dnl -]) - - -# _LT_LIBTOOL_DECLARE(VARNAME, [TAG]) -# ----------------------------------- -# Extract the dictionary values for VARNAME (optionally with TAG) and -# expand to a commented shell variable setting: -# -# # Some comment about what VAR is for. -# visible_name=$lt_internal_name -m4_define([_LT_LIBTOOL_DECLARE], -[_LT_FORMAT_COMMENT(m4_quote(lt_dict_fetch([lt_decl_dict], [$1], - [description])))[]dnl -m4_pushdef([_libtool_name], - m4_quote(lt_dict_fetch([lt_decl_dict], [$1], [libtool_name])))[]dnl -m4_case(m4_quote(lt_dict_fetch([lt_decl_dict], [$1], [value])), - [0], [_libtool_name=[$]$1], - [1], [_libtool_name=$lt_[]$1], - [2], [_libtool_name=$lt_[]$1], - [_libtool_name=lt_dict_fetch([lt_decl_dict], [$1], [value])])[]dnl -m4_ifval([$2], [_$2])[]m4_popdef([_libtool_name])[]dnl -]) - - -# _LT_LIBTOOL_CONFIG_VARS -# ----------------------- -# Produce commented declarations of non-tagged libtool config variables -# suitable for insertion in the LIBTOOL CONFIG section of the `libtool' -# script. Tagged libtool config variables (even for the LIBTOOL CONFIG -# section) are produced by _LT_LIBTOOL_TAG_VARS. -m4_defun([_LT_LIBTOOL_CONFIG_VARS], -[m4_foreach([_lt_var], - m4_quote(_lt_decl_filter([tagged?], [no], [], lt_decl_varnames)), - [m4_n([_LT_LIBTOOL_DECLARE(_lt_var)])])]) - - -# _LT_LIBTOOL_TAG_VARS(TAG) -# ------------------------- -m4_define([_LT_LIBTOOL_TAG_VARS], -[m4_foreach([_lt_var], m4_quote(lt_decl_tag_varnames), - [m4_n([_LT_LIBTOOL_DECLARE(_lt_var, [$1])])])]) - - -# _LT_TAGVAR(VARNAME, [TAGNAME]) -# ------------------------------ -m4_define([_LT_TAGVAR], [m4_ifval([$2], [$1_$2], [$1])]) - - -# _LT_CONFIG_COMMANDS -# ------------------- -# Send accumulated output to $CONFIG_STATUS. Thanks to the lists of -# variables for single and double quote escaping we saved from calls -# to _LT_DECL, we can put quote escaped variables declarations -# into `config.status', and then the shell code to quote escape them in -# for loops in `config.status'. Finally, any additional code accumulated -# from calls to _LT_CONFIG_LIBTOOL_INIT is expanded. -m4_defun([_LT_CONFIG_COMMANDS], -[AC_PROVIDE_IFELSE([LT_OUTPUT], - dnl If the libtool generation code has been placed in $CONFIG_LT, - dnl instead of duplicating it all over again into config.status, - dnl then we will have config.status run $CONFIG_LT later, so it - dnl needs to know what name is stored there: - [AC_CONFIG_COMMANDS([libtool], - [$SHELL $CONFIG_LT || AS_EXIT(1)], [CONFIG_LT='$CONFIG_LT'])], - dnl If the libtool generation code is destined for config.status, - dnl expand the accumulated commands and init code now: - [AC_CONFIG_COMMANDS([libtool], - [_LT_OUTPUT_LIBTOOL_COMMANDS], [_LT_OUTPUT_LIBTOOL_COMMANDS_INIT])]) -])#_LT_CONFIG_COMMANDS - - -# Initialize. -m4_define([_LT_OUTPUT_LIBTOOL_COMMANDS_INIT], -[ - -# The HP-UX ksh and POSIX shell print the target directory to stdout -# if CDPATH is set. -(unset CDPATH) >/dev/null 2>&1 && unset CDPATH - -sed_quote_subst='$sed_quote_subst' -double_quote_subst='$double_quote_subst' -delay_variable_subst='$delay_variable_subst' -_LT_CONFIG_STATUS_DECLARATIONS -LTCC='$LTCC' -LTCFLAGS='$LTCFLAGS' -compiler='$compiler_DEFAULT' - -# Quote evaled strings. -for var in lt_decl_all_varnames([[ \ -]], lt_decl_quote_varnames); do - case \`eval \\\\\$ECHO "X\\\\\$\$var"\` in - *[[\\\\\\\`\\"\\\$]]*) - eval "lt_\$var=\\\\\\"\\\`\\\$ECHO \\"X\\\$\$var\\" | \\\$Xsed -e \\"\\\$sed_quote_subst\\"\\\`\\\\\\"" - ;; - *) - eval "lt_\$var=\\\\\\"\\\$\$var\\\\\\"" - ;; - esac -done - -# Double-quote double-evaled strings. -for var in lt_decl_all_varnames([[ \ -]], lt_decl_dquote_varnames); do - case \`eval \\\\\$ECHO "X\\\\\$\$var"\` in - *[[\\\\\\\`\\"\\\$]]*) - eval "lt_\$var=\\\\\\"\\\`\\\$ECHO \\"X\\\$\$var\\" | \\\$Xsed -e \\"\\\$double_quote_subst\\" -e \\"\\\$sed_quote_subst\\" -e \\"\\\$delay_variable_subst\\"\\\`\\\\\\"" - ;; - *) - eval "lt_\$var=\\\\\\"\\\$\$var\\\\\\"" - ;; - esac -done - -# Fix-up fallback echo if it was mangled by the above quoting rules. -case \$lt_ECHO in -*'\\\[$]0 --fallback-echo"')dnl " - lt_ECHO=\`\$ECHO "X\$lt_ECHO" | \$Xsed -e 's/\\\\\\\\\\\\\\\[$]0 --fallback-echo"\[$]/\[$]0 --fallback-echo"/'\` - ;; -esac - -_LT_OUTPUT_LIBTOOL_INIT -]) - - -# LT_OUTPUT -# --------- -# This macro allows early generation of the libtool script (before -# AC_OUTPUT is called), incase it is used in configure for compilation -# tests. -AC_DEFUN([LT_OUTPUT], -[: ${CONFIG_LT=./config.lt} -AC_MSG_NOTICE([creating $CONFIG_LT]) -cat >"$CONFIG_LT" <<_LTEOF -#! $SHELL -# Generated by $as_me. -# Run this file to recreate a libtool stub with the current configuration. - -lt_cl_silent=false -SHELL=\${CONFIG_SHELL-$SHELL} -_LTEOF - -cat >>"$CONFIG_LT" <<\_LTEOF -AS_SHELL_SANITIZE -_AS_PREPARE - -exec AS_MESSAGE_FD>&1 -exec AS_MESSAGE_LOG_FD>>config.log -{ - echo - AS_BOX([Running $as_me.]) -} >&AS_MESSAGE_LOG_FD - -lt_cl_help="\ -\`$as_me' creates a local libtool stub from the current configuration, -for use in further configure time tests before the real libtool is -generated. - -Usage: $[0] [[OPTIONS]] - - -h, --help print this help, then exit - -V, --version print version number, then exit - -q, --quiet do not print progress messages - -d, --debug don't remove temporary files - -Report bugs to ." - -lt_cl_version="\ -m4_ifset([AC_PACKAGE_NAME], [AC_PACKAGE_NAME ])config.lt[]dnl -m4_ifset([AC_PACKAGE_VERSION], [ AC_PACKAGE_VERSION]) -configured by $[0], generated by m4_PACKAGE_STRING. - -Copyright (C) 2008 Free Software Foundation, Inc. -This config.lt script is free software; the Free Software Foundation -gives unlimited permision to copy, distribute and modify it." - -while test $[#] != 0 -do - case $[1] in - --version | --v* | -V ) - echo "$lt_cl_version"; exit 0 ;; - --help | --h* | -h ) - echo "$lt_cl_help"; exit 0 ;; - --debug | --d* | -d ) - debug=: ;; - --quiet | --q* | --silent | --s* | -q ) - lt_cl_silent=: ;; - - -*) AC_MSG_ERROR([unrecognized option: $[1] -Try \`$[0] --help' for more information.]) ;; - - *) AC_MSG_ERROR([unrecognized argument: $[1] -Try \`$[0] --help' for more information.]) ;; - esac - shift -done - -if $lt_cl_silent; then - exec AS_MESSAGE_FD>/dev/null -fi -_LTEOF - -cat >>"$CONFIG_LT" <<_LTEOF -_LT_OUTPUT_LIBTOOL_COMMANDS_INIT -_LTEOF - -cat >>"$CONFIG_LT" <<\_LTEOF -AC_MSG_NOTICE([creating $ofile]) -_LT_OUTPUT_LIBTOOL_COMMANDS -AS_EXIT(0) -_LTEOF -chmod +x "$CONFIG_LT" - -# configure is writing to config.log, but config.lt does its own redirection, -# appending to config.log, which fails on DOS, as config.log is still kept -# open by configure. Here we exec the FD to /dev/null, effectively closing -# config.log, so it can be properly (re)opened and appended to by config.lt. -if test "$no_create" != yes; then - lt_cl_success=: - test "$silent" = yes && - lt_config_lt_args="$lt_config_lt_args --quiet" - exec AS_MESSAGE_LOG_FD>/dev/null - $SHELL "$CONFIG_LT" $lt_config_lt_args || lt_cl_success=false - exec AS_MESSAGE_LOG_FD>>config.log - $lt_cl_success || AS_EXIT(1) -fi -])# LT_OUTPUT - - -# _LT_CONFIG(TAG) -# --------------- -# If TAG is the built-in tag, create an initial libtool script with a -# default configuration from the untagged config vars. Otherwise add code -# to config.status for appending the configuration named by TAG from the -# matching tagged config vars. -m4_defun([_LT_CONFIG], -[m4_require([_LT_FILEUTILS_DEFAULTS])dnl -_LT_CONFIG_SAVE_COMMANDS([ - m4_define([_LT_TAG], m4_if([$1], [], [C], [$1]))dnl - m4_if(_LT_TAG, [C], [ - # See if we are running on zsh, and set the options which allow our - # commands through without removal of \ escapes. - if test -n "${ZSH_VERSION+set}" ; then - setopt NO_GLOB_SUBST - fi - - cfgfile="${ofile}T" - trap "$RM \"$cfgfile\"; exit 1" 1 2 15 - $RM "$cfgfile" - - cat <<_LT_EOF >> "$cfgfile" -#! $SHELL - -# `$ECHO "$ofile" | sed 's%^.*/%%'` - Provide generalized library-building support services. -# Generated automatically by $as_me ($PACKAGE$TIMESTAMP) $VERSION -# Libtool was configured on host `(hostname || uname -n) 2>/dev/null | sed 1q`: -# NOTE: Changes made to this file will be lost: look at ltmain.sh. -# -_LT_COPYING -_LT_LIBTOOL_TAGS - -# ### BEGIN LIBTOOL CONFIG -_LT_LIBTOOL_CONFIG_VARS -_LT_LIBTOOL_TAG_VARS -# ### END LIBTOOL CONFIG - -_LT_EOF - - case $host_os in - aix3*) - cat <<\_LT_EOF >> "$cfgfile" -# AIX sometimes has problems with the GCC collect2 program. For some -# reason, if we set the COLLECT_NAMES environment variable, the problems -# vanish in a puff of smoke. -if test "X${COLLECT_NAMES+set}" != Xset; then - COLLECT_NAMES= - export COLLECT_NAMES -fi -_LT_EOF - ;; - esac - - _LT_PROG_LTMAIN - - # We use sed instead of cat because bash on DJGPP gets confused if - # if finds mixed CR/LF and LF-only lines. Since sed operates in - # text mode, it properly converts lines to CR/LF. This bash problem - # is reportedly fixed, but why not run on old versions too? - sed '/^# Generated shell functions inserted here/q' "$ltmain" >> "$cfgfile" \ - || (rm -f "$cfgfile"; exit 1) - - _LT_PROG_XSI_SHELLFNS - - sed -n '/^# Generated shell functions inserted here/,$p' "$ltmain" >> "$cfgfile" \ - || (rm -f "$cfgfile"; exit 1) - - mv -f "$cfgfile" "$ofile" || - (rm -f "$ofile" && cp "$cfgfile" "$ofile" && rm -f "$cfgfile") - chmod +x "$ofile" -], -[cat <<_LT_EOF >> "$ofile" - -dnl Unfortunately we have to use $1 here, since _LT_TAG is not expanded -dnl in a comment (ie after a #). -# ### BEGIN LIBTOOL TAG CONFIG: $1 -_LT_LIBTOOL_TAG_VARS(_LT_TAG) -# ### END LIBTOOL TAG CONFIG: $1 -_LT_EOF -])dnl /m4_if -], -[m4_if([$1], [], [ - PACKAGE='$PACKAGE' - VERSION='$VERSION' - TIMESTAMP='$TIMESTAMP' - RM='$RM' - ofile='$ofile'], []) -])dnl /_LT_CONFIG_SAVE_COMMANDS -])# _LT_CONFIG - - -# LT_SUPPORTED_TAG(TAG) -# --------------------- -# Trace this macro to discover what tags are supported by the libtool -# --tag option, using: -# autoconf --trace 'LT_SUPPORTED_TAG:$1' -AC_DEFUN([LT_SUPPORTED_TAG], []) - - -# C support is built-in for now -m4_define([_LT_LANG_C_enabled], []) -m4_define([_LT_TAGS], []) - - -# LT_LANG(LANG) -# ------------- -# Enable libtool support for the given language if not already enabled. -AC_DEFUN([LT_LANG], -[AC_BEFORE([$0], [LT_OUTPUT])dnl -m4_case([$1], - [C], [_LT_LANG(C)], - [C++], [_LT_LANG(CXX)], - [Java], [_LT_LANG(GCJ)], - [Fortran 77], [_LT_LANG(F77)], - [Fortran], [_LT_LANG(FC)], - [Windows Resource], [_LT_LANG(RC)], - [m4_ifdef([_LT_LANG_]$1[_CONFIG], - [_LT_LANG($1)], - [m4_fatal([$0: unsupported language: "$1"])])])dnl -])# LT_LANG - - -# _LT_LANG(LANGNAME) -# ------------------ -m4_defun([_LT_LANG], -[m4_ifdef([_LT_LANG_]$1[_enabled], [], - [LT_SUPPORTED_TAG([$1])dnl - m4_append([_LT_TAGS], [$1 ])dnl - m4_define([_LT_LANG_]$1[_enabled], [])dnl - _LT_LANG_$1_CONFIG($1)])dnl -])# _LT_LANG - - -# _LT_LANG_DEFAULT_CONFIG -# ----------------------- -m4_defun([_LT_LANG_DEFAULT_CONFIG], -[AC_PROVIDE_IFELSE([AC_PROG_CXX], - [LT_LANG(CXX)], - [m4_define([AC_PROG_CXX], defn([AC_PROG_CXX])[LT_LANG(CXX)])]) - -AC_PROVIDE_IFELSE([AC_PROG_F77], - [LT_LANG(F77)], - [m4_define([AC_PROG_F77], defn([AC_PROG_F77])[LT_LANG(F77)])]) - -AC_PROVIDE_IFELSE([AC_PROG_FC], - [LT_LANG(FC)], - [m4_define([AC_PROG_FC], defn([AC_PROG_FC])[LT_LANG(FC)])]) - -dnl The call to [A][M_PROG_GCJ] is quoted like that to stop aclocal -dnl pulling things in needlessly. -AC_PROVIDE_IFELSE([AC_PROG_GCJ], - [LT_LANG(GCJ)], - [AC_PROVIDE_IFELSE([A][M_PROG_GCJ], - [LT_LANG(GCJ)], - [AC_PROVIDE_IFELSE([LT_PROG_GCJ], - [LT_LANG(GCJ)], - [m4_ifdef([AC_PROG_GCJ], - [m4_define([AC_PROG_GCJ], defn([AC_PROG_GCJ])[LT_LANG(GCJ)])]) - m4_ifdef([A][M_PROG_GCJ], - [m4_define([A][M_PROG_GCJ], defn([A][M_PROG_GCJ])[LT_LANG(GCJ)])]) - m4_ifdef([LT_PROG_GCJ], - [m4_define([LT_PROG_GCJ], defn([LT_PROG_GCJ])[LT_LANG(GCJ)])])])])]) - -AC_PROVIDE_IFELSE([LT_PROG_RC], - [LT_LANG(RC)], - [m4_define([LT_PROG_RC], defn([LT_PROG_RC])[LT_LANG(RC)])]) -])# _LT_LANG_DEFAULT_CONFIG - -# Obsolete macros: -AU_DEFUN([AC_LIBTOOL_CXX], [LT_LANG(C++)]) -AU_DEFUN([AC_LIBTOOL_F77], [LT_LANG(Fortran 77)]) -AU_DEFUN([AC_LIBTOOL_FC], [LT_LANG(Fortran)]) -AU_DEFUN([AC_LIBTOOL_GCJ], [LT_LANG(Java)]) -dnl aclocal-1.4 backwards compatibility: -dnl AC_DEFUN([AC_LIBTOOL_CXX], []) -dnl AC_DEFUN([AC_LIBTOOL_F77], []) -dnl AC_DEFUN([AC_LIBTOOL_FC], []) -dnl AC_DEFUN([AC_LIBTOOL_GCJ], []) - - -# _LT_TAG_COMPILER -# ---------------- -m4_defun([_LT_TAG_COMPILER], -[AC_REQUIRE([AC_PROG_CC])dnl - -_LT_DECL([LTCC], [CC], [1], [A C compiler])dnl -_LT_DECL([LTCFLAGS], [CFLAGS], [1], [LTCC compiler flags])dnl -_LT_TAGDECL([CC], [compiler], [1], [A language specific compiler])dnl -_LT_TAGDECL([with_gcc], [GCC], [0], [Is the compiler the GNU compiler?])dnl - -# If no C compiler was specified, use CC. -LTCC=${LTCC-"$CC"} - -# If no C compiler flags were specified, use CFLAGS. -LTCFLAGS=${LTCFLAGS-"$CFLAGS"} - -# Allow CC to be a program name with arguments. -compiler=$CC -])# _LT_TAG_COMPILER - - -# _LT_COMPILER_BOILERPLATE -# ------------------------ -# Check for compiler boilerplate output or warnings with -# the simple compiler test code. -m4_defun([_LT_COMPILER_BOILERPLATE], -[m4_require([_LT_DECL_SED])dnl -ac_outfile=conftest.$ac_objext -echo "$lt_simple_compile_test_code" >conftest.$ac_ext -eval "$ac_compile" 2>&1 >/dev/null | $SED '/^$/d; /^ *+/d' >conftest.err -_lt_compiler_boilerplate=`cat conftest.err` -$RM conftest* -])# _LT_COMPILER_BOILERPLATE - - -# _LT_LINKER_BOILERPLATE -# ---------------------- -# Check for linker boilerplate output or warnings with -# the simple link test code. -m4_defun([_LT_LINKER_BOILERPLATE], -[m4_require([_LT_DECL_SED])dnl -ac_outfile=conftest.$ac_objext -echo "$lt_simple_link_test_code" >conftest.$ac_ext -eval "$ac_link" 2>&1 >/dev/null | $SED '/^$/d; /^ *+/d' >conftest.err -_lt_linker_boilerplate=`cat conftest.err` -$RM -r conftest* -])# _LT_LINKER_BOILERPLATE - -# _LT_REQUIRED_DARWIN_CHECKS -# ------------------------- -m4_defun_once([_LT_REQUIRED_DARWIN_CHECKS],[ - case $host_os in - rhapsody* | darwin*) - AC_CHECK_TOOL([DSYMUTIL], [dsymutil], [:]) - AC_CHECK_TOOL([NMEDIT], [nmedit], [:]) - AC_CHECK_TOOL([LIPO], [lipo], [:]) - AC_CHECK_TOOL([OTOOL], [otool], [:]) - AC_CHECK_TOOL([OTOOL64], [otool64], [:]) - _LT_DECL([], [DSYMUTIL], [1], - [Tool to manipulate archived DWARF debug symbol files on Mac OS X]) - _LT_DECL([], [NMEDIT], [1], - [Tool to change global to local symbols on Mac OS X]) - _LT_DECL([], [LIPO], [1], - [Tool to manipulate fat objects and archives on Mac OS X]) - _LT_DECL([], [OTOOL], [1], - [ldd/readelf like tool for Mach-O binaries on Mac OS X]) - _LT_DECL([], [OTOOL64], [1], - [ldd/readelf like tool for 64 bit Mach-O binaries on Mac OS X 10.4]) - - AC_CACHE_CHECK([for -single_module linker flag],[lt_cv_apple_cc_single_mod], - [lt_cv_apple_cc_single_mod=no - if test -z "${LT_MULTI_MODULE}"; then - # By default we will add the -single_module flag. You can override - # by either setting the environment variable LT_MULTI_MODULE - # non-empty at configure time, or by adding -multi_module to the - # link flags. - rm -rf libconftest.dylib* - echo "int foo(void){return 1;}" > conftest.c - echo "$LTCC $LTCFLAGS $LDFLAGS -o libconftest.dylib \ --dynamiclib -Wl,-single_module conftest.c" >&AS_MESSAGE_LOG_FD - $LTCC $LTCFLAGS $LDFLAGS -o libconftest.dylib \ - -dynamiclib -Wl,-single_module conftest.c 2>conftest.err - _lt_result=$? - if test -f libconftest.dylib && test ! -s conftest.err && test $_lt_result = 0; then - lt_cv_apple_cc_single_mod=yes - else - cat conftest.err >&AS_MESSAGE_LOG_FD - fi - rm -rf libconftest.dylib* - rm -f conftest.* - fi]) - AC_CACHE_CHECK([for -exported_symbols_list linker flag], - [lt_cv_ld_exported_symbols_list], - [lt_cv_ld_exported_symbols_list=no - save_LDFLAGS=$LDFLAGS - echo "_main" > conftest.sym - LDFLAGS="$LDFLAGS -Wl,-exported_symbols_list,conftest.sym" - AC_LINK_IFELSE([AC_LANG_PROGRAM([],[])], - [lt_cv_ld_exported_symbols_list=yes], - [lt_cv_ld_exported_symbols_list=no]) - LDFLAGS="$save_LDFLAGS" - ]) - case $host_os in - rhapsody* | darwin1.[[012]]) - _lt_dar_allow_undefined='${wl}-undefined ${wl}suppress' ;; - darwin1.*) - _lt_dar_allow_undefined='${wl}-flat_namespace ${wl}-undefined ${wl}suppress' ;; - darwin*) # darwin 5.x on - # if running on 10.5 or later, the deployment target defaults - # to the OS version, if on x86, and 10.4, the deployment - # target defaults to 10.4. Don't you love it? - case ${MACOSX_DEPLOYMENT_TARGET-10.0},$host in - 10.0,*86*-darwin8*|10.0,*-darwin[[91]]*) - _lt_dar_allow_undefined='${wl}-undefined ${wl}dynamic_lookup' ;; - 10.[[012]]*) - _lt_dar_allow_undefined='${wl}-flat_namespace ${wl}-undefined ${wl}suppress' ;; - 10.*) - _lt_dar_allow_undefined='${wl}-undefined ${wl}dynamic_lookup' ;; - esac - ;; - esac - if test "$lt_cv_apple_cc_single_mod" = "yes"; then - _lt_dar_single_mod='$single_module' - fi - if test "$lt_cv_ld_exported_symbols_list" = "yes"; then - _lt_dar_export_syms=' ${wl}-exported_symbols_list,$output_objdir/${libname}-symbols.expsym' - else - _lt_dar_export_syms='~$NMEDIT -s $output_objdir/${libname}-symbols.expsym ${lib}' - fi - if test "$DSYMUTIL" != ":"; then - _lt_dsymutil='~$DSYMUTIL $lib || :' - else - _lt_dsymutil= - fi - ;; - esac -]) - - -# _LT_DARWIN_LINKER_FEATURES -# -------------------------- -# Checks for linker and compiler features on darwin -m4_defun([_LT_DARWIN_LINKER_FEATURES], -[ - m4_require([_LT_REQUIRED_DARWIN_CHECKS]) - _LT_TAGVAR(archive_cmds_need_lc, $1)=no - _LT_TAGVAR(hardcode_direct, $1)=no - _LT_TAGVAR(hardcode_automatic, $1)=yes - _LT_TAGVAR(hardcode_shlibpath_var, $1)=unsupported - _LT_TAGVAR(whole_archive_flag_spec, $1)='' - _LT_TAGVAR(link_all_deplibs, $1)=yes - _LT_TAGVAR(allow_undefined_flag, $1)="$_lt_dar_allow_undefined" - case $cc_basename in - ifort*) _lt_dar_can_shared=yes ;; - *) _lt_dar_can_shared=$GCC ;; - esac - if test "$_lt_dar_can_shared" = "yes"; then - output_verbose_link_cmd=echo - _LT_TAGVAR(archive_cmds, $1)="\$CC -dynamiclib \$allow_undefined_flag -o \$lib \$libobjs \$deplibs \$compiler_flags -install_name \$rpath/\$soname \$verstring $_lt_dar_single_mod${_lt_dsymutil}" - _LT_TAGVAR(module_cmds, $1)="\$CC \$allow_undefined_flag -o \$lib -bundle \$libobjs \$deplibs \$compiler_flags${_lt_dsymutil}" - _LT_TAGVAR(archive_expsym_cmds, $1)="sed 's,^,_,' < \$export_symbols > \$output_objdir/\${libname}-symbols.expsym~\$CC -dynamiclib \$allow_undefined_flag -o \$lib \$libobjs \$deplibs \$compiler_flags -install_name \$rpath/\$soname \$verstring ${_lt_dar_single_mod}${_lt_dar_export_syms}${_lt_dsymutil}" - _LT_TAGVAR(module_expsym_cmds, $1)="sed -e 's,^,_,' < \$export_symbols > \$output_objdir/\${libname}-symbols.expsym~\$CC \$allow_undefined_flag -o \$lib -bundle \$libobjs \$deplibs \$compiler_flags${_lt_dar_export_syms}${_lt_dsymutil}" - m4_if([$1], [CXX], -[ if test "$lt_cv_apple_cc_single_mod" != "yes"; then - _LT_TAGVAR(archive_cmds, $1)="\$CC -r -keep_private_externs -nostdlib -o \${lib}-master.o \$libobjs~\$CC -dynamiclib \$allow_undefined_flag -o \$lib \${lib}-master.o \$deplibs \$compiler_flags -install_name \$rpath/\$soname \$verstring${_lt_dsymutil}" - _LT_TAGVAR(archive_expsym_cmds, $1)="sed 's,^,_,' < \$export_symbols > \$output_objdir/\${libname}-symbols.expsym~\$CC -r -keep_private_externs -nostdlib -o \${lib}-master.o \$libobjs~\$CC -dynamiclib \$allow_undefined_flag -o \$lib \${lib}-master.o \$deplibs \$compiler_flags -install_name \$rpath/\$soname \$verstring${_lt_dar_export_syms}${_lt_dsymutil}" - fi -],[]) - else - _LT_TAGVAR(ld_shlibs, $1)=no - fi -]) - -# _LT_SYS_MODULE_PATH_AIX -# ----------------------- -# Links a minimal program and checks the executable -# for the system default hardcoded library path. In most cases, -# this is /usr/lib:/lib, but when the MPI compilers are used -# the location of the communication and MPI libs are included too. -# If we don't find anything, use the default library path according -# to the aix ld manual. -m4_defun([_LT_SYS_MODULE_PATH_AIX], -[m4_require([_LT_DECL_SED])dnl -AC_LINK_IFELSE(AC_LANG_PROGRAM,[ -lt_aix_libpath_sed=' - /Import File Strings/,/^$/ { - /^0/ { - s/^0 *\(.*\)$/\1/ - p - } - }' -aix_libpath=`dump -H conftest$ac_exeext 2>/dev/null | $SED -n -e "$lt_aix_libpath_sed"` -# Check for a 64-bit object if we didn't find anything. -if test -z "$aix_libpath"; then - aix_libpath=`dump -HX64 conftest$ac_exeext 2>/dev/null | $SED -n -e "$lt_aix_libpath_sed"` -fi],[]) -if test -z "$aix_libpath"; then aix_libpath="/usr/lib:/lib"; fi -])# _LT_SYS_MODULE_PATH_AIX - - -# _LT_SHELL_INIT(ARG) -# ------------------- -m4_define([_LT_SHELL_INIT], -[ifdef([AC_DIVERSION_NOTICE], - [AC_DIVERT_PUSH(AC_DIVERSION_NOTICE)], - [AC_DIVERT_PUSH(NOTICE)]) -$1 -AC_DIVERT_POP -])# _LT_SHELL_INIT - - -# _LT_PROG_ECHO_BACKSLASH -# ----------------------- -# Add some code to the start of the generated configure script which -# will find an echo command which doesn't interpret backslashes. -m4_defun([_LT_PROG_ECHO_BACKSLASH], -[_LT_SHELL_INIT([ -# Check that we are running under the correct shell. -SHELL=${CONFIG_SHELL-/bin/sh} - -case X$lt_ECHO in -X*--fallback-echo) - # Remove one level of quotation (which was required for Make). - ECHO=`echo "$lt_ECHO" | sed 's,\\\\\[$]\\[$]0,'[$]0','` - ;; -esac - -ECHO=${lt_ECHO-echo} -if test "X[$]1" = X--no-reexec; then - # Discard the --no-reexec flag, and continue. - shift -elif test "X[$]1" = X--fallback-echo; then - # Avoid inline document here, it may be left over - : -elif test "X`{ $ECHO '\t'; } 2>/dev/null`" = 'X\t' ; then - # Yippee, $ECHO works! - : -else - # Restart under the correct shell. - exec $SHELL "[$]0" --no-reexec ${1+"[$]@"} -fi - -if test "X[$]1" = X--fallback-echo; then - # used as fallback echo - shift - cat <<_LT_EOF -[$]* -_LT_EOF - exit 0 -fi - -# The HP-UX ksh and POSIX shell print the target directory to stdout -# if CDPATH is set. -(unset CDPATH) >/dev/null 2>&1 && unset CDPATH - -if test -z "$lt_ECHO"; then - if test "X${echo_test_string+set}" != Xset; then - # find a string as large as possible, as long as the shell can cope with it - for cmd in 'sed 50q "[$]0"' 'sed 20q "[$]0"' 'sed 10q "[$]0"' 'sed 2q "[$]0"' 'echo test'; do - # expected sizes: less than 2Kb, 1Kb, 512 bytes, 16 bytes, ... - if { echo_test_string=`eval $cmd`; } 2>/dev/null && - { test "X$echo_test_string" = "X$echo_test_string"; } 2>/dev/null - then - break - fi - done - fi - - if test "X`{ $ECHO '\t'; } 2>/dev/null`" = 'X\t' && - echo_testing_string=`{ $ECHO "$echo_test_string"; } 2>/dev/null` && - test "X$echo_testing_string" = "X$echo_test_string"; then - : - else - # The Solaris, AIX, and Digital Unix default echo programs unquote - # backslashes. This makes it impossible to quote backslashes using - # echo "$something" | sed 's/\\/\\\\/g' - # - # So, first we look for a working echo in the user's PATH. - - lt_save_ifs="$IFS"; IFS=$PATH_SEPARATOR - for dir in $PATH /usr/ucb; do - IFS="$lt_save_ifs" - if (test -f $dir/echo || test -f $dir/echo$ac_exeext) && - test "X`($dir/echo '\t') 2>/dev/null`" = 'X\t' && - echo_testing_string=`($dir/echo "$echo_test_string") 2>/dev/null` && - test "X$echo_testing_string" = "X$echo_test_string"; then - ECHO="$dir/echo" - break - fi - done - IFS="$lt_save_ifs" - - if test "X$ECHO" = Xecho; then - # We didn't find a better echo, so look for alternatives. - if test "X`{ print -r '\t'; } 2>/dev/null`" = 'X\t' && - echo_testing_string=`{ print -r "$echo_test_string"; } 2>/dev/null` && - test "X$echo_testing_string" = "X$echo_test_string"; then - # This shell has a builtin print -r that does the trick. - ECHO='print -r' - elif { test -f /bin/ksh || test -f /bin/ksh$ac_exeext; } && - test "X$CONFIG_SHELL" != X/bin/ksh; then - # If we have ksh, try running configure again with it. - ORIGINAL_CONFIG_SHELL=${CONFIG_SHELL-/bin/sh} - export ORIGINAL_CONFIG_SHELL - CONFIG_SHELL=/bin/ksh - export CONFIG_SHELL - exec $CONFIG_SHELL "[$]0" --no-reexec ${1+"[$]@"} - else - # Try using printf. - ECHO='printf %s\n' - if test "X`{ $ECHO '\t'; } 2>/dev/null`" = 'X\t' && - echo_testing_string=`{ $ECHO "$echo_test_string"; } 2>/dev/null` && - test "X$echo_testing_string" = "X$echo_test_string"; then - # Cool, printf works - : - elif echo_testing_string=`($ORIGINAL_CONFIG_SHELL "[$]0" --fallback-echo '\t') 2>/dev/null` && - test "X$echo_testing_string" = 'X\t' && - echo_testing_string=`($ORIGINAL_CONFIG_SHELL "[$]0" --fallback-echo "$echo_test_string") 2>/dev/null` && - test "X$echo_testing_string" = "X$echo_test_string"; then - CONFIG_SHELL=$ORIGINAL_CONFIG_SHELL - export CONFIG_SHELL - SHELL="$CONFIG_SHELL" - export SHELL - ECHO="$CONFIG_SHELL [$]0 --fallback-echo" - elif echo_testing_string=`($CONFIG_SHELL "[$]0" --fallback-echo '\t') 2>/dev/null` && - test "X$echo_testing_string" = 'X\t' && - echo_testing_string=`($CONFIG_SHELL "[$]0" --fallback-echo "$echo_test_string") 2>/dev/null` && - test "X$echo_testing_string" = "X$echo_test_string"; then - ECHO="$CONFIG_SHELL [$]0 --fallback-echo" - else - # maybe with a smaller string... - prev=: - - for cmd in 'echo test' 'sed 2q "[$]0"' 'sed 10q "[$]0"' 'sed 20q "[$]0"' 'sed 50q "[$]0"'; do - if { test "X$echo_test_string" = "X`eval $cmd`"; } 2>/dev/null - then - break - fi - prev="$cmd" - done - - if test "$prev" != 'sed 50q "[$]0"'; then - echo_test_string=`eval $prev` - export echo_test_string - exec ${ORIGINAL_CONFIG_SHELL-${CONFIG_SHELL-/bin/sh}} "[$]0" ${1+"[$]@"} - else - # Oops. We lost completely, so just stick with echo. - ECHO=echo - fi - fi - fi - fi - fi -fi - -# Copy echo and quote the copy suitably for passing to libtool from -# the Makefile, instead of quoting the original, which is used later. -lt_ECHO=$ECHO -if test "X$lt_ECHO" = "X$CONFIG_SHELL [$]0 --fallback-echo"; then - lt_ECHO="$CONFIG_SHELL \\\$\[$]0 --fallback-echo" -fi - -AC_SUBST(lt_ECHO) -]) -_LT_DECL([], [SHELL], [1], [Shell to use when invoking shell scripts]) -_LT_DECL([], [ECHO], [1], - [An echo program that does not interpret backslashes]) -])# _LT_PROG_ECHO_BACKSLASH - - -# _LT_ENABLE_LOCK -# --------------- -m4_defun([_LT_ENABLE_LOCK], -[AC_ARG_ENABLE([libtool-lock], - [AS_HELP_STRING([--disable-libtool-lock], - [avoid locking (might break parallel builds)])]) -test "x$enable_libtool_lock" != xno && enable_libtool_lock=yes - -# Some flags need to be propagated to the compiler or linker for good -# libtool support. -case $host in -ia64-*-hpux*) - # Find out which ABI we are using. - echo 'int i;' > conftest.$ac_ext - if AC_TRY_EVAL(ac_compile); then - case `/usr/bin/file conftest.$ac_objext` in - *ELF-32*) - HPUX_IA64_MODE="32" - ;; - *ELF-64*) - HPUX_IA64_MODE="64" - ;; - esac - fi - rm -rf conftest* - ;; -*-*-irix6*) - # Find out which ABI we are using. - echo '[#]line __oline__ "configure"' > conftest.$ac_ext - if AC_TRY_EVAL(ac_compile); then - if test "$lt_cv_prog_gnu_ld" = yes; then - case `/usr/bin/file conftest.$ac_objext` in - *32-bit*) - LD="${LD-ld} -melf32bsmip" - ;; - *N32*) - LD="${LD-ld} -melf32bmipn32" - ;; - *64-bit*) - LD="${LD-ld} -melf64bmip" - ;; - esac - else - case `/usr/bin/file conftest.$ac_objext` in - *32-bit*) - LD="${LD-ld} -32" - ;; - *N32*) - LD="${LD-ld} -n32" - ;; - *64-bit*) - LD="${LD-ld} -64" - ;; - esac - fi - fi - rm -rf conftest* - ;; - -x86_64-*kfreebsd*-gnu|x86_64-*linux*|ppc*-*linux*|powerpc*-*linux*| \ -s390*-*linux*|s390*-*tpf*|sparc*-*linux*) - # Find out which ABI we are using. - echo 'int i;' > conftest.$ac_ext - if AC_TRY_EVAL(ac_compile); then - case `/usr/bin/file conftest.o` in - *32-bit*) - case $host in - x86_64-*kfreebsd*-gnu) - LD="${LD-ld} -m elf_i386_fbsd" - ;; - x86_64-*linux*) - LD="${LD-ld} -m elf_i386" - ;; - ppc64-*linux*|powerpc64-*linux*) - LD="${LD-ld} -m elf32ppclinux" - ;; - s390x-*linux*) - LD="${LD-ld} -m elf_s390" - ;; - sparc64-*linux*) - LD="${LD-ld} -m elf32_sparc" - ;; - esac - ;; - *64-bit*) - case $host in - x86_64-*kfreebsd*-gnu) - LD="${LD-ld} -m elf_x86_64_fbsd" - ;; - x86_64-*linux*) - LD="${LD-ld} -m elf_x86_64" - ;; - ppc*-*linux*|powerpc*-*linux*) - LD="${LD-ld} -m elf64ppc" - ;; - s390*-*linux*|s390*-*tpf*) - LD="${LD-ld} -m elf64_s390" - ;; - sparc*-*linux*) - LD="${LD-ld} -m elf64_sparc" - ;; - esac - ;; - esac - fi - rm -rf conftest* - ;; - -*-*-sco3.2v5*) - # On SCO OpenServer 5, we need -belf to get full-featured binaries. - SAVE_CFLAGS="$CFLAGS" - CFLAGS="$CFLAGS -belf" - AC_CACHE_CHECK([whether the C compiler needs -belf], lt_cv_cc_needs_belf, - [AC_LANG_PUSH(C) - AC_LINK_IFELSE([AC_LANG_PROGRAM([[]],[[]])],[lt_cv_cc_needs_belf=yes],[lt_cv_cc_needs_belf=no]) - AC_LANG_POP]) - if test x"$lt_cv_cc_needs_belf" != x"yes"; then - # this is probably gcc 2.8.0, egcs 1.0 or newer; no need for -belf - CFLAGS="$SAVE_CFLAGS" - fi - ;; -sparc*-*solaris*) - # Find out which ABI we are using. - echo 'int i;' > conftest.$ac_ext - if AC_TRY_EVAL(ac_compile); then - case `/usr/bin/file conftest.o` in - *64-bit*) - case $lt_cv_prog_gnu_ld in - yes*) LD="${LD-ld} -m elf64_sparc" ;; - *) - if ${LD-ld} -64 -r -o conftest2.o conftest.o >/dev/null 2>&1; then - LD="${LD-ld} -64" - fi - ;; - esac - ;; - esac - fi - rm -rf conftest* - ;; -esac - -need_locks="$enable_libtool_lock" -])# _LT_ENABLE_LOCK - - -# _LT_CMD_OLD_ARCHIVE -# ------------------- -m4_defun([_LT_CMD_OLD_ARCHIVE], -[AC_CHECK_TOOL(AR, ar, false) -test -z "$AR" && AR=ar -test -z "$AR_FLAGS" && AR_FLAGS=cru -_LT_DECL([], [AR], [1], [The archiver]) -_LT_DECL([], [AR_FLAGS], [1]) - -AC_CHECK_TOOL(STRIP, strip, :) -test -z "$STRIP" && STRIP=: -_LT_DECL([], [STRIP], [1], [A symbol stripping program]) - -AC_CHECK_TOOL(RANLIB, ranlib, :) -test -z "$RANLIB" && RANLIB=: -_LT_DECL([], [RANLIB], [1], - [Commands used to install an old-style archive]) - -# Determine commands to create old-style static archives. -old_archive_cmds='$AR $AR_FLAGS $oldlib$oldobjs' -old_postinstall_cmds='chmod 644 $oldlib' -old_postuninstall_cmds= - -if test -n "$RANLIB"; then - case $host_os in - openbsd*) - old_postinstall_cmds="$old_postinstall_cmds~\$RANLIB -t \$oldlib" - ;; - *) - old_postinstall_cmds="$old_postinstall_cmds~\$RANLIB \$oldlib" - ;; - esac - old_archive_cmds="$old_archive_cmds~\$RANLIB \$oldlib" -fi -_LT_DECL([], [old_postinstall_cmds], [2]) -_LT_DECL([], [old_postuninstall_cmds], [2]) -_LT_TAGDECL([], [old_archive_cmds], [2], - [Commands used to build an old-style archive]) -])# _LT_CMD_OLD_ARCHIVE - - -# _LT_COMPILER_OPTION(MESSAGE, VARIABLE-NAME, FLAGS, -# [OUTPUT-FILE], [ACTION-SUCCESS], [ACTION-FAILURE]) -# ---------------------------------------------------------------- -# Check whether the given compiler option works -AC_DEFUN([_LT_COMPILER_OPTION], -[m4_require([_LT_FILEUTILS_DEFAULTS])dnl -m4_require([_LT_DECL_SED])dnl -AC_CACHE_CHECK([$1], [$2], - [$2=no - m4_if([$4], , [ac_outfile=conftest.$ac_objext], [ac_outfile=$4]) - echo "$lt_simple_compile_test_code" > conftest.$ac_ext - lt_compiler_flag="$3" - # Insert the option either (1) after the last *FLAGS variable, or - # (2) before a word containing "conftest.", or (3) at the end. - # Note that $ac_compile itself does not contain backslashes and begins - # with a dollar sign (not a hyphen), so the echo should work correctly. - # The option is referenced via a variable to avoid confusing sed. - lt_compile=`echo "$ac_compile" | $SED \ - -e 's:.*FLAGS}\{0,1\} :&$lt_compiler_flag :; t' \ - -e 's: [[^ ]]*conftest\.: $lt_compiler_flag&:; t' \ - -e 's:$: $lt_compiler_flag:'` - (eval echo "\"\$as_me:__oline__: $lt_compile\"" >&AS_MESSAGE_LOG_FD) - (eval "$lt_compile" 2>conftest.err) - ac_status=$? - cat conftest.err >&AS_MESSAGE_LOG_FD - echo "$as_me:__oline__: \$? = $ac_status" >&AS_MESSAGE_LOG_FD - if (exit $ac_status) && test -s "$ac_outfile"; then - # The compiler can only warn and ignore the option if not recognized - # So say no if there are warnings other than the usual output. - $ECHO "X$_lt_compiler_boilerplate" | $Xsed -e '/^$/d' >conftest.exp - $SED '/^$/d; /^ *+/d' conftest.err >conftest.er2 - if test ! -s conftest.er2 || diff conftest.exp conftest.er2 >/dev/null; then - $2=yes - fi - fi - $RM conftest* -]) - -if test x"[$]$2" = xyes; then - m4_if([$5], , :, [$5]) -else - m4_if([$6], , :, [$6]) -fi -])# _LT_COMPILER_OPTION - -# Old name: -AU_ALIAS([AC_LIBTOOL_COMPILER_OPTION], [_LT_COMPILER_OPTION]) -dnl aclocal-1.4 backwards compatibility: -dnl AC_DEFUN([AC_LIBTOOL_COMPILER_OPTION], []) - - -# _LT_LINKER_OPTION(MESSAGE, VARIABLE-NAME, FLAGS, -# [ACTION-SUCCESS], [ACTION-FAILURE]) -# ---------------------------------------------------- -# Check whether the given linker option works -AC_DEFUN([_LT_LINKER_OPTION], -[m4_require([_LT_FILEUTILS_DEFAULTS])dnl -m4_require([_LT_DECL_SED])dnl -AC_CACHE_CHECK([$1], [$2], - [$2=no - save_LDFLAGS="$LDFLAGS" - LDFLAGS="$LDFLAGS $3" - echo "$lt_simple_link_test_code" > conftest.$ac_ext - if (eval $ac_link 2>conftest.err) && test -s conftest$ac_exeext; then - # The linker can only warn and ignore the option if not recognized - # So say no if there are warnings - if test -s conftest.err; then - # Append any errors to the config.log. - cat conftest.err 1>&AS_MESSAGE_LOG_FD - $ECHO "X$_lt_linker_boilerplate" | $Xsed -e '/^$/d' > conftest.exp - $SED '/^$/d; /^ *+/d' conftest.err >conftest.er2 - if diff conftest.exp conftest.er2 >/dev/null; then - $2=yes - fi - else - $2=yes - fi - fi - $RM -r conftest* - LDFLAGS="$save_LDFLAGS" -]) - -if test x"[$]$2" = xyes; then - m4_if([$4], , :, [$4]) -else - m4_if([$5], , :, [$5]) -fi -])# _LT_LINKER_OPTION - -# Old name: -AU_ALIAS([AC_LIBTOOL_LINKER_OPTION], [_LT_LINKER_OPTION]) -dnl aclocal-1.4 backwards compatibility: -dnl AC_DEFUN([AC_LIBTOOL_LINKER_OPTION], []) - - -# LT_CMD_MAX_LEN -#--------------- -AC_DEFUN([LT_CMD_MAX_LEN], -[AC_REQUIRE([AC_CANONICAL_HOST])dnl -# find the maximum length of command line arguments -AC_MSG_CHECKING([the maximum length of command line arguments]) -AC_CACHE_VAL([lt_cv_sys_max_cmd_len], [dnl - i=0 - teststring="ABCD" - - case $build_os in - msdosdjgpp*) - # On DJGPP, this test can blow up pretty badly due to problems in libc - # (any single argument exceeding 2000 bytes causes a buffer overrun - # during glob expansion). Even if it were fixed, the result of this - # check would be larger than it should be. - lt_cv_sys_max_cmd_len=12288; # 12K is about right - ;; - - gnu*) - # Under GNU Hurd, this test is not required because there is - # no limit to the length of command line arguments. - # Libtool will interpret -1 as no limit whatsoever - lt_cv_sys_max_cmd_len=-1; - ;; - - cygwin* | mingw* | cegcc*) - # On Win9x/ME, this test blows up -- it succeeds, but takes - # about 5 minutes as the teststring grows exponentially. - # Worse, since 9x/ME are not pre-emptively multitasking, - # you end up with a "frozen" computer, even though with patience - # the test eventually succeeds (with a max line length of 256k). - # Instead, let's just punt: use the minimum linelength reported by - # all of the supported platforms: 8192 (on NT/2K/XP). - lt_cv_sys_max_cmd_len=8192; - ;; - - amigaos*) - # On AmigaOS with pdksh, this test takes hours, literally. - # So we just punt and use a minimum line length of 8192. - lt_cv_sys_max_cmd_len=8192; - ;; - - netbsd* | freebsd* | openbsd* | darwin* | dragonfly*) - # This has been around since 386BSD, at least. Likely further. - if test -x /sbin/sysctl; then - lt_cv_sys_max_cmd_len=`/sbin/sysctl -n kern.argmax` - elif test -x /usr/sbin/sysctl; then - lt_cv_sys_max_cmd_len=`/usr/sbin/sysctl -n kern.argmax` - else - lt_cv_sys_max_cmd_len=65536 # usable default for all BSDs - fi - # And add a safety zone - lt_cv_sys_max_cmd_len=`expr $lt_cv_sys_max_cmd_len \/ 4` - lt_cv_sys_max_cmd_len=`expr $lt_cv_sys_max_cmd_len \* 3` - ;; - - interix*) - # We know the value 262144 and hardcode it with a safety zone (like BSD) - lt_cv_sys_max_cmd_len=196608 - ;; - - osf*) - # Dr. Hans Ekkehard Plesser reports seeing a kernel panic running configure - # due to this test when exec_disable_arg_limit is 1 on Tru64. It is not - # nice to cause kernel panics so lets avoid the loop below. - # First set a reasonable default. - lt_cv_sys_max_cmd_len=16384 - # - if test -x /sbin/sysconfig; then - case `/sbin/sysconfig -q proc exec_disable_arg_limit` in - *1*) lt_cv_sys_max_cmd_len=-1 ;; - esac - fi - ;; - sco3.2v5*) - lt_cv_sys_max_cmd_len=102400 - ;; - sysv5* | sco5v6* | sysv4.2uw2*) - kargmax=`grep ARG_MAX /etc/conf/cf.d/stune 2>/dev/null` - if test -n "$kargmax"; then - lt_cv_sys_max_cmd_len=`echo $kargmax | sed 's/.*[[ ]]//'` - else - lt_cv_sys_max_cmd_len=32768 - fi - ;; - *) - lt_cv_sys_max_cmd_len=`(getconf ARG_MAX) 2> /dev/null` - if test -n "$lt_cv_sys_max_cmd_len"; then - lt_cv_sys_max_cmd_len=`expr $lt_cv_sys_max_cmd_len \/ 4` - lt_cv_sys_max_cmd_len=`expr $lt_cv_sys_max_cmd_len \* 3` - else - # Make teststring a little bigger before we do anything with it. - # a 1K string should be a reasonable start. - for i in 1 2 3 4 5 6 7 8 ; do - teststring=$teststring$teststring - done - SHELL=${SHELL-${CONFIG_SHELL-/bin/sh}} - # If test is not a shell built-in, we'll probably end up computing a - # maximum length that is only half of the actual maximum length, but - # we can't tell. - while { test "X"`$SHELL [$]0 --fallback-echo "X$teststring$teststring" 2>/dev/null` \ - = "XX$teststring$teststring"; } >/dev/null 2>&1 && - test $i != 17 # 1/2 MB should be enough - do - i=`expr $i + 1` - teststring=$teststring$teststring - done - # Only check the string length outside the loop. - lt_cv_sys_max_cmd_len=`expr "X$teststring" : ".*" 2>&1` - teststring= - # Add a significant safety factor because C++ compilers can tack on - # massive amounts of additional arguments before passing them to the - # linker. It appears as though 1/2 is a usable value. - lt_cv_sys_max_cmd_len=`expr $lt_cv_sys_max_cmd_len \/ 2` - fi - ;; - esac -]) -if test -n $lt_cv_sys_max_cmd_len ; then - AC_MSG_RESULT($lt_cv_sys_max_cmd_len) -else - AC_MSG_RESULT(none) -fi -max_cmd_len=$lt_cv_sys_max_cmd_len -_LT_DECL([], [max_cmd_len], [0], - [What is the maximum length of a command?]) -])# LT_CMD_MAX_LEN - -# Old name: -AU_ALIAS([AC_LIBTOOL_SYS_MAX_CMD_LEN], [LT_CMD_MAX_LEN]) -dnl aclocal-1.4 backwards compatibility: -dnl AC_DEFUN([AC_LIBTOOL_SYS_MAX_CMD_LEN], []) - - -# _LT_HEADER_DLFCN -# ---------------- -m4_defun([_LT_HEADER_DLFCN], -[AC_CHECK_HEADERS([dlfcn.h], [], [], [AC_INCLUDES_DEFAULT])dnl -])# _LT_HEADER_DLFCN - - -# _LT_TRY_DLOPEN_SELF (ACTION-IF-TRUE, ACTION-IF-TRUE-W-USCORE, -# ACTION-IF-FALSE, ACTION-IF-CROSS-COMPILING) -# ---------------------------------------------------------------- -m4_defun([_LT_TRY_DLOPEN_SELF], -[m4_require([_LT_HEADER_DLFCN])dnl -if test "$cross_compiling" = yes; then : - [$4] -else - lt_dlunknown=0; lt_dlno_uscore=1; lt_dlneed_uscore=2 - lt_status=$lt_dlunknown - cat > conftest.$ac_ext <<_LT_EOF -[#line __oline__ "configure" -#include "confdefs.h" - -#if HAVE_DLFCN_H -#include -#endif - -#include - -#ifdef RTLD_GLOBAL -# define LT_DLGLOBAL RTLD_GLOBAL -#else -# ifdef DL_GLOBAL -# define LT_DLGLOBAL DL_GLOBAL -# else -# define LT_DLGLOBAL 0 -# endif -#endif - -/* We may have to define LT_DLLAZY_OR_NOW in the command line if we - find out it does not work in some platform. */ -#ifndef LT_DLLAZY_OR_NOW -# ifdef RTLD_LAZY -# define LT_DLLAZY_OR_NOW RTLD_LAZY -# else -# ifdef DL_LAZY -# define LT_DLLAZY_OR_NOW DL_LAZY -# else -# ifdef RTLD_NOW -# define LT_DLLAZY_OR_NOW RTLD_NOW -# else -# ifdef DL_NOW -# define LT_DLLAZY_OR_NOW DL_NOW -# else -# define LT_DLLAZY_OR_NOW 0 -# endif -# endif -# endif -# endif -#endif - -void fnord() { int i=42;} -int main () -{ - void *self = dlopen (0, LT_DLGLOBAL|LT_DLLAZY_OR_NOW); - int status = $lt_dlunknown; - - if (self) - { - if (dlsym (self,"fnord")) status = $lt_dlno_uscore; - else if (dlsym( self,"_fnord")) status = $lt_dlneed_uscore; - /* dlclose (self); */ - } - else - puts (dlerror ()); - - return status; -}] -_LT_EOF - if AC_TRY_EVAL(ac_link) && test -s conftest${ac_exeext} 2>/dev/null; then - (./conftest; exit; ) >&AS_MESSAGE_LOG_FD 2>/dev/null - lt_status=$? - case x$lt_status in - x$lt_dlno_uscore) $1 ;; - x$lt_dlneed_uscore) $2 ;; - x$lt_dlunknown|x*) $3 ;; - esac - else : - # compilation failed - $3 - fi -fi -rm -fr conftest* -])# _LT_TRY_DLOPEN_SELF - - -# LT_SYS_DLOPEN_SELF -# ------------------ -AC_DEFUN([LT_SYS_DLOPEN_SELF], -[m4_require([_LT_HEADER_DLFCN])dnl -if test "x$enable_dlopen" != xyes; then - enable_dlopen=unknown - enable_dlopen_self=unknown - enable_dlopen_self_static=unknown -else - lt_cv_dlopen=no - lt_cv_dlopen_libs= - - case $host_os in - beos*) - lt_cv_dlopen="load_add_on" - lt_cv_dlopen_libs= - lt_cv_dlopen_self=yes - ;; - - mingw* | pw32* | cegcc*) - lt_cv_dlopen="LoadLibrary" - lt_cv_dlopen_libs= - ;; - - cygwin*) - lt_cv_dlopen="dlopen" - lt_cv_dlopen_libs= - ;; - - darwin*) - # if libdl is installed we need to link against it - AC_CHECK_LIB([dl], [dlopen], - [lt_cv_dlopen="dlopen" lt_cv_dlopen_libs="-ldl"],[ - lt_cv_dlopen="dyld" - lt_cv_dlopen_libs= - lt_cv_dlopen_self=yes - ]) - ;; - - *) - AC_CHECK_FUNC([shl_load], - [lt_cv_dlopen="shl_load"], - [AC_CHECK_LIB([dld], [shl_load], - [lt_cv_dlopen="shl_load" lt_cv_dlopen_libs="-ldld"], - [AC_CHECK_FUNC([dlopen], - [lt_cv_dlopen="dlopen"], - [AC_CHECK_LIB([dl], [dlopen], - [lt_cv_dlopen="dlopen" lt_cv_dlopen_libs="-ldl"], - [AC_CHECK_LIB([svld], [dlopen], - [lt_cv_dlopen="dlopen" lt_cv_dlopen_libs="-lsvld"], - [AC_CHECK_LIB([dld], [dld_link], - [lt_cv_dlopen="dld_link" lt_cv_dlopen_libs="-ldld"]) - ]) - ]) - ]) - ]) - ]) - ;; - esac - - if test "x$lt_cv_dlopen" != xno; then - enable_dlopen=yes - else - enable_dlopen=no - fi - - case $lt_cv_dlopen in - dlopen) - save_CPPFLAGS="$CPPFLAGS" - test "x$ac_cv_header_dlfcn_h" = xyes && CPPFLAGS="$CPPFLAGS -DHAVE_DLFCN_H" - - save_LDFLAGS="$LDFLAGS" - wl=$lt_prog_compiler_wl eval LDFLAGS=\"\$LDFLAGS $export_dynamic_flag_spec\" - - save_LIBS="$LIBS" - LIBS="$lt_cv_dlopen_libs $LIBS" - - AC_CACHE_CHECK([whether a program can dlopen itself], - lt_cv_dlopen_self, [dnl - _LT_TRY_DLOPEN_SELF( - lt_cv_dlopen_self=yes, lt_cv_dlopen_self=yes, - lt_cv_dlopen_self=no, lt_cv_dlopen_self=cross) - ]) - - if test "x$lt_cv_dlopen_self" = xyes; then - wl=$lt_prog_compiler_wl eval LDFLAGS=\"\$LDFLAGS $lt_prog_compiler_static\" - AC_CACHE_CHECK([whether a statically linked program can dlopen itself], - lt_cv_dlopen_self_static, [dnl - _LT_TRY_DLOPEN_SELF( - lt_cv_dlopen_self_static=yes, lt_cv_dlopen_self_static=yes, - lt_cv_dlopen_self_static=no, lt_cv_dlopen_self_static=cross) - ]) - fi - - CPPFLAGS="$save_CPPFLAGS" - LDFLAGS="$save_LDFLAGS" - LIBS="$save_LIBS" - ;; - esac - - case $lt_cv_dlopen_self in - yes|no) enable_dlopen_self=$lt_cv_dlopen_self ;; - *) enable_dlopen_self=unknown ;; - esac - - case $lt_cv_dlopen_self_static in - yes|no) enable_dlopen_self_static=$lt_cv_dlopen_self_static ;; - *) enable_dlopen_self_static=unknown ;; - esac -fi -_LT_DECL([dlopen_support], [enable_dlopen], [0], - [Whether dlopen is supported]) -_LT_DECL([dlopen_self], [enable_dlopen_self], [0], - [Whether dlopen of programs is supported]) -_LT_DECL([dlopen_self_static], [enable_dlopen_self_static], [0], - [Whether dlopen of statically linked programs is supported]) -])# LT_SYS_DLOPEN_SELF - -# Old name: -AU_ALIAS([AC_LIBTOOL_DLOPEN_SELF], [LT_SYS_DLOPEN_SELF]) -dnl aclocal-1.4 backwards compatibility: -dnl AC_DEFUN([AC_LIBTOOL_DLOPEN_SELF], []) - - -# _LT_COMPILER_C_O([TAGNAME]) -# --------------------------- -# Check to see if options -c and -o are simultaneously supported by compiler. -# This macro does not hard code the compiler like AC_PROG_CC_C_O. -m4_defun([_LT_COMPILER_C_O], -[m4_require([_LT_DECL_SED])dnl -m4_require([_LT_FILEUTILS_DEFAULTS])dnl -m4_require([_LT_TAG_COMPILER])dnl -AC_CACHE_CHECK([if $compiler supports -c -o file.$ac_objext], - [_LT_TAGVAR(lt_cv_prog_compiler_c_o, $1)], - [_LT_TAGVAR(lt_cv_prog_compiler_c_o, $1)=no - $RM -r conftest 2>/dev/null - mkdir conftest - cd conftest - mkdir out - echo "$lt_simple_compile_test_code" > conftest.$ac_ext - - lt_compiler_flag="-o out/conftest2.$ac_objext" - # Insert the option either (1) after the last *FLAGS variable, or - # (2) before a word containing "conftest.", or (3) at the end. - # Note that $ac_compile itself does not contain backslashes and begins - # with a dollar sign (not a hyphen), so the echo should work correctly. - lt_compile=`echo "$ac_compile" | $SED \ - -e 's:.*FLAGS}\{0,1\} :&$lt_compiler_flag :; t' \ - -e 's: [[^ ]]*conftest\.: $lt_compiler_flag&:; t' \ - -e 's:$: $lt_compiler_flag:'` - (eval echo "\"\$as_me:__oline__: $lt_compile\"" >&AS_MESSAGE_LOG_FD) - (eval "$lt_compile" 2>out/conftest.err) - ac_status=$? - cat out/conftest.err >&AS_MESSAGE_LOG_FD - echo "$as_me:__oline__: \$? = $ac_status" >&AS_MESSAGE_LOG_FD - if (exit $ac_status) && test -s out/conftest2.$ac_objext - then - # The compiler can only warn and ignore the option if not recognized - # So say no if there are warnings - $ECHO "X$_lt_compiler_boilerplate" | $Xsed -e '/^$/d' > out/conftest.exp - $SED '/^$/d; /^ *+/d' out/conftest.err >out/conftest.er2 - if test ! -s out/conftest.er2 || diff out/conftest.exp out/conftest.er2 >/dev/null; then - _LT_TAGVAR(lt_cv_prog_compiler_c_o, $1)=yes - fi - fi - chmod u+w . 2>&AS_MESSAGE_LOG_FD - $RM conftest* - # SGI C++ compiler will create directory out/ii_files/ for - # template instantiation - test -d out/ii_files && $RM out/ii_files/* && rmdir out/ii_files - $RM out/* && rmdir out - cd .. - $RM -r conftest - $RM conftest* -]) -_LT_TAGDECL([compiler_c_o], [lt_cv_prog_compiler_c_o], [1], - [Does compiler simultaneously support -c and -o options?]) -])# _LT_COMPILER_C_O - - -# _LT_COMPILER_FILE_LOCKS([TAGNAME]) -# ---------------------------------- -# Check to see if we can do hard links to lock some files if needed -m4_defun([_LT_COMPILER_FILE_LOCKS], -[m4_require([_LT_ENABLE_LOCK])dnl -m4_require([_LT_FILEUTILS_DEFAULTS])dnl -_LT_COMPILER_C_O([$1]) - -hard_links="nottested" -if test "$_LT_TAGVAR(lt_cv_prog_compiler_c_o, $1)" = no && test "$need_locks" != no; then - # do not overwrite the value of need_locks provided by the user - AC_MSG_CHECKING([if we can lock with hard links]) - hard_links=yes - $RM conftest* - ln conftest.a conftest.b 2>/dev/null && hard_links=no - touch conftest.a - ln conftest.a conftest.b 2>&5 || hard_links=no - ln conftest.a conftest.b 2>/dev/null && hard_links=no - AC_MSG_RESULT([$hard_links]) - if test "$hard_links" = no; then - AC_MSG_WARN([`$CC' does not support `-c -o', so `make -j' may be unsafe]) - need_locks=warn - fi -else - need_locks=no -fi -_LT_DECL([], [need_locks], [1], [Must we lock files when doing compilation?]) -])# _LT_COMPILER_FILE_LOCKS - - -# _LT_CHECK_OBJDIR -# ---------------- -m4_defun([_LT_CHECK_OBJDIR], -[AC_CACHE_CHECK([for objdir], [lt_cv_objdir], -[rm -f .libs 2>/dev/null -mkdir .libs 2>/dev/null -if test -d .libs; then - lt_cv_objdir=.libs -else - # MS-DOS does not allow filenames that begin with a dot. - lt_cv_objdir=_libs -fi -rmdir .libs 2>/dev/null]) -objdir=$lt_cv_objdir -_LT_DECL([], [objdir], [0], - [The name of the directory that contains temporary libtool files])dnl -m4_pattern_allow([LT_OBJDIR])dnl -AC_DEFINE_UNQUOTED(LT_OBJDIR, "$lt_cv_objdir/", - [Define to the sub-directory in which libtool stores uninstalled libraries.]) -])# _LT_CHECK_OBJDIR - - -# _LT_LINKER_HARDCODE_LIBPATH([TAGNAME]) -# -------------------------------------- -# Check hardcoding attributes. -m4_defun([_LT_LINKER_HARDCODE_LIBPATH], -[AC_MSG_CHECKING([how to hardcode library paths into programs]) -_LT_TAGVAR(hardcode_action, $1)= -if test -n "$_LT_TAGVAR(hardcode_libdir_flag_spec, $1)" || - test -n "$_LT_TAGVAR(runpath_var, $1)" || - test "X$_LT_TAGVAR(hardcode_automatic, $1)" = "Xyes" ; then - - # We can hardcode non-existent directories. - if test "$_LT_TAGVAR(hardcode_direct, $1)" != no && - # If the only mechanism to avoid hardcoding is shlibpath_var, we - # have to relink, otherwise we might link with an installed library - # when we should be linking with a yet-to-be-installed one - ## test "$_LT_TAGVAR(hardcode_shlibpath_var, $1)" != no && - test "$_LT_TAGVAR(hardcode_minus_L, $1)" != no; then - # Linking always hardcodes the temporary library directory. - _LT_TAGVAR(hardcode_action, $1)=relink - else - # We can link without hardcoding, and we can hardcode nonexisting dirs. - _LT_TAGVAR(hardcode_action, $1)=immediate - fi -else - # We cannot hardcode anything, or else we can only hardcode existing - # directories. - _LT_TAGVAR(hardcode_action, $1)=unsupported -fi -AC_MSG_RESULT([$_LT_TAGVAR(hardcode_action, $1)]) - -if test "$_LT_TAGVAR(hardcode_action, $1)" = relink || - test "$_LT_TAGVAR(inherit_rpath, $1)" = yes; then - # Fast installation is not supported - enable_fast_install=no -elif test "$shlibpath_overrides_runpath" = yes || - test "$enable_shared" = no; then - # Fast installation is not necessary - enable_fast_install=needless -fi -_LT_TAGDECL([], [hardcode_action], [0], - [How to hardcode a shared library path into an executable]) -])# _LT_LINKER_HARDCODE_LIBPATH - - -# _LT_CMD_STRIPLIB -# ---------------- -m4_defun([_LT_CMD_STRIPLIB], -[m4_require([_LT_DECL_EGREP]) -striplib= -old_striplib= -AC_MSG_CHECKING([whether stripping libraries is possible]) -if test -n "$STRIP" && $STRIP -V 2>&1 | $GREP "GNU strip" >/dev/null; then - test -z "$old_striplib" && old_striplib="$STRIP --strip-debug" - test -z "$striplib" && striplib="$STRIP --strip-unneeded" - AC_MSG_RESULT([yes]) -else -# FIXME - insert some real tests, host_os isn't really good enough - case $host_os in - darwin*) - if test -n "$STRIP" ; then - striplib="$STRIP -x" - old_striplib="$STRIP -S" - AC_MSG_RESULT([yes]) - else - AC_MSG_RESULT([no]) - fi - ;; - *) - AC_MSG_RESULT([no]) - ;; - esac -fi -_LT_DECL([], [old_striplib], [1], [Commands to strip libraries]) -_LT_DECL([], [striplib], [1]) -])# _LT_CMD_STRIPLIB - - -# _LT_SYS_DYNAMIC_LINKER([TAG]) -# ----------------------------- -# PORTME Fill in your ld.so characteristics -m4_defun([_LT_SYS_DYNAMIC_LINKER], -[AC_REQUIRE([AC_CANONICAL_HOST])dnl -m4_require([_LT_DECL_EGREP])dnl -m4_require([_LT_FILEUTILS_DEFAULTS])dnl -m4_require([_LT_DECL_OBJDUMP])dnl -m4_require([_LT_DECL_SED])dnl -AC_MSG_CHECKING([dynamic linker characteristics]) -m4_if([$1], - [], [ -if test "$GCC" = yes; then - case $host_os in - darwin*) lt_awk_arg="/^libraries:/,/LR/" ;; - *) lt_awk_arg="/^libraries:/" ;; - esac - lt_search_path_spec=`$CC -print-search-dirs | awk $lt_awk_arg | $SED -e "s/^libraries://" -e "s,=/,/,g"` - if $ECHO "$lt_search_path_spec" | $GREP ';' >/dev/null ; then - # if the path contains ";" then we assume it to be the separator - # otherwise default to the standard path separator (i.e. ":") - it is - # assumed that no part of a normal pathname contains ";" but that should - # okay in the real world where ";" in dirpaths is itself problematic. - lt_search_path_spec=`$ECHO "$lt_search_path_spec" | $SED -e 's/;/ /g'` - else - lt_search_path_spec=`$ECHO "$lt_search_path_spec" | $SED -e "s/$PATH_SEPARATOR/ /g"` - fi - # Ok, now we have the path, separated by spaces, we can step through it - # and add multilib dir if necessary. - lt_tmp_lt_search_path_spec= - lt_multi_os_dir=`$CC $CPPFLAGS $CFLAGS $LDFLAGS -print-multi-os-directory 2>/dev/null` - for lt_sys_path in $lt_search_path_spec; do - if test -d "$lt_sys_path/$lt_multi_os_dir"; then - lt_tmp_lt_search_path_spec="$lt_tmp_lt_search_path_spec $lt_sys_path/$lt_multi_os_dir" - else - test -d "$lt_sys_path" && \ - lt_tmp_lt_search_path_spec="$lt_tmp_lt_search_path_spec $lt_sys_path" - fi - done - lt_search_path_spec=`$ECHO $lt_tmp_lt_search_path_spec | awk ' -BEGIN {RS=" "; FS="/|\n";} { - lt_foo=""; - lt_count=0; - for (lt_i = NF; lt_i > 0; lt_i--) { - if ($lt_i != "" && $lt_i != ".") { - if ($lt_i == "..") { - lt_count++; - } else { - if (lt_count == 0) { - lt_foo="/" $lt_i lt_foo; - } else { - lt_count--; - } - } - } - } - if (lt_foo != "") { lt_freq[[lt_foo]]++; } - if (lt_freq[[lt_foo]] == 1) { print lt_foo; } -}'` - sys_lib_search_path_spec=`$ECHO $lt_search_path_spec` -else - sys_lib_search_path_spec="/lib /usr/lib /usr/local/lib" -fi]) -library_names_spec= -libname_spec='lib$name' -soname_spec= -shrext_cmds=".so" -postinstall_cmds= -postuninstall_cmds= -finish_cmds= -finish_eval= -shlibpath_var= -shlibpath_overrides_runpath=unknown -version_type=none -dynamic_linker="$host_os ld.so" -sys_lib_dlsearch_path_spec="/lib /usr/lib" -need_lib_prefix=unknown -hardcode_into_libs=no - -# when you set need_version to no, make sure it does not cause -set_version -# flags to be left without arguments -need_version=unknown - -case $host_os in -aix3*) - version_type=linux - library_names_spec='${libname}${release}${shared_ext}$versuffix $libname.a' - shlibpath_var=LIBPATH - - # AIX 3 has no versioning support, so we append a major version to the name. - soname_spec='${libname}${release}${shared_ext}$major' - ;; - -aix[[4-9]]*) - version_type=linux - need_lib_prefix=no - need_version=no - hardcode_into_libs=yes - if test "$host_cpu" = ia64; then - # AIX 5 supports IA64 - library_names_spec='${libname}${release}${shared_ext}$major ${libname}${release}${shared_ext}$versuffix $libname${shared_ext}' - shlibpath_var=LD_LIBRARY_PATH - else - # With GCC up to 2.95.x, collect2 would create an import file - # for dependence libraries. The import file would start with - # the line `#! .'. This would cause the generated library to - # depend on `.', always an invalid library. This was fixed in - # development snapshots of GCC prior to 3.0. - case $host_os in - aix4 | aix4.[[01]] | aix4.[[01]].*) - if { echo '#if __GNUC__ > 2 || (__GNUC__ == 2 && __GNUC_MINOR__ >= 97)' - echo ' yes ' - echo '#endif'; } | ${CC} -E - | $GREP yes > /dev/null; then - : - else - can_build_shared=no - fi - ;; - esac - # AIX (on Power*) has no versioning support, so currently we can not hardcode correct - # soname into executable. Probably we can add versioning support to - # collect2, so additional links can be useful in future. - if test "$aix_use_runtimelinking" = yes; then - # If using run time linking (on AIX 4.2 or later) use lib.so - # instead of lib.a to let people know that these are not - # typical AIX shared libraries. - library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}$major $libname${shared_ext}' - else - # We preserve .a as extension for shared libraries through AIX4.2 - # and later when we are not doing run time linking. - library_names_spec='${libname}${release}.a $libname.a' - soname_spec='${libname}${release}${shared_ext}$major' - fi - shlibpath_var=LIBPATH - fi - ;; - -amigaos*) - case $host_cpu in - powerpc) - # Since July 2007 AmigaOS4 officially supports .so libraries. - # When compiling the executable, add -use-dynld -Lsobjs: to the compileline. - library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}$major $libname${shared_ext}' - ;; - m68k) - library_names_spec='$libname.ixlibrary $libname.a' - # Create ${libname}_ixlibrary.a entries in /sys/libs. - finish_eval='for lib in `ls $libdir/*.ixlibrary 2>/dev/null`; do libname=`$ECHO "X$lib" | $Xsed -e '\''s%^.*/\([[^/]]*\)\.ixlibrary$%\1%'\''`; test $RM /sys/libs/${libname}_ixlibrary.a; $show "cd /sys/libs && $LN_S $lib ${libname}_ixlibrary.a"; cd /sys/libs && $LN_S $lib ${libname}_ixlibrary.a || exit 1; done' - ;; - esac - ;; - -beos*) - library_names_spec='${libname}${shared_ext}' - dynamic_linker="$host_os ld.so" - shlibpath_var=LIBRARY_PATH - ;; - -bsdi[[45]]*) - version_type=linux - need_version=no - library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}$major $libname${shared_ext}' - soname_spec='${libname}${release}${shared_ext}$major' - finish_cmds='PATH="\$PATH:/sbin" ldconfig $libdir' - shlibpath_var=LD_LIBRARY_PATH - sys_lib_search_path_spec="/shlib /usr/lib /usr/X11/lib /usr/contrib/lib /lib /usr/local/lib" - sys_lib_dlsearch_path_spec="/shlib /usr/lib /usr/local/lib" - # the default ld.so.conf also contains /usr/contrib/lib and - # /usr/X11R6/lib (/usr/X11 is a link to /usr/X11R6), but let us allow - # libtool to hard-code these into programs - ;; - -cygwin* | mingw* | pw32* | cegcc*) - version_type=windows - shrext_cmds=".dll" - need_version=no - need_lib_prefix=no - - case $GCC,$host_os in - yes,cygwin* | yes,mingw* | yes,pw32* | yes,cegcc*) - library_names_spec='$libname.dll.a' - # DLL is installed to $(libdir)/../bin by postinstall_cmds - postinstall_cmds='base_file=`basename \${file}`~ - dlpath=`$SHELL 2>&1 -c '\''. $dir/'\''\${base_file}'\''i; echo \$dlname'\''`~ - dldir=$destdir/`dirname \$dlpath`~ - test -d \$dldir || mkdir -p \$dldir~ - $install_prog $dir/$dlname \$dldir/$dlname~ - chmod a+x \$dldir/$dlname~ - if test -n '\''$stripme'\'' && test -n '\''$striplib'\''; then - eval '\''$striplib \$dldir/$dlname'\'' || exit \$?; - fi' - postuninstall_cmds='dldll=`$SHELL 2>&1 -c '\''. $file; echo \$dlname'\''`~ - dlpath=$dir/\$dldll~ - $RM \$dlpath' - shlibpath_overrides_runpath=yes - - case $host_os in - cygwin*) - # Cygwin DLLs use 'cyg' prefix rather than 'lib' - soname_spec='`echo ${libname} | sed -e 's/^lib/cyg/'``echo ${release} | $SED -e 's/[[.]]/-/g'`${versuffix}${shared_ext}' - sys_lib_search_path_spec="/usr/lib /lib/w32api /lib /usr/local/lib" - ;; - mingw* | cegcc*) - # MinGW DLLs use traditional 'lib' prefix - soname_spec='${libname}`echo ${release} | $SED -e 's/[[.]]/-/g'`${versuffix}${shared_ext}' - sys_lib_search_path_spec=`$CC -print-search-dirs | $GREP "^libraries:" | $SED -e "s/^libraries://" -e "s,=/,/,g"` - if $ECHO "$sys_lib_search_path_spec" | [$GREP ';[c-zC-Z]:/' >/dev/null]; then - # It is most probably a Windows format PATH printed by - # mingw gcc, but we are running on Cygwin. Gcc prints its search - # path with ; separators, and with drive letters. We can handle the - # drive letters (cygwin fileutils understands them), so leave them, - # especially as we might pass files found there to a mingw objdump, - # which wouldn't understand a cygwinified path. Ahh. - sys_lib_search_path_spec=`$ECHO "$sys_lib_search_path_spec" | $SED -e 's/;/ /g'` - else - sys_lib_search_path_spec=`$ECHO "$sys_lib_search_path_spec" | $SED -e "s/$PATH_SEPARATOR/ /g"` - fi - ;; - pw32*) - # pw32 DLLs use 'pw' prefix rather than 'lib' - library_names_spec='`echo ${libname} | sed -e 's/^lib/pw/'``echo ${release} | $SED -e 's/[[.]]/-/g'`${versuffix}${shared_ext}' - ;; - esac - ;; - - *) - library_names_spec='${libname}`echo ${release} | $SED -e 's/[[.]]/-/g'`${versuffix}${shared_ext} $libname.lib' - ;; - esac - dynamic_linker='Win32 ld.exe' - # FIXME: first we should search . and the directory the executable is in - shlibpath_var=PATH - ;; - -darwin* | rhapsody*) - dynamic_linker="$host_os dyld" - version_type=darwin - need_lib_prefix=no - need_version=no - library_names_spec='${libname}${release}${major}$shared_ext ${libname}$shared_ext' - soname_spec='${libname}${release}${major}$shared_ext' - shlibpath_overrides_runpath=yes - shlibpath_var=DYLD_LIBRARY_PATH - shrext_cmds='`test .$module = .yes && echo .so || echo .dylib`' -m4_if([$1], [],[ - sys_lib_search_path_spec="$sys_lib_search_path_spec /usr/local/lib"]) - sys_lib_dlsearch_path_spec='/usr/local/lib /lib /usr/lib' - ;; - -dgux*) - version_type=linux - need_lib_prefix=no - need_version=no - library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}$major $libname$shared_ext' - soname_spec='${libname}${release}${shared_ext}$major' - shlibpath_var=LD_LIBRARY_PATH - ;; - -freebsd1*) - dynamic_linker=no - ;; - -freebsd* | dragonfly*) - # DragonFly does not have aout. When/if they implement a new - # versioning mechanism, adjust this. - if test -x /usr/bin/objformat; then - objformat=`/usr/bin/objformat` - else - case $host_os in - freebsd[[123]]*) objformat=aout ;; - *) objformat=elf ;; - esac - fi - version_type=freebsd-$objformat - case $version_type in - freebsd-elf*) - library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext} $libname${shared_ext}' - need_version=no - need_lib_prefix=no - ;; - freebsd-*) - library_names_spec='${libname}${release}${shared_ext}$versuffix $libname${shared_ext}$versuffix' - need_version=yes - ;; - esac - shlibpath_var=LD_LIBRARY_PATH - case $host_os in - freebsd2*) - shlibpath_overrides_runpath=yes - ;; - freebsd3.[[01]]* | freebsdelf3.[[01]]*) - shlibpath_overrides_runpath=yes - hardcode_into_libs=yes - ;; - freebsd3.[[2-9]]* | freebsdelf3.[[2-9]]* | \ - freebsd4.[[0-5]] | freebsdelf4.[[0-5]] | freebsd4.1.1 | freebsdelf4.1.1) - shlibpath_overrides_runpath=no - hardcode_into_libs=yes - ;; - *) # from 4.6 on, and DragonFly - shlibpath_overrides_runpath=yes - hardcode_into_libs=yes - ;; - esac - ;; - -gnu*) - version_type=linux - need_lib_prefix=no - need_version=no - library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}${major} ${libname}${shared_ext}' - soname_spec='${libname}${release}${shared_ext}$major' - shlibpath_var=LD_LIBRARY_PATH - hardcode_into_libs=yes - ;; - -hpux9* | hpux10* | hpux11*) - # Give a soname corresponding to the major version so that dld.sl refuses to - # link against other versions. - version_type=sunos - need_lib_prefix=no - need_version=no - case $host_cpu in - ia64*) - shrext_cmds='.so' - hardcode_into_libs=yes - dynamic_linker="$host_os dld.so" - shlibpath_var=LD_LIBRARY_PATH - shlibpath_overrides_runpath=yes # Unless +noenvvar is specified. - library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}$major $libname${shared_ext}' - soname_spec='${libname}${release}${shared_ext}$major' - if test "X$HPUX_IA64_MODE" = X32; then - sys_lib_search_path_spec="/usr/lib/hpux32 /usr/local/lib/hpux32 /usr/local/lib" - else - sys_lib_search_path_spec="/usr/lib/hpux64 /usr/local/lib/hpux64" - fi - sys_lib_dlsearch_path_spec=$sys_lib_search_path_spec - ;; - hppa*64*) - shrext_cmds='.sl' - hardcode_into_libs=yes - dynamic_linker="$host_os dld.sl" - shlibpath_var=LD_LIBRARY_PATH # How should we handle SHLIB_PATH - shlibpath_overrides_runpath=yes # Unless +noenvvar is specified. - library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}$major $libname${shared_ext}' - soname_spec='${libname}${release}${shared_ext}$major' - sys_lib_search_path_spec="/usr/lib/pa20_64 /usr/ccs/lib/pa20_64" - sys_lib_dlsearch_path_spec=$sys_lib_search_path_spec - ;; - *) - shrext_cmds='.sl' - dynamic_linker="$host_os dld.sl" - shlibpath_var=SHLIB_PATH - shlibpath_overrides_runpath=no # +s is required to enable SHLIB_PATH - library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}$major $libname${shared_ext}' - soname_spec='${libname}${release}${shared_ext}$major' - ;; - esac - # HP-UX runs *really* slowly unless shared libraries are mode 555. - postinstall_cmds='chmod 555 $lib' - ;; - -interix[[3-9]]*) - version_type=linux - need_lib_prefix=no - need_version=no - library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}$major ${libname}${shared_ext}' - soname_spec='${libname}${release}${shared_ext}$major' - dynamic_linker='Interix 3.x ld.so.1 (PE, like ELF)' - shlibpath_var=LD_LIBRARY_PATH - shlibpath_overrides_runpath=no - hardcode_into_libs=yes - ;; - -irix5* | irix6* | nonstopux*) - case $host_os in - nonstopux*) version_type=nonstopux ;; - *) - if test "$lt_cv_prog_gnu_ld" = yes; then - version_type=linux - else - version_type=irix - fi ;; - esac - need_lib_prefix=no - need_version=no - soname_spec='${libname}${release}${shared_ext}$major' - library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}$major ${libname}${release}${shared_ext} $libname${shared_ext}' - case $host_os in - irix5* | nonstopux*) - libsuff= shlibsuff= - ;; - *) - case $LD in # libtool.m4 will add one of these switches to LD - *-32|*"-32 "|*-melf32bsmip|*"-melf32bsmip ") - libsuff= shlibsuff= libmagic=32-bit;; - *-n32|*"-n32 "|*-melf32bmipn32|*"-melf32bmipn32 ") - libsuff=32 shlibsuff=N32 libmagic=N32;; - *-64|*"-64 "|*-melf64bmip|*"-melf64bmip ") - libsuff=64 shlibsuff=64 libmagic=64-bit;; - *) libsuff= shlibsuff= libmagic=never-match;; - esac - ;; - esac - shlibpath_var=LD_LIBRARY${shlibsuff}_PATH - shlibpath_overrides_runpath=no - sys_lib_search_path_spec="/usr/lib${libsuff} /lib${libsuff} /usr/local/lib${libsuff}" - sys_lib_dlsearch_path_spec="/usr/lib${libsuff} /lib${libsuff}" - hardcode_into_libs=yes - ;; - -# No shared lib support for Linux oldld, aout, or coff. -linux*oldld* | linux*aout* | linux*coff*) - dynamic_linker=no - ;; - -# This must be Linux ELF. -linux* | k*bsd*-gnu) - version_type=linux - need_lib_prefix=no - need_version=no - library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}$major $libname${shared_ext}' - soname_spec='${libname}${release}${shared_ext}$major' - finish_cmds='PATH="\$PATH:/sbin" ldconfig -n $libdir' - shlibpath_var=LD_LIBRARY_PATH - shlibpath_overrides_runpath=no - # Some binutils ld are patched to set DT_RUNPATH - save_LDFLAGS=$LDFLAGS - save_libdir=$libdir - eval "libdir=/foo; wl=\"$_LT_TAGVAR(lt_prog_compiler_wl, $1)\"; \ - LDFLAGS=\"\$LDFLAGS $_LT_TAGVAR(hardcode_libdir_flag_spec, $1)\"" - AC_LINK_IFELSE([AC_LANG_PROGRAM([],[])], - [AS_IF([ ($OBJDUMP -p conftest$ac_exeext) 2>/dev/null | grep "RUNPATH.*$libdir" >/dev/null], - [shlibpath_overrides_runpath=yes])]) - LDFLAGS=$save_LDFLAGS - libdir=$save_libdir - - # This implies no fast_install, which is unacceptable. - # Some rework will be needed to allow for fast_install - # before this can be enabled. - hardcode_into_libs=yes - - # Append ld.so.conf contents to the search path - if test -f /etc/ld.so.conf; then - lt_ld_extra=`awk '/^include / { system(sprintf("cd /etc; cat %s 2>/dev/null", \[$]2)); skip = 1; } { if (!skip) print \[$]0; skip = 0; }' < /etc/ld.so.conf | $SED -e 's/#.*//;/^[ ]*hwcap[ ]/d;s/[:, ]/ /g;s/=[^=]*$//;s/=[^= ]* / /g;/^$/d' | tr '\n' ' '` - sys_lib_dlsearch_path_spec="/lib /usr/lib $lt_ld_extra" - fi - - # We used to test for /lib/ld.so.1 and disable shared libraries on - # powerpc, because MkLinux only supported shared libraries with the - # GNU dynamic linker. Since this was broken with cross compilers, - # most powerpc-linux boxes support dynamic linking these days and - # people can always --disable-shared, the test was removed, and we - # assume the GNU/Linux dynamic linker is in use. - dynamic_linker='GNU/Linux ld.so' - ;; - -netbsd*) - version_type=sunos - need_lib_prefix=no - need_version=no - if echo __ELF__ | $CC -E - | $GREP __ELF__ >/dev/null; then - library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${shared_ext}$versuffix' - finish_cmds='PATH="\$PATH:/sbin" ldconfig -m $libdir' - dynamic_linker='NetBSD (a.out) ld.so' - else - library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}$major ${libname}${shared_ext}' - soname_spec='${libname}${release}${shared_ext}$major' - dynamic_linker='NetBSD ld.elf_so' - fi - shlibpath_var=LD_LIBRARY_PATH - shlibpath_overrides_runpath=yes - hardcode_into_libs=yes - ;; - -newsos6) - version_type=linux - library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}$major $libname${shared_ext}' - shlibpath_var=LD_LIBRARY_PATH - shlibpath_overrides_runpath=yes - ;; - -*nto* | *qnx*) - version_type=qnx - need_lib_prefix=no - need_version=no - library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}$major $libname${shared_ext}' - soname_spec='${libname}${release}${shared_ext}$major' - shlibpath_var=LD_LIBRARY_PATH - shlibpath_overrides_runpath=no - hardcode_into_libs=yes - dynamic_linker='ldqnx.so' - ;; - -openbsd*) - version_type=sunos - sys_lib_dlsearch_path_spec="/usr/lib" - need_lib_prefix=no - # Some older versions of OpenBSD (3.3 at least) *do* need versioned libs. - case $host_os in - openbsd3.3 | openbsd3.3.*) need_version=yes ;; - *) need_version=no ;; - esac - library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${shared_ext}$versuffix' - finish_cmds='PATH="\$PATH:/sbin" ldconfig -m $libdir' - shlibpath_var=LD_LIBRARY_PATH - if test -z "`echo __ELF__ | $CC -E - | $GREP __ELF__`" || test "$host_os-$host_cpu" = "openbsd2.8-powerpc"; then - case $host_os in - openbsd2.[[89]] | openbsd2.[[89]].*) - shlibpath_overrides_runpath=no - ;; - *) - shlibpath_overrides_runpath=yes - ;; - esac - else - shlibpath_overrides_runpath=yes - fi - ;; - -os2*) - libname_spec='$name' - shrext_cmds=".dll" - need_lib_prefix=no - library_names_spec='$libname${shared_ext} $libname.a' - dynamic_linker='OS/2 ld.exe' - shlibpath_var=LIBPATH - ;; - -osf3* | osf4* | osf5*) - version_type=osf - need_lib_prefix=no - need_version=no - soname_spec='${libname}${release}${shared_ext}$major' - library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}$major $libname${shared_ext}' - shlibpath_var=LD_LIBRARY_PATH - sys_lib_search_path_spec="/usr/shlib /usr/ccs/lib /usr/lib/cmplrs/cc /usr/lib /usr/local/lib /var/shlib" - sys_lib_dlsearch_path_spec="$sys_lib_search_path_spec" - ;; - -rdos*) - dynamic_linker=no - ;; - -solaris*) - version_type=linux - need_lib_prefix=no - need_version=no - library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}$major $libname${shared_ext}' - soname_spec='${libname}${release}${shared_ext}$major' - shlibpath_var=LD_LIBRARY_PATH - shlibpath_overrides_runpath=yes - hardcode_into_libs=yes - # ldd complains unless libraries are executable - postinstall_cmds='chmod +x $lib' - ;; - -sunos4*) - version_type=sunos - library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${shared_ext}$versuffix' - finish_cmds='PATH="\$PATH:/usr/etc" ldconfig $libdir' - shlibpath_var=LD_LIBRARY_PATH - shlibpath_overrides_runpath=yes - if test "$with_gnu_ld" = yes; then - need_lib_prefix=no - fi - need_version=yes - ;; - -sysv4 | sysv4.3*) - version_type=linux - library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}$major $libname${shared_ext}' - soname_spec='${libname}${release}${shared_ext}$major' - shlibpath_var=LD_LIBRARY_PATH - case $host_vendor in - sni) - shlibpath_overrides_runpath=no - need_lib_prefix=no - runpath_var=LD_RUN_PATH - ;; - siemens) - need_lib_prefix=no - ;; - motorola) - need_lib_prefix=no - need_version=no - shlibpath_overrides_runpath=no - sys_lib_search_path_spec='/lib /usr/lib /usr/ccs/lib' - ;; - esac - ;; - -sysv4*MP*) - if test -d /usr/nec ;then - version_type=linux - library_names_spec='$libname${shared_ext}.$versuffix $libname${shared_ext}.$major $libname${shared_ext}' - soname_spec='$libname${shared_ext}.$major' - shlibpath_var=LD_LIBRARY_PATH - fi - ;; - -sysv5* | sco3.2v5* | sco5v6* | unixware* | OpenUNIX* | sysv4*uw2*) - version_type=freebsd-elf - need_lib_prefix=no - need_version=no - library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext} $libname${shared_ext}' - soname_spec='${libname}${release}${shared_ext}$major' - shlibpath_var=LD_LIBRARY_PATH - shlibpath_overrides_runpath=yes - hardcode_into_libs=yes - if test "$with_gnu_ld" = yes; then - sys_lib_search_path_spec='/usr/local/lib /usr/gnu/lib /usr/ccs/lib /usr/lib /lib' - else - sys_lib_search_path_spec='/usr/ccs/lib /usr/lib' - case $host_os in - sco3.2v5*) - sys_lib_search_path_spec="$sys_lib_search_path_spec /lib" - ;; - esac - fi - sys_lib_dlsearch_path_spec='/usr/lib' - ;; - -tpf*) - # TPF is a cross-target only. Preferred cross-host = GNU/Linux. - version_type=linux - need_lib_prefix=no - need_version=no - library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}$major $libname${shared_ext}' - shlibpath_var=LD_LIBRARY_PATH - shlibpath_overrides_runpath=no - hardcode_into_libs=yes - ;; - -uts4*) - version_type=linux - library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}$major $libname${shared_ext}' - soname_spec='${libname}${release}${shared_ext}$major' - shlibpath_var=LD_LIBRARY_PATH - ;; - -*) - dynamic_linker=no - ;; -esac -AC_MSG_RESULT([$dynamic_linker]) -test "$dynamic_linker" = no && can_build_shared=no - -variables_saved_for_relink="PATH $shlibpath_var $runpath_var" -if test "$GCC" = yes; then - variables_saved_for_relink="$variables_saved_for_relink GCC_EXEC_PREFIX COMPILER_PATH LIBRARY_PATH" -fi - -if test "${lt_cv_sys_lib_search_path_spec+set}" = set; then - sys_lib_search_path_spec="$lt_cv_sys_lib_search_path_spec" -fi -if test "${lt_cv_sys_lib_dlsearch_path_spec+set}" = set; then - sys_lib_dlsearch_path_spec="$lt_cv_sys_lib_dlsearch_path_spec" -fi - -_LT_DECL([], [variables_saved_for_relink], [1], - [Variables whose values should be saved in libtool wrapper scripts and - restored at link time]) -_LT_DECL([], [need_lib_prefix], [0], - [Do we need the "lib" prefix for modules?]) -_LT_DECL([], [need_version], [0], [Do we need a version for libraries?]) -_LT_DECL([], [version_type], [0], [Library versioning type]) -_LT_DECL([], [runpath_var], [0], [Shared library runtime path variable]) -_LT_DECL([], [shlibpath_var], [0],[Shared library path variable]) -_LT_DECL([], [shlibpath_overrides_runpath], [0], - [Is shlibpath searched before the hard-coded library search path?]) -_LT_DECL([], [libname_spec], [1], [Format of library name prefix]) -_LT_DECL([], [library_names_spec], [1], - [[List of archive names. First name is the real one, the rest are links. - The last name is the one that the linker finds with -lNAME]]) -_LT_DECL([], [soname_spec], [1], - [[The coded name of the library, if different from the real name]]) -_LT_DECL([], [postinstall_cmds], [2], - [Command to use after installation of a shared archive]) -_LT_DECL([], [postuninstall_cmds], [2], - [Command to use after uninstallation of a shared archive]) -_LT_DECL([], [finish_cmds], [2], - [Commands used to finish a libtool library installation in a directory]) -_LT_DECL([], [finish_eval], [1], - [[As "finish_cmds", except a single script fragment to be evaled but - not shown]]) -_LT_DECL([], [hardcode_into_libs], [0], - [Whether we should hardcode library paths into libraries]) -_LT_DECL([], [sys_lib_search_path_spec], [2], - [Compile-time system search path for libraries]) -_LT_DECL([], [sys_lib_dlsearch_path_spec], [2], - [Run-time system search path for libraries]) -])# _LT_SYS_DYNAMIC_LINKER - - -# _LT_PATH_TOOL_PREFIX(TOOL) -# -------------------------- -# find a file program which can recognize shared library -AC_DEFUN([_LT_PATH_TOOL_PREFIX], -[m4_require([_LT_DECL_EGREP])dnl -AC_MSG_CHECKING([for $1]) -AC_CACHE_VAL(lt_cv_path_MAGIC_CMD, -[case $MAGIC_CMD in -[[\\/*] | ?:[\\/]*]) - lt_cv_path_MAGIC_CMD="$MAGIC_CMD" # Let the user override the test with a path. - ;; -*) - lt_save_MAGIC_CMD="$MAGIC_CMD" - lt_save_ifs="$IFS"; IFS=$PATH_SEPARATOR -dnl $ac_dummy forces splitting on constant user-supplied paths. -dnl POSIX.2 word splitting is done only on the output of word expansions, -dnl not every word. This closes a longstanding sh security hole. - ac_dummy="m4_if([$2], , $PATH, [$2])" - for ac_dir in $ac_dummy; do - IFS="$lt_save_ifs" - test -z "$ac_dir" && ac_dir=. - if test -f $ac_dir/$1; then - lt_cv_path_MAGIC_CMD="$ac_dir/$1" - if test -n "$file_magic_test_file"; then - case $deplibs_check_method in - "file_magic "*) - file_magic_regex=`expr "$deplibs_check_method" : "file_magic \(.*\)"` - MAGIC_CMD="$lt_cv_path_MAGIC_CMD" - if eval $file_magic_cmd \$file_magic_test_file 2> /dev/null | - $EGREP "$file_magic_regex" > /dev/null; then - : - else - cat <<_LT_EOF 1>&2 - -*** Warning: the command libtool uses to detect shared libraries, -*** $file_magic_cmd, produces output that libtool cannot recognize. -*** The result is that libtool may fail to recognize shared libraries -*** as such. This will affect the creation of libtool libraries that -*** depend on shared libraries, but programs linked with such libtool -*** libraries will work regardless of this problem. Nevertheless, you -*** may want to report the problem to your system manager and/or to -*** bug-libtool@gnu.org - -_LT_EOF - fi ;; - esac - fi - break - fi - done - IFS="$lt_save_ifs" - MAGIC_CMD="$lt_save_MAGIC_CMD" - ;; -esac]) -MAGIC_CMD="$lt_cv_path_MAGIC_CMD" -if test -n "$MAGIC_CMD"; then - AC_MSG_RESULT($MAGIC_CMD) -else - AC_MSG_RESULT(no) -fi -_LT_DECL([], [MAGIC_CMD], [0], - [Used to examine libraries when file_magic_cmd begins with "file"])dnl -])# _LT_PATH_TOOL_PREFIX - -# Old name: -AU_ALIAS([AC_PATH_TOOL_PREFIX], [_LT_PATH_TOOL_PREFIX]) -dnl aclocal-1.4 backwards compatibility: -dnl AC_DEFUN([AC_PATH_TOOL_PREFIX], []) - - -# _LT_PATH_MAGIC -# -------------- -# find a file program which can recognize a shared library -m4_defun([_LT_PATH_MAGIC], -[_LT_PATH_TOOL_PREFIX(${ac_tool_prefix}file, /usr/bin$PATH_SEPARATOR$PATH) -if test -z "$lt_cv_path_MAGIC_CMD"; then - if test -n "$ac_tool_prefix"; then - _LT_PATH_TOOL_PREFIX(file, /usr/bin$PATH_SEPARATOR$PATH) - else - MAGIC_CMD=: - fi -fi -])# _LT_PATH_MAGIC - - -# LT_PATH_LD -# ---------- -# find the pathname to the GNU or non-GNU linker -AC_DEFUN([LT_PATH_LD], -[AC_REQUIRE([AC_PROG_CC])dnl -AC_REQUIRE([AC_CANONICAL_HOST])dnl -AC_REQUIRE([AC_CANONICAL_BUILD])dnl -m4_require([_LT_DECL_SED])dnl -m4_require([_LT_DECL_EGREP])dnl - -AC_ARG_WITH([gnu-ld], - [AS_HELP_STRING([--with-gnu-ld], - [assume the C compiler uses GNU ld @<:@default=no@:>@])], - [test "$withval" = no || with_gnu_ld=yes], - [with_gnu_ld=no])dnl - -ac_prog=ld -if test "$GCC" = yes; then - # Check if gcc -print-prog-name=ld gives a path. - AC_MSG_CHECKING([for ld used by $CC]) - case $host in - *-*-mingw*) - # gcc leaves a trailing carriage return which upsets mingw - ac_prog=`($CC -print-prog-name=ld) 2>&5 | tr -d '\015'` ;; - *) - ac_prog=`($CC -print-prog-name=ld) 2>&5` ;; - esac - case $ac_prog in - # Accept absolute paths. - [[\\/]]* | ?:[[\\/]]*) - re_direlt='/[[^/]][[^/]]*/\.\./' - # Canonicalize the pathname of ld - ac_prog=`$ECHO "$ac_prog"| $SED 's%\\\\%/%g'` - while $ECHO "$ac_prog" | $GREP "$re_direlt" > /dev/null 2>&1; do - ac_prog=`$ECHO $ac_prog| $SED "s%$re_direlt%/%"` - done - test -z "$LD" && LD="$ac_prog" - ;; - "") - # If it fails, then pretend we aren't using GCC. - ac_prog=ld - ;; - *) - # If it is relative, then search for the first ld in PATH. - with_gnu_ld=unknown - ;; - esac -elif test "$with_gnu_ld" = yes; then - AC_MSG_CHECKING([for GNU ld]) -else - AC_MSG_CHECKING([for non-GNU ld]) -fi -AC_CACHE_VAL(lt_cv_path_LD, -[if test -z "$LD"; then - lt_save_ifs="$IFS"; IFS=$PATH_SEPARATOR - for ac_dir in $PATH; do - IFS="$lt_save_ifs" - test -z "$ac_dir" && ac_dir=. - if test -f "$ac_dir/$ac_prog" || test -f "$ac_dir/$ac_prog$ac_exeext"; then - lt_cv_path_LD="$ac_dir/$ac_prog" - # Check to see if the program is GNU ld. I'd rather use --version, - # but apparently some variants of GNU ld only accept -v. - # Break only if it was the GNU/non-GNU ld that we prefer. - case `"$lt_cv_path_LD" -v 2>&1 &1 /dev/null 2>&1; then - lt_cv_deplibs_check_method='file_magic ^x86 archive import|^x86 DLL' - lt_cv_file_magic_cmd='func_win32_libid' - else - lt_cv_deplibs_check_method='file_magic file format pei*-i386(.*architecture: i386)?' - lt_cv_file_magic_cmd='$OBJDUMP -f' - fi - lt_cv_deplibs_check_method=pass_all - ;; - -cegcc) - # use the weaker test based on 'objdump'. See mingw*. - lt_cv_deplibs_check_method='file_magic file format pe-arm-.*little(.*architecture: arm)?' - lt_cv_file_magic_cmd='$OBJDUMP -f' - ;; - -darwin* | rhapsody*) - lt_cv_deplibs_check_method=pass_all - ;; - -freebsd* | dragonfly*) - if echo __ELF__ | $CC -E - | $GREP __ELF__ > /dev/null; then - case $host_cpu in - i*86 ) - # Not sure whether the presence of OpenBSD here was a mistake. - # Let's accept both of them until this is cleared up. - lt_cv_deplibs_check_method='file_magic (FreeBSD|OpenBSD|DragonFly)/i[[3-9]]86 (compact )?demand paged shared library' - lt_cv_file_magic_cmd=/usr/bin/file - lt_cv_file_magic_test_file=`echo /usr/lib/libc.so.*` - ;; - esac - else - lt_cv_deplibs_check_method=pass_all - fi - ;; - -gnu*) - lt_cv_deplibs_check_method=pass_all - ;; - -hpux10.20* | hpux11*) - lt_cv_file_magic_cmd=/usr/bin/file - case $host_cpu in - ia64*) - lt_cv_deplibs_check_method='file_magic (s[[0-9]][[0-9]][[0-9]]|ELF-[[0-9]][[0-9]]) shared object file - IA64' - lt_cv_file_magic_test_file=/usr/lib/hpux32/libc.so - ;; - hppa*64*) - [lt_cv_deplibs_check_method='file_magic (s[0-9][0-9][0-9]|ELF-[0-9][0-9]) shared object file - PA-RISC [0-9].[0-9]'] - lt_cv_file_magic_test_file=/usr/lib/pa20_64/libc.sl - ;; - *) - lt_cv_deplibs_check_method='file_magic (s[[0-9]][[0-9]][[0-9]]|PA-RISC[[0-9]].[[0-9]]) shared library' - lt_cv_file_magic_test_file=/usr/lib/libc.sl - ;; - esac - ;; - -interix[[3-9]]*) - # PIC code is broken on Interix 3.x, that's why |\.a not |_pic\.a here - lt_cv_deplibs_check_method='match_pattern /lib[[^/]]+(\.so|\.a)$' - ;; - -irix5* | irix6* | nonstopux*) - case $LD in - *-32|*"-32 ") libmagic=32-bit;; - *-n32|*"-n32 ") libmagic=N32;; - *-64|*"-64 ") libmagic=64-bit;; - *) libmagic=never-match;; - esac - lt_cv_deplibs_check_method=pass_all - ;; - -# This must be Linux ELF. -linux* | k*bsd*-gnu) - lt_cv_deplibs_check_method=pass_all - ;; - -netbsd*) - if echo __ELF__ | $CC -E - | $GREP __ELF__ > /dev/null; then - lt_cv_deplibs_check_method='match_pattern /lib[[^/]]+(\.so\.[[0-9]]+\.[[0-9]]+|_pic\.a)$' - else - lt_cv_deplibs_check_method='match_pattern /lib[[^/]]+(\.so|_pic\.a)$' - fi - ;; - -newos6*) - lt_cv_deplibs_check_method='file_magic ELF [[0-9]][[0-9]]*-bit [[ML]]SB (executable|dynamic lib)' - lt_cv_file_magic_cmd=/usr/bin/file - lt_cv_file_magic_test_file=/usr/lib/libnls.so - ;; - -*nto* | *qnx*) - lt_cv_deplibs_check_method=pass_all - ;; - -openbsd*) - if test -z "`echo __ELF__ | $CC -E - | $GREP __ELF__`" || test "$host_os-$host_cpu" = "openbsd2.8-powerpc"; then - lt_cv_deplibs_check_method='match_pattern /lib[[^/]]+(\.so\.[[0-9]]+\.[[0-9]]+|\.so|_pic\.a)$' - else - lt_cv_deplibs_check_method='match_pattern /lib[[^/]]+(\.so\.[[0-9]]+\.[[0-9]]+|_pic\.a)$' - fi - ;; - -osf3* | osf4* | osf5*) - lt_cv_deplibs_check_method=pass_all - ;; - -rdos*) - lt_cv_deplibs_check_method=pass_all - ;; - -solaris*) - lt_cv_deplibs_check_method=pass_all - ;; - -sysv5* | sco3.2v5* | sco5v6* | unixware* | OpenUNIX* | sysv4*uw2*) - lt_cv_deplibs_check_method=pass_all - ;; - -sysv4 | sysv4.3*) - case $host_vendor in - motorola) - lt_cv_deplibs_check_method='file_magic ELF [[0-9]][[0-9]]*-bit [[ML]]SB (shared object|dynamic lib) M[[0-9]][[0-9]]* Version [[0-9]]' - lt_cv_file_magic_test_file=`echo /usr/lib/libc.so*` - ;; - ncr) - lt_cv_deplibs_check_method=pass_all - ;; - sequent) - lt_cv_file_magic_cmd='/bin/file' - lt_cv_deplibs_check_method='file_magic ELF [[0-9]][[0-9]]*-bit [[LM]]SB (shared object|dynamic lib )' - ;; - sni) - lt_cv_file_magic_cmd='/bin/file' - lt_cv_deplibs_check_method="file_magic ELF [[0-9]][[0-9]]*-bit [[LM]]SB dynamic lib" - lt_cv_file_magic_test_file=/lib/libc.so - ;; - siemens) - lt_cv_deplibs_check_method=pass_all - ;; - pc) - lt_cv_deplibs_check_method=pass_all - ;; - esac - ;; - -tpf*) - lt_cv_deplibs_check_method=pass_all - ;; -esac -]) -file_magic_cmd=$lt_cv_file_magic_cmd -deplibs_check_method=$lt_cv_deplibs_check_method -test -z "$deplibs_check_method" && deplibs_check_method=unknown - -_LT_DECL([], [deplibs_check_method], [1], - [Method to check whether dependent libraries are shared objects]) -_LT_DECL([], [file_magic_cmd], [1], - [Command to use when deplibs_check_method == "file_magic"]) -])# _LT_CHECK_MAGIC_METHOD - - -# LT_PATH_NM -# ---------- -# find the pathname to a BSD- or MS-compatible name lister -AC_DEFUN([LT_PATH_NM], -[AC_REQUIRE([AC_PROG_CC])dnl -AC_CACHE_CHECK([for BSD- or MS-compatible name lister (nm)], lt_cv_path_NM, -[if test -n "$NM"; then - # Let the user override the test. - lt_cv_path_NM="$NM" -else - lt_nm_to_check="${ac_tool_prefix}nm" - if test -n "$ac_tool_prefix" && test "$build" = "$host"; then - lt_nm_to_check="$lt_nm_to_check nm" - fi - for lt_tmp_nm in $lt_nm_to_check; do - lt_save_ifs="$IFS"; IFS=$PATH_SEPARATOR - for ac_dir in $PATH /usr/ccs/bin/elf /usr/ccs/bin /usr/ucb /bin; do - IFS="$lt_save_ifs" - test -z "$ac_dir" && ac_dir=. - tmp_nm="$ac_dir/$lt_tmp_nm" - if test -f "$tmp_nm" || test -f "$tmp_nm$ac_exeext" ; then - # Check to see if the nm accepts a BSD-compat flag. - # Adding the `sed 1q' prevents false positives on HP-UX, which says: - # nm: unknown option "B" ignored - # Tru64's nm complains that /dev/null is an invalid object file - case `"$tmp_nm" -B /dev/null 2>&1 | sed '1q'` in - */dev/null* | *'Invalid file or object type'*) - lt_cv_path_NM="$tmp_nm -B" - break - ;; - *) - case `"$tmp_nm" -p /dev/null 2>&1 | sed '1q'` in - */dev/null*) - lt_cv_path_NM="$tmp_nm -p" - break - ;; - *) - lt_cv_path_NM=${lt_cv_path_NM="$tmp_nm"} # keep the first match, but - continue # so that we can try to find one that supports BSD flags - ;; - esac - ;; - esac - fi - done - IFS="$lt_save_ifs" - done - : ${lt_cv_path_NM=no} -fi]) -if test "$lt_cv_path_NM" != "no"; then - NM="$lt_cv_path_NM" -else - # Didn't find any BSD compatible name lister, look for dumpbin. - AC_CHECK_TOOLS(DUMPBIN, ["dumpbin -symbols" "link -dump -symbols"], :) - AC_SUBST([DUMPBIN]) - if test "$DUMPBIN" != ":"; then - NM="$DUMPBIN" - fi -fi -test -z "$NM" && NM=nm -AC_SUBST([NM]) -_LT_DECL([], [NM], [1], [A BSD- or MS-compatible name lister])dnl - -AC_CACHE_CHECK([the name lister ($NM) interface], [lt_cv_nm_interface], - [lt_cv_nm_interface="BSD nm" - echo "int some_variable = 0;" > conftest.$ac_ext - (eval echo "\"\$as_me:__oline__: $ac_compile\"" >&AS_MESSAGE_LOG_FD) - (eval "$ac_compile" 2>conftest.err) - cat conftest.err >&AS_MESSAGE_LOG_FD - (eval echo "\"\$as_me:__oline__: $NM \\\"conftest.$ac_objext\\\"\"" >&AS_MESSAGE_LOG_FD) - (eval "$NM \"conftest.$ac_objext\"" 2>conftest.err > conftest.out) - cat conftest.err >&AS_MESSAGE_LOG_FD - (eval echo "\"\$as_me:__oline__: output\"" >&AS_MESSAGE_LOG_FD) - cat conftest.out >&AS_MESSAGE_LOG_FD - if $GREP 'External.*some_variable' conftest.out > /dev/null; then - lt_cv_nm_interface="MS dumpbin" - fi - rm -f conftest*]) -])# LT_PATH_NM - -# Old names: -AU_ALIAS([AM_PROG_NM], [LT_PATH_NM]) -AU_ALIAS([AC_PROG_NM], [LT_PATH_NM]) -dnl aclocal-1.4 backwards compatibility: -dnl AC_DEFUN([AM_PROG_NM], []) -dnl AC_DEFUN([AC_PROG_NM], []) - - -# LT_LIB_M -# -------- -# check for math library -AC_DEFUN([LT_LIB_M], -[AC_REQUIRE([AC_CANONICAL_HOST])dnl -LIBM= -case $host in -*-*-beos* | *-*-cygwin* | *-*-pw32* | *-*-darwin*) - # These system don't have libm, or don't need it - ;; -*-ncr-sysv4.3*) - AC_CHECK_LIB(mw, _mwvalidcheckl, LIBM="-lmw") - AC_CHECK_LIB(m, cos, LIBM="$LIBM -lm") - ;; -*) - AC_CHECK_LIB(m, cos, LIBM="-lm") - ;; -esac -AC_SUBST([LIBM]) -])# LT_LIB_M - -# Old name: -AU_ALIAS([AC_CHECK_LIBM], [LT_LIB_M]) -dnl aclocal-1.4 backwards compatibility: -dnl AC_DEFUN([AC_CHECK_LIBM], []) - - -# _LT_COMPILER_NO_RTTI([TAGNAME]) -# ------------------------------- -m4_defun([_LT_COMPILER_NO_RTTI], -[m4_require([_LT_TAG_COMPILER])dnl - -_LT_TAGVAR(lt_prog_compiler_no_builtin_flag, $1)= - -if test "$GCC" = yes; then - _LT_TAGVAR(lt_prog_compiler_no_builtin_flag, $1)=' -fno-builtin' - - _LT_COMPILER_OPTION([if $compiler supports -fno-rtti -fno-exceptions], - lt_cv_prog_compiler_rtti_exceptions, - [-fno-rtti -fno-exceptions], [], - [_LT_TAGVAR(lt_prog_compiler_no_builtin_flag, $1)="$_LT_TAGVAR(lt_prog_compiler_no_builtin_flag, $1) -fno-rtti -fno-exceptions"]) -fi -_LT_TAGDECL([no_builtin_flag], [lt_prog_compiler_no_builtin_flag], [1], - [Compiler flag to turn off builtin functions]) -])# _LT_COMPILER_NO_RTTI - - -# _LT_CMD_GLOBAL_SYMBOLS -# ---------------------- -m4_defun([_LT_CMD_GLOBAL_SYMBOLS], -[AC_REQUIRE([AC_CANONICAL_HOST])dnl -AC_REQUIRE([AC_PROG_CC])dnl -AC_REQUIRE([LT_PATH_NM])dnl -AC_REQUIRE([LT_PATH_LD])dnl -m4_require([_LT_DECL_SED])dnl -m4_require([_LT_DECL_EGREP])dnl -m4_require([_LT_TAG_COMPILER])dnl - -# Check for command to grab the raw symbol name followed by C symbol from nm. -AC_MSG_CHECKING([command to parse $NM output from $compiler object]) -AC_CACHE_VAL([lt_cv_sys_global_symbol_pipe], -[ -# These are sane defaults that work on at least a few old systems. -# [They come from Ultrix. What could be older than Ultrix?!! ;)] - -# Character class describing NM global symbol codes. -symcode='[[BCDEGRST]]' - -# Regexp to match symbols that can be accessed directly from C. -sympat='\([[_A-Za-z]][[_A-Za-z0-9]]*\)' - -# Define system-specific variables. -case $host_os in -aix*) - symcode='[[BCDT]]' - ;; -cygwin* | mingw* | pw32* | cegcc*) - symcode='[[ABCDGISTW]]' - ;; -hpux*) - if test "$host_cpu" = ia64; then - symcode='[[ABCDEGRST]]' - fi - ;; -irix* | nonstopux*) - symcode='[[BCDEGRST]]' - ;; -osf*) - symcode='[[BCDEGQRST]]' - ;; -solaris*) - symcode='[[BDRT]]' - ;; -sco3.2v5*) - symcode='[[DT]]' - ;; -sysv4.2uw2*) - symcode='[[DT]]' - ;; -sysv5* | sco5v6* | unixware* | OpenUNIX*) - symcode='[[ABDT]]' - ;; -sysv4) - symcode='[[DFNSTU]]' - ;; -esac - -# If we're using GNU nm, then use its standard symbol codes. -case `$NM -V 2>&1` in -*GNU* | *'with BFD'*) - symcode='[[ABCDGIRSTW]]' ;; -esac - -# Transform an extracted symbol line into a proper C declaration. -# Some systems (esp. on ia64) link data and code symbols differently, -# so use this general approach. -lt_cv_sys_global_symbol_to_cdecl="sed -n -e 's/^T .* \(.*\)$/extern int \1();/p' -e 's/^$symcode* .* \(.*\)$/extern char \1;/p'" - -# Transform an extracted symbol line into symbol name and symbol address -lt_cv_sys_global_symbol_to_c_name_address="sed -n -e 's/^: \([[^ ]]*\) $/ {\\\"\1\\\", (void *) 0},/p' -e 's/^$symcode* \([[^ ]]*\) \([[^ ]]*\)$/ {\"\2\", (void *) \&\2},/p'" -lt_cv_sys_global_symbol_to_c_name_address_lib_prefix="sed -n -e 's/^: \([[^ ]]*\) $/ {\\\"\1\\\", (void *) 0},/p' -e 's/^$symcode* \([[^ ]]*\) \(lib[[^ ]]*\)$/ {\"\2\", (void *) \&\2},/p' -e 's/^$symcode* \([[^ ]]*\) \([[^ ]]*\)$/ {\"lib\2\", (void *) \&\2},/p'" - -# Handle CRLF in mingw tool chain -opt_cr= -case $build_os in -mingw*) - opt_cr=`$ECHO 'x\{0,1\}' | tr x '\015'` # option cr in regexp - ;; -esac - -# Try without a prefix underscore, then with it. -for ac_symprfx in "" "_"; do - - # Transform symcode, sympat, and symprfx into a raw symbol and a C symbol. - symxfrm="\\1 $ac_symprfx\\2 \\2" - - # Write the raw and C identifiers. - if test "$lt_cv_nm_interface" = "MS dumpbin"; then - # Fake it for dumpbin and say T for any non-static function - # and D for any global variable. - # Also find C++ and __fastcall symbols from MSVC++, - # which start with @ or ?. - lt_cv_sys_global_symbol_pipe="$AWK ['"\ -" {last_section=section; section=\$ 3};"\ -" /Section length .*#relocs.*(pick any)/{hide[last_section]=1};"\ -" \$ 0!~/External *\|/{next};"\ -" / 0+ UNDEF /{next}; / UNDEF \([^|]\)*()/{next};"\ -" {if(hide[section]) next};"\ -" {f=0}; \$ 0~/\(\).*\|/{f=1}; {printf f ? \"T \" : \"D \"};"\ -" {split(\$ 0, a, /\||\r/); split(a[2], s)};"\ -" s[1]~/^[@?]/{print s[1], s[1]; next};"\ -" s[1]~prfx {split(s[1],t,\"@\"); print t[1], substr(t[1],length(prfx))}"\ -" ' prfx=^$ac_symprfx]" - else - lt_cv_sys_global_symbol_pipe="sed -n -e 's/^.*[[ ]]\($symcode$symcode*\)[[ ]][[ ]]*$ac_symprfx$sympat$opt_cr$/$symxfrm/p'" - fi - - # Check to see that the pipe works correctly. - pipe_works=no - - rm -f conftest* - cat > conftest.$ac_ext <<_LT_EOF -#ifdef __cplusplus -extern "C" { -#endif -char nm_test_var; -void nm_test_func(void); -void nm_test_func(void){} -#ifdef __cplusplus -} -#endif -int main(){nm_test_var='a';nm_test_func();return(0);} -_LT_EOF - - if AC_TRY_EVAL(ac_compile); then - # Now try to grab the symbols. - nlist=conftest.nm - if AC_TRY_EVAL(NM conftest.$ac_objext \| $lt_cv_sys_global_symbol_pipe \> $nlist) && test -s "$nlist"; then - # Try sorting and uniquifying the output. - if sort "$nlist" | uniq > "$nlist"T; then - mv -f "$nlist"T "$nlist" - else - rm -f "$nlist"T - fi - - # Make sure that we snagged all the symbols we need. - if $GREP ' nm_test_var$' "$nlist" >/dev/null; then - if $GREP ' nm_test_func$' "$nlist" >/dev/null; then - cat <<_LT_EOF > conftest.$ac_ext -#ifdef __cplusplus -extern "C" { -#endif - -_LT_EOF - # Now generate the symbol file. - eval "$lt_cv_sys_global_symbol_to_cdecl"' < "$nlist" | $GREP -v main >> conftest.$ac_ext' - - cat <<_LT_EOF >> conftest.$ac_ext - -/* The mapping between symbol names and symbols. */ -const struct { - const char *name; - void *address; -} -lt__PROGRAM__LTX_preloaded_symbols[[]] = -{ - { "@PROGRAM@", (void *) 0 }, -_LT_EOF - $SED "s/^$symcode$symcode* \(.*\) \(.*\)$/ {\"\2\", (void *) \&\2},/" < "$nlist" | $GREP -v main >> conftest.$ac_ext - cat <<\_LT_EOF >> conftest.$ac_ext - {0, (void *) 0} -}; - -/* This works around a problem in FreeBSD linker */ -#ifdef FREEBSD_WORKAROUND -static const void *lt_preloaded_setup() { - return lt__PROGRAM__LTX_preloaded_symbols; -} -#endif - -#ifdef __cplusplus -} -#endif -_LT_EOF - # Now try linking the two files. - mv conftest.$ac_objext conftstm.$ac_objext - lt_save_LIBS="$LIBS" - lt_save_CFLAGS="$CFLAGS" - LIBS="conftstm.$ac_objext" - CFLAGS="$CFLAGS$_LT_TAGVAR(lt_prog_compiler_no_builtin_flag, $1)" - if AC_TRY_EVAL(ac_link) && test -s conftest${ac_exeext}; then - pipe_works=yes - fi - LIBS="$lt_save_LIBS" - CFLAGS="$lt_save_CFLAGS" - else - echo "cannot find nm_test_func in $nlist" >&AS_MESSAGE_LOG_FD - fi - else - echo "cannot find nm_test_var in $nlist" >&AS_MESSAGE_LOG_FD - fi - else - echo "cannot run $lt_cv_sys_global_symbol_pipe" >&AS_MESSAGE_LOG_FD - fi - else - echo "$progname: failed program was:" >&AS_MESSAGE_LOG_FD - cat conftest.$ac_ext >&5 - fi - rm -rf conftest* conftst* - - # Do not use the global_symbol_pipe unless it works. - if test "$pipe_works" = yes; then - break - else - lt_cv_sys_global_symbol_pipe= - fi -done -]) -if test -z "$lt_cv_sys_global_symbol_pipe"; then - lt_cv_sys_global_symbol_to_cdecl= -fi -if test -z "$lt_cv_sys_global_symbol_pipe$lt_cv_sys_global_symbol_to_cdecl"; then - AC_MSG_RESULT(failed) -else - AC_MSG_RESULT(ok) -fi - -_LT_DECL([global_symbol_pipe], [lt_cv_sys_global_symbol_pipe], [1], - [Take the output of nm and produce a listing of raw symbols and C names]) -_LT_DECL([global_symbol_to_cdecl], [lt_cv_sys_global_symbol_to_cdecl], [1], - [Transform the output of nm in a proper C declaration]) -_LT_DECL([global_symbol_to_c_name_address], - [lt_cv_sys_global_symbol_to_c_name_address], [1], - [Transform the output of nm in a C name address pair]) -_LT_DECL([global_symbol_to_c_name_address_lib_prefix], - [lt_cv_sys_global_symbol_to_c_name_address_lib_prefix], [1], - [Transform the output of nm in a C name address pair when lib prefix is needed]) -]) # _LT_CMD_GLOBAL_SYMBOLS - - -# _LT_COMPILER_PIC([TAGNAME]) -# --------------------------- -m4_defun([_LT_COMPILER_PIC], -[m4_require([_LT_TAG_COMPILER])dnl -_LT_TAGVAR(lt_prog_compiler_wl, $1)= -_LT_TAGVAR(lt_prog_compiler_pic, $1)= -_LT_TAGVAR(lt_prog_compiler_static, $1)= - -AC_MSG_CHECKING([for $compiler option to produce PIC]) -m4_if([$1], [CXX], [ - # C++ specific cases for pic, static, wl, etc. - if test "$GXX" = yes; then - _LT_TAGVAR(lt_prog_compiler_wl, $1)='-Wl,' - _LT_TAGVAR(lt_prog_compiler_static, $1)='-static' - - case $host_os in - aix*) - # All AIX code is PIC. - if test "$host_cpu" = ia64; then - # AIX 5 now supports IA64 processor - _LT_TAGVAR(lt_prog_compiler_static, $1)='-Bstatic' - fi - ;; - - amigaos*) - case $host_cpu in - powerpc) - # see comment about AmigaOS4 .so support - _LT_TAGVAR(lt_prog_compiler_pic, $1)='-fPIC' - ;; - m68k) - # FIXME: we need at least 68020 code to build shared libraries, but - # adding the `-m68020' flag to GCC prevents building anything better, - # like `-m68040'. - _LT_TAGVAR(lt_prog_compiler_pic, $1)='-m68020 -resident32 -malways-restore-a4' - ;; - esac - ;; - - beos* | irix5* | irix6* | nonstopux* | osf3* | osf4* | osf5*) - # PIC is the default for these OSes. - ;; - mingw* | cygwin* | os2* | pw32* | cegcc*) - # This hack is so that the source file can tell whether it is being - # built for inclusion in a dll (and should export symbols for example). - # Although the cygwin gcc ignores -fPIC, still need this for old-style - # (--disable-auto-import) libraries - m4_if([$1], [GCJ], [], - [_LT_TAGVAR(lt_prog_compiler_pic, $1)='-DDLL_EXPORT']) - ;; - darwin* | rhapsody*) - # PIC is the default on this platform - # Common symbols not allowed in MH_DYLIB files - _LT_TAGVAR(lt_prog_compiler_pic, $1)='-fno-common' - ;; - *djgpp*) - # DJGPP does not support shared libraries at all - _LT_TAGVAR(lt_prog_compiler_pic, $1)= - ;; - interix[[3-9]]*) - # Interix 3.x gcc -fpic/-fPIC options generate broken code. - # Instead, we relocate shared libraries at runtime. - ;; - sysv4*MP*) - if test -d /usr/nec; then - _LT_TAGVAR(lt_prog_compiler_pic, $1)=-Kconform_pic - fi - ;; - hpux*) - # PIC is the default for 64-bit PA HP-UX, but not for 32-bit - # PA HP-UX. On IA64 HP-UX, PIC is the default but the pic flag - # sets the default TLS model and affects inlining. - case $host_cpu in - hppa*64*) - ;; - *) - _LT_TAGVAR(lt_prog_compiler_pic, $1)='-fPIC' - ;; - esac - ;; - *qnx* | *nto*) - # QNX uses GNU C++, but need to define -shared option too, otherwise - # it will coredump. - _LT_TAGVAR(lt_prog_compiler_pic, $1)='-fPIC -shared' - ;; - *) - _LT_TAGVAR(lt_prog_compiler_pic, $1)='-fPIC' - ;; - esac - else - case $host_os in - aix[[4-9]]*) - # All AIX code is PIC. - if test "$host_cpu" = ia64; then - # AIX 5 now supports IA64 processor - _LT_TAGVAR(lt_prog_compiler_static, $1)='-Bstatic' - else - _LT_TAGVAR(lt_prog_compiler_static, $1)='-bnso -bI:/lib/syscalls.exp' - fi - ;; - chorus*) - case $cc_basename in - cxch68*) - # Green Hills C++ Compiler - # _LT_TAGVAR(lt_prog_compiler_static, $1)="--no_auto_instantiation -u __main -u __premain -u _abort -r $COOL_DIR/lib/libOrb.a $MVME_DIR/lib/CC/libC.a $MVME_DIR/lib/classix/libcx.s.a" - ;; - esac - ;; - dgux*) - case $cc_basename in - ec++*) - _LT_TAGVAR(lt_prog_compiler_pic, $1)='-KPIC' - ;; - ghcx*) - # Green Hills C++ Compiler - _LT_TAGVAR(lt_prog_compiler_pic, $1)='-pic' - ;; - *) - ;; - esac - ;; - freebsd* | dragonfly*) - # FreeBSD uses GNU C++ - ;; - hpux9* | hpux10* | hpux11*) - case $cc_basename in - CC*) - _LT_TAGVAR(lt_prog_compiler_wl, $1)='-Wl,' - _LT_TAGVAR(lt_prog_compiler_static, $1)='${wl}-a ${wl}archive' - if test "$host_cpu" != ia64; then - _LT_TAGVAR(lt_prog_compiler_pic, $1)='+Z' - fi - ;; - aCC*) - _LT_TAGVAR(lt_prog_compiler_wl, $1)='-Wl,' - _LT_TAGVAR(lt_prog_compiler_static, $1)='${wl}-a ${wl}archive' - case $host_cpu in - hppa*64*|ia64*) - # +Z the default - ;; - *) - _LT_TAGVAR(lt_prog_compiler_pic, $1)='+Z' - ;; - esac - ;; - *) - ;; - esac - ;; - interix*) - # This is c89, which is MS Visual C++ (no shared libs) - # Anyone wants to do a port? - ;; - irix5* | irix6* | nonstopux*) - case $cc_basename in - CC*) - _LT_TAGVAR(lt_prog_compiler_wl, $1)='-Wl,' - _LT_TAGVAR(lt_prog_compiler_static, $1)='-non_shared' - # CC pic flag -KPIC is the default. - ;; - *) - ;; - esac - ;; - linux* | k*bsd*-gnu) - case $cc_basename in - KCC*) - # KAI C++ Compiler - _LT_TAGVAR(lt_prog_compiler_wl, $1)='--backend -Wl,' - _LT_TAGVAR(lt_prog_compiler_pic, $1)='-fPIC' - ;; - ecpc* ) - # old Intel C++ for x86_64 which still supported -KPIC. - _LT_TAGVAR(lt_prog_compiler_wl, $1)='-Wl,' - _LT_TAGVAR(lt_prog_compiler_pic, $1)='-KPIC' - _LT_TAGVAR(lt_prog_compiler_static, $1)='-static' - ;; - icpc* ) - # Intel C++, used to be incompatible with GCC. - # ICC 10 doesn't accept -KPIC any more. - _LT_TAGVAR(lt_prog_compiler_wl, $1)='-Wl,' - _LT_TAGVAR(lt_prog_compiler_pic, $1)='-fPIC' - _LT_TAGVAR(lt_prog_compiler_static, $1)='-static' - ;; - pgCC* | pgcpp*) - # Portland Group C++ compiler - _LT_TAGVAR(lt_prog_compiler_wl, $1)='-Wl,' - _LT_TAGVAR(lt_prog_compiler_pic, $1)='-fpic' - _LT_TAGVAR(lt_prog_compiler_static, $1)='-Bstatic' - ;; - cxx*) - # Compaq C++ - # Make sure the PIC flag is empty. It appears that all Alpha - # Linux and Compaq Tru64 Unix objects are PIC. - _LT_TAGVAR(lt_prog_compiler_pic, $1)= - _LT_TAGVAR(lt_prog_compiler_static, $1)='-non_shared' - ;; - xlc* | xlC*) - # IBM XL 8.0 on PPC - _LT_TAGVAR(lt_prog_compiler_wl, $1)='-Wl,' - _LT_TAGVAR(lt_prog_compiler_pic, $1)='-qpic' - _LT_TAGVAR(lt_prog_compiler_static, $1)='-qstaticlink' - ;; - *) - case `$CC -V 2>&1 | sed 5q` in - *Sun\ C*) - # Sun C++ 5.9 - _LT_TAGVAR(lt_prog_compiler_pic, $1)='-KPIC' - _LT_TAGVAR(lt_prog_compiler_static, $1)='-Bstatic' - _LT_TAGVAR(lt_prog_compiler_wl, $1)='-Qoption ld ' - ;; - esac - ;; - esac - ;; - lynxos*) - ;; - m88k*) - ;; - mvs*) - case $cc_basename in - cxx*) - _LT_TAGVAR(lt_prog_compiler_pic, $1)='-W c,exportall' - ;; - *) - ;; - esac - ;; - netbsd*) - ;; - *qnx* | *nto*) - # QNX uses GNU C++, but need to define -shared option too, otherwise - # it will coredump. - _LT_TAGVAR(lt_prog_compiler_pic, $1)='-fPIC -shared' - ;; - osf3* | osf4* | osf5*) - case $cc_basename in - KCC*) - _LT_TAGVAR(lt_prog_compiler_wl, $1)='--backend -Wl,' - ;; - RCC*) - # Rational C++ 2.4.1 - _LT_TAGVAR(lt_prog_compiler_pic, $1)='-pic' - ;; - cxx*) - # Digital/Compaq C++ - _LT_TAGVAR(lt_prog_compiler_wl, $1)='-Wl,' - # Make sure the PIC flag is empty. It appears that all Alpha - # Linux and Compaq Tru64 Unix objects are PIC. - _LT_TAGVAR(lt_prog_compiler_pic, $1)= - _LT_TAGVAR(lt_prog_compiler_static, $1)='-non_shared' - ;; - *) - ;; - esac - ;; - psos*) - ;; - solaris*) - case $cc_basename in - CC*) - # Sun C++ 4.2, 5.x and Centerline C++ - _LT_TAGVAR(lt_prog_compiler_pic, $1)='-KPIC' - _LT_TAGVAR(lt_prog_compiler_static, $1)='-Bstatic' - _LT_TAGVAR(lt_prog_compiler_wl, $1)='-Qoption ld ' - ;; - gcx*) - # Green Hills C++ Compiler - _LT_TAGVAR(lt_prog_compiler_pic, $1)='-PIC' - ;; - *) - ;; - esac - ;; - sunos4*) - case $cc_basename in - CC*) - # Sun C++ 4.x - _LT_TAGVAR(lt_prog_compiler_pic, $1)='-pic' - _LT_TAGVAR(lt_prog_compiler_static, $1)='-Bstatic' - ;; - lcc*) - # Lucid - _LT_TAGVAR(lt_prog_compiler_pic, $1)='-pic' - ;; - *) - ;; - esac - ;; - sysv5* | unixware* | sco3.2v5* | sco5v6* | OpenUNIX*) - case $cc_basename in - CC*) - _LT_TAGVAR(lt_prog_compiler_wl, $1)='-Wl,' - _LT_TAGVAR(lt_prog_compiler_pic, $1)='-KPIC' - _LT_TAGVAR(lt_prog_compiler_static, $1)='-Bstatic' - ;; - esac - ;; - tandem*) - case $cc_basename in - NCC*) - # NonStop-UX NCC 3.20 - _LT_TAGVAR(lt_prog_compiler_pic, $1)='-KPIC' - ;; - *) - ;; - esac - ;; - vxworks*) - ;; - *) - _LT_TAGVAR(lt_prog_compiler_can_build_shared, $1)=no - ;; - esac - fi -], -[ - if test "$GCC" = yes; then - _LT_TAGVAR(lt_prog_compiler_wl, $1)='-Wl,' - _LT_TAGVAR(lt_prog_compiler_static, $1)='-static' - - case $host_os in - aix*) - # All AIX code is PIC. - if test "$host_cpu" = ia64; then - # AIX 5 now supports IA64 processor - _LT_TAGVAR(lt_prog_compiler_static, $1)='-Bstatic' - fi - ;; - - amigaos*) - case $host_cpu in - powerpc) - # see comment about AmigaOS4 .so support - _LT_TAGVAR(lt_prog_compiler_pic, $1)='-fPIC' - ;; - m68k) - # FIXME: we need at least 68020 code to build shared libraries, but - # adding the `-m68020' flag to GCC prevents building anything better, - # like `-m68040'. - _LT_TAGVAR(lt_prog_compiler_pic, $1)='-m68020 -resident32 -malways-restore-a4' - ;; - esac - ;; - - beos* | irix5* | irix6* | nonstopux* | osf3* | osf4* | osf5*) - # PIC is the default for these OSes. - ;; - - mingw* | cygwin* | pw32* | os2* | cegcc*) - # This hack is so that the source file can tell whether it is being - # built for inclusion in a dll (and should export symbols for example). - # Although the cygwin gcc ignores -fPIC, still need this for old-style - # (--disable-auto-import) libraries - m4_if([$1], [GCJ], [], - [_LT_TAGVAR(lt_prog_compiler_pic, $1)='-DDLL_EXPORT']) - ;; - - darwin* | rhapsody*) - # PIC is the default on this platform - # Common symbols not allowed in MH_DYLIB files - _LT_TAGVAR(lt_prog_compiler_pic, $1)='-fno-common' - ;; - - hpux*) - # PIC is the default for 64-bit PA HP-UX, but not for 32-bit - # PA HP-UX. On IA64 HP-UX, PIC is the default but the pic flag - # sets the default TLS model and affects inlining. - case $host_cpu in - hppa*64*) - # +Z the default - ;; - *) - _LT_TAGVAR(lt_prog_compiler_pic, $1)='-fPIC' - ;; - esac - ;; - - interix[[3-9]]*) - # Interix 3.x gcc -fpic/-fPIC options generate broken code. - # Instead, we relocate shared libraries at runtime. - ;; - - msdosdjgpp*) - # Just because we use GCC doesn't mean we suddenly get shared libraries - # on systems that don't support them. - _LT_TAGVAR(lt_prog_compiler_can_build_shared, $1)=no - enable_shared=no - ;; - - *nto* | *qnx*) - # QNX uses GNU C++, but need to define -shared option too, otherwise - # it will coredump. - _LT_TAGVAR(lt_prog_compiler_pic, $1)='-fPIC -shared' - ;; - - sysv4*MP*) - if test -d /usr/nec; then - _LT_TAGVAR(lt_prog_compiler_pic, $1)=-Kconform_pic - fi - ;; - - *) - _LT_TAGVAR(lt_prog_compiler_pic, $1)='-fPIC' - ;; - esac - else - # PORTME Check for flag to pass linker flags through the system compiler. - case $host_os in - aix*) - _LT_TAGVAR(lt_prog_compiler_wl, $1)='-Wl,' - if test "$host_cpu" = ia64; then - # AIX 5 now supports IA64 processor - _LT_TAGVAR(lt_prog_compiler_static, $1)='-Bstatic' - else - _LT_TAGVAR(lt_prog_compiler_static, $1)='-bnso -bI:/lib/syscalls.exp' - fi - ;; - - mingw* | cygwin* | pw32* | os2* | cegcc*) - # This hack is so that the source file can tell whether it is being - # built for inclusion in a dll (and should export symbols for example). - m4_if([$1], [GCJ], [], - [_LT_TAGVAR(lt_prog_compiler_pic, $1)='-DDLL_EXPORT']) - ;; - - hpux9* | hpux10* | hpux11*) - _LT_TAGVAR(lt_prog_compiler_wl, $1)='-Wl,' - # PIC is the default for IA64 HP-UX and 64-bit HP-UX, but - # not for PA HP-UX. - case $host_cpu in - hppa*64*|ia64*) - # +Z the default - ;; - *) - _LT_TAGVAR(lt_prog_compiler_pic, $1)='+Z' - ;; - esac - # Is there a better lt_prog_compiler_static that works with the bundled CC? - _LT_TAGVAR(lt_prog_compiler_static, $1)='${wl}-a ${wl}archive' - ;; - - irix5* | irix6* | nonstopux*) - _LT_TAGVAR(lt_prog_compiler_wl, $1)='-Wl,' - # PIC (with -KPIC) is the default. - _LT_TAGVAR(lt_prog_compiler_static, $1)='-non_shared' - ;; - - linux* | k*bsd*-gnu) - case $cc_basename in - # old Intel for x86_64 which still supported -KPIC. - ecc*) - _LT_TAGVAR(lt_prog_compiler_wl, $1)='-Wl,' - _LT_TAGVAR(lt_prog_compiler_pic, $1)='-KPIC' - _LT_TAGVAR(lt_prog_compiler_static, $1)='-static' - ;; - # icc used to be incompatible with GCC. - # ICC 10 doesn't accept -KPIC any more. - icc* | ifort*) - _LT_TAGVAR(lt_prog_compiler_wl, $1)='-Wl,' - _LT_TAGVAR(lt_prog_compiler_pic, $1)='-fPIC' - _LT_TAGVAR(lt_prog_compiler_static, $1)='-static' - ;; - # Lahey Fortran 8.1. - lf95*) - _LT_TAGVAR(lt_prog_compiler_wl, $1)='-Wl,' - _LT_TAGVAR(lt_prog_compiler_pic, $1)='--shared' - _LT_TAGVAR(lt_prog_compiler_static, $1)='--static' - ;; - pgcc* | pgf77* | pgf90* | pgf95*) - # Portland Group compilers (*not* the Pentium gcc compiler, - # which looks to be a dead project) - _LT_TAGVAR(lt_prog_compiler_wl, $1)='-Wl,' - _LT_TAGVAR(lt_prog_compiler_pic, $1)='-fpic' - _LT_TAGVAR(lt_prog_compiler_static, $1)='-Bstatic' - ;; - ccc*) - _LT_TAGVAR(lt_prog_compiler_wl, $1)='-Wl,' - # All Alpha code is PIC. - _LT_TAGVAR(lt_prog_compiler_static, $1)='-non_shared' - ;; - xl*) - # IBM XL C 8.0/Fortran 10.1 on PPC - _LT_TAGVAR(lt_prog_compiler_wl, $1)='-Wl,' - _LT_TAGVAR(lt_prog_compiler_pic, $1)='-qpic' - _LT_TAGVAR(lt_prog_compiler_static, $1)='-qstaticlink' - ;; - *) - case `$CC -V 2>&1 | sed 5q` in - *Sun\ C*) - # Sun C 5.9 - _LT_TAGVAR(lt_prog_compiler_pic, $1)='-KPIC' - _LT_TAGVAR(lt_prog_compiler_static, $1)='-Bstatic' - _LT_TAGVAR(lt_prog_compiler_wl, $1)='-Wl,' - ;; - *Sun\ F*) - # Sun Fortran 8.3 passes all unrecognized flags to the linker - _LT_TAGVAR(lt_prog_compiler_pic, $1)='-KPIC' - _LT_TAGVAR(lt_prog_compiler_static, $1)='-Bstatic' - _LT_TAGVAR(lt_prog_compiler_wl, $1)='' - ;; - esac - ;; - esac - ;; - - newsos6) - _LT_TAGVAR(lt_prog_compiler_pic, $1)='-KPIC' - _LT_TAGVAR(lt_prog_compiler_static, $1)='-Bstatic' - ;; - - *nto* | *qnx*) - # QNX uses GNU C++, but need to define -shared option too, otherwise - # it will coredump. - _LT_TAGVAR(lt_prog_compiler_pic, $1)='-fPIC -shared' - ;; - - osf3* | osf4* | osf5*) - _LT_TAGVAR(lt_prog_compiler_wl, $1)='-Wl,' - # All OSF/1 code is PIC. - _LT_TAGVAR(lt_prog_compiler_static, $1)='-non_shared' - ;; - - rdos*) - _LT_TAGVAR(lt_prog_compiler_static, $1)='-non_shared' - ;; - - solaris*) - _LT_TAGVAR(lt_prog_compiler_pic, $1)='-KPIC' - _LT_TAGVAR(lt_prog_compiler_static, $1)='-Bstatic' - case $cc_basename in - f77* | f90* | f95*) - _LT_TAGVAR(lt_prog_compiler_wl, $1)='-Qoption ld ';; - *) - _LT_TAGVAR(lt_prog_compiler_wl, $1)='-Wl,';; - esac - ;; - - sunos4*) - _LT_TAGVAR(lt_prog_compiler_wl, $1)='-Qoption ld ' - _LT_TAGVAR(lt_prog_compiler_pic, $1)='-PIC' - _LT_TAGVAR(lt_prog_compiler_static, $1)='-Bstatic' - ;; - - sysv4 | sysv4.2uw2* | sysv4.3*) - _LT_TAGVAR(lt_prog_compiler_wl, $1)='-Wl,' - _LT_TAGVAR(lt_prog_compiler_pic, $1)='-KPIC' - _LT_TAGVAR(lt_prog_compiler_static, $1)='-Bstatic' - ;; - - sysv4*MP*) - if test -d /usr/nec ;then - _LT_TAGVAR(lt_prog_compiler_pic, $1)='-Kconform_pic' - _LT_TAGVAR(lt_prog_compiler_static, $1)='-Bstatic' - fi - ;; - - sysv5* | unixware* | sco3.2v5* | sco5v6* | OpenUNIX*) - _LT_TAGVAR(lt_prog_compiler_wl, $1)='-Wl,' - _LT_TAGVAR(lt_prog_compiler_pic, $1)='-KPIC' - _LT_TAGVAR(lt_prog_compiler_static, $1)='-Bstatic' - ;; - - unicos*) - _LT_TAGVAR(lt_prog_compiler_wl, $1)='-Wl,' - _LT_TAGVAR(lt_prog_compiler_can_build_shared, $1)=no - ;; - - uts4*) - _LT_TAGVAR(lt_prog_compiler_pic, $1)='-pic' - _LT_TAGVAR(lt_prog_compiler_static, $1)='-Bstatic' - ;; - - *) - _LT_TAGVAR(lt_prog_compiler_can_build_shared, $1)=no - ;; - esac - fi -]) -case $host_os in - # For platforms which do not support PIC, -DPIC is meaningless: - *djgpp*) - _LT_TAGVAR(lt_prog_compiler_pic, $1)= - ;; - *) - _LT_TAGVAR(lt_prog_compiler_pic, $1)="$_LT_TAGVAR(lt_prog_compiler_pic, $1)@&t@m4_if([$1],[],[ -DPIC],[m4_if([$1],[CXX],[ -DPIC],[])])" - ;; -esac -AC_MSG_RESULT([$_LT_TAGVAR(lt_prog_compiler_pic, $1)]) -_LT_TAGDECL([wl], [lt_prog_compiler_wl], [1], - [How to pass a linker flag through the compiler]) - -# -# Check to make sure the PIC flag actually works. -# -if test -n "$_LT_TAGVAR(lt_prog_compiler_pic, $1)"; then - _LT_COMPILER_OPTION([if $compiler PIC flag $_LT_TAGVAR(lt_prog_compiler_pic, $1) works], - [_LT_TAGVAR(lt_cv_prog_compiler_pic_works, $1)], - [$_LT_TAGVAR(lt_prog_compiler_pic, $1)@&t@m4_if([$1],[],[ -DPIC],[m4_if([$1],[CXX],[ -DPIC],[])])], [], - [case $_LT_TAGVAR(lt_prog_compiler_pic, $1) in - "" | " "*) ;; - *) _LT_TAGVAR(lt_prog_compiler_pic, $1)=" $_LT_TAGVAR(lt_prog_compiler_pic, $1)" ;; - esac], - [_LT_TAGVAR(lt_prog_compiler_pic, $1)= - _LT_TAGVAR(lt_prog_compiler_can_build_shared, $1)=no]) -fi -_LT_TAGDECL([pic_flag], [lt_prog_compiler_pic], [1], - [Additional compiler flags for building library objects]) - -# -# Check to make sure the static flag actually works. -# -wl=$_LT_TAGVAR(lt_prog_compiler_wl, $1) eval lt_tmp_static_flag=\"$_LT_TAGVAR(lt_prog_compiler_static, $1)\" -_LT_LINKER_OPTION([if $compiler static flag $lt_tmp_static_flag works], - _LT_TAGVAR(lt_cv_prog_compiler_static_works, $1), - $lt_tmp_static_flag, - [], - [_LT_TAGVAR(lt_prog_compiler_static, $1)=]) -_LT_TAGDECL([link_static_flag], [lt_prog_compiler_static], [1], - [Compiler flag to prevent dynamic linking]) -])# _LT_COMPILER_PIC - - -# _LT_LINKER_SHLIBS([TAGNAME]) -# ---------------------------- -# See if the linker supports building shared libraries. -m4_defun([_LT_LINKER_SHLIBS], -[AC_REQUIRE([LT_PATH_LD])dnl -AC_REQUIRE([LT_PATH_NM])dnl -m4_require([_LT_FILEUTILS_DEFAULTS])dnl -m4_require([_LT_DECL_EGREP])dnl -m4_require([_LT_DECL_SED])dnl -m4_require([_LT_CMD_GLOBAL_SYMBOLS])dnl -m4_require([_LT_TAG_COMPILER])dnl -AC_MSG_CHECKING([whether the $compiler linker ($LD) supports shared libraries]) -m4_if([$1], [CXX], [ - _LT_TAGVAR(export_symbols_cmds, $1)='$NM $libobjs $convenience | $global_symbol_pipe | $SED '\''s/.* //'\'' | sort | uniq > $export_symbols' - case $host_os in - aix[[4-9]]*) - # If we're using GNU nm, then we don't want the "-C" option. - # -C means demangle to AIX nm, but means don't demangle with GNU nm - if $NM -V 2>&1 | $GREP 'GNU' > /dev/null; then - _LT_TAGVAR(export_symbols_cmds, $1)='$NM -Bpg $libobjs $convenience | awk '\''{ if (((\$ 2 == "T") || (\$ 2 == "D") || (\$ 2 == "B")) && ([substr](\$ 3,1,1) != ".")) { print \$ 3 } }'\'' | sort -u > $export_symbols' - else - _LT_TAGVAR(export_symbols_cmds, $1)='$NM -BCpg $libobjs $convenience | awk '\''{ if (((\$ 2 == "T") || (\$ 2 == "D") || (\$ 2 == "B")) && ([substr](\$ 3,1,1) != ".")) { print \$ 3 } }'\'' | sort -u > $export_symbols' - fi - ;; - pw32*) - _LT_TAGVAR(export_symbols_cmds, $1)="$ltdll_cmds" - ;; - cygwin* | mingw* | cegcc*) - _LT_TAGVAR(export_symbols_cmds, $1)='$NM $libobjs $convenience | $global_symbol_pipe | $SED -e '\''/^[[BCDGRS]][[ ]]/s/.*[[ ]]\([[^ ]]*\)/\1 DATA/;/^.*[[ ]]__nm__/s/^.*[[ ]]__nm__\([[^ ]]*\)[[ ]][[^ ]]*/\1 DATA/;/^I[[ ]]/d;/^[[AITW]][[ ]]/s/.* //'\'' | sort | uniq > $export_symbols' - ;; - *) - _LT_TAGVAR(export_symbols_cmds, $1)='$NM $libobjs $convenience | $global_symbol_pipe | $SED '\''s/.* //'\'' | sort | uniq > $export_symbols' - ;; - esac - _LT_TAGVAR(exclude_expsyms, $1)=['_GLOBAL_OFFSET_TABLE_|_GLOBAL__F[ID]_.*'] -], [ - runpath_var= - _LT_TAGVAR(allow_undefined_flag, $1)= - _LT_TAGVAR(always_export_symbols, $1)=no - _LT_TAGVAR(archive_cmds, $1)= - _LT_TAGVAR(archive_expsym_cmds, $1)= - _LT_TAGVAR(compiler_needs_object, $1)=no - _LT_TAGVAR(enable_shared_with_static_runtimes, $1)=no - _LT_TAGVAR(export_dynamic_flag_spec, $1)= - _LT_TAGVAR(export_symbols_cmds, $1)='$NM $libobjs $convenience | $global_symbol_pipe | $SED '\''s/.* //'\'' | sort | uniq > $export_symbols' - _LT_TAGVAR(hardcode_automatic, $1)=no - _LT_TAGVAR(hardcode_direct, $1)=no - _LT_TAGVAR(hardcode_direct_absolute, $1)=no - _LT_TAGVAR(hardcode_libdir_flag_spec, $1)= - _LT_TAGVAR(hardcode_libdir_flag_spec_ld, $1)= - _LT_TAGVAR(hardcode_libdir_separator, $1)= - _LT_TAGVAR(hardcode_minus_L, $1)=no - _LT_TAGVAR(hardcode_shlibpath_var, $1)=unsupported - _LT_TAGVAR(inherit_rpath, $1)=no - _LT_TAGVAR(link_all_deplibs, $1)=unknown - _LT_TAGVAR(module_cmds, $1)= - _LT_TAGVAR(module_expsym_cmds, $1)= - _LT_TAGVAR(old_archive_from_new_cmds, $1)= - _LT_TAGVAR(old_archive_from_expsyms_cmds, $1)= - _LT_TAGVAR(thread_safe_flag_spec, $1)= - _LT_TAGVAR(whole_archive_flag_spec, $1)= - # include_expsyms should be a list of space-separated symbols to be *always* - # included in the symbol list - _LT_TAGVAR(include_expsyms, $1)= - # exclude_expsyms can be an extended regexp of symbols to exclude - # it will be wrapped by ` (' and `)$', so one must not match beginning or - # end of line. Example: `a|bc|.*d.*' will exclude the symbols `a' and `bc', - # as well as any symbol that contains `d'. - _LT_TAGVAR(exclude_expsyms, $1)=['_GLOBAL_OFFSET_TABLE_|_GLOBAL__F[ID]_.*'] - # Although _GLOBAL_OFFSET_TABLE_ is a valid symbol C name, most a.out - # platforms (ab)use it in PIC code, but their linkers get confused if - # the symbol is explicitly referenced. Since portable code cannot - # rely on this symbol name, it's probably fine to never include it in - # preloaded symbol tables. - # Exclude shared library initialization/finalization symbols. -dnl Note also adjust exclude_expsyms for C++ above. - extract_expsyms_cmds= - - case $host_os in - cygwin* | mingw* | pw32* | cegcc*) - # FIXME: the MSVC++ port hasn't been tested in a loooong time - # When not using gcc, we currently assume that we are using - # Microsoft Visual C++. - if test "$GCC" != yes; then - with_gnu_ld=no - fi - ;; - interix*) - # we just hope/assume this is gcc and not c89 (= MSVC++) - with_gnu_ld=yes - ;; - openbsd*) - with_gnu_ld=no - ;; - esac - - _LT_TAGVAR(ld_shlibs, $1)=yes - if test "$with_gnu_ld" = yes; then - # If archive_cmds runs LD, not CC, wlarc should be empty - wlarc='${wl}' - - # Set some defaults for GNU ld with shared library support. These - # are reset later if shared libraries are not supported. Putting them - # here allows them to be overridden if necessary. - runpath_var=LD_RUN_PATH - _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='${wl}-rpath ${wl}$libdir' - _LT_TAGVAR(export_dynamic_flag_spec, $1)='${wl}--export-dynamic' - # ancient GNU ld didn't support --whole-archive et. al. - if $LD --help 2>&1 | $GREP 'no-whole-archive' > /dev/null; then - _LT_TAGVAR(whole_archive_flag_spec, $1)="$wlarc"'--whole-archive$convenience '"$wlarc"'--no-whole-archive' - else - _LT_TAGVAR(whole_archive_flag_spec, $1)= - fi - supports_anon_versioning=no - case `$LD -v 2>&1` in - *\ [[01]].* | *\ 2.[[0-9]].* | *\ 2.10.*) ;; # catch versions < 2.11 - *\ 2.11.93.0.2\ *) supports_anon_versioning=yes ;; # RH7.3 ... - *\ 2.11.92.0.12\ *) supports_anon_versioning=yes ;; # Mandrake 8.2 ... - *\ 2.11.*) ;; # other 2.11 versions - *) supports_anon_versioning=yes ;; - esac - - # See if GNU ld supports shared libraries. - case $host_os in - aix[[3-9]]*) - # On AIX/PPC, the GNU linker is very broken - if test "$host_cpu" != ia64; then - _LT_TAGVAR(ld_shlibs, $1)=no - cat <<_LT_EOF 1>&2 - -*** Warning: the GNU linker, at least up to release 2.9.1, is reported -*** to be unable to reliably create shared libraries on AIX. -*** Therefore, libtool is disabling shared libraries support. If you -*** really care for shared libraries, you may want to modify your PATH -*** so that a non-GNU linker is found, and then restart. - -_LT_EOF - fi - ;; - - amigaos*) - case $host_cpu in - powerpc) - # see comment about AmigaOS4 .so support - _LT_TAGVAR(archive_cmds, $1)='$CC -shared $libobjs $deplibs $compiler_flags ${wl}-soname $wl$soname -o $lib' - _LT_TAGVAR(archive_expsym_cmds, $1)='' - ;; - m68k) - _LT_TAGVAR(archive_cmds, $1)='$RM $output_objdir/a2ixlibrary.data~$ECHO "#define NAME $libname" > $output_objdir/a2ixlibrary.data~$ECHO "#define LIBRARY_ID 1" >> $output_objdir/a2ixlibrary.data~$ECHO "#define VERSION $major" >> $output_objdir/a2ixlibrary.data~$ECHO "#define REVISION $revision" >> $output_objdir/a2ixlibrary.data~$AR $AR_FLAGS $lib $libobjs~$RANLIB $lib~(cd $output_objdir && a2ixlibrary -32)' - _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='-L$libdir' - _LT_TAGVAR(hardcode_minus_L, $1)=yes - ;; - esac - ;; - - beos*) - if $LD --help 2>&1 | $GREP ': supported targets:.* elf' > /dev/null; then - _LT_TAGVAR(allow_undefined_flag, $1)=unsupported - # Joseph Beckenbach says some releases of gcc - # support --undefined. This deserves some investigation. FIXME - _LT_TAGVAR(archive_cmds, $1)='$CC -nostart $libobjs $deplibs $compiler_flags ${wl}-soname $wl$soname -o $lib' - else - _LT_TAGVAR(ld_shlibs, $1)=no - fi - ;; - - cygwin* | mingw* | pw32* | cegcc*) - # _LT_TAGVAR(hardcode_libdir_flag_spec, $1) is actually meaningless, - # as there is no search path for DLLs. - _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='-L$libdir' - _LT_TAGVAR(allow_undefined_flag, $1)=unsupported - _LT_TAGVAR(always_export_symbols, $1)=no - _LT_TAGVAR(enable_shared_with_static_runtimes, $1)=yes - _LT_TAGVAR(export_symbols_cmds, $1)='$NM $libobjs $convenience | $global_symbol_pipe | $SED -e '\''/^[[BCDGRS]][[ ]]/s/.*[[ ]]\([[^ ]]*\)/\1 DATA/'\'' | $SED -e '\''/^[[AITW]][[ ]]/s/.*[[ ]]//'\'' | sort | uniq > $export_symbols' - - if $LD --help 2>&1 | $GREP 'auto-import' > /dev/null; then - _LT_TAGVAR(archive_cmds, $1)='$CC -shared $libobjs $deplibs $compiler_flags -o $output_objdir/$soname ${wl}--enable-auto-image-base -Xlinker --out-implib -Xlinker $lib' - # If the export-symbols file already is a .def file (1st line - # is EXPORTS), use it as is; otherwise, prepend... - _LT_TAGVAR(archive_expsym_cmds, $1)='if test "x`$SED 1q $export_symbols`" = xEXPORTS; then - cp $export_symbols $output_objdir/$soname.def; - else - echo EXPORTS > $output_objdir/$soname.def; - cat $export_symbols >> $output_objdir/$soname.def; - fi~ - $CC -shared $output_objdir/$soname.def $libobjs $deplibs $compiler_flags -o $output_objdir/$soname ${wl}--enable-auto-image-base -Xlinker --out-implib -Xlinker $lib' - else - _LT_TAGVAR(ld_shlibs, $1)=no - fi - ;; - - interix[[3-9]]*) - _LT_TAGVAR(hardcode_direct, $1)=no - _LT_TAGVAR(hardcode_shlibpath_var, $1)=no - _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='${wl}-rpath,$libdir' - _LT_TAGVAR(export_dynamic_flag_spec, $1)='${wl}-E' - # Hack: On Interix 3.x, we cannot compile PIC because of a broken gcc. - # Instead, shared libraries are loaded at an image base (0x10000000 by - # default) and relocated if they conflict, which is a slow very memory - # consuming and fragmenting process. To avoid this, we pick a random, - # 256 KiB-aligned image base between 0x50000000 and 0x6FFC0000 at link - # time. Moving up from 0x10000000 also allows more sbrk(2) space. - _LT_TAGVAR(archive_cmds, $1)='$CC -shared $pic_flag $libobjs $deplibs $compiler_flags ${wl}-h,$soname ${wl}--image-base,`expr ${RANDOM-$$} % 4096 / 2 \* 262144 + 1342177280` -o $lib' - _LT_TAGVAR(archive_expsym_cmds, $1)='sed "s,^,_," $export_symbols >$output_objdir/$soname.expsym~$CC -shared $pic_flag $libobjs $deplibs $compiler_flags ${wl}-h,$soname ${wl}--retain-symbols-file,$output_objdir/$soname.expsym ${wl}--image-base,`expr ${RANDOM-$$} % 4096 / 2 \* 262144 + 1342177280` -o $lib' - ;; - - gnu* | linux* | tpf* | k*bsd*-gnu) - tmp_diet=no - if test "$host_os" = linux-dietlibc; then - case $cc_basename in - diet\ *) tmp_diet=yes;; # linux-dietlibc with static linking (!diet-dyn) - esac - fi - if $LD --help 2>&1 | $EGREP ': supported targets:.* elf' > /dev/null \ - && test "$tmp_diet" = no - then - tmp_addflag= - tmp_sharedflag='-shared' - case $cc_basename,$host_cpu in - pgcc*) # Portland Group C compiler - _LT_TAGVAR(whole_archive_flag_spec, $1)='${wl}--whole-archive`for conv in $convenience\"\"; do test -n \"$conv\" && new_convenience=\"$new_convenience,$conv\"; done; $ECHO \"$new_convenience\"` ${wl}--no-whole-archive' - tmp_addflag=' $pic_flag' - ;; - pgf77* | pgf90* | pgf95*) # Portland Group f77 and f90 compilers - _LT_TAGVAR(whole_archive_flag_spec, $1)='${wl}--whole-archive`for conv in $convenience\"\"; do test -n \"$conv\" && new_convenience=\"$new_convenience,$conv\"; done; $ECHO \"$new_convenience\"` ${wl}--no-whole-archive' - tmp_addflag=' $pic_flag -Mnomain' ;; - ecc*,ia64* | icc*,ia64*) # Intel C compiler on ia64 - tmp_addflag=' -i_dynamic' ;; - efc*,ia64* | ifort*,ia64*) # Intel Fortran compiler on ia64 - tmp_addflag=' -i_dynamic -nofor_main' ;; - ifc* | ifort*) # Intel Fortran compiler - tmp_addflag=' -nofor_main' ;; - lf95*) # Lahey Fortran 8.1 - _LT_TAGVAR(whole_archive_flag_spec, $1)= - tmp_sharedflag='--shared' ;; - xl[[cC]]*) # IBM XL C 8.0 on PPC (deal with xlf below) - tmp_sharedflag='-qmkshrobj' - tmp_addflag= ;; - esac - case `$CC -V 2>&1 | sed 5q` in - *Sun\ C*) # Sun C 5.9 - _LT_TAGVAR(whole_archive_flag_spec, $1)='${wl}--whole-archive`new_convenience=; for conv in $convenience\"\"; do test -z \"$conv\" || new_convenience=\"$new_convenience,$conv\"; done; $ECHO \"$new_convenience\"` ${wl}--no-whole-archive' - _LT_TAGVAR(compiler_needs_object, $1)=yes - tmp_sharedflag='-G' ;; - *Sun\ F*) # Sun Fortran 8.3 - tmp_sharedflag='-G' ;; - esac - _LT_TAGVAR(archive_cmds, $1)='$CC '"$tmp_sharedflag""$tmp_addflag"' $libobjs $deplibs $compiler_flags ${wl}-soname $wl$soname -o $lib' - - if test "x$supports_anon_versioning" = xyes; then - _LT_TAGVAR(archive_expsym_cmds, $1)='echo "{ global:" > $output_objdir/$libname.ver~ - cat $export_symbols | sed -e "s/\(.*\)/\1;/" >> $output_objdir/$libname.ver~ - echo "local: *; };" >> $output_objdir/$libname.ver~ - $CC '"$tmp_sharedflag""$tmp_addflag"' $libobjs $deplibs $compiler_flags ${wl}-soname $wl$soname ${wl}-version-script ${wl}$output_objdir/$libname.ver -o $lib' - fi - - case $cc_basename in - xlf*) - # IBM XL Fortran 10.1 on PPC cannot create shared libs itself - _LT_TAGVAR(whole_archive_flag_spec, $1)='--whole-archive$convenience --no-whole-archive' - _LT_TAGVAR(hardcode_libdir_flag_spec, $1)= - _LT_TAGVAR(hardcode_libdir_flag_spec_ld, $1)='-rpath $libdir' - _LT_TAGVAR(archive_cmds, $1)='$LD -shared $libobjs $deplibs $compiler_flags -soname $soname -o $lib' - if test "x$supports_anon_versioning" = xyes; then - _LT_TAGVAR(archive_expsym_cmds, $1)='echo "{ global:" > $output_objdir/$libname.ver~ - cat $export_symbols | sed -e "s/\(.*\)/\1;/" >> $output_objdir/$libname.ver~ - echo "local: *; };" >> $output_objdir/$libname.ver~ - $LD -shared $libobjs $deplibs $compiler_flags -soname $soname -version-script $output_objdir/$libname.ver -o $lib' - fi - ;; - esac - else - _LT_TAGVAR(ld_shlibs, $1)=no - fi - ;; - - netbsd*) - if echo __ELF__ | $CC -E - | $GREP __ELF__ >/dev/null; then - _LT_TAGVAR(archive_cmds, $1)='$LD -Bshareable $libobjs $deplibs $linker_flags -o $lib' - wlarc= - else - _LT_TAGVAR(archive_cmds, $1)='$CC -shared $libobjs $deplibs $compiler_flags ${wl}-soname $wl$soname -o $lib' - _LT_TAGVAR(archive_expsym_cmds, $1)='$CC -shared $libobjs $deplibs $compiler_flags ${wl}-soname $wl$soname ${wl}-retain-symbols-file $wl$export_symbols -o $lib' - fi - ;; - - solaris*) - if $LD -v 2>&1 | $GREP 'BFD 2\.8' > /dev/null; then - _LT_TAGVAR(ld_shlibs, $1)=no - cat <<_LT_EOF 1>&2 - -*** Warning: The releases 2.8.* of the GNU linker cannot reliably -*** create shared libraries on Solaris systems. Therefore, libtool -*** is disabling shared libraries support. We urge you to upgrade GNU -*** binutils to release 2.9.1 or newer. Another option is to modify -*** your PATH or compiler configuration so that the native linker is -*** used, and then restart. - -_LT_EOF - elif $LD --help 2>&1 | $GREP ': supported targets:.* elf' > /dev/null; then - _LT_TAGVAR(archive_cmds, $1)='$CC -shared $libobjs $deplibs $compiler_flags ${wl}-soname $wl$soname -o $lib' - _LT_TAGVAR(archive_expsym_cmds, $1)='$CC -shared $libobjs $deplibs $compiler_flags ${wl}-soname $wl$soname ${wl}-retain-symbols-file $wl$export_symbols -o $lib' - else - _LT_TAGVAR(ld_shlibs, $1)=no - fi - ;; - - sysv5* | sco3.2v5* | sco5v6* | unixware* | OpenUNIX*) - case `$LD -v 2>&1` in - *\ [[01]].* | *\ 2.[[0-9]].* | *\ 2.1[[0-5]].*) - _LT_TAGVAR(ld_shlibs, $1)=no - cat <<_LT_EOF 1>&2 - -*** Warning: Releases of the GNU linker prior to 2.16.91.0.3 can not -*** reliably create shared libraries on SCO systems. Therefore, libtool -*** is disabling shared libraries support. We urge you to upgrade GNU -*** binutils to release 2.16.91.0.3 or newer. Another option is to modify -*** your PATH or compiler configuration so that the native linker is -*** used, and then restart. - -_LT_EOF - ;; - *) - # For security reasons, it is highly recommended that you always - # use absolute paths for naming shared libraries, and exclude the - # DT_RUNPATH tag from executables and libraries. But doing so - # requires that you compile everything twice, which is a pain. - if $LD --help 2>&1 | $GREP ': supported targets:.* elf' > /dev/null; then - _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='${wl}-rpath ${wl}$libdir' - _LT_TAGVAR(archive_cmds, $1)='$CC -shared $libobjs $deplibs $compiler_flags ${wl}-soname $wl$soname -o $lib' - _LT_TAGVAR(archive_expsym_cmds, $1)='$CC -shared $libobjs $deplibs $compiler_flags ${wl}-soname $wl$soname ${wl}-retain-symbols-file $wl$export_symbols -o $lib' - else - _LT_TAGVAR(ld_shlibs, $1)=no - fi - ;; - esac - ;; - - sunos4*) - _LT_TAGVAR(archive_cmds, $1)='$LD -assert pure-text -Bshareable -o $lib $libobjs $deplibs $linker_flags' - wlarc= - _LT_TAGVAR(hardcode_direct, $1)=yes - _LT_TAGVAR(hardcode_shlibpath_var, $1)=no - ;; - - *) - if $LD --help 2>&1 | $GREP ': supported targets:.* elf' > /dev/null; then - _LT_TAGVAR(archive_cmds, $1)='$CC -shared $libobjs $deplibs $compiler_flags ${wl}-soname $wl$soname -o $lib' - _LT_TAGVAR(archive_expsym_cmds, $1)='$CC -shared $libobjs $deplibs $compiler_flags ${wl}-soname $wl$soname ${wl}-retain-symbols-file $wl$export_symbols -o $lib' - else - _LT_TAGVAR(ld_shlibs, $1)=no - fi - ;; - esac - - if test "$_LT_TAGVAR(ld_shlibs, $1)" = no; then - runpath_var= - _LT_TAGVAR(hardcode_libdir_flag_spec, $1)= - _LT_TAGVAR(export_dynamic_flag_spec, $1)= - _LT_TAGVAR(whole_archive_flag_spec, $1)= - fi - else - # PORTME fill in a description of your system's linker (not GNU ld) - case $host_os in - aix3*) - _LT_TAGVAR(allow_undefined_flag, $1)=unsupported - _LT_TAGVAR(always_export_symbols, $1)=yes - _LT_TAGVAR(archive_expsym_cmds, $1)='$LD -o $output_objdir/$soname $libobjs $deplibs $linker_flags -bE:$export_symbols -T512 -H512 -bM:SRE~$AR $AR_FLAGS $lib $output_objdir/$soname' - # Note: this linker hardcodes the directories in LIBPATH if there - # are no directories specified by -L. - _LT_TAGVAR(hardcode_minus_L, $1)=yes - if test "$GCC" = yes && test -z "$lt_prog_compiler_static"; then - # Neither direct hardcoding nor static linking is supported with a - # broken collect2. - _LT_TAGVAR(hardcode_direct, $1)=unsupported - fi - ;; - - aix[[4-9]]*) - if test "$host_cpu" = ia64; then - # On IA64, the linker does run time linking by default, so we don't - # have to do anything special. - aix_use_runtimelinking=no - exp_sym_flag='-Bexport' - no_entry_flag="" - else - # If we're using GNU nm, then we don't want the "-C" option. - # -C means demangle to AIX nm, but means don't demangle with GNU nm - if $NM -V 2>&1 | $GREP 'GNU' > /dev/null; then - _LT_TAGVAR(export_symbols_cmds, $1)='$NM -Bpg $libobjs $convenience | awk '\''{ if (((\$ 2 == "T") || (\$ 2 == "D") || (\$ 2 == "B")) && ([substr](\$ 3,1,1) != ".")) { print \$ 3 } }'\'' | sort -u > $export_symbols' - else - _LT_TAGVAR(export_symbols_cmds, $1)='$NM -BCpg $libobjs $convenience | awk '\''{ if (((\$ 2 == "T") || (\$ 2 == "D") || (\$ 2 == "B")) && ([substr](\$ 3,1,1) != ".")) { print \$ 3 } }'\'' | sort -u > $export_symbols' - fi - aix_use_runtimelinking=no - - # Test if we are trying to use run time linking or normal - # AIX style linking. If -brtl is somewhere in LDFLAGS, we - # need to do runtime linking. - case $host_os in aix4.[[23]]|aix4.[[23]].*|aix[[5-9]]*) - for ld_flag in $LDFLAGS; do - if (test $ld_flag = "-brtl" || test $ld_flag = "-Wl,-brtl"); then - aix_use_runtimelinking=yes - break - fi - done - ;; - esac - - exp_sym_flag='-bexport' - no_entry_flag='-bnoentry' - fi - - # When large executables or shared objects are built, AIX ld can - # have problems creating the table of contents. If linking a library - # or program results in "error TOC overflow" add -mminimal-toc to - # CXXFLAGS/CFLAGS for g++/gcc. In the cases where that is not - # enough to fix the problem, add -Wl,-bbigtoc to LDFLAGS. - - _LT_TAGVAR(archive_cmds, $1)='' - _LT_TAGVAR(hardcode_direct, $1)=yes - _LT_TAGVAR(hardcode_direct_absolute, $1)=yes - _LT_TAGVAR(hardcode_libdir_separator, $1)=':' - _LT_TAGVAR(link_all_deplibs, $1)=yes - _LT_TAGVAR(file_list_spec, $1)='${wl}-f,' - - if test "$GCC" = yes; then - case $host_os in aix4.[[012]]|aix4.[[012]].*) - # We only want to do this on AIX 4.2 and lower, the check - # below for broken collect2 doesn't work under 4.3+ - collect2name=`${CC} -print-prog-name=collect2` - if test -f "$collect2name" && - strings "$collect2name" | $GREP resolve_lib_name >/dev/null - then - # We have reworked collect2 - : - else - # We have old collect2 - _LT_TAGVAR(hardcode_direct, $1)=unsupported - # It fails to find uninstalled libraries when the uninstalled - # path is not listed in the libpath. Setting hardcode_minus_L - # to unsupported forces relinking - _LT_TAGVAR(hardcode_minus_L, $1)=yes - _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='-L$libdir' - _LT_TAGVAR(hardcode_libdir_separator, $1)= - fi - ;; - esac - shared_flag='-shared' - if test "$aix_use_runtimelinking" = yes; then - shared_flag="$shared_flag "'${wl}-G' - fi - else - # not using gcc - if test "$host_cpu" = ia64; then - # VisualAge C++, Version 5.5 for AIX 5L for IA-64, Beta 3 Release - # chokes on -Wl,-G. The following line is correct: - shared_flag='-G' - else - if test "$aix_use_runtimelinking" = yes; then - shared_flag='${wl}-G' - else - shared_flag='${wl}-bM:SRE' - fi - fi - fi - - _LT_TAGVAR(export_dynamic_flag_spec, $1)='${wl}-bexpall' - # It seems that -bexpall does not export symbols beginning with - # underscore (_), so it is better to generate a list of symbols to export. - _LT_TAGVAR(always_export_symbols, $1)=yes - if test "$aix_use_runtimelinking" = yes; then - # Warning - without using the other runtime loading flags (-brtl), - # -berok will link without error, but may produce a broken library. - _LT_TAGVAR(allow_undefined_flag, $1)='-berok' - # Determine the default libpath from the value encoded in an - # empty executable. - _LT_SYS_MODULE_PATH_AIX - _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='${wl}-blibpath:$libdir:'"$aix_libpath" - _LT_TAGVAR(archive_expsym_cmds, $1)='$CC -o $output_objdir/$soname $libobjs $deplibs '"\${wl}$no_entry_flag"' $compiler_flags `if test "x${allow_undefined_flag}" != "x"; then $ECHO "X${wl}${allow_undefined_flag}" | $Xsed; else :; fi` '"\${wl}$exp_sym_flag:\$export_symbols $shared_flag" - else - if test "$host_cpu" = ia64; then - _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='${wl}-R $libdir:/usr/lib:/lib' - _LT_TAGVAR(allow_undefined_flag, $1)="-z nodefs" - _LT_TAGVAR(archive_expsym_cmds, $1)="\$CC $shared_flag"' -o $output_objdir/$soname $libobjs $deplibs '"\${wl}$no_entry_flag"' $compiler_flags ${wl}${allow_undefined_flag} '"\${wl}$exp_sym_flag:\$export_symbols" - else - # Determine the default libpath from the value encoded in an - # empty executable. - _LT_SYS_MODULE_PATH_AIX - _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='${wl}-blibpath:$libdir:'"$aix_libpath" - # Warning - without using the other run time loading flags, - # -berok will link without error, but may produce a broken library. - _LT_TAGVAR(no_undefined_flag, $1)=' ${wl}-bernotok' - _LT_TAGVAR(allow_undefined_flag, $1)=' ${wl}-berok' - # Exported symbols can be pulled into shared objects from archives - _LT_TAGVAR(whole_archive_flag_spec, $1)='$convenience' - _LT_TAGVAR(archive_cmds_need_lc, $1)=yes - # This is similar to how AIX traditionally builds its shared libraries. - _LT_TAGVAR(archive_expsym_cmds, $1)="\$CC $shared_flag"' -o $output_objdir/$soname $libobjs $deplibs ${wl}-bnoentry $compiler_flags ${wl}-bE:$export_symbols${allow_undefined_flag}~$AR $AR_FLAGS $output_objdir/$libname$release.a $output_objdir/$soname' - fi - fi - ;; - - amigaos*) - case $host_cpu in - powerpc) - # see comment about AmigaOS4 .so support - _LT_TAGVAR(archive_cmds, $1)='$CC -shared $libobjs $deplibs $compiler_flags ${wl}-soname $wl$soname -o $lib' - _LT_TAGVAR(archive_expsym_cmds, $1)='' - ;; - m68k) - _LT_TAGVAR(archive_cmds, $1)='$RM $output_objdir/a2ixlibrary.data~$ECHO "#define NAME $libname" > $output_objdir/a2ixlibrary.data~$ECHO "#define LIBRARY_ID 1" >> $output_objdir/a2ixlibrary.data~$ECHO "#define VERSION $major" >> $output_objdir/a2ixlibrary.data~$ECHO "#define REVISION $revision" >> $output_objdir/a2ixlibrary.data~$AR $AR_FLAGS $lib $libobjs~$RANLIB $lib~(cd $output_objdir && a2ixlibrary -32)' - _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='-L$libdir' - _LT_TAGVAR(hardcode_minus_L, $1)=yes - ;; - esac - ;; - - bsdi[[45]]*) - _LT_TAGVAR(export_dynamic_flag_spec, $1)=-rdynamic - ;; - - cygwin* | mingw* | pw32* | cegcc*) - # When not using gcc, we currently assume that we are using - # Microsoft Visual C++. - # hardcode_libdir_flag_spec is actually meaningless, as there is - # no search path for DLLs. - _LT_TAGVAR(hardcode_libdir_flag_spec, $1)=' ' - _LT_TAGVAR(allow_undefined_flag, $1)=unsupported - # Tell ltmain to make .lib files, not .a files. - libext=lib - # Tell ltmain to make .dll files, not .so files. - shrext_cmds=".dll" - # FIXME: Setting linknames here is a bad hack. - _LT_TAGVAR(archive_cmds, $1)='$CC -o $lib $libobjs $compiler_flags `$ECHO "X$deplibs" | $Xsed -e '\''s/ -lc$//'\''` -link -dll~linknames=' - # The linker will automatically build a .lib file if we build a DLL. - _LT_TAGVAR(old_archive_from_new_cmds, $1)='true' - # FIXME: Should let the user specify the lib program. - _LT_TAGVAR(old_archive_cmds, $1)='lib -OUT:$oldlib$oldobjs$old_deplibs' - _LT_TAGVAR(fix_srcfile_path, $1)='`cygpath -w "$srcfile"`' - _LT_TAGVAR(enable_shared_with_static_runtimes, $1)=yes - ;; - - darwin* | rhapsody*) - _LT_DARWIN_LINKER_FEATURES($1) - ;; - - dgux*) - _LT_TAGVAR(archive_cmds, $1)='$LD -G -h $soname -o $lib $libobjs $deplibs $linker_flags' - _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='-L$libdir' - _LT_TAGVAR(hardcode_shlibpath_var, $1)=no - ;; - - freebsd1*) - _LT_TAGVAR(ld_shlibs, $1)=no - ;; - - # FreeBSD 2.2.[012] allows us to include c++rt0.o to get C++ constructor - # support. Future versions do this automatically, but an explicit c++rt0.o - # does not break anything, and helps significantly (at the cost of a little - # extra space). - freebsd2.2*) - _LT_TAGVAR(archive_cmds, $1)='$LD -Bshareable -o $lib $libobjs $deplibs $linker_flags /usr/lib/c++rt0.o' - _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='-R$libdir' - _LT_TAGVAR(hardcode_direct, $1)=yes - _LT_TAGVAR(hardcode_shlibpath_var, $1)=no - ;; - - # Unfortunately, older versions of FreeBSD 2 do not have this feature. - freebsd2*) - _LT_TAGVAR(archive_cmds, $1)='$LD -Bshareable -o $lib $libobjs $deplibs $linker_flags' - _LT_TAGVAR(hardcode_direct, $1)=yes - _LT_TAGVAR(hardcode_minus_L, $1)=yes - _LT_TAGVAR(hardcode_shlibpath_var, $1)=no - ;; - - # FreeBSD 3 and greater uses gcc -shared to do shared libraries. - freebsd* | dragonfly*) - _LT_TAGVAR(archive_cmds, $1)='$CC -shared -o $lib $libobjs $deplibs $compiler_flags' - _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='-R$libdir' - _LT_TAGVAR(hardcode_direct, $1)=yes - _LT_TAGVAR(hardcode_shlibpath_var, $1)=no - ;; - - hpux9*) - if test "$GCC" = yes; then - _LT_TAGVAR(archive_cmds, $1)='$RM $output_objdir/$soname~$CC -shared -fPIC ${wl}+b ${wl}$install_libdir -o $output_objdir/$soname $libobjs $deplibs $compiler_flags~test $output_objdir/$soname = $lib || mv $output_objdir/$soname $lib' - else - _LT_TAGVAR(archive_cmds, $1)='$RM $output_objdir/$soname~$LD -b +b $install_libdir -o $output_objdir/$soname $libobjs $deplibs $linker_flags~test $output_objdir/$soname = $lib || mv $output_objdir/$soname $lib' - fi - _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='${wl}+b ${wl}$libdir' - _LT_TAGVAR(hardcode_libdir_separator, $1)=: - _LT_TAGVAR(hardcode_direct, $1)=yes - - # hardcode_minus_L: Not really in the search PATH, - # but as the default location of the library. - _LT_TAGVAR(hardcode_minus_L, $1)=yes - _LT_TAGVAR(export_dynamic_flag_spec, $1)='${wl}-E' - ;; - - hpux10*) - if test "$GCC" = yes -a "$with_gnu_ld" = no; then - _LT_TAGVAR(archive_cmds, $1)='$CC -shared -fPIC ${wl}+h ${wl}$soname ${wl}+b ${wl}$install_libdir -o $lib $libobjs $deplibs $compiler_flags' - else - _LT_TAGVAR(archive_cmds, $1)='$LD -b +h $soname +b $install_libdir -o $lib $libobjs $deplibs $linker_flags' - fi - if test "$with_gnu_ld" = no; then - _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='${wl}+b ${wl}$libdir' - _LT_TAGVAR(hardcode_libdir_flag_spec_ld, $1)='+b $libdir' - _LT_TAGVAR(hardcode_libdir_separator, $1)=: - _LT_TAGVAR(hardcode_direct, $1)=yes - _LT_TAGVAR(hardcode_direct_absolute, $1)=yes - _LT_TAGVAR(export_dynamic_flag_spec, $1)='${wl}-E' - # hardcode_minus_L: Not really in the search PATH, - # but as the default location of the library. - _LT_TAGVAR(hardcode_minus_L, $1)=yes - fi - ;; - - hpux11*) - if test "$GCC" = yes -a "$with_gnu_ld" = no; then - case $host_cpu in - hppa*64*) - _LT_TAGVAR(archive_cmds, $1)='$CC -shared ${wl}+h ${wl}$soname -o $lib $libobjs $deplibs $compiler_flags' - ;; - ia64*) - _LT_TAGVAR(archive_cmds, $1)='$CC -shared -fPIC ${wl}+h ${wl}$soname ${wl}+nodefaultrpath -o $lib $libobjs $deplibs $compiler_flags' - ;; - *) - _LT_TAGVAR(archive_cmds, $1)='$CC -shared -fPIC ${wl}+h ${wl}$soname ${wl}+b ${wl}$install_libdir -o $lib $libobjs $deplibs $compiler_flags' - ;; - esac - else - case $host_cpu in - hppa*64*) - _LT_TAGVAR(archive_cmds, $1)='$CC -b ${wl}+h ${wl}$soname -o $lib $libobjs $deplibs $compiler_flags' - ;; - ia64*) - _LT_TAGVAR(archive_cmds, $1)='$CC -b ${wl}+h ${wl}$soname ${wl}+nodefaultrpath -o $lib $libobjs $deplibs $compiler_flags' - ;; - *) - _LT_TAGVAR(archive_cmds, $1)='$CC -b ${wl}+h ${wl}$soname ${wl}+b ${wl}$install_libdir -o $lib $libobjs $deplibs $compiler_flags' - ;; - esac - fi - if test "$with_gnu_ld" = no; then - _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='${wl}+b ${wl}$libdir' - _LT_TAGVAR(hardcode_libdir_separator, $1)=: - - case $host_cpu in - hppa*64*|ia64*) - _LT_TAGVAR(hardcode_direct, $1)=no - _LT_TAGVAR(hardcode_shlibpath_var, $1)=no - ;; - *) - _LT_TAGVAR(hardcode_direct, $1)=yes - _LT_TAGVAR(hardcode_direct_absolute, $1)=yes - _LT_TAGVAR(export_dynamic_flag_spec, $1)='${wl}-E' - - # hardcode_minus_L: Not really in the search PATH, - # but as the default location of the library. - _LT_TAGVAR(hardcode_minus_L, $1)=yes - ;; - esac - fi - ;; - - irix5* | irix6* | nonstopux*) - if test "$GCC" = yes; then - _LT_TAGVAR(archive_cmds, $1)='$CC -shared $libobjs $deplibs $compiler_flags ${wl}-soname ${wl}$soname `test -n "$verstring" && $ECHO "X${wl}-set_version ${wl}$verstring" | $Xsed` ${wl}-update_registry ${wl}${output_objdir}/so_locations -o $lib' - # Try to use the -exported_symbol ld option, if it does not - # work, assume that -exports_file does not work either and - # implicitly export all symbols. - save_LDFLAGS="$LDFLAGS" - LDFLAGS="$LDFLAGS -shared ${wl}-exported_symbol ${wl}foo ${wl}-update_registry ${wl}/dev/null" - AC_LINK_IFELSE(int foo(void) {}, - _LT_TAGVAR(archive_expsym_cmds, $1)='$CC -shared $libobjs $deplibs $compiler_flags ${wl}-soname ${wl}$soname `test -n "$verstring" && $ECHO "X${wl}-set_version ${wl}$verstring" | $Xsed` ${wl}-update_registry ${wl}${output_objdir}/so_locations ${wl}-exports_file ${wl}$export_symbols -o $lib' - ) - LDFLAGS="$save_LDFLAGS" - else - _LT_TAGVAR(archive_cmds, $1)='$CC -shared $libobjs $deplibs $compiler_flags -soname $soname `test -n "$verstring" && $ECHO "X-set_version $verstring" | $Xsed` -update_registry ${output_objdir}/so_locations -o $lib' - _LT_TAGVAR(archive_expsym_cmds, $1)='$CC -shared $libobjs $deplibs $compiler_flags -soname $soname `test -n "$verstring" && $ECHO "X-set_version $verstring" | $Xsed` -update_registry ${output_objdir}/so_locations -exports_file $export_symbols -o $lib' - fi - _LT_TAGVAR(archive_cmds_need_lc, $1)='no' - _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='${wl}-rpath ${wl}$libdir' - _LT_TAGVAR(hardcode_libdir_separator, $1)=: - _LT_TAGVAR(inherit_rpath, $1)=yes - _LT_TAGVAR(link_all_deplibs, $1)=yes - ;; - - netbsd*) - if echo __ELF__ | $CC -E - | $GREP __ELF__ >/dev/null; then - _LT_TAGVAR(archive_cmds, $1)='$LD -Bshareable -o $lib $libobjs $deplibs $linker_flags' # a.out - else - _LT_TAGVAR(archive_cmds, $1)='$LD -shared -o $lib $libobjs $deplibs $linker_flags' # ELF - fi - _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='-R$libdir' - _LT_TAGVAR(hardcode_direct, $1)=yes - _LT_TAGVAR(hardcode_shlibpath_var, $1)=no - ;; - - newsos6) - _LT_TAGVAR(archive_cmds, $1)='$LD -G -h $soname -o $lib $libobjs $deplibs $linker_flags' - _LT_TAGVAR(hardcode_direct, $1)=yes - _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='${wl}-rpath ${wl}$libdir' - _LT_TAGVAR(hardcode_libdir_separator, $1)=: - _LT_TAGVAR(hardcode_shlibpath_var, $1)=no - ;; - - *nto* | *qnx*) - ;; - - openbsd*) - if test -f /usr/libexec/ld.so; then - _LT_TAGVAR(hardcode_direct, $1)=yes - _LT_TAGVAR(hardcode_shlibpath_var, $1)=no - _LT_TAGVAR(hardcode_direct_absolute, $1)=yes - if test -z "`echo __ELF__ | $CC -E - | $GREP __ELF__`" || test "$host_os-$host_cpu" = "openbsd2.8-powerpc"; then - _LT_TAGVAR(archive_cmds, $1)='$CC -shared $pic_flag -o $lib $libobjs $deplibs $compiler_flags' - _LT_TAGVAR(archive_expsym_cmds, $1)='$CC -shared $pic_flag -o $lib $libobjs $deplibs $compiler_flags ${wl}-retain-symbols-file,$export_symbols' - _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='${wl}-rpath,$libdir' - _LT_TAGVAR(export_dynamic_flag_spec, $1)='${wl}-E' - else - case $host_os in - openbsd[[01]].* | openbsd2.[[0-7]] | openbsd2.[[0-7]].*) - _LT_TAGVAR(archive_cmds, $1)='$LD -Bshareable -o $lib $libobjs $deplibs $linker_flags' - _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='-R$libdir' - ;; - *) - _LT_TAGVAR(archive_cmds, $1)='$CC -shared $pic_flag -o $lib $libobjs $deplibs $compiler_flags' - _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='${wl}-rpath,$libdir' - ;; - esac - fi - else - _LT_TAGVAR(ld_shlibs, $1)=no - fi - ;; - - os2*) - _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='-L$libdir' - _LT_TAGVAR(hardcode_minus_L, $1)=yes - _LT_TAGVAR(allow_undefined_flag, $1)=unsupported - _LT_TAGVAR(archive_cmds, $1)='$ECHO "LIBRARY $libname INITINSTANCE" > $output_objdir/$libname.def~$ECHO "DESCRIPTION \"$libname\"" >> $output_objdir/$libname.def~$ECHO DATA >> $output_objdir/$libname.def~$ECHO " SINGLE NONSHARED" >> $output_objdir/$libname.def~$ECHO EXPORTS >> $output_objdir/$libname.def~emxexp $libobjs >> $output_objdir/$libname.def~$CC -Zdll -Zcrtdll -o $lib $libobjs $deplibs $compiler_flags $output_objdir/$libname.def' - _LT_TAGVAR(old_archive_from_new_cmds, $1)='emximp -o $output_objdir/$libname.a $output_objdir/$libname.def' - ;; - - osf3*) - if test "$GCC" = yes; then - _LT_TAGVAR(allow_undefined_flag, $1)=' ${wl}-expect_unresolved ${wl}\*' - _LT_TAGVAR(archive_cmds, $1)='$CC -shared${allow_undefined_flag} $libobjs $deplibs $compiler_flags ${wl}-soname ${wl}$soname `test -n "$verstring" && $ECHO "X${wl}-set_version ${wl}$verstring" | $Xsed` ${wl}-update_registry ${wl}${output_objdir}/so_locations -o $lib' - else - _LT_TAGVAR(allow_undefined_flag, $1)=' -expect_unresolved \*' - _LT_TAGVAR(archive_cmds, $1)='$CC -shared${allow_undefined_flag} $libobjs $deplibs $compiler_flags -soname $soname `test -n "$verstring" && $ECHO "X-set_version $verstring" | $Xsed` -update_registry ${output_objdir}/so_locations -o $lib' - fi - _LT_TAGVAR(archive_cmds_need_lc, $1)='no' - _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='${wl}-rpath ${wl}$libdir' - _LT_TAGVAR(hardcode_libdir_separator, $1)=: - ;; - - osf4* | osf5*) # as osf3* with the addition of -msym flag - if test "$GCC" = yes; then - _LT_TAGVAR(allow_undefined_flag, $1)=' ${wl}-expect_unresolved ${wl}\*' - _LT_TAGVAR(archive_cmds, $1)='$CC -shared${allow_undefined_flag} $libobjs $deplibs $compiler_flags ${wl}-msym ${wl}-soname ${wl}$soname `test -n "$verstring" && $ECHO "X${wl}-set_version ${wl}$verstring" | $Xsed` ${wl}-update_registry ${wl}${output_objdir}/so_locations -o $lib' - _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='${wl}-rpath ${wl}$libdir' - else - _LT_TAGVAR(allow_undefined_flag, $1)=' -expect_unresolved \*' - _LT_TAGVAR(archive_cmds, $1)='$CC -shared${allow_undefined_flag} $libobjs $deplibs $compiler_flags -msym -soname $soname `test -n "$verstring" && $ECHO "X-set_version $verstring" | $Xsed` -update_registry ${output_objdir}/so_locations -o $lib' - _LT_TAGVAR(archive_expsym_cmds, $1)='for i in `cat $export_symbols`; do printf "%s %s\\n" -exported_symbol "\$i" >> $lib.exp; done; printf "%s\\n" "-hidden">> $lib.exp~ - $CC -shared${allow_undefined_flag} ${wl}-input ${wl}$lib.exp $compiler_flags $libobjs $deplibs -soname $soname `test -n "$verstring" && $ECHO "X-set_version $verstring" | $Xsed` -update_registry ${output_objdir}/so_locations -o $lib~$RM $lib.exp' - - # Both c and cxx compiler support -rpath directly - _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='-rpath $libdir' - fi - _LT_TAGVAR(archive_cmds_need_lc, $1)='no' - _LT_TAGVAR(hardcode_libdir_separator, $1)=: - ;; - - solaris*) - _LT_TAGVAR(no_undefined_flag, $1)=' -z defs' - if test "$GCC" = yes; then - wlarc='${wl}' - _LT_TAGVAR(archive_cmds, $1)='$CC -shared ${wl}-z ${wl}text ${wl}-h ${wl}$soname -o $lib $libobjs $deplibs $compiler_flags' - _LT_TAGVAR(archive_expsym_cmds, $1)='echo "{ global:" > $lib.exp~cat $export_symbols | $SED -e "s/\(.*\)/\1;/" >> $lib.exp~echo "local: *; };" >> $lib.exp~ - $CC -shared ${wl}-z ${wl}text ${wl}-M ${wl}$lib.exp ${wl}-h ${wl}$soname -o $lib $libobjs $deplibs $compiler_flags~$RM $lib.exp' - else - case `$CC -V 2>&1` in - *"Compilers 5.0"*) - wlarc='' - _LT_TAGVAR(archive_cmds, $1)='$LD -G${allow_undefined_flag} -h $soname -o $lib $libobjs $deplibs $linker_flags' - _LT_TAGVAR(archive_expsym_cmds, $1)='echo "{ global:" > $lib.exp~cat $export_symbols | $SED -e "s/\(.*\)/\1;/" >> $lib.exp~echo "local: *; };" >> $lib.exp~ - $LD -G${allow_undefined_flag} -M $lib.exp -h $soname -o $lib $libobjs $deplibs $linker_flags~$RM $lib.exp' - ;; - *) - wlarc='${wl}' - _LT_TAGVAR(archive_cmds, $1)='$CC -G${allow_undefined_flag} -h $soname -o $lib $libobjs $deplibs $compiler_flags' - _LT_TAGVAR(archive_expsym_cmds, $1)='echo "{ global:" > $lib.exp~cat $export_symbols | $SED -e "s/\(.*\)/\1;/" >> $lib.exp~echo "local: *; };" >> $lib.exp~ - $CC -G${allow_undefined_flag} -M $lib.exp -h $soname -o $lib $libobjs $deplibs $compiler_flags~$RM $lib.exp' - ;; - esac - fi - _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='-R$libdir' - _LT_TAGVAR(hardcode_shlibpath_var, $1)=no - case $host_os in - solaris2.[[0-5]] | solaris2.[[0-5]].*) ;; - *) - # The compiler driver will combine and reorder linker options, - # but understands `-z linker_flag'. GCC discards it without `$wl', - # but is careful enough not to reorder. - # Supported since Solaris 2.6 (maybe 2.5.1?) - if test "$GCC" = yes; then - _LT_TAGVAR(whole_archive_flag_spec, $1)='${wl}-z ${wl}allextract$convenience ${wl}-z ${wl}defaultextract' - else - _LT_TAGVAR(whole_archive_flag_spec, $1)='-z allextract$convenience -z defaultextract' - fi - ;; - esac - _LT_TAGVAR(link_all_deplibs, $1)=yes - ;; - - sunos4*) - if test "x$host_vendor" = xsequent; then - # Use $CC to link under sequent, because it throws in some extra .o - # files that make .init and .fini sections work. - _LT_TAGVAR(archive_cmds, $1)='$CC -G ${wl}-h $soname -o $lib $libobjs $deplibs $compiler_flags' - else - _LT_TAGVAR(archive_cmds, $1)='$LD -assert pure-text -Bstatic -o $lib $libobjs $deplibs $linker_flags' - fi - _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='-L$libdir' - _LT_TAGVAR(hardcode_direct, $1)=yes - _LT_TAGVAR(hardcode_minus_L, $1)=yes - _LT_TAGVAR(hardcode_shlibpath_var, $1)=no - ;; - - sysv4) - case $host_vendor in - sni) - _LT_TAGVAR(archive_cmds, $1)='$LD -G -h $soname -o $lib $libobjs $deplibs $linker_flags' - _LT_TAGVAR(hardcode_direct, $1)=yes # is this really true??? - ;; - siemens) - ## LD is ld it makes a PLAMLIB - ## CC just makes a GrossModule. - _LT_TAGVAR(archive_cmds, $1)='$LD -G -o $lib $libobjs $deplibs $linker_flags' - _LT_TAGVAR(reload_cmds, $1)='$CC -r -o $output$reload_objs' - _LT_TAGVAR(hardcode_direct, $1)=no - ;; - motorola) - _LT_TAGVAR(archive_cmds, $1)='$LD -G -h $soname -o $lib $libobjs $deplibs $linker_flags' - _LT_TAGVAR(hardcode_direct, $1)=no #Motorola manual says yes, but my tests say they lie - ;; - esac - runpath_var='LD_RUN_PATH' - _LT_TAGVAR(hardcode_shlibpath_var, $1)=no - ;; - - sysv4.3*) - _LT_TAGVAR(archive_cmds, $1)='$LD -G -h $soname -o $lib $libobjs $deplibs $linker_flags' - _LT_TAGVAR(hardcode_shlibpath_var, $1)=no - _LT_TAGVAR(export_dynamic_flag_spec, $1)='-Bexport' - ;; - - sysv4*MP*) - if test -d /usr/nec; then - _LT_TAGVAR(archive_cmds, $1)='$LD -G -h $soname -o $lib $libobjs $deplibs $linker_flags' - _LT_TAGVAR(hardcode_shlibpath_var, $1)=no - runpath_var=LD_RUN_PATH - hardcode_runpath_var=yes - _LT_TAGVAR(ld_shlibs, $1)=yes - fi - ;; - - sysv4*uw2* | sysv5OpenUNIX* | sysv5UnixWare7.[[01]].[[10]]* | unixware7* | sco3.2v5.0.[[024]]*) - _LT_TAGVAR(no_undefined_flag, $1)='${wl}-z,text' - _LT_TAGVAR(archive_cmds_need_lc, $1)=no - _LT_TAGVAR(hardcode_shlibpath_var, $1)=no - runpath_var='LD_RUN_PATH' - - if test "$GCC" = yes; then - _LT_TAGVAR(archive_cmds, $1)='$CC -shared ${wl}-h,$soname -o $lib $libobjs $deplibs $compiler_flags' - _LT_TAGVAR(archive_expsym_cmds, $1)='$CC -shared ${wl}-Bexport:$export_symbols ${wl}-h,$soname -o $lib $libobjs $deplibs $compiler_flags' - else - _LT_TAGVAR(archive_cmds, $1)='$CC -G ${wl}-h,$soname -o $lib $libobjs $deplibs $compiler_flags' - _LT_TAGVAR(archive_expsym_cmds, $1)='$CC -G ${wl}-Bexport:$export_symbols ${wl}-h,$soname -o $lib $libobjs $deplibs $compiler_flags' - fi - ;; - - sysv5* | sco3.2v5* | sco5v6*) - # Note: We can NOT use -z defs as we might desire, because we do not - # link with -lc, and that would cause any symbols used from libc to - # always be unresolved, which means just about no library would - # ever link correctly. If we're not using GNU ld we use -z text - # though, which does catch some bad symbols but isn't as heavy-handed - # as -z defs. - _LT_TAGVAR(no_undefined_flag, $1)='${wl}-z,text' - _LT_TAGVAR(allow_undefined_flag, $1)='${wl}-z,nodefs' - _LT_TAGVAR(archive_cmds_need_lc, $1)=no - _LT_TAGVAR(hardcode_shlibpath_var, $1)=no - _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='${wl}-R,$libdir' - _LT_TAGVAR(hardcode_libdir_separator, $1)=':' - _LT_TAGVAR(link_all_deplibs, $1)=yes - _LT_TAGVAR(export_dynamic_flag_spec, $1)='${wl}-Bexport' - runpath_var='LD_RUN_PATH' - - if test "$GCC" = yes; then - _LT_TAGVAR(archive_cmds, $1)='$CC -shared ${wl}-h,$soname -o $lib $libobjs $deplibs $compiler_flags' - _LT_TAGVAR(archive_expsym_cmds, $1)='$CC -shared ${wl}-Bexport:$export_symbols ${wl}-h,$soname -o $lib $libobjs $deplibs $compiler_flags' - else - _LT_TAGVAR(archive_cmds, $1)='$CC -G ${wl}-h,$soname -o $lib $libobjs $deplibs $compiler_flags' - _LT_TAGVAR(archive_expsym_cmds, $1)='$CC -G ${wl}-Bexport:$export_symbols ${wl}-h,$soname -o $lib $libobjs $deplibs $compiler_flags' - fi - ;; - - uts4*) - _LT_TAGVAR(archive_cmds, $1)='$LD -G -h $soname -o $lib $libobjs $deplibs $linker_flags' - _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='-L$libdir' - _LT_TAGVAR(hardcode_shlibpath_var, $1)=no - ;; - - *) - _LT_TAGVAR(ld_shlibs, $1)=no - ;; - esac - - if test x$host_vendor = xsni; then - case $host in - sysv4 | sysv4.2uw2* | sysv4.3* | sysv5*) - _LT_TAGVAR(export_dynamic_flag_spec, $1)='${wl}-Blargedynsym' - ;; - esac - fi - fi -]) -AC_MSG_RESULT([$_LT_TAGVAR(ld_shlibs, $1)]) -test "$_LT_TAGVAR(ld_shlibs, $1)" = no && can_build_shared=no - -_LT_TAGVAR(with_gnu_ld, $1)=$with_gnu_ld - -_LT_DECL([], [libext], [0], [Old archive suffix (normally "a")])dnl -_LT_DECL([], [shrext_cmds], [1], [Shared library suffix (normally ".so")])dnl -_LT_DECL([], [extract_expsyms_cmds], [2], - [The commands to extract the exported symbol list from a shared archive]) - -# -# Do we need to explicitly link libc? -# -case "x$_LT_TAGVAR(archive_cmds_need_lc, $1)" in -x|xyes) - # Assume -lc should be added - _LT_TAGVAR(archive_cmds_need_lc, $1)=yes - - if test "$enable_shared" = yes && test "$GCC" = yes; then - case $_LT_TAGVAR(archive_cmds, $1) in - *'~'*) - # FIXME: we may have to deal with multi-command sequences. - ;; - '$CC '*) - # Test whether the compiler implicitly links with -lc since on some - # systems, -lgcc has to come before -lc. If gcc already passes -lc - # to ld, don't add -lc before -lgcc. - AC_MSG_CHECKING([whether -lc should be explicitly linked in]) - $RM conftest* - echo "$lt_simple_compile_test_code" > conftest.$ac_ext - - if AC_TRY_EVAL(ac_compile) 2>conftest.err; then - soname=conftest - lib=conftest - libobjs=conftest.$ac_objext - deplibs= - wl=$_LT_TAGVAR(lt_prog_compiler_wl, $1) - pic_flag=$_LT_TAGVAR(lt_prog_compiler_pic, $1) - compiler_flags=-v - linker_flags=-v - verstring= - output_objdir=. - libname=conftest - lt_save_allow_undefined_flag=$_LT_TAGVAR(allow_undefined_flag, $1) - _LT_TAGVAR(allow_undefined_flag, $1)= - if AC_TRY_EVAL(_LT_TAGVAR(archive_cmds, $1) 2\>\&1 \| $GREP \" -lc \" \>/dev/null 2\>\&1) - then - _LT_TAGVAR(archive_cmds_need_lc, $1)=no - else - _LT_TAGVAR(archive_cmds_need_lc, $1)=yes - fi - _LT_TAGVAR(allow_undefined_flag, $1)=$lt_save_allow_undefined_flag - else - cat conftest.err 1>&5 - fi - $RM conftest* - AC_MSG_RESULT([$_LT_TAGVAR(archive_cmds_need_lc, $1)]) - ;; - esac - fi - ;; -esac - -_LT_TAGDECL([build_libtool_need_lc], [archive_cmds_need_lc], [0], - [Whether or not to add -lc for building shared libraries]) -_LT_TAGDECL([allow_libtool_libs_with_static_runtimes], - [enable_shared_with_static_runtimes], [0], - [Whether or not to disallow shared libs when runtime libs are static]) -_LT_TAGDECL([], [export_dynamic_flag_spec], [1], - [Compiler flag to allow reflexive dlopens]) -_LT_TAGDECL([], [whole_archive_flag_spec], [1], - [Compiler flag to generate shared objects directly from archives]) -_LT_TAGDECL([], [compiler_needs_object], [1], - [Whether the compiler copes with passing no objects directly]) -_LT_TAGDECL([], [old_archive_from_new_cmds], [2], - [Create an old-style archive from a shared archive]) -_LT_TAGDECL([], [old_archive_from_expsyms_cmds], [2], - [Create a temporary old-style archive to link instead of a shared archive]) -_LT_TAGDECL([], [archive_cmds], [2], [Commands used to build a shared archive]) -_LT_TAGDECL([], [archive_expsym_cmds], [2]) -_LT_TAGDECL([], [module_cmds], [2], - [Commands used to build a loadable module if different from building - a shared archive.]) -_LT_TAGDECL([], [module_expsym_cmds], [2]) -_LT_TAGDECL([], [with_gnu_ld], [1], - [Whether we are building with GNU ld or not]) -_LT_TAGDECL([], [allow_undefined_flag], [1], - [Flag that allows shared libraries with undefined symbols to be built]) -_LT_TAGDECL([], [no_undefined_flag], [1], - [Flag that enforces no undefined symbols]) -_LT_TAGDECL([], [hardcode_libdir_flag_spec], [1], - [Flag to hardcode $libdir into a binary during linking. - This must work even if $libdir does not exist]) -_LT_TAGDECL([], [hardcode_libdir_flag_spec_ld], [1], - [[If ld is used when linking, flag to hardcode $libdir into a binary - during linking. This must work even if $libdir does not exist]]) -_LT_TAGDECL([], [hardcode_libdir_separator], [1], - [Whether we need a single "-rpath" flag with a separated argument]) -_LT_TAGDECL([], [hardcode_direct], [0], - [Set to "yes" if using DIR/libNAME${shared_ext} during linking hardcodes - DIR into the resulting binary]) -_LT_TAGDECL([], [hardcode_direct_absolute], [0], - [Set to "yes" if using DIR/libNAME${shared_ext} during linking hardcodes - DIR into the resulting binary and the resulting library dependency is - "absolute", i.e impossible to change by setting ${shlibpath_var} if the - library is relocated]) -_LT_TAGDECL([], [hardcode_minus_L], [0], - [Set to "yes" if using the -LDIR flag during linking hardcodes DIR - into the resulting binary]) -_LT_TAGDECL([], [hardcode_shlibpath_var], [0], - [Set to "yes" if using SHLIBPATH_VAR=DIR during linking hardcodes DIR - into the resulting binary]) -_LT_TAGDECL([], [hardcode_automatic], [0], - [Set to "yes" if building a shared library automatically hardcodes DIR - into the library and all subsequent libraries and executables linked - against it]) -_LT_TAGDECL([], [inherit_rpath], [0], - [Set to yes if linker adds runtime paths of dependent libraries - to runtime path list]) -_LT_TAGDECL([], [link_all_deplibs], [0], - [Whether libtool must link a program against all its dependency libraries]) -_LT_TAGDECL([], [fix_srcfile_path], [1], - [Fix the shell variable $srcfile for the compiler]) -_LT_TAGDECL([], [always_export_symbols], [0], - [Set to "yes" if exported symbols are required]) -_LT_TAGDECL([], [export_symbols_cmds], [2], - [The commands to list exported symbols]) -_LT_TAGDECL([], [exclude_expsyms], [1], - [Symbols that should not be listed in the preloaded symbols]) -_LT_TAGDECL([], [include_expsyms], [1], - [Symbols that must always be exported]) -_LT_TAGDECL([], [prelink_cmds], [2], - [Commands necessary for linking programs (against libraries) with templates]) -_LT_TAGDECL([], [file_list_spec], [1], - [Specify filename containing input files]) -dnl FIXME: Not yet implemented -dnl _LT_TAGDECL([], [thread_safe_flag_spec], [1], -dnl [Compiler flag to generate thread safe objects]) -])# _LT_LINKER_SHLIBS - - -# _LT_LANG_C_CONFIG([TAG]) -# ------------------------ -# Ensure that the configuration variables for a C compiler are suitably -# defined. These variables are subsequently used by _LT_CONFIG to write -# the compiler configuration to `libtool'. -m4_defun([_LT_LANG_C_CONFIG], -[m4_require([_LT_DECL_EGREP])dnl -lt_save_CC="$CC" -AC_LANG_PUSH(C) - -# Source file extension for C test sources. -ac_ext=c - -# Object file extension for compiled C test sources. -objext=o -_LT_TAGVAR(objext, $1)=$objext - -# Code to be used in simple compile tests -lt_simple_compile_test_code="int some_variable = 0;" - -# Code to be used in simple link tests -lt_simple_link_test_code='int main(){return(0);}' - -_LT_TAG_COMPILER -# Save the default compiler, since it gets overwritten when the other -# tags are being tested, and _LT_TAGVAR(compiler, []) is a NOP. -compiler_DEFAULT=$CC - -# save warnings/boilerplate of simple test code -_LT_COMPILER_BOILERPLATE -_LT_LINKER_BOILERPLATE - -## CAVEAT EMPTOR: -## There is no encapsulation within the following macros, do not change -## the running order or otherwise move them around unless you know exactly -## what you are doing... -if test -n "$compiler"; then - _LT_COMPILER_NO_RTTI($1) - _LT_COMPILER_PIC($1) - _LT_COMPILER_C_O($1) - _LT_COMPILER_FILE_LOCKS($1) - _LT_LINKER_SHLIBS($1) - _LT_SYS_DYNAMIC_LINKER($1) - _LT_LINKER_HARDCODE_LIBPATH($1) - LT_SYS_DLOPEN_SELF - _LT_CMD_STRIPLIB - - # Report which library types will actually be built - AC_MSG_CHECKING([if libtool supports shared libraries]) - AC_MSG_RESULT([$can_build_shared]) - - AC_MSG_CHECKING([whether to build shared libraries]) - test "$can_build_shared" = "no" && enable_shared=no - - # On AIX, shared libraries and static libraries use the same namespace, and - # are all built from PIC. - case $host_os in - aix3*) - test "$enable_shared" = yes && enable_static=no - if test -n "$RANLIB"; then - archive_cmds="$archive_cmds~\$RANLIB \$lib" - postinstall_cmds='$RANLIB $lib' - fi - ;; - - aix[[4-9]]*) - if test "$host_cpu" != ia64 && test "$aix_use_runtimelinking" = no ; then - test "$enable_shared" = yes && enable_static=no - fi - ;; - esac - AC_MSG_RESULT([$enable_shared]) - - AC_MSG_CHECKING([whether to build static libraries]) - # Make sure either enable_shared or enable_static is yes. - test "$enable_shared" = yes || enable_static=yes - AC_MSG_RESULT([$enable_static]) - - _LT_CONFIG($1) -fi -AC_LANG_POP -CC="$lt_save_CC" -])# _LT_LANG_C_CONFIG - - -# _LT_PROG_CXX -# ------------ -# Since AC_PROG_CXX is broken, in that it returns g++ if there is no c++ -# compiler, we have our own version here. -m4_defun([_LT_PROG_CXX], -[ -pushdef([AC_MSG_ERROR], [_lt_caught_CXX_error=yes]) -AC_PROG_CXX -if test -n "$CXX" && ( test "X$CXX" != "Xno" && - ( (test "X$CXX" = "Xg++" && `g++ -v >/dev/null 2>&1` ) || - (test "X$CXX" != "Xg++"))) ; then - AC_PROG_CXXCPP -else - _lt_caught_CXX_error=yes -fi -popdef([AC_MSG_ERROR]) -])# _LT_PROG_CXX - -dnl aclocal-1.4 backwards compatibility: -dnl AC_DEFUN([_LT_PROG_CXX], []) - - -# _LT_LANG_CXX_CONFIG([TAG]) -# -------------------------- -# Ensure that the configuration variables for a C++ compiler are suitably -# defined. These variables are subsequently used by _LT_CONFIG to write -# the compiler configuration to `libtool'. -m4_defun([_LT_LANG_CXX_CONFIG], -[AC_REQUIRE([_LT_PROG_CXX])dnl -m4_require([_LT_FILEUTILS_DEFAULTS])dnl -m4_require([_LT_DECL_EGREP])dnl - -AC_LANG_PUSH(C++) -_LT_TAGVAR(archive_cmds_need_lc, $1)=no -_LT_TAGVAR(allow_undefined_flag, $1)= -_LT_TAGVAR(always_export_symbols, $1)=no -_LT_TAGVAR(archive_expsym_cmds, $1)= -_LT_TAGVAR(compiler_needs_object, $1)=no -_LT_TAGVAR(export_dynamic_flag_spec, $1)= -_LT_TAGVAR(hardcode_direct, $1)=no -_LT_TAGVAR(hardcode_direct_absolute, $1)=no -_LT_TAGVAR(hardcode_libdir_flag_spec, $1)= -_LT_TAGVAR(hardcode_libdir_flag_spec_ld, $1)= -_LT_TAGVAR(hardcode_libdir_separator, $1)= -_LT_TAGVAR(hardcode_minus_L, $1)=no -_LT_TAGVAR(hardcode_shlibpath_var, $1)=unsupported -_LT_TAGVAR(hardcode_automatic, $1)=no -_LT_TAGVAR(inherit_rpath, $1)=no -_LT_TAGVAR(module_cmds, $1)= -_LT_TAGVAR(module_expsym_cmds, $1)= -_LT_TAGVAR(link_all_deplibs, $1)=unknown -_LT_TAGVAR(old_archive_cmds, $1)=$old_archive_cmds -_LT_TAGVAR(no_undefined_flag, $1)= -_LT_TAGVAR(whole_archive_flag_spec, $1)= -_LT_TAGVAR(enable_shared_with_static_runtimes, $1)=no - -# Source file extension for C++ test sources. -ac_ext=cpp - -# Object file extension for compiled C++ test sources. -objext=o -_LT_TAGVAR(objext, $1)=$objext - -# No sense in running all these tests if we already determined that -# the CXX compiler isn't working. Some variables (like enable_shared) -# are currently assumed to apply to all compilers on this platform, -# and will be corrupted by setting them based on a non-working compiler. -if test "$_lt_caught_CXX_error" != yes; then - # Code to be used in simple compile tests - lt_simple_compile_test_code="int some_variable = 0;" - - # Code to be used in simple link tests - lt_simple_link_test_code='int main(int, char *[[]]) { return(0); }' - - # ltmain only uses $CC for tagged configurations so make sure $CC is set. - _LT_TAG_COMPILER - - # save warnings/boilerplate of simple test code - _LT_COMPILER_BOILERPLATE - _LT_LINKER_BOILERPLATE - - # Allow CC to be a program name with arguments. - lt_save_CC=$CC - lt_save_LD=$LD - lt_save_GCC=$GCC - GCC=$GXX - lt_save_with_gnu_ld=$with_gnu_ld - lt_save_path_LD=$lt_cv_path_LD - if test -n "${lt_cv_prog_gnu_ldcxx+set}"; then - lt_cv_prog_gnu_ld=$lt_cv_prog_gnu_ldcxx - else - $as_unset lt_cv_prog_gnu_ld - fi - if test -n "${lt_cv_path_LDCXX+set}"; then - lt_cv_path_LD=$lt_cv_path_LDCXX - else - $as_unset lt_cv_path_LD - fi - test -z "${LDCXX+set}" || LD=$LDCXX - CC=${CXX-"c++"} - compiler=$CC - _LT_TAGVAR(compiler, $1)=$CC - _LT_CC_BASENAME([$compiler]) - - if test -n "$compiler"; then - # We don't want -fno-exception when compiling C++ code, so set the - # no_builtin_flag separately - if test "$GXX" = yes; then - _LT_TAGVAR(lt_prog_compiler_no_builtin_flag, $1)=' -fno-builtin' - else - _LT_TAGVAR(lt_prog_compiler_no_builtin_flag, $1)= - fi - - if test "$GXX" = yes; then - # Set up default GNU C++ configuration - - LT_PATH_LD - - # Check if GNU C++ uses GNU ld as the underlying linker, since the - # archiving commands below assume that GNU ld is being used. - if test "$with_gnu_ld" = yes; then - _LT_TAGVAR(archive_cmds, $1)='$CC -shared -nostdlib $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags ${wl}-soname $wl$soname -o $lib' - _LT_TAGVAR(archive_expsym_cmds, $1)='$CC -shared -nostdlib $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags ${wl}-soname $wl$soname ${wl}-retain-symbols-file $wl$export_symbols -o $lib' - - _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='${wl}-rpath ${wl}$libdir' - _LT_TAGVAR(export_dynamic_flag_spec, $1)='${wl}--export-dynamic' - - # If archive_cmds runs LD, not CC, wlarc should be empty - # XXX I think wlarc can be eliminated in ltcf-cxx, but I need to - # investigate it a little bit more. (MM) - wlarc='${wl}' - - # ancient GNU ld didn't support --whole-archive et. al. - if eval "`$CC -print-prog-name=ld` --help 2>&1" | - $GREP 'no-whole-archive' > /dev/null; then - _LT_TAGVAR(whole_archive_flag_spec, $1)="$wlarc"'--whole-archive$convenience '"$wlarc"'--no-whole-archive' - else - _LT_TAGVAR(whole_archive_flag_spec, $1)= - fi - else - with_gnu_ld=no - wlarc= - - # A generic and very simple default shared library creation - # command for GNU C++ for the case where it uses the native - # linker, instead of GNU ld. If possible, this setting should - # overridden to take advantage of the native linker features on - # the platform it is being used on. - _LT_TAGVAR(archive_cmds, $1)='$CC -shared -nostdlib $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags -o $lib' - fi - - # Commands to make compiler produce verbose output that lists - # what "hidden" libraries, object files and flags are used when - # linking a shared library. - output_verbose_link_cmd='$CC -shared $CFLAGS -v conftest.$objext 2>&1 | $GREP "\-L"' - - else - GXX=no - with_gnu_ld=no - wlarc= - fi - - # PORTME: fill in a description of your system's C++ link characteristics - AC_MSG_CHECKING([whether the $compiler linker ($LD) supports shared libraries]) - _LT_TAGVAR(ld_shlibs, $1)=yes - case $host_os in - aix3*) - # FIXME: insert proper C++ library support - _LT_TAGVAR(ld_shlibs, $1)=no - ;; - aix[[4-9]]*) - if test "$host_cpu" = ia64; then - # On IA64, the linker does run time linking by default, so we don't - # have to do anything special. - aix_use_runtimelinking=no - exp_sym_flag='-Bexport' - no_entry_flag="" - else - aix_use_runtimelinking=no - - # Test if we are trying to use run time linking or normal - # AIX style linking. If -brtl is somewhere in LDFLAGS, we - # need to do runtime linking. - case $host_os in aix4.[[23]]|aix4.[[23]].*|aix[[5-9]]*) - for ld_flag in $LDFLAGS; do - case $ld_flag in - *-brtl*) - aix_use_runtimelinking=yes - break - ;; - esac - done - ;; - esac - - exp_sym_flag='-bexport' - no_entry_flag='-bnoentry' - fi - - # When large executables or shared objects are built, AIX ld can - # have problems creating the table of contents. If linking a library - # or program results in "error TOC overflow" add -mminimal-toc to - # CXXFLAGS/CFLAGS for g++/gcc. In the cases where that is not - # enough to fix the problem, add -Wl,-bbigtoc to LDFLAGS. - - _LT_TAGVAR(archive_cmds, $1)='' - _LT_TAGVAR(hardcode_direct, $1)=yes - _LT_TAGVAR(hardcode_direct_absolute, $1)=yes - _LT_TAGVAR(hardcode_libdir_separator, $1)=':' - _LT_TAGVAR(link_all_deplibs, $1)=yes - _LT_TAGVAR(file_list_spec, $1)='${wl}-f,' - - if test "$GXX" = yes; then - case $host_os in aix4.[[012]]|aix4.[[012]].*) - # We only want to do this on AIX 4.2 and lower, the check - # below for broken collect2 doesn't work under 4.3+ - collect2name=`${CC} -print-prog-name=collect2` - if test -f "$collect2name" && - strings "$collect2name" | $GREP resolve_lib_name >/dev/null - then - # We have reworked collect2 - : - else - # We have old collect2 - _LT_TAGVAR(hardcode_direct, $1)=unsupported - # It fails to find uninstalled libraries when the uninstalled - # path is not listed in the libpath. Setting hardcode_minus_L - # to unsupported forces relinking - _LT_TAGVAR(hardcode_minus_L, $1)=yes - _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='-L$libdir' - _LT_TAGVAR(hardcode_libdir_separator, $1)= - fi - esac - shared_flag='-shared' - if test "$aix_use_runtimelinking" = yes; then - shared_flag="$shared_flag "'${wl}-G' - fi - else - # not using gcc - if test "$host_cpu" = ia64; then - # VisualAge C++, Version 5.5 for AIX 5L for IA-64, Beta 3 Release - # chokes on -Wl,-G. The following line is correct: - shared_flag='-G' - else - if test "$aix_use_runtimelinking" = yes; then - shared_flag='${wl}-G' - else - shared_flag='${wl}-bM:SRE' - fi - fi - fi - - _LT_TAGVAR(export_dynamic_flag_spec, $1)='${wl}-bexpall' - # It seems that -bexpall does not export symbols beginning with - # underscore (_), so it is better to generate a list of symbols to - # export. - _LT_TAGVAR(always_export_symbols, $1)=yes - if test "$aix_use_runtimelinking" = yes; then - # Warning - without using the other runtime loading flags (-brtl), - # -berok will link without error, but may produce a broken library. - _LT_TAGVAR(allow_undefined_flag, $1)='-berok' - # Determine the default libpath from the value encoded in an empty - # executable. - _LT_SYS_MODULE_PATH_AIX - _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='${wl}-blibpath:$libdir:'"$aix_libpath" - - _LT_TAGVAR(archive_expsym_cmds, $1)='$CC -o $output_objdir/$soname $libobjs $deplibs '"\${wl}$no_entry_flag"' $compiler_flags `if test "x${allow_undefined_flag}" != "x"; then $ECHO "X${wl}${allow_undefined_flag}" | $Xsed; else :; fi` '"\${wl}$exp_sym_flag:\$export_symbols $shared_flag" - else - if test "$host_cpu" = ia64; then - _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='${wl}-R $libdir:/usr/lib:/lib' - _LT_TAGVAR(allow_undefined_flag, $1)="-z nodefs" - _LT_TAGVAR(archive_expsym_cmds, $1)="\$CC $shared_flag"' -o $output_objdir/$soname $libobjs $deplibs '"\${wl}$no_entry_flag"' $compiler_flags ${wl}${allow_undefined_flag} '"\${wl}$exp_sym_flag:\$export_symbols" - else - # Determine the default libpath from the value encoded in an - # empty executable. - _LT_SYS_MODULE_PATH_AIX - _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='${wl}-blibpath:$libdir:'"$aix_libpath" - # Warning - without using the other run time loading flags, - # -berok will link without error, but may produce a broken library. - _LT_TAGVAR(no_undefined_flag, $1)=' ${wl}-bernotok' - _LT_TAGVAR(allow_undefined_flag, $1)=' ${wl}-berok' - # Exported symbols can be pulled into shared objects from archives - _LT_TAGVAR(whole_archive_flag_spec, $1)='$convenience' - _LT_TAGVAR(archive_cmds_need_lc, $1)=yes - # This is similar to how AIX traditionally builds its shared - # libraries. - _LT_TAGVAR(archive_expsym_cmds, $1)="\$CC $shared_flag"' -o $output_objdir/$soname $libobjs $deplibs ${wl}-bnoentry $compiler_flags ${wl}-bE:$export_symbols${allow_undefined_flag}~$AR $AR_FLAGS $output_objdir/$libname$release.a $output_objdir/$soname' - fi - fi - ;; - - beos*) - if $LD --help 2>&1 | $GREP ': supported targets:.* elf' > /dev/null; then - _LT_TAGVAR(allow_undefined_flag, $1)=unsupported - # Joseph Beckenbach says some releases of gcc - # support --undefined. This deserves some investigation. FIXME - _LT_TAGVAR(archive_cmds, $1)='$CC -nostart $libobjs $deplibs $compiler_flags ${wl}-soname $wl$soname -o $lib' - else - _LT_TAGVAR(ld_shlibs, $1)=no - fi - ;; - - chorus*) - case $cc_basename in - *) - # FIXME: insert proper C++ library support - _LT_TAGVAR(ld_shlibs, $1)=no - ;; - esac - ;; - - cygwin* | mingw* | pw32* | cegcc*) - # _LT_TAGVAR(hardcode_libdir_flag_spec, $1) is actually meaningless, - # as there is no search path for DLLs. - _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='-L$libdir' - _LT_TAGVAR(allow_undefined_flag, $1)=unsupported - _LT_TAGVAR(always_export_symbols, $1)=no - _LT_TAGVAR(enable_shared_with_static_runtimes, $1)=yes - - if $LD --help 2>&1 | $GREP 'auto-import' > /dev/null; then - _LT_TAGVAR(archive_cmds, $1)='$CC -shared -nostdlib $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags -o $output_objdir/$soname ${wl}--enable-auto-image-base -Xlinker --out-implib -Xlinker $lib' - # If the export-symbols file already is a .def file (1st line - # is EXPORTS), use it as is; otherwise, prepend... - _LT_TAGVAR(archive_expsym_cmds, $1)='if test "x`$SED 1q $export_symbols`" = xEXPORTS; then - cp $export_symbols $output_objdir/$soname.def; - else - echo EXPORTS > $output_objdir/$soname.def; - cat $export_symbols >> $output_objdir/$soname.def; - fi~ - $CC -shared -nostdlib $output_objdir/$soname.def $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags -o $output_objdir/$soname ${wl}--enable-auto-image-base -Xlinker --out-implib -Xlinker $lib' - else - _LT_TAGVAR(ld_shlibs, $1)=no - fi - ;; - darwin* | rhapsody*) - _LT_DARWIN_LINKER_FEATURES($1) - ;; - - dgux*) - case $cc_basename in - ec++*) - # FIXME: insert proper C++ library support - _LT_TAGVAR(ld_shlibs, $1)=no - ;; - ghcx*) - # Green Hills C++ Compiler - # FIXME: insert proper C++ library support - _LT_TAGVAR(ld_shlibs, $1)=no - ;; - *) - # FIXME: insert proper C++ library support - _LT_TAGVAR(ld_shlibs, $1)=no - ;; - esac - ;; - - freebsd[[12]]*) - # C++ shared libraries reported to be fairly broken before - # switch to ELF - _LT_TAGVAR(ld_shlibs, $1)=no - ;; - - freebsd-elf*) - _LT_TAGVAR(archive_cmds_need_lc, $1)=no - ;; - - freebsd* | dragonfly*) - # FreeBSD 3 and later use GNU C++ and GNU ld with standard ELF - # conventions - _LT_TAGVAR(ld_shlibs, $1)=yes - ;; - - gnu*) - ;; - - hpux9*) - _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='${wl}+b ${wl}$libdir' - _LT_TAGVAR(hardcode_libdir_separator, $1)=: - _LT_TAGVAR(export_dynamic_flag_spec, $1)='${wl}-E' - _LT_TAGVAR(hardcode_direct, $1)=yes - _LT_TAGVAR(hardcode_minus_L, $1)=yes # Not in the search PATH, - # but as the default - # location of the library. - - case $cc_basename in - CC*) - # FIXME: insert proper C++ library support - _LT_TAGVAR(ld_shlibs, $1)=no - ;; - aCC*) - _LT_TAGVAR(archive_cmds, $1)='$RM $output_objdir/$soname~$CC -b ${wl}+b ${wl}$install_libdir -o $output_objdir/$soname $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags~test $output_objdir/$soname = $lib || mv $output_objdir/$soname $lib' - # Commands to make compiler produce verbose output that lists - # what "hidden" libraries, object files and flags are used when - # linking a shared library. - # - # There doesn't appear to be a way to prevent this compiler from - # explicitly linking system object files so we need to strip them - # from the output so that they don't get included in the library - # dependencies. - output_verbose_link_cmd='templist=`($CC -b $CFLAGS -v conftest.$objext 2>&1) | $EGREP "\-L"`; list=""; for z in $templist; do case $z in conftest.$objext) list="$list $z";; *.$objext);; *) list="$list $z";;esac; done; $ECHO "X$list" | $Xsed' - ;; - *) - if test "$GXX" = yes; then - _LT_TAGVAR(archive_cmds, $1)='$RM $output_objdir/$soname~$CC -shared -nostdlib -fPIC ${wl}+b ${wl}$install_libdir -o $output_objdir/$soname $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags~test $output_objdir/$soname = $lib || mv $output_objdir/$soname $lib' - else - # FIXME: insert proper C++ library support - _LT_TAGVAR(ld_shlibs, $1)=no - fi - ;; - esac - ;; - - hpux10*|hpux11*) - if test $with_gnu_ld = no; then - _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='${wl}+b ${wl}$libdir' - _LT_TAGVAR(hardcode_libdir_separator, $1)=: - - case $host_cpu in - hppa*64*|ia64*) - ;; - *) - _LT_TAGVAR(export_dynamic_flag_spec, $1)='${wl}-E' - ;; - esac - fi - case $host_cpu in - hppa*64*|ia64*) - _LT_TAGVAR(hardcode_direct, $1)=no - _LT_TAGVAR(hardcode_shlibpath_var, $1)=no - ;; - *) - _LT_TAGVAR(hardcode_direct, $1)=yes - _LT_TAGVAR(hardcode_direct_absolute, $1)=yes - _LT_TAGVAR(hardcode_minus_L, $1)=yes # Not in the search PATH, - # but as the default - # location of the library. - ;; - esac - - case $cc_basename in - CC*) - # FIXME: insert proper C++ library support - _LT_TAGVAR(ld_shlibs, $1)=no - ;; - aCC*) - case $host_cpu in - hppa*64*) - _LT_TAGVAR(archive_cmds, $1)='$CC -b ${wl}+h ${wl}$soname -o $lib $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags' - ;; - ia64*) - _LT_TAGVAR(archive_cmds, $1)='$CC -b ${wl}+h ${wl}$soname ${wl}+nodefaultrpath -o $lib $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags' - ;; - *) - _LT_TAGVAR(archive_cmds, $1)='$CC -b ${wl}+h ${wl}$soname ${wl}+b ${wl}$install_libdir -o $lib $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags' - ;; - esac - # Commands to make compiler produce verbose output that lists - # what "hidden" libraries, object files and flags are used when - # linking a shared library. - # - # There doesn't appear to be a way to prevent this compiler from - # explicitly linking system object files so we need to strip them - # from the output so that they don't get included in the library - # dependencies. - output_verbose_link_cmd='templist=`($CC -b $CFLAGS -v conftest.$objext 2>&1) | $GREP "\-L"`; list=""; for z in $templist; do case $z in conftest.$objext) list="$list $z";; *.$objext);; *) list="$list $z";;esac; done; $ECHO "X$list" | $Xsed' - ;; - *) - if test "$GXX" = yes; then - if test $with_gnu_ld = no; then - case $host_cpu in - hppa*64*) - _LT_TAGVAR(archive_cmds, $1)='$CC -shared -nostdlib -fPIC ${wl}+h ${wl}$soname -o $lib $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags' - ;; - ia64*) - _LT_TAGVAR(archive_cmds, $1)='$CC -shared -nostdlib -fPIC ${wl}+h ${wl}$soname ${wl}+nodefaultrpath -o $lib $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags' - ;; - *) - _LT_TAGVAR(archive_cmds, $1)='$CC -shared -nostdlib -fPIC ${wl}+h ${wl}$soname ${wl}+b ${wl}$install_libdir -o $lib $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags' - ;; - esac - fi - else - # FIXME: insert proper C++ library support - _LT_TAGVAR(ld_shlibs, $1)=no - fi - ;; - esac - ;; - - interix[[3-9]]*) - _LT_TAGVAR(hardcode_direct, $1)=no - _LT_TAGVAR(hardcode_shlibpath_var, $1)=no - _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='${wl}-rpath,$libdir' - _LT_TAGVAR(export_dynamic_flag_spec, $1)='${wl}-E' - # Hack: On Interix 3.x, we cannot compile PIC because of a broken gcc. - # Instead, shared libraries are loaded at an image base (0x10000000 by - # default) and relocated if they conflict, which is a slow very memory - # consuming and fragmenting process. To avoid this, we pick a random, - # 256 KiB-aligned image base between 0x50000000 and 0x6FFC0000 at link - # time. Moving up from 0x10000000 also allows more sbrk(2) space. - _LT_TAGVAR(archive_cmds, $1)='$CC -shared $pic_flag $libobjs $deplibs $compiler_flags ${wl}-h,$soname ${wl}--image-base,`expr ${RANDOM-$$} % 4096 / 2 \* 262144 + 1342177280` -o $lib' - _LT_TAGVAR(archive_expsym_cmds, $1)='sed "s,^,_," $export_symbols >$output_objdir/$soname.expsym~$CC -shared $pic_flag $libobjs $deplibs $compiler_flags ${wl}-h,$soname ${wl}--retain-symbols-file,$output_objdir/$soname.expsym ${wl}--image-base,`expr ${RANDOM-$$} % 4096 / 2 \* 262144 + 1342177280` -o $lib' - ;; - irix5* | irix6*) - case $cc_basename in - CC*) - # SGI C++ - _LT_TAGVAR(archive_cmds, $1)='$CC -shared -all -multigot $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags -soname $soname `test -n "$verstring" && $ECHO "X-set_version $verstring" | $Xsed` -update_registry ${output_objdir}/so_locations -o $lib' - - # Archives containing C++ object files must be created using - # "CC -ar", where "CC" is the IRIX C++ compiler. This is - # necessary to make sure instantiated templates are included - # in the archive. - _LT_TAGVAR(old_archive_cmds, $1)='$CC -ar -WR,-u -o $oldlib $oldobjs' - ;; - *) - if test "$GXX" = yes; then - if test "$with_gnu_ld" = no; then - _LT_TAGVAR(archive_cmds, $1)='$CC -shared -nostdlib $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags ${wl}-soname ${wl}$soname `test -n "$verstring" && $ECHO "X${wl}-set_version ${wl}$verstring" | $Xsed` ${wl}-update_registry ${wl}${output_objdir}/so_locations -o $lib' - else - _LT_TAGVAR(archive_cmds, $1)='$CC -shared -nostdlib $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags ${wl}-soname ${wl}$soname `test -n "$verstring" && $ECHO "X${wl}-set_version ${wl}$verstring" | $Xsed` -o $lib' - fi - fi - _LT_TAGVAR(link_all_deplibs, $1)=yes - ;; - esac - _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='${wl}-rpath ${wl}$libdir' - _LT_TAGVAR(hardcode_libdir_separator, $1)=: - _LT_TAGVAR(inherit_rpath, $1)=yes - ;; - - linux* | k*bsd*-gnu) - case $cc_basename in - KCC*) - # Kuck and Associates, Inc. (KAI) C++ Compiler - - # KCC will only create a shared library if the output file - # ends with ".so" (or ".sl" for HP-UX), so rename the library - # to its proper name (with version) after linking. - _LT_TAGVAR(archive_cmds, $1)='tempext=`echo $shared_ext | $SED -e '\''s/\([[^()0-9A-Za-z{}]]\)/\\\\\1/g'\''`; templib=`echo $lib | $SED -e "s/\${tempext}\..*/.so/"`; $CC $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags --soname $soname -o \$templib; mv \$templib $lib' - _LT_TAGVAR(archive_expsym_cmds, $1)='tempext=`echo $shared_ext | $SED -e '\''s/\([[^()0-9A-Za-z{}]]\)/\\\\\1/g'\''`; templib=`echo $lib | $SED -e "s/\${tempext}\..*/.so/"`; $CC $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags --soname $soname -o \$templib ${wl}-retain-symbols-file,$export_symbols; mv \$templib $lib' - # Commands to make compiler produce verbose output that lists - # what "hidden" libraries, object files and flags are used when - # linking a shared library. - # - # There doesn't appear to be a way to prevent this compiler from - # explicitly linking system object files so we need to strip them - # from the output so that they don't get included in the library - # dependencies. - output_verbose_link_cmd='templist=`$CC $CFLAGS -v conftest.$objext -o libconftest$shared_ext 2>&1 | $GREP "ld"`; rm -f libconftest$shared_ext; list=""; for z in $templist; do case $z in conftest.$objext) list="$list $z";; *.$objext);; *) list="$list $z";;esac; done; $ECHO "X$list" | $Xsed' - - _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='${wl}-rpath,$libdir' - _LT_TAGVAR(export_dynamic_flag_spec, $1)='${wl}--export-dynamic' - - # Archives containing C++ object files must be created using - # "CC -Bstatic", where "CC" is the KAI C++ compiler. - _LT_TAGVAR(old_archive_cmds, $1)='$CC -Bstatic -o $oldlib $oldobjs' - ;; - icpc* | ecpc* ) - # Intel C++ - with_gnu_ld=yes - # version 8.0 and above of icpc choke on multiply defined symbols - # if we add $predep_objects and $postdep_objects, however 7.1 and - # earlier do not add the objects themselves. - case `$CC -V 2>&1` in - *"Version 7."*) - _LT_TAGVAR(archive_cmds, $1)='$CC -shared $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags ${wl}-soname $wl$soname -o $lib' - _LT_TAGVAR(archive_expsym_cmds, $1)='$CC -shared $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags ${wl}-soname $wl$soname ${wl}-retain-symbols-file $wl$export_symbols -o $lib' - ;; - *) # Version 8.0 or newer - tmp_idyn= - case $host_cpu in - ia64*) tmp_idyn=' -i_dynamic';; - esac - _LT_TAGVAR(archive_cmds, $1)='$CC -shared'"$tmp_idyn"' $libobjs $deplibs $compiler_flags ${wl}-soname $wl$soname -o $lib' - _LT_TAGVAR(archive_expsym_cmds, $1)='$CC -shared'"$tmp_idyn"' $libobjs $deplibs $compiler_flags ${wl}-soname $wl$soname ${wl}-retain-symbols-file $wl$export_symbols -o $lib' - ;; - esac - _LT_TAGVAR(archive_cmds_need_lc, $1)=no - _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='${wl}-rpath,$libdir' - _LT_TAGVAR(export_dynamic_flag_spec, $1)='${wl}--export-dynamic' - _LT_TAGVAR(whole_archive_flag_spec, $1)='${wl}--whole-archive$convenience ${wl}--no-whole-archive' - ;; - pgCC* | pgcpp*) - # Portland Group C++ compiler - case `$CC -V` in - *pgCC\ [[1-5]]* | *pgcpp\ [[1-5]]*) - _LT_TAGVAR(prelink_cmds, $1)='tpldir=Template.dir~ - rm -rf $tpldir~ - $CC --prelink_objects --instantiation_dir $tpldir $objs $libobjs $compile_deplibs~ - compile_command="$compile_command `find $tpldir -name \*.o | $NL2SP`"' - _LT_TAGVAR(old_archive_cmds, $1)='tpldir=Template.dir~ - rm -rf $tpldir~ - $CC --prelink_objects --instantiation_dir $tpldir $oldobjs$old_deplibs~ - $AR $AR_FLAGS $oldlib$oldobjs$old_deplibs `find $tpldir -name \*.o | $NL2SP`~ - $RANLIB $oldlib' - _LT_TAGVAR(archive_cmds, $1)='tpldir=Template.dir~ - rm -rf $tpldir~ - $CC --prelink_objects --instantiation_dir $tpldir $predep_objects $libobjs $deplibs $convenience $postdep_objects~ - $CC -shared $pic_flag $predep_objects $libobjs $deplibs `find $tpldir -name \*.o | $NL2SP` $postdep_objects $compiler_flags ${wl}-soname ${wl}$soname -o $lib' - _LT_TAGVAR(archive_expsym_cmds, $1)='tpldir=Template.dir~ - rm -rf $tpldir~ - $CC --prelink_objects --instantiation_dir $tpldir $predep_objects $libobjs $deplibs $convenience $postdep_objects~ - $CC -shared $pic_flag $predep_objects $libobjs $deplibs `find $tpldir -name \*.o | $NL2SP` $postdep_objects $compiler_flags ${wl}-soname ${wl}$soname ${wl}-retain-symbols-file ${wl}$export_symbols -o $lib' - ;; - *) # Version 6 will use weak symbols - _LT_TAGVAR(archive_cmds, $1)='$CC -shared $pic_flag $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags ${wl}-soname ${wl}$soname -o $lib' - _LT_TAGVAR(archive_expsym_cmds, $1)='$CC -shared $pic_flag $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags ${wl}-soname ${wl}$soname ${wl}-retain-symbols-file ${wl}$export_symbols -o $lib' - ;; - esac - - _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='${wl}--rpath ${wl}$libdir' - _LT_TAGVAR(export_dynamic_flag_spec, $1)='${wl}--export-dynamic' - _LT_TAGVAR(whole_archive_flag_spec, $1)='${wl}--whole-archive`for conv in $convenience\"\"; do test -n \"$conv\" && new_convenience=\"$new_convenience,$conv\"; done; $ECHO \"$new_convenience\"` ${wl}--no-whole-archive' - ;; - cxx*) - # Compaq C++ - _LT_TAGVAR(archive_cmds, $1)='$CC -shared $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags ${wl}-soname $wl$soname -o $lib' - _LT_TAGVAR(archive_expsym_cmds, $1)='$CC -shared $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags ${wl}-soname $wl$soname -o $lib ${wl}-retain-symbols-file $wl$export_symbols' - - runpath_var=LD_RUN_PATH - _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='-rpath $libdir' - _LT_TAGVAR(hardcode_libdir_separator, $1)=: - - # Commands to make compiler produce verbose output that lists - # what "hidden" libraries, object files and flags are used when - # linking a shared library. - # - # There doesn't appear to be a way to prevent this compiler from - # explicitly linking system object files so we need to strip them - # from the output so that they don't get included in the library - # dependencies. - output_verbose_link_cmd='templist=`$CC -shared $CFLAGS -v conftest.$objext 2>&1 | $GREP "ld"`; templist=`$ECHO "X$templist" | $Xsed -e "s/\(^.*ld.*\)\( .*ld .*$\)/\1/"`; list=""; for z in $templist; do case $z in conftest.$objext) list="$list $z";; *.$objext);; *) list="$list $z";;esac; done; $ECHO "X$list" | $Xsed' - ;; - xl*) - # IBM XL 8.0 on PPC, with GNU ld - _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='${wl}-rpath ${wl}$libdir' - _LT_TAGVAR(export_dynamic_flag_spec, $1)='${wl}--export-dynamic' - _LT_TAGVAR(archive_cmds, $1)='$CC -qmkshrobj $libobjs $deplibs $compiler_flags ${wl}-soname $wl$soname -o $lib' - if test "x$supports_anon_versioning" = xyes; then - _LT_TAGVAR(archive_expsym_cmds, $1)='echo "{ global:" > $output_objdir/$libname.ver~ - cat $export_symbols | sed -e "s/\(.*\)/\1;/" >> $output_objdir/$libname.ver~ - echo "local: *; };" >> $output_objdir/$libname.ver~ - $CC -qmkshrobj $libobjs $deplibs $compiler_flags ${wl}-soname $wl$soname ${wl}-version-script ${wl}$output_objdir/$libname.ver -o $lib' - fi - ;; - *) - case `$CC -V 2>&1 | sed 5q` in - *Sun\ C*) - # Sun C++ 5.9 - _LT_TAGVAR(no_undefined_flag, $1)=' -zdefs' - _LT_TAGVAR(archive_cmds, $1)='$CC -G${allow_undefined_flag} -h$soname -o $lib $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags' - _LT_TAGVAR(archive_expsym_cmds, $1)='$CC -G${allow_undefined_flag} -h$soname -o $lib $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags ${wl}-retain-symbols-file ${wl}$export_symbols' - _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='-R$libdir' - _LT_TAGVAR(whole_archive_flag_spec, $1)='${wl}--whole-archive`new_convenience=; for conv in $convenience\"\"; do test -z \"$conv\" || new_convenience=\"$new_convenience,$conv\"; done; $ECHO \"$new_convenience\"` ${wl}--no-whole-archive' - _LT_TAGVAR(compiler_needs_object, $1)=yes - - # Not sure whether something based on - # $CC $CFLAGS -v conftest.$objext -o libconftest$shared_ext 2>&1 - # would be better. - output_verbose_link_cmd='echo' - - # Archives containing C++ object files must be created using - # "CC -xar", where "CC" is the Sun C++ compiler. This is - # necessary to make sure instantiated templates are included - # in the archive. - _LT_TAGVAR(old_archive_cmds, $1)='$CC -xar -o $oldlib $oldobjs' - ;; - esac - ;; - esac - ;; - - lynxos*) - # FIXME: insert proper C++ library support - _LT_TAGVAR(ld_shlibs, $1)=no - ;; - - m88k*) - # FIXME: insert proper C++ library support - _LT_TAGVAR(ld_shlibs, $1)=no - ;; - - mvs*) - case $cc_basename in - cxx*) - # FIXME: insert proper C++ library support - _LT_TAGVAR(ld_shlibs, $1)=no - ;; - *) - # FIXME: insert proper C++ library support - _LT_TAGVAR(ld_shlibs, $1)=no - ;; - esac - ;; - - netbsd*) - if echo __ELF__ | $CC -E - | $GREP __ELF__ >/dev/null; then - _LT_TAGVAR(archive_cmds, $1)='$LD -Bshareable -o $lib $predep_objects $libobjs $deplibs $postdep_objects $linker_flags' - wlarc= - _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='-R$libdir' - _LT_TAGVAR(hardcode_direct, $1)=yes - _LT_TAGVAR(hardcode_shlibpath_var, $1)=no - fi - # Workaround some broken pre-1.5 toolchains - output_verbose_link_cmd='$CC -shared $CFLAGS -v conftest.$objext 2>&1 | $GREP conftest.$objext | $SED -e "s:-lgcc -lc -lgcc::"' - ;; - - *nto* | *qnx*) - _LT_TAGVAR(ld_shlibs, $1)=yes - ;; - - openbsd2*) - # C++ shared libraries are fairly broken - _LT_TAGVAR(ld_shlibs, $1)=no - ;; - - openbsd*) - if test -f /usr/libexec/ld.so; then - _LT_TAGVAR(hardcode_direct, $1)=yes - _LT_TAGVAR(hardcode_shlibpath_var, $1)=no - _LT_TAGVAR(hardcode_direct_absolute, $1)=yes - _LT_TAGVAR(archive_cmds, $1)='$CC -shared $pic_flag $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags -o $lib' - _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='${wl}-rpath,$libdir' - if test -z "`echo __ELF__ | $CC -E - | grep __ELF__`" || test "$host_os-$host_cpu" = "openbsd2.8-powerpc"; then - _LT_TAGVAR(archive_expsym_cmds, $1)='$CC -shared $pic_flag $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags ${wl}-retain-symbols-file,$export_symbols -o $lib' - _LT_TAGVAR(export_dynamic_flag_spec, $1)='${wl}-E' - _LT_TAGVAR(whole_archive_flag_spec, $1)="$wlarc"'--whole-archive$convenience '"$wlarc"'--no-whole-archive' - fi - output_verbose_link_cmd=echo - else - _LT_TAGVAR(ld_shlibs, $1)=no - fi - ;; - - osf3* | osf4* | osf5*) - case $cc_basename in - KCC*) - # Kuck and Associates, Inc. (KAI) C++ Compiler - - # KCC will only create a shared library if the output file - # ends with ".so" (or ".sl" for HP-UX), so rename the library - # to its proper name (with version) after linking. - _LT_TAGVAR(archive_cmds, $1)='tempext=`echo $shared_ext | $SED -e '\''s/\([[^()0-9A-Za-z{}]]\)/\\\\\1/g'\''`; templib=`echo "$lib" | $SED -e "s/\${tempext}\..*/.so/"`; $CC $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags --soname $soname -o \$templib; mv \$templib $lib' - - _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='${wl}-rpath,$libdir' - _LT_TAGVAR(hardcode_libdir_separator, $1)=: - - # Archives containing C++ object files must be created using - # the KAI C++ compiler. - case $host in - osf3*) _LT_TAGVAR(old_archive_cmds, $1)='$CC -Bstatic -o $oldlib $oldobjs' ;; - *) _LT_TAGVAR(old_archive_cmds, $1)='$CC -o $oldlib $oldobjs' ;; - esac - ;; - RCC*) - # Rational C++ 2.4.1 - # FIXME: insert proper C++ library support - _LT_TAGVAR(ld_shlibs, $1)=no - ;; - cxx*) - case $host in - osf3*) - _LT_TAGVAR(allow_undefined_flag, $1)=' ${wl}-expect_unresolved ${wl}\*' - _LT_TAGVAR(archive_cmds, $1)='$CC -shared${allow_undefined_flag} $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags ${wl}-soname $soname `test -n "$verstring" && $ECHO "X${wl}-set_version $verstring" | $Xsed` -update_registry ${output_objdir}/so_locations -o $lib' - _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='${wl}-rpath ${wl}$libdir' - ;; - *) - _LT_TAGVAR(allow_undefined_flag, $1)=' -expect_unresolved \*' - _LT_TAGVAR(archive_cmds, $1)='$CC -shared${allow_undefined_flag} $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags -msym -soname $soname `test -n "$verstring" && $ECHO "X-set_version $verstring" | $Xsed` -update_registry ${output_objdir}/so_locations -o $lib' - _LT_TAGVAR(archive_expsym_cmds, $1)='for i in `cat $export_symbols`; do printf "%s %s\\n" -exported_symbol "\$i" >> $lib.exp; done~ - echo "-hidden">> $lib.exp~ - $CC -shared$allow_undefined_flag $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags -msym -soname $soname ${wl}-input ${wl}$lib.exp `test -n "$verstring" && $ECHO "X-set_version $verstring" | $Xsed` -update_registry ${output_objdir}/so_locations -o $lib~ - $RM $lib.exp' - _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='-rpath $libdir' - ;; - esac - - _LT_TAGVAR(hardcode_libdir_separator, $1)=: - - # Commands to make compiler produce verbose output that lists - # what "hidden" libraries, object files and flags are used when - # linking a shared library. - # - # There doesn't appear to be a way to prevent this compiler from - # explicitly linking system object files so we need to strip them - # from the output so that they don't get included in the library - # dependencies. - output_verbose_link_cmd='templist=`$CC -shared $CFLAGS -v conftest.$objext 2>&1 | $GREP "ld" | $GREP -v "ld:"`; templist=`$ECHO "X$templist" | $Xsed -e "s/\(^.*ld.*\)\( .*ld.*$\)/\1/"`; list=""; for z in $templist; do case $z in conftest.$objext) list="$list $z";; *.$objext);; *) list="$list $z";;esac; done; $ECHO "X$list" | $Xsed' - ;; - *) - if test "$GXX" = yes && test "$with_gnu_ld" = no; then - _LT_TAGVAR(allow_undefined_flag, $1)=' ${wl}-expect_unresolved ${wl}\*' - case $host in - osf3*) - _LT_TAGVAR(archive_cmds, $1)='$CC -shared -nostdlib ${allow_undefined_flag} $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags ${wl}-soname ${wl}$soname `test -n "$verstring" && $ECHO "X${wl}-set_version ${wl}$verstring" | $Xsed` ${wl}-update_registry ${wl}${output_objdir}/so_locations -o $lib' - ;; - *) - _LT_TAGVAR(archive_cmds, $1)='$CC -shared -nostdlib ${allow_undefined_flag} $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags ${wl}-msym ${wl}-soname ${wl}$soname `test -n "$verstring" && $ECHO "${wl}-set_version ${wl}$verstring" | $Xsed` ${wl}-update_registry ${wl}${output_objdir}/so_locations -o $lib' - ;; - esac - - _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='${wl}-rpath ${wl}$libdir' - _LT_TAGVAR(hardcode_libdir_separator, $1)=: - - # Commands to make compiler produce verbose output that lists - # what "hidden" libraries, object files and flags are used when - # linking a shared library. - output_verbose_link_cmd='$CC -shared $CFLAGS -v conftest.$objext 2>&1 | $GREP "\-L"' - - else - # FIXME: insert proper C++ library support - _LT_TAGVAR(ld_shlibs, $1)=no - fi - ;; - esac - ;; - - psos*) - # FIXME: insert proper C++ library support - _LT_TAGVAR(ld_shlibs, $1)=no - ;; - - sunos4*) - case $cc_basename in - CC*) - # Sun C++ 4.x - # FIXME: insert proper C++ library support - _LT_TAGVAR(ld_shlibs, $1)=no - ;; - lcc*) - # Lucid - # FIXME: insert proper C++ library support - _LT_TAGVAR(ld_shlibs, $1)=no - ;; - *) - # FIXME: insert proper C++ library support - _LT_TAGVAR(ld_shlibs, $1)=no - ;; - esac - ;; - - solaris*) - case $cc_basename in - CC*) - # Sun C++ 4.2, 5.x and Centerline C++ - _LT_TAGVAR(archive_cmds_need_lc,$1)=yes - _LT_TAGVAR(no_undefined_flag, $1)=' -zdefs' - _LT_TAGVAR(archive_cmds, $1)='$CC -G${allow_undefined_flag} -h$soname -o $lib $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags' - _LT_TAGVAR(archive_expsym_cmds, $1)='echo "{ global:" > $lib.exp~cat $export_symbols | $SED -e "s/\(.*\)/\1;/" >> $lib.exp~echo "local: *; };" >> $lib.exp~ - $CC -G${allow_undefined_flag} ${wl}-M ${wl}$lib.exp -h$soname -o $lib $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags~$RM $lib.exp' - - _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='-R$libdir' - _LT_TAGVAR(hardcode_shlibpath_var, $1)=no - case $host_os in - solaris2.[[0-5]] | solaris2.[[0-5]].*) ;; - *) - # The compiler driver will combine and reorder linker options, - # but understands `-z linker_flag'. - # Supported since Solaris 2.6 (maybe 2.5.1?) - _LT_TAGVAR(whole_archive_flag_spec, $1)='-z allextract$convenience -z defaultextract' - ;; - esac - _LT_TAGVAR(link_all_deplibs, $1)=yes - - output_verbose_link_cmd='echo' - - # Archives containing C++ object files must be created using - # "CC -xar", where "CC" is the Sun C++ compiler. This is - # necessary to make sure instantiated templates are included - # in the archive. - _LT_TAGVAR(old_archive_cmds, $1)='$CC -xar -o $oldlib $oldobjs' - ;; - gcx*) - # Green Hills C++ Compiler - _LT_TAGVAR(archive_cmds, $1)='$CC -shared $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags ${wl}-h $wl$soname -o $lib' - - # The C++ compiler must be used to create the archive. - _LT_TAGVAR(old_archive_cmds, $1)='$CC $LDFLAGS -archive -o $oldlib $oldobjs' - ;; - *) - # GNU C++ compiler with Solaris linker - if test "$GXX" = yes && test "$with_gnu_ld" = no; then - _LT_TAGVAR(no_undefined_flag, $1)=' ${wl}-z ${wl}defs' - if $CC --version | $GREP -v '^2\.7' > /dev/null; then - _LT_TAGVAR(archive_cmds, $1)='$CC -shared -nostdlib $LDFLAGS $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags ${wl}-h $wl$soname -o $lib' - _LT_TAGVAR(archive_expsym_cmds, $1)='echo "{ global:" > $lib.exp~cat $export_symbols | $SED -e "s/\(.*\)/\1;/" >> $lib.exp~echo "local: *; };" >> $lib.exp~ - $CC -shared -nostdlib ${wl}-M $wl$lib.exp -o $lib $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags~$RM $lib.exp' - - # Commands to make compiler produce verbose output that lists - # what "hidden" libraries, object files and flags are used when - # linking a shared library. - output_verbose_link_cmd='$CC -shared $CFLAGS -v conftest.$objext 2>&1 | $GREP "\-L"' - else - # g++ 2.7 appears to require `-G' NOT `-shared' on this - # platform. - _LT_TAGVAR(archive_cmds, $1)='$CC -G -nostdlib $LDFLAGS $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags ${wl}-h $wl$soname -o $lib' - _LT_TAGVAR(archive_expsym_cmds, $1)='echo "{ global:" > $lib.exp~cat $export_symbols | $SED -e "s/\(.*\)/\1;/" >> $lib.exp~echo "local: *; };" >> $lib.exp~ - $CC -G -nostdlib ${wl}-M $wl$lib.exp -o $lib $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags~$RM $lib.exp' - - # Commands to make compiler produce verbose output that lists - # what "hidden" libraries, object files and flags are used when - # linking a shared library. - output_verbose_link_cmd='$CC -G $CFLAGS -v conftest.$objext 2>&1 | $GREP "\-L"' - fi - - _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='${wl}-R $wl$libdir' - case $host_os in - solaris2.[[0-5]] | solaris2.[[0-5]].*) ;; - *) - _LT_TAGVAR(whole_archive_flag_spec, $1)='${wl}-z ${wl}allextract$convenience ${wl}-z ${wl}defaultextract' - ;; - esac - fi - ;; - esac - ;; - - sysv4*uw2* | sysv5OpenUNIX* | sysv5UnixWare7.[[01]].[[10]]* | unixware7* | sco3.2v5.0.[[024]]*) - _LT_TAGVAR(no_undefined_flag, $1)='${wl}-z,text' - _LT_TAGVAR(archive_cmds_need_lc, $1)=no - _LT_TAGVAR(hardcode_shlibpath_var, $1)=no - runpath_var='LD_RUN_PATH' - - case $cc_basename in - CC*) - _LT_TAGVAR(archive_cmds, $1)='$CC -G ${wl}-h,$soname -o $lib $libobjs $deplibs $compiler_flags' - _LT_TAGVAR(archive_expsym_cmds, $1)='$CC -G ${wl}-Bexport:$export_symbols ${wl}-h,$soname -o $lib $libobjs $deplibs $compiler_flags' - ;; - *) - _LT_TAGVAR(archive_cmds, $1)='$CC -shared ${wl}-h,$soname -o $lib $libobjs $deplibs $compiler_flags' - _LT_TAGVAR(archive_expsym_cmds, $1)='$CC -shared ${wl}-Bexport:$export_symbols ${wl}-h,$soname -o $lib $libobjs $deplibs $compiler_flags' - ;; - esac - ;; - - sysv5* | sco3.2v5* | sco5v6*) - # Note: We can NOT use -z defs as we might desire, because we do not - # link with -lc, and that would cause any symbols used from libc to - # always be unresolved, which means just about no library would - # ever link correctly. If we're not using GNU ld we use -z text - # though, which does catch some bad symbols but isn't as heavy-handed - # as -z defs. - _LT_TAGVAR(no_undefined_flag, $1)='${wl}-z,text' - _LT_TAGVAR(allow_undefined_flag, $1)='${wl}-z,nodefs' - _LT_TAGVAR(archive_cmds_need_lc, $1)=no - _LT_TAGVAR(hardcode_shlibpath_var, $1)=no - _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='${wl}-R,$libdir' - _LT_TAGVAR(hardcode_libdir_separator, $1)=':' - _LT_TAGVAR(link_all_deplibs, $1)=yes - _LT_TAGVAR(export_dynamic_flag_spec, $1)='${wl}-Bexport' - runpath_var='LD_RUN_PATH' - - case $cc_basename in - CC*) - _LT_TAGVAR(archive_cmds, $1)='$CC -G ${wl}-h,$soname -o $lib $libobjs $deplibs $compiler_flags' - _LT_TAGVAR(archive_expsym_cmds, $1)='$CC -G ${wl}-Bexport:$export_symbols ${wl}-h,$soname -o $lib $libobjs $deplibs $compiler_flags' - ;; - *) - _LT_TAGVAR(archive_cmds, $1)='$CC -shared ${wl}-h,$soname -o $lib $libobjs $deplibs $compiler_flags' - _LT_TAGVAR(archive_expsym_cmds, $1)='$CC -shared ${wl}-Bexport:$export_symbols ${wl}-h,$soname -o $lib $libobjs $deplibs $compiler_flags' - ;; - esac - ;; - - tandem*) - case $cc_basename in - NCC*) - # NonStop-UX NCC 3.20 - # FIXME: insert proper C++ library support - _LT_TAGVAR(ld_shlibs, $1)=no - ;; - *) - # FIXME: insert proper C++ library support - _LT_TAGVAR(ld_shlibs, $1)=no - ;; - esac - ;; - - vxworks*) - # FIXME: insert proper C++ library support - _LT_TAGVAR(ld_shlibs, $1)=no - ;; - - *) - # FIXME: insert proper C++ library support - _LT_TAGVAR(ld_shlibs, $1)=no - ;; - esac - - AC_MSG_RESULT([$_LT_TAGVAR(ld_shlibs, $1)]) - test "$_LT_TAGVAR(ld_shlibs, $1)" = no && can_build_shared=no - - _LT_TAGVAR(GCC, $1)="$GXX" - _LT_TAGVAR(LD, $1)="$LD" - - ## CAVEAT EMPTOR: - ## There is no encapsulation within the following macros, do not change - ## the running order or otherwise move them around unless you know exactly - ## what you are doing... - _LT_SYS_HIDDEN_LIBDEPS($1) - _LT_COMPILER_PIC($1) - _LT_COMPILER_C_O($1) - _LT_COMPILER_FILE_LOCKS($1) - _LT_LINKER_SHLIBS($1) - _LT_SYS_DYNAMIC_LINKER($1) - _LT_LINKER_HARDCODE_LIBPATH($1) - - _LT_CONFIG($1) - fi # test -n "$compiler" - - CC=$lt_save_CC - LDCXX=$LD - LD=$lt_save_LD - GCC=$lt_save_GCC - with_gnu_ld=$lt_save_with_gnu_ld - lt_cv_path_LDCXX=$lt_cv_path_LD - lt_cv_path_LD=$lt_save_path_LD - lt_cv_prog_gnu_ldcxx=$lt_cv_prog_gnu_ld - lt_cv_prog_gnu_ld=$lt_save_with_gnu_ld -fi # test "$_lt_caught_CXX_error" != yes - -AC_LANG_POP -])# _LT_LANG_CXX_CONFIG - - -# _LT_SYS_HIDDEN_LIBDEPS([TAGNAME]) -# --------------------------------- -# Figure out "hidden" library dependencies from verbose -# compiler output when linking a shared library. -# Parse the compiler output and extract the necessary -# objects, libraries and library flags. -m4_defun([_LT_SYS_HIDDEN_LIBDEPS], -[m4_require([_LT_FILEUTILS_DEFAULTS])dnl -# Dependencies to place before and after the object being linked: -_LT_TAGVAR(predep_objects, $1)= -_LT_TAGVAR(postdep_objects, $1)= -_LT_TAGVAR(predeps, $1)= -_LT_TAGVAR(postdeps, $1)= -_LT_TAGVAR(compiler_lib_search_path, $1)= - -dnl we can't use the lt_simple_compile_test_code here, -dnl because it contains code intended for an executable, -dnl not a library. It's possible we should let each -dnl tag define a new lt_????_link_test_code variable, -dnl but it's only used here... -m4_if([$1], [], [cat > conftest.$ac_ext <<_LT_EOF -int a; -void foo (void) { a = 0; } -_LT_EOF -], [$1], [CXX], [cat > conftest.$ac_ext <<_LT_EOF -class Foo -{ -public: - Foo (void) { a = 0; } -private: - int a; -}; -_LT_EOF -], [$1], [F77], [cat > conftest.$ac_ext <<_LT_EOF - subroutine foo - implicit none - integer*4 a - a=0 - return - end -_LT_EOF -], [$1], [FC], [cat > conftest.$ac_ext <<_LT_EOF - subroutine foo - implicit none - integer a - a=0 - return - end -_LT_EOF -], [$1], [GCJ], [cat > conftest.$ac_ext <<_LT_EOF -public class foo { - private int a; - public void bar (void) { - a = 0; - } -}; -_LT_EOF -]) -dnl Parse the compiler output and extract the necessary -dnl objects, libraries and library flags. -if AC_TRY_EVAL(ac_compile); then - # Parse the compiler output and extract the necessary - # objects, libraries and library flags. - - # Sentinel used to keep track of whether or not we are before - # the conftest object file. - pre_test_object_deps_done=no - - for p in `eval "$output_verbose_link_cmd"`; do - case $p in - - -L* | -R* | -l*) - # Some compilers place space between "-{L,R}" and the path. - # Remove the space. - if test $p = "-L" || - test $p = "-R"; then - prev=$p - continue - else - prev= - fi - - if test "$pre_test_object_deps_done" = no; then - case $p in - -L* | -R*) - # Internal compiler library paths should come after those - # provided the user. The postdeps already come after the - # user supplied libs so there is no need to process them. - if test -z "$_LT_TAGVAR(compiler_lib_search_path, $1)"; then - _LT_TAGVAR(compiler_lib_search_path, $1)="${prev}${p}" - else - _LT_TAGVAR(compiler_lib_search_path, $1)="${_LT_TAGVAR(compiler_lib_search_path, $1)} ${prev}${p}" - fi - ;; - # The "-l" case would never come before the object being - # linked, so don't bother handling this case. - esac - else - if test -z "$_LT_TAGVAR(postdeps, $1)"; then - _LT_TAGVAR(postdeps, $1)="${prev}${p}" - else - _LT_TAGVAR(postdeps, $1)="${_LT_TAGVAR(postdeps, $1)} ${prev}${p}" - fi - fi - ;; - - *.$objext) - # This assumes that the test object file only shows up - # once in the compiler output. - if test "$p" = "conftest.$objext"; then - pre_test_object_deps_done=yes - continue - fi - - if test "$pre_test_object_deps_done" = no; then - if test -z "$_LT_TAGVAR(predep_objects, $1)"; then - _LT_TAGVAR(predep_objects, $1)="$p" - else - _LT_TAGVAR(predep_objects, $1)="$_LT_TAGVAR(predep_objects, $1) $p" - fi - else - if test -z "$_LT_TAGVAR(postdep_objects, $1)"; then - _LT_TAGVAR(postdep_objects, $1)="$p" - else - _LT_TAGVAR(postdep_objects, $1)="$_LT_TAGVAR(postdep_objects, $1) $p" - fi - fi - ;; - - *) ;; # Ignore the rest. - - esac - done - - # Clean up. - rm -f a.out a.exe -else - echo "libtool.m4: error: problem compiling $1 test program" -fi - -$RM -f confest.$objext - -# PORTME: override above test on systems where it is broken -m4_if([$1], [CXX], -[case $host_os in -interix[[3-9]]*) - # Interix 3.5 installs completely hosed .la files for C++, so rather than - # hack all around it, let's just trust "g++" to DTRT. - _LT_TAGVAR(predep_objects,$1)= - _LT_TAGVAR(postdep_objects,$1)= - _LT_TAGVAR(postdeps,$1)= - ;; - -linux*) - case `$CC -V 2>&1 | sed 5q` in - *Sun\ C*) - # Sun C++ 5.9 - - # The more standards-conforming stlport4 library is - # incompatible with the Cstd library. Avoid specifying - # it if it's in CXXFLAGS. Ignore libCrun as - # -library=stlport4 depends on it. - case " $CXX $CXXFLAGS " in - *" -library=stlport4 "*) - solaris_use_stlport4=yes - ;; - esac - - if test "$solaris_use_stlport4" != yes; then - _LT_TAGVAR(postdeps,$1)='-library=Cstd -library=Crun' - fi - ;; - esac - ;; - -solaris*) - case $cc_basename in - CC*) - # The more standards-conforming stlport4 library is - # incompatible with the Cstd library. Avoid specifying - # it if it's in CXXFLAGS. Ignore libCrun as - # -library=stlport4 depends on it. - case " $CXX $CXXFLAGS " in - *" -library=stlport4 "*) - solaris_use_stlport4=yes - ;; - esac - - # Adding this requires a known-good setup of shared libraries for - # Sun compiler versions before 5.6, else PIC objects from an old - # archive will be linked into the output, leading to subtle bugs. - if test "$solaris_use_stlport4" != yes; then - _LT_TAGVAR(postdeps,$1)='-library=Cstd -library=Crun' - fi - ;; - esac - ;; -esac -]) - -case " $_LT_TAGVAR(postdeps, $1) " in -*" -lc "*) _LT_TAGVAR(archive_cmds_need_lc, $1)=no ;; -esac - _LT_TAGVAR(compiler_lib_search_dirs, $1)= -if test -n "${_LT_TAGVAR(compiler_lib_search_path, $1)}"; then - _LT_TAGVAR(compiler_lib_search_dirs, $1)=`echo " ${_LT_TAGVAR(compiler_lib_search_path, $1)}" | ${SED} -e 's! -L! !g' -e 's!^ !!'` -fi -_LT_TAGDECL([], [compiler_lib_search_dirs], [1], - [The directories searched by this compiler when creating a shared library]) -_LT_TAGDECL([], [predep_objects], [1], - [Dependencies to place before and after the objects being linked to - create a shared library]) -_LT_TAGDECL([], [postdep_objects], [1]) -_LT_TAGDECL([], [predeps], [1]) -_LT_TAGDECL([], [postdeps], [1]) -_LT_TAGDECL([], [compiler_lib_search_path], [1], - [The library search path used internally by the compiler when linking - a shared library]) -])# _LT_SYS_HIDDEN_LIBDEPS - - -# _LT_PROG_F77 -# ------------ -# Since AC_PROG_F77 is broken, in that it returns the empty string -# if there is no fortran compiler, we have our own version here. -m4_defun([_LT_PROG_F77], -[ -pushdef([AC_MSG_ERROR], [_lt_disable_F77=yes]) -AC_PROG_F77 -if test -z "$F77" || test "X$F77" = "Xno"; then - _lt_disable_F77=yes -fi -popdef([AC_MSG_ERROR]) -])# _LT_PROG_F77 - -dnl aclocal-1.4 backwards compatibility: -dnl AC_DEFUN([_LT_PROG_F77], []) - - -# _LT_LANG_F77_CONFIG([TAG]) -# -------------------------- -# Ensure that the configuration variables for a Fortran 77 compiler are -# suitably defined. These variables are subsequently used by _LT_CONFIG -# to write the compiler configuration to `libtool'. -m4_defun([_LT_LANG_F77_CONFIG], -[AC_REQUIRE([_LT_PROG_F77])dnl -AC_LANG_PUSH(Fortran 77) - -_LT_TAGVAR(archive_cmds_need_lc, $1)=no -_LT_TAGVAR(allow_undefined_flag, $1)= -_LT_TAGVAR(always_export_symbols, $1)=no -_LT_TAGVAR(archive_expsym_cmds, $1)= -_LT_TAGVAR(export_dynamic_flag_spec, $1)= -_LT_TAGVAR(hardcode_direct, $1)=no -_LT_TAGVAR(hardcode_direct_absolute, $1)=no -_LT_TAGVAR(hardcode_libdir_flag_spec, $1)= -_LT_TAGVAR(hardcode_libdir_flag_spec_ld, $1)= -_LT_TAGVAR(hardcode_libdir_separator, $1)= -_LT_TAGVAR(hardcode_minus_L, $1)=no -_LT_TAGVAR(hardcode_automatic, $1)=no -_LT_TAGVAR(inherit_rpath, $1)=no -_LT_TAGVAR(module_cmds, $1)= -_LT_TAGVAR(module_expsym_cmds, $1)= -_LT_TAGVAR(link_all_deplibs, $1)=unknown -_LT_TAGVAR(old_archive_cmds, $1)=$old_archive_cmds -_LT_TAGVAR(no_undefined_flag, $1)= -_LT_TAGVAR(whole_archive_flag_spec, $1)= -_LT_TAGVAR(enable_shared_with_static_runtimes, $1)=no - -# Source file extension for f77 test sources. -ac_ext=f - -# Object file extension for compiled f77 test sources. -objext=o -_LT_TAGVAR(objext, $1)=$objext - -# No sense in running all these tests if we already determined that -# the F77 compiler isn't working. Some variables (like enable_shared) -# are currently assumed to apply to all compilers on this platform, -# and will be corrupted by setting them based on a non-working compiler. -if test "$_lt_disable_F77" != yes; then - # Code to be used in simple compile tests - lt_simple_compile_test_code="\ - subroutine t - return - end -" - - # Code to be used in simple link tests - lt_simple_link_test_code="\ - program t - end -" - - # ltmain only uses $CC for tagged configurations so make sure $CC is set. - _LT_TAG_COMPILER - - # save warnings/boilerplate of simple test code - _LT_COMPILER_BOILERPLATE - _LT_LINKER_BOILERPLATE - - # Allow CC to be a program name with arguments. - lt_save_CC="$CC" - lt_save_GCC=$GCC - CC=${F77-"f77"} - compiler=$CC - _LT_TAGVAR(compiler, $1)=$CC - _LT_CC_BASENAME([$compiler]) - GCC=$G77 - if test -n "$compiler"; then - AC_MSG_CHECKING([if libtool supports shared libraries]) - AC_MSG_RESULT([$can_build_shared]) - - AC_MSG_CHECKING([whether to build shared libraries]) - test "$can_build_shared" = "no" && enable_shared=no - - # On AIX, shared libraries and static libraries use the same namespace, and - # are all built from PIC. - case $host_os in - aix3*) - test "$enable_shared" = yes && enable_static=no - if test -n "$RANLIB"; then - archive_cmds="$archive_cmds~\$RANLIB \$lib" - postinstall_cmds='$RANLIB $lib' - fi - ;; - aix[[4-9]]*) - if test "$host_cpu" != ia64 && test "$aix_use_runtimelinking" = no ; then - test "$enable_shared" = yes && enable_static=no - fi - ;; - esac - AC_MSG_RESULT([$enable_shared]) - - AC_MSG_CHECKING([whether to build static libraries]) - # Make sure either enable_shared or enable_static is yes. - test "$enable_shared" = yes || enable_static=yes - AC_MSG_RESULT([$enable_static]) - - _LT_TAGVAR(GCC, $1)="$G77" - _LT_TAGVAR(LD, $1)="$LD" - - ## CAVEAT EMPTOR: - ## There is no encapsulation within the following macros, do not change - ## the running order or otherwise move them around unless you know exactly - ## what you are doing... - _LT_COMPILER_PIC($1) - _LT_COMPILER_C_O($1) - _LT_COMPILER_FILE_LOCKS($1) - _LT_LINKER_SHLIBS($1) - _LT_SYS_DYNAMIC_LINKER($1) - _LT_LINKER_HARDCODE_LIBPATH($1) - - _LT_CONFIG($1) - fi # test -n "$compiler" - - GCC=$lt_save_GCC - CC="$lt_save_CC" -fi # test "$_lt_disable_F77" != yes - -AC_LANG_POP -])# _LT_LANG_F77_CONFIG - - -# _LT_PROG_FC -# ----------- -# Since AC_PROG_FC is broken, in that it returns the empty string -# if there is no fortran compiler, we have our own version here. -m4_defun([_LT_PROG_FC], -[ -pushdef([AC_MSG_ERROR], [_lt_disable_FC=yes]) -AC_PROG_FC -if test -z "$FC" || test "X$FC" = "Xno"; then - _lt_disable_FC=yes -fi -popdef([AC_MSG_ERROR]) -])# _LT_PROG_FC - -dnl aclocal-1.4 backwards compatibility: -dnl AC_DEFUN([_LT_PROG_FC], []) - - -# _LT_LANG_FC_CONFIG([TAG]) -# ------------------------- -# Ensure that the configuration variables for a Fortran compiler are -# suitably defined. These variables are subsequently used by _LT_CONFIG -# to write the compiler configuration to `libtool'. -m4_defun([_LT_LANG_FC_CONFIG], -[AC_REQUIRE([_LT_PROG_FC])dnl -AC_LANG_PUSH(Fortran) - -_LT_TAGVAR(archive_cmds_need_lc, $1)=no -_LT_TAGVAR(allow_undefined_flag, $1)= -_LT_TAGVAR(always_export_symbols, $1)=no -_LT_TAGVAR(archive_expsym_cmds, $1)= -_LT_TAGVAR(export_dynamic_flag_spec, $1)= -_LT_TAGVAR(hardcode_direct, $1)=no -_LT_TAGVAR(hardcode_direct_absolute, $1)=no -_LT_TAGVAR(hardcode_libdir_flag_spec, $1)= -_LT_TAGVAR(hardcode_libdir_flag_spec_ld, $1)= -_LT_TAGVAR(hardcode_libdir_separator, $1)= -_LT_TAGVAR(hardcode_minus_L, $1)=no -_LT_TAGVAR(hardcode_automatic, $1)=no -_LT_TAGVAR(inherit_rpath, $1)=no -_LT_TAGVAR(module_cmds, $1)= -_LT_TAGVAR(module_expsym_cmds, $1)= -_LT_TAGVAR(link_all_deplibs, $1)=unknown -_LT_TAGVAR(old_archive_cmds, $1)=$old_archive_cmds -_LT_TAGVAR(no_undefined_flag, $1)= -_LT_TAGVAR(whole_archive_flag_spec, $1)= -_LT_TAGVAR(enable_shared_with_static_runtimes, $1)=no - -# Source file extension for fc test sources. -ac_ext=${ac_fc_srcext-f} - -# Object file extension for compiled fc test sources. -objext=o -_LT_TAGVAR(objext, $1)=$objext - -# No sense in running all these tests if we already determined that -# the FC compiler isn't working. Some variables (like enable_shared) -# are currently assumed to apply to all compilers on this platform, -# and will be corrupted by setting them based on a non-working compiler. -if test "$_lt_disable_FC" != yes; then - # Code to be used in simple compile tests - lt_simple_compile_test_code="\ - subroutine t - return - end -" - - # Code to be used in simple link tests - lt_simple_link_test_code="\ - program t - end -" - - # ltmain only uses $CC for tagged configurations so make sure $CC is set. - _LT_TAG_COMPILER - - # save warnings/boilerplate of simple test code - _LT_COMPILER_BOILERPLATE - _LT_LINKER_BOILERPLATE - - # Allow CC to be a program name with arguments. - lt_save_CC="$CC" - lt_save_GCC=$GCC - CC=${FC-"f95"} - compiler=$CC - GCC=$ac_cv_fc_compiler_gnu - - _LT_TAGVAR(compiler, $1)=$CC - _LT_CC_BASENAME([$compiler]) - - if test -n "$compiler"; then - AC_MSG_CHECKING([if libtool supports shared libraries]) - AC_MSG_RESULT([$can_build_shared]) - - AC_MSG_CHECKING([whether to build shared libraries]) - test "$can_build_shared" = "no" && enable_shared=no - - # On AIX, shared libraries and static libraries use the same namespace, and - # are all built from PIC. - case $host_os in - aix3*) - test "$enable_shared" = yes && enable_static=no - if test -n "$RANLIB"; then - archive_cmds="$archive_cmds~\$RANLIB \$lib" - postinstall_cmds='$RANLIB $lib' - fi - ;; - aix[[4-9]]*) - if test "$host_cpu" != ia64 && test "$aix_use_runtimelinking" = no ; then - test "$enable_shared" = yes && enable_static=no - fi - ;; - esac - AC_MSG_RESULT([$enable_shared]) - - AC_MSG_CHECKING([whether to build static libraries]) - # Make sure either enable_shared or enable_static is yes. - test "$enable_shared" = yes || enable_static=yes - AC_MSG_RESULT([$enable_static]) - - _LT_TAGVAR(GCC, $1)="$ac_cv_fc_compiler_gnu" - _LT_TAGVAR(LD, $1)="$LD" - - ## CAVEAT EMPTOR: - ## There is no encapsulation within the following macros, do not change - ## the running order or otherwise move them around unless you know exactly - ## what you are doing... - _LT_SYS_HIDDEN_LIBDEPS($1) - _LT_COMPILER_PIC($1) - _LT_COMPILER_C_O($1) - _LT_COMPILER_FILE_LOCKS($1) - _LT_LINKER_SHLIBS($1) - _LT_SYS_DYNAMIC_LINKER($1) - _LT_LINKER_HARDCODE_LIBPATH($1) - - _LT_CONFIG($1) - fi # test -n "$compiler" - - GCC=$lt_save_GCC - CC="$lt_save_CC" -fi # test "$_lt_disable_FC" != yes - -AC_LANG_POP -])# _LT_LANG_FC_CONFIG - - -# _LT_LANG_GCJ_CONFIG([TAG]) -# -------------------------- -# Ensure that the configuration variables for the GNU Java Compiler compiler -# are suitably defined. These variables are subsequently used by _LT_CONFIG -# to write the compiler configuration to `libtool'. -m4_defun([_LT_LANG_GCJ_CONFIG], -[AC_REQUIRE([LT_PROG_GCJ])dnl -AC_LANG_SAVE - -# Source file extension for Java test sources. -ac_ext=java - -# Object file extension for compiled Java test sources. -objext=o -_LT_TAGVAR(objext, $1)=$objext - -# Code to be used in simple compile tests -lt_simple_compile_test_code="class foo {}" - -# Code to be used in simple link tests -lt_simple_link_test_code='public class conftest { public static void main(String[[]] argv) {}; }' - -# ltmain only uses $CC for tagged configurations so make sure $CC is set. -_LT_TAG_COMPILER - -# save warnings/boilerplate of simple test code -_LT_COMPILER_BOILERPLATE -_LT_LINKER_BOILERPLATE - -# Allow CC to be a program name with arguments. -lt_save_CC="$CC" -lt_save_GCC=$GCC -GCC=yes -CC=${GCJ-"gcj"} -compiler=$CC -_LT_TAGVAR(compiler, $1)=$CC -_LT_TAGVAR(LD, $1)="$LD" -_LT_CC_BASENAME([$compiler]) - -# GCJ did not exist at the time GCC didn't implicitly link libc in. -_LT_TAGVAR(archive_cmds_need_lc, $1)=no - -_LT_TAGVAR(old_archive_cmds, $1)=$old_archive_cmds - -## CAVEAT EMPTOR: -## There is no encapsulation within the following macros, do not change -## the running order or otherwise move them around unless you know exactly -## what you are doing... -if test -n "$compiler"; then - _LT_COMPILER_NO_RTTI($1) - _LT_COMPILER_PIC($1) - _LT_COMPILER_C_O($1) - _LT_COMPILER_FILE_LOCKS($1) - _LT_LINKER_SHLIBS($1) - _LT_LINKER_HARDCODE_LIBPATH($1) - - _LT_CONFIG($1) -fi - -AC_LANG_RESTORE - -GCC=$lt_save_GCC -CC="$lt_save_CC" -])# _LT_LANG_GCJ_CONFIG - - -# _LT_LANG_RC_CONFIG([TAG]) -# ------------------------- -# Ensure that the configuration variables for the Windows resource compiler -# are suitably defined. These variables are subsequently used by _LT_CONFIG -# to write the compiler configuration to `libtool'. -m4_defun([_LT_LANG_RC_CONFIG], -[AC_REQUIRE([LT_PROG_RC])dnl -AC_LANG_SAVE - -# Source file extension for RC test sources. -ac_ext=rc - -# Object file extension for compiled RC test sources. -objext=o -_LT_TAGVAR(objext, $1)=$objext - -# Code to be used in simple compile tests -lt_simple_compile_test_code='sample MENU { MENUITEM "&Soup", 100, CHECKED }' - -# Code to be used in simple link tests -lt_simple_link_test_code="$lt_simple_compile_test_code" - -# ltmain only uses $CC for tagged configurations so make sure $CC is set. -_LT_TAG_COMPILER - -# save warnings/boilerplate of simple test code -_LT_COMPILER_BOILERPLATE -_LT_LINKER_BOILERPLATE - -# Allow CC to be a program name with arguments. -lt_save_CC="$CC" -lt_save_GCC=$GCC -GCC= -CC=${RC-"windres"} -compiler=$CC -_LT_TAGVAR(compiler, $1)=$CC -_LT_CC_BASENAME([$compiler]) -_LT_TAGVAR(lt_cv_prog_compiler_c_o, $1)=yes - -if test -n "$compiler"; then - : - _LT_CONFIG($1) -fi - -GCC=$lt_save_GCC -AC_LANG_RESTORE -CC="$lt_save_CC" -])# _LT_LANG_RC_CONFIG - - -# LT_PROG_GCJ -# ----------- -AC_DEFUN([LT_PROG_GCJ], -[m4_ifdef([AC_PROG_GCJ], [AC_PROG_GCJ], - [m4_ifdef([A][M_PROG_GCJ], [A][M_PROG_GCJ], - [AC_CHECK_TOOL(GCJ, gcj,) - test "x${GCJFLAGS+set}" = xset || GCJFLAGS="-g -O2" - AC_SUBST(GCJFLAGS)])])[]dnl -]) - -# Old name: -AU_ALIAS([LT_AC_PROG_GCJ], [LT_PROG_GCJ]) -dnl aclocal-1.4 backwards compatibility: -dnl AC_DEFUN([LT_AC_PROG_GCJ], []) - - -# LT_PROG_RC -# ---------- -AC_DEFUN([LT_PROG_RC], -[AC_CHECK_TOOL(RC, windres,) -]) - -# Old name: -AU_ALIAS([LT_AC_PROG_RC], [LT_PROG_RC]) -dnl aclocal-1.4 backwards compatibility: -dnl AC_DEFUN([LT_AC_PROG_RC], []) - - -# _LT_DECL_EGREP -# -------------- -# If we don't have a new enough Autoconf to choose the best grep -# available, choose the one first in the user's PATH. -m4_defun([_LT_DECL_EGREP], -[AC_REQUIRE([AC_PROG_EGREP])dnl -AC_REQUIRE([AC_PROG_FGREP])dnl -test -z "$GREP" && GREP=grep -_LT_DECL([], [GREP], [1], [A grep program that handles long lines]) -_LT_DECL([], [EGREP], [1], [An ERE matcher]) -_LT_DECL([], [FGREP], [1], [A literal string matcher]) -dnl Non-bleeding-edge autoconf doesn't subst GREP, so do it here too -AC_SUBST([GREP]) -]) - - -# _LT_DECL_OBJDUMP -# -------------- -# If we don't have a new enough Autoconf to choose the best objdump -# available, choose the one first in the user's PATH. -m4_defun([_LT_DECL_OBJDUMP], -[AC_CHECK_TOOL(OBJDUMP, objdump, false) -test -z "$OBJDUMP" && OBJDUMP=objdump -_LT_DECL([], [OBJDUMP], [1], [An object symbol dumper]) -AC_SUBST([OBJDUMP]) -]) - - -# _LT_DECL_SED -# ------------ -# Check for a fully-functional sed program, that truncates -# as few characters as possible. Prefer GNU sed if found. -m4_defun([_LT_DECL_SED], -[AC_PROG_SED -test -z "$SED" && SED=sed -Xsed="$SED -e 1s/^X//" -_LT_DECL([], [SED], [1], [A sed program that does not truncate output]) -_LT_DECL([], [Xsed], ["\$SED -e 1s/^X//"], - [Sed that helps us avoid accidentally triggering echo(1) options like -n]) -])# _LT_DECL_SED - -m4_ifndef([AC_PROG_SED], [ -############################################################ -# NOTE: This macro has been submitted for inclusion into # -# GNU Autoconf as AC_PROG_SED. When it is available in # -# a released version of Autoconf we should remove this # -# macro and use it instead. # -############################################################ - -m4_defun([AC_PROG_SED], -[AC_MSG_CHECKING([for a sed that does not truncate output]) -AC_CACHE_VAL(lt_cv_path_SED, -[# Loop through the user's path and test for sed and gsed. -# Then use that list of sed's as ones to test for truncation. -as_save_IFS=$IFS; IFS=$PATH_SEPARATOR -for as_dir in $PATH -do - IFS=$as_save_IFS - test -z "$as_dir" && as_dir=. - for lt_ac_prog in sed gsed; do - for ac_exec_ext in '' $ac_executable_extensions; do - if $as_executable_p "$as_dir/$lt_ac_prog$ac_exec_ext"; then - lt_ac_sed_list="$lt_ac_sed_list $as_dir/$lt_ac_prog$ac_exec_ext" - fi - done - done -done -IFS=$as_save_IFS -lt_ac_max=0 -lt_ac_count=0 -# Add /usr/xpg4/bin/sed as it is typically found on Solaris -# along with /bin/sed that truncates output. -for lt_ac_sed in $lt_ac_sed_list /usr/xpg4/bin/sed; do - test ! -f $lt_ac_sed && continue - cat /dev/null > conftest.in - lt_ac_count=0 - echo $ECHO_N "0123456789$ECHO_C" >conftest.in - # Check for GNU sed and select it if it is found. - if "$lt_ac_sed" --version 2>&1 < /dev/null | grep 'GNU' > /dev/null; then - lt_cv_path_SED=$lt_ac_sed - break - fi - while true; do - cat conftest.in conftest.in >conftest.tmp - mv conftest.tmp conftest.in - cp conftest.in conftest.nl - echo >>conftest.nl - $lt_ac_sed -e 's/a$//' < conftest.nl >conftest.out || break - cmp -s conftest.out conftest.nl || break - # 10000 chars as input seems more than enough - test $lt_ac_count -gt 10 && break - lt_ac_count=`expr $lt_ac_count + 1` - if test $lt_ac_count -gt $lt_ac_max; then - lt_ac_max=$lt_ac_count - lt_cv_path_SED=$lt_ac_sed - fi - done -done -]) -SED=$lt_cv_path_SED -AC_SUBST([SED]) -AC_MSG_RESULT([$SED]) -])#AC_PROG_SED -])#m4_ifndef - -# Old name: -AU_ALIAS([LT_AC_PROG_SED], [AC_PROG_SED]) -dnl aclocal-1.4 backwards compatibility: -dnl AC_DEFUN([LT_AC_PROG_SED], []) - - -# _LT_CHECK_SHELL_FEATURES -# ------------------------ -# Find out whether the shell is Bourne or XSI compatible, -# or has some other useful features. -m4_defun([_LT_CHECK_SHELL_FEATURES], -[AC_MSG_CHECKING([whether the shell understands some XSI constructs]) -# Try some XSI features -xsi_shell=no -( _lt_dummy="a/b/c" - test "${_lt_dummy##*/},${_lt_dummy%/*},"${_lt_dummy%"$_lt_dummy"}, \ - = c,a/b,, \ - && eval 'test $(( 1 + 1 )) -eq 2 \ - && test "${#_lt_dummy}" -eq 5' ) >/dev/null 2>&1 \ - && xsi_shell=yes -AC_MSG_RESULT([$xsi_shell]) -_LT_CONFIG_LIBTOOL_INIT([xsi_shell='$xsi_shell']) - -AC_MSG_CHECKING([whether the shell understands "+="]) -lt_shell_append=no -( foo=bar; set foo baz; eval "$[1]+=\$[2]" && test "$foo" = barbaz ) \ - >/dev/null 2>&1 \ - && lt_shell_append=yes -AC_MSG_RESULT([$lt_shell_append]) -_LT_CONFIG_LIBTOOL_INIT([lt_shell_append='$lt_shell_append']) - -if ( (MAIL=60; unset MAIL) || exit) >/dev/null 2>&1; then - lt_unset=unset -else - lt_unset=false -fi -_LT_DECL([], [lt_unset], [0], [whether the shell understands "unset"])dnl - -# test EBCDIC or ASCII -case `echo X|tr X '\101'` in - A) # ASCII based system - # \n is not interpreted correctly by Solaris 8 /usr/ucb/tr - lt_SP2NL='tr \040 \012' - lt_NL2SP='tr \015\012 \040\040' - ;; - *) # EBCDIC based system - lt_SP2NL='tr \100 \n' - lt_NL2SP='tr \r\n \100\100' - ;; -esac -_LT_DECL([SP2NL], [lt_SP2NL], [1], [turn spaces into newlines])dnl -_LT_DECL([NL2SP], [lt_NL2SP], [1], [turn newlines into spaces])dnl -])# _LT_CHECK_SHELL_FEATURES - - -# _LT_PROG_XSI_SHELLFNS -# --------------------- -# Bourne and XSI compatible variants of some useful shell functions. -m4_defun([_LT_PROG_XSI_SHELLFNS], -[case $xsi_shell in - yes) - cat << \_LT_EOF >> "$cfgfile" - -# func_dirname file append nondir_replacement -# Compute the dirname of FILE. If nonempty, add APPEND to the result, -# otherwise set result to NONDIR_REPLACEMENT. -func_dirname () -{ - case ${1} in - */*) func_dirname_result="${1%/*}${2}" ;; - * ) func_dirname_result="${3}" ;; - esac -} - -# func_basename file -func_basename () -{ - func_basename_result="${1##*/}" -} - -# func_dirname_and_basename file append nondir_replacement -# perform func_basename and func_dirname in a single function -# call: -# dirname: Compute the dirname of FILE. If nonempty, -# add APPEND to the result, otherwise set result -# to NONDIR_REPLACEMENT. -# value returned in "$func_dirname_result" -# basename: Compute filename of FILE. -# value retuned in "$func_basename_result" -# Implementation must be kept synchronized with func_dirname -# and func_basename. For efficiency, we do not delegate to -# those functions but instead duplicate the functionality here. -func_dirname_and_basename () -{ - case ${1} in - */*) func_dirname_result="${1%/*}${2}" ;; - * ) func_dirname_result="${3}" ;; - esac - func_basename_result="${1##*/}" -} - -# func_stripname prefix suffix name -# strip PREFIX and SUFFIX off of NAME. -# PREFIX and SUFFIX must not contain globbing or regex special -# characters, hashes, percent signs, but SUFFIX may contain a leading -# dot (in which case that matches only a dot). -func_stripname () -{ - # pdksh 5.2.14 does not do ${X%$Y} correctly if both X and Y are - # positional parameters, so assign one to ordinary parameter first. - func_stripname_result=${3} - func_stripname_result=${func_stripname_result#"${1}"} - func_stripname_result=${func_stripname_result%"${2}"} -} - -# func_opt_split -func_opt_split () -{ - func_opt_split_opt=${1%%=*} - func_opt_split_arg=${1#*=} -} - -# func_lo2o object -func_lo2o () -{ - case ${1} in - *.lo) func_lo2o_result=${1%.lo}.${objext} ;; - *) func_lo2o_result=${1} ;; - esac -} - -# func_xform libobj-or-source -func_xform () -{ - func_xform_result=${1%.*}.lo -} - -# func_arith arithmetic-term... -func_arith () -{ - func_arith_result=$(( $[*] )) -} - -# func_len string -# STRING may not start with a hyphen. -func_len () -{ - func_len_result=${#1} -} - -_LT_EOF - ;; - *) # Bourne compatible functions. - cat << \_LT_EOF >> "$cfgfile" - -# func_dirname file append nondir_replacement -# Compute the dirname of FILE. If nonempty, add APPEND to the result, -# otherwise set result to NONDIR_REPLACEMENT. -func_dirname () -{ - # Extract subdirectory from the argument. - func_dirname_result=`$ECHO "X${1}" | $Xsed -e "$dirname"` - if test "X$func_dirname_result" = "X${1}"; then - func_dirname_result="${3}" - else - func_dirname_result="$func_dirname_result${2}" - fi -} - -# func_basename file -func_basename () -{ - func_basename_result=`$ECHO "X${1}" | $Xsed -e "$basename"` -} - -dnl func_dirname_and_basename -dnl A portable version of this function is already defined in general.m4sh -dnl so there is no need for it here. - -# func_stripname prefix suffix name -# strip PREFIX and SUFFIX off of NAME. -# PREFIX and SUFFIX must not contain globbing or regex special -# characters, hashes, percent signs, but SUFFIX may contain a leading -# dot (in which case that matches only a dot). -# func_strip_suffix prefix name -func_stripname () -{ - case ${2} in - .*) func_stripname_result=`$ECHO "X${3}" \ - | $Xsed -e "s%^${1}%%" -e "s%\\\\${2}\$%%"`;; - *) func_stripname_result=`$ECHO "X${3}" \ - | $Xsed -e "s%^${1}%%" -e "s%${2}\$%%"`;; - esac -} - -# sed scripts: -my_sed_long_opt='1s/^\(-[[^=]]*\)=.*/\1/;q' -my_sed_long_arg='1s/^-[[^=]]*=//' - -# func_opt_split -func_opt_split () -{ - func_opt_split_opt=`$ECHO "X${1}" | $Xsed -e "$my_sed_long_opt"` - func_opt_split_arg=`$ECHO "X${1}" | $Xsed -e "$my_sed_long_arg"` -} - -# func_lo2o object -func_lo2o () -{ - func_lo2o_result=`$ECHO "X${1}" | $Xsed -e "$lo2o"` -} - -# func_xform libobj-or-source -func_xform () -{ - func_xform_result=`$ECHO "X${1}" | $Xsed -e 's/\.[[^.]]*$/.lo/'` -} - -# func_arith arithmetic-term... -func_arith () -{ - func_arith_result=`expr "$[@]"` -} - -# func_len string -# STRING may not start with a hyphen. -func_len () -{ - func_len_result=`expr "$[1]" : ".*" 2>/dev/null || echo $max_cmd_len` -} - -_LT_EOF -esac - -case $lt_shell_append in - yes) - cat << \_LT_EOF >> "$cfgfile" - -# func_append var value -# Append VALUE to the end of shell variable VAR. -func_append () -{ - eval "$[1]+=\$[2]" -} -_LT_EOF - ;; - *) - cat << \_LT_EOF >> "$cfgfile" - -# func_append var value -# Append VALUE to the end of shell variable VAR. -func_append () -{ - eval "$[1]=\$$[1]\$[2]" -} - -_LT_EOF - ;; - esac -]) diff --git a/test/test-automation/acinclude/ltoptions.m4 b/test/test-automation/acinclude/ltoptions.m4 deleted file mode 100644 index 34151a3ba..000000000 --- a/test/test-automation/acinclude/ltoptions.m4 +++ /dev/null @@ -1,368 +0,0 @@ -# Helper functions for option handling. -*- Autoconf -*- -# -# Copyright (C) 2004, 2005, 2007, 2008 Free Software Foundation, Inc. -# Written by Gary V. Vaughan, 2004 -# -# This file is free software; the Free Software Foundation gives -# unlimited permission to copy and/or distribute it, with or without -# modifications, as long as this notice is preserved. - -# serial 6 ltoptions.m4 - -# This is to help aclocal find these macros, as it can't see m4_define. -AC_DEFUN([LTOPTIONS_VERSION], [m4_if([1])]) - - -# _LT_MANGLE_OPTION(MACRO-NAME, OPTION-NAME) -# ------------------------------------------ -m4_define([_LT_MANGLE_OPTION], -[[_LT_OPTION_]m4_bpatsubst($1__$2, [[^a-zA-Z0-9_]], [_])]) - - -# _LT_SET_OPTION(MACRO-NAME, OPTION-NAME) -# --------------------------------------- -# Set option OPTION-NAME for macro MACRO-NAME, and if there is a -# matching handler defined, dispatch to it. Other OPTION-NAMEs are -# saved as a flag. -m4_define([_LT_SET_OPTION], -[m4_define(_LT_MANGLE_OPTION([$1], [$2]))dnl -m4_ifdef(_LT_MANGLE_DEFUN([$1], [$2]), - _LT_MANGLE_DEFUN([$1], [$2]), - [m4_warning([Unknown $1 option `$2'])])[]dnl -]) - - -# _LT_IF_OPTION(MACRO-NAME, OPTION-NAME, IF-SET, [IF-NOT-SET]) -# ------------------------------------------------------------ -# Execute IF-SET if OPTION is set, IF-NOT-SET otherwise. -m4_define([_LT_IF_OPTION], -[m4_ifdef(_LT_MANGLE_OPTION([$1], [$2]), [$3], [$4])]) - - -# _LT_UNLESS_OPTIONS(MACRO-NAME, OPTION-LIST, IF-NOT-SET) -# ------------------------------------------------------- -# Execute IF-NOT-SET unless all options in OPTION-LIST for MACRO-NAME -# are set. -m4_define([_LT_UNLESS_OPTIONS], -[m4_foreach([_LT_Option], m4_split(m4_normalize([$2])), - [m4_ifdef(_LT_MANGLE_OPTION([$1], _LT_Option), - [m4_define([$0_found])])])[]dnl -m4_ifdef([$0_found], [m4_undefine([$0_found])], [$3 -])[]dnl -]) - - -# _LT_SET_OPTIONS(MACRO-NAME, OPTION-LIST) -# ---------------------------------------- -# OPTION-LIST is a space-separated list of Libtool options associated -# with MACRO-NAME. If any OPTION has a matching handler declared with -# LT_OPTION_DEFINE, dispatch to that macro; otherwise complain about -# the unknown option and exit. -m4_defun([_LT_SET_OPTIONS], -[# Set options -m4_foreach([_LT_Option], m4_split(m4_normalize([$2])), - [_LT_SET_OPTION([$1], _LT_Option)]) - -m4_if([$1],[LT_INIT],[ - dnl - dnl Simply set some default values (i.e off) if boolean options were not - dnl specified: - _LT_UNLESS_OPTIONS([LT_INIT], [dlopen], [enable_dlopen=no - ]) - _LT_UNLESS_OPTIONS([LT_INIT], [win32-dll], [enable_win32_dll=no - ]) - dnl - dnl If no reference was made to various pairs of opposing options, then - dnl we run the default mode handler for the pair. For example, if neither - dnl `shared' nor `disable-shared' was passed, we enable building of shared - dnl archives by default: - _LT_UNLESS_OPTIONS([LT_INIT], [shared disable-shared], [_LT_ENABLE_SHARED]) - _LT_UNLESS_OPTIONS([LT_INIT], [static disable-static], [_LT_ENABLE_STATIC]) - _LT_UNLESS_OPTIONS([LT_INIT], [pic-only no-pic], [_LT_WITH_PIC]) - _LT_UNLESS_OPTIONS([LT_INIT], [fast-install disable-fast-install], - [_LT_ENABLE_FAST_INSTALL]) - ]) -])# _LT_SET_OPTIONS - - -## --------------------------------- ## -## Macros to handle LT_INIT options. ## -## --------------------------------- ## - -# _LT_MANGLE_DEFUN(MACRO-NAME, OPTION-NAME) -# ----------------------------------------- -m4_define([_LT_MANGLE_DEFUN], -[[_LT_OPTION_DEFUN_]m4_bpatsubst(m4_toupper([$1__$2]), [[^A-Z0-9_]], [_])]) - - -# LT_OPTION_DEFINE(MACRO-NAME, OPTION-NAME, CODE) -# ----------------------------------------------- -m4_define([LT_OPTION_DEFINE], -[m4_define(_LT_MANGLE_DEFUN([$1], [$2]), [$3])[]dnl -])# LT_OPTION_DEFINE - - -# dlopen -# ------ -LT_OPTION_DEFINE([LT_INIT], [dlopen], [enable_dlopen=yes -]) - -AU_DEFUN([AC_LIBTOOL_DLOPEN], -[_LT_SET_OPTION([LT_INIT], [dlopen]) -AC_DIAGNOSE([obsolete], -[$0: Remove this warning and the call to _LT_SET_OPTION when you -put the `dlopen' option into LT_INIT's first parameter.]) -]) - -dnl aclocal-1.4 backwards compatibility: -dnl AC_DEFUN([AC_LIBTOOL_DLOPEN], []) - - -# win32-dll -# --------- -# Declare package support for building win32 dll's. -LT_OPTION_DEFINE([LT_INIT], [win32-dll], -[enable_win32_dll=yes - -case $host in -*-*-cygwin* | *-*-mingw* | *-*-pw32* | *-cegcc*) - AC_CHECK_TOOL(AS, as, false) - AC_CHECK_TOOL(DLLTOOL, dlltool, false) - AC_CHECK_TOOL(OBJDUMP, objdump, false) - ;; -esac - -test -z "$AS" && AS=as -_LT_DECL([], [AS], [0], [Assembler program])dnl - -test -z "$DLLTOOL" && DLLTOOL=dlltool -_LT_DECL([], [DLLTOOL], [0], [DLL creation program])dnl - -test -z "$OBJDUMP" && OBJDUMP=objdump -_LT_DECL([], [OBJDUMP], [0], [Object dumper program])dnl -])# win32-dll - -AU_DEFUN([AC_LIBTOOL_WIN32_DLL], -[AC_REQUIRE([AC_CANONICAL_HOST])dnl -_LT_SET_OPTION([LT_INIT], [win32-dll]) -AC_DIAGNOSE([obsolete], -[$0: Remove this warning and the call to _LT_SET_OPTION when you -put the `win32-dll' option into LT_INIT's first parameter.]) -]) - -dnl aclocal-1.4 backwards compatibility: -dnl AC_DEFUN([AC_LIBTOOL_WIN32_DLL], []) - - -# _LT_ENABLE_SHARED([DEFAULT]) -# ---------------------------- -# implement the --enable-shared flag, and supports the `shared' and -# `disable-shared' LT_INIT options. -# DEFAULT is either `yes' or `no'. If omitted, it defaults to `yes'. -m4_define([_LT_ENABLE_SHARED], -[m4_define([_LT_ENABLE_SHARED_DEFAULT], [m4_if($1, no, no, yes)])dnl -AC_ARG_ENABLE([shared], - [AS_HELP_STRING([--enable-shared@<:@=PKGS@:>@], - [build shared libraries @<:@default=]_LT_ENABLE_SHARED_DEFAULT[@:>@])], - [p=${PACKAGE-default} - case $enableval in - yes) enable_shared=yes ;; - no) enable_shared=no ;; - *) - enable_shared=no - # Look at the argument we got. We use all the common list separators. - lt_save_ifs="$IFS"; IFS="${IFS}$PATH_SEPARATOR," - for pkg in $enableval; do - IFS="$lt_save_ifs" - if test "X$pkg" = "X$p"; then - enable_shared=yes - fi - done - IFS="$lt_save_ifs" - ;; - esac], - [enable_shared=]_LT_ENABLE_SHARED_DEFAULT) - - _LT_DECL([build_libtool_libs], [enable_shared], [0], - [Whether or not to build shared libraries]) -])# _LT_ENABLE_SHARED - -LT_OPTION_DEFINE([LT_INIT], [shared], [_LT_ENABLE_SHARED([yes])]) -LT_OPTION_DEFINE([LT_INIT], [disable-shared], [_LT_ENABLE_SHARED([no])]) - -# Old names: -AC_DEFUN([AC_ENABLE_SHARED], -[_LT_SET_OPTION([LT_INIT], m4_if([$1], [no], [disable-])[shared]) -]) - -AC_DEFUN([AC_DISABLE_SHARED], -[_LT_SET_OPTION([LT_INIT], [disable-shared]) -]) - -AU_DEFUN([AM_ENABLE_SHARED], [AC_ENABLE_SHARED($@)]) -AU_DEFUN([AM_DISABLE_SHARED], [AC_DISABLE_SHARED($@)]) - -dnl aclocal-1.4 backwards compatibility: -dnl AC_DEFUN([AM_ENABLE_SHARED], []) -dnl AC_DEFUN([AM_DISABLE_SHARED], []) - - - -# _LT_ENABLE_STATIC([DEFAULT]) -# ---------------------------- -# implement the --enable-static flag, and support the `static' and -# `disable-static' LT_INIT options. -# DEFAULT is either `yes' or `no'. If omitted, it defaults to `yes'. -m4_define([_LT_ENABLE_STATIC], -[m4_define([_LT_ENABLE_STATIC_DEFAULT], [m4_if($1, no, no, yes)])dnl -AC_ARG_ENABLE([static], - [AS_HELP_STRING([--enable-static@<:@=PKGS@:>@], - [build static libraries @<:@default=]_LT_ENABLE_STATIC_DEFAULT[@:>@])], - [p=${PACKAGE-default} - case $enableval in - yes) enable_static=yes ;; - no) enable_static=no ;; - *) - enable_static=no - # Look at the argument we got. We use all the common list separators. - lt_save_ifs="$IFS"; IFS="${IFS}$PATH_SEPARATOR," - for pkg in $enableval; do - IFS="$lt_save_ifs" - if test "X$pkg" = "X$p"; then - enable_static=yes - fi - done - IFS="$lt_save_ifs" - ;; - esac], - [enable_static=]_LT_ENABLE_STATIC_DEFAULT) - - _LT_DECL([build_old_libs], [enable_static], [0], - [Whether or not to build static libraries]) -])# _LT_ENABLE_STATIC - -LT_OPTION_DEFINE([LT_INIT], [static], [_LT_ENABLE_STATIC([yes])]) -LT_OPTION_DEFINE([LT_INIT], [disable-static], [_LT_ENABLE_STATIC([no])]) - -# Old names: -AC_DEFUN([AC_ENABLE_STATIC], -[_LT_SET_OPTION([LT_INIT], m4_if([$1], [no], [disable-])[static]) -]) - -AC_DEFUN([AC_DISABLE_STATIC], -[_LT_SET_OPTION([LT_INIT], [disable-static]) -]) - -AU_DEFUN([AM_ENABLE_STATIC], [AC_ENABLE_STATIC($@)]) -AU_DEFUN([AM_DISABLE_STATIC], [AC_DISABLE_STATIC($@)]) - -dnl aclocal-1.4 backwards compatibility: -dnl AC_DEFUN([AM_ENABLE_STATIC], []) -dnl AC_DEFUN([AM_DISABLE_STATIC], []) - - - -# _LT_ENABLE_FAST_INSTALL([DEFAULT]) -# ---------------------------------- -# implement the --enable-fast-install flag, and support the `fast-install' -# and `disable-fast-install' LT_INIT options. -# DEFAULT is either `yes' or `no'. If omitted, it defaults to `yes'. -m4_define([_LT_ENABLE_FAST_INSTALL], -[m4_define([_LT_ENABLE_FAST_INSTALL_DEFAULT], [m4_if($1, no, no, yes)])dnl -AC_ARG_ENABLE([fast-install], - [AS_HELP_STRING([--enable-fast-install@<:@=PKGS@:>@], - [optimize for fast installation @<:@default=]_LT_ENABLE_FAST_INSTALL_DEFAULT[@:>@])], - [p=${PACKAGE-default} - case $enableval in - yes) enable_fast_install=yes ;; - no) enable_fast_install=no ;; - *) - enable_fast_install=no - # Look at the argument we got. We use all the common list separators. - lt_save_ifs="$IFS"; IFS="${IFS}$PATH_SEPARATOR," - for pkg in $enableval; do - IFS="$lt_save_ifs" - if test "X$pkg" = "X$p"; then - enable_fast_install=yes - fi - done - IFS="$lt_save_ifs" - ;; - esac], - [enable_fast_install=]_LT_ENABLE_FAST_INSTALL_DEFAULT) - -_LT_DECL([fast_install], [enable_fast_install], [0], - [Whether or not to optimize for fast installation])dnl -])# _LT_ENABLE_FAST_INSTALL - -LT_OPTION_DEFINE([LT_INIT], [fast-install], [_LT_ENABLE_FAST_INSTALL([yes])]) -LT_OPTION_DEFINE([LT_INIT], [disable-fast-install], [_LT_ENABLE_FAST_INSTALL([no])]) - -# Old names: -AU_DEFUN([AC_ENABLE_FAST_INSTALL], -[_LT_SET_OPTION([LT_INIT], m4_if([$1], [no], [disable-])[fast-install]) -AC_DIAGNOSE([obsolete], -[$0: Remove this warning and the call to _LT_SET_OPTION when you put -the `fast-install' option into LT_INIT's first parameter.]) -]) - -AU_DEFUN([AC_DISABLE_FAST_INSTALL], -[_LT_SET_OPTION([LT_INIT], [disable-fast-install]) -AC_DIAGNOSE([obsolete], -[$0: Remove this warning and the call to _LT_SET_OPTION when you put -the `disable-fast-install' option into LT_INIT's first parameter.]) -]) - -dnl aclocal-1.4 backwards compatibility: -dnl AC_DEFUN([AC_ENABLE_FAST_INSTALL], []) -dnl AC_DEFUN([AM_DISABLE_FAST_INSTALL], []) - - -# _LT_WITH_PIC([MODE]) -# -------------------- -# implement the --with-pic flag, and support the `pic-only' and `no-pic' -# LT_INIT options. -# MODE is either `yes' or `no'. If omitted, it defaults to `both'. -m4_define([_LT_WITH_PIC], -[AC_ARG_WITH([pic], - [AS_HELP_STRING([--with-pic], - [try to use only PIC/non-PIC objects @<:@default=use both@:>@])], - [pic_mode="$withval"], - [pic_mode=default]) - -test -z "$pic_mode" && pic_mode=m4_default([$1], [default]) - -_LT_DECL([], [pic_mode], [0], [What type of objects to build])dnl -])# _LT_WITH_PIC - -LT_OPTION_DEFINE([LT_INIT], [pic-only], [_LT_WITH_PIC([yes])]) -LT_OPTION_DEFINE([LT_INIT], [no-pic], [_LT_WITH_PIC([no])]) - -# Old name: -AU_DEFUN([AC_LIBTOOL_PICMODE], -[_LT_SET_OPTION([LT_INIT], [pic-only]) -AC_DIAGNOSE([obsolete], -[$0: Remove this warning and the call to _LT_SET_OPTION when you -put the `pic-only' option into LT_INIT's first parameter.]) -]) - -dnl aclocal-1.4 backwards compatibility: -dnl AC_DEFUN([AC_LIBTOOL_PICMODE], []) - -## ----------------- ## -## LTDL_INIT Options ## -## ----------------- ## - -m4_define([_LTDL_MODE], []) -LT_OPTION_DEFINE([LTDL_INIT], [nonrecursive], - [m4_define([_LTDL_MODE], [nonrecursive])]) -LT_OPTION_DEFINE([LTDL_INIT], [recursive], - [m4_define([_LTDL_MODE], [recursive])]) -LT_OPTION_DEFINE([LTDL_INIT], [subproject], - [m4_define([_LTDL_MODE], [subproject])]) - -m4_define([_LTDL_TYPE], []) -LT_OPTION_DEFINE([LTDL_INIT], [installable], - [m4_define([_LTDL_TYPE], [installable])]) -LT_OPTION_DEFINE([LTDL_INIT], [convenience], - [m4_define([_LTDL_TYPE], [convenience])]) diff --git a/test/test-automation/acinclude/ltsugar.m4 b/test/test-automation/acinclude/ltsugar.m4 deleted file mode 100644 index 9000a057d..000000000 --- a/test/test-automation/acinclude/ltsugar.m4 +++ /dev/null @@ -1,123 +0,0 @@ -# ltsugar.m4 -- libtool m4 base layer. -*-Autoconf-*- -# -# Copyright (C) 2004, 2005, 2007, 2008 Free Software Foundation, Inc. -# Written by Gary V. Vaughan, 2004 -# -# This file is free software; the Free Software Foundation gives -# unlimited permission to copy and/or distribute it, with or without -# modifications, as long as this notice is preserved. - -# serial 6 ltsugar.m4 - -# This is to help aclocal find these macros, as it can't see m4_define. -AC_DEFUN([LTSUGAR_VERSION], [m4_if([0.1])]) - - -# lt_join(SEP, ARG1, [ARG2...]) -# ----------------------------- -# Produce ARG1SEPARG2...SEPARGn, omitting [] arguments and their -# associated separator. -# Needed until we can rely on m4_join from Autoconf 2.62, since all earlier -# versions in m4sugar had bugs. -m4_define([lt_join], -[m4_if([$#], [1], [], - [$#], [2], [[$2]], - [m4_if([$2], [], [], [[$2]_])$0([$1], m4_shift(m4_shift($@)))])]) -m4_define([_lt_join], -[m4_if([$#$2], [2], [], - [m4_if([$2], [], [], [[$1$2]])$0([$1], m4_shift(m4_shift($@)))])]) - - -# lt_car(LIST) -# lt_cdr(LIST) -# ------------ -# Manipulate m4 lists. -# These macros are necessary as long as will still need to support -# Autoconf-2.59 which quotes differently. -m4_define([lt_car], [[$1]]) -m4_define([lt_cdr], -[m4_if([$#], 0, [m4_fatal([$0: cannot be called without arguments])], - [$#], 1, [], - [m4_dquote(m4_shift($@))])]) -m4_define([lt_unquote], $1) - - -# lt_append(MACRO-NAME, STRING, [SEPARATOR]) -# ------------------------------------------ -# Redefine MACRO-NAME to hold its former content plus `SEPARATOR'`STRING'. -# Note that neither SEPARATOR nor STRING are expanded; they are appended -# to MACRO-NAME as is (leaving the expansion for when MACRO-NAME is invoked). -# No SEPARATOR is output if MACRO-NAME was previously undefined (different -# than defined and empty). -# -# This macro is needed until we can rely on Autoconf 2.62, since earlier -# versions of m4sugar mistakenly expanded SEPARATOR but not STRING. -m4_define([lt_append], -[m4_define([$1], - m4_ifdef([$1], [m4_defn([$1])[$3]])[$2])]) - - - -# lt_combine(SEP, PREFIX-LIST, INFIX, SUFFIX1, [SUFFIX2...]) -# ---------------------------------------------------------- -# Produce a SEP delimited list of all paired combinations of elements of -# PREFIX-LIST with SUFFIX1 through SUFFIXn. Each element of the list -# has the form PREFIXmINFIXSUFFIXn. -# Needed until we can rely on m4_combine added in Autoconf 2.62. -m4_define([lt_combine], -[m4_if(m4_eval([$# > 3]), [1], - [m4_pushdef([_Lt_sep], [m4_define([_Lt_sep], m4_defn([lt_car]))])]]dnl -[[m4_foreach([_Lt_prefix], [$2], - [m4_foreach([_Lt_suffix], - ]m4_dquote(m4_dquote(m4_shift(m4_shift(m4_shift($@)))))[, - [_Lt_sep([$1])[]m4_defn([_Lt_prefix])[$3]m4_defn([_Lt_suffix])])])])]) - - -# lt_if_append_uniq(MACRO-NAME, VARNAME, [SEPARATOR], [UNIQ], [NOT-UNIQ]) -# ----------------------------------------------------------------------- -# Iff MACRO-NAME does not yet contain VARNAME, then append it (delimited -# by SEPARATOR if supplied) and expand UNIQ, else NOT-UNIQ. -m4_define([lt_if_append_uniq], -[m4_ifdef([$1], - [m4_if(m4_index([$3]m4_defn([$1])[$3], [$3$2$3]), [-1], - [lt_append([$1], [$2], [$3])$4], - [$5])], - [lt_append([$1], [$2], [$3])$4])]) - - -# lt_dict_add(DICT, KEY, VALUE) -# ----------------------------- -m4_define([lt_dict_add], -[m4_define([$1($2)], [$3])]) - - -# lt_dict_add_subkey(DICT, KEY, SUBKEY, VALUE) -# -------------------------------------------- -m4_define([lt_dict_add_subkey], -[m4_define([$1($2:$3)], [$4])]) - - -# lt_dict_fetch(DICT, KEY, [SUBKEY]) -# ---------------------------------- -m4_define([lt_dict_fetch], -[m4_ifval([$3], - m4_ifdef([$1($2:$3)], [m4_defn([$1($2:$3)])]), - m4_ifdef([$1($2)], [m4_defn([$1($2)])]))]) - - -# lt_if_dict_fetch(DICT, KEY, [SUBKEY], VALUE, IF-TRUE, [IF-FALSE]) -# ----------------------------------------------------------------- -m4_define([lt_if_dict_fetch], -[m4_if(lt_dict_fetch([$1], [$2], [$3]), [$4], - [$5], - [$6])]) - - -# lt_dict_filter(DICT, [SUBKEY], VALUE, [SEPARATOR], KEY, [...]) -# -------------------------------------------------------------- -m4_define([lt_dict_filter], -[m4_if([$5], [], [], - [lt_join(m4_quote(m4_default([$4], [[, ]])), - lt_unquote(m4_split(m4_normalize(m4_foreach(_Lt_key, lt_car([m4_shiftn(4, $@)]), - [lt_if_dict_fetch([$1], _Lt_key, [$2], [$3], [_Lt_key ])])))))])[]dnl -]) diff --git a/test/test-automation/acinclude/ltversion.m4 b/test/test-automation/acinclude/ltversion.m4 deleted file mode 100644 index f3c530980..000000000 --- a/test/test-automation/acinclude/ltversion.m4 +++ /dev/null @@ -1,23 +0,0 @@ -# ltversion.m4 -- version numbers -*- Autoconf -*- -# -# Copyright (C) 2004 Free Software Foundation, Inc. -# Written by Scott James Remnant, 2004 -# -# This file is free software; the Free Software Foundation gives -# unlimited permission to copy and/or distribute it, with or without -# modifications, as long as this notice is preserved. - -# Generated from ltversion.in. - -# serial 3017 ltversion.m4 -# This file is part of GNU Libtool - -m4_define([LT_PACKAGE_VERSION], [2.2.6b]) -m4_define([LT_PACKAGE_REVISION], [1.3017]) - -AC_DEFUN([LTVERSION_VERSION], -[macro_version='2.2.6b' -macro_revision='1.3017' -_LT_DECL(, macro_version, 0, [Which release of libtool.m4 was used?]) -_LT_DECL(, macro_revision, 0) -]) diff --git a/test/test-automation/acinclude/lt~obsolete.m4 b/test/test-automation/acinclude/lt~obsolete.m4 deleted file mode 100644 index 637bb2066..000000000 --- a/test/test-automation/acinclude/lt~obsolete.m4 +++ /dev/null @@ -1,92 +0,0 @@ -# lt~obsolete.m4 -- aclocal satisfying obsolete definitions. -*-Autoconf-*- -# -# Copyright (C) 2004, 2005, 2007 Free Software Foundation, Inc. -# Written by Scott James Remnant, 2004. -# -# This file is free software; the Free Software Foundation gives -# unlimited permission to copy and/or distribute it, with or without -# modifications, as long as this notice is preserved. - -# serial 4 lt~obsolete.m4 - -# These exist entirely to fool aclocal when bootstrapping libtool. -# -# In the past libtool.m4 has provided macros via AC_DEFUN (or AU_DEFUN) -# which have later been changed to m4_define as they aren't part of the -# exported API, or moved to Autoconf or Automake where they belong. -# -# The trouble is, aclocal is a bit thick. It'll see the old AC_DEFUN -# in /usr/share/aclocal/libtool.m4 and remember it, then when it sees us -# using a macro with the same name in our local m4/libtool.m4 it'll -# pull the old libtool.m4 in (it doesn't see our shiny new m4_define -# and doesn't know about Autoconf macros at all.) -# -# So we provide this file, which has a silly filename so it's always -# included after everything else. This provides aclocal with the -# AC_DEFUNs it wants, but when m4 processes it, it doesn't do anything -# because those macros already exist, or will be overwritten later. -# We use AC_DEFUN over AU_DEFUN for compatibility with aclocal-1.6. -# -# Anytime we withdraw an AC_DEFUN or AU_DEFUN, remember to add it here. -# Yes, that means every name once taken will need to remain here until -# we give up compatibility with versions before 1.7, at which point -# we need to keep only those names which we still refer to. - -# This is to help aclocal find these macros, as it can't see m4_define. -AC_DEFUN([LTOBSOLETE_VERSION], [m4_if([1])]) - -m4_ifndef([AC_LIBTOOL_LINKER_OPTION], [AC_DEFUN([AC_LIBTOOL_LINKER_OPTION])]) -m4_ifndef([AC_PROG_EGREP], [AC_DEFUN([AC_PROG_EGREP])]) -m4_ifndef([_LT_AC_PROG_ECHO_BACKSLASH], [AC_DEFUN([_LT_AC_PROG_ECHO_BACKSLASH])]) -m4_ifndef([_LT_AC_SHELL_INIT], [AC_DEFUN([_LT_AC_SHELL_INIT])]) -m4_ifndef([_LT_AC_SYS_LIBPATH_AIX], [AC_DEFUN([_LT_AC_SYS_LIBPATH_AIX])]) -m4_ifndef([_LT_PROG_LTMAIN], [AC_DEFUN([_LT_PROG_LTMAIN])]) -m4_ifndef([_LT_AC_TAGVAR], [AC_DEFUN([_LT_AC_TAGVAR])]) -m4_ifndef([AC_LTDL_ENABLE_INSTALL], [AC_DEFUN([AC_LTDL_ENABLE_INSTALL])]) -m4_ifndef([AC_LTDL_PREOPEN], [AC_DEFUN([AC_LTDL_PREOPEN])]) -m4_ifndef([_LT_AC_SYS_COMPILER], [AC_DEFUN([_LT_AC_SYS_COMPILER])]) -m4_ifndef([_LT_AC_LOCK], [AC_DEFUN([_LT_AC_LOCK])]) -m4_ifndef([AC_LIBTOOL_SYS_OLD_ARCHIVE], [AC_DEFUN([AC_LIBTOOL_SYS_OLD_ARCHIVE])]) -m4_ifndef([_LT_AC_TRY_DLOPEN_SELF], [AC_DEFUN([_LT_AC_TRY_DLOPEN_SELF])]) -m4_ifndef([AC_LIBTOOL_PROG_CC_C_O], [AC_DEFUN([AC_LIBTOOL_PROG_CC_C_O])]) -m4_ifndef([AC_LIBTOOL_SYS_HARD_LINK_LOCKS], [AC_DEFUN([AC_LIBTOOL_SYS_HARD_LINK_LOCKS])]) -m4_ifndef([AC_LIBTOOL_OBJDIR], [AC_DEFUN([AC_LIBTOOL_OBJDIR])]) -m4_ifndef([AC_LTDL_OBJDIR], [AC_DEFUN([AC_LTDL_OBJDIR])]) -m4_ifndef([AC_LIBTOOL_PROG_LD_HARDCODE_LIBPATH], [AC_DEFUN([AC_LIBTOOL_PROG_LD_HARDCODE_LIBPATH])]) -m4_ifndef([AC_LIBTOOL_SYS_LIB_STRIP], [AC_DEFUN([AC_LIBTOOL_SYS_LIB_STRIP])]) -m4_ifndef([AC_PATH_MAGIC], [AC_DEFUN([AC_PATH_MAGIC])]) -m4_ifndef([AC_PROG_LD_GNU], [AC_DEFUN([AC_PROG_LD_GNU])]) -m4_ifndef([AC_PROG_LD_RELOAD_FLAG], [AC_DEFUN([AC_PROG_LD_RELOAD_FLAG])]) -m4_ifndef([AC_DEPLIBS_CHECK_METHOD], [AC_DEFUN([AC_DEPLIBS_CHECK_METHOD])]) -m4_ifndef([AC_LIBTOOL_PROG_COMPILER_NO_RTTI], [AC_DEFUN([AC_LIBTOOL_PROG_COMPILER_NO_RTTI])]) -m4_ifndef([AC_LIBTOOL_SYS_GLOBAL_SYMBOL_PIPE], [AC_DEFUN([AC_LIBTOOL_SYS_GLOBAL_SYMBOL_PIPE])]) -m4_ifndef([AC_LIBTOOL_PROG_COMPILER_PIC], [AC_DEFUN([AC_LIBTOOL_PROG_COMPILER_PIC])]) -m4_ifndef([AC_LIBTOOL_PROG_LD_SHLIBS], [AC_DEFUN([AC_LIBTOOL_PROG_LD_SHLIBS])]) -m4_ifndef([AC_LIBTOOL_POSTDEP_PREDEP], [AC_DEFUN([AC_LIBTOOL_POSTDEP_PREDEP])]) -m4_ifndef([LT_AC_PROG_EGREP], [AC_DEFUN([LT_AC_PROG_EGREP])]) -m4_ifndef([LT_AC_PROG_SED], [AC_DEFUN([LT_AC_PROG_SED])]) -m4_ifndef([_LT_CC_BASENAME], [AC_DEFUN([_LT_CC_BASENAME])]) -m4_ifndef([_LT_COMPILER_BOILERPLATE], [AC_DEFUN([_LT_COMPILER_BOILERPLATE])]) -m4_ifndef([_LT_LINKER_BOILERPLATE], [AC_DEFUN([_LT_LINKER_BOILERPLATE])]) -m4_ifndef([_AC_PROG_LIBTOOL], [AC_DEFUN([_AC_PROG_LIBTOOL])]) -m4_ifndef([AC_LIBTOOL_SETUP], [AC_DEFUN([AC_LIBTOOL_SETUP])]) -m4_ifndef([_LT_AC_CHECK_DLFCN], [AC_DEFUN([_LT_AC_CHECK_DLFCN])]) -m4_ifndef([AC_LIBTOOL_SYS_DYNAMIC_LINKER], [AC_DEFUN([AC_LIBTOOL_SYS_DYNAMIC_LINKER])]) -m4_ifndef([_LT_AC_TAGCONFIG], [AC_DEFUN([_LT_AC_TAGCONFIG])]) -m4_ifndef([AC_DISABLE_FAST_INSTALL], [AC_DEFUN([AC_DISABLE_FAST_INSTALL])]) -m4_ifndef([_LT_AC_LANG_CXX], [AC_DEFUN([_LT_AC_LANG_CXX])]) -m4_ifndef([_LT_AC_LANG_F77], [AC_DEFUN([_LT_AC_LANG_F77])]) -m4_ifndef([_LT_AC_LANG_GCJ], [AC_DEFUN([_LT_AC_LANG_GCJ])]) -m4_ifndef([AC_LIBTOOL_RC], [AC_DEFUN([AC_LIBTOOL_RC])]) -m4_ifndef([AC_LIBTOOL_LANG_C_CONFIG], [AC_DEFUN([AC_LIBTOOL_LANG_C_CONFIG])]) -m4_ifndef([_LT_AC_LANG_C_CONFIG], [AC_DEFUN([_LT_AC_LANG_C_CONFIG])]) -m4_ifndef([AC_LIBTOOL_LANG_CXX_CONFIG], [AC_DEFUN([AC_LIBTOOL_LANG_CXX_CONFIG])]) -m4_ifndef([_LT_AC_LANG_CXX_CONFIG], [AC_DEFUN([_LT_AC_LANG_CXX_CONFIG])]) -m4_ifndef([AC_LIBTOOL_LANG_F77_CONFIG], [AC_DEFUN([AC_LIBTOOL_LANG_F77_CONFIG])]) -m4_ifndef([_LT_AC_LANG_F77_CONFIG], [AC_DEFUN([_LT_AC_LANG_F77_CONFIG])]) -m4_ifndef([AC_LIBTOOL_LANG_GCJ_CONFIG], [AC_DEFUN([AC_LIBTOOL_LANG_GCJ_CONFIG])]) -m4_ifndef([_LT_AC_LANG_GCJ_CONFIG], [AC_DEFUN([_LT_AC_LANG_GCJ_CONFIG])]) -m4_ifndef([AC_LIBTOOL_LANG_RC_CONFIG], [AC_DEFUN([AC_LIBTOOL_LANG_RC_CONFIG])]) -m4_ifndef([_LT_AC_LANG_RC_CONFIG], [AC_DEFUN([_LT_AC_LANG_RC_CONFIG])]) -m4_ifndef([AC_LIBTOOL_CONFIG], [AC_DEFUN([AC_LIBTOOL_CONFIG])]) -m4_ifndef([_LT_AC_FILE_LTDLL_C], [AC_DEFUN([_LT_AC_FILE_LTDLL_C])]) diff --git a/test/test-automation/aclocal.m4 b/test/test-automation/aclocal.m4 deleted file mode 100644 index b8717a5aa..000000000 --- a/test/test-automation/aclocal.m4 +++ /dev/null @@ -1,991 +0,0 @@ -# generated automatically by aclocal 1.11.1 -*- Autoconf -*- - -# Copyright (C) 1996, 1997, 1998, 1999, 2000, 2001, 2002, 2003, 2004, -# 2005, 2006, 2007, 2008, 2009 Free Software Foundation, Inc. -# This file is free software; the Free Software Foundation -# gives unlimited permission to copy and/or distribute it, -# with or without modifications, as long as this notice is preserved. - -# This program is distributed in the hope that it will be useful, -# but WITHOUT ANY WARRANTY, to the extent permitted by law; without -# even the implied warranty of MERCHANTABILITY or FITNESS FOR A -# PARTICULAR PURPOSE. - -m4_ifndef([AC_AUTOCONF_VERSION], - [m4_copy([m4_PACKAGE_VERSION], [AC_AUTOCONF_VERSION])])dnl -m4_if(m4_defn([AC_AUTOCONF_VERSION]), [2.65],, -[m4_warning([this file was generated for autoconf 2.65. -You have another version of autoconf. It may work, but is not guaranteed to. -If you have problems, you may need to regenerate the build system entirely. -To do so, use the procedure documented by the package, typically `autoreconf'.])]) - -# Copyright (C) 2002, 2003, 2005, 2006, 2007, 2008 Free Software Foundation, Inc. -# -# This file is free software; the Free Software Foundation -# gives unlimited permission to copy and/or distribute it, -# with or without modifications, as long as this notice is preserved. - -# AM_AUTOMAKE_VERSION(VERSION) -# ---------------------------- -# Automake X.Y traces this macro to ensure aclocal.m4 has been -# generated from the m4 files accompanying Automake X.Y. -# (This private macro should not be called outside this file.) -AC_DEFUN([AM_AUTOMAKE_VERSION], -[am__api_version='1.11' -dnl Some users find AM_AUTOMAKE_VERSION and mistake it for a way to -dnl require some minimum version. Point them to the right macro. -m4_if([$1], [1.11.1], [], - [AC_FATAL([Do not call $0, use AM_INIT_AUTOMAKE([$1]).])])dnl -]) - -# _AM_AUTOCONF_VERSION(VERSION) -# ----------------------------- -# aclocal traces this macro to find the Autoconf version. -# This is a private macro too. Using m4_define simplifies -# the logic in aclocal, which can simply ignore this definition. -m4_define([_AM_AUTOCONF_VERSION], []) - -# AM_SET_CURRENT_AUTOMAKE_VERSION -# ------------------------------- -# Call AM_AUTOMAKE_VERSION and AM_AUTOMAKE_VERSION so they can be traced. -# This function is AC_REQUIREd by AM_INIT_AUTOMAKE. -AC_DEFUN([AM_SET_CURRENT_AUTOMAKE_VERSION], -[AM_AUTOMAKE_VERSION([1.11.1])dnl -m4_ifndef([AC_AUTOCONF_VERSION], - [m4_copy([m4_PACKAGE_VERSION], [AC_AUTOCONF_VERSION])])dnl -_AM_AUTOCONF_VERSION(m4_defn([AC_AUTOCONF_VERSION]))]) - -# AM_AUX_DIR_EXPAND -*- Autoconf -*- - -# Copyright (C) 2001, 2003, 2005 Free Software Foundation, Inc. -# -# This file is free software; the Free Software Foundation -# gives unlimited permission to copy and/or distribute it, -# with or without modifications, as long as this notice is preserved. - -# For projects using AC_CONFIG_AUX_DIR([foo]), Autoconf sets -# $ac_aux_dir to `$srcdir/foo'. In other projects, it is set to -# `$srcdir', `$srcdir/..', or `$srcdir/../..'. -# -# Of course, Automake must honor this variable whenever it calls a -# tool from the auxiliary directory. The problem is that $srcdir (and -# therefore $ac_aux_dir as well) can be either absolute or relative, -# depending on how configure is run. This is pretty annoying, since -# it makes $ac_aux_dir quite unusable in subdirectories: in the top -# source directory, any form will work fine, but in subdirectories a -# relative path needs to be adjusted first. -# -# $ac_aux_dir/missing -# fails when called from a subdirectory if $ac_aux_dir is relative -# $top_srcdir/$ac_aux_dir/missing -# fails if $ac_aux_dir is absolute, -# fails when called from a subdirectory in a VPATH build with -# a relative $ac_aux_dir -# -# The reason of the latter failure is that $top_srcdir and $ac_aux_dir -# are both prefixed by $srcdir. In an in-source build this is usually -# harmless because $srcdir is `.', but things will broke when you -# start a VPATH build or use an absolute $srcdir. -# -# So we could use something similar to $top_srcdir/$ac_aux_dir/missing, -# iff we strip the leading $srcdir from $ac_aux_dir. That would be: -# am_aux_dir='\$(top_srcdir)/'`expr "$ac_aux_dir" : "$srcdir//*\(.*\)"` -# and then we would define $MISSING as -# MISSING="\${SHELL} $am_aux_dir/missing" -# This will work as long as MISSING is not called from configure, because -# unfortunately $(top_srcdir) has no meaning in configure. -# However there are other variables, like CC, which are often used in -# configure, and could therefore not use this "fixed" $ac_aux_dir. -# -# Another solution, used here, is to always expand $ac_aux_dir to an -# absolute PATH. The drawback is that using absolute paths prevent a -# configured tree to be moved without reconfiguration. - -AC_DEFUN([AM_AUX_DIR_EXPAND], -[dnl Rely on autoconf to set up CDPATH properly. -AC_PREREQ([2.50])dnl -# expand $ac_aux_dir to an absolute path -am_aux_dir=`cd $ac_aux_dir && pwd` -]) - -# AM_CONDITIONAL -*- Autoconf -*- - -# Copyright (C) 1997, 2000, 2001, 2003, 2004, 2005, 2006, 2008 -# Free Software Foundation, Inc. -# -# This file is free software; the Free Software Foundation -# gives unlimited permission to copy and/or distribute it, -# with or without modifications, as long as this notice is preserved. - -# serial 9 - -# AM_CONDITIONAL(NAME, SHELL-CONDITION) -# ------------------------------------- -# Define a conditional. -AC_DEFUN([AM_CONDITIONAL], -[AC_PREREQ(2.52)dnl - ifelse([$1], [TRUE], [AC_FATAL([$0: invalid condition: $1])], - [$1], [FALSE], [AC_FATAL([$0: invalid condition: $1])])dnl -AC_SUBST([$1_TRUE])dnl -AC_SUBST([$1_FALSE])dnl -_AM_SUBST_NOTMAKE([$1_TRUE])dnl -_AM_SUBST_NOTMAKE([$1_FALSE])dnl -m4_define([_AM_COND_VALUE_$1], [$2])dnl -if $2; then - $1_TRUE= - $1_FALSE='#' -else - $1_TRUE='#' - $1_FALSE= -fi -AC_CONFIG_COMMANDS_PRE( -[if test -z "${$1_TRUE}" && test -z "${$1_FALSE}"; then - AC_MSG_ERROR([[conditional "$1" was never defined. -Usually this means the macro was only invoked conditionally.]]) -fi])]) - -# Copyright (C) 1999, 2000, 2001, 2002, 2003, 2004, 2005, 2006, 2009 -# Free Software Foundation, Inc. -# -# This file is free software; the Free Software Foundation -# gives unlimited permission to copy and/or distribute it, -# with or without modifications, as long as this notice is preserved. - -# serial 10 - -# There are a few dirty hacks below to avoid letting `AC_PROG_CC' be -# written in clear, in which case automake, when reading aclocal.m4, -# will think it sees a *use*, and therefore will trigger all it's -# C support machinery. Also note that it means that autoscan, seeing -# CC etc. in the Makefile, will ask for an AC_PROG_CC use... - - -# _AM_DEPENDENCIES(NAME) -# ---------------------- -# See how the compiler implements dependency checking. -# NAME is "CC", "CXX", "GCJ", or "OBJC". -# We try a few techniques and use that to set a single cache variable. -# -# We don't AC_REQUIRE the corresponding AC_PROG_CC since the latter was -# modified to invoke _AM_DEPENDENCIES(CC); we would have a circular -# dependency, and given that the user is not expected to run this macro, -# just rely on AC_PROG_CC. -AC_DEFUN([_AM_DEPENDENCIES], -[AC_REQUIRE([AM_SET_DEPDIR])dnl -AC_REQUIRE([AM_OUTPUT_DEPENDENCY_COMMANDS])dnl -AC_REQUIRE([AM_MAKE_INCLUDE])dnl -AC_REQUIRE([AM_DEP_TRACK])dnl - -ifelse([$1], CC, [depcc="$CC" am_compiler_list=], - [$1], CXX, [depcc="$CXX" am_compiler_list=], - [$1], OBJC, [depcc="$OBJC" am_compiler_list='gcc3 gcc'], - [$1], UPC, [depcc="$UPC" am_compiler_list=], - [$1], GCJ, [depcc="$GCJ" am_compiler_list='gcc3 gcc'], - [depcc="$$1" am_compiler_list=]) - -AC_CACHE_CHECK([dependency style of $depcc], - [am_cv_$1_dependencies_compiler_type], -[if test -z "$AMDEP_TRUE" && test -f "$am_depcomp"; then - # We make a subdir and do the tests there. Otherwise we can end up - # making bogus files that we don't know about and never remove. For - # instance it was reported that on HP-UX the gcc test will end up - # making a dummy file named `D' -- because `-MD' means `put the output - # in D'. - mkdir conftest.dir - # Copy depcomp to subdir because otherwise we won't find it if we're - # using a relative directory. - cp "$am_depcomp" conftest.dir - cd conftest.dir - # We will build objects and dependencies in a subdirectory because - # it helps to detect inapplicable dependency modes. For instance - # both Tru64's cc and ICC support -MD to output dependencies as a - # side effect of compilation, but ICC will put the dependencies in - # the current directory while Tru64 will put them in the object - # directory. - mkdir sub - - am_cv_$1_dependencies_compiler_type=none - if test "$am_compiler_list" = ""; then - am_compiler_list=`sed -n ['s/^#*\([a-zA-Z0-9]*\))$/\1/p'] < ./depcomp` - fi - am__universal=false - m4_case([$1], [CC], - [case " $depcc " in #( - *\ -arch\ *\ -arch\ *) am__universal=true ;; - esac], - [CXX], - [case " $depcc " in #( - *\ -arch\ *\ -arch\ *) am__universal=true ;; - esac]) - - for depmode in $am_compiler_list; do - # Setup a source with many dependencies, because some compilers - # like to wrap large dependency lists on column 80 (with \), and - # we should not choose a depcomp mode which is confused by this. - # - # We need to recreate these files for each test, as the compiler may - # overwrite some of them when testing with obscure command lines. - # This happens at least with the AIX C compiler. - : > sub/conftest.c - for i in 1 2 3 4 5 6; do - echo '#include "conftst'$i'.h"' >> sub/conftest.c - # Using `: > sub/conftst$i.h' creates only sub/conftst1.h with - # Solaris 8's {/usr,}/bin/sh. - touch sub/conftst$i.h - done - echo "${am__include} ${am__quote}sub/conftest.Po${am__quote}" > confmf - - # We check with `-c' and `-o' for the sake of the "dashmstdout" - # mode. It turns out that the SunPro C++ compiler does not properly - # handle `-M -o', and we need to detect this. Also, some Intel - # versions had trouble with output in subdirs - am__obj=sub/conftest.${OBJEXT-o} - am__minus_obj="-o $am__obj" - case $depmode in - gcc) - # This depmode causes a compiler race in universal mode. - test "$am__universal" = false || continue - ;; - nosideeffect) - # after this tag, mechanisms are not by side-effect, so they'll - # only be used when explicitly requested - if test "x$enable_dependency_tracking" = xyes; then - continue - else - break - fi - ;; - msvisualcpp | msvcmsys) - # This compiler won't grok `-c -o', but also, the minuso test has - # not run yet. These depmodes are late enough in the game, and - # so weak that their functioning should not be impacted. - am__obj=conftest.${OBJEXT-o} - am__minus_obj= - ;; - none) break ;; - esac - if depmode=$depmode \ - source=sub/conftest.c object=$am__obj \ - depfile=sub/conftest.Po tmpdepfile=sub/conftest.TPo \ - $SHELL ./depcomp $depcc -c $am__minus_obj sub/conftest.c \ - >/dev/null 2>conftest.err && - grep sub/conftst1.h sub/conftest.Po > /dev/null 2>&1 && - grep sub/conftst6.h sub/conftest.Po > /dev/null 2>&1 && - grep $am__obj sub/conftest.Po > /dev/null 2>&1 && - ${MAKE-make} -s -f confmf > /dev/null 2>&1; then - # icc doesn't choke on unknown options, it will just issue warnings - # or remarks (even with -Werror). So we grep stderr for any message - # that says an option was ignored or not supported. - # When given -MP, icc 7.0 and 7.1 complain thusly: - # icc: Command line warning: ignoring option '-M'; no argument required - # The diagnosis changed in icc 8.0: - # icc: Command line remark: option '-MP' not supported - if (grep 'ignoring option' conftest.err || - grep 'not supported' conftest.err) >/dev/null 2>&1; then :; else - am_cv_$1_dependencies_compiler_type=$depmode - break - fi - fi - done - - cd .. - rm -rf conftest.dir -else - am_cv_$1_dependencies_compiler_type=none -fi -]) -AC_SUBST([$1DEPMODE], [depmode=$am_cv_$1_dependencies_compiler_type]) -AM_CONDITIONAL([am__fastdep$1], [ - test "x$enable_dependency_tracking" != xno \ - && test "$am_cv_$1_dependencies_compiler_type" = gcc3]) -]) - - -# AM_SET_DEPDIR -# ------------- -# Choose a directory name for dependency files. -# This macro is AC_REQUIREd in _AM_DEPENDENCIES -AC_DEFUN([AM_SET_DEPDIR], -[AC_REQUIRE([AM_SET_LEADING_DOT])dnl -AC_SUBST([DEPDIR], ["${am__leading_dot}deps"])dnl -]) - - -# AM_DEP_TRACK -# ------------ -AC_DEFUN([AM_DEP_TRACK], -[AC_ARG_ENABLE(dependency-tracking, -[ --disable-dependency-tracking speeds up one-time build - --enable-dependency-tracking do not reject slow dependency extractors]) -if test "x$enable_dependency_tracking" != xno; then - am_depcomp="$ac_aux_dir/depcomp" - AMDEPBACKSLASH='\' -fi -AM_CONDITIONAL([AMDEP], [test "x$enable_dependency_tracking" != xno]) -AC_SUBST([AMDEPBACKSLASH])dnl -_AM_SUBST_NOTMAKE([AMDEPBACKSLASH])dnl -]) - -# Generate code to set up dependency tracking. -*- Autoconf -*- - -# Copyright (C) 1999, 2000, 2001, 2002, 2003, 2004, 2005, 2008 -# Free Software Foundation, Inc. -# -# This file is free software; the Free Software Foundation -# gives unlimited permission to copy and/or distribute it, -# with or without modifications, as long as this notice is preserved. - -#serial 5 - -# _AM_OUTPUT_DEPENDENCY_COMMANDS -# ------------------------------ -AC_DEFUN([_AM_OUTPUT_DEPENDENCY_COMMANDS], -[{ - # Autoconf 2.62 quotes --file arguments for eval, but not when files - # are listed without --file. Let's play safe and only enable the eval - # if we detect the quoting. - case $CONFIG_FILES in - *\'*) eval set x "$CONFIG_FILES" ;; - *) set x $CONFIG_FILES ;; - esac - shift - for mf - do - # Strip MF so we end up with the name of the file. - mf=`echo "$mf" | sed -e 's/:.*$//'` - # Check whether this is an Automake generated Makefile or not. - # We used to match only the files named `Makefile.in', but - # some people rename them; so instead we look at the file content. - # Grep'ing the first line is not enough: some people post-process - # each Makefile.in and add a new line on top of each file to say so. - # Grep'ing the whole file is not good either: AIX grep has a line - # limit of 2048, but all sed's we know have understand at least 4000. - if sed -n 's,^#.*generated by automake.*,X,p' "$mf" | grep X >/dev/null 2>&1; then - dirpart=`AS_DIRNAME("$mf")` - else - continue - fi - # Extract the definition of DEPDIR, am__include, and am__quote - # from the Makefile without running `make'. - DEPDIR=`sed -n 's/^DEPDIR = //p' < "$mf"` - test -z "$DEPDIR" && continue - am__include=`sed -n 's/^am__include = //p' < "$mf"` - test -z "am__include" && continue - am__quote=`sed -n 's/^am__quote = //p' < "$mf"` - # When using ansi2knr, U may be empty or an underscore; expand it - U=`sed -n 's/^U = //p' < "$mf"` - # Find all dependency output files, they are included files with - # $(DEPDIR) in their names. We invoke sed twice because it is the - # simplest approach to changing $(DEPDIR) to its actual value in the - # expansion. - for file in `sed -n " - s/^$am__include $am__quote\(.*(DEPDIR).*\)$am__quote"'$/\1/p' <"$mf" | \ - sed -e 's/\$(DEPDIR)/'"$DEPDIR"'/g' -e 's/\$U/'"$U"'/g'`; do - # Make sure the directory exists. - test -f "$dirpart/$file" && continue - fdir=`AS_DIRNAME(["$file"])` - AS_MKDIR_P([$dirpart/$fdir]) - # echo "creating $dirpart/$file" - echo '# dummy' > "$dirpart/$file" - done - done -} -])# _AM_OUTPUT_DEPENDENCY_COMMANDS - - -# AM_OUTPUT_DEPENDENCY_COMMANDS -# ----------------------------- -# This macro should only be invoked once -- use via AC_REQUIRE. -# -# This code is only required when automatic dependency tracking -# is enabled. FIXME. This creates each `.P' file that we will -# need in order to bootstrap the dependency handling code. -AC_DEFUN([AM_OUTPUT_DEPENDENCY_COMMANDS], -[AC_CONFIG_COMMANDS([depfiles], - [test x"$AMDEP_TRUE" != x"" || _AM_OUTPUT_DEPENDENCY_COMMANDS], - [AMDEP_TRUE="$AMDEP_TRUE" ac_aux_dir="$ac_aux_dir"]) -]) - -# Do all the work for Automake. -*- Autoconf -*- - -# Copyright (C) 1996, 1997, 1998, 1999, 2000, 2001, 2002, 2003, 2004, -# 2005, 2006, 2008, 2009 Free Software Foundation, Inc. -# -# This file is free software; the Free Software Foundation -# gives unlimited permission to copy and/or distribute it, -# with or without modifications, as long as this notice is preserved. - -# serial 16 - -# This macro actually does too much. Some checks are only needed if -# your package does certain things. But this isn't really a big deal. - -# AM_INIT_AUTOMAKE(PACKAGE, VERSION, [NO-DEFINE]) -# AM_INIT_AUTOMAKE([OPTIONS]) -# ----------------------------------------------- -# The call with PACKAGE and VERSION arguments is the old style -# call (pre autoconf-2.50), which is being phased out. PACKAGE -# and VERSION should now be passed to AC_INIT and removed from -# the call to AM_INIT_AUTOMAKE. -# We support both call styles for the transition. After -# the next Automake release, Autoconf can make the AC_INIT -# arguments mandatory, and then we can depend on a new Autoconf -# release and drop the old call support. -AC_DEFUN([AM_INIT_AUTOMAKE], -[AC_PREREQ([2.62])dnl -dnl Autoconf wants to disallow AM_ names. We explicitly allow -dnl the ones we care about. -m4_pattern_allow([^AM_[A-Z]+FLAGS$])dnl -AC_REQUIRE([AM_SET_CURRENT_AUTOMAKE_VERSION])dnl -AC_REQUIRE([AC_PROG_INSTALL])dnl -if test "`cd $srcdir && pwd`" != "`pwd`"; then - # Use -I$(srcdir) only when $(srcdir) != ., so that make's output - # is not polluted with repeated "-I." - AC_SUBST([am__isrc], [' -I$(srcdir)'])_AM_SUBST_NOTMAKE([am__isrc])dnl - # test to see if srcdir already configured - if test -f $srcdir/config.status; then - AC_MSG_ERROR([source directory already configured; run "make distclean" there first]) - fi -fi - -# test whether we have cygpath -if test -z "$CYGPATH_W"; then - if (cygpath --version) >/dev/null 2>/dev/null; then - CYGPATH_W='cygpath -w' - else - CYGPATH_W=echo - fi -fi -AC_SUBST([CYGPATH_W]) - -# Define the identity of the package. -dnl Distinguish between old-style and new-style calls. -m4_ifval([$2], -[m4_ifval([$3], [_AM_SET_OPTION([no-define])])dnl - AC_SUBST([PACKAGE], [$1])dnl - AC_SUBST([VERSION], [$2])], -[_AM_SET_OPTIONS([$1])dnl -dnl Diagnose old-style AC_INIT with new-style AM_AUTOMAKE_INIT. -m4_if(m4_ifdef([AC_PACKAGE_NAME], 1)m4_ifdef([AC_PACKAGE_VERSION], 1), 11,, - [m4_fatal([AC_INIT should be called with package and version arguments])])dnl - AC_SUBST([PACKAGE], ['AC_PACKAGE_TARNAME'])dnl - AC_SUBST([VERSION], ['AC_PACKAGE_VERSION'])])dnl - -_AM_IF_OPTION([no-define],, -[AC_DEFINE_UNQUOTED(PACKAGE, "$PACKAGE", [Name of package]) - AC_DEFINE_UNQUOTED(VERSION, "$VERSION", [Version number of package])])dnl - -# Some tools Automake needs. -AC_REQUIRE([AM_SANITY_CHECK])dnl -AC_REQUIRE([AC_ARG_PROGRAM])dnl -AM_MISSING_PROG(ACLOCAL, aclocal-${am__api_version}) -AM_MISSING_PROG(AUTOCONF, autoconf) -AM_MISSING_PROG(AUTOMAKE, automake-${am__api_version}) -AM_MISSING_PROG(AUTOHEADER, autoheader) -AM_MISSING_PROG(MAKEINFO, makeinfo) -AC_REQUIRE([AM_PROG_INSTALL_SH])dnl -AC_REQUIRE([AM_PROG_INSTALL_STRIP])dnl -AC_REQUIRE([AM_PROG_MKDIR_P])dnl -# We need awk for the "check" target. The system "awk" is bad on -# some platforms. -AC_REQUIRE([AC_PROG_AWK])dnl -AC_REQUIRE([AC_PROG_MAKE_SET])dnl -AC_REQUIRE([AM_SET_LEADING_DOT])dnl -_AM_IF_OPTION([tar-ustar], [_AM_PROG_TAR([ustar])], - [_AM_IF_OPTION([tar-pax], [_AM_PROG_TAR([pax])], - [_AM_PROG_TAR([v7])])]) -_AM_IF_OPTION([no-dependencies],, -[AC_PROVIDE_IFELSE([AC_PROG_CC], - [_AM_DEPENDENCIES(CC)], - [define([AC_PROG_CC], - defn([AC_PROG_CC])[_AM_DEPENDENCIES(CC)])])dnl -AC_PROVIDE_IFELSE([AC_PROG_CXX], - [_AM_DEPENDENCIES(CXX)], - [define([AC_PROG_CXX], - defn([AC_PROG_CXX])[_AM_DEPENDENCIES(CXX)])])dnl -AC_PROVIDE_IFELSE([AC_PROG_OBJC], - [_AM_DEPENDENCIES(OBJC)], - [define([AC_PROG_OBJC], - defn([AC_PROG_OBJC])[_AM_DEPENDENCIES(OBJC)])])dnl -]) -_AM_IF_OPTION([silent-rules], [AC_REQUIRE([AM_SILENT_RULES])])dnl -dnl The `parallel-tests' driver may need to know about EXEEXT, so add the -dnl `am__EXEEXT' conditional if _AM_COMPILER_EXEEXT was seen. This macro -dnl is hooked onto _AC_COMPILER_EXEEXT early, see below. -AC_CONFIG_COMMANDS_PRE(dnl -[m4_provide_if([_AM_COMPILER_EXEEXT], - [AM_CONDITIONAL([am__EXEEXT], [test -n "$EXEEXT"])])])dnl -]) - -dnl Hook into `_AC_COMPILER_EXEEXT' early to learn its expansion. Do not -dnl add the conditional right here, as _AC_COMPILER_EXEEXT may be further -dnl mangled by Autoconf and run in a shell conditional statement. -m4_define([_AC_COMPILER_EXEEXT], -m4_defn([_AC_COMPILER_EXEEXT])[m4_provide([_AM_COMPILER_EXEEXT])]) - - -# When config.status generates a header, we must update the stamp-h file. -# This file resides in the same directory as the config header -# that is generated. The stamp files are numbered to have different names. - -# Autoconf calls _AC_AM_CONFIG_HEADER_HOOK (when defined) in the -# loop where config.status creates the headers, so we can generate -# our stamp files there. -AC_DEFUN([_AC_AM_CONFIG_HEADER_HOOK], -[# Compute $1's index in $config_headers. -_am_arg=$1 -_am_stamp_count=1 -for _am_header in $config_headers :; do - case $_am_header in - $_am_arg | $_am_arg:* ) - break ;; - * ) - _am_stamp_count=`expr $_am_stamp_count + 1` ;; - esac -done -echo "timestamp for $_am_arg" >`AS_DIRNAME(["$_am_arg"])`/stamp-h[]$_am_stamp_count]) - -# Copyright (C) 2001, 2003, 2005, 2008 Free Software Foundation, Inc. -# -# This file is free software; the Free Software Foundation -# gives unlimited permission to copy and/or distribute it, -# with or without modifications, as long as this notice is preserved. - -# AM_PROG_INSTALL_SH -# ------------------ -# Define $install_sh. -AC_DEFUN([AM_PROG_INSTALL_SH], -[AC_REQUIRE([AM_AUX_DIR_EXPAND])dnl -if test x"${install_sh}" != xset; then - case $am_aux_dir in - *\ * | *\ *) - install_sh="\${SHELL} '$am_aux_dir/install-sh'" ;; - *) - install_sh="\${SHELL} $am_aux_dir/install-sh" - esac -fi -AC_SUBST(install_sh)]) - -# Copyright (C) 2003, 2005 Free Software Foundation, Inc. -# -# This file is free software; the Free Software Foundation -# gives unlimited permission to copy and/or distribute it, -# with or without modifications, as long as this notice is preserved. - -# serial 2 - -# Check whether the underlying file-system supports filenames -# with a leading dot. For instance MS-DOS doesn't. -AC_DEFUN([AM_SET_LEADING_DOT], -[rm -rf .tst 2>/dev/null -mkdir .tst 2>/dev/null -if test -d .tst; then - am__leading_dot=. -else - am__leading_dot=_ -fi -rmdir .tst 2>/dev/null -AC_SUBST([am__leading_dot])]) - -# Check to see how 'make' treats includes. -*- Autoconf -*- - -# Copyright (C) 2001, 2002, 2003, 2005, 2009 Free Software Foundation, Inc. -# -# This file is free software; the Free Software Foundation -# gives unlimited permission to copy and/or distribute it, -# with or without modifications, as long as this notice is preserved. - -# serial 4 - -# AM_MAKE_INCLUDE() -# ----------------- -# Check to see how make treats includes. -AC_DEFUN([AM_MAKE_INCLUDE], -[am_make=${MAKE-make} -cat > confinc << 'END' -am__doit: - @echo this is the am__doit target -.PHONY: am__doit -END -# If we don't find an include directive, just comment out the code. -AC_MSG_CHECKING([for style of include used by $am_make]) -am__include="#" -am__quote= -_am_result=none -# First try GNU make style include. -echo "include confinc" > confmf -# Ignore all kinds of additional output from `make'. -case `$am_make -s -f confmf 2> /dev/null` in #( -*the\ am__doit\ target*) - am__include=include - am__quote= - _am_result=GNU - ;; -esac -# Now try BSD make style include. -if test "$am__include" = "#"; then - echo '.include "confinc"' > confmf - case `$am_make -s -f confmf 2> /dev/null` in #( - *the\ am__doit\ target*) - am__include=.include - am__quote="\"" - _am_result=BSD - ;; - esac -fi -AC_SUBST([am__include]) -AC_SUBST([am__quote]) -AC_MSG_RESULT([$_am_result]) -rm -f confinc confmf -]) - -# Copyright (C) 1999, 2000, 2001, 2003, 2004, 2005, 2008 -# Free Software Foundation, Inc. -# -# This file is free software; the Free Software Foundation -# gives unlimited permission to copy and/or distribute it, -# with or without modifications, as long as this notice is preserved. - -# serial 6 - -# AM_PROG_CC_C_O -# -------------- -# Like AC_PROG_CC_C_O, but changed for automake. -AC_DEFUN([AM_PROG_CC_C_O], -[AC_REQUIRE([AC_PROG_CC_C_O])dnl -AC_REQUIRE([AM_AUX_DIR_EXPAND])dnl -AC_REQUIRE_AUX_FILE([compile])dnl -# FIXME: we rely on the cache variable name because -# there is no other way. -set dummy $CC -am_cc=`echo $[2] | sed ['s/[^a-zA-Z0-9_]/_/g;s/^[0-9]/_/']` -eval am_t=\$ac_cv_prog_cc_${am_cc}_c_o -if test "$am_t" != yes; then - # Losing compiler, so override with the script. - # FIXME: It is wrong to rewrite CC. - # But if we don't then we get into trouble of one sort or another. - # A longer-term fix would be to have automake use am__CC in this case, - # and then we could set am__CC="\$(top_srcdir)/compile \$(CC)" - CC="$am_aux_dir/compile $CC" -fi -dnl Make sure AC_PROG_CC is never called again, or it will override our -dnl setting of CC. -m4_define([AC_PROG_CC], - [m4_fatal([AC_PROG_CC cannot be called after AM_PROG_CC_C_O])]) -]) - -# Fake the existence of programs that GNU maintainers use. -*- Autoconf -*- - -# Copyright (C) 1997, 1999, 2000, 2001, 2003, 2004, 2005, 2008 -# Free Software Foundation, Inc. -# -# This file is free software; the Free Software Foundation -# gives unlimited permission to copy and/or distribute it, -# with or without modifications, as long as this notice is preserved. - -# serial 6 - -# AM_MISSING_PROG(NAME, PROGRAM) -# ------------------------------ -AC_DEFUN([AM_MISSING_PROG], -[AC_REQUIRE([AM_MISSING_HAS_RUN]) -$1=${$1-"${am_missing_run}$2"} -AC_SUBST($1)]) - - -# AM_MISSING_HAS_RUN -# ------------------ -# Define MISSING if not defined so far and test if it supports --run. -# If it does, set am_missing_run to use it, otherwise, to nothing. -AC_DEFUN([AM_MISSING_HAS_RUN], -[AC_REQUIRE([AM_AUX_DIR_EXPAND])dnl -AC_REQUIRE_AUX_FILE([missing])dnl -if test x"${MISSING+set}" != xset; then - case $am_aux_dir in - *\ * | *\ *) - MISSING="\${SHELL} \"$am_aux_dir/missing\"" ;; - *) - MISSING="\${SHELL} $am_aux_dir/missing" ;; - esac -fi -# Use eval to expand $SHELL -if eval "$MISSING --run true"; then - am_missing_run="$MISSING --run " -else - am_missing_run= - AC_MSG_WARN([`missing' script is too old or missing]) -fi -]) - -# Copyright (C) 2003, 2004, 2005, 2006 Free Software Foundation, Inc. -# -# This file is free software; the Free Software Foundation -# gives unlimited permission to copy and/or distribute it, -# with or without modifications, as long as this notice is preserved. - -# AM_PROG_MKDIR_P -# --------------- -# Check for `mkdir -p'. -AC_DEFUN([AM_PROG_MKDIR_P], -[AC_PREREQ([2.60])dnl -AC_REQUIRE([AC_PROG_MKDIR_P])dnl -dnl Automake 1.8 to 1.9.6 used to define mkdir_p. We now use MKDIR_P, -dnl while keeping a definition of mkdir_p for backward compatibility. -dnl @MKDIR_P@ is magic: AC_OUTPUT adjusts its value for each Makefile. -dnl However we cannot define mkdir_p as $(MKDIR_P) for the sake of -dnl Makefile.ins that do not define MKDIR_P, so we do our own -dnl adjustment using top_builddir (which is defined more often than -dnl MKDIR_P). -AC_SUBST([mkdir_p], ["$MKDIR_P"])dnl -case $mkdir_p in - [[\\/$]]* | ?:[[\\/]]*) ;; - */*) mkdir_p="\$(top_builddir)/$mkdir_p" ;; -esac -]) - -# Helper functions for option handling. -*- Autoconf -*- - -# Copyright (C) 2001, 2002, 2003, 2005, 2008 Free Software Foundation, Inc. -# -# This file is free software; the Free Software Foundation -# gives unlimited permission to copy and/or distribute it, -# with or without modifications, as long as this notice is preserved. - -# serial 4 - -# _AM_MANGLE_OPTION(NAME) -# ----------------------- -AC_DEFUN([_AM_MANGLE_OPTION], -[[_AM_OPTION_]m4_bpatsubst($1, [[^a-zA-Z0-9_]], [_])]) - -# _AM_SET_OPTION(NAME) -# ------------------------------ -# Set option NAME. Presently that only means defining a flag for this option. -AC_DEFUN([_AM_SET_OPTION], -[m4_define(_AM_MANGLE_OPTION([$1]), 1)]) - -# _AM_SET_OPTIONS(OPTIONS) -# ---------------------------------- -# OPTIONS is a space-separated list of Automake options. -AC_DEFUN([_AM_SET_OPTIONS], -[m4_foreach_w([_AM_Option], [$1], [_AM_SET_OPTION(_AM_Option)])]) - -# _AM_IF_OPTION(OPTION, IF-SET, [IF-NOT-SET]) -# ------------------------------------------- -# Execute IF-SET if OPTION is set, IF-NOT-SET otherwise. -AC_DEFUN([_AM_IF_OPTION], -[m4_ifset(_AM_MANGLE_OPTION([$1]), [$2], [$3])]) - -# Check to make sure that the build environment is sane. -*- Autoconf -*- - -# Copyright (C) 1996, 1997, 2000, 2001, 2003, 2005, 2008 -# Free Software Foundation, Inc. -# -# This file is free software; the Free Software Foundation -# gives unlimited permission to copy and/or distribute it, -# with or without modifications, as long as this notice is preserved. - -# serial 5 - -# AM_SANITY_CHECK -# --------------- -AC_DEFUN([AM_SANITY_CHECK], -[AC_MSG_CHECKING([whether build environment is sane]) -# Just in case -sleep 1 -echo timestamp > conftest.file -# Reject unsafe characters in $srcdir or the absolute working directory -# name. Accept space and tab only in the latter. -am_lf=' -' -case `pwd` in - *[[\\\"\#\$\&\'\`$am_lf]]*) - AC_MSG_ERROR([unsafe absolute working directory name]);; -esac -case $srcdir in - *[[\\\"\#\$\&\'\`$am_lf\ \ ]]*) - AC_MSG_ERROR([unsafe srcdir value: `$srcdir']);; -esac - -# Do `set' in a subshell so we don't clobber the current shell's -# arguments. Must try -L first in case configure is actually a -# symlink; some systems play weird games with the mod time of symlinks -# (eg FreeBSD returns the mod time of the symlink's containing -# directory). -if ( - set X `ls -Lt "$srcdir/configure" conftest.file 2> /dev/null` - if test "$[*]" = "X"; then - # -L didn't work. - set X `ls -t "$srcdir/configure" conftest.file` - fi - rm -f conftest.file - if test "$[*]" != "X $srcdir/configure conftest.file" \ - && test "$[*]" != "X conftest.file $srcdir/configure"; then - - # If neither matched, then we have a broken ls. This can happen - # if, for instance, CONFIG_SHELL is bash and it inherits a - # broken ls alias from the environment. This has actually - # happened. Such a system could not be considered "sane". - AC_MSG_ERROR([ls -t appears to fail. Make sure there is not a broken -alias in your environment]) - fi - - test "$[2]" = conftest.file - ) -then - # Ok. - : -else - AC_MSG_ERROR([newly created file is older than distributed files! -Check your system clock]) -fi -AC_MSG_RESULT(yes)]) - -# Copyright (C) 2001, 2003, 2005 Free Software Foundation, Inc. -# -# This file is free software; the Free Software Foundation -# gives unlimited permission to copy and/or distribute it, -# with or without modifications, as long as this notice is preserved. - -# AM_PROG_INSTALL_STRIP -# --------------------- -# One issue with vendor `install' (even GNU) is that you can't -# specify the program used to strip binaries. This is especially -# annoying in cross-compiling environments, where the build's strip -# is unlikely to handle the host's binaries. -# Fortunately install-sh will honor a STRIPPROG variable, so we -# always use install-sh in `make install-strip', and initialize -# STRIPPROG with the value of the STRIP variable (set by the user). -AC_DEFUN([AM_PROG_INSTALL_STRIP], -[AC_REQUIRE([AM_PROG_INSTALL_SH])dnl -# Installed binaries are usually stripped using `strip' when the user -# run `make install-strip'. However `strip' might not be the right -# tool to use in cross-compilation environments, therefore Automake -# will honor the `STRIP' environment variable to overrule this program. -dnl Don't test for $cross_compiling = yes, because it might be `maybe'. -if test "$cross_compiling" != no; then - AC_CHECK_TOOL([STRIP], [strip], :) -fi -INSTALL_STRIP_PROGRAM="\$(install_sh) -c -s" -AC_SUBST([INSTALL_STRIP_PROGRAM])]) - -# Copyright (C) 2006, 2008 Free Software Foundation, Inc. -# -# This file is free software; the Free Software Foundation -# gives unlimited permission to copy and/or distribute it, -# with or without modifications, as long as this notice is preserved. - -# serial 2 - -# _AM_SUBST_NOTMAKE(VARIABLE) -# --------------------------- -# Prevent Automake from outputting VARIABLE = @VARIABLE@ in Makefile.in. -# This macro is traced by Automake. -AC_DEFUN([_AM_SUBST_NOTMAKE]) - -# AM_SUBST_NOTMAKE(VARIABLE) -# --------------------------- -# Public sister of _AM_SUBST_NOTMAKE. -AC_DEFUN([AM_SUBST_NOTMAKE], [_AM_SUBST_NOTMAKE($@)]) - -# Check how to create a tarball. -*- Autoconf -*- - -# Copyright (C) 2004, 2005 Free Software Foundation, Inc. -# -# This file is free software; the Free Software Foundation -# gives unlimited permission to copy and/or distribute it, -# with or without modifications, as long as this notice is preserved. - -# serial 2 - -# _AM_PROG_TAR(FORMAT) -# -------------------- -# Check how to create a tarball in format FORMAT. -# FORMAT should be one of `v7', `ustar', or `pax'. -# -# Substitute a variable $(am__tar) that is a command -# writing to stdout a FORMAT-tarball containing the directory -# $tardir. -# tardir=directory && $(am__tar) > result.tar -# -# Substitute a variable $(am__untar) that extract such -# a tarball read from stdin. -# $(am__untar) < result.tar -AC_DEFUN([_AM_PROG_TAR], -[# Always define AMTAR for backward compatibility. -AM_MISSING_PROG([AMTAR], [tar]) -m4_if([$1], [v7], - [am__tar='${AMTAR} chof - "$$tardir"'; am__untar='${AMTAR} xf -'], - [m4_case([$1], [ustar],, [pax],, - [m4_fatal([Unknown tar format])]) -AC_MSG_CHECKING([how to create a $1 tar archive]) -# Loop over all known methods to create a tar archive until one works. -_am_tools='gnutar m4_if([$1], [ustar], [plaintar]) pax cpio none' -_am_tools=${am_cv_prog_tar_$1-$_am_tools} -# Do not fold the above two line into one, because Tru64 sh and -# Solaris sh will not grok spaces in the rhs of `-'. -for _am_tool in $_am_tools -do - case $_am_tool in - gnutar) - for _am_tar in tar gnutar gtar; - do - AM_RUN_LOG([$_am_tar --version]) && break - done - am__tar="$_am_tar --format=m4_if([$1], [pax], [posix], [$1]) -chf - "'"$$tardir"' - am__tar_="$_am_tar --format=m4_if([$1], [pax], [posix], [$1]) -chf - "'"$tardir"' - am__untar="$_am_tar -xf -" - ;; - plaintar) - # Must skip GNU tar: if it does not support --format= it doesn't create - # ustar tarball either. - (tar --version) >/dev/null 2>&1 && continue - am__tar='tar chf - "$$tardir"' - am__tar_='tar chf - "$tardir"' - am__untar='tar xf -' - ;; - pax) - am__tar='pax -L -x $1 -w "$$tardir"' - am__tar_='pax -L -x $1 -w "$tardir"' - am__untar='pax -r' - ;; - cpio) - am__tar='find "$$tardir" -print | cpio -o -H $1 -L' - am__tar_='find "$tardir" -print | cpio -o -H $1 -L' - am__untar='cpio -i -H $1 -d' - ;; - none) - am__tar=false - am__tar_=false - am__untar=false - ;; - esac - - # If the value was cached, stop now. We just wanted to have am__tar - # and am__untar set. - test -n "${am_cv_prog_tar_$1}" && break - - # tar/untar a dummy directory, and stop if the command works - rm -rf conftest.dir - mkdir conftest.dir - echo GrepMe > conftest.dir/file - AM_RUN_LOG([tardir=conftest.dir && eval $am__tar_ >conftest.tar]) - rm -rf conftest.dir - if test -s conftest.tar; then - AM_RUN_LOG([$am__untar /dev/null 2>&1 && break - fi -done -rm -rf conftest.dir - -AC_CACHE_VAL([am_cv_prog_tar_$1], [am_cv_prog_tar_$1=$_am_tool]) -AC_MSG_RESULT([$am_cv_prog_tar_$1])]) -AC_SUBST([am__tar]) -AC_SUBST([am__untar]) -]) # _AM_PROG_TAR - -m4_include([acinclude/libtool.m4]) -m4_include([acinclude/ltoptions.m4]) -m4_include([acinclude/ltsugar.m4]) -m4_include([acinclude/ltversion.m4]) -m4_include([acinclude/lt~obsolete.m4]) diff --git a/test/test-automation/autogen.sh b/test/test-automation/autogen.sh deleted file mode 100755 index fd7bb31a9..000000000 --- a/test/test-automation/autogen.sh +++ /dev/null @@ -1,11 +0,0 @@ -#! /bin/sh - -echo "Generating build information using autoreconf" -echo "This may take a while..." - -test -d acinclude || mkdir acinclude - -autoreconf -i - -# Run configure for this platform -echo "Now you are ready to run ./configure" diff --git a/test/test-automation/build-scripts/compile b/test/test-automation/build-scripts/compile deleted file mode 100755 index c0096a7b5..000000000 --- a/test/test-automation/build-scripts/compile +++ /dev/null @@ -1,143 +0,0 @@ -#! /bin/sh -# Wrapper for compilers which do not understand `-c -o'. - -scriptversion=2009-10-06.20; # UTC - -# Copyright (C) 1999, 2000, 2003, 2004, 2005, 2009 Free Software -# Foundation, Inc. -# Written by Tom Tromey . -# -# This program is free software; you can redistribute it and/or modify -# it under the terms of the GNU General Public License as published by -# the Free Software Foundation; either version 2, or (at your option) -# any later version. -# -# This program is distributed in the hope that it will be useful, -# but WITHOUT ANY WARRANTY; without even the implied warranty of -# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the -# GNU General Public License for more details. -# -# You should have received a copy of the GNU General Public License -# along with this program. If not, see . - -# As a special exception to the GNU General Public License, if you -# distribute this file as part of a program that contains a -# configuration script generated by Autoconf, you may include it under -# the same distribution terms that you use for the rest of that program. - -# This file is maintained in Automake, please report -# bugs to or send patches to -# . - -case $1 in - '') - echo "$0: No command. Try \`$0 --help' for more information." 1>&2 - exit 1; - ;; - -h | --h*) - cat <<\EOF -Usage: compile [--help] [--version] PROGRAM [ARGS] - -Wrapper for compilers which do not understand `-c -o'. -Remove `-o dest.o' from ARGS, run PROGRAM with the remaining -arguments, and rename the output as expected. - -If you are trying to build a whole package this is not the -right script to run: please start by reading the file `INSTALL'. - -Report bugs to . -EOF - exit $? - ;; - -v | --v*) - echo "compile $scriptversion" - exit $? - ;; -esac - -ofile= -cfile= -eat= - -for arg -do - if test -n "$eat"; then - eat= - else - case $1 in - -o) - # configure might choose to run compile as `compile cc -o foo foo.c'. - # So we strip `-o arg' only if arg is an object. - eat=1 - case $2 in - *.o | *.obj) - ofile=$2 - ;; - *) - set x "$@" -o "$2" - shift - ;; - esac - ;; - *.c) - cfile=$1 - set x "$@" "$1" - shift - ;; - *) - set x "$@" "$1" - shift - ;; - esac - fi - shift -done - -if test -z "$ofile" || test -z "$cfile"; then - # If no `-o' option was seen then we might have been invoked from a - # pattern rule where we don't need one. That is ok -- this is a - # normal compilation that the losing compiler can handle. If no - # `.c' file was seen then we are probably linking. That is also - # ok. - exec "$@" -fi - -# Name of file we expect compiler to create. -cofile=`echo "$cfile" | sed 's|^.*[\\/]||; s|^[a-zA-Z]:||; s/\.c$/.o/'` - -# Create the lock directory. -# Note: use `[/\\:.-]' here to ensure that we don't use the same name -# that we are using for the .o file. Also, base the name on the expected -# object file name, since that is what matters with a parallel build. -lockdir=`echo "$cofile" | sed -e 's|[/\\:.-]|_|g'`.d -while true; do - if mkdir "$lockdir" >/dev/null 2>&1; then - break - fi - sleep 1 -done -# FIXME: race condition here if user kills between mkdir and trap. -trap "rmdir '$lockdir'; exit 1" 1 2 15 - -# Run the compile. -"$@" -ret=$? - -if test -f "$cofile"; then - test "$cofile" = "$ofile" || mv "$cofile" "$ofile" -elif test -f "${cofile}bj"; then - test "${cofile}bj" = "$ofile" || mv "${cofile}bj" "$ofile" -fi - -rmdir "$lockdir" -exit $ret - -# Local Variables: -# mode: shell-script -# sh-indentation: 2 -# eval: (add-hook 'write-file-hooks 'time-stamp) -# time-stamp-start: "scriptversion=" -# time-stamp-format: "%:y-%02m-%02d.%02H" -# time-stamp-time-zone: "UTC" -# time-stamp-end: "; # UTC" -# End: diff --git a/test/test-automation/build-scripts/config.guess b/test/test-automation/build-scripts/config.guess deleted file mode 100755 index c2246a4f7..000000000 --- a/test/test-automation/build-scripts/config.guess +++ /dev/null @@ -1,1502 +0,0 @@ -#! /bin/sh -# Attempt to guess a canonical system name. -# Copyright (C) 1992, 1993, 1994, 1995, 1996, 1997, 1998, 1999, -# 2000, 2001, 2002, 2003, 2004, 2005, 2006, 2007, 2008, 2009, 2010 -# Free Software Foundation, Inc. - -timestamp='2009-12-30' - -# This file is free software; you can redistribute it and/or modify it -# under the terms of the GNU General Public License as published by -# the Free Software Foundation; either version 2 of the License, or -# (at your option) any later version. -# -# This program is distributed in the hope that it will be useful, but -# WITHOUT ANY WARRANTY; without even the implied warranty of -# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU -# General Public License for more details. -# -# You should have received a copy of the GNU General Public License -# along with this program; if not, write to the Free Software -# Foundation, Inc., 51 Franklin Street - Fifth Floor, Boston, MA -# 02110-1301, USA. -# -# As a special exception to the GNU General Public License, if you -# distribute this file as part of a program that contains a -# configuration script generated by Autoconf, you may include it under -# the same distribution terms that you use for the rest of that program. - - -# Originally written by Per Bothner. Please send patches (context -# diff format) to and include a ChangeLog -# entry. -# -# This script attempts to guess a canonical system name similar to -# config.sub. If it succeeds, it prints the system name on stdout, and -# exits with 0. Otherwise, it exits with 1. -# -# You can get the latest version of this script from: -# http://git.savannah.gnu.org/gitweb/?p=config.git;a=blob_plain;f=config.guess;hb=HEAD - -me=`echo "$0" | sed -e 's,.*/,,'` - -usage="\ -Usage: $0 [OPTION] - -Output the configuration name of the system \`$me' is run on. - -Operation modes: - -h, --help print this help, then exit - -t, --time-stamp print date of last modification, then exit - -v, --version print version number, then exit - -Report bugs and patches to ." - -version="\ -GNU config.guess ($timestamp) - -Originally written by Per Bothner. -Copyright (C) 1992, 1993, 1994, 1995, 1996, 1997, 1998, 1999, 2000, -2001, 2002, 2003, 2004, 2005, 2006, 2007, 2008, 2009, 2010 Free -Software Foundation, Inc. - -This is free software; see the source for copying conditions. There is NO -warranty; not even for MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE." - -help=" -Try \`$me --help' for more information." - -# Parse command line -while test $# -gt 0 ; do - case $1 in - --time-stamp | --time* | -t ) - echo "$timestamp" ; exit ;; - --version | -v ) - echo "$version" ; exit ;; - --help | --h* | -h ) - echo "$usage"; exit ;; - -- ) # Stop option processing - shift; break ;; - - ) # Use stdin as input. - break ;; - -* ) - echo "$me: invalid option $1$help" >&2 - exit 1 ;; - * ) - break ;; - esac -done - -if test $# != 0; then - echo "$me: too many arguments$help" >&2 - exit 1 -fi - -trap 'exit 1' 1 2 15 - -# CC_FOR_BUILD -- compiler used by this script. Note that the use of a -# compiler to aid in system detection is discouraged as it requires -# temporary files to be created and, as you can see below, it is a -# headache to deal with in a portable fashion. - -# Historically, `CC_FOR_BUILD' used to be named `HOST_CC'. We still -# use `HOST_CC' if defined, but it is deprecated. - -# Portable tmp directory creation inspired by the Autoconf team. - -set_cc_for_build=' -trap "exitcode=\$?; (rm -f \$tmpfiles 2>/dev/null; rmdir \$tmp 2>/dev/null) && exit \$exitcode" 0 ; -trap "rm -f \$tmpfiles 2>/dev/null; rmdir \$tmp 2>/dev/null; exit 1" 1 2 13 15 ; -: ${TMPDIR=/tmp} ; - { tmp=`(umask 077 && mktemp -d "$TMPDIR/cgXXXXXX") 2>/dev/null` && test -n "$tmp" && test -d "$tmp" ; } || - { test -n "$RANDOM" && tmp=$TMPDIR/cg$$-$RANDOM && (umask 077 && mkdir $tmp) ; } || - { tmp=$TMPDIR/cg-$$ && (umask 077 && mkdir $tmp) && echo "Warning: creating insecure temp directory" >&2 ; } || - { echo "$me: cannot create a temporary directory in $TMPDIR" >&2 ; exit 1 ; } ; -dummy=$tmp/dummy ; -tmpfiles="$dummy.c $dummy.o $dummy.rel $dummy" ; -case $CC_FOR_BUILD,$HOST_CC,$CC in - ,,) echo "int x;" > $dummy.c ; - for c in cc gcc c89 c99 ; do - if ($c -c -o $dummy.o $dummy.c) >/dev/null 2>&1 ; then - CC_FOR_BUILD="$c"; break ; - fi ; - done ; - if test x"$CC_FOR_BUILD" = x ; then - CC_FOR_BUILD=no_compiler_found ; - fi - ;; - ,,*) CC_FOR_BUILD=$CC ;; - ,*,*) CC_FOR_BUILD=$HOST_CC ;; -esac ; set_cc_for_build= ;' - -# This is needed to find uname on a Pyramid OSx when run in the BSD universe. -# (ghazi@noc.rutgers.edu 1994-08-24) -if (test -f /.attbin/uname) >/dev/null 2>&1 ; then - PATH=$PATH:/.attbin ; export PATH -fi - -UNAME_MACHINE=`(uname -m) 2>/dev/null` || UNAME_MACHINE=unknown -UNAME_RELEASE=`(uname -r) 2>/dev/null` || UNAME_RELEASE=unknown -UNAME_SYSTEM=`(uname -s) 2>/dev/null` || UNAME_SYSTEM=unknown -UNAME_VERSION=`(uname -v) 2>/dev/null` || UNAME_VERSION=unknown - -# Note: order is significant - the case branches are not exclusive. - -case "${UNAME_MACHINE}:${UNAME_SYSTEM}:${UNAME_RELEASE}:${UNAME_VERSION}" in - *:NetBSD:*:*) - # NetBSD (nbsd) targets should (where applicable) match one or - # more of the tupples: *-*-netbsdelf*, *-*-netbsdaout*, - # *-*-netbsdecoff* and *-*-netbsd*. For targets that recently - # switched to ELF, *-*-netbsd* would select the old - # object file format. This provides both forward - # compatibility and a consistent mechanism for selecting the - # object file format. - # - # Note: NetBSD doesn't particularly care about the vendor - # portion of the name. We always set it to "unknown". - sysctl="sysctl -n hw.machine_arch" - UNAME_MACHINE_ARCH=`(/sbin/$sysctl 2>/dev/null || \ - /usr/sbin/$sysctl 2>/dev/null || echo unknown)` - case "${UNAME_MACHINE_ARCH}" in - armeb) machine=armeb-unknown ;; - arm*) machine=arm-unknown ;; - sh3el) machine=shl-unknown ;; - sh3eb) machine=sh-unknown ;; - sh5el) machine=sh5le-unknown ;; - *) machine=${UNAME_MACHINE_ARCH}-unknown ;; - esac - # The Operating System including object format, if it has switched - # to ELF recently, or will in the future. - case "${UNAME_MACHINE_ARCH}" in - arm*|i386|m68k|ns32k|sh3*|sparc|vax) - eval $set_cc_for_build - if echo __ELF__ | $CC_FOR_BUILD -E - 2>/dev/null \ - | grep -q __ELF__ - then - # Once all utilities can be ECOFF (netbsdecoff) or a.out (netbsdaout). - # Return netbsd for either. FIX? - os=netbsd - else - os=netbsdelf - fi - ;; - *) - os=netbsd - ;; - esac - # The OS release - # Debian GNU/NetBSD machines have a different userland, and - # thus, need a distinct triplet. However, they do not need - # kernel version information, so it can be replaced with a - # suitable tag, in the style of linux-gnu. - case "${UNAME_VERSION}" in - Debian*) - release='-gnu' - ;; - *) - release=`echo ${UNAME_RELEASE}|sed -e 's/[-_].*/\./'` - ;; - esac - # Since CPU_TYPE-MANUFACTURER-KERNEL-OPERATING_SYSTEM: - # contains redundant information, the shorter form: - # CPU_TYPE-MANUFACTURER-OPERATING_SYSTEM is used. - echo "${machine}-${os}${release}" - exit ;; - *:OpenBSD:*:*) - UNAME_MACHINE_ARCH=`arch | sed 's/OpenBSD.//'` - echo ${UNAME_MACHINE_ARCH}-unknown-openbsd${UNAME_RELEASE} - exit ;; - *:ekkoBSD:*:*) - echo ${UNAME_MACHINE}-unknown-ekkobsd${UNAME_RELEASE} - exit ;; - *:SolidBSD:*:*) - echo ${UNAME_MACHINE}-unknown-solidbsd${UNAME_RELEASE} - exit ;; - macppc:MirBSD:*:*) - echo powerpc-unknown-mirbsd${UNAME_RELEASE} - exit ;; - *:MirBSD:*:*) - echo ${UNAME_MACHINE}-unknown-mirbsd${UNAME_RELEASE} - exit ;; - alpha:OSF1:*:*) - case $UNAME_RELEASE in - *4.0) - UNAME_RELEASE=`/usr/sbin/sizer -v | awk '{print $3}'` - ;; - *5.*) - UNAME_RELEASE=`/usr/sbin/sizer -v | awk '{print $4}'` - ;; - esac - # According to Compaq, /usr/sbin/psrinfo has been available on - # OSF/1 and Tru64 systems produced since 1995. I hope that - # covers most systems running today. This code pipes the CPU - # types through head -n 1, so we only detect the type of CPU 0. - ALPHA_CPU_TYPE=`/usr/sbin/psrinfo -v | sed -n -e 's/^ The alpha \(.*\) processor.*$/\1/p' | head -n 1` - case "$ALPHA_CPU_TYPE" in - "EV4 (21064)") - UNAME_MACHINE="alpha" ;; - "EV4.5 (21064)") - UNAME_MACHINE="alpha" ;; - "LCA4 (21066/21068)") - UNAME_MACHINE="alpha" ;; - "EV5 (21164)") - UNAME_MACHINE="alphaev5" ;; - "EV5.6 (21164A)") - UNAME_MACHINE="alphaev56" ;; - "EV5.6 (21164PC)") - UNAME_MACHINE="alphapca56" ;; - "EV5.7 (21164PC)") - UNAME_MACHINE="alphapca57" ;; - "EV6 (21264)") - UNAME_MACHINE="alphaev6" ;; - "EV6.7 (21264A)") - UNAME_MACHINE="alphaev67" ;; - "EV6.8CB (21264C)") - UNAME_MACHINE="alphaev68" ;; - "EV6.8AL (21264B)") - UNAME_MACHINE="alphaev68" ;; - "EV6.8CX (21264D)") - UNAME_MACHINE="alphaev68" ;; - "EV6.9A (21264/EV69A)") - UNAME_MACHINE="alphaev69" ;; - "EV7 (21364)") - UNAME_MACHINE="alphaev7" ;; - "EV7.9 (21364A)") - UNAME_MACHINE="alphaev79" ;; - esac - # A Pn.n version is a patched version. - # A Vn.n version is a released version. - # A Tn.n version is a released field test version. - # A Xn.n version is an unreleased experimental baselevel. - # 1.2 uses "1.2" for uname -r. - echo ${UNAME_MACHINE}-dec-osf`echo ${UNAME_RELEASE} | sed -e 's/^[PVTX]//' | tr 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'` - exit ;; - Alpha\ *:Windows_NT*:*) - # How do we know it's Interix rather than the generic POSIX subsystem? - # Should we change UNAME_MACHINE based on the output of uname instead - # of the specific Alpha model? - echo alpha-pc-interix - exit ;; - 21064:Windows_NT:50:3) - echo alpha-dec-winnt3.5 - exit ;; - Amiga*:UNIX_System_V:4.0:*) - echo m68k-unknown-sysv4 - exit ;; - *:[Aa]miga[Oo][Ss]:*:*) - echo ${UNAME_MACHINE}-unknown-amigaos - exit ;; - *:[Mm]orph[Oo][Ss]:*:*) - echo ${UNAME_MACHINE}-unknown-morphos - exit ;; - *:OS/390:*:*) - echo i370-ibm-openedition - exit ;; - *:z/VM:*:*) - echo s390-ibm-zvmoe - exit ;; - *:OS400:*:*) - echo powerpc-ibm-os400 - exit ;; - arm:RISC*:1.[012]*:*|arm:riscix:1.[012]*:*) - echo arm-acorn-riscix${UNAME_RELEASE} - exit ;; - arm:riscos:*:*|arm:RISCOS:*:*) - echo arm-unknown-riscos - exit ;; - SR2?01:HI-UX/MPP:*:* | SR8000:HI-UX/MPP:*:*) - echo hppa1.1-hitachi-hiuxmpp - exit ;; - Pyramid*:OSx*:*:* | MIS*:OSx*:*:* | MIS*:SMP_DC-OSx*:*:*) - # akee@wpdis03.wpafb.af.mil (Earle F. Ake) contributed MIS and NILE. - if test "`(/bin/universe) 2>/dev/null`" = att ; then - echo pyramid-pyramid-sysv3 - else - echo pyramid-pyramid-bsd - fi - exit ;; - NILE*:*:*:dcosx) - echo pyramid-pyramid-svr4 - exit ;; - DRS?6000:unix:4.0:6*) - echo sparc-icl-nx6 - exit ;; - DRS?6000:UNIX_SV:4.2*:7* | DRS?6000:isis:4.2*:7*) - case `/usr/bin/uname -p` in - sparc) echo sparc-icl-nx7; exit ;; - esac ;; - s390x:SunOS:*:*) - echo ${UNAME_MACHINE}-ibm-solaris2`echo ${UNAME_RELEASE}|sed -e 's/[^.]*//'` - exit ;; - sun4H:SunOS:5.*:*) - echo sparc-hal-solaris2`echo ${UNAME_RELEASE}|sed -e 's/[^.]*//'` - exit ;; - sun4*:SunOS:5.*:* | tadpole*:SunOS:5.*:*) - echo sparc-sun-solaris2`echo ${UNAME_RELEASE}|sed -e 's/[^.]*//'` - exit ;; - i86pc:AuroraUX:5.*:* | i86xen:AuroraUX:5.*:*) - echo i386-pc-auroraux${UNAME_RELEASE} - exit ;; - i86pc:SunOS:5.*:* | i86xen:SunOS:5.*:*) - eval $set_cc_for_build - SUN_ARCH="i386" - # If there is a compiler, see if it is configured for 64-bit objects. - # Note that the Sun cc does not turn __LP64__ into 1 like gcc does. - # This test works for both compilers. - if [ "$CC_FOR_BUILD" != 'no_compiler_found' ]; then - if (echo '#ifdef __amd64'; echo IS_64BIT_ARCH; echo '#endif') | \ - (CCOPTS= $CC_FOR_BUILD -E - 2>/dev/null) | \ - grep IS_64BIT_ARCH >/dev/null - then - SUN_ARCH="x86_64" - fi - fi - echo ${SUN_ARCH}-pc-solaris2`echo ${UNAME_RELEASE}|sed -e 's/[^.]*//'` - exit ;; - sun4*:SunOS:6*:*) - # According to config.sub, this is the proper way to canonicalize - # SunOS6. Hard to guess exactly what SunOS6 will be like, but - # it's likely to be more like Solaris than SunOS4. - echo sparc-sun-solaris3`echo ${UNAME_RELEASE}|sed -e 's/[^.]*//'` - exit ;; - sun4*:SunOS:*:*) - case "`/usr/bin/arch -k`" in - Series*|S4*) - UNAME_RELEASE=`uname -v` - ;; - esac - # Japanese Language versions have a version number like `4.1.3-JL'. - echo sparc-sun-sunos`echo ${UNAME_RELEASE}|sed -e 's/-/_/'` - exit ;; - sun3*:SunOS:*:*) - echo m68k-sun-sunos${UNAME_RELEASE} - exit ;; - sun*:*:4.2BSD:*) - UNAME_RELEASE=`(sed 1q /etc/motd | awk '{print substr($5,1,3)}') 2>/dev/null` - test "x${UNAME_RELEASE}" = "x" && UNAME_RELEASE=3 - case "`/bin/arch`" in - sun3) - echo m68k-sun-sunos${UNAME_RELEASE} - ;; - sun4) - echo sparc-sun-sunos${UNAME_RELEASE} - ;; - esac - exit ;; - aushp:SunOS:*:*) - echo sparc-auspex-sunos${UNAME_RELEASE} - exit ;; - # The situation for MiNT is a little confusing. The machine name - # can be virtually everything (everything which is not - # "atarist" or "atariste" at least should have a processor - # > m68000). The system name ranges from "MiNT" over "FreeMiNT" - # to the lowercase version "mint" (or "freemint"). Finally - # the system name "TOS" denotes a system which is actually not - # MiNT. But MiNT is downward compatible to TOS, so this should - # be no problem. - atarist[e]:*MiNT:*:* | atarist[e]:*mint:*:* | atarist[e]:*TOS:*:*) - echo m68k-atari-mint${UNAME_RELEASE} - exit ;; - atari*:*MiNT:*:* | atari*:*mint:*:* | atarist[e]:*TOS:*:*) - echo m68k-atari-mint${UNAME_RELEASE} - exit ;; - *falcon*:*MiNT:*:* | *falcon*:*mint:*:* | *falcon*:*TOS:*:*) - echo m68k-atari-mint${UNAME_RELEASE} - exit ;; - milan*:*MiNT:*:* | milan*:*mint:*:* | *milan*:*TOS:*:*) - echo m68k-milan-mint${UNAME_RELEASE} - exit ;; - hades*:*MiNT:*:* | hades*:*mint:*:* | *hades*:*TOS:*:*) - echo m68k-hades-mint${UNAME_RELEASE} - exit ;; - *:*MiNT:*:* | *:*mint:*:* | *:*TOS:*:*) - echo m68k-unknown-mint${UNAME_RELEASE} - exit ;; - m68k:machten:*:*) - echo m68k-apple-machten${UNAME_RELEASE} - exit ;; - powerpc:machten:*:*) - echo powerpc-apple-machten${UNAME_RELEASE} - exit ;; - RISC*:Mach:*:*) - echo mips-dec-mach_bsd4.3 - exit ;; - RISC*:ULTRIX:*:*) - echo mips-dec-ultrix${UNAME_RELEASE} - exit ;; - VAX*:ULTRIX*:*:*) - echo vax-dec-ultrix${UNAME_RELEASE} - exit ;; - 2020:CLIX:*:* | 2430:CLIX:*:*) - echo clipper-intergraph-clix${UNAME_RELEASE} - exit ;; - mips:*:*:UMIPS | mips:*:*:RISCos) - eval $set_cc_for_build - sed 's/^ //' << EOF >$dummy.c -#ifdef __cplusplus -#include /* for printf() prototype */ - int main (int argc, char *argv[]) { -#else - int main (argc, argv) int argc; char *argv[]; { -#endif - #if defined (host_mips) && defined (MIPSEB) - #if defined (SYSTYPE_SYSV) - printf ("mips-mips-riscos%ssysv\n", argv[1]); exit (0); - #endif - #if defined (SYSTYPE_SVR4) - printf ("mips-mips-riscos%ssvr4\n", argv[1]); exit (0); - #endif - #if defined (SYSTYPE_BSD43) || defined(SYSTYPE_BSD) - printf ("mips-mips-riscos%sbsd\n", argv[1]); exit (0); - #endif - #endif - exit (-1); - } -EOF - $CC_FOR_BUILD -o $dummy $dummy.c && - dummyarg=`echo "${UNAME_RELEASE}" | sed -n 's/\([0-9]*\).*/\1/p'` && - SYSTEM_NAME=`$dummy $dummyarg` && - { echo "$SYSTEM_NAME"; exit; } - echo mips-mips-riscos${UNAME_RELEASE} - exit ;; - Motorola:PowerMAX_OS:*:*) - echo powerpc-motorola-powermax - exit ;; - Motorola:*:4.3:PL8-*) - echo powerpc-harris-powermax - exit ;; - Night_Hawk:*:*:PowerMAX_OS | Synergy:PowerMAX_OS:*:*) - echo powerpc-harris-powermax - exit ;; - Night_Hawk:Power_UNIX:*:*) - echo powerpc-harris-powerunix - exit ;; - m88k:CX/UX:7*:*) - echo m88k-harris-cxux7 - exit ;; - m88k:*:4*:R4*) - echo m88k-motorola-sysv4 - exit ;; - m88k:*:3*:R3*) - echo m88k-motorola-sysv3 - exit ;; - AViiON:dgux:*:*) - # DG/UX returns AViiON for all architectures - UNAME_PROCESSOR=`/usr/bin/uname -p` - if [ $UNAME_PROCESSOR = mc88100 ] || [ $UNAME_PROCESSOR = mc88110 ] - then - if [ ${TARGET_BINARY_INTERFACE}x = m88kdguxelfx ] || \ - [ ${TARGET_BINARY_INTERFACE}x = x ] - then - echo m88k-dg-dgux${UNAME_RELEASE} - else - echo m88k-dg-dguxbcs${UNAME_RELEASE} - fi - else - echo i586-dg-dgux${UNAME_RELEASE} - fi - exit ;; - M88*:DolphinOS:*:*) # DolphinOS (SVR3) - echo m88k-dolphin-sysv3 - exit ;; - M88*:*:R3*:*) - # Delta 88k system running SVR3 - echo m88k-motorola-sysv3 - exit ;; - XD88*:*:*:*) # Tektronix XD88 system running UTekV (SVR3) - echo m88k-tektronix-sysv3 - exit ;; - Tek43[0-9][0-9]:UTek:*:*) # Tektronix 4300 system running UTek (BSD) - echo m68k-tektronix-bsd - exit ;; - *:IRIX*:*:*) - echo mips-sgi-irix`echo ${UNAME_RELEASE}|sed -e 's/-/_/g'` - exit ;; - ????????:AIX?:[12].1:2) # AIX 2.2.1 or AIX 2.1.1 is RT/PC AIX. - echo romp-ibm-aix # uname -m gives an 8 hex-code CPU id - exit ;; # Note that: echo "'`uname -s`'" gives 'AIX ' - i*86:AIX:*:*) - echo i386-ibm-aix - exit ;; - ia64:AIX:*:*) - if [ -x /usr/bin/oslevel ] ; then - IBM_REV=`/usr/bin/oslevel` - else - IBM_REV=${UNAME_VERSION}.${UNAME_RELEASE} - fi - echo ${UNAME_MACHINE}-ibm-aix${IBM_REV} - exit ;; - *:AIX:2:3) - if grep bos325 /usr/include/stdio.h >/dev/null 2>&1; then - eval $set_cc_for_build - sed 's/^ //' << EOF >$dummy.c - #include - - main() - { - if (!__power_pc()) - exit(1); - puts("powerpc-ibm-aix3.2.5"); - exit(0); - } -EOF - if $CC_FOR_BUILD -o $dummy $dummy.c && SYSTEM_NAME=`$dummy` - then - echo "$SYSTEM_NAME" - else - echo rs6000-ibm-aix3.2.5 - fi - elif grep bos324 /usr/include/stdio.h >/dev/null 2>&1; then - echo rs6000-ibm-aix3.2.4 - else - echo rs6000-ibm-aix3.2 - fi - exit ;; - *:AIX:*:[456]) - IBM_CPU_ID=`/usr/sbin/lsdev -C -c processor -S available | sed 1q | awk '{ print $1 }'` - if /usr/sbin/lsattr -El ${IBM_CPU_ID} | grep ' POWER' >/dev/null 2>&1; then - IBM_ARCH=rs6000 - else - IBM_ARCH=powerpc - fi - if [ -x /usr/bin/oslevel ] ; then - IBM_REV=`/usr/bin/oslevel` - else - IBM_REV=${UNAME_VERSION}.${UNAME_RELEASE} - fi - echo ${IBM_ARCH}-ibm-aix${IBM_REV} - exit ;; - *:AIX:*:*) - echo rs6000-ibm-aix - exit ;; - ibmrt:4.4BSD:*|romp-ibm:BSD:*) - echo romp-ibm-bsd4.4 - exit ;; - ibmrt:*BSD:*|romp-ibm:BSD:*) # covers RT/PC BSD and - echo romp-ibm-bsd${UNAME_RELEASE} # 4.3 with uname added to - exit ;; # report: romp-ibm BSD 4.3 - *:BOSX:*:*) - echo rs6000-bull-bosx - exit ;; - DPX/2?00:B.O.S.:*:*) - echo m68k-bull-sysv3 - exit ;; - 9000/[34]??:4.3bsd:1.*:*) - echo m68k-hp-bsd - exit ;; - hp300:4.4BSD:*:* | 9000/[34]??:4.3bsd:2.*:*) - echo m68k-hp-bsd4.4 - exit ;; - 9000/[34678]??:HP-UX:*:*) - HPUX_REV=`echo ${UNAME_RELEASE}|sed -e 's/[^.]*.[0B]*//'` - case "${UNAME_MACHINE}" in - 9000/31? ) HP_ARCH=m68000 ;; - 9000/[34]?? ) HP_ARCH=m68k ;; - 9000/[678][0-9][0-9]) - if [ -x /usr/bin/getconf ]; then - sc_cpu_version=`/usr/bin/getconf SC_CPU_VERSION 2>/dev/null` - sc_kernel_bits=`/usr/bin/getconf SC_KERNEL_BITS 2>/dev/null` - case "${sc_cpu_version}" in - 523) HP_ARCH="hppa1.0" ;; # CPU_PA_RISC1_0 - 528) HP_ARCH="hppa1.1" ;; # CPU_PA_RISC1_1 - 532) # CPU_PA_RISC2_0 - case "${sc_kernel_bits}" in - 32) HP_ARCH="hppa2.0n" ;; - 64) HP_ARCH="hppa2.0w" ;; - '') HP_ARCH="hppa2.0" ;; # HP-UX 10.20 - esac ;; - esac - fi - if [ "${HP_ARCH}" = "" ]; then - eval $set_cc_for_build - sed 's/^ //' << EOF >$dummy.c - - #define _HPUX_SOURCE - #include - #include - - int main () - { - #if defined(_SC_KERNEL_BITS) - long bits = sysconf(_SC_KERNEL_BITS); - #endif - long cpu = sysconf (_SC_CPU_VERSION); - - switch (cpu) - { - case CPU_PA_RISC1_0: puts ("hppa1.0"); break; - case CPU_PA_RISC1_1: puts ("hppa1.1"); break; - case CPU_PA_RISC2_0: - #if defined(_SC_KERNEL_BITS) - switch (bits) - { - case 64: puts ("hppa2.0w"); break; - case 32: puts ("hppa2.0n"); break; - default: puts ("hppa2.0"); break; - } break; - #else /* !defined(_SC_KERNEL_BITS) */ - puts ("hppa2.0"); break; - #endif - default: puts ("hppa1.0"); break; - } - exit (0); - } -EOF - (CCOPTS= $CC_FOR_BUILD -o $dummy $dummy.c 2>/dev/null) && HP_ARCH=`$dummy` - test -z "$HP_ARCH" && HP_ARCH=hppa - fi ;; - esac - if [ ${HP_ARCH} = "hppa2.0w" ] - then - eval $set_cc_for_build - - # hppa2.0w-hp-hpux* has a 64-bit kernel and a compiler generating - # 32-bit code. hppa64-hp-hpux* has the same kernel and a compiler - # generating 64-bit code. GNU and HP use different nomenclature: - # - # $ CC_FOR_BUILD=cc ./config.guess - # => hppa2.0w-hp-hpux11.23 - # $ CC_FOR_BUILD="cc +DA2.0w" ./config.guess - # => hppa64-hp-hpux11.23 - - if echo __LP64__ | (CCOPTS= $CC_FOR_BUILD -E - 2>/dev/null) | - grep -q __LP64__ - then - HP_ARCH="hppa2.0w" - else - HP_ARCH="hppa64" - fi - fi - echo ${HP_ARCH}-hp-hpux${HPUX_REV} - exit ;; - ia64:HP-UX:*:*) - HPUX_REV=`echo ${UNAME_RELEASE}|sed -e 's/[^.]*.[0B]*//'` - echo ia64-hp-hpux${HPUX_REV} - exit ;; - 3050*:HI-UX:*:*) - eval $set_cc_for_build - sed 's/^ //' << EOF >$dummy.c - #include - int - main () - { - long cpu = sysconf (_SC_CPU_VERSION); - /* The order matters, because CPU_IS_HP_MC68K erroneously returns - true for CPU_PA_RISC1_0. CPU_IS_PA_RISC returns correct - results, however. */ - if (CPU_IS_PA_RISC (cpu)) - { - switch (cpu) - { - case CPU_PA_RISC1_0: puts ("hppa1.0-hitachi-hiuxwe2"); break; - case CPU_PA_RISC1_1: puts ("hppa1.1-hitachi-hiuxwe2"); break; - case CPU_PA_RISC2_0: puts ("hppa2.0-hitachi-hiuxwe2"); break; - default: puts ("hppa-hitachi-hiuxwe2"); break; - } - } - else if (CPU_IS_HP_MC68K (cpu)) - puts ("m68k-hitachi-hiuxwe2"); - else puts ("unknown-hitachi-hiuxwe2"); - exit (0); - } -EOF - $CC_FOR_BUILD -o $dummy $dummy.c && SYSTEM_NAME=`$dummy` && - { echo "$SYSTEM_NAME"; exit; } - echo unknown-hitachi-hiuxwe2 - exit ;; - 9000/7??:4.3bsd:*:* | 9000/8?[79]:4.3bsd:*:* ) - echo hppa1.1-hp-bsd - exit ;; - 9000/8??:4.3bsd:*:*) - echo hppa1.0-hp-bsd - exit ;; - *9??*:MPE/iX:*:* | *3000*:MPE/iX:*:*) - echo hppa1.0-hp-mpeix - exit ;; - hp7??:OSF1:*:* | hp8?[79]:OSF1:*:* ) - echo hppa1.1-hp-osf - exit ;; - hp8??:OSF1:*:*) - echo hppa1.0-hp-osf - exit ;; - i*86:OSF1:*:*) - if [ -x /usr/sbin/sysversion ] ; then - echo ${UNAME_MACHINE}-unknown-osf1mk - else - echo ${UNAME_MACHINE}-unknown-osf1 - fi - exit ;; - parisc*:Lites*:*:*) - echo hppa1.1-hp-lites - exit ;; - C1*:ConvexOS:*:* | convex:ConvexOS:C1*:*) - echo c1-convex-bsd - exit ;; - C2*:ConvexOS:*:* | convex:ConvexOS:C2*:*) - if getsysinfo -f scalar_acc - then echo c32-convex-bsd - else echo c2-convex-bsd - fi - exit ;; - C34*:ConvexOS:*:* | convex:ConvexOS:C34*:*) - echo c34-convex-bsd - exit ;; - C38*:ConvexOS:*:* | convex:ConvexOS:C38*:*) - echo c38-convex-bsd - exit ;; - C4*:ConvexOS:*:* | convex:ConvexOS:C4*:*) - echo c4-convex-bsd - exit ;; - CRAY*Y-MP:*:*:*) - echo ymp-cray-unicos${UNAME_RELEASE} | sed -e 's/\.[^.]*$/.X/' - exit ;; - CRAY*[A-Z]90:*:*:*) - echo ${UNAME_MACHINE}-cray-unicos${UNAME_RELEASE} \ - | sed -e 's/CRAY.*\([A-Z]90\)/\1/' \ - -e y/ABCDEFGHIJKLMNOPQRSTUVWXYZ/abcdefghijklmnopqrstuvwxyz/ \ - -e 's/\.[^.]*$/.X/' - exit ;; - CRAY*TS:*:*:*) - echo t90-cray-unicos${UNAME_RELEASE} | sed -e 's/\.[^.]*$/.X/' - exit ;; - CRAY*T3E:*:*:*) - echo alphaev5-cray-unicosmk${UNAME_RELEASE} | sed -e 's/\.[^.]*$/.X/' - exit ;; - CRAY*SV1:*:*:*) - echo sv1-cray-unicos${UNAME_RELEASE} | sed -e 's/\.[^.]*$/.X/' - exit ;; - *:UNICOS/mp:*:*) - echo craynv-cray-unicosmp${UNAME_RELEASE} | sed -e 's/\.[^.]*$/.X/' - exit ;; - F30[01]:UNIX_System_V:*:* | F700:UNIX_System_V:*:*) - FUJITSU_PROC=`uname -m | tr 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'` - FUJITSU_SYS=`uname -p | tr 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz' | sed -e 's/\///'` - FUJITSU_REL=`echo ${UNAME_RELEASE} | sed -e 's/ /_/'` - echo "${FUJITSU_PROC}-fujitsu-${FUJITSU_SYS}${FUJITSU_REL}" - exit ;; - 5000:UNIX_System_V:4.*:*) - FUJITSU_SYS=`uname -p | tr 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz' | sed -e 's/\///'` - FUJITSU_REL=`echo ${UNAME_RELEASE} | tr 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz' | sed -e 's/ /_/'` - echo "sparc-fujitsu-${FUJITSU_SYS}${FUJITSU_REL}" - exit ;; - i*86:BSD/386:*:* | i*86:BSD/OS:*:* | *:Ascend\ Embedded/OS:*:*) - echo ${UNAME_MACHINE}-pc-bsdi${UNAME_RELEASE} - exit ;; - sparc*:BSD/OS:*:*) - echo sparc-unknown-bsdi${UNAME_RELEASE} - exit ;; - *:BSD/OS:*:*) - echo ${UNAME_MACHINE}-unknown-bsdi${UNAME_RELEASE} - exit ;; - *:FreeBSD:*:*) - case ${UNAME_MACHINE} in - pc98) - echo i386-unknown-freebsd`echo ${UNAME_RELEASE}|sed -e 's/[-(].*//'` ;; - amd64) - echo x86_64-unknown-freebsd`echo ${UNAME_RELEASE}|sed -e 's/[-(].*//'` ;; - *) - echo ${UNAME_MACHINE}-unknown-freebsd`echo ${UNAME_RELEASE}|sed -e 's/[-(].*//'` ;; - esac - exit ;; - i*:CYGWIN*:*) - echo ${UNAME_MACHINE}-pc-cygwin - exit ;; - *:MINGW*:*) - echo ${UNAME_MACHINE}-pc-mingw32 - exit ;; - i*:windows32*:*) - # uname -m includes "-pc" on this system. - echo ${UNAME_MACHINE}-mingw32 - exit ;; - i*:PW*:*) - echo ${UNAME_MACHINE}-pc-pw32 - exit ;; - *:Interix*:*) - case ${UNAME_MACHINE} in - x86) - echo i586-pc-interix${UNAME_RELEASE} - exit ;; - authenticamd | genuineintel | EM64T) - echo x86_64-unknown-interix${UNAME_RELEASE} - exit ;; - IA64) - echo ia64-unknown-interix${UNAME_RELEASE} - exit ;; - esac ;; - [345]86:Windows_95:* | [345]86:Windows_98:* | [345]86:Windows_NT:*) - echo i${UNAME_MACHINE}-pc-mks - exit ;; - 8664:Windows_NT:*) - echo x86_64-pc-mks - exit ;; - i*:Windows_NT*:* | Pentium*:Windows_NT*:*) - # How do we know it's Interix rather than the generic POSIX subsystem? - # It also conflicts with pre-2.0 versions of AT&T UWIN. Should we - # UNAME_MACHINE based on the output of uname instead of i386? - echo i586-pc-interix - exit ;; - i*:UWIN*:*) - echo ${UNAME_MACHINE}-pc-uwin - exit ;; - amd64:CYGWIN*:*:* | x86_64:CYGWIN*:*:*) - echo x86_64-unknown-cygwin - exit ;; - p*:CYGWIN*:*) - echo powerpcle-unknown-cygwin - exit ;; - prep*:SunOS:5.*:*) - echo powerpcle-unknown-solaris2`echo ${UNAME_RELEASE}|sed -e 's/[^.]*//'` - exit ;; - *:GNU:*:*) - # the GNU system - echo `echo ${UNAME_MACHINE}|sed -e 's,[-/].*$,,'`-unknown-gnu`echo ${UNAME_RELEASE}|sed -e 's,/.*$,,'` - exit ;; - *:GNU/*:*:*) - # other systems with GNU libc and userland - echo ${UNAME_MACHINE}-unknown-`echo ${UNAME_SYSTEM} | sed 's,^[^/]*/,,' | tr '[A-Z]' '[a-z]'``echo ${UNAME_RELEASE}|sed -e 's/[-(].*//'`-gnu - exit ;; - i*86:Minix:*:*) - echo ${UNAME_MACHINE}-pc-minix - exit ;; - alpha:Linux:*:*) - case `sed -n '/^cpu model/s/^.*: \(.*\)/\1/p' < /proc/cpuinfo` in - EV5) UNAME_MACHINE=alphaev5 ;; - EV56) UNAME_MACHINE=alphaev56 ;; - PCA56) UNAME_MACHINE=alphapca56 ;; - PCA57) UNAME_MACHINE=alphapca56 ;; - EV6) UNAME_MACHINE=alphaev6 ;; - EV67) UNAME_MACHINE=alphaev67 ;; - EV68*) UNAME_MACHINE=alphaev68 ;; - esac - objdump --private-headers /bin/sh | grep -q ld.so.1 - if test "$?" = 0 ; then LIBC="libc1" ; else LIBC="" ; fi - echo ${UNAME_MACHINE}-unknown-linux-gnu${LIBC} - exit ;; - arm*:Linux:*:*) - eval $set_cc_for_build - if echo __ARM_EABI__ | $CC_FOR_BUILD -E - 2>/dev/null \ - | grep -q __ARM_EABI__ - then - echo ${UNAME_MACHINE}-unknown-linux-gnu - else - echo ${UNAME_MACHINE}-unknown-linux-gnueabi - fi - exit ;; - avr32*:Linux:*:*) - echo ${UNAME_MACHINE}-unknown-linux-gnu - exit ;; - cris:Linux:*:*) - echo cris-axis-linux-gnu - exit ;; - crisv32:Linux:*:*) - echo crisv32-axis-linux-gnu - exit ;; - frv:Linux:*:*) - echo frv-unknown-linux-gnu - exit ;; - i*86:Linux:*:*) - LIBC=gnu - eval $set_cc_for_build - sed 's/^ //' << EOF >$dummy.c - #ifdef __dietlibc__ - LIBC=dietlibc - #endif -EOF - eval `$CC_FOR_BUILD -E $dummy.c 2>/dev/null | grep '^LIBC'` - echo "${UNAME_MACHINE}-pc-linux-${LIBC}" - exit ;; - ia64:Linux:*:*) - echo ${UNAME_MACHINE}-unknown-linux-gnu - exit ;; - m32r*:Linux:*:*) - echo ${UNAME_MACHINE}-unknown-linux-gnu - exit ;; - m68*:Linux:*:*) - echo ${UNAME_MACHINE}-unknown-linux-gnu - exit ;; - mips:Linux:*:* | mips64:Linux:*:*) - eval $set_cc_for_build - sed 's/^ //' << EOF >$dummy.c - #undef CPU - #undef ${UNAME_MACHINE} - #undef ${UNAME_MACHINE}el - #if defined(__MIPSEL__) || defined(__MIPSEL) || defined(_MIPSEL) || defined(MIPSEL) - CPU=${UNAME_MACHINE}el - #else - #if defined(__MIPSEB__) || defined(__MIPSEB) || defined(_MIPSEB) || defined(MIPSEB) - CPU=${UNAME_MACHINE} - #else - CPU= - #endif - #endif -EOF - eval `$CC_FOR_BUILD -E $dummy.c 2>/dev/null | grep '^CPU'` - test x"${CPU}" != x && { echo "${CPU}-unknown-linux-gnu"; exit; } - ;; - or32:Linux:*:*) - echo or32-unknown-linux-gnu - exit ;; - padre:Linux:*:*) - echo sparc-unknown-linux-gnu - exit ;; - parisc64:Linux:*:* | hppa64:Linux:*:*) - echo hppa64-unknown-linux-gnu - exit ;; - parisc:Linux:*:* | hppa:Linux:*:*) - # Look for CPU level - case `grep '^cpu[^a-z]*:' /proc/cpuinfo 2>/dev/null | cut -d' ' -f2` in - PA7*) echo hppa1.1-unknown-linux-gnu ;; - PA8*) echo hppa2.0-unknown-linux-gnu ;; - *) echo hppa-unknown-linux-gnu ;; - esac - exit ;; - ppc64:Linux:*:*) - echo powerpc64-unknown-linux-gnu - exit ;; - ppc:Linux:*:*) - echo powerpc-unknown-linux-gnu - exit ;; - s390:Linux:*:* | s390x:Linux:*:*) - echo ${UNAME_MACHINE}-ibm-linux - exit ;; - sh64*:Linux:*:*) - echo ${UNAME_MACHINE}-unknown-linux-gnu - exit ;; - sh*:Linux:*:*) - echo ${UNAME_MACHINE}-unknown-linux-gnu - exit ;; - sparc:Linux:*:* | sparc64:Linux:*:*) - echo ${UNAME_MACHINE}-unknown-linux-gnu - exit ;; - vax:Linux:*:*) - echo ${UNAME_MACHINE}-dec-linux-gnu - exit ;; - x86_64:Linux:*:*) - echo x86_64-unknown-linux-gnu - exit ;; - xtensa*:Linux:*:*) - echo ${UNAME_MACHINE}-unknown-linux-gnu - exit ;; - i*86:DYNIX/ptx:4*:*) - # ptx 4.0 does uname -s correctly, with DYNIX/ptx in there. - # earlier versions are messed up and put the nodename in both - # sysname and nodename. - echo i386-sequent-sysv4 - exit ;; - i*86:UNIX_SV:4.2MP:2.*) - # Unixware is an offshoot of SVR4, but it has its own version - # number series starting with 2... - # I am not positive that other SVR4 systems won't match this, - # I just have to hope. -- rms. - # Use sysv4.2uw... so that sysv4* matches it. - echo ${UNAME_MACHINE}-pc-sysv4.2uw${UNAME_VERSION} - exit ;; - i*86:OS/2:*:*) - # If we were able to find `uname', then EMX Unix compatibility - # is probably installed. - echo ${UNAME_MACHINE}-pc-os2-emx - exit ;; - i*86:XTS-300:*:STOP) - echo ${UNAME_MACHINE}-unknown-stop - exit ;; - i*86:atheos:*:*) - echo ${UNAME_MACHINE}-unknown-atheos - exit ;; - i*86:syllable:*:*) - echo ${UNAME_MACHINE}-pc-syllable - exit ;; - i*86:LynxOS:2.*:* | i*86:LynxOS:3.[01]*:* | i*86:LynxOS:4.[02]*:*) - echo i386-unknown-lynxos${UNAME_RELEASE} - exit ;; - i*86:*DOS:*:*) - echo ${UNAME_MACHINE}-pc-msdosdjgpp - exit ;; - i*86:*:4.*:* | i*86:SYSTEM_V:4.*:*) - UNAME_REL=`echo ${UNAME_RELEASE} | sed 's/\/MP$//'` - if grep Novell /usr/include/link.h >/dev/null 2>/dev/null; then - echo ${UNAME_MACHINE}-univel-sysv${UNAME_REL} - else - echo ${UNAME_MACHINE}-pc-sysv${UNAME_REL} - fi - exit ;; - i*86:*:5:[678]*) - # UnixWare 7.x, OpenUNIX and OpenServer 6. - case `/bin/uname -X | grep "^Machine"` in - *486*) UNAME_MACHINE=i486 ;; - *Pentium) UNAME_MACHINE=i586 ;; - *Pent*|*Celeron) UNAME_MACHINE=i686 ;; - esac - echo ${UNAME_MACHINE}-unknown-sysv${UNAME_RELEASE}${UNAME_SYSTEM}${UNAME_VERSION} - exit ;; - i*86:*:3.2:*) - if test -f /usr/options/cb.name; then - UNAME_REL=`sed -n 's/.*Version //p' /dev/null >/dev/null ; then - UNAME_REL=`(/bin/uname -X|grep Release|sed -e 's/.*= //')` - (/bin/uname -X|grep i80486 >/dev/null) && UNAME_MACHINE=i486 - (/bin/uname -X|grep '^Machine.*Pentium' >/dev/null) \ - && UNAME_MACHINE=i586 - (/bin/uname -X|grep '^Machine.*Pent *II' >/dev/null) \ - && UNAME_MACHINE=i686 - (/bin/uname -X|grep '^Machine.*Pentium Pro' >/dev/null) \ - && UNAME_MACHINE=i686 - echo ${UNAME_MACHINE}-pc-sco$UNAME_REL - else - echo ${UNAME_MACHINE}-pc-sysv32 - fi - exit ;; - pc:*:*:*) - # Left here for compatibility: - # uname -m prints for DJGPP always 'pc', but it prints nothing about - # the processor, so we play safe by assuming i586. - # Note: whatever this is, it MUST be the same as what config.sub - # prints for the "djgpp" host, or else GDB configury will decide that - # this is a cross-build. - echo i586-pc-msdosdjgpp - exit ;; - Intel:Mach:3*:*) - echo i386-pc-mach3 - exit ;; - paragon:*:*:*) - echo i860-intel-osf1 - exit ;; - i860:*:4.*:*) # i860-SVR4 - if grep Stardent /usr/include/sys/uadmin.h >/dev/null 2>&1 ; then - echo i860-stardent-sysv${UNAME_RELEASE} # Stardent Vistra i860-SVR4 - else # Add other i860-SVR4 vendors below as they are discovered. - echo i860-unknown-sysv${UNAME_RELEASE} # Unknown i860-SVR4 - fi - exit ;; - mini*:CTIX:SYS*5:*) - # "miniframe" - echo m68010-convergent-sysv - exit ;; - mc68k:UNIX:SYSTEM5:3.51m) - echo m68k-convergent-sysv - exit ;; - M680?0:D-NIX:5.3:*) - echo m68k-diab-dnix - exit ;; - M68*:*:R3V[5678]*:*) - test -r /sysV68 && { echo 'm68k-motorola-sysv'; exit; } ;; - 3[345]??:*:4.0:3.0 | 3[34]??A:*:4.0:3.0 | 3[34]??,*:*:4.0:3.0 | 3[34]??/*:*:4.0:3.0 | 4400:*:4.0:3.0 | 4850:*:4.0:3.0 | SKA40:*:4.0:3.0 | SDS2:*:4.0:3.0 | SHG2:*:4.0:3.0 | S7501*:*:4.0:3.0) - OS_REL='' - test -r /etc/.relid \ - && OS_REL=.`sed -n 's/[^ ]* [^ ]* \([0-9][0-9]\).*/\1/p' < /etc/.relid` - /bin/uname -p 2>/dev/null | grep 86 >/dev/null \ - && { echo i486-ncr-sysv4.3${OS_REL}; exit; } - /bin/uname -p 2>/dev/null | /bin/grep entium >/dev/null \ - && { echo i586-ncr-sysv4.3${OS_REL}; exit; } ;; - 3[34]??:*:4.0:* | 3[34]??,*:*:4.0:*) - /bin/uname -p 2>/dev/null | grep 86 >/dev/null \ - && { echo i486-ncr-sysv4; exit; } ;; - NCR*:*:4.2:* | MPRAS*:*:4.2:*) - OS_REL='.3' - test -r /etc/.relid \ - && OS_REL=.`sed -n 's/[^ ]* [^ ]* \([0-9][0-9]\).*/\1/p' < /etc/.relid` - /bin/uname -p 2>/dev/null | grep 86 >/dev/null \ - && { echo i486-ncr-sysv4.3${OS_REL}; exit; } - /bin/uname -p 2>/dev/null | /bin/grep entium >/dev/null \ - && { echo i586-ncr-sysv4.3${OS_REL}; exit; } - /bin/uname -p 2>/dev/null | /bin/grep pteron >/dev/null \ - && { echo i586-ncr-sysv4.3${OS_REL}; exit; } ;; - m68*:LynxOS:2.*:* | m68*:LynxOS:3.0*:*) - echo m68k-unknown-lynxos${UNAME_RELEASE} - exit ;; - mc68030:UNIX_System_V:4.*:*) - echo m68k-atari-sysv4 - exit ;; - TSUNAMI:LynxOS:2.*:*) - echo sparc-unknown-lynxos${UNAME_RELEASE} - exit ;; - rs6000:LynxOS:2.*:*) - echo rs6000-unknown-lynxos${UNAME_RELEASE} - exit ;; - PowerPC:LynxOS:2.*:* | PowerPC:LynxOS:3.[01]*:* | PowerPC:LynxOS:4.[02]*:*) - echo powerpc-unknown-lynxos${UNAME_RELEASE} - exit ;; - SM[BE]S:UNIX_SV:*:*) - echo mips-dde-sysv${UNAME_RELEASE} - exit ;; - RM*:ReliantUNIX-*:*:*) - echo mips-sni-sysv4 - exit ;; - RM*:SINIX-*:*:*) - echo mips-sni-sysv4 - exit ;; - *:SINIX-*:*:*) - if uname -p 2>/dev/null >/dev/null ; then - UNAME_MACHINE=`(uname -p) 2>/dev/null` - echo ${UNAME_MACHINE}-sni-sysv4 - else - echo ns32k-sni-sysv - fi - exit ;; - PENTIUM:*:4.0*:*) # Unisys `ClearPath HMP IX 4000' SVR4/MP effort - # says - echo i586-unisys-sysv4 - exit ;; - *:UNIX_System_V:4*:FTX*) - # From Gerald Hewes . - # How about differentiating between stratus architectures? -djm - echo hppa1.1-stratus-sysv4 - exit ;; - *:*:*:FTX*) - # From seanf@swdc.stratus.com. - echo i860-stratus-sysv4 - exit ;; - i*86:VOS:*:*) - # From Paul.Green@stratus.com. - echo ${UNAME_MACHINE}-stratus-vos - exit ;; - *:VOS:*:*) - # From Paul.Green@stratus.com. - echo hppa1.1-stratus-vos - exit ;; - mc68*:A/UX:*:*) - echo m68k-apple-aux${UNAME_RELEASE} - exit ;; - news*:NEWS-OS:6*:*) - echo mips-sony-newsos6 - exit ;; - R[34]000:*System_V*:*:* | R4000:UNIX_SYSV:*:* | R*000:UNIX_SV:*:*) - if [ -d /usr/nec ]; then - echo mips-nec-sysv${UNAME_RELEASE} - else - echo mips-unknown-sysv${UNAME_RELEASE} - fi - exit ;; - BeBox:BeOS:*:*) # BeOS running on hardware made by Be, PPC only. - echo powerpc-be-beos - exit ;; - BeMac:BeOS:*:*) # BeOS running on Mac or Mac clone, PPC only. - echo powerpc-apple-beos - exit ;; - BePC:BeOS:*:*) # BeOS running on Intel PC compatible. - echo i586-pc-beos - exit ;; - BePC:Haiku:*:*) # Haiku running on Intel PC compatible. - echo i586-pc-haiku - exit ;; - SX-4:SUPER-UX:*:*) - echo sx4-nec-superux${UNAME_RELEASE} - exit ;; - SX-5:SUPER-UX:*:*) - echo sx5-nec-superux${UNAME_RELEASE} - exit ;; - SX-6:SUPER-UX:*:*) - echo sx6-nec-superux${UNAME_RELEASE} - exit ;; - SX-7:SUPER-UX:*:*) - echo sx7-nec-superux${UNAME_RELEASE} - exit ;; - SX-8:SUPER-UX:*:*) - echo sx8-nec-superux${UNAME_RELEASE} - exit ;; - SX-8R:SUPER-UX:*:*) - echo sx8r-nec-superux${UNAME_RELEASE} - exit ;; - Power*:Rhapsody:*:*) - echo powerpc-apple-rhapsody${UNAME_RELEASE} - exit ;; - *:Rhapsody:*:*) - echo ${UNAME_MACHINE}-apple-rhapsody${UNAME_RELEASE} - exit ;; - *:Darwin:*:*) - UNAME_PROCESSOR=`uname -p` || UNAME_PROCESSOR=unknown - case $UNAME_PROCESSOR in - i386) - eval $set_cc_for_build - if [ "$CC_FOR_BUILD" != 'no_compiler_found' ]; then - if (echo '#ifdef __LP64__'; echo IS_64BIT_ARCH; echo '#endif') | \ - (CCOPTS= $CC_FOR_BUILD -E - 2>/dev/null) | \ - grep IS_64BIT_ARCH >/dev/null - then - UNAME_PROCESSOR="x86_64" - fi - fi ;; - unknown) UNAME_PROCESSOR=powerpc ;; - esac - echo ${UNAME_PROCESSOR}-apple-darwin${UNAME_RELEASE} - exit ;; - *:procnto*:*:* | *:QNX:[0123456789]*:*) - UNAME_PROCESSOR=`uname -p` - if test "$UNAME_PROCESSOR" = "x86"; then - UNAME_PROCESSOR=i386 - UNAME_MACHINE=pc - fi - echo ${UNAME_PROCESSOR}-${UNAME_MACHINE}-nto-qnx${UNAME_RELEASE} - exit ;; - *:QNX:*:4*) - echo i386-pc-qnx - exit ;; - NSE-?:NONSTOP_KERNEL:*:*) - echo nse-tandem-nsk${UNAME_RELEASE} - exit ;; - NSR-?:NONSTOP_KERNEL:*:*) - echo nsr-tandem-nsk${UNAME_RELEASE} - exit ;; - *:NonStop-UX:*:*) - echo mips-compaq-nonstopux - exit ;; - BS2000:POSIX*:*:*) - echo bs2000-siemens-sysv - exit ;; - DS/*:UNIX_System_V:*:*) - echo ${UNAME_MACHINE}-${UNAME_SYSTEM}-${UNAME_RELEASE} - exit ;; - *:Plan9:*:*) - # "uname -m" is not consistent, so use $cputype instead. 386 - # is converted to i386 for consistency with other x86 - # operating systems. - if test "$cputype" = "386"; then - UNAME_MACHINE=i386 - else - UNAME_MACHINE="$cputype" - fi - echo ${UNAME_MACHINE}-unknown-plan9 - exit ;; - *:TOPS-10:*:*) - echo pdp10-unknown-tops10 - exit ;; - *:TENEX:*:*) - echo pdp10-unknown-tenex - exit ;; - KS10:TOPS-20:*:* | KL10:TOPS-20:*:* | TYPE4:TOPS-20:*:*) - echo pdp10-dec-tops20 - exit ;; - XKL-1:TOPS-20:*:* | TYPE5:TOPS-20:*:*) - echo pdp10-xkl-tops20 - exit ;; - *:TOPS-20:*:*) - echo pdp10-unknown-tops20 - exit ;; - *:ITS:*:*) - echo pdp10-unknown-its - exit ;; - SEI:*:*:SEIUX) - echo mips-sei-seiux${UNAME_RELEASE} - exit ;; - *:DragonFly:*:*) - echo ${UNAME_MACHINE}-unknown-dragonfly`echo ${UNAME_RELEASE}|sed -e 's/[-(].*//'` - exit ;; - *:*VMS:*:*) - UNAME_MACHINE=`(uname -p) 2>/dev/null` - case "${UNAME_MACHINE}" in - A*) echo alpha-dec-vms ; exit ;; - I*) echo ia64-dec-vms ; exit ;; - V*) echo vax-dec-vms ; exit ;; - esac ;; - *:XENIX:*:SysV) - echo i386-pc-xenix - exit ;; - i*86:skyos:*:*) - echo ${UNAME_MACHINE}-pc-skyos`echo ${UNAME_RELEASE}` | sed -e 's/ .*$//' - exit ;; - i*86:rdos:*:*) - echo ${UNAME_MACHINE}-pc-rdos - exit ;; - i*86:AROS:*:*) - echo ${UNAME_MACHINE}-pc-aros - exit ;; -esac - -#echo '(No uname command or uname output not recognized.)' 1>&2 -#echo "${UNAME_MACHINE}:${UNAME_SYSTEM}:${UNAME_RELEASE}:${UNAME_VERSION}" 1>&2 - -eval $set_cc_for_build -cat >$dummy.c < -# include -#endif -main () -{ -#if defined (sony) -#if defined (MIPSEB) - /* BFD wants "bsd" instead of "newsos". Perhaps BFD should be changed, - I don't know.... */ - printf ("mips-sony-bsd\n"); exit (0); -#else -#include - printf ("m68k-sony-newsos%s\n", -#ifdef NEWSOS4 - "4" -#else - "" -#endif - ); exit (0); -#endif -#endif - -#if defined (__arm) && defined (__acorn) && defined (__unix) - printf ("arm-acorn-riscix\n"); exit (0); -#endif - -#if defined (hp300) && !defined (hpux) - printf ("m68k-hp-bsd\n"); exit (0); -#endif - -#if defined (NeXT) -#if !defined (__ARCHITECTURE__) -#define __ARCHITECTURE__ "m68k" -#endif - int version; - version=`(hostinfo | sed -n 's/.*NeXT Mach \([0-9]*\).*/\1/p') 2>/dev/null`; - if (version < 4) - printf ("%s-next-nextstep%d\n", __ARCHITECTURE__, version); - else - printf ("%s-next-openstep%d\n", __ARCHITECTURE__, version); - exit (0); -#endif - -#if defined (MULTIMAX) || defined (n16) -#if defined (UMAXV) - printf ("ns32k-encore-sysv\n"); exit (0); -#else -#if defined (CMU) - printf ("ns32k-encore-mach\n"); exit (0); -#else - printf ("ns32k-encore-bsd\n"); exit (0); -#endif -#endif -#endif - -#if defined (__386BSD__) - printf ("i386-pc-bsd\n"); exit (0); -#endif - -#if defined (sequent) -#if defined (i386) - printf ("i386-sequent-dynix\n"); exit (0); -#endif -#if defined (ns32000) - printf ("ns32k-sequent-dynix\n"); exit (0); -#endif -#endif - -#if defined (_SEQUENT_) - struct utsname un; - - uname(&un); - - if (strncmp(un.version, "V2", 2) == 0) { - printf ("i386-sequent-ptx2\n"); exit (0); - } - if (strncmp(un.version, "V1", 2) == 0) { /* XXX is V1 correct? */ - printf ("i386-sequent-ptx1\n"); exit (0); - } - printf ("i386-sequent-ptx\n"); exit (0); - -#endif - -#if defined (vax) -# if !defined (ultrix) -# include -# if defined (BSD) -# if BSD == 43 - printf ("vax-dec-bsd4.3\n"); exit (0); -# else -# if BSD == 199006 - printf ("vax-dec-bsd4.3reno\n"); exit (0); -# else - printf ("vax-dec-bsd\n"); exit (0); -# endif -# endif -# else - printf ("vax-dec-bsd\n"); exit (0); -# endif -# else - printf ("vax-dec-ultrix\n"); exit (0); -# endif -#endif - -#if defined (alliant) && defined (i860) - printf ("i860-alliant-bsd\n"); exit (0); -#endif - - exit (1); -} -EOF - -$CC_FOR_BUILD -o $dummy $dummy.c 2>/dev/null && SYSTEM_NAME=`$dummy` && - { echo "$SYSTEM_NAME"; exit; } - -# Apollos put the system type in the environment. - -test -d /usr/apollo && { echo ${ISP}-apollo-${SYSTYPE}; exit; } - -# Convex versions that predate uname can use getsysinfo(1) - -if [ -x /usr/convex/getsysinfo ] -then - case `getsysinfo -f cpu_type` in - c1*) - echo c1-convex-bsd - exit ;; - c2*) - if getsysinfo -f scalar_acc - then echo c32-convex-bsd - else echo c2-convex-bsd - fi - exit ;; - c34*) - echo c34-convex-bsd - exit ;; - c38*) - echo c38-convex-bsd - exit ;; - c4*) - echo c4-convex-bsd - exit ;; - esac -fi - -cat >&2 < in order to provide the needed -information to handle your system. - -config.guess timestamp = $timestamp - -uname -m = `(uname -m) 2>/dev/null || echo unknown` -uname -r = `(uname -r) 2>/dev/null || echo unknown` -uname -s = `(uname -s) 2>/dev/null || echo unknown` -uname -v = `(uname -v) 2>/dev/null || echo unknown` - -/usr/bin/uname -p = `(/usr/bin/uname -p) 2>/dev/null` -/bin/uname -X = `(/bin/uname -X) 2>/dev/null` - -hostinfo = `(hostinfo) 2>/dev/null` -/bin/universe = `(/bin/universe) 2>/dev/null` -/usr/bin/arch -k = `(/usr/bin/arch -k) 2>/dev/null` -/bin/arch = `(/bin/arch) 2>/dev/null` -/usr/bin/oslevel = `(/usr/bin/oslevel) 2>/dev/null` -/usr/convex/getsysinfo = `(/usr/convex/getsysinfo) 2>/dev/null` - -UNAME_MACHINE = ${UNAME_MACHINE} -UNAME_RELEASE = ${UNAME_RELEASE} -UNAME_SYSTEM = ${UNAME_SYSTEM} -UNAME_VERSION = ${UNAME_VERSION} -EOF - -exit 1 - -# Local variables: -# eval: (add-hook 'write-file-hooks 'time-stamp) -# time-stamp-start: "timestamp='" -# time-stamp-format: "%:y-%02m-%02d" -# time-stamp-end: "'" -# End: diff --git a/test/test-automation/build-scripts/config.sub b/test/test-automation/build-scripts/config.sub deleted file mode 100755 index c2d125724..000000000 --- a/test/test-automation/build-scripts/config.sub +++ /dev/null @@ -1,1714 +0,0 @@ -#! /bin/sh -# Configuration validation subroutine script. -# Copyright (C) 1992, 1993, 1994, 1995, 1996, 1997, 1998, 1999, -# 2000, 2001, 2002, 2003, 2004, 2005, 2006, 2007, 2008, 2009, 2010 -# Free Software Foundation, Inc. - -timestamp='2010-01-22' - -# This file is (in principle) common to ALL GNU software. -# The presence of a machine in this file suggests that SOME GNU software -# can handle that machine. It does not imply ALL GNU software can. -# -# This file is free software; you can redistribute it and/or modify -# it under the terms of the GNU General Public License as published by -# the Free Software Foundation; either version 2 of the License, or -# (at your option) any later version. -# -# This program is distributed in the hope that it will be useful, -# but WITHOUT ANY WARRANTY; without even the implied warranty of -# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the -# GNU General Public License for more details. -# -# You should have received a copy of the GNU General Public License -# along with this program; if not, write to the Free Software -# Foundation, Inc., 51 Franklin Street - Fifth Floor, Boston, MA -# 02110-1301, USA. -# -# As a special exception to the GNU General Public License, if you -# distribute this file as part of a program that contains a -# configuration script generated by Autoconf, you may include it under -# the same distribution terms that you use for the rest of that program. - - -# Please send patches to . Submit a context -# diff and a properly formatted GNU ChangeLog entry. -# -# Configuration subroutine to validate and canonicalize a configuration type. -# Supply the specified configuration type as an argument. -# If it is invalid, we print an error message on stderr and exit with code 1. -# Otherwise, we print the canonical config type on stdout and succeed. - -# You can get the latest version of this script from: -# http://git.savannah.gnu.org/gitweb/?p=config.git;a=blob_plain;f=config.sub;hb=HEAD - -# This file is supposed to be the same for all GNU packages -# and recognize all the CPU types, system types and aliases -# that are meaningful with *any* GNU software. -# Each package is responsible for reporting which valid configurations -# it does not support. The user should be able to distinguish -# a failure to support a valid configuration from a meaningless -# configuration. - -# The goal of this file is to map all the various variations of a given -# machine specification into a single specification in the form: -# CPU_TYPE-MANUFACTURER-OPERATING_SYSTEM -# or in some cases, the newer four-part form: -# CPU_TYPE-MANUFACTURER-KERNEL-OPERATING_SYSTEM -# It is wrong to echo any other type of specification. - -me=`echo "$0" | sed -e 's,.*/,,'` - -usage="\ -Usage: $0 [OPTION] CPU-MFR-OPSYS - $0 [OPTION] ALIAS - -Canonicalize a configuration name. - -Operation modes: - -h, --help print this help, then exit - -t, --time-stamp print date of last modification, then exit - -v, --version print version number, then exit - -Report bugs and patches to ." - -version="\ -GNU config.sub ($timestamp) - -Copyright (C) 1992, 1993, 1994, 1995, 1996, 1997, 1998, 1999, 2000, -2001, 2002, 2003, 2004, 2005, 2006, 2007, 2008, 2009, 2010 Free -Software Foundation, Inc. - -This is free software; see the source for copying conditions. There is NO -warranty; not even for MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE." - -help=" -Try \`$me --help' for more information." - -# Parse command line -while test $# -gt 0 ; do - case $1 in - --time-stamp | --time* | -t ) - echo "$timestamp" ; exit ;; - --version | -v ) - echo "$version" ; exit ;; - --help | --h* | -h ) - echo "$usage"; exit ;; - -- ) # Stop option processing - shift; break ;; - - ) # Use stdin as input. - break ;; - -* ) - echo "$me: invalid option $1$help" - exit 1 ;; - - *local*) - # First pass through any local machine types. - echo $1 - exit ;; - - * ) - break ;; - esac -done - -case $# in - 0) echo "$me: missing argument$help" >&2 - exit 1;; - 1) ;; - *) echo "$me: too many arguments$help" >&2 - exit 1;; -esac - -# Separate what the user gave into CPU-COMPANY and OS or KERNEL-OS (if any). -# Here we must recognize all the valid KERNEL-OS combinations. -maybe_os=`echo $1 | sed 's/^\(.*\)-\([^-]*-[^-]*\)$/\2/'` -case $maybe_os in - nto-qnx* | linux-gnu* | linux-dietlibc | linux-newlib* | linux-uclibc* | \ - uclinux-uclibc* | uclinux-gnu* | kfreebsd*-gnu* | knetbsd*-gnu* | netbsd*-gnu* | \ - kopensolaris*-gnu* | \ - storm-chaos* | os2-emx* | rtmk-nova*) - os=-$maybe_os - basic_machine=`echo $1 | sed 's/^\(.*\)-\([^-]*-[^-]*\)$/\1/'` - ;; - *) - basic_machine=`echo $1 | sed 's/-[^-]*$//'` - if [ $basic_machine != $1 ] - then os=`echo $1 | sed 's/.*-/-/'` - else os=; fi - ;; -esac - -### Let's recognize common machines as not being operating systems so -### that things like config.sub decstation-3100 work. We also -### recognize some manufacturers as not being operating systems, so we -### can provide default operating systems below. -case $os in - -sun*os*) - # Prevent following clause from handling this invalid input. - ;; - -dec* | -mips* | -sequent* | -encore* | -pc532* | -sgi* | -sony* | \ - -att* | -7300* | -3300* | -delta* | -motorola* | -sun[234]* | \ - -unicom* | -ibm* | -next | -hp | -isi* | -apollo | -altos* | \ - -convergent* | -ncr* | -news | -32* | -3600* | -3100* | -hitachi* |\ - -c[123]* | -convex* | -sun | -crds | -omron* | -dg | -ultra | -tti* | \ - -harris | -dolphin | -highlevel | -gould | -cbm | -ns | -masscomp | \ - -apple | -axis | -knuth | -cray | -microblaze) - os= - basic_machine=$1 - ;; - -bluegene*) - os=-cnk - ;; - -sim | -cisco | -oki | -wec | -winbond) - os= - basic_machine=$1 - ;; - -scout) - ;; - -wrs) - os=-vxworks - basic_machine=$1 - ;; - -chorusos*) - os=-chorusos - basic_machine=$1 - ;; - -chorusrdb) - os=-chorusrdb - basic_machine=$1 - ;; - -hiux*) - os=-hiuxwe2 - ;; - -sco6) - os=-sco5v6 - basic_machine=`echo $1 | sed -e 's/86-.*/86-pc/'` - ;; - -sco5) - os=-sco3.2v5 - basic_machine=`echo $1 | sed -e 's/86-.*/86-pc/'` - ;; - -sco4) - os=-sco3.2v4 - basic_machine=`echo $1 | sed -e 's/86-.*/86-pc/'` - ;; - -sco3.2.[4-9]*) - os=`echo $os | sed -e 's/sco3.2./sco3.2v/'` - basic_machine=`echo $1 | sed -e 's/86-.*/86-pc/'` - ;; - -sco3.2v[4-9]*) - # Don't forget version if it is 3.2v4 or newer. - basic_machine=`echo $1 | sed -e 's/86-.*/86-pc/'` - ;; - -sco5v6*) - # Don't forget version if it is 3.2v4 or newer. - basic_machine=`echo $1 | sed -e 's/86-.*/86-pc/'` - ;; - -sco*) - os=-sco3.2v2 - basic_machine=`echo $1 | sed -e 's/86-.*/86-pc/'` - ;; - -udk*) - basic_machine=`echo $1 | sed -e 's/86-.*/86-pc/'` - ;; - -isc) - os=-isc2.2 - basic_machine=`echo $1 | sed -e 's/86-.*/86-pc/'` - ;; - -clix*) - basic_machine=clipper-intergraph - ;; - -isc*) - basic_machine=`echo $1 | sed -e 's/86-.*/86-pc/'` - ;; - -lynx*) - os=-lynxos - ;; - -ptx*) - basic_machine=`echo $1 | sed -e 's/86-.*/86-sequent/'` - ;; - -windowsnt*) - os=`echo $os | sed -e 's/windowsnt/winnt/'` - ;; - -psos*) - os=-psos - ;; - -mint | -mint[0-9]*) - basic_machine=m68k-atari - os=-mint - ;; -esac - -# Decode aliases for certain CPU-COMPANY combinations. -case $basic_machine in - # Recognize the basic CPU types without company name. - # Some are omitted here because they have special meanings below. - 1750a | 580 \ - | a29k \ - | alpha | alphaev[4-8] | alphaev56 | alphaev6[78] | alphapca5[67] \ - | alpha64 | alpha64ev[4-8] | alpha64ev56 | alpha64ev6[78] | alpha64pca5[67] \ - | am33_2.0 \ - | arc | arm | arm[bl]e | arme[lb] | armv[2345] | armv[345][lb] | avr | avr32 \ - | bfin \ - | c4x | clipper \ - | d10v | d30v | dlx | dsp16xx \ - | fido | fr30 | frv \ - | h8300 | h8500 | hppa | hppa1.[01] | hppa2.0 | hppa2.0[nw] | hppa64 \ - | i370 | i860 | i960 | ia64 \ - | ip2k | iq2000 \ - | lm32 \ - | m32c | m32r | m32rle | m68000 | m68k | m88k \ - | maxq | mb | microblaze | mcore | mep | metag \ - | mips | mipsbe | mipseb | mipsel | mipsle \ - | mips16 \ - | mips64 | mips64el \ - | mips64octeon | mips64octeonel \ - | mips64orion | mips64orionel \ - | mips64r5900 | mips64r5900el \ - | mips64vr | mips64vrel \ - | mips64vr4100 | mips64vr4100el \ - | mips64vr4300 | mips64vr4300el \ - | mips64vr5000 | mips64vr5000el \ - | mips64vr5900 | mips64vr5900el \ - | mipsisa32 | mipsisa32el \ - | mipsisa32r2 | mipsisa32r2el \ - | mipsisa64 | mipsisa64el \ - | mipsisa64r2 | mipsisa64r2el \ - | mipsisa64sb1 | mipsisa64sb1el \ - | mipsisa64sr71k | mipsisa64sr71kel \ - | mipstx39 | mipstx39el \ - | mn10200 | mn10300 \ - | moxie \ - | mt \ - | msp430 \ - | nios | nios2 \ - | ns16k | ns32k \ - | or32 \ - | pdp10 | pdp11 | pj | pjl \ - | powerpc | powerpc64 | powerpc64le | powerpcle | ppcbe \ - | pyramid \ - | rx \ - | score \ - | sh | sh[1234] | sh[24]a | sh[24]aeb | sh[23]e | sh[34]eb | sheb | shbe | shle | sh[1234]le | sh3ele \ - | sh64 | sh64le \ - | sparc | sparc64 | sparc64b | sparc64v | sparc86x | sparclet | sparclite \ - | sparcv8 | sparcv9 | sparcv9b | sparcv9v \ - | spu | strongarm \ - | tahoe | thumb | tic4x | tic80 | tron \ - | ubicom32 \ - | v850 | v850e \ - | we32k \ - | x86 | xc16x | xscale | xscalee[bl] | xstormy16 | xtensa \ - | z8k | z80) - basic_machine=$basic_machine-unknown - ;; - m6811 | m68hc11 | m6812 | m68hc12 | picochip) - # Motorola 68HC11/12. - basic_machine=$basic_machine-unknown - os=-none - ;; - m88110 | m680[12346]0 | m683?2 | m68360 | m5200 | v70 | w65 | z8k) - ;; - ms1) - basic_machine=mt-unknown - ;; - - # We use `pc' rather than `unknown' - # because (1) that's what they normally are, and - # (2) the word "unknown" tends to confuse beginning users. - i*86 | x86_64) - basic_machine=$basic_machine-pc - ;; - # Object if more than one company name word. - *-*-*) - echo Invalid configuration \`$1\': machine \`$basic_machine\' not recognized 1>&2 - exit 1 - ;; - # Recognize the basic CPU types with company name. - 580-* \ - | a29k-* \ - | alpha-* | alphaev[4-8]-* | alphaev56-* | alphaev6[78]-* \ - | alpha64-* | alpha64ev[4-8]-* | alpha64ev56-* | alpha64ev6[78]-* \ - | alphapca5[67]-* | alpha64pca5[67]-* | arc-* \ - | arm-* | armbe-* | armle-* | armeb-* | armv*-* \ - | avr-* | avr32-* \ - | bfin-* | bs2000-* \ - | c[123]* | c30-* | [cjt]90-* | c4x-* | c54x-* | c55x-* | c6x-* \ - | clipper-* | craynv-* | cydra-* \ - | d10v-* | d30v-* | dlx-* \ - | elxsi-* \ - | f30[01]-* | f700-* | fido-* | fr30-* | frv-* | fx80-* \ - | h8300-* | h8500-* \ - | hppa-* | hppa1.[01]-* | hppa2.0-* | hppa2.0[nw]-* | hppa64-* \ - | i*86-* | i860-* | i960-* | ia64-* \ - | ip2k-* | iq2000-* \ - | lm32-* \ - | m32c-* | m32r-* | m32rle-* \ - | m68000-* | m680[012346]0-* | m68360-* | m683?2-* | m68k-* \ - | m88110-* | m88k-* | maxq-* | mcore-* | metag-* | microblaze-* \ - | mips-* | mipsbe-* | mipseb-* | mipsel-* | mipsle-* \ - | mips16-* \ - | mips64-* | mips64el-* \ - | mips64octeon-* | mips64octeonel-* \ - | mips64orion-* | mips64orionel-* \ - | mips64r5900-* | mips64r5900el-* \ - | mips64vr-* | mips64vrel-* \ - | mips64vr4100-* | mips64vr4100el-* \ - | mips64vr4300-* | mips64vr4300el-* \ - | mips64vr5000-* | mips64vr5000el-* \ - | mips64vr5900-* | mips64vr5900el-* \ - | mipsisa32-* | mipsisa32el-* \ - | mipsisa32r2-* | mipsisa32r2el-* \ - | mipsisa64-* | mipsisa64el-* \ - | mipsisa64r2-* | mipsisa64r2el-* \ - | mipsisa64sb1-* | mipsisa64sb1el-* \ - | mipsisa64sr71k-* | mipsisa64sr71kel-* \ - | mipstx39-* | mipstx39el-* \ - | mmix-* \ - | mt-* \ - | msp430-* \ - | nios-* | nios2-* \ - | none-* | np1-* | ns16k-* | ns32k-* \ - | orion-* \ - | pdp10-* | pdp11-* | pj-* | pjl-* | pn-* | power-* \ - | powerpc-* | powerpc64-* | powerpc64le-* | powerpcle-* | ppcbe-* \ - | pyramid-* \ - | romp-* | rs6000-* | rx-* \ - | sh-* | sh[1234]-* | sh[24]a-* | sh[24]aeb-* | sh[23]e-* | sh[34]eb-* | sheb-* | shbe-* \ - | shle-* | sh[1234]le-* | sh3ele-* | sh64-* | sh64le-* \ - | sparc-* | sparc64-* | sparc64b-* | sparc64v-* | sparc86x-* | sparclet-* \ - | sparclite-* \ - | sparcv8-* | sparcv9-* | sparcv9b-* | sparcv9v-* | strongarm-* | sv1-* | sx?-* \ - | tahoe-* | thumb-* \ - | tic30-* | tic4x-* | tic54x-* | tic55x-* | tic6x-* | tic80-* \ - | tile-* | tilegx-* \ - | tron-* \ - | ubicom32-* \ - | v850-* | v850e-* | vax-* \ - | we32k-* \ - | x86-* | x86_64-* | xc16x-* | xps100-* | xscale-* | xscalee[bl]-* \ - | xstormy16-* | xtensa*-* \ - | ymp-* \ - | z8k-* | z80-*) - ;; - # Recognize the basic CPU types without company name, with glob match. - xtensa*) - basic_machine=$basic_machine-unknown - ;; - # Recognize the various machine names and aliases which stand - # for a CPU type and a company and sometimes even an OS. - 386bsd) - basic_machine=i386-unknown - os=-bsd - ;; - 3b1 | 7300 | 7300-att | att-7300 | pc7300 | safari | unixpc) - basic_machine=m68000-att - ;; - 3b*) - basic_machine=we32k-att - ;; - a29khif) - basic_machine=a29k-amd - os=-udi - ;; - abacus) - basic_machine=abacus-unknown - ;; - adobe68k) - basic_machine=m68010-adobe - os=-scout - ;; - alliant | fx80) - basic_machine=fx80-alliant - ;; - altos | altos3068) - basic_machine=m68k-altos - ;; - am29k) - basic_machine=a29k-none - os=-bsd - ;; - amd64) - basic_machine=x86_64-pc - ;; - amd64-*) - basic_machine=x86_64-`echo $basic_machine | sed 's/^[^-]*-//'` - ;; - amdahl) - basic_machine=580-amdahl - os=-sysv - ;; - amiga | amiga-*) - basic_machine=m68k-unknown - ;; - amigaos | amigados) - basic_machine=m68k-unknown - os=-amigaos - ;; - amigaunix | amix) - basic_machine=m68k-unknown - os=-sysv4 - ;; - apollo68) - basic_machine=m68k-apollo - os=-sysv - ;; - apollo68bsd) - basic_machine=m68k-apollo - os=-bsd - ;; - aros) - basic_machine=i386-pc - os=-aros - ;; - aux) - basic_machine=m68k-apple - os=-aux - ;; - balance) - basic_machine=ns32k-sequent - os=-dynix - ;; - blackfin) - basic_machine=bfin-unknown - os=-linux - ;; - blackfin-*) - basic_machine=bfin-`echo $basic_machine | sed 's/^[^-]*-//'` - os=-linux - ;; - bluegene*) - basic_machine=powerpc-ibm - os=-cnk - ;; - c90) - basic_machine=c90-cray - os=-unicos - ;; - cegcc) - basic_machine=arm-unknown - os=-cegcc - ;; - convex-c1) - basic_machine=c1-convex - os=-bsd - ;; - convex-c2) - basic_machine=c2-convex - os=-bsd - ;; - convex-c32) - basic_machine=c32-convex - os=-bsd - ;; - convex-c34) - basic_machine=c34-convex - os=-bsd - ;; - convex-c38) - basic_machine=c38-convex - os=-bsd - ;; - cray | j90) - basic_machine=j90-cray - os=-unicos - ;; - craynv) - basic_machine=craynv-cray - os=-unicosmp - ;; - cr16) - basic_machine=cr16-unknown - os=-elf - ;; - crds | unos) - basic_machine=m68k-crds - ;; - crisv32 | crisv32-* | etraxfs*) - basic_machine=crisv32-axis - ;; - cris | cris-* | etrax*) - basic_machine=cris-axis - ;; - crx) - basic_machine=crx-unknown - os=-elf - ;; - da30 | da30-*) - basic_machine=m68k-da30 - ;; - decstation | decstation-3100 | pmax | pmax-* | pmin | dec3100 | decstatn) - basic_machine=mips-dec - ;; - decsystem10* | dec10*) - basic_machine=pdp10-dec - os=-tops10 - ;; - decsystem20* | dec20*) - basic_machine=pdp10-dec - os=-tops20 - ;; - delta | 3300 | motorola-3300 | motorola-delta \ - | 3300-motorola | delta-motorola) - basic_machine=m68k-motorola - ;; - delta88) - basic_machine=m88k-motorola - os=-sysv3 - ;; - dicos) - basic_machine=i686-pc - os=-dicos - ;; - djgpp) - basic_machine=i586-pc - os=-msdosdjgpp - ;; - dpx20 | dpx20-*) - basic_machine=rs6000-bull - os=-bosx - ;; - dpx2* | dpx2*-bull) - basic_machine=m68k-bull - os=-sysv3 - ;; - ebmon29k) - basic_machine=a29k-amd - os=-ebmon - ;; - elxsi) - basic_machine=elxsi-elxsi - os=-bsd - ;; - encore | umax | mmax) - basic_machine=ns32k-encore - ;; - es1800 | OSE68k | ose68k | ose | OSE) - basic_machine=m68k-ericsson - os=-ose - ;; - fx2800) - basic_machine=i860-alliant - ;; - genix) - basic_machine=ns32k-ns - ;; - gmicro) - basic_machine=tron-gmicro - os=-sysv - ;; - go32) - basic_machine=i386-pc - os=-go32 - ;; - h3050r* | hiux*) - basic_machine=hppa1.1-hitachi - os=-hiuxwe2 - ;; - h8300hms) - basic_machine=h8300-hitachi - os=-hms - ;; - h8300xray) - basic_machine=h8300-hitachi - os=-xray - ;; - h8500hms) - basic_machine=h8500-hitachi - os=-hms - ;; - harris) - basic_machine=m88k-harris - os=-sysv3 - ;; - hp300-*) - basic_machine=m68k-hp - ;; - hp300bsd) - basic_machine=m68k-hp - os=-bsd - ;; - hp300hpux) - basic_machine=m68k-hp - os=-hpux - ;; - hp3k9[0-9][0-9] | hp9[0-9][0-9]) - basic_machine=hppa1.0-hp - ;; - hp9k2[0-9][0-9] | hp9k31[0-9]) - basic_machine=m68000-hp - ;; - hp9k3[2-9][0-9]) - basic_machine=m68k-hp - ;; - hp9k6[0-9][0-9] | hp6[0-9][0-9]) - basic_machine=hppa1.0-hp - ;; - hp9k7[0-79][0-9] | hp7[0-79][0-9]) - basic_machine=hppa1.1-hp - ;; - hp9k78[0-9] | hp78[0-9]) - # FIXME: really hppa2.0-hp - basic_machine=hppa1.1-hp - ;; - hp9k8[67]1 | hp8[67]1 | hp9k80[24] | hp80[24] | hp9k8[78]9 | hp8[78]9 | hp9k893 | hp893) - # FIXME: really hppa2.0-hp - basic_machine=hppa1.1-hp - ;; - hp9k8[0-9][13679] | hp8[0-9][13679]) - basic_machine=hppa1.1-hp - ;; - hp9k8[0-9][0-9] | hp8[0-9][0-9]) - basic_machine=hppa1.0-hp - ;; - hppa-next) - os=-nextstep3 - ;; - hppaosf) - basic_machine=hppa1.1-hp - os=-osf - ;; - hppro) - basic_machine=hppa1.1-hp - os=-proelf - ;; - i370-ibm* | ibm*) - basic_machine=i370-ibm - ;; -# I'm not sure what "Sysv32" means. Should this be sysv3.2? - i*86v32) - basic_machine=`echo $1 | sed -e 's/86.*/86-pc/'` - os=-sysv32 - ;; - i*86v4*) - basic_machine=`echo $1 | sed -e 's/86.*/86-pc/'` - os=-sysv4 - ;; - i*86v) - basic_machine=`echo $1 | sed -e 's/86.*/86-pc/'` - os=-sysv - ;; - i*86sol2) - basic_machine=`echo $1 | sed -e 's/86.*/86-pc/'` - os=-solaris2 - ;; - i386mach) - basic_machine=i386-mach - os=-mach - ;; - i386-vsta | vsta) - basic_machine=i386-unknown - os=-vsta - ;; - iris | iris4d) - basic_machine=mips-sgi - case $os in - -irix*) - ;; - *) - os=-irix4 - ;; - esac - ;; - isi68 | isi) - basic_machine=m68k-isi - os=-sysv - ;; - m68knommu) - basic_machine=m68k-unknown - os=-linux - ;; - m68knommu-*) - basic_machine=m68k-`echo $basic_machine | sed 's/^[^-]*-//'` - os=-linux - ;; - m88k-omron*) - basic_machine=m88k-omron - ;; - magnum | m3230) - basic_machine=mips-mips - os=-sysv - ;; - merlin) - basic_machine=ns32k-utek - os=-sysv - ;; - microblaze) - basic_machine=microblaze-xilinx - ;; - mingw32) - basic_machine=i386-pc - os=-mingw32 - ;; - mingw32ce) - basic_machine=arm-unknown - os=-mingw32ce - ;; - miniframe) - basic_machine=m68000-convergent - ;; - *mint | -mint[0-9]* | *MiNT | *MiNT[0-9]*) - basic_machine=m68k-atari - os=-mint - ;; - mips3*-*) - basic_machine=`echo $basic_machine | sed -e 's/mips3/mips64/'` - ;; - mips3*) - basic_machine=`echo $basic_machine | sed -e 's/mips3/mips64/'`-unknown - ;; - monitor) - basic_machine=m68k-rom68k - os=-coff - ;; - morphos) - basic_machine=powerpc-unknown - os=-morphos - ;; - msdos) - basic_machine=i386-pc - os=-msdos - ;; - ms1-*) - basic_machine=`echo $basic_machine | sed -e 's/ms1-/mt-/'` - ;; - mvs) - basic_machine=i370-ibm - os=-mvs - ;; - ncr3000) - basic_machine=i486-ncr - os=-sysv4 - ;; - netbsd386) - basic_machine=i386-unknown - os=-netbsd - ;; - netwinder) - basic_machine=armv4l-rebel - os=-linux - ;; - news | news700 | news800 | news900) - basic_machine=m68k-sony - os=-newsos - ;; - news1000) - basic_machine=m68030-sony - os=-newsos - ;; - news-3600 | risc-news) - basic_machine=mips-sony - os=-newsos - ;; - necv70) - basic_machine=v70-nec - os=-sysv - ;; - next | m*-next ) - basic_machine=m68k-next - case $os in - -nextstep* ) - ;; - -ns2*) - os=-nextstep2 - ;; - *) - os=-nextstep3 - ;; - esac - ;; - nh3000) - basic_machine=m68k-harris - os=-cxux - ;; - nh[45]000) - basic_machine=m88k-harris - os=-cxux - ;; - nindy960) - basic_machine=i960-intel - os=-nindy - ;; - mon960) - basic_machine=i960-intel - os=-mon960 - ;; - nonstopux) - basic_machine=mips-compaq - os=-nonstopux - ;; - np1) - basic_machine=np1-gould - ;; - nsr-tandem) - basic_machine=nsr-tandem - ;; - op50n-* | op60c-*) - basic_machine=hppa1.1-oki - os=-proelf - ;; - openrisc | openrisc-*) - basic_machine=or32-unknown - ;; - os400) - basic_machine=powerpc-ibm - os=-os400 - ;; - OSE68000 | ose68000) - basic_machine=m68000-ericsson - os=-ose - ;; - os68k) - basic_machine=m68k-none - os=-os68k - ;; - pa-hitachi) - basic_machine=hppa1.1-hitachi - os=-hiuxwe2 - ;; - paragon) - basic_machine=i860-intel - os=-osf - ;; - parisc) - basic_machine=hppa-unknown - os=-linux - ;; - parisc-*) - basic_machine=hppa-`echo $basic_machine | sed 's/^[^-]*-//'` - os=-linux - ;; - pbd) - basic_machine=sparc-tti - ;; - pbb) - basic_machine=m68k-tti - ;; - pc532 | pc532-*) - basic_machine=ns32k-pc532 - ;; - pc98) - basic_machine=i386-pc - ;; - pc98-*) - basic_machine=i386-`echo $basic_machine | sed 's/^[^-]*-//'` - ;; - pentium | p5 | k5 | k6 | nexgen | viac3) - basic_machine=i586-pc - ;; - pentiumpro | p6 | 6x86 | athlon | athlon_*) - basic_machine=i686-pc - ;; - pentiumii | pentium2 | pentiumiii | pentium3) - basic_machine=i686-pc - ;; - pentium4) - basic_machine=i786-pc - ;; - pentium-* | p5-* | k5-* | k6-* | nexgen-* | viac3-*) - basic_machine=i586-`echo $basic_machine | sed 's/^[^-]*-//'` - ;; - pentiumpro-* | p6-* | 6x86-* | athlon-*) - basic_machine=i686-`echo $basic_machine | sed 's/^[^-]*-//'` - ;; - pentiumii-* | pentium2-* | pentiumiii-* | pentium3-*) - basic_machine=i686-`echo $basic_machine | sed 's/^[^-]*-//'` - ;; - pentium4-*) - basic_machine=i786-`echo $basic_machine | sed 's/^[^-]*-//'` - ;; - pn) - basic_machine=pn-gould - ;; - power) basic_machine=power-ibm - ;; - ppc) basic_machine=powerpc-unknown - ;; - ppc-*) basic_machine=powerpc-`echo $basic_machine | sed 's/^[^-]*-//'` - ;; - ppcle | powerpclittle | ppc-le | powerpc-little) - basic_machine=powerpcle-unknown - ;; - ppcle-* | powerpclittle-*) - basic_machine=powerpcle-`echo $basic_machine | sed 's/^[^-]*-//'` - ;; - ppc64) basic_machine=powerpc64-unknown - ;; - ppc64-*) basic_machine=powerpc64-`echo $basic_machine | sed 's/^[^-]*-//'` - ;; - ppc64le | powerpc64little | ppc64-le | powerpc64-little) - basic_machine=powerpc64le-unknown - ;; - ppc64le-* | powerpc64little-*) - basic_machine=powerpc64le-`echo $basic_machine | sed 's/^[^-]*-//'` - ;; - ps2) - basic_machine=i386-ibm - ;; - pw32) - basic_machine=i586-unknown - os=-pw32 - ;; - rdos) - basic_machine=i386-pc - os=-rdos - ;; - rom68k) - basic_machine=m68k-rom68k - os=-coff - ;; - rm[46]00) - basic_machine=mips-siemens - ;; - rtpc | rtpc-*) - basic_machine=romp-ibm - ;; - s390 | s390-*) - basic_machine=s390-ibm - ;; - s390x | s390x-*) - basic_machine=s390x-ibm - ;; - sa29200) - basic_machine=a29k-amd - os=-udi - ;; - sb1) - basic_machine=mipsisa64sb1-unknown - ;; - sb1el) - basic_machine=mipsisa64sb1el-unknown - ;; - sde) - basic_machine=mipsisa32-sde - os=-elf - ;; - sei) - basic_machine=mips-sei - os=-seiux - ;; - sequent) - basic_machine=i386-sequent - ;; - sh) - basic_machine=sh-hitachi - os=-hms - ;; - sh5el) - basic_machine=sh5le-unknown - ;; - sh64) - basic_machine=sh64-unknown - ;; - sparclite-wrs | simso-wrs) - basic_machine=sparclite-wrs - os=-vxworks - ;; - sps7) - basic_machine=m68k-bull - os=-sysv2 - ;; - spur) - basic_machine=spur-unknown - ;; - st2000) - basic_machine=m68k-tandem - ;; - stratus) - basic_machine=i860-stratus - os=-sysv4 - ;; - sun2) - basic_machine=m68000-sun - ;; - sun2os3) - basic_machine=m68000-sun - os=-sunos3 - ;; - sun2os4) - basic_machine=m68000-sun - os=-sunos4 - ;; - sun3os3) - basic_machine=m68k-sun - os=-sunos3 - ;; - sun3os4) - basic_machine=m68k-sun - os=-sunos4 - ;; - sun4os3) - basic_machine=sparc-sun - os=-sunos3 - ;; - sun4os4) - basic_machine=sparc-sun - os=-sunos4 - ;; - sun4sol2) - basic_machine=sparc-sun - os=-solaris2 - ;; - sun3 | sun3-*) - basic_machine=m68k-sun - ;; - sun4) - basic_machine=sparc-sun - ;; - sun386 | sun386i | roadrunner) - basic_machine=i386-sun - ;; - sv1) - basic_machine=sv1-cray - os=-unicos - ;; - symmetry) - basic_machine=i386-sequent - os=-dynix - ;; - t3e) - basic_machine=alphaev5-cray - os=-unicos - ;; - t90) - basic_machine=t90-cray - os=-unicos - ;; - tic54x | c54x*) - basic_machine=tic54x-unknown - os=-coff - ;; - tic55x | c55x*) - basic_machine=tic55x-unknown - os=-coff - ;; - tic6x | c6x*) - basic_machine=tic6x-unknown - os=-coff - ;; - # This must be matched before tile*. - tilegx*) - basic_machine=tilegx-unknown - os=-linux-gnu - ;; - tile*) - basic_machine=tile-unknown - os=-linux-gnu - ;; - tx39) - basic_machine=mipstx39-unknown - ;; - tx39el) - basic_machine=mipstx39el-unknown - ;; - toad1) - basic_machine=pdp10-xkl - os=-tops20 - ;; - tower | tower-32) - basic_machine=m68k-ncr - ;; - tpf) - basic_machine=s390x-ibm - os=-tpf - ;; - udi29k) - basic_machine=a29k-amd - os=-udi - ;; - ultra3) - basic_machine=a29k-nyu - os=-sym1 - ;; - v810 | necv810) - basic_machine=v810-nec - os=-none - ;; - vaxv) - basic_machine=vax-dec - os=-sysv - ;; - vms) - basic_machine=vax-dec - os=-vms - ;; - vpp*|vx|vx-*) - basic_machine=f301-fujitsu - ;; - vxworks960) - basic_machine=i960-wrs - os=-vxworks - ;; - vxworks68) - basic_machine=m68k-wrs - os=-vxworks - ;; - vxworks29k) - basic_machine=a29k-wrs - os=-vxworks - ;; - w65*) - basic_machine=w65-wdc - os=-none - ;; - w89k-*) - basic_machine=hppa1.1-winbond - os=-proelf - ;; - xbox) - basic_machine=i686-pc - os=-mingw32 - ;; - xps | xps100) - basic_machine=xps100-honeywell - ;; - ymp) - basic_machine=ymp-cray - os=-unicos - ;; - z8k-*-coff) - basic_machine=z8k-unknown - os=-sim - ;; - z80-*-coff) - basic_machine=z80-unknown - os=-sim - ;; - none) - basic_machine=none-none - os=-none - ;; - -# Here we handle the default manufacturer of certain CPU types. It is in -# some cases the only manufacturer, in others, it is the most popular. - w89k) - basic_machine=hppa1.1-winbond - ;; - op50n) - basic_machine=hppa1.1-oki - ;; - op60c) - basic_machine=hppa1.1-oki - ;; - romp) - basic_machine=romp-ibm - ;; - mmix) - basic_machine=mmix-knuth - ;; - rs6000) - basic_machine=rs6000-ibm - ;; - vax) - basic_machine=vax-dec - ;; - pdp10) - # there are many clones, so DEC is not a safe bet - basic_machine=pdp10-unknown - ;; - pdp11) - basic_machine=pdp11-dec - ;; - we32k) - basic_machine=we32k-att - ;; - sh[1234] | sh[24]a | sh[24]aeb | sh[34]eb | sh[1234]le | sh[23]ele) - basic_machine=sh-unknown - ;; - sparc | sparcv8 | sparcv9 | sparcv9b | sparcv9v) - basic_machine=sparc-sun - ;; - cydra) - basic_machine=cydra-cydrome - ;; - orion) - basic_machine=orion-highlevel - ;; - orion105) - basic_machine=clipper-highlevel - ;; - mac | mpw | mac-mpw) - basic_machine=m68k-apple - ;; - pmac | pmac-mpw) - basic_machine=powerpc-apple - ;; - *-unknown) - # Make sure to match an already-canonicalized machine name. - ;; - *) - echo Invalid configuration \`$1\': machine \`$basic_machine\' not recognized 1>&2 - exit 1 - ;; -esac - -# Here we canonicalize certain aliases for manufacturers. -case $basic_machine in - *-digital*) - basic_machine=`echo $basic_machine | sed 's/digital.*/dec/'` - ;; - *-commodore*) - basic_machine=`echo $basic_machine | sed 's/commodore.*/cbm/'` - ;; - *) - ;; -esac - -# Decode manufacturer-specific aliases for certain operating systems. - -if [ x"$os" != x"" ] -then -case $os in - # First match some system type aliases - # that might get confused with valid system types. - # -solaris* is a basic system type, with this one exception. - -auroraux) - os=-auroraux - ;; - -solaris1 | -solaris1.*) - os=`echo $os | sed -e 's|solaris1|sunos4|'` - ;; - -solaris) - os=-solaris2 - ;; - -svr4*) - os=-sysv4 - ;; - -unixware*) - os=-sysv4.2uw - ;; - -gnu/linux*) - os=`echo $os | sed -e 's|gnu/linux|linux-gnu|'` - ;; - # First accept the basic system types. - # The portable systems comes first. - # Each alternative MUST END IN A *, to match a version number. - # -sysv* is not here because it comes later, after sysvr4. - -gnu* | -bsd* | -mach* | -minix* | -genix* | -ultrix* | -irix* \ - | -*vms* | -sco* | -esix* | -isc* | -aix* | -cnk* | -sunos | -sunos[34]*\ - | -hpux* | -unos* | -osf* | -luna* | -dgux* | -auroraux* | -solaris* \ - | -sym* | -kopensolaris* \ - | -amigaos* | -amigados* | -msdos* | -newsos* | -unicos* | -aof* \ - | -aos* | -aros* \ - | -nindy* | -vxsim* | -vxworks* | -ebmon* | -hms* | -mvs* \ - | -clix* | -riscos* | -uniplus* | -iris* | -rtu* | -xenix* \ - | -hiux* | -386bsd* | -knetbsd* | -mirbsd* | -netbsd* \ - | -openbsd* | -solidbsd* \ - | -ekkobsd* | -kfreebsd* | -freebsd* | -riscix* | -lynxos* \ - | -bosx* | -nextstep* | -cxux* | -aout* | -elf* | -oabi* \ - | -ptx* | -coff* | -ecoff* | -winnt* | -domain* | -vsta* \ - | -udi* | -eabi* | -lites* | -ieee* | -go32* | -aux* \ - | -chorusos* | -chorusrdb* | -cegcc* \ - | -cygwin* | -pe* | -psos* | -moss* | -proelf* | -rtems* \ - | -mingw32* | -linux-gnu* | -linux-newlib* | -linux-uclibc* \ - | -uxpv* | -beos* | -mpeix* | -udk* \ - | -interix* | -uwin* | -mks* | -rhapsody* | -darwin* | -opened* \ - | -openstep* | -oskit* | -conix* | -pw32* | -nonstopux* \ - | -storm-chaos* | -tops10* | -tenex* | -tops20* | -its* \ - | -os2* | -vos* | -palmos* | -uclinux* | -nucleus* \ - | -morphos* | -superux* | -rtmk* | -rtmk-nova* | -windiss* \ - | -powermax* | -dnix* | -nx6 | -nx7 | -sei* | -dragonfly* \ - | -skyos* | -haiku* | -rdos* | -toppers* | -drops* | -es*) - # Remember, each alternative MUST END IN *, to match a version number. - ;; - -qnx*) - case $basic_machine in - x86-* | i*86-*) - ;; - *) - os=-nto$os - ;; - esac - ;; - -nto-qnx*) - ;; - -nto*) - os=`echo $os | sed -e 's|nto|nto-qnx|'` - ;; - -sim | -es1800* | -hms* | -xray | -os68k* | -none* | -v88r* \ - | -windows* | -osx | -abug | -netware* | -os9* | -beos* | -haiku* \ - | -macos* | -mpw* | -magic* | -mmixware* | -mon960* | -lnews*) - ;; - -mac*) - os=`echo $os | sed -e 's|mac|macos|'` - ;; - -linux-dietlibc) - os=-linux-dietlibc - ;; - -linux*) - os=`echo $os | sed -e 's|linux|linux-gnu|'` - ;; - -sunos5*) - os=`echo $os | sed -e 's|sunos5|solaris2|'` - ;; - -sunos6*) - os=`echo $os | sed -e 's|sunos6|solaris3|'` - ;; - -opened*) - os=-openedition - ;; - -os400*) - os=-os400 - ;; - -wince*) - os=-wince - ;; - -osfrose*) - os=-osfrose - ;; - -osf*) - os=-osf - ;; - -utek*) - os=-bsd - ;; - -dynix*) - os=-bsd - ;; - -acis*) - os=-aos - ;; - -atheos*) - os=-atheos - ;; - -syllable*) - os=-syllable - ;; - -386bsd) - os=-bsd - ;; - -ctix* | -uts*) - os=-sysv - ;; - -nova*) - os=-rtmk-nova - ;; - -ns2 ) - os=-nextstep2 - ;; - -nsk*) - os=-nsk - ;; - # Preserve the version number of sinix5. - -sinix5.*) - os=`echo $os | sed -e 's|sinix|sysv|'` - ;; - -sinix*) - os=-sysv4 - ;; - -tpf*) - os=-tpf - ;; - -triton*) - os=-sysv3 - ;; - -oss*) - os=-sysv3 - ;; - -svr4) - os=-sysv4 - ;; - -svr3) - os=-sysv3 - ;; - -sysvr4) - os=-sysv4 - ;; - # This must come after -sysvr4. - -sysv*) - ;; - -ose*) - os=-ose - ;; - -es1800*) - os=-ose - ;; - -xenix) - os=-xenix - ;; - -*mint | -mint[0-9]* | -*MiNT | -MiNT[0-9]*) - os=-mint - ;; - -aros*) - os=-aros - ;; - -kaos*) - os=-kaos - ;; - -zvmoe) - os=-zvmoe - ;; - -dicos*) - os=-dicos - ;; - -nacl*) - ;; - -none) - ;; - *) - # Get rid of the `-' at the beginning of $os. - os=`echo $os | sed 's/[^-]*-//'` - echo Invalid configuration \`$1\': system \`$os\' not recognized 1>&2 - exit 1 - ;; -esac -else - -# Here we handle the default operating systems that come with various machines. -# The value should be what the vendor currently ships out the door with their -# machine or put another way, the most popular os provided with the machine. - -# Note that if you're going to try to match "-MANUFACTURER" here (say, -# "-sun"), then you have to tell the case statement up towards the top -# that MANUFACTURER isn't an operating system. Otherwise, code above -# will signal an error saying that MANUFACTURER isn't an operating -# system, and we'll never get to this point. - -case $basic_machine in - score-*) - os=-elf - ;; - spu-*) - os=-elf - ;; - *-acorn) - os=-riscix1.2 - ;; - arm*-rebel) - os=-linux - ;; - arm*-semi) - os=-aout - ;; - c4x-* | tic4x-*) - os=-coff - ;; - # This must come before the *-dec entry. - pdp10-*) - os=-tops20 - ;; - pdp11-*) - os=-none - ;; - *-dec | vax-*) - os=-ultrix4.2 - ;; - m68*-apollo) - os=-domain - ;; - i386-sun) - os=-sunos4.0.2 - ;; - m68000-sun) - os=-sunos3 - # This also exists in the configure program, but was not the - # default. - # os=-sunos4 - ;; - m68*-cisco) - os=-aout - ;; - mep-*) - os=-elf - ;; - mips*-cisco) - os=-elf - ;; - mips*-*) - os=-elf - ;; - or32-*) - os=-coff - ;; - *-tti) # must be before sparc entry or we get the wrong os. - os=-sysv3 - ;; - sparc-* | *-sun) - os=-sunos4.1.1 - ;; - *-be) - os=-beos - ;; - *-haiku) - os=-haiku - ;; - *-ibm) - os=-aix - ;; - *-knuth) - os=-mmixware - ;; - *-wec) - os=-proelf - ;; - *-winbond) - os=-proelf - ;; - *-oki) - os=-proelf - ;; - *-hp) - os=-hpux - ;; - *-hitachi) - os=-hiux - ;; - i860-* | *-att | *-ncr | *-altos | *-motorola | *-convergent) - os=-sysv - ;; - *-cbm) - os=-amigaos - ;; - *-dg) - os=-dgux - ;; - *-dolphin) - os=-sysv3 - ;; - m68k-ccur) - os=-rtu - ;; - m88k-omron*) - os=-luna - ;; - *-next ) - os=-nextstep - ;; - *-sequent) - os=-ptx - ;; - *-crds) - os=-unos - ;; - *-ns) - os=-genix - ;; - i370-*) - os=-mvs - ;; - *-next) - os=-nextstep3 - ;; - *-gould) - os=-sysv - ;; - *-highlevel) - os=-bsd - ;; - *-encore) - os=-bsd - ;; - *-sgi) - os=-irix - ;; - *-siemens) - os=-sysv4 - ;; - *-masscomp) - os=-rtu - ;; - f30[01]-fujitsu | f700-fujitsu) - os=-uxpv - ;; - *-rom68k) - os=-coff - ;; - *-*bug) - os=-coff - ;; - *-apple) - os=-macos - ;; - *-atari*) - os=-mint - ;; - *) - os=-none - ;; -esac -fi - -# Here we handle the case where we know the os, and the CPU type, but not the -# manufacturer. We pick the logical manufacturer. -vendor=unknown -case $basic_machine in - *-unknown) - case $os in - -riscix*) - vendor=acorn - ;; - -sunos*) - vendor=sun - ;; - -cnk*|-aix*) - vendor=ibm - ;; - -beos*) - vendor=be - ;; - -hpux*) - vendor=hp - ;; - -mpeix*) - vendor=hp - ;; - -hiux*) - vendor=hitachi - ;; - -unos*) - vendor=crds - ;; - -dgux*) - vendor=dg - ;; - -luna*) - vendor=omron - ;; - -genix*) - vendor=ns - ;; - -mvs* | -opened*) - vendor=ibm - ;; - -os400*) - vendor=ibm - ;; - -ptx*) - vendor=sequent - ;; - -tpf*) - vendor=ibm - ;; - -vxsim* | -vxworks* | -windiss*) - vendor=wrs - ;; - -aux*) - vendor=apple - ;; - -hms*) - vendor=hitachi - ;; - -mpw* | -macos*) - vendor=apple - ;; - -*mint | -mint[0-9]* | -*MiNT | -MiNT[0-9]*) - vendor=atari - ;; - -vos*) - vendor=stratus - ;; - esac - basic_machine=`echo $basic_machine | sed "s/unknown/$vendor/"` - ;; -esac - -echo $basic_machine$os -exit - -# Local variables: -# eval: (add-hook 'write-file-hooks 'time-stamp) -# time-stamp-start: "timestamp='" -# time-stamp-format: "%:y-%02m-%02d" -# time-stamp-end: "'" -# End: diff --git a/test/test-automation/build-scripts/depcomp b/test/test-automation/build-scripts/depcomp deleted file mode 100755 index df8eea7e4..000000000 --- a/test/test-automation/build-scripts/depcomp +++ /dev/null @@ -1,630 +0,0 @@ -#! /bin/sh -# depcomp - compile a program generating dependencies as side-effects - -scriptversion=2009-04-28.21; # UTC - -# Copyright (C) 1999, 2000, 2003, 2004, 2005, 2006, 2007, 2009 Free -# Software Foundation, Inc. - -# This program is free software; you can redistribute it and/or modify -# it under the terms of the GNU General Public License as published by -# the Free Software Foundation; either version 2, or (at your option) -# any later version. - -# This program is distributed in the hope that it will be useful, -# but WITHOUT ANY WARRANTY; without even the implied warranty of -# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the -# GNU General Public License for more details. - -# You should have received a copy of the GNU General Public License -# along with this program. If not, see . - -# As a special exception to the GNU General Public License, if you -# distribute this file as part of a program that contains a -# configuration script generated by Autoconf, you may include it under -# the same distribution terms that you use for the rest of that program. - -# Originally written by Alexandre Oliva . - -case $1 in - '') - echo "$0: No command. Try \`$0 --help' for more information." 1>&2 - exit 1; - ;; - -h | --h*) - cat <<\EOF -Usage: depcomp [--help] [--version] PROGRAM [ARGS] - -Run PROGRAMS ARGS to compile a file, generating dependencies -as side-effects. - -Environment variables: - depmode Dependency tracking mode. - source Source file read by `PROGRAMS ARGS'. - object Object file output by `PROGRAMS ARGS'. - DEPDIR directory where to store dependencies. - depfile Dependency file to output. - tmpdepfile Temporary file to use when outputing dependencies. - libtool Whether libtool is used (yes/no). - -Report bugs to . -EOF - exit $? - ;; - -v | --v*) - echo "depcomp $scriptversion" - exit $? - ;; -esac - -if test -z "$depmode" || test -z "$source" || test -z "$object"; then - echo "depcomp: Variables source, object and depmode must be set" 1>&2 - exit 1 -fi - -# Dependencies for sub/bar.o or sub/bar.obj go into sub/.deps/bar.Po. -depfile=${depfile-`echo "$object" | - sed 's|[^\\/]*$|'${DEPDIR-.deps}'/&|;s|\.\([^.]*\)$|.P\1|;s|Pobj$|Po|'`} -tmpdepfile=${tmpdepfile-`echo "$depfile" | sed 's/\.\([^.]*\)$/.T\1/'`} - -rm -f "$tmpdepfile" - -# Some modes work just like other modes, but use different flags. We -# parameterize here, but still list the modes in the big case below, -# to make depend.m4 easier to write. Note that we *cannot* use a case -# here, because this file can only contain one case statement. -if test "$depmode" = hp; then - # HP compiler uses -M and no extra arg. - gccflag=-M - depmode=gcc -fi - -if test "$depmode" = dashXmstdout; then - # This is just like dashmstdout with a different argument. - dashmflag=-xM - depmode=dashmstdout -fi - -cygpath_u="cygpath -u -f -" -if test "$depmode" = msvcmsys; then - # This is just like msvisualcpp but w/o cygpath translation. - # Just convert the backslash-escaped backslashes to single forward - # slashes to satisfy depend.m4 - cygpath_u="sed s,\\\\\\\\,/,g" - depmode=msvisualcpp -fi - -case "$depmode" in -gcc3) -## gcc 3 implements dependency tracking that does exactly what -## we want. Yay! Note: for some reason libtool 1.4 doesn't like -## it if -MD -MP comes after the -MF stuff. Hmm. -## Unfortunately, FreeBSD c89 acceptance of flags depends upon -## the command line argument order; so add the flags where they -## appear in depend2.am. Note that the slowdown incurred here -## affects only configure: in makefiles, %FASTDEP% shortcuts this. - for arg - do - case $arg in - -c) set fnord "$@" -MT "$object" -MD -MP -MF "$tmpdepfile" "$arg" ;; - *) set fnord "$@" "$arg" ;; - esac - shift # fnord - shift # $arg - done - "$@" - stat=$? - if test $stat -eq 0; then : - else - rm -f "$tmpdepfile" - exit $stat - fi - mv "$tmpdepfile" "$depfile" - ;; - -gcc) -## There are various ways to get dependency output from gcc. Here's -## why we pick this rather obscure method: -## - Don't want to use -MD because we'd like the dependencies to end -## up in a subdir. Having to rename by hand is ugly. -## (We might end up doing this anyway to support other compilers.) -## - The DEPENDENCIES_OUTPUT environment variable makes gcc act like -## -MM, not -M (despite what the docs say). -## - Using -M directly means running the compiler twice (even worse -## than renaming). - if test -z "$gccflag"; then - gccflag=-MD, - fi - "$@" -Wp,"$gccflag$tmpdepfile" - stat=$? - if test $stat -eq 0; then : - else - rm -f "$tmpdepfile" - exit $stat - fi - rm -f "$depfile" - echo "$object : \\" > "$depfile" - alpha=ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz -## The second -e expression handles DOS-style file names with drive letters. - sed -e 's/^[^:]*: / /' \ - -e 's/^['$alpha']:\/[^:]*: / /' < "$tmpdepfile" >> "$depfile" -## This next piece of magic avoids the `deleted header file' problem. -## The problem is that when a header file which appears in a .P file -## is deleted, the dependency causes make to die (because there is -## typically no way to rebuild the header). We avoid this by adding -## dummy dependencies for each header file. Too bad gcc doesn't do -## this for us directly. - tr ' ' ' -' < "$tmpdepfile" | -## Some versions of gcc put a space before the `:'. On the theory -## that the space means something, we add a space to the output as -## well. -## Some versions of the HPUX 10.20 sed can't process this invocation -## correctly. Breaking it into two sed invocations is a workaround. - sed -e 's/^\\$//' -e '/^$/d' -e '/:$/d' | sed -e 's/$/ :/' >> "$depfile" - rm -f "$tmpdepfile" - ;; - -hp) - # This case exists only to let depend.m4 do its work. It works by - # looking at the text of this script. This case will never be run, - # since it is checked for above. - exit 1 - ;; - -sgi) - if test "$libtool" = yes; then - "$@" "-Wp,-MDupdate,$tmpdepfile" - else - "$@" -MDupdate "$tmpdepfile" - fi - stat=$? - if test $stat -eq 0; then : - else - rm -f "$tmpdepfile" - exit $stat - fi - rm -f "$depfile" - - if test -f "$tmpdepfile"; then # yes, the sourcefile depend on other files - echo "$object : \\" > "$depfile" - - # Clip off the initial element (the dependent). Don't try to be - # clever and replace this with sed code, as IRIX sed won't handle - # lines with more than a fixed number of characters (4096 in - # IRIX 6.2 sed, 8192 in IRIX 6.5). We also remove comment lines; - # the IRIX cc adds comments like `#:fec' to the end of the - # dependency line. - tr ' ' ' -' < "$tmpdepfile" \ - | sed -e 's/^.*\.o://' -e 's/#.*$//' -e '/^$/ d' | \ - tr ' -' ' ' >> "$depfile" - echo >> "$depfile" - - # The second pass generates a dummy entry for each header file. - tr ' ' ' -' < "$tmpdepfile" \ - | sed -e 's/^.*\.o://' -e 's/#.*$//' -e '/^$/ d' -e 's/$/:/' \ - >> "$depfile" - else - # The sourcefile does not contain any dependencies, so just - # store a dummy comment line, to avoid errors with the Makefile - # "include basename.Plo" scheme. - echo "#dummy" > "$depfile" - fi - rm -f "$tmpdepfile" - ;; - -aix) - # The C for AIX Compiler uses -M and outputs the dependencies - # in a .u file. In older versions, this file always lives in the - # current directory. Also, the AIX compiler puts `$object:' at the - # start of each line; $object doesn't have directory information. - # Version 6 uses the directory in both cases. - dir=`echo "$object" | sed -e 's|/[^/]*$|/|'` - test "x$dir" = "x$object" && dir= - base=`echo "$object" | sed -e 's|^.*/||' -e 's/\.o$//' -e 's/\.lo$//'` - if test "$libtool" = yes; then - tmpdepfile1=$dir$base.u - tmpdepfile2=$base.u - tmpdepfile3=$dir.libs/$base.u - "$@" -Wc,-M - else - tmpdepfile1=$dir$base.u - tmpdepfile2=$dir$base.u - tmpdepfile3=$dir$base.u - "$@" -M - fi - stat=$? - - if test $stat -eq 0; then : - else - rm -f "$tmpdepfile1" "$tmpdepfile2" "$tmpdepfile3" - exit $stat - fi - - for tmpdepfile in "$tmpdepfile1" "$tmpdepfile2" "$tmpdepfile3" - do - test -f "$tmpdepfile" && break - done - if test -f "$tmpdepfile"; then - # Each line is of the form `foo.o: dependent.h'. - # Do two passes, one to just change these to - # `$object: dependent.h' and one to simply `dependent.h:'. - sed -e "s,^.*\.[a-z]*:,$object:," < "$tmpdepfile" > "$depfile" - # That's a tab and a space in the []. - sed -e 's,^.*\.[a-z]*:[ ]*,,' -e 's,$,:,' < "$tmpdepfile" >> "$depfile" - else - # The sourcefile does not contain any dependencies, so just - # store a dummy comment line, to avoid errors with the Makefile - # "include basename.Plo" scheme. - echo "#dummy" > "$depfile" - fi - rm -f "$tmpdepfile" - ;; - -icc) - # Intel's C compiler understands `-MD -MF file'. However on - # icc -MD -MF foo.d -c -o sub/foo.o sub/foo.c - # ICC 7.0 will fill foo.d with something like - # foo.o: sub/foo.c - # foo.o: sub/foo.h - # which is wrong. We want: - # sub/foo.o: sub/foo.c - # sub/foo.o: sub/foo.h - # sub/foo.c: - # sub/foo.h: - # ICC 7.1 will output - # foo.o: sub/foo.c sub/foo.h - # and will wrap long lines using \ : - # foo.o: sub/foo.c ... \ - # sub/foo.h ... \ - # ... - - "$@" -MD -MF "$tmpdepfile" - stat=$? - if test $stat -eq 0; then : - else - rm -f "$tmpdepfile" - exit $stat - fi - rm -f "$depfile" - # Each line is of the form `foo.o: dependent.h', - # or `foo.o: dep1.h dep2.h \', or ` dep3.h dep4.h \'. - # Do two passes, one to just change these to - # `$object: dependent.h' and one to simply `dependent.h:'. - sed "s,^[^:]*:,$object :," < "$tmpdepfile" > "$depfile" - # Some versions of the HPUX 10.20 sed can't process this invocation - # correctly. Breaking it into two sed invocations is a workaround. - sed 's,^[^:]*: \(.*\)$,\1,;s/^\\$//;/^$/d;/:$/d' < "$tmpdepfile" | - sed -e 's/$/ :/' >> "$depfile" - rm -f "$tmpdepfile" - ;; - -hp2) - # The "hp" stanza above does not work with aCC (C++) and HP's ia64 - # compilers, which have integrated preprocessors. The correct option - # to use with these is +Maked; it writes dependencies to a file named - # 'foo.d', which lands next to the object file, wherever that - # happens to be. - # Much of this is similar to the tru64 case; see comments there. - dir=`echo "$object" | sed -e 's|/[^/]*$|/|'` - test "x$dir" = "x$object" && dir= - base=`echo "$object" | sed -e 's|^.*/||' -e 's/\.o$//' -e 's/\.lo$//'` - if test "$libtool" = yes; then - tmpdepfile1=$dir$base.d - tmpdepfile2=$dir.libs/$base.d - "$@" -Wc,+Maked - else - tmpdepfile1=$dir$base.d - tmpdepfile2=$dir$base.d - "$@" +Maked - fi - stat=$? - if test $stat -eq 0; then : - else - rm -f "$tmpdepfile1" "$tmpdepfile2" - exit $stat - fi - - for tmpdepfile in "$tmpdepfile1" "$tmpdepfile2" - do - test -f "$tmpdepfile" && break - done - if test -f "$tmpdepfile"; then - sed -e "s,^.*\.[a-z]*:,$object:," "$tmpdepfile" > "$depfile" - # Add `dependent.h:' lines. - sed -ne '2,${ - s/^ *// - s/ \\*$// - s/$/:/ - p - }' "$tmpdepfile" >> "$depfile" - else - echo "#dummy" > "$depfile" - fi - rm -f "$tmpdepfile" "$tmpdepfile2" - ;; - -tru64) - # The Tru64 compiler uses -MD to generate dependencies as a side - # effect. `cc -MD -o foo.o ...' puts the dependencies into `foo.o.d'. - # At least on Alpha/Redhat 6.1, Compaq CCC V6.2-504 seems to put - # dependencies in `foo.d' instead, so we check for that too. - # Subdirectories are respected. - dir=`echo "$object" | sed -e 's|/[^/]*$|/|'` - test "x$dir" = "x$object" && dir= - base=`echo "$object" | sed -e 's|^.*/||' -e 's/\.o$//' -e 's/\.lo$//'` - - if test "$libtool" = yes; then - # With Tru64 cc, shared objects can also be used to make a - # static library. This mechanism is used in libtool 1.4 series to - # handle both shared and static libraries in a single compilation. - # With libtool 1.4, dependencies were output in $dir.libs/$base.lo.d. - # - # With libtool 1.5 this exception was removed, and libtool now - # generates 2 separate objects for the 2 libraries. These two - # compilations output dependencies in $dir.libs/$base.o.d and - # in $dir$base.o.d. We have to check for both files, because - # one of the two compilations can be disabled. We should prefer - # $dir$base.o.d over $dir.libs/$base.o.d because the latter is - # automatically cleaned when .libs/ is deleted, while ignoring - # the former would cause a distcleancheck panic. - tmpdepfile1=$dir.libs/$base.lo.d # libtool 1.4 - tmpdepfile2=$dir$base.o.d # libtool 1.5 - tmpdepfile3=$dir.libs/$base.o.d # libtool 1.5 - tmpdepfile4=$dir.libs/$base.d # Compaq CCC V6.2-504 - "$@" -Wc,-MD - else - tmpdepfile1=$dir$base.o.d - tmpdepfile2=$dir$base.d - tmpdepfile3=$dir$base.d - tmpdepfile4=$dir$base.d - "$@" -MD - fi - - stat=$? - if test $stat -eq 0; then : - else - rm -f "$tmpdepfile1" "$tmpdepfile2" "$tmpdepfile3" "$tmpdepfile4" - exit $stat - fi - - for tmpdepfile in "$tmpdepfile1" "$tmpdepfile2" "$tmpdepfile3" "$tmpdepfile4" - do - test -f "$tmpdepfile" && break - done - if test -f "$tmpdepfile"; then - sed -e "s,^.*\.[a-z]*:,$object:," < "$tmpdepfile" > "$depfile" - # That's a tab and a space in the []. - sed -e 's,^.*\.[a-z]*:[ ]*,,' -e 's,$,:,' < "$tmpdepfile" >> "$depfile" - else - echo "#dummy" > "$depfile" - fi - rm -f "$tmpdepfile" - ;; - -#nosideeffect) - # This comment above is used by automake to tell side-effect - # dependency tracking mechanisms from slower ones. - -dashmstdout) - # Important note: in order to support this mode, a compiler *must* - # always write the preprocessed file to stdout, regardless of -o. - "$@" || exit $? - - # Remove the call to Libtool. - if test "$libtool" = yes; then - while test "X$1" != 'X--mode=compile'; do - shift - done - shift - fi - - # Remove `-o $object'. - IFS=" " - for arg - do - case $arg in - -o) - shift - ;; - $object) - shift - ;; - *) - set fnord "$@" "$arg" - shift # fnord - shift # $arg - ;; - esac - done - - test -z "$dashmflag" && dashmflag=-M - # Require at least two characters before searching for `:' - # in the target name. This is to cope with DOS-style filenames: - # a dependency such as `c:/foo/bar' could be seen as target `c' otherwise. - "$@" $dashmflag | - sed 's:^[ ]*[^: ][^:][^:]*\:[ ]*:'"$object"'\: :' > "$tmpdepfile" - rm -f "$depfile" - cat < "$tmpdepfile" > "$depfile" - tr ' ' ' -' < "$tmpdepfile" | \ -## Some versions of the HPUX 10.20 sed can't process this invocation -## correctly. Breaking it into two sed invocations is a workaround. - sed -e 's/^\\$//' -e '/^$/d' -e '/:$/d' | sed -e 's/$/ :/' >> "$depfile" - rm -f "$tmpdepfile" - ;; - -dashXmstdout) - # This case only exists to satisfy depend.m4. It is never actually - # run, as this mode is specially recognized in the preamble. - exit 1 - ;; - -makedepend) - "$@" || exit $? - # Remove any Libtool call - if test "$libtool" = yes; then - while test "X$1" != 'X--mode=compile'; do - shift - done - shift - fi - # X makedepend - shift - cleared=no eat=no - for arg - do - case $cleared in - no) - set ""; shift - cleared=yes ;; - esac - if test $eat = yes; then - eat=no - continue - fi - case "$arg" in - -D*|-I*) - set fnord "$@" "$arg"; shift ;; - # Strip any option that makedepend may not understand. Remove - # the object too, otherwise makedepend will parse it as a source file. - -arch) - eat=yes ;; - -*|$object) - ;; - *) - set fnord "$@" "$arg"; shift ;; - esac - done - obj_suffix=`echo "$object" | sed 's/^.*\././'` - touch "$tmpdepfile" - ${MAKEDEPEND-makedepend} -o"$obj_suffix" -f"$tmpdepfile" "$@" - rm -f "$depfile" - cat < "$tmpdepfile" > "$depfile" - sed '1,2d' "$tmpdepfile" | tr ' ' ' -' | \ -## Some versions of the HPUX 10.20 sed can't process this invocation -## correctly. Breaking it into two sed invocations is a workaround. - sed -e 's/^\\$//' -e '/^$/d' -e '/:$/d' | sed -e 's/$/ :/' >> "$depfile" - rm -f "$tmpdepfile" "$tmpdepfile".bak - ;; - -cpp) - # Important note: in order to support this mode, a compiler *must* - # always write the preprocessed file to stdout. - "$@" || exit $? - - # Remove the call to Libtool. - if test "$libtool" = yes; then - while test "X$1" != 'X--mode=compile'; do - shift - done - shift - fi - - # Remove `-o $object'. - IFS=" " - for arg - do - case $arg in - -o) - shift - ;; - $object) - shift - ;; - *) - set fnord "$@" "$arg" - shift # fnord - shift # $arg - ;; - esac - done - - "$@" -E | - sed -n -e '/^# [0-9][0-9]* "\([^"]*\)".*/ s:: \1 \\:p' \ - -e '/^#line [0-9][0-9]* "\([^"]*\)".*/ s:: \1 \\:p' | - sed '$ s: \\$::' > "$tmpdepfile" - rm -f "$depfile" - echo "$object : \\" > "$depfile" - cat < "$tmpdepfile" >> "$depfile" - sed < "$tmpdepfile" '/^$/d;s/^ //;s/ \\$//;s/$/ :/' >> "$depfile" - rm -f "$tmpdepfile" - ;; - -msvisualcpp) - # Important note: in order to support this mode, a compiler *must* - # always write the preprocessed file to stdout. - "$@" || exit $? - - # Remove the call to Libtool. - if test "$libtool" = yes; then - while test "X$1" != 'X--mode=compile'; do - shift - done - shift - fi - - IFS=" " - for arg - do - case "$arg" in - -o) - shift - ;; - $object) - shift - ;; - "-Gm"|"/Gm"|"-Gi"|"/Gi"|"-ZI"|"/ZI") - set fnord "$@" - shift - shift - ;; - *) - set fnord "$@" "$arg" - shift - shift - ;; - esac - done - "$@" -E 2>/dev/null | - sed -n '/^#line [0-9][0-9]* "\([^"]*\)"/ s::\1:p' | $cygpath_u | sort -u > "$tmpdepfile" - rm -f "$depfile" - echo "$object : \\" > "$depfile" - sed < "$tmpdepfile" -n -e 's% %\\ %g' -e '/^\(.*\)$/ s:: \1 \\:p' >> "$depfile" - echo " " >> "$depfile" - sed < "$tmpdepfile" -n -e 's% %\\ %g' -e '/^\(.*\)$/ s::\1\::p' >> "$depfile" - rm -f "$tmpdepfile" - ;; - -msvcmsys) - # This case exists only to let depend.m4 do its work. It works by - # looking at the text of this script. This case will never be run, - # since it is checked for above. - exit 1 - ;; - -none) - exec "$@" - ;; - -*) - echo "Unknown depmode $depmode" 1>&2 - exit 1 - ;; -esac - -exit 0 - -# Local Variables: -# mode: shell-script -# sh-indentation: 2 -# eval: (add-hook 'write-file-hooks 'time-stamp) -# time-stamp-start: "scriptversion=" -# time-stamp-format: "%:y-%02m-%02d.%02H" -# time-stamp-time-zone: "UTC" -# time-stamp-end: "; # UTC" -# End: diff --git a/test/test-automation/build-scripts/distclean.sh b/test/test-automation/build-scripts/distclean.sh deleted file mode 100755 index fa47ceefd..000000000 --- a/test/test-automation/build-scripts/distclean.sh +++ /dev/null @@ -1,17 +0,0 @@ -#! /bin/bash - -DIRECTORY="tests" -EXT="error" - -PLATFORM="$(uname)" -if [[ $PLATFORM == "Linux" ]]; then - EXT="so" -elif [[ $PLATFORM == "Darwin" ]]; then - EXT="dylib" -fi - -echo "Debug: $DIRECTORY/*.$EXT" - -rm -f $DIRECTORY/*.$EXT -rm -f runner -rm -f *.bmp diff --git a/test/test-automation/build-scripts/install-runner.sh b/test/test-automation/build-scripts/install-runner.sh deleted file mode 100755 index bef675389..000000000 --- a/test/test-automation/build-scripts/install-runner.sh +++ /dev/null @@ -1,13 +0,0 @@ -#! /bin/bash - -cp src/runner/.libs/runner . -chmod u+x runner - -PLATFORM="$(uname)" -if [[ $PLATFORM == "Linux" ]]; then - cp -f src/libSDLtest/.libs/libSDLtest.so.0 /usr/local/lib -elif [[ $PLATFORM == "Darwin" ]]; then - cp -f src/libSDLtest/.libs/libSDLtest.0.dylib /usr/local/lib -fi - -echo "Runner installed." diff --git a/test/test-automation/build-scripts/install-sh b/test/test-automation/build-scripts/install-sh deleted file mode 100755 index 6781b987b..000000000 --- a/test/test-automation/build-scripts/install-sh +++ /dev/null @@ -1,520 +0,0 @@ -#!/bin/sh -# install - install a program, script, or datafile - -scriptversion=2009-04-28.21; # UTC - -# This originates from X11R5 (mit/util/scripts/install.sh), which was -# later released in X11R6 (xc/config/util/install.sh) with the -# following copyright and license. -# -# Copyright (C) 1994 X Consortium -# -# Permission is hereby granted, free of charge, to any person obtaining a copy -# of this software and associated documentation files (the "Software"), to -# deal in the Software without restriction, including without limitation the -# rights to use, copy, modify, merge, publish, distribute, sublicense, and/or -# sell copies of the Software, and to permit persons to whom the Software is -# furnished to do so, subject to the following conditions: -# -# The above copyright notice and this permission notice shall be included in -# all copies or substantial portions of the Software. -# -# THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR -# IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, -# FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE -# X CONSORTIUM BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN -# AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNEC- -# TION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. -# -# Except as contained in this notice, the name of the X Consortium shall not -# be used in advertising or otherwise to promote the sale, use or other deal- -# ings in this Software without prior written authorization from the X Consor- -# tium. -# -# -# FSF changes to this file are in the public domain. -# -# Calling this script install-sh is preferred over install.sh, to prevent -# `make' implicit rules from creating a file called install from it -# when there is no Makefile. -# -# This script is compatible with the BSD install script, but was written -# from scratch. - -nl=' -' -IFS=" "" $nl" - -# set DOITPROG to echo to test this script - -# Don't use :- since 4.3BSD and earlier shells don't like it. -doit=${DOITPROG-} -if test -z "$doit"; then - doit_exec=exec -else - doit_exec=$doit -fi - -# Put in absolute file names if you don't have them in your path; -# or use environment vars. - -chgrpprog=${CHGRPPROG-chgrp} -chmodprog=${CHMODPROG-chmod} -chownprog=${CHOWNPROG-chown} -cmpprog=${CMPPROG-cmp} -cpprog=${CPPROG-cp} -mkdirprog=${MKDIRPROG-mkdir} -mvprog=${MVPROG-mv} -rmprog=${RMPROG-rm} -stripprog=${STRIPPROG-strip} - -posix_glob='?' -initialize_posix_glob=' - test "$posix_glob" != "?" || { - if (set -f) 2>/dev/null; then - posix_glob= - else - posix_glob=: - fi - } -' - -posix_mkdir= - -# Desired mode of installed file. -mode=0755 - -chgrpcmd= -chmodcmd=$chmodprog -chowncmd= -mvcmd=$mvprog -rmcmd="$rmprog -f" -stripcmd= - -src= -dst= -dir_arg= -dst_arg= - -copy_on_change=false -no_target_directory= - -usage="\ -Usage: $0 [OPTION]... [-T] SRCFILE DSTFILE - or: $0 [OPTION]... SRCFILES... DIRECTORY - or: $0 [OPTION]... -t DIRECTORY SRCFILES... - or: $0 [OPTION]... -d DIRECTORIES... - -In the 1st form, copy SRCFILE to DSTFILE. -In the 2nd and 3rd, copy all SRCFILES to DIRECTORY. -In the 4th, create DIRECTORIES. - -Options: - --help display this help and exit. - --version display version info and exit. - - -c (ignored) - -C install only if different (preserve the last data modification time) - -d create directories instead of installing files. - -g GROUP $chgrpprog installed files to GROUP. - -m MODE $chmodprog installed files to MODE. - -o USER $chownprog installed files to USER. - -s $stripprog installed files. - -t DIRECTORY install into DIRECTORY. - -T report an error if DSTFILE is a directory. - -Environment variables override the default commands: - CHGRPPROG CHMODPROG CHOWNPROG CMPPROG CPPROG MKDIRPROG MVPROG - RMPROG STRIPPROG -" - -while test $# -ne 0; do - case $1 in - -c) ;; - - -C) copy_on_change=true;; - - -d) dir_arg=true;; - - -g) chgrpcmd="$chgrpprog $2" - shift;; - - --help) echo "$usage"; exit $?;; - - -m) mode=$2 - case $mode in - *' '* | *' '* | *' -'* | *'*'* | *'?'* | *'['*) - echo "$0: invalid mode: $mode" >&2 - exit 1;; - esac - shift;; - - -o) chowncmd="$chownprog $2" - shift;; - - -s) stripcmd=$stripprog;; - - -t) dst_arg=$2 - shift;; - - -T) no_target_directory=true;; - - --version) echo "$0 $scriptversion"; exit $?;; - - --) shift - break;; - - -*) echo "$0: invalid option: $1" >&2 - exit 1;; - - *) break;; - esac - shift -done - -if test $# -ne 0 && test -z "$dir_arg$dst_arg"; then - # When -d is used, all remaining arguments are directories to create. - # When -t is used, the destination is already specified. - # Otherwise, the last argument is the destination. Remove it from $@. - for arg - do - if test -n "$dst_arg"; then - # $@ is not empty: it contains at least $arg. - set fnord "$@" "$dst_arg" - shift # fnord - fi - shift # arg - dst_arg=$arg - done -fi - -if test $# -eq 0; then - if test -z "$dir_arg"; then - echo "$0: no input file specified." >&2 - exit 1 - fi - # It's OK to call `install-sh -d' without argument. - # This can happen when creating conditional directories. - exit 0 -fi - -if test -z "$dir_arg"; then - trap '(exit $?); exit' 1 2 13 15 - - # Set umask so as not to create temps with too-generous modes. - # However, 'strip' requires both read and write access to temps. - case $mode in - # Optimize common cases. - *644) cp_umask=133;; - *755) cp_umask=22;; - - *[0-7]) - if test -z "$stripcmd"; then - u_plus_rw= - else - u_plus_rw='% 200' - fi - cp_umask=`expr '(' 777 - $mode % 1000 ')' $u_plus_rw`;; - *) - if test -z "$stripcmd"; then - u_plus_rw= - else - u_plus_rw=,u+rw - fi - cp_umask=$mode$u_plus_rw;; - esac -fi - -for src -do - # Protect names starting with `-'. - case $src in - -*) src=./$src;; - esac - - if test -n "$dir_arg"; then - dst=$src - dstdir=$dst - test -d "$dstdir" - dstdir_status=$? - else - - # Waiting for this to be detected by the "$cpprog $src $dsttmp" command - # might cause directories to be created, which would be especially bad - # if $src (and thus $dsttmp) contains '*'. - if test ! -f "$src" && test ! -d "$src"; then - echo "$0: $src does not exist." >&2 - exit 1 - fi - - if test -z "$dst_arg"; then - echo "$0: no destination specified." >&2 - exit 1 - fi - - dst=$dst_arg - # Protect names starting with `-'. - case $dst in - -*) dst=./$dst;; - esac - - # If destination is a directory, append the input filename; won't work - # if double slashes aren't ignored. - if test -d "$dst"; then - if test -n "$no_target_directory"; then - echo "$0: $dst_arg: Is a directory" >&2 - exit 1 - fi - dstdir=$dst - dst=$dstdir/`basename "$src"` - dstdir_status=0 - else - # Prefer dirname, but fall back on a substitute if dirname fails. - dstdir=` - (dirname "$dst") 2>/dev/null || - expr X"$dst" : 'X\(.*[^/]\)//*[^/][^/]*/*$' \| \ - X"$dst" : 'X\(//\)[^/]' \| \ - X"$dst" : 'X\(//\)$' \| \ - X"$dst" : 'X\(/\)' \| . 2>/dev/null || - echo X"$dst" | - sed '/^X\(.*[^/]\)\/\/*[^/][^/]*\/*$/{ - s//\1/ - q - } - /^X\(\/\/\)[^/].*/{ - s//\1/ - q - } - /^X\(\/\/\)$/{ - s//\1/ - q - } - /^X\(\/\).*/{ - s//\1/ - q - } - s/.*/./; q' - ` - - test -d "$dstdir" - dstdir_status=$? - fi - fi - - obsolete_mkdir_used=false - - if test $dstdir_status != 0; then - case $posix_mkdir in - '') - # Create intermediate dirs using mode 755 as modified by the umask. - # This is like FreeBSD 'install' as of 1997-10-28. - umask=`umask` - case $stripcmd.$umask in - # Optimize common cases. - *[2367][2367]) mkdir_umask=$umask;; - .*0[02][02] | .[02][02] | .[02]) mkdir_umask=22;; - - *[0-7]) - mkdir_umask=`expr $umask + 22 \ - - $umask % 100 % 40 + $umask % 20 \ - - $umask % 10 % 4 + $umask % 2 - `;; - *) mkdir_umask=$umask,go-w;; - esac - - # With -d, create the new directory with the user-specified mode. - # Otherwise, rely on $mkdir_umask. - if test -n "$dir_arg"; then - mkdir_mode=-m$mode - else - mkdir_mode= - fi - - posix_mkdir=false - case $umask in - *[123567][0-7][0-7]) - # POSIX mkdir -p sets u+wx bits regardless of umask, which - # is incompatible with FreeBSD 'install' when (umask & 300) != 0. - ;; - *) - tmpdir=${TMPDIR-/tmp}/ins$RANDOM-$$ - trap 'ret=$?; rmdir "$tmpdir/d" "$tmpdir" 2>/dev/null; exit $ret' 0 - - if (umask $mkdir_umask && - exec $mkdirprog $mkdir_mode -p -- "$tmpdir/d") >/dev/null 2>&1 - then - if test -z "$dir_arg" || { - # Check for POSIX incompatibilities with -m. - # HP-UX 11.23 and IRIX 6.5 mkdir -m -p sets group- or - # other-writeable bit of parent directory when it shouldn't. - # FreeBSD 6.1 mkdir -m -p sets mode of existing directory. - ls_ld_tmpdir=`ls -ld "$tmpdir"` - case $ls_ld_tmpdir in - d????-?r-*) different_mode=700;; - d????-?--*) different_mode=755;; - *) false;; - esac && - $mkdirprog -m$different_mode -p -- "$tmpdir" && { - ls_ld_tmpdir_1=`ls -ld "$tmpdir"` - test "$ls_ld_tmpdir" = "$ls_ld_tmpdir_1" - } - } - then posix_mkdir=: - fi - rmdir "$tmpdir/d" "$tmpdir" - else - # Remove any dirs left behind by ancient mkdir implementations. - rmdir ./$mkdir_mode ./-p ./-- 2>/dev/null - fi - trap '' 0;; - esac;; - esac - - if - $posix_mkdir && ( - umask $mkdir_umask && - $doit_exec $mkdirprog $mkdir_mode -p -- "$dstdir" - ) - then : - else - - # The umask is ridiculous, or mkdir does not conform to POSIX, - # or it failed possibly due to a race condition. Create the - # directory the slow way, step by step, checking for races as we go. - - case $dstdir in - /*) prefix='/';; - -*) prefix='./';; - *) prefix='';; - esac - - eval "$initialize_posix_glob" - - oIFS=$IFS - IFS=/ - $posix_glob set -f - set fnord $dstdir - shift - $posix_glob set +f - IFS=$oIFS - - prefixes= - - for d - do - test -z "$d" && continue - - prefix=$prefix$d - if test -d "$prefix"; then - prefixes= - else - if $posix_mkdir; then - (umask=$mkdir_umask && - $doit_exec $mkdirprog $mkdir_mode -p -- "$dstdir") && break - # Don't fail if two instances are running concurrently. - test -d "$prefix" || exit 1 - else - case $prefix in - *\'*) qprefix=`echo "$prefix" | sed "s/'/'\\\\\\\\''/g"`;; - *) qprefix=$prefix;; - esac - prefixes="$prefixes '$qprefix'" - fi - fi - prefix=$prefix/ - done - - if test -n "$prefixes"; then - # Don't fail if two instances are running concurrently. - (umask $mkdir_umask && - eval "\$doit_exec \$mkdirprog $prefixes") || - test -d "$dstdir" || exit 1 - obsolete_mkdir_used=true - fi - fi - fi - - if test -n "$dir_arg"; then - { test -z "$chowncmd" || $doit $chowncmd "$dst"; } && - { test -z "$chgrpcmd" || $doit $chgrpcmd "$dst"; } && - { test "$obsolete_mkdir_used$chowncmd$chgrpcmd" = false || - test -z "$chmodcmd" || $doit $chmodcmd $mode "$dst"; } || exit 1 - else - - # Make a couple of temp file names in the proper directory. - dsttmp=$dstdir/_inst.$$_ - rmtmp=$dstdir/_rm.$$_ - - # Trap to clean up those temp files at exit. - trap 'ret=$?; rm -f "$dsttmp" "$rmtmp" && exit $ret' 0 - - # Copy the file name to the temp name. - (umask $cp_umask && $doit_exec $cpprog "$src" "$dsttmp") && - - # and set any options; do chmod last to preserve setuid bits. - # - # If any of these fail, we abort the whole thing. If we want to - # ignore errors from any of these, just make sure not to ignore - # errors from the above "$doit $cpprog $src $dsttmp" command. - # - { test -z "$chowncmd" || $doit $chowncmd "$dsttmp"; } && - { test -z "$chgrpcmd" || $doit $chgrpcmd "$dsttmp"; } && - { test -z "$stripcmd" || $doit $stripcmd "$dsttmp"; } && - { test -z "$chmodcmd" || $doit $chmodcmd $mode "$dsttmp"; } && - - # If -C, don't bother to copy if it wouldn't change the file. - if $copy_on_change && - old=`LC_ALL=C ls -dlL "$dst" 2>/dev/null` && - new=`LC_ALL=C ls -dlL "$dsttmp" 2>/dev/null` && - - eval "$initialize_posix_glob" && - $posix_glob set -f && - set X $old && old=:$2:$4:$5:$6 && - set X $new && new=:$2:$4:$5:$6 && - $posix_glob set +f && - - test "$old" = "$new" && - $cmpprog "$dst" "$dsttmp" >/dev/null 2>&1 - then - rm -f "$dsttmp" - else - # Rename the file to the real destination. - $doit $mvcmd -f "$dsttmp" "$dst" 2>/dev/null || - - # The rename failed, perhaps because mv can't rename something else - # to itself, or perhaps because mv is so ancient that it does not - # support -f. - { - # Now remove or move aside any old file at destination location. - # We try this two ways since rm can't unlink itself on some - # systems and the destination file might be busy for other - # reasons. In this case, the final cleanup might fail but the new - # file should still install successfully. - { - test ! -f "$dst" || - $doit $rmcmd -f "$dst" 2>/dev/null || - { $doit $mvcmd -f "$dst" "$rmtmp" 2>/dev/null && - { $doit $rmcmd -f "$rmtmp" 2>/dev/null; :; } - } || - { echo "$0: cannot unlink or rename $dst" >&2 - (exit 1); exit 1 - } - } && - - # Now rename the file to the real destination. - $doit $mvcmd "$dsttmp" "$dst" - } - fi || exit 1 - - trap '' 0 - fi -done - -# Local variables: -# eval: (add-hook 'write-file-hooks 'time-stamp) -# time-stamp-start: "scriptversion=" -# time-stamp-format: "%:y-%02m-%02d.%02H" -# time-stamp-time-zone: "UTC" -# time-stamp-end: "; # UTC" -# End: diff --git a/test/test-automation/build-scripts/install-tests.sh b/test/test-automation/build-scripts/install-tests.sh deleted file mode 100755 index fdbd707d0..000000000 --- a/test/test-automation/build-scripts/install-tests.sh +++ /dev/null @@ -1,25 +0,0 @@ -#! /bin/bash - -DIRECTORY="tests" -EXT="error" - -mkdir $DIRECTORY > /dev/null 2>&1 - -PLATFORM="$(uname)" -if [[ $PLATFORM == "Linux" ]]; then - EXT="so" -elif [[ $PLATFORM == "Darwin" ]]; then - EXT="dylib" -fi - -# TODO: put the test in an array -for suite in "testdummy" "testplatform" "testrect" "testaudio" "testsurface" "testrwops" "testrender" "testvideo" "testsyswm" "testclipboard" "testevents" "testkeyboard" -do - cp -f "$DIRECTORY/$suite/.libs/lib$suite.$EXT" $DIRECTORY -done - -echo "Test suites installed." -echo "Run './runner --show-tests' to see the available tests" -echo "and './runner' to execute them" -echo "" -echo "For more commands: './runner --help'" diff --git a/test/test-automation/build-scripts/ltmain.sh b/test/test-automation/build-scripts/ltmain.sh deleted file mode 100755 index a72f2fd78..000000000 --- a/test/test-automation/build-scripts/ltmain.sh +++ /dev/null @@ -1,8406 +0,0 @@ -# Generated from ltmain.m4sh. - -# ltmain.sh (GNU libtool) 2.2.6b -# Written by Gordon Matzigkeit , 1996 - -# Copyright (C) 1996, 1997, 1998, 1999, 2000, 2001, 2003, 2004, 2005, 2006, 2007 2008 Free Software Foundation, Inc. -# This is free software; see the source for copying conditions. There is NO -# warranty; not even for MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. - -# GNU Libtool is free software; you can redistribute it and/or modify -# it under the terms of the GNU General Public License as published by -# the Free Software Foundation; either version 2 of the License, or -# (at your option) any later version. -# -# As a special exception to the GNU General Public License, -# if you distribute this file as part of a program or library that -# is built using GNU Libtool, you may include this file under the -# same distribution terms that you use for the rest of that program. -# -# GNU Libtool is distributed in the hope that it will be useful, but -# WITHOUT ANY WARRANTY; without even the implied warranty of -# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU -# General Public License for more details. -# -# You should have received a copy of the GNU General Public License -# along with GNU Libtool; see the file COPYING. If not, a copy -# can be downloaded from http://www.gnu.org/licenses/gpl.html, -# or obtained by writing to the Free Software Foundation, Inc., -# 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA. - -# Usage: $progname [OPTION]... [MODE-ARG]... -# -# Provide generalized library-building support services. -# -# --config show all configuration variables -# --debug enable verbose shell tracing -# -n, --dry-run display commands without modifying any files -# --features display basic configuration information and exit -# --mode=MODE use operation mode MODE -# --preserve-dup-deps don't remove duplicate dependency libraries -# --quiet, --silent don't print informational messages -# --tag=TAG use configuration variables from tag TAG -# -v, --verbose print informational messages (default) -# --version print version information -# -h, --help print short or long help message -# -# MODE must be one of the following: -# -# clean remove files from the build directory -# compile compile a source file into a libtool object -# execute automatically set library path, then run a program -# finish complete the installation of libtool libraries -# install install libraries or executables -# link create a library or an executable -# uninstall remove libraries from an installed directory -# -# MODE-ARGS vary depending on the MODE. -# Try `$progname --help --mode=MODE' for a more detailed description of MODE. -# -# When reporting a bug, please describe a test case to reproduce it and -# include the following information: -# -# host-triplet: $host -# shell: $SHELL -# compiler: $LTCC -# compiler flags: $LTCFLAGS -# linker: $LD (gnu? $with_gnu_ld) -# $progname: (GNU libtool) 2.2.6b -# automake: $automake_version -# autoconf: $autoconf_version -# -# Report bugs to . - -PROGRAM=ltmain.sh -PACKAGE=libtool -VERSION=2.2.6b -TIMESTAMP="" -package_revision=1.3017 - -# Be Bourne compatible -if test -n "${ZSH_VERSION+set}" && (emulate sh) >/dev/null 2>&1; then - emulate sh - NULLCMD=: - # Zsh 3.x and 4.x performs word splitting on ${1+"$@"}, which - # is contrary to our usage. Disable this feature. - alias -g '${1+"$@"}'='"$@"' - setopt NO_GLOB_SUBST -else - case `(set -o) 2>/dev/null` in *posix*) set -o posix;; esac -fi -BIN_SH=xpg4; export BIN_SH # for Tru64 -DUALCASE=1; export DUALCASE # for MKS sh - -# NLS nuisances: We save the old values to restore during execute mode. -# Only set LANG and LC_ALL to C if already set. -# These must not be set unconditionally because not all systems understand -# e.g. LANG=C (notably SCO). -lt_user_locale= -lt_safe_locale= -for lt_var in LANG LANGUAGE LC_ALL LC_CTYPE LC_COLLATE LC_MESSAGES -do - eval "if test \"\${$lt_var+set}\" = set; then - save_$lt_var=\$$lt_var - $lt_var=C - export $lt_var - lt_user_locale=\"$lt_var=\\\$save_\$lt_var; \$lt_user_locale\" - lt_safe_locale=\"$lt_var=C; \$lt_safe_locale\" - fi" -done - -$lt_unset CDPATH - - - - - -: ${CP="cp -f"} -: ${ECHO="echo"} -: ${EGREP="/bin/grep -E"} -: ${FGREP="/bin/grep -F"} -: ${GREP="/bin/grep"} -: ${LN_S="ln -s"} -: ${MAKE="make"} -: ${MKDIR="mkdir"} -: ${MV="mv -f"} -: ${RM="rm -f"} -: ${SED="/bin/sed"} -: ${SHELL="${CONFIG_SHELL-/bin/sh}"} -: ${Xsed="$SED -e 1s/^X//"} - -# Global variables: -EXIT_SUCCESS=0 -EXIT_FAILURE=1 -EXIT_MISMATCH=63 # $? = 63 is used to indicate version mismatch to missing. -EXIT_SKIP=77 # $? = 77 is used to indicate a skipped test to automake. - -exit_status=$EXIT_SUCCESS - -# Make sure IFS has a sensible default -lt_nl=' -' -IFS=" $lt_nl" - -dirname="s,/[^/]*$,," -basename="s,^.*/,," - -# func_dirname_and_basename file append nondir_replacement -# perform func_basename and func_dirname in a single function -# call: -# dirname: Compute the dirname of FILE. If nonempty, -# add APPEND to the result, otherwise set result -# to NONDIR_REPLACEMENT. -# value returned in "$func_dirname_result" -# basename: Compute filename of FILE. -# value retuned in "$func_basename_result" -# Implementation must be kept synchronized with func_dirname -# and func_basename. For efficiency, we do not delegate to -# those functions but instead duplicate the functionality here. -func_dirname_and_basename () -{ - # Extract subdirectory from the argument. - func_dirname_result=`$ECHO "X${1}" | $Xsed -e "$dirname"` - if test "X$func_dirname_result" = "X${1}"; then - func_dirname_result="${3}" - else - func_dirname_result="$func_dirname_result${2}" - fi - func_basename_result=`$ECHO "X${1}" | $Xsed -e "$basename"` -} - -# Generated shell functions inserted here. - -# Work around backward compatibility issue on IRIX 6.5. On IRIX 6.4+, sh -# is ksh but when the shell is invoked as "sh" and the current value of -# the _XPG environment variable is not equal to 1 (one), the special -# positional parameter $0, within a function call, is the name of the -# function. -progpath="$0" - -# The name of this program: -# In the unlikely event $progname began with a '-', it would play havoc with -# func_echo (imagine progname=-n), so we prepend ./ in that case: -func_dirname_and_basename "$progpath" -progname=$func_basename_result -case $progname in - -*) progname=./$progname ;; -esac - -# Make sure we have an absolute path for reexecution: -case $progpath in - [\\/]*|[A-Za-z]:\\*) ;; - *[\\/]*) - progdir=$func_dirname_result - progdir=`cd "$progdir" && pwd` - progpath="$progdir/$progname" - ;; - *) - save_IFS="$IFS" - IFS=: - for progdir in $PATH; do - IFS="$save_IFS" - test -x "$progdir/$progname" && break - done - IFS="$save_IFS" - test -n "$progdir" || progdir=`pwd` - progpath="$progdir/$progname" - ;; -esac - -# Sed substitution that helps us do robust quoting. It backslashifies -# metacharacters that are still active within double-quoted strings. -Xsed="${SED}"' -e 1s/^X//' -sed_quote_subst='s/\([`"$\\]\)/\\\1/g' - -# Same as above, but do not quote variable references. -double_quote_subst='s/\(["`\\]\)/\\\1/g' - -# Re-`\' parameter expansions in output of double_quote_subst that were -# `\'-ed in input to the same. If an odd number of `\' preceded a '$' -# in input to double_quote_subst, that '$' was protected from expansion. -# Since each input `\' is now two `\'s, look for any number of runs of -# four `\'s followed by two `\'s and then a '$'. `\' that '$'. -bs='\\' -bs2='\\\\' -bs4='\\\\\\\\' -dollar='\$' -sed_double_backslash="\ - s/$bs4/&\\ -/g - s/^$bs2$dollar/$bs&/ - s/\\([^$bs]\\)$bs2$dollar/\\1$bs2$bs$dollar/g - s/\n//g" - -# Standard options: -opt_dry_run=false -opt_help=false -opt_quiet=false -opt_verbose=false -opt_warning=: - -# func_echo arg... -# Echo program name prefixed message, along with the current mode -# name if it has been set yet. -func_echo () -{ - $ECHO "$progname${mode+: }$mode: $*" -} - -# func_verbose arg... -# Echo program name prefixed message in verbose mode only. -func_verbose () -{ - $opt_verbose && func_echo ${1+"$@"} - - # A bug in bash halts the script if the last line of a function - # fails when set -e is in force, so we need another command to - # work around that: - : -} - -# func_error arg... -# Echo program name prefixed message to standard error. -func_error () -{ - $ECHO "$progname${mode+: }$mode: "${1+"$@"} 1>&2 -} - -# func_warning arg... -# Echo program name prefixed warning message to standard error. -func_warning () -{ - $opt_warning && $ECHO "$progname${mode+: }$mode: warning: "${1+"$@"} 1>&2 - - # bash bug again: - : -} - -# func_fatal_error arg... -# Echo program name prefixed message to standard error, and exit. -func_fatal_error () -{ - func_error ${1+"$@"} - exit $EXIT_FAILURE -} - -# func_fatal_help arg... -# Echo program name prefixed message to standard error, followed by -# a help hint, and exit. -func_fatal_help () -{ - func_error ${1+"$@"} - func_fatal_error "$help" -} -help="Try \`$progname --help' for more information." ## default - - -# func_grep expression filename -# Check whether EXPRESSION matches any line of FILENAME, without output. -func_grep () -{ - $GREP "$1" "$2" >/dev/null 2>&1 -} - - -# func_mkdir_p directory-path -# Make sure the entire path to DIRECTORY-PATH is available. -func_mkdir_p () -{ - my_directory_path="$1" - my_dir_list= - - if test -n "$my_directory_path" && test "$opt_dry_run" != ":"; then - - # Protect directory names starting with `-' - case $my_directory_path in - -*) my_directory_path="./$my_directory_path" ;; - esac - - # While some portion of DIR does not yet exist... - while test ! -d "$my_directory_path"; do - # ...make a list in topmost first order. Use a colon delimited - # list incase some portion of path contains whitespace. - my_dir_list="$my_directory_path:$my_dir_list" - - # If the last portion added has no slash in it, the list is done - case $my_directory_path in */*) ;; *) break ;; esac - - # ...otherwise throw away the child directory and loop - my_directory_path=`$ECHO "X$my_directory_path" | $Xsed -e "$dirname"` - done - my_dir_list=`$ECHO "X$my_dir_list" | $Xsed -e 's,:*$,,'` - - save_mkdir_p_IFS="$IFS"; IFS=':' - for my_dir in $my_dir_list; do - IFS="$save_mkdir_p_IFS" - # mkdir can fail with a `File exist' error if two processes - # try to create one of the directories concurrently. Don't - # stop in that case! - $MKDIR "$my_dir" 2>/dev/null || : - done - IFS="$save_mkdir_p_IFS" - - # Bail out if we (or some other process) failed to create a directory. - test -d "$my_directory_path" || \ - func_fatal_error "Failed to create \`$1'" - fi -} - - -# func_mktempdir [string] -# Make a temporary directory that won't clash with other running -# libtool processes, and avoids race conditions if possible. If -# given, STRING is the basename for that directory. -func_mktempdir () -{ - my_template="${TMPDIR-/tmp}/${1-$progname}" - - if test "$opt_dry_run" = ":"; then - # Return a directory name, but don't create it in dry-run mode - my_tmpdir="${my_template}-$$" - else - - # If mktemp works, use that first and foremost - my_tmpdir=`mktemp -d "${my_template}-XXXXXXXX" 2>/dev/null` - - if test ! -d "$my_tmpdir"; then - # Failing that, at least try and use $RANDOM to avoid a race - my_tmpdir="${my_template}-${RANDOM-0}$$" - - save_mktempdir_umask=`umask` - umask 0077 - $MKDIR "$my_tmpdir" - umask $save_mktempdir_umask - fi - - # If we're not in dry-run mode, bomb out on failure - test -d "$my_tmpdir" || \ - func_fatal_error "cannot create temporary directory \`$my_tmpdir'" - fi - - $ECHO "X$my_tmpdir" | $Xsed -} - - -# func_quote_for_eval arg -# Aesthetically quote ARG to be evaled later. -# This function returns two values: FUNC_QUOTE_FOR_EVAL_RESULT -# is double-quoted, suitable for a subsequent eval, whereas -# FUNC_QUOTE_FOR_EVAL_UNQUOTED_RESULT has merely all characters -# which are still active within double quotes backslashified. -func_quote_for_eval () -{ - case $1 in - *[\\\`\"\$]*) - func_quote_for_eval_unquoted_result=`$ECHO "X$1" | $Xsed -e "$sed_quote_subst"` ;; - *) - func_quote_for_eval_unquoted_result="$1" ;; - esac - - case $func_quote_for_eval_unquoted_result in - # Double-quote args containing shell metacharacters to delay - # word splitting, command substitution and and variable - # expansion for a subsequent eval. - # Many Bourne shells cannot handle close brackets correctly - # in scan sets, so we specify it separately. - *[\[\~\#\^\&\*\(\)\{\}\|\;\<\>\?\'\ \ ]*|*]*|"") - func_quote_for_eval_result="\"$func_quote_for_eval_unquoted_result\"" - ;; - *) - func_quote_for_eval_result="$func_quote_for_eval_unquoted_result" - esac -} - - -# func_quote_for_expand arg -# Aesthetically quote ARG to be evaled later; same as above, -# but do not quote variable references. -func_quote_for_expand () -{ - case $1 in - *[\\\`\"]*) - my_arg=`$ECHO "X$1" | $Xsed \ - -e "$double_quote_subst" -e "$sed_double_backslash"` ;; - *) - my_arg="$1" ;; - esac - - case $my_arg in - # Double-quote args containing shell metacharacters to delay - # word splitting and command substitution for a subsequent eval. - # Many Bourne shells cannot handle close brackets correctly - # in scan sets, so we specify it separately. - *[\[\~\#\^\&\*\(\)\{\}\|\;\<\>\?\'\ \ ]*|*]*|"") - my_arg="\"$my_arg\"" - ;; - esac - - func_quote_for_expand_result="$my_arg" -} - - -# func_show_eval cmd [fail_exp] -# Unless opt_silent is true, then output CMD. Then, if opt_dryrun is -# not true, evaluate CMD. If the evaluation of CMD fails, and FAIL_EXP -# is given, then evaluate it. -func_show_eval () -{ - my_cmd="$1" - my_fail_exp="${2-:}" - - ${opt_silent-false} || { - func_quote_for_expand "$my_cmd" - eval "func_echo $func_quote_for_expand_result" - } - - if ${opt_dry_run-false}; then :; else - eval "$my_cmd" - my_status=$? - if test "$my_status" -eq 0; then :; else - eval "(exit $my_status); $my_fail_exp" - fi - fi -} - - -# func_show_eval_locale cmd [fail_exp] -# Unless opt_silent is true, then output CMD. Then, if opt_dryrun is -# not true, evaluate CMD. If the evaluation of CMD fails, and FAIL_EXP -# is given, then evaluate it. Use the saved locale for evaluation. -func_show_eval_locale () -{ - my_cmd="$1" - my_fail_exp="${2-:}" - - ${opt_silent-false} || { - func_quote_for_expand "$my_cmd" - eval "func_echo $func_quote_for_expand_result" - } - - if ${opt_dry_run-false}; then :; else - eval "$lt_user_locale - $my_cmd" - my_status=$? - eval "$lt_safe_locale" - if test "$my_status" -eq 0; then :; else - eval "(exit $my_status); $my_fail_exp" - fi - fi -} - - - - - -# func_version -# Echo version message to standard output and exit. -func_version () -{ - $SED -n '/^# '$PROGRAM' (GNU /,/# warranty; / { - s/^# // - s/^# *$// - s/\((C)\)[ 0-9,-]*\( [1-9][0-9]*\)/\1\2/ - p - }' < "$progpath" - exit $? -} - -# func_usage -# Echo short help message to standard output and exit. -func_usage () -{ - $SED -n '/^# Usage:/,/# -h/ { - s/^# // - s/^# *$// - s/\$progname/'$progname'/ - p - }' < "$progpath" - $ECHO - $ECHO "run \`$progname --help | more' for full usage" - exit $? -} - -# func_help -# Echo long help message to standard output and exit. -func_help () -{ - $SED -n '/^# Usage:/,/# Report bugs to/ { - s/^# // - s/^# *$// - s*\$progname*'$progname'* - s*\$host*'"$host"'* - s*\$SHELL*'"$SHELL"'* - s*\$LTCC*'"$LTCC"'* - s*\$LTCFLAGS*'"$LTCFLAGS"'* - s*\$LD*'"$LD"'* - s/\$with_gnu_ld/'"$with_gnu_ld"'/ - s/\$automake_version/'"`(automake --version) 2>/dev/null |$SED 1q`"'/ - s/\$autoconf_version/'"`(autoconf --version) 2>/dev/null |$SED 1q`"'/ - p - }' < "$progpath" - exit $? -} - -# func_missing_arg argname -# Echo program name prefixed message to standard error and set global -# exit_cmd. -func_missing_arg () -{ - func_error "missing argument for $1" - exit_cmd=exit -} - -exit_cmd=: - - - - - -# Check that we have a working $ECHO. -if test "X$1" = X--no-reexec; then - # Discard the --no-reexec flag, and continue. - shift -elif test "X$1" = X--fallback-echo; then - # Avoid inline document here, it may be left over - : -elif test "X`{ $ECHO '\t'; } 2>/dev/null`" = 'X\t'; then - # Yippee, $ECHO works! - : -else - # Restart under the correct shell, and then maybe $ECHO will work. - exec $SHELL "$progpath" --no-reexec ${1+"$@"} -fi - -if test "X$1" = X--fallback-echo; then - # used as fallback echo - shift - cat </dev/null 2>&1; then - taglist="$taglist $tagname" - - # Evaluate the configuration. Be careful to quote the path - # and the sed script, to avoid splitting on whitespace, but - # also don't use non-portable quotes within backquotes within - # quotes we have to do it in 2 steps: - extractedcf=`$SED -n -e "$sed_extractcf" < "$progpath"` - eval "$extractedcf" - else - func_error "ignoring unknown tag $tagname" - fi - ;; - esac -} - -# Parse options once, thoroughly. This comes as soon as possible in -# the script to make things like `libtool --version' happen quickly. -{ - - # Shorthand for --mode=foo, only valid as the first argument - case $1 in - clean|clea|cle|cl) - shift; set dummy --mode clean ${1+"$@"}; shift - ;; - compile|compil|compi|comp|com|co|c) - shift; set dummy --mode compile ${1+"$@"}; shift - ;; - execute|execut|execu|exec|exe|ex|e) - shift; set dummy --mode execute ${1+"$@"}; shift - ;; - finish|finis|fini|fin|fi|f) - shift; set dummy --mode finish ${1+"$@"}; shift - ;; - install|instal|insta|inst|ins|in|i) - shift; set dummy --mode install ${1+"$@"}; shift - ;; - link|lin|li|l) - shift; set dummy --mode link ${1+"$@"}; shift - ;; - uninstall|uninstal|uninsta|uninst|unins|unin|uni|un|u) - shift; set dummy --mode uninstall ${1+"$@"}; shift - ;; - esac - - # Parse non-mode specific arguments: - while test "$#" -gt 0; do - opt="$1" - shift - - case $opt in - --config) func_config ;; - - --debug) preserve_args="$preserve_args $opt" - func_echo "enabling shell trace mode" - opt_debug='set -x' - $opt_debug - ;; - - -dlopen) test "$#" -eq 0 && func_missing_arg "$opt" && break - execute_dlfiles="$execute_dlfiles $1" - shift - ;; - - --dry-run | -n) opt_dry_run=: ;; - --features) func_features ;; - --finish) mode="finish" ;; - - --mode) test "$#" -eq 0 && func_missing_arg "$opt" && break - case $1 in - # Valid mode arguments: - clean) ;; - compile) ;; - execute) ;; - finish) ;; - install) ;; - link) ;; - relink) ;; - uninstall) ;; - - # Catch anything else as an error - *) func_error "invalid argument for $opt" - exit_cmd=exit - break - ;; - esac - - mode="$1" - shift - ;; - - --preserve-dup-deps) - opt_duplicate_deps=: ;; - - --quiet|--silent) preserve_args="$preserve_args $opt" - opt_silent=: - ;; - - --verbose| -v) preserve_args="$preserve_args $opt" - opt_silent=false - ;; - - --tag) test "$#" -eq 0 && func_missing_arg "$opt" && break - preserve_args="$preserve_args $opt $1" - func_enable_tag "$1" # tagname is set here - shift - ;; - - # Separate optargs to long options: - -dlopen=*|--mode=*|--tag=*) - func_opt_split "$opt" - set dummy "$func_opt_split_opt" "$func_opt_split_arg" ${1+"$@"} - shift - ;; - - -\?|-h) func_usage ;; - --help) opt_help=: ;; - --version) func_version ;; - - -*) func_fatal_help "unrecognized option \`$opt'" ;; - - *) nonopt="$opt" - break - ;; - esac - done - - - case $host in - *cygwin* | *mingw* | *pw32* | *cegcc*) - # don't eliminate duplications in $postdeps and $predeps - opt_duplicate_compiler_generated_deps=: - ;; - *) - opt_duplicate_compiler_generated_deps=$opt_duplicate_deps - ;; - esac - - # Having warned about all mis-specified options, bail out if - # anything was wrong. - $exit_cmd $EXIT_FAILURE -} - -# func_check_version_match -# Ensure that we are using m4 macros, and libtool script from the same -# release of libtool. -func_check_version_match () -{ - if test "$package_revision" != "$macro_revision"; then - if test "$VERSION" != "$macro_version"; then - if test -z "$macro_version"; then - cat >&2 <<_LT_EOF -$progname: Version mismatch error. This is $PACKAGE $VERSION, but the -$progname: definition of this LT_INIT comes from an older release. -$progname: You should recreate aclocal.m4 with macros from $PACKAGE $VERSION -$progname: and run autoconf again. -_LT_EOF - else - cat >&2 <<_LT_EOF -$progname: Version mismatch error. This is $PACKAGE $VERSION, but the -$progname: definition of this LT_INIT comes from $PACKAGE $macro_version. -$progname: You should recreate aclocal.m4 with macros from $PACKAGE $VERSION -$progname: and run autoconf again. -_LT_EOF - fi - else - cat >&2 <<_LT_EOF -$progname: Version mismatch error. This is $PACKAGE $VERSION, revision $package_revision, -$progname: but the definition of this LT_INIT comes from revision $macro_revision. -$progname: You should recreate aclocal.m4 with macros from revision $package_revision -$progname: of $PACKAGE $VERSION and run autoconf again. -_LT_EOF - fi - - exit $EXIT_MISMATCH - fi -} - - -## ----------- ## -## Main. ## -## ----------- ## - -$opt_help || { - # Sanity checks first: - func_check_version_match - - if test "$build_libtool_libs" != yes && test "$build_old_libs" != yes; then - func_fatal_configuration "not configured to build any kind of library" - fi - - test -z "$mode" && func_fatal_error "error: you must specify a MODE." - - - # Darwin sucks - eval std_shrext=\"$shrext_cmds\" - - - # Only execute mode is allowed to have -dlopen flags. - if test -n "$execute_dlfiles" && test "$mode" != execute; then - func_error "unrecognized option \`-dlopen'" - $ECHO "$help" 1>&2 - exit $EXIT_FAILURE - fi - - # Change the help message to a mode-specific one. - generic_help="$help" - help="Try \`$progname --help --mode=$mode' for more information." -} - - -# func_lalib_p file -# True iff FILE is a libtool `.la' library or `.lo' object file. -# This function is only a basic sanity check; it will hardly flush out -# determined imposters. -func_lalib_p () -{ - test -f "$1" && - $SED -e 4q "$1" 2>/dev/null \ - | $GREP "^# Generated by .*$PACKAGE" > /dev/null 2>&1 -} - -# func_lalib_unsafe_p file -# True iff FILE is a libtool `.la' library or `.lo' object file. -# This function implements the same check as func_lalib_p without -# resorting to external programs. To this end, it redirects stdin and -# closes it afterwards, without saving the original file descriptor. -# As a safety measure, use it only where a negative result would be -# fatal anyway. Works if `file' does not exist. -func_lalib_unsafe_p () -{ - lalib_p=no - if test -f "$1" && test -r "$1" && exec 5<&0 <"$1"; then - for lalib_p_l in 1 2 3 4 - do - read lalib_p_line - case "$lalib_p_line" in - \#\ Generated\ by\ *$PACKAGE* ) lalib_p=yes; break;; - esac - done - exec 0<&5 5<&- - fi - test "$lalib_p" = yes -} - -# func_ltwrapper_script_p file -# True iff FILE is a libtool wrapper script -# This function is only a basic sanity check; it will hardly flush out -# determined imposters. -func_ltwrapper_script_p () -{ - func_lalib_p "$1" -} - -# func_ltwrapper_executable_p file -# True iff FILE is a libtool wrapper executable -# This function is only a basic sanity check; it will hardly flush out -# determined imposters. -func_ltwrapper_executable_p () -{ - func_ltwrapper_exec_suffix= - case $1 in - *.exe) ;; - *) func_ltwrapper_exec_suffix=.exe ;; - esac - $GREP "$magic_exe" "$1$func_ltwrapper_exec_suffix" >/dev/null 2>&1 -} - -# func_ltwrapper_scriptname file -# Assumes file is an ltwrapper_executable -# uses $file to determine the appropriate filename for a -# temporary ltwrapper_script. -func_ltwrapper_scriptname () -{ - func_ltwrapper_scriptname_result="" - if func_ltwrapper_executable_p "$1"; then - func_dirname_and_basename "$1" "" "." - func_stripname '' '.exe' "$func_basename_result" - func_ltwrapper_scriptname_result="$func_dirname_result/$objdir/${func_stripname_result}_ltshwrapper" - fi -} - -# func_ltwrapper_p file -# True iff FILE is a libtool wrapper script or wrapper executable -# This function is only a basic sanity check; it will hardly flush out -# determined imposters. -func_ltwrapper_p () -{ - func_ltwrapper_script_p "$1" || func_ltwrapper_executable_p "$1" -} - - -# func_execute_cmds commands fail_cmd -# Execute tilde-delimited COMMANDS. -# If FAIL_CMD is given, eval that upon failure. -# FAIL_CMD may read-access the current command in variable CMD! -func_execute_cmds () -{ - $opt_debug - save_ifs=$IFS; IFS='~' - for cmd in $1; do - IFS=$save_ifs - eval cmd=\"$cmd\" - func_show_eval "$cmd" "${2-:}" - done - IFS=$save_ifs -} - - -# func_source file -# Source FILE, adding directory component if necessary. -# Note that it is not necessary on cygwin/mingw to append a dot to -# FILE even if both FILE and FILE.exe exist: automatic-append-.exe -# behavior happens only for exec(3), not for open(2)! Also, sourcing -# `FILE.' does not work on cygwin managed mounts. -func_source () -{ - $opt_debug - case $1 in - */* | *\\*) . "$1" ;; - *) . "./$1" ;; - esac -} - - -# func_infer_tag arg -# Infer tagged configuration to use if any are available and -# if one wasn't chosen via the "--tag" command line option. -# Only attempt this if the compiler in the base compile -# command doesn't match the default compiler. -# arg is usually of the form 'gcc ...' -func_infer_tag () -{ - $opt_debug - if test -n "$available_tags" && test -z "$tagname"; then - CC_quoted= - for arg in $CC; do - func_quote_for_eval "$arg" - CC_quoted="$CC_quoted $func_quote_for_eval_result" - done - case $@ in - # Blanks in the command may have been stripped by the calling shell, - # but not from the CC environment variable when configure was run. - " $CC "* | "$CC "* | " `$ECHO $CC` "* | "`$ECHO $CC` "* | " $CC_quoted"* | "$CC_quoted "* | " `$ECHO $CC_quoted` "* | "`$ECHO $CC_quoted` "*) ;; - # Blanks at the start of $base_compile will cause this to fail - # if we don't check for them as well. - *) - for z in $available_tags; do - if $GREP "^# ### BEGIN LIBTOOL TAG CONFIG: $z$" < "$progpath" > /dev/null; then - # Evaluate the configuration. - eval "`${SED} -n -e '/^# ### BEGIN LIBTOOL TAG CONFIG: '$z'$/,/^# ### END LIBTOOL TAG CONFIG: '$z'$/p' < $progpath`" - CC_quoted= - for arg in $CC; do - # Double-quote args containing other shell metacharacters. - func_quote_for_eval "$arg" - CC_quoted="$CC_quoted $func_quote_for_eval_result" - done - case "$@ " in - " $CC "* | "$CC "* | " `$ECHO $CC` "* | "`$ECHO $CC` "* | " $CC_quoted"* | "$CC_quoted "* | " `$ECHO $CC_quoted` "* | "`$ECHO $CC_quoted` "*) - # The compiler in the base compile command matches - # the one in the tagged configuration. - # Assume this is the tagged configuration we want. - tagname=$z - break - ;; - esac - fi - done - # If $tagname still isn't set, then no tagged configuration - # was found and let the user know that the "--tag" command - # line option must be used. - if test -z "$tagname"; then - func_echo "unable to infer tagged configuration" - func_fatal_error "specify a tag with \`--tag'" -# else -# func_verbose "using $tagname tagged configuration" - fi - ;; - esac - fi -} - - - -# func_write_libtool_object output_name pic_name nonpic_name -# Create a libtool object file (analogous to a ".la" file), -# but don't create it if we're doing a dry run. -func_write_libtool_object () -{ - write_libobj=${1} - if test "$build_libtool_libs" = yes; then - write_lobj=\'${2}\' - else - write_lobj=none - fi - - if test "$build_old_libs" = yes; then - write_oldobj=\'${3}\' - else - write_oldobj=none - fi - - $opt_dry_run || { - cat >${write_libobj}T <?"'"'"' &()|`$[]' \ - && func_warning "libobj name \`$libobj' may not contain shell special characters." - func_dirname_and_basename "$obj" "/" "" - objname="$func_basename_result" - xdir="$func_dirname_result" - lobj=${xdir}$objdir/$objname - - test -z "$base_compile" && \ - func_fatal_help "you must specify a compilation command" - - # Delete any leftover library objects. - if test "$build_old_libs" = yes; then - removelist="$obj $lobj $libobj ${libobj}T" - else - removelist="$lobj $libobj ${libobj}T" - fi - - # On Cygwin there's no "real" PIC flag so we must build both object types - case $host_os in - cygwin* | mingw* | pw32* | os2* | cegcc*) - pic_mode=default - ;; - esac - if test "$pic_mode" = no && test "$deplibs_check_method" != pass_all; then - # non-PIC code in shared libraries is not supported - pic_mode=default - fi - - # Calculate the filename of the output object if compiler does - # not support -o with -c - if test "$compiler_c_o" = no; then - output_obj=`$ECHO "X$srcfile" | $Xsed -e 's%^.*/%%' -e 's%\.[^.]*$%%'`.${objext} - lockfile="$output_obj.lock" - else - output_obj= - need_locks=no - lockfile= - fi - - # Lock this critical section if it is needed - # We use this script file to make the link, it avoids creating a new file - if test "$need_locks" = yes; then - until $opt_dry_run || ln "$progpath" "$lockfile" 2>/dev/null; do - func_echo "Waiting for $lockfile to be removed" - sleep 2 - done - elif test "$need_locks" = warn; then - if test -f "$lockfile"; then - $ECHO "\ -*** ERROR, $lockfile exists and contains: -`cat $lockfile 2>/dev/null` - -This indicates that another process is trying to use the same -temporary object file, and libtool could not work around it because -your compiler does not support \`-c' and \`-o' together. If you -repeat this compilation, it may succeed, by chance, but you had better -avoid parallel builds (make -j) in this platform, or get a better -compiler." - - $opt_dry_run || $RM $removelist - exit $EXIT_FAILURE - fi - removelist="$removelist $output_obj" - $ECHO "$srcfile" > "$lockfile" - fi - - $opt_dry_run || $RM $removelist - removelist="$removelist $lockfile" - trap '$opt_dry_run || $RM $removelist; exit $EXIT_FAILURE' 1 2 15 - - if test -n "$fix_srcfile_path"; then - eval srcfile=\"$fix_srcfile_path\" - fi - func_quote_for_eval "$srcfile" - qsrcfile=$func_quote_for_eval_result - - # Only build a PIC object if we are building libtool libraries. - if test "$build_libtool_libs" = yes; then - # Without this assignment, base_compile gets emptied. - fbsd_hideous_sh_bug=$base_compile - - if test "$pic_mode" != no; then - command="$base_compile $qsrcfile $pic_flag" - else - # Don't build PIC code - command="$base_compile $qsrcfile" - fi - - func_mkdir_p "$xdir$objdir" - - if test -z "$output_obj"; then - # Place PIC objects in $objdir - command="$command -o $lobj" - fi - - func_show_eval_locale "$command" \ - 'test -n "$output_obj" && $RM $removelist; exit $EXIT_FAILURE' - - if test "$need_locks" = warn && - test "X`cat $lockfile 2>/dev/null`" != "X$srcfile"; then - $ECHO "\ -*** ERROR, $lockfile contains: -`cat $lockfile 2>/dev/null` - -but it should contain: -$srcfile - -This indicates that another process is trying to use the same -temporary object file, and libtool could not work around it because -your compiler does not support \`-c' and \`-o' together. If you -repeat this compilation, it may succeed, by chance, but you had better -avoid parallel builds (make -j) in this platform, or get a better -compiler." - - $opt_dry_run || $RM $removelist - exit $EXIT_FAILURE - fi - - # Just move the object if needed, then go on to compile the next one - if test -n "$output_obj" && test "X$output_obj" != "X$lobj"; then - func_show_eval '$MV "$output_obj" "$lobj"' \ - 'error=$?; $opt_dry_run || $RM $removelist; exit $error' - fi - - # Allow error messages only from the first compilation. - if test "$suppress_opt" = yes; then - suppress_output=' >/dev/null 2>&1' - fi - fi - - # Only build a position-dependent object if we build old libraries. - if test "$build_old_libs" = yes; then - if test "$pic_mode" != yes; then - # Don't build PIC code - command="$base_compile $qsrcfile$pie_flag" - else - command="$base_compile $qsrcfile $pic_flag" - fi - if test "$compiler_c_o" = yes; then - command="$command -o $obj" - fi - - # Suppress compiler output if we already did a PIC compilation. - command="$command$suppress_output" - func_show_eval_locale "$command" \ - '$opt_dry_run || $RM $removelist; exit $EXIT_FAILURE' - - if test "$need_locks" = warn && - test "X`cat $lockfile 2>/dev/null`" != "X$srcfile"; then - $ECHO "\ -*** ERROR, $lockfile contains: -`cat $lockfile 2>/dev/null` - -but it should contain: -$srcfile - -This indicates that another process is trying to use the same -temporary object file, and libtool could not work around it because -your compiler does not support \`-c' and \`-o' together. If you -repeat this compilation, it may succeed, by chance, but you had better -avoid parallel builds (make -j) in this platform, or get a better -compiler." - - $opt_dry_run || $RM $removelist - exit $EXIT_FAILURE - fi - - # Just move the object if needed - if test -n "$output_obj" && test "X$output_obj" != "X$obj"; then - func_show_eval '$MV "$output_obj" "$obj"' \ - 'error=$?; $opt_dry_run || $RM $removelist; exit $error' - fi - fi - - $opt_dry_run || { - func_write_libtool_object "$libobj" "$objdir/$objname" "$objname" - - # Unlock the critical section if it was locked - if test "$need_locks" != no; then - removelist=$lockfile - $RM "$lockfile" - fi - } - - exit $EXIT_SUCCESS -} - -$opt_help || { -test "$mode" = compile && func_mode_compile ${1+"$@"} -} - -func_mode_help () -{ - # We need to display help for each of the modes. - case $mode in - "") - # Generic help is extracted from the usage comments - # at the start of this file. - func_help - ;; - - clean) - $ECHO \ -"Usage: $progname [OPTION]... --mode=clean RM [RM-OPTION]... FILE... - -Remove files from the build directory. - -RM is the name of the program to use to delete files associated with each FILE -(typically \`/bin/rm'). RM-OPTIONS are options (such as \`-f') to be passed -to RM. - -If FILE is a libtool library, object or program, all the files associated -with it are deleted. Otherwise, only FILE itself is deleted using RM." - ;; - - compile) - $ECHO \ -"Usage: $progname [OPTION]... --mode=compile COMPILE-COMMAND... SOURCEFILE - -Compile a source file into a libtool library object. - -This mode accepts the following additional options: - - -o OUTPUT-FILE set the output file name to OUTPUT-FILE - -no-suppress do not suppress compiler output for multiple passes - -prefer-pic try to building PIC objects only - -prefer-non-pic try to building non-PIC objects only - -shared do not build a \`.o' file suitable for static linking - -static only build a \`.o' file suitable for static linking - -COMPILE-COMMAND is a command to be used in creating a \`standard' object file -from the given SOURCEFILE. - -The output file name is determined by removing the directory component from -SOURCEFILE, then substituting the C source code suffix \`.c' with the -library object suffix, \`.lo'." - ;; - - execute) - $ECHO \ -"Usage: $progname [OPTION]... --mode=execute COMMAND [ARGS]... - -Automatically set library path, then run a program. - -This mode accepts the following additional options: - - -dlopen FILE add the directory containing FILE to the library path - -This mode sets the library path environment variable according to \`-dlopen' -flags. - -If any of the ARGS are libtool executable wrappers, then they are translated -into their corresponding uninstalled binary, and any of their required library -directories are added to the library path. - -Then, COMMAND is executed, with ARGS as arguments." - ;; - - finish) - $ECHO \ -"Usage: $progname [OPTION]... --mode=finish [LIBDIR]... - -Complete the installation of libtool libraries. - -Each LIBDIR is a directory that contains libtool libraries. - -The commands that this mode executes may require superuser privileges. Use -the \`--dry-run' option if you just want to see what would be executed." - ;; - - install) - $ECHO \ -"Usage: $progname [OPTION]... --mode=install INSTALL-COMMAND... - -Install executables or libraries. - -INSTALL-COMMAND is the installation command. The first component should be -either the \`install' or \`cp' program. - -The following components of INSTALL-COMMAND are treated specially: - - -inst-prefix PREFIX-DIR Use PREFIX-DIR as a staging area for installation - -The rest of the components are interpreted as arguments to that command (only -BSD-compatible install options are recognized)." - ;; - - link) - $ECHO \ -"Usage: $progname [OPTION]... --mode=link LINK-COMMAND... - -Link object files or libraries together to form another library, or to -create an executable program. - -LINK-COMMAND is a command using the C compiler that you would use to create -a program from several object files. - -The following components of LINK-COMMAND are treated specially: - - -all-static do not do any dynamic linking at all - -avoid-version do not add a version suffix if possible - -dlopen FILE \`-dlpreopen' FILE if it cannot be dlopened at runtime - -dlpreopen FILE link in FILE and add its symbols to lt_preloaded_symbols - -export-dynamic allow symbols from OUTPUT-FILE to be resolved with dlsym(3) - -export-symbols SYMFILE - try to export only the symbols listed in SYMFILE - -export-symbols-regex REGEX - try to export only the symbols matching REGEX - -LLIBDIR search LIBDIR for required installed libraries - -lNAME OUTPUT-FILE requires the installed library libNAME - -module build a library that can dlopened - -no-fast-install disable the fast-install mode - -no-install link a not-installable executable - -no-undefined declare that a library does not refer to external symbols - -o OUTPUT-FILE create OUTPUT-FILE from the specified objects - -objectlist FILE Use a list of object files found in FILE to specify objects - -precious-files-regex REGEX - don't remove output files matching REGEX - -release RELEASE specify package release information - -rpath LIBDIR the created library will eventually be installed in LIBDIR - -R[ ]LIBDIR add LIBDIR to the runtime path of programs and libraries - -shared only do dynamic linking of libtool libraries - -shrext SUFFIX override the standard shared library file extension - -static do not do any dynamic linking of uninstalled libtool libraries - -static-libtool-libs - do not do any dynamic linking of libtool libraries - -version-info CURRENT[:REVISION[:AGE]] - specify library version info [each variable defaults to 0] - -weak LIBNAME declare that the target provides the LIBNAME interface - -All other options (arguments beginning with \`-') are ignored. - -Every other argument is treated as a filename. Files ending in \`.la' are -treated as uninstalled libtool libraries, other files are standard or library -object files. - -If the OUTPUT-FILE ends in \`.la', then a libtool library is created, -only library objects (\`.lo' files) may be specified, and \`-rpath' is -required, except when creating a convenience library. - -If OUTPUT-FILE ends in \`.a' or \`.lib', then a standard library is created -using \`ar' and \`ranlib', or on Windows using \`lib'. - -If OUTPUT-FILE ends in \`.lo' or \`.${objext}', then a reloadable object file -is created, otherwise an executable program is created." - ;; - - uninstall) - $ECHO \ -"Usage: $progname [OPTION]... --mode=uninstall RM [RM-OPTION]... FILE... - -Remove libraries from an installation directory. - -RM is the name of the program to use to delete files associated with each FILE -(typically \`/bin/rm'). RM-OPTIONS are options (such as \`-f') to be passed -to RM. - -If FILE is a libtool library, all the files associated with it are deleted. -Otherwise, only FILE itself is deleted using RM." - ;; - - *) - func_fatal_help "invalid operation mode \`$mode'" - ;; - esac - - $ECHO - $ECHO "Try \`$progname --help' for more information about other modes." - - exit $? -} - - # Now that we've collected a possible --mode arg, show help if necessary - $opt_help && func_mode_help - - -# func_mode_execute arg... -func_mode_execute () -{ - $opt_debug - # The first argument is the command name. - cmd="$nonopt" - test -z "$cmd" && \ - func_fatal_help "you must specify a COMMAND" - - # Handle -dlopen flags immediately. - for file in $execute_dlfiles; do - test -f "$file" \ - || func_fatal_help "\`$file' is not a file" - - dir= - case $file in - *.la) - # Check to see that this really is a libtool archive. - func_lalib_unsafe_p "$file" \ - || func_fatal_help "\`$lib' is not a valid libtool archive" - - # Read the libtool library. - dlname= - library_names= - func_source "$file" - - # Skip this library if it cannot be dlopened. - if test -z "$dlname"; then - # Warn if it was a shared library. - test -n "$library_names" && \ - func_warning "\`$file' was not linked with \`-export-dynamic'" - continue - fi - - func_dirname "$file" "" "." - dir="$func_dirname_result" - - if test -f "$dir/$objdir/$dlname"; then - dir="$dir/$objdir" - else - if test ! -f "$dir/$dlname"; then - func_fatal_error "cannot find \`$dlname' in \`$dir' or \`$dir/$objdir'" - fi - fi - ;; - - *.lo) - # Just add the directory containing the .lo file. - func_dirname "$file" "" "." - dir="$func_dirname_result" - ;; - - *) - func_warning "\`-dlopen' is ignored for non-libtool libraries and objects" - continue - ;; - esac - - # Get the absolute pathname. - absdir=`cd "$dir" && pwd` - test -n "$absdir" && dir="$absdir" - - # Now add the directory to shlibpath_var. - if eval "test -z \"\$$shlibpath_var\""; then - eval "$shlibpath_var=\"\$dir\"" - else - eval "$shlibpath_var=\"\$dir:\$$shlibpath_var\"" - fi - done - - # This variable tells wrapper scripts just to set shlibpath_var - # rather than running their programs. - libtool_execute_magic="$magic" - - # Check if any of the arguments is a wrapper script. - args= - for file - do - case $file in - -*) ;; - *) - # Do a test to see if this is really a libtool program. - if func_ltwrapper_script_p "$file"; then - func_source "$file" - # Transform arg to wrapped name. - file="$progdir/$program" - elif func_ltwrapper_executable_p "$file"; then - func_ltwrapper_scriptname "$file" - func_source "$func_ltwrapper_scriptname_result" - # Transform arg to wrapped name. - file="$progdir/$program" - fi - ;; - esac - # Quote arguments (to preserve shell metacharacters). - func_quote_for_eval "$file" - args="$args $func_quote_for_eval_result" - done - - if test "X$opt_dry_run" = Xfalse; then - if test -n "$shlibpath_var"; then - # Export the shlibpath_var. - eval "export $shlibpath_var" - fi - - # Restore saved environment variables - for lt_var in LANG LANGUAGE LC_ALL LC_CTYPE LC_COLLATE LC_MESSAGES - do - eval "if test \"\${save_$lt_var+set}\" = set; then - $lt_var=\$save_$lt_var; export $lt_var - else - $lt_unset $lt_var - fi" - done - - # Now prepare to actually exec the command. - exec_cmd="\$cmd$args" - else - # Display what would be done. - if test -n "$shlibpath_var"; then - eval "\$ECHO \"\$shlibpath_var=\$$shlibpath_var\"" - $ECHO "export $shlibpath_var" - fi - $ECHO "$cmd$args" - exit $EXIT_SUCCESS - fi -} - -test "$mode" = execute && func_mode_execute ${1+"$@"} - - -# func_mode_finish arg... -func_mode_finish () -{ - $opt_debug - libdirs="$nonopt" - admincmds= - - if test -n "$finish_cmds$finish_eval" && test -n "$libdirs"; then - for dir - do - libdirs="$libdirs $dir" - done - - for libdir in $libdirs; do - if test -n "$finish_cmds"; then - # Do each command in the finish commands. - func_execute_cmds "$finish_cmds" 'admincmds="$admincmds -'"$cmd"'"' - fi - if test -n "$finish_eval"; then - # Do the single finish_eval. - eval cmds=\"$finish_eval\" - $opt_dry_run || eval "$cmds" || admincmds="$admincmds - $cmds" - fi - done - fi - - # Exit here if they wanted silent mode. - $opt_silent && exit $EXIT_SUCCESS - - $ECHO "X----------------------------------------------------------------------" | $Xsed - $ECHO "Libraries have been installed in:" - for libdir in $libdirs; do - $ECHO " $libdir" - done - $ECHO - $ECHO "If you ever happen to want to link against installed libraries" - $ECHO "in a given directory, LIBDIR, you must either use libtool, and" - $ECHO "specify the full pathname of the library, or use the \`-LLIBDIR'" - $ECHO "flag during linking and do at least one of the following:" - if test -n "$shlibpath_var"; then - $ECHO " - add LIBDIR to the \`$shlibpath_var' environment variable" - $ECHO " during execution" - fi - if test -n "$runpath_var"; then - $ECHO " - add LIBDIR to the \`$runpath_var' environment variable" - $ECHO " during linking" - fi - if test -n "$hardcode_libdir_flag_spec"; then - libdir=LIBDIR - eval flag=\"$hardcode_libdir_flag_spec\" - - $ECHO " - use the \`$flag' linker flag" - fi - if test -n "$admincmds"; then - $ECHO " - have your system administrator run these commands:$admincmds" - fi - if test -f /etc/ld.so.conf; then - $ECHO " - have your system administrator add LIBDIR to \`/etc/ld.so.conf'" - fi - $ECHO - - $ECHO "See any operating system documentation about shared libraries for" - case $host in - solaris2.[6789]|solaris2.1[0-9]) - $ECHO "more information, such as the ld(1), crle(1) and ld.so(8) manual" - $ECHO "pages." - ;; - *) - $ECHO "more information, such as the ld(1) and ld.so(8) manual pages." - ;; - esac - $ECHO "X----------------------------------------------------------------------" | $Xsed - exit $EXIT_SUCCESS -} - -test "$mode" = finish && func_mode_finish ${1+"$@"} - - -# func_mode_install arg... -func_mode_install () -{ - $opt_debug - # There may be an optional sh(1) argument at the beginning of - # install_prog (especially on Windows NT). - if test "$nonopt" = "$SHELL" || test "$nonopt" = /bin/sh || - # Allow the use of GNU shtool's install command. - $ECHO "X$nonopt" | $GREP shtool >/dev/null; then - # Aesthetically quote it. - func_quote_for_eval "$nonopt" - install_prog="$func_quote_for_eval_result " - arg=$1 - shift - else - install_prog= - arg=$nonopt - fi - - # The real first argument should be the name of the installation program. - # Aesthetically quote it. - func_quote_for_eval "$arg" - install_prog="$install_prog$func_quote_for_eval_result" - - # We need to accept at least all the BSD install flags. - dest= - files= - opts= - prev= - install_type= - isdir=no - stripme= - for arg - do - if test -n "$dest"; then - files="$files $dest" - dest=$arg - continue - fi - - case $arg in - -d) isdir=yes ;; - -f) - case " $install_prog " in - *[\\\ /]cp\ *) ;; - *) prev=$arg ;; - esac - ;; - -g | -m | -o) - prev=$arg - ;; - -s) - stripme=" -s" - continue - ;; - -*) - ;; - *) - # If the previous option needed an argument, then skip it. - if test -n "$prev"; then - prev= - else - dest=$arg - continue - fi - ;; - esac - - # Aesthetically quote the argument. - func_quote_for_eval "$arg" - install_prog="$install_prog $func_quote_for_eval_result" - done - - test -z "$install_prog" && \ - func_fatal_help "you must specify an install program" - - test -n "$prev" && \ - func_fatal_help "the \`$prev' option requires an argument" - - if test -z "$files"; then - if test -z "$dest"; then - func_fatal_help "no file or destination specified" - else - func_fatal_help "you must specify a destination" - fi - fi - - # Strip any trailing slash from the destination. - func_stripname '' '/' "$dest" - dest=$func_stripname_result - - # Check to see that the destination is a directory. - test -d "$dest" && isdir=yes - if test "$isdir" = yes; then - destdir="$dest" - destname= - else - func_dirname_and_basename "$dest" "" "." - destdir="$func_dirname_result" - destname="$func_basename_result" - - # Not a directory, so check to see that there is only one file specified. - set dummy $files; shift - test "$#" -gt 1 && \ - func_fatal_help "\`$dest' is not a directory" - fi - case $destdir in - [\\/]* | [A-Za-z]:[\\/]*) ;; - *) - for file in $files; do - case $file in - *.lo) ;; - *) - func_fatal_help "\`$destdir' must be an absolute directory name" - ;; - esac - done - ;; - esac - - # This variable tells wrapper scripts just to set variables rather - # than running their programs. - libtool_install_magic="$magic" - - staticlibs= - future_libdirs= - current_libdirs= - for file in $files; do - - # Do each installation. - case $file in - *.$libext) - # Do the static libraries later. - staticlibs="$staticlibs $file" - ;; - - *.la) - # Check to see that this really is a libtool archive. - func_lalib_unsafe_p "$file" \ - || func_fatal_help "\`$file' is not a valid libtool archive" - - library_names= - old_library= - relink_command= - func_source "$file" - - # Add the libdir to current_libdirs if it is the destination. - if test "X$destdir" = "X$libdir"; then - case "$current_libdirs " in - *" $libdir "*) ;; - *) current_libdirs="$current_libdirs $libdir" ;; - esac - else - # Note the libdir as a future libdir. - case "$future_libdirs " in - *" $libdir "*) ;; - *) future_libdirs="$future_libdirs $libdir" ;; - esac - fi - - func_dirname "$file" "/" "" - dir="$func_dirname_result" - dir="$dir$objdir" - - if test -n "$relink_command"; then - # Determine the prefix the user has applied to our future dir. - inst_prefix_dir=`$ECHO "X$destdir" | $Xsed -e "s%$libdir\$%%"` - - # Don't allow the user to place us outside of our expected - # location b/c this prevents finding dependent libraries that - # are installed to the same prefix. - # At present, this check doesn't affect windows .dll's that - # are installed into $libdir/../bin (currently, that works fine) - # but it's something to keep an eye on. - test "$inst_prefix_dir" = "$destdir" && \ - func_fatal_error "error: cannot install \`$file' to a directory not ending in $libdir" - - if test -n "$inst_prefix_dir"; then - # Stick the inst_prefix_dir data into the link command. - relink_command=`$ECHO "X$relink_command" | $Xsed -e "s%@inst_prefix_dir@%-inst-prefix-dir $inst_prefix_dir%"` - else - relink_command=`$ECHO "X$relink_command" | $Xsed -e "s%@inst_prefix_dir@%%"` - fi - - func_warning "relinking \`$file'" - func_show_eval "$relink_command" \ - 'func_fatal_error "error: relink \`$file'\'' with the above command before installing it"' - fi - - # See the names of the shared library. - set dummy $library_names; shift - if test -n "$1"; then - realname="$1" - shift - - srcname="$realname" - test -n "$relink_command" && srcname="$realname"T - - # Install the shared library and build the symlinks. - func_show_eval "$install_prog $dir/$srcname $destdir/$realname" \ - 'exit $?' - tstripme="$stripme" - case $host_os in - cygwin* | mingw* | pw32* | cegcc*) - case $realname in - *.dll.a) - tstripme="" - ;; - esac - ;; - esac - if test -n "$tstripme" && test -n "$striplib"; then - func_show_eval "$striplib $destdir/$realname" 'exit $?' - fi - - if test "$#" -gt 0; then - # Delete the old symlinks, and create new ones. - # Try `ln -sf' first, because the `ln' binary might depend on - # the symlink we replace! Solaris /bin/ln does not understand -f, - # so we also need to try rm && ln -s. - for linkname - do - test "$linkname" != "$realname" \ - && func_show_eval "(cd $destdir && { $LN_S -f $realname $linkname || { $RM $linkname && $LN_S $realname $linkname; }; })" - done - fi - - # Do each command in the postinstall commands. - lib="$destdir/$realname" - func_execute_cmds "$postinstall_cmds" 'exit $?' - fi - - # Install the pseudo-library for information purposes. - func_basename "$file" - name="$func_basename_result" - instname="$dir/$name"i - func_show_eval "$install_prog $instname $destdir/$name" 'exit $?' - - # Maybe install the static library, too. - test -n "$old_library" && staticlibs="$staticlibs $dir/$old_library" - ;; - - *.lo) - # Install (i.e. copy) a libtool object. - - # Figure out destination file name, if it wasn't already specified. - if test -n "$destname"; then - destfile="$destdir/$destname" - else - func_basename "$file" - destfile="$func_basename_result" - destfile="$destdir/$destfile" - fi - - # Deduce the name of the destination old-style object file. - case $destfile in - *.lo) - func_lo2o "$destfile" - staticdest=$func_lo2o_result - ;; - *.$objext) - staticdest="$destfile" - destfile= - ;; - *) - func_fatal_help "cannot copy a libtool object to \`$destfile'" - ;; - esac - - # Install the libtool object if requested. - test -n "$destfile" && \ - func_show_eval "$install_prog $file $destfile" 'exit $?' - - # Install the old object if enabled. - if test "$build_old_libs" = yes; then - # Deduce the name of the old-style object file. - func_lo2o "$file" - staticobj=$func_lo2o_result - func_show_eval "$install_prog \$staticobj \$staticdest" 'exit $?' - fi - exit $EXIT_SUCCESS - ;; - - *) - # Figure out destination file name, if it wasn't already specified. - if test -n "$destname"; then - destfile="$destdir/$destname" - else - func_basename "$file" - destfile="$func_basename_result" - destfile="$destdir/$destfile" - fi - - # If the file is missing, and there is a .exe on the end, strip it - # because it is most likely a libtool script we actually want to - # install - stripped_ext="" - case $file in - *.exe) - if test ! -f "$file"; then - func_stripname '' '.exe' "$file" - file=$func_stripname_result - stripped_ext=".exe" - fi - ;; - esac - - # Do a test to see if this is really a libtool program. - case $host in - *cygwin* | *mingw*) - if func_ltwrapper_executable_p "$file"; then - func_ltwrapper_scriptname "$file" - wrapper=$func_ltwrapper_scriptname_result - else - func_stripname '' '.exe' "$file" - wrapper=$func_stripname_result - fi - ;; - *) - wrapper=$file - ;; - esac - if func_ltwrapper_script_p "$wrapper"; then - notinst_deplibs= - relink_command= - - func_source "$wrapper" - - # Check the variables that should have been set. - test -z "$generated_by_libtool_version" && \ - func_fatal_error "invalid libtool wrapper script \`$wrapper'" - - finalize=yes - for lib in $notinst_deplibs; do - # Check to see that each library is installed. - libdir= - if test -f "$lib"; then - func_source "$lib" - fi - libfile="$libdir/"`$ECHO "X$lib" | $Xsed -e 's%^.*/%%g'` ### testsuite: skip nested quoting test - if test -n "$libdir" && test ! -f "$libfile"; then - func_warning "\`$lib' has not been installed in \`$libdir'" - finalize=no - fi - done - - relink_command= - func_source "$wrapper" - - outputname= - if test "$fast_install" = no && test -n "$relink_command"; then - $opt_dry_run || { - if test "$finalize" = yes; then - tmpdir=`func_mktempdir` - func_basename "$file$stripped_ext" - file="$func_basename_result" - outputname="$tmpdir/$file" - # Replace the output file specification. - relink_command=`$ECHO "X$relink_command" | $Xsed -e 's%@OUTPUT@%'"$outputname"'%g'` - - $opt_silent || { - func_quote_for_expand "$relink_command" - eval "func_echo $func_quote_for_expand_result" - } - if eval "$relink_command"; then : - else - func_error "error: relink \`$file' with the above command before installing it" - $opt_dry_run || ${RM}r "$tmpdir" - continue - fi - file="$outputname" - else - func_warning "cannot relink \`$file'" - fi - } - else - # Install the binary that we compiled earlier. - file=`$ECHO "X$file$stripped_ext" | $Xsed -e "s%\([^/]*\)$%$objdir/\1%"` - fi - fi - - # remove .exe since cygwin /usr/bin/install will append another - # one anyway - case $install_prog,$host in - */usr/bin/install*,*cygwin*) - case $file:$destfile in - *.exe:*.exe) - # this is ok - ;; - *.exe:*) - destfile=$destfile.exe - ;; - *:*.exe) - func_stripname '' '.exe' "$destfile" - destfile=$func_stripname_result - ;; - esac - ;; - esac - func_show_eval "$install_prog\$stripme \$file \$destfile" 'exit $?' - $opt_dry_run || if test -n "$outputname"; then - ${RM}r "$tmpdir" - fi - ;; - esac - done - - for file in $staticlibs; do - func_basename "$file" - name="$func_basename_result" - - # Set up the ranlib parameters. - oldlib="$destdir/$name" - - func_show_eval "$install_prog \$file \$oldlib" 'exit $?' - - if test -n "$stripme" && test -n "$old_striplib"; then - func_show_eval "$old_striplib $oldlib" 'exit $?' - fi - - # Do each command in the postinstall commands. - func_execute_cmds "$old_postinstall_cmds" 'exit $?' - done - - test -n "$future_libdirs" && \ - func_warning "remember to run \`$progname --finish$future_libdirs'" - - if test -n "$current_libdirs"; then - # Maybe just do a dry run. - $opt_dry_run && current_libdirs=" -n$current_libdirs" - exec_cmd='$SHELL $progpath $preserve_args --finish$current_libdirs' - else - exit $EXIT_SUCCESS - fi -} - -test "$mode" = install && func_mode_install ${1+"$@"} - - -# func_generate_dlsyms outputname originator pic_p -# Extract symbols from dlprefiles and create ${outputname}S.o with -# a dlpreopen symbol table. -func_generate_dlsyms () -{ - $opt_debug - my_outputname="$1" - my_originator="$2" - my_pic_p="${3-no}" - my_prefix=`$ECHO "$my_originator" | sed 's%[^a-zA-Z0-9]%_%g'` - my_dlsyms= - - if test -n "$dlfiles$dlprefiles" || test "$dlself" != no; then - if test -n "$NM" && test -n "$global_symbol_pipe"; then - my_dlsyms="${my_outputname}S.c" - else - func_error "not configured to extract global symbols from dlpreopened files" - fi - fi - - if test -n "$my_dlsyms"; then - case $my_dlsyms in - "") ;; - *.c) - # Discover the nlist of each of the dlfiles. - nlist="$output_objdir/${my_outputname}.nm" - - func_show_eval "$RM $nlist ${nlist}S ${nlist}T" - - # Parse the name list into a source file. - func_verbose "creating $output_objdir/$my_dlsyms" - - $opt_dry_run || $ECHO > "$output_objdir/$my_dlsyms" "\ -/* $my_dlsyms - symbol resolution table for \`$my_outputname' dlsym emulation. */ -/* Generated by $PROGRAM (GNU $PACKAGE$TIMESTAMP) $VERSION */ - -#ifdef __cplusplus -extern \"C\" { -#endif - -/* External symbol declarations for the compiler. */\ -" - - if test "$dlself" = yes; then - func_verbose "generating symbol list for \`$output'" - - $opt_dry_run || echo ': @PROGRAM@ ' > "$nlist" - - # Add our own program objects to the symbol list. - progfiles=`$ECHO "X$objs$old_deplibs" | $SP2NL | $Xsed -e "$lo2o" | $NL2SP` - for progfile in $progfiles; do - func_verbose "extracting global C symbols from \`$progfile'" - $opt_dry_run || eval "$NM $progfile | $global_symbol_pipe >> '$nlist'" - done - - if test -n "$exclude_expsyms"; then - $opt_dry_run || { - eval '$EGREP -v " ($exclude_expsyms)$" "$nlist" > "$nlist"T' - eval '$MV "$nlist"T "$nlist"' - } - fi - - if test -n "$export_symbols_regex"; then - $opt_dry_run || { - eval '$EGREP -e "$export_symbols_regex" "$nlist" > "$nlist"T' - eval '$MV "$nlist"T "$nlist"' - } - fi - - # Prepare the list of exported symbols - if test -z "$export_symbols"; then - export_symbols="$output_objdir/$outputname.exp" - $opt_dry_run || { - $RM $export_symbols - eval "${SED} -n -e '/^: @PROGRAM@ $/d' -e 's/^.* \(.*\)$/\1/p' "'< "$nlist" > "$export_symbols"' - case $host in - *cygwin* | *mingw* | *cegcc* ) - eval "echo EXPORTS "'> "$output_objdir/$outputname.def"' - eval 'cat "$export_symbols" >> "$output_objdir/$outputname.def"' - ;; - esac - } - else - $opt_dry_run || { - eval "${SED} -e 's/\([].[*^$]\)/\\\\\1/g' -e 's/^/ /' -e 's/$/$/'"' < "$export_symbols" > "$output_objdir/$outputname.exp"' - eval '$GREP -f "$output_objdir/$outputname.exp" < "$nlist" > "$nlist"T' - eval '$MV "$nlist"T "$nlist"' - case $host in - *cygwin | *mingw* | *cegcc* ) - eval "echo EXPORTS "'> "$output_objdir/$outputname.def"' - eval 'cat "$nlist" >> "$output_objdir/$outputname.def"' - ;; - esac - } - fi - fi - - for dlprefile in $dlprefiles; do - func_verbose "extracting global C symbols from \`$dlprefile'" - func_basename "$dlprefile" - name="$func_basename_result" - $opt_dry_run || { - eval '$ECHO ": $name " >> "$nlist"' - eval "$NM $dlprefile 2>/dev/null | $global_symbol_pipe >> '$nlist'" - } - done - - $opt_dry_run || { - # Make sure we have at least an empty file. - test -f "$nlist" || : > "$nlist" - - if test -n "$exclude_expsyms"; then - $EGREP -v " ($exclude_expsyms)$" "$nlist" > "$nlist"T - $MV "$nlist"T "$nlist" - fi - - # Try sorting and uniquifying the output. - if $GREP -v "^: " < "$nlist" | - if sort -k 3 /dev/null 2>&1; then - sort -k 3 - else - sort +2 - fi | - uniq > "$nlist"S; then - : - else - $GREP -v "^: " < "$nlist" > "$nlist"S - fi - - if test -f "$nlist"S; then - eval "$global_symbol_to_cdecl"' < "$nlist"S >> "$output_objdir/$my_dlsyms"' - else - $ECHO '/* NONE */' >> "$output_objdir/$my_dlsyms" - fi - - $ECHO >> "$output_objdir/$my_dlsyms" "\ - -/* The mapping between symbol names and symbols. */ -typedef struct { - const char *name; - void *address; -} lt_dlsymlist; -" - case $host in - *cygwin* | *mingw* | *cegcc* ) - $ECHO >> "$output_objdir/$my_dlsyms" "\ -/* DATA imports from DLLs on WIN32 con't be const, because - runtime relocations are performed -- see ld's documentation - on pseudo-relocs. */" - lt_dlsym_const= ;; - *osf5*) - echo >> "$output_objdir/$my_dlsyms" "\ -/* This system does not cope well with relocations in const data */" - lt_dlsym_const= ;; - *) - lt_dlsym_const=const ;; - esac - - $ECHO >> "$output_objdir/$my_dlsyms" "\ -extern $lt_dlsym_const lt_dlsymlist -lt_${my_prefix}_LTX_preloaded_symbols[]; -$lt_dlsym_const lt_dlsymlist -lt_${my_prefix}_LTX_preloaded_symbols[] = -{\ - { \"$my_originator\", (void *) 0 }," - - case $need_lib_prefix in - no) - eval "$global_symbol_to_c_name_address" < "$nlist" >> "$output_objdir/$my_dlsyms" - ;; - *) - eval "$global_symbol_to_c_name_address_lib_prefix" < "$nlist" >> "$output_objdir/$my_dlsyms" - ;; - esac - $ECHO >> "$output_objdir/$my_dlsyms" "\ - {0, (void *) 0} -}; - -/* This works around a problem in FreeBSD linker */ -#ifdef FREEBSD_WORKAROUND -static const void *lt_preloaded_setup() { - return lt_${my_prefix}_LTX_preloaded_symbols; -} -#endif - -#ifdef __cplusplus -} -#endif\ -" - } # !$opt_dry_run - - pic_flag_for_symtable= - case "$compile_command " in - *" -static "*) ;; - *) - case $host in - # compiling the symbol table file with pic_flag works around - # a FreeBSD bug that causes programs to crash when -lm is - # linked before any other PIC object. But we must not use - # pic_flag when linking with -static. The problem exists in - # FreeBSD 2.2.6 and is fixed in FreeBSD 3.1. - *-*-freebsd2*|*-*-freebsd3.0*|*-*-freebsdelf3.0*) - pic_flag_for_symtable=" $pic_flag -DFREEBSD_WORKAROUND" ;; - *-*-hpux*) - pic_flag_for_symtable=" $pic_flag" ;; - *) - if test "X$my_pic_p" != Xno; then - pic_flag_for_symtable=" $pic_flag" - fi - ;; - esac - ;; - esac - symtab_cflags= - for arg in $LTCFLAGS; do - case $arg in - -pie | -fpie | -fPIE) ;; - *) symtab_cflags="$symtab_cflags $arg" ;; - esac - done - - # Now compile the dynamic symbol file. - func_show_eval '(cd $output_objdir && $LTCC$symtab_cflags -c$no_builtin_flag$pic_flag_for_symtable "$my_dlsyms")' 'exit $?' - - # Clean up the generated files. - func_show_eval '$RM "$output_objdir/$my_dlsyms" "$nlist" "${nlist}S" "${nlist}T"' - - # Transform the symbol file into the correct name. - symfileobj="$output_objdir/${my_outputname}S.$objext" - case $host in - *cygwin* | *mingw* | *cegcc* ) - if test -f "$output_objdir/$my_outputname.def"; then - compile_command=`$ECHO "X$compile_command" | $Xsed -e "s%@SYMFILE@%$output_objdir/$my_outputname.def $symfileobj%"` - finalize_command=`$ECHO "X$finalize_command" | $Xsed -e "s%@SYMFILE@%$output_objdir/$my_outputname.def $symfileobj%"` - else - compile_command=`$ECHO "X$compile_command" | $Xsed -e "s%@SYMFILE@%$symfileobj%"` - finalize_command=`$ECHO "X$finalize_command" | $Xsed -e "s%@SYMFILE@%$symfileobj%"` - fi - ;; - *) - compile_command=`$ECHO "X$compile_command" | $Xsed -e "s%@SYMFILE@%$symfileobj%"` - finalize_command=`$ECHO "X$finalize_command" | $Xsed -e "s%@SYMFILE@%$symfileobj%"` - ;; - esac - ;; - *) - func_fatal_error "unknown suffix for \`$my_dlsyms'" - ;; - esac - else - # We keep going just in case the user didn't refer to - # lt_preloaded_symbols. The linker will fail if global_symbol_pipe - # really was required. - - # Nullify the symbol file. - compile_command=`$ECHO "X$compile_command" | $Xsed -e "s% @SYMFILE@%%"` - finalize_command=`$ECHO "X$finalize_command" | $Xsed -e "s% @SYMFILE@%%"` - fi -} - -# func_win32_libid arg -# return the library type of file 'arg' -# -# Need a lot of goo to handle *both* DLLs and import libs -# Has to be a shell function in order to 'eat' the argument -# that is supplied when $file_magic_command is called. -func_win32_libid () -{ - $opt_debug - win32_libid_type="unknown" - win32_fileres=`file -L $1 2>/dev/null` - case $win32_fileres in - *ar\ archive\ import\ library*) # definitely import - win32_libid_type="x86 archive import" - ;; - *ar\ archive*) # could be an import, or static - if eval $OBJDUMP -f $1 | $SED -e '10q' 2>/dev/null | - $EGREP 'file format pe-i386(.*architecture: i386)?' >/dev/null ; then - win32_nmres=`eval $NM -f posix -A $1 | - $SED -n -e ' - 1,100{ - / I /{ - s,.*,import, - p - q - } - }'` - case $win32_nmres in - import*) win32_libid_type="x86 archive import";; - *) win32_libid_type="x86 archive static";; - esac - fi - ;; - *DLL*) - win32_libid_type="x86 DLL" - ;; - *executable*) # but shell scripts are "executable" too... - case $win32_fileres in - *MS\ Windows\ PE\ Intel*) - win32_libid_type="x86 DLL" - ;; - esac - ;; - esac - $ECHO "$win32_libid_type" -} - - - -# func_extract_an_archive dir oldlib -func_extract_an_archive () -{ - $opt_debug - f_ex_an_ar_dir="$1"; shift - f_ex_an_ar_oldlib="$1" - func_show_eval "(cd \$f_ex_an_ar_dir && $AR x \"\$f_ex_an_ar_oldlib\")" 'exit $?' - if ($AR t "$f_ex_an_ar_oldlib" | sort | sort -uc >/dev/null 2>&1); then - : - else - func_fatal_error "object name conflicts in archive: $f_ex_an_ar_dir/$f_ex_an_ar_oldlib" - fi -} - - -# func_extract_archives gentop oldlib ... -func_extract_archives () -{ - $opt_debug - my_gentop="$1"; shift - my_oldlibs=${1+"$@"} - my_oldobjs="" - my_xlib="" - my_xabs="" - my_xdir="" - - for my_xlib in $my_oldlibs; do - # Extract the objects. - case $my_xlib in - [\\/]* | [A-Za-z]:[\\/]*) my_xabs="$my_xlib" ;; - *) my_xabs=`pwd`"/$my_xlib" ;; - esac - func_basename "$my_xlib" - my_xlib="$func_basename_result" - my_xlib_u=$my_xlib - while :; do - case " $extracted_archives " in - *" $my_xlib_u "*) - func_arith $extracted_serial + 1 - extracted_serial=$func_arith_result - my_xlib_u=lt$extracted_serial-$my_xlib ;; - *) break ;; - esac - done - extracted_archives="$extracted_archives $my_xlib_u" - my_xdir="$my_gentop/$my_xlib_u" - - func_mkdir_p "$my_xdir" - - case $host in - *-darwin*) - func_verbose "Extracting $my_xabs" - # Do not bother doing anything if just a dry run - $opt_dry_run || { - darwin_orig_dir=`pwd` - cd $my_xdir || exit $? - darwin_archive=$my_xabs - darwin_curdir=`pwd` - darwin_base_archive=`basename "$darwin_archive"` - darwin_arches=`$LIPO -info "$darwin_archive" 2>/dev/null | $GREP Architectures 2>/dev/null || true` - if test -n "$darwin_arches"; then - darwin_arches=`$ECHO "$darwin_arches" | $SED -e 's/.*are://'` - darwin_arch= - func_verbose "$darwin_base_archive has multiple architectures $darwin_arches" - for darwin_arch in $darwin_arches ; do - func_mkdir_p "unfat-$$/${darwin_base_archive}-${darwin_arch}" - $LIPO -thin $darwin_arch -output "unfat-$$/${darwin_base_archive}-${darwin_arch}/${darwin_base_archive}" "${darwin_archive}" - cd "unfat-$$/${darwin_base_archive}-${darwin_arch}" - func_extract_an_archive "`pwd`" "${darwin_base_archive}" - cd "$darwin_curdir" - $RM "unfat-$$/${darwin_base_archive}-${darwin_arch}/${darwin_base_archive}" - done # $darwin_arches - ## Okay now we've a bunch of thin objects, gotta fatten them up :) - darwin_filelist=`find unfat-$$ -type f -name \*.o -print -o -name \*.lo -print | $SED -e "$basename" | sort -u` - darwin_file= - darwin_files= - for darwin_file in $darwin_filelist; do - darwin_files=`find unfat-$$ -name $darwin_file -print | $NL2SP` - $LIPO -create -output "$darwin_file" $darwin_files - done # $darwin_filelist - $RM -rf unfat-$$ - cd "$darwin_orig_dir" - else - cd $darwin_orig_dir - func_extract_an_archive "$my_xdir" "$my_xabs" - fi # $darwin_arches - } # !$opt_dry_run - ;; - *) - func_extract_an_archive "$my_xdir" "$my_xabs" - ;; - esac - my_oldobjs="$my_oldobjs "`find $my_xdir -name \*.$objext -print -o -name \*.lo -print | $NL2SP` - done - - func_extract_archives_result="$my_oldobjs" -} - - - -# func_emit_wrapper_part1 [arg=no] -# -# Emit the first part of a libtool wrapper script on stdout. -# For more information, see the description associated with -# func_emit_wrapper(), below. -func_emit_wrapper_part1 () -{ - func_emit_wrapper_part1_arg1=no - if test -n "$1" ; then - func_emit_wrapper_part1_arg1=$1 - fi - - $ECHO "\ -#! $SHELL - -# $output - temporary wrapper script for $objdir/$outputname -# Generated by $PROGRAM (GNU $PACKAGE$TIMESTAMP) $VERSION -# -# The $output program cannot be directly executed until all the libtool -# libraries that it depends on are installed. -# -# This wrapper script should never be moved out of the build directory. -# If it is, it will not operate correctly. - -# Sed substitution that helps us do robust quoting. It backslashifies -# metacharacters that are still active within double-quoted strings. -Xsed='${SED} -e 1s/^X//' -sed_quote_subst='$sed_quote_subst' - -# Be Bourne compatible -if test -n \"\${ZSH_VERSION+set}\" && (emulate sh) >/dev/null 2>&1; then - emulate sh - NULLCMD=: - # Zsh 3.x and 4.x performs word splitting on \${1+\"\$@\"}, which - # is contrary to our usage. Disable this feature. - alias -g '\${1+\"\$@\"}'='\"\$@\"' - setopt NO_GLOB_SUBST -else - case \`(set -o) 2>/dev/null\` in *posix*) set -o posix;; esac -fi -BIN_SH=xpg4; export BIN_SH # for Tru64 -DUALCASE=1; export DUALCASE # for MKS sh - -# The HP-UX ksh and POSIX shell print the target directory to stdout -# if CDPATH is set. -(unset CDPATH) >/dev/null 2>&1 && unset CDPATH - -relink_command=\"$relink_command\" - -# This environment variable determines our operation mode. -if test \"\$libtool_install_magic\" = \"$magic\"; then - # install mode needs the following variables: - generated_by_libtool_version='$macro_version' - notinst_deplibs='$notinst_deplibs' -else - # When we are sourced in execute mode, \$file and \$ECHO are already set. - if test \"\$libtool_execute_magic\" != \"$magic\"; then - ECHO=\"$qecho\" - file=\"\$0\" - # Make sure echo works. - if test \"X\$1\" = X--no-reexec; then - # Discard the --no-reexec flag, and continue. - shift - elif test \"X\`{ \$ECHO '\t'; } 2>/dev/null\`\" = 'X\t'; then - # Yippee, \$ECHO works! - : - else - # Restart under the correct shell, and then maybe \$ECHO will work. - exec $SHELL \"\$0\" --no-reexec \${1+\"\$@\"} - fi - fi\ -" - $ECHO "\ - - # Find the directory that this script lives in. - thisdir=\`\$ECHO \"X\$file\" | \$Xsed -e 's%/[^/]*$%%'\` - test \"x\$thisdir\" = \"x\$file\" && thisdir=. - - # Follow symbolic links until we get to the real thisdir. - file=\`ls -ld \"\$file\" | ${SED} -n 's/.*-> //p'\` - while test -n \"\$file\"; do - destdir=\`\$ECHO \"X\$file\" | \$Xsed -e 's%/[^/]*\$%%'\` - - # If there was a directory component, then change thisdir. - if test \"x\$destdir\" != \"x\$file\"; then - case \"\$destdir\" in - [\\\\/]* | [A-Za-z]:[\\\\/]*) thisdir=\"\$destdir\" ;; - *) thisdir=\"\$thisdir/\$destdir\" ;; - esac - fi - - file=\`\$ECHO \"X\$file\" | \$Xsed -e 's%^.*/%%'\` - file=\`ls -ld \"\$thisdir/\$file\" | ${SED} -n 's/.*-> //p'\` - done -" -} -# end: func_emit_wrapper_part1 - -# func_emit_wrapper_part2 [arg=no] -# -# Emit the second part of a libtool wrapper script on stdout. -# For more information, see the description associated with -# func_emit_wrapper(), below. -func_emit_wrapper_part2 () -{ - func_emit_wrapper_part2_arg1=no - if test -n "$1" ; then - func_emit_wrapper_part2_arg1=$1 - fi - - $ECHO "\ - - # Usually 'no', except on cygwin/mingw when embedded into - # the cwrapper. - WRAPPER_SCRIPT_BELONGS_IN_OBJDIR=$func_emit_wrapper_part2_arg1 - if test \"\$WRAPPER_SCRIPT_BELONGS_IN_OBJDIR\" = \"yes\"; then - # special case for '.' - if test \"\$thisdir\" = \".\"; then - thisdir=\`pwd\` - fi - # remove .libs from thisdir - case \"\$thisdir\" in - *[\\\\/]$objdir ) thisdir=\`\$ECHO \"X\$thisdir\" | \$Xsed -e 's%[\\\\/][^\\\\/]*$%%'\` ;; - $objdir ) thisdir=. ;; - esac - fi - - # Try to get the absolute directory name. - absdir=\`cd \"\$thisdir\" && pwd\` - test -n \"\$absdir\" && thisdir=\"\$absdir\" -" - - if test "$fast_install" = yes; then - $ECHO "\ - program=lt-'$outputname'$exeext - progdir=\"\$thisdir/$objdir\" - - if test ! -f \"\$progdir/\$program\" || - { file=\`ls -1dt \"\$progdir/\$program\" \"\$progdir/../\$program\" 2>/dev/null | ${SED} 1q\`; \\ - test \"X\$file\" != \"X\$progdir/\$program\"; }; then - - file=\"\$\$-\$program\" - - if test ! -d \"\$progdir\"; then - $MKDIR \"\$progdir\" - else - $RM \"\$progdir/\$file\" - fi" - - $ECHO "\ - - # relink executable if necessary - if test -n \"\$relink_command\"; then - if relink_command_output=\`eval \$relink_command 2>&1\`; then : - else - $ECHO \"\$relink_command_output\" >&2 - $RM \"\$progdir/\$file\" - exit 1 - fi - fi - - $MV \"\$progdir/\$file\" \"\$progdir/\$program\" 2>/dev/null || - { $RM \"\$progdir/\$program\"; - $MV \"\$progdir/\$file\" \"\$progdir/\$program\"; } - $RM \"\$progdir/\$file\" - fi" - else - $ECHO "\ - program='$outputname' - progdir=\"\$thisdir/$objdir\" -" - fi - - $ECHO "\ - - if test -f \"\$progdir/\$program\"; then" - - # Export our shlibpath_var if we have one. - if test "$shlibpath_overrides_runpath" = yes && test -n "$shlibpath_var" && test -n "$temp_rpath"; then - $ECHO "\ - # Add our own library path to $shlibpath_var - $shlibpath_var=\"$temp_rpath\$$shlibpath_var\" - - # Some systems cannot cope with colon-terminated $shlibpath_var - # The second colon is a workaround for a bug in BeOS R4 sed - $shlibpath_var=\`\$ECHO \"X\$$shlibpath_var\" | \$Xsed -e 's/::*\$//'\` - - export $shlibpath_var -" - fi - - # fixup the dll searchpath if we need to. - if test -n "$dllsearchpath"; then - $ECHO "\ - # Add the dll search path components to the executable PATH - PATH=$dllsearchpath:\$PATH -" - fi - - $ECHO "\ - if test \"\$libtool_execute_magic\" != \"$magic\"; then - # Run the actual program with our arguments. -" - case $host in - # Backslashes separate directories on plain windows - *-*-mingw | *-*-os2* | *-cegcc*) - $ECHO "\ - exec \"\$progdir\\\\\$program\" \${1+\"\$@\"} -" - ;; - - *) - $ECHO "\ - exec \"\$progdir/\$program\" \${1+\"\$@\"} -" - ;; - esac - $ECHO "\ - \$ECHO \"\$0: cannot exec \$program \$*\" 1>&2 - exit 1 - fi - else - # The program doesn't exist. - \$ECHO \"\$0: error: \\\`\$progdir/\$program' does not exist\" 1>&2 - \$ECHO \"This script is just a wrapper for \$program.\" 1>&2 - $ECHO \"See the $PACKAGE documentation for more information.\" 1>&2 - exit 1 - fi -fi\ -" -} -# end: func_emit_wrapper_part2 - - -# func_emit_wrapper [arg=no] -# -# Emit a libtool wrapper script on stdout. -# Don't directly open a file because we may want to -# incorporate the script contents within a cygwin/mingw -# wrapper executable. Must ONLY be called from within -# func_mode_link because it depends on a number of variables -# set therein. -# -# ARG is the value that the WRAPPER_SCRIPT_BELONGS_IN_OBJDIR -# variable will take. If 'yes', then the emitted script -# will assume that the directory in which it is stored is -# the $objdir directory. This is a cygwin/mingw-specific -# behavior. -func_emit_wrapper () -{ - func_emit_wrapper_arg1=no - if test -n "$1" ; then - func_emit_wrapper_arg1=$1 - fi - - # split this up so that func_emit_cwrapperexe_src - # can call each part independently. - func_emit_wrapper_part1 "${func_emit_wrapper_arg1}" - func_emit_wrapper_part2 "${func_emit_wrapper_arg1}" -} - - -# func_to_host_path arg -# -# Convert paths to host format when used with build tools. -# Intended for use with "native" mingw (where libtool itself -# is running under the msys shell), or in the following cross- -# build environments: -# $build $host -# mingw (msys) mingw [e.g. native] -# cygwin mingw -# *nix + wine mingw -# where wine is equipped with the `winepath' executable. -# In the native mingw case, the (msys) shell automatically -# converts paths for any non-msys applications it launches, -# but that facility isn't available from inside the cwrapper. -# Similar accommodations are necessary for $host mingw and -# $build cygwin. Calling this function does no harm for other -# $host/$build combinations not listed above. -# -# ARG is the path (on $build) that should be converted to -# the proper representation for $host. The result is stored -# in $func_to_host_path_result. -func_to_host_path () -{ - func_to_host_path_result="$1" - if test -n "$1" ; then - case $host in - *mingw* ) - lt_sed_naive_backslashify='s|\\\\*|\\|g;s|/|\\|g;s|\\|\\\\|g' - case $build in - *mingw* ) # actually, msys - # awkward: cmd appends spaces to result - lt_sed_strip_trailing_spaces="s/[ ]*\$//" - func_to_host_path_tmp1=`( cmd //c echo "$1" |\ - $SED -e "$lt_sed_strip_trailing_spaces" ) 2>/dev/null || echo ""` - func_to_host_path_result=`echo "$func_to_host_path_tmp1" |\ - $SED -e "$lt_sed_naive_backslashify"` - ;; - *cygwin* ) - func_to_host_path_tmp1=`cygpath -w "$1"` - func_to_host_path_result=`echo "$func_to_host_path_tmp1" |\ - $SED -e "$lt_sed_naive_backslashify"` - ;; - * ) - # Unfortunately, winepath does not exit with a non-zero - # error code, so we are forced to check the contents of - # stdout. On the other hand, if the command is not - # found, the shell will set an exit code of 127 and print - # *an error message* to stdout. So we must check for both - # error code of zero AND non-empty stdout, which explains - # the odd construction: - func_to_host_path_tmp1=`winepath -w "$1" 2>/dev/null` - if test "$?" -eq 0 && test -n "${func_to_host_path_tmp1}"; then - func_to_host_path_result=`echo "$func_to_host_path_tmp1" |\ - $SED -e "$lt_sed_naive_backslashify"` - else - # Allow warning below. - func_to_host_path_result="" - fi - ;; - esac - if test -z "$func_to_host_path_result" ; then - func_error "Could not determine host path corresponding to" - func_error " '$1'" - func_error "Continuing, but uninstalled executables may not work." - # Fallback: - func_to_host_path_result="$1" - fi - ;; - esac - fi -} -# end: func_to_host_path - -# func_to_host_pathlist arg -# -# Convert pathlists to host format when used with build tools. -# See func_to_host_path(), above. This function supports the -# following $build/$host combinations (but does no harm for -# combinations not listed here): -# $build $host -# mingw (msys) mingw [e.g. native] -# cygwin mingw -# *nix + wine mingw -# -# Path separators are also converted from $build format to -# $host format. If ARG begins or ends with a path separator -# character, it is preserved (but converted to $host format) -# on output. -# -# ARG is a pathlist (on $build) that should be converted to -# the proper representation on $host. The result is stored -# in $func_to_host_pathlist_result. -func_to_host_pathlist () -{ - func_to_host_pathlist_result="$1" - if test -n "$1" ; then - case $host in - *mingw* ) - lt_sed_naive_backslashify='s|\\\\*|\\|g;s|/|\\|g;s|\\|\\\\|g' - # Remove leading and trailing path separator characters from - # ARG. msys behavior is inconsistent here, cygpath turns them - # into '.;' and ';.', and winepath ignores them completely. - func_to_host_pathlist_tmp2="$1" - # Once set for this call, this variable should not be - # reassigned. It is used in tha fallback case. - func_to_host_pathlist_tmp1=`echo "$func_to_host_pathlist_tmp2" |\ - $SED -e 's|^:*||' -e 's|:*$||'` - case $build in - *mingw* ) # Actually, msys. - # Awkward: cmd appends spaces to result. - lt_sed_strip_trailing_spaces="s/[ ]*\$//" - func_to_host_pathlist_tmp2=`( cmd //c echo "$func_to_host_pathlist_tmp1" |\ - $SED -e "$lt_sed_strip_trailing_spaces" ) 2>/dev/null || echo ""` - func_to_host_pathlist_result=`echo "$func_to_host_pathlist_tmp2" |\ - $SED -e "$lt_sed_naive_backslashify"` - ;; - *cygwin* ) - func_to_host_pathlist_tmp2=`cygpath -w -p "$func_to_host_pathlist_tmp1"` - func_to_host_pathlist_result=`echo "$func_to_host_pathlist_tmp2" |\ - $SED -e "$lt_sed_naive_backslashify"` - ;; - * ) - # unfortunately, winepath doesn't convert pathlists - func_to_host_pathlist_result="" - func_to_host_pathlist_oldIFS=$IFS - IFS=: - for func_to_host_pathlist_f in $func_to_host_pathlist_tmp1 ; do - IFS=$func_to_host_pathlist_oldIFS - if test -n "$func_to_host_pathlist_f" ; then - func_to_host_path "$func_to_host_pathlist_f" - if test -n "$func_to_host_path_result" ; then - if test -z "$func_to_host_pathlist_result" ; then - func_to_host_pathlist_result="$func_to_host_path_result" - else - func_to_host_pathlist_result="$func_to_host_pathlist_result;$func_to_host_path_result" - fi - fi - fi - IFS=: - done - IFS=$func_to_host_pathlist_oldIFS - ;; - esac - if test -z "$func_to_host_pathlist_result" ; then - func_error "Could not determine the host path(s) corresponding to" - func_error " '$1'" - func_error "Continuing, but uninstalled executables may not work." - # Fallback. This may break if $1 contains DOS-style drive - # specifications. The fix is not to complicate the expression - # below, but for the user to provide a working wine installation - # with winepath so that path translation in the cross-to-mingw - # case works properly. - lt_replace_pathsep_nix_to_dos="s|:|;|g" - func_to_host_pathlist_result=`echo "$func_to_host_pathlist_tmp1" |\ - $SED -e "$lt_replace_pathsep_nix_to_dos"` - fi - # Now, add the leading and trailing path separators back - case "$1" in - :* ) func_to_host_pathlist_result=";$func_to_host_pathlist_result" - ;; - esac - case "$1" in - *: ) func_to_host_pathlist_result="$func_to_host_pathlist_result;" - ;; - esac - ;; - esac - fi -} -# end: func_to_host_pathlist - -# func_emit_cwrapperexe_src -# emit the source code for a wrapper executable on stdout -# Must ONLY be called from within func_mode_link because -# it depends on a number of variable set therein. -func_emit_cwrapperexe_src () -{ - cat < -#include -#ifdef _MSC_VER -# include -# include -# include -# define setmode _setmode -#else -# include -# include -# ifdef __CYGWIN__ -# include -# define HAVE_SETENV -# ifdef __STRICT_ANSI__ -char *realpath (const char *, char *); -int putenv (char *); -int setenv (const char *, const char *, int); -# endif -# endif -#endif -#include -#include -#include -#include -#include -#include -#include -#include - -#if defined(PATH_MAX) -# define LT_PATHMAX PATH_MAX -#elif defined(MAXPATHLEN) -# define LT_PATHMAX MAXPATHLEN -#else -# define LT_PATHMAX 1024 -#endif - -#ifndef S_IXOTH -# define S_IXOTH 0 -#endif -#ifndef S_IXGRP -# define S_IXGRP 0 -#endif - -#ifdef _MSC_VER -# define S_IXUSR _S_IEXEC -# define stat _stat -# ifndef _INTPTR_T_DEFINED -# define intptr_t int -# endif -#endif - -#ifndef DIR_SEPARATOR -# define DIR_SEPARATOR '/' -# define PATH_SEPARATOR ':' -#endif - -#if defined (_WIN32) || defined (__MSDOS__) || defined (__DJGPP__) || \ - defined (__OS2__) -# define HAVE_DOS_BASED_FILE_SYSTEM -# define FOPEN_WB "wb" -# ifndef DIR_SEPARATOR_2 -# define DIR_SEPARATOR_2 '\\' -# endif -# ifndef PATH_SEPARATOR_2 -# define PATH_SEPARATOR_2 ';' -# endif -#endif - -#ifndef DIR_SEPARATOR_2 -# define IS_DIR_SEPARATOR(ch) ((ch) == DIR_SEPARATOR) -#else /* DIR_SEPARATOR_2 */ -# define IS_DIR_SEPARATOR(ch) \ - (((ch) == DIR_SEPARATOR) || ((ch) == DIR_SEPARATOR_2)) -#endif /* DIR_SEPARATOR_2 */ - -#ifndef PATH_SEPARATOR_2 -# define IS_PATH_SEPARATOR(ch) ((ch) == PATH_SEPARATOR) -#else /* PATH_SEPARATOR_2 */ -# define IS_PATH_SEPARATOR(ch) ((ch) == PATH_SEPARATOR_2) -#endif /* PATH_SEPARATOR_2 */ - -#ifdef __CYGWIN__ -# define FOPEN_WB "wb" -#endif - -#ifndef FOPEN_WB -# define FOPEN_WB "w" -#endif -#ifndef _O_BINARY -# define _O_BINARY 0 -#endif - -#define XMALLOC(type, num) ((type *) xmalloc ((num) * sizeof(type))) -#define XFREE(stale) do { \ - if (stale) { free ((void *) stale); stale = 0; } \ -} while (0) - -#undef LTWRAPPER_DEBUGPRINTF -#if defined DEBUGWRAPPER -# define LTWRAPPER_DEBUGPRINTF(args) ltwrapper_debugprintf args -static void -ltwrapper_debugprintf (const char *fmt, ...) -{ - va_list args; - va_start (args, fmt); - (void) vfprintf (stderr, fmt, args); - va_end (args); -} -#else -# define LTWRAPPER_DEBUGPRINTF(args) -#endif - -const char *program_name = NULL; - -void *xmalloc (size_t num); -char *xstrdup (const char *string); -const char *base_name (const char *name); -char *find_executable (const char *wrapper); -char *chase_symlinks (const char *pathspec); -int make_executable (const char *path); -int check_executable (const char *path); -char *strendzap (char *str, const char *pat); -void lt_fatal (const char *message, ...); -void lt_setenv (const char *name, const char *value); -char *lt_extend_str (const char *orig_value, const char *add, int to_end); -void lt_opt_process_env_set (const char *arg); -void lt_opt_process_env_prepend (const char *arg); -void lt_opt_process_env_append (const char *arg); -int lt_split_name_value (const char *arg, char** name, char** value); -void lt_update_exe_path (const char *name, const char *value); -void lt_update_lib_path (const char *name, const char *value); - -static const char *script_text_part1 = -EOF - - func_emit_wrapper_part1 yes | - $SED -e 's/\([\\"]\)/\\\1/g' \ - -e 's/^/ "/' -e 's/$/\\n"/' - echo ";" - cat <"))); - for (i = 0; i < newargc; i++) - { - LTWRAPPER_DEBUGPRINTF (("(main) newargz[%d] : %s\n", i, (newargz[i] ? newargz[i] : ""))); - } - -EOF - - case $host_os in - mingw*) - cat <<"EOF" - /* execv doesn't actually work on mingw as expected on unix */ - rval = _spawnv (_P_WAIT, lt_argv_zero, (const char * const *) newargz); - if (rval == -1) - { - /* failed to start process */ - LTWRAPPER_DEBUGPRINTF (("(main) failed to launch target \"%s\": errno = %d\n", lt_argv_zero, errno)); - return 127; - } - return rval; -EOF - ;; - *) - cat <<"EOF" - execv (lt_argv_zero, newargz); - return rval; /* =127, but avoids unused variable warning */ -EOF - ;; - esac - - cat <<"EOF" -} - -void * -xmalloc (size_t num) -{ - void *p = (void *) malloc (num); - if (!p) - lt_fatal ("Memory exhausted"); - - return p; -} - -char * -xstrdup (const char *string) -{ - return string ? strcpy ((char *) xmalloc (strlen (string) + 1), - string) : NULL; -} - -const char * -base_name (const char *name) -{ - const char *base; - -#if defined (HAVE_DOS_BASED_FILE_SYSTEM) - /* Skip over the disk name in MSDOS pathnames. */ - if (isalpha ((unsigned char) name[0]) && name[1] == ':') - name += 2; -#endif - - for (base = name; *name; name++) - if (IS_DIR_SEPARATOR (*name)) - base = name + 1; - return base; -} - -int -check_executable (const char *path) -{ - struct stat st; - - LTWRAPPER_DEBUGPRINTF (("(check_executable) : %s\n", - path ? (*path ? path : "EMPTY!") : "NULL!")); - if ((!path) || (!*path)) - return 0; - - if ((stat (path, &st) >= 0) - && (st.st_mode & (S_IXUSR | S_IXGRP | S_IXOTH))) - return 1; - else - return 0; -} - -int -make_executable (const char *path) -{ - int rval = 0; - struct stat st; - - LTWRAPPER_DEBUGPRINTF (("(make_executable) : %s\n", - path ? (*path ? path : "EMPTY!") : "NULL!")); - if ((!path) || (!*path)) - return 0; - - if (stat (path, &st) >= 0) - { - rval = chmod (path, st.st_mode | S_IXOTH | S_IXGRP | S_IXUSR); - } - return rval; -} - -/* Searches for the full path of the wrapper. Returns - newly allocated full path name if found, NULL otherwise - Does not chase symlinks, even on platforms that support them. -*/ -char * -find_executable (const char *wrapper) -{ - int has_slash = 0; - const char *p; - const char *p_next; - /* static buffer for getcwd */ - char tmp[LT_PATHMAX + 1]; - int tmp_len; - char *concat_name; - - LTWRAPPER_DEBUGPRINTF (("(find_executable) : %s\n", - wrapper ? (*wrapper ? wrapper : "EMPTY!") : "NULL!")); - - if ((wrapper == NULL) || (*wrapper == '\0')) - return NULL; - - /* Absolute path? */ -#if defined (HAVE_DOS_BASED_FILE_SYSTEM) - if (isalpha ((unsigned char) wrapper[0]) && wrapper[1] == ':') - { - concat_name = xstrdup (wrapper); - if (check_executable (concat_name)) - return concat_name; - XFREE (concat_name); - } - else - { -#endif - if (IS_DIR_SEPARATOR (wrapper[0])) - { - concat_name = xstrdup (wrapper); - if (check_executable (concat_name)) - return concat_name; - XFREE (concat_name); - } -#if defined (HAVE_DOS_BASED_FILE_SYSTEM) - } -#endif - - for (p = wrapper; *p; p++) - if (*p == '/') - { - has_slash = 1; - break; - } - if (!has_slash) - { - /* no slashes; search PATH */ - const char *path = getenv ("PATH"); - if (path != NULL) - { - for (p = path; *p; p = p_next) - { - const char *q; - size_t p_len; - for (q = p; *q; q++) - if (IS_PATH_SEPARATOR (*q)) - break; - p_len = q - p; - p_next = (*q == '\0' ? q : q + 1); - if (p_len == 0) - { - /* empty path: current directory */ - if (getcwd (tmp, LT_PATHMAX) == NULL) - lt_fatal ("getcwd failed"); - tmp_len = strlen (tmp); - concat_name = - XMALLOC (char, tmp_len + 1 + strlen (wrapper) + 1); - memcpy (concat_name, tmp, tmp_len); - concat_name[tmp_len] = '/'; - strcpy (concat_name + tmp_len + 1, wrapper); - } - else - { - concat_name = - XMALLOC (char, p_len + 1 + strlen (wrapper) + 1); - memcpy (concat_name, p, p_len); - concat_name[p_len] = '/'; - strcpy (concat_name + p_len + 1, wrapper); - } - if (check_executable (concat_name)) - return concat_name; - XFREE (concat_name); - } - } - /* not found in PATH; assume curdir */ - } - /* Relative path | not found in path: prepend cwd */ - if (getcwd (tmp, LT_PATHMAX) == NULL) - lt_fatal ("getcwd failed"); - tmp_len = strlen (tmp); - concat_name = XMALLOC (char, tmp_len + 1 + strlen (wrapper) + 1); - memcpy (concat_name, tmp, tmp_len); - concat_name[tmp_len] = '/'; - strcpy (concat_name + tmp_len + 1, wrapper); - - if (check_executable (concat_name)) - return concat_name; - XFREE (concat_name); - return NULL; -} - -char * -chase_symlinks (const char *pathspec) -{ -#ifndef S_ISLNK - return xstrdup (pathspec); -#else - char buf[LT_PATHMAX]; - struct stat s; - char *tmp_pathspec = xstrdup (pathspec); - char *p; - int has_symlinks = 0; - while (strlen (tmp_pathspec) && !has_symlinks) - { - LTWRAPPER_DEBUGPRINTF (("checking path component for symlinks: %s\n", - tmp_pathspec)); - if (lstat (tmp_pathspec, &s) == 0) - { - if (S_ISLNK (s.st_mode) != 0) - { - has_symlinks = 1; - break; - } - - /* search backwards for last DIR_SEPARATOR */ - p = tmp_pathspec + strlen (tmp_pathspec) - 1; - while ((p > tmp_pathspec) && (!IS_DIR_SEPARATOR (*p))) - p--; - if ((p == tmp_pathspec) && (!IS_DIR_SEPARATOR (*p))) - { - /* no more DIR_SEPARATORS left */ - break; - } - *p = '\0'; - } - else - { - char *errstr = strerror (errno); - lt_fatal ("Error accessing file %s (%s)", tmp_pathspec, errstr); - } - } - XFREE (tmp_pathspec); - - if (!has_symlinks) - { - return xstrdup (pathspec); - } - - tmp_pathspec = realpath (pathspec, buf); - if (tmp_pathspec == 0) - { - lt_fatal ("Could not follow symlinks for %s", pathspec); - } - return xstrdup (tmp_pathspec); -#endif -} - -char * -strendzap (char *str, const char *pat) -{ - size_t len, patlen; - - assert (str != NULL); - assert (pat != NULL); - - len = strlen (str); - patlen = strlen (pat); - - if (patlen <= len) - { - str += len - patlen; - if (strcmp (str, pat) == 0) - *str = '\0'; - } - return str; -} - -static void -lt_error_core (int exit_status, const char *mode, - const char *message, va_list ap) -{ - fprintf (stderr, "%s: %s: ", program_name, mode); - vfprintf (stderr, message, ap); - fprintf (stderr, ".\n"); - - if (exit_status >= 0) - exit (exit_status); -} - -void -lt_fatal (const char *message, ...) -{ - va_list ap; - va_start (ap, message); - lt_error_core (EXIT_FAILURE, "FATAL", message, ap); - va_end (ap); -} - -void -lt_setenv (const char *name, const char *value) -{ - LTWRAPPER_DEBUGPRINTF (("(lt_setenv) setting '%s' to '%s'\n", - (name ? name : ""), - (value ? value : ""))); - { -#ifdef HAVE_SETENV - /* always make a copy, for consistency with !HAVE_SETENV */ - char *str = xstrdup (value); - setenv (name, str, 1); -#else - int len = strlen (name) + 1 + strlen (value) + 1; - char *str = XMALLOC (char, len); - sprintf (str, "%s=%s", name, value); - if (putenv (str) != EXIT_SUCCESS) - { - XFREE (str); - } -#endif - } -} - -char * -lt_extend_str (const char *orig_value, const char *add, int to_end) -{ - char *new_value; - if (orig_value && *orig_value) - { - int orig_value_len = strlen (orig_value); - int add_len = strlen (add); - new_value = XMALLOC (char, add_len + orig_value_len + 1); - if (to_end) - { - strcpy (new_value, orig_value); - strcpy (new_value + orig_value_len, add); - } - else - { - strcpy (new_value, add); - strcpy (new_value + add_len, orig_value); - } - } - else - { - new_value = xstrdup (add); - } - return new_value; -} - -int -lt_split_name_value (const char *arg, char** name, char** value) -{ - const char *p; - int len; - if (!arg || !*arg) - return 1; - - p = strchr (arg, (int)'='); - - if (!p) - return 1; - - *value = xstrdup (++p); - - len = strlen (arg) - strlen (*value); - *name = XMALLOC (char, len); - strncpy (*name, arg, len-1); - (*name)[len - 1] = '\0'; - - return 0; -} - -void -lt_opt_process_env_set (const char *arg) -{ - char *name = NULL; - char *value = NULL; - - if (lt_split_name_value (arg, &name, &value) != 0) - { - XFREE (name); - XFREE (value); - lt_fatal ("bad argument for %s: '%s'", env_set_opt, arg); - } - - lt_setenv (name, value); - XFREE (name); - XFREE (value); -} - -void -lt_opt_process_env_prepend (const char *arg) -{ - char *name = NULL; - char *value = NULL; - char *new_value = NULL; - - if (lt_split_name_value (arg, &name, &value) != 0) - { - XFREE (name); - XFREE (value); - lt_fatal ("bad argument for %s: '%s'", env_prepend_opt, arg); - } - - new_value = lt_extend_str (getenv (name), value, 0); - lt_setenv (name, new_value); - XFREE (new_value); - XFREE (name); - XFREE (value); -} - -void -lt_opt_process_env_append (const char *arg) -{ - char *name = NULL; - char *value = NULL; - char *new_value = NULL; - - if (lt_split_name_value (arg, &name, &value) != 0) - { - XFREE (name); - XFREE (value); - lt_fatal ("bad argument for %s: '%s'", env_append_opt, arg); - } - - new_value = lt_extend_str (getenv (name), value, 1); - lt_setenv (name, new_value); - XFREE (new_value); - XFREE (name); - XFREE (value); -} - -void -lt_update_exe_path (const char *name, const char *value) -{ - LTWRAPPER_DEBUGPRINTF (("(lt_update_exe_path) modifying '%s' by prepending '%s'\n", - (name ? name : ""), - (value ? value : ""))); - - if (name && *name && value && *value) - { - char *new_value = lt_extend_str (getenv (name), value, 0); - /* some systems can't cope with a ':'-terminated path #' */ - int len = strlen (new_value); - while (((len = strlen (new_value)) > 0) && IS_PATH_SEPARATOR (new_value[len-1])) - { - new_value[len-1] = '\0'; - } - lt_setenv (name, new_value); - XFREE (new_value); - } -} - -void -lt_update_lib_path (const char *name, const char *value) -{ - LTWRAPPER_DEBUGPRINTF (("(lt_update_lib_path) modifying '%s' by prepending '%s'\n", - (name ? name : ""), - (value ? value : ""))); - - if (name && *name && value && *value) - { - char *new_value = lt_extend_str (getenv (name), value, 0); - lt_setenv (name, new_value); - XFREE (new_value); - } -} - - -EOF -} -# end: func_emit_cwrapperexe_src - -# func_mode_link arg... -func_mode_link () -{ - $opt_debug - case $host in - *-*-cygwin* | *-*-mingw* | *-*-pw32* | *-*-os2* | *-cegcc*) - # It is impossible to link a dll without this setting, and - # we shouldn't force the makefile maintainer to figure out - # which system we are compiling for in order to pass an extra - # flag for every libtool invocation. - # allow_undefined=no - - # FIXME: Unfortunately, there are problems with the above when trying - # to make a dll which has undefined symbols, in which case not - # even a static library is built. For now, we need to specify - # -no-undefined on the libtool link line when we can be certain - # that all symbols are satisfied, otherwise we get a static library. - allow_undefined=yes - ;; - *) - allow_undefined=yes - ;; - esac - libtool_args=$nonopt - base_compile="$nonopt $@" - compile_command=$nonopt - finalize_command=$nonopt - - compile_rpath= - finalize_rpath= - compile_shlibpath= - finalize_shlibpath= - convenience= - old_convenience= - deplibs= - old_deplibs= - compiler_flags= - linker_flags= - dllsearchpath= - lib_search_path=`pwd` - inst_prefix_dir= - new_inherited_linker_flags= - - avoid_version=no - dlfiles= - dlprefiles= - dlself=no - export_dynamic=no - export_symbols= - export_symbols_regex= - generated= - libobjs= - ltlibs= - module=no - no_install=no - objs= - non_pic_objects= - precious_files_regex= - prefer_static_libs=no - preload=no - prev= - prevarg= - release= - rpath= - xrpath= - perm_rpath= - temp_rpath= - thread_safe=no - vinfo= - vinfo_number=no - weak_libs= - single_module="${wl}-single_module" - func_infer_tag $base_compile - - # We need to know -static, to get the right output filenames. - for arg - do - case $arg in - -shared) - test "$build_libtool_libs" != yes && \ - func_fatal_configuration "can not build a shared library" - build_old_libs=no - break - ;; - -all-static | -static | -static-libtool-libs) - case $arg in - -all-static) - if test "$build_libtool_libs" = yes && test -z "$link_static_flag"; then - func_warning "complete static linking is impossible in this configuration" - fi - if test -n "$link_static_flag"; then - dlopen_self=$dlopen_self_static - fi - prefer_static_libs=yes - ;; - -static) - if test -z "$pic_flag" && test -n "$link_static_flag"; then - dlopen_self=$dlopen_self_static - fi - prefer_static_libs=built - ;; - -static-libtool-libs) - if test -z "$pic_flag" && test -n "$link_static_flag"; then - dlopen_self=$dlopen_self_static - fi - prefer_static_libs=yes - ;; - esac - build_libtool_libs=no - build_old_libs=yes - break - ;; - esac - done - - # See if our shared archives depend on static archives. - test -n "$old_archive_from_new_cmds" && build_old_libs=yes - - # Go through the arguments, transforming them on the way. - while test "$#" -gt 0; do - arg="$1" - shift - func_quote_for_eval "$arg" - qarg=$func_quote_for_eval_unquoted_result - func_append libtool_args " $func_quote_for_eval_result" - - # If the previous option needs an argument, assign it. - if test -n "$prev"; then - case $prev in - output) - func_append compile_command " @OUTPUT@" - func_append finalize_command " @OUTPUT@" - ;; - esac - - case $prev in - dlfiles|dlprefiles) - if test "$preload" = no; then - # Add the symbol object into the linking commands. - func_append compile_command " @SYMFILE@" - func_append finalize_command " @SYMFILE@" - preload=yes - fi - case $arg in - *.la | *.lo) ;; # We handle these cases below. - force) - if test "$dlself" = no; then - dlself=needless - export_dynamic=yes - fi - prev= - continue - ;; - self) - if test "$prev" = dlprefiles; then - dlself=yes - elif test "$prev" = dlfiles && test "$dlopen_self" != yes; then - dlself=yes - else - dlself=needless - export_dynamic=yes - fi - prev= - continue - ;; - *) - if test "$prev" = dlfiles; then - dlfiles="$dlfiles $arg" - else - dlprefiles="$dlprefiles $arg" - fi - prev= - continue - ;; - esac - ;; - expsyms) - export_symbols="$arg" - test -f "$arg" \ - || func_fatal_error "symbol file \`$arg' does not exist" - prev= - continue - ;; - expsyms_regex) - export_symbols_regex="$arg" - prev= - continue - ;; - framework) - case $host in - *-*-darwin*) - case "$deplibs " in - *" $qarg.ltframework "*) ;; - *) deplibs="$deplibs $qarg.ltframework" # this is fixed later - ;; - esac - ;; - esac - prev= - continue - ;; - inst_prefix) - inst_prefix_dir="$arg" - prev= - continue - ;; - objectlist) - if test -f "$arg"; then - save_arg=$arg - moreargs= - for fil in `cat "$save_arg"` - do -# moreargs="$moreargs $fil" - arg=$fil - # A libtool-controlled object. - - # Check to see that this really is a libtool object. - if func_lalib_unsafe_p "$arg"; then - pic_object= - non_pic_object= - - # Read the .lo file - func_source "$arg" - - if test -z "$pic_object" || - test -z "$non_pic_object" || - test "$pic_object" = none && - test "$non_pic_object" = none; then - func_fatal_error "cannot find name of object for \`$arg'" - fi - - # Extract subdirectory from the argument. - func_dirname "$arg" "/" "" - xdir="$func_dirname_result" - - if test "$pic_object" != none; then - # Prepend the subdirectory the object is found in. - pic_object="$xdir$pic_object" - - if test "$prev" = dlfiles; then - if test "$build_libtool_libs" = yes && test "$dlopen_support" = yes; then - dlfiles="$dlfiles $pic_object" - prev= - continue - else - # If libtool objects are unsupported, then we need to preload. - prev=dlprefiles - fi - fi - - # CHECK ME: I think I busted this. -Ossama - if test "$prev" = dlprefiles; then - # Preload the old-style object. - dlprefiles="$dlprefiles $pic_object" - prev= - fi - - # A PIC object. - func_append libobjs " $pic_object" - arg="$pic_object" - fi - - # Non-PIC object. - if test "$non_pic_object" != none; then - # Prepend the subdirectory the object is found in. - non_pic_object="$xdir$non_pic_object" - - # A standard non-PIC object - func_append non_pic_objects " $non_pic_object" - if test -z "$pic_object" || test "$pic_object" = none ; then - arg="$non_pic_object" - fi - else - # If the PIC object exists, use it instead. - # $xdir was prepended to $pic_object above. - non_pic_object="$pic_object" - func_append non_pic_objects " $non_pic_object" - fi - else - # Only an error if not doing a dry-run. - if $opt_dry_run; then - # Extract subdirectory from the argument. - func_dirname "$arg" "/" "" - xdir="$func_dirname_result" - - func_lo2o "$arg" - pic_object=$xdir$objdir/$func_lo2o_result - non_pic_object=$xdir$func_lo2o_result - func_append libobjs " $pic_object" - func_append non_pic_objects " $non_pic_object" - else - func_fatal_error "\`$arg' is not a valid libtool object" - fi - fi - done - else - func_fatal_error "link input file \`$arg' does not exist" - fi - arg=$save_arg - prev= - continue - ;; - precious_regex) - precious_files_regex="$arg" - prev= - continue - ;; - release) - release="-$arg" - prev= - continue - ;; - rpath | xrpath) - # We need an absolute path. - case $arg in - [\\/]* | [A-Za-z]:[\\/]*) ;; - *) - func_fatal_error "only absolute run-paths are allowed" - ;; - esac - if test "$prev" = rpath; then - case "$rpath " in - *" $arg "*) ;; - *) rpath="$rpath $arg" ;; - esac - else - case "$xrpath " in - *" $arg "*) ;; - *) xrpath="$xrpath $arg" ;; - esac - fi - prev= - continue - ;; - shrext) - shrext_cmds="$arg" - prev= - continue - ;; - weak) - weak_libs="$weak_libs $arg" - prev= - continue - ;; - xcclinker) - linker_flags="$linker_flags $qarg" - compiler_flags="$compiler_flags $qarg" - prev= - func_append compile_command " $qarg" - func_append finalize_command " $qarg" - continue - ;; - xcompiler) - compiler_flags="$compiler_flags $qarg" - prev= - func_append compile_command " $qarg" - func_append finalize_command " $qarg" - continue - ;; - xlinker) - linker_flags="$linker_flags $qarg" - compiler_flags="$compiler_flags $wl$qarg" - prev= - func_append compile_command " $wl$qarg" - func_append finalize_command " $wl$qarg" - continue - ;; - *) - eval "$prev=\"\$arg\"" - prev= - continue - ;; - esac - fi # test -n "$prev" - - prevarg="$arg" - - case $arg in - -all-static) - if test -n "$link_static_flag"; then - # See comment for -static flag below, for more details. - func_append compile_command " $link_static_flag" - func_append finalize_command " $link_static_flag" - fi - continue - ;; - - -allow-undefined) - # FIXME: remove this flag sometime in the future. - func_fatal_error "\`-allow-undefined' must not be used because it is the default" - ;; - - -avoid-version) - avoid_version=yes - continue - ;; - - -dlopen) - prev=dlfiles - continue - ;; - - -dlpreopen) - prev=dlprefiles - continue - ;; - - -export-dynamic) - export_dynamic=yes - continue - ;; - - -export-symbols | -export-symbols-regex) - if test -n "$export_symbols" || test -n "$export_symbols_regex"; then - func_fatal_error "more than one -exported-symbols argument is not allowed" - fi - if test "X$arg" = "X-export-symbols"; then - prev=expsyms - else - prev=expsyms_regex - fi - continue - ;; - - -framework) - prev=framework - continue - ;; - - -inst-prefix-dir) - prev=inst_prefix - continue - ;; - - # The native IRIX linker understands -LANG:*, -LIST:* and -LNO:* - # so, if we see these flags be careful not to treat them like -L - -L[A-Z][A-Z]*:*) - case $with_gcc/$host in - no/*-*-irix* | /*-*-irix*) - func_append compile_command " $arg" - func_append finalize_command " $arg" - ;; - esac - continue - ;; - - -L*) - func_stripname '-L' '' "$arg" - dir=$func_stripname_result - if test -z "$dir"; then - if test "$#" -gt 0; then - func_fatal_error "require no space between \`-L' and \`$1'" - else - func_fatal_error "need path for \`-L' option" - fi - fi - # We need an absolute path. - case $dir in - [\\/]* | [A-Za-z]:[\\/]*) ;; - *) - absdir=`cd "$dir" && pwd` - test -z "$absdir" && \ - func_fatal_error "cannot determine absolute directory name of \`$dir'" - dir="$absdir" - ;; - esac - case "$deplibs " in - *" -L$dir "*) ;; - *) - deplibs="$deplibs -L$dir" - lib_search_path="$lib_search_path $dir" - ;; - esac - case $host in - *-*-cygwin* | *-*-mingw* | *-*-pw32* | *-*-os2* | *-cegcc*) - testbindir=`$ECHO "X$dir" | $Xsed -e 's*/lib$*/bin*'` - case :$dllsearchpath: in - *":$dir:"*) ;; - ::) dllsearchpath=$dir;; - *) dllsearchpath="$dllsearchpath:$dir";; - esac - case :$dllsearchpath: in - *":$testbindir:"*) ;; - ::) dllsearchpath=$testbindir;; - *) dllsearchpath="$dllsearchpath:$testbindir";; - esac - ;; - esac - continue - ;; - - -l*) - if test "X$arg" = "X-lc" || test "X$arg" = "X-lm"; then - case $host in - *-*-cygwin* | *-*-mingw* | *-*-pw32* | *-*-beos* | *-cegcc*) - # These systems don't actually have a C or math library (as such) - continue - ;; - *-*-os2*) - # These systems don't actually have a C library (as such) - test "X$arg" = "X-lc" && continue - ;; - *-*-openbsd* | *-*-freebsd* | *-*-dragonfly*) - # Do not include libc due to us having libc/libc_r. - test "X$arg" = "X-lc" && continue - ;; - *-*-rhapsody* | *-*-darwin1.[012]) - # Rhapsody C and math libraries are in the System framework - deplibs="$deplibs System.ltframework" - continue - ;; - *-*-sco3.2v5* | *-*-sco5v6*) - # Causes problems with __ctype - test "X$arg" = "X-lc" && continue - ;; - *-*-sysv4.2uw2* | *-*-sysv5* | *-*-unixware* | *-*-OpenUNIX*) - # Compiler inserts libc in the correct place for threads to work - test "X$arg" = "X-lc" && continue - ;; - esac - elif test "X$arg" = "X-lc_r"; then - case $host in - *-*-openbsd* | *-*-freebsd* | *-*-dragonfly*) - # Do not include libc_r directly, use -pthread flag. - continue - ;; - esac - fi - deplibs="$deplibs $arg" - continue - ;; - - -module) - module=yes - continue - ;; - - # Tru64 UNIX uses -model [arg] to determine the layout of C++ - # classes, name mangling, and exception handling. - # Darwin uses the -arch flag to determine output architecture. - -model|-arch|-isysroot) - compiler_flags="$compiler_flags $arg" - func_append compile_command " $arg" - func_append finalize_command " $arg" - prev=xcompiler - continue - ;; - - -mt|-mthreads|-kthread|-Kthread|-pthread|-pthreads|--thread-safe|-threads) - compiler_flags="$compiler_flags $arg" - func_append compile_command " $arg" - func_append finalize_command " $arg" - case "$new_inherited_linker_flags " in - *" $arg "*) ;; - * ) new_inherited_linker_flags="$new_inherited_linker_flags $arg" ;; - esac - continue - ;; - - -multi_module) - single_module="${wl}-multi_module" - continue - ;; - - -no-fast-install) - fast_install=no - continue - ;; - - -no-install) - case $host in - *-*-cygwin* | *-*-mingw* | *-*-pw32* | *-*-os2* | *-*-darwin* | *-cegcc*) - # The PATH hackery in wrapper scripts is required on Windows - # and Darwin in order for the loader to find any dlls it needs. - func_warning "\`-no-install' is ignored for $host" - func_warning "assuming \`-no-fast-install' instead" - fast_install=no - ;; - *) no_install=yes ;; - esac - continue - ;; - - -no-undefined) - allow_undefined=no - continue - ;; - - -objectlist) - prev=objectlist - continue - ;; - - -o) prev=output ;; - - -precious-files-regex) - prev=precious_regex - continue - ;; - - -release) - prev=release - continue - ;; - - -rpath) - prev=rpath - continue - ;; - - -R) - prev=xrpath - continue - ;; - - -R*) - func_stripname '-R' '' "$arg" - dir=$func_stripname_result - # We need an absolute path. - case $dir in - [\\/]* | [A-Za-z]:[\\/]*) ;; - *) - func_fatal_error "only absolute run-paths are allowed" - ;; - esac - case "$xrpath " in - *" $dir "*) ;; - *) xrpath="$xrpath $dir" ;; - esac - continue - ;; - - -shared) - # The effects of -shared are defined in a previous loop. - continue - ;; - - -shrext) - prev=shrext - continue - ;; - - -static | -static-libtool-libs) - # The effects of -static are defined in a previous loop. - # We used to do the same as -all-static on platforms that - # didn't have a PIC flag, but the assumption that the effects - # would be equivalent was wrong. It would break on at least - # Digital Unix and AIX. - continue - ;; - - -thread-safe) - thread_safe=yes - continue - ;; - - -version-info) - prev=vinfo - continue - ;; - - -version-number) - prev=vinfo - vinfo_number=yes - continue - ;; - - -weak) - prev=weak - continue - ;; - - -Wc,*) - func_stripname '-Wc,' '' "$arg" - args=$func_stripname_result - arg= - save_ifs="$IFS"; IFS=',' - for flag in $args; do - IFS="$save_ifs" - func_quote_for_eval "$flag" - arg="$arg $wl$func_quote_for_eval_result" - compiler_flags="$compiler_flags $func_quote_for_eval_result" - done - IFS="$save_ifs" - func_stripname ' ' '' "$arg" - arg=$func_stripname_result - ;; - - -Wl,*) - func_stripname '-Wl,' '' "$arg" - args=$func_stripname_result - arg= - save_ifs="$IFS"; IFS=',' - for flag in $args; do - IFS="$save_ifs" - func_quote_for_eval "$flag" - arg="$arg $wl$func_quote_for_eval_result" - compiler_flags="$compiler_flags $wl$func_quote_for_eval_result" - linker_flags="$linker_flags $func_quote_for_eval_result" - done - IFS="$save_ifs" - func_stripname ' ' '' "$arg" - arg=$func_stripname_result - ;; - - -Xcompiler) - prev=xcompiler - continue - ;; - - -Xlinker) - prev=xlinker - continue - ;; - - -XCClinker) - prev=xcclinker - continue - ;; - - # -msg_* for osf cc - -msg_*) - func_quote_for_eval "$arg" - arg="$func_quote_for_eval_result" - ;; - - # -64, -mips[0-9] enable 64-bit mode on the SGI compiler - # -r[0-9][0-9]* specifies the processor on the SGI compiler - # -xarch=*, -xtarget=* enable 64-bit mode on the Sun compiler - # +DA*, +DD* enable 64-bit mode on the HP compiler - # -q* pass through compiler args for the IBM compiler - # -m*, -t[45]*, -txscale* pass through architecture-specific - # compiler args for GCC - # -F/path gives path to uninstalled frameworks, gcc on darwin - # -p, -pg, --coverage, -fprofile-* pass through profiling flag for GCC - # @file GCC response files - -64|-mips[0-9]|-r[0-9][0-9]*|-xarch=*|-xtarget=*|+DA*|+DD*|-q*|-m*| \ - -t[45]*|-txscale*|-p|-pg|--coverage|-fprofile-*|-F*|@*) - func_quote_for_eval "$arg" - arg="$func_quote_for_eval_result" - func_append compile_command " $arg" - func_append finalize_command " $arg" - compiler_flags="$compiler_flags $arg" - continue - ;; - - # Some other compiler flag. - -* | +*) - func_quote_for_eval "$arg" - arg="$func_quote_for_eval_result" - ;; - - *.$objext) - # A standard object. - objs="$objs $arg" - ;; - - *.lo) - # A libtool-controlled object. - - # Check to see that this really is a libtool object. - if func_lalib_unsafe_p "$arg"; then - pic_object= - non_pic_object= - - # Read the .lo file - func_source "$arg" - - if test -z "$pic_object" || - test -z "$non_pic_object" || - test "$pic_object" = none && - test "$non_pic_object" = none; then - func_fatal_error "cannot find name of object for \`$arg'" - fi - - # Extract subdirectory from the argument. - func_dirname "$arg" "/" "" - xdir="$func_dirname_result" - - if test "$pic_object" != none; then - # Prepend the subdirectory the object is found in. - pic_object="$xdir$pic_object" - - if test "$prev" = dlfiles; then - if test "$build_libtool_libs" = yes && test "$dlopen_support" = yes; then - dlfiles="$dlfiles $pic_object" - prev= - continue - else - # If libtool objects are unsupported, then we need to preload. - prev=dlprefiles - fi - fi - - # CHECK ME: I think I busted this. -Ossama - if test "$prev" = dlprefiles; then - # Preload the old-style object. - dlprefiles="$dlprefiles $pic_object" - prev= - fi - - # A PIC object. - func_append libobjs " $pic_object" - arg="$pic_object" - fi - - # Non-PIC object. - if test "$non_pic_object" != none; then - # Prepend the subdirectory the object is found in. - non_pic_object="$xdir$non_pic_object" - - # A standard non-PIC object - func_append non_pic_objects " $non_pic_object" - if test -z "$pic_object" || test "$pic_object" = none ; then - arg="$non_pic_object" - fi - else - # If the PIC object exists, use it instead. - # $xdir was prepended to $pic_object above. - non_pic_object="$pic_object" - func_append non_pic_objects " $non_pic_object" - fi - else - # Only an error if not doing a dry-run. - if $opt_dry_run; then - # Extract subdirectory from the argument. - func_dirname "$arg" "/" "" - xdir="$func_dirname_result" - - func_lo2o "$arg" - pic_object=$xdir$objdir/$func_lo2o_result - non_pic_object=$xdir$func_lo2o_result - func_append libobjs " $pic_object" - func_append non_pic_objects " $non_pic_object" - else - func_fatal_error "\`$arg' is not a valid libtool object" - fi - fi - ;; - - *.$libext) - # An archive. - deplibs="$deplibs $arg" - old_deplibs="$old_deplibs $arg" - continue - ;; - - *.la) - # A libtool-controlled library. - - if test "$prev" = dlfiles; then - # This library was specified with -dlopen. - dlfiles="$dlfiles $arg" - prev= - elif test "$prev" = dlprefiles; then - # The library was specified with -dlpreopen. - dlprefiles="$dlprefiles $arg" - prev= - else - deplibs="$deplibs $arg" - fi - continue - ;; - - # Some other compiler argument. - *) - # Unknown arguments in both finalize_command and compile_command need - # to be aesthetically quoted because they are evaled later. - func_quote_for_eval "$arg" - arg="$func_quote_for_eval_result" - ;; - esac # arg - - # Now actually substitute the argument into the commands. - if test -n "$arg"; then - func_append compile_command " $arg" - func_append finalize_command " $arg" - fi - done # argument parsing loop - - test -n "$prev" && \ - func_fatal_help "the \`$prevarg' option requires an argument" - - if test "$export_dynamic" = yes && test -n "$export_dynamic_flag_spec"; then - eval arg=\"$export_dynamic_flag_spec\" - func_append compile_command " $arg" - func_append finalize_command " $arg" - fi - - oldlibs= - # calculate the name of the file, without its directory - func_basename "$output" - outputname="$func_basename_result" - libobjs_save="$libobjs" - - if test -n "$shlibpath_var"; then - # get the directories listed in $shlibpath_var - eval shlib_search_path=\`\$ECHO \"X\${$shlibpath_var}\" \| \$Xsed -e \'s/:/ /g\'\` - else - shlib_search_path= - fi - eval sys_lib_search_path=\"$sys_lib_search_path_spec\" - eval sys_lib_dlsearch_path=\"$sys_lib_dlsearch_path_spec\" - - func_dirname "$output" "/" "" - output_objdir="$func_dirname_result$objdir" - # Create the object directory. - func_mkdir_p "$output_objdir" - - # Determine the type of output - case $output in - "") - func_fatal_help "you must specify an output file" - ;; - *.$libext) linkmode=oldlib ;; - *.lo | *.$objext) linkmode=obj ;; - *.la) linkmode=lib ;; - *) linkmode=prog ;; # Anything else should be a program. - esac - - specialdeplibs= - - libs= - # Find all interdependent deplibs by searching for libraries - # that are linked more than once (e.g. -la -lb -la) - for deplib in $deplibs; do - if $opt_duplicate_deps ; then - case "$libs " in - *" $deplib "*) specialdeplibs="$specialdeplibs $deplib" ;; - esac - fi - libs="$libs $deplib" - done - - if test "$linkmode" = lib; then - libs="$predeps $libs $compiler_lib_search_path $postdeps" - - # Compute libraries that are listed more than once in $predeps - # $postdeps and mark them as special (i.e., whose duplicates are - # not to be eliminated). - pre_post_deps= - if $opt_duplicate_compiler_generated_deps; then - for pre_post_dep in $predeps $postdeps; do - case "$pre_post_deps " in - *" $pre_post_dep "*) specialdeplibs="$specialdeplibs $pre_post_deps" ;; - esac - pre_post_deps="$pre_post_deps $pre_post_dep" - done - fi - pre_post_deps= - fi - - deplibs= - newdependency_libs= - newlib_search_path= - need_relink=no # whether we're linking any uninstalled libtool libraries - notinst_deplibs= # not-installed libtool libraries - notinst_path= # paths that contain not-installed libtool libraries - - case $linkmode in - lib) - passes="conv dlpreopen link" - for file in $dlfiles $dlprefiles; do - case $file in - *.la) ;; - *) - func_fatal_help "libraries can \`-dlopen' only libtool libraries: $file" - ;; - esac - done - ;; - prog) - compile_deplibs= - finalize_deplibs= - alldeplibs=no - newdlfiles= - newdlprefiles= - passes="conv scan dlopen dlpreopen link" - ;; - *) passes="conv" - ;; - esac - - for pass in $passes; do - # The preopen pass in lib mode reverses $deplibs; put it back here - # so that -L comes before libs that need it for instance... - if test "$linkmode,$pass" = "lib,link"; then - ## FIXME: Find the place where the list is rebuilt in the wrong - ## order, and fix it there properly - tmp_deplibs= - for deplib in $deplibs; do - tmp_deplibs="$deplib $tmp_deplibs" - done - deplibs="$tmp_deplibs" - fi - - if test "$linkmode,$pass" = "lib,link" || - test "$linkmode,$pass" = "prog,scan"; then - libs="$deplibs" - deplibs= - fi - if test "$linkmode" = prog; then - case $pass in - dlopen) libs="$dlfiles" ;; - dlpreopen) libs="$dlprefiles" ;; - link) libs="$deplibs %DEPLIBS% $dependency_libs" ;; - esac - fi - if test "$linkmode,$pass" = "lib,dlpreopen"; then - # Collect and forward deplibs of preopened libtool libs - for lib in $dlprefiles; do - # Ignore non-libtool-libs - dependency_libs= - case $lib in - *.la) func_source "$lib" ;; - esac - - # Collect preopened libtool deplibs, except any this library - # has declared as weak libs - for deplib in $dependency_libs; do - deplib_base=`$ECHO "X$deplib" | $Xsed -e "$basename"` - case " $weak_libs " in - *" $deplib_base "*) ;; - *) deplibs="$deplibs $deplib" ;; - esac - done - done - libs="$dlprefiles" - fi - if test "$pass" = dlopen; then - # Collect dlpreopened libraries - save_deplibs="$deplibs" - deplibs= - fi - - for deplib in $libs; do - lib= - found=no - case $deplib in - -mt|-mthreads|-kthread|-Kthread|-pthread|-pthreads|--thread-safe|-threads) - if test "$linkmode,$pass" = "prog,link"; then - compile_deplibs="$deplib $compile_deplibs" - finalize_deplibs="$deplib $finalize_deplibs" - else - compiler_flags="$compiler_flags $deplib" - if test "$linkmode" = lib ; then - case "$new_inherited_linker_flags " in - *" $deplib "*) ;; - * ) new_inherited_linker_flags="$new_inherited_linker_flags $deplib" ;; - esac - fi - fi - continue - ;; - -l*) - if test "$linkmode" != lib && test "$linkmode" != prog; then - func_warning "\`-l' is ignored for archives/objects" - continue - fi - func_stripname '-l' '' "$deplib" - name=$func_stripname_result - if test "$linkmode" = lib; then - searchdirs="$newlib_search_path $lib_search_path $compiler_lib_search_dirs $sys_lib_search_path $shlib_search_path" - else - searchdirs="$newlib_search_path $lib_search_path $sys_lib_search_path $shlib_search_path" - fi - for searchdir in $searchdirs; do - for search_ext in .la $std_shrext .so .a; do - # Search the libtool library - lib="$searchdir/lib${name}${search_ext}" - if test -f "$lib"; then - if test "$search_ext" = ".la"; then - found=yes - else - found=no - fi - break 2 - fi - done - done - if test "$found" != yes; then - # deplib doesn't seem to be a libtool library - if test "$linkmode,$pass" = "prog,link"; then - compile_deplibs="$deplib $compile_deplibs" - finalize_deplibs="$deplib $finalize_deplibs" - else - deplibs="$deplib $deplibs" - test "$linkmode" = lib && newdependency_libs="$deplib $newdependency_libs" - fi - continue - else # deplib is a libtool library - # If $allow_libtool_libs_with_static_runtimes && $deplib is a stdlib, - # We need to do some special things here, and not later. - if test "X$allow_libtool_libs_with_static_runtimes" = "Xyes" ; then - case " $predeps $postdeps " in - *" $deplib "*) - if func_lalib_p "$lib"; then - library_names= - old_library= - func_source "$lib" - for l in $old_library $library_names; do - ll="$l" - done - if test "X$ll" = "X$old_library" ; then # only static version available - found=no - func_dirname "$lib" "" "." - ladir="$func_dirname_result" - lib=$ladir/$old_library - if test "$linkmode,$pass" = "prog,link"; then - compile_deplibs="$deplib $compile_deplibs" - finalize_deplibs="$deplib $finalize_deplibs" - else - deplibs="$deplib $deplibs" - test "$linkmode" = lib && newdependency_libs="$deplib $newdependency_libs" - fi - continue - fi - fi - ;; - *) ;; - esac - fi - fi - ;; # -l - *.ltframework) - if test "$linkmode,$pass" = "prog,link"; then - compile_deplibs="$deplib $compile_deplibs" - finalize_deplibs="$deplib $finalize_deplibs" - else - deplibs="$deplib $deplibs" - if test "$linkmode" = lib ; then - case "$new_inherited_linker_flags " in - *" $deplib "*) ;; - * ) new_inherited_linker_flags="$new_inherited_linker_flags $deplib" ;; - esac - fi - fi - continue - ;; - -L*) - case $linkmode in - lib) - deplibs="$deplib $deplibs" - test "$pass" = conv && continue - newdependency_libs="$deplib $newdependency_libs" - func_stripname '-L' '' "$deplib" - newlib_search_path="$newlib_search_path $func_stripname_result" - ;; - prog) - if test "$pass" = conv; then - deplibs="$deplib $deplibs" - continue - fi - if test "$pass" = scan; then - deplibs="$deplib $deplibs" - else - compile_deplibs="$deplib $compile_deplibs" - finalize_deplibs="$deplib $finalize_deplibs" - fi - func_stripname '-L' '' "$deplib" - newlib_search_path="$newlib_search_path $func_stripname_result" - ;; - *) - func_warning "\`-L' is ignored for archives/objects" - ;; - esac # linkmode - continue - ;; # -L - -R*) - if test "$pass" = link; then - func_stripname '-R' '' "$deplib" - dir=$func_stripname_result - # Make sure the xrpath contains only unique directories. - case "$xrpath " in - *" $dir "*) ;; - *) xrpath="$xrpath $dir" ;; - esac - fi - deplibs="$deplib $deplibs" - continue - ;; - *.la) lib="$deplib" ;; - *.$libext) - if test "$pass" = conv; then - deplibs="$deplib $deplibs" - continue - fi - case $linkmode in - lib) - # Linking convenience modules into shared libraries is allowed, - # but linking other static libraries is non-portable. - case " $dlpreconveniencelibs " in - *" $deplib "*) ;; - *) - valid_a_lib=no - case $deplibs_check_method in - match_pattern*) - set dummy $deplibs_check_method; shift - match_pattern_regex=`expr "$deplibs_check_method" : "$1 \(.*\)"` - if eval "\$ECHO \"X$deplib\"" 2>/dev/null | $Xsed -e 10q \ - | $EGREP "$match_pattern_regex" > /dev/null; then - valid_a_lib=yes - fi - ;; - pass_all) - valid_a_lib=yes - ;; - esac - if test "$valid_a_lib" != yes; then - $ECHO - $ECHO "*** Warning: Trying to link with static lib archive $deplib." - $ECHO "*** I have the capability to make that library automatically link in when" - $ECHO "*** you link to this library. But I can only do this if you have a" - $ECHO "*** shared version of the library, which you do not appear to have" - $ECHO "*** because the file extensions .$libext of this argument makes me believe" - $ECHO "*** that it is just a static archive that I should not use here." - else - $ECHO - $ECHO "*** Warning: Linking the shared library $output against the" - $ECHO "*** static library $deplib is not portable!" - deplibs="$deplib $deplibs" - fi - ;; - esac - continue - ;; - prog) - if test "$pass" != link; then - deplibs="$deplib $deplibs" - else - compile_deplibs="$deplib $compile_deplibs" - finalize_deplibs="$deplib $finalize_deplibs" - fi - continue - ;; - esac # linkmode - ;; # *.$libext - *.lo | *.$objext) - if test "$pass" = conv; then - deplibs="$deplib $deplibs" - elif test "$linkmode" = prog; then - if test "$pass" = dlpreopen || test "$dlopen_support" != yes || test "$build_libtool_libs" = no; then - # If there is no dlopen support or we're linking statically, - # we need to preload. - newdlprefiles="$newdlprefiles $deplib" - compile_deplibs="$deplib $compile_deplibs" - finalize_deplibs="$deplib $finalize_deplibs" - else - newdlfiles="$newdlfiles $deplib" - fi - fi - continue - ;; - %DEPLIBS%) - alldeplibs=yes - continue - ;; - esac # case $deplib - - if test "$found" = yes || test -f "$lib"; then : - else - func_fatal_error "cannot find the library \`$lib' or unhandled argument \`$deplib'" - fi - - # Check to see that this really is a libtool archive. - func_lalib_unsafe_p "$lib" \ - || func_fatal_error "\`$lib' is not a valid libtool archive" - - func_dirname "$lib" "" "." - ladir="$func_dirname_result" - - dlname= - dlopen= - dlpreopen= - libdir= - library_names= - old_library= - inherited_linker_flags= - # If the library was installed with an old release of libtool, - # it will not redefine variables installed, or shouldnotlink - installed=yes - shouldnotlink=no - avoidtemprpath= - - - # Read the .la file - func_source "$lib" - - # Convert "-framework foo" to "foo.ltframework" - if test -n "$inherited_linker_flags"; then - tmp_inherited_linker_flags=`$ECHO "X$inherited_linker_flags" | $Xsed -e 's/-framework \([^ $]*\)/\1.ltframework/g'` - for tmp_inherited_linker_flag in $tmp_inherited_linker_flags; do - case " $new_inherited_linker_flags " in - *" $tmp_inherited_linker_flag "*) ;; - *) new_inherited_linker_flags="$new_inherited_linker_flags $tmp_inherited_linker_flag";; - esac - done - fi - dependency_libs=`$ECHO "X $dependency_libs" | $Xsed -e 's% \([^ $]*\).ltframework% -framework \1%g'` - if test "$linkmode,$pass" = "lib,link" || - test "$linkmode,$pass" = "prog,scan" || - { test "$linkmode" != prog && test "$linkmode" != lib; }; then - test -n "$dlopen" && dlfiles="$dlfiles $dlopen" - test -n "$dlpreopen" && dlprefiles="$dlprefiles $dlpreopen" - fi - - if test "$pass" = conv; then - # Only check for convenience libraries - deplibs="$lib $deplibs" - if test -z "$libdir"; then - if test -z "$old_library"; then - func_fatal_error "cannot find name of link library for \`$lib'" - fi - # It is a libtool convenience library, so add in its objects. - convenience="$convenience $ladir/$objdir/$old_library" - old_convenience="$old_convenience $ladir/$objdir/$old_library" - elif test "$linkmode" != prog && test "$linkmode" != lib; then - func_fatal_error "\`$lib' is not a convenience library" - fi - tmp_libs= - for deplib in $dependency_libs; do - deplibs="$deplib $deplibs" - if $opt_duplicate_deps ; then - case "$tmp_libs " in - *" $deplib "*) specialdeplibs="$specialdeplibs $deplib" ;; - esac - fi - tmp_libs="$tmp_libs $deplib" - done - continue - fi # $pass = conv - - - # Get the name of the library we link against. - linklib= - for l in $old_library $library_names; do - linklib="$l" - done - if test -z "$linklib"; then - func_fatal_error "cannot find name of link library for \`$lib'" - fi - - # This library was specified with -dlopen. - if test "$pass" = dlopen; then - if test -z "$libdir"; then - func_fatal_error "cannot -dlopen a convenience library: \`$lib'" - fi - if test -z "$dlname" || - test "$dlopen_support" != yes || - test "$build_libtool_libs" = no; then - # If there is no dlname, no dlopen support or we're linking - # statically, we need to preload. We also need to preload any - # dependent libraries so libltdl's deplib preloader doesn't - # bomb out in the load deplibs phase. - dlprefiles="$dlprefiles $lib $dependency_libs" - else - newdlfiles="$newdlfiles $lib" - fi - continue - fi # $pass = dlopen - - # We need an absolute path. - case $ladir in - [\\/]* | [A-Za-z]:[\\/]*) abs_ladir="$ladir" ;; - *) - abs_ladir=`cd "$ladir" && pwd` - if test -z "$abs_ladir"; then - func_warning "cannot determine absolute directory name of \`$ladir'" - func_warning "passing it literally to the linker, although it might fail" - abs_ladir="$ladir" - fi - ;; - esac - func_basename "$lib" - laname="$func_basename_result" - - # Find the relevant object directory and library name. - if test "X$installed" = Xyes; then - if test ! -f "$libdir/$linklib" && test -f "$abs_ladir/$linklib"; then - func_warning "library \`$lib' was moved." - dir="$ladir" - absdir="$abs_ladir" - libdir="$abs_ladir" - else - dir="$libdir" - absdir="$libdir" - fi - test "X$hardcode_automatic" = Xyes && avoidtemprpath=yes - else - if test ! -f "$ladir/$objdir/$linklib" && test -f "$abs_ladir/$linklib"; then - dir="$ladir" - absdir="$abs_ladir" - # Remove this search path later - notinst_path="$notinst_path $abs_ladir" - else - dir="$ladir/$objdir" - absdir="$abs_ladir/$objdir" - # Remove this search path later - notinst_path="$notinst_path $abs_ladir" - fi - fi # $installed = yes - func_stripname 'lib' '.la' "$laname" - name=$func_stripname_result - - # This library was specified with -dlpreopen. - if test "$pass" = dlpreopen; then - if test -z "$libdir" && test "$linkmode" = prog; then - func_fatal_error "only libraries may -dlpreopen a convenience library: \`$lib'" - fi - # Prefer using a static library (so that no silly _DYNAMIC symbols - # are required to link). - if test -n "$old_library"; then - newdlprefiles="$newdlprefiles $dir/$old_library" - # Keep a list of preopened convenience libraries to check - # that they are being used correctly in the link pass. - test -z "$libdir" && \ - dlpreconveniencelibs="$dlpreconveniencelibs $dir/$old_library" - # Otherwise, use the dlname, so that lt_dlopen finds it. - elif test -n "$dlname"; then - newdlprefiles="$newdlprefiles $dir/$dlname" - else - newdlprefiles="$newdlprefiles $dir/$linklib" - fi - fi # $pass = dlpreopen - - if test -z "$libdir"; then - # Link the convenience library - if test "$linkmode" = lib; then - deplibs="$dir/$old_library $deplibs" - elif test "$linkmode,$pass" = "prog,link"; then - compile_deplibs="$dir/$old_library $compile_deplibs" - finalize_deplibs="$dir/$old_library $finalize_deplibs" - else - deplibs="$lib $deplibs" # used for prog,scan pass - fi - continue - fi - - - if test "$linkmode" = prog && test "$pass" != link; then - newlib_search_path="$newlib_search_path $ladir" - deplibs="$lib $deplibs" - - linkalldeplibs=no - if test "$link_all_deplibs" != no || test -z "$library_names" || - test "$build_libtool_libs" = no; then - linkalldeplibs=yes - fi - - tmp_libs= - for deplib in $dependency_libs; do - case $deplib in - -L*) func_stripname '-L' '' "$deplib" - newlib_search_path="$newlib_search_path $func_stripname_result" - ;; - esac - # Need to link against all dependency_libs? - if test "$linkalldeplibs" = yes; then - deplibs="$deplib $deplibs" - else - # Need to hardcode shared library paths - # or/and link against static libraries - newdependency_libs="$deplib $newdependency_libs" - fi - if $opt_duplicate_deps ; then - case "$tmp_libs " in - *" $deplib "*) specialdeplibs="$specialdeplibs $deplib" ;; - esac - fi - tmp_libs="$tmp_libs $deplib" - done # for deplib - continue - fi # $linkmode = prog... - - if test "$linkmode,$pass" = "prog,link"; then - if test -n "$library_names" && - { { test "$prefer_static_libs" = no || - test "$prefer_static_libs,$installed" = "built,yes"; } || - test -z "$old_library"; }; then - # We need to hardcode the library path - if test -n "$shlibpath_var" && test -z "$avoidtemprpath" ; then - # Make sure the rpath contains only unique directories. - case "$temp_rpath:" in - *"$absdir:"*) ;; - *) temp_rpath="$temp_rpath$absdir:" ;; - esac - fi - - # Hardcode the library path. - # Skip directories that are in the system default run-time - # search path. - case " $sys_lib_dlsearch_path " in - *" $absdir "*) ;; - *) - case "$compile_rpath " in - *" $absdir "*) ;; - *) compile_rpath="$compile_rpath $absdir" - esac - ;; - esac - case " $sys_lib_dlsearch_path " in - *" $libdir "*) ;; - *) - case "$finalize_rpath " in - *" $libdir "*) ;; - *) finalize_rpath="$finalize_rpath $libdir" - esac - ;; - esac - fi # $linkmode,$pass = prog,link... - - if test "$alldeplibs" = yes && - { test "$deplibs_check_method" = pass_all || - { test "$build_libtool_libs" = yes && - test -n "$library_names"; }; }; then - # We only need to search for static libraries - continue - fi - fi - - link_static=no # Whether the deplib will be linked statically - use_static_libs=$prefer_static_libs - if test "$use_static_libs" = built && test "$installed" = yes; then - use_static_libs=no - fi - if test -n "$library_names" && - { test "$use_static_libs" = no || test -z "$old_library"; }; then - case $host in - *cygwin* | *mingw* | *cegcc*) - # No point in relinking DLLs because paths are not encoded - notinst_deplibs="$notinst_deplibs $lib" - need_relink=no - ;; - *) - if test "$installed" = no; then - notinst_deplibs="$notinst_deplibs $lib" - need_relink=yes - fi - ;; - esac - # This is a shared library - - # Warn about portability, can't link against -module's on some - # systems (darwin). Don't bleat about dlopened modules though! - dlopenmodule="" - for dlpremoduletest in $dlprefiles; do - if test "X$dlpremoduletest" = "X$lib"; then - dlopenmodule="$dlpremoduletest" - break - fi - done - if test -z "$dlopenmodule" && test "$shouldnotlink" = yes && test "$pass" = link; then - $ECHO - if test "$linkmode" = prog; then - $ECHO "*** Warning: Linking the executable $output against the loadable module" - else - $ECHO "*** Warning: Linking the shared library $output against the loadable module" - fi - $ECHO "*** $linklib is not portable!" - fi - if test "$linkmode" = lib && - test "$hardcode_into_libs" = yes; then - # Hardcode the library path. - # Skip directories that are in the system default run-time - # search path. - case " $sys_lib_dlsearch_path " in - *" $absdir "*) ;; - *) - case "$compile_rpath " in - *" $absdir "*) ;; - *) compile_rpath="$compile_rpath $absdir" - esac - ;; - esac - case " $sys_lib_dlsearch_path " in - *" $libdir "*) ;; - *) - case "$finalize_rpath " in - *" $libdir "*) ;; - *) finalize_rpath="$finalize_rpath $libdir" - esac - ;; - esac - fi - - if test -n "$old_archive_from_expsyms_cmds"; then - # figure out the soname - set dummy $library_names - shift - realname="$1" - shift - libname=`eval "\\$ECHO \"$libname_spec\""` - # use dlname if we got it. it's perfectly good, no? - if test -n "$dlname"; then - soname="$dlname" - elif test -n "$soname_spec"; then - # bleh windows - case $host in - *cygwin* | mingw* | *cegcc*) - func_arith $current - $age - major=$func_arith_result - versuffix="-$major" - ;; - esac - eval soname=\"$soname_spec\" - else - soname="$realname" - fi - - # Make a new name for the extract_expsyms_cmds to use - soroot="$soname" - func_basename "$soroot" - soname="$func_basename_result" - func_stripname 'lib' '.dll' "$soname" - newlib=libimp-$func_stripname_result.a - - # If the library has no export list, then create one now - if test -f "$output_objdir/$soname-def"; then : - else - func_verbose "extracting exported symbol list from \`$soname'" - func_execute_cmds "$extract_expsyms_cmds" 'exit $?' - fi - - # Create $newlib - if test -f "$output_objdir/$newlib"; then :; else - func_verbose "generating import library for \`$soname'" - func_execute_cmds "$old_archive_from_expsyms_cmds" 'exit $?' - fi - # make sure the library variables are pointing to the new library - dir=$output_objdir - linklib=$newlib - fi # test -n "$old_archive_from_expsyms_cmds" - - if test "$linkmode" = prog || test "$mode" != relink; then - add_shlibpath= - add_dir= - add= - lib_linked=yes - case $hardcode_action in - immediate | unsupported) - if test "$hardcode_direct" = no; then - add="$dir/$linklib" - case $host in - *-*-sco3.2v5.0.[024]*) add_dir="-L$dir" ;; - *-*-sysv4*uw2*) add_dir="-L$dir" ;; - *-*-sysv5OpenUNIX* | *-*-sysv5UnixWare7.[01].[10]* | \ - *-*-unixware7*) add_dir="-L$dir" ;; - *-*-darwin* ) - # if the lib is a (non-dlopened) module then we can not - # link against it, someone is ignoring the earlier warnings - if /usr/bin/file -L $add 2> /dev/null | - $GREP ": [^:]* bundle" >/dev/null ; then - if test "X$dlopenmodule" != "X$lib"; then - $ECHO "*** Warning: lib $linklib is a module, not a shared library" - if test -z "$old_library" ; then - $ECHO - $ECHO "*** And there doesn't seem to be a static archive available" - $ECHO "*** The link will probably fail, sorry" - else - add="$dir/$old_library" - fi - elif test -n "$old_library"; then - add="$dir/$old_library" - fi - fi - esac - elif test "$hardcode_minus_L" = no; then - case $host in - *-*-sunos*) add_shlibpath="$dir" ;; - esac - add_dir="-L$dir" - add="-l$name" - elif test "$hardcode_shlibpath_var" = no; then - add_shlibpath="$dir" - add="-l$name" - else - lib_linked=no - fi - ;; - relink) - if test "$hardcode_direct" = yes && - test "$hardcode_direct_absolute" = no; then - add="$dir/$linklib" - elif test "$hardcode_minus_L" = yes; then - add_dir="-L$dir" - # Try looking first in the location we're being installed to. - if test -n "$inst_prefix_dir"; then - case $libdir in - [\\/]*) - add_dir="$add_dir -L$inst_prefix_dir$libdir" - ;; - esac - fi - add="-l$name" - elif test "$hardcode_shlibpath_var" = yes; then - add_shlibpath="$dir" - add="-l$name" - else - lib_linked=no - fi - ;; - *) lib_linked=no ;; - esac - - if test "$lib_linked" != yes; then - func_fatal_configuration "unsupported hardcode properties" - fi - - if test -n "$add_shlibpath"; then - case :$compile_shlibpath: in - *":$add_shlibpath:"*) ;; - *) compile_shlibpath="$compile_shlibpath$add_shlibpath:" ;; - esac - fi - if test "$linkmode" = prog; then - test -n "$add_dir" && compile_deplibs="$add_dir $compile_deplibs" - test -n "$add" && compile_deplibs="$add $compile_deplibs" - else - test -n "$add_dir" && deplibs="$add_dir $deplibs" - test -n "$add" && deplibs="$add $deplibs" - if test "$hardcode_direct" != yes && - test "$hardcode_minus_L" != yes && - test "$hardcode_shlibpath_var" = yes; then - case :$finalize_shlibpath: in - *":$libdir:"*) ;; - *) finalize_shlibpath="$finalize_shlibpath$libdir:" ;; - esac - fi - fi - fi - - if test "$linkmode" = prog || test "$mode" = relink; then - add_shlibpath= - add_dir= - add= - # Finalize command for both is simple: just hardcode it. - if test "$hardcode_direct" = yes && - test "$hardcode_direct_absolute" = no; then - add="$libdir/$linklib" - elif test "$hardcode_minus_L" = yes; then - add_dir="-L$libdir" - add="-l$name" - elif test "$hardcode_shlibpath_var" = yes; then - case :$finalize_shlibpath: in - *":$libdir:"*) ;; - *) finalize_shlibpath="$finalize_shlibpath$libdir:" ;; - esac - add="-l$name" - elif test "$hardcode_automatic" = yes; then - if test -n "$inst_prefix_dir" && - test -f "$inst_prefix_dir$libdir/$linklib" ; then - add="$inst_prefix_dir$libdir/$linklib" - else - add="$libdir/$linklib" - fi - else - # We cannot seem to hardcode it, guess we'll fake it. - add_dir="-L$libdir" - # Try looking first in the location we're being installed to. - if test -n "$inst_prefix_dir"; then - case $libdir in - [\\/]*) - add_dir="$add_dir -L$inst_prefix_dir$libdir" - ;; - esac - fi - add="-l$name" - fi - - if test "$linkmode" = prog; then - test -n "$add_dir" && finalize_deplibs="$add_dir $finalize_deplibs" - test -n "$add" && finalize_deplibs="$add $finalize_deplibs" - else - test -n "$add_dir" && deplibs="$add_dir $deplibs" - test -n "$add" && deplibs="$add $deplibs" - fi - fi - elif test "$linkmode" = prog; then - # Here we assume that one of hardcode_direct or hardcode_minus_L - # is not unsupported. This is valid on all known static and - # shared platforms. - if test "$hardcode_direct" != unsupported; then - test -n "$old_library" && linklib="$old_library" - compile_deplibs="$dir/$linklib $compile_deplibs" - finalize_deplibs="$dir/$linklib $finalize_deplibs" - else - compile_deplibs="-l$name -L$dir $compile_deplibs" - finalize_deplibs="-l$name -L$dir $finalize_deplibs" - fi - elif test "$build_libtool_libs" = yes; then - # Not a shared library - if test "$deplibs_check_method" != pass_all; then - # We're trying link a shared library against a static one - # but the system doesn't support it. - - # Just print a warning and add the library to dependency_libs so - # that the program can be linked against the static library. - $ECHO - $ECHO "*** Warning: This system can not link to static lib archive $lib." - $ECHO "*** I have the capability to make that library automatically link in when" - $ECHO "*** you link to this library. But I can only do this if you have a" - $ECHO "*** shared version of the library, which you do not appear to have." - if test "$module" = yes; then - $ECHO "*** But as you try to build a module library, libtool will still create " - $ECHO "*** a static module, that should work as long as the dlopening application" - $ECHO "*** is linked with the -dlopen flag to resolve symbols at runtime." - if test -z "$global_symbol_pipe"; then - $ECHO - $ECHO "*** However, this would only work if libtool was able to extract symbol" - $ECHO "*** lists from a program, using \`nm' or equivalent, but libtool could" - $ECHO "*** not find such a program. So, this module is probably useless." - $ECHO "*** \`nm' from GNU binutils and a full rebuild may help." - fi - if test "$build_old_libs" = no; then - build_libtool_libs=module - build_old_libs=yes - else - build_libtool_libs=no - fi - fi - else - deplibs="$dir/$old_library $deplibs" - link_static=yes - fi - fi # link shared/static library? - - if test "$linkmode" = lib; then - if test -n "$dependency_libs" && - { test "$hardcode_into_libs" != yes || - test "$build_old_libs" = yes || - test "$link_static" = yes; }; then - # Extract -R from dependency_libs - temp_deplibs= - for libdir in $dependency_libs; do - case $libdir in - -R*) func_stripname '-R' '' "$libdir" - temp_xrpath=$func_stripname_result - case " $xrpath " in - *" $temp_xrpath "*) ;; - *) xrpath="$xrpath $temp_xrpath";; - esac;; - *) temp_deplibs="$temp_deplibs $libdir";; - esac - done - dependency_libs="$temp_deplibs" - fi - - newlib_search_path="$newlib_search_path $absdir" - # Link against this library - test "$link_static" = no && newdependency_libs="$abs_ladir/$laname $newdependency_libs" - # ... and its dependency_libs - tmp_libs= - for deplib in $dependency_libs; do - newdependency_libs="$deplib $newdependency_libs" - if $opt_duplicate_deps ; then - case "$tmp_libs " in - *" $deplib "*) specialdeplibs="$specialdeplibs $deplib" ;; - esac - fi - tmp_libs="$tmp_libs $deplib" - done - - if test "$link_all_deplibs" != no; then - # Add the search paths of all dependency libraries - for deplib in $dependency_libs; do - case $deplib in - -L*) path="$deplib" ;; - *.la) - func_dirname "$deplib" "" "." - dir="$func_dirname_result" - # We need an absolute path. - case $dir in - [\\/]* | [A-Za-z]:[\\/]*) absdir="$dir" ;; - *) - absdir=`cd "$dir" && pwd` - if test -z "$absdir"; then - func_warning "cannot determine absolute directory name of \`$dir'" - absdir="$dir" - fi - ;; - esac - if $GREP "^installed=no" $deplib > /dev/null; then - case $host in - *-*-darwin*) - depdepl= - eval deplibrary_names=`${SED} -n -e 's/^library_names=\(.*\)$/\1/p' $deplib` - if test -n "$deplibrary_names" ; then - for tmp in $deplibrary_names ; do - depdepl=$tmp - done - if test -f "$absdir/$objdir/$depdepl" ; then - depdepl="$absdir/$objdir/$depdepl" - darwin_install_name=`${OTOOL} -L $depdepl | awk '{if (NR == 2) {print $1;exit}}'` - if test -z "$darwin_install_name"; then - darwin_install_name=`${OTOOL64} -L $depdepl | awk '{if (NR == 2) {print $1;exit}}'` - fi - compiler_flags="$compiler_flags ${wl}-dylib_file ${wl}${darwin_install_name}:${depdepl}" - linker_flags="$linker_flags -dylib_file ${darwin_install_name}:${depdepl}" - path= - fi - fi - ;; - *) - path="-L$absdir/$objdir" - ;; - esac - else - eval libdir=`${SED} -n -e 's/^libdir=\(.*\)$/\1/p' $deplib` - test -z "$libdir" && \ - func_fatal_error "\`$deplib' is not a valid libtool archive" - test "$absdir" != "$libdir" && \ - func_warning "\`$deplib' seems to be moved" - - path="-L$absdir" - fi - ;; - esac - case " $deplibs " in - *" $path "*) ;; - *) deplibs="$path $deplibs" ;; - esac - done - fi # link_all_deplibs != no - fi # linkmode = lib - done # for deplib in $libs - if test "$pass" = link; then - if test "$linkmode" = "prog"; then - compile_deplibs="$new_inherited_linker_flags $compile_deplibs" - finalize_deplibs="$new_inherited_linker_flags $finalize_deplibs" - else - compiler_flags="$compiler_flags "`$ECHO "X $new_inherited_linker_flags" | $Xsed -e 's% \([^ $]*\).ltframework% -framework \1%g'` - fi - fi - dependency_libs="$newdependency_libs" - if test "$pass" = dlpreopen; then - # Link the dlpreopened libraries before other libraries - for deplib in $save_deplibs; do - deplibs="$deplib $deplibs" - done - fi - if test "$pass" != dlopen; then - if test "$pass" != conv; then - # Make sure lib_search_path contains only unique directories. - lib_search_path= - for dir in $newlib_search_path; do - case "$lib_search_path " in - *" $dir "*) ;; - *) lib_search_path="$lib_search_path $dir" ;; - esac - done - newlib_search_path= - fi - - if test "$linkmode,$pass" != "prog,link"; then - vars="deplibs" - else - vars="compile_deplibs finalize_deplibs" - fi - for var in $vars dependency_libs; do - # Add libraries to $var in reverse order - eval tmp_libs=\"\$$var\" - new_libs= - for deplib in $tmp_libs; do - # FIXME: Pedantically, this is the right thing to do, so - # that some nasty dependency loop isn't accidentally - # broken: - #new_libs="$deplib $new_libs" - # Pragmatically, this seems to cause very few problems in - # practice: - case $deplib in - -L*) new_libs="$deplib $new_libs" ;; - -R*) ;; - *) - # And here is the reason: when a library appears more - # than once as an explicit dependence of a library, or - # is implicitly linked in more than once by the - # compiler, it is considered special, and multiple - # occurrences thereof are not removed. Compare this - # with having the same library being listed as a - # dependency of multiple other libraries: in this case, - # we know (pedantically, we assume) the library does not - # need to be listed more than once, so we keep only the - # last copy. This is not always right, but it is rare - # enough that we require users that really mean to play - # such unportable linking tricks to link the library - # using -Wl,-lname, so that libtool does not consider it - # for duplicate removal. - case " $specialdeplibs " in - *" $deplib "*) new_libs="$deplib $new_libs" ;; - *) - case " $new_libs " in - *" $deplib "*) ;; - *) new_libs="$deplib $new_libs" ;; - esac - ;; - esac - ;; - esac - done - tmp_libs= - for deplib in $new_libs; do - case $deplib in - -L*) - case " $tmp_libs " in - *" $deplib "*) ;; - *) tmp_libs="$tmp_libs $deplib" ;; - esac - ;; - *) tmp_libs="$tmp_libs $deplib" ;; - esac - done - eval $var=\"$tmp_libs\" - done # for var - fi - # Last step: remove runtime libs from dependency_libs - # (they stay in deplibs) - tmp_libs= - for i in $dependency_libs ; do - case " $predeps $postdeps $compiler_lib_search_path " in - *" $i "*) - i="" - ;; - esac - if test -n "$i" ; then - tmp_libs="$tmp_libs $i" - fi - done - dependency_libs=$tmp_libs - done # for pass - if test "$linkmode" = prog; then - dlfiles="$newdlfiles" - fi - if test "$linkmode" = prog || test "$linkmode" = lib; then - dlprefiles="$newdlprefiles" - fi - - case $linkmode in - oldlib) - if test -n "$dlfiles$dlprefiles" || test "$dlself" != no; then - func_warning "\`-dlopen' is ignored for archives" - fi - - case " $deplibs" in - *\ -l* | *\ -L*) - func_warning "\`-l' and \`-L' are ignored for archives" ;; - esac - - test -n "$rpath" && \ - func_warning "\`-rpath' is ignored for archives" - - test -n "$xrpath" && \ - func_warning "\`-R' is ignored for archives" - - test -n "$vinfo" && \ - func_warning "\`-version-info/-version-number' is ignored for archives" - - test -n "$release" && \ - func_warning "\`-release' is ignored for archives" - - test -n "$export_symbols$export_symbols_regex" && \ - func_warning "\`-export-symbols' is ignored for archives" - - # Now set the variables for building old libraries. - build_libtool_libs=no - oldlibs="$output" - objs="$objs$old_deplibs" - ;; - - lib) - # Make sure we only generate libraries of the form `libNAME.la'. - case $outputname in - lib*) - func_stripname 'lib' '.la' "$outputname" - name=$func_stripname_result - eval shared_ext=\"$shrext_cmds\" - eval libname=\"$libname_spec\" - ;; - *) - test "$module" = no && \ - func_fatal_help "libtool library \`$output' must begin with \`lib'" - - if test "$need_lib_prefix" != no; then - # Add the "lib" prefix for modules if required - func_stripname '' '.la' "$outputname" - name=$func_stripname_result - eval shared_ext=\"$shrext_cmds\" - eval libname=\"$libname_spec\" - else - func_stripname '' '.la' "$outputname" - libname=$func_stripname_result - fi - ;; - esac - - if test -n "$objs"; then - if test "$deplibs_check_method" != pass_all; then - func_fatal_error "cannot build libtool library \`$output' from non-libtool objects on this host:$objs" - else - $ECHO - $ECHO "*** Warning: Linking the shared library $output against the non-libtool" - $ECHO "*** objects $objs is not portable!" - libobjs="$libobjs $objs" - fi - fi - - test "$dlself" != no && \ - func_warning "\`-dlopen self' is ignored for libtool libraries" - - set dummy $rpath - shift - test "$#" -gt 1 && \ - func_warning "ignoring multiple \`-rpath's for a libtool library" - - install_libdir="$1" - - oldlibs= - if test -z "$rpath"; then - if test "$build_libtool_libs" = yes; then - # Building a libtool convenience library. - # Some compilers have problems with a `.al' extension so - # convenience libraries should have the same extension an - # archive normally would. - oldlibs="$output_objdir/$libname.$libext $oldlibs" - build_libtool_libs=convenience - build_old_libs=yes - fi - - test -n "$vinfo" && \ - func_warning "\`-version-info/-version-number' is ignored for convenience libraries" - - test -n "$release" && \ - func_warning "\`-release' is ignored for convenience libraries" - else - - # Parse the version information argument. - save_ifs="$IFS"; IFS=':' - set dummy $vinfo 0 0 0 - shift - IFS="$save_ifs" - - test -n "$7" && \ - func_fatal_help "too many parameters to \`-version-info'" - - # convert absolute version numbers to libtool ages - # this retains compatibility with .la files and attempts - # to make the code below a bit more comprehensible - - case $vinfo_number in - yes) - number_major="$1" - number_minor="$2" - number_revision="$3" - # - # There are really only two kinds -- those that - # use the current revision as the major version - # and those that subtract age and use age as - # a minor version. But, then there is irix - # which has an extra 1 added just for fun - # - case $version_type in - darwin|linux|osf|windows|none) - func_arith $number_major + $number_minor - current=$func_arith_result - age="$number_minor" - revision="$number_revision" - ;; - freebsd-aout|freebsd-elf|sunos) - current="$number_major" - revision="$number_minor" - age="0" - ;; - irix|nonstopux) - func_arith $number_major + $number_minor - current=$func_arith_result - age="$number_minor" - revision="$number_minor" - lt_irix_increment=no - ;; - esac - ;; - no) - current="$1" - revision="$2" - age="$3" - ;; - esac - - # Check that each of the things are valid numbers. - case $current in - 0|[1-9]|[1-9][0-9]|[1-9][0-9][0-9]|[1-9][0-9][0-9][0-9]|[1-9][0-9][0-9][0-9][0-9]) ;; - *) - func_error "CURRENT \`$current' must be a nonnegative integer" - func_fatal_error "\`$vinfo' is not valid version information" - ;; - esac - - case $revision in - 0|[1-9]|[1-9][0-9]|[1-9][0-9][0-9]|[1-9][0-9][0-9][0-9]|[1-9][0-9][0-9][0-9][0-9]) ;; - *) - func_error "REVISION \`$revision' must be a nonnegative integer" - func_fatal_error "\`$vinfo' is not valid version information" - ;; - esac - - case $age in - 0|[1-9]|[1-9][0-9]|[1-9][0-9][0-9]|[1-9][0-9][0-9][0-9]|[1-9][0-9][0-9][0-9][0-9]) ;; - *) - func_error "AGE \`$age' must be a nonnegative integer" - func_fatal_error "\`$vinfo' is not valid version information" - ;; - esac - - if test "$age" -gt "$current"; then - func_error "AGE \`$age' is greater than the current interface number \`$current'" - func_fatal_error "\`$vinfo' is not valid version information" - fi - - # Calculate the version variables. - major= - versuffix= - verstring= - case $version_type in - none) ;; - - darwin) - # Like Linux, but with the current version available in - # verstring for coding it into the library header - func_arith $current - $age - major=.$func_arith_result - versuffix="$major.$age.$revision" - # Darwin ld doesn't like 0 for these options... - func_arith $current + 1 - minor_current=$func_arith_result - xlcverstring="${wl}-compatibility_version ${wl}$minor_current ${wl}-current_version ${wl}$minor_current.$revision" - verstring="-compatibility_version $minor_current -current_version $minor_current.$revision" - ;; - - freebsd-aout) - major=".$current" - versuffix=".$current.$revision"; - ;; - - freebsd-elf) - major=".$current" - versuffix=".$current" - ;; - - irix | nonstopux) - if test "X$lt_irix_increment" = "Xno"; then - func_arith $current - $age - else - func_arith $current - $age + 1 - fi - major=$func_arith_result - - case $version_type in - nonstopux) verstring_prefix=nonstopux ;; - *) verstring_prefix=sgi ;; - esac - verstring="$verstring_prefix$major.$revision" - - # Add in all the interfaces that we are compatible with. - loop=$revision - while test "$loop" -ne 0; do - func_arith $revision - $loop - iface=$func_arith_result - func_arith $loop - 1 - loop=$func_arith_result - verstring="$verstring_prefix$major.$iface:$verstring" - done - - # Before this point, $major must not contain `.'. - major=.$major - versuffix="$major.$revision" - ;; - - linux) - func_arith $current - $age - major=.$func_arith_result - versuffix="$major.$age.$revision" - ;; - - osf) - func_arith $current - $age - major=.$func_arith_result - versuffix=".$current.$age.$revision" - verstring="$current.$age.$revision" - - # Add in all the interfaces that we are compatible with. - loop=$age - while test "$loop" -ne 0; do - func_arith $current - $loop - iface=$func_arith_result - func_arith $loop - 1 - loop=$func_arith_result - verstring="$verstring:${iface}.0" - done - - # Make executables depend on our current version. - verstring="$verstring:${current}.0" - ;; - - qnx) - major=".$current" - versuffix=".$current" - ;; - - sunos) - major=".$current" - versuffix=".$current.$revision" - ;; - - windows) - # Use '-' rather than '.', since we only want one - # extension on DOS 8.3 filesystems. - func_arith $current - $age - major=$func_arith_result - versuffix="-$major" - ;; - - *) - func_fatal_configuration "unknown library version type \`$version_type'" - ;; - esac - - # Clear the version info if we defaulted, and they specified a release. - if test -z "$vinfo" && test -n "$release"; then - major= - case $version_type in - darwin) - # we can't check for "0.0" in archive_cmds due to quoting - # problems, so we reset it completely - verstring= - ;; - *) - verstring="0.0" - ;; - esac - if test "$need_version" = no; then - versuffix= - else - versuffix=".0.0" - fi - fi - - # Remove version info from name if versioning should be avoided - if test "$avoid_version" = yes && test "$need_version" = no; then - major= - versuffix= - verstring="" - fi - - # Check to see if the archive will have undefined symbols. - if test "$allow_undefined" = yes; then - if test "$allow_undefined_flag" = unsupported; then - func_warning "undefined symbols not allowed in $host shared libraries" - build_libtool_libs=no - build_old_libs=yes - fi - else - # Don't allow undefined symbols. - allow_undefined_flag="$no_undefined_flag" - fi - - fi - - func_generate_dlsyms "$libname" "$libname" "yes" - libobjs="$libobjs $symfileobj" - test "X$libobjs" = "X " && libobjs= - - if test "$mode" != relink; then - # Remove our outputs, but don't remove object files since they - # may have been created when compiling PIC objects. - removelist= - tempremovelist=`$ECHO "$output_objdir/*"` - for p in $tempremovelist; do - case $p in - *.$objext | *.gcno) - ;; - $output_objdir/$outputname | $output_objdir/$libname.* | $output_objdir/${libname}${release}.*) - if test "X$precious_files_regex" != "X"; then - if $ECHO "$p" | $EGREP -e "$precious_files_regex" >/dev/null 2>&1 - then - continue - fi - fi - removelist="$removelist $p" - ;; - *) ;; - esac - done - test -n "$removelist" && \ - func_show_eval "${RM}r \$removelist" - fi - - # Now set the variables for building old libraries. - if test "$build_old_libs" = yes && test "$build_libtool_libs" != convenience ; then - oldlibs="$oldlibs $output_objdir/$libname.$libext" - - # Transform .lo files to .o files. - oldobjs="$objs "`$ECHO "X$libobjs" | $SP2NL | $Xsed -e '/\.'${libext}'$/d' -e "$lo2o" | $NL2SP` - fi - - # Eliminate all temporary directories. - #for path in $notinst_path; do - # lib_search_path=`$ECHO "X$lib_search_path " | $Xsed -e "s% $path % %g"` - # deplibs=`$ECHO "X$deplibs " | $Xsed -e "s% -L$path % %g"` - # dependency_libs=`$ECHO "X$dependency_libs " | $Xsed -e "s% -L$path % %g"` - #done - - if test -n "$xrpath"; then - # If the user specified any rpath flags, then add them. - temp_xrpath= - for libdir in $xrpath; do - temp_xrpath="$temp_xrpath -R$libdir" - case "$finalize_rpath " in - *" $libdir "*) ;; - *) finalize_rpath="$finalize_rpath $libdir" ;; - esac - done - if test "$hardcode_into_libs" != yes || test "$build_old_libs" = yes; then - dependency_libs="$temp_xrpath $dependency_libs" - fi - fi - - # Make sure dlfiles contains only unique files that won't be dlpreopened - old_dlfiles="$dlfiles" - dlfiles= - for lib in $old_dlfiles; do - case " $dlprefiles $dlfiles " in - *" $lib "*) ;; - *) dlfiles="$dlfiles $lib" ;; - esac - done - - # Make sure dlprefiles contains only unique files - old_dlprefiles="$dlprefiles" - dlprefiles= - for lib in $old_dlprefiles; do - case "$dlprefiles " in - *" $lib "*) ;; - *) dlprefiles="$dlprefiles $lib" ;; - esac - done - - if test "$build_libtool_libs" = yes; then - if test -n "$rpath"; then - case $host in - *-*-cygwin* | *-*-mingw* | *-*-pw32* | *-*-os2* | *-*-beos* | *-cegcc*) - # these systems don't actually have a c library (as such)! - ;; - *-*-rhapsody* | *-*-darwin1.[012]) - # Rhapsody C library is in the System framework - deplibs="$deplibs System.ltframework" - ;; - *-*-netbsd*) - # Don't link with libc until the a.out ld.so is fixed. - ;; - *-*-openbsd* | *-*-freebsd* | *-*-dragonfly*) - # Do not include libc due to us having libc/libc_r. - ;; - *-*-sco3.2v5* | *-*-sco5v6*) - # Causes problems with __ctype - ;; - *-*-sysv4.2uw2* | *-*-sysv5* | *-*-unixware* | *-*-OpenUNIX*) - # Compiler inserts libc in the correct place for threads to work - ;; - *) - # Add libc to deplibs on all other systems if necessary. - if test "$build_libtool_need_lc" = "yes"; then - deplibs="$deplibs -lc" - fi - ;; - esac - fi - - # Transform deplibs into only deplibs that can be linked in shared. - name_save=$name - libname_save=$libname - release_save=$release - versuffix_save=$versuffix - major_save=$major - # I'm not sure if I'm treating the release correctly. I think - # release should show up in the -l (ie -lgmp5) so we don't want to - # add it in twice. Is that correct? - release="" - versuffix="" - major="" - newdeplibs= - droppeddeps=no - case $deplibs_check_method in - pass_all) - # Don't check for shared/static. Everything works. - # This might be a little naive. We might want to check - # whether the library exists or not. But this is on - # osf3 & osf4 and I'm not really sure... Just - # implementing what was already the behavior. - newdeplibs=$deplibs - ;; - test_compile) - # This code stresses the "libraries are programs" paradigm to its - # limits. Maybe even breaks it. We compile a program, linking it - # against the deplibs as a proxy for the library. Then we can check - # whether they linked in statically or dynamically with ldd. - $opt_dry_run || $RM conftest.c - cat > conftest.c </dev/null` - for potent_lib in $potential_libs; do - # Follow soft links. - if ls -lLd "$potent_lib" 2>/dev/null | - $GREP " -> " >/dev/null; then - continue - fi - # The statement above tries to avoid entering an - # endless loop below, in case of cyclic links. - # We might still enter an endless loop, since a link - # loop can be closed while we follow links, - # but so what? - potlib="$potent_lib" - while test -h "$potlib" 2>/dev/null; do - potliblink=`ls -ld $potlib | ${SED} 's/.* -> //'` - case $potliblink in - [\\/]* | [A-Za-z]:[\\/]*) potlib="$potliblink";; - *) potlib=`$ECHO "X$potlib" | $Xsed -e 's,[^/]*$,,'`"$potliblink";; - esac - done - if eval $file_magic_cmd \"\$potlib\" 2>/dev/null | - $SED -e 10q | - $EGREP "$file_magic_regex" > /dev/null; then - newdeplibs="$newdeplibs $a_deplib" - a_deplib="" - break 2 - fi - done - done - fi - if test -n "$a_deplib" ; then - droppeddeps=yes - $ECHO - $ECHO "*** Warning: linker path does not have real file for library $a_deplib." - $ECHO "*** I have the capability to make that library automatically link in when" - $ECHO "*** you link to this library. But I can only do this if you have a" - $ECHO "*** shared version of the library, which you do not appear to have" - $ECHO "*** because I did check the linker path looking for a file starting" - if test -z "$potlib" ; then - $ECHO "*** with $libname but no candidates were found. (...for file magic test)" - else - $ECHO "*** with $libname and none of the candidates passed a file format test" - $ECHO "*** using a file magic. Last file checked: $potlib" - fi - fi - ;; - *) - # Add a -L argument. - newdeplibs="$newdeplibs $a_deplib" - ;; - esac - done # Gone through all deplibs. - ;; - match_pattern*) - set dummy $deplibs_check_method; shift - match_pattern_regex=`expr "$deplibs_check_method" : "$1 \(.*\)"` - for a_deplib in $deplibs; do - case $a_deplib in - -l*) - func_stripname -l '' "$a_deplib" - name=$func_stripname_result - if test "X$allow_libtool_libs_with_static_runtimes" = "Xyes" ; then - case " $predeps $postdeps " in - *" $a_deplib "*) - newdeplibs="$newdeplibs $a_deplib" - a_deplib="" - ;; - esac - fi - if test -n "$a_deplib" ; then - libname=`eval "\\$ECHO \"$libname_spec\""` - for i in $lib_search_path $sys_lib_search_path $shlib_search_path; do - potential_libs=`ls $i/$libname[.-]* 2>/dev/null` - for potent_lib in $potential_libs; do - potlib="$potent_lib" # see symlink-check above in file_magic test - if eval "\$ECHO \"X$potent_lib\"" 2>/dev/null | $Xsed -e 10q | \ - $EGREP "$match_pattern_regex" > /dev/null; then - newdeplibs="$newdeplibs $a_deplib" - a_deplib="" - break 2 - fi - done - done - fi - if test -n "$a_deplib" ; then - droppeddeps=yes - $ECHO - $ECHO "*** Warning: linker path does not have real file for library $a_deplib." - $ECHO "*** I have the capability to make that library automatically link in when" - $ECHO "*** you link to this library. But I can only do this if you have a" - $ECHO "*** shared version of the library, which you do not appear to have" - $ECHO "*** because I did check the linker path looking for a file starting" - if test -z "$potlib" ; then - $ECHO "*** with $libname but no candidates were found. (...for regex pattern test)" - else - $ECHO "*** with $libname and none of the candidates passed a file format test" - $ECHO "*** using a regex pattern. Last file checked: $potlib" - fi - fi - ;; - *) - # Add a -L argument. - newdeplibs="$newdeplibs $a_deplib" - ;; - esac - done # Gone through all deplibs. - ;; - none | unknown | *) - newdeplibs="" - tmp_deplibs=`$ECHO "X $deplibs" | $Xsed \ - -e 's/ -lc$//' -e 's/ -[LR][^ ]*//g'` - if test "X$allow_libtool_libs_with_static_runtimes" = "Xyes" ; then - for i in $predeps $postdeps ; do - # can't use Xsed below, because $i might contain '/' - tmp_deplibs=`$ECHO "X $tmp_deplibs" | $Xsed -e "s,$i,,"` - done - fi - if $ECHO "X $tmp_deplibs" | $Xsed -e 's/[ ]//g' | - $GREP . >/dev/null; then - $ECHO - if test "X$deplibs_check_method" = "Xnone"; then - $ECHO "*** Warning: inter-library dependencies are not supported in this platform." - else - $ECHO "*** Warning: inter-library dependencies are not known to be supported." - fi - $ECHO "*** All declared inter-library dependencies are being dropped." - droppeddeps=yes - fi - ;; - esac - versuffix=$versuffix_save - major=$major_save - release=$release_save - libname=$libname_save - name=$name_save - - case $host in - *-*-rhapsody* | *-*-darwin1.[012]) - # On Rhapsody replace the C library with the System framework - newdeplibs=`$ECHO "X $newdeplibs" | $Xsed -e 's/ -lc / System.ltframework /'` - ;; - esac - - if test "$droppeddeps" = yes; then - if test "$module" = yes; then - $ECHO - $ECHO "*** Warning: libtool could not satisfy all declared inter-library" - $ECHO "*** dependencies of module $libname. Therefore, libtool will create" - $ECHO "*** a static module, that should work as long as the dlopening" - $ECHO "*** application is linked with the -dlopen flag." - if test -z "$global_symbol_pipe"; then - $ECHO - $ECHO "*** However, this would only work if libtool was able to extract symbol" - $ECHO "*** lists from a program, using \`nm' or equivalent, but libtool could" - $ECHO "*** not find such a program. So, this module is probably useless." - $ECHO "*** \`nm' from GNU binutils and a full rebuild may help." - fi - if test "$build_old_libs" = no; then - oldlibs="$output_objdir/$libname.$libext" - build_libtool_libs=module - build_old_libs=yes - else - build_libtool_libs=no - fi - else - $ECHO "*** The inter-library dependencies that have been dropped here will be" - $ECHO "*** automatically added whenever a program is linked with this library" - $ECHO "*** or is declared to -dlopen it." - - if test "$allow_undefined" = no; then - $ECHO - $ECHO "*** Since this library must not contain undefined symbols," - $ECHO "*** because either the platform does not support them or" - $ECHO "*** it was explicitly requested with -no-undefined," - $ECHO "*** libtool will only create a static version of it." - if test "$build_old_libs" = no; then - oldlibs="$output_objdir/$libname.$libext" - build_libtool_libs=module - build_old_libs=yes - else - build_libtool_libs=no - fi - fi - fi - fi - # Done checking deplibs! - deplibs=$newdeplibs - fi - # Time to change all our "foo.ltframework" stuff back to "-framework foo" - case $host in - *-*-darwin*) - newdeplibs=`$ECHO "X $newdeplibs" | $Xsed -e 's% \([^ $]*\).ltframework% -framework \1%g'` - new_inherited_linker_flags=`$ECHO "X $new_inherited_linker_flags" | $Xsed -e 's% \([^ $]*\).ltframework% -framework \1%g'` - deplibs=`$ECHO "X $deplibs" | $Xsed -e 's% \([^ $]*\).ltframework% -framework \1%g'` - ;; - esac - - # move library search paths that coincide with paths to not yet - # installed libraries to the beginning of the library search list - new_libs= - for path in $notinst_path; do - case " $new_libs " in - *" -L$path/$objdir "*) ;; - *) - case " $deplibs " in - *" -L$path/$objdir "*) - new_libs="$new_libs -L$path/$objdir" ;; - esac - ;; - esac - done - for deplib in $deplibs; do - case $deplib in - -L*) - case " $new_libs " in - *" $deplib "*) ;; - *) new_libs="$new_libs $deplib" ;; - esac - ;; - *) new_libs="$new_libs $deplib" ;; - esac - done - deplibs="$new_libs" - - # All the library-specific variables (install_libdir is set above). - library_names= - old_library= - dlname= - - # Test again, we may have decided not to build it any more - if test "$build_libtool_libs" = yes; then - if test "$hardcode_into_libs" = yes; then - # Hardcode the library paths - hardcode_libdirs= - dep_rpath= - rpath="$finalize_rpath" - test "$mode" != relink && rpath="$compile_rpath$rpath" - for libdir in $rpath; do - if test -n "$hardcode_libdir_flag_spec"; then - if test -n "$hardcode_libdir_separator"; then - if test -z "$hardcode_libdirs"; then - hardcode_libdirs="$libdir" - else - # Just accumulate the unique libdirs. - case $hardcode_libdir_separator$hardcode_libdirs$hardcode_libdir_separator in - *"$hardcode_libdir_separator$libdir$hardcode_libdir_separator"*) - ;; - *) - hardcode_libdirs="$hardcode_libdirs$hardcode_libdir_separator$libdir" - ;; - esac - fi - else - eval flag=\"$hardcode_libdir_flag_spec\" - dep_rpath="$dep_rpath $flag" - fi - elif test -n "$runpath_var"; then - case "$perm_rpath " in - *" $libdir "*) ;; - *) perm_rpath="$perm_rpath $libdir" ;; - esac - fi - done - # Substitute the hardcoded libdirs into the rpath. - if test -n "$hardcode_libdir_separator" && - test -n "$hardcode_libdirs"; then - libdir="$hardcode_libdirs" - if test -n "$hardcode_libdir_flag_spec_ld"; then - eval dep_rpath=\"$hardcode_libdir_flag_spec_ld\" - else - eval dep_rpath=\"$hardcode_libdir_flag_spec\" - fi - fi - if test -n "$runpath_var" && test -n "$perm_rpath"; then - # We should set the runpath_var. - rpath= - for dir in $perm_rpath; do - rpath="$rpath$dir:" - done - eval "$runpath_var='$rpath\$$runpath_var'; export $runpath_var" - fi - test -n "$dep_rpath" && deplibs="$dep_rpath $deplibs" - fi - - shlibpath="$finalize_shlibpath" - test "$mode" != relink && shlibpath="$compile_shlibpath$shlibpath" - if test -n "$shlibpath"; then - eval "$shlibpath_var='$shlibpath\$$shlibpath_var'; export $shlibpath_var" - fi - - # Get the real and link names of the library. - eval shared_ext=\"$shrext_cmds\" - eval library_names=\"$library_names_spec\" - set dummy $library_names - shift - realname="$1" - shift - - if test -n "$soname_spec"; then - eval soname=\"$soname_spec\" - else - soname="$realname" - fi - if test -z "$dlname"; then - dlname=$soname - fi - - lib="$output_objdir/$realname" - linknames= - for link - do - linknames="$linknames $link" - done - - # Use standard objects if they are pic - test -z "$pic_flag" && libobjs=`$ECHO "X$libobjs" | $SP2NL | $Xsed -e "$lo2o" | $NL2SP` - test "X$libobjs" = "X " && libobjs= - - delfiles= - if test -n "$export_symbols" && test -n "$include_expsyms"; then - $opt_dry_run || cp "$export_symbols" "$output_objdir/$libname.uexp" - export_symbols="$output_objdir/$libname.uexp" - delfiles="$delfiles $export_symbols" - fi - - orig_export_symbols= - case $host_os in - cygwin* | mingw* | cegcc*) - if test -n "$export_symbols" && test -z "$export_symbols_regex"; then - # exporting using user supplied symfile - if test "x`$SED 1q $export_symbols`" != xEXPORTS; then - # and it's NOT already a .def file. Must figure out - # which of the given symbols are data symbols and tag - # them as such. So, trigger use of export_symbols_cmds. - # export_symbols gets reassigned inside the "prepare - # the list of exported symbols" if statement, so the - # include_expsyms logic still works. - orig_export_symbols="$export_symbols" - export_symbols= - always_export_symbols=yes - fi - fi - ;; - esac - - # Prepare the list of exported symbols - if test -z "$export_symbols"; then - if test "$always_export_symbols" = yes || test -n "$export_symbols_regex"; then - func_verbose "generating symbol list for \`$libname.la'" - export_symbols="$output_objdir/$libname.exp" - $opt_dry_run || $RM $export_symbols - cmds=$export_symbols_cmds - save_ifs="$IFS"; IFS='~' - for cmd in $cmds; do - IFS="$save_ifs" - eval cmd=\"$cmd\" - func_len " $cmd" - len=$func_len_result - if test "$len" -lt "$max_cmd_len" || test "$max_cmd_len" -le -1; then - func_show_eval "$cmd" 'exit $?' - skipped_export=false - else - # The command line is too long to execute in one step. - func_verbose "using reloadable object file for export list..." - skipped_export=: - # Break out early, otherwise skipped_export may be - # set to false by a later but shorter cmd. - break - fi - done - IFS="$save_ifs" - if test -n "$export_symbols_regex" && test "X$skipped_export" != "X:"; then - func_show_eval '$EGREP -e "$export_symbols_regex" "$export_symbols" > "${export_symbols}T"' - func_show_eval '$MV "${export_symbols}T" "$export_symbols"' - fi - fi - fi - - if test -n "$export_symbols" && test -n "$include_expsyms"; then - tmp_export_symbols="$export_symbols" - test -n "$orig_export_symbols" && tmp_export_symbols="$orig_export_symbols" - $opt_dry_run || eval '$ECHO "X$include_expsyms" | $Xsed | $SP2NL >> "$tmp_export_symbols"' - fi - - if test "X$skipped_export" != "X:" && test -n "$orig_export_symbols"; then - # The given exports_symbols file has to be filtered, so filter it. - func_verbose "filter symbol list for \`$libname.la' to tag DATA exports" - # FIXME: $output_objdir/$libname.filter potentially contains lots of - # 's' commands which not all seds can handle. GNU sed should be fine - # though. Also, the filter scales superlinearly with the number of - # global variables. join(1) would be nice here, but unfortunately - # isn't a blessed tool. - $opt_dry_run || $SED -e '/[ ,]DATA/!d;s,\(.*\)\([ \,].*\),s|^\1$|\1\2|,' < $export_symbols > $output_objdir/$libname.filter - delfiles="$delfiles $export_symbols $output_objdir/$libname.filter" - export_symbols=$output_objdir/$libname.def - $opt_dry_run || $SED -f $output_objdir/$libname.filter < $orig_export_symbols > $export_symbols - fi - - tmp_deplibs= - for test_deplib in $deplibs; do - case " $convenience " in - *" $test_deplib "*) ;; - *) - tmp_deplibs="$tmp_deplibs $test_deplib" - ;; - esac - done - deplibs="$tmp_deplibs" - - if test -n "$convenience"; then - if test -n "$whole_archive_flag_spec" && - test "$compiler_needs_object" = yes && - test -z "$libobjs"; then - # extract the archives, so we have objects to list. - # TODO: could optimize this to just extract one archive. - whole_archive_flag_spec= - fi - if test -n "$whole_archive_flag_spec"; then - save_libobjs=$libobjs - eval libobjs=\"\$libobjs $whole_archive_flag_spec\" - test "X$libobjs" = "X " && libobjs= - else - gentop="$output_objdir/${outputname}x" - generated="$generated $gentop" - - func_extract_archives $gentop $convenience - libobjs="$libobjs $func_extract_archives_result" - test "X$libobjs" = "X " && libobjs= - fi - fi - - if test "$thread_safe" = yes && test -n "$thread_safe_flag_spec"; then - eval flag=\"$thread_safe_flag_spec\" - linker_flags="$linker_flags $flag" - fi - - # Make a backup of the uninstalled library when relinking - if test "$mode" = relink; then - $opt_dry_run || eval '(cd $output_objdir && $RM ${realname}U && $MV $realname ${realname}U)' || exit $? - fi - - # Do each of the archive commands. - if test "$module" = yes && test -n "$module_cmds" ; then - if test -n "$export_symbols" && test -n "$module_expsym_cmds"; then - eval test_cmds=\"$module_expsym_cmds\" - cmds=$module_expsym_cmds - else - eval test_cmds=\"$module_cmds\" - cmds=$module_cmds - fi - else - if test -n "$export_symbols" && test -n "$archive_expsym_cmds"; then - eval test_cmds=\"$archive_expsym_cmds\" - cmds=$archive_expsym_cmds - else - eval test_cmds=\"$archive_cmds\" - cmds=$archive_cmds - fi - fi - - if test "X$skipped_export" != "X:" && - func_len " $test_cmds" && - len=$func_len_result && - test "$len" -lt "$max_cmd_len" || test "$max_cmd_len" -le -1; then - : - else - # The command line is too long to link in one step, link piecewise - # or, if using GNU ld and skipped_export is not :, use a linker - # script. - - # Save the value of $output and $libobjs because we want to - # use them later. If we have whole_archive_flag_spec, we - # want to use save_libobjs as it was before - # whole_archive_flag_spec was expanded, because we can't - # assume the linker understands whole_archive_flag_spec. - # This may have to be revisited, in case too many - # convenience libraries get linked in and end up exceeding - # the spec. - if test -z "$convenience" || test -z "$whole_archive_flag_spec"; then - save_libobjs=$libobjs - fi - save_output=$output - output_la=`$ECHO "X$output" | $Xsed -e "$basename"` - - # Clear the reloadable object creation command queue and - # initialize k to one. - test_cmds= - concat_cmds= - objlist= - last_robj= - k=1 - - if test -n "$save_libobjs" && test "X$skipped_export" != "X:" && test "$with_gnu_ld" = yes; then - output=${output_objdir}/${output_la}.lnkscript - func_verbose "creating GNU ld script: $output" - $ECHO 'INPUT (' > $output - for obj in $save_libobjs - do - $ECHO "$obj" >> $output - done - $ECHO ')' >> $output - delfiles="$delfiles $output" - elif test -n "$save_libobjs" && test "X$skipped_export" != "X:" && test "X$file_list_spec" != X; then - output=${output_objdir}/${output_la}.lnk - func_verbose "creating linker input file list: $output" - : > $output - set x $save_libobjs - shift - firstobj= - if test "$compiler_needs_object" = yes; then - firstobj="$1 " - shift - fi - for obj - do - $ECHO "$obj" >> $output - done - delfiles="$delfiles $output" - output=$firstobj\"$file_list_spec$output\" - else - if test -n "$save_libobjs"; then - func_verbose "creating reloadable object files..." - output=$output_objdir/$output_la-${k}.$objext - eval test_cmds=\"$reload_cmds\" - func_len " $test_cmds" - len0=$func_len_result - len=$len0 - - # Loop over the list of objects to be linked. - for obj in $save_libobjs - do - func_len " $obj" - func_arith $len + $func_len_result - len=$func_arith_result - if test "X$objlist" = X || - test "$len" -lt "$max_cmd_len"; then - func_append objlist " $obj" - else - # The command $test_cmds is almost too long, add a - # command to the queue. - if test "$k" -eq 1 ; then - # The first file doesn't have a previous command to add. - eval concat_cmds=\"$reload_cmds $objlist $last_robj\" - else - # All subsequent reloadable object files will link in - # the last one created. - eval concat_cmds=\"\$concat_cmds~$reload_cmds $objlist $last_robj~\$RM $last_robj\" - fi - last_robj=$output_objdir/$output_la-${k}.$objext - func_arith $k + 1 - k=$func_arith_result - output=$output_objdir/$output_la-${k}.$objext - objlist=$obj - func_len " $last_robj" - func_arith $len0 + $func_len_result - len=$func_arith_result - fi - done - # Handle the remaining objects by creating one last - # reloadable object file. All subsequent reloadable object - # files will link in the last one created. - test -z "$concat_cmds" || concat_cmds=$concat_cmds~ - eval concat_cmds=\"\${concat_cmds}$reload_cmds $objlist $last_robj\" - if test -n "$last_robj"; then - eval concat_cmds=\"\${concat_cmds}~\$RM $last_robj\" - fi - delfiles="$delfiles $output" - - else - output= - fi - - if ${skipped_export-false}; then - func_verbose "generating symbol list for \`$libname.la'" - export_symbols="$output_objdir/$libname.exp" - $opt_dry_run || $RM $export_symbols - libobjs=$output - # Append the command to create the export file. - test -z "$concat_cmds" || concat_cmds=$concat_cmds~ - eval concat_cmds=\"\$concat_cmds$export_symbols_cmds\" - if test -n "$last_robj"; then - eval concat_cmds=\"\$concat_cmds~\$RM $last_robj\" - fi - fi - - test -n "$save_libobjs" && - func_verbose "creating a temporary reloadable object file: $output" - - # Loop through the commands generated above and execute them. - save_ifs="$IFS"; IFS='~' - for cmd in $concat_cmds; do - IFS="$save_ifs" - $opt_silent || { - func_quote_for_expand "$cmd" - eval "func_echo $func_quote_for_expand_result" - } - $opt_dry_run || eval "$cmd" || { - lt_exit=$? - - # Restore the uninstalled library and exit - if test "$mode" = relink; then - ( cd "$output_objdir" && \ - $RM "${realname}T" && \ - $MV "${realname}U" "$realname" ) - fi - - exit $lt_exit - } - done - IFS="$save_ifs" - - if test -n "$export_symbols_regex" && ${skipped_export-false}; then - func_show_eval '$EGREP -e "$export_symbols_regex" "$export_symbols" > "${export_symbols}T"' - func_show_eval '$MV "${export_symbols}T" "$export_symbols"' - fi - fi - - if ${skipped_export-false}; then - if test -n "$export_symbols" && test -n "$include_expsyms"; then - tmp_export_symbols="$export_symbols" - test -n "$orig_export_symbols" && tmp_export_symbols="$orig_export_symbols" - $opt_dry_run || eval '$ECHO "X$include_expsyms" | $Xsed | $SP2NL >> "$tmp_export_symbols"' - fi - - if test -n "$orig_export_symbols"; then - # The given exports_symbols file has to be filtered, so filter it. - func_verbose "filter symbol list for \`$libname.la' to tag DATA exports" - # FIXME: $output_objdir/$libname.filter potentially contains lots of - # 's' commands which not all seds can handle. GNU sed should be fine - # though. Also, the filter scales superlinearly with the number of - # global variables. join(1) would be nice here, but unfortunately - # isn't a blessed tool. - $opt_dry_run || $SED -e '/[ ,]DATA/!d;s,\(.*\)\([ \,].*\),s|^\1$|\1\2|,' < $export_symbols > $output_objdir/$libname.filter - delfiles="$delfiles $export_symbols $output_objdir/$libname.filter" - export_symbols=$output_objdir/$libname.def - $opt_dry_run || $SED -f $output_objdir/$libname.filter < $orig_export_symbols > $export_symbols - fi - fi - - libobjs=$output - # Restore the value of output. - output=$save_output - - if test -n "$convenience" && test -n "$whole_archive_flag_spec"; then - eval libobjs=\"\$libobjs $whole_archive_flag_spec\" - test "X$libobjs" = "X " && libobjs= - fi - # Expand the library linking commands again to reset the - # value of $libobjs for piecewise linking. - - # Do each of the archive commands. - if test "$module" = yes && test -n "$module_cmds" ; then - if test -n "$export_symbols" && test -n "$module_expsym_cmds"; then - cmds=$module_expsym_cmds - else - cmds=$module_cmds - fi - else - if test -n "$export_symbols" && test -n "$archive_expsym_cmds"; then - cmds=$archive_expsym_cmds - else - cmds=$archive_cmds - fi - fi - fi - - if test -n "$delfiles"; then - # Append the command to remove temporary files to $cmds. - eval cmds=\"\$cmds~\$RM $delfiles\" - fi - - # Add any objects from preloaded convenience libraries - if test -n "$dlprefiles"; then - gentop="$output_objdir/${outputname}x" - generated="$generated $gentop" - - func_extract_archives $gentop $dlprefiles - libobjs="$libobjs $func_extract_archives_result" - test "X$libobjs" = "X " && libobjs= - fi - - save_ifs="$IFS"; IFS='~' - for cmd in $cmds; do - IFS="$save_ifs" - eval cmd=\"$cmd\" - $opt_silent || { - func_quote_for_expand "$cmd" - eval "func_echo $func_quote_for_expand_result" - } - $opt_dry_run || eval "$cmd" || { - lt_exit=$? - - # Restore the uninstalled library and exit - if test "$mode" = relink; then - ( cd "$output_objdir" && \ - $RM "${realname}T" && \ - $MV "${realname}U" "$realname" ) - fi - - exit $lt_exit - } - done - IFS="$save_ifs" - - # Restore the uninstalled library and exit - if test "$mode" = relink; then - $opt_dry_run || eval '(cd $output_objdir && $RM ${realname}T && $MV $realname ${realname}T && $MV ${realname}U $realname)' || exit $? - - if test -n "$convenience"; then - if test -z "$whole_archive_flag_spec"; then - func_show_eval '${RM}r "$gentop"' - fi - fi - - exit $EXIT_SUCCESS - fi - - # Create links to the real library. - for linkname in $linknames; do - if test "$realname" != "$linkname"; then - func_show_eval '(cd "$output_objdir" && $RM "$linkname" && $LN_S "$realname" "$linkname")' 'exit $?' - fi - done - - # If -module or -export-dynamic was specified, set the dlname. - if test "$module" = yes || test "$export_dynamic" = yes; then - # On all known operating systems, these are identical. - dlname="$soname" - fi - fi - ;; - - obj) - if test -n "$dlfiles$dlprefiles" || test "$dlself" != no; then - func_warning "\`-dlopen' is ignored for objects" - fi - - case " $deplibs" in - *\ -l* | *\ -L*) - func_warning "\`-l' and \`-L' are ignored for objects" ;; - esac - - test -n "$rpath" && \ - func_warning "\`-rpath' is ignored for objects" - - test -n "$xrpath" && \ - func_warning "\`-R' is ignored for objects" - - test -n "$vinfo" && \ - func_warning "\`-version-info' is ignored for objects" - - test -n "$release" && \ - func_warning "\`-release' is ignored for objects" - - case $output in - *.lo) - test -n "$objs$old_deplibs" && \ - func_fatal_error "cannot build library object \`$output' from non-libtool objects" - - libobj=$output - func_lo2o "$libobj" - obj=$func_lo2o_result - ;; - *) - libobj= - obj="$output" - ;; - esac - - # Delete the old objects. - $opt_dry_run || $RM $obj $libobj - - # Objects from convenience libraries. This assumes - # single-version convenience libraries. Whenever we create - # different ones for PIC/non-PIC, this we'll have to duplicate - # the extraction. - reload_conv_objs= - gentop= - # reload_cmds runs $LD directly, so let us get rid of - # -Wl from whole_archive_flag_spec and hope we can get by with - # turning comma into space.. - wl= - - if test -n "$convenience"; then - if test -n "$whole_archive_flag_spec"; then - eval tmp_whole_archive_flags=\"$whole_archive_flag_spec\" - reload_conv_objs=$reload_objs\ `$ECHO "X$tmp_whole_archive_flags" | $Xsed -e 's|,| |g'` - else - gentop="$output_objdir/${obj}x" - generated="$generated $gentop" - - func_extract_archives $gentop $convenience - reload_conv_objs="$reload_objs $func_extract_archives_result" - fi - fi - - # Create the old-style object. - reload_objs="$objs$old_deplibs "`$ECHO "X$libobjs" | $SP2NL | $Xsed -e '/\.'${libext}$'/d' -e '/\.lib$/d' -e "$lo2o" | $NL2SP`" $reload_conv_objs" ### testsuite: skip nested quoting test - - output="$obj" - func_execute_cmds "$reload_cmds" 'exit $?' - - # Exit if we aren't doing a library object file. - if test -z "$libobj"; then - if test -n "$gentop"; then - func_show_eval '${RM}r "$gentop"' - fi - - exit $EXIT_SUCCESS - fi - - if test "$build_libtool_libs" != yes; then - if test -n "$gentop"; then - func_show_eval '${RM}r "$gentop"' - fi - - # Create an invalid libtool object if no PIC, so that we don't - # accidentally link it into a program. - # $show "echo timestamp > $libobj" - # $opt_dry_run || eval "echo timestamp > $libobj" || exit $? - exit $EXIT_SUCCESS - fi - - if test -n "$pic_flag" || test "$pic_mode" != default; then - # Only do commands if we really have different PIC objects. - reload_objs="$libobjs $reload_conv_objs" - output="$libobj" - func_execute_cmds "$reload_cmds" 'exit $?' - fi - - if test -n "$gentop"; then - func_show_eval '${RM}r "$gentop"' - fi - - exit $EXIT_SUCCESS - ;; - - prog) - case $host in - *cygwin*) func_stripname '' '.exe' "$output" - output=$func_stripname_result.exe;; - esac - test -n "$vinfo" && \ - func_warning "\`-version-info' is ignored for programs" - - test -n "$release" && \ - func_warning "\`-release' is ignored for programs" - - test "$preload" = yes \ - && test "$dlopen_support" = unknown \ - && test "$dlopen_self" = unknown \ - && test "$dlopen_self_static" = unknown && \ - func_warning "\`LT_INIT([dlopen])' not used. Assuming no dlopen support." - - case $host in - *-*-rhapsody* | *-*-darwin1.[012]) - # On Rhapsody replace the C library is the System framework - compile_deplibs=`$ECHO "X $compile_deplibs" | $Xsed -e 's/ -lc / System.ltframework /'` - finalize_deplibs=`$ECHO "X $finalize_deplibs" | $Xsed -e 's/ -lc / System.ltframework /'` - ;; - esac - - case $host in - *-*-darwin*) - # Don't allow lazy linking, it breaks C++ global constructors - # But is supposedly fixed on 10.4 or later (yay!). - if test "$tagname" = CXX ; then - case ${MACOSX_DEPLOYMENT_TARGET-10.0} in - 10.[0123]) - compile_command="$compile_command ${wl}-bind_at_load" - finalize_command="$finalize_command ${wl}-bind_at_load" - ;; - esac - fi - # Time to change all our "foo.ltframework" stuff back to "-framework foo" - compile_deplibs=`$ECHO "X $compile_deplibs" | $Xsed -e 's% \([^ $]*\).ltframework% -framework \1%g'` - finalize_deplibs=`$ECHO "X $finalize_deplibs" | $Xsed -e 's% \([^ $]*\).ltframework% -framework \1%g'` - ;; - esac - - - # move library search paths that coincide with paths to not yet - # installed libraries to the beginning of the library search list - new_libs= - for path in $notinst_path; do - case " $new_libs " in - *" -L$path/$objdir "*) ;; - *) - case " $compile_deplibs " in - *" -L$path/$objdir "*) - new_libs="$new_libs -L$path/$objdir" ;; - esac - ;; - esac - done - for deplib in $compile_deplibs; do - case $deplib in - -L*) - case " $new_libs " in - *" $deplib "*) ;; - *) new_libs="$new_libs $deplib" ;; - esac - ;; - *) new_libs="$new_libs $deplib" ;; - esac - done - compile_deplibs="$new_libs" - - - compile_command="$compile_command $compile_deplibs" - finalize_command="$finalize_command $finalize_deplibs" - - if test -n "$rpath$xrpath"; then - # If the user specified any rpath flags, then add them. - for libdir in $rpath $xrpath; do - # This is the magic to use -rpath. - case "$finalize_rpath " in - *" $libdir "*) ;; - *) finalize_rpath="$finalize_rpath $libdir" ;; - esac - done - fi - - # Now hardcode the library paths - rpath= - hardcode_libdirs= - for libdir in $compile_rpath $finalize_rpath; do - if test -n "$hardcode_libdir_flag_spec"; then - if test -n "$hardcode_libdir_separator"; then - if test -z "$hardcode_libdirs"; then - hardcode_libdirs="$libdir" - else - # Just accumulate the unique libdirs. - case $hardcode_libdir_separator$hardcode_libdirs$hardcode_libdir_separator in - *"$hardcode_libdir_separator$libdir$hardcode_libdir_separator"*) - ;; - *) - hardcode_libdirs="$hardcode_libdirs$hardcode_libdir_separator$libdir" - ;; - esac - fi - else - eval flag=\"$hardcode_libdir_flag_spec\" - rpath="$rpath $flag" - fi - elif test -n "$runpath_var"; then - case "$perm_rpath " in - *" $libdir "*) ;; - *) perm_rpath="$perm_rpath $libdir" ;; - esac - fi - case $host in - *-*-cygwin* | *-*-mingw* | *-*-pw32* | *-*-os2* | *-cegcc*) - testbindir=`${ECHO} "$libdir" | ${SED} -e 's*/lib$*/bin*'` - case :$dllsearchpath: in - *":$libdir:"*) ;; - ::) dllsearchpath=$libdir;; - *) dllsearchpath="$dllsearchpath:$libdir";; - esac - case :$dllsearchpath: in - *":$testbindir:"*) ;; - ::) dllsearchpath=$testbindir;; - *) dllsearchpath="$dllsearchpath:$testbindir";; - esac - ;; - esac - done - # Substitute the hardcoded libdirs into the rpath. - if test -n "$hardcode_libdir_separator" && - test -n "$hardcode_libdirs"; then - libdir="$hardcode_libdirs" - eval rpath=\" $hardcode_libdir_flag_spec\" - fi - compile_rpath="$rpath" - - rpath= - hardcode_libdirs= - for libdir in $finalize_rpath; do - if test -n "$hardcode_libdir_flag_spec"; then - if test -n "$hardcode_libdir_separator"; then - if test -z "$hardcode_libdirs"; then - hardcode_libdirs="$libdir" - else - # Just accumulate the unique libdirs. - case $hardcode_libdir_separator$hardcode_libdirs$hardcode_libdir_separator in - *"$hardcode_libdir_separator$libdir$hardcode_libdir_separator"*) - ;; - *) - hardcode_libdirs="$hardcode_libdirs$hardcode_libdir_separator$libdir" - ;; - esac - fi - else - eval flag=\"$hardcode_libdir_flag_spec\" - rpath="$rpath $flag" - fi - elif test -n "$runpath_var"; then - case "$finalize_perm_rpath " in - *" $libdir "*) ;; - *) finalize_perm_rpath="$finalize_perm_rpath $libdir" ;; - esac - fi - done - # Substitute the hardcoded libdirs into the rpath. - if test -n "$hardcode_libdir_separator" && - test -n "$hardcode_libdirs"; then - libdir="$hardcode_libdirs" - eval rpath=\" $hardcode_libdir_flag_spec\" - fi - finalize_rpath="$rpath" - - if test -n "$libobjs" && test "$build_old_libs" = yes; then - # Transform all the library objects into standard objects. - compile_command=`$ECHO "X$compile_command" | $SP2NL | $Xsed -e "$lo2o" | $NL2SP` - finalize_command=`$ECHO "X$finalize_command" | $SP2NL | $Xsed -e "$lo2o" | $NL2SP` - fi - - func_generate_dlsyms "$outputname" "@PROGRAM@" "no" - - # template prelinking step - if test -n "$prelink_cmds"; then - func_execute_cmds "$prelink_cmds" 'exit $?' - fi - - wrappers_required=yes - case $host in - *cygwin* | *mingw* ) - if test "$build_libtool_libs" != yes; then - wrappers_required=no - fi - ;; - *cegcc) - # Disable wrappers for cegcc, we are cross compiling anyway. - wrappers_required=no - ;; - *) - if test "$need_relink" = no || test "$build_libtool_libs" != yes; then - wrappers_required=no - fi - ;; - esac - if test "$wrappers_required" = no; then - # Replace the output file specification. - compile_command=`$ECHO "X$compile_command" | $Xsed -e 's%@OUTPUT@%'"$output"'%g'` - link_command="$compile_command$compile_rpath" - - # We have no uninstalled library dependencies, so finalize right now. - exit_status=0 - func_show_eval "$link_command" 'exit_status=$?' - - # Delete the generated files. - if test -f "$output_objdir/${outputname}S.${objext}"; then - func_show_eval '$RM "$output_objdir/${outputname}S.${objext}"' - fi - - exit $exit_status - fi - - if test -n "$compile_shlibpath$finalize_shlibpath"; then - compile_command="$shlibpath_var=\"$compile_shlibpath$finalize_shlibpath\$$shlibpath_var\" $compile_command" - fi - if test -n "$finalize_shlibpath"; then - finalize_command="$shlibpath_var=\"$finalize_shlibpath\$$shlibpath_var\" $finalize_command" - fi - - compile_var= - finalize_var= - if test -n "$runpath_var"; then - if test -n "$perm_rpath"; then - # We should set the runpath_var. - rpath= - for dir in $perm_rpath; do - rpath="$rpath$dir:" - done - compile_var="$runpath_var=\"$rpath\$$runpath_var\" " - fi - if test -n "$finalize_perm_rpath"; then - # We should set the runpath_var. - rpath= - for dir in $finalize_perm_rpath; do - rpath="$rpath$dir:" - done - finalize_var="$runpath_var=\"$rpath\$$runpath_var\" " - fi - fi - - if test "$no_install" = yes; then - # We don't need to create a wrapper script. - link_command="$compile_var$compile_command$compile_rpath" - # Replace the output file specification. - link_command=`$ECHO "X$link_command" | $Xsed -e 's%@OUTPUT@%'"$output"'%g'` - # Delete the old output file. - $opt_dry_run || $RM $output - # Link the executable and exit - func_show_eval "$link_command" 'exit $?' - exit $EXIT_SUCCESS - fi - - if test "$hardcode_action" = relink; then - # Fast installation is not supported - link_command="$compile_var$compile_command$compile_rpath" - relink_command="$finalize_var$finalize_command$finalize_rpath" - - func_warning "this platform does not like uninstalled shared libraries" - func_warning "\`$output' will be relinked during installation" - else - if test "$fast_install" != no; then - link_command="$finalize_var$compile_command$finalize_rpath" - if test "$fast_install" = yes; then - relink_command=`$ECHO "X$compile_var$compile_command$compile_rpath" | $Xsed -e 's%@OUTPUT@%\$progdir/\$file%g'` - else - # fast_install is set to needless - relink_command= - fi - else - link_command="$compile_var$compile_command$compile_rpath" - relink_command="$finalize_var$finalize_command$finalize_rpath" - fi - fi - - # Replace the output file specification. - link_command=`$ECHO "X$link_command" | $Xsed -e 's%@OUTPUT@%'"$output_objdir/$outputname"'%g'` - - # Delete the old output files. - $opt_dry_run || $RM $output $output_objdir/$outputname $output_objdir/lt-$outputname - - func_show_eval "$link_command" 'exit $?' - - # Now create the wrapper script. - func_verbose "creating $output" - - # Quote the relink command for shipping. - if test -n "$relink_command"; then - # Preserve any variables that may affect compiler behavior - for var in $variables_saved_for_relink; do - if eval test -z \"\${$var+set}\"; then - relink_command="{ test -z \"\${$var+set}\" || $lt_unset $var || { $var=; export $var; }; }; $relink_command" - elif eval var_value=\$$var; test -z "$var_value"; then - relink_command="$var=; export $var; $relink_command" - else - func_quote_for_eval "$var_value" - relink_command="$var=$func_quote_for_eval_result; export $var; $relink_command" - fi - done - relink_command="(cd `pwd`; $relink_command)" - relink_command=`$ECHO "X$relink_command" | $Xsed -e "$sed_quote_subst"` - fi - - # Quote $ECHO for shipping. - if test "X$ECHO" = "X$SHELL $progpath --fallback-echo"; then - case $progpath in - [\\/]* | [A-Za-z]:[\\/]*) qecho="$SHELL $progpath --fallback-echo";; - *) qecho="$SHELL `pwd`/$progpath --fallback-echo";; - esac - qecho=`$ECHO "X$qecho" | $Xsed -e "$sed_quote_subst"` - else - qecho=`$ECHO "X$ECHO" | $Xsed -e "$sed_quote_subst"` - fi - - # Only actually do things if not in dry run mode. - $opt_dry_run || { - # win32 will think the script is a binary if it has - # a .exe suffix, so we strip it off here. - case $output in - *.exe) func_stripname '' '.exe' "$output" - output=$func_stripname_result ;; - esac - # test for cygwin because mv fails w/o .exe extensions - case $host in - *cygwin*) - exeext=.exe - func_stripname '' '.exe' "$outputname" - outputname=$func_stripname_result ;; - *) exeext= ;; - esac - case $host in - *cygwin* | *mingw* ) - func_dirname_and_basename "$output" "" "." - output_name=$func_basename_result - output_path=$func_dirname_result - cwrappersource="$output_path/$objdir/lt-$output_name.c" - cwrapper="$output_path/$output_name.exe" - $RM $cwrappersource $cwrapper - trap "$RM $cwrappersource $cwrapper; exit $EXIT_FAILURE" 1 2 15 - - func_emit_cwrapperexe_src > $cwrappersource - - # The wrapper executable is built using the $host compiler, - # because it contains $host paths and files. If cross- - # compiling, it, like the target executable, must be - # executed on the $host or under an emulation environment. - $opt_dry_run || { - $LTCC $LTCFLAGS -o $cwrapper $cwrappersource - $STRIP $cwrapper - } - - # Now, create the wrapper script for func_source use: - func_ltwrapper_scriptname $cwrapper - $RM $func_ltwrapper_scriptname_result - trap "$RM $func_ltwrapper_scriptname_result; exit $EXIT_FAILURE" 1 2 15 - $opt_dry_run || { - # note: this script will not be executed, so do not chmod. - if test "x$build" = "x$host" ; then - $cwrapper --lt-dump-script > $func_ltwrapper_scriptname_result - else - func_emit_wrapper no > $func_ltwrapper_scriptname_result - fi - } - ;; - * ) - $RM $output - trap "$RM $output; exit $EXIT_FAILURE" 1 2 15 - - func_emit_wrapper no > $output - chmod +x $output - ;; - esac - } - exit $EXIT_SUCCESS - ;; - esac - - # See if we need to build an old-fashioned archive. - for oldlib in $oldlibs; do - - if test "$build_libtool_libs" = convenience; then - oldobjs="$libobjs_save $symfileobj" - addlibs="$convenience" - build_libtool_libs=no - else - if test "$build_libtool_libs" = module; then - oldobjs="$libobjs_save" - build_libtool_libs=no - else - oldobjs="$old_deplibs $non_pic_objects" - if test "$preload" = yes && test -f "$symfileobj"; then - oldobjs="$oldobjs $symfileobj" - fi - fi - addlibs="$old_convenience" - fi - - if test -n "$addlibs"; then - gentop="$output_objdir/${outputname}x" - generated="$generated $gentop" - - func_extract_archives $gentop $addlibs - oldobjs="$oldobjs $func_extract_archives_result" - fi - - # Do each command in the archive commands. - if test -n "$old_archive_from_new_cmds" && test "$build_libtool_libs" = yes; then - cmds=$old_archive_from_new_cmds - else - - # Add any objects from preloaded convenience libraries - if test -n "$dlprefiles"; then - gentop="$output_objdir/${outputname}x" - generated="$generated $gentop" - - func_extract_archives $gentop $dlprefiles - oldobjs="$oldobjs $func_extract_archives_result" - fi - - # POSIX demands no paths to be encoded in archives. We have - # to avoid creating archives with duplicate basenames if we - # might have to extract them afterwards, e.g., when creating a - # static archive out of a convenience library, or when linking - # the entirety of a libtool archive into another (currently - # not supported by libtool). - if (for obj in $oldobjs - do - func_basename "$obj" - $ECHO "$func_basename_result" - done | sort | sort -uc >/dev/null 2>&1); then - : - else - $ECHO "copying selected object files to avoid basename conflicts..." - gentop="$output_objdir/${outputname}x" - generated="$generated $gentop" - func_mkdir_p "$gentop" - save_oldobjs=$oldobjs - oldobjs= - counter=1 - for obj in $save_oldobjs - do - func_basename "$obj" - objbase="$func_basename_result" - case " $oldobjs " in - " ") oldobjs=$obj ;; - *[\ /]"$objbase "*) - while :; do - # Make sure we don't pick an alternate name that also - # overlaps. - newobj=lt$counter-$objbase - func_arith $counter + 1 - counter=$func_arith_result - case " $oldobjs " in - *[\ /]"$newobj "*) ;; - *) if test ! -f "$gentop/$newobj"; then break; fi ;; - esac - done - func_show_eval "ln $obj $gentop/$newobj || cp $obj $gentop/$newobj" - oldobjs="$oldobjs $gentop/$newobj" - ;; - *) oldobjs="$oldobjs $obj" ;; - esac - done - fi - eval cmds=\"$old_archive_cmds\" - - func_len " $cmds" - len=$func_len_result - if test "$len" -lt "$max_cmd_len" || test "$max_cmd_len" -le -1; then - cmds=$old_archive_cmds - else - # the command line is too long to link in one step, link in parts - func_verbose "using piecewise archive linking..." - save_RANLIB=$RANLIB - RANLIB=: - objlist= - concat_cmds= - save_oldobjs=$oldobjs - oldobjs= - # Is there a better way of finding the last object in the list? - for obj in $save_oldobjs - do - last_oldobj=$obj - done - eval test_cmds=\"$old_archive_cmds\" - func_len " $test_cmds" - len0=$func_len_result - len=$len0 - for obj in $save_oldobjs - do - func_len " $obj" - func_arith $len + $func_len_result - len=$func_arith_result - func_append objlist " $obj" - if test "$len" -lt "$max_cmd_len"; then - : - else - # the above command should be used before it gets too long - oldobjs=$objlist - if test "$obj" = "$last_oldobj" ; then - RANLIB=$save_RANLIB - fi - test -z "$concat_cmds" || concat_cmds=$concat_cmds~ - eval concat_cmds=\"\${concat_cmds}$old_archive_cmds\" - objlist= - len=$len0 - fi - done - RANLIB=$save_RANLIB - oldobjs=$objlist - if test "X$oldobjs" = "X" ; then - eval cmds=\"\$concat_cmds\" - else - eval cmds=\"\$concat_cmds~\$old_archive_cmds\" - fi - fi - fi - func_execute_cmds "$cmds" 'exit $?' - done - - test -n "$generated" && \ - func_show_eval "${RM}r$generated" - - # Now create the libtool archive. - case $output in - *.la) - old_library= - test "$build_old_libs" = yes && old_library="$libname.$libext" - func_verbose "creating $output" - - # Preserve any variables that may affect compiler behavior - for var in $variables_saved_for_relink; do - if eval test -z \"\${$var+set}\"; then - relink_command="{ test -z \"\${$var+set}\" || $lt_unset $var || { $var=; export $var; }; }; $relink_command" - elif eval var_value=\$$var; test -z "$var_value"; then - relink_command="$var=; export $var; $relink_command" - else - func_quote_for_eval "$var_value" - relink_command="$var=$func_quote_for_eval_result; export $var; $relink_command" - fi - done - # Quote the link command for shipping. - relink_command="(cd `pwd`; $SHELL $progpath $preserve_args --mode=relink $libtool_args @inst_prefix_dir@)" - relink_command=`$ECHO "X$relink_command" | $Xsed -e "$sed_quote_subst"` - if test "$hardcode_automatic" = yes ; then - relink_command= - fi - - # Only create the output if not a dry run. - $opt_dry_run || { - for installed in no yes; do - if test "$installed" = yes; then - if test -z "$install_libdir"; then - break - fi - output="$output_objdir/$outputname"i - # Replace all uninstalled libtool libraries with the installed ones - newdependency_libs= - for deplib in $dependency_libs; do - case $deplib in - *.la) - func_basename "$deplib" - name="$func_basename_result" - eval libdir=`${SED} -n -e 's/^libdir=\(.*\)$/\1/p' $deplib` - test -z "$libdir" && \ - func_fatal_error "\`$deplib' is not a valid libtool archive" - newdependency_libs="$newdependency_libs $libdir/$name" - ;; - *) newdependency_libs="$newdependency_libs $deplib" ;; - esac - done - dependency_libs="$newdependency_libs" - newdlfiles= - - for lib in $dlfiles; do - case $lib in - *.la) - func_basename "$lib" - name="$func_basename_result" - eval libdir=`${SED} -n -e 's/^libdir=\(.*\)$/\1/p' $lib` - test -z "$libdir" && \ - func_fatal_error "\`$lib' is not a valid libtool archive" - newdlfiles="$newdlfiles $libdir/$name" - ;; - *) newdlfiles="$newdlfiles $lib" ;; - esac - done - dlfiles="$newdlfiles" - newdlprefiles= - for lib in $dlprefiles; do - case $lib in - *.la) - # Only pass preopened files to the pseudo-archive (for - # eventual linking with the app. that links it) if we - # didn't already link the preopened objects directly into - # the library: - func_basename "$lib" - name="$func_basename_result" - eval libdir=`${SED} -n -e 's/^libdir=\(.*\)$/\1/p' $lib` - test -z "$libdir" && \ - func_fatal_error "\`$lib' is not a valid libtool archive" - newdlprefiles="$newdlprefiles $libdir/$name" - ;; - esac - done - dlprefiles="$newdlprefiles" - else - newdlfiles= - for lib in $dlfiles; do - case $lib in - [\\/]* | [A-Za-z]:[\\/]*) abs="$lib" ;; - *) abs=`pwd`"/$lib" ;; - esac - newdlfiles="$newdlfiles $abs" - done - dlfiles="$newdlfiles" - newdlprefiles= - for lib in $dlprefiles; do - case $lib in - [\\/]* | [A-Za-z]:[\\/]*) abs="$lib" ;; - *) abs=`pwd`"/$lib" ;; - esac - newdlprefiles="$newdlprefiles $abs" - done - dlprefiles="$newdlprefiles" - fi - $RM $output - # place dlname in correct position for cygwin - tdlname=$dlname - case $host,$output,$installed,$module,$dlname in - *cygwin*,*lai,yes,no,*.dll | *mingw*,*lai,yes,no,*.dll | *cegcc*,*lai,yes,no,*.dll) tdlname=../bin/$dlname ;; - esac - $ECHO > $output "\ -# $outputname - a libtool library file -# Generated by $PROGRAM (GNU $PACKAGE$TIMESTAMP) $VERSION -# -# Please DO NOT delete this file! -# It is necessary for linking the library. - -# The name that we can dlopen(3). -dlname='$tdlname' - -# Names of this library. -library_names='$library_names' - -# The name of the static archive. -old_library='$old_library' - -# Linker flags that can not go in dependency_libs. -inherited_linker_flags='$new_inherited_linker_flags' - -# Libraries that this one depends upon. -dependency_libs='$dependency_libs' - -# Names of additional weak libraries provided by this library -weak_library_names='$weak_libs' - -# Version information for $libname. -current=$current -age=$age -revision=$revision - -# Is this an already installed library? -installed=$installed - -# Should we warn about portability when linking against -modules? -shouldnotlink=$module - -# Files to dlopen/dlpreopen -dlopen='$dlfiles' -dlpreopen='$dlprefiles' - -# Directory that this library needs to be installed in: -libdir='$install_libdir'" - if test "$installed" = no && test "$need_relink" = yes; then - $ECHO >> $output "\ -relink_command=\"$relink_command\"" - fi - done - } - - # Do a symbolic link so that the libtool archive can be found in - # LD_LIBRARY_PATH before the program is installed. - func_show_eval '( cd "$output_objdir" && $RM "$outputname" && $LN_S "../$outputname" "$outputname" )' 'exit $?' - ;; - esac - exit $EXIT_SUCCESS -} - -{ test "$mode" = link || test "$mode" = relink; } && - func_mode_link ${1+"$@"} - - -# func_mode_uninstall arg... -func_mode_uninstall () -{ - $opt_debug - RM="$nonopt" - files= - rmforce= - exit_status=0 - - # This variable tells wrapper scripts just to set variables rather - # than running their programs. - libtool_install_magic="$magic" - - for arg - do - case $arg in - -f) RM="$RM $arg"; rmforce=yes ;; - -*) RM="$RM $arg" ;; - *) files="$files $arg" ;; - esac - done - - test -z "$RM" && \ - func_fatal_help "you must specify an RM program" - - rmdirs= - - origobjdir="$objdir" - for file in $files; do - func_dirname "$file" "" "." - dir="$func_dirname_result" - if test "X$dir" = X.; then - objdir="$origobjdir" - else - objdir="$dir/$origobjdir" - fi - func_basename "$file" - name="$func_basename_result" - test "$mode" = uninstall && objdir="$dir" - - # Remember objdir for removal later, being careful to avoid duplicates - if test "$mode" = clean; then - case " $rmdirs " in - *" $objdir "*) ;; - *) rmdirs="$rmdirs $objdir" ;; - esac - fi - - # Don't error if the file doesn't exist and rm -f was used. - if { test -L "$file"; } >/dev/null 2>&1 || - { test -h "$file"; } >/dev/null 2>&1 || - test -f "$file"; then - : - elif test -d "$file"; then - exit_status=1 - continue - elif test "$rmforce" = yes; then - continue - fi - - rmfiles="$file" - - case $name in - *.la) - # Possibly a libtool archive, so verify it. - if func_lalib_p "$file"; then - func_source $dir/$name - - # Delete the libtool libraries and symlinks. - for n in $library_names; do - rmfiles="$rmfiles $objdir/$n" - done - test -n "$old_library" && rmfiles="$rmfiles $objdir/$old_library" - - case "$mode" in - clean) - case " $library_names " in - # " " in the beginning catches empty $dlname - *" $dlname "*) ;; - *) rmfiles="$rmfiles $objdir/$dlname" ;; - esac - test -n "$libdir" && rmfiles="$rmfiles $objdir/$name $objdir/${name}i" - ;; - uninstall) - if test -n "$library_names"; then - # Do each command in the postuninstall commands. - func_execute_cmds "$postuninstall_cmds" 'test "$rmforce" = yes || exit_status=1' - fi - - if test -n "$old_library"; then - # Do each command in the old_postuninstall commands. - func_execute_cmds "$old_postuninstall_cmds" 'test "$rmforce" = yes || exit_status=1' - fi - # FIXME: should reinstall the best remaining shared library. - ;; - esac - fi - ;; - - *.lo) - # Possibly a libtool object, so verify it. - if func_lalib_p "$file"; then - - # Read the .lo file - func_source $dir/$name - - # Add PIC object to the list of files to remove. - if test -n "$pic_object" && - test "$pic_object" != none; then - rmfiles="$rmfiles $dir/$pic_object" - fi - - # Add non-PIC object to the list of files to remove. - if test -n "$non_pic_object" && - test "$non_pic_object" != none; then - rmfiles="$rmfiles $dir/$non_pic_object" - fi - fi - ;; - - *) - if test "$mode" = clean ; then - noexename=$name - case $file in - *.exe) - func_stripname '' '.exe' "$file" - file=$func_stripname_result - func_stripname '' '.exe' "$name" - noexename=$func_stripname_result - # $file with .exe has already been added to rmfiles, - # add $file without .exe - rmfiles="$rmfiles $file" - ;; - esac - # Do a test to see if this is a libtool program. - if func_ltwrapper_p "$file"; then - if func_ltwrapper_executable_p "$file"; then - func_ltwrapper_scriptname "$file" - relink_command= - func_source $func_ltwrapper_scriptname_result - rmfiles="$rmfiles $func_ltwrapper_scriptname_result" - else - relink_command= - func_source $dir/$noexename - fi - - # note $name still contains .exe if it was in $file originally - # as does the version of $file that was added into $rmfiles - rmfiles="$rmfiles $objdir/$name $objdir/${name}S.${objext}" - if test "$fast_install" = yes && test -n "$relink_command"; then - rmfiles="$rmfiles $objdir/lt-$name" - fi - if test "X$noexename" != "X$name" ; then - rmfiles="$rmfiles $objdir/lt-${noexename}.c" - fi - fi - fi - ;; - esac - func_show_eval "$RM $rmfiles" 'exit_status=1' - done - objdir="$origobjdir" - - # Try to remove the ${objdir}s in the directories where we deleted files - for dir in $rmdirs; do - if test -d "$dir"; then - func_show_eval "rmdir $dir >/dev/null 2>&1" - fi - done - - exit $exit_status -} - -{ test "$mode" = uninstall || test "$mode" = clean; } && - func_mode_uninstall ${1+"$@"} - -test -z "$mode" && { - help="$generic_help" - func_fatal_help "you must specify a MODE" -} - -test -z "$exec_cmd" && \ - func_fatal_help "invalid operation mode \`$mode'" - -if test -n "$exec_cmd"; then - eval exec "$exec_cmd" - exit $EXIT_FAILURE -fi - -exit $exit_status - - -# The TAGs below are defined such that we never get into a situation -# in which we disable both kinds of libraries. Given conflicting -# choices, we go for a static library, that is the most portable, -# since we can't tell whether shared libraries were disabled because -# the user asked for that or because the platform doesn't support -# them. This is particularly important on AIX, because we don't -# support having both static and shared libraries enabled at the same -# time on that platform, so we default to a shared-only configuration. -# If a disable-shared tag is given, we'll fallback to a static-only -# configuration. But we'll never go from static-only to shared-only. - -# ### BEGIN LIBTOOL TAG CONFIG: disable-shared -build_libtool_libs=no -build_old_libs=yes -# ### END LIBTOOL TAG CONFIG: disable-shared - -# ### BEGIN LIBTOOL TAG CONFIG: disable-static -build_old_libs=`case $build_libtool_libs in yes) echo no;; *) echo yes;; esac` -# ### END LIBTOOL TAG CONFIG: disable-static - -# Local Variables: -# mode:shell-script -# sh-indentation:2 -# End: -# vi:sw=2 - diff --git a/test/test-automation/build-scripts/missing b/test/test-automation/build-scripts/missing deleted file mode 100755 index 28055d2ae..000000000 --- a/test/test-automation/build-scripts/missing +++ /dev/null @@ -1,376 +0,0 @@ -#! /bin/sh -# Common stub for a few missing GNU programs while installing. - -scriptversion=2009-04-28.21; # UTC - -# Copyright (C) 1996, 1997, 1999, 2000, 2002, 2003, 2004, 2005, 2006, -# 2008, 2009 Free Software Foundation, Inc. -# Originally by Fran,cois Pinard , 1996. - -# This program is free software; you can redistribute it and/or modify -# it under the terms of the GNU General Public License as published by -# the Free Software Foundation; either version 2, or (at your option) -# any later version. - -# This program is distributed in the hope that it will be useful, -# but WITHOUT ANY WARRANTY; without even the implied warranty of -# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the -# GNU General Public License for more details. - -# You should have received a copy of the GNU General Public License -# along with this program. If not, see . - -# As a special exception to the GNU General Public License, if you -# distribute this file as part of a program that contains a -# configuration script generated by Autoconf, you may include it under -# the same distribution terms that you use for the rest of that program. - -if test $# -eq 0; then - echo 1>&2 "Try \`$0 --help' for more information" - exit 1 -fi - -run=: -sed_output='s/.* --output[ =]\([^ ]*\).*/\1/p' -sed_minuso='s/.* -o \([^ ]*\).*/\1/p' - -# In the cases where this matters, `missing' is being run in the -# srcdir already. -if test -f configure.ac; then - configure_ac=configure.ac -else - configure_ac=configure.in -fi - -msg="missing on your system" - -case $1 in ---run) - # Try to run requested program, and just exit if it succeeds. - run= - shift - "$@" && exit 0 - # Exit code 63 means version mismatch. This often happens - # when the user try to use an ancient version of a tool on - # a file that requires a minimum version. In this case we - # we should proceed has if the program had been absent, or - # if --run hadn't been passed. - if test $? = 63; then - run=: - msg="probably too old" - fi - ;; - - -h|--h|--he|--hel|--help) - echo "\ -$0 [OPTION]... PROGRAM [ARGUMENT]... - -Handle \`PROGRAM [ARGUMENT]...' for when PROGRAM is missing, or return an -error status if there is no known handling for PROGRAM. - -Options: - -h, --help display this help and exit - -v, --version output version information and exit - --run try to run the given command, and emulate it if it fails - -Supported PROGRAM values: - aclocal touch file \`aclocal.m4' - autoconf touch file \`configure' - autoheader touch file \`config.h.in' - autom4te touch the output file, or create a stub one - automake touch all \`Makefile.in' files - bison create \`y.tab.[ch]', if possible, from existing .[ch] - flex create \`lex.yy.c', if possible, from existing .c - help2man touch the output file - lex create \`lex.yy.c', if possible, from existing .c - makeinfo touch the output file - tar try tar, gnutar, gtar, then tar without non-portable flags - yacc create \`y.tab.[ch]', if possible, from existing .[ch] - -Version suffixes to PROGRAM as well as the prefixes \`gnu-', \`gnu', and -\`g' are ignored when checking the name. - -Send bug reports to ." - exit $? - ;; - - -v|--v|--ve|--ver|--vers|--versi|--versio|--version) - echo "missing $scriptversion (GNU Automake)" - exit $? - ;; - - -*) - echo 1>&2 "$0: Unknown \`$1' option" - echo 1>&2 "Try \`$0 --help' for more information" - exit 1 - ;; - -esac - -# normalize program name to check for. -program=`echo "$1" | sed ' - s/^gnu-//; t - s/^gnu//; t - s/^g//; t'` - -# Now exit if we have it, but it failed. Also exit now if we -# don't have it and --version was passed (most likely to detect -# the program). This is about non-GNU programs, so use $1 not -# $program. -case $1 in - lex*|yacc*) - # Not GNU programs, they don't have --version. - ;; - - tar*) - if test -n "$run"; then - echo 1>&2 "ERROR: \`tar' requires --run" - exit 1 - elif test "x$2" = "x--version" || test "x$2" = "x--help"; then - exit 1 - fi - ;; - - *) - if test -z "$run" && ($1 --version) > /dev/null 2>&1; then - # We have it, but it failed. - exit 1 - elif test "x$2" = "x--version" || test "x$2" = "x--help"; then - # Could not run --version or --help. This is probably someone - # running `$TOOL --version' or `$TOOL --help' to check whether - # $TOOL exists and not knowing $TOOL uses missing. - exit 1 - fi - ;; -esac - -# If it does not exist, or fails to run (possibly an outdated version), -# try to emulate it. -case $program in - aclocal*) - echo 1>&2 "\ -WARNING: \`$1' is $msg. You should only need it if - you modified \`acinclude.m4' or \`${configure_ac}'. You might want - to install the \`Automake' and \`Perl' packages. Grab them from - any GNU archive site." - touch aclocal.m4 - ;; - - autoconf*) - echo 1>&2 "\ -WARNING: \`$1' is $msg. You should only need it if - you modified \`${configure_ac}'. You might want to install the - \`Autoconf' and \`GNU m4' packages. Grab them from any GNU - archive site." - touch configure - ;; - - autoheader*) - echo 1>&2 "\ -WARNING: \`$1' is $msg. You should only need it if - you modified \`acconfig.h' or \`${configure_ac}'. You might want - to install the \`Autoconf' and \`GNU m4' packages. Grab them - from any GNU archive site." - files=`sed -n 's/^[ ]*A[CM]_CONFIG_HEADER(\([^)]*\)).*/\1/p' ${configure_ac}` - test -z "$files" && files="config.h" - touch_files= - for f in $files; do - case $f in - *:*) touch_files="$touch_files "`echo "$f" | - sed -e 's/^[^:]*://' -e 's/:.*//'`;; - *) touch_files="$touch_files $f.in";; - esac - done - touch $touch_files - ;; - - automake*) - echo 1>&2 "\ -WARNING: \`$1' is $msg. You should only need it if - you modified \`Makefile.am', \`acinclude.m4' or \`${configure_ac}'. - You might want to install the \`Automake' and \`Perl' packages. - Grab them from any GNU archive site." - find . -type f -name Makefile.am -print | - sed 's/\.am$/.in/' | - while read f; do touch "$f"; done - ;; - - autom4te*) - echo 1>&2 "\ -WARNING: \`$1' is needed, but is $msg. - You might have modified some files without having the - proper tools for further handling them. - You can get \`$1' as part of \`Autoconf' from any GNU - archive site." - - file=`echo "$*" | sed -n "$sed_output"` - test -z "$file" && file=`echo "$*" | sed -n "$sed_minuso"` - if test -f "$file"; then - touch $file - else - test -z "$file" || exec >$file - echo "#! /bin/sh" - echo "# Created by GNU Automake missing as a replacement of" - echo "# $ $@" - echo "exit 0" - chmod +x $file - exit 1 - fi - ;; - - bison*|yacc*) - echo 1>&2 "\ -WARNING: \`$1' $msg. You should only need it if - you modified a \`.y' file. You may need the \`Bison' package - in order for those modifications to take effect. You can get - \`Bison' from any GNU archive site." - rm -f y.tab.c y.tab.h - if test $# -ne 1; then - eval LASTARG="\${$#}" - case $LASTARG in - *.y) - SRCFILE=`echo "$LASTARG" | sed 's/y$/c/'` - if test -f "$SRCFILE"; then - cp "$SRCFILE" y.tab.c - fi - SRCFILE=`echo "$LASTARG" | sed 's/y$/h/'` - if test -f "$SRCFILE"; then - cp "$SRCFILE" y.tab.h - fi - ;; - esac - fi - if test ! -f y.tab.h; then - echo >y.tab.h - fi - if test ! -f y.tab.c; then - echo 'main() { return 0; }' >y.tab.c - fi - ;; - - lex*|flex*) - echo 1>&2 "\ -WARNING: \`$1' is $msg. You should only need it if - you modified a \`.l' file. You may need the \`Flex' package - in order for those modifications to take effect. You can get - \`Flex' from any GNU archive site." - rm -f lex.yy.c - if test $# -ne 1; then - eval LASTARG="\${$#}" - case $LASTARG in - *.l) - SRCFILE=`echo "$LASTARG" | sed 's/l$/c/'` - if test -f "$SRCFILE"; then - cp "$SRCFILE" lex.yy.c - fi - ;; - esac - fi - if test ! -f lex.yy.c; then - echo 'main() { return 0; }' >lex.yy.c - fi - ;; - - help2man*) - echo 1>&2 "\ -WARNING: \`$1' is $msg. You should only need it if - you modified a dependency of a manual page. You may need the - \`Help2man' package in order for those modifications to take - effect. You can get \`Help2man' from any GNU archive site." - - file=`echo "$*" | sed -n "$sed_output"` - test -z "$file" && file=`echo "$*" | sed -n "$sed_minuso"` - if test -f "$file"; then - touch $file - else - test -z "$file" || exec >$file - echo ".ab help2man is required to generate this page" - exit $? - fi - ;; - - makeinfo*) - echo 1>&2 "\ -WARNING: \`$1' is $msg. You should only need it if - you modified a \`.texi' or \`.texinfo' file, or any other file - indirectly affecting the aspect of the manual. The spurious - call might also be the consequence of using a buggy \`make' (AIX, - DU, IRIX). You might want to install the \`Texinfo' package or - the \`GNU make' package. Grab either from any GNU archive site." - # The file to touch is that specified with -o ... - file=`echo "$*" | sed -n "$sed_output"` - test -z "$file" && file=`echo "$*" | sed -n "$sed_minuso"` - if test -z "$file"; then - # ... or it is the one specified with @setfilename ... - infile=`echo "$*" | sed 's/.* \([^ ]*\) *$/\1/'` - file=`sed -n ' - /^@setfilename/{ - s/.* \([^ ]*\) *$/\1/ - p - q - }' $infile` - # ... or it is derived from the source name (dir/f.texi becomes f.info) - test -z "$file" && file=`echo "$infile" | sed 's,.*/,,;s,.[^.]*$,,'`.info - fi - # If the file does not exist, the user really needs makeinfo; - # let's fail without touching anything. - test -f $file || exit 1 - touch $file - ;; - - tar*) - shift - - # We have already tried tar in the generic part. - # Look for gnutar/gtar before invocation to avoid ugly error - # messages. - if (gnutar --version > /dev/null 2>&1); then - gnutar "$@" && exit 0 - fi - if (gtar --version > /dev/null 2>&1); then - gtar "$@" && exit 0 - fi - firstarg="$1" - if shift; then - case $firstarg in - *o*) - firstarg=`echo "$firstarg" | sed s/o//` - tar "$firstarg" "$@" && exit 0 - ;; - esac - case $firstarg in - *h*) - firstarg=`echo "$firstarg" | sed s/h//` - tar "$firstarg" "$@" && exit 0 - ;; - esac - fi - - echo 1>&2 "\ -WARNING: I can't seem to be able to run \`tar' with the given arguments. - You may want to install GNU tar or Free paxutils, or check the - command line arguments." - exit 1 - ;; - - *) - echo 1>&2 "\ -WARNING: \`$1' is needed, and is $msg. - You might have modified some files without having the - proper tools for further handling them. Check the \`README' file, - it often tells you about the needed prerequisites for installing - this package. You may also peek at any GNU archive site, in case - some other package would contain this missing \`$1' program." - exit 1 - ;; -esac - -exit 0 - -# Local variables: -# eval: (add-hook 'write-file-hooks 'time-stamp) -# time-stamp-start: "scriptversion=" -# time-stamp-format: "%:y-%02m-%02d.%02H" -# time-stamp-time-zone: "UTC" -# time-stamp-end: "; # UTC" -# End: diff --git a/test/test-automation/config.h.in b/test/test-automation/config.h.in deleted file mode 100644 index 32063649c..000000000 --- a/test/test-automation/config.h.in +++ /dev/null @@ -1,86 +0,0 @@ -/* config.h.in. Generated from configure.ac by autoheader. */ - -/* Define to 1 if you have the header file. */ -#undef HAVE_DLFCN_H - -/* Define to 1 if you have the `fork' function. */ -#undef HAVE_FORK - -/* Define to 1 if you have the header file. */ -#undef HAVE_INTTYPES_H - -/* Define to 1 if you have the header file. */ -#undef HAVE_MEMORY_H - -/* Define to 1 if you have the header file. */ -#undef HAVE_STDINT_H - -/* Define to 1 if you have the header file. */ -#undef HAVE_STDLIB_H - -/* Define to 1 if you have the header file. */ -#undef HAVE_STRINGS_H - -/* Define to 1 if you have the header file. */ -#undef HAVE_STRING_H - -/* Define to 1 if you have the header file. */ -#undef HAVE_SYS_STAT_H - -/* Define to 1 if you have the header file. */ -#undef HAVE_SYS_TYPES_H - -/* Define to 1 if you have the header file. */ -#undef HAVE_UNISTD_H - -/* Define to 1 if you have the `vfork' function. */ -#undef HAVE_VFORK - -/* Define to 1 if you have the header file. */ -#undef HAVE_VFORK_H - -/* Define to 1 if `fork' works. */ -#undef HAVE_WORKING_FORK - -/* Define to 1 if `vfork' works. */ -#undef HAVE_WORKING_VFORK - -/* Define to the sub-directory in which libtool stores uninstalled libraries. - */ -#undef LT_OBJDIR - -/* Define to 1 if your C compiler doesn't accept -c and -o together. */ -#undef NO_MINUS_C_MINUS_O - -/* Name of package */ -#undef PACKAGE - -/* Define to the address where bug reports for this package should be sent. */ -#undef PACKAGE_BUGREPORT - -/* Define to the full name of this package. */ -#undef PACKAGE_NAME - -/* Define to the full name and version of this package. */ -#undef PACKAGE_STRING - -/* Define to the one symbol short name of this package. */ -#undef PACKAGE_TARNAME - -/* Define to the home page for this package. */ -#undef PACKAGE_URL - -/* Define to the version of this package. */ -#undef PACKAGE_VERSION - -/* Define to 1 if you have the ANSI C header files. */ -#undef STDC_HEADERS - -/* Version number of package */ -#undef VERSION - -/* Define to `int' if does not define. */ -#undef pid_t - -/* Define as `fork' if `vfork' does not work. */ -#undef vfork diff --git a/test/test-automation/configure.ac b/test/test-automation/configure.ac deleted file mode 100644 index bc24d941f..000000000 --- a/test/test-automation/configure.ac +++ /dev/null @@ -1,57 +0,0 @@ -# -*- Autoconf -*- -# Process this file with autoconf to produce a configure script. - -AC_PREREQ([2.65]) -AC_INIT([runner], [0.01], [markus.kauppila@gmail.com]) -AC_CONFIG_SRCDIR([src/runner/runner.c]) -AC_CONFIG_HEADERS([config.h]) -AC_CONFIG_MACRO_DIR(acinclude) -AC_CONFIG_AUX_DIR(build-scripts) - -AM_INIT_AUTOMAKE - -#libdir="$(pwd)/tests" -#AC_SUBST([libdir]) - -# Checks for programs. -AC_PROG_CC -AC_PROG_INSTALL -AC_PROG_LIBTOOL -AM_PROG_CC_C_O - -# Checks for libraries. - -# Checks for header files. -AC_CHECK_HEADERS([stdlib.h unistd.h]) - -# Checks for typedefs, structures, and compiler characteristics. - -# without this debugging information will be stripped (at least on OS X) -CFLAGS="-g" - -# Checks for library functions. -AC_FUNC_FORK - -AC_CONFIG_FILES([Makefile - src/runner/Makefile - src/libSDLtest/Makefile - tests/testdummy/Makefile - tests/testrect/Makefile - tests/testplatform/Makefile - tests/testaudio/Makefile - tests/testsurface/Makefile - tests/testrwops/Makefile - tests/testvideo/Makefile - tests/testsyswm/Makefile - tests/testclipboard/Makefile - tests/testevents/Makefile - tests/testkeyboard/Makefile - tests/testrender/Makefile]) - -AC_OUTPUT - -echo "" -echo "========================================" -echo "" -echo "./configure ready!" -echo "you're ready to run: 'make && sudo make install'" diff --git a/test/test-automation/data/images/icon.bmp b/test/test-automation/data/images/icon.bmp deleted file mode 100644 index cc96356acb521c7f1518acdb2a3b5d59b8a061aa..0000000000000000000000000000000000000000 GIT binary patch literal 0 HcmV?d00001 literal 578 zcmcgo!45(p3@cA>UhKX=dh$EC`zika5yQrU5^p9pX-H`|#@eGDa5MmS0Jq74a~KEk zyaZ2xv-cieo - - This software is provided 'as-is', without any express or implied - warranty. In no event will the authors be held liable for any damages - arising from the use of this software. - - Permission is granted to anyone to use this software for any purpose, - including commercial applications, and to alter it and redistribute it - freely, subject to the following restrictions: - - 1. The origin of this software must not be misrepresented; you must not - claim that you wrote the original software. If you use this software - in a product, an acknowledgment in the product documentation would be - appreciated but is not required. - 2. Altered source versions must be plainly marked as such, and must not be - misrepresented as being the original software. - 3. This notice may not be removed or altered from any source distribution. -*/ - -#ifndef _SDL_TEST_H -#define _SDL_TEST_H - -#include "../src/runner/logger.h" - -#include "../src/libSDLtest/common/common.h" -#include "../src/libSDLtest/common/images.h" -#include "../src/libSDLtest/fuzzer/fuzzer.h" - -#define TEST_ENABLED 1 -#define TEST_DISABLED 0 - -//! Definitions of assert results -#define ASSERT_PASS 1 -#define ASSERT_FAILURE 0 - -//! Definition of all the possible test results -#define TEST_RESULT_PASS 0 -#define TEST_RESULT_FAILURE 1 -#define TEST_RESULT_NO_ASSERT 2 -#define TEST_RESULT_SKIPPED 3 -#define TEST_RESULT_KILLED 4 -#define TEST_RESULT_SETUP_FAILURE 5 - -//! Definitions for test requirements -#define TEST_REQUIRES_AUDIO 1 -//! Defines that the a test requires STDIO -#define TEST_REQUIRES_STDIO 1 - -/*! - * Holds information about a test case - */ -typedef struct TestCaseReference { - /*!< "Func2Stress" */ - char *name; - /*!< "This test beats the crap out of func2()" */ - char *description; - /*!< Set to TEST_ENABLED or TEST_DISABLED */ - int enabled; - /*!< Set to TEST_REQUIRES_OPENGL, TEST_REQUIRES_AUDIO, ... */ - long requirements; - /* - - - - - - -Test report - - - - - - -

Test Report

-
- Start time:
- - Total runtime: seconds.
- Harness parameters: - - - - - -
- Statistics:
-
- Executed test suites.
- Tests in total: (passed: , failed: ) -
-
- - - - -
-
- diff --git a/test/test-automation/src/libSDLtest/Makefile.am b/test/test-automation/src/libSDLtest/Makefile.am deleted file mode 100644 index 7fb71f75a..000000000 --- a/test/test-automation/src/libSDLtest/Makefile.am +++ /dev/null @@ -1,23 +0,0 @@ -INCLUDE = -I../../include - -lib_LTLIBRARIES = libSDLtest.la -libSDLtest_la_SOURCES = SDL_test.c \ - logger_helpers.c \ - plain_logger.c \ - xml_logger.c xml.c \ - common/common.c \ - common/img_blit.c \ - common/img_blitblend.c \ - common/img_face.c \ - common/img_primitives.c \ - common/img_primitivesblend.c \ - fuzzer/utl_crc32.c \ - fuzzer/utl_md5.c \ - fuzzer/utl_random.c \ - fuzzer/fuzzer.c \ - ../runner/logger.h -libSDLtest_la_CLAGS = -fPIC -g -libSDLtest_la_LDFLAGS = `sdl-config --libs` - -libSDLtest: libSDLtest.la - echo "Test library compiled." diff --git a/test/test-automation/src/libSDLtest/SDL_test.c b/test/test-automation/src/libSDLtest/SDL_test.c deleted file mode 100644 index 69605eb19..000000000 --- a/test/test-automation/src/libSDLtest/SDL_test.c +++ /dev/null @@ -1,187 +0,0 @@ -/* - Copyright (C) 2011 Markus Kauppila - - This software is provided 'as-is', without any express or implied - warranty. In no event will the authors be held liable for any damages - arising from the use of this software. - - Permission is granted to anyone to use this software for any purpose, - including commercial applications, and to alter it and redistribute it - freely, subject to the following restrictions: - - 1. The origin of this software must not be misrepresented; you must not - claim that you wrote the original software. If you use this software - in a product, an acknowledgment in the product documentation would be - appreciated but is not required. - 2. Altered source versions must be plainly marked as such, and must not be - misrepresented as being the original software. - 3. This notice may not be removed or altered from any source distribution. -*/ - -#include /* printf/fprintf */ -#include /* va_list */ -#include - -#include - -#include "fuzzer/fuzzer.h" - -#include "../runner/logger.h" - -#include "../../include/SDL_test.h" - - -/*! \brief return value of test case. Non-zero value means that the test failed */ -int _testReturnValue; - -/*! \brief counts the failed asserts */ -int _testAssertsFailed; - -/*! \brief counts the passed asserts */ -int _testAssertsPassed; - -/*! \brief is the execution done in-process? */ -SDL_bool canBailOut; - -void -_InitTestEnvironment(Uint64 execKey, SDL_bool inproc) -{ - InitFuzzer(execKey); - - canBailOut = inproc == 0; - - _testReturnValue = TEST_RESULT_PASS; - _testAssertsFailed = 0; - _testAssertsPassed = 0; -} - -int -_QuitTestEnvironment() -{ - AssertSummary(_testAssertsFailed + _testAssertsPassed, - _testAssertsFailed, _testAssertsPassed, time(0)); - - if(_testAssertsFailed == 0 && _testAssertsPassed == 0) { - _testReturnValue = TEST_RESULT_NO_ASSERT; - } - - if(GetInvocationCount() > 0) { - Log(time(0), "Fuzzer invocation count: %d", GetInvocationCount()); - } - - DeinitFuzzer(); - - return _testReturnValue; -} - -int -_CountFailedAsserts() { - return _testAssertsFailed; -} - -/*! - * Bail out from test case. For example, the function is used to bail out - * from a test case after a failed assert. - */ -void -_BailOut() -{ - if(!canBailOut) - return ; - - AssertSummary(_testAssertsFailed + _testAssertsPassed, - _testAssertsFailed, _testAssertsPassed, time(0)); - - if(GetInvocationCount() > 0) { - Log(time(0), "Fuzzer invocation count: %d", GetInvocationCount()); - } - - DeinitFuzzer(); - - exit(TEST_RESULT_FAILURE); // bail out from the test -} - -void -AssertEquals(int expected, int actual, char *message, ...) -{ - va_list args; - char buf[256]; - - va_start( args, message ); - memset(buf, 0, sizeof(buf)); - SDL_vsnprintf( buf, sizeof(buf), message, args ); - va_end( args ); - - if(expected != actual) { - AssertWithValues("AssertEquals", 0, buf, actual, expected, time(0)); - - _testReturnValue = TEST_RESULT_FAILURE; - _testAssertsFailed++; - - _BailOut(); - } else { - AssertWithValues("AssertEquals", 1, buf, - actual, expected, time(0)); - - _testAssertsPassed++; - } -} - - -void -AssertTrue(int condition, char *message, ...) -{ - va_list args; - char buf[256]; - va_start( args, message ); - SDL_vsnprintf( buf, sizeof(buf), message, args ); - va_end( args ); - - if (!condition) { - Assert("AssertTrue", 0, buf, time(0)); - - _testReturnValue = TEST_RESULT_FAILURE; - _testAssertsFailed++; - - _BailOut(); - } else { - Assert("AssertTrue", 1, buf, time(0)); - - _testAssertsPassed++; - } -} - -void -AssertPass(char *message, ...) -{ - va_list args; - char buf[256]; - - va_start( args, message ); - SDL_vsnprintf( buf, sizeof(buf), message, args ); - va_end( args ); - - Assert("AssertPass", 1, buf, time(0)); - - _testAssertsPassed++; -} - - -void -AssertFail(char *message, ...) -{ - va_list args; - char buf[256]; - - va_start( args, message ); - SDL_vsnprintf( buf, sizeof(buf), message, args ); - va_end( args ); - - Assert("AssertFail", 0, buf, time(0)); - - _testReturnValue = TEST_RESULT_FAILURE; - _testAssertsFailed++; - - _BailOut(); -} - diff --git a/test/test-automation/src/libSDLtest/common/common.c b/test/test-automation/src/libSDLtest/common/common.c deleted file mode 100644 index 1f202cdb9..000000000 --- a/test/test-automation/src/libSDLtest/common/common.c +++ /dev/null @@ -1,110 +0,0 @@ -/** - * Automated SDL_Surface test. - * - * Written by Edgar Simo "bobbens" - * - * Released under Public Domain. - */ - - -#include "common.h" - -/** - * @brief Compares a surface and a surface image for equality - * - * @param sur Surface used in comparison - * @param img Surface image used in comparison - * @param allowable_error Allowable difference in blending accuracy - */ -int surface_compare( SDL_Surface *sur, const SurfaceImage_t *img, int allowable_error ) -{ - int ret; - int i,j; - int bpp; - Uint8 *p, *pd; - - /* Make sure size is the same. */ - if ((sur->w != img->width) || (sur->h != img->height)) - return -1; - - SDL_LockSurface( sur ); - - ret = 0; - bpp = sur->format->BytesPerPixel; - - /* Compare image - should be same format. */ - for (j=0; jh; j++) { - for (i=0; iw; i++) { - p = (Uint8 *)sur->pixels + j * sur->pitch + i * bpp; - pd = (Uint8 *)img->pixel_data + (j*img->width + i) * img->bytes_per_pixel; - switch (bpp) { - case 1: - case 2: - case 3: - ret += 1; - /*printf("%d BPP not supported yet.\n",bpp);*/ - break; - - case 4: - { - int dist = 0; - Uint8 R, G, B, A; - - SDL_GetRGBA(*(Uint32*)p, sur->format, &R, &G, &B, &A); - - if (img->bytes_per_pixel == 3) { - dist += (R-pd[0])*(R-pd[0]); - dist += (G-pd[1])*(G-pd[1]); - dist += (B-pd[2])*(B-pd[2]); - } else { - dist += (R-pd[0])*(R-pd[0]); - dist += (G-pd[1])*(G-pd[1]); - dist += (B-pd[2])*(B-pd[2]); - dist += (A-pd[3])*(A-pd[3]); - } - /* Allow some difference in blending accuracy */ - if (dist > allowable_error) { - /*printf("pixel %d,%d varies by %d\n", i, j, dist);*/ - ++ret; - } - } - break; - } - } - } - - SDL_UnlockSurface( sur ); - - if (ret) { - SDL_SaveBMP(sur, "fail.bmp"); - - SDL_LockSurface( sur ); - - bpp = sur->format->BytesPerPixel; - - if (bpp == 4) { - for (j=0; jh; j++) { - for (i=0; iw; i++) { - Uint8 R, G, B, A; - p = (Uint8 *)sur->pixels + j * sur->pitch + i * bpp; - pd = (Uint8 *)img->pixel_data + (j*img->width + i) * img->bytes_per_pixel; - - R = pd[0]; - G = pd[1]; - B = pd[2]; - if (img->bytes_per_pixel == 4) { - A = pd[3]; - } else { - A = 0; - } - *(Uint32*)p = (A << 24) | (R << 16) | (G << 8) | B; - } - } - } - - SDL_UnlockSurface( sur ); - - SDL_SaveBMP(sur, "good.bmp"); - } - return ret; -} diff --git a/test/test-automation/src/libSDLtest/common/common.h b/test/test-automation/src/libSDLtest/common/common.h deleted file mode 100644 index f2abc9564..000000000 --- a/test/test-automation/src/libSDLtest/common/common.h +++ /dev/null @@ -1,43 +0,0 @@ -/** - * Automated SDL test common framework. - * - * Written by Edgar Simo "bobbens" - * - * Released under Public Domain. - */ - - -#ifndef COMMON_H -# define COMMON_H - -#include "SDL/SDL.h" - -# define FORMAT SDL_PIXELFORMAT_ARGB8888 -# define AMASK 0xff000000 /**< Alpha bit mask. */ -# define RMASK 0x00ff0000 /**< Red bit mask. */ -# define GMASK 0x0000ff00 /**< Green bit mask. */ -# define BMASK 0x000000ff /**< Blue bit mask. */ - - -typedef struct SurfaceImage_s { - int width; - int height; - unsigned int bytes_per_pixel; /* 3:RGB, 4:RGBA */ - const unsigned char pixel_data[]; -} SurfaceImage_t; - -#define ALLOWABLE_ERROR_OPAQUE 0 -#define ALLOWABLE_ERROR_BLENDED 64 - -/** - * @brief Compares a surface and a surface image for equality. - * - * @param sur Surface to compare. - * @param img Image to compare against. - * @return 0 if they are the same, -1 on error and positive if different. - */ -int surface_compare( SDL_Surface *sur, const SurfaceImage_t *img, int allowable_error ); - - -#endif /* COMMON_H */ - diff --git a/test/test-automation/src/libSDLtest/common/images.h b/test/test-automation/src/libSDLtest/common/images.h deleted file mode 100644 index 4ee3a94fd..000000000 --- a/test/test-automation/src/libSDLtest/common/images.h +++ /dev/null @@ -1,22 +0,0 @@ - - -#ifndef IMAGES_H -# define IMAGES_H - - -#include "common.h" - - -/* - * Pull in images for testcases. - */ -#include "img_primitives.c" -#include "img_primitivesblend.c" -#include "img_face.c" -#include "img_blit.c" -#include "img_blitblend.c" - - -#endif /* IMAGES_H */ - - diff --git a/test/test-automation/src/libSDLtest/common/img_blit.c b/test/test-automation/src/libSDLtest/common/img_blit.c deleted file mode 100644 index 9ea57d6df..000000000 --- a/test/test-automation/src/libSDLtest/common/img_blit.c +++ /dev/null @@ -1,1456 +0,0 @@ -/* GIMP RGB C-Source image dump (blit.c) */ - -#include "common.h" - -static const SurfaceImage_t img_blit = {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\0\0\0\0\0\0\0\377\377\0\377\377" - "\0\0\0\0\0\0\0\377\377\0\377\377\0\0\0\0\0\0\0\377\377\0\377\377\0\0\0\0" - "\0\0\0\377\377\0\377\377\0\0\0\0\0\0\0\377\377\0\377\377\0\0\0\0\0\0\0\377" - "\377\0\377\377\0\0\0\0\0\0\0\377\377\0\377\377\0\0\0\0\0\0\0\377\377\0\377" - "\377\0\0\0\0\0\0\0\377\377\0\377\377\0\0\0\0\0\0\0\377\377\0\377\377\0\0" - "\0\0\0\0\0\377\377\0\377\377\0\0\0\0\0\0\0\377\377\0\377\377\0\377\377\0" - "\377\377\0\377\377\0\377\377\0\377\377\0\377\377\0\0\0\0\0\0\0\0\0\0\0\0" - "\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0" - "\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\377\377\0\377\377\0\377\377\0\0\0" - "\0\377\377\0\377\377\0\377\377\0\0\0\0\377\377\0\377\377\0\377\377\0\0\0" - "\0\377\377\0\377\377\0\377\377\0\0\0\0\377\377\0\377\377\0\377\377\0\0\0" - "\0\377\377\0\377\377\0\377\377\0\0\0\0\377\377\0\377\377\0\377\377\0\0\0" - "\0\377\377\0\377\377\0\377\377\0\0\0\0\377\377\0\377\377\0\377\377\0\0\0" - "\0\377\377\0\377\377\0\377\377\0\0\0\0\377\377\0\377\377\0\377\377\0\0\0" - "\0\377\377\0\377\377\0\377\377\0\0\0\0\377\377\0\377\377\0\377\377\0\377" - "\377\0\377\377\0\377\377\0\377\377\0\377\377\0\377\377\0\377\377\0\377\377" - "\0\377\377\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0" - "\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\377\377\0\377\377" - "\0\377\377\0\0\0\0\377\377\0\377\377\0\377\377\0\0\0\0\377\377\0\377\377" - "\0\377\377\0\0\0\0\377\377\0\377\377\0\377\377\0\0\0\0\377\377\0\377\377" - "\0\377\377\0\0\0\0\377\377\0\377\377\0\377\377\0\0\0\0\377\377\0\377\377" - "\0\377\377\0\0\0\0\377\377\0\377\377\0\377\377\0\0\0\0\377\377\0\377\377" - "\0\377\377\0\0\0\0\377\377\0\377\377\0\377\377\0\0\0\0\377\377\0\377\377" - "\0\377\377\0\0\0\0\377\377\0\377\377\0\377\377\0\0\0\0\377\377\0\377\377" - "\0\377\377\0\377\377\0\377\377\0\377\377\0\377\377\0\377\377\0\377\377\0" - "\377\377\0\377\377\0\377\377\0\377\377\0\377\377\0\0\0\0\0\0\0\0\0\0\0\0" - "\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0" - "\0\0\0\0\377\377\0\377\377\0\377\377\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0" - "\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0" - "\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0" - "\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0" - "\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0" - "\0\0\0\0\0\0\0\0\0\0\377\377\0\377\377\0\377\377\0\377\377\0\0\0\0\0\0\0" - "\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0" - "\0\0\0\377\377\0\377\377\0\377\377\0\0\0\0\0\0\0\377\377\0\377\377\0\0\0" - "\0\0\0\0\377\377\0\377\377\0\0\0\0\0\0\0\377\377\0\377\377\0\0\0\0\0\0\0" - "\377\377\0\377\377\0\0\0\0\0\0\0\377\377\0\377\377\0\0\0\0\0\0\0\377\377" - "\0\377\377\0\0\0\0\0\0\0\377\377\0\377\377\0\0\0\0\0\0\0\377\377\0\377\377" - "\0\0\0\0\0\0\0\377\377\0\377\377\0\0\0\0\0\0\0\377\377\0\377\377\0\0\0\0" - "\0\0\0\377\377\0\377\377\0\0\0\0\0\0\0\377\377\0\377\377\0\0\0\0\0\0\0\377" - "\377\0\377\377\0\377\377\0\377\377\0\377\377\0\377\377\0\377\377\0\377\377" - "\0\0\0\0\0\0\0\377\377\0\377\377\0\377\377\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0" - "\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\377\377\0\377\377" - "\0\0\0\0\377\377\0\377\377\0\377\377\0\0\0\0\377\377\0\377\377\0\377\377" - "\0\0\0\0\377\377\0\377\377\0\377\377\0\0\0\0\377\377\0\377\377\0\377\377" - "\0\0\0\0\377\377\0\377\377\0\377\377\0\0\0\0\377\377\0\377\377\0\377\377" - "\0\0\0\0\377\377\0\377\377\0\377\377\0\0\0\0\377\377\0\377\377\0\377\377" - "\0\0\0\0\377\377\0\377\377\0\377\377\0\0\0\0\377\377\0\377\377\0\377\377" - "\0\0\0\0\377\377\0\377\377\0\377\377\0\0\0\0\377\377\0\377\377\0\377\377" - "\0\0\0\0\377\377\0\377\377\0\377\377\0\377\377\0\377\377\0\377\377\0\377" - "\377\0\377\377\0\377\377\0\377\377\0\377\377\0\377\377\0\0\0\0\377\377\0" - "\377\377\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0" - "\0\0\0\0\0\0\0\0\377\377\0\377\377\0\0\0\0\377\377\0\377\377\0\377\377\0" - "\0\0\0\377\377\0\377\377\0\377\377\0\0\0\0\377\377\0\377\377\0\377\377\0" - "\0\0\0\377\377\0\377\377\0\377\377\0\0\0\0\377\377\0\377\377\0\377\377\0" - "\0\0\0\377\377\0\377\377\0\377\377\0\0\0\0\377\377\0\377\377\0\377\377\0" - "\0\0\0\377\377\0\377\377\0\377\377\0\0\0\0\377\377\0\377\377\0\377\377\0" - "\0\0\0\377\377\0\377\377\0\377\377\0\0\0\0\377\377\0\377\377\0\377\377\0" - "\0\0\0\377\377\0\377\377\0\377\377\0\0\0\0\377\377\0\377\377\0\377\377\0" - "\377\377\0\377\377\0\377\377\0\377\377\0\377\377\0\377\377\0\377\377\0\377" - "\377\0\377\377\0\377\377\0\377\377\0\0\0\0\377\377\0\377\377\0\0\0\0\0\0" - "\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\377\377\0" - "\0\0\0\377\377\0\377\377\0\377\377\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0" - "\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0" - "\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0" - "\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0" - "\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0" - "\0\0\0\0\0\0\0\0\0\377\377\0\377\377\0\377\377\0\377\377\0\0\0\0\377\377" - "\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0" - "\0\0\0\0\377\377\0\377\377\0\377\377\0\0\0\0\0\0\0\377\377\0\377\377\0\0" - "\0\0\0\0\0\377\377\0\377\377\0\0\0\0\0\0\0\377\377\0\377\377\0\0\0\0\0\0" - "\0\377\377\0\377\377\0\0\0\0\0\0\0\377\377\0\377\377\0\0\0\0\0\0\0\377\377" - "\0\377\377\0\0\0\0\0\0\0\377\377\0\377\377\0\0\0\0\0\0\0\377\377\0\377\377" - "\0\0\0\0\0\0\0\377\377\0\377\377\0\0\0\0\0\0\0\377\377\0\377\377\0\0\0\0" - "\0\0\0\377\377\0\377\377\0\0\0\0\0\0\0\377\377\0\377\377\0\0\0\0\0\0\0\377" - "\377\0\377\377\0\377\377\0\377\377\0\377\377\0\377\377\0\377\377\0\377\377" - "\0\0\0\0\0\0\0\377\377\0\377\377\0\377\377\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0" - "\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\377\377\0\377\377" - "\0\0\0\0\377\377\0\377\377\0\377\377\0\0\0\0\377\377\0\377\377\0\377\377" - "\0\0\0\0\377\377\0\377\377\0\377\377\0\0\0\0\377\377\0\377\377\0\377\377" - "\0\0\0\0\377\377\0\377\377\0\377\377\0\0\0\0\377\377\0\377\377\0\377\377" - "\0\0\0\0\377\377\0\377\377\0\377\377\0\0\0\0\377\377\0\377\377\0\377\377" - "\0\0\0\0\377\377\0\377\377\0\377\377\0\0\0\0\377\377\0\377\377\0\377\377" - "\0\0\0\0\377\377\0\377\377\0\377\377\0\0\0\0\377\377\0\377\377\0\377\377" - "\0\0\0\0\377\377\0\377\377\0\377\377\0\377\377\0\377\377\0\377\377\0\377" - "\377\0\377\377\0\377\377\0\377\377\0\377\377\0\377\377\0\0\0\0\377\377\0" - "\377\377\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0" - "\0\0\0\0\0\0\0\0\377\377\0\377\377\0\0\0\0\377\377\0\377\377\0\377\377\0" - "\0\0\0\377\377\0\377\377\0\377\377\0\0\0\0\377\377\0\377\377\0\377\377\0" - "\0\0\0\377\377\0\377\377\0\377\377\0\0\0\0\377\377\0\377\377\0\377\377\0" - "\0\0\0\377\377\0\377\377\0\377\377\0\0\0\0\377\377\0\377\377\0\377\377\0" - "\0\0\0\377\377\0\377\377\0\377\377\0\0\0\0\377\377\0\377\377\0\377\377\0" - "\0\0\0\377\377\0\377\377\0\377\377\0\0\0\0\377\377\0\377\377\0\377\377\0" - "\0\0\0\377\377\0\377\377\0\377\377\0\0\0\0\377\377\0\377\377\0\377\377\0" - "\377\377\0\377\377\0\377\377\0\377\377\0\377\377\0\377\377\0\377\377\0\377" - "\377\0\377\377\0\377\377\0\377\377\0\0\0\0\377\377\0\377\377\0\0\0\0\0\0" - "\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\377\377\0" - "\0\0\0\377\377\0\377\377\0\377\377\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0" - "\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0" - "\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0" - "\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0" - "\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0" - "\0\0\0\0\0\0\0\0\0\377\377\0\377\377\0\377\377\0\377\377\0\0\0\0\377\377" - "\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0" - "\0\0\0\0\377\377\0\377\377\0\377\377\0\0\0\0\0\0\0\377\377\0\377\377\0\0" - "\0\0\0\0\0\377\377\0\377\377\0\0\0\0\0\0\0\377\377\0\377\377\0\0\0\0\0\0" - "\0\377\377\0\377\377\0\0\0\0\0\0\0\377\377\0\377\377\0\0\0\0\0\0\0\377\377" - "\0\377\377\0\0\0\0\0\0\0\377\377\0\377\377\0\0\0\0\0\0\0\377\377\0\377\377" - "\0\0\0\0\0\0\0\377\377\0\377\377\0\0\0\0\0\0\0\377\377\0\377\377\0\0\0\0" - "\0\0\0\377\377\0\377\377\0\0\0\0\0\0\0\377\377\0\377\377\0\0\0\0\0\0\0\377" - "\377\0\377\377\0\377\377\0\377\377\0\377\377\0\377\377\0\377\377\0\377\377" - "\0\0\0\0\0\0\0\377\377\0\377\377\0\377\377\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0" - "\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\377\377\0\377\377" - "\0\0\0\0\377\377\0\377\377\0\377\377\0\0\0\0\377\377\0\377\377\0\377\377" - "\0\0\0\0\377\377\0\377\377\0\377\377\0\0\0\0\377\377\0\377\377\0\377\377" - "\0\0\0\0\377\377\0\377\377\0\377\377\0\0\0\0\377\377\0\377\377\0\377\377" - "\0\0\0\0\377\377\0\377\377\0\377\377\0\0\0\0\377\377\0\377\377\0\377\377" - "\0\0\0\0\377\377\0\377\377\0\377\377\0\0\0\0\377\377\0\377\377\0\377\377" - "\0\0\0\0\377\377\0\377\377\0\377\377\0\0\0\0\377\377\0\377\377\0\377\377" - "\0\0\0\0\377\377\0\377\377\0\377\377\0\377\377\0\377\377\0\377\377\0\377" - "\377\0\377\377\0\377\377\0\377\377\0\377\377\0\377\377\0\0\0\0\377\377\0" - "\377\377\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0" - "\0\0\0\0\0\0\0\0\377\377\0\377\377\0\0\0\0\377\377\0\377\377\0\377\377\0" - "\0\0\0\377\377\0\377\377\0\377\377\0\0\0\0\377\377\0\377\377\0\377\377\0" - "\0\0\0\377\377\0\377\377\0\377\377\0\0\0\0\377\377\0\377\377\0\377\377\0" - "\0\0\0\377\377\0\377\377\0\377\377\0\0\0\0\377\377\0\377\377\0\377\377\0" - "\0\0\0\377\377\0\377\377\0\377\377\0\0\0\0\377\377\0\377\377\0\377\377\0" - "\0\0\0\377\377\0\377\377\0\377\377\0\0\0\0\377\377\0\377\377\0\377\377\0" - "\0\0\0\377\377\0\377\377\0\377\377\0\0\0\0\377\377\0\377\377\0\377\377\0" - "\377\377\0\377\377\0\377\377\0\377\377\0\377\377\0\377\377\0\377\377\0\377" - "\377\0\377\377\0\377\377\0\377\377\0\0\0\0\377\377\0\377\377\0\0\0\0\0\0" - "\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\377\377\0" - "\0\0\0\377\377\0\377\377\0\377\377\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0" - "\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0" - "\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0" - "\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0" - "\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0" - "\0\0\0\0\0\0\0\0\0\377\377\0\377\377\0\377\377\0\377\377\0\0\0\0\377\377" - "\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0" - "\0\0\0\0\377\377\0\377\377\0\377\377\0\0\0\0\0\0\0\377\377\0\377\377\0\0" - "\0\0\0\0\0\377\377\0\377\377\0\0\0\0\0\0\0\377\377\0\377\377\0\0\0\0\0\0" - "\0\377\377\0\377\377\0\0\0\0\0\0\0\377\377\0\377\377\0\0\0\0\0\0\0\377\377" - "\0\377\377\0\0\0\0\0\0\0\377\377\0\377\377\0\0\0\0\0\0\0\377\377\0\377\377" - "\0\0\0\0\0\0\0\377\377\0\377\377\0\0\0\0\0\0\0\377\377\0\377\377\0\0\0\0" - "\0\0\0\377\377\0\377\377\0\0\0\0\0\0\0\377\377\0\377\377\0\0\0\0\0\0\0\377" - "\377\0\377\377\0\377\377\0\377\377\0\377\377\0\377\377\0\377\377\0\377\377" - "\0\0\0\0\0\0\0\377\377\0\377\377\0\377\377\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0" - "\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\377\377\0\377\377" - "\0\0\0\0\377\377\0\377\377\0\377\377\0\0\0\0\377\377\0\377\377\0\377\377" - "\0\0\0\0\377\377\0\377\377\0\377\377\0\0\0\0\377\377\0\377\377\0\377\377" - "\0\0\0\0\377\377\0\377\377\0\377\377\0\0\0\0\377\377\0\377\377\0\377\377" - "\0\0\0\0\377\377\0\377\377\0\377\377\0\0\0\0\377\377\0\377\377\0\377\377" - "\0\0\0\0\377\377\0\377\377\0\377\377\0\0\0\0\377\377\0\377\377\0\377\377" - "\0\0\0\0\377\377\0\377\377\0\377\377\0\0\0\0\377\377\0\377\377\0\377\377" - "\0\0\0\0\377\377\0\377\377\0\377\377\0\377\377\0\377\377\0\377\377\0\377" - "\377\0\377\377\0\377\377\0\377\377\0\377\377\0\377\377\0\0\0\0\377\377\0" - "\377\377\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0" - "\0\0\0\0\0\0\0\0\377\377\0\377\377\0\0\0\0\377\377\0\377\377\0\377\377\0" - "\0\0\0\377\377\0\377\377\0\377\377\0\0\0\0\377\377\0\377\377\0\377\377\0" - "\0\0\0\377\377\0\377\377\0\377\377\0\0\0\0\377\377\0\377\377\0\377\377\0" - "\0\0\0\377\377\0\377\377\0\377\377\0\0\0\0\377\377\0\377\377\0\377\377\0" - "\0\0\0\377\377\0\377\377\0\377\377\0\0\0\0\377\377\0\377\377\0\377\377\0" - "\0\0\0\377\377\0\377\377\0\377\377\0\0\0\0\377\377\0\377\377\0\377\377\0" - "\0\0\0\377\377\0\377\377\0\377\377\0\0\0\0\377\377\0\377\377\0\377\377\0" - "\377\377\0\377\377\0\377\377\0\377\377\0\377\377\0\377\377\0\377\377\0\377" - "\377\0\377\377\0\377\377\0\377\377\0\0\0\0\377\377\0\377\377\0\0\0\0\0\0" - "\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\377\377\0" - "\0\0\0\377\377\0\377\377\0\377\377\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0" - "\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0" - "\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0" - "\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0" - "\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0" - "\0\0\0\0\0\0\0\0\0\377\377\0\377\377\0\377\377\0\377\377\0\0\0\0\377\377" - "\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0" - "\0\0\0\0\377\377\0\377\377\0\377\377\0\0\0\0\0\0\0\377\377\0\377\377\0\0" - "\0\0\0\0\0\377\377\0\377\377\0\0\0\0\0\0\0\377\377\0\377\377\0\0\0\0\0\0" - "\0\377\377\0\377\377\0\0\0\0\0\0\0\377\377\0\377\377\0\0\0\0\0\0\0\377\377" - "\0\377\377\0\0\0\0\0\0\0\377\377\0\377\377\0\0\0\0\0\0\0\377\377\0\377\377" - "\0\0\0\0\0\0\0\377\377\0\377\377\0\0\0\0\0\0\0\377\377\0\377\377\0\0\0\0" - "\0\0\0\377\377\0\377\377\0\0\0\0\0\0\0\377\377\0\377\377\0\0\0\0\0\0\0\377" - "\377\0\377\377\0\377\377\0\377\377\0\377\377\0\377\377\0\377\377\0\377\377" - "\0\0\0\0\0\0\0\377\377\0\377\377\0\377\377\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0" - "\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\377\377\0\377\377" - "\0\0\0\0\377\377\0\377\377\0\377\377\0\0\0\0\377\377\0\377\377\0\377\377" - "\0\0\0\0\377\377\0\377\377\0\377\377\0\0\0\0\377\377\0\377\377\0\377\377" - "\0\0\0\0\377\377\0\377\377\0\377\377\0\0\0\0\377\377\0\377\377\0\377\377" - "\0\0\0\0\377\377\0\377\377\0\377\377\0\0\0\0\377\377\0\377\377\0\377\377" - "\0\0\0\0\377\377\0\377\377\0\377\377\0\0\0\0\377\377\0\377\377\0\377\377" - "\0\0\0\0\377\377\0\377\377\0\377\377\0\0\0\0\377\377\0\377\377\0\377\377" - "\0\0\0\0\377\377\0\377\377\0\377\377\0\377\377\0\377\377\0\377\377\0\377" - "\377\0\377\377\0\377\377\0\377\377\0\377\377\0\377\377\0\0\0\0\377\377\0" - "\377\377\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0" - "\0\0\0\0\0\0\0\0\377\377\0\377\377\0\0\0\0\377\377\0\377\377\0\377\377\0" - "\0\0\0\377\377\0\377\377\0\377\377\0\0\0\0\377\377\0\377\377\0\377\377\0" - "\0\0\0\377\377\0\377\377\0\377\377\0\0\0\0\377\377\0\377\377\0\377\377\0" - "\0\0\0\377\377\0\377\377\0\377\377\0\0\0\0\377\377\0\377\377\0\377\377\0" - "\0\0\0\377\377\0\377\377\0\377\377\0\0\0\0\377\377\0\377\377\0\377\377\0" - "\0\0\0\377\377\0\377\377\0\377\377\0\0\0\0\377\377\0\377\377\0\377\377\0" - "\0\0\0\377\377\0\377\377\0\377\377\0\0\0\0\377\377\0\377\377\0\377\377\0" - "\377\377\0\377\377\0\377\377\0\377\377\0\377\377\0\377\377\0\377\377\0\377" - "\377\0\377\377\0\377\377\0\377\377\0\0\0\0\377\377\0\377\377\0\0\0\0\0\0" - "\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\377\377\0" - "\0\0\0\377\377\0\377\377\0\377\377\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0" - "\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0" - "\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0" - "\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0" - "\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0" - "\0\0\0\0\0\0\0\0\0\377\377\0\377\377\0\377\377\0\377\377\0\0\0\0\377\377" - "\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0" - "\0\0\0\0\377\377\0\377\377\0\377\377\0\0\0\0\0\0\0\377\377\0\377\377\0\0" - "\0\0\0\0\0\377\377\0\377\377\0\0\0\0\0\0\0\377\377\0\377\377\0\0\0\0\0\0" - "\0\377\377\0\377\377\0\0\0\0\0\0\0\377\377\0\377\377\0\0\0\0\0\0\0\377\377" - "\0\377\377\0\0\0\0\0\0\0\377\377\0\377\377\0\0\0\0\0\0\0\377\377\0\377\377" - "\0\0\0\0\0\0\0\377\377\0\377\377\0\0\0\0\0\0\0\377\377\0\377\377\0\0\0\0" - "\0\0\0\377\377\0\377\377\0\0\0\0\0\0\0\377\377\0\377\377\0\0\0\0\0\0\0\377" - "\377\0\377\377\0\377\377\0\377\377\0\377\377\0\377\377\0\377\377\0\377\377" - "\0\0\0\0\0\0\0\377\377\0\377\377\0\377\377\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0" - "\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\377\377\0\377\377" - "\0\0\0\0\377\377\0\377\377\0\377\377\0\0\0\0\377\377\0\377\377\0\377\377" - "\0\0\0\0\377\377\0\377\377\0\377\377\0\0\0\0\377\377\0\377\377\0\377\377" - "\0\0\0\0\377\377\0\377\377\0\377\377\0\0\0\0\377\377\0\377\377\0\377\377" - "\0\0\0\0\377\377\0\377\377\0\377\377\0\0\0\0\377\377\0\377\377\0\377\377" - "\0\0\0\0\377\377\0\377\377\0\377\377\0\0\0\0\377\377\0\377\377\0\377\377" - "\0\0\0\0\377\377\0\377\377\0\377\377\0\0\0\0\377\377\0\377\377\0\377\377" - "\0\0\0\0\377\377\0\377\377\0\377\377\0\377\377\0\377\377\0\377\377\0\377" - "\377\0\377\377\0\377\377\0\377\377\0\377\377\0\377\377\0\0\0\0\377\377\0" - "\377\377\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0" - "\0\0\0\0\0\0\0\0\377\377\0\377\377\0\0\0\0\377\377\0\377\377\0\377\377\0" - "\0\0\0\377\377\0\377\377\0\377\377\0\0\0\0\377\377\0\377\377\0\377\377\0" - "\0\0\0\377\377\0\377\377\0\377\377\0\0\0\0\377\377\0\377\377\0\377\377\0" - "\0\0\0\377\377\0\377\377\0\377\377\0\0\0\0\377\377\0\377\377\0\377\377\0" - "\0\0\0\377\377\0\377\377\0\377\377\0\0\0\0\377\377\0\377\377\0\377\377\0" - "\0\0\0\377\377\0\377\377\0\377\377\0\0\0\0\377\377\0\377\377\0\377\377\0" - "\0\0\0\377\377\0\377\377\0\377\377\0\0\0\0\377\377\0\377\377\0\377\377\0" - "\377\377\0\377\377\0\377\377\0\377\377\0\377\377\0\377\377\0\377\377\0\377" - "\377\0\377\377\0\377\377\0\377\377\0\0\0\0\377\377\0\377\377\0\0\0\0\0\0" - "\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\377\377\0" - "\0\0\0\377\377\0\377\377\0\377\377\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0" - "\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0" - "\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0" - "\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0" - "\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0" - "\0\0\0\0\0\0\0\0\0\377\377\0\377\377\0\377\377\0\377\377\0\0\0\0\377\377" - "\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0" - "\0\0\0\0\377\377\0\377\377\0\377\377\0\0\0\0\0\0\0\377\377\0\377\377\0\0" - "\0\0\0\0\0\377\377\0\377\377\0\0\0\0\0\0\0\377\377\0\377\377\0\0\0\0\0\0" - "\0\377\377\0\377\377\0\0\0\0\0\0\0\377\377\0\377\377\0\0\0\0\0\0\0\377\377" - "\0\377\377\0\0\0\0\0\0\0\377\377\0\377\377\0\0\0\0\0\0\0\377\377\0\377\377" - "\0\0\0\0\0\0\0\377\377\0\377\377\0\0\0\0\0\0\0\377\377\0\377\377\0\0\0\0" - "\0\0\0\377\377\0\377\377\0\0\0\0\0\0\0\377\377\0\377\377\0\0\0\0\0\0\0\377" - "\377\0\377\377\0\377\377\0\377\377\0\377\377\0\377\377\0\377\377\0\377\377" - "\0\0\0\0\0\0\0\377\377\0\377\377\0\377\377\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0" - "\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\377\377\0\377\377" - "\0\0\0\0\377\377\0\377\377\0\377\377\0\0\0\0\377\377\0\377\377\0\377\377" - "\0\0\0\0\377\377\0\377\377\0\377\377\0\0\0\0\377\377\0\377\377\0\377\377" - "\0\0\0\0\377\377\0\377\377\0\377\377\0\0\0\0\377\377\0\377\377\0\377\377" - "\0\0\0\0\377\377\0\377\377\0\377\377\0\0\0\0\377\377\0\377\377\0\377\377" - "\0\0\0\0\377\377\0\377\377\0\377\377\0\0\0\0\377\377\0\377\377\0\377\377" - "\0\0\0\0\377\377\0\377\377\0\377\377\0\0\0\0\377\377\0\377\377\0\377\377" - "\0\0\0\0\377\377\0\377\377\0\377\377\0\377\377\0\377\377\0\377\377\0\377" - "\377\0\377\377\0\377\377\0\377\377\0\377\377\0\377\377\0\0\0\0\377\377\0" - "\377\377\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0" - "\0\0\0\0\0\0\0\0\377\377\0\377\377\0\0\0\0\377\377\0\377\377\0\377\377\0" - "\0\0\0\377\377\0\377\377\0\377\377\0\0\0\0\377\377\0\377\377\0\377\377\0" - "\0\0\0\377\377\0\377\377\0\377\377\0\0\0\0\377\377\0\377\377\0\377\377\0" - "\0\0\0\377\377\0\377\377\0\377\377\0\0\0\0\377\377\0\377\377\0\377\377\0" - "\0\0\0\377\377\0\377\377\0\377\377\0\0\0\0\377\377\0\377\377\0\377\377\0" - "\0\0\0\377\377\0\377\377\0\377\377\0\0\0\0\377\377\0\377\377\0\377\377\0" - "\0\0\0\377\377\0\377\377\0\377\377\0\0\0\0\377\377\0\377\377\0\377\377\0" - "\377\377\0\377\377\0\377\377\0\377\377\0\377\377\0\377\377\0\377\377\0\377" - "\377\0\377\377\0\377\377\0\377\377\0\0\0\0\377\377\0\377\377\0\0\0\0\0\0" - "\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\377\377\0" - "\0\0\0\377\377\0\377\377\0\377\377\0\0\0\0\377\377\0\377\377\0\377\377\0" - "\0\0\0\377\377\0\377\377\0\377\377\0\0\0\0\377\377\0\377\377\0\377\377\0" - "\0\0\0\377\377\0\377\377\0\377\377\0\0\0\0\377\377\0\377\377\0\377\377\0" - "\0\0\0\377\377\0\377\377\0\377\377\0\0\0\0\377\377\0\377\377\0\377\377\0" - "\0\0\0\377\377\0\377\377\0\377\377\0\0\0\0\377\377\0\377\377\0\377\377\0" - "\0\0\0\377\377\0\377\377\0\377\377\0\0\0\0\377\377\0\377\377\0\377\377\0" - "\0\0\0\377\377\0\377\377\0\377\377\0\377\377\0\377\377\0\377\377\0\377\377" - "\0\377\377\0\377\377\0\377\377\0\377\377\0\377\377\0\377\377\0\377\377\0" - "\377\377\0\377\377\0\0\0\0\377\377\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0" - "\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\377\377\0\377\377\0\377\377\0" - "\0\0\0\377\377\0\377\377\0\377\377\0\0\0\0\377\377\0\377\377\0\377\377\0" - "\0\0\0\377\377\0\377\377\0\377\377\0\0\0\0\377\377\0\377\377\0\377\377\0" - "\0\0\0\377\377\0\377\377\0\377\377\0\0\0\0\377\377\0\377\377\0\377\377\0" - "\0\0\0\377\377\0\377\377\0\377\377\0\0\0\0\377\377\0\377\377\0\377\377\0" - "\0\0\0\377\377\0\377\377\0\377\377\0\0\0\0\377\377\0\377\377\0\377\377\0" - "\0\0\0\377\377\0\377\377\0\377\377\0\0\0\0\377\377\0\377\377\0\377\377\0" - "\377\377\0\377\377\0\377\377\0\377\377\0\377\377\0\377\377\0\377\377\0\377" - "\377\0\377\377\0\377\377\0\377\377\0\377\377\0\377\377\0\377\377\0\377\377" - "\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0" - "\0\0\0\0\0\0\0\377\377\0\377\377\0\377\377\0\0\0\0\377\377\0\377\377\0\377" - "\377\0\0\0\0\377\377\0\377\377\0\377\377\0\0\0\0\377\377\0\377\377\0\377" - "\377\0\0\0\0\377\377\0\377\377\0\377\377\0\0\0\0\377\377\0\377\377\0\377" - "\377\0\0\0\0\377\377\0\377\377\0\377\377\0\0\0\0\377\377\0\377\377\0\377" - "\377\0\0\0\0\377\377\0\377\377\0\377\377\0\0\0\0\377\377\0\377\377\0\377" - "\377\0\0\0\0\377\377\0\377\377\0\377\377\0\0\0\0\377\377\0\377\377\0\377" - "\377\0\0\0\0\377\377\0\377\377\0\377\377\0\0\0\0\0\0\0\0\0\0\0\0\0\377\377" - "\0\377\377\0\377\377\0\377\377\0\0\0\0\0\0\0\0\0\0\0\0\0\377\377\0\377\377" - "\0\377\377\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0" - "\0\0\0\0\0\0\0\0\0\377\377\0\377\377\0\377\377\0\0\0\0\377\377\0\377\377" - "\0\377\377\0\0\0\0\377\377\0\377\377\0\377\377\0\0\0\0\377\377\0\377\377" - "\0\377\377\0\0\0\0\377\377\0\377\377\0\377\377\0\0\0\0\377\377\0\377\377" - "\0\377\377\0\0\0\0\377\377\0\377\377\0\377\377\0\0\0\0\377\377\0\377\377" - "\0\377\377\0\0\0\0\377\377\0\377\377\0\377\377\0\0\0\0\377\377\0\377\377" - "\0\377\377\0\0\0\0\377\377\0\377\377\0\377\377\0\0\0\0\377\377\0\377\377" - "\0\377\377\0\0\0\0\377\377\0\377\377\0\377\377\0\377\377\0\0\0\0\0\0\0\377" - "\377\0\0\0\0\377\377\0\377\377\0\377\377\0\377\377\0\0\0\0\0\0\0\377\377" - "\0\0\0\0\377\377\0\377\377\0\377\377\0\377\377\0\0\0\0\0\0\0\0\0\0\0\0\0" - "\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\377\377\0\377\377\0\377" - "\377\0\0\0\0\377\377\0\377\377\0\377\377\0\0\0\0\377\377\0\377\377\0\377" - "\377\0\0\0\0\377\377\0\377\377\0\377\377\0\0\0\0\377\377\0\377\377\0\377" - "\377\0\0\0\0\377\377\0\377\377\0\377\377\0\0\0\0\377\377\0\377\377\0\377" - "\377\0\0\0\0\377\377\0\377\377\0\377\377\0\0\0\0\377\377\0\377\377\0\377" - "\377\0\0\0\0\377\377\0\377\377\0\377\377\0\0\0\0\377\377\0\377\377\0\377" - "\377\0\0\0\0\377\377\0\377\377\0\377\377\0\0\0\0\377\377\0\377\377\0\377" - "\377\0\377\377\0\0\0\0\0\0\0\0\0\0\0\0\0\377\377\0\377\377\0\377\377\0\377" - "\377\0\0\0\0\0\0\0\0\0\0\0\0\0\377\377\0\377\377\0\377\377\0\377\377\0\0" - "\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\377" - "\377\0\377\377\0\377\377\0\0\0\0\377\377\0\377\377\0\377\377\0\0\0\0\377" - "\377\0\377\377\0\377\377\0\0\0\0\377\377\0\377\377\0\377\377\0\0\0\0\377" - "\377\0\377\377\0\377\377\0\0\0\0\377\377\0\377\377\0\377\377\0\0\0\0\377" - "\377\0\377\377\0\377\377\0\0\0\0\377\377\0\377\377\0\377\377\0\0\0\0\377" - "\377\0\377\377\0\377\377\0\0\0\0\377\377\0\377\377\0\377\377\0\0\0\0\377" - "\377\0\377\377\0\377\377\0\0\0\0\377\377\0\377\377\0\377\377\0\0\0\0\377" - "\377\0\377\377\0\377\377\0\377\377\0\377\377\0\377\377\0\377\377\0\377\377" - "\0\377\377\0\377\377\0\377\377\0\377\377\0\377\377\0\377\377\0\377\377\0" - "\377\377\0\377\377\0\377\377\0\377\377\0\377\377\0\0\0\0\0\0\0\0\0\0\0\0" - "\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\377\377\0\377\377\0\377" - "\377\0\0\0\0\377\377\0\377\377\0\377\377\0\0\0\0\377\377\0\377\377\0\377" - "\377\0\0\0\0\377\377\0\377\377\0\377\377\0\0\0\0\377\377\0\377\377\0\377" - "\377\0\0\0\0\377\377\0\377\377\0\377\377\0\0\0\0\377\377\0\377\377\0\377" - "\377\0\0\0\0\377\377\0\377\377\0\377\377\0\0\0\0\377\377\0\377\377\0\377" - "\377\0\0\0\0\377\377\0\377\377\0\377\377\0\0\0\0\377\377\0\377\377\0\377" - "\377\0\0\0\0\377\377\0\377\377\0\377\377\0\0\0\0\377\377\0\377\377\0\377" - "\377\0\377\377\0\377\377\0\377\377\0\377\377\0\377\377\0\377\377\0\377\377" - "\0\377\377\0\377\377\0\377\377\0\377\377\0\377\377\0\377\377\0\377\377\0" - "\377\377\0\377\377\0\377\377\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0" - "\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\377\377\0\377\377\0\377\377\0\0\0\0\377\377" - "\0\377\377\0\377\377\0\0\0\0\377\377\0\377\377\0\377\377\0\0\0\0\377\377" - "\0\377\377\0\377\377\0\0\0\0\377\377\0\377\377\0\377\377\0\0\0\0\377\377" - "\0\377\377\0\377\377\0\0\0\0\377\377\0\377\377\0\377\377\0\0\0\0\377\377" - "\0\377\377\0\377\377\0\0\0\0\377\377\0\377\377\0\377\377\0\0\0\0\377\377" - "\0\377\377\0\377\377\0\0\0\0\377\377\0\377\377\0\377\377\0\0\0\0\377\377" - "\0\377\377\0\377\377\0\0\0\0\377\377\0\377\377\0\377\377\0\377\377\0\377" - "\377\0\377\377\0\377\377\0\377\377\0\377\377\0\0\0\0\0\0\0\377\377\0\377" - "\377\0\377\377\0\377\377\0\377\377\0\377\377\0\377\377\0\377\377\0\377\377" - "\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0" - "\0\377\377\0\377\377\0\377\377\0\0\0\0\377\377\0\377\377\0\377\377\0\0\0" - "\0\377\377\0\377\377\0\377\377\0\0\0\0\377\377\0\377\377\0\377\377\0\0\0" - "\0\377\377\0\377\377\0\377\377\0\0\0\0\377\377\0\377\377\0\377\377\0\0\0" - "\0\377\377\0\377\377\0\377\377\0\0\0\0\377\377\0\377\377\0\377\377\0\0\0" - "\0\377\377\0\377\377\0\377\377\0\0\0\0\377\377\0\377\377\0\377\377\0\0\0" - "\0\377\377\0\377\377\0\377\377\0\0\0\0\377\377\0\377\377\0\377\377\0\0\0" - "\0\377\377\0\377\377\0\377\377\0\377\377\0\377\377\0\377\377\0\377\377\0" - "\377\377\0\377\377\0\0\0\0\0\0\0\377\377\0\377\377\0\377\377\0\377\377\0" - "\377\377\0\377\377\0\377\377\0\377\377\0\377\377\0\0\0\0\0\0\0\0\0\0\0\0" - "\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\377\377\0\377\377\0\377" - "\377\0\0\0\0\377\377\0\377\377\0\377\377\0\0\0\0\377\377\0\377\377\0\377" - "\377\0\0\0\0\377\377\0\377\377\0\377\377\0\0\0\0\377\377\0\377\377\0\377" - "\377\0\0\0\0\377\377\0\377\377\0\377\377\0\0\0\0\377\377\0\377\377\0\377" - "\377\0\0\0\0\377\377\0\377\377\0\377\377\0\0\0\0\377\377\0\377\377\0\377" - "\377\0\0\0\0\377\377\0\377\377\0\377\377\0\0\0\0\377\377\0\377\377\0\377" - "\377\0\0\0\0\377\377\0\377\377\0\377\377\0\0\0\0\377\377\0\377\377\0\377" - "\377\0\377\377\0\377\377\0\377\377\0\377\377\0\377\377\0\377\377\0\377\377" - "\0\377\377\0\377\377\0\377\377\0\377\377\0\377\377\0\377\377\0\377\377\0" - "\377\377\0\377\377\0\377\377\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0" - "\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\377\377\0\377\377\0\377\377\0\0\0\0" - "\377\377\0\377\377\0\377\377\0\0\0\0\377\377\0\377\377\0\377\377\0\0\0\0" - "\377\377\0\377\377\0\377\377\0\0\0\0\377\377\0\377\377\0\377\377\0\0\0\0" - "\377\377\0\377\377\0\377\377\0\0\0\0\377\377\0\377\377\0\377\377\0\0\0\0" - "\377\377\0\377\377\0\377\377\0\0\0\0\377\377\0\377\377\0\377\377\0\0\0\0" - "\377\377\0\377\377\0\377\377\0\0\0\0\377\377\0\377\377\0\377\377\0\0\0\0" - "\377\377\0\377\377\0\377\377\0\0\0\0\377\377\0\377\377\0\377\377\0\377\377" - "\0\377\377\0\377\377\0\377\377\0\377\377\0\377\377\0\377\377\0\377\377\0" - "\377\377\0\377\377\0\377\377\0\377\377\0\377\377\0\377\377\0\377\377\0\0" - "\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0" - "\0\0\0\0\0\377\377\0\377\377\0\0\0\0\0\0\0\377\377\0\377\377\0\0\0\0\0\0" - "\0\377\377\0\377\377\0\0\0\0\0\0\0\377\377\0\377\377\0\0\0\0\0\0\0\377\377" - "\0\377\377\0\0\0\0\0\0\0\377\377\0\377\377\0\0\0\0\0\0\0\377\377\0\377\377" - "\0\0\0\0\0\0\0\377\377\0\377\377\0\0\0\0\0\0\0\377\377\0\377\377\0\0\0\0" - "\0\0\0\377\377\0\377\377\0\0\0\0\0\0\0\377\377\0\377\377\0\0\0\0\0\0\0\377" - "\377\0\377\377\0\0\0\0\0\0\0\377\377\0\377\377\0\0\0\0\0\0\0\0\0\0\377\377" - "\0\377\377\0\377\377\0\377\377\0\377\377\0\377\377\0\377\377\0\377\377\0" - "\0\0\0\0\0\0\0\0\0\377\377\0\377\377\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0" - "\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\377\377\0\377\377" - "\0\0\0\0\0\0\0\377\377\0\377\377\0\0\0\0\0\0\0\377\377\0\377\377\0\0\0\0" - "\0\0\0\377\377\0\377\377\0\0\0\0\0\0\0\377\377\0\377\377\0\0\0\0\0\0\0\377" - "\377\0\377\377\0\0\0\0\0\0\0\377\377\0\377\377\0\0\0\0\0\0\0\377\377\0\377" - "\377\0\0\0\0\0\0\0\377\377\0\377\377\0\0\0\0\0\0\0\377\377\0\377\377\0\0" - "\0\0\0\0\0\377\377\0\377\377\0\0\0\0\0\0\0\377\377\0\377\377\0\0\0\0\0\0" - "\0\377\377\0\377\377\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0" - "\0\0\0\0\0\0\0\0\0\0\0\377\377\0\377\377\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0" - "\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0" - "\377\377\0\377\377\0\0\0\0\0\0\0\377\377\0\377\377\0\0\0\0\0\0\0\377\377" - "\0\377\377\0\0\0\0\0\0\0\377\377\0\377\377\0\0\0\0\0\0\0\377\377\0\377\377" - "\0\0\0\0\0\0\0\377\377\0\377\377\0\0\0\0\0\0\0\377\377\0\377\377\0\0\0\0" - "\0\0\0\377\377\0\377\377\0\0\0\0\0\0\0\377\377\0\377\377\0\0\0\0\0\0\0\377" - "\377\0\377\377\0\0\0\0\0\0\0\377\377\0\377\377\0\0\0\0\0\0\0\377\377\0\377" - "\377\0\0\0\0\0\0\0\377\377\0\377\377\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0" - "\0\0\0\0\0\0\0\0\0\0\0\0\0\377\377\0\377\377\0\0\0\0\0\0\0\0\0\0\0\0\0\0" - "\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0" - "\0\0\0\0\0\0\0\0\377\377\0\377\377\0\377\377\0\0\0\0\377\377\0\377\377\0" - "\377\377\0\0\0\0\377\377\0\377\377\0\377\377\0\0\0\0\377\377\0\377\377\0" - "\377\377\0\0\0\0\377\377\0\377\377\0\377\377\0\0\0\0\377\377\0\377\377\0" - "\377\377\0\0\0\0\377\377\0\377\377\0\377\377\0\0\0\0\377\377\0\377\377\0" - "\377\377\0\0\0\0\377\377\0\377\377\0\377\377\0\0\0\0\377\377\0\377\377\0" - "\377\377\0\0\0\0\377\377\0\377\377\0\377\377\0\0\0\0\377\377\0\377\377\0" - "\377\377\0\0\0\0\377\377\0\377\377\0\377\377\0\0\0\0\0\0\0\0\0\0\0\0\0\0" - "\0\0\0\0\0\377\377\0\377\377\0\377\377\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0" - "\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0" - "\0\0\0\0\0\0\0\0\0\0\0\0\0\0\377\377\0\377\377\0\0\0\0\0\0\0\377\377\0\377" - "\377\0\0\0\0\0\0\0\377\377\0\377\377\0\0\0\0\0\0\0\377\377\0\377\377\0\0" - "\0\0\0\0\0\377\377\0\377\377\0\0\0\0\0\0\0\377\377\0\377\377\0\0\0\0\0\0" - "\0\377\377\0\377\377\0\0\0\0\0\0\0\377\377\0\377\377\0\0\0\0\0\0\0\377\377" - "\0\377\377\0\0\0\0\0\0\0\377\377\0\377\377\0\0\0\0\0\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0\0\0\0\0\0" - "\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0" - "\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\24\0\0\24\0\0\24\0\0\0\0\0(\0\0" - "(\0\0(\0\0\0\0\0<\0\0<\0\0<\0\0\0\0\0P\0\0P\0\0P\0\0\0\0\0d\0\0d\0\0d\0\0" - "\0\0\0x\0\0x\0\0x\0\0\0\0\0\214\0\0\214\0\0\214\0\0\0\0\0\240\0\0\240\0\0" - "\240\0\0\0\0\0\264\0\0\264\0\0\264\0\0\0\0\0\310\0\0\310\0\0\310\0\0\0\0" - "\0\334\0\0\334\0\0\334\0\0\0\0\0\360\0\0\360\0\0\360\0\0\360\0\0\360\0\0" - "\360\0\0\360\0\0\360\0\0\360\0\0\360\0\0\360\0\0\360\0\0\0\0\0\0\0\0\0\0" - "\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0" - "\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\24\0\0\24\0\0\24\0\0\0" - "\0\0(\0\0(\0\0(\0\0\0\0\0<\0\0<\0\0<\0\0\0\0\0P\0\0P\0\0P\0\0\0\0\0d\0\0" - "d\0\0d\0\0\0\0\0x\0\0x\0\0x\0\0\0\0\0\214\0\0\214\0\0\214\0\0\0\0\0\240\0" - "\0\240\0\0\240\0\0\0\0\0\264\0\0\264\0\0\264\0\0\0\0\0\310\0\0\310\0\0\310" - "\0\0\0\0\0\334\0\0\334\0\0\334\0\0\0\0\0\360\0\0\360\0\0\360\0\0\360\0\0" - "\360\0\0\360\0\0\360\0\0\360\0\0\360\0\0\360\0\0\360\0\0\360\0\0\360\0\0" - "\360\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0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\0\0\0\0$\24\0$\24\0$\24\0\0\0\0$(\0$(\0$(\0\0\0\0" - "$<\0$<\0$<\0\0\0\0$P\0$P\0$P\0\0\0\0$d\0$d\0$d\0\0\0\0$x\0$x\0$x\0\0\0\0" - "$\214\0$\214\0$\214\0\0\0\0$\240\0$\240\0$\240\0\0\0\0$\264\0$\264\0$\264" - "\0\0\0\0$\310\0$\310\0$\310\0\0\0\0$\334\0$\334\0$\334\0\0\0\0$\360\0$\360" - "\0$\360\0$\360\0$\360\0$\360\0$\360\0$\360\0$\360\0$\360\0$\360\0$\360\0" - "\0\0\0\0\360\0\0\360\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0" - "\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0$\0\0$\0\0$\0\0\0\0\0$\24\0" - "$\24\0$\24\0\0\0\0$(\0$(\0$(\0\0\0\0$<\0$<\0$<\0\0\0\0$P\0$P\0$P\0\0\0\0" - "$d\0$d\0$d\0\0\0\0$x\0$x\0$x\0\0\0\0$\214\0$\214\0$\214\0\0\0\0$\240\0$\240" - "\0$\240\0\0\0\0$\264\0$\264\0$\264\0\0\0\0$\310\0$\310\0$\310\0\0\0\0$\334" - "\0$\334\0$\334\0\0\0\0$\360\0$\360\0$\360\0$\360\0$\360\0$\360\0$\360\0$" - "\360\0$\360\0$\360\0$\360\0$\360\0$\360\0$\360\0\0\0\0\0\360\0\0\360\0\0" - "\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0" - "\0\0\0\0\0$\0\0$\0\0$\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0" - "\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0" - "\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0" - "\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0" - "\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0" - "\0\0\0$\360\0$\360\0$\360\0$\360\0\0\0\0\0\360\0\0\0\0\0\0\0\0\0\0\0\0\0" - "\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0$\0\0$\0\0$\0\0\0\0" - "\0\0\0\0H\0\0H\0\0\0\0\0\0\0\0H\24\0H\24\0\0\0\0\0\0\0H(\0H(\0\0\0\0\0\0" - "\0H<\0H<\0\0\0\0\0\0\0HP\0HP\0\0\0\0\0\0\0Hd\0Hd\0\0\0\0\0\0\0Hx\0Hx\0\0" - "\0\0\0\0\0H\214\0H\214\0\0\0\0\0\0\0H\240\0H\240\0\0\0\0\0\0\0H\264\0H\264" - "\0\0\0\0\0\0\0H\310\0H\310\0\0\0\0\0\0\0H\334\0H\334\0\0\0\0\0\0\0H\360\0" - "H\360\0H\360\0H\360\0H\360\0H\360\0H\360\0H\360\0\0\0\0\0\0\0$\360\0$\360" - "\0$\360\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0" - "\0\0\0\0\0\0\0\0\0\0$\0\0$\0\0\0\0\0H\0\0H\0\0H\0\0\0\0\0H\24\0H\24\0H\24" - "\0\0\0\0H(\0H(\0H(\0\0\0\0H<\0H<\0H<\0\0\0\0HP\0HP\0HP\0\0\0\0Hd\0Hd\0Hd" - "\0\0\0\0Hx\0Hx\0Hx\0\0\0\0H\214\0H\214\0H\214\0\0\0\0H\240\0H\240\0H\240" - "\0\0\0\0H\264\0H\264\0H\264\0\0\0\0H\310\0H\310\0H\310\0\0\0\0H\334\0H\334" - "\0H\334\0\0\0\0H\360\0H\360\0H\360\0H\360\0H\360\0H\360\0H\360\0H\360\0H" - "\360\0H\360\0H\360\0H\360\0\0\0\0$\360\0$\360\0\0\0\0\0\0\0\0\0\0\0\0\0\0" - "\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0$\0\0$\0\0\0\0\0H\0\0" - "H\0\0H\0\0\0\0\0H\24\0H\24\0H\24\0\0\0\0H(\0H(\0H(\0\0\0\0H<\0H<\0H<\0\0" - "\0\0HP\0HP\0HP\0\0\0\0Hd\0Hd\0Hd\0\0\0\0Hx\0Hx\0Hx\0\0\0\0H\214\0H\214\0" - "H\214\0\0\0\0H\240\0H\240\0H\240\0\0\0\0H\264\0H\264\0H\264\0\0\0\0H\310" - "\0H\310\0H\310\0\0\0\0H\334\0H\334\0H\334\0\0\0\0H\360\0H\360\0H\360\0H\360" - "\0H\360\0H\360\0H\360\0H\360\0H\360\0H\360\0H\360\0H\360\0H\360\0H\360\0" - "\0\0\0$\360\0$\360\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0" - "\0\0\0\0\0\0\0\0\0\0$\0\0\0\0\0H\0\0H\0\0H\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0" - "\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0" - "\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0" - "\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0" - "\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0" - "\0\0\0\0\0\0\0\0\0\0\0\0\0\0H\360\0H\360\0H\360\0H\360\0\0\0\0$\360\0\0\0" - "\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0" - "\0H\0\0H\0\0H\0\0\0\0\0\0\0\0l\0\0l\0\0\0\0\0\0\0\0l\24\0l\24\0\0\0\0\0\0" - "\0l(\0l(\0\0\0\0\0\0\0l<\0l<\0\0\0\0\0\0\0lP\0lP\0\0\0\0\0\0\0ld\0ld\0\0" - "\0\0\0\0\0lx\0lx\0\0\0\0\0\0\0l\214\0l\214\0\0\0\0\0\0\0l\240\0l\240\0\0" - "\0\0\0\0\0l\264\0l\264\0\0\0\0\0\0\0l\310\0l\310\0\0\0\0\0\0\0l\334\0l\334" - "\0\0\0\0\0\0\0l\360\0l\360\0l\360\0l\360\0l\360\0l\360\0l\360\0l\360\0\0" - "\0\0\0\0\0H\360\0H\360\0H\360\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0" - "\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0H\0\0H\0\0\0\0\0l\0\0l\0\0l\0\0" - "\0\0\0l\24\0l\24\0l\24\0\0\0\0l(\0l(\0l(\0\0\0\0l<\0l<\0l<\0\0\0\0lP\0lP" - "\0lP\0\0\0\0ld\0ld\0ld\0\0\0\0lx\0lx\0lx\0\0\0\0l\214\0l\214\0l\214\0\0\0" - "\0l\240\0l\240\0l\240\0\0\0\0l\264\0l\264\0l\264\0\0\0\0l\310\0l\310\0l\310" - "\0\0\0\0l\334\0l\334\0l\334\0\0\0\0l\360\0l\360\0l\360\0l\360\0l\360\0l\360" - "\0l\360\0l\360\0l\360\0l\360\0l\360\0l\360\0\0\0\0H\360\0H\360\0\0\0\0\0" - "\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0H\0" - "\0H\0\0\0\0\0l\0\0l\0\0l\0\0\0\0\0l\24\0l\24\0l\24\0\0\0\0l(\0l(\0l(\0\0" - "\0\0l<\0l<\0l<\0\0\0\0lP\0lP\0lP\0\0\0\0ld\0ld\0ld\0\0\0\0lx\0lx\0lx\0\0" - "\0\0l\214\0l\214\0l\214\0\0\0\0l\240\0l\240\0l\240\0\0\0\0l\264\0l\264\0" - "l\264\0\0\0\0l\310\0l\310\0l\310\0\0\0\0l\334\0l\334\0l\334\0\0\0\0l\360" - "\0l\360\0l\360\0l\360\0l\360\0l\360\0l\360\0l\360\0l\360\0l\360\0l\360\0" - "l\360\0l\360\0l\360\0\0\0\0H\360\0H\360\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0" - "\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0H\0\0\0\0\0l\0\0l\0\0l\0\0\0\0\0" - "\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0" - "\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0" - "\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0" - "\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0" - "\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0l\360\0l\360\0l\360\0l\360" - "\0\0\0\0H\360\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0" - "\0\0\0\0\0\0\0\0\0\0l\0\0l\0\0l\0\0\0\0\0\0\0\0\220\0\0\220\0\0\0\0\0\0\0" - "\0\220\24\0\220\24\0\0\0\0\0\0\0\220(\0\220(\0\0\0\0\0\0\0\220<\0\220<\0" - "\0\0\0\0\0\0\220P\0\220P\0\0\0\0\0\0\0\220d\0\220d\0\0\0\0\0\0\0\220x\0\220" - "x\0\0\0\0\0\0\0\220\214\0\220\214\0\0\0\0\0\0\0\220\240\0\220\240\0\0\0\0" - "\0\0\0\220\264\0\220\264\0\0\0\0\0\0\0\220\310\0\220\310\0\0\0\0\0\0\0\220" - "\334\0\220\334\0\0\0\0\0\0\0\220\360\0\220\360\0\220\360\0\220\360\0\220" - "\360\0\220\360\0\220\360\0\220\360\0\0\0\0\0\0\0l\360\0l\360\0l\360\0\0\0" - "\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0" - "\0\0\0\0l\0\0l\0\0\0\0\0\220\0\0\220\0\0\220\0\0\0\0\0\220\24\0\220\24\0" - "\220\24\0\0\0\0\220(\0\220(\0\220(\0\0\0\0\220<\0\220<\0\220<\0\0\0\0\220" - "P\0\220P\0\220P\0\0\0\0\220d\0\220d\0\220d\0\0\0\0\220x\0\220x\0\220x\0\0" - "\0\0\220\214\0\220\214\0\220\214\0\0\0\0\220\240\0\220\240\0\220\240\0\0" - "\0\0\220\264\0\220\264\0\220\264\0\0\0\0\220\310\0\220\310\0\220\310\0\0" - "\0\0\220\334\0\220\334\0\220\334\0\0\0\0\220\360\0\220\360\0\220\360\0\220" - "\360\0\220\360\0\220\360\0\220\360\0\220\360\0\220\360\0\220\360\0\220\360" - "\0\220\360\0\0\0\0l\360\0l\360\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0" - "\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0l\0\0l\0\0\0\0\0\220\0\0\220\0\0\220" - "\0\0\0\0\0\220\24\0\220\24\0\220\24\0\0\0\0\220(\0\220(\0\220(\0\0\0\0\220" - "<\0\220<\0\220<\0\0\0\0\220P\0\220P\0\220P\0\0\0\0\220d\0\220d\0\220d\0\0" - "\0\0\220x\0\220x\0\220x\0\0\0\0\220\214\0\220\214\0\220\214\0\0\0\0\220\240" - "\0\220\240\0\220\240\0\0\0\0\220\264\0\220\264\0\220\264\0\0\0\0\220\310" - "\0\220\310\0\220\310\0\0\0\0\220\334\0\220\334\0\220\334\0\0\0\0\220\360" - "\0\220\360\0\220\360\0\220\360\0\220\360\0\220\360\0\220\360\0\220\360\0" - "\220\360\0\220\360\0\220\360\0\220\360\0\220\360\0\220\360\0\0\0\0l\360\0" - "l\360\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0" - "\0\0\0l\0\0\0\0\0\220\0\0\220\0\0\220\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0" - "\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0" - "\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0" - "\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0" - "\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0" - "\0\0\0\0\0\0\0\0\0\0\0\220\360\0\220\360\0\220\360\0\220\360\0\0\0\0l\360" - "\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0" - "\0\0\0\0\220\0\0\220\0\0\220\0\0\0\0\0\0\0\0\264\0\0\264\0\0\0\0\0\0\0\0" - "\264\24\0\264\24\0\0\0\0\0\0\0\264(\0\264(\0\0\0\0\0\0\0\264<\0\264<\0\0" - "\0\0\0\0\0\264P\0\264P\0\0\0\0\0\0\0\264d\0\264d\0\0\0\0\0\0\0\264x\0\264" - "x\0\0\0\0\0\0\0\264\214\0\264\214\0\0\0\0\0\0\0\264\240\0\264\240\0\0\0\0" - "\0\0\0\264\264\0\264\264\0\0\0\0\0\0\0\264\310\0\264\310\0\0\0\0\0\0\0\264" - "\334\0\264\334\0\0\0\0\0\0\0\264\360\0\264\360\0\264\360\0\264\360\0\264" - "\360\0\264\360\0\264\360\0\264\360\0\0\0\0\0\0\0\220\360\0\220\360\0\220" - "\360\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0" - "\0\0\0\0\0\0\0\0\0\220\0\0\220\0\0\0\0\0\264\0\0\264\0\0\264\0\0\0\0\0\264" - "\24\0\264\24\0\264\24\0\0\0\0\264(\0\264(\0\264(\0\0\0\0\264<\0\264<\0\264" - "<\0\0\0\0\264P\0\264P\0\264P\0\0\0\0\264d\0\264d\0\264d\0\0\0\0\264x\0\264" - "x\0\264x\0\0\0\0\264\214\0\264\214\0\264\214\0\0\0\0\264\240\0\264\240\0" - "\264\240\0\0\0\0\264\264\0\264\264\0\264\264\0\0\0\0\264\310\0\264\310\0" - "\264\310\0\0\0\0\264\334\0\264\334\0\264\334\0\0\0\0\264\360\0\264\360\0" - "\264\360\0\264\360\0\264\360\0\264\360\0\264\360\0\264\360\0\264\360\0\264" - "\360\0\264\360\0\264\360\0\0\0\0\220\360\0\220\360\0\0\0\0\0\0\0\0\0\0\0" - "\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\220\0\0\220\0" - "\0\0\0\0\264\0\0\264\0\0\264\0\0\0\0\0\264\24\0\264\24\0\264\24\0\0\0\0\264" - "(\0\264(\0\264(\0\0\0\0\264<\0\264<\0\264<\0\0\0\0\264P\0\264P\0\264P\0\0" - "\0\0\264d\0\264d\0\264d\0\0\0\0\264x\0\264x\0\264x\0\0\0\0\264\214\0\264" - "\214\0\264\214\0\0\0\0\264\240\0\264\240\0\264\240\0\0\0\0\264\264\0\264" - "\264\0\264\264\0\0\0\0\264\310\0\264\310\0\264\310\0\0\0\0\264\334\0\264" - "\334\0\264\334\0\0\0\0\264\360\0\264\360\0\264\360\0\264\360\0\264\360\0" - "\264\360\0\264\360\0\264\360\0\264\360\0\264\360\0\264\360\0\264\360\0\264" - "\360\0\264\360\0\0\0\0\220\360\0\220\360\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0" - "\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\220\0\0\0\0\0\264\0\0\264\0\0" - "\264\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0" - "\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0" - "\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0" - "\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0" - "\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\264\360\0" - "\264\360\0\264\360\0\264\360\0\0\0\0\220\360\0\0\0\0\0\0\0\0\0\0\0\0\0\0" - "\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\264\0\0\264\0\0\264" - "\0\0\0\0\0\0\0\0\330\0\0\330\0\0\0\0\0\0\0\0\330\24\0\330\24\0\0\0\0\0\0" - "\0\330(\0\330(\0\0\0\0\0\0\0\330<\0\330<\0\0\0\0\0\0\0\330P\0\330P\0\0\0" - "\0\0\0\0\330d\0\330d\0\0\0\0\0\0\0\330x\0\330x\0\0\0\0\0\0\0\330\214\0\330" - "\214\0\0\0\0\0\0\0\330\240\0\330\240\0\0\0\0\0\0\0\330\264\0\330\264\0\0" - "\0\0\0\0\0\330\310\0\330\310\0\0\0\0\0\0\0\330\334\0\330\334\0\0\0\0\0\0" - "\0\330\360\0\330\360\0\330\360\0\330\360\0\330\360\0\330\360\0\330\360\0" - "\330\360\0\0\0\0\0\0\0\264\360\0\264\360\0\264\360\0\0\0\0\0\0\0\0\0\0\0" - "\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\264\0\0" - "\264\0\0\0\0\0\330\0\0\330\0\0\330\0\0\0\0\0\330\24\0\330\24\0\330\24\0\0" - "\0\0\330(\0\330(\0\330(\0\0\0\0\330<\0\330<\0\330<\0\0\0\0\330P\0\330P\0" - "\330P\0\0\0\0\330d\0\330d\0\330d\0\0\0\0\330x\0\330x\0\330x\0\0\0\0\330\214" - "\0\330\214\0\330\214\0\0\0\0\330\240\0\330\240\0\330\240\0\0\0\0\330\264" - "\0\330\264\0\330\264\0\0\0\0\330\310\0\330\310\0\330\310\0\0\0\0\330\334" - "\0\330\334\0\330\334\0\0\0\0\330\360\0\330\360\0\330\360\0\330\360\0\330" - "\360\0\330\360\0\330\360\0\330\360\0\330\360\0\330\360\0\330\360\0\330\360" - "\0\0\0\0\264\360\0\264\360\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0" - "\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\264\0\0\264\0\0\0\0\0\330\0\0\330\0\0" - "\330\0\0\0\0\0\330\24\0\330\24\0\330\24\0\0\0\0\330(\0\330(\0\330(\0\0\0" - "\0\330<\0\330<\0\330<\0\0\0\0\330P\0\330P\0\330P\0\0\0\0\330d\0\330d\0\330" - "d\0\0\0\0\330x\0\330x\0\330x\0\0\0\0\330\214\0\330\214\0\330\214\0\0\0\0" - "\330\240\0\330\240\0\330\240\0\0\0\0\330\264\0\330\264\0\330\264\0\0\0\0" - "\330\310\0\330\310\0\330\310\0\0\0\0\330\334\0\330\334\0\330\334\0\0\0\0" - "\330\360\0\330\360\0\330\360\0\330\360\0\330\360\0\330\360\0\330\360\0\330" - "\360\0\330\360\0\330\360\0\330\360\0\330\360\0\330\360\0\330\360\0\0\0\0" - "\264\360\0\264\360\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0" - "\0\0\0\0\0\0\0\0\0\0\264\0\0\0\0\0\330\0\0\330\0\0\330\0\0\0\0\0\0\0\0\0" - "\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0" - "\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0" - "\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0" - "\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0" - "\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\330\360\0\330\360\0\330\360\0\330" - "\360\0\0\0\0\264\360\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0" - "\0\0\0\0\0\0\0\0\0\0\0\0\0\0\330\0\0\330\0\0\330\0\0\0\0\0\0\0\0\374\0\0" - "\374\0\0\0\0\0\0\0\0\374\24\0\374\24\0\0\0\0\0\0\0\374(\0\374(\0\0\0\0\0" - "\0\0\374<\0\374<\0\0\0\0\0\0\0\374P\0\374P\0\0\0\0\0\0\0\374d\0\374d\0\0" - "\0\0\0\0\0\374x\0\374x\0\0\0\0\0\0\0\374\214\0\374\214\0\0\0\0\0\0\0\374" - "\240\0\374\240\0\0\0\0\0\0\0\374\264\0\374\264\0\0\0\0\0\0\0\374\310\0\374" - "\310\0\0\0\0\0\0\0\374\334\0\374\334\0\0\0\0\0\0\0\374\360\0\374\360\0\374" - "\360\0\374\360\0\374\360\0\374\360\0\374\360\0\374\360\0\0\0\0\0\0\0\330" - "\360\0\330\360\0\330\360\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0" - "\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\330\0\0\330\0\0\0\0\0\374\0\0\374" - "\0\0\374\0\0\0\0\0\374\24\0\374\24\0\374\24\0\0\0\0\374(\0\374(\0\374(\0" - "\0\0\0\374<\0\374<\0\374<\0\0\0\0\374P\0\374P\0\374P\0\0\0\0\374d\0\374d" - "\0\374d\0\0\0\0\374x\0\374x\0\374x\0\0\0\0\374\214\0\374\214\0\374\214\0" - "\0\0\0\374\240\0\374\240\0\374\240\0\0\0\0\374\264\0\374\264\0\374\264\0" - "\0\0\0\374\310\0\374\310\0\374\310\0\0\0\0\374\334\0\374\334\0\374\334\0" - "\0\0\0\374\360\0\374\360\0\374\360\0\374\360\0\374\360\0\374\360\0\374\360" - "\0\374\360\0\374\360\0\374\360\0\374\360\0\374\360\0\0\0\0\330\360\0\330" - "\360\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0" - "\0\0\0\0\0\0\330\0\0\330\0\0\0\0\0\374\0\0\374\0\0\374\0\0\0\0\0\374\24\0" - "\374\24\0\374\24\0\0\0\0\374(\0\374(\0\374(\0\0\0\0\374<\0\374<\0\374<\0" - "\0\0\0\374P\0\374P\0\374P\0\0\0\0\374d\0\374d\0\374d\0\0\0\0\374x\0\374x" - "\0\374x\0\0\0\0\374\214\0\374\214\0\374\214\0\0\0\0\374\240\0\374\240\0\374" - "\240\0\0\0\0\374\264\0\374\264\0\374\264\0\0\0\0\374\310\0\374\310\0\374" - "\310\0\0\0\0\374\334\0\374\334\0\374\334\0\0\0\0\374\360\0\374\360\0\374" - "\360\0\374\360\0\374\360\0\374\360\0\374\360\0\374\360\0\374\360\0\374\360" - "\0\374\360\0\374\360\0\374\360\0\374\360\0\0\0\0\330\360\0\330\360\0\0\0" - "\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\330" - "\0\0\0\0\0\374\0\0\374\0\0\374\0\0\0\0\0\374\24\0\374\24\0\374\24\0\0\0\0" - "\374(\0\374(\0\374(\0\0\0\0\374<\0\374<\0\374<\0\0\0\0\374P\0\374P\0\374" - "P\0\0\0\0\374d\0\374d\0\374d\0\0\0\0\374x\0\374x\0\374x\0\0\0\0\374\214\0" - "\374\214\0\374\214\0\0\0\0\374\240\0\374\240\0\374\240\0\0\0\0\374\264\0" - "\374\264\0\374\264\0\0\0\0\374\310\0\374\310\0\374\310\0\0\0\0\374\334\0" - "\374\334\0\374\334\0\0\0\0\374\360\0\374\360\0\374\360\0\374\360\0\374\360" - "\0\374\360\0\374\360\0\374\360\0\374\360\0\374\360\0\374\360\0\374\360\0" - "\374\360\0\374\360\0\374\360\0\374\360\0\0\0\0\330\360\0\0\0\0\0\0\0\0\0" - "\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\374\0\0\374" - "\0\0\374\0\0\0\0\0\374\24\0\374\24\0\374\24\0\0\0\0\374(\0\374(\0\374(\0" - "\0\0\0\374<\0\374<\0\374<\0\0\0\0\374P\0\374P\0\374P\0\0\0\0\374d\0\374d" - "\0\374d\0\0\0\0\374x\0\374x\0\374x\0\0\0\0\374\214\0\374\214\0\374\214\0" - "\0\0\0\374\240\0\374\240\0\374\240\0\0\0\0\374\264\0\374\264\0\374\264\0" - "\0\0\0\374\310\0\374\310\0\374\310\0\0\0\0\374\334\0\374\334\0\374\334\0" - "\0\0\0\374\360\0\374\360\0\374\360\0\374\360\0\374\360\0\374\360\0\374\360" - "\0\374\360\0\374\360\0\374\360\0\374\360\0\374\360\0\374\360\0\374\360\0" - "\374\360\0\374\360\0\374\360\0\374\360\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0" - "\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\374\0\0\374\0\0\374" - "\0\0\0\0\0\374\24\0\374\24\0\374\24\0\0\0\0\374(\0\374(\0\374(\0\0\0\0\374" - "<\0\374<\0\374<\0\0\0\0\374P\0\374P\0\374P\0\0\0\0\374d\0\374d\0\374d\0\0" - "\0\0\374x\0\374x\0\374x\0\0\0\0\374\214\0\374\214\0\374\214\0\0\0\0\374\240" - "\0\374\240\0\374\240\0\0\0\0\374\264\0\374\264\0\374\264\0\0\0\0\374\310" - "\0\374\310\0\374\310\0\0\0\0\374\334\0\374\334\0\374\334\0\0\0\0\374\360" - "\0\374\360\0\374\360\0\0\0\0\0\0\0\0\0\0\0\0\0\374\360\0\374\360\0\374\360" - "\0\374\360\0\0\0\0\0\0\0\0\0\0\0\0\0\374\360\0\374\360\0\374\360\0\0\0\0" - "\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0" - "\374\0\0\374\0\0\374\0\0\0\0\0\374\24\0\374\24\0\374\24\0\0\0\0\374(\0\374" - "(\0\374(\0\0\0\0\374<\0\374<\0\374<\0\0\0\0\374P\0\374P\0\374P\0\0\0\0\374" - "d\0\374d\0\374d\0\0\0\0\374x\0\374x\0\374x\0\0\0\0\374\214\0\374\214\0\374" - "\214\0\0\0\0\374\240\0\374\240\0\374\240\0\0\0\0\374\264\0\374\264\0\374" - "\264\0\0\0\0\374\310\0\374\310\0\374\310\0\0\0\0\374\334\0\374\334\0\374" - "\334\0\0\0\0\374\360\0\374\360\0\374\360\0\374\360\0\0\0\0\0\0\0\374\334" - "\0\0\0\0\374\360\0\374\360\0\374\360\0\374\360\0\0\0\0\0\0\0\374\334\0\0" - "\0\0\374\360\0\374\360\0\374\360\0\374\360\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0" - "\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\374\0\0\374\0\0\374\0\0\0\0" - "\0\374\24\0\374\24\0\374\24\0\0\0\0\374(\0\374(\0\374(\0\0\0\0\374<\0\374" - "<\0\374<\0\0\0\0\374P\0\374P\0\374P\0\0\0\0\374d\0\374d\0\374d\0\0\0\0\374" - "x\0\374x\0\374x\0\0\0\0\374\214\0\374\214\0\374\214\0\0\0\0\374\240\0\374" - "\240\0\374\240\0\0\0\0\374\264\0\374\264\0\374\264\0\0\0\0\374\310\0\374" - "\310\0\374\310\0\0\0\0\374\334\0\374\334\0\374\334\0\0\0\0\374\360\0\374" - "\360\0\374\360\0\374\360\0\0\0\0\0\0\0\0\0\0\0\0\0\374\360\0\374\360\0\374" - "\360\0\374\360\0\0\0\0\0\0\0\0\0\0\0\0\0\374\360\0\374\360\0\374\360\0\374" - "\360\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0" - "\0\0\0\374\0\0\374\0\0\374\0\0\0\0\0\374\24\0\374\24\0\374\24\0\0\0\0\374" - "(\0\374(\0\374(\0\0\0\0\374<\0\374<\0\374<\0\0\0\0\374P\0\374P\0\374P\0\0" - "\0\0\374d\0\374d\0\374d\0\0\0\0\374x\0\374x\0\374x\0\0\0\0\374\214\0\374" - "\214\0\374\214\0\0\0\0\374\240\0\374\240\0\374\240\0\0\0\0\374\264\0\374" - "\264\0\374\264\0\0\0\0\374\310\0\374\310\0\374\310\0\0\0\0\374\334\0\374" - "\334\0\374\334\0\0\0\0\374\360\0\374\360\0\374\360\0\374\360\0\374\360\0" - "\374\360\0\374\360\0\374\360\0\374\360\0\374\360\0\374\360\0\374\360\0\374" - "\360\0\374\360\0\374\360\0\374\360\0\374\360\0\374\360\0\374\360\0\374\360" - "\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0" - "\0\374\0\0\374\0\0\374\0\0\0\0\0\374\24\0\374\24\0\374\24\0\0\0\0\374(\0" - "\374(\0\374(\0\0\0\0\374<\0\374<\0\374<\0\0\0\0\374P\0\374P\0\374P\0\0\0" - "\0\374d\0\374d\0\374d\0\0\0\0\374x\0\374x\0\374x\0\0\0\0\374\214\0\374\214" - "\0\374\214\0\0\0\0\374\240\0\374\240\0\374\240\0\0\0\0\374\264\0\374\264" - "\0\374\264\0\0\0\0\374\310\0\374\310\0\374\310\0\0\0\0\374\334\0\374\334" - "\0\374\334\0\0\0\0\374\360\0\374\360\0\374\360\0\374\360\0\374\360\0\374" - "\360\0\374\360\0\374\360\0\374\360\0\374\360\0\374\360\0\374\360\0\374\360" - "\0\374\360\0\374\360\0\374\360\0\374\360\0\374\360\0\374\360\0\374\360\0" - "\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0" - "\374\0\0\374\0\0\374\0\0\0\0\0\374\24\0\374\24\0\374\24\0\0\0\0\374(\0\374" - "(\0\374(\0\0\0\0\374<\0\374<\0\374<\0\0\0\0\374P\0\374P\0\374P\0\0\0\0\374" - "d\0\374d\0\374d\0\0\0\0\374x\0\374x\0\374x\0\0\0\0\374\214\0\374\214\0\374" - "\214\0\0\0\0\374\240\0\374\240\0\374\240\0\0\0\0\374\264\0\374\264\0\374" - "\264\0\0\0\0\374\310\0\374\310\0\374\310\0\0\0\0\374\334\0\374\334\0\374" - "\334\0\0\0\0\374\360\0\374\360\0\374\360\0\374\360\0\374\360\0\374\360\0" - "\374\360\0\374\360\0\374\360\0\0\0\0\0\0\0\374\360\0\374\360\0\374\360\0" - "\374\360\0\374\360\0\374\360\0\374\360\0\374\360\0\374\360\0\0\0\0\0\0\0" - "\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\374\0\0\374" - "\0\0\374\0\0\0\0\0\374\24\0\374\24\0\374\24\0\0\0\0\374(\0\374(\0\374(\0" - "\0\0\0\374<\0\374<\0\374<\0\0\0\0\374P\0\374P\0\374P\0\0\0\0\374d\0\374d" - "\0\374d\0\0\0\0\374x\0\374x\0\374x\0\0\0\0\374\214\0\374\214\0\374\214\0" - "\0\0\0\374\240\0\374\240\0\374\240\0\0\0\0\374\264\0\374\264\0\374\264\0" - "\0\0\0\374\310\0\374\310\0\374\310\0\0\0\0\374\334\0\374\334\0\374\334\0" - "\0\0\0\374\360\0\374\360\0\374\360\0\374\360\0\374\360\0\374\360\0\374\360" - "\0\374\360\0\374\360\0\0\0\0\0\0\0\374\360\0\374\360\0\374\360\0\374\360" - "\0\374\360\0\374\360\0\374\360\0\374\360\0\374\360\0\0\0\0\0\0\0\0\0\0\0" - "\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\374\0\0\374\0\0\374" - "\0\0\0\0\0\374\24\0\374\24\0\374\24\0\0\0\0\374(\0\374(\0\374(\0\0\0\0\374" - "<\0\374<\0\374<\0\0\0\0\374P\0\374P\0\374P\0\0\0\0\374d\0\374d\0\374d\0\0" - "\0\0\374x\0\374x\0\374x\0\0\0\0\374\214\0\374\214\0\374\214\0\0\0\0\374\240" - "\0\374\240\0\374\240\0\0\0\0\374\264\0\374\264\0\374\264\0\0\0\0\374\310" - "\0\374\310\0\374\310\0\0\0\0\374\334\0\374\334\0\374\334\0\0\0\0\374\360" - "\0\374\360\0\374\360\0\374\360\0\374\360\0\374\360\0\374\360\0\374\360\0" - "\374\360\0\374\360\0\374\360\0\374\360\0\374\360\0\374\360\0\374\360\0\374" - "\360\0\374\360\0\374\360\0\374\360\0\374\360\0\0\0\0\0\0\0\0\0\0\0\0\0\0" - "\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\374\0\0\374\0\0\374" - "\0\0\0\0\0\374\24\0\374\24\0\374\24\0\0\0\0\374(\0\374(\0\374(\0\0\0\0\374" - "<\0\374<\0\374<\0\0\0\0\374P\0\374P\0\374P\0\0\0\0\374d\0\374d\0\374d\0\0" - "\0\0\374x\0\374x\0\374x\0\0\0\0\374\214\0\374\214\0\374\214\0\0\0\0\374\240" - "\0\374\240\0\374\240\0\0\0\0\374\264\0\374\264\0\374\264\0\0\0\0\374\310" - "\0\374\310\0\374\310\0\0\0\0\374\334\0\374\334\0\374\334\0\0\0\0\374\360" - "\0\374\360\0\374\360\0\374\360\0\374\360\0\374\360\0\374\360\0\374\360\0" - "\374\360\0\374\360\0\374\360\0\374\360\0\374\360\0\374\360\0\374\360\0\374" - "\360\0\374\360\0\374\360\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0" - "\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\374\0\0\374\0\0\0\0\0\0\0\0\374\24" - "\0\374\24\0\0\0\0\0\0\0\374(\0\374(\0\0\0\0\0\0\0\374<\0\374<\0\0\0\0\0\0" - "\0\374P\0\374P\0\0\0\0\0\0\0\374d\0\374d\0\0\0\0\0\0\0\374x\0\374x\0\0\0" - "\0\0\0\0\374\214\0\374\214\0\0\0\0\0\0\0\374\240\0\374\240\0\0\0\0\0\0\0" - "\374\264\0\374\264\0\0\0\0\0\0\0\374\310\0\374\310\0\0\0\0\0\0\0\374\334" - "\0\374\334\0\0\0\0\0\0\0\374\360\0\374\360\0\0\0\0\0\0\0\0\0\0\374\360\0" - "\374\360\0\374\360\0\374\360\0\374\360\0\374\360\0\374\360\0\374\360\0\0" - "\0\0\0\0\0\0\0\0\374\360\0\374\360\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0" - "\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\374\0\0\374\0\0\0" - "\0\0\0\0\0\374\24\0\374\24\0\0\0\0\0\0\0\374(\0\374(\0\0\0\0\0\0\0\374<\0" - "\374<\0\0\0\0\0\0\0\374P\0\374P\0\0\0\0\0\0\0\374d\0\374d\0\0\0\0\0\0\0\374" - "x\0\374x\0\0\0\0\0\0\0\374\214\0\374\214\0\0\0\0\0\0\0\374\240\0\374\240" - "\0\0\0\0\0\0\0\374\264\0\374\264\0\0\0\0\0\0\0\374\310\0\374\310\0\0\0\0" - "\0\0\0\374\334\0\374\334\0\0\0\0\0\0\0\374\360\0\374\360\0\0\0\0\0\0\0\0" - "\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\374\360\0\374" - "\360\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0" - "\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\374\0\0\374\0\0\0\0\0\0\0\0\374\24\0" - "\374\24\0\0\0\0\0\0\0\374(\0\374(\0\0\0\0\0\0\0\374<\0\374<\0\0\0\0\0\0\0" - "\374P\0\374P\0\0\0\0\0\0\0\374d\0\374d\0\0\0\0\0\0\0\374x\0\374x\0\0\0\0" - "\0\0\0\374\214\0\374\214\0\0\0\0\0\0\0\374\240\0\374\240\0\0\0\0\0\0\0\374" - "\264\0\374\264\0\0\0\0\0\0\0\374\310\0\374\310\0\0\0\0\0\0\0\374\334\0\374" - "\334\0\0\0\0\0\0\0\374\360\0\374\360\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0" - "\0\0\0\0\0\0\0\0\0\0\0\0\0\374\360\0\374\360\0\0\0\0\0\0\0\0\0\0\0\0\0\0" - "\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0" - "\0\0\0\0\0\0\0\0\374\0\0\374\0\0\374\0\0\0\0\0\374\24\0\374\24\0\374\24\0" - "\0\0\0\374(\0\374(\0\374(\0\0\0\0\374<\0\374<\0\374<\0\0\0\0\374P\0\374P" - "\0\374P\0\0\0\0\374d\0\374d\0\374d\0\0\0\0\374x\0\374x\0\374x\0\0\0\0\374" - "\214\0\374\214\0\374\214\0\0\0\0\374\240\0\374\240\0\374\240\0\0\0\0\374" - "\264\0\374\264\0\374\264\0\0\0\0\374\310\0\374\310\0\374\310\0\0\0\0\374" - "\334\0\374\334\0\374\334\0\0\0\0\374\360\0\374\360\0\374\360\0\0\0\0\0\0" - "\0\0\0\0\0\0\0\0\0\0\0\0\0\374\360\0\374\360\0\374\360\0\0\0\0\0\0\0\0\0" - "\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0" - "\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\374\0\0\374\0\0\0\0\0\0\0\0" - "\374\24\0\374\24\0\0\0\0\0\0\0\374(\0\374(\0\0\0\0\0\0\0\374<\0\374<\0\0" - "\0\0\0\0\0\374P\0\374P\0\0\0\0\0\0\0\374d\0\374d\0\0\0\0\0\0\0\374x\0\374" - "x\0\0\0\0\0\0\0\374\214\0\374\214\0\0\0\0\0\0\0\374\240\0\374\240\0\0\0\0" - "\0\0\0\374\264\0\374\264\0\0\0\0\0\0\0\374\310\0\374\310\0\0\0\0\0\0\0\374" - "\334\0\374\334\0\0\0\0\0\0\0\374\360\0\374\360\0\374\360\0\374\360\0\374" - "\360\0\374\360\0\374\360\0\374\360\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0" - "\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0" - "\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0" - "\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0" - "\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0" - "\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0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0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0" - "\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0" - "\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\24\24\0\24\24\0\20\20\0" - "\20\20\0""88\0""88\0**\0**\0ZZ\0ZZ\0==\0==\0yy\0yy\0II\0II\0\224\224\0\224" - "\224\0NN\0NN\0\254\254\0\254\254\0MM\0MM\0\302\302\0\302\302\0HH\0HH\0\324" - "\324\0\324\324\0>>\0>>\0\343\343\0\343\343\0""00\0""00\0\356\356\0\356\356" - "\0\40\40\0\40\40\0\367\367\0\367\367\0\16\16\0\16\16\0\374\374\0\374\374" - "\0\374\374\0\374\374\0\360\360\0\360\360\0\360\360\0\360\360\0\0\0\0\0\0" - "\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0" - "\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0" - "\0\24\24\0\24\24\0\24\24\0\20\20\0""88\0""88\0""88\0**\0ff\0ff\0ff\0FF\0" - "\215\215\0\215\215\0\215\215\0UU\0\255\255\0\255\255\0\255\255\0[[\0\306" - "\306\0\306\306\0\306\306\0YY\0\331\331\0\331\331\0\331\331\0PP\0\350\350" - "\0\350\350\0\350\350\0DD\0\362\362\0\362\362\0\362\362\0""44\0\370\370\0" - "\370\370\0\370\370\0\"\"\0\374\374\0\374\374\0\374\374\0\16\16\0\376\376" - "\0\376\376\0\376\376\0\376\376\0\374\374\0\374\374\0\374\374\0\374\374\0" - "\360\360\0\360\360\0\360\360\0\360\360\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0" - "\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0" - "\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\24\24\0\24\24\0\24\24\0\20\20\0""88\0" - """88\0""88\0**\0ff\0ff\0ff\0FF\0\226\226\0\226\226\0\215\215\0UU\0\271\271" - "\0\271\271\0\255\255\0[[\0\323\323\0\323\323\0\306\306\0YY\0\345\345\0\345" - "\345\0\331\331\0PP\0\360\360\0\360\360\0\350\350\0DD\0\370\370\0\370\370" - "\0\362\362\0""44\0\374\374\0\374\374\0\370\370\0\"\"\0\376\376\0\376\376" - "\0\374\374\0\16\16\0\376\376\0\376\376\0\376\376\0\376\376\0\376\376\0\376" - "\376\0\374\374\0\374\374\0\374\374\0\374\374\0\360\360\0\360\360\0\360\360" - "\0\360\360\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0" - "\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\24\24" - "\0\24\24\0\24\24\0\20\20\0""33\0""33\0""33\0&&\0OO\0OO\0OO\0""55\0``\0``" - "\0``\0::\0``\0``\0``\0""22\0WW\0WW\0WW\0''\0II\0II\0II\0\33\33\0""99\0""9" - "9\0""99\0\20\20\0))\0))\0))\0\10\10\0\33\33\0\33\33\0\33\33\0\3\3\0\17\17" - "\0\17\17\0\17\17\0\0\0\0\7\7\0\7\7\0\7\7\0\7\7\0\2\2\0\2\2\0\2\2\0\2\2\0" - "\16\16\0\16\16\0\16\16\0\16\16\0\360\360\0\360\360\0\360\360\0\360\360\0" - "\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0" - "\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\24\24\0\24\24\0\24\24\0\16\16" - "\0""33\0GG\0GG\0""00\0``\0\210\210\0\210\210\0TT\0\204\204\0\263\263\0\263" - "\263\0ee\0\222\222\0\315\315\0\312\312\0gg\0\216\216\0\331\331\0\327\327" - "\0cc\0\202\202\0\340\340\0\337\337\0YY\0qq\0\345\345\0\344\344\0NN\0^^\0" - "\352\352\0\352\352\0@@\0JJ\0\357\357\0\357\357\0""11\0""66\0\364\364\0\364" - "\364\0\40\40\0\"\"\0\371\371\0\371\371\0\16\16\0\16\16\0\375\375\0\375\375" - "\0\376\376\0\376\376\0\362\362\0\362\362\0\376\376\0\376\376\0\16\16\0\16" - "\16\0\360\360\0\360\360\0\360\360\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0" - "\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\24" - "\24\0\24\24\0\22\22\0\24\24\0""88\0""88\0//\0BB\0pp\0pp\0UU\0ss\0\242\242" - "\0\242\242\0oo\0\230\230\0\306\306\0\306\306\0ww\0\265\265\0\335\335\0\335" - "\335\0ss\0\313\313\0\353\353\0\353\353\0ii\0\333\333\0\364\364\0\364\364" - "\0ZZ\0\351\351\0\371\371\0\371\371\0II\0\362\362\0\374\374\0\374\374\0""6" - "6\0\370\370\0\376\376\0\376\376\0\"\"\0\374\374\0\376\376\0\376\376\0\16" - "\16\0\376\376\0\376\376\0\376\376\0\376\376\0\375\375\0\376\376\0\376\376" - "\0\376\376\0\360\360\0\360\360\0\360\360\0\360\360\0\16\16\0\360\360\0\360" - "\360\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0" - "\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\24\24\0\24\24\0\22\22\0\"\"\0""88\0" - """88\0//\0OO\0pp\0pp\0WW\0\203\203\0\242\242\0\242\242\0qq\0\256\256\0\312" - "\312\0\301\301\0||\0\313\313\0\342\342\0\325\325\0yy\0\336\336\0\360\360" - "\0\342\342\0mm\0\353\353\0\367\367\0\354\354\0\\\\\0\363\363\0\373\373\0" - "\362\362\0JJ\0\371\371\0\375\375\0\367\367\0""66\0\374\374\0\376\376\0\373" - "\373\0\"\"\0\376\376\0\376\376\0\375\375\0\16\16\0\376\376\0\376\376\0\376" - "\376\0\376\376\0\376\376\0\376\376\0\375\375\0\376\376\0\376\376\0\375\375" - "\0\360\360\0\374\374\0\360\360\0\376\376\0\16\16\0\360\360\0\360\360\0\0" - "\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0" - "\0\0\0\0\0\0\0\0\0\0\0\24\24\0\22\22\0&&\0\"\"\0""88\0//\0PP\0HH\0gg\0NN" - "\0pp\0ee\0}}\0VV\0{{\0oo\0\202\202\0NN\0qq\0jj\0vv\0>>\0``\0\\\\\0cc\0,," - "\0MM\0KK\0OO\0\35\35\0::\0""99\0;;\0\21\21\0**\0))\0**\0\10\10\0\33\33\0" - "\33\33\0\33\33\0\3\3\0\17\17\0\17\17\0\17\17\0\0\0\0\7\7\0\7\7\0\7\7\0\7" - "\7\0\2\2\0\2\2\0\2\2\0\2\2\0\16\16\0\16\16\0\16\16\0\16\16\0\360\360\0\360" - "\360\0\376\376\0\376\376\0\16\16\0\360\360\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0" - "\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\22\22" - "\0&&\0&&\0\"\"\0""66\0[[\0oo\0ee\0``\0\220\220\0\270\270\0\250\250\0xx\0" - "\250\250\0\327\327\0\311\311\0zz\0\246\246\0\341\341\0\325\325\0rr\0\230" - "\230\0\343\343\0\334\334\0gg\0\205\205\0\344\344\0\340\340\0[[\0rr\0\346" - "\346\0\344\344\0NN\0^^\0\352\352\0\352\352\0AA\0JJ\0\357\357\0\357\357\0" - """11\0""66\0\364\364\0\364\364\0\40\40\0\"\"\0\371\371\0\371\371\0\16\16" - "\0\16\16\0\375\375\0\375\375\0\376\376\0\376\376\0\362\362\0\362\362\0\376" - "\376\0\376\376\0\16\16\0\16\16\0\376\376\0\376\376\0\376\376\0\16\16\0\0" - "\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0" - "\0\0\0\0\0\0\0\0\0\0\0\22\22\0&&\0&&\0\37\37\0;;\0``\0``\0HH\0qq\0\237\237" - "\0\237\237\0nn\0\227\227\0\306\306\0\306\306\0}}\0\254\254\0\334\334\0\334" - "\334\0}}\0\275\275\0\347\347\0\347\347\0vv\0\316\316\0\357\357\0\357\357" - "\0ii\0\334\334\0\365\365\0\365\365\0ZZ\0\351\351\0\371\371\0\371\371\0II" - "\0\362\362\0\374\374\0\374\374\0""66\0\370\370\0\376\376\0\376\376\0\"\"" - "\0\374\374\0\376\376\0\376\376\0\16\16\0\376\376\0\376\376\0\376\376\0\376" - "\376\0\375\375\0\376\376\0\376\376\0\376\376\0\360\360\0\360\360\0\360\360" - "\0\360\360\0\16\16\0\376\376\0\376\376\0\16\16\0\0\0\0\0\0\0\0\0\0\0\0\0" - "\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0" - "&&\0&&\0##\0--\0``\0``\0TT\0cc\0\237\237\0\231\231\0||\0\223\223\0\306\306" - "\0\301\301\0\217\217\0\267\267\0\336\336\0\322\322\0\220\220\0\317\317\0" - "\352\352\0\334\334\0\202\202\0\337\337\0\362\362\0\345\345\0qq\0\353\353" - "\0\370\370\0\354\354\0^^\0\363\363\0\373\373\0\362\362\0JJ\0\371\371\0\375" - "\375\0\367\367\0""66\0\374\374\0\376\376\0\373\373\0\"\"\0\376\376\0\376" - "\376\0\375\375\0\16\16\0\376\376\0\376\376\0\376\376\0\376\376\0\376\376" - "\0\376\376\0\375\375\0\376\376\0\376\376\0\375\375\0\360\360\0\376\376\0" - "\360\360\0\376\376\0\16\16\0\376\376\0\376\376\0\0\0\0\0\0\0\0\0\0\0\0\0" - "\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0" - "&&\0##\0""77\0--\0``\0PP\0nn\0[[\0\222\222\0kk\0\211\211\0qq\0\231\231\0" - "ff\0\210\210\0uu\0\217\217\0UU\0vv\0ll\0zz\0@@\0aa\0]]\0dd\0,,\0MM\0KK\0" - "OO\0\35\35\0::\0""99\0;;\0\21\21\0**\0))\0**\0\10\10\0\33\33\0\33\33\0\33" - "\33\0\3\3\0\17\17\0\17\17\0\17\17\0\0\0\0\7\7\0\7\7\0\7\7\0\7\7\0\2\2\0\2" - "\2\0\2\2\0\2\2\0\16\16\0\16\16\0\16\16\0\16\16\0\360\360\0\360\360\0\376" - "\376\0\376\376\0\16\16\0\376\376\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0" - "\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0##\0""77\0""77" - "\0--\0UU\0zz\0\216\216\0ww\0}}\0\254\254\0\324\324\0\264\264\0\207\207\0" - "\266\266\0\345\345\0\316\316\0\177\177\0\254\254\0\346\346\0\326\326\0rr" - "\0\231\231\0\344\344\0\334\334\0gg\0\206\206\0\344\344\0\340\340\0[[\0rr" - "\0\346\346\0\344\344\0NN\0^^\0\352\352\0\352\352\0AA\0JJ\0\357\357\0\357" - "\357\0""11\0""66\0\364\364\0\364\364\0\40\40\0\"\"\0\371\371\0\371\371\0" - "\16\16\0\16\16\0\375\375\0\375\375\0\376\376\0\376\376\0\362\362\0\362\362" - "\0\376\376\0\376\376\0\16\16\0\16\16\0\376\376\0\376\376\0\376\376\0\16\16" - "\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0" - "\0\0\0\0\0\0\0\0\0\0\0\0\0\22\22\0""77\0""77\0--\0CC\0~~\0~~\0\\\\\0||\0" - "\274\274\0\274\274\0||\0\235\235\0\325\325\0\325\325\0\204\204\0\256\256" - "\0\340\340\0\340\340\0\177\177\0\275\275\0\351\351\0\351\351\0vv\0\316\316" - "\0\360\360\0\360\360\0ii\0\334\334\0\365\365\0\365\365\0ZZ\0\351\351\0\371" - "\371\0\371\371\0II\0\362\362\0\374\374\0\374\374\0""66\0\370\370\0\376\376" - "\0\376\376\0\"\"\0\374\374\0\376\376\0\376\376\0\16\16\0\376\376\0\376\376" - "\0\376\376\0\376\376\0\375\375\0\376\376\0\376\376\0\376\376\0\360\360\0" - "\360\360\0\360\360\0\360\360\0\16\16\0\376\376\0\376\376\0\16\16\0\0\0\0" - "\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0" - "\0\0\0\0\0\0\0\0\0&&\0""77\0""22\0--\0``\0vv\0pp\0gg\0\243\243\0\255\255" - "\0\225\225\0\231\231\0\311\311\0\314\314\0\235\235\0\271\271\0\337\337\0" - "\326\326\0\224\224\0\320\320\0\352\352\0\336\336\0\204\204\0\337\337\0\362" - "\362\0\345\345\0qq\0\353\353\0\370\370\0\354\354\0^^\0\363\363\0\373\373" - "\0\362\362\0JJ\0\371\371\0\375\375\0\367\367\0""66\0\374\374\0\376\376\0" - "\373\373\0\"\"\0\376\376\0\376\376\0\375\375\0\16\16\0\376\376\0\376\376" - "\0\376\376\0\376\376\0\376\376\0\376\376\0\375\375\0\376\376\0\376\376\0" - "\375\375\0\360\360\0\376\376\0\360\360\0\376\376\0\16\16\0\376\376\0\376" - "\376\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0" - "\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0&&\0##\0FF\0""99\0``\0PP\0\200\200\0dd\0\222" - "\222\0kk\0\222\222\0vv\0\231\231\0ff\0\213\213\0ww\0\217\217\0UU\0xx\0mm" - "\0zz\0@@\0bb\0]]\0dd\0,,\0MM\0KK\0OO\0\35\35\0::\0""99\0;;\0\21\21\0**\0" - "))\0**\0\10\10\0\33\33\0\33\33\0\33\33\0\3\3\0\17\17\0\17\17\0\17\17\0\0" - "\0\0\7\7\0\7\7\0\7\7\0\7\7\0\2\2\0\2\2\0\2\2\0\2\2\0\16\16\0\16\16\0\16\16" - "\0\16\16\0\360\360\0\360\360\0\376\376\0\376\376\0\16\16\0\376\376\0\0\0" - "\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0" - "\0\0\0\0\0\0\0\0\0\0##\0""77\0""77\0""99\0^^\0zz\0\216\216\0\201\201\0\203" - "\203\0\254\254\0\324\324\0\271\271\0\211\211\0\266\266\0\345\345\0\317\317" - "\0\200\200\0\254\254\0\346\346\0\326\326\0ss\0\231\231\0\344\344\0\334\334" - "\0gg\0\206\206\0\344\344\0\340\340\0[[\0rr\0\346\346\0\344\344\0NN\0^^\0" - "\352\352\0\352\352\0AA\0JJ\0\357\357\0\357\357\0""11\0""66\0\364\364\0\364" - "\364\0\40\40\0\"\"\0\371\371\0\371\371\0\16\16\0\16\16\0\375\375\0\375\375" - "\0\376\376\0\376\376\0\362\362\0\362\362\0\376\376\0\376\376\0\16\16\0\16" - "\16\0\376\376\0\376\376\0\376\376\0\16\16\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0" - "\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\22\22" - "\0""77\0""77\0--\0MM\0\210\210\0\210\210\0\\\\\0\202\202\0\302\302\0\302" - "\302\0||\0\240\240\0\330\330\0\330\330\0\204\204\0\257\257\0\341\341\0\341" - "\341\0\177\177\0\275\275\0\351\351\0\351\351\0vv\0\316\316\0\360\360\0\360" - "\360\0ii\0\334\334\0\365\365\0\365\365\0ZZ\0\351\351\0\371\371\0\371\371" - "\0II\0\362\362\0\374\374\0\374\374\0""66\0\370\370\0\376\376\0\376\376\0" - "\"\"\0\374\374\0\376\376\0\376\376\0\16\16\0\376\376\0\376\376\0\376\376" - "\0\376\376\0\375\375\0\376\376\0\376\376\0\376\376\0\360\360\0\360\360\0" - "\360\360\0\360\360\0\16\16\0\376\376\0\376\376\0\16\16\0\0\0\0\0\0\0\0\0" - "\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0" - "\0\0\0\0&&\0""77\0""22\0--\0``\0vv\0xx\0kk\0\245\245\0\257\257\0\235\235" - "\0\234\234\0\312\312\0\315\315\0\241\241\0\272\272\0\337\337\0\326\326\0" - "\225\225\0\320\320\0\352\352\0\336\336\0\204\204\0\337\337\0\362\362\0\345" - "\345\0qq\0\353\353\0\370\370\0\354\354\0^^\0\363\363\0\373\373\0\362\362" - "\0JJ\0\371\371\0\375\375\0\367\367\0""66\0\374\374\0\376\376\0\373\373\0" - "\"\"\0\376\376\0\376\376\0\375\375\0\16\16\0\376\376\0\376\376\0\376\376" - "\0\376\376\0\376\376\0\376\376\0\375\375\0\376\376\0\376\376\0\375\375\0" - "\360\360\0\376\376\0\360\360\0\376\376\0\16\16\0\376\376\0\376\376\0\0\0" - "\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0" - "\0\0\0\0\0\0\0\0\0\0&&\0##\0FF\0""99\0``\0PP\0\200\200\0dd\0\222\222\0kk" - "\0\222\222\0vv\0\231\231\0ff\0\213\213\0ww\0\217\217\0UU\0xx\0mm\0zz\0@@" - "\0bb\0]]\0dd\0,,\0MM\0KK\0OO\0\35\35\0::\0""99\0;;\0\21\21\0**\0))\0**\0" - "\10\10\0\33\33\0\33\33\0\33\33\0\3\3\0\17\17\0\17\17\0\17\17\0\0\0\0\7\7" - "\0\7\7\0\7\7\0\7\7\0\2\2\0\2\2\0\2\2\0\2\2\0\16\16\0\16\16\0\16\16\0\16\16" - "\0\360\360\0\360\360\0\376\376\0\376\376\0\16\16\0\376\376\0\0\0\0\0\0\0" - "\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0" - "\0\0\0\0\0\0##\0""77\0""77\0""99\0^^\0zz\0\216\216\0\201\201\0\203\203\0" - "\254\254\0\324\324\0\271\271\0\211\211\0\266\266\0\345\345\0\317\317\0\200" - "\200\0\254\254\0\346\346\0\326\326\0ss\0\231\231\0\344\344\0\334\334\0gg" - "\0\206\206\0\344\344\0\340\340\0[[\0rr\0\346\346\0\344\344\0NN\0^^\0\352" - "\352\0\352\352\0AA\0JJ\0\357\357\0\357\357\0""11\0""66\0\364\364\0\364\364" - "\0\40\40\0\"\"\0\371\371\0\371\371\0\16\16\0\16\16\0\375\375\0\375\375\0" - "\376\376\0\376\376\0\362\362\0\362\362\0\376\376\0\376\376\0\16\16\0\16\16" - "\0\376\376\0\376\376\0\376\376\0\16\16\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0" - "\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\22\22\0" - """77\0""77\0--\0MM\0\210\210\0\210\210\0\\\\\0\202\202\0\302\302\0\302\302" - "\0||\0\240\240\0\330\330\0\330\330\0\204\204\0\257\257\0\341\341\0\341\341" - "\0\177\177\0\275\275\0\351\351\0\351\351\0vv\0\316\316\0\360\360\0\360\360" - "\0ii\0\334\334\0\365\365\0\365\365\0ZZ\0\351\351\0\371\371\0\371\371\0II" - "\0\362\362\0\374\374\0\374\374\0""66\0\370\370\0\376\376\0\376\376\0\"\"" - "\0\374\374\0\376\376\0\376\376\0\16\16\0\376\376\0\376\376\0\376\376\0\376" - "\376\0\375\375\0\376\376\0\376\376\0\376\376\0\360\360\0\360\360\0\360\360" - "\0\360\360\0\16\16\0\376\376\0\376\376\0\16\16\0\0\0\0\0\0\0\0\0\0\0\0\0" - "\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0" - "&&\0""77\0""22\0--\0``\0vv\0xx\0kk\0\245\245\0\257\257\0\235\235\0\234\234" - "\0\312\312\0\315\315\0\241\241\0\272\272\0\337\337\0\326\326\0\225\225\0" - "\320\320\0\352\352\0\336\336\0\204\204\0\337\337\0\362\362\0\345\345\0qq" - "\0\353\353\0\370\370\0\354\354\0^^\0\363\363\0\373\373\0\362\362\0JJ\0\371" - "\371\0\375\375\0\367\367\0""66\0\374\374\0\376\376\0\373\373\0\"\"\0\376" - "\376\0\376\376\0\375\375\0\16\16\0\376\376\0\376\376\0\376\376\0\376\376" - "\0\376\376\0\376\376\0\375\375\0\376\376\0\376\376\0\375\375\0\360\360\0" - "\376\376\0\360\360\0\376\376\0\16\16\0\376\376\0\376\376\0\0\0\0\0\0\0\0" - "\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0" - "\0\0\0\0\0&&\0##\0FF\0""99\0``\0PP\0\200\200\0dd\0\222\222\0kk\0\222\222" - "\0vv\0\231\231\0ff\0\213\213\0ww\0\217\217\0UU\0xx\0mm\0zz\0@@\0bb\0]]\0" - "dd\0,,\0MM\0KK\0OO\0\35\35\0::\0""99\0;;\0\21\21\0**\0))\0**\0\10\10\0\33" - "\33\0\33\33\0\33\33\0\3\3\0\17\17\0\17\17\0\17\17\0\0\0\0\7\7\0\7\7\0\7\7" - "\0\7\7\0\2\2\0\2\2\0\2\2\0\2\2\0\16\16\0\16\16\0\16\16\0\16\16\0\360\360" - "\0\360\360\0\376\376\0\376\376\0\16\16\0\376\376\0\0\0\0\0\0\0\0\0\0\0\0" - "\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0" - "\0##\0""77\0""77\0""99\0^^\0zz\0\216\216\0\201\201\0\203\203\0\254\254\0" - "\324\324\0\271\271\0\211\211\0\266\266\0\345\345\0\317\317\0\200\200\0\254" - "\254\0\346\346\0\326\326\0ss\0\231\231\0\344\344\0\334\334\0gg\0\206\206" - "\0\344\344\0\340\340\0[[\0rr\0\346\346\0\344\344\0NN\0^^\0\352\352\0\352" - "\352\0AA\0JJ\0\357\357\0\357\357\0""11\0""66\0\364\364\0\364\364\0\40\40" - "\0\"\"\0\371\371\0\371\371\0\16\16\0\16\16\0\375\375\0\375\375\0\376\376" - "\0\376\376\0\362\362\0\362\362\0\376\376\0\376\376\0\16\16\0\16\16\0\376" - "\376\0\376\376\0\376\376\0\16\16\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0" - "\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\22\22\0""77\0" - """77\0--\0MM\0\210\210\0\210\210\0\\\\\0\202\202\0\302\302\0\302\302\0||" - "\0\240\240\0\330\330\0\330\330\0\204\204\0\257\257\0\341\341\0\341\341\0" - "\177\177\0\275\275\0\351\351\0\351\351\0vv\0\316\316\0\360\360\0\360\360" - "\0ii\0\334\334\0\365\365\0\365\365\0ZZ\0\351\351\0\371\371\0\371\371\0II" - "\0\362\362\0\374\374\0\374\374\0""66\0\370\370\0\376\376\0\376\376\0\"\"" - "\0\374\374\0\376\376\0\376\376\0\16\16\0\376\376\0\376\376\0\376\376\0\376" - "\376\0\375\375\0\376\376\0\376\376\0\376\376\0\360\360\0\360\360\0\360\360" - "\0\360\360\0\16\16\0\376\376\0\376\376\0\16\16\0\0\0\0\0\0\0\0\0\0\0\0\0" - "\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0" - "&&\0""77\0""22\0--\0``\0vv\0xx\0kk\0\245\245\0\257\257\0\235\235\0\234\234" - "\0\312\312\0\315\315\0\241\241\0\272\272\0\337\337\0\326\326\0\225\225\0" - "\320\320\0\352\352\0\336\336\0\204\204\0\337\337\0\362\362\0\345\345\0qq" - "\0\353\353\0\370\370\0\354\354\0^^\0\363\363\0\373\373\0\362\362\0JJ\0\371" - "\371\0\375\375\0\367\367\0""66\0\374\374\0\376\376\0\373\373\0\"\"\0\376" - "\376\0\376\376\0\375\375\0\16\16\0\376\376\0\376\376\0\376\376\0\376\376" - "\0\376\376\0\376\376\0\375\375\0\376\376\0\376\376\0\375\375\0\360\360\0" - "\376\376\0\360\360\0\376\376\0\16\16\0\376\376\0\376\376\0\0\0\0\0\0\0\0" - "\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0" - "\0\0\0\0\0&&\0##\0FF\0""99\0``\0PP\0\200\200\0dd\0\222\222\0kk\0\222\222" - "\0vv\0\231\231\0ff\0\213\213\0ww\0\217\217\0UU\0xx\0mm\0zz\0@@\0bb\0]]\0" - "dd\0,,\0MM\0KK\0OO\0\35\35\0::\0""99\0;;\0\21\21\0**\0))\0**\0\10\10\0\33" - "\33\0\33\33\0\33\33\0\3\3\0\17\17\0\17\17\0\17\17\0\0\0\0\7\7\0\7\7\0\7\7" - "\0\7\7\0\2\2\0\2\2\0\2\2\0\2\2\0\16\16\0\16\16\0\16\16\0\16\16\0\360\360" - "\0\360\360\0\376\376\0\376\376\0\16\16\0\376\376\0\0\0\0\0\0\0\0\0\0\0\0" - "\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0" - "\0##\0""77\0""77\0""99\0^^\0zz\0\216\216\0\201\201\0\203\203\0\254\254\0" - "\324\324\0\271\271\0\211\211\0\266\266\0\345\345\0\317\317\0\200\200\0\254" - "\254\0\346\346\0\326\326\0ss\0\231\231\0\344\344\0\334\334\0gg\0\206\206" - "\0\344\344\0\340\340\0[[\0rr\0\346\346\0\344\344\0NN\0^^\0\352\352\0\352" - "\352\0AA\0JJ\0\357\357\0\357\357\0""11\0""66\0\364\364\0\364\364\0\40\40" - "\0\"\"\0\371\371\0\371\371\0\16\16\0\16\16\0\375\375\0\375\375\0\376\376" - "\0\376\376\0\362\362\0\362\362\0\376\376\0\376\376\0\16\16\0\16\16\0\376" - "\376\0\376\376\0\376\376\0\16\16\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0" - "\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\22\22\0""77\0" - """77\0--\0MM\0\210\210\0\210\210\0\\\\\0\202\202\0\302\302\0\302\302\0||" - "\0\240\240\0\330\330\0\330\330\0\204\204\0\257\257\0\341\341\0\341\341\0" - "\177\177\0\275\275\0\351\351\0\351\351\0vv\0\316\316\0\360\360\0\360\360" - "\0ii\0\334\334\0\365\365\0\365\365\0ZZ\0\351\351\0\371\371\0\371\371\0II" - "\0\362\362\0\374\374\0\374\374\0""66\0\370\370\0\376\376\0\376\376\0\"\"" - "\0\374\374\0\376\376\0\376\376\0\16\16\0\376\376\0\376\376\0\376\376\0\376" - "\376\0\375\375\0\376\376\0\376\376\0\376\376\0\360\360\0\360\360\0\360\360" - "\0\360\360\0\16\16\0\376\376\0\376\376\0\16\16\0\0\0\0\0\0\0\0\0\0\0\0\0" - "\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0" - "&&\0""77\0""22\0--\0``\0vv\0xx\0kk\0\245\245\0\257\257\0\235\235\0\234\234" - "\0\312\312\0\315\315\0\241\241\0\272\272\0\337\337\0\326\326\0\225\225\0" - "\320\320\0\352\352\0\336\336\0\204\204\0\337\337\0\362\362\0\345\345\0qq" - "\0\353\353\0\370\370\0\354\354\0^^\0\363\363\0\373\373\0\362\362\0JJ\0\371" - "\371\0\375\375\0\367\367\0""66\0\374\374\0\376\376\0\373\373\0\"\"\0\376" - "\376\0\376\376\0\375\375\0\16\16\0\376\376\0\376\376\0\376\376\0\376\376" - "\0\376\376\0\376\376\0\375\375\0\376\376\0\376\376\0\375\375\0\360\360\0" - "\376\376\0\360\360\0\376\376\0\16\16\0\376\376\0\376\376\0\0\0\0\0\0\0\0" - "\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0" - "\0\0\0\0\0&&\0##\0FF\0""99\0``\0PP\0\213\213\0mm\0\237\237\0uu\0\275\275" - "\0\232\232\0\306\306\0\204\204\0\331\331\0\272\272\0\336\336\0\205\205\0" - "\345\345\0\320\320\0\352\352\0{{\0\355\355\0\337\337\0\362\362\0mm\0\363" - "\363\0\353\353\0\370\370\0\\\\\0\367\367\0\363\363\0\373\373\0II\0\373\373" - "\0\371\371\0\375\375\0""66\0\375\375\0\374\374\0\376\376\0\"\"\0\376\376" - "\0\376\376\0\376\376\0\16\16\0\376\376\0\376\376\0\376\376\0\376\376\0\376" - "\376\0\376\376\0\376\376\0\376\376\0\375\375\0\376\376\0\375\375\0\375\375" - "\0\360\360\0\360\360\0\376\376\0\376\376\0\16\16\0\376\376\0\0\0\0\0\0\0" - "\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0" - "\0\0\0\0\0\0##\0""77\0""77\0""99\0gg\0\205\205\0\205\205\0ww\0\224\224\0" - "\310\310\0\310\310\0\247\247\0\240\240\0\354\354\0\354\354\0\306\306\0\227" - "\227\0\372\372\0\372\372\0\325\325\0\205\205\0\375\375\0\375\375\0\342\342" - "\0rr\0\376\376\0\376\376\0\354\354\0^^\0\376\376\0\376\376\0\363\363\0JJ" - "\0\376\376\0\376\376\0\370\370\0""66\0\376\376\0\376\376\0\374\374\0\"\"" - "\0\376\376\0\376\376\0\376\376\0\16\16\0\376\376\0\376\376\0\376\376\0\376" - "\376\0\376\376\0\376\376\0\376\376\0\376\376\0\376\376\0\376\376\0\375\375" - "\0\376\376\0\376\376\0\376\376\0\362\362\0\376\376\0\376\376\0\376\376\0" - "\16\16\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0" - "\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\22\22\0""77\0""77\0""11\0>>\0~~\0~~\0bb" - "\0__\0\261\261\0\261\261\0\212\212\0``\0\277\277\0\277\277\0\230\230\0SS" - "\0\275\275\0\275\275\0\233\233\0@@\0\273\273\0\273\273\0\240\240\0//\0\274" - "\274\0\274\274\0\252\252\0!!\0\301\301\0\301\301\0\266\266\0\25\25\0\311" - "\311\0\311\311\0\303\303\0\14\14\0\324\324\0\324\324\0\322\322\0\6\6\0\342" - "\342\0\342\342\0\341\341\0\1\1\0\361\361\0\361\361\0\361\361\0\15\15\0\15" - "\15\0\15\15\0\15\15\0\362\362\0\362\362\0\362\362\0\360\360\0\16\16\0\16" - "\16\0\16\16\0\2\2\0\376\376\0\376\376\0\376\376\0\16\16\0\0\0\0\0\0\0\0\0" - "\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0" - "\0\0\0\0&&\0""77\0""77\0\34\34\0SS\0kk\0\206\206\0BB\0\214\214\0\232\232" - "\0\302\302\0YY\0\250\250\0\255\255\0\340\340\0XX\0\264\264\0\264\264\0\355" - "\355\0SS\0\265\265\0\266\266\0\364\364\0JJ\0\270\270\0\272\272\0\371\371" - "\0AA\0\277\277\0\300\300\0\374\374\0""66\0\310\310\0\311\311\0\375\375\0" - "**\0\324\324\0\324\324\0\376\376\0\34\34\0\341\341\0\342\342\0\376\376\0" - "\15\15\0\361\361\0\361\361\0\376\376\0\361\361\0\15\15\0\15\15\0\376\376" - "\0\15\15\0\361\361\0\361\361\0\373\373\0\362\362\0\15\15\0\16\16\0\376\376" - "\0\16\16\0\361\361\0\376\376\0\376\376\0\376\376\0\0\0\0\0\0\0\0\0\0\0\0" - "\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0" - "\0&&\0&&\0""77\0))\0SS\0SS\0kk\0DD\0\205\205\0}}\0\222\222\0WW\0\241\241" - "\0\230\230\0\245\245\0XX\0\261\261\0\252\252\0\261\261\0SS\0\264\264\0\263" - "\263\0\265\265\0JJ\0\270\270\0\271\271\0\272\272\0AA\0\276\276\0\300\300" - "\0\300\300\0""66\0\310\310\0\311\311\0\311\311\0**\0\324\324\0\324\324\0" - "\324\324\0\34\34\0\341\341\0\342\342\0\342\342\0\15\15\0\361\361\0\361\361" - "\0\361\361\0\361\361\0\15\15\0\15\15\0\15\15\0\15\15\0\361\361\0\361\361" - "\0\361\361\0\362\362\0\15\15\0\16\16\0\16\16\0\16\16\0\361\361\0\376\376" - "\0\376\376\0\376\376\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0" - "\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0&&\0&&\0&&\0))\0pp\0cc\0cc" - "\0QQ\0\261\261\0\244\244\0\244\244\0ll\0\335\335\0\323\323\0\323\323\0ww" - "\0\364\364\0\356\356\0\356\356\0ss\0\370\370\0\371\371\0\371\371\0ii\0\372" - "\372\0\375\375\0\375\375\0YY\0\374\374\0\376\376\0\376\376\0HH\0\375\375" - "\0\376\376\0\376\376\0""66\0\376\376\0\376\376\0\376\376\0\"\"\0\376\376" - "\0\376\376\0\376\376\0\16\16\0\376\376\0\376\376\0\376\376\0\376\376\0\376" - "\376\0\376\376\0\376\376\0\376\376\0\376\376\0\376\376\0\376\376\0\376\376" - "\0\375\375\0\376\376\0\376\376\0\376\376\0\361\361\0\376\376\0\376\376\0" - "\376\376\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0" - "\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\24\24\0&&\0&&\0\40\40\0QQ\0pp\0pp\0KK" - "\0\215\215\0\261\261\0\261\261\0pp\0\274\274\0\337\337\0\337\337\0\200\200" - "\0\332\332\0\364\364\0\364\364\0}}\0\350\350\0\373\373\0\373\373\0oo\0\361" - "\361\0\375\375\0\375\375\0]]\0\367\367\0\376\376\0\376\376\0JJ\0\373\373" - "\0\376\376\0\376\376\0""66\0\375\375\0\376\376\0\376\376\0\"\"\0\376\376" - "\0\376\376\0\376\376\0\16\16\0\376\376\0\376\376\0\376\376\0\376\376\0\376" - "\376\0\376\376\0\376\376\0\376\376\0\376\376\0\376\376\0\376\376\0\376\376" - "\0\375\375\0\376\376\0\376\376\0\376\376\0\361\361\0\376\376\0\376\376\0" - "\360\360\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0" - "\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\24\24\0&&\0&&\0\20\20\0""88\0WW\0pp\0" - "==\0ss\0\212\212\0\252\252\0dd\0\250\250\0\264\264\0\312\312\0rr\0\313\313" - "\0\315\315\0\331\331\0rr\0\340\340\0\331\331\0\340\340\0hh\0\355\355\0\341" - "\341\0\345\345\0YY\0\366\366\0\350\350\0\352\352\0HH\0\372\372\0\356\356" - "\0\357\357\0""66\0\375\375\0\364\364\0\364\364\0\"\"\0\376\376\0\371\371" - "\0\371\371\0\16\16\0\376\376\0\375\375\0\375\375\0\376\376\0\376\376\0\361" - "\361\0\362\362\0\376\376\0\376\376\0\16\16\0\16\16\0\376\376\0\375\375\0" - "\376\376\0\375\375\0\374\374\0\360\360\0\376\376\0\376\376\0\360\360\0\0" - "\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0" - "\0\0\0\0\0\0\0\0\0\0\0\24\24\0\24\24\0&&\0\40\40\0""88\0""88\0WW\0BB\0ff" - "\0ZZ\0}}\0^^\0\226\226\0\201\201\0\241\241\0nn\0\301\301\0\246\246\0\277" - "\277\0rr\0\333\333\0\301\301\0\321\321\0ii\0\353\353\0\323\323\0\335\335" - "\0[[\0\365\365\0\341\341\0\346\346\0II\0\372\372\0\353\353\0\356\356\0""6" - "6\0\375\375\0\363\363\0\364\364\0\"\"\0\376\376\0\371\371\0\371\371\0\16" - "\16\0\376\376\0\375\375\0\375\375\0\376\376\0\376\376\0\361\361\0\361\361" - "\0\376\376\0\376\376\0\16\16\0\16\16\0\376\376\0\374\374\0\375\375\0\374" - "\374\0\374\374\0\361\361\0\376\376\0\360\360\0\360\360\0\0\0\0\0\0\0\0\0" - "\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0" - "\0\0\0\0\24\24\0\24\24\0\24\24\0\40\40\0HH\0""88\0""88\0BB\0~~\0ff\0ff\0" - "^^\0\256\256\0\226\226\0\226\226\0qq\0\325\325\0\277\277\0\277\277\0ss\0" - "\350\350\0\331\331\0\331\331\0jj\0\363\363\0\353\353\0\353\353\0[[\0\371" - "\371\0\365\365\0\365\365\0II\0\374\374\0\372\372\0\372\372\0""66\0\375\375" - "\0\375\375\0\375\375\0\"\"\0\376\376\0\376\376\0\376\376\0\16\16\0\376\376" - "\0\376\376\0\376\376\0\376\376\0\376\376\0\376\376\0\376\376\0\376\376\0" - "\376\376\0\376\376\0\376\376\0\376\376\0\374\374\0\374\374\0\374\374\0\376" - "\376\0\361\361\0\360\360\0\360\360\0\360\360\0\0\0\0\0\0\0\0\0\0\0\0\0\0" - "\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0" - "\0\0\24\24\0\24\24\0\24\24\0\40\40\0HH\0HH\0""88\0BB\0~~\0~~\0ff\0^^\0\263" - "\263\0\263\263\0\231\231\0nn\0\330\330\0\330\330\0\274\274\0pp\0\353\353" - "\0\353\353\0\324\324\0hh\0\365\365\0\365\365\0\345\345\0ZZ\0\373\373\0\373" - "\373\0\361\361\0II\0\375\375\0\375\375\0\370\370\0""66\0\376\376\0\376\376" - "\0\374\374\0\"\"\0\376\376\0\376\376\0\376\376\0\16\16\0\376\376\0\376\376" - "\0\376\376\0\376\376\0\376\376\0\376\376\0\376\376\0\376\376\0\376\376\0" - "\376\376\0\374\374\0\374\374\0\376\376\0\376\376\0\361\361\0\360\360\0\360" - "\360\0\360\360\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0" - "\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\24\24\0\24\24\0\0\0" - "\0\0\0\0((\0HH\0\40\40\0\25\25\0QQ\0\207\207\0KK\0--\0}}\0\262\262\0bb\0" - """44\0\235\235\0\320\320\0ff\0""00\0\257\257\0\341\341\0cc\0))\0\272\272" - "\0\354\354\0ZZ\0\37\37\0\303\303\0\363\363\0OO\0\26\26\0\314\314\0\370\370" - "\0AA\0\15\15\0\326\326\0\373\373\0""22\0\6\6\0\343\343\0\375\375\0!!\0\1" - "\1\0\362\362\0\376\376\0\16\16\0\16\16\0\16\16\0\375\375\0\375\375\0\375" - "\375\0\376\376\0\362\362\0\360\360\0\361\361\0\376\376\0\14\14\0\0\0\0\0" - "\0\0\360\360\0\360\360\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0" - "\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\24\24" - "\0\24\24\0\0\0\0\0\0\0((\0((\0\0\0\0\0\0\0<<\0<<\0\0\0\0\0\0\0PP\0PP\0\10" - "\10\0\4\4\0dd\0dd\0\14\14\0\6\6\0xx\0xx\0\14\14\0\5\5\0\214\214\0\214\214" - "\0\13\13\0\4\4\0\240\240\0\240\240\0\10\10\0\2\2\0\264\264\0\264\264\0\5" - "\5\0\1\1\0\310\310\0\310\310\0\3\3\0\0\0\0\334\334\0\334\334\0\1\1\0\0\0" - "\0\360\360\0\360\360\0\0\0\0\0\0\0\0\0\0\0\0\0\1\1\0\1\1\0\0\0\0\0\0\0\14" - "\14\0\14\14\0\0\0\0\0\0\0\360\360\0\360\360\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0" - "\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0" - "\0\0\0\0\0\0\0\0\0\0\0\0\0\24\24\0\24\24\0\0\0\0\0\0\0((\0((\0\0\0\0\0\0" - "\0<<\0<<\0\0\0\0\0\0\0XX\0XX\0\0\0\0\0\0\0pp\0pp\0\0\0\0\0\0\0\204\204\0" - "\204\204\0\0\0\0\0\0\0\227\227\0\227\227\0\0\0\0\0\0\0\250\250\0\250\250" - "\0\0\0\0\0\0\0\271\271\0\271\271\0\0\0\0\0\0\0\313\313\0\313\313\0\0\0\0" - "\0\0\0\335\335\0\335\335\0\0\0\0\0\0\0\360\360\0\360\360\0\0\0\0\0\0\0\1" - "\1\0\1\1\0\0\0\0\0\0\0\14\14\0\14\14\0\0\0\0\0\0\0\360\360\0\360\360\0\0" - "\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0" - "\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\24\24\0" - "\24\24\0\24\24\0\0\0\0((\0((\0((\0\0\0\0<<\0HH\0HH\0\10\10\0PP\0dd\0dd\0" - "\14\14\0dd\0||\0||\0\14\14\0xx\0\221\221\0\221\221\0\13\13\0\214\214\0\243" - "\243\0\243\243\0\10\10\0\240\240\0\264\264\0\264\264\0\5\5\0\264\264\0\303" - "\303\0\303\303\0\3\3\0\310\310\0\322\322\0\322\322\0\1\1\0\334\334\0\341" - "\341\0\341\341\0\0\0\0\360\360\0\361\361\0\361\361\0\1\1\0\0\0\0\14\14\0" - "\14\14\0\14\14\0\0\0\0\360\360\0\360\360\0\360\360\0\0\0\0\0\0\0\0\0\0\0" - "\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0" - "\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\24\24\0" - "\24\24\0\20\20\0\20\20\0""88\0""88\0**\0**\0ZZ\0ZZ\0==\0==\0yy\0yy\0II\0" - "II\0\224\224\0\224\224\0NN\0NN\0\254\254\0\254\254\0MM\0MM\0\302\302\0\302" - "\302\0HH\0HH\0\324\324\0\324\324\0>>\0>>\0\343\343\0\343\343\0""00\0""00" - "\0\356\356\0\356\356\0\40\40\0\40\40\0\367\367\0\367\367\0\16\16\0\16\16" - "\0\374\374\0\374\374\0\374\374\0\374\374\0\360\360\0\360\360\0\360\360\0" - "\360\360\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0" - "\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0" - "\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0" - "\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0" - "\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0" - "\0\0\0\0\0\0\0\0\0\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\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0" - "\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0" - "\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0", -}; - diff --git a/test/test-automation/src/libSDLtest/common/img_blitblend.c b/test/test-automation/src/libSDLtest/common/img_blitblend.c deleted file mode 100644 index d0be0867a..000000000 --- a/test/test-automation/src/libSDLtest/common/img_blitblend.c +++ /dev/null @@ -1,2691 +0,0 @@ -/* GIMP RGB C-Source image dump (alpha.c) */ -#include "common.h" - -static const SurfaceImage_t img_blendAdd = { - 80, 60, 3, - "\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0" - "\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0" - "\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0" - "\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0" - "\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0" - "\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0" - "\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0" - "\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0" - "\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0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0\0" - "\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0" - "\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0" - "\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0" - "\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0" - "\0\0\0\0\0\0\0\0\0\0\0\0dd\0dd\0dd\0dd\0\310\310\0\310\310\0\310\310\0\310" - "\310\0\310\310\0\310\310\0\310\310\0\310\310\0\310\310\0\310\310\0\310\310" - "\0\310\310\0\310\310\0\310\310\0\310\310\0\310\310\0\310\310\0\310\310\0" - "\310\310\0\310\310\0\310\310\0\310\310\0\310\310\0\310\310\0\310\310\0\310" - "\310\0\310\310\0\310\310\0\310\310\0\310\310\0\310\310\0\310\310\0\310\310" - "\0\310\310\0\310\310\0\310\310\0\310\310\0\310\310\0\310\310\0\310\310\0" - "\310\310\0\310\310\0\310\310\0\310\310\0\310\310\0\310\310\0\310\310\0\310" - "\310\0dd\0dd\0dd\0dd\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0" - "\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0" - "\0\0\0\0\0dd\0dd\0dd\0dd\0\310\310\0\310\310\0\310\310\0\310\310\0\377\377" - "\0\377\377\0\377\377\0\377\377\0\377\377\0\377\377\0\377\377\0\377\377\0" - "\377\377\0\377\377\0\377\377\0\377\377\0\377\377\0\377\377\0\377\377\0\377" - "\377\0\377\377\0\377\377\0\377\377\0\377\377\0\377\377\0\377\377\0\377\377" - "\0\377\377\0\377\377\0\377\377\0\377\377\0\377\377\0\377\377\0\377\377\0" - "\377\377\0\377\377\0\377\377\0\377\377\0\377\377\0\377\377\0\377\377\0\377" - "\377\0\377\377\0\377\377\0\377\377\0\377\377\0\377\377\0\377\377\0\310\310" - "\0\310\310\0\310\310\0\310\310\0dd\0dd\0dd\0dd\0\0\0\0\0\0\0\0\0\0\0\0\0" - "\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0" - "\0\0\0\0\0\0\0\0\0dd\0dd\0dd\0dd\0\310\310\0\310\310\0\310\310\0\310\310" - "\0\377\377\0\377\377\0\377\377\0\377\377\0\377\377\0\377\377\0\377\377\0" - "\377\377\0\377\377\0\377\377\0\377\377\0\377\377\0\377\377\0\377\377\0\377" - "\377\0\377\377\0\377\377\0\377\377\0\377\377\0\377\377\0\377\377\0\377\377" - "\0\377\377\0\377\377\0\377\377\0\377\377\0\377\377\0\377\377\0\377\377\0" - "\377\377\0\377\377\0\377\377\0\377\377\0\377\377\0\377\377\0\377\377\0\377" - "\377\0\377\377\0\377\377\0\377\377\0\377\377\0\377\377\0\377\377\0\377\377" - "\0\377\377\0\377\377\0\310\310\0\310\310\0\310\310\0\310\310\0dd\0dd\0dd" - "\0dd\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0" - "\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0dd\0dd\0dd\0dd\0\310\310\0\310\310\0" - "\310\310\0\310\310\0\377\377\0\377\377\0\377\377\0\377\377\0\377\377\0\377" - "\377\0\377\377\0\377\377\0\377\377\0\377\377\0\377\377\0\377\377\0\377\377" - "\0\377\377\0\377\377\0\377\377\0\377\377\0\377\377\0\377\377\0\377\377\0" - "\377\377\0\377\377\0\377\377\0\377\377\0\377\377\0\377\377\0\377\377\0\377" - "\377\0\377\377\0\377\377\0\377\377\0\377\377\0\377\377\0\377\377\0\377\377" - "\0\377\377\0\377\377\0\377\377\0\377\377\0\377\377\0\377\377\0\377\377\0" - "\377\377\0\377\377\0\377\377\0\377\377\0\377\377\0\377\377\0\310\310\0\310" - "\310\0\310\310\0\310\310\0dd\0dd\0dd\0dd\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0" - "\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0dd\0dd\0dd\0" - "dd\0\310\310\0\377\377\0\377\377\0\377\377\0\377\377\0\377\377\0\377\377" - "\0\377\377\0\377\377\0\377\377\0\377\377\0\377\377\0\377\377\0\377\377\0" - "\377\377\0\377\377\0\377\377\0\377\377\0\377\377\0\377\377\0\377\377\0\377" - "\377\0\377\377\0\377\377\0\377\377\0\377\377\0\377\377\0\377\377\0\377\377" - "\0\377\377\0\377\377\0\377\377\0\377\377\0\377\377\0\377\377\0\377\377\0" - "\377\377\0\377\377\0\377\377\0\377\377\0\377\377\0\377\377\0\377\377\0\377" - "\377\0\377\377\0\377\377\0\377\377\0\377\377\0\377\377\0\377\377\0\377\377" - "\0\377\377\0\377\377\0\377\377\0\377\377\0\377\377\0\377\377\0\310\310\0" - "dd\0dd\0dd\0dd\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0" - "\0\0\0\0\0\0\0\0\0\0\0\0\0\0dd\0dd\0dd\0dd\0\310\310\0\310\310\0\310\310" - "\0\377\377\0\377\377\0\377\377\0\377\377\0\377\377\0\377\377\0\377\377\0" - "\377\377\0\377\377\0\377\377\0\377\377\0\377\377\0\377\377\0\377\377\0\377" - "\377\0\377\377\0\377\377\0\377\377\0\377\377\0\377\377\0\377\377\0\377\377" - "\0\377\377\0\377\377\0\377\377\0\377\377\0\377\377\0\377\377\0\377\377\0" - "\377\377\0\377\377\0\377\377\0\377\377\0\377\377\0\377\377\0\377\377\0\377" - "\377\0\377\377\0\377\377\0\377\377\0\377\377\0\377\377\0\377\377\0\377\377" - "\0\377\377\0\377\377\0\377\377\0\377\377\0\377\377\0\377\377\0\377\377\0" - "\377\377\0\310\310\0\310\310\0\310\310\0dd\0dd\0dd\0dd\0\0\0\0\0\0\0\0\0" - "\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0dd\0dd\0dd" - "\0\310\310\0\310\310\0\310\310\0\310\310\0\377\377\0\377\377\0\377\377\0" - "\377\377\0\377\377\0\377\377\0\377\377\0\377\377\0\377\377\0\377\377\0\377" - "\377\0\377\377\0\377\377\0\377\377\0\377\377\0\377\377\0\377\377\0\377\377" - "\0\377\377\0\377\377\0\377\377\0\377\377\0\377\377\0\377\377\0\377\377\0" - "\377\377\0\377\377\0\377\377\0\377\377\0\377\377\0\377\377\0\377\377\0\377" - "\377\0\377\377\0\377\377\0\377\377\0\377\377\0\377\377\0\377\377\0\377\377" - "\0\377\377\0\377\377\0\377\377\0\377\377\0\377\377\0\377\377\0\377\377\0" - "\377\377\0\377\377\0\377\377\0\377\377\0\377\377\0\377\377\0\377\377\0\310" - "\310\0\310\310\0\310\310\0\310\310\0dd\0dd\0dd\0\0\0\0\0\0\0\0\0\0\0\0\0" - "\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0dd\0dd\0\310\310\0\310\310" - "\0\310\310\0\310\310\0\377\377\0\377\377\0\377\377\0\377\377\0\377\377\0" - "\377\377\0\377\377\0\377\377\0\377\377\0\377\377\0\377\377\0\377\377\0\377" - "\377\0\377\377\0\377\377\0\377\377\0\377\377\0\377\377\0\377\377\0\377\377" - "\0\377\377\0\377\377\0\377\377\0\377\377\0\377\377\0\377\377\0\377\377\0" - "\377\377\0\377\377\0\377\377\0\377\377\0\377\377\0\377\377\0\377\377\0\377" - "\377\0\377\377\0\377\377\0\377\377\0\377\377\0\377\377\0\377\377\0\377\377" - "\0\377\377\0\377\377\0\377\377\0\377\377\0\377\377\0\377\377\0\377\377\0" - "\377\377\0\377\377\0\377\377\0\377\377\0\377\377\0\377\377\0\377\377\0\310" - "\310\0\310\310\0\310\310\0\310\310\0dd\0dd\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0" - "\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0dd\0\310\310\0\310\310\0\310" - "\310\0\377\377\0\377\377\0\377\377\0\377\377\0\377\377\0\377\377\0\377\377" - "\0\377\377\0\377\377\0\377\377\0\377\377\0\377\377\0\377\377\0\377\377\0" - "\377\377\0\377\377\0\377\377\0\377\377\0\377\377\0\377\377\0\377\377\0\377" - "\377\0\377\377\0\377\377\0\377\377\0\377\377\0\377\377\0\377\377\0\377\377" - "\0\377\377\0\377\377\0\377\377\0\377\377\0\377\377\0\377\377\0\377\377\0" - "\377\377\0\377\377\0\377\377\0\377\377\0\377\377\0\377\377\0\377\377\0\377" - "\377\0\377\377\0\377\377\0\377\377\0\377\377\0\377\377\0\377\377\0\377\377" - "\0\377\377\0\377\377\0\377\377\0\377\377\0\377\377\0\377\377\0\377\377\0" - "\377\377\0\377\377\0\310\310\0\310\310\0\310\310\0dd\0\0\0\0\0\0\0\0\0\0" - "\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0dd\0\310\310\0\310" - "\310\0\310\310\0\377\377\0\377\377\0\377\377\0\377\377\0\377\377\0\377\377" - "\0\377\377\0\377\377\0\377\377\0\377\377\0\377\377\0\377\377\0\377\377\0" - "\377\377\0\377\377\0\377\377\0\377\377\0\377\377\0\377\377\0\377\377\0\377" - "\377\0\377\377\0\377\377\0\377\377\0\377\377\0\377\377\0\377\377\0\377\377" - "\0\377\377\0\377\377\0\377\377\0\377\377\0\377\377\0\377\377\0\377\377\0" - "\377\377\0\377\377\0\377\377\0\377\377\0\377\377\0\377\377\0\377\377\0\377" - "\377\0\377\377\0\377\377\0\377\377\0\377\377\0\377\377\0\377\377\0\377\377" - "\0\377\377\0\377\377\0\377\377\0\377\377\0\377\377\0\377\377\0\377\377\0" - "\377\377\0\377\377\0\377\377\0\310\310\0\310\310\0\310\310\0dd\0\0\0\0\0" - "\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\310\310" - "\0\310\310\0\310\310\0\377\377\0\377\377\0\377\377\0\377\377\0\377\377\0" - "\377\377\0\377\377\0\377\377\0\377\377\0\377\377\0\377\377\0\377\377\0\377" - "\377\0\377\377\0\377\377\0\377\377\0\377\377\0\377\377\0\377\377\0\377\377" - "\0\377\377\0\377\377\0\377\377\0\377\377\0\377\377\0\377\377\0\377\377\0" - "\377\377\0\377\377\0\377\377\0\377\377\0\377\377\0\377\377\0\377\377\0\377" - "\377\0\377\377\0\377\377\0\377\377\0\377\377\0\377\377\0\377\377\0\377\377" - "\0\377\377\0\377\377\0\377\377\0\377\377\0\377\377\0\377\377\0\377\377\0" - "\377\377\0\377\377\0\377\377\0\377\377\0\377\377\0\377\377\0\377\377\0\377" - "\377\0\377\377\0\377\377\0\377\377\0\377\377\0\377\377\0\310\310\0\310\310" - "\0\310\310\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0" - "\0\0\0\0\0\0\310\310\0\310\310\0\377\377\0\377\377\0\377\377\0\377\377\0" - "\377\377\0\377\377\0\377\377\0\377\377\0\377\377\0\377\377\0\377\377\0\377" - "\377\0\377\377\0\377\377\0\377\377\0\377\377\0\377\377\0\377\377\0\377\377" - "\0\377\377\0\377\377\0\377\377\0\377\377\0\377\377\0\377\377\0\377\377\0" - "\377\377\0\377\377\0\377\377\0\377\377\0\377\377\0\377\377\0\377\377\0\377" - "\377\0\377\377\0\377\377\0\377\377\0\377\377\0\377\377\0\377\377\0\377\377" - "\0\377\377\0\377\377\0\377\377\0\377\377\0\377\377\0\377\377\0\377\377\0" - "\377\377\0\377\377\0\377\377\0\377\377\0\377\377\0\377\377\0\377\377\0\377" - "\377\0\377\377\0\377\377\0\377\377\0\377\377\0\377\377\0\377\377\0\377\377" - "\0\377\377\0\310\310\0\310\310\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0" - "\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\310\310\0\377\377\0\377\377\0\377\377\0" - "\377\377\0\377\377\0\377\377\0\377\377\0\377\377\0\377\377\0\377\377\0\377" - "\377\0\377\377\0\377\377\0\377\377\0\377\377\0\377\377\0\377\377\0\377\377" - "\0\377\377\0\377\377\0\377\377\0\377\377\0\377\377\0\377\377\0\377\377\0" - "\377\377\0\377\377\0\377\377\0\377\377\0\377\377\0\377\377\0\377\377\0\377" - "\377\0\377\377\0\377\377\0\377\377\0\377\377\0\377\377\0\377\377\0\377\377" - "\0\377\377\0\377\377\0\377\377\0\377\377\0\377\377\0\377\377\0\377\377\0" - "\377\377\0\377\377\0\377\377\0\377\377\0\377\377\0\377\377\0\377\377\0\377" - "\377\0\377\377\0\377\377\0\377\377\0\377\377\0\377\377\0\377\377\0\377\377" - "\0\377\377\0\377\377\0\377\377\0\377\377\0\310\310\0\0\0\0\0\0\0\0\0\0\0" - "\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0dd\0\377\377\0\377\377" - "\0\377\377\0\377\377\0\377\377\0\377\377\0\377\377\0\377\377\0\377\377\0" - "\377\377\0\377\377\0\377\377\0\377\377\0\377\377\0\377\377\0\377\377\0\377" - "\377\0\377\377\0\377\377\0\377\377\0\377\377\0\377\377\0\377\377\0\377\377" - "\0\377\377\0\377\377\0\377\377\0\377\377\0\377\377\0\377\377\0\377\377\0" - "\377\377\0\377\377\0\377\377\0\377\377\0\377\377\0\377\377\0\377\377\0\377" - "\377\0\377\377\0\377\377\0\377\377\0\377\377\0\377\377\0\377\377\0\377\377" - "\0\377\377\0\377\377\0\377\377\0\377\377\0\377\377\0\377\377\0\377\377\0" - "\377\377\0\377\377\0\377\377\0\377\377\0\377\377\0\377\377\0\377\377\0\377" - "\377\0\377\377\0\377\377\0\377\377\0\377\377\0\377\377\0dd\0\0\0\0\0\0\0" - "\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\310\310\0\377" - "\377\0\377\377\0\377\377\0\377\377\0\377\377\0\377\377\0\377\377\0\377\377" - "\0\377\377\0\377\377\0\377\377\0\377\377\0\377\377\0\377\377\0\377\377\0" - "\377\377\0\377\377\0\377\377\0\377\377\0\377\377\0\377\377\0\377\377\0\377" - "\377\0\377\377\0\377\377\0\377\377\0\377\377\0\377\377\0\377\377\0\377\377" - "\0\377\377\0\377\377\0\377\377\0\377\377\0\377\377\0\377\377\0\377\377\0" - "\377\377\0\377\377\0\377\377\0\377\377\0\377\377\0\377\377\0\377\377\0\377" - "\377\0\377\377\0\377\377\0\377\377\0\377\377\0\377\377\0\377\377\0\377\377" - "\0\377\377\0\377\377\0\377\377\0\377\377\0\377\377\0\377\377\0\377\377\0" - "\377\377\0\377\377\0\377\377\0\377\377\0\377\377\0\377\377\0\377\377\0\310" - "\310\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0" - "\0\0\0\310\310\0\310\310\0\377\377\0\377\377\0\377\377\0\377\377\0\377\377" - "\0\377\377\0\377\377\0\377\377\0\377\377\0\377\377\0\377\377\0\377\377\0" - "\377\377\0\377\377\0\377\377\0\377\377\0\377\377\0\377\377\0\377\377\0\377" - "\377\0\377\377\0\377\377\0\377\377\0\377\377\0\377\377\0\377\377\0\377\377" - "\0\377\377\0\377\377\0\377\377\0\377\377\0\377\377\0\377\377\0\377\377\0" - "\377\377\0\377\377\0\377\377\0\377\377\0\377\377\0\377\377\0\377\377\0\377" - "\377\0\377\377\0\377\377\0\377\377\0\377\377\0\377\377\0\377\377\0\377\377" - "\0\377\377\0\377\377\0\377\377\0\377\377\0\377\377\0\377\377\0\377\377\0" - "\377\377\0\377\377\0\377\377\0\377\377\0\377\377\0\377\377\0\377\377\0\377" - "\377\0\310\310\0\310\310\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0" - "\0\0\0\0\0\0\0\0\0\0\0\0\0\310\310\0\377\377\0\377\377\0\377\377\0\377\377" - "\0\377\377\0\377\377\0\377\377\0\377\377\0\377\377\0\377\377\0\377\377\0" - "\377\377\0\377\377\0\377\377\0\377\377\0\377\377\0\377\377\0\377\377\0\377" - "\377\0\377\377\0\377\377\0\377\377\0\377\377\0\377\377\0\377\377\0\377\377" - "\0\377\377\0\377\377\0\377\377\0\377\377\0\377\377\0\377\377\0\377\377\0" - "\377\377\0\377\377\0\377\377\0\377\377\0\377\377\0\377\377\0\377\377\0\377" - "\377\0\377\377\0\377\377\0\377\377\0\377\377\0\377\377\0\377\377\0\377\377" - "\0\377\377\0\377\377\0\377\377\0\377\377\0\377\377\0\377\377\0\377\377\0" - "\377\377\0\377\377\0\377\377\0\377\377\0\377\377\0\377\377\0\377\377\0\377" - "\377\0\377\377\0\377\377\0\377\377\0\310\310\0\0\0\0\0\0\0\0\0\0\0\0\0\0" - "\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0dd\0\377\377\0\377\377\0\377" - "\377\0\377\377\0\377\377\0\377\377\0\377\377\0\377\377\0\377\377\0\377\377" - "\0\377\377\0\377\377\0\377\377\0\377\377\0\377\377\0\377\377\0\377\377\0" - "\377\377\0\377\377\0\377\377\0\377\377\0\377\377\0\377\377\0\377\377\0\377" - "\377\0\377\377\0\377\377\0\377\377\0\377\377\0\377\377\0\377\377\0\377\377" - "\0\377\377\0\377\377\0\377\377\0\377\377\0\377\377\0\377\377\0\377\377\0" - "\377\377\0\377\377\0\377\377\0\377\377\0\377\377\0\377\377\0\377\377\0\377" - "\377\0\377\377\0\377\377\0\377\377\0\377\377\0\377\377\0\377\377\0\377\377" - "\0\377\377\0\377\377\0\377\377\0\377\377\0\377\377\0\377\377\0\377\377\0" - "\377\377\0\377\377\0\377\377\0\377\377\0\377\377\0dd\0\0\0\0\0\0\0\0\0\0" - "\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\310\310\0\377\377" - "\0\377\377\0\377\377\0\377\377\0\377\377\0\377\377\0\377\377\0\377\377\0" - "\377\377\0\377\377\0\377\377\0\377\377\0\377\377\0\377\377\0\377\377\0\377" - "\377\0\377\377\0\377\377\0\377\377\0\377\377\0\377\377\0\377\377\0\377\377" - "\0\377\377\0\377\377\0\377\377\0\377\377\0\377\377\0\377\377\0\377\377\0" - "\377\377\0\377\377\0\377\377\0\377\377\0\377\377\0\377\377\0\377\377\0\377" - "\377\0\377\377\0\377\377\0\377\377\0\377\377\0\377\377\0\377\377\0\377\377" - "\0\377\377\0\377\377\0\377\377\0\377\377\0\377\377\0\377\377\0\377\377\0" - "\377\377\0\377\377\0\377\377\0\377\377\0\377\377\0\377\377\0\377\377\0\377" - "\377\0\377\377\0\377\377\0\377\377\0\377\377\0\377\377\0\377\377\0\310\310" - "\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0" - "\0\310\310\0\310\310\0\377\377\0\377\377\0\377\377\0\377\377\0\377\377\0" - "\377\377\0\377\377\0\377\377\0\377\377\0\377\377\0\377\377\0\377\377\0\377" - "\377\0\377\377\0\377\377\0\377\377\0\377\377\0\377\377\0\377\377\0\377\377" - "\0\377\377\0\377\377\0\377\377\0\377\377\0\377\377\0\377\377\0\377\377\0" - "\377\377\0\377\377\0\377\377\0\377\377\0\377\377\0\377\377\0\377\377\0\377" - "\377\0\377\377\0\377\377\0\377\377\0\377\377\0\377\377\0\377\377\0\377\377" - "\0\377\377\0\377\377\0\377\377\0\377\377\0\377\377\0\377\377\0\377\377\0" - "\377\377\0\377\377\0\377\377\0\377\377\0\377\377\0\377\377\0\377\377\0\377" - "\377\0\377\377\0\377\377\0\377\377\0\377\377\0\377\377\0\377\377\0\377\377" - "\0\310\310\0\310\310\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0" - "\0\0\0\0\0\0\0\0\0\0\0\310\310\0\377\377\0\377\377\0\377\377\0\377\377\0" - "\377\377\0\377\377\0\377\377\0\377\377\0\377\377\0\377\377\0\377\377\0\377" - "\377\0\377\377\0\377\377\0\377\377\0\377\377\0\377\377\0\377\377\0\377\377" - "\0\377\377\0\377\377\0\377\377\0\377\377\0\377\377\0\377\377\0\377\377\0" - "\377\377\0\377\377\0\377\377\0\377\377\0\377\377\0\377\377\0\377\377\0\377" - "\377\0\377\377\0\377\377\0\377\377\0\377\377\0\377\377\0\377\377\0\377\377" - "\0\377\377\0\377\377\0\377\377\0\377\377\0\377\377\0\377\377\0\377\377\0" - "\377\377\0\377\377\0\377\377\0\377\377\0\377\377\0\377\377\0\377\377\0\377" - "\377\0\377\377\0\377\377\0\377\377\0\377\377\0\377\377\0\377\377\0\377\377" - "\0\377\377\0\377\377\0\377\377\0\310\310\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0" - "\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0dd\0\377\377\0\377\377\0\377\377" - "\0\377\377\0\377\377\0\377\377\0\377\377\0\377\377\0\377\377\0\377\377\0" - "\377\377\0\377\377\0\377\377\0\377\377\0\377\377\0\377\377\0\377\377\0\377" - "\377\0\377\377\0\377\377\0\377\377\0\377\377\0\377\377\0\377\377\0\377\377" - "\0\377\377\0\377\377\0\377\377\0\377\377\0\377\377\0\377\377\0\377\377\0" - "\377\377\0\377\377\0\377\377\0\377\377\0\377\377\0\377\377\0\377\377\0\377" - "\377\0\377\377\0\377\377\0\377\377\0\377\377\0\377\377\0\377\377\0\377\377" - "\0\377\377\0\377\377\0\377\377\0\377\377\0\377\377\0\377\377\0\377\377\0" - "\377\377\0\377\377\0\377\377\0\377\377\0\377\377\0\377\377\0\377\377\0\377" - "\377\0\377\377\0\377\377\0\377\377\0\377\377\0dd\0\0\0\0\0\0\0\0\0\0\0\0" - "\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\310\310\0\377\377\0\377" - "\377\0\377\377\0\377\377\0\377\377\0\377\377\0\377\377\0\377\377\0\377\377" - "\0\377\377\0\377\377\0\377\377\0\377\377\0\377\377\0\377\377\0\377\377\0" - "\377\377\0\377\377\0\377\377\0\377\377\0\377\377\0\377\377\0\377\377\0\377" - "\377\0\377\377\0\377\377\0\377\377\0\377\377\0\377\377\0\377\377\0\377\377" - "\0\377\377\0\377\377\0\377\377\0\377\377\0\377\377\0\377\377\0\377\377\0" - "\377\377\0\377\377\0\377\377\0\377\377\0\377\377\0\377\377\0\377\377\0\377" - "\377\0\377\377\0\377\377\0\377\377\0\377\377\0\377\377\0\377\377\0\377\377" - "\0\377\377\0\377\377\0\377\377\0\377\377\0\377\377\0\377\377\0\377\377\0" - "\377\377\0\377\377\0\377\377\0\377\377\0\377\377\0\377\377\0\310\310\0\0" - "\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\310" - "\310\0\310\310\0\377\377\0\377\377\0\377\377\0\377\377\0\377\377\0\377\377" - "\0\377\377\0\377\377\0\377\377\0\377\377\0\377\377\0\377\377\0\377\377\0" - "\377\377\0\377\377\0\377\377\0\377\377\0\377\377\0\377\377\0\377\377\0\377" - "\377\0\377\377\0\377\377\0\377\377\0\377\377\0\377\377\0\377\377\0\377\377" - "\0\377\377\0\377\377\0\377\377\0\377\377\0\377\377\0\377\377\0\377\377\0" - "\377\377\0\377\377\0\377\377\0\377\377\0\377\377\0\377\377\0\377\377\0\377" - "\377\0\377\377\0\377\377\0\377\377\0\377\377\0\377\377\0\377\377\0\377\377" - "\0\377\377\0\377\377\0\377\377\0\377\377\0\377\377\0\377\377\0\377\377\0" - "\377\377\0\377\377\0\377\377\0\377\377\0\377\377\0\377\377\0\377\377\0\310" - "\310\0\310\310\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0" - "\0\0\0\0\0\0\0\0\310\310\0\377\377\0\377\377\0\377\377\0\377\377\0\377\377" - "\0\377\377\0\377\377\0\377\377\0\377\377\0\377\377\0\377\377\0\377\377\0" - "\377\377\0\377\377\0\377\377\0\377\377\0\377\377\0\377\377\0\377\377\0\377" - "\377\0\377\377\0\377\377\0\377\377\0\377\377\0\377\377\0\377\377\0\377\377" - "\0\377\377\0\377\377\0\377\377\0\377\377\0\377\377\0\377\377\0\377\377\0" - "\377\377\0\377\377\0\377\377\0\377\377\0\377\377\0\377\377\0\377\377\0\377" - "\377\0\377\377\0\377\377\0\377\377\0\377\377\0\377\377\0\377\377\0\377\377" - "\0\377\377\0\377\377\0\377\377\0\377\377\0\377\377\0\377\377\0\377\377\0" - "\377\377\0\377\377\0\377\377\0\377\377\0\377\377\0\377\377\0\377\377\0\377" - "\377\0\377\377\0\377\377\0\310\310\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0" - "\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0dd\0\377\377\0\377\377\0\377\377\0\377" - "\377\0\377\377\0\377\377\0\377\377\0\377\377\0\377\377\0\377\377\0\377\377" - "\0\377\377\0\377\377\0\377\377\0\377\377\0\377\377\0\377\377\0\377\377\0" - "\377\377\0\377\377\0\377\377\0\377\377\0\377\377\0\377\377\0\377\377\0\377" - "\377\0\377\377\0\377\377\0\377\377\0\377\377\0\377\377\0\377\377\0\377\377" - "\0\377\377\0\377\377\0\377\377\0\377\377\0\377\377\0\377\377\0\377\377\0" - "\377\377\0\377\377\0\377\377\0\377\377\0\377\377\0\377\377\0\377\377\0\377" - "\377\0\377\377\0\377\377\0\377\377\0\377\377\0\377\377\0\377\377\0\377\377" - "\0\377\377\0\377\377\0\377\377\0\377\377\0\377\377\0\377\377\0\377\377\0" - "\377\377\0\377\377\0\377\377\0\377\377\0dd\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0" - "\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\310\310\0\377\377\0\377\377" - "\0\377\377\0\377\377\0\377\377\0\377\377\0\377\377\0\377\377\0\377\377\0" - "\377\377\0\377\377\0\377\377\0\377\377\0\377\377\0\377\377\0\377\377\0\377" - "\377\0\377\377\0\377\377\0\377\377\0\377\377\0\377\377\0\377\377\0\377\377" - "\0\377\377\0\377\377\0\377\377\0\377\377\0\377\377\0\377\377\0\377\377\0" - "\377\377\0\377\377\0\377\377\0\377\377\0\377\377\0\377\377\0\377\377\0\377" - "\377\0\377\377\0\377\377\0\377\377\0\377\377\0\377\377\0\377\377\0\377\377" - "\0\377\377\0\377\377\0\377\377\0\377\377\0\377\377\0\377\377\0\377\377\0" - "\377\377\0\377\377\0\377\377\0\377\377\0\377\377\0\377\377\0\377\377\0\377" - "\377\0\377\377\0\377\377\0\377\377\0\377\377\0\377\377\0\310\310\0\0\0\0" - "\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\310\310" - "\0\310\310\0\377\377\0\377\377\0\377\377\0\377\377\0\377\377\0\377\377\0" - "\377\377\0\377\377\0\377\377\0\377\377\0\377\377\0\377\377\0\377\377\0\377" - "\377\0\377\377\0\377\377\0\377\377\0\377\377\0\377\377\0\377\377\0\377\377" - "\0\377\377\0\377\377\0\377\377\0\377\377\0\377\377\0\377\377\0\377\377\0" - "\377\377\0\377\377\0\377\377\0\377\377\0\377\377\0\377\377\0\377\377\0\377" - "\377\0\377\377\0\377\377\0\377\377\0\377\377\0\377\377\0\377\377\0\377\377" - "\0\377\377\0\377\377\0\377\377\0\377\377\0\377\377\0\377\377\0\377\377\0" - "\377\377\0\377\377\0\377\377\0\377\377\0\377\377\0\377\377\0\377\377\0\377" - "\377\0\377\377\0\377\377\0\377\377\0\377\377\0\377\377\0\377\377\0\310\310" - "\0\310\310\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0" - "\0\0\0\0\0\0\310\310\0\377\377\0\377\377\0\377\377\0\377\377\0\377\377\0" - "\377\377\0\377\377\0\377\377\0\377\377\0\377\377\0\377\377\0\377\377\0\377" - "\377\0\377\377\0\377\377\0\377\377\0\377\377\0\377\377\0\377\377\0\377\377" - "\0\377\377\0\377\377\0\377\377\0\377\377\0\377\377\0\377\377\0\377\377\0" - "\377\377\0\377\377\0\377\377\0\377\377\0\377\377\0\377\377\0\377\377\0\377" - "\377\0\377\377\0\377\377\0\377\377\0\377\377\0\377\377\0\377\377\0\377\377" - "\0\377\377\0\377\377\0\377\377\0\377\377\0\377\377\0\377\377\0\377\377\0" - "\377\377\0\377\377\0\377\377\0\377\377\0\377\377\0\377\377\0\377\377\0\377" - "\377\0\377\377\0\377\377\0\377\377\0\377\377\0\377\377\0\377\377\0\377\377" - "\0\377\377\0\377\377\0\310\310\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0" - "\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0dd\0\377\377\0\377\377\0\377\377\0\377\377" - "\0\377\377\0\377\377\0\377\377\0\377\377\0\377\377\0\377\377\0\377\377\0" - "\377\377\0\377\377\0\377\377\0\377\377\0\377\377\0\377\377\0\377\377\0\377" - "\377\0\377\377\0\377\377\0\377\377\0\377\377\0\377\377\0\377\377\0\377\377" - "\0\377\377\0\377\377\0\377\377\0\377\377\0\377\377\0\377\377\0\377\377\0" - "\377\377\0\377\377\0\377\377\0\377\377\0\377\377\0\377\377\0\377\377\0\377" - "\377\0\377\377\0\377\377\0\377\377\0\377\377\0\377\377\0\377\377\0\377\377" - "\0\377\377\0\377\377\0\377\377\0\377\377\0\377\377\0\377\377\0\377\377\0" - "\377\377\0\377\377\0\377\377\0\377\377\0\377\377\0\377\377\0\377\377\0\377" - "\377\0\377\377\0\377\377\0\377\377\0dd\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0" - "\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\310\310\0\377\377\0\377\377\0\377" - "\377\0\377\377\0\377\377\0\377\377\0\377\377\0\377\377\0\377\377\0\377\377" - "\0\377\377\0\377\377\0\377\377\0\377\377\0\377\377\0\377\377\0\377\377\0" - "\377\377\0\377\377\0\377\377\0\377\377\0\377\377\0\377\377\0\377\377\0\377" - "\377\0\377\377\0\377\377\0\377\377\0\377\377\0\377\377\0\377\377\0\377\377" - "\0\377\377\0\377\377\0\377\377\0\377\377\0\377\377\0\377\377\0\377\377\0" - "\377\377\0\377\377\0\377\377\0\377\377\0\377\377\0\377\377\0\377\377\0\377" - "\377\0\377\377\0\377\377\0\377\377\0\377\377\0\377\377\0\377\377\0\377\377" - "\0\377\377\0\377\377\0\377\377\0\377\377\0\377\377\0\377\377\0\377\377\0" - "\377\377\0\377\377\0\377\377\0\377\377\0\377\377\0\310\310\0\0\0\0\0\0\0" - "\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\310\310\0\310" - "\310\0\377\377\0\377\377\0\377\377\0\377\377\0\377\377\0\377\377\0\377\377" - "\0\377\377\0\377\377\0\377\377\0\377\377\0\377\377\0\377\377\0\377\377\0" - "\377\377\0\377\377\0\377\377\0\377\377\0\377\377\0\377\377\0\377\377\0\377" - "\377\0\377\377\0\377\377\0\377\377\0\377\377\0\377\377\0\377\377\0\377\377" - "\0\377\377\0\377\377\0\377\377\0\377\377\0\377\377\0\377\377\0\377\377\0" - "\377\377\0\377\377\0\377\377\0\377\377\0\377\377\0\377\377\0\377\377\0\377" - "\377\0\377\377\0\377\377\0\377\377\0\377\377\0\377\377\0\377\377\0\377\377" - "\0\377\377\0\377\377\0\377\377\0\377\377\0\377\377\0\377\377\0\377\377\0" - "\377\377\0\377\377\0\377\377\0\377\377\0\377\377\0\377\377\0\310\310\0\310" - "\310\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0" - "\0\0\0\310\310\0\377\377\0\377\377\0\377\377\0\377\377\0\377\377\0\377\377" - "\0\377\377\0\377\377\0\377\377\0\377\377\0\377\377\0\377\377\0\377\377\0" - "\377\377\0\377\377\0\377\377\0\377\377\0\377\377\0\377\377\0\377\377\0\377" - "\377\0\377\377\0\377\377\0\377\377\0\377\377\0\377\377\0\377\377\0\377\377" - "\0\377\377\0\377\377\0\377\377\0\377\377\0\377\377\0\377\377\0\377\377\0" - "\377\377\0\377\377\0\377\377\0\377\377\0\377\377\0\377\377\0\377\377\0\377" - "\377\0\377\377\0\377\377\0\377\377\0\377\377\0\377\377\0\377\377\0\377\377" - "\0\377\377\0\377\377\0\377\377\0\377\377\0\377\377\0\377\377\0\377\377\0" - "\377\377\0\377\377\0\377\377\0\377\377\0\377\377\0\377\377\0\377\377\0\377" - "\377\0\377\377\0\310\310\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0" - "\0\0\0\0\0\0\0\0\0\0\0\0\0dd\0\377\377\0\377\377\0\377\377\0\377\377\0\377" - "\377\0\377\377\0\377\377\0\377\377\0\377\377\0\377\377\0\377\377\0\377\377" - "\0\377\377\0\377\377\0\377\377\0\377\377\0\377\377\0\377\377\0\377\377\0" - "\377\377\0\377\377\0\377\377\0\377\377\0\377\377\0\377\377\0\377\377\0\377" - "\377\0\377\377\0\377\377\0\377\377\0\377\377\0\377\377\0\377\377\0\377\377" - "\0\377\377\0\377\377\0\377\377\0\377\377\0\377\377\0\377\377\0\377\377\0" - "\377\377\0\377\377\0\377\377\0\377\377\0\377\377\0\377\377\0\377\377\0\377" - "\377\0\377\377\0\377\377\0\377\377\0\377\377\0\377\377\0\377\377\0\377\377" - "\0\377\377\0\377\377\0\377\377\0\377\377\0\377\377\0\377\377\0\377\377\0" - "\377\377\0\377\377\0\377\377\0dd\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0" - "\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\310\310\0\377\377\0\377\377\0\310\310" - "\0\377\377\0\377\377\0\377\377\0\377\377\0\377\377\0\377\377\0\377\377\0" - "\377\377\0\377\377\0\377\377\0\377\377\0\377\377\0\377\377\0\377\377\0\377" - "\377\0\377\377\0\377\377\0\377\377\0\377\377\0\377\377\0\377\377\0\377\377" - "\0\377\377\0\377\377\0\377\377\0\377\377\0\377\377\0\377\377\0\377\377\0" - "\377\377\0\377\377\0\377\377\0\377\377\0\377\377\0\377\377\0\377\377\0\377" - "\377\0\377\377\0\377\377\0\377\377\0\377\377\0\377\377\0\377\377\0\377\377" - "\0\377\377\0\377\377\0\377\377\0\377\377\0\377\377\0\377\377\0\377\377\0" - "\377\377\0\377\377\0\377\377\0\377\377\0\377\377\0\377\377\0\377\377\0\377" - "\377\0\377\377\0\310\310\0\377\377\0\377\377\0\310\310\0\0\0\0\0\0\0\0\0" - "\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\310\310\0\310\310" - "\0\377\377\0\377\377\0\377\377\0\377\377\0\377\377\0\377\377\0\377\377\0" - "\377\377\0\377\377\0\377\377\0\377\377\0\377\377\0\377\377\0\377\377\0\377" - "\377\0\377\377\0\377\377\0\377\377\0\377\377\0\377\377\0\377\377\0\377\377" - "\0\377\377\0\377\377\0\377\377\0\377\377\0\377\377\0\377\377\0\377\377\0" - "\377\377\0\377\377\0\377\377\0\377\377\0\377\377\0\377\377\0\377\377\0\377" - "\377\0\377\377\0\377\377\0\377\377\0\377\377\0\377\377\0\377\377\0\377\377" - "\0\377\377\0\377\377\0\377\377\0\377\377\0\377\377\0\377\377\0\377\377\0" - "\377\377\0\377\377\0\377\377\0\377\377\0\377\377\0\377\377\0\377\377\0\377" - "\377\0\377\377\0\377\377\0\377\377\0\377\377\0\377\377\0\310\310\0\310\310" - "\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0" - "\0\310\310\0\310\310\0\310\310\0\377\377\0\377\377\0\377\377\0\377\377\0" - "\377\377\0\377\377\0\377\377\0\377\377\0\377\377\0\377\377\0\377\377\0\377" - "\377\0\377\377\0\377\377\0\377\377\0\377\377\0\377\377\0\377\377\0\377\377" - "\0\377\377\0\377\377\0\377\377\0\377\377\0\377\377\0\377\377\0\377\377\0" - "\377\377\0\377\377\0\377\377\0\377\377\0\377\377\0\377\377\0\377\377\0\377" - "\377\0\377\377\0\377\377\0\377\377\0\377\377\0\377\377\0\377\377\0\377\377" - "\0\377\377\0\377\377\0\377\377\0\377\377\0\377\377\0\377\377\0\377\377\0" - "\377\377\0\377\377\0\377\377\0\377\377\0\377\377\0\377\377\0\377\377\0\377" - "\377\0\377\377\0\377\377\0\377\377\0\377\377\0\377\377\0\377\377\0\310\310" - "\0\310\310\0\310\310\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0" - "\0\0\0\0\0\0\0\0\0\0\0dd\0\310\310\0\310\310\0\310\310\0\377\377\0\377\377" - "\0\377\377\0\377\377\0\377\377\0\377\377\0\377\377\0\377\377\0\377\377\0" - "\377\377\0\377\377\0\377\377\0\377\377\0\377\377\0\377\377\0\377\377\0\377" - "\377\0\377\377\0\377\377\0\377\377\0\377\377\0\377\377\0\377\377\0\377\377" - "\0\377\377\0\377\377\0\377\377\0\377\377\0\377\377\0\377\377\0\377\377\0" - "\377\377\0\377\377\0\377\377\0\377\377\0\377\377\0\377\377\0\377\377\0\377" - "\377\0\377\377\0\377\377\0\377\377\0\377\377\0\377\377\0\377\377\0\377\377" - "\0\377\377\0\377\377\0\377\377\0\377\377\0\377\377\0\377\377\0\377\377\0" - "\377\377\0\377\377\0\377\377\0\377\377\0\377\377\0\377\377\0\377\377\0\310" - "\310\0\310\310\0\310\310\0dd\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0" - "\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0dd\0\310\310\0\310\310\0dd\0\310\310\0\377" - "\377\0\377\377\0\377\377\0\377\377\0\377\377\0\377\377\0\377\377\0\377\377" - "\0\377\377\0\377\377\0\377\377\0\377\377\0\377\377\0\377\377\0\377\377\0" - "\377\377\0\377\377\0\377\377\0\377\377\0\377\377\0\377\377\0\377\377\0\377" - "\377\0\377\377\0\377\377\0\377\377\0\377\377\0\377\377\0\377\377\0\377\377" - "\0\377\377\0\377\377\0\377\377\0\377\377\0\377\377\0\377\377\0\377\377\0" - "\377\377\0\377\377\0\377\377\0\377\377\0\377\377\0\377\377\0\377\377\0\377" - "\377\0\377\377\0\377\377\0\377\377\0\377\377\0\377\377\0\377\377\0\377\377" - "\0\377\377\0\377\377\0\377\377\0\377\377\0\377\377\0\377\377\0\310\310\0" - "dd\0\310\310\0\310\310\0dd\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0" - "\0\0\0\0\0\0\0\0\0\0\0\0\0\0dd\0dd\0\310\310\0\310\310\0\310\310\0\310\310" - "\0\377\377\0\377\377\0\377\377\0\310\310\0\377\377\0\377\377\0\377\377\0" - "\377\377\0\377\377\0\377\377\0\377\377\0\377\377\0\377\377\0\377\377\0\377" - "\377\0\377\377\0\377\377\0\377\377\0\377\377\0\377\377\0\377\377\0\377\377" - "\0\377\377\0\377\377\0\377\377\0\377\377\0\377\377\0\377\377\0\377\377\0" - "\377\377\0\377\377\0\377\377\0\377\377\0\377\377\0\377\377\0\377\377\0\377" - "\377\0\377\377\0\377\377\0\377\377\0\377\377\0\377\377\0\377\377\0\377\377" - "\0\377\377\0\377\377\0\377\377\0\377\377\0\377\377\0\377\377\0\377\377\0" - "\377\377\0\310\310\0\377\377\0\377\377\0\377\377\0\310\310\0\310\310\0\310" - "\310\0\310\310\0dd\0dd\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0" - "\0\0\0\0\0\0\0\0\0\0\0\0dd\0dd\0dd\0\310\310\0\377\377\0\310\310\0\310\310" - "\0\377\377\0\377\377\0\377\377\0\377\377\0\377\377\0\377\377\0\377\377\0" - "\377\377\0\377\377\0\377\377\0\377\377\0\377\377\0\377\377\0\377\377\0\377" - "\377\0\377\377\0\377\377\0\377\377\0\377\377\0\377\377\0\377\377\0\377\377" - "\0\377\377\0\377\377\0\377\377\0\377\377\0\377\377\0\377\377\0\377\377\0" - "\377\377\0\377\377\0\377\377\0\377\377\0\377\377\0\377\377\0\377\377\0\377" - "\377\0\377\377\0\377\377\0\377\377\0\377\377\0\377\377\0\377\377\0\377\377" - "\0\377\377\0\377\377\0\377\377\0\377\377\0\377\377\0\377\377\0\377\377\0" - "\377\377\0\377\377\0\377\377\0\310\310\0\310\310\0\377\377\0\310\310\0dd" - "\0dd\0dd\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0" - "\0\0\0\0\0\0\0\0dd\0dd\0dd\0\310\310\0\377\377\0\377\377\0\310\310\0\377" - "\377\0\377\377\0\377\377\0\377\377\0\377\377\0\377\377\0\377\377\0\377\377" - "\0\377\377\0\377\377\0\377\377\0\377\377\0\377\377\0\377\377\0\377\377\0" - "\377\377\0\377\377\0\377\377\0\377\377\0\377\377\0\377\377\0\377\377\0\377" - "\377\0\377\377\0\377\377\0\377\377\0\377\377\0\377\377\0\377\377\0\377\377" - "\0\377\377\0\377\377\0\377\377\0\377\377\0\377\377\0\377\377\0\377\377\0" - "\377\377\0\377\377\0\377\377\0\377\377\0\377\377\0\377\377\0\377\377\0\377" - "\377\0\377\377\0\377\377\0\377\377\0\377\377\0\377\377\0\377\377\0\377\377" - "\0\310\310\0\377\377\0\377\377\0\310\310\0dd\0dd\0dd\0\0\0\0\0\0\0\0\0\0" - "\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0dd\0dd" - "\0\0\0\0\0\0\0dd\0\377\377\0\310\310\0\310\310\0\377\377\0\377\377\0\377" - "\377\0\377\377\0\377\377\0\377\377\0\377\377\0\377\377\0\377\377\0\377\377" - "\0\377\377\0\377\377\0\377\377\0\377\377\0\377\377\0\377\377\0\377\377\0" - "\377\377\0\377\377\0\377\377\0\377\377\0\377\377\0\377\377\0\377\377\0\377" - "\377\0\377\377\0\377\377\0\377\377\0\377\377\0\377\377\0\377\377\0\377\377" - "\0\377\377\0\377\377\0\377\377\0\377\377\0\377\377\0\377\377\0\377\377\0" - "\377\377\0\377\377\0\377\377\0\377\377\0\377\377\0\377\377\0\377\377\0\377" - "\377\0\377\377\0\377\377\0\377\377\0\310\310\0\310\310\0\377\377\0dd\0\0" - "\0\0\0\0\0dd\0dd\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0" - "\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0dd\0dd\0\0\0\0\0\0\0dd\0dd\0\0\0\0\0" - "\0\0dd\0dd\0\0\0\0\0\0\0dd\0dd\0dd\0dd\0dd\0dd\0dd\0dd\0dd\0dd\0dd\0dd\0" - "dd\0dd\0dd\0dd\0dd\0dd\0dd\0dd\0dd\0dd\0dd\0dd\0dd\0dd\0dd\0dd\0dd\0dd\0" - "dd\0dd\0dd\0dd\0dd\0dd\0dd\0dd\0dd\0dd\0\0\0\0\0\0\0dd\0dd\0\0\0\0\0\0\0" - "dd\0dd\0\0\0\0\0\0\0dd\0dd\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0" - "\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0dd\0dd\0\0\0\0" - "\0\0\0dd\0dd\0\0\0\0\0\0\0dd\0dd\0\0\0\0\0\0\0\310\310\0\310\310\0\0\0\0" - "\0\0\0\310\310\0\310\310\0\0\0\0\0\0\0\310\310\0\310\310\0\0\0\0\0\0\0\310" - "\310\0\310\310\0\0\0\0\0\0\0\310\310\0\310\310\0\0\0\0\0\0\0\310\310\0\310" - "\310\0\0\0\0\0\0\0\310\310\0\310\310\0\0\0\0\0\0\0\310\310\0\310\310\0\0" - "\0\0\0\0\0\310\310\0\310\310\0\0\0\0\0\0\0\310\310\0\310\310\0\0\0\0\0\0" - "\0dd\0dd\0\0\0\0\0\0\0dd\0dd\0\0\0\0\0\0\0dd\0dd\0\0\0\0\0\0\0\0\0\0\0\0" - "\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0" - "\0\0\0\0\0\0\0\0\0\0dd\0dd\0dd\0\0\0\0dd\0dd\0dd\0\0\0\0dd\0\310\310\0\310" - "\310\0dd\0dd\0\310\310\0\310\310\0dd\0dd\0\310\310\0\310\310\0dd\0dd\0\310" - "\310\0\310\310\0dd\0dd\0\310\310\0\310\310\0dd\0dd\0\310\310\0\310\310\0" - "dd\0dd\0\310\310\0\310\310\0dd\0dd\0\310\310\0\310\310\0dd\0dd\0\310\310" - "\0\310\310\0dd\0dd\0\310\310\0\310\310\0dd\0dd\0\310\310\0\310\310\0dd\0" - "\0\0\0dd\0dd\0dd\0\0\0\0dd\0dd\0dd\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0" - "\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0" - "\0\0\0\0\0\0\0\0\0\0\0\0dd\0dd\0dd\0dd\0\310\310\0\310\310\0\310\310\0\310" - "\310\0\310\310\0\310\310\0\310\310\0\310\310\0\310\310\0\310\310\0\310\310" - "\0\310\310\0\310\310\0\310\310\0\310\310\0\310\310\0\310\310\0\310\310\0" - "\310\310\0\310\310\0\310\310\0\310\310\0\310\310\0\310\310\0\310\310\0\310" - "\310\0\310\310\0\310\310\0\310\310\0\310\310\0\310\310\0\310\310\0\310\310" - "\0\310\310\0\310\310\0\310\310\0\310\310\0\310\310\0\310\310\0\310\310\0" - "\310\310\0\310\310\0\310\310\0\310\310\0\310\310\0\310\310\0\310\310\0\310" - "\310\0dd\0dd\0dd\0dd\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0" - "\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0" - "\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0" - "\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0" - "\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0" - "\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0" - "\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0" - "\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0" - "\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0" - "\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0" - "\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0" - "\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\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0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0" - "\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0" - "\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0" - "\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0" - "\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0" - "\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0" - "\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0" - "\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0" - "\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0" - "\0\0\0\0\0\0\0\0\0\0\0\0dd\0dd\0<<\0<<\0\240\240\0\240\240\0aa\0aa\0\240" - "\240\0\240\240\0aa\0aa\0\240\240\0\240\240\0aa\0aa\0\240\240\0\240\240\0" - "aa\0aa\0\240\240\0\240\240\0aa\0aa\0\240\240\0\240\240\0aa\0aa\0\240\240" - "\0\240\240\0aa\0aa\0\240\240\0\240\240\0aa\0aa\0\240\240\0\240\240\0aa\0" - "aa\0\240\240\0\240\240\0aa\0aa\0\240\240\0\240\240\0aa\0aa\0\240\240\0\240" - "\240\0\240\240\0\240\240\0dd\0dd\0dd\0dd\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0" - "\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0" - "\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0dd\0dd\0dd\0<<\0\240\240\0\240\240\0\240\240" - "\0aa\0\305\305\0\305\305\0\305\305\0ww\0\305\305\0\305\305\0\305\305\0ww" - "\0\305\305\0\305\305\0\305\305\0ww\0\305\305\0\305\305\0\305\305\0ww\0\305" - "\305\0\305\305\0\305\305\0ww\0\305\305\0\305\305\0\305\305\0ww\0\305\305" - "\0\305\305\0\305\305\0ww\0\305\305\0\305\305\0\305\305\0ww\0\305\305\0\305" - "\305\0\305\305\0ww\0\305\305\0\305\305\0\305\305\0ww\0\305\305\0\305\305" - "\0\305\305\0\305\305\0\240\240\0\240\240\0\240\240\0\240\240\0dd\0dd\0dd" - "\0dd\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0" - "\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0dd\0dd\0dd\0<<\0\240\240" - "\0\240\240\0\240\240\0aa\0\305\305\0\305\305\0\305\305\0ww\0\333\333\0\333" - "\333\0\305\305\0ww\0\333\333\0\333\333\0\305\305\0ww\0\333\333\0\333\333" - "\0\305\305\0ww\0\333\333\0\333\333\0\305\305\0ww\0\333\333\0\333\333\0\305" - "\305\0ww\0\333\333\0\333\333\0\305\305\0ww\0\333\333\0\333\333\0\305\305" - "\0ww\0\333\333\0\333\333\0\305\305\0ww\0\333\333\0\333\333\0\305\305\0ww" - "\0\333\333\0\333\333\0\305\305\0\305\305\0\305\305\0\305\305\0\240\240\0" - "\240\240\0\240\240\0\240\240\0dd\0dd\0dd\0dd\0\0\0\0\0\0\0\0\0\0\0\0\0\0" - "\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0" - "\0\0dd\0dd\0dd\0<<\0aa\0aa\0aa\0::\0HH\0HH\0HH\0++\0PP\0PP\0PP\0""00\0PP" - "\0PP\0PP\0""00\0PP\0PP\0PP\0""00\0PP\0PP\0PP\0""00\0PP\0PP\0PP\0""00\0PP" - "\0PP\0PP\0""00\0PP\0PP\0PP\0""00\0PP\0PP\0PP\0""00\0PP\0PP\0PP\0""00\0PP" - "\0PP\0PP\0PP\0HH\0HH\0HH\0HH\0aa\0aa\0aa\0aa\0dd\0dd\0dd\0dd\0\0\0\0\0\0" - "\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0" - "\0\0\0\0dd\0dd\0dd\0$$\0aa\0\305\305\0\305\305\0``\0\205\205\0\351\351\0" - "\351\351\0||\0\222\222\0\321\321\0\321\321\0\177\177\0\225\225\0\324\324" - "\0\321\321\0\177\177\0\225\225\0\324\324\0\321\321\0\177\177\0\225\225\0" - "\324\324\0\321\321\0\177\177\0\225\225\0\324\324\0\321\321\0\177\177\0\225" - "\225\0\324\324\0\321\321\0\177\177\0\225\225\0\324\324\0\321\321\0\177\177" - "\0\225\225\0\324\324\0\321\321\0\177\177\0\225\225\0\324\324\0\321\321\0" - "\177\177\0\225\225\0\324\324\0\321\321\0\222\222\0\222\222\0\321\321\0\314" - "\314\0\351\351\0\351\351\0\254\254\0\236\236\0\305\305\0\305\305\0aa\0<<" - "\0dd\0dd\0dd\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0" - "\0\0\0\0\0\0\0\0\0\0\0\0\0dd\0dd\0<<\0dd\0\240\240\0\240\240\0aa\0\255\255" - "\0\322\322\0\322\322\0\177\177\0\315\315\0\343\343\0\343\343\0\211\211\0" - "\313\313\0\346\346\0\346\346\0\211\211\0\313\313\0\346\346\0\346\346\0\211" - "\211\0\313\313\0\346\346\0\346\346\0\211\211\0\313\313\0\346\346\0\346\346" - "\0\211\211\0\313\313\0\346\346\0\346\346\0\211\211\0\313\313\0\346\346\0" - "\346\346\0\211\211\0\313\313\0\346\346\0\346\346\0\211\211\0\313\313\0\346" - "\346\0\346\346\0\211\211\0\313\313\0\346\346\0\346\346\0\211\211\0\320\320" - "\0\327\327\0\327\327\0\322\322\0\276\276\0\322\322\0\322\322\0\305\305\0" - "yy\0\210\210\0\210\210\0dd\0<<\0dd\0dd\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0" - "\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0dd\0dd\0<<\0\210\210\0\240" - "\240\0\240\240\0aa\0\266\266\0\322\322\0\322\322\0\205\205\0\327\327\0\343" - "\343\0\343\343\0\215\215\0\346\346\0\357\357\0\331\331\0\222\222\0\347\347" - "\0\357\357\0\331\331\0\222\222\0\347\347\0\357\357\0\331\331\0\222\222\0" - "\347\347\0\357\357\0\331\331\0\222\222\0\347\347\0\357\357\0\331\331\0\222" - "\222\0\347\347\0\357\357\0\331\331\0\222\222\0\347\347\0\357\357\0\331\331" - "\0\222\222\0\347\347\0\357\357\0\331\331\0\222\222\0\347\347\0\357\357\0" - "\331\331\0\222\222\0\357\357\0\346\346\0\320\320\0\351\351\0\327\327\0\343" - "\343\0\276\276\0\333\333\0\322\322\0\266\266\0yy\0\240\240\0\210\210\0\240" - "\240\0<<\0dd\0dd\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0" - "\0\0\0\0\0\0\0\0\0dd\0<<\0\240\240\0\210\210\0\240\240\0aa\0ww\0nn\0\177" - "\177\0MM\0SS\0OO\0SS\0""22\0WW\0TT\0XX\0""55\0UU\0UU\0XX\0""55\0UU\0UU\0" - "XX\0""55\0UU\0UU\0XX\0""55\0UU\0UU\0XX\0""55\0UU\0UU\0XX\0""55\0UU\0UU\0" - "XX\0""55\0UU\0UU\0XX\0""55\0UU\0UU\0XX\0""55\0UU\0XX\0TT\0TT\0LL\0OO\0SS" - "\0SS\0ss\0\177\177\0nn\0nn\0yy\0\210\210\0\240\240\0\240\240\0<<\0dd\0\0" - "\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0<<" - "\0\240\240\0\240\240\0\210\210\0HH\0\205\205\0\351\351\0\333\333\0pp\0\225" - "\225\0\371\371\0\363\363\0\202\202\0\231\231\0\330\330\0\325\325\0\203\203" - "\0\231\231\0\331\331\0\324\324\0\203\203\0\231\231\0\331\331\0\324\324\0" - "\203\203\0\231\231\0\331\331\0\324\324\0\203\203\0\231\231\0\331\331\0\324" - "\324\0\203\203\0\231\231\0\331\331\0\324\324\0\203\203\0\231\231\0\331\331" - "\0\324\324\0\203\203\0\231\231\0\331\331\0\324\324\0\203\203\0\231\231\0" - "\331\331\0\324\324\0\203\203\0\231\231\0\331\331\0\325\325\0\231\231\0\231" - "\231\0\330\330\0\323\323\0\371\371\0\371\371\0\274\274\0\257\257\0\351\351" - "\0\351\351\0\205\205\0``\0\240\240\0\240\240\0\240\240\0<<\0\0\0\0\0\0\0" - "\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0<<\0\240\240" - "\0\240\240\0RR\0\207\207\0\304\304\0\304\304\0nn\0\275\275\0\343\343\0\343" - "\343\0\205\205\0\324\324\0\352\352\0\352\352\0\214\214\0\316\316\0\352\352" - "\0\352\352\0\213\213\0\316\316\0\352\352\0\352\352\0\213\213\0\316\316\0" - "\352\352\0\352\352\0\213\213\0\316\316\0\352\352\0\352\352\0\213\213\0\316" - "\316\0\352\352\0\352\352\0\213\213\0\316\316\0\352\352\0\352\352\0\213\213" - "\0\316\316\0\352\352\0\352\352\0\213\213\0\316\316\0\352\352\0\352\352\0" - "\213\213\0\316\316\0\352\352\0\352\352\0\214\214\0\324\324\0\336\336\0\336" - "\336\0\331\331\0\310\310\0\343\343\0\343\343\0\325\325\0\217\217\0\254\254" - "\0\254\254\0\207\207\0aa\0\240\240\0\240\240\0<<\0\0\0\0\0\0\0\0\0\0\0\0" - "\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\240\240\0\240\240\0aa" - "\0\225\225\0\304\304\0\304\304\0\205\205\0\276\276\0\343\343\0\340\340\0" - "\222\222\0\333\333\0\352\352\0\351\351\0\226\226\0\347\347\0\362\362\0\333" - "\333\0\230\230\0\351\351\0\361\361\0\333\333\0\230\230\0\351\351\0\361\361" - "\0\333\333\0\230\230\0\351\351\0\361\361\0\333\333\0\230\230\0\351\351\0" - "\361\361\0\333\333\0\230\230\0\351\351\0\361\361\0\333\333\0\230\230\0\351" - "\351\0\361\361\0\333\333\0\230\230\0\351\351\0\361\361\0\333\333\0\230\230" - "\0\351\351\0\361\361\0\333\333\0\230\230\0\362\362\0\351\351\0\323\323\0" - "\366\366\0\336\336\0\351\351\0\304\304\0\351\351\0\343\343\0\304\304\0\217" - "\217\0\333\333\0\254\254\0\266\266\0aa\0\240\240\0\240\240\0\0\0\0\0\0\0" - "\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\240\240\0aa" - "\0\305\305\0\225\225\0\304\304\0ww\0\205\205\0ss\0\211\211\0RR\0VV\0PP\0" - "VV\0""33\0XX\0UU\0YY\0""66\0UU\0UU\0XX\0""66\0UU\0UU\0XX\0""66\0UU\0UU\0" - "XX\0""66\0UU\0UU\0XX\0""66\0UU\0UU\0XX\0""66\0UU\0UU\0XX\0""66\0UU\0UU\0" - "XX\0""66\0UU\0UU\0XX\0""66\0UU\0YY\0UU\0UU\0MM\0QQ\0UU\0UU\0ww\0\211\211" - "\0ww\0||\0\217\217\0\254\254\0\266\266\0\305\305\0aa\0\240\240\0\0\0\0\0" - "\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0aa\0\305" - "\305\0\305\305\0\225\225\0UU\0\222\222\0\366\366\0\340\340\0tt\0\231\231" - "\0\375\375\0\364\364\0\203\203\0\231\231\0\331\331\0\326\326\0\203\203\0" - "\231\231\0\331\331\0\324\324\0\203\203\0\231\231\0\331\331\0\324\324\0\203" - "\203\0\231\231\0\331\331\0\324\324\0\203\203\0\231\231\0\331\331\0\324\324" - "\0\203\203\0\231\231\0\331\331\0\324\324\0\203\203\0\231\231\0\331\331\0" - "\324\324\0\203\203\0\231\231\0\331\331\0\324\324\0\203\203\0\231\231\0\331" - "\331\0\324\324\0\203\203\0\231\231\0\331\331\0\326\326\0\231\231\0\231\231" - "\0\331\331\0\324\324\0\373\373\0\375\375\0\300\300\0\263\263\0\361\361\0" - "\366\366\0\222\222\0mm\0\266\266\0\305\305\0\305\305\0aa\0\0\0\0\0\0\0\0" - "\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0<<\0\305\305\0" - "\305\305\0``\0\214\214\0\321\321\0\321\321\0rr\0\277\277\0\346\346\0\346" - "\346\0\206\206\0\324\324\0\353\353\0\353\353\0\215\215\0\316\316\0\353\353" - "\0\353\353\0\213\213\0\316\316\0\353\353\0\353\353\0\213\213\0\316\316\0" - "\353\353\0\353\353\0\213\213\0\316\316\0\353\353\0\353\353\0\213\213\0\316" - "\316\0\353\353\0\353\353\0\213\213\0\316\316\0\353\353\0\353\353\0\213\213" - "\0\316\316\0\353\353\0\353\353\0\213\213\0\316\316\0\353\353\0\353\353\0" - "\213\213\0\316\316\0\353\353\0\353\353\0\215\215\0\324\324\0\337\337\0\337" - "\337\0\331\331\0\312\312\0\346\346\0\346\346\0\330\330\0\224\224\0\271\271" - "\0\271\271\0\217\217\0nn\0\305\305\0\305\305\0<<\0\0\0\0\0\0\0\0\0\0\0\0" - "\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\240\240\0\305\305\0ww" - "\0\225\225\0\304\304\0\314\314\0\222\222\0\277\277\0\343\343\0\342\342\0" - "\226\226\0\333\333\0\352\352\0\351\351\0\227\227\0\350\350\0\362\362\0\333" - "\333\0\230\230\0\351\351\0\361\361\0\333\333\0\230\230\0\351\351\0\361\361" - "\0\333\333\0\230\230\0\351\351\0\361\361\0\333\333\0\230\230\0\351\351\0" - "\361\361\0\333\333\0\230\230\0\351\351\0\361\361\0\333\333\0\230\230\0\351" - "\351\0\361\361\0\333\333\0\230\230\0\351\351\0\361\361\0\333\333\0\230\230" - "\0\351\351\0\361\361\0\333\333\0\230\230\0\362\362\0\351\351\0\323\323\0" - "\370\370\0\336\336\0\352\352\0\306\306\0\354\354\0\344\344\0\305\305\0\227" - "\227\0\343\343\0\254\254\0\266\266\0ww\0\305\305\0\240\240\0\0\0\0\0\0\0" - "\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\240\240\0aa" - "\0\333\333\0\236\236\0\304\304\0ww\0\210\210\0tt\0\211\211\0RR\0VV\0PP\0" - "VV\0""33\0XX\0UU\0YY\0""66\0UU\0UU\0XX\0""66\0UU\0UU\0XX\0""66\0UU\0UU\0" - "XX\0""66\0UU\0UU\0XX\0""66\0UU\0UU\0XX\0""66\0UU\0UU\0XX\0""66\0UU\0UU\0" - "XX\0""66\0UU\0UU\0XX\0""66\0UU\0YY\0UU\0UU\0MM\0QQ\0UU\0UU\0ww\0\211\211" - "\0ww\0}}\0\217\217\0\254\254\0\276\276\0\333\333\0aa\0\240\240\0\0\0\0\0" - "\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0aa\0\305" - "\305\0\305\305\0\236\236\0XX\0\222\222\0\366\366\0\341\341\0tt\0\231\231" - "\0\375\375\0\364\364\0\203\203\0\231\231\0\331\331\0\326\326\0\203\203\0" - "\231\231\0\331\331\0\324\324\0\203\203\0\231\231\0\331\331\0\324\324\0\203" - "\203\0\231\231\0\331\331\0\324\324\0\203\203\0\231\231\0\331\331\0\324\324" - "\0\203\203\0\231\231\0\331\331\0\324\324\0\203\203\0\231\231\0\331\331\0" - "\324\324\0\203\203\0\231\231\0\331\331\0\324\324\0\203\203\0\231\231\0\331" - "\331\0\324\324\0\203\203\0\231\231\0\331\331\0\326\326\0\231\231\0\231\231" - "\0\331\331\0\324\324\0\373\373\0\375\375\0\300\300\0\263\263\0\361\361\0" - "\366\366\0\222\222\0pp\0\276\276\0\305\305\0\305\305\0aa\0\0\0\0\0\0\0\0" - "\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0<<\0\305\305\0" - "\305\305\0``\0\217\217\0\324\324\0\324\324\0rr\0\300\300\0\347\347\0\347" - "\347\0\206\206\0\324\324\0\353\353\0\353\353\0\215\215\0\316\316\0\353\353" - "\0\353\353\0\213\213\0\316\316\0\353\353\0\353\353\0\213\213\0\316\316\0" - "\353\353\0\353\353\0\213\213\0\316\316\0\353\353\0\353\353\0\213\213\0\316" - "\316\0\353\353\0\353\353\0\213\213\0\316\316\0\353\353\0\353\353\0\213\213" - "\0\316\316\0\353\353\0\353\353\0\213\213\0\316\316\0\353\353\0\353\353\0" - "\213\213\0\316\316\0\353\353\0\353\353\0\215\215\0\324\324\0\337\337\0\337" - "\337\0\332\332\0\312\312\0\347\347\0\347\347\0\330\330\0\224\224\0\274\274" - "\0\274\274\0\222\222\0nn\0\305\305\0\305\305\0<<\0\0\0\0\0\0\0\0\0\0\0\0" - "\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\240\240\0\305\305\0ww" - "\0\225\225\0\304\304\0\314\314\0\225\225\0\300\300\0\344\344\0\342\342\0" - "\226\226\0\333\333\0\352\352\0\351\351\0\227\227\0\350\350\0\362\362\0\333" - "\333\0\230\230\0\351\351\0\361\361\0\333\333\0\230\230\0\351\351\0\361\361" - "\0\333\333\0\230\230\0\351\351\0\361\361\0\333\333\0\230\230\0\351\351\0" - "\361\361\0\333\333\0\230\230\0\351\351\0\361\361\0\333\333\0\230\230\0\351" - "\351\0\361\361\0\333\333\0\230\230\0\351\351\0\361\361\0\333\333\0\230\230" - "\0\351\351\0\361\361\0\333\333\0\230\230\0\362\362\0\351\351\0\323\323\0" - "\370\370\0\337\337\0\352\352\0\306\306\0\355\355\0\345\345\0\306\306\0\231" - "\231\0\343\343\0\254\254\0\266\266\0ww\0\305\305\0\240\240\0\0\0\0\0\0\0" - "\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\240\240\0aa" - "\0\333\333\0\236\236\0\304\304\0ww\0\210\210\0tt\0\211\211\0RR\0VV\0PP\0" - "VV\0""33\0XX\0UU\0YY\0""66\0UU\0UU\0XX\0""66\0UU\0UU\0XX\0""66\0UU\0UU\0" - "XX\0""66\0UU\0UU\0XX\0""66\0UU\0UU\0XX\0""66\0UU\0UU\0XX\0""66\0UU\0UU\0" - "XX\0""66\0UU\0UU\0XX\0""66\0UU\0YY\0UU\0UU\0MM\0QQ\0UU\0UU\0ww\0\211\211" - "\0ww\0}}\0\217\217\0\254\254\0\276\276\0\333\333\0aa\0\240\240\0\0\0\0\0" - "\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0aa\0\305" - "\305\0\305\305\0\236\236\0XX\0\222\222\0\366\366\0\341\341\0tt\0\231\231" - "\0\375\375\0\364\364\0\203\203\0\231\231\0\331\331\0\326\326\0\203\203\0" - "\231\231\0\331\331\0\324\324\0\203\203\0\231\231\0\331\331\0\324\324\0\203" - "\203\0\231\231\0\331\331\0\324\324\0\203\203\0\231\231\0\331\331\0\324\324" - "\0\203\203\0\231\231\0\331\331\0\324\324\0\203\203\0\231\231\0\331\331\0" - "\324\324\0\203\203\0\231\231\0\331\331\0\324\324\0\203\203\0\231\231\0\331" - "\331\0\324\324\0\203\203\0\231\231\0\331\331\0\326\326\0\231\231\0\231\231" - "\0\331\331\0\324\324\0\373\373\0\375\375\0\300\300\0\263\263\0\361\361\0" - "\366\366\0\222\222\0pp\0\276\276\0\305\305\0\305\305\0aa\0\0\0\0\0\0\0\0" - "\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0<<\0\305\305\0" - "\305\305\0``\0\217\217\0\324\324\0\324\324\0rr\0\300\300\0\347\347\0\347" - "\347\0\206\206\0\324\324\0\353\353\0\353\353\0\215\215\0\316\316\0\353\353" - "\0\353\353\0\213\213\0\316\316\0\353\353\0\353\353\0\213\213\0\316\316\0" - "\353\353\0\353\353\0\213\213\0\316\316\0\353\353\0\353\353\0\213\213\0\316" - "\316\0\353\353\0\353\353\0\213\213\0\316\316\0\353\353\0\353\353\0\213\213" - "\0\316\316\0\353\353\0\353\353\0\213\213\0\316\316\0\353\353\0\353\353\0" - "\213\213\0\316\316\0\353\353\0\353\353\0\215\215\0\324\324\0\337\337\0\337" - "\337\0\332\332\0\312\312\0\347\347\0\347\347\0\330\330\0\224\224\0\274\274" - "\0\274\274\0\222\222\0nn\0\305\305\0\305\305\0<<\0\0\0\0\0\0\0\0\0\0\0\0" - "\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\240\240\0\305\305\0ww" - "\0\225\225\0\304\304\0\314\314\0\225\225\0\300\300\0\344\344\0\342\342\0" - "\226\226\0\333\333\0\352\352\0\351\351\0\227\227\0\350\350\0\362\362\0\333" - "\333\0\230\230\0\351\351\0\361\361\0\333\333\0\230\230\0\351\351\0\361\361" - "\0\333\333\0\230\230\0\351\351\0\361\361\0\333\333\0\230\230\0\351\351\0" - "\361\361\0\333\333\0\230\230\0\351\351\0\361\361\0\333\333\0\230\230\0\351" - "\351\0\361\361\0\333\333\0\230\230\0\351\351\0\361\361\0\333\333\0\230\230" - "\0\351\351\0\361\361\0\333\333\0\230\230\0\362\362\0\351\351\0\323\323\0" - "\370\370\0\337\337\0\352\352\0\306\306\0\355\355\0\345\345\0\306\306\0\231" - "\231\0\343\343\0\254\254\0\266\266\0ww\0\305\305\0\240\240\0\0\0\0\0\0\0" - "\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\240\240\0aa" - "\0\333\333\0\236\236\0\304\304\0ww\0\210\210\0tt\0\211\211\0RR\0VV\0PP\0" - "VV\0""33\0XX\0UU\0YY\0""66\0UU\0UU\0XX\0""66\0UU\0UU\0XX\0""66\0UU\0UU\0" - "XX\0""66\0UU\0UU\0XX\0""66\0UU\0UU\0XX\0""66\0UU\0UU\0XX\0""66\0UU\0UU\0" - "XX\0""66\0UU\0UU\0XX\0""66\0UU\0YY\0UU\0UU\0MM\0QQ\0UU\0UU\0ww\0\211\211" - "\0ww\0}}\0\217\217\0\254\254\0\276\276\0\333\333\0aa\0\240\240\0\0\0\0\0" - "\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0aa\0\305" - "\305\0\305\305\0\236\236\0XX\0\222\222\0\366\366\0\341\341\0tt\0\231\231" - "\0\375\375\0\364\364\0\203\203\0\231\231\0\331\331\0\326\326\0\203\203\0" - "\231\231\0\331\331\0\324\324\0\203\203\0\231\231\0\331\331\0\324\324\0\203" - "\203\0\231\231\0\331\331\0\324\324\0\203\203\0\231\231\0\331\331\0\324\324" - "\0\203\203\0\231\231\0\331\331\0\324\324\0\203\203\0\231\231\0\331\331\0" - "\324\324\0\203\203\0\231\231\0\331\331\0\324\324\0\203\203\0\231\231\0\331" - "\331\0\324\324\0\203\203\0\231\231\0\331\331\0\326\326\0\231\231\0\231\231" - "\0\331\331\0\324\324\0\373\373\0\375\375\0\300\300\0\263\263\0\361\361\0" - "\366\366\0\222\222\0pp\0\276\276\0\305\305\0\305\305\0aa\0\0\0\0\0\0\0\0" - "\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0<<\0\305\305\0" - "\305\305\0``\0\217\217\0\324\324\0\324\324\0rr\0\300\300\0\347\347\0\347" - "\347\0\206\206\0\324\324\0\353\353\0\353\353\0\215\215\0\316\316\0\353\353" - "\0\353\353\0\213\213\0\316\316\0\353\353\0\353\353\0\213\213\0\316\316\0" - "\353\353\0\353\353\0\213\213\0\316\316\0\353\353\0\353\353\0\213\213\0\316" - "\316\0\353\353\0\353\353\0\213\213\0\316\316\0\353\353\0\353\353\0\213\213" - "\0\316\316\0\353\353\0\353\353\0\213\213\0\316\316\0\353\353\0\353\353\0" - "\213\213\0\316\316\0\353\353\0\353\353\0\215\215\0\324\324\0\337\337\0\337" - "\337\0\332\332\0\312\312\0\347\347\0\347\347\0\330\330\0\224\224\0\274\274" - "\0\274\274\0\222\222\0nn\0\305\305\0\305\305\0<<\0\0\0\0\0\0\0\0\0\0\0\0" - "\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\240\240\0\305\305\0ww" - "\0\225\225\0\304\304\0\314\314\0\225\225\0\300\300\0\344\344\0\342\342\0" - "\226\226\0\333\333\0\352\352\0\351\351\0\227\227\0\350\350\0\362\362\0\333" - "\333\0\230\230\0\351\351\0\361\361\0\333\333\0\230\230\0\351\351\0\361\361" - "\0\333\333\0\230\230\0\351\351\0\361\361\0\333\333\0\230\230\0\351\351\0" - "\361\361\0\333\333\0\230\230\0\351\351\0\361\361\0\333\333\0\230\230\0\351" - "\351\0\361\361\0\333\333\0\230\230\0\351\351\0\361\361\0\333\333\0\230\230" - "\0\351\351\0\361\361\0\333\333\0\230\230\0\362\362\0\351\351\0\323\323\0" - "\370\370\0\337\337\0\352\352\0\306\306\0\355\355\0\345\345\0\306\306\0\231" - "\231\0\343\343\0\254\254\0\266\266\0ww\0\305\305\0\240\240\0\0\0\0\0\0\0" - "\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\240\240\0aa" - "\0\333\333\0\236\236\0\304\304\0ww\0\210\210\0tt\0\211\211\0RR\0VV\0PP\0" - "VV\0""33\0XX\0UU\0YY\0""66\0UU\0UU\0XX\0""66\0UU\0UU\0XX\0""66\0UU\0UU\0" - "XX\0""66\0UU\0UU\0XX\0""66\0UU\0UU\0XX\0""66\0UU\0UU\0XX\0""66\0UU\0UU\0" - "XX\0""66\0UU\0UU\0XX\0""66\0UU\0YY\0UU\0UU\0MM\0QQ\0UU\0UU\0ww\0\211\211" - "\0ww\0}}\0\217\217\0\254\254\0\276\276\0\333\333\0aa\0\240\240\0\0\0\0\0" - "\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0aa\0\305" - "\305\0\305\305\0\236\236\0XX\0\222\222\0\366\366\0\341\341\0tt\0\231\231" - "\0\375\375\0\364\364\0\203\203\0\231\231\0\331\331\0\326\326\0\203\203\0" - "\231\231\0\331\331\0\324\324\0\203\203\0\231\231\0\331\331\0\324\324\0\203" - "\203\0\231\231\0\331\331\0\324\324\0\203\203\0\231\231\0\331\331\0\324\324" - "\0\203\203\0\231\231\0\331\331\0\324\324\0\203\203\0\231\231\0\331\331\0" - "\324\324\0\203\203\0\231\231\0\331\331\0\324\324\0\203\203\0\231\231\0\331" - "\331\0\324\324\0\203\203\0\231\231\0\331\331\0\326\326\0\231\231\0\231\231" - "\0\331\331\0\324\324\0\373\373\0\375\375\0\300\300\0\263\263\0\361\361\0" - "\366\366\0\222\222\0pp\0\276\276\0\305\305\0\305\305\0aa\0\0\0\0\0\0\0\0" - "\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0<<\0\305\305\0" - "\305\305\0``\0\217\217\0\324\324\0\324\324\0rr\0\300\300\0\347\347\0\347" - "\347\0\206\206\0\324\324\0\353\353\0\353\353\0\215\215\0\316\316\0\353\353" - "\0\353\353\0\213\213\0\316\316\0\353\353\0\353\353\0\213\213\0\316\316\0" - "\353\353\0\353\353\0\213\213\0\316\316\0\353\353\0\353\353\0\213\213\0\316" - "\316\0\353\353\0\353\353\0\213\213\0\316\316\0\353\353\0\353\353\0\213\213" - "\0\316\316\0\353\353\0\353\353\0\213\213\0\316\316\0\353\353\0\353\353\0" - "\213\213\0\316\316\0\353\353\0\353\353\0\215\215\0\324\324\0\337\337\0\337" - "\337\0\332\332\0\312\312\0\347\347\0\347\347\0\330\330\0\224\224\0\274\274" - "\0\274\274\0\222\222\0nn\0\305\305\0\305\305\0<<\0\0\0\0\0\0\0\0\0\0\0\0" - "\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\240\240\0\305\305\0ww" - "\0\225\225\0\304\304\0\314\314\0\225\225\0\300\300\0\344\344\0\342\342\0" - "\226\226\0\333\333\0\352\352\0\351\351\0\227\227\0\350\350\0\362\362\0\333" - "\333\0\230\230\0\351\351\0\361\361\0\333\333\0\230\230\0\351\351\0\361\361" - "\0\333\333\0\230\230\0\351\351\0\361\361\0\333\333\0\230\230\0\351\351\0" - "\361\361\0\333\333\0\230\230\0\351\351\0\361\361\0\333\333\0\230\230\0\351" - "\351\0\361\361\0\333\333\0\230\230\0\351\351\0\361\361\0\333\333\0\230\230" - "\0\351\351\0\361\361\0\333\333\0\230\230\0\362\362\0\351\351\0\323\323\0" - "\370\370\0\337\337\0\352\352\0\306\306\0\355\355\0\345\345\0\306\306\0\231" - "\231\0\343\343\0\254\254\0\266\266\0ww\0\305\305\0\240\240\0\0\0\0\0\0\0" - "\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\240\240\0aa" - "\0\333\333\0\236\236\0\304\304\0ww\0\340\340\0\300\300\0\343\343\0\210\210" - "\0\354\354\0\333\333\0\352\352\0\215\215\0\361\361\0\350\350\0\362\362\0" - "\223\223\0\351\351\0\351\351\0\361\361\0\223\223\0\351\351\0\351\351\0\361" - "\361\0\223\223\0\351\351\0\351\351\0\361\361\0\223\223\0\351\351\0\351\351" - "\0\361\361\0\223\223\0\351\351\0\351\351\0\361\361\0\223\223\0\351\351\0" - "\351\351\0\361\361\0\223\223\0\351\351\0\351\351\0\361\361\0\223\223\0\351" - "\351\0\351\351\0\361\361\0\223\223\0\351\351\0\362\362\0\351\351\0\351\351" - "\0\323\323\0\336\336\0\351\351\0\351\351\0\304\304\0\343\343\0\305\305\0" - "\317\317\0\217\217\0\254\254\0\276\276\0\333\333\0aa\0\240\240\0\0\0\0\0" - "\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0aa\0\305" - "\305\0\305\305\0\236\236\0\222\222\0\361\361\0\361\361\0\316\316\0\230\230" - "\0\373\373\0\373\373\0\344\344\0\231\231\0\375\375\0\375\375\0\357\357\0" - "\231\231\0\375\375\0\375\375\0\347\347\0\231\231\0\375\375\0\375\375\0\347" - "\347\0\231\231\0\375\375\0\375\375\0\347\347\0\231\231\0\375\375\0\375\375" - "\0\347\347\0\231\231\0\375\375\0\375\375\0\347\347\0\231\231\0\375\375\0" - "\375\375\0\347\347\0\231\231\0\375\375\0\375\375\0\347\347\0\231\231\0\375" - "\375\0\375\375\0\347\347\0\231\231\0\375\375\0\375\375\0\360\360\0\373\373" - "\0\375\375\0\375\375\0\347\347\0\367\367\0\373\373\0\373\373\0\326\326\0" - "\351\351\0\361\361\0\361\361\0\271\271\0\276\276\0\305\305\0\305\305\0aa" - "\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0" - "\0<<\0\305\305\0\305\305\0\236\236\0HH\0\271\271\0\271\271\0\224\224\0VV" - "\0\277\277\0\277\277\0\251\251\0DD\0\252\252\0\252\252\0\235\235\0FF\0\253" - "\253\0\253\253\0\224\224\0EE\0\253\253\0\253\253\0\224\224\0EE\0\253\253" - "\0\253\253\0\224\224\0EE\0\253\253\0\253\253\0\224\224\0EE\0\253\253\0\253" - "\253\0\224\224\0EE\0\253\253\0\253\253\0\224\224\0EE\0\253\253\0\253\253" - "\0\224\224\0EE\0\253\253\0\253\253\0\224\224\0EE\0\253\253\0\253\253\0\235" - "\235\0rr\0uu\0uu\0^^\0\272\272\0\277\277\0\277\277\0\230\230\0\205\205\0" - "\222\222\0\222\222\0MM\0\266\266\0\305\305\0\305\305\0<<\0\0\0\0\0\0\0\0" - "\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\240\240\0\305" - "\305\0\305\305\0RR\0\236\236\0\254\254\0\361\361\0VV\0\267\267\0\263\263" - "\0\356\356\0ee\0\247\247\0\244\244\0\356\356\0^^\0\251\251\0\247\247\0\365" - "\365\0bb\0\242\242\0\247\247\0\365\365\0bb\0\242\242\0\247\247\0\365\365" - "\0bb\0\242\242\0\247\247\0\365\365\0bb\0\242\242\0\247\247\0\365\365\0bb" - "\0\242\242\0\247\247\0\365\365\0bb\0\242\242\0\247\247\0\365\365\0bb\0\242" - "\242\0\247\247\0\365\365\0bb\0\242\242\0\247\247\0\365\365\0\252\252\0ee" - "\0jj\0\345\345\0tt\0\246\246\0\251\251\0\321\321\0\272\272\0ff\0\222\222" - "\0\322\322\0ww\0\210\210\0\305\305\0\305\305\0\240\240\0\0\0\0\0\0\0\0\0" - "\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\240\240\0\240\240" - "\0\305\305\0``\0\236\236\0\236\236\0\254\254\0VV\0\264\264\0\254\254\0\261" - "\261\0dd\0\246\246\0\240\240\0\243\243\0^^\0\251\251\0\246\246\0\246\246" - "\0bb\0\242\242\0\246\246\0\246\246\0bb\0\242\242\0\246\246\0\246\246\0bb" - "\0\242\242\0\246\246\0\246\246\0bb\0\242\242\0\246\246\0\246\246\0bb\0\242" - "\242\0\246\246\0\246\246\0bb\0\242\242\0\246\246\0\246\246\0bb\0\242\242" - "\0\246\246\0\246\246\0bb\0\242\242\0\246\246\0\246\246\0\251\251\0dd\0hh" - "\0hh\0pp\0\243\243\0\240\240\0\236\236\0\264\264\0cc\0\177\177\0ww\0ww\0" - "\225\225\0\305\305\0\240\240\0\240\240\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0" - "\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\240\240\0\240\240\0\240\240\0``" - "\0\351\351\0\333\333\0\333\333\0||\0\366\366\0\361\361\0\361\361\0\211\211" - "\0\373\373\0\371\371\0\371\371\0\221\221\0\375\375\0\374\374\0\374\374\0" - "\224\224\0\365\365\0\374\374\0\374\374\0\224\224\0\365\365\0\374\374\0\374" - "\374\0\224\224\0\365\365\0\374\374\0\374\374\0\224\224\0\365\365\0\374\374" - "\0\374\374\0\224\224\0\365\365\0\374\374\0\374\374\0\224\224\0\365\365\0" - "\374\374\0\374\374\0\224\224\0\365\365\0\374\374\0\374\374\0\224\224\0\365" - "\365\0\374\374\0\374\374\0\375\375\0\356\356\0\371\371\0\371\371\0\372\372" - "\0\340\340\0\361\361\0\361\361\0\364\364\0\307\307\0\333\333\0\333\333\0" - "\351\351\0\225\225\0\240\240\0\240\240\0\240\240\0\0\0\0\0\0\0\0\0\0\0\0" - "\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0dd\0\240\240\0\240\240" - "\0aa\0\304\304\0\351\351\0\351\351\0\205\205\0\340\340\0\366\366\0\366\366" - "\0\222\222\0\355\355\0\373\373\0\373\373\0\227\227\0\364\364\0\375\375\0" - "\375\375\0\230\230\0\360\360\0\375\375\0\375\375\0\230\230\0\360\360\0\375" - "\375\0\375\375\0\230\230\0\360\360\0\375\375\0\375\375\0\230\230\0\360\360" - "\0\375\375\0\375\375\0\230\230\0\360\360\0\375\375\0\375\375\0\230\230\0" - "\360\360\0\375\375\0\375\375\0\230\230\0\360\360\0\375\375\0\375\375\0\230" - "\230\0\360\360\0\375\375\0\375\375\0\373\373\0\356\356\0\373\373\0\373\373" - "\0\367\367\0\340\340\0\364\364\0\364\364\0\354\354\0\304\304\0\351\351\0" - "\351\351\0\322\322\0\210\210\0\240\240\0\240\240\0dd\0\0\0\0\0\0\0\0\0\0" - "\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0dd\0\240\240\0\240" - "\240\0<<\0\240\240\0\305\305\0\351\351\0ww\0\320\320\0\301\301\0\324\324" - "\0\211\211\0\345\345\0\316\316\0\324\324\0\217\217\0\356\356\0\323\323\0" - "\326\326\0\223\223\0\354\354\0\323\323\0\326\326\0\223\223\0\354\354\0\323" - "\323\0\326\326\0\223\223\0\354\354\0\323\323\0\326\326\0\223\223\0\354\354" - "\0\323\323\0\326\326\0\223\223\0\354\354\0\323\323\0\326\326\0\223\223\0" - "\354\354\0\323\323\0\326\326\0\223\223\0\354\354\0\323\323\0\326\326\0\223" - "\223\0\354\354\0\323\323\0\326\326\0\362\362\0\344\344\0\261\261\0\272\272" - "\0\364\364\0\340\340\0\225\225\0\205\205\0\340\340\0\276\276\0\351\351\0" - "\266\266\0\240\240\0dd\0\240\240\0\240\240\0dd\0\0\0\0\0\0\0\0\0\0\0\0\0" - "\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0dd\0dd\0\240\240\0aa\0\240" - "\240\0\240\240\0\305\305\0ww\0\305\305\0\240\240\0\266\266\0\205\205\0\333" - "\333\0\266\266\0\304\304\0\215\215\0\352\352\0\305\305\0\314\314\0\222\222" - "\0\352\352\0\305\305\0\314\314\0\222\222\0\352\352\0\305\305\0\314\314\0" - "\222\222\0\352\352\0\305\305\0\314\314\0\222\222\0\352\352\0\305\305\0\314" - "\314\0\222\222\0\352\352\0\305\305\0\314\314\0\222\222\0\352\352\0\305\305" - "\0\314\314\0\222\222\0\352\352\0\305\305\0\314\314\0\222\222\0\352\352\0" - "\305\305\0\314\314\0\361\361\0\335\335\0\242\242\0\236\236\0\333\333\0\312" - "\312\0ii\0aa\0\305\305\0\255\255\0\266\266\0\240\240\0\240\240\0\210\210" - "\0\240\240\0dd\0dd\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0" - "\0\0\0\0\0\0\0\0\0\0dd\0dd\0dd\0aa\0\305\305\0\240\240\0\240\240\0ww\0\333" - "\333\0\305\305\0\305\305\0\205\205\0\351\351\0\333\333\0\333\333\0\217\217" - "\0\363\363\0\351\351\0\351\351\0\223\223\0\357\357\0\351\351\0\351\351\0" - "\223\223\0\357\357\0\351\351\0\351\351\0\223\223\0\357\357\0\351\351\0\351" - "\351\0\223\223\0\357\357\0\351\351\0\351\351\0\223\223\0\357\357\0\351\351" - "\0\351\351\0\223\223\0\357\357\0\351\351\0\351\351\0\223\223\0\357\357\0" - "\351\351\0\351\351\0\223\223\0\357\357\0\351\351\0\351\351\0\363\363\0\345" - "\345\0\333\333\0\333\333\0\340\340\0\312\312\0\305\305\0\305\305\0\322\322" - "\0\255\255\0\240\240\0\240\240\0\305\305\0\210\210\0dd\0dd\0dd\0\0\0\0\0" - "\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0dd" - "\0dd\0dd\0aa\0\305\305\0\305\305\0\240\240\0ww\0\333\333\0\333\333\0\305" - "\305\0\205\205\0\355\355\0\355\355\0\336\336\0\215\215\0\364\364\0\364\364" - "\0\335\335\0\215\215\0\364\364\0\364\364\0\335\335\0\215\215\0\364\364\0" - "\364\364\0\335\335\0\215\215\0\364\364\0\364\364\0\335\335\0\215\215\0\364" - "\364\0\364\364\0\335\335\0\215\215\0\364\364\0\364\364\0\335\335\0\215\215" - "\0\364\364\0\364\364\0\335\335\0\215\215\0\364\364\0\364\364\0\335\335\0" - "\215\215\0\364\364\0\364\364\0\335\335\0\351\351\0\355\355\0\355\355\0\312" - "\312\0\305\305\0\322\322\0\322\322\0\255\255\0\240\240\0\305\305\0\305\305" - "\0\210\210\0dd\0dd\0dd\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0" - "\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0dd\0dd\0\0\0\0\0\0\0dd\0\305\305\0aa" - "\0""11\0\225\225\0\351\351\0\205\205\0HH\0\254\254\0\333\333\0ww\0BB\0\264" - "\264\0\340\340\0nn\0BB\0\264\264\0\340\340\0nn\0BB\0\264\264\0\340\340\0" - "nn\0BB\0\264\264\0\340\340\0nn\0BB\0\264\264\0\340\340\0nn\0BB\0\264\264" - "\0\340\340\0nn\0BB\0\264\264\0\340\340\0nn\0BB\0\264\264\0\340\340\0nn\0" - "BB\0\264\264\0\340\340\0nn\0nn\0\205\205\0\314\314\0\266\266\0\304\304\0" - "\351\351\0\236\236\0yy\0\210\210\0\305\305\0<<\0\0\0\0\0\0\0dd\0dd\0\0\0" - "\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0" - "\0\0\0\0\0\0\0dd\0dd\0\0\0\0\0\0\0dd\0dd\0\0\0\0\0\0\0dd\0dd\0\0\0\0\0\0" - "\0dd\0dd\0\25\25\0\14\14\0dd\0dd\0\25\25\0\14\14\0dd\0dd\0\25\25\0\14\14" - "\0dd\0dd\0\25\25\0\14\14\0dd\0dd\0\25\25\0\14\14\0dd\0dd\0\25\25\0\14\14" - "\0dd\0dd\0\25\25\0\14\14\0dd\0dd\0\25\25\0\14\14\0dd\0dd\0\25\25\0\14\14" - "\0dd\0dd\0\25\25\0\25\25\0\0\0\0\0\0\0$$\0$$\0\0\0\0\0\0\0<<\0<<\0\0\0\0" - "\0\0\0dd\0dd\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0" - "\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0dd\0dd\0\0\0\0\0\0\0dd\0dd\0" - "\0\0\0\0\0\0dd\0dd\0\0\0\0\0\0\0yy\0yy\0\0\0\0\0\0\0yy\0yy\0\0\0\0\0\0\0" - "yy\0yy\0\0\0\0\0\0\0yy\0yy\0\0\0\0\0\0\0yy\0yy\0\0\0\0\0\0\0yy\0yy\0\0\0" - "\0\0\0\0yy\0yy\0\0\0\0\0\0\0yy\0yy\0\0\0\0\0\0\0yy\0yy\0\0\0\0\0\0\0yy\0" - "yy\0\0\0\0\0\0\0$$\0$$\0\0\0\0\0\0\0<<\0<<\0\0\0\0\0\0\0dd\0dd\0\0\0\0\0" - "\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0" - "\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0dd\0dd\0dd\0\0\0\0dd\0dd\0dd\0\0\0\0dd" - "\0\210\210\0\210\210\0\25\25\0dd\0\210\210\0\210\210\0\25\25\0dd\0\210\210" - "\0\210\210\0\25\25\0dd\0\210\210\0\210\210\0\25\25\0dd\0\210\210\0\210\210" - "\0\25\25\0dd\0\210\210\0\210\210\0\25\25\0dd\0\210\210\0\210\210\0\25\25" - "\0dd\0\210\210\0\210\210\0\25\25\0dd\0\210\210\0\210\210\0\25\25\0dd\0\210" - "\210\0\210\210\0\25\25\0dd\0\210\210\0\210\210\0$$\0\0\0\0<<\0<<\0<<\0\0" - "\0\0dd\0dd\0dd\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0" - "\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0" - "\0\0dd\0dd\0<<\0<<\0\240\240\0\240\240\0aa\0aa\0\240\240\0\240\240\0aa\0" - "aa\0\240\240\0\240\240\0aa\0aa\0\240\240\0\240\240\0aa\0aa\0\240\240\0\240" - "\240\0aa\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\0\0\0\0\0\0\0", -}; - -static const SurfaceImage_t img_blendNone = { - 80, 60, 3, - "\377\377\377\377\377\377\377\377\377\377\377\377\377\377\377\377\377\377" - "\377\377\377\377\377\377\377\377\377\377\377\377\377\377\377\377\377\377" - "\377\377\377\377\377\377\377\377\377\377\377\377\377\377\377\377\377\377" - "\377\377\377\377\377\377\377\377\377\377\377\377\377\377\377\377\377\377" - "\377\377\377\377\377\377\377\377\377\377\377\377\377\377\377\377\377\377" - "\377\377\377\377\377\377\377\377\377\377\377\377\377\377\377\377\377\377" - "\377\377\377\377\377\377\377\377\377\377\377\377\377\377\377\377\377\377" - "\377\377\377\377\377\377\377\377\377\377\377\377\377\377\377\377\377\377" - "\377\377\377\377\377\377\377\377\377\377\377\377\377\377\377\377\377\377" - "\377\377\377\377\377\377\377\377\377\377\377\377\377\377\377\377\377\377" - "\377\377\377\377\377\377\377\377\377\377\377\377\377\377\377\377\377\377" - "\377\377\377\377\377\377\377\377\377\377\377\377\377\377\377\377\377\377" - "\377\377\377\377\377\377\377\377\377\377\377\377\377\377\377\377\377\377" - "\377\377\377\377\377\377\377\377\377\377\377\377\377\377\377\377\377\377" - "\377\377\377\377\377\377\377\377\377\377\377\377\377\377\377\377\377\377" - "\377\377\377\377\377\377\377\377\377\377\377\377\377\377\377\377\377\377" - "\377\377\377\377\377\377\377\377\377\377\377\377\377\377\377\377\377\377" - "\377\377\377\377\377\377\377\377\377\377\377\377\377\377\377\377\377\377" - "\377\377\377\377\377\377\377\377\377\377\377\377\377\377\377\377\377\377" - "\377\377\377\377\377\377\377\377\377\377\377\377\377\377\377\377\377\377" - "\377\377\377\377\377\377\377\377\377\377\377\377\377\377\377\377\377\377" - "\377\377\377\377\377\377\377\377\377\377\377\377\377\377\377\377\377\377" - "\377\377\377\377\377\377\377\377\377\377\377\377\377\377\377\377\377\377" - "\377\377\377\377\377\377\377\377\377\377\377\377\377\377\377\377\377\377" - "\377\377\377\377\377\377\377\377\377\377\377\377\377\377\377\377\377\377" - "\377\377\377\377\377\377\377\377\377\377\377\377\377\377\377\377\377\377" - "\377\377\377\377\377\377\377\377\377\377\377\377\377\377\377\377\377\377" - "\377\377\377\377\377\377\377\377\377\377\377\377\377\377\377\377\377\377" - "\377\377\377\377\377\377\377\377\377\377\377\377\377\377\377\377\377\377" - "\377\377\377\377\377\377\377\377\377\377\377\377\377\377\377\377\377\377" - "\377\377\377\377\377\377\377\377\377\377\377\377\377\377\377\377\377\377" - "\377\377\377\377\377\377\377\377\377\377\377\377\377\377\377\377\377\377" - "\377\377\377\377\377\377\377\377\377\377\377\377\377\377\377\377\377\377" - "\377\377\377\377\377\377\377\377\377\377\377\377\377\377\377\377\377\377" - "\377\377\377\377\377\377\377\377\377\377\377\377\377\377\377\377\377\377" - "\377\377\377\377\377\377\377\377\377\377\377\377\377\377\377\377\377\377" - "\377\377\377\377\377\377\377\377\377\377\377\377\377\377\377\377\377\377" - "\377\377\377\377\377\377\377\377\377\377\377\377\377\377\377\377\377\377" - "\377\377\377\377\377\377\377\377\377\377\377\377\377\377\377\377\377\377" - "\377\377\377\377\377\377\377\377\377\377\377\377\377\377\377\377\377\377" - "\377\377\377\377\377\377\377\377\377\377\377\377\377\377\377\377\377\377" - "\377\377\377\377\377\377\377\377\377\377\377\377\377\377\377\377\377\377" - "\377\377\377\377\377\377\377\377\377\377\377\377\377\377\377\377\377\377" - "\377\377\377\377\377\377\377\377\377\377\377\377\377\377\377\377\377\377" - "\377\377\377\377\377\377\377\377\377\377\377\377\377\377\377\377\377\377" - "\377\377\377\377\377\377\377\377\377\377\377\377\377\377\377\377\377\377" - "\377\377\377\377\377\377\377\377\377\377\377\377\377\377\377\377\377\377" - "\377\377\377\377\377\377\377\377\377\377\377\377\377\377\377\377\377\377" - "\377\377\377\377\377\377\377\377\377\377\377\377\377\377\377\377\377\377" - "\377\377\377\377\377\377\377\377\377\377\377\377\377\377\377\377\377\377" - "\377\377\377\377\377\377\377\377\377\377\377\377\377\377\377\377\377\377" - "\377\377\377\377\377\377\377\377\377\377\377\377\377\377\377\377\377\377" - "\377\377\377\377\377\377\377\377\377\377\377\377\377\377\377\377\377\377" - "\377\377\377\377\377\377\377\377\377\377\377\377\377\377\377\377\377\377" - "\377\377\377\377\377\377\377\377\377\377\377\377\377\377\377\377\377\377" - "\377\377\377\377\377\377\377\377\377\377\377\377\377\377\377\377\377\377" - "\377\377\377\377\377\377\377\377\377\377\377\377\377\377\377\377\377\377" - "\377\377\377\377\377\377\377\377\377\377\377\377\377\377\377\377\377\377" - "\377\377\377\377\377\377\377\377\377\377\377\377\377\377\377\377\377\377" - "\377\377\377\377\377\377\377\377\377\377\377\377\377\377\377\377\377\377" - "\377\377\377\377\377\377\377\377\377\377\377\377\377\377\377\377\377\377" - "\377\377\377\377\377\377\377\377\377\377\377\377\377\377\377\377\377\377" - "\377\377\377\377\377\377\377\377\377\377\377\377\377\377\377\377\377\377" - "\377\377\377\377\377\377\377\377\377\377\377\377\377\377\377\377\377\377" - "\377\377\377\377\377\377\377\377\377\377\377\377\377\377\377\377\377\377" - "\377\377\377\377\377\377\377\377\377\377\377\377\377\377\377\377\377\377" - "\377\377\377\377\377\377\377\377\377\377\377\377\377\377\377\377\377\377" - "\377\377\377\377\377\377\377\377\377\377\377\377\377\377\377\377\377\377" - "\377\377\377\377\377\377\377\377\377\377\377\377\377\377\377\377\377\377" - "\377\377\377\377\377\377\377\377\377\377\377\377\377\377\377\377\377\377" - "\377\377\377\377\377\377\377\377\377\377\377\377\377\377\377\377\377\377" - "\377\377\377\377\377\377\377\377\377\377\377\377\377\377\377\377\377\377" - "\377\377\377\377\377\377\377\377\377\377\377\377\377\377\377\377\377\377" - "\377\377\377\377\377\377\377\377\377\377\377\377\377\377\377\377\377\377" - "\377\377\377\377\377\377\377\377\377\377\377\377\377\377\377\377\377\377" - "\377\377\377\377\377\377\377\377\377\377\377\377\377\377\377\377\377\377" - "\377\377\377\377\377\377\377\377\377\377\377\377\377\377\377\377\377\377" - "\377\377\377\377\377\377\377\377\377\377\377\377\377\377\377\377\377\377" - "\377\377\377\377\377\377\377\377\377\377\377\377\377\377\377\377\377\377" - "\377\377\377\377\377\377\377\377\377\377\377\377\377\377\377\377\377\377" - "\377\377\377\377\377\377\377\377\377\377\377\377\377\377\377\377\377\377" - "\377\377\377\377\377\377\377\377\377\377\377\377\377\377\377\377\377\377" - "\377\377\377\377\377\377\377\377\377\377\377\377\377\377\377\377\377\377" - "\377\377\377\377\377\377\377\377\377\377\377\377\377\377\377\377\377\377" - "\377\377\377\377\377\377\377\377\377\377\377\377\377\377\377\377\377\377" - "\377\377\377\377\377\377\377\377\377\377\377\377\377\377\377\377\377\377" - "\377\377\377\377\377\377\377\377\377\377\377\377\377\377\377\377\377\377" - "\377\377\377\377\377\377\377\377\377\377\377\377\377\377\377\377\377\377" - "\377\377\377\377\377\377\377\377\377\377\377\377\377\377\377\377\377\377" - "\377\377\377\377\377\377\377\377\377\377\377\377\377\377\377\377\377\377" - "\377\377\377\377\377\377\377\377\377\377\377\377\377\377\377\377\377\377" - "\377\377\377\377\377\377\377\377\377\377\377\377\377\377\377\377\377\377" - "\377\377\377\377\377\377\377\377\377\377\377\377\377\377\377\377\377\377" - "\377\377\377\377\377\377\377\377\377\377\377\377\377\377\377\377\377\377" - "\377\377\377\377\377\377\377\377\377\377\377\377\377\377\377\377\377\377" - "\377\377\377\377\377\377\377\377\377\377\377\377\377\377\377\377\377\377" - "\377\377\377\377\377\377\377\377\377\377\377\377\377\377\377\377\377\377" - "\377\377\377\377\377\377\377\377\377\377\377\377\377\377\377\377\377\377" - "\377\377\377\377\377\377\377\377\377\377\377\377\377\377\377\377\377\377" - "\377\377\377\377\377\377\377\377\377\377\377\377\377\377\377\377\377\377" - "\377\377\377\377\377\377\377\377\377\377\377\377\377\377\377\377\377\377" - "\377\377\377\377\377\377\377\377\377\377\377\377\377\377\377\377\377\377" - "\377\377\377\377\377\377\377\377\377\377\377\377\377\377\377\377\377\377" - "\377\377\377\377\377\377\377\377\377\377\377\377\377\377\377\377\377\377" - "\377\377\377\377\377\377\377\377\377\377\377\377\377\377\377\377\377\377" - "\377\377\377\377\377\377\377\377\377\377\377\377\377\377\377\377\377\377" - "\377\377\377\377\377\377\377\377\377\377\377\377\377\377\377\377\377\377" - "\377\377\377\377\377\377\377\377\377\377\377\377\377\377\377\377\377\377" - "\377\377\377\377\377\377\377\377\377\377\377\377\377\377\377\377\377\377" - "\377\377\377\377\377\377\377\377\377\377\377\377\377\377\377\377\377\377" - "\377\377\377\377\377\377\377\377\377\377\377\377\377\377\377\377\377\377" - "\377\377\377\377\377\377\377\377\377\377\377\377\377\377\377\377\377\377" - "\377\377\377\377\377\377\377\377\377\377\377\377\377\377\377\377\377\377" - "\377\377\377\377\377\377\377\377\377\377\377\377\377\377\377\377\377\377" - "\377\377\377\377\377\377\377\377\377\377\377\377\377\377\377\377\377\377" - "\377\377\377\377\377\377\377\377\377\377\377\377\377\377\377\377\377\377" - "\377\377\377\377\377\377\377\377\377\377\377\377\377\377\377\377\377\377" - "\377\377\377\377\377\377\377\377\377\377\377\377\377\377\377\377\377\377" - "\377\377\377\377\377\377\377\377\377\377\377\377\377\377\377\377\377\377" - "\377\377\377\377\377\377\377\377\377\377\377\377\377\377\377\377\377\377" - "\377\377\377\377\377\377\377\377\377\377\377\377\377\377\377\377\377\377" - "\377\377\377\377\377\377\377\377\377\377\377\377\377\377\377\377\377\377" - "\377\377\377\377\377\377\377\377\377\377\377\377\377\377\377\377\377\377" - "\377\377\377\377\377\377\377\377\377\377\377\377\377\377\377\377\377\377" - "\377\377\377\377\377\377\377\377\377\377\377\377\377\377\377\377\377\377" - "\377\377\377\377\377\377\377\377\377\377\377\377\377\377\377\377\377\377" - "\377\377\377\377\377\377\377\377\377\377\377\377\377\377\377\377\377\377" - "\377\377\377\377\377\377\377\377\377\377\377\377\377\377\377\377\377\377" - "\377\377\377\377\377\377\377\377\377\377\377\377\377\377\377\377\377\377" - "\377\377\377\377\377\377\377\377\377\377\377\377\377\377\377\377\377\377" - "\377\377\377\377\377\377\377\377\377\377\377\377\377\377\377\377\377\377" - "\377\377\377\377\377\377\377\377\377\377\377\377\377\377\377\377\377\377" - "\377\377\377\377\377\377\377\377\377\377\377\377\377\377\377\377\377\377" - "\377\377\377\377\377\377\377\377\377\377\377\377\377\377\377\377\377\377" - "\377\377\377\377\377\377\377\377\377\377\377\377\377\377\377\377\377\377" - "\377\377\377\377\377\377\377\377\377\377\377\377\377\377\377\377\377\377" - "\377\377\377\377\377\377\377\377\377\377\377\377\377\377\377\377\377\377" - "\377\377\377\377\377\377\377\377\377\377\377\377\377\377\377\377\377\377" - "\377\377\377\377\377\377\377\377\377\377\377\377\377\377\377\377\377\377" - "\377\377\377\377\377\377\377\377\377\377\377\377\377\377\377\377\377\377" - "\377\377\377\377\377\377\377\377\377\377\377\377\377\377\377\377\377\377" - "\377\377\377\377\377\377\377\377\377\377\377\377\377\377\377\377\377\377" - "\377\377\377\377\377\377\377\377\377\377\377\377\377\377\377\377\377\377" - "\377\377\377\377\377\377\377\377\377\377\377\377\377\377\377\377\377\377" - "\377\377\377\377\377\377\377\377\377\377\377\377\377\377\377\377\377\377" - "\377\377\377\377\377\377\377\377\377\377\377\377\377\377\377\377\377\377" - "\377\377\377\377\377\377\377\377\377\377\377\377\377\377\377\377\377\377" - "\377\377\377\377\377\377\377\377\377\377\377\377\377\377\377\377\377\377" - "\377\377\377\377\377\377\377\377\377\377\377\377\377\377\377\377\377\377" - "\377\377\377\377\377\377\377\377\377\377\377\377\377\377\377\377\377\377" - "\377\377\377\377\377\377\377\377\377\377\377\377\377\377\377\377\377\377" - "\377\377\377\377\377\377\377\377\377\377\377\377\377\377\377\377\377\377" - "\377\377\377\377\377\377\377\377\377\377\377\377\377\377\377\377\377\377" - "\377\377\377\377\377\377\377\377\377\377\377\377\377\377\377\377\377\377" - "\377\377\377\377\377\377\377\377\377\377\377\377\377\377\377\377\377\377" - "\377\377\377\377\377\377\377\377\377\377\377\377\377\377\377\377\377\377" - "\377\377\377\377\377\377\377\377\377\377\377\377\377\377\377\377\377\377" - "\377\377\377\377\377\377\377\377\377\377\377\377\377\377\377\377\377\377" - "\377\377\377\377\377\377\377\377\377\377\377\377\377\377\377\377\377\377" - "\377\377\377\377\377\377\377\377\377\377\377\377\377\377\377\377\377\377" - "\377\377\377\377\377\377\377\377\377\377\377\377\377\377\377\377\377\377" - "\377\377\377\377\377\377\377\377\377\377\377\377\377\377\377\377\377\377" - "\377\377\377\377\377\377\377\377\377\377\377\377\377\377\377\377\377\377" - "\377\377\377\377\377\377\377\377\377\377\377\377\377\377\377\377\377\377" - "\377\377\377\377\377\377\377\377\377\377\377\377\377\377\377\377\377\377" - "\377\377\377\377\377\377\377\377\377\377\377\377\377\377\377\377\377\377" - "\377\377\377\377\377\377\377\377\377\377\377\377\377\377\377\377\377\377" - "\377\377\377\377\377\377\377\377\377\377\377\377\377\377\377\377\377\377" - "\377\377\377\377\377\377\377\377\377\377\377\377\377\377\377\377\377\377" - "\377\377\377\377\377\377\377\377\377\377\377\377\377\377\377\377\377\377" - "\377\377\377\377\377\377\377\377\377\377\377\377\377\377\377\377\377\377" - "\377\377\377\377\377\377\377\377\377\377\377\377\377\377\377\377\377\377" - "\377\377\377\377\377\377\377\377\377\377\377\377\377\377\377\377\377\377" - "\377\377\377\377\377\377\377\377\377\377\377\377\377\377\377\377\377\377" - "\377\377\377\377\377\377\377\377\377\377\377\377\377\377\377\377\377\377" - "\377\377\377\377\377\377\377\377\377\377\377\377\377\377\377\377\377\377" - "\377\377\377\377\377\377\377\377\377\377\377\377\377\377\377\377\377\377" - "\377\377\377\377\377\377\377\377\377\377\377\377\377\377\377\377\377\377" - "\377\377\377\377\377\377\377\377\377\377\377\377\377\377\377\377\377\377" - "\377\377\377\377\377\377\377\377\377\377\377\377\377\377\377\377\377\377" - "\377\377\377\377\377\377\377\377\377\377\377\377\377\377\377\377\377\377" - "\377\377\377\377\377\377\377\377\377\377\377\377\377\377\377\377\377\377" - "\377\377\377\377\377\377\377\377\377\377\377\377\377\377\377\377\377\377" - "\377\377\377\377\377\377\377\377\377\377\377\377\377\377\377\377\377\377" - "\377\377\377\377\377\377\377\377\377\377\377\377\377\377\377\377\377\377" - "\377\377\377\377\377\377\377\377\377\377\377\377\377\377\377\377\377\377" - "\377\377\377\377\377\377\377\377\377\377\377\377\377\377\377\377\377\377" - "\377\377\377\377\377\377\377\377\377\377\377\377\377\377\377\377\377\377" - "\377\377\377\377\377\377\377\377\377\377\377\377\377\377\377\377\377\377" - "\377\377\377\377\377\377\377\377\377\377\377\377\377\377\377\377\377\377" - "\377\377\377\377\377\377\377\377\377\377\377\377\377\377\377\377\377\377" - "\377\377\377\377\377\377\377\377\377\377\377\377\377\377\377\377\377\377" - "\377\377\377\377\377\377\377\377\377\377\377\377\377\377\377\377\377\377" - "\377\377\377\377\377\377\377\377\377\377\377\377\377\377\377\377\377\377" - "\377\377\377\377\377\377\377\377\377\377\377\377\377\377\377\377\377\377" - "\377\377\377\377\377\377\377\377\377\377\377\377\377\377\377\377\377\377" - "\377\377\377\377\377\377\377\377\377\377\377\377\377\377\377\377\377\377" - "\377\377\377\377\377\377\377\377\377\377\377\377\377\377\377\377\377\377" - "\377\377\377\377\377\377\377\377\377\377\377\377\377\377\377\377\377\377" - "\377\377\377\377\377\377\377\377\377\377\377\377\377\377\377\377\377\377" - "\377\377\377\377\377\377\377\377\377\377\377\377\377\377\377\377\377\377" - "\377\377\377\377\377\377\377\377\377\377\377\377\377\377\377\377\377\377" - "\377\377\377\377\377\377\377\377\377\377\377\377\377\377\377\377\377\377" - "\377\377\377\377\377\377\377\377\377\377\377\377\377\377\377\377\377\377" - "\377\377\377\377\377\377\377\377\377\377\377\377\377\377\377\377\377\377" - "\377\377\377\377\377\377\377\377\377\377\377\377\377\377\377\377\377\377" - "\377\377\377\377\377\377\377\377\377\377\377\377\377\377\377\377\377\377" - "\377\377\377\377\377\377\377\377\377\377\377\377\377\377\377\377\377\377" - "\377\377\377\377\377\377\377\377\377\377\377\377\377\377\377\377\377\377" - "\377\377\377\377\377\377\377\377\377\377\377\377\377\377\377\377\377\377" - "\377\377\377\377\377\377\377\377\377\377\377\377\377\377\377\377\377\377" - "\377\377\377\377\377\377\377\377\377\377\377\377\377\377\377\377\377\377" - "\377\377\377\377\377\377\377\377\377\377\377\377\377\377\377\377\377\377" - "\377\377\377\377\377\377\377\377\377\377\377\377\377\377\377\377\377\377" - "\377\377\377\377\377\377\377\377\377\377\377\377\377\377\377\377\377\377" - "\377\377\377\377\377\377\377\377\377\377\377\377\377\377\377\377\377\377" - "\377\377\377\377\377\377\377\377\377\377\377\377\377\377\377\377\377\377" - "\377\377\377\377\377\377\377\377\377\377\377\377\377\377\377\377\377\377" - "\377\377\377\377\377\377\377\377\377\377\377\377\377\377\377\377\377\377" - "\377\377\377\377\377\377\377\377\377\377\377\377\377\377\377\377\377\377" - "\377\377\377\377\377\377\377\377\377\377\377\377\377\377\377\377\377\377" - "\377\377\377\377\377\377\377\377\377\377\377\377\377\377\377\377\377\377" - "\377\377\377\377\377\377\377\377\377\377\377\377\377\377\377\377\377\377" - "\377\377\377\377\377\377\377\377\377\377\377\377\377\377\377\377\377\377" - "\377\377\377\377\377\377\377\377\377\377\377\377\377\377\377\377\377\377" - "\377\377\377\377\377\377\377\377\377\377\377\377\377\377\377\377\377\377" - "\377\377\377\377\377\377\377\377\377\377\377\377\377\377\377\377\377\377" - "\377\377\377\377\377\377\377\377\377\377\377\377\377\377\377\377\377\377" - "\377\377\377\377\377\377\377\377\377\377\377\377\377\377\377\377\377\377" - "\377\377\377\377\377\377\377\377\377\377\377\377\377\377\377\377\377\377" - "\377\377\377\377\377\377\377\377\377\377\377\377\377\377\377\377\377\377" - "\377\377\377\377\377\377\377\377\377\377\377\377\377\377\377\377\377\377" - "\377\377\377\377\377\377\377\377\377\377\377\377\377\377\377\377\377\377" - "\377\377\377\377\377\377\377\377\377\377\377\377\377\377\377\377\377\377" - "\377\377\377\377\377\377\377\377\377\377\377\377\377\377\377\377\377\377" - "\377\377\377\377\377\377\377\377\377\377\377\377\377\377\377\377\377\377" - "\377\377\377\377\377\377\377\377\377\377\377\377\377\377\377\377\377\377" - "\377\377\377\377\377\377\377\377\377\377\377\377\377\377\377\377\377\377" - "\377\377\377\377\377\377\377\377\377\377\377\377\377\377\377\377\377\377" - "\377\377\377\377\377\377\377\377\377\377\377\377\377\377\377\377\377\377" - "\377\377\377\377\377\377\377\377\377\377\377\377\377\377\377\377\377\377" - "\377\377\377\377\377\377\377\377\377\377\377\377\377\377\377\377\377\377" - "\377\377\377\377\377\377\377\377\377\377\377\377\377\377\377\377\377\377" - "\377\377\377\377\377\377\377\377\377\377\377\377\377\377\377\377\377\377" - "\377\377\377\377\377\377\377\377\377\377\377\377\377\377\377\377\377\377" - "\377\377\377\377\377\377\377\377\377\377\377\377\377\377\377\377\377\377" - "\377\377\377\377\377\377\377\377\377\377\377\377\377\377\377\377\377\377" - "\377\377\377\377\377\377\377\377\377\377\377\377\377\377\377\377\377\377" - "\377\377\377\377\377\377\377\377\377\377\377\377\377\377\377\377\377\377" - "\377\377\377\377\377\377\377\377\377\377\377\377\377\377\377\377\377\377" - "\377\377\377\377\377\377\377\377\377\377\377\377\377\377\377\377\377\377" - "\377\377\377\377\377\377\377\377\377\377\377\377\377\377\377\377\377\377" - "\377\377\377\377\377\377\377\377\377\377\377\377\377\377\377\377\377\377" - "\377\377\377\377\377\377\377\377\377\377\377\377\377\377\377\377\377\377" - "\377\377\377\377\377\377\377\377\377\377\377\377\377\377\377\377\377\377" - "\377\377\377\377\377\377\377\377\377\377\377\377\377\377\377\377\377\377" - "\377\377\377\377\377\377\377\377\377\377\377\377\377\377\377\377\377\377" - "\377\377\377\377\377\377\377\377\377\377\377\377\377\377\377\377\377\377" - "\377\377\377\377\377\377\377\377\377\377\377\377\377\377\377\377\377\377" - "\377\377\377\377\377\377\377\377\377\377\377\377\377\377\377\377\377\377" - "\377\377\377\377\377\377\377\377\377\377\377\377\377\377\377\377\377\377" - "\377\377\377\377\377\377\377\377\377\377\377\377\377\377\377\377\377\377" - "\377\377\377\377\377\377\377\377\377\377\377\377\377\377\377\377\377\377" - "\377\377\377\377\377\377\377\377\377\377\377\377\377\377\377\377\377\377" - "\377\377\377\377\377\377\377\377\377\377\377\377\377\377\377\377\377\377" - "\377\377\377\377\377\377\377\377\377\377\377\377\377\377\377\377\377\377" - "\377\377\377\377\377\377\377\377\377\377\377\377\377\377\377\377\377\377" - "\377\377\377\377\377\377\377\377\377\377\377\377\377\377\377\377\377\377" - "\377\377\377\377\377\377\377\377\377\377\377\377\377\377\377\377\377\377" - "\377\377\377\377\377\377\377\377\377\377\377\377\377\377\377\377\377\377" - "\377\377\377\377\377\377\377\377\377\377\377\377\377\377\377\377\377\377" - "\377\377\377\377\377\377\377\377\377\377\377\377\377\377\377\377\377\377" - "\377\377\377\377\377\377\377\377\377\377\377\377\377\377\377\377\377\377" - "\377\377\377\377\377\377\377\377\377\377\377\377\377\377\377\377\377\377" - "\377\377\377\377\377\377\377\377\377\377\377\377\377\377\377\377\377\377" - "\377\377\377\377\377\377\377\377\377\377\377\377\377\377\377\377\377\377" - "\377\377\377\377\377\377\377\377\377\377\377\377\377\377\377\377\377\377" - "\377\377\377\377\377\377\377\377\377\377\377\377\377\377\377\377\377\377" - "\377\377\377\377\377\377\377\377\377\377\377\377\377\377\377\377\377\377" - "\377\377\377\377\377\377\377\377\377\377\377\377\377\377\377\377\377\377" - "\377\377\377\377\377\377\377\377\377\377\377\377\377\377\377\377\377\377" - "\377\377\377\377\377\377\377\377\377\377\377\377\377\377\377\377\377\377" - "\377\377\377\377\377\377\377\377\377\377\377\377\377\377\377\377\377\377" - "\377\377\377\377\377\377\377\377\377\377\377\377\377\377\377\377\377\377" - "\377\377\377\377\377\377\377\377\377\377\377\377\377\377\377\377\377\377" - "\377\377\377\377\377\377\377\377\377\377\377\377\377\377\377\377\377\377" - "\377\377\377\377\377\377\377\377\377\377\377\377\377\377\377\377\377\377" - "\377\377\377\377\377\377\377\377\377\377\377\377\377\377\377\377\377\377" - "\377\377\377\377\377\377\377\377\377\377\377\377\377\377\377\377\377\377" - "\377\377\377\377\377\377\377\377\377\377\377\377\377\377\377\377\377\377" - "\377\377\377\377\377\377\377\377\377\377\377\377\377\377\377\377\377\377" - "\377\377\377\377\377\377\377\377\377\377\377\377\377\377\377\377\377\377" - "\377\377\377\377\377\377\377\377\377\377\377\377\377\377\377\377\377\377" - "\377\377\377\377\377\377\377\377\377\377\377\377\377\377\377\377\377\377" - "\377\377\377\377\377\377\377\377\377\377\377\377\377\377\377\377\377\377" - "\377\377\377\377\377\377\377\377\377\377\377\377\377\377\377\377\377\377" - "\377\377\377\377\377\377\377\377\377\377\377\377\377\377\377\377\377\377" - "\377\377\377\377\377\377\377\377\377\377\377\377\377\377\377\377\377\377" - "\377\377\377\377\377\377\377\377\377\377\377\377\377\377\377\377\377\377" - "\377\377\377\377\377\377\377\377\377\377\377\377\377\377\377\377\377\377" - "\377\377\377\377\377\377\377\377\377\377\377\377\377\377\377\377\377\377" - "\377\377\377\377\377\377\377\377\377\377\377\377\377\377\377\377\377\377" - "\377\377\377\377\377\377\377\377\377\377\377\377\377\377\377\377\377\377" - "\377\377\377\377\377\377\377\377\377\377\377\377\377\377\377\377\377\377" - "\377\377\377\377\377\377\377\377\377\377\377\377\377\377\377\377\377\377" - "\377\377\377\377\377\377\377\377\377\377\377\377\377\377\377\377\377\377" - "\377\377\377\377\377\377\377\377\377\377\377\377\377\377\377\377\377\377" - "\377\377\377\377\377\377\377\377\377\377\377\377\377\377\377\377\377\377" - "\377\377\377\377\377\377\377\377\377\377\377\377\377\377\377\377\377\377" - "\377\377\377\377\377\377\377\377\377\377\377\377\377\377\377\377\377\377" - "\377\377\377\377\377\377\377\377\377\377\377\377\377\377\377\377\377\377" - "\377\377\377\377\377\377\377\377\377\377\377\377\377\377\377\377\377\377" - "\377\377\377\377\377\377\377\377\377\377\377\377\377\377\377\377\377\377" - "\377\377\377\377\377\377\377\377\377\377\377\377\377\377\377\377\377\377" - "\377\377\377\377\377\377\377\377\377\377\377\377\377\377\377\377\377\377" - "\377\377\377\377\377\377\377\377\377\377\377\377\377\377\377\377\377\377" - "\377\377\377\377\377\377\377\377\377\377\377\377\377\377\377\377\377\377" - "\377\377\377\377\377\377\377\377\377\377\377\377\377\377\377\377\377\377" - "\377\377\377\377\377\377\377\377\377\377\377\377\377\377\377\377\377\377" - "\377\377\377\377\377\377\377\377\377\377\377\377\377\377\377\377\377\377" - "\377\377\377\377\377\377\377\377\377\377\377\377\377\377\377\377\377\377" - "\377\377\377\377\377\377\377\377\377\377\377\377\377\377\377\377\377\377" - "\377\377\377\377\377\377\377\377\377\377\377\377\377\377\377\377\377\377" - "\377\377\377\377\377\377\377\377\377\377\377\377\377\377\377\377\377\377" - "\377\377\377\377\377\377\377\377\377\377\377\377\377\377\377\377\377\377" - "\377\377\377\377\377\377\377\377\377\377\377\377\377\377\377\377\377\377" - "\377\377\377\377\377\377\377\377\377\377\377\377\377\377\377\377\377\377" - "\377\377\377\377\377\377\377\377\377\377\377\377\377\377\377\377\377\377" - "\377\377\377\377\377\377\377\377\377\377\377\377\377\377\377\377\377\377" - "\377\377\377\377\377\377\377\377\377\377\377\377\377\377\377\377\377\377" - "\377\377\377\377\377\377\377\377\377\377\377\377\377\377\377\377\377\377" - "\377\377\377\377\377\377\377\377\377\377\377\377\377\377\377\377\377\377" - "\377\377\377\377\377\377\377\377\377\377\377\377\377\377\377\377\377\377" - "\377\377\377\377\377\377\377\377\377\377\377\377\377\377\377\377\377\377" - "\377\377\377\377\377\377\377\377\377\377\377\377\377\377\377\377\377\377" - "\377\377\377\377\377\377\377\377\377\377\377\377\377\377\377\377\377\377" - "\377\377\377\377\377\377\377\377\377\377\377\377\377\377\377\377\377\377" - "\377\377\377\377\377\377\377\377\377\377\377\377\377\377\377\377\377\377" - "\377\377\377\377\377\377\377\377\377\377\377\377\377\377\377\377\377\377" - "\377\377\377\377\377\377\377\377\377\377\377\377\377\377\377\377\377\377" - "\377\377\377\377\377\377\377\377\377\377\377\377\377\377\377\377\377\377" - "\377\377\377\377\377\377\377\377\377\377\377\377\377\377\377\377\377\377" - "\377\377\377\377\377\377\377\377\377\377\377\377\377\377\377\377\377\377" - "\377\377\377\377\377\377\377\377\377\377\377\377\377\377\377\377\377\377" - "\377\377\377\377\377\377\377\377\377\377\377\377\377\377\377\377\377\377" - "\377\377\377\377\377\377\377\377\377\377\377\377\377\377\377\377\377\377" - "\377\377\377\377\377\377\377\377\377\377\377\377\377\377\377\377\377\377" - "\377\377\377\377\377\377\377\377\377\377\377\377\377\377\377\377\377\377" - "\377\377\377\377\377\377\377\377\377\377\377\377\377\377\377\377\377\377" - "\377\377\377\377\377\377\377\377\377\377\377\377\377\377\377\377\377\377" - "\377\377\377\377\377\377\377\377\377\377\377\377\377\377\377\377\377\377" - "\377\377\377\377\377\377\377\377\377\377\377\377\377\377\377\377\377\377" - "\377\377\377\377\377\377\377\377\377\377\377\377\377\377\377\377\377\377" - "\377\377\377\377\377\377\377\377\377\377\377\377\377\377\377\377\377\377" - "\377\377\377\377\377\377\377\377\377\377\377\377\377\377\377\377\377\377" - "\377\377\377\377\377\377\377\377\377\377\377\377\377\377\377\377\377\377" - "\377\377\377\377\377\377\377\377\377\377\377\377\377\377\377\377\377\377" - "\377\377\377\377\377\377\377\377\377\377\377\377\377\377\377\377\377\377" - "\377\377\377\377\377\377\377\377\377\377\377\377\377\377\377\377\377\377" - "\377\377\377\377\377\377\377\377\377\377\377\377\377\377\377\377\377\377" - "\377\377\377\377\377\377\377\377\377\377\377\377\377\377\377\377\377\377" - "\377\377\377\377\377\377\377\377\377\377\377\377\377\377\377\377\377\377" - "\377\377\377\377\377\377\377\377\377\377\377\377\377\377\377\377\377\377" - "\377\377\377\377\377\377\377\377\377\377\377\377\377\377\377\377\377\377" - "\377\377\377\377\377\377\377\377\377\377\377\377\377\377\377\377\377\377" - "\377\377\377\377\377\377\377\377\377\377\377\377\377\377\377\377\377\377" - "\377\377\377\377\377\377\377\377\377\377\377\377\377\377\377\377\377\377" - "\377\377\377\377\377\377\377\377\377\377\377\377\377\377\377\377\377\377" - "\377\377\377\377\377\377\377\377\377\377\377\377\377\377\377\377\377\377" - "\377\377\377\377\377\377\377\377\377\377\377\377\377\377\377\377\377\377" - "\377\377\377\377\377\377\377\377\377\377\377\377\377\377\377\377\377\377" - "\377\377\377\377\377\377\377\377\377\377\377\377\377\377\377\377\377\377" - "\377\377\377\377\377\377\377\377\377\377\377\377\377\377\377\377\377\377" - "\377\377\377\377\377\377\377\377\377\377\377\377\377\377\377\377\377\377" - "\377\377\377\377\377\377\377\377\377\377\377\377\377\377\377\377\377\377" - "\377\377\377\377\377\377\377\377\377\377\377\377\377\377\377\377\377\377" - "\377\377\377\377\377\377\377\377\377\377\377\377\377\377\377\377\377\377" - "\377\377\377\377\377\377\377\377\377\377\377\377\377\377\377\377\377\377" - "\377\377\377\377\377\377\377\377\377\377\377\377\377\377\377\377\377\377" - "\377\377\377\377\377\377\377\377\377\377\377\377\377\377\377\377\377\377" - "\377\377\377\377\377\377\377\377\377\377\377\377\377\377\377\377\377\377" - "\377\377\377\377\377\377\377\377\377\377\377\377\377\377\377\377\377\377" - "\377\377\377\377\377\377\377\377\377\377\377\377\377\377\377\377\377\377" - "\377\377\377\377\377\377\377\377\377\377\377\377\377\377\377\377\377\377" - "\377\377\377\377\377\377\377\377\377\377\377\377\377\377\377\377\377\377" - "\377\377\377\377\377\377\377\377\377\377\377\377\377\377\377\377\377\377" - "\377\377\377\377\377\377\377\377\377\377\377\377\377\377\377\377\377\377" - "\377\377\377\377\377\377\377\377\377\377\377\377\377\377\377\377\377\377" - "\377\377\377\377\377\377\377\377\377\377\377\377\377\377\377\377\377\377" - "\377\377\377\377\377\377\377\377\377\377\377\377\377\377\377\377\377\377" - "\377\377\377\377\377\377\377\377\377\377\377\377\377\377\377\377\377\377" - "\377\377\377\377\377\377\377\377\377\377\377\377\377\377\377\377\377\377" - "\377\377\377\377\377\377\377\377\377\377\377\377\377\377\377\377\377\377" - "\377\377\377\377\377\377\377\377\377\377\377\377\377\377\377\377\377\377" - "\377\377\377\377\377\377\377\377\377\377\377\377\377\377\377\377\377\377" - "\377\377\377\377\377\377\377\377\377\377\377\377\377\377\377\377\377\377" - "\377\377\377\377\377\377\377\377\377\377\377\377\377\377\377\377\377\377" - "\377\377\377\377\377\377\377\377\377\377\377\377\377\377\377\377\377\377" - "\377\377\377\377\377\377\377\377\377\377\377\377\377\377\377\377\377\377" - "\377\377\377\377\377\377\377\377\377\377\377\377\377\377\377\377\377\377" - "\377\377\377\377\377\377\377\377\377\377\377\377\377\377\377\377\377\377" - "\377\377\377\377\377\377\377\377\377\377\377\377\377\377\377\377\377\377" - "\377\377\377\377\377\377\377\377\377\377\377\377\377\377\377\377\377\377" - "\377\377\377\377\377\377\377\377\377\377\377\377\377\377\377\377\377\377" - "\377\377\377\377\377\377\377\377\377\377\377\377\377\377\377\377\377\377" - "\377\377\377\377\377\377\377\377\377\377\377\377\377\377\377\377\377\377" - "\377\377\377\377\377\377\377\377\377\377\377\377\377\377\377\377\377\377" - "\377\377\377\377\377\377\377\377\377\377\377\377\377\377\377\377\377\377" - "\377\377\377\377\377\377\377\377\377\377\377\377\377\377\377\377\377\377" - "\377\377\377\377\377\377\377\377\377\377\377\377\377\377\377\377\377\377" - "\377\377\377\377\377\377\377\377\377\377\377\377\377\377\377\377\377\377" - "\377\377\377\377\377\377\377\377\377\377\377\377\377\377\377\377\377\377" - "\377\377\377\377\377\377\377\377\377\377\377\377\377\377\377\377\377\377" - "\377\377\377\377\377\377\377\377\377\377\377\377\377\377\377\377\377\377" - "\377\377\377\377\377\377\377\377\377\377\377\377\377\377\377\377\377\377" - "\377\377\377\377\377\377\377\377\377\377\377\377\377\377\377\377\377\377" - "\377\377\377\377\377\377\377\377\377\377\377\377\377\377\377\377\377\377" - "\377\377\377\377\377\377\377\377\377\377\377\377\377\377\377\377\377\377" - "\377\377\377\377\377\377\377\377\377\377\377\377\377\377\377\377\377\377" - "\377\377\377\377\377\377\377\377\377\377\377\377\377\377\377\377\377\377" - "\377\377\377\377\377\377\377\377\377\377\377\377\377\377\377\377\377\377" - "\377\377\377\377\377\377\377\377\377\377\377\377\377\377\377\377\377\377" - "\377\377\377\377\377\377\377\377\377\377\377\377\377\377\377\377\377\377" - "\377\377\377\377\377\377\377\377\377\377\377\377\377\377\377\377\377\377" - "\377\377\377\377\377\377\377\377\377\377\377\377\377\377\377\377\377\377" - "\377\377\377\377\377\377\377\377\377\377\377\377\377\377\377\377\377\377" - "\377\377\377\377\377\377\377\377\377\377\377\377\377\377\377\377\377\377" - "\377\377\377\377\377\377\377\377\377\377\377\377\377\377\377\377\377\377" - "\377\377\377\377\377\377\377\377\377\377\377\377\377\377\377\377\377\377" - "\377\377\377\377\377\377\377\377\377\377\377\377\377\377\377\377\377\377" - "\377\377\377\377\377\377\377\377\377\377\377\377\377\377\377\377\377\377" - "\377\377\377\377\377\377\377\377\377\377\377\377\377\377\377\377\377\377" - "\377\377\377\377\377\377\377\377\377\377\377\377\377\377\377\377\377\377" - "\377\377\377\377\377\377\377\377\377\377\377\377\377\377\377\377\377\377" - "\377\377\377\377\377\377\377\377\377\377\377\377\377\377\377\377\377\377" - "\377\377\377\377\377\377\377\377\377\377\377\377\377\377\377\377\377\377" - "\377\377\377\377\377\377\377\377\377\377\377\377\377\377\377\377\377\377" - "\377\377\377\377\377\377\377\377\377\377\377\377\377\377\377\377\377\377" - "\377\377\377\377\377\377\377\377\377\377\377\377\377\377\377\377\377\377" - "\377\377\377\377\377\377\377\377\377\377\377\377\377\377\377\377\377\377" - "\377\377\377\377\377\377\377\377\377\377\377\377\377\377\377\377\377\377" - "\377\377\377\377\377\377\377\377\377\377\377\377\377\377\377\377\377\377" - "\377\377\377\377\377\377\377\377\377\377\377\377\377\377\377\377\377\377" - "\377\377\377\377\377\377\377\377\377\377\377\377\377\377\377\377\377\377" - "\377\377\377\377\377\377\377\377\377\377\377\377\377\377\377\377\377\377" - "\377\377\377\377\377\377\377\377\377\377\377\377\377\377\377\377\377\377" - "\377\377\377\377\377\377\377\377\377\377\377\377\377\377\377\377\377\377" - "\377\377\377\377\377\377\377\377\377\377\377\377\377\377\377\377\377\377" - "\377\377\377\377\377\377\377\377\377\377\377\377\377\377\377\377\377\377" - "\377\377\377\377\377\377\377\377\377\377\377\377\377\377\377\377\377\377" - "\377\377\377\377\377\377\377\377\377\377\377\377\377\377\377\377\377\377" - "\377\377\377\377\377\377\377\377\377\377\377\377\377\377\377\377\377\377" - "\377\377\377\377\377\377\377\377\377\377\377\377\377\377\377\377\377\377" - "\377\377\377\377\377\377\377\377\377\377\377\377\377\377\377\377\377\377" - "\377\377\377\377\377\377\377\377\377\377\377\377\377\377\377\377\377\377" - "\377\377\377\377\377\377\377\377\377\377\377\377\377\377\377\377\377\377" - "\377\377\377\377\377\377\377\377\377\377\377\377\377\377\377\377\377\377" - "\377\377\377\377\377\377\377\377\377\377\377\377\377\377\377\377\377\377" - "\377\377\377\377\377\377\377\377\377\377\377\377\377\377\377\377\377\377" - "\377\377\377\377\377\377\377\377\377\377\377\377\377\377\377\377\377\377" - "\377\377\377\377\377\377\377\377\377\377\377\377\377\377\377\377\377\377" - "\377\377\377\377\377\377\377\377\377\377\377\377\377\377\377\377\377\377" - "\377\377\377\377\377\377\377\377\377\377\377\377\377\377\377\377\377\377" - "\377\377\377\377\377\377\377\377\377\377\377\377\377\377\377\377\377\377" - "\377\377\377\377\377\377\377\377\377\377\377\377\377\377\377\377\377\377" - "\377\377\377\377\377\377\377\377\377\377\377\377\377\377\377\377\377\377" - "\377\377\377\377\377\377\377\377\377\377\377\377\377\377\377\377\377\377" - "\377\377\377\377\377\377\377\377\377\377\377\377\377\377\377\377\377\377" - "\377\377\377\377\377\377\377\377\377\377\377\377\377\377\377\377\377\377" - "\377\377\377\377\377\377\377\377\377\377\377\377\377\377\377\377\377\377" - "\377\377\377\377\377\377\377\377\377\377\377\377\377\377\377\377\377\377" - "\377\377\377\377\377\377\377\377\377\377\377\377\377\377\377\377\377\377" - "\377\377\377\377\377\377\377\377\377\377\377\377\377\377\377\377\377\377" - "\377\377\377\377\377\377\377\377\377\377\377\377\377\377\377\377\377\377" - "\377\377\377\377\377\377\377\377\377\377\377\377\377\377\377\377\377\377" - "\377\377\377\377\377\377\377\377\377\377\377\377\377\377\377\377\377\377" - "\377\377\377\377\377\377\377\377\377\377\377\377\0\0\0\0\0\0\0\0\0\0\0\0" - "\0\0\0\0\0\0\0\0\0\0\0\0\377\377\377\377\377\377\377\377\377\377\377\377" - "\377\377\377\377\377\377\377\377\377\377\377\377\377\377\377\377\377\377" - "\377\377\377\377\377\377\377\377\377\377\377\377\377\377\377\377\377\377" - "\377\377\377\377\377\377\377\377\377\377\377\377\377\377\377\377\377\377" - "\377\377\377\377\377\377\377\377\377\377\377\377\377\377\377\377\377\377" - "\377\377\377\377\377\377\377\377\377\377\377\377\377\377\377\377\377\377" - "\377\377\377\377\377\377\377\377\377\377\377\377\377\377\377\377\377\377" - "\377\377\377\377\377\377\377\377\377\377\377\377\377\377\377\377\377\377" - "\377\377\377\377\377\377\377\377\377\377\377\377\377\377\377\377\377\377" - "\377\377\377\377\377\377\377\377\377\377\377\377\377\377\377\377\377\377" - "\377\377\377\377\377\377\377\377\377\377\377\377\377\377\377\377\377\377" - "\377\377\377\377\377\377\377\377\377\377\377\377\377\377\377\377\377\377" - "\0\0\0\0\0\0\377\377\0\377\377\0\377\377\0\377\377\0\377\377\0\377\377\0" - "\377\377\0\377\377\0\0\0\0\0\0\0\377\377\377\377\377\377\377\377\377\377" - "\377\377\377\377\377\377\377\377\377\377\377\377\377\377\377\377\377\377" - "\377\377\377\377\377\377\377\377\377\377\377\377\377\377\377\377\377\377" - "\377\377\377\377\377\377\377\377\377\377\377\377\377\377\377\377\377\377" - "\377\377\377\377\377\377\377\377\377\377\377\377\377\377\377\377\377\377" - "\377\377\377\377\377\377\377\377\377\377\377\377\377\377\377\377\377\377" - "\377\377\377\377\377\377\377\377\377\377\377\377\377\377\377\377\377\377" - "\377\377\377\377\377\377\377\377\377\377\377\377\377\377\377\377\377\377" - "\377\377\377\377\377\377\377\377\377\377\377\377\377\377\377\377\377\377" - "\377\377\377\377\377\377\377\377\377\377\377\377\377\377\377\377\377\377" - "\377\377\377\377\377\377\377\377\377\377\377\377\377\377\377\377\377\377" - "\377\377\377\377\377\377\377\377\377\377\377\0\0\0\377\377\0\377\377\0\377" - "\377\0\377\377\0\377\377\0\377\377\0\377\377\0\377\377\0\377\377\0\377\377" - "\0\377\377\0\377\377\0\0\0\0\377\377\377\377\377\377\377\377\377\377\377" - "\377\377\377\377\377\377\377\377\377\377\377\377\377\377\377\377\377\377" - "\377\377\377\377\377\377\377\377\377\377\377\377\377\377\377\377\377\377" - "\377\377\377\377\377\377\377\377\377\377\377\377\377\377\377\377\377\377" - "\377\377\377\377\377\377\377\377\377\377\377\377\377\377\377\377\377\377" - "\377\377\377\377\377\377\377\377\377\377\377\377\377\377\377\377\377\377" - "\377\377\377\377\377\377\377\377\377\377\377\377\377\377\377\377\377\377" - "\377\377\377\377\377\377\377\377\377\377\377\377\377\377\377\377\377\377" - "\377\377\377\377\377\377\377\377\377\377\377\377\377\377\377\377\377\377" - "\377\377\377\377\377\377\377\377\377\377\377\377\377\377\377\377\377\377" - "\377\377\377\377\377\377\377\377\377\377\377\377\377\377\377\377\377\377" - "\377\377\377\377\0\0\0\377\377\0\377\377\0\377\377\0\377\377\0\377\377\0" - "\377\377\0\377\377\0\377\377\0\377\377\0\377\377\0\377\377\0\377\377\0\377" - "\377\0\377\377\0\0\0\0\377\377\377\377\377\377\377\377\377\377\377\377\377" - "\377\377\377\377\377\377\377\377\377\377\377\377\377\377\377\377\377\377" - "\377\377\377\377\377\377\377\377\377\377\377\377\377\377\377\377\377\377" - "\377\377\377\377\377\377\377\377\377\377\377\377\377\377\377\377\377\377" - "\377\377\377\377\377\377\377\377\377\377\377\377\377\377\377\377\377\377" - "\377\377\377\377\377\377\377\377\377\377\377\377\377\377\377\377\377\377" - "\377\377\377\377\377\377\377\377\377\377\377\377\377\377\377\377\377\377" - "\377\377\377\377\377\377\377\377\377\377\377\377\377\377\377\377\377\377" - "\377\377\377\377\377\377\377\377\377\377\377\377\377\377\377\377\377\377" - "\377\377\377\377\377\377\377\377\377\377\377\377\377\377\377\377\377\377" - "\377\377\377\377\377\377\377\377\377\377\377\377\377\377\0\0\0\377\377\0" - "\377\377\0\377\377\0\377\377\0\377\377\0\377\377\0\377\377\0\377\377\0\377" - "\377\0\377\377\0\377\377\0\377\377\0\377\377\0\377\377\0\377\377\0\377\377" - "\0\0\0\0\377\377\377\377\377\377\377\377\377\377\377\377\377\377\377\377" - "\377\377\377\377\377\377\377\377\377\377\377\377\377\377\377\377\377\377" - "\377\377\377\377\377\377\377\377\377\377\377\377\377\377\377\377\377\377" - "\377\377\377\377\377\377\377\377\377\377\377\377\377\377\377\377\377\377" - "\377\377\377\377\377\377\377\377\377\377\377\377\377\377\377\377\377\377" - "\377\377\377\377\377\377\377\377\377\377\377\377\377\377\377\377\377\377" - "\377\377\377\377\377\377\377\377\377\377\377\377\377\377\377\377\377\377" - "\377\377\377\377\377\377\377\377\377\377\377\377\377\377\377\377\377\377" - "\377\377\377\377\377\377\377\377\377\377\377\377\377\377\377\377\377\377" - "\377\377\377\377\377\377\377\377\377\377\377\377\377\377\377\377\377\377" - "\377\377\377\377\377\0\0\0\377\377\0\377\377\0\377\377\0\377\377\0\377\377" - "\0\377\377\0\377\377\0\377\377\0\377\377\0\377\377\0\377\377\0\377\377\0" - "\377\377\0\377\377\0\377\377\0\377\377\0\377\377\0\377\377\0\0\0\0\377\377" - "\377\377\377\377\377\377\377\377\377\377\377\377\377\377\377\377\377\377" - "\377\377\377\377\377\377\377\377\377\377\377\377\377\377\377\377\377\377" - "\377\377\377\377\377\377\377\377\377\377\377\377\377\377\377\377\377\377" - "\377\377\377\377\377\377\377\377\377\377\377\377\377\377\377\377\377\377" - "\377\377\377\377\377\377\377\377\377\377\377\377\377\377\377\377\377\377" - "\377\377\377\377\377\377\377\377\377\377\377\377\377\377\377\377\377\377" - "\377\377\377\377\377\377\377\377\377\377\377\377\377\377\377\377\377\377" - "\377\377\377\377\377\377\377\377\377\377\377\377\377\377\377\377\377\377" - "\377\377\377\377\377\377\377\377\377\377\377\377\377\377\377\377\377\377" - "\377\377\377\377\377\377\377\377\377\377\377\377\377\377\377\377\0\0\0\377" - "\377\0\377\377\0\377\377\0\0\0\0\0\0\0\0\0\0\0\0\0\377\377\0\377\377\0\377" - "\377\0\377\377\0\0\0\0\0\0\0\0\0\0\0\0\0\377\377\0\377\377\0\377\377\0\0" - "\0\0\377\377\377\377\377\377\377\377\377\377\377\377\377\377\377\377\377" - "\377\377\377\377\377\377\377\377\377\377\377\377\377\377\377\377\377\377" - "\377\377\377\377\377\377\377\377\377\377\377\377\377\377\377\377\377\377" - "\377\377\377\377\377\377\377\377\377\377\377\377\377\377\377\377\377\377" - "\377\377\377\377\377\377\377\377\377\377\377\377\377\377\377\377\377\377" - "\377\377\377\377\377\377\377\377\377\377\377\377\377\377\377\377\377\377" - "\377\377\377\377\377\377\377\377\377\377\377\377\377\377\377\377\377\377" - "\377\377\377\377\377\377\377\377\377\377\377\377\377\377\377\377\377\377" - "\377\377\377\377\377\377\377\377\377\377\377\377\377\377\377\377\377\377" - "\377\377\377\377\377\377\377\377\377\377\377\377\377\377\377\377\0\0\0\377" - "\377\0\377\377\0\377\377\0\377\377\0\0\0\0\0\0\0\377\377\377\0\0\0\377\377" - "\0\377\377\0\377\377\0\377\377\0\0\0\0\0\0\0\377\377\377\0\0\0\377\377\0" - "\377\377\0\377\377\0\377\377\0\0\0\0\377\377\377\377\377\377\377\377\377" - "\377\377\377\377\377\377\377\377\377\377\377\377\377\377\377\377\377\377" - "\377\377\377\377\377\377\377\377\377\377\377\377\377\377\377\377\377\377" - "\377\377\377\377\377\377\377\377\377\377\377\377\377\377\377\377\377\377" - "\377\377\377\377\377\377\377\377\377\377\377\377\377\377\377\377\377\377" - "\377\377\377\377\377\377\377\377\377\377\377\377\377\377\377\377\377\377" - "\377\377\377\377\377\377\377\377\377\377\377\377\377\377\377\377\377\377" - "\377\377\377\377\377\377\377\377\377\377\377\377\377\377\377\377\377\377" - "\377\377\377\377\377\377\377\377\377\377\377\377\377\377\377\377\377\377" - "\377\377\377\377\377\377\377\377\377\377\377\377\377\377\377\377\377\377" - "\377\377\377\0\0\0\377\377\0\377\377\0\377\377\0\377\377\0\0\0\0\0\0\0\0" - "\0\0\0\0\0\377\377\0\377\377\0\377\377\0\377\377\0\0\0\0\0\0\0\0\0\0\0\0" - "\0\377\377\0\377\377\0\377\377\0\377\377\0\0\0\0\377\377\377\377\377\377" - "\377\377\377\377\377\377\377\377\377\377\377\377\377\377\377\377\377\377" - "\377\377\377\377\377\377\377\377\377\377\377\377\377\377\377\377\377\377" - "\377\377\377\377\377\377\377\377\377\377\377\377\377\377\377\377\377\377" - "\377\377\377\377\377\377\377\377\377\377\377\377\377\377\377\377\377\377" - "\377\377\377\377\377\377\377\377\377\377\377\377\377\377\377\377\377\377" - "\377\377\377\377\377\377\377\377\377\377\377\377\377\377\377\377\377\377" - "\377\377\377\377\377\377\377\377\377\377\377\377\377\377\377\377\377\377" - "\377\377\377\377\377\377\377\377\377\377\377\377\377\377\377\377\377\377" - "\377\377\377\377\377\377\377\377\377\377\377\377\377\377\377\377\377\377" - "\377\377\377\377\377\377\0\0\0\377\377\0\377\377\0\377\377\0\377\377\0\377" - "\377\0\377\377\0\377\377\0\377\377\0\377\377\0\377\377\0\377\377\0\377\377" - "\0\377\377\0\377\377\0\377\377\0\377\377\0\377\377\0\377\377\0\377\377\0" - "\377\377\0\0\0\0\377\377\377\377\377\377\377\377\377\377\377\377\377\377" - "\377\377\377\377\377\377\377\377\377\377\377\377\377\377\377\377\377\377" - "\377\377\377\377\377\377\377\377\377\377\377\377\377\377\377\377\377\377" - "\377\377\377\377\377\377\377\377\377\377\377\377\377\377\377\377\377\377" - "\377\377\377\377\377\377\377\377\377\377\377\377\377\377\377\377\377\377" - "\377\377\377\377\377\377\377\377\377\377\377\377\377\377\377\377\377\377" - "\377\377\377\377\377\377\377\377\377\377\377\377\377\377\377\377\377\377" - "\377\377\377\377\377\377\377\377\377\377\377\377\377\377\377\377\377\377" - "\377\377\377\377\377\377\377\377\377\377\377\377\377\377\377\377\377\377" - "\377\377\377\377\377\377\377\377\377\377\377\377\377\377\377\377\0\0\0\377" - "\377\0\377\377\0\377\377\0\377\377\0\377\377\0\377\377\0\377\377\0\377\377" - "\0\377\377\0\377\377\0\377\377\0\377\377\0\377\377\0\377\377\0\377\377\0" - "\377\377\0\377\377\0\377\377\0\377\377\0\377\377\0\0\0\0\377\377\377\377" - "\377\377\377\377\377\377\377\377\377\377\377\377\377\377\377\377\377\377" - "\377\377\377\377\377\377\377\377\377\377\377\377\377\377\377\377\377\377" - "\377\377\377\377\377\377\377\377\377\377\377\377\377\377\377\377\377\377" - "\377\377\377\377\377\377\377\377\377\377\377\377\377\377\377\377\377\377" - "\377\377\377\377\377\377\377\377\377\377\377\377\377\377\377\377\377\377" - "\377\377\377\377\377\377\377\377\377\377\377\377\377\377\377\377\377\377" - "\377\377\377\377\377\377\377\377\377\377\377\377\377\377\377\377\377\377" - "\377\377\377\377\377\377\377\377\377\377\377\377\377\377\377\377\377\377" - "\377\377\377\377\377\377\377\377\377\377\377\377\377\377\377\377\377\377" - "\377\377\377\377\377\377\377\377\0\0\0\377\377\0\377\377\0\377\377\0\377" - "\377\0\377\377\0\377\377\0\377\377\0\377\377\0\377\377\0\0\0\0\0\0\0\377" - "\377\0\377\377\0\377\377\0\377\377\0\377\377\0\377\377\0\377\377\0\377\377" - "\0\377\377\0\0\0\0\377\377\377\377\377\377\377\377\377\377\377\377\377\377" - "\377\377\377\377\377\377\377\377\377\377\377\377\377\377\377\377\377\377" - "\377\377\377\377\377\377\377\377\377\377\377\377\377\377\377\377\377\377" - "\377\377\377\377\377\377\377\377\377\377\377\377\377\377\377\377\377\377" - "\377\377\377\377\377\377\377\377\377\377\377\377\377\377\377\377\377\377" - "\377\377\377\377\377\377\377\377\377\377\377\377\377\377\377\377\377\377" - "\377\377\377\377\377\377\377\377\377\377\377\377\377\377\377\377\377\377" - "\377\377\377\377\377\377\377\377\377\377\377\377\377\377\377\377\377\377" - "\377\377\377\377\377\377\377\377\377\377\377\377\377\377\377\377\377\377" - "\377\377\377\377\377\377\377\377\377\377\377\377\377\377\377\377\0\0\0\377" - "\377\0\377\377\0\377\377\0\377\377\0\377\377\0\377\377\0\377\377\0\377\377" - "\0\377\377\0\0\0\0\0\0\0\377\377\0\377\377\0\377\377\0\377\377\0\377\377" - "\0\377\377\0\377\377\0\377\377\0\377\377\0\0\0\0\377\377\377\377\377\377" - "\377\377\377\377\377\377\377\377\377\377\377\377\377\377\377\377\377\377" - "\377\377\377\377\377\377\377\377\377\377\377\377\377\377\377\377\377\377" - "\377\377\377\377\377\377\377\377\377\377\377\377\377\377\377\377\377\377" - "\377\377\377\377\377\377\377\377\377\377\377\377\377\377\377\377\377\377" - "\377\377\377\377\377\377\377\377\377\377\377\377\377\377\377\377\377\377" - "\377\377\377\377\377\377\377\377\377\377\377\377\377\377\377\377\377\377" - "\377\377\377\377\377\377\377\377\377\377\377\377\377\377\377\377\377\377" - "\377\377\377\377\377\377\377\377\377\377\377\377\377\377\377\377\377\377" - "\377\377\377\377\377\377\377\377\377\377\377\377\377\377\377\377\377\377" - "\377\377\377\377\377\377\0\0\0\377\377\0\377\377\0\377\377\0\377\377\0\377" - "\377\0\377\377\0\377\377\0\377\377\0\377\377\0\377\377\0\377\377\0\377\377" - "\0\377\377\0\377\377\0\377\377\0\377\377\0\377\377\0\377\377\0\377\377\0" - "\377\377\0\0\0\0\377\377\377\377\377\377\377\377\377\377\377\377\377\377" - "\377\377\377\377\377\377\377\377\377\377\377\377\377\377\377\377\377\377" - "\377\377\377\377\377\377\377\377\377\377\377\377\377\377\377\377\377\377" - "\377\377\377\377\377\377\377\377\377\377\377\377\377\377\377\377\377\377" - "\377\377\377\377\377\377\377\377\377\377\377\377\377\377\377\377\377\377" - "\377\377\377\377\377\377\377\377\377\377\377\377\377\377\377\377\377\377" - "\377\377\377\377\377\377\377\377\377\377\377\377\377\377\377\377\377\377" - "\377\377\377\377\377\377\377\377\377\377\377\377\377\377\377\377\377\377" - "\377\377\377\377\377\377\377\377\377\377\377\377\377\377\377\377\377\377" - "\377\377\377\377\377\377\377\377\377\377\377\377\377\377\377\377\377\377" - "\377\0\0\0\377\377\0\377\377\0\377\377\0\377\377\0\377\377\0\377\377\0\377" - "\377\0\377\377\0\377\377\0\377\377\0\377\377\0\377\377\0\377\377\0\377\377" - "\0\377\377\0\377\377\0\377\377\0\377\377\0\0\0\0\377\377\377\377\377\377" - "\377\377\377\377\377\377\377\377\377\377\377\377\377\377\377\377\377\377" - "\377\377\377\377\377\377\377\377\377\377\377\377\377\377\377\377\377\377" - "\377\377\377\377\377\377\377\377\377\377\377\377\377\377\377\377\377\377" - "\377\377\377\377\377\377\377\377\377\377\377\377\377\377\377\377\377\377" - "\377\377\377\377\377\377\377\377\377\377\377\377\377\377\377\377\377\377" - "\377\377\377\377\377\377\377\377\377\377\377\377\377\377\377\377\377\377" - "\377\377\377\377\377\377\377\377\377\377\377\377\377\377\377\377\377\377" - "\377\377\377\377\377\377\377\377\377\377\377\377\377\377\377\377\377\377" - "\377\377\377\377\377\377\377\377\377\377\377\377\377\377\377\377\377\377" - "\377\377\377\377\377\377\377\377\377\377\377\377\0\0\0\377\377\0\377\377" - "\0\0\0\0\0\0\0\0\0\0\377\377\0\377\377\0\377\377\0\377\377\0\377\377\0\377" - "\377\0\377\377\0\377\377\0\0\0\0\0\0\0\0\0\0\377\377\0\377\377\0\0\0\0\377" - "\377\377\377\377\377\377\377\377\377\377\377\377\377\377\377\377\377\377" - "\377\377\377\377\377\377\377\377\377\377\377\377\377\377\377\377\377\377" - "\377\377\377\377\377\377\377\377\377\377\377\377\377\377\377\377\377\377" - "\377\377\377\377\377\377\377\377\377\377\377\377\377\377\377\377\377\377" - "\377\377\377\377\377\377\377\377\377\377\377\377\377\377\377\377\377\377" - "\377\377\377\377\377\377\377\377\377\377\377\377\377\377\377\377\377\377" - "\377\377\377\377\377\377\377\377\377\377\377\377\377\377\377\377\377\377" - "\377\377\377\377\377\377\377\377\377\377\377\377\377\377\377\377\377\377" - "\377\377\377\377\377\377\377\377\377\377\377\377\377\377\377\377\377\377" - "\377\377\377\377\377\377\377\377\377\377\377\377\377\377\377\377\377\377" - "\377\377\0\0\0\377\377\0\377\377\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0" - "\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\377\377\0\377\377\0\0\0\0\377\377\377" - "\377\377\377\377\377\377\377\377\377\377\377\377\377\377\377\377\377\377" - "\377\377\377\377\377\377\377\377\377\377\377\377\377\377\377\377\377\377" - "\377\377\377\377\377\377\377\377\377\377\377\377\377\377\377\377\377\377" - "\377\377\377\377\377\377\377\377\377\377\377\377\377\377\377\377\377\377" - "\377\377\377\377\377\377\377\377\377\377\377\377\377\377\377\377\377\377" - "\377\377\377\377\377\377\377\377\377\377\377\377\377\377\377\377\377\377" - "\377\377\377\377\377\377\377\377\377\377\377\377\377\377\377\377\377\377" - "\377\377\377\377\377\377\377\377\377\377\377\377\377\377\377\377\377\377" - "\377\377\377\377\377\377\377\377\377\377\377\377\377\377\377\377\377\377" - "\377\377\377\377\377\377\377\377\377\377\377\377\377\377\377\377\377\377" - "\377\377\377\377\377\377\0\0\0\377\377\0\377\377\0\0\0\0\0\0\0\0\0\0\0\0" - "\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\377\377\0\377\377\0\0\0\0\377\377" - "\377\377\377\377\377\377\377\377\377\377\377\377\377\377\377\377\377\377" - "\377\377\377\377\377\377\377\377\377\377\377\377\377\377\377\377\377\377" - "\377\377\377\377\377\377\377\377\377\377\377\377\377\377\377\377\377\377" - "\377\377\377\377\377\377\377\377\377\377\377\377\377\377\377\377\377\377" - "\377\377\377\377\377\377\377\377\377\377\377\377\377\377\377\377\377\377" - "\377\377\377\377\377\377\377\377\377\377\377\377\377\377\377\377\377\377" - "\377\377\377\377\377\377\377\377\377\377\377\377\377\377\377\377\377\377" - "\377\377\377\377\377\377\377\377\377\377\377\377\377\377\377\377\377\377" - "\377\377\377\377\377\377\377\377\377\377\377\377\377\377\377\377\377\377" - "\377\377\377\377\377\377\377\377\377\377\377\377\377\377\377\377\377\377" - "\377\377\377\377\377\377\377\377\377\377\377\377\377\0\0\0\377\377\0\377" - "\377\0\377\377\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\377\377\0\377\377\0" - "\377\377\0\0\0\0\377\377\377\377\377\377\377\377\377\377\377\377\377\377" - "\377\377\377\377\377\377\377\377\377\377\377\377\377\377\377\377\377\377" - "\377\377\377\377\377\377\377\377\377\377\377\377\377\377\377\377\377\377" - "\377\377\377\377\377\377\377\377\377\377\377\377\377\377\377\377\377\377" - "\377\377\377\377\377\377\377\377\377\377\377\377\377\377\377\377\377\377" - "\377\377\377\377\377\377\377\377\377\377\377\377\377\377\377\377\377\377" - "\377\377\377\377\377\377\377\377\377\377\377\377\377\377\377\377\377\377" - "\377\377\377\377\377\377\377\377\377\377\377\377\377\377\377\377\377\377" - "\377\377\377\377\377\377\377\377\377\377\377\377\377\377\377\377\377\377" - "\377\377\377\377\377\377\377\377\377\377\377\377\377\377\377\377\377\377" - "\377\377\377\377\377\377\377\377\377\377\377\377\377\377\377\377\377\377" - "\377\377\377\377\377\377\377\0\0\0\0\0\0\377\377\0\377\377\0\377\377\0\377" - "\377\0\377\377\0\377\377\0\377\377\0\377\377\0\0\0\0\0\0\0\377\377\377\377" - "\377\377\377\377\377\377\377\377\377\377\377\377\377\377\377\377\377\377" - "\377\377\377\377\377\377\377\377\377\377\377\377\377\377\377\377\377\377" - "\377\377\377\377\377\377\377\377\377\377\377\377\377\377\377\377\377\377" - "\377\377\377\377\377\377\377\377\377\377\377\377\377\377\377\377\377\377" - "\377\377\377\377\377\377\377\377\377\377\377\377\377\377\377\377\377\377" - "\377\377\377\377\377\377\377\377\377\377\377\377\377\377\377\377\377\377" - "\377\377\377\377\377\377\377\377\377\377\377\377\377\377\377\377\377\377" - "\377\377\377\377\377\377\377\377\377\377\377\377\377\377\377\377\377\377" - "\377\377\377\377\377\377\377\377\377\377\377\377\377\377\377\377\377\377" - "\377\377\377\377\377\377\377\377\377\377\377\377\377\377\377\377\377\377" - "\377\377\377\377\377\377\377\377\377\377\377\377\377\377\377\377\377\377" - "\377\377\377\377\377\377\377\377\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0" - "\0\0\0\0\377\377\377\377\377\377\377\377\377\377\377\377\377\377\377\377" - "\377\377\377\377\377\377\377\377\377\377\377\377\377\377\377\377\377\377" - "\377\377\377\377\377\377\377\377\377\377\377\377\377\377\377\377\377\377" - "\377\377\377\377\377\377\377\377\377\377\377\377\377\377\377\377\377\377" - "\377\377\377\377\377\377\377\377\377\377\377\377\377\377\377\377\377\377" - "\377\377\377\377\377\377\377\377\377\377\377\377\377\377\377\377\377\377" - "\377\377\377\377\377\377\377\377\377\377\377\377\377\377\377\377\377\377" - "\377\377\377\377\377\377\377\377\377\377\377\377\377\377\377\377\377\377" - "\377\377\377\377\377\377\377\377\377\377\377\377\377\377\377\377\377\377" - "\377\377\377\377\377\377\377\377\377\377\377\377\377\377\377\377\377\377" - "\377\377\377\377\377\377\377\377\377\377\377\377\377\377\377\377\377\377" - "\377\377\377\377\377\377\377\377\377\377\377\377\377\377\377\377\377\377" - "\377\377\377\377\377\377\377\377\377\377\377\377\377\377\377\377\377\377" - "\377\377\377\377\377\377\377\377\377\377\377\377\377\377\377\377\377\377" - "\377\377\377\377\377\377\377\377\377\377\377\377\377\377\377\377\377\377" - "\377\377\377\377\377\377\377\377\377\377\377\377\377\377\377\377\377\377" - "\377\377\377\377\377\377\377\377\377\377\377\377\377\377\377\377\377\377" - "\377\377\377\377\377\377\377\377\377\377\377\377\377\377\377\377\377\377" - "\377\377\377\377\377\377\377\377\377\377\377\377\377\377\377\377\377\377" - "\377\377\377\377\377\377\377\377\377\377\377\377\377\377\377\377\377\377" - "\377\377\377\377\377\377\377\377\377\377\377\377\377\377\377\377\377\377" - "\377\377\377\377\377\377\377\377\377\377\377\377\377\377\377\377\377\377" - "\377\377\377\377\377\377\377\377\377\377\377\377\377\377\377\377\377\377" - "\377\377\377\377\377\377\377\377\377\377\377\377\377\377\377\377\377\377" - "\377\377\377\377\377\377\377\377\377\377\377\377\377\377\377\377\377\377" - "\377\377\377\377\377\377\377\377\377\377\377\377\377\377\377\377\377\377" - "\377\377\377\377\377\377\377\377\377\377\377\377\377\377\377\377\377\377" - "\377\377\377\377\377\377\377\377\377\377\377\377\377\377\377\377\377\377" - "\377\377\377\377\377\377\377\377\377\377\377\377\377\377\377\377\377\377" - "\377\377\377\377\377\377\377\377\377\377\377\377\377\377\377\377\377\377" - "\377\377\377\377\377\377\377\377\377\377\377\377\377\377\377\377\377\377" - "\377\377\377\377\377\377\377\377\377\377\377\377\377\377\377\377\377\377" - "\377\377\377\377\377\377\377\377\377\377\377\377\377\377\377\377\377\377" - "\377\377\377\377\377\377\377\377\377\377\377\377\377\377\377\377\377\377" - "\377\377\377\377\377\377\377\377\377\377\377\377\377\377\377\377\377\377" - "\377\377\377\377\377\377\377\377\377\377\377\377\377\377\377\377\377\377" - "\377\377\377\377\377\377\377\377\377\377\377\377\377\377\377\377\377\377" - "\377\377\377\377\377\377\377\377\377\377\377\377\377\377\377\377\377\377" - "\377\377\377\377\377\377\377\377\377\377\377\377\377\377\377\377\377\377" - "\377\377\377\377\377\377\377\377\377\377\377\377\377\377\377\377\377\377" - "\377\377\377\377\377\377\377\377\377\377\377\377\377\377\377\377\377\377" - "\377\377\377\377\377\377\377\377\377\377\377\377\377\377\377\377\377\377" - "\377\377\377\377\377\377\377\377\377\377\377\377\377\377\377\377\377\377" - "\377\377\377\377\377\377\377\377\377\377\377\377\377\377\377\377\377\377" - "\377\377\377\377\377\377\377\377\377\377\377\377\377\377\377\377\377\377" - "\377\377\377\377\377\377\377\377\377\377\377\377\377\377\377\377\377\377" - "\377\377\377\377\377\377\377\377\377\377\377\377\377\377\377\377\377\377" - "\377\377\377\377\377\377\377\377\377\377\377\377\377\377\377\377\377\377" - "\377\377\377\377\377\377\377\377\377\377\377\377\377\377\377\377\377\377" - "\377\377\377\377\377\377\377\377\377\377\377\377\377\377\377\377\377\377" - "\377\377\377\377\377\377\377\377\377\377\377\377\377\377\377\377\377\377" - "\377\377\377\377\377\377\377\377\377\377\377\377\377\377\377\377\377\377" - "\377\377\377\377\377\377\377\377\377\377\377\377\377\377\377\377\377\377" - "\377\377\377\377\377\377\377\377\377\377\377\377\377\377\377\377\377\377" - "\377\377\377\377\377\377\377\377\377\377\377\377\377\377\377\377\377\377" - "\377\377\377\377\377\377\377\377", -}; - -static const SurfaceImage_t img_blendAll = { - 80, 60, 3, - "\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0" - "\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0" - "\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0" - "\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0" - "\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0" - "\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0" - "\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0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11\0\0\11\0\0\11" - "\0\0\0\0\0\16\0\0\16\0\0\16\0\0\0\0\0\22\0\0\22\0\0\11\0\0\0\0\0\14\0\0\14" - "\0\0\14\0\0\0\0\0\17\0\0\17\0\0\17\0\0\0\0\0\21\0\0\21\0\0\21\0\0\0\0\0\24" - "\0\0\24\0\0K\0\0\0\0\0T\0\0T\0\0T\0\0\0\0\0^\0\0^\0\0^\0\0\0\0\0g\0\0g\0" - "\0g\0\0\0\0\0q\0\0q\0\0\317\0\0\317\0\0\317\0\0\317\0\0\317\0\0\317\0\0\317" - "\0\0\317\0\0\317\0\0\317\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0" - "\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0" - "\0\0\0\0\0\0\0\0\0\0\0\4\0\0\4\0\0\4\0\0\0\0\0\11\0\0\11\0\0\11\0\0\0\0\0" - "\16\0\0\16\0\0\16\0\0\0\0\0\22\0\0\22\0\0\22\0\0\0\0\0\14\0\0\14\0\0\14\0" - "\0\0\0\0\17\0\0\17\0\0\17\0\0\0\0\0\21\0\0\21\0\0\21\0\0\0\0\0\24\0\0\24" - "\0\0\24\0\0\0\0\0T\0\0T\0\0T\0\0\0\0\0^\0\0^\0\0^\0\0\0\0\0g\0\0g\0\0g\0" - "\0\0\0\0q\0\0q\0\0q\0\0\317\0\0\317\0\0\317\0\0\317\0\0\317\0\0\317\0\0\317" - "\0\0\317\0\0\317\0\0\317\0\0\317\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0" - "\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0" - "\0\0\0\0\0\0\0\0\0\4\0\0\4\0\0\4\0\0\0\0\0\10\0\0\10\0\0\10\0\0\0\0\0\15" - "\0\0\15\0\0\15\0\0\0\0\0\0\0\0\0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1\0\0\1\0\0\1\0\0\1\0\0\1\0\0" - "\17\0\0\0\0\0\4\0\0\11\0\0\11\0\0\0\0\6+\0\6+\0\0&\0\0\32\0\0&\0\0&\0\0&" - "\0\0&\0\0""5\0\0""5\0\2\210\0\0\0\0\0C\0\0|\0\0|\0\0\0\0\17\251\0\17\251" - "\0\17\251\0\17\251\0\17\251\0\17\251\0\17\251\0\17\251\0\17\251\0\17\251" - "\0$\360\0$\360\0\0\0\0\0\317\0\0\317\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0" - "\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\1" - "\0\0\1\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\1\0\0\1\0\0\0\0\0\0\0\0\0" - "\0\0\0\0\0\0\0\6\2\0\6\2\0\6\2\0\0\0\0\0\1\0\0\1\0\0\1\0\0\1\0\0\1\0\0\1" - "\0\0\1\0\0\0\0\0\17\0\0\17\0\0\4\0\0\0\0\6+\0\6+\0\6+\0\0\32\0\0&\0\0&\0" - "\0&\0\0&\0\0""5\0\0""5\0\0""5\0\0\0\0\2\210\0\2\210\0\0C\0\0\0\0\17\251\0" - "\17\251\0\17\251\0\17\251\0\17\251\0\17\251\0\17\251\0\17\251\0\17\251\0" - "\17\251\0\17\251\0$\360\0$\360\0$\360\0\0\0\0\0\317\0\0\317\0\0\0\0\0\0\0" - "\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0" - "\0\0\0\0\0\0\0\1\0\0\1\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\1\0\0\0\0" - "\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0" - "\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0" - "\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0" - "\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0" - "$\360\0$\360\0$\360\0$\360\0\0\0\0\0\317\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0" - "\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\1\0" - "\0\1\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\14\1\0\14\1\0\14\1" - "\0\14\1\0\15\1\0\15\1\0\0\0\0\0\0\0\14\2\0\14\2\0\14\2\0\14\2\0\16\2\0\16" - "\2\0\0\0\0\0\0\0\14!\0\14!\0\14!\0\14!\0\17(\0\17(\0\0\0\0\0\0\0\14+\0\14" - "+\0\14+\0\14+\0\20""9\0\20""9\0\0\0\0\0\0\0\36\215\0\36\215\0\36\215\0\36" - "\215\0(\264\0(\264\0\0\0\0\0\0\0\36\251\0\36\251\0\36\251\0\36\251\0\36\251" - "\0\36\251\0\36\251\0\36\251\0\0\0\0\0\0\0$\360\0$\360\0$\360\0\0\0\0\0\0" - "\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0" - "\0\0\0\0\0\0\0\0\0\0\0\1\0\0\1\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\36\3" - "\0\36\3\0\14\1\0\14\1\0\15\1\0\15\1\0\15\1\0\0\0\0\14\2\0\14\2\0\14\2\0\14" - "\2\0\16\2\0\16\2\0\16\2\0\0\0\0\14\3\0\14\3\0\14!\0\14!\0\17(\0\17(\0\17" - "(\0\0\0\0\14+\0\14+\0\14+\0\14+\0\20""9\0\20""9\0\20""9\0\0\0\0\14""7\0\14" - """7\0\36\215\0\36\215\0(\264\0(\264\0(\264\0\0\0\0\36\251\0\36\251\0\36\251" - "\0\36\251\0\36\251\0\36\251\0\36\251\0\36\251\0\36\251\0\36\251\0H\360\0" - "H\360\0\0\0\0$\360\0$\360\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0" - "\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\1\0\0\1\0\0\0" - "\0\0\0\0\0\0\0\0\0\0\0\0\0\36\3\0\36\3\0\36\3\0\14\1\0\15\1\0\15\1\0\15\1" - "\0\0\0\0\14\2\0\14\2\0\14\2\0\14\2\0\16\2\0\16\2\0\16\2\0\0\0\0\14\3\0\14" - "\3\0\14\3\0\14!\0\17(\0\17(\0\17(\0\0\0\0\14+\0\14+\0\14+\0\14+\0\20""9\0" - "\20""9\0\20""9\0\0\0\0\14""7\0\14""7\0\14""7\0\36\215\0(\264\0(\264\0(\264" - "\0\0\0\0\36\251\0\36\251\0\36\251\0\36\251\0\36\251\0\36\251\0\36\251\0\36" - "\251\0\36\251\0\36\251\0\36\251\0H\360\0H\360\0H\360\0\0\0\0$\360\0$\360" - "\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0" - "\0\0\0\0\0\0\0\0\0\0\0\0\0\0\1\0\0\1\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0" - "\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\13\1\0\13\1\0\13\1\0\13\1\0\0\0\0" - "\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\11!\0" - "\11!\0\11!\0\11!\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0" - "\0\0\0\0\0\0\0\0\0\23n\0\23n\0\23n\0\23n\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0" - "\0\0\0\0\0\0\0\0\0H\360\0H\360\0H\360\0H\360\0\0\0\0$\360\0\0\0\0\0\0\0\0" - "\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0" - "\0\0\0\0\0\0\1\0\1\1\0\0\0\0\0\0\0\0\0\0\0\0\0\25\0\0\25\0\0\25\0\0\27\0" - "\0\13\0\0\13\0\0\1\0\0\11\0\0\4\0\0\4\0\0\0\0\0\0\0\0\25\3\0\25\3\0\0\0\0" - "\0\0\0\25\3\0\25\3\0\25\3\0\25\3\0\3\1\0\3\1\0\2\1\0\7\5\0\7\3\0\7\3\0\0" - "\0\0\0\0\0\25""4\0\25""4\0\0\0\0\0\0\0\25""4\0\25""4\0\25""4\0\25""4\0\20" - "\35\0\20\35\0\11\22\0\23F\0\34""6\0\34""6\0\0\0\0\0\0\0L\317\0L\317\0L\317" - "\0L\317\0L\317\0L\317\0L\317\0L\317\0\0\0\0\0\0\0""2\317\0""2\317\0""2\317" - "\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0" - "\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\1\1\0\0\0\0\0\0\0\0\0\0\25\0\0\25" - "\0\0\25\0\0\4\0\0\5\0\0\2\0\0\1\0\0\4\0\0\14\0\0\14\0\0\0\0\0\37\7\0\37\7" - "\0\25\3\0\0\0\0\25\3\0\25\3\0\25\3\0\25\3\0\37\6\0\37\6\0\15\4\0\11\3\0\7" - "\3\0\14\10\0\14\10\0\0\0\0\25\16\0\25\16\0\25""4\0\0\0\0\25""4\0\25""4\0" - "\25""4\0\25""4\0&Q\0&Q\0&Q\0\31""5\0\34""6\0&j\0&j\0\0\0\0""5q\0""5q\0L\317" - "\0L\317\0L\317\0L\317\0L\317\0L\317\0L\317\0L\317\0L\317\0L\317\0\0\0\0""2" - "\317\0""2\317\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0" - "\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\1\0\0\1\1\0\0\0\0\0\0\0\25\0" - "\0\25\0\0\25\0\0\31\1\0\5\0\0\5\0\0\2\0\0\4\0\0\14\0\0\14\0\0\0\0\0\37\7" - "\0\37\7\0\37\7\0\0\0\0\25\3\0\25\3\0\25\3\0\25\3\0\37\6\0\37\6\0\37\6\0\11" - "\3\0\16\6\0\16\6\0\7\3\0\0\0\0\25\16\0\25\16\0\25\16\0\0\0\0\25""4\0\25""4" - "\0\25""4\0\25""4\0&Q\0&Q\0&Q\0\31""5\0+X\0+X\0\34""6\0\0\0\0""5q\0""5q\0" - """5q\0L\317\0L\317\0L\317\0L\317\0L\317\0L\317\0L\317\0L\317\0L\317\0L\317" - "\0L\317\0\0\0\0""2\317\0""2\317\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0" - "\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\1\0\0\0\0\0\0\0" - "\0\0\0\0\25\0\0\25\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0" - "\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0" - "\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0" - "\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0" - "\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0L\317\0L\317\0L\317\0L\317" - "\0\0\0\0""2\317\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0" - "\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\1\0\0\0\0\0\0\0\0\0\0\0\0" - "\0\0e\4\0e\4\0\0\0\0\0\0\0e\11\0e\11\0\0\0\0\0\0\0e\16\0e\16\0\0\0\0\0\0" - "\0G\11\0G\11\0\0\0\0\0\0\0G\14\0G\14\0\0\0\0\0\0\0G\17\0G\17\0\0\0\0\0\0" - "\0G\21\0G\21\0\0\0\0\0\0\0GK\0GK\0\0\0\0\0\0\0GT\0GT\0\0\0\0\0\0\0G^\0G^" - "\0\0\0\0\0\0\0Gg\0Gg\0\0\0\0\0\0\0e\317\0e\317\0e\317\0e\317\0e\317\0e\317" - "\0e\317\0e\317\0\0\0\0\0\0\0L\317\0L\317\0L\317\0\0\0\0\0\0\0\0\0\0\0\0\0" - "\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0" - "\0\0\0\0\0\0\1\0\0\0\0\0\0\0\0e\4\0e\4\0e\4\0\0\0\0e\11\0e\11\0e\11\0\0\0" - "\0e\16\0e\16\0e\16\0\0\0\0e\22\0e\22\0G\11\0\0\0\0G\14\0G\14\0G\14\0\0\0" - "\0G\17\0G\17\0G\17\0\0\0\0G\21\0G\21\0G\21\0\0\0\0G\24\0G\24\0GK\0\0\0\0" - "GT\0GT\0GT\0\0\0\0G^\0G^\0G^\0\0\0\0Gg\0Gg\0Gg\0\0\0\0Gq\0Gq\0e\317\0e\317" - "\0e\317\0e\317\0e\317\0e\317\0e\317\0e\317\0e\317\0e\317\0\0\0\0L\317\0L" - "\317\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0" - "\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0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0\0{\1" - "\0{\1\0f\0\0f\0\0z\1\0z\1\0z\1\0z\1\0)\4\0)\4\0\0\0\0\0\0\0Q\7\0Q\7\0\0\0" - "\0\0\0\0{&\0{&\0W\32\0W\32\0z&\0z&\0z&\0z&\0IC\0IC\0\0\0\0\0\0\0X^\0X^\0" - "\0\0\0\0\0\0\261\251\0\261\251\0\261\251\0\261\251\0\261\251\0\261\251\0" - "\261\251\0\261\251\0\0\0\0\0\0\0e\317\0e\317\0e\317\0\0\0\0\0\0\0\0\0\0\0" - "\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0" - "\0\0\0\0\0\0\0\0\216\1\0c\0\0`\0\0\2\0\0c\0\0c\0\0c\0\0\12\0\0k\1\0i\0\0" - "\0\0\0\11\0\0i\0\0i\0\0\0\0\0\256\2\0\256\2\0{\1\0f\0\0z\1\0z\1\0z\1\0z\1" - "\0\221\1\0\221\1\0\221\17\0\0\0\0)\4\0c\11\0c\11\0\0\0\0\256+\0\256+\0{&" - "\0W\32\0z&\0z&\0z&\0z&\0\2415\0\2415\0\243\210\0\0\0\0IC\0{|\0{|\0\0\0\0" - "\261\251\0\261\251\0\261\251\0\261\251\0\261\251\0\261\251\0\261\251\0\261" - "\251\0\261\251\0\261\251\0\264\360\0\264\360\0\0\0\0e\317\0e\317\0\0\0\0" - "\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0" - "\0\0\0\0\0\0\0\0\0\0\0\0\216\1\0\216\1\0`\0\0\2\0\0c\0\0c\0\0c\0\0\12\0\0" - "k\1\0k\1\0\0\0\0\11\0\0i\0\0i\0\0\0\0\0\256\2\0\256\2\0\256\2\0f\0\0z\1\0" - "z\1\0z\1\0z\1\0\221\1\0\221\1\0\221\1\0\0\0\0\221\17\0\221\17\0)\4\0\0\0" - "\0\256+\0\256+\0\256+\0W\32\0z&\0z&\0z&\0z&\0\2415\0\2415\0\2415\0\0\0\0" - "\243\210\0\243\210\0IC\0\0\0\0\261\251\0\261\251\0\261\251\0\261\251\0\261" - "\251\0\261\251\0\261\251\0\261\251\0\261\251\0\261\251\0\261\251\0\264\360" - "\0\264\360\0\264\360\0\0\0\0e\317\0e\317\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0" - "\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\216\1" - "\0\211\1\0c\0\0\2\0\0c\0\0c\0\0k\0\0\12\0\0k\1\0\0\0\0\0\0\0\0\0\0\0\0\0" - "\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0" - "\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0" - "\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0" - "\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\264\360\0\264\360" - "\0\264\360\0\264\360\0\0\0\0e\317\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0" - "\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\211\1\0\216\1" - "\0c\0\0\2\0\0c\0\0k\0\0q\0\0\20\0\0\0\0\0\0\0\0\322\1\0\322\1\0\322\1\0\322" - "\1\0\346\1\0\346\1\0\0\0\0\0\0\0\322\2\0\322\2\0\322\2\0\322\2\0\363\2\0" - "\363\2\0\0\0\0\0\0\0\322!\0\322!\0\322!\0\322!\0\371(\0\371(\0\0\0\0\0\0" - "\0\322+\0\322+\0\322+\0\322+\0\3719\0\3719\0\0\0\0\0\0\0\325\215\0\325\215" - "\0\325\215\0\325\215\0\374\264\0\374\264\0\0\0\0\0\0\0\325\251\0\325\251" - "\0\325\251\0\325\251\0\325\251\0\325\251\0\325\251\0\325\251\0\0\0\0\0\0" - "\0\264\360\0\264\360\0\264\360\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0" - "\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\211\1\0\216" - "\1\0c\0\0\2\0\0f\0\0m\0\0m\0\0\0\0\0\325\3\0\325\3\0\322\1\0\322\1\0\346" - "\1\0\346\1\0\346\1\0\0\0\0\322\2\0\322\2\0\322\2\0\322\2\0\363\2\0\363\2" - "\0\363\2\0\0\0\0\322\3\0\322\3\0\322!\0\322!\0\371(\0\371(\0\371(\0\0\0\0" - "\322+\0\322+\0\322+\0\322+\0\3719\0\3719\0\3719\0\0\0\0\3227\0\3227\0\325" - "\215\0\325\215\0\374\264\0\374\264\0\374\264\0\0\0\0\325\251\0\325\251\0" - "\325\251\0\325\251\0\325\251\0\325\251\0\325\251\0\325\251\0\325\251\0\325" - "\251\0\330\360\0\330\360\0\0\0\0\264\360\0\264\360\0\0\0\0\0\0\0\0\0\0\0" - "\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0" - "\0\0\0\0\0\216\1\0\216\1\0c\0\0\10\0\0m\0\0m\0\0\0\0\0\325\3\0\325\3\0\325" - "\3\0\322\1\0\346\1\0\346\1\0\346\1\0\0\0\0\322\2\0\322\2\0\322\2\0\322\2" - "\0\363\2\0\363\2\0\363\2\0\0\0\0\322\3\0\322\3\0\322\3\0\322!\0\371(\0\371" - "(\0\371(\0\0\0\0\322+\0\322+\0\322+\0\322+\0\3719\0\3719\0\3719\0\0\0\0\322" - "7\0\3227\0\3227\0\325\215\0\374\264\0\374\264\0\374\264\0\0\0\0\325\251\0" - "\325\251\0\325\251\0\325\251\0\325\251\0\325\251\0\325\251\0\325\251\0\325" - "\251\0\325\251\0\325\251\0\330\360\0\330\360\0\330\360\0\0\0\0\264\360\0" - "\264\360\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0" - "\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\216\1\0\216\1\0i\0\0\10\0\0m\0\0\0\0\0" - "\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\275\1\0\275\1\0\275\1\0" - "\275\1\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0" - "\0\0\0\0\244!\0\244!\0\244!\0\244!\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0" - "\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\213n\0\213n\0\213n\0\213n\0\0\0\0\0" - "\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\330\360\0\330\360\0\330\360\0\330" - "\360\0\0\0\0\264\360\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0" - "\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\216\1\0\224\1\0i\0\0\10\0" - "\0\0\0\0\0\0\0\325\3\0\325\3\0\325\3\0\351\3\0\365\1\0\365\1\0\14\0\0\313" - "\2\0#\2\0#\2\0\0\0\0\0\0\0\371\37\0\371\37\0\0\0\0\0\0\0\371\37\0\371\37" - "\0\371\37\0\371\37\0.\17\0.\17\0#\14\0\304-\0Y!\0Y!\0\0\0\0\0\0\0\371p\0" - "\371p\0\0\0\0\0\0\0\371p\0\371p\0\371p\0\371p\0O>\0O>\0""3(\0\247\227\0\211" - "s\0\211s\0\0\0\0\0\0\0\374\360\0\374\360\0\374\360\0\374\360\0\374\360\0" - "\374\360\0\374\360\0\374\360\0\0\0\0\0\0\0\330\360\0\330\360\0\330\360\0" - "\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0" - "\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\4\0\0\224\1\0i\0\0\0\0\0\0\0\0\325\3\0\325" - "\3\0\325\3\0\17\2\0\"\2\0!\0\0\35\0\0#\2\0\342\4\0\342\4\0\0\0\0\371\37\0" - "\371\37\0\371\37\0\0\0\0\371\37\0\371\37\0\371\37\0\371\37\0\3775\0\3775" - "\0\374%\0\304\34\0Y!\0\373C\0\373C\0\0\0\0\371p\0\371p\0\371p\0\0\0\0\371" - "p\0\371p\0\371p\0\371p\0\377\256\0\377\256\0\377\256\0\247q\0\211s\0\375" - "\342\0\375\342\0\0\0\0\374\360\0\374\360\0\374\360\0\374\360\0\374\360\0" - "\374\360\0\374\360\0\374\360\0\374\360\0\374\360\0\374\360\0\374\360\0\0" - "\0\0\330\360\0\330\360\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0" - "\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\12\0\0\224\1\0\0\0" - "\0\0\0\0\325\3\0\325\3\0\325\3\0\344\5\0\"\2\0\"\2\0\200\0\0#\2\0\342\4\0" - "\342\4\0\0\0\0\371\37\0\371\37\0\371\37\0\0\0\0\371\37\0\371\37\0\371\37" - "\0\371\37\0\3775\0\3775\0\3775\0\304\34\0\3732\0\3732\0Y!\0\0\0\0\371p\0" - "\371p\0\371p\0\0\0\0\371p\0\371p\0\371p\0\371p\0\377\256\0\377\256\0\377" - "\256\0\247q\0\375\274\0\375\274\0\211s\0\0\0\0\374\360\0\374\360\0\374\360" - "\0\374\360\0\374\360\0\374\360\0\374\360\0\374\360\0\374\360\0\374\360\0" - "\374\360\0\374\360\0\374\360\0\374\360\0\0\0\0\330\360\0\330\360\0\0\0\0" - "\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0" - "\0\0\0\0\0\0\0\0\0\12\0\0\0\0\0i\0\0\0\0\0\325\3\0\325\3\0\344\5\0\344\5" - "\0\"\2\0\36\1\0""4\2\0#\2\0\342\4\0\0\0\0\371\37\0\371\37\0\371\37\0\0\0" - "\0\371\37\0\371\37\0\371\37\0\371\37\0\3775\0\3775\0\3775\0\307)\0\3732\0" - "\3732\0\3732\0\0\0\0\371p\0\371p\0\371p\0\0\0\0\371p\0\371p\0\371p\0\371" - "p\0\377\256\0\377\256\0\377\256\0\247q\0\375\274\0\375\274\0\375\274\0\0" - "\0\0\374\360\0\374\360\0\374\360\0\374\360\0\374\360\0\374\360\0\374\360" - "\0\374\360\0\374\360\0\374\360\0\374\360\0\374\360\0\374\360\0\374\360\0" - "\374\360\0\374\360\0\0\0\0\330\360\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0" - "\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\12\0\0" - "\10\0\0\0\0\0\325\3\0\344\5\0\344\5\0\344\5\0\340\4\0\367\11\0\364\3\0#\2" - "\0\0\0\0\371\37\0\371\37\0\371\37\0\0\0\0\371\37\0\371\37\0\371\37\0\371" - "\37\0\3775\0\3775\0\3775\0\307)\0\376G\0\3732\0\3732\0\0\0\0\371p\0\371p" - "\0\371p\0\0\0\0\371p\0\371p\0\371p\0\371p\0\377\256\0\377\256\0\377\256\0" - "\247q\0\375\274\0\375\274\0\375\274\0\0\0\0\374\360\0\374\360\0\374\360\0" - "\374\360\0\374\360\0\374\360\0\374\360\0\374\360\0\374\360\0\374\360\0\374" - "\360\0\374\360\0\374\360\0\374\360\0\374\360\0\374\360\0\374\360\0\374\360" - "\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0" - "\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\12\0\0\10\0\0\0\0\0\0\0\0\17\2\0\17" - "\2\0\17\2\0\323\2\0\352\7\0\347\2\0\26\1\0\0\0\0\371\37\0\371\37\0\371\37" - "\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0/\26\0/\26\0/\26\0\0\0\0""7\36\0""6\25\0" - """6\25\0\0\0\0\371p\0\371p\0\371p\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0O>\0O>\0" - "O>\0\0\0\0VK\0VK\0VK\0\0\0\0\374\360\0\374\360\0\374\360\0\0\0\0\0\0\0\0" - "\0\0\0\0\0\374\360\0\374\360\0\374\360\0\374\360\0\0\0\0\0\0\0\0\0\0\0\0" - "\0\374\360\0\374\360\0\374\360\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0" - "\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\5\0\0\12\0" - "\0\10\0\0\0\0\0\17\2\0\17\2\0\344\5\0\15\1\0\352\7\0\352\7\0\347\2\0\0\0" - "\0\371\37\0\371\37\0\371\37\0\0\0\0\0\0\0\0\0\0\362\4\0\0\0\0/\26\0/\26\0" - "\3775\0$\21\0""7\36\0""7\36\0\3672\0\0\0\0\371p\0\371p\0\371p\0\0\0\0\0\0" - "\0\0\0\0\370A\0\0\0\0O>\0O>\0\377\256\0""3(\0VK\0VK\0\372\264\0\0\0\0\374" - "\360\0\374\360\0\374\360\0\374\360\0\0\0\0\0\0\0\341\271\0\0\0\0\374\360" - "\0\374\360\0\374\360\0\374\360\0\0\0\0\0\0\0\343\350\0\0\0\0\374\360\0\374" - "\360\0\374\360\0\374\360\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0" - "\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\5\0\0\5\0\0\10\0\0\0\0" - "\0\17\2\0\17\2\0\17\2\0\15\1\0\352\7\0\352\7\0\347\2\0\0\0\0\371\37\0\371" - "\37\0\371\37\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0/\26\0/\26\0/\26\0$\21\0""7\36" - "\0""7\36\0""6\25\0\0\0\0\371p\0\371p\0\371p\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0" - "\0O>\0O>\0O>\0""3(\0VK\0VK\0VK\0\0\0\0\374\360\0\374\360\0\374\360\0\374" - "\360\0\0\0\0\0\0\0\0\0\0\0\0\0\374\360\0\374\360\0\374\360\0\374\360\0\0" - "\0\0\0\0\0\0\0\0\0\0\0\374\360\0\374\360\0\374\360\0\374\360\0\0\0\0\0\0" - "\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0" - "\0\0\0\0\0\0\0\5\0\0\5\0\0\5\0\0\0\0\0\344\5\0\344\5\0\344\5\0\316\4\0\367" - "\11\0\367\11\0\364\3\0\0\0\0\371\37\0\371\37\0\371\37\0\0\0\0\371\37\0\371" - "\37\0\371\37\0\371\37\0\3775\0\3775\0\3775\0\307)\0\376G\0\376G\0\3732\0" - "\0\0\0\371p\0\371p\0\371p\0\0\0\0\371p\0\371p\0\371p\0\371p\0\377\256\0\377" - "\256\0\377\256\0\247q\0\375\274\0\375\274\0\375\274\0\0\0\0\374\360\0\374" - "\360\0\374\360\0\374\360\0\374\360\0\374\360\0\374\360\0\374\360\0\374\360" - "\0\374\360\0\374\360\0\374\360\0\374\360\0\374\360\0\374\360\0\374\360\0" - "\374\360\0\374\360\0\374\360\0\374\360\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0" - "\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\5" - "\0\0\5\0\0\5\0\0\17\2\0\344\5\0\344\5\0\316\4\0\345\11\0\367\11\0\364\3\0" - "\0\0\0\371\37\0\371\37\0\371\37\0\0\0\0\371\37\0\371\37\0\371\37\0\371\37" - "\0\3775\0\3775\0\3775\0\307)\0\376G\0\376G\0\3732\0\0\0\0\371p\0\371p\0\371" - "p\0\0\0\0\371p\0\371p\0\371p\0\371p\0\377\256\0\377\256\0\377\256\0\247q" - "\0\375\274\0\375\274\0\375\274\0\0\0\0\374\360\0\374\360\0\374\360\0\374" - "\360\0\374\360\0\374\360\0\374\360\0\374\360\0\374\360\0\374\360\0\374\360" - "\0\374\360\0\374\360\0\374\360\0\374\360\0\374\360\0\374\360\0\374\360\0" - "\374\360\0\374\360\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0" - "\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\5\0\0\5\0\0\0\0\0\17\2" - "\0\344\5\0\344\5\0\15\1\0$\6\0$\6\0#\2\0\0\0\0\371\37\0\371\37\0\371\37\0" - "\0\0\0\371\37\0\371\37\0\371\37\0\371\37\0\3775\0/\26\0/\26\0\307)\0\376" - "G\0[/\0Y!\0\0\0\0\371p\0\371p\0\371p\0\0\0\0\371p\0\371p\0\371p\0\371p\0" - "\377\256\0O>\0O>\0\247q\0\375\274\0\211s\0\211s\0\0\0\0\374\360\0\374\360" - "\0\374\360\0\374\360\0\374\360\0\374\360\0\374\360\0\374\360\0\374\360\0" - "\0\0\0\0\0\0\374\360\0\374\360\0\374\360\0\374\360\0\374\360\0\374\360\0" - "\374\360\0\374\360\0\374\360\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0" - "\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\5\0\0" - "\5\0\0\17\2\0\17\2\0\344\5\0\316\4\0$\6\0$\6\0#\2\0\0\0\0\371\37\0\371\37" - "\0\371\37\0\0\0\0\371\37\0\371\37\0\371\37\0\371\37\0\3775\0/\26\0/\26\0" - "\307)\0\376G\0[/\0Y!\0\0\0\0\371p\0\371p\0\371p\0\0\0\0\371p\0\371p\0\371" - "p\0\371p\0\377\256\0O>\0O>\0\247q\0\375\274\0\211s\0\211s\0\0\0\0\374\360" - "\0\374\360\0\374\360\0\374\360\0\374\360\0\374\360\0\374\360\0\374\360\0" - "\374\360\0\0\0\0\0\0\0\374\360\0\374\360\0\374\360\0\374\360\0\374\360\0" - "\374\360\0\374\360\0\374\360\0\374\360\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0" - "\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0" - "\0\0\0\0\0\5\0\0\24\2\0\17\2\0\17\2\0\316\4\0\345\11\0$\6\0#\2\0\0\0\0\371" - "\37\0\371\37\0\371\37\0\0\0\0\371\37\0\371\37\0\371\37\0\371\37\0\3775\0" - "\3775\0\3775\0\307)\0\376G\0\376G\0\3732\0\0\0\0\371p\0\371p\0\371p\0\0\0" - "\0\371p\0\371p\0\371p\0\371p\0\377\256\0\377\256\0\377\256\0\247q\0\375\274" - "\0\375\274\0\375\274\0\0\0\0\374\360\0\374\360\0\374\360\0\374\360\0\374" - "\360\0\374\360\0\374\360\0\374\360\0\374\360\0\374\360\0\374\360\0\374\360" - "\0\374\360\0\374\360\0\374\360\0\374\360\0\374\360\0\374\360\0\374\360\0" - "\374\360\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0" - "\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\5\0\0\24\2\0\24" - "\2\0\17\2\0\316\4\0\345\11\0\342\3\0#\2\0\0\0\0\371\37\0\371\37\0\371\37" - "\0\0\0\0\371\37\0\371\37\0\371\37\0\371\37\0\3775\0\3775\0\3775\0\307)\0" - "\376G\0\3732\0\3732\0\0\0\0\371p\0\371p\0\371p\0\0\0\0\371p\0\371p\0\371" - "p\0\371p\0\377\256\0\377\256\0\377\256\0\247q\0\375\274\0\375\274\0\375\274" - "\0\0\0\0\374\360\0\374\360\0\374\360\0\374\360\0\374\360\0\374\360\0\374" - "\360\0\374\360\0\374\360\0\374\360\0\374\360\0\374\360\0\374\360\0\374\360" - "\0\374\360\0\374\360\0\374\360\0\374\360\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0" - "\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0" - "\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\17\2\0\24\2\0\5\0\0\0\0\0\27\5\0\342\3\0\313" - "\1\0\0\0\0\371\37\0\371\37\0\0\0\0\0\0\0\0\0\0\371\37\0\0\0\0\0\0\0/\26\0" - "\3775\0\371\37\0\302\30\0\3716\0Y!\0#\14\0\0\0\0\371p\0\371p\0\0\0\0\0\0" - "\0\0\0\0\371p\0\0\0\0\0\0\0O>\0\377\256\0\371p\0\243I\0\371\224\0\211s\0" - """3(\0\0\0\0\374\360\0\374\360\0\0\0\0\0\0\0\0\0\0\374\360\0\374\360\0\374" - "\360\0\374\360\0\374\360\0\374\360\0\374\360\0\374\360\0\0\0\0\0\0\0\0\0" - "\0\374\360\0\374\360\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0" - "\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0" - "\0\0\0\0\0\0\0\0\17\2\0\17\2\0\0\0\0\0\0\0\26\1\0\26\1\0\0\0\0\0\0\0\371" - "\37\0\371\37\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0/\26\0/\26\0\0\0\0\0\0" - "\0""6\25\0""6\25\0\0\0\0\0\0\0\371p\0\371p\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0" - "\0\0\0\0O>\0O>\0\0\0\0\0\0\0VK\0VK\0\0\0\0\0\0\0\374\360\0\374\360\0\0\0" - "\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\374" - "\360\0\374\360\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0" - "\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0" - "\0\0\0\0\0\0\0\0\0\0\0\17\2\0\17\2\0\0\0\0\0\0\0\26\1\0\26\1\0\0\0\0\0\0" - "\0\371\37\0\371\37\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0/\26\0/\26\0\0\0" - "\0\0\0\0""6\25\0""6\25\0\0\0\0\0\0\0\371p\0\371p\0\0\0\0\0\0\0\0\0\0\0\0" - "\0\0\0\0\0\0\0O>\0O>\0\0\0\0\0\0\0VK\0VK\0\0\0\0\0\0\0\374\360\0\374\360" - "\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\374\360\0" - "\374\360\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0" - "\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0" - "\0\0\0\0\0\0\0\0\0\0\0\0\0\0\17\2\0\17\2\0\16\0\0\0\0\0\26\1\0\26\1\0\26" - "\1\0\0\0\0\371\37\0\371\37\0\371\37\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0/\26\0" - "/\26\0.\17\0\0\0\0""6\25\0""6\25\0""6\25\0\0\0\0\371p\0\371p\0\371p\0\0\0" - "\0\0\0\0\0\0\0\0\0\0\0\0\0O>\0O>\0O>\0\0\0\0VK\0VK\0VK\0\0\0\0\374\360\0" - "\374\360\0\374\360\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\374\360\0\374\360" - "\0\374\360\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0" - "\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0" - "\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\16\0\0\16\0\0\14\0\0\14" - "\0\0#\2\0#\2\0\0\0\0\0\0\0\371\37\0\371\37\0\0\0\0\0\0\0\371\37\0\371\37" - "\0\371\37\0\371\37\0.\17\0.\17\0#\14\0#\14\0Y!\0Y!\0\0\0\0\0\0\0\371p\0\371" - "p\0\0\0\0\0\0\0\371p\0\371p\0\371p\0\371p\0O>\0O>\0""3(\0""3(\0\211s\0\211" - "s\0\0\0\0\0\0\0\374\360\0\374\360\0\374\360\0\374\360\0\374\360\0\374\360" - "\0\374\360\0\374\360\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0" - "\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0" - "\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0" - "\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0" - "\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0" - "\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0" - "\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0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0" - "\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0", -}; - diff --git a/test/test-automation/src/libSDLtest/common/img_face.c b/test/test-automation/src/libSDLtest/common/img_face.c deleted file mode 100644 index 56e76345f..000000000 --- a/test/test-automation/src/libSDLtest/common/img_face.c +++ /dev/null @@ -1,197 +0,0 @@ -/* GIMP RGBA C-Source image dump (face.c) */ -#include "common.h" - -static const SurfaceImage_t img_face = { - 32, 32, 4, - "\377\377\377\0\377\377\377\0\377\377\377\0\377\377\377\0\377\377\377\0\377" - "\377\377\0\377\377\377\0\377\377\377\0\377\377\377\0\377\377\377\0\377\377" - "\377\0\377\377\377\0\377\377\377\0\377\377\377\0\377\377\377\0\377\377\377" - "\0\377\377\377\0\377\377\377\0\377\377\377\0\377\377\377\0\377\377\377\0" - "\377\377\377\0\377\377\377\0\377\377\377\0\377\377\377\0\377\377\377\0\377" - "\377\377\0\377\377\377\0\377\377\377\0\377\377\377\0\377\377\377\0\377\377" - "\377\0\377\377\377\0\377\377\377\0\377\377\377\0\377\377\377\0\377\377\377" - "\0\377\377\377\0\377\377\377\0\377\377\377\0\377\377\377\0\377\377\377\0" - "\377\377\377\0\377\377\377\0\377\377\377\0\377\377\377\0\377\377\377\0\377" - "\377\377\0\377\377\377\0\377\377\377\0\377\377\377\0\377\377\377\0\377\377" - "\377\0\377\377\377\0\377\377\377\0\377\377\377\0\377\377\377\0\377\377\377" - "\0\377\377\377\0\377\377\377\0\377\377\377\0\377\377\377\0\377\377\377\0" - "\377\377\377\0\377\377\377\0\377\377\377\0\377\377\377\0\377\377\377\0\377" - "\377\377\0\377\377\377\0\377\377\377\0\377\377\377\0\377\377\377\0\377\377" - "\377\0\377\377\377\0\377\377\377\0\377\377\377\0\377\377\377\0\377\377\377" - "\0\377\377\377\0\377\377\377\0\377\377\377\0\377\377\377\0\377\377\377\0" - "\377\377\377\0\377\377\377\0\377\377\377\0\377\377\377\0\377\377\377\0\377" - "\377\377\0\377\377\377\0\377\377\377\0\377\377\377\0\377\377\377\0\377\377" - "\377\0\377\377\377\0\377\377\377\0\377\377\377\0\377\377\377\0\377\377\377" - "\0\377\377\377\0\377\377\377\0\377\377\377\0\377\377\377\0\377\377\377\0" - "\377\377\377\0\377\377\377\0\377\377\377\0\377\377\377\0\377\377\377\0\377" - "\377\377\0\377\377\377\0\377\377\377\0\377\377\377\0\377\377\377\0\377\377" - "\377\0\377\377\377\0\377\377\377\0\377\377\377\0\377\377\377\0\377\377\377" - "\0\377\377\377\0\377\377\377\0\377\377\377\0\377\377\377\0\377\377\377\0" - "\377\377\377\0\377\377\377\0\377\377\377\0\377\377\377\0\377\377\377\0\377" - "\377\377\0\377\377\377\0\377\377\377\0\377\377\377\0\377\377\377\0\377\377" - "\377\0\377\377\377\0\377\377\377\0\377\377\377\0\377\377\377\0\377\377\377" - "\0\377\377\377\0\377\377\377\0\377\377\377\0\377\377\377\0\377\377\377\0" - "\377\377\377\0\377\377\377\0\377\377\377\0\377\377\377\0\377\377\377\0\377" - "\377\377\0\377\377\377\0\377\377\377\0\377\377\377\0\377\377\377\0\377\377" - "\377\0\377\377\377\0\377\377\377\0\377\377\377\0\377\377\377\0\377\377\377" - "\0\377\377\377\0\377\377\377\0\377\377\377\0\377\377\377\0\377\377\377\0" - "\377\377\377\0\377\377\377\0\377\377\377\0\377\377\377\0\377\377\377\0\377" - "\377\377\0\377\377\377\0\377\377\377\0\377\377\377\0\377\377\377\0\377\377" - "\377\0\377\377\377\0\377\377\377\0\377\377\377\0\377\377\377\0\377\377\377" - "\0\377\377\377\0\377\377\377\0\377\377\377\0\377\377\377\0\377\377\377\0" - "\377\377\377\0\377\377\377\0\377\377\377\0\377\377\377\0\377\377\377\0\377" - "\377\377\0\377\377\377\0\377\377\377\0\377\377\377\0\377\377\377\0\377\377" - "\377\0\377\377\377\0\377\377\377\0\377\377\377\0\377\377\377\0\377\377\377" - "\0\377\377\377\0\377\377\377\0\377\377\377\0\377\377\377\0\377\377\377\0" - "\377\377\377\0\377\377\377\0\377\377\377\0\377\377\377\0\377\377\377\0\377" - "\377\377\0\377\377\377\0\377\377\377\0\377\377\377\0\377\377\377\0\377\377" - "\377\0\377\377\377\0\377\377\377\0\377\377\377\0\377\377\377\0\377\377\377" - "\0\377\377\377\0\377\377\377\0\377\377\377\0\377\377\377\0\377\377\377\0" - "\377\377\377\0\377\377\377\0\377\377\377\0\377\377\377\0\377\377\377\0\0" - "\0\0\377\0\0\0\377\0\0\0\377\0\0\0\377\0\0\0\377\0\0\0\377\0\0\0\377\0\0" - "\0\377\377\377\377\0\377\377\377\0\377\377\377\0\377\377\377\0\377\377\377" - "\0\377\377\377\0\377\377\377\0\377\377\377\0\377\377\377\0\377\377\377\0" - "\377\377\377\0\377\377\377\0\377\377\377\0\377\377\377\0\377\377\377\0\377" - "\377\377\0\377\377\377\0\377\377\377\0\377\377\377\0\377\377\377\0\377\377" - "\377\0\377\377\377\0\0\0\0\377\0\0\0\377\377\377\0\377\377\377\0\377\377" - "\377\0\377\377\377\0\377\377\377\0\377\377\377\0\377\377\377\0\377\377\377" - "\0\377\0\0\0\377\0\0\0\377\377\377\377\0\377\377\377\0\377\377\377\0\377" - "\377\377\0\377\377\377\0\377\377\377\0\377\377\377\0\377\377\377\0\377\377" - "\377\0\377\377\377\0\377\377\377\0\377\377\377\0\377\377\377\0\377\377\377" - "\0\377\377\377\0\377\377\377\0\377\377\377\0\377\377\377\0\377\377\377\0" - "\0\0\0\377\377\377\0\377\377\377\0\377\377\377\0\377\377\377\0\377\377\377" - "\0\377\377\377\0\377\377\377\0\377\377\377\0\377\377\377\0\377\377\377\0" - "\377\377\377\0\377\377\377\0\377\0\0\0\377\377\377\377\0\377\377\377\0\377" - "\377\377\0\377\377\377\0\377\377\377\0\377\377\377\0\377\377\377\0\377\377" - "\377\0\377\377\377\0\377\377\377\0\377\377\377\0\377\377\377\0\377\377\377" - "\0\377\377\377\0\377\377\377\0\377\377\377\0\377\377\377\0\0\0\0\377\377" - "\377\0\377\377\377\0\377\377\377\0\377\377\377\0\377\377\377\0\377\377\377" - "\0\377\377\377\0\377\377\377\0\377\377\377\0\377\377\377\0\377\377\377\0" - "\377\377\377\0\377\377\377\0\377\377\377\0\377\0\0\0\377\377\377\377\0\377" - "\377\377\0\377\377\377\0\377\377\377\0\377\377\377\0\377\377\377\0\377\377" - "\377\0\377\377\377\0\377\377\377\0\377\377\377\0\377\377\377\0\377\377\377" - "\0\377\377\377\0\377\377\377\0\377\377\377\0\0\0\0\377\377\377\0\377\377" - "\377\0\377\377\377\0\377\377\377\0\377\377\377\0\377\377\377\0\377\377\377" - "\0\377\377\377\0\377\377\377\0\377\377\377\0\377\377\377\0\377\377\377\0" - "\377\377\377\0\377\377\377\0\377\377\377\0\377\377\377\0\377\0\0\0\377\377" - "\377\377\0\377\377\377\0\377\377\377\0\377\377\377\0\377\377\377\0\377\377" - "\377\0\377\377\377\0\377\377\377\0\377\377\377\0\377\377\377\0\377\377\377" - "\0\377\377\377\0\377\377\377\0\0\0\0\377\377\377\0\377\377\377\0\377\377" - "\377\0\377\377\377\0\377\377\377\0\377\377\377\0\377\377\377\0\377\377\377" - "\0\377\377\377\0\377\377\377\0\377\377\377\0\377\377\377\0\377\377\377\0" - "\377\377\377\0\377\377\377\0\377\377\377\0\377\377\377\0\377\377\377\0\377" - "\0\0\0\377\377\377\377\0\377\377\377\0\377\377\377\0\377\377\377\0\377\377" - "\377\0\377\377\377\0\377\377\377\0\377\377\377\0\377\377\377\0\377\377\377" - "\0\377\377\377\0\377\377\377\0\0\0\0\377\377\377\0\377\377\377\0\377\377" - "\377\0\377\0\0\0\377\0\0\0\377\0\0\0\377\0\0\0\377\377\377\0\377\377\377" - "\0\377\377\377\0\377\377\377\0\377\0\0\0\377\0\0\0\377\0\0\0\377\0\0\0\377" - "\377\377\0\377\377\377\0\377\377\377\0\377\0\0\0\377\377\377\377\0\377\377" - "\377\0\377\377\377\0\377\377\377\0\377\377\377\0\377\377\377\0\377\377\377" - "\0\377\377\377\0\377\377\377\0\377\377\377\0\377\377\377\0\0\0\0\377\377" - "\377\0\377\377\377\0\377\377\377\0\377\377\377\0\377\0\0\0\377\0\0\0\377" - "\377\377\377\0\0\0\0\377\377\377\0\377\377\377\0\377\377\377\0\377\377\377" - "\0\377\0\0\0\377\0\0\0\377\377\377\377\0\0\0\0\377\377\377\0\377\377\377" - "\0\377\377\377\0\377\377\377\0\377\0\0\0\377\377\377\377\0\377\377\377\0" - "\377\377\377\0\377\377\377\0\377\377\377\0\377\377\377\0\377\377\377\0\377" - "\377\377\0\377\377\377\0\377\377\377\0\0\0\0\377\377\377\0\377\377\377\0" - "\377\377\377\0\377\377\377\0\377\0\0\0\377\0\0\0\377\0\0\0\377\0\0\0\377" - "\377\377\0\377\377\377\0\377\377\377\0\377\377\377\0\377\0\0\0\377\0\0\0" - "\377\0\0\0\377\0\0\0\377\377\377\0\377\377\377\0\377\377\377\0\377\377\377" - "\0\377\0\0\0\377\377\377\377\0\377\377\377\0\377\377\377\0\377\377\377\0" - "\377\377\377\0\377\377\377\0\377\377\377\0\377\377\377\0\377\377\377\0\377" - "\377\377\0\0\0\0\377\377\377\0\377\377\377\0\377\377\377\0\377\377\377\0" - "\377\377\377\0\377\377\377\0\377\377\377\0\377\377\377\0\377\377\377\0\377" - "\377\377\0\377\377\377\0\377\377\377\0\377\377\377\0\377\377\377\0\377\377" - "\377\0\377\377\377\0\377\377\377\0\377\377\377\0\377\377\377\0\377\377\377" - "\0\377\0\0\0\377\377\377\377\0\377\377\377\0\377\377\377\0\377\377\377\0" - "\377\377\377\0\377\377\377\0\377\377\377\0\377\377\377\0\377\377\377\0\377" - "\377\377\0\0\0\0\377\377\377\0\377\377\377\0\377\377\377\0\377\377\377\0" - "\377\377\377\0\377\377\377\0\377\377\377\0\377\377\377\0\377\377\377\0\377" - "\377\377\0\377\377\377\0\377\377\377\0\377\377\377\0\377\377\377\0\377\377" - "\377\0\377\377\377\0\377\377\377\0\377\377\377\0\377\377\377\0\377\377\377" - "\0\377\0\0\0\377\377\377\377\0\377\377\377\0\377\377\377\0\377\377\377\0" - "\377\377\377\0\377\377\377\0\377\377\377\0\377\377\377\0\377\377\377\0\377" - "\377\377\0\0\0\0\377\377\377\0\377\377\377\0\377\377\377\0\377\377\377\0" - "\377\377\377\0\377\377\377\0\377\377\377\0\377\377\377\0\377\377\377\0\377" - "\0\0\0\377\0\0\0\377\377\377\0\377\377\377\0\377\377\377\0\377\377\377\0" - "\377\377\377\0\377\377\377\0\377\377\377\0\377\377\377\0\377\377\377\0\377" - "\0\0\0\377\377\377\377\0\377\377\377\0\377\377\377\0\377\377\377\0\377\377" - "\377\0\377\377\377\0\377\377\377\0\377\377\377\0\377\377\377\0\377\377\377" - "\0\0\0\0\377\377\377\0\377\377\377\0\377\377\377\0\377\377\377\0\377\377" - "\377\0\377\377\377\0\377\377\377\0\377\377\377\0\377\377\377\0\377\0\0\0" - "\377\0\0\0\377\377\377\0\377\377\377\0\377\377\377\0\377\377\377\0\377\377" - "\377\0\377\377\377\0\377\377\377\0\377\377\377\0\377\377\377\0\377\0\0\0" - "\377\377\377\377\0\377\377\377\0\377\377\377\0\377\377\377\0\377\377\377" - "\0\377\377\377\0\377\377\377\0\377\377\377\0\377\377\377\0\377\377\377\0" - "\0\0\0\377\377\377\0\377\377\377\0\377\377\377\0\377\377\377\0\377\377\377" - "\0\377\377\377\0\377\377\377\0\377\377\377\0\377\377\377\0\377\377\377\0" - "\377\377\377\0\377\377\377\0\377\377\377\0\377\377\377\0\377\377\377\0\377" - "\377\377\0\377\377\377\0\377\377\377\0\377\377\377\0\377\377\377\0\377\0" - "\0\0\377\377\377\377\0\377\377\377\0\377\377\377\0\377\377\377\0\377\377" - "\377\0\377\377\377\0\377\377\377\0\377\377\377\0\377\377\377\0\377\377\377" - "\0\377\377\377\0\0\0\0\377\377\377\0\377\377\377\0\377\377\377\0\377\377" - "\377\0\377\377\377\0\377\377\377\0\377\377\377\0\377\377\377\0\377\377\377" - "\0\377\377\377\0\377\377\377\0\377\377\377\0\377\377\377\0\377\377\377\0" - "\377\377\377\0\377\377\377\0\377\377\377\0\377\377\377\0\377\0\0\0\377\377" - "\377\377\0\377\377\377\0\377\377\377\0\377\377\377\0\377\377\377\0\377\377" - "\377\0\377\377\377\0\377\377\377\0\377\377\377\0\377\377\377\0\377\377\377" - "\0\377\377\377\0\0\0\0\377\377\377\0\377\377\377\0\377\0\0\0\377\0\0\0\377" - "\0\0\0\377\377\377\0\377\377\377\0\377\377\377\0\377\377\377\0\377\377\377" - "\0\377\377\377\0\377\377\377\0\377\377\377\0\377\0\0\0\377\0\0\0\377\0\0" - "\0\377\377\377\0\377\377\377\0\377\0\0\0\377\377\377\377\0\377\377\377\0" - "\377\377\377\0\377\377\377\0\377\377\377\0\377\377\377\0\377\377\377\0\377" - "\377\377\0\377\377\377\0\377\377\377\0\377\377\377\0\377\377\377\0\377\377" - "\377\0\0\0\0\377\377\377\0\377\377\377\0\377\0\0\0\377\0\0\0\377\0\0\0\377" - "\0\0\0\377\0\0\0\377\0\0\0\377\0\0\0\377\0\0\0\377\0\0\0\377\0\0\0\377\0" - "\0\0\377\0\0\0\377\377\377\0\377\377\377\0\377\0\0\0\377\377\377\377\0\377" - "\377\377\0\377\377\377\0\377\377\377\0\377\377\377\0\377\377\377\0\377\377" - "\377\0\377\377\377\0\377\377\377\0\377\377\377\0\377\377\377\0\377\377\377" - "\0\377\377\377\0\377\377\377\0\377\377\377\0\0\0\0\377\377\377\0\377\377" - "\377\0\377\0\0\0\377\0\0\0\377\0\0\0\377\0\0\0\377\0\0\0\377\0\0\0\377\0" - "\0\0\377\0\0\0\377\0\0\0\377\0\0\0\377\377\377\0\377\377\377\0\377\0\0\0" - "\377\377\377\377\0\377\377\377\0\377\377\377\0\377\377\377\0\377\377\377" - "\0\377\377\377\0\377\377\377\0\377\377\377\0\377\377\377\0\377\377\377\0" - "\377\377\377\0\377\377\377\0\377\377\377\0\377\377\377\0\377\377\377\0\377" - "\377\377\0\377\377\377\0\0\0\0\377\377\377\0\377\377\377\0\377\377\377\0" - "\377\0\0\0\377\0\0\0\377\0\0\0\377\0\0\0\377\0\0\0\377\0\0\0\377\377\377" - "\0\377\377\377\0\377\377\377\0\377\0\0\0\377\377\377\377\0\377\377\377\0" - "\377\377\377\0\377\377\377\0\377\377\377\0\377\377\377\0\377\377\377\0\377" - "\377\377\0\377\377\377\0\377\377\377\0\377\377\377\0\377\377\377\0\377\377" - "\377\0\377\377\377\0\377\377\377\0\377\377\377\0\377\377\377\0\377\377\377" - "\0\377\377\377\0\0\0\0\377\0\0\0\377\377\377\0\377\377\377\0\377\377\377" - "\0\377\377\377\0\377\377\377\0\377\377\377\0\377\377\377\0\377\377\377\0" - "\377\0\0\0\377\0\0\0\377\377\377\377\0\377\377\377\0\377\377\377\0\377\377" - "\377\0\377\377\377\0\377\377\377\0\377\377\377\0\377\377\377\0\377\377\377" - "\0\377\377\377\0\377\377\377\0\377\377\377\0\377\377\377\0\377\377\377\0" - "\377\377\377\0\377\377\377\0\377\377\377\0\377\377\377\0\377\377\377\0\377" - "\377\377\0\377\377\377\0\377\377\377\0\0\0\0\377\0\0\0\377\0\0\0\377\0\0" - "\0\377\0\0\0\377\0\0\0\377\0\0\0\377\0\0\0\377\377\377\377\0\377\377\377" - "\0\377\377\377\0\377\377\377\0\377\377\377\0\377\377\377\0\377\377\377\0" - "\377\377\377\0\377\377\377\0\377\377\377\0\377\377\377\0\377\377\377\0\377" - "\377\377\0\377\377\377\0\377\377\377\0\377\377\377\0\377\377\377\0\377\377" - "\377\0\377\377\377\0\377\377\377\0\377\377\377\0\377\377\377\0\377\377\377" - "\0\377\377\377\0\377\377\377\0\377\377\377\0\377\377\377\0\377\377\377\0" - "\377\377\377\0\377\377\377\0\377\377\377\0\377\377\377\0\377\377\377\0\377" - "\377\377\0\377\377\377\0\377\377\377\0\377\377\377\0\377\377\377\0\377\377" - "\377\0\377\377\377\0\377\377\377\0\377\377\377\0\377\377\377\0\377\377\377" - "\0\377\377\377\0\377\377\377\0\377\377\377\0\377\377\377\0\377\377\377\0" - "\377\377\377\0\377\377\377\0\377\377\377\0\377\377\377\0\377\377\377\0\377" - "\377\377\0\377\377\377\0\377\377\377\0\377\377\377\0\377\377\377\0\377\377" - "\377\0\377\377\377\0\377\377\377\0\377\377\377\0\377\377\377\0\377\377\377" - "\0\377\377\377\0\377\377\377\0\377\377\377\0\377\377\377\0\377\377\377\0" - "\377\377\377\0\377\377\377\0\377\377\377\0\377\377\377\0\377\377\377\0\377" - "\377\377\0\377\377\377\0\377\377\377\0\377\377\377\0\377\377\377\0\377\377" - "\377\0\377\377\377\0\377\377\377\0\377\377\377\0\377\377\377\0\377\377\377" - "\0\377\377\377\0\377\377\377\0\377\377\377\0\377\377\377\0\377\377\377\0" - "\377\377\377\0\377\377\377\0\377\377\377\0\377\377\377\0\377\377\377\0\377" - "\377\377\0\377\377\377\0\377\377\377\0\377\377\377\0\377\377\377\0\377\377" - "\377\0\377\377\377\0\377\377\377\0\377\377\377\0\377\377\377\0\377\377\377" - "\0\377\377\377\0\377\377\377\0\377\377\377\0\377\377\377\0\377\377\377\0" - "\377\377\377\0\377\377\377\0\377\377\377\0\377\377\377\0\377\377\377\0\377" - "\377\377\0\377\377\377\0\377\377\377\0\377\377\377\0\377\377\377\0\377\377" - "\377\0\377\377\377\0\377\377\377\0\377\377\377\0\377\377\377\0\377\377\377" - "\0\377\377\377\0\377\377\377\0\377\377\377\0\377\377\377\0\377\377\377\0" - "\377\377\377\0\377\377\377\0\377\377\377\0\377\377\377\0\377\377\377\0\377" - "\377\377\0\377\377\377\0", -}; - diff --git a/test/test-automation/src/libSDLtest/common/img_primitives.c b/test/test-automation/src/libSDLtest/common/img_primitives.c deleted file mode 100644 index 0db5b9265..000000000 --- a/test/test-automation/src/libSDLtest/common/img_primitives.c +++ /dev/null @@ -1,464 +0,0 @@ -/* GIMP RGB C-Source image dump (primitives.c) */ -#include "common.h" - -static const SurfaceImage_t img_primitives = { - 80, 60, 3, - "\5ii\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0" - "\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0" - "\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0" - "\0\0\0\0\0\0\0\0\0\0\0\0\0\0\15I\310\0\0\0\15I\310\0\0\0\15I\310\0\0\0\15" - "I\310\0\0\0\15I\310\0\0\0\15I\310\0\0\0\15I\310\0\0\0\15I\310\0\0\0\15I\310" - "\0\0\0\15I\310\0\0\0\15I\310\0\0\0\15I\310\0\0\0\15I\310\0\0\0\15I\310\0" - "\0\0\15I\310\0\0\0\15I\310\0\0\0\15I\310\0\0\0\15I\310\0\0\0\15I\310\0\0" - "\0\5ii\0\0\0\5ii\0\0\0\3\1\1\0\0\0\5\2\1\0\0\0\7\3\2\0\0\0\11\4\3\0\0\0\13" - "\5\3\0\0\0\15\6\4\0\0\0\17\7\5\0\0\0\21\10\5\0\0\0\23\11\6\0\0\0\25\12\7" - "\0\0\0\27\13\7\0\0\0\31\14\10\0\0\0\33\15\11\0\0\0\35\16\11\0\0\0\37\17\12" - "\0\0\0!\20\13\0\0\0#\21\13\0\0\0%\22\14\0\0\0'\23\15\15I\310)\24\15\15I\310" - "+\25\16\15I\310-\26\17\15I\310/\27\17\15I\3101\30\20\15I\3103\31\21\15I\310" - "5\32\21\15I\3107\33\22\15I\3109\34\23\15I\310;\35\23\15I\310=\36\24\15I\310" - "?\37\25\15I\310A\40\25\15I\310C!\26\15I\310E\"\27\15I\310G#\27\15I\310I$" - "\30\15I\310K%\31\15I\310M&\31\5iiO'\32\0\0\0\0\0\0\5ii\0\0\0\10\4\2\0\0\0" - "\14\6\4\0\0\0\20\10\5\0\0\0\24\12\6\0\0\0\30\14\10\0\0\0\34\16\11\0\0\0\40" - "\20\12\0\0\0$\22\14\0\0\0(\24\15\0\0\0,\26\16\0\0\0""0\30\20\0\0\0""4\32" - "\21\0\0\0""8\34\22\0\0\0<\36\24\0\0\0@\40\25\0\0\0D\"\26\0\0\0H$\30\0\0\0" - "L&\31\0\0\0P(\32\15I\310T*\34\15I\310X,\35\15I\310\\.\36\15I\310`0\40\15" - "I\310d2!\15I\310h4\"\15I\310l6$\15I\310p8%\15I\310t:&\15I\310x<(\15I\310" - "|>)\15I\310\200@*\15I\310\204B,\15I\310\210D-\15I\310\214F.\15I\310\220H" - "0\15I\310\224J1\15I\310\230L2\5ii\234N4\15I\310\0\0\0\0\0\0\0\0\0\5ii\0\0" - "\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0" - "\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0" - "\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\15I" - "\310\15I\310\15I\310\15I\310\15I\310\15I\310\15I\310\15I\310\15I\310\15I" - "\310\15I\310\15I\310\15I\310\15I\310\15I\310\15I\310\15I\310\15I\310\15I" - "\310\15I\310\15I\310\15I\310\15I\310\15I\310\15I\310\15I\310\15I\310\15I" - "\310\15I\310\15I\310\15I\310\15I\310\15I\310\15I\310\15I\310\15I\310\5ii" - "\15I\310\15I\310\15I\310\0\0\0\0\0\0\0\0\0\0\0\0\5ii\0\0\0\0\0\0\0\0\0\0" - "\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0" - "\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0" - "\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\15I\310\15I\310\15I\310\15" - "I\310\15I\310\15I\310\15I\310\15I\310\15I\310\15I\310\15I\310\15I\310\15" - "I\310\15I\310\15I\310\15I\310\15I\310\15I\310\15I\310\15I\310\15I\310\15" - "I\310\15I\310\15I\310\15I\310\15I\310\15I\310\15I\310\15I\310\15I\310\15" - "I\310\15I\310\15I\310\15I\310\15I\310\5ii\15I\310\15I\310\15I\310\15I\310" - "\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\5ii\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0" - "\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0" - "\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0" - "\0\0\0\0\0\0\0\0\0\0\0\15I\310\15I\310\15I\310\15I\310\15I\310\15I\310\15" - "I\310\15I\310\15I\310\15I\310\15I\310\15I\310\15I\310\15I\310\15I\310\15" - "I\310\15I\310\15I\310\15I\310\15I\310\15I\310\15I\310\15I\310\15I\310\15" - "I\310\15I\310\15I\310\15I\310\15I\310\15I\310\15I\310\15I\310\15I\310\15" - "I\310\5ii\15I\310\15I\310\15I\310\15I\310\15I\310\0\0\0\0\0\0\0\0\0\0\0\0" - "\0\0\0\0\0\0\5ii\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0" - "\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0" - "\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\15" - "I\310\15I\310\15I\310\15I\310\15I\310\15I\310\15I\310\15I\310\15I\310\15" - "I\310\15I\310\15I\310\15I\310\15I\310\15I\310\15I\310\15I\310\15I\310\15" - "I\310\15I\310\15I\310\15I\310\15I\310\15I\310\15I\310\15I\310\15I\310\15" - "I\310\15I\310\15I\310\15I\310\15I\310\15I\310\5ii\15I\310\15I\310\15I\310" - "\15I\310\15I\310\15I\310\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\5ii\0" - "\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0" - "\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0" - "\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\15I\310\15I\310\15I\310\15" - "I\310\15I\310\15I\310\15I\310\15I\310\15I\310\15I\310\15I\310\15I\310\15" - "I\310\15I\310\15I\310\15I\310\15I\310\15I\310\15I\310\15I\310\15I\310\15" - "I\310\15I\310\15I\310\15I\310\15I\310\15I\310\15I\310\15I\310\15I\310\15" - "I\310\15I\310\5ii\15I\310\15I\310\15I\310\15I\310\15I\310\15I\310\15I\310" - "\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\5ii\0\0\0\0\0\0\0\0\0\0" - "\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0" - "\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0" - "\0\0\0\0\0\0\0\0\0\0\0\15I\310\15I\310\15I\310\15I\310\15I\310\15I\310\15" - "I\310\15I\310\15I\310\15I\310\15I\310\15I\310\15I\310\15I\310\15I\310\15" - "I\310\15I\310\15I\310\15I\310\15I\310\15I\310\15I\310\15I\310\15I\310\15" - "I\310\15I\310\15I\310\15I\310\15I\310\15I\310\15I\310\5ii\15I\310\15I\310" - "\15I\310\15I\310\15I\310\15I\310\15I\310\15I\310\0\0\0\0\0\0\0\0\0\0\0\0" - "\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\5ii\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0" - "\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0" - "\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\15" - "I\310\15I\310\15I\310\15I\310\15I\310\15I\310\15I\310\15I\310\15I\310\15" - "I\310\15I\310\15I\310\15I\310\15I\310\15I\310\15I\310\15I\310\15I\310\15" - "I\310\15I\310\15I\310\15I\310\15I\310\15I\310\15I\310\15I\310\15I\310\15" - "I\310\15I\310\15I\310\5ii\15I\310\15I\310\15I\310\15I\310\15I\310\15I\310" - "\15I\310\15I\310\15I\310\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0" - "\0\0\0\0\0\0\5ii\310\0d\310\0d\310\0d\310\0d\310\0d\310\0d\310\0d\310\0d" - "\310\0d\310\0d\310\0d\310\0d\310\0d\310\0d\310\0d\310\0d\310\0d\310\0d\310" - "\0d\310\0d\310\0d\310\0d\310\0d\310\0d\310\0d\310\0d\310\0d\310\0d\310\0" - "d\310\0d\310\0d\310\0d\310\0d\310\0d\310\0d\310\0d\310\0d\310\0d\310\0d\310" - "\0d\310\0d\310\0d\310\0d\310\0d\310\0d\310\0d\310\0d\310\0d\310\0d\310\0" - "d\310\0d\310\0d\310\0d\310\0d\310\0d\310\0d\310\0d\310\0d\5ii\15I\310\15" - "I\310\15I\310\15I\310\15I\310\15I\310\15I\310\15I\310\15I\310\15I\310\0\0" - "\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\310\0d\5ii\310\0" - "d\310\0d\310\0d\310\0d\310\0d\310\0d\310\0d\310\0d\310\0d\310\0d\310\0d\310" - "\0d\310\0d\310\0d\310\0d\310\0d\310\0d\310\0d\310\0d\310\0d\310\0d\310\0" - "d\310\0d\310\0d\310\0d\310\0d\310\0d\310\0d\310\0d\310\0d\310\0d\310\0d\310" - "\0d\310\0d\310\0d\310\0d\310\0d\310\0d\310\0d\310\0d\310\0d\310\0d\310\0" - "d\310\0d\310\0d\310\0d\310\0d\310\0d\310\0d\310\0d\310\0d\310\0d\310\0d\310" - "\0d\310\0d\310\0d\5ii\310\0d\15I\310\15I\310\15I\310\15I\310\15I\310\15I" - "\310\15I\310\15I\310\15I\310\15I\310\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0" - "\0\0\0\0\0\0\0\0\0\0\0\0\310\0d\310\0d\5ii\310\0d\310\0d\310\0d\310\0d\310" - "\0d\310\0d\310\0d\310\0d\310\0d\310\0d\310\0d\310\0d\310\0d\310\0d\310\0" - "d\310\0d\310\0d\310\0d\310\0d\310\0d\310\0d\310\0d\310\0d\310\0d\310\0d\310" - "\0d\310\0d\310\0d\310\0d\310\0d\310\0d\310\0d\310\0d\310\0d\310\0d\310\0" - "d\310\0d\310\0d\310\0d\310\0d\310\0d\310\0d\310\0d\310\0d\310\0d\310\0d\310" - "\0d\310\0d\310\0d\310\0d\310\0d\310\0d\310\0d\310\0d\5ii\310\0d\310\0d\15" - "I\310\15I\310\15I\310\15I\310\15I\310\15I\310\15I\310\15I\310\15I\310\15" - "I\310\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\310\0d" - "\310\0d\310\0d\5ii\310\0d\310\0d\310\0d\310\0d\310\0d\310\0d\310\0d\310\0" - "d\310\0d\310\0d\310\0d\310\0d\310\0d\310\0d\310\0d\310\0d\310\0d\310\0d\310" - "\0d\310\0d\310\0d\310\0d\310\0d\310\0d\310\0d\310\0d\310\0d\310\0d\310\0" - "d\310\0d\310\0d\310\0d\310\0d\310\0d\310\0d\310\0d\310\0d\310\0d\310\0d\310" - "\0d\310\0d\310\0d\310\0d\310\0d\310\0d\310\0d\310\0d\310\0d\310\0d\310\0" - "d\310\0d\310\0d\5ii\310\0d\310\0d\310\0d\15I\310\15I\310\15I\310\15I\310" - "\15I\310\15I\310\15I\310\15I\310\15I\310\15I\310\0\0\0\0\0\0\0\0\0\0\0\0" - "\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\310\0d\310\0d\310\0d\310\0d\5ii\310" - "\0d\310\0d\310\0d\310\0d\310\0d\310\0d\310\0d\310\0d\310\0d\310\0d\310\0" - "d\310\0d\310\0d\310\0d\310\0d\310\0d\310\0d\310\0d\310\0d\310\0d\310\0d\310" - "\0d\310\0d\310\0d\310\0d\310\0d\310\0d\310\0d\310\0d\310\0d\310\0d\310\0" - "d\310\0d\310\0d\310\0d\310\0d\310\0d\310\0d\310\0d\310\0d\310\0d\310\0d\310" - "\0d\310\0d\310\0d\310\0d\310\0d\310\0d\310\0d\310\0d\5ii\310\0d\310\0d\310" - "\0d\310\0d\15I\310\15I\310\15I\310\15I\310\15I\310\15I\310\15I\310\15I\310" - "\15I\310\15I\310\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0" - "\0\0\310\0d\310\0d\310\0d\310\0d\310\0d\5ii\310\0d\310\0d\310\0d\310\0d\310" - "\0d\310\0d\310\0d\310\0d\310\0d\310\0d\310\0d\310\0d\310\0d\310\0d\310\0" - "d\310\0d\310\0d\310\0d\310\0d\310\0d\310\0d\310\0d\310\0d\310\0d\310\0d\310" - "\0d\310\0d\310\0d\310\0d\310\0d\310\0d\310\0d\310\0d\310\0d\310\0d\310\0" - "d\310\0d\310\0d\310\0d\310\0d\310\0d\310\0d\310\0d\310\0d\310\0d\310\0d\310" - "\0d\310\0d\5ii\310\0d\310\0d\310\0d\310\0d\310\0d\15I\310\15I\310\15I\310" - "\15I\310\15I\310\15I\310\15I\310\15I\310\15I\310\15I\310\0\0\0\0\0\0\0\0" - "\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\310\0d\310\0d\310\0d\310\0d" - "\310\0d\310\0d\5ii\310\0d\310\0d\310\0d\310\0d\310\0d\310\0d\310\0d\310\0" - "d\310\0d\310\0d\310\0d\310\0d\310\0d\310\0d\310\0d\310\0d\310\0d\310\0d\310" - "\0d\310\0d\310\0d\310\0d\310\0d\310\0d\310\0d\310\0d\310\0d\310\0d\310\0" - "d\310\0d\310\0d\310\0d\310\0d\310\0d\310\0d\310\0d\310\0d\310\0d\310\0d\310" - "\0d\310\0d\310\0d\310\0d\310\0d\310\0d\310\0d\5ii\310\0d\310\0d\310\0d\310" - "\0d\310\0d\310\0d\15I\310\15I\310\15I\310\15I\310\15I\310\15I\310\15I\310" - "\15I\310\15I\310\15I\310\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0" - "\0\0\0\0\0\0\310\0d\310\0d\310\0d\310\0d\310\0d\310\0d\310\0d\5ii\310\0d" - "\310\0d\310\0d\310\0d\310\0d\310\0d\310\0d\310\0d\310\0d\310\0d\310\0d\310" - "\0d\310\0d\310\0d\310\0d\310\0d\310\0d\310\0d\310\0d\310\0d\310\0d\310\0" - "d\310\0d\310\0d\310\0d\310\0d\310\0d\310\0d\310\0d\310\0d\310\0d\310\0d\310" - "\0d\310\0d\310\0d\310\0d\310\0d\310\0d\310\0d\310\0d\310\0d\310\0d\310\0" - "d\310\0d\5ii\310\0d\310\0d\310\0d\310\0d\310\0d\310\0d\310\0d\15I\310\15" - "I\310\15I\310\15I\310\15I\310\15I\310\15I\310\15I\310\15I\310\15I\310\0\0" - "\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\310\0d\310\0d\310" - "\0d\310\0d\310\0d\310\0d\310\0d\310\0d\5ii\310\0d\310\0d\310\0d\310\0d\310" - "\0d\310\0d\310\0d\310\0d\310\0d\310\0d\310\0d\310\0d\310\0d\310\0d\310\0" - "d\310\0d\310\0d\310\0d\310\0d\310\0d\310\0d\310\0d\310\0d\310\0d\310\0d\310" - "\0d\310\0d\310\0d\310\0d\310\0d\310\0d\310\0d\310\0d\310\0d\310\0d\310\0" - "d\310\0d\310\0d\310\0d\310\0d\310\0d\310\0d\5ii\310\0d\310\0d\310\0d\310" - "\0d\310\0d\310\0d\310\0d\310\0d\15I\310\15I\310\15I\310\15I\310\15I\310\15" - "I\310\15I\310\15I\310\15I\310\15I\310\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0" - "\0\0\0\0\0\0\0\0\0\0\0\0\310\0d\310\0d\310\0d\310\0d\310\0d\310\0d\310\0" - "d\310\0d\310\0d\5ii\310\0d\310\0d\310\0d\310\0d\310\0d\310\0d\310\0d\310" - "\0d\310\0d\310\0d\310\0d\310\0d\310\0d\310\0d\310\0d\310\0d\310\0d\310\0" - "d\310\0d\310\0d\310\0d\310\0d\310\0d\310\0d\310\0d\310\0d\310\0d\310\0d\310" - "\0d\310\0d\310\0d\310\0d\310\0d\310\0d\310\0d\310\0d\310\0d\310\0d\310\0" - "d\310\0d\5ii\310\0d\310\0d\310\0d\310\0d\310\0d\310\0d\310\0d\310\0d\310" - "\0d\15I\310\15I\310\15I\310\15I\310\15I\310\15I\310\15I\310\15I\310\15I\310" - "\15I\310\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\310" - "\0d\310\0d\310\0d\310\0d\310\0d\310\0d\310\0d\310\0d\310\0d\310\0d\5ii\310" - "\0d\310\0d\310\0d\310\0d\310\0d\310\0d\310\0d\310\0d\310\0d\310\0d\310\0" - "d\310\0d\310\0d\310\0d\310\0d\310\0d\310\0d\310\0d\310\0d\310\0d\310\0d\310" - "\0d\310\0d\310\0d\310\0d\310\0d\310\0d\310\0d\310\0d\310\0d\310\0d\310\0" - "d\310\0d\310\0d\310\0d\310\0d\310\0d\310\0d\5ii\310\0d\310\0d\310\0d\310" - "\0d\310\0d\310\0d\310\0d\310\0d\310\0d\310\0d\15I\310\15I\310\15I\310\15" - "I\310\15I\310\15I\310\15I\310\15I\310\15I\310\15I\310\0\0\0\0\0\0\0\0\0\0" - "\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\310\0d\310\0d\310\0d\310\0d\310" - "\0d\310\0d\310\0d\310\0d\310\0d\310\0d\310\0d\5ii\310\0d\310\0d\310\0d\310" - "\0d\310\0d\310\0d\310\0d\310\0d\310\0d\310\0d\310\0d\310\0d\310\0d\310\0" - "d\310\0d\310\0d\310\0d\310\0d\310\0d\310\0d\310\0d\310\0d\310\0d\310\0d\310" - "\0d\310\0d\310\0d\310\0d\310\0d\310\0d\310\0d\310\0d\310\0d\310\0d\310\0" - "d\310\0d\5ii\310\0d\310\0d\310\0d\310\0d\310\0d\310\0d\310\0d\310\0d\310" - "\0d\310\0d\310\0d\15I\310\15I\310\15I\310\15I\310\15I\310\15I\310\15I\310" - "\15I\310\15I\310\15I\310\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0" - "\0\0\0\0\0\0\310\0d\310\0d\310\0d\310\0d\310\0d\310\0d\310\0d\310\0d\310" - "\0d\310\0d\310\0d\310\0d\5ii\310\0d\310\0d\310\0d\310\0d\310\0d\310\0d\310" - "\0d\310\0d\310\0d\310\0d\310\0d\310\0d\310\0d\310\0d\310\0d\310\0d\310\0" - "d\310\0d\310\0d\310\0d\310\0d\310\0d\310\0d\310\0d\310\0d\310\0d\310\0d\310" - "\0d\310\0d\310\0d\310\0d\310\0d\310\0d\310\0d\5ii\310\0d\310\0d\310\0d\310" - "\0d\310\0d\310\0d\310\0d\310\0d\310\0d\310\0d\310\0d\310\0d\15I\310\15I\310" - "\15I\310\15I\310\15I\310\15I\310\15I\310\15I\310\15I\310\15I\310\0\0\0\0" - "\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\310\0d\310\0d\310\0" - "d\310\0d\310\0d\310\0d\310\0d\310\0d\310\0d\310\0d\310\0d\310\0d\310\0d\5" - "ii\310\0d\310\0d\310\0d\310\0d\310\0d\310\0d\310\0d\310\0d\310\0d\310\0d" - "\310\0d\310\0d\310\0d\310\0d\310\0d\310\0d\310\0d\310\0d\310\0d\310\0d\310" - "\0d\310\0d\310\0d\310\0d\310\0d\310\0d\310\0d\310\0d\310\0d\310\0d\310\0" - "d\310\0d\5ii\310\0d\310\0d\310\0d\310\0d\310\0d\310\0d\310\0d\310\0d\310" - "\0d\310\0d\310\0d\310\0d\310\0d\15I\310\15I\310\15I\310\15I\310\15I\310\15" - "I\310\15I\310\15I\310\15I\310\15I\310\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0" - "\0\0\0\0\0\0\0\0\0\0\0\0\310\0d\310\0d\310\0d\310\0d\310\0d\310\0d\310\0" - "d\310\0d\310\0d\310\0d\310\0d\310\0d\310\0d\310\0d\5ii\310\0d\310\0d\310" - "\0d\310\0d\310\0d\310\0d\310\0d\310\0d\310\0d\310\0d\310\0d\310\0d\310\0" - "d\310\0d\310\0d\310\0d\310\0d\310\0d\310\0d\310\0d\310\0d\310\0d\310\0d\310" - "\0d\310\0d\310\0d\310\0d\310\0d\310\0d\310\0d\5ii\310\0d\310\0d\310\0d\310" - "\0d\310\0d\310\0d\310\0d\310\0d\310\0d\310\0d\310\0d\310\0d\310\0d\310\0" - "d\15I\310\15I\310\15I\310\15I\310\15I\310\15I\310\15I\310\15I\310\15I\310" - "\15I\310\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\310" - "\0d\310\0d\310\0d\310\0d\310\0d\310\0d\310\0d\310\0d\310\0d\310\0d\310\0" - "d\310\0d\310\0d\310\0d\310\0d\5ii\310\0d\310\0d\310\0d\310\0d\310\0d\310" - "\0d\310\0d\310\0d\310\0d\310\0d\310\0d\310\0d\310\0d\310\0d\310\0d\310\0" - "d\310\0d\310\0d\310\0d\310\0d\310\0d\310\0d\310\0d\310\0d\310\0d\310\0d\310" - "\0d\310\0d\5ii\310\0d\310\0d\310\0d\310\0d\310\0d\310\0d\310\0d\310\0d\310" - "\0d\310\0d\310\0d\310\0d\310\0d\310\0d\310\0d\15I\310\15I\310\15I\310\15" - "I\310\15I\310\15I\310\15I\310\15I\310\15I\310\15I\310\0\0\0\0\0\0\0\0\0\0" - "\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\310\0d\310\0d\310\0d\310\0d\310" - "\0d\310\0d\310\0d\310\0d\310\0d\310\0d\310\0d\310\0d\310\0d\310\0d\310\0" - "d\310\0d\5ii\310\0d\310\0d\310\0d\310\0d\310\0d\310\0d\310\0d\310\0d\310" - "\0d\310\0d\310\0d\310\0d\310\0d\310\0d\310\0d\310\0d\310\0d\310\0d\310\0" - "d\310\0d\310\0d\310\0d\310\0d\310\0d\310\0d\310\0d\5ii\310\0d\310\0d\310" - "\0d\310\0d\310\0d\310\0d\310\0d\310\0d\310\0d\310\0d\310\0d\310\0d\310\0" - "d\310\0d\310\0d\310\0d\15I\310\15I\310\15I\310\15I\310\15I\310\15I\310\15" - "I\310\15I\310\15I\310\15I\310\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0" - "\0\0\0\0\0\0\0\0\310\0d\310\0d\310\0d\310\0d\310\0d\310\0d\310\0d\310\0d" - "\310\0d\310\0d\310\0d\310\0d\310\0d\310\0d\310\0d\310\0d\310\0d\5ii\310\0" - "d\310\0d\310\0d\310\0d\310\0d\310\0d\310\0d\310\0d\310\0d\310\0d\310\0d\310" - "\0d\310\0d\310\0d\310\0d\310\0d\310\0d\310\0d\310\0d\310\0d\310\0d\310\0" - "d\310\0d\310\0d\5ii\310\0d\310\0d\310\0d\310\0d\310\0d\310\0d\310\0d\310" - "\0d\310\0d\310\0d\310\0d\310\0d\310\0d\310\0d\310\0d\310\0d\310\0d\15I\310" - "\15I\310\15I\310\15I\310\15I\310\15I\310\15I\310\15I\310\15I\310\15I\310" - "\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\310\0d\310\0" - "d\310\0d\310\0d\310\0d\310\0d\310\0d\310\0d\310\0d\310\0d\310\0d\310\0d\310" - "\0d\310\0d\310\0d\310\0d\310\0d\310\0d\5ii\310\0d\310\0d\310\0d\310\0d\310" - "\0d\310\0d\310\0d\310\0d\310\0d\310\0d\310\0d\310\0d\310\0d\310\0d\310\0" - "d\310\0d\310\0d\310\0d\310\0d\310\0d\310\0d\310\0d\5ii\310\0d\310\0d\310" - "\0d\310\0d\310\0d\310\0d\310\0d\310\0d\310\0d\310\0d\310\0d\310\0d\310\0" - "d\310\0d\310\0d\310\0d\310\0d\310\0d\15I\310\15I\310\15I\310\15I\310\15I" - "\310\15I\310\15I\310\15I\310\15I\310\15I\310\0\0\0\0\0\0\0\0\0\0\0\0\0\0" - "\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\310\0d\310\0d\310\0d\310\0d\310\0d\310\0" - "d\310\0d\310\0d\310\0d\310\0d\310\0d\310\0d\310\0d\310\0d\310\0d\310\0d\310" - "\0d\310\0d\310\0d\5ii\310\0d\310\0d\310\0d\310\0d\310\0d\310\0d\310\0d\310" - "\0d\310\0d\310\0d\310\0d\310\0d\310\0d\310\0d\310\0d\310\0d\310\0d\310\0" - "d\310\0d\310\0d\5ii\310\0d\310\0d\310\0d\310\0d\310\0d\310\0d\310\0d\310" - "\0d\310\0d\310\0d\310\0d\310\0d\310\0d\310\0d\310\0d\310\0d\310\0d\310\0" - "d\310\0d\15I\310\15I\310\15I\310\15I\310\15I\310\15I\310\15I\310\15I\310" - "\15I\310\15I\310\0\377\0\0\377\0\0\377\0\0\377\0\0\377\0\0\377\0\0\377\0" - "\0\377\0\0\377\0\0\377\0\0\377\0\0\377\0\0\377\0\0\377\0\0\377\0\0\377\0" - "\0\377\0\0\377\0\0\377\0\0\377\0\0\377\0\0\377\0\0\377\0\0\377\0\0\377\0" - "\0\377\0\0\377\0\0\377\0\0\377\0\5ii\0\377\0\0\377\0\0\377\0\0\377\0\0\377" - "\0\0\377\0\0\377\0\0\377\0\0\377\0\0\377\0""77\5\0\377\0\0\377\0\0\377\0" - "\0\377\0\0\377\0\0\377\0\0\377\0\0\377\0\0\377\0\5ii\0\377\0\0\377\0\0\377" - "\0\0\377\0\0\377\0\0\377\0\0\377\0\0\377\0\0\377\0\0\377\0\0\377\0\0\377" - "\0\0\377\0\0\377\0\0\377\0\0\377\0\0\377\0\0\377\0\0\377\0\0\377\0\0\377" - "\0\0\377\0\0\377\0\0\377\0\0\377\0\0\377\0\0\377\0\0\377\0\0\377\0\0\0\0" - "\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\310\0d\310\0d\310" - "\0d\310\0d\310\0d\310\0d\310\0d\310\0d\310\0d\310\0d\310\0d\310\0d\310\0" - "d\310\0d\310\0d\310\0d\310\0d\310\0d\5ii\310\0d\310\0d\310\0d\310\0d\310" - "\0d\310\0d\310\0d\310\0d\310\0d\310\0d\310\0d77\5\310\0d\310\0d\310\0d\310" - "\0d\310\0d\310\0d\310\0d\310\0d\310\0d\310\0d\5ii\310\0d\310\0d\310\0d\310" - "\0d\310\0d\310\0d\310\0d\310\0d\310\0d\310\0d\310\0d\310\0d\310\0d\310\0" - "d\310\0d\310\0d\310\0d\310\0d\15I\310\15I\310\15I\310\15I\310\15I\310\15" - "I\310\15I\310\15I\310\15I\310\15I\310\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0" - "\0\0\0\0\0\0\0\0\0\0\0\0\310\0d\310\0d\310\0d\310\0d\310\0d\310\0d\310\0" - "d\310\0d\310\0d\310\0d\310\0d\310\0d\310\0d\310\0d\310\0d\310\0d\310\0d\5" - "ii\310\0d\310\0d\310\0d\310\0d\310\0d\310\0d\310\0d\310\0d\310\0d\310\0d" - "\310\0d\310\0d77\5\310\0d\310\0d\310\0d\310\0d\310\0d\310\0d\310\0d\310\0" - "d\310\0d\310\0d\310\0d\5ii\310\0d\310\0d\310\0d\310\0d\310\0d\310\0d\310" - "\0d\310\0d\310\0d\310\0d\310\0d\310\0d\310\0d\310\0d\310\0d\310\0d\310\0" - "d\15I\310\15I\310\15I\310\15I\310\15I\310\15I\310\15I\310\15I\310\15I\310" - "\15I\310\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\310" - "\0d\310\0d\310\0d\310\0d\310\0d\310\0d\310\0d\310\0d\310\0d\310\0d\310\0" - "d\310\0d\310\0d\310\0d\310\0d\310\0d\5ii\310\0d\310\0d\310\0d\310\0d\310" - "\0d\310\0d\310\0d\310\0d\310\0d\310\0d\310\0d\310\0d\310\0d77\5\310\0d\310" - "\0d\310\0d\310\0d\310\0d\310\0d\310\0d\310\0d\310\0d\310\0d\310\0d\310\0" - "d\5ii\310\0d\310\0d\310\0d\310\0d\310\0d\310\0d\310\0d\310\0d\310\0d\310" - "\0d\310\0d\310\0d\310\0d\310\0d\310\0d\310\0d\15I\310\15I\310\15I\310\15" - "I\310\15I\310\15I\310\15I\310\15I\310\15I\310\15I\310\0\0\0\0\0\0\0\0\0\0" - "\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\310\0d\310\0d\310\0d\310\0d\310" - "\0d\310\0d\310\0d\310\0d\310\0d\310\0d\310\0d\310\0d\310\0d\310\0d\310\0" - "d\5ii\310\0d\310\0d\310\0d\310\0d\310\0d\310\0d\310\0d\310\0d\310\0d\310" - "\0d\310\0d\310\0d\310\0d\310\0d77\5\310\0d\310\0d\310\0d\310\0d\310\0d\310" - "\0d\310\0d\310\0d\310\0d\310\0d\310\0d\310\0d\310\0d\5ii\310\0d\310\0d\310" - "\0d\310\0d\310\0d\310\0d\310\0d\310\0d\310\0d\310\0d\310\0d\310\0d\310\0" - "d\310\0d\310\0d\15I\310\15I\310\15I\310\15I\310\15I\310\15I\310\15I\310\15" - "I\310\15I\310\15I\310\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0" - "\0\0\0\0\310\0d\310\0d\310\0d\310\0d\310\0d\310\0d\310\0d\310\0d\310\0d\310" - "\0d\310\0d\310\0d\310\0d\310\0d\5ii\310\0d\310\0d\310\0d\310\0d\310\0d\310" - "\0d\310\0d\310\0d\310\0d\310\0d\310\0d\310\0d\310\0d\310\0d\310\0d77\5\310" - "\0d\310\0d\310\0d\310\0d\310\0d\310\0d\310\0d\310\0d\310\0d\310\0d\310\0" - "d\310\0d\310\0d\310\0d\5ii\310\0d\310\0d\310\0d\310\0d\310\0d\310\0d\310" - "\0d\310\0d\310\0d\310\0d\310\0d\310\0d\310\0d\310\0d\15I\310\15I\310\15I" - "\310\15I\310\15I\310\15I\310\15I\310\15I\310\15I\310\15I\310\0\0\0\0\0\0" - "\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\310\0d\310\0d\310\0d\310" - "\0d\310\0d\310\0d\310\0d\310\0d\310\0d\310\0d\310\0d\310\0d\310\0d\5ii\310" - "\0d\310\0d\310\0d\310\0d\310\0d\310\0d\310\0d\310\0d\310\0d\310\0d\310\0" - "d\310\0d\310\0d\310\0d\310\0d\310\0d77\5\310\0d\310\0d\310\0d\310\0d\310" - "\0d\310\0d\310\0d\310\0d\310\0d\310\0d\310\0d\310\0d\310\0d\310\0d\310\0" - "d\5ii\310\0d\310\0d\310\0d\310\0d\310\0d\310\0d\310\0d\310\0d\310\0d\310" - "\0d\310\0d\310\0d\310\0d\15I\310\15I\310\15I\310\15I\310\15I\310\15I\310" - "\15I\310\15I\310\15I\310\15I\310\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0" - "\0\0\0\0\0\0\0\0\0\0\310\0d\310\0d\310\0d\310\0d\310\0d\310\0d\310\0d\310" - "\0d\310\0d\310\0d\310\0d\310\0d\5ii\310\0d\310\0d\310\0d\310\0d\310\0d\310" - "\0d\310\0d\310\0d\310\0d\310\0d\310\0d\310\0d\310\0d\310\0d\310\0d\310\0" - "d\310\0d77\5\310\0d\310\0d\310\0d\310\0d\310\0d\310\0d\310\0d\310\0d\310" - "\0d\310\0d\310\0d\310\0d\310\0d\310\0d\310\0d\310\0d\5ii\310\0d\310\0d\310" - "\0d\310\0d\310\0d\310\0d\310\0d\310\0d\310\0d\310\0d\310\0d\310\0d\15I\310" - "\15I\310\15I\310\15I\310\15I\310\15I\310\15I\310\15I\310\15I\310\15I\310" - "\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\310\0d\310\0" - "d\310\0d\310\0d\310\0d\310\0d\310\0d\310\0d\310\0d\310\0d\310\0d\5ii\310" - "\0d\310\0d\310\0d\310\0d\310\0d\310\0d\310\0d\310\0d\310\0d\310\0d\310\0" - "d\310\0d\310\0d\310\0d\310\0d\310\0d\310\0d\310\0d77\5\310\0d\310\0d\310" - "\0d\310\0d\310\0d\310\0d\310\0d\310\0d\310\0d\310\0d\310\0d\310\0d\310\0" - "d\310\0d\310\0d\310\0d\310\0d\5ii\310\0d\310\0d\310\0d\310\0d\310\0d\310" - "\0d\310\0d\310\0d\310\0d\310\0d\310\0d\15I\310\15I\310\15I\310\15I\310\15" - "I\310\15I\310\15I\310\15I\310\15I\310\15I\310\0\0\0\0\0\0\0\0\0\0\0\0\0\0" - "\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\310\0d\310\0d\310\0d\310\0d\310\0d\310\0" - "d\310\0d\310\0d\310\0d\310\0d\5ii\310\0d\310\0d\310\0d\310\0d\310\0d\310" - "\0d\310\0d\310\0d\310\0d\310\0d\310\0d\310\0d\310\0d\310\0d\310\0d\310\0" - "d\310\0d\310\0d\310\0d77\5\310\0d\310\0d\310\0d\310\0d\310\0d\310\0d\310" - "\0d\310\0d\310\0d\310\0d\310\0d\310\0d\310\0d\310\0d\310\0d\310\0d\310\0" - "d\310\0d\5ii\310\0d\310\0d\310\0d\310\0d\310\0d\310\0d\310\0d\310\0d\310" - "\0d\310\0d\15I\310\15I\310\15I\310\15I\310\15I\310\15I\310\15I\310\15I\310" - "\15I\310\15I\310\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0" - "\0\0\310\0d\310\0d\310\0d\310\0d\310\0d\310\0d\310\0d\310\0d\310\0d\5ii\310" - "\0d\310\0d\310\0d\310\0d\310\0d\310\0d\310\0d\310\0d\310\0d\310\0d\310\0" - "d\310\0d\310\0d\310\0d\310\0d\310\0d\310\0d\310\0d\310\0d\310\0d77\5\310" - "\0d\310\0d\310\0d\310\0d\310\0d\310\0d\310\0d\310\0d\310\0d\310\0d\310\0" - "d\310\0d\310\0d\310\0d\310\0d\310\0d\310\0d\310\0d\310\0d\5ii\310\0d\310" - "\0d\310\0d\310\0d\310\0d\310\0d\310\0d\310\0d\310\0d\15I\310\15I\310\15I" - "\310\15I\310\15I\310\15I\310\15I\310\15I\310\15I\310\15I\310\0\0\0\0\0\0" - "\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\310\0d\310\0d\310\0d\310" - "\0d\310\0d\310\0d\310\0d\310\0d\5ii\310\0d\310\0d\310\0d\310\0d\310\0d\310" - "\0d\310\0d\310\0d\310\0d\310\0d\310\0d\310\0d\310\0d\310\0d\310\0d\310\0" - "d\310\0d\310\0d\310\0d\310\0d\310\0d77\5\310\0d\310\0d\310\0d\310\0d\310" - "\0d\310\0d\310\0d\310\0d\310\0d\310\0d\310\0d\310\0d\310\0d\310\0d\310\0" - "d\310\0d\310\0d\310\0d\310\0d\310\0d\5ii\310\0d\310\0d\310\0d\310\0d\310" - "\0d\310\0d\310\0d\310\0d\15I\310\15I\310\15I\310\15I\310\15I\310\15I\310" - "\15I\310\15I\310\15I\310\15I\310\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0" - "\0\0\0\0\0\0\0\0\0\0\310\0d\310\0d\310\0d\310\0d\310\0d\310\0d\310\0d\5i" - "i\310\0d\310\0d\310\0d\310\0d\310\0d\310\0d\310\0d\310\0d\310\0d\310\0d\310" - "\0d\310\0d\310\0d\310\0d\310\0d\310\0d\310\0d\310\0d\310\0d\310\0d\310\0" - "d\310\0d77\5\310\0d\310\0d\310\0d\310\0d\310\0d\310\0d\310\0d\310\0d\310" - "\0d\310\0d\310\0d\310\0d\310\0d\310\0d\310\0d\310\0d\310\0d\310\0d\310\0" - "d\310\0d\310\0d\5ii\310\0d\310\0d\310\0d\310\0d\310\0d\310\0d\310\0d\15I" - "\310\15I\310\15I\310\15I\310\15I\310\15I\310\15I\310\15I\310\15I\310\15I" - "\310\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\310\0d\310" - "\0d\310\0d\310\0d\310\0d\310\0d\5ii\310\0d\310\0d\310\0d\310\0d\310\0d\310" - "\0d\310\0d\310\0d\310\0d\310\0d\310\0d\310\0d\310\0d\310\0d\310\0d\310\0" - "d\310\0d\310\0d\310\0d\310\0d\310\0d\310\0d\310\0d77\5\310\0d\310\0d\310" - "\0d\310\0d\310\0d\310\0d\310\0d\310\0d\310\0d\310\0d\310\0d\310\0d\310\0" - "d\310\0d\310\0d\310\0d\310\0d\310\0d\310\0d\310\0d\310\0d\310\0d\5ii\310" - "\0d\310\0d\310\0d\310\0d\310\0d\310\0d\15I\310\15I\310\15I\310\15I\310\15" - "I\310\15I\310\15I\310\15I\310\15I\310\15I\310\0\0\0\0\0\0\0\0\0\0\0\0\0\0" - "\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\310\0d\310\0d\310\0d\310\0d\310\0d\5ii\310" - "\0d\310\0d\310\0d\310\0d\310\0d\310\0d\310\0d\310\0d\310\0d\310\0d\310\0" - "d\310\0d\310\0d\310\0d\310\0d\310\0d\310\0d\310\0d\310\0d\310\0d\310\0d\310" - "\0d\310\0d\310\0d77\5\310\0d\310\0d\310\0d\310\0d\310\0d\310\0d\310\0d\310" - "\0d\310\0d\310\0d\310\0d\310\0d\310\0d\310\0d\310\0d\310\0d\310\0d\310\0" - "d\310\0d\310\0d\310\0d\310\0d\310\0d\5ii\310\0d\310\0d\310\0d\310\0d\310" - "\0d\15I\310\15I\310\15I\310\15I\310\15I\310\15I\310\15I\310\15I\310\15I\310" - "\15I\310\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\310" - "\0d\310\0d\310\0d\310\0d\5ii\310\0d\310\0d\310\0d\310\0d\310\0d\310\0d\310" - "\0d\310\0d\310\0d\310\0d\310\0d\310\0d\310\0d\310\0d\310\0d\310\0d\310\0" - "d\310\0d\310\0d\310\0d\310\0d\310\0d\310\0d\310\0d\310\0d77\5\310\0d\310" - "\0d\310\0d\310\0d\310\0d\310\0d\310\0d\310\0d\310\0d\310\0d\310\0d\310\0" - "d\310\0d\310\0d\310\0d\310\0d\310\0d\310\0d\310\0d\310\0d\310\0d\310\0d\310" - "\0d\310\0d\5ii\310\0d\310\0d\310\0d\310\0d\15I\310\15I\310\15I\310\15I\310" - "\15I\310\15I\310\15I\310\15I\310\15I\310\15I\310\0\0\0\0\0\0\0\0\0\0\0\0" - "\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\310\0d\310\0d\310\0d\5ii\310\0d\310" - "\0d\310\0d\310\0d\310\0d\310\0d\310\0d\310\0d\310\0d\310\0d\310\0d\310\0" - "d\310\0d\310\0d\310\0d\310\0d\310\0d\310\0d\310\0d\310\0d\310\0d\310\0d\310" - "\0d\310\0d\310\0d\310\0d77\5\310\0d\310\0d\310\0d\310\0d\310\0d\310\0d\310" - "\0d\310\0d\310\0d\310\0d\310\0d\310\0d\310\0d\310\0d\310\0d\310\0d\310\0" - "d\310\0d\310\0d\310\0d\310\0d\310\0d\310\0d\310\0d\310\0d\5ii\310\0d\310" - "\0d\310\0d\15I\310\15I\310\15I\310\15I\310\15I\310\15I\310\15I\310\15I\310" - "\15I\310\15I\310\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0" - "\0\0\310\0d\310\0d\5ii\310\0d\310\0d\310\0d\310\0d\310\0d\310\0d\310\0d\310" - "\0d\310\0d\310\0d\310\0d\310\0d\310\0d\310\0d\310\0d\310\0d\310\0d\310\0" - "d\310\0d\310\0d\310\0d\310\0d\310\0d\310\0d\310\0d\310\0d\310\0d77\5\310" - "\0d\310\0d\310\0d\310\0d\310\0d\310\0d\310\0d\310\0d\310\0d\310\0d\310\0" - "d\310\0d\310\0d\310\0d\310\0d\310\0d\310\0d\310\0d\310\0d\310\0d\310\0d\310" - "\0d\310\0d\310\0d\310\0d\310\0d\5ii\310\0d\310\0d\15I\310\15I\310\15I\310" - "\15I\310\15I\310\15I\310\15I\310\15I\310\15I\310\15I\310\0\0\0\0\0\0\0\0" - "\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\310\0d\5ii\310\0d\310\0d\310" - "\0d\310\0d\310\0d\310\0d\310\0d\310\0d\310\0d\310\0d\310\0d\310\0d\310\0" - "d\310\0d\310\0d\310\0d\310\0d\310\0d\310\0d\310\0d\310\0d\310\0d\310\0d\310" - "\0d\310\0d\310\0d\310\0d\310\0d77\5\310\0d\310\0d\310\0d\310\0d\310\0d\310" - "\0d\310\0d\310\0d\310\0d\310\0d\310\0d\310\0d\310\0d\310\0d\310\0d\310\0" - "d\310\0d\310\0d\310\0d\310\0d\310\0d\310\0d\310\0d\310\0d\310\0d\310\0d\310" - "\0d\5ii\310\0d\15I\310\15I\310\15I\310\15I\310\15I\310\15I\310\15I\310\15" - "I\310\15I\310\15I\310\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0" - "\0\0\0\0\5ii\310\0d\310\0d\310\0d\310\0d\310\0d\310\0d\310\0d\310\0d\310" - "\0d\310\0d\310\0d\310\0d\310\0d\310\0d\310\0d\310\0d\310\0d\310\0d\310\0" - "d\310\0d\310\0d\310\0d\310\0d\310\0d\310\0d\310\0d\310\0d\310\0d\310\0d7" - "7\5\310\0d\310\0d\310\0d\310\0d\310\0d\310\0d\310\0d\310\0d\310\0d\310\0" - "d\310\0d\310\0d\310\0d\310\0d\310\0d\310\0d\310\0d\310\0d\310\0d\310\0d\310" - "\0d\310\0d\310\0d\310\0d\310\0d\310\0d\310\0d\310\0d\5ii\15I\310\15I\310" - "\15I\310\15I\310\15I\310\15I\310\15I\310\15I\310\15I\310\15I\310\0\0\0\0" - "\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\5ii\0\0\0\0\0\0\0\0\0\0\0" - "\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0" - "\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0" - "\0\0\0\0\0\0\0""77\5\15I\310\15I\310\15I\310\15I\310\15I\310\15I\310\15I" - "\310\15I\310\15I\310\15I\310\15I\310\15I\310\15I\310\15I\310\15I\310\15I" - "\310\15I\310\15I\310\15I\310\15I\310\15I\310\15I\310\15I\310\15I\310\15I" - "\310\15I\310\15I\310\15I\310\15I\310\5ii\15I\310\15I\310\15I\310\15I\310" - "\15I\310\15I\310\15I\310\15I\310\15I\310\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0" - "\0\0\0\0\0\0\0\0\5ii\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0" - "\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0" - "\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0""77\5\15I" - "\310\15I\310\15I\310\15I\310\15I\310\15I\310\15I\310\15I\310\15I\310\15I" - "\310\15I\310\15I\310\15I\310\15I\310\15I\310\15I\310\15I\310\15I\310\15I" - "\310\15I\310\15I\310\15I\310\15I\310\15I\310\15I\310\15I\310\15I\310\15I" - "\310\15I\310\15I\310\5ii\15I\310\15I\310\15I\310\15I\310\15I\310\15I\310" - "\15I\310\15I\310\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\5ii\0\0\0\0\0" - "\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0" - "\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0" - "\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0""77\5\15I\310\15I\310\15I\310\15I" - "\310\15I\310\15I\310\15I\310\15I\310\15I\310\15I\310\15I\310\15I\310\15I" - "\310\15I\310\15I\310\15I\310\15I\310\15I\310\15I\310\15I\310\15I\310\15I" - "\310\15I\310\15I\310\15I\310\15I\310\15I\310\15I\310\15I\310\15I\310\15I" - "\310\5ii\15I\310\15I\310\15I\310\15I\310\15I\310\15I\310\15I\310\0\0\0\0" - "\0\0\0\0\0\0\0\0\0\0\0\0\0\0\5ii\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0" - "\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0" - "\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0" - "\0\0\0\0\0\0\0""77\5\15I\310\15I\310\15I\310\15I\310\15I\310\15I\310\15I" - "\310\15I\310\15I\310\15I\310\15I\310\15I\310\15I\310\15I\310\15I\310\15I" - "\310\15I\310\15I\310\15I\310\15I\310\15I\310\15I\310\15I\310\15I\310\15I" - "\310\15I\310\15I\310\15I\310\15I\310\15I\310\15I\310\15I\310\5ii\15I\310" - "\15I\310\15I\310\15I\310\15I\310\15I\310\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\5" - "ii\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0" - "\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0" - "\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0""77\5\15I" - "\310\15I\310\15I\310\15I\310\15I\310\15I\310\15I\310\15I\310\15I\310\15I" - "\310\15I\310\15I\310\15I\310\15I\310\15I\310\15I\310\15I\310\15I\310\15I" - "\310\15I\310\15I\310\15I\310\15I\310\15I\310\15I\310\15I\310\15I\310\15I" - "\310\15I\310\15I\310\15I\310\15I\310\15I\310\5ii\15I\310\15I\310\15I\310" - "\15I\310\15I\310\0\0\0\0\0\0\0\0\0\0\0\0\5ii\0\0\0\0\0\0\0\0\0\0\0\0\0\0" - "\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0" - "\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0" - "\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0""77\5\15I\310\15I\310\15I\310\15I" - "\310\15I\310\15I\310\15I\310\15I\310\15I\310\15I\310\15I\310\15I\310\15I" - "\310\15I\310\15I\310\15I\310\15I\310\15I\310\15I\310\15I\310\15I\310\15I" - "\310\15I\310\15I\310\15I\310\15I\310\15I\310\15I\310\15I\310\15I\310\15I" - "\310\15I\310\15I\310\15I\310\5ii\15I\310\15I\310\15I\310\15I\310\0\0\0\0" - "\0\0\0\0\0\5ii\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0" - "\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0" - "\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0" - "\0\0\0\0\0\0\0""77\5\15I\310\15I\310\15I\310\15I\310\15I\310\15I\310\15I" - "\310\15I\310\15I\310\15I\310\15I\310\15I\310\15I\310\15I\310\15I\310\15I" - "\310\15I\310\15I\310\15I\310\15I\310\15I\310\15I\310\15I\310\15I\310\15I" - "\310\15I\310\15I\310\15I\310\15I\310\15I\310\15I\310\15I\310\15I\310\15I" - "\310\15I\310\5ii\15I\310\15I\310\15I\310\0\0\0\0\0\0\5ii\0\0\0\0\0\0\0\0" - "\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0" - "\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0" - "\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0""77\5\15I" - "\310\15I\310\15I\310\15I\310\15I\310\15I\310\15I\310\15I\310\15I\310\15I" - "\310\15I\310\15I\310\15I\310\15I\310\15I\310\15I\310\15I\310\15I\310\15I" - "\310\15I\310\15I\310\15I\310\15I\310\15I\310\15I\310\15I\310\15I\310\15I" - "\310\15I\310\15I\310\15I\310\15I\310\15I\310\15I\310\15I\310\15I\310\5ii" - "\15I\310\15I\310\0\0\0\5ii\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0" - "\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0" - "\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0" - "\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0""77\5\15I\310\15I\310\15I\310\15I" - "\310\15I\310\15I\310\15I\310\15I\310\15I\310\15I\310\15I\310\15I\310\15I" - "\310\15I\310\15I\310\15I\310\15I\310\15I\310\15I\310\15I\310\15I\310\15I" - "\310\15I\310\15I\310\15I\310\15I\310\15I\310\15I\310\15I\310\15I\310\15I" - "\310\15I\310\15I\310\15I\310\15I\310\15I\310\15I\310\5ii\15I\310\5ii\0\0" - "\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0" - "\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0" - "\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0" - "\0\0\0\0\0\0\0""77\5\15I\310\15I\310\15I\310\15I\310\15I\310\15I\310\15I" - "\310\15I\310\15I\310\15I\310\15I\310\15I\310\15I\310\15I\310\15I\310\15I" - "\310\15I\310\15I\310\15I\310\15I\310\15I\310\15I\310\15I\310\15I\310\15I" - "\310\15I\310\15I\310\15I\310\15I\310\15I\310\15I\310\15I\310\15I\310\15I" - "\310\15I\310\15I\310\15I\310\15I\310\5ii", -}; - diff --git a/test/test-automation/src/libSDLtest/common/img_primitivesblend.c b/test/test-automation/src/libSDLtest/common/img_primitivesblend.c deleted file mode 100644 index a6f49b358..000000000 --- a/test/test-automation/src/libSDLtest/common/img_primitivesblend.c +++ /dev/null @@ -1,646 +0,0 @@ -/* GIMP RGB C-Source image dump (alpha.c) */ -#include "common.h" - -static const SurfaceImage_t img_blend = { - 80, 60, 3, - "\260e\15\222\356/\37\313\15\36\330\17K\3745D\3471\0\20\0D\3502D\3502<\321" - ",\377\377\377\377\377\377\377\377\377\377\377\377\377\377\377\0-\0\377\377" - "\377\377\377\377\311\324\311\377\377\377\377\377\377\377\377\377\377\377" - "\377\377\377\377\0H\0\377\377\377\377\377\377\256\307\256\377\377\377\377" - "\377\377\377\377\377\377\377\377\377\377\377\0c\0\377\377\377\377\377\377" - "\223\300\223\377\377\377\377\377\377\377\377\377\377\377\377\377\377\377" - "\0~\0\377\377\377\377\377\377x\277x\377\377\377\377\377\377\377\377\377\377" - "\377\377\377\377\377\0\231\0\377\377\377\377\377\377]\303]\377\377\377\377" - "\377\377\377\377\377\377\377\377\377\377\377\0\264\0\377\377\377\377\377" - "\377B\316B\377\377\377\377\377\377\377\377\377\377\377\377\377\377\377\0" - "\317\0\377\377\377\377\377\377'\335'\377\377\377\377\377\377\377\377\377" - "\377\377\377\377\377\377\0\352\0\377\377\377#\262\6\260d\15\260e\15\224\357" - "/&\262\6\34\300\5.\314\22\40\315\12[\3747M\332/\27\331\12\27\331\12K\374" - "5K\3745K\3745D\3471D\3471D\3471D\3471D\3471D\3502D\3502D\3502D\3502D\350" - "2D\3502D\3502D\3502D\3502D\3502\377\377\377\377\377\377\377\377\377\377\377" - "\377\377\377\377\377\377\377\377\377\377\377\377\377\377\377\377\377\377" - "\377\377\377\377\377\377\377\377\377\377\377\377\377\377\377\377\377\377" - "\377\377\377\377\377\377\377\377\377\377\377\377\377\377\377\377\377\377" - "\377\377\377\377\377\377\377\377\377\377\377\377\377\377\377\377\377\377" - "\377\377\377\377\377\377\377\377\377\377\377\377\377\377\377\377\377\377" - "\377\377\377\377\377\377\377\377\377\377\377\377\377\377\377\377\377\377" - "\377\377\377\377\377\377\377\377\377\377\377\377\377\377\377\377\377\377" - "\377\377\377\377\377\377\377\377\377\377\377\377\377,\372\27\273\3465\327" - "Q.\260d\15\213\213\40\241\3601\200\366*=\265\13?\301\25s\375\265\14\177\252+\201\210\16\245\204" - "*\377\314U\312\\,\224'\11\260i\17\244\210\40\232\2211\331\353J\215\2351\377" - "\377\276\200\2521\200\2542\375\377\310u\2661t\2702t\2702\367\377\324\325" - "\355\305h\3021h\3042h\3042\377\377\377\377\377\377\364\377\336\335\364\323" - "\335\364\323\335\364\323\\\3202\\\3202\\\3202\\\3202\\\3202\377\377\377\377" - "\377\377\377\377\377\377\377\377\377\377\377\346\371\342\346\371\342\346" - "\371\342\346\371\342\346\371\342\346\371\342\346\371\342\377\377\377\377" - "\377\377P\3342P\3342P\3342P\3342P\3342P\3342P\3342P\3342\377\377\377\377" - "\377\377\377\377\377\377\377\377\377\377\377\377\377\377\377\377\377\377" - "\377\377\377\377\377\377\377\377\377\377\377\377\377\377\377\377\377\377" - "\377\377\377\377\377\377\377\377\377\377\377\377\377\377\377\377\377\377" - "\377\377\377\377\377\27\331\12Y\316-h\3021\243\370Cg\230\15\230\224\"\245" - "\204*\377\314U\310J\21\327Q.\260b\21\245\2041\370\343N\230\2242\331\353J" - "\214\2402\377\377\276\200\2521\200\2542\375\377\310\317\344\266u\2661t\270" - "2\377\377\377\367\377\324\325\355\305h\3021h\3042h\3042h\3042\377\377\377" - "\377\377\377\364\377\336\335\364\323\335\364\323\335\364\323\335\364\323" - "\\\3202\\\3202\\\3202\\\3202\377\377\377\377\377\377\377\377\377\377\377" - "\377\377\377\377\377\377\377\377\377\377\377\377\377\346\371\342\346\371" - "\342\346\371\342\346\371\342\346\371\342\346\371\342\377\377\377\377\377" - "\377\377\377\377\377\377\377P\3342P\3342P\3342P\3342P\3342P\3342P\3342P\334" - "2\377\377\377\377\377\377\377\377\377\377\377\377\377\377\377\377\377\377" - "\377\377\377\377\377\377\377\377\377\377\377\377\377\377\377\377\377\377" - "\377\377\377K\3745!\315\13d\304,p\270)\177\252+\23\13\6\232\2211\245\204" - "1\347\270O\377\277Y\324<\22\265V\24\377\330Q\244\210\40#(\13\230\224\"\331" - "\353Ju\211.\377\377\276\200\2521\210\273:\200\2542\375\377\310\20""3\6u\266" - "1t\2702\271\307\271\367\377\324\325\355\305\341\377\321h\3021h\3042\16L\7" - "h\3042\377\377\377\242\300\242\377\377\377\335\364\323\355\377\343\335\364" - "\323\335\364\323\14f\7\\\3202\\\3202>\250*\\\3202\377\377\377\377\377\377" - "\377\377\377\377\377\377$\231$\377\377\377\377\377\377s\303s\377\377\377" - "\346\371\342\376\377\372\346\371\342\346\371\342\40\257\37\346\371\342\346" - "\371\342\\\316\\\377\377\377\377\377\377\377\377\377\377\377\377P\3342\13" - "\262\7P\3342P\3342*\327%P\3342P\3342o\377Q\377\377\377\377\377\377$\352$" - "\377\377\377\377\377\377K\3745]\3749s\375<\212\373@\243\370C\274\363G\331" - "\353J\370\343N\377\330Q\377\314U\377\277Y\377\260\\\224(\11\260|\36\245\204" - "1\377\377\250\232\2211\230\224\"\215\2351\214\2402\377\377\276\312\332\250" - "\200\2521\200\2542\377\377\377\317\344\266u\2661t\2702t\2702\377\377\377" - "\377\377\377\325\355\305\325\355\305\325\355\305h\3042h\3042h\3042\377\377" - "\377\377\377\377\377\377\377\377\377\377\335\364\323\335\364\323\335\364" - "\323\335\364\323\335\364\323\\\3202\\\3202\\\3202\\\3202\\\3202\377\377\377" - "\377\377\377\377\377\377\377\377\377\377\377\377\377\377\377\377\377\377" - "\377\377\377\377\377\377\377\377\377\377\377\377\346\371\342\346\371\342" - "\346\371\342\346\371\342\346\371\342\346\371\342\346\371\342\377\377\377" - "\377\377\377\377\377\377\377\377\377\377\377\377\377\377\377P\3342P\3342" - "P\3342P\3342\377\377\377K\3745O\3321\\\3161h\3021t\2702~\254'\214\240%\377" - "\377\262\370\343N\377\330Q\262x1\277l1\312`1\327R.\260X\23\377\330Q\244\210" - "2\377\377\250\230\2242\377\377\262\215\2351\214\2402\377\377\377\312\332" - "\250\200\2521\200\2542\377\377\377\375\377\310\317\344\266u\2661t\2702t\270" - "2\377\377\377\377\377\377\325\355\305\325\355\305\325\355\305h\3042h\304" - "2h\3042h\3042\377\377\377\377\377\377\377\377\377\377\377\377\377\377\377" - "\335\364\323\335\364\323\335\364\323\335\364\323\377\377\377\\\3202\\\320" - "2\\\3202\\\3202\\\3202\377\377\377\377\377\377\377\377\377\377\377\377\377" - "\377\377\377\377\377\377\377\377\377\377\377\377\377\377\377\377\377\377" - "\377\377\377\377\377\377\377\377\346\371\342\346\371\342\346\371\342\346" - "\371\342\346\371\342\346\371\342\377\377\377\377\377\377\377\377\377\377" - "\377\377\377\377\377D\3471O\3321\21\7\11c\304+\367\377\324o\2520\200\252" - "1\214\2402\235\226'\377\377\250\377\330Q!\20\11\277l1\310d2\266?\33\224(" - "\11\260|\36\257\217;\377\377\250\232\2211\34$\11\377\377\262\215\2351q\206" - "0\377\377\377\312\332\250\217\303@\200\2542\200\25420Z0\317\344\266\317\344" - "\266X\2260t\2702t\2702\377\377\377\377\377\377\325\355\305(l%\325\355\305" - "\325\355\305K\2410h\3042h\3042\377\377\377\377\377\377\377\377\3770\2200" - "\377\377\377\377\377\377t\274p\335\364\323\335\364\323\373\377\361\377\377" - "\377\377\377\377\21\213\11\\\3202\\\3202<\274/\\\3202\377\377\377\377\377" - "\377\377\377\377\377\377\3770\3060\377\377\377\377\377\377V\330V\377\377" - "\377\377\377\377\377\377\377\377\377\377\377\377\3770\3410\346\371\342\346" - "\371\342>\352>\346\371\342\377\377\377D\3471P\3342\364\377\352s\375\3369\\\3202\377\377\377\377\377\377\377\377\377\377\377\377D\3502\371\377" - "\364O\3321\\\3202\364\377\336h\3042\367\377\324u\2661\200\2542\377\377\276" - "\215\2351\230\2242\307\300\213\244\2102\377\377\234\262x1\274p2\377\337\207" - "\312`1\324E\30\327T1\260|2\377\377\234\245\2041\244\2102\377\377\250\232" - "\2211\230\2242\377\377\377\310\316\231\215\2351\214\2402\377\377\377\377" - "\377\377\312\332\250\312\332\250\200\2542\200\2542\377\377\377\377\377\377" - "\317\344\266\317\344\266\317\344\266t\2702t\2702t\2702\377\377\377\377\377" - "\377\377\377\377\377\377\377\377\377\377\325\355\305\325\355\305\325\355" - "\305\377\377\377h\3042h\3042h\3042h\3042\377\377\377\377\377\377\377\377" - "\377\377\377\377\377\377\377\377\377\377\377\377\377\377\377\377\377\377" - "\377\335\364\323\335\364\323\335\364\323\335\364\323\377\377\377\377\377" - "\377\377\377\377\377\377\377\\\3202\\\3202\\\3202\377\377\377D\3502\371\377" - "\364O\3321\377\377\377\\\3161h\3042\367\377\324t\2702\375\377\310\200\252" - "1\377\377\377\215\2351\230\2242\377\377\250\244\2102\377\377\234\262x1\274" - "p2\316\214_\310d2\377\310|\327T1\227/\14\377\377\377\307\260|\244\2102\377" - "\377\377\307\300\213\230\2242\230\2242\377\377\377\310\316\231\214\2402\214" - "\2402\377\377\377\377\377\377\312\332\250\312\332\250\200\2542\200\2542\377" - "\377\377\377\377\377\377\377\377\317\344\266\317\344\266\317\344\266t\270" - "2t\2702t\2702\377\377\377\377\377\377\377\377\377\377\377\377\377\377\377" - "\325\355\305\325\355\305\325\355\305\377\377\377\377\377\377h\3042h\3042" - "h\3042\377\377\377\377\377\377\377\377\377\377\377\377\377\377\377\377\377" - "\377\377\377\377\377\377\377\377\377\377\377\377\377\335\364\323\335\364" - "\323\335\364\323\335\364\323\377\377\377\377\377\377\377\377\377\377\377" - "\377D\3502\371\377\364R\3344\364\377\352\\\3161H\22Hh\3021\377\377\377o\244" - "2\200\2542\312\332\250\226\245<\377\377\262\230\2242H-/\245\2041\377\377" - "\377\233i5\274p2\277l1\331sC\377\310|\324X2*\15\3\260|2\377\377\234\206s" - "7\244\2102\377\377\250\340\337\244\230\2242\377\377\377Hc2\310\316\231\214" - "\2402n\211:\377\377\377\377\377\377\353\377\311\312\332\250\200\2542$T\16" - "\377\377\377\377\377\377\236\277\236\377\377\377\317\344\266\367\377\336" - "\377\377\377t\2702\40n\16t\2702\377\377\377\212\303\212\377\377\377\377\377" - "\377\377\377\377\325\355\305\325\355\305<\2477\377\377\377\377\377\377O\276" - "Ah\3042h\3042\237\377i\377\377\377\377\377\377H\317H\377\377\377\377\377" - "\377c\335c\377\377\377\377\377\377\377\377\377\377\377\377\335\364\323>\337" - ";\335\364\323\377\377\377D\3502\362\375\360P\3342\346\371\342\\\3202\364" - "\377\336h\3042\367\377\324t\2702\375\377\310\200\2542\377\377\276\214\240" - "2\377\377\262\232\2211\377\377\377\245\2041\377\377\377\262x1\377\377\377" - "\277l1\310d2\312`1\324X2\327T1\260|2\377\377\377\307\260|\244\2102\377\377" - "\377\307\300\213\232\2211\230\2242\377\377\377\377\377\262\310\316\231\214" - "\2402\214\2402\377\377\377\377\377\377\312\332\250\312\332\250\200\2542\200" - "\2542\200\2542\377\377\377\377\377\377\377\377\377\317\344\266\317\344\266" - "\317\344\266\377\377\377t\2702t\2702t\2702\377\377\377\377\377\377\377\377" - "\377\377\377\377\377\377\377\325\355\305\325\355\305\325\355\305\325\355" - "\305\377\377\377\377\377\377h\3042h\3042h\3042h\3042\377\377\377\377\377" - "\377\377\377\377\377\377\377\377\377\377\377\377\377\377\377\377\377\377" - "\377\377\377\377\377\377\377D\3502\362\375\360P\3342\346\371\342\\\3202\335" - "\364\323h\3042\325\355\305t\2702\317\344\266\377\377\377\200\2521\377\377" - "\377\215\2351\377\377\377\232\2211\377\377\377\245\2041\377\377\377\262x" - "1\377\377\377\277l1\377\377\377\312`1\377\310|\327T1\227/\14\377\377\377" - "\307\260|\244\2102\244\2102\377\377\377\307\300\213\230\2242\230\2242\377" - "\377\377\310\316\231\310\316\231\214\2402\214\2402\377\377\377\377\377\377" - "\312\332\250\312\332\250\377\377\377\200\2542\200\2542\377\377\377\377\377" - "\377\377\377\377\377\377\377\317\344\266\317\344\266\377\377\377\377\377" - "\377t\2702t\2702\377\377\377\377\377\377\377\377\377\377\377\377\377\377" - "\377\377\377\377\377\377\377\325\355\305\325\355\305\325\355\305\377\377" - "\377\377\377\377\377\377\377h\3042h\3042h\3042\377\377\377\377\377\377\377" - "\377\377\377\377\377\377\377\377\377\377\377\377\377\377D\3502\362\375\360" - "T\11TO\3321\377\377\377Z\3002\377\377\377h\3042\377\377\334t\2702\375\377" - "\310*\30\20\312\332\250\214\2402\262\260\214\230\2242\307\300\213\377\377" - "\377\245\2041\377\377\377:\35\20\377\377\377\277l1\316\264w\310d2\377\310" - "|\356qL\227/\14\260|2TZ3\307\260|\244\2102\274\302\274\307\300\213\307\300" - "\213\273\301U\377\377\377\377\377\377A^2\310\316\231\214\2402o\216B\377\377" - "\377\377\377\377\366\377\324\312\332\250\312\332\250*a\20\200\2542\377\377" - "\377\230\301\230\377\377\377\377\377\377\377\377\353\317\344\266\317\344" - "\266T\253Tt\2702t\2702]\265I\377\377\377\377\377\377\377\377\377\377\377" - "\377\377\377\377T\306T\377\377\377\325\355\305l\324i\325\355\305\377\377" - "\377\377\377\377\377\377\377h\3042\"\254\20h\3042h\3042b\353b\377\377\377" - "\377\377\377D\3502\362\375\360\377\377\377O\3321\377\377\377\\\3202\364\377" - "\336h\3042\325\355\305t\2702\317\344\266\377\377\377\200\2521\377\377\377" - "\214\2402\377\377\262\230\2242\307\300\213\244\2102\307\260|\377\377\377" - "\262x1\377\377\377\274p2\377\337\207\310d2\377\310|\324X2\333bB\260|2\377" - "\377\377\307\260|\244\2102\244\2102\377\377\377\307\300\213\232\2211\230" - "\2242\377\377\377\377\377\377\310\316\231\310\316\231\214\2402\214\2402\377" - "\377\377\377\377\377\377\377\377\312\332\250\312\332\250\200\2542\200\254" - "2\200\2542\377\377\377\377\377\377\377\377\377\377\377\377\317\344\266\317" - "\344\266\317\344\266\377\377\377t\2702t\2702t\2702\377\377\377\377\377\377" - "\377\377\377\377\377\377\377\377\377\377\377\377\377\377\377\325\355\305" - "\325\355\305\325\355\305\325\355\305\377\377\377\377\377\377\377\377\377" - "h\3042h\3042\377\377\377\377\377\377D\3471\377\377\377P\3342\364\377\352" - "\\\3202\335\364\323\377\377\377h\3021\377\377\377t\2702\375\377\310\200\254" - "2\312\332\250\377\377\377\215\2351\377\377\377\230\2242\377\377\250\244\210" - "2\307\260|\377\377\377\262x1\377\377\377\274p2\377\337\207\310d2\323xQ\324" - "X2\327T1\227/\14\260|2\377\377\234\307\260|\244\2102\377\377\377\377\377" - "\377\307\300\213\230\2242\230\2242\377\377\377\377\377\377\310\316\231\310" - "\316\231\214\2402\214\2402\377\377\377\377\377\377\377\377\377\312\332\250" - "\312\332\250\377\377\377\200\2542\200\2542\377\377\377\377\377\377\377\377" - "\377\377\377\377\377\377\377\317\344\266\317\344\266\377\377\377\377\377" - "\377t\2702t\2702t\2702\377\377\377\377\377\377\377\377\377\377\377\377\377" - "\377\377\377\377\377\377\377\377\377\377\377\325\355\305\325\355\305\325" - "\355\305\377\377\377\377\377\377`\0`\377\377\377D\3471\371\366\371P\3342" - "\346\371\342\377\377\377\\\3161\377\377\377'\24\22\325\355\305t\2702\276" - "\310\251\377\377\377\200\2542\377\377\316\214\2402\310\316\231`6`\230\224" - "2\377\377\250\222u<\307\260|\377\377\377\315\214L\377\377\377\274p2M,#\310" - "d2\312`1\306\304\306\324X2\333bB\325\242W\377\377\377\307\260|=9\22\244\210" - "2\377\377\377\227\234w\307\300\213\230\2242\307\322a\377\377\377\377\377" - "\377Km9\310\316\231\214\2402r\226K\377\377\377\377\377\377\377\377\377\312" - "\332\250\312\332\250`\242`\200\2542\200\2542\224\306\224\377\377\377\377" - "\377\377\377\377\377\377\377\377\317\344\266M\250D\317\344\266\377\377\377" - "\203\322\203t\2702t\2702\301\377\177\377\377\377\377\377\377`\330`\377\377" - "\377\377\377\377r\344r\377\377\377\377\377\377\377\377\377\325\355\305\377" - "\377\377\377\377\377D\3502\371\377\364P\3342\346\371\342\377\377\377\\\320" - "2\364\377\336h\3042\325\355\305\377\377\377t\2702\317\344\266\200\2542\312" - "\332\250\377\377\377\214\2402\310\316\231\230\2242\307\300\213\377\377\377" - "\244\2102\307\260|\377\377\377\200U0\220^\377\7\4/\227U[\246]\377\255Q1\377" - "\242y\10\3/\306M@\6\4/{^\377mVvmVv\6\5/h\\\377h\\\377\\U\204\12\12\360\5" - "\5/VX\377VX\377\12\12\360LR\221\12\12\360\5\6/\214\2402\377\377\377\377\377" - "\377\377\377\377\312\332\250\312\332\250\377\377\377\200\2542\200\2542\200" - "\2542\377\377\377\377\377\377\377\377\377\377\377\377\377\377\377\317\344" - "\266\317\344\266\317\344\266\377\377\377\377\377\377t\2702t\2702\377\377" - "\377\377\377\377\377\377\377\377\377\377\377\377\377\377\377\377\377\377" - "\377\377\377\377\377\377\377\377\377\377D\3502\362\375\360P\3342\346\371" - "\342\377\377\377\\\3202\335\364\323\377\377\377h\3042\367\377\324t\2702\317" - "\344\266\377\377\377\200\2542\312\332\250\377\377\377\214\2402\377\377\262" - "\230\2242\307\300\213\377\377\377\244\2102\307\260|{^\377\200U0\220^\377" - "\7\4/\227U[\246]\377\7\3/\377\242y\236\37""2\306M0\210%\14T-2{^\377mVv\6" - "\5/\6\5/h\\\377\\U\204\\U\204\5\5/\5\5/VX\377VX\377LR\221LR\221\377\377\377" - "\214\2402\214\2402\377\377\377\377\377\377\377\377\377\312\332\250\312\332" - "\250\312\332\250\377\377\377\200\2542\200\2542\377\377\377\377\377\377\377" - "\377\377\377\377\377\377\377\377\377\377\377\317\344\266\317\344\266\377" - "\377\377\377\377\377t\2702t\2702t\2702\377\377\377\377\377\377\377\377\377" - "\377\377\377\377\377\377\377\377\377\377\377\377D\3502\365\375\363\377\377" - "\377O\3321l\22l\\\3202\335\364\323\357\346\357h\3042\325\355\305\377\377" - "\377t\2702\317\344\266l-l\200\2521\377\377\377\204\211=\310\316\231\377\377" - "\377\262\243L\307\300\213\377\377\377E&\25mVv{^\377ySB\220^\377\7\4/\275" - "t\201\246]\377\7\3/I\37!\277Z\377\10\3/\237YQ\6\4/{^\377\236\213\247mVv\6" - "\5/,-lh\\\377\\U\204dow\5\5/\5\5/\222\251\377VX\377\310\316\231T{@\377\377" - "\377\214\2402w\240V\377\377\377\377\377\377\377\377\377\377\377\377\312\332" - "\250U\231G\377\377\377\200\2542q\270\\\377\377\377\377\377\377\377\377\377" - "\377\377\377\377\377\377l\317l\317\344\266\317\344\266z\330v\377\377\377" - "\377\377\377\323\377\221t\2702t\2702l\352l\377\377\377\377\377\377\377\377" - "\377D\3502\362\375\360\377\377\377P\3342\346\371\342\377\377\377\\\3202\364" - "\377\336h\3042\325\355\305\377\377\377t\2702\317\344\266\377\377\377\200" - "\2542\312\332\250\377\377\377\214\2402\310\316\231\377\377\377\230\2242\307" - "\300\213\377\377\377\6\5/mVv{^\377\200U0\220^\377\7\4/\227U[\246]\377\7\3" - "/\255RN\277Z\377\10\3/\306M@\6\4/{^\377{^\377mVv\6\5/\6\5/h\\\377h\\\377" - "\\U\204\12\12\360\5\5/\12\12\360\377\377\377\377\377\377\310\316\231\310" - "\316\231\377\377\377\214\2402\214\2402\377\377\377\377\377\377\377\377\377" - "\377\377\377\312\332\250\312\332\250\377\377\377\200\2542\200\2542\200\254" - "2\377\377\377\377\377\377\377\377\377\377\377\377\377\377\377\377\377\377" - "\317\344\266\317\344\266\317\344\266\377\377\377\377\377\377t\2702t\2702" - "\377\377\377\377\377\377D\3502\362\375\360\377\377\377P\3342\346\371\342" - "\377\377\377\\\3202\335\364\323\377\377\377h\3042\325\355\305\377\377\377" - "t\2702\317\344\266\377\377\377\200\2542\312\332\250\377\377\377\214\2402" - "\310\316\231\377\377\377\230\2242\307\300\213h\\\377\6\5/mVv{^\377\200U0" - "\220^\377\7\4/\227U[\246]\377\7\3/\255RN\277Z\377\10\3/\306M@\6\4/\6\4/{" - "^\377mVvmVv\6\5/\12\12\360h\\\377\\U\204\\U\204\5\5/\230\2242\377\377\377" - "\377\377\377\377\377\377\310\316\231\310\316\231\377\377\377\214\2402\214" - "\2402\377\377\377\377\377\377\377\377\377\377\377\377\312\332\250\312\332" - "\250\377\377\377\377\377\377\200\2542\200\2542\377\377\377\377\377\377\377" - "\377\377\377\377\377\377\377\377\377\377\377\377\377\377\317\344\266\317" - "\344\266\377\377\377\377\377\377\377\377\377\377\377\377D\3502q\10p\377\377" - "\377P\3342\335\350\332\377\377\377\\\3202\351\366\337\377\377\377h\3042d" - "!\\\377\377\377t\2702\277\302\252\377\377\377\200\2542\343\345\301\377\377" - "\377\214\2402^2H\377\377\377\230\2242\257\235\204h\\\377\6\5/\223o\234{^" - "\377\6\4/<\36""1\377\252\215j)2\211XK\377\250\203\202$2\337~c\377\242y\236" - "\37""2]#\26\306M@\6\4/ym\274{^\377mVvELn\6\5/h\\\37703x\\U\204\307\300\213" - "\204\226\\\230\2242\377\377\377\377\377\377\377\377\377\310\316\231^\212" - "H\377\377\377\214\2402}\256b\377\377\377\377\377\377\377\377\377\377\377" - "\377\312\332\250_\251O\377\377\377\377\377\377y\310j\200\2542\377\377\377" - "\377\377\377\377\377\377\377\377\377x\341x\377\377\377\377\377\377\177\350" - "|\317\344\266\377\377\377\377\377\377D\3502\362\375\360\377\377\377P\334" - "2\346\371\342\377\377\377\\\3202\335\364\323\377\377\377\377\377\377h\304" - "2\325\355\305\377\377\377t\2702\317\344\266\377\377\377\200\2542\312\332" - "\250\377\377\377\214\2402\310\316\231\377\377\377\230\2242\\U\204h\\\377" - "\6\5/mVv{^\377\6\4/\12\12\360\201Vi\220^\377\7\4/\227U[\246]\377\7\3/\255" - "RN\277Z\377\10\3/\306M@\6\4/\12\12\360{^\377mVvmVv\6\5/\12\12\360h\\\377" - "\377\377\377\307\300\213\377\377\377\230\2242\230\2242\377\377\377\377\377" - "\377\377\377\377\310\316\231\310\316\231\377\377\377\214\2402\214\2402\377" - "\377\377\377\377\377\377\377\377\377\377\377\312\332\250\312\332\250\312" - "\332\250\377\377\377\200\2542\200\2542\200\2542\377\377\377\377\377\377\377" - "\377\377\377\377\377\377\377\377\377\377\377\377\377\377\377\377\377D\350" - "2\362\375\360\377\377\377P\3342\377\377\377\346\371\342\377\377\377\\\320" - "2\335\364\323\377\377\377h\3042\325\355\305\377\377\377t\2702\317\344\266" - "\377\377\377\200\2542\377\377\377\312\332\250\377\377\377\214\2402\310\316" - "\231\377\377\377\5\5/\\U\204h\\\377\6\5/mVv{^\377\6\4/\12\12\360\201Vi\220" - "^\377\7\4/\227U[\246]\377\7\3/\255RN\277Z\377\10\3/\306M@\6\4/\6\4/{^\377" - "\12\12\360mVv\6\5/\6\5/\377\377\377\377\377\377\307\300\213\307\300\213\377" - "\377\377\230\2242\377\377\377\377\377\377\377\377\377\377\377\377\310\316" - "\231\310\316\231\377\377\377\214\2402\214\2402\377\377\377\377\377\377\377" - "\377\377\377\377\377\377\377\377\312\332\250\312\332\250\377\377\377\377" - "\377\377\200\2542\200\2542\377\377\377\377\377\377\377\377\377\377\377\377" - "\204\0\204\377\377\377D\3502\355\364\353\377\377\377\377\377\377Y\335;\346" - "\371\342\377\377\377/\26\31\335\364\323\377\377\377k\255<\325\355\305\377" - "\377\377\377\377\377t\2702\317\344\266\2046\204\200\2542\312\332\250\340" - "\317\340\214\2402\310\316\231\377\377\377VX\377\5\5//\33Dh\\\377\6\5/tVz" - "{^\377\6\4/=0\377\201Vi\220^\377\3\1\30\227U[\246]\377?6U\255RN\277Z\377" - "\337]s\306M0\306M@\3\2\30{^\377{^\377yv}mVv\244\2102\377\377\377\377\377" - "\377\377\377\377gyG\307\300\213\230\2242\212\242h\377\377\377\377\377\377" - "\377\377\377\377\377\377\310\316\231g\230O\377\377\377\214\2402\205\274q" - "\377\377\377\377\377\377\377\377\377\377\377\377\377\377\377h\270V\312\332" - "\250\377\377\377\222\344\222\200\2542\200\2542\377\377\377\377\377\377\377" - "\377\377\377\377\377D\3502\362\375\360\377\377\377\377\377\377P\3342\346" - "\371\342\377\377\377\\\3202\335\364\323\377\377\377\377\377\377h\3042\325" - "\355\305\377\377\377t\2702\317\344\266\377\377\377\377\377\377\200\2542\312" - "\332\250\377\377\377\214\2402\310\316\231VX\377\12\12\360\5\5/\\U\204h\\" - "\377\6\5/mVv{^\377\6\4/\12\12\360\201Vi\220^\377\7\4/\227U[\246]\377\7\3" - "/\255RN\255RN\277Z\377\10\3/\306M@\6\4/\12\12\360{^\377\12\12\360\307\260" - "|\244\2102\244\2102\377\377\377\377\377\377\377\377\377\307\300\213\377\377" - "\377\230\2242\230\2242\377\377\377\377\377\377\377\377\377\377\377\377\310" - "\316\231\377\377\377\377\377\377\214\2402\214\2402\377\377\377\377\377\377" - "\377\377\377\377\377\377\377\377\377\312\332\250\312\332\250\377\377\377" - "\377\377\377\200\2542\200\2542\377\377\377\377\377\377D\3502\377\377\377" - "\362\375\360\377\377\377P\3342\346\371\342\377\377\377\\\3202\377\377\377" - "\335\364\323\377\377\377h\3042\325\355\305\377\377\377\377\377\377t\2702" - "\317\344\266\377\377\377\200\2542\312\332\250\377\377\377\377\377\377\214" - "\2402LR\221VX\377\5\5/\\U\204\12\12\360h\\\377\6\5/mVv{^\377\6\4/\12\12\360" - "\201Vi\220^\377\7\4/\227U[\246]\377\7\3/\7\3/\255RN\277Z\377\10\3/\306M@" - "\6\4/\6\4/{^\377\377\377\377\307\260|\377\377\377\244\2102\377\377\377\377" - "\377\377\377\377\377\307\300\213\307\300\213\377\377\377\230\2242\377\377" - "\377\377\377\377\377\377\377\377\377\377\310\316\231\310\316\231\377\377" - "\377\377\377\377\214\2402\214\2402\377\377\377\377\377\377\377\377\377\377" - "\377\377\377\377\377\312\332\250\312\332\250\377\377\377\377\377\377\377" - "\377\377\377\377\377D\3502\377\377\377\362\375\360\377\377\377-\17\34\346" - "\371\342\377\377\377\363\346\363\\\3202\335\364\323\377\377\377h\3042\377" - "\377\377x)o\377\377\377t\2702\301\276\255\377\377\377\377\377\377\243\273" - "U\312\332\250\377\377\377O-\34\12\12\360LR\221gU\333\5\5/\\U\204<)\377h\\" - "\377\6\5/=!B{^\377\6\4/A2\306\201Vi\220^\377I9q\227U[\246]\377]-\220\7\3" - "/\255RN\245q\304\10\3/\306M0\377\236\221\6\4/\377\377\377\220\231\220\307" - "\260|\307\260|\226\227m\244\2102\377\377\377\377\377\377\377\377\377\307" - "\300\213p\207N\230\2242\230\2242\254\316\254\377\377\377\377\377\377\377" - "\377\377\310\316\231\310\316\231\220\317\220\377\377\377\214\2402\216\316" - "\200\377\377\377\377\377\377\377\377\377\377\377\377\377\377\377r\310^\312" - "\332\250\377\377\377\377\377\377\377\377\377D\3502\362\375\360\377\377\377" - "P\3342\377\377\377\346\371\342\377\377\377\\\3202\335\364\323\377\377\377" - "\377\377\377h\3042\325\355\305\377\377\377\377\377\377t\2702\317\344\266" - "\377\377\377\200\2542\377\377\377\312\332\250\377\377\377\5\6/LR\221\12\12" - "\360VX\377\5\5/\\U\204h\\\377\12\12\360\6\5/mVv{^\377\6\4/\12\12\360\201" - "Vi\220^\377\7\4/\227U[\12\12\360\246]\377\7\3/\255RN\277Z\377\277Z\377\10" - "\3/\306M@\260|2\260|2\377\377\377\377\377\377\307\260|\377\377\377\244\210" - "2\377\377\377\377\377\377\377\377\377\377\377\377\307\300\213\377\377\377" - "\230\2242\230\2242\377\377\377\377\377\377\377\377\377\377\377\377\310\316" - "\231\310\316\231\377\377\377\377\377\377\214\2402\214\2402\377\377\377\377" - "\377\377\377\377\377\377\377\377\377\377\377\377\377\377\377\377\377\377" - "\377\377D\3502\362\375\360\377\377\377P\3342\377\377\377\346\371\342\377" - "\377\377\\\3202\377\377\377\335\364\323\377\377\377h\3042\325\355\305\377" - "\377\377\377\377\377t\2702\317\344\266\377\377\377\377\377\377\200\2542\312" - "\332\250\377\377\377\12\12\360\5\6/LR\221VX\377\12\12\360\5\5/\\U\204h\\" - "\377\6\5/\12\12\360mVv{^\377\6\4/\12\12\360\201Vi\220^\377\7\4/\227U[\227" - "U[\246]\377\7\3/\255RN\12\12\360\277Z\377\10\3/\333bB\377\377\377\260|2\377" - "\377\377\377\377\377\307\260|\307\260|\244\2102\244\2102\377\377\377\377" - "\377\377\377\377\377\307\300\213\307\300\213\377\377\377\230\2242\230\224" - "2\377\377\377\377\377\377\377\377\377\377\377\377\310\316\231\310\316\231" - "\377\377\377\377\377\377\214\2402\214\2402\377\377\377\377\377\377\377\377" - "\377\377\377\377\377\377\377\377\377\377)\10\36\362\375\360\377\377\377\370" - "\356\370P\3342\346\371\342\377\377\377\377\377\377\\\3202\207\"\201\377\377" - "\377\377\377\377p\250D\325\355\305\377\377\377\377\377\377t\2702\317\344" - "\266\234?\234\200\2542\377\377\377\274\260\244FS\377\5\6/;#\377LR\221VX\377" - "\3\1\34\12\12\360\\U\204{^\330\6\5/\12\12\360\257\203\270{^\377\6\4/\6\4" - "\222\201Vi\220^\377P@d\12\12\360\227U[\370\244\377\7\3/\255RNi./\277Z\377" - "\324X2\264\202w\333bB\260|2\377\377\377\377\377\377\377\377\377yvK\377\377" - "\377\244\2102\236\247|\377\377\377\377\377\377\377\377\377\307\300\213\307" - "\300\213\234\306\234\230\2242\377\377\377\256\330\256\377\377\377\377\377" - "\377\377\377\377\310\316\231\310\316\231\234\341\234\377\377\377\214\240" - "2\232\343\223\377\377\377\377\377\377\377\377\377\377\377\377D\3502\362\375" - "\360\377\377\377\377\377\377P\3342\346\371\342\377\377\377\377\377\377\\" - "\3202\335\364\323\377\377\377\377\377\377h\3042\325\355\305\377\377\377\377" - "\377\377t\2702\317\344\266\377\377\377\377\377\377\200\2542\312\332\250\12" - "\12\360FS\377\5\6/LR\221\12\12\360RW\255\3\5\35\6\11\224ZT\\d[\261\3\4\35" - "\6\11\224lVTw]\264\4\4\35\6\11\224\200VN\214]\270\4\3\35\6\11\224\226UG\242" - "\\\274\4\3\35\4\3\35\254R@\377\377\311\203U\36\203U\36\323a:my\36my\36\377" - "\377\276\377\377\276\243\255X\243\255X\236\371\236e\204\36\236\371\236\374" - "\377\273\236\371\236\236\371\236\234\275`\236\371\236^\220\36^\220\36\236" - "\371\236\352\377\267\352\377\267\236\371\236\236\371\236\310\316\231\310" - "\316\231\377\377\377\377\377\377\214\2402\377\377\377\377\377\377\377\377" - "\377D\3502\362\375\360\377\377\377\377\377\377P\3342\346\371\342\377\377" - "\377\377\377\377\\\3202\377\377\377\335\364\323\377\377\377h\3042\377\377" - "\377\325\355\305\377\377\377t\2702\377\377\377\317\344\266\377\377\377\377" - "\377\377\200\2542\346\3\4\35lVT\4\4hw]\264\4\4\35aK\244\200VN\214]\270kZ\371\4\3\35" - "\270\212Io\225o\377\377\306{a\36\253\300\253\304wB\377\377\311\377\377\377" - "\203U\36\323a:\224D(my\36\236\371\236\307\316\266\377\377\276\236\371\236" - "\377\377\343\236\371\236e\204\36Gk\25\236\371\236\374\377\273\260\334\260" - "\236\371\236\234\275`\377\377\377\377\377\377\230\2242k\207#\377\377\377" - "\377\377\377\377\377\377\377\377\377D\3502\377\377\377\362\375\360\377\377" - "\377\377\377\377P\3342\346\371\342\377\377\377\377\377\377\\\3202\377\377" - "\377\335\364\323\377\377\377\377\377\377h\3042\377\377\377\325\355\305\377" - "\377\377\377\377\377t\2702\317\344\266\377\377\3778L\377\12\12\360\5\6/<" - "L\237\12\12\360BR\252\3\5\35\6\11\224JQbRW\255\6\11\224\3\5\35ZT\\\6\11\224" - "d[\261\6\11\224\3\4\35lVT\6\11\224w]\264\4\4\35\6\11\224\200VN\214]\270\6" - "\11\224tm\36\270\212I\270\212I\377\377\306{a\36{a\36\304wB\236\371\236\377" - "\377\311\203U\36\236\371\236\323a:my\36my\36\236\371\236\377\377\276\236" - "\371\236\243\255X\243\255X\236\371\236e\204\36\236\371\236\374\377\273\374" - "\377\273\236\371\236\307\300\213\307\300\213\377\377\377\377\377\377\230" - "\2242\377\377\377\377\377\377\377\377\377D\3502\377\377\377\362\375\360\377" - "\377\377\377\377\377P\3342\377\377\377\346\371\342\377\377\377\377\377\377" - "\\\3202\335\364\323\377\377\377\377\377\377\377\377\377h\3042\325\355\305" - "\377\377\377\377\377\377t\2702\377\377\377\317\344\2668L\377\12\12\360\5" - "\6/\12\12\360 - - This software is provided 'as-is', without any express or implied - warranty. In no event will the authors be held liable for any damages - arising from the use of this software. - - Permission is granted to anyone to use this software for any purpose, - including commercial applications, and to alter it and redistribute it - freely, subject to the following restrictions: - - 1. The origin of this software must not be misrepresented; you must not - claim that you wrote the original software. If you use this software - in a product, an acknowledgment in the product documentation would be - appreciated but is not required. - 2. Altered source versions must be plainly marked as such, and must not be - misrepresented as being the original software. - 3. This notice may not be removed or altered from any source distribution. -*/ - -#include -#include -#include - -#include "../../../include/SDL_test.h" - -#include "fuzzer.h" - -/*! - * Note: doxygen documentation markup is in the header file. - */ - -//! context for test-specific random number generator -static RND_CTX rndContext; - -//! Counts invocation of fuzzer generator functions -int invocationCounter = 0; - -Uint64 -GenerateExecKey(char *runSeed, char *suiteName, - char *testName, int iterationNumber) -{ - if(runSeed == NULL) { - fprintf(stderr, "Error: Incorrect runSeed given to GenerateExecKey function\n"); - return -1; - } - - if(suiteName == NULL) { - fprintf(stderr, "Error: Incorrect suiteName given to GenerateExecKey function\n"); - return -1; - } - - if(testName == NULL) { - fprintf(stderr, "Error: Incorrect testName given to GenerateExecKey function\n"); - return -1; - } - - if(iterationNumber < 0) { - fprintf(stderr, "Error: Incorrect iteration number given to GenerateExecKey function\n"); - return -1; - } - - char iterationString[16]; - memset(iterationString, 0, sizeof(iterationString)); - SDL_snprintf(iterationString, sizeof(iterationString) - 1, "%d", iterationNumber); - - // combine the parameters - const Uint32 runSeedLength = strlen(runSeed); - const Uint32 suiteNameLength = strlen(suiteName); - const Uint32 testNameLength = strlen(testName); - const Uint32 iterationStringLength = strlen(iterationString); - - // size of the entire + 3 for slashes and + 1 for '\0' - const Uint32 entireString = runSeedLength + suiteNameLength + - testNameLength + iterationStringLength + 3 + 1; - - char *buffer = SDL_malloc(entireString); - if(!buffer) { - return 0; - } - - SDL_snprintf(buffer, entireString, "%s/%s/%s/%d", runSeed, suiteName, - testName, iterationNumber); - - MD5_CTX md5Context; - utl_md5Init(&md5Context); - utl_md5Update(&md5Context, buffer, entireString); - utl_md5Final(&md5Context); - - SDL_free(buffer); - - Uint64 *keys = (Uint64 *)md5Context.digest; - - return keys[0]; -} - -void -InitFuzzer(Uint64 execKey) -{ - Uint32 a = (execKey >> 32) & 0x00000000FFFFFFFF; - Uint32 b = execKey & 0x00000000FFFFFFFF; - utl_randomInit(&rndContext, a, b); -} - -int -GetInvocationCount() -{ - return invocationCounter; -} - -void -DeinitFuzzer() -{ - invocationCounter = 0; -} - -Uint8 -RandomUint8() -{ - invocationCounter++; - - return (Uint8) utl_randomInt(&rndContext) & 0x000000FF; -} - -Sint8 -RandomSint8() -{ - invocationCounter++; - - return (Sint8) utl_randomInt(&rndContext) & 0x000000FF; -} - -Uint16 -RandomUint16() -{ - invocationCounter++; - - return (Uint16) utl_randomInt(&rndContext) & 0x0000FFFF; -} - -Sint16 -RandomSint16() -{ - invocationCounter++; - - return (Sint16) utl_randomInt(&rndContext) & 0x0000FFFF; -} - -Sint32 -RandomSint32() -{ - invocationCounter++; - - return (Sint32) utl_randomInt(&rndContext); -} - -Uint32 -RandomUint32() -{ - invocationCounter++; - - return (Uint32) utl_randomInt(&rndContext); -} - -Uint64 -RandomUint64() -{ - Uint64 value; - - invocationCounter++; - - Uint32 *vp = (Uint32*)&value; - vp[0] = RandomSint32(); - vp[1] = RandomSint32(); - - return value; -} - -Sint64 -RandomSint64() -{ - Uint64 value; - - invocationCounter++; - - Uint32 *vp = (Uint32*)&value; - vp[0] = RandomSint32(); - vp[1] = RandomSint32(); - - return value; -} - - - -Sint32 -RandomIntegerInRange(Sint32 pMin, Sint32 pMax) -{ - Sint64 min = pMin; - Sint64 max = pMax; - - if(pMin > pMax) { - Sint64 temp = min; - min = max; - max = temp; - } else if(pMin == pMax) { - return min; - } - - Sint64 number = RandomUint32(); // invocation count increment in there - - return (Sint32)((number % ((max + 1) - min)) + min); -} - -/*! - * Generates boundary values between the given boundaries. - * Boundary values are inclusive. See the examples below. - * If boundary2 < boundary1, the values are swapped. - * If boundary1 == boundary2, value of boundary1 will be returned - * - * Generating boundary values for Uint8: - * BoundaryValues(sizeof(Uint8), 10, 20, True) -> [10,11,19,20] - * BoundaryValues(sizeof(Uint8), 10, 20, False) -> [9,21] - * BoundaryValues(sizeof(Uint8), 0, 15, True) -> [0, 1, 14, 15] - * BoundaryValues(sizeof(Uint8), 0, 15, False) -> [16] - * BoundaryValues(sizeof(Uint8), 0, 255, False) -> NULL - * - * Generator works the same for other types of unsigned integers. - * - * Note: outBuffer will be allocated and needs to be freed later. - * If outbuffer != NULL, it'll be freed. - * - * \param maxValue The biggest value that is acceptable for this data type. - * For instance, for Uint8 -> 255, Uint16 -> 65536 etc. - * \param pBoundary1 defines lower boundary - * \param pBoundary2 defines upper boundary - * \param validDomain Generate only for valid domain (for the data type) - * - * \param outBuffer The generated boundary values are put here - * - * \returns Returns the number of elements in outBuffer or -1 in case of error - */ -Uint32 -GenerateUnsignedBoundaryValues(const Uint64 maxValue, - Uint64 pBoundary1, Uint64 pBoundary2, SDL_bool validDomain, - Uint64 *outBuffer) -{ - Uint64 boundary1 = pBoundary1, boundary2 = pBoundary2; - - if(outBuffer != NULL) { - SDL_free(outBuffer); - } - - if(boundary1 > boundary2) { - Uint64 temp = boundary1; - boundary1 = boundary2; - boundary2 = temp; - } - - Uint64 tempBuf[4]; - Uint64 index = 0; - - if(boundary1 == boundary2) { - tempBuf[index++] = boundary1; - } - else if(validDomain) { - tempBuf[index++] = boundary1; - - if(boundary1 < UINT64_MAX) - tempBuf[index++] = boundary1 + 1; - - tempBuf[index++] = boundary2 - 1; - tempBuf[index++] = boundary2; - } - else { - if(boundary1 > 0) { - tempBuf[index++] = boundary1 - 1; - } - - if(boundary2 < maxValue && boundary2 < UINT64_MAX) { - tempBuf[index++] = boundary2 + 1; - } - } - - if(index == 0) { - // There are no valid boundaries - return 0; - } - - // Create the return buffer - outBuffer = SDL_malloc(index * sizeof(Uint64)); - if(outBuffer == NULL) { - return 0; - } - - SDL_memcpy(outBuffer, tempBuf, index * sizeof(Uint64)); - - return index; -} - -Uint8 -RandomUint8BoundaryValue(Uint8 boundary1, Uint8 boundary2, SDL_bool validDomain) -{ - Uint64 *buffer = NULL; - Uint32 size; - - // max value for Uint8 - const Uint64 maxValue = UINT8_MAX; - - size = GenerateUnsignedBoundaryValues(maxValue, - (Uint64) boundary1, (Uint64) boundary2, - validDomain, buffer); - if(size == 0) { - return 0; - } - - Uint32 index = RandomSint32() % size; - Uint8 retVal = (Uint8) buffer[index]; - - SDL_free(buffer); - - invocationCounter++; - - return retVal; -} - -Uint16 -RandomUint16BoundaryValue(Uint16 boundary1, Uint16 boundary2, SDL_bool validDomain) -{ - Uint64 *buffer = NULL; - Uint32 size; - - // max value for Uint16 - const Uint64 maxValue = UINT16_MAX; - - size = GenerateUnsignedBoundaryValues(maxValue, - (Uint64) boundary1, (Uint64) boundary2, - validDomain, buffer); - if(size == 0) { - return 0; - } - - Uint32 index = RandomSint32() % size; - Uint16 retVal = (Uint16) buffer[index]; - - SDL_free(buffer); - - invocationCounter++; - - return retVal; -} - -Uint32 -RandomUint32BoundaryValue(Uint32 boundary1, Uint32 boundary2, SDL_bool validDomain) -{ - Uint64 *buffer = NULL; - Uint32 size; - - // max value for Uint32 - const Uint64 maxValue = UINT32_MAX; - - size = GenerateUnsignedBoundaryValues(maxValue, - (Uint64) boundary1, (Uint64) boundary2, - validDomain, buffer); - if(size == 0) { - return 0; - } - - Uint32 index = RandomSint32() % size; - Uint32 retVal = (Uint32) buffer[index]; - - SDL_free(buffer); - - invocationCounter++; - - return retVal; -} - -Uint64 -RandomUint64BoundaryValue(Uint64 boundary1, Uint64 boundary2, SDL_bool validDomain) -{ - Uint64 *buffer = NULL; - Uint32 size; - - // max value for Uint64 - const Uint64 maxValue = UINT64_MAX; - - size = GenerateUnsignedBoundaryValues(maxValue, - (Uint64) boundary1, (Uint64) boundary2, - validDomain, buffer); - if(size == 0) { - return 0; - } - - Uint32 index = RandomSint32() % size; - Uint64 retVal = (Uint64) buffer[index]; - - SDL_free(buffer); - - invocationCounter++; - - return retVal; -} - -/*! - * Generates boundary values between the given boundaries. - * Boundary values are inclusive. See the examples below. - * If boundary2 < boundary1, the values are swapped. - * If boundary1 == boundary2, value of boundary1 will be returned - * - * Generating boundary values for Sint8: - * SignedBoundaryValues(sizeof(Sint8), -10, 20, True) -> [-11,-10,19,20] - * SignedBoundaryValues(sizeof(Sint8), -10, 20, False) -> [-11,21] - * SignedBoundaryValues(sizeof(Sint8), -30, -15, True) -> [-30, -29, -16, -15] - * SignedBoundaryValues(sizeof(Sint8), -128, 15, False) -> [16] - * SignedBoundaryValues(sizeof(Sint8), -128, 127, False) -> NULL - * - * Generator works the same for other types of signed integers. - * - * Note: outBuffer will be allocated and needs to be freed later. - * If outbuffer != NULL, it'll be freed. - * - * - * \param minValue The smallest value that is acceptable for this data type. - * For instance, for Uint8 -> -128, Uint16 -> -32,768 etc. - * \param maxValue The biggest value that is acceptable for this data type. - * For instance, for Uint8 -> 127, Uint16 -> 32767 etc. - * \param pBoundary1 defines lower boundary - * \param pBoundary2 defines upper boundary - * \param validDomain Generate only for valid domain (for the data type) - * - * \param outBuffer The generated boundary values are put here - * - * \returns Returns the number of elements in outBuffer or -1 in case of error - */ -Uint32 -GenerateSignedBoundaryValues(const Sint64 minValue, const Sint64 maxValue, - Sint64 pBoundary1, Sint64 pBoundary2, SDL_bool validDomain, - Sint64 *outBuffer) -{ - Sint64 boundary1 = pBoundary1, boundary2 = pBoundary2; - - if(outBuffer != NULL) { - SDL_free(outBuffer); - } - - if(boundary1 > boundary2) { - Sint64 temp = boundary1; - boundary1 = boundary2; - boundary2 = temp; - } - - Sint64 tempBuf[4]; - - Sint64 index = 0; - - if(boundary1 == boundary2) { - tempBuf[index++] = boundary1; - } - else if(validDomain) { - tempBuf[index++] = boundary1; - - if(boundary1 < LLONG_MAX) - tempBuf[index++] = boundary1 + 1; - - if(boundary2 > LLONG_MIN) - tempBuf[index++] = boundary2 - 1; - - tempBuf[index++] = boundary2; - } - else { - if(boundary1 > minValue && boundary1 > LLONG_MIN) { - tempBuf[index++] = boundary1 - 1; - } - - if(boundary2 < maxValue && boundary2 < UINT64_MAX) { - tempBuf[index++] = boundary2 + 1; - } - } - - if(index == 0) { - // There are no valid boundaries - return 0; - } - - // Create the return buffer - outBuffer = SDL_malloc(index * sizeof(Sint64)); - if(outBuffer == NULL) { - return 0; - } - - SDL_memcpy(outBuffer, tempBuf, index * sizeof(Sint64)); - - return index; -} - -Sint8 -RandomSint8BoundaryValue(Sint8 boundary1, Sint8 boundary2, SDL_bool validDomain) -{ - Sint64 *buffer = NULL; - Uint32 size; - - // min & max values for Sint8 - const Sint64 maxValue = CHAR_MAX; - const Sint64 minValue = CHAR_MIN; - - size = GenerateSignedBoundaryValues(minValue, maxValue, - (Sint64) boundary1, (Sint64) boundary2, - validDomain, buffer); - if(size == 0) { - return CHAR_MIN; - } - - Uint32 index = RandomSint32() % size; - Sint8 retVal = (Sint8) buffer[index]; - - SDL_free(buffer); - - invocationCounter++; - - return retVal; -} - -Sint16 -RandomSint16BoundaryValue(Sint16 boundary1, Sint16 boundary2, SDL_bool validDomain) -{ - Sint64 *buffer = NULL; - Uint32 size; - - // min & max values for Sint16 - const Sint64 maxValue = SHRT_MAX; - const Sint64 minValue = SHRT_MIN; - - size = GenerateSignedBoundaryValues(minValue, maxValue, - (Sint64) boundary1, (Sint64) boundary2, - validDomain, buffer); - if(size == 0) { - return SHRT_MIN; - } - - Uint32 index = RandomSint32() % size; - Sint16 retVal = (Sint16) buffer[index]; - - SDL_free(buffer); - - invocationCounter++; - - return retVal; -} - -Sint32 -RandomSint32BoundaryValue(Sint32 boundary1, Sint32 boundary2, SDL_bool validDomain) -{ - Sint64 *buffer = NULL; - Uint32 size; - - // min & max values for Sint32 - const Sint64 maxValue = INT_MAX; - const Sint64 minValue = INT_MIN; - - size = GenerateSignedBoundaryValues(minValue, maxValue, - (Sint64) boundary1, (Sint64) boundary2, - validDomain, buffer); - if(size == 0) { - return INT_MIN; - } - - Uint32 index = RandomSint32() % size; - Sint32 retVal = (Sint32) buffer[index]; - - SDL_free(buffer); - - invocationCounter++; - - return retVal; -} - -Sint64 -RandomSint64BoundaryValue(Sint64 boundary1, Sint64 boundary2, SDL_bool validDomain) -{ - Sint64 *buffer = NULL; - Uint32 size; - - // min & max values for Sint64 - const Sint64 maxValue = LLONG_MAX; - const Sint64 minValue = LLONG_MIN; - - size = GenerateSignedBoundaryValues(minValue, maxValue, - (Sint64) boundary1, (Sint64) boundary2, - validDomain, buffer); - if(size == 0) { - return LLONG_MIN; - } - - Uint32 index = RandomSint32() % size; - Sint64 retVal = (Sint64) buffer[index]; - - SDL_free(buffer); - - invocationCounter++; - - return retVal; -} - -float -RandomUnitFloat() -{ - return (float) RandomUint32() / UINT_MAX; -} - -double -RandomUnitDouble() -{ - return (RandomUint64() >> 11) * (1.0/9007199254740992.0); -} - -float -RandomFloat() -{ - invocationCounter++; - - // \todo to be implemented - return 0.0f; -} - -double -RandomDouble() -{ - invocationCounter++; - - // \todo to be implemented - return 0.0f; -} - - -char * -RandomAsciiString() -{ - // note: invocationCounter is increment in the RandomAsciiStringWithMaximumLenght - return RandomAsciiStringWithMaximumLength(255); -} - -char * -RandomAsciiStringWithMaximumLength(int maxSize) -{ - invocationCounter++; - - if(maxSize < 1) { - return NULL; - } - - int size = (RandomUint32() % (maxSize + 1)) + 1; - char *string = SDL_malloc(size * sizeof(char)); - - int counter = 0; - for( ; counter < size; ++counter) { - string[counter] = (char) RandomIntegerInRange(1, 127); - } - - string[counter] = '\0'; - - return string; -} diff --git a/test/test-automation/src/libSDLtest/fuzzer/fuzzer.h b/test/test-automation/src/libSDLtest/fuzzer/fuzzer.h deleted file mode 100644 index 88096d35e..000000000 --- a/test/test-automation/src/libSDLtest/fuzzer/fuzzer.h +++ /dev/null @@ -1,361 +0,0 @@ -/* - Copyright (C) 2011 Markus Kauppila - - This software is provided 'as-is', without any express or implied - warranty. In no event will the authors be held liable for any damages - arising from the use of this software. - - Permission is granted to anyone to use this software for any purpose, - including commercial applications, and to alter it and redistribute it - freely, subject to the following restrictions: - - 1. The origin of this software must not be misrepresented; you must not - claim that you wrote the original software. If you use this software - in a product, an acknowledgment in the product documentation would be - appreciated but is not required. - 2. Altered source versions must be plainly marked as such, and must not be - misrepresented as being the original software. - 3. This notice may not be removed or altered from any source distribution. -*/ - -#ifndef _FUZZER_H -#define _FUZZER_H - -#include - -#include "utl_crc32.h" -#include "utl_md5.h" -#include "utl_random.h" - -/*! - * \file - * Note: fuzzer implementation uses static instance of random context - * internally which makes it thread-UNsafe. - */ - -/*! - * Inits the fuzzer for a test - */ -void InitFuzzer(Uint64 execKey); - - -/*! - * Deinits the fuzzer (for a test) - */ -void DeinitFuzzer(); - - -/*! - * Returns a random Uint8 - * - * \returns Generated integer - */ -Uint8 RandomUint8(); - -/*! - * Returns a random Sint8 - * - * \returns Generated signed integer - */ -Sint8 RandomSint8(); - - -/*! - * Returns a random Uint16 - * - * \returns Generated integer - */ -Uint16 RandomUint16(); - -/*! - * Returns a random Sint16 - * - * \returns Generated signed integer - */ -Sint16 RandomSint16(); - - -/*! - * Returns a random integer - * - * \returns Generated integer - */ -Sint32 RandomSint32(); - - -/*! - * Returns a random positive integer - * - * \returns Generated integer - */ -Uint32 RandomUint32(); - -/*! - * Returns random Uint64. - * - * \returns Generated integer - */ -Uint64 RandomUint64(); - - -/*! - * Returns random Sint64. - * - * \returns Generated signed integer - */ -Sint64 RandomSint64(); - -/*! - * Returns random float in range [0.0 - 1.0] (inclusive) - */ -float RandomUnitFloat(); - -/*! - * Returns random double in range [0.0 - 1.0[ (note: zero included, 1 is not!) - */ -double RandomUnitDouble(); - -/*! - * Returns random float. - * - * Note: NOT implemented. - */ -float RandomFloat(); - -/*! - * Returns random double - * - * Note: NOT implemented. - */ -double RandomDouble(); - -/*! - * Returns a random boundary value for Uint8 within the given boundaries. - * Boundaries are inclusive, see the usage examples below. If validDomain - * is true, the function will only return valid boundaries, otherwise non-valid - * boundaries are also possible. - * If boundary1 > boundary2, the values are swapped - * - * Usage examples: - * RandomUint8BoundaryValue(10, 20, SDL_TRUE) returns 10, 11, 19 or 20 - * RandomUint8BoundaryValue(1, 20, SDL_FALSE) returns 0 or 21 - * RandomUint8BoundaryValue(0, 99, SDL_FALSE) returns 100 - * RandomUint8BoundaryValue(0, 255, SDL_FALSE) returns -1 (== error value) - * - * \param boundary1 Lower boundary limit - * \param boundary2 Upper boundary limit - * \param validDomain Should the generated boundary be valid or not? - * - * \returns Boundary value in given range or error value (-1) - */ -Uint8 RandomUint8BoundaryValue(Uint8 boundary1, Uint8 boundary2, SDL_bool validDomain); - -/*! - * Returns a random boundary value for Uint16 within the given boundaries. - * Boundaries are inclusive, see the usage examples below. If validDomain - * is true, the function will only return valid boundaries, otherwise non-valid - * boundaries are also possible. - * If boundary1 > boundary2, the values are swapped - * - * Usage examples: - * RandomUint16BoundaryValue(10, 20, SDL_TRUE) returns 10, 11, 19 or 20 - * RandomUint16BoundaryValue(1, 20, SDL_FALSE) returns 0 or 21 - * RandomUint16BoundaryValue(0, 99, SDL_FALSE) returns 100 - * RandomUint16BoundaryValue(0, 0xFFFF, SDL_FALSE) returns -1 (== error value) - * - * \param boundary1 Lower boundary limit - * \param boundary2 Upper boundary limit - * \param validDomain Should the generated boundary be valid or not? - * - * \returns Boundary value in given range or error value (-1) - */ -Uint16 RandomUint16BoundaryValue(Uint16 boundary1, Uint16 boundary2, SDL_bool validDomain); - -/*! - * Returns a random boundary value for Uint32 within the given boundaries. - * Boundaries are inclusive, see the usage examples below. If validDomain - * is true, the function will only return valid boundaries, otherwise non-valid - * boundaries are also possible. - * If boundary1 > boundary2, the values are swapped - * - * Usage examples: - * RandomUint32BoundaryValue(10, 20, SDL_TRUE) returns 10, 11, 19 or 20 - * RandomUint32BoundaryValue(1, 20, SDL_FALSE) returns 0 or 21 - * RandomUint32BoundaryValue(0, 99, SDL_FALSE) returns 100 - * RandomUint32BoundaryValue(0, 0xFFFFFFFF, SDL_FALSE) returns -1 (== error value) - * - * \param boundary1 Lower boundary limit - * \param boundary2 Upper boundary limit - * \param validDomain Should the generated boundary be valid or not? - * - * \returns Boundary value in given range or error value (-1) - */ -Uint32 RandomUint32BoundaryValue(Uint32 boundary1, Uint32 boundary2, SDL_bool validDomain); - -/*! - * Returns a random boundary value for Uint64 within the given boundaries. - * Boundaries are inclusive, see the usage examples below. If validDomain - * is true, the function will only return valid boundaries, otherwise non-valid - * boundaries are also possible. - * If boundary1 > boundary2, the values are swapped - * - * Usage examples: - * RandomUint64BoundaryValue(10, 20, SDL_TRUE) returns 10, 11, 19 or 20 - * RandomUint64BoundaryValue(1, 20, SDL_FALSE) returns 0 or 21 - * RandomUint64BoundaryValue(0, 99, SDL_FALSE) returns 100 - * RandomUint64BoundaryValue(0, 0xFFFFFFFFFFFFFFFF, SDL_FALSE) returns -1 (== error value) - * - * \param boundary1 Lower boundary limit - * \param boundary2 Upper boundary limit - * \param validDomain Should the generated boundary be valid or not? - * - * \returns Boundary value in given range or error value (-1) - */ -Uint64 RandomUint64BoundaryValue(Uint64 boundary1, Uint64 boundary2, SDL_bool validDomain); - -/*! - * Returns a random boundary value for Sint8 within the given boundaries. - * Boundaries are inclusive, see the usage examples below. If validDomain - * is true, the function will only return valid boundaries, otherwise non-valid - * boundaries are also possible. - * If boundary1 > boundary2, the values are swapped - * - * Usage examples: - * RandomSint8BoundaryValue(-10, 20, SDL_TRUE) returns -11, -10, 19 or 20 - * RandomSint8BoundaryValue(-100, -10, SDL_FALSE) returns -101 or -9 - * RandomSint8BoundaryValue(-128, 99, SDL_FALSE) returns 100 - * RandomSint8BoundaryValue(-128, 127, SDL_FALSE) returns SINT8_MIN (== error value) - * - * \param boundary1 Lower boundary limit - * \param boundary2 Upper boundary limit - * \param validDomain Should the generated boundary be valid or not? - * - * \returns Boundary value in given range or error value (-1) - */ -Sint8 -RandomSint8BoundaryValue(Sint8 boundary1, Sint8 boundary2, SDL_bool validDomain); - - -/*! - * Returns a random boundary value for Sint16 within the given boundaries. - * Boundaries are inclusive, see the usage examples below. If validDomain - * is true, the function will only return valid boundaries, otherwise non-valid - * boundaries are also possible. - * If boundary1 > boundary2, the values are swapped - * - * Usage examples: - * RandomSint16BoundaryValue(-10, 20, SDL_TRUE) returns -11, -10, 19 or 20 - * RandomSint16BoundaryValue(-100, -10, SDL_FALSE) returns -101 or -9 - * RandomSint16BoundaryValue(SINT8_MIN, 99, SDL_FALSE) returns 100 - * RandomSint16BoundaryValue(SINT8_MIN, SINT8_MAX, SDL_FALSE) returns SINT16_MIN (== error value) - * - * \param boundary1 Lower boundary limit - * \param boundary2 Upper boundary limit - * \param validDomain Should the generated boundary be valid or not? - * - * \returns Boundary value in given range or error value (-1) - */ -Sint16 -RandomSint16BoundaryValue(Sint16 boundary1, Sint16 boundary2, SDL_bool validDomain); - -/*! - * Returns a random boundary value for Sint32 within the given boundaries. - * Boundaries are inclusive, see the usage examples below. If validDomain - * is true, the function will only return valid boundaries, otherwise non-valid - * boundaries are also possible. - * If boundary1 > boundary2, the values are swapped - * - * Usage examples: - * RandomSint32BoundaryValue(-10, 20, SDL_TRUE) returns -11, -10, 19 or 20 - * RandomSint32BoundaryValue(-100, -10, SDL_FALSE) returns -101 or -9 - * RandomSint32BoundaryValue(SINT32_MIN, 99, SDL_FALSE) returns 100 - * RandomSint32BoundaryValue(SINT32_MIN, SINT32_MAX, SDL_FALSE) returns SINT32_MIN (== error value) - * - * \param boundary1 Lower boundary limit - * \param boundary2 Upper boundary limit - * \param validDomain Should the generated boundary be valid or not? - * - * \returns Boundary value in given range or error value (-1) - */ -Sint32 -RandomSint32BoundaryValue(Sint32 boundary1, Sint32 boundary2, SDL_bool validDomain); - -/*! - * Returns a random boundary value for Sint64 within the given boundaries. - * Boundaries are inclusive, see the usage examples below. If validDomain - * is true, the function will only return valid boundaries, otherwise non-valid - * boundaries are also possible. - * If boundary1 > boundary2, the values are swapped - * - * Usage examples: - * RandomSint64BoundaryValue(-10, 20, SDL_TRUE) returns -11, -10, 19 or 20 - * RandomSint64BoundaryValue(-100, -10, SDL_FALSE) returns -101 or -9 - * RandomSint64BoundaryValue(SINT64_MIN, 99, SDL_FALSE) returns 100 - * RandomSint64BoundaryValue(SINT64_MIN, SINT32_MAX, SDL_FALSE) returns SINT64_MIN (== error value) - * - * \param boundary1 Lower boundary limit - * \param boundary2 Upper boundary limit - * \param validDomain Should the generated boundary be valid or not? - * - * \returns Boundary value in given range or error value (-1) - */ -Sint64 -RandomSint64BoundaryValue(Sint64 boundary1, Sint64 boundary2, SDL_bool validDomain); - - -/*! - * Returns integer in range [min, max] (inclusive). - * Min and max values can be negative values. - * If Max in smaller tham min, then the values are swapped. - * Min and max are the same value, that value will be returned. - * - * \returns Generated integer - */ -Sint32 RandomIntegerInRange(Sint32 min, Sint32 max); - - -/*! - * Generates random null-terminated string. The maximum length for - * the string is 255 characters and it can contain ASCII characters - * from 1 to 127. - * - * Note: Returned string needs to be deallocated. - * - * \returns newly allocated random string - */ -char *RandomAsciiString(); - - -/*! - * Generates random null-terminated string. The maximum length for - * the string is defined by maxLenght parameter. - * String can contain ASCII characters from 1 to 127. - * - * Note: Returned string needs to be deallocated. - * - * \param maxLength Maximum length of the generated string - * - * \returns newly allocated random string - */ -char *RandomAsciiStringWithMaximumLength(int maxLength); - - -/*! - * Generates execution key (used for random seed) for a test - * - * \param runSeed Seed of the harness - * \param suiteName Test suite name - * \param testName Test name - * \param iterationNumber of test iteration - * - * \return Generated execution key as blob of 16 bytes. It needs be deallocated. - * On error, returns NULL. - */ -Uint64 GenerateExecKey(char *runSeed, char *suiteName, char *testName, int iterationNumber); - -/*! - * Returns test specific invocation count for the fuzzer. - */ -int GetInvocationCount(); - -#endif diff --git a/test/test-automation/src/libSDLtest/fuzzer/utl_crc32.c b/test/test-automation/src/libSDLtest/fuzzer/utl_crc32.c deleted file mode 100644 index 8c2e9a102..000000000 --- a/test/test-automation/src/libSDLtest/fuzzer/utl_crc32.c +++ /dev/null @@ -1,125 +0,0 @@ - -#include "utl_crc32.h" - -int utl_crc32Init(CRC32_CTX *crcContext) -{ - int i,j; - CrcUint32 c; - - /* Sanity check context pointer */ - if (crcContext==NULL) { - return(-1); - } - - /* - * Build auxiliary table for parallel byte-at-a-time CRC-32 - */ -#ifdef ORIGINAL_METHOD - for (i = 0; i < 256; ++i) { - for (c = i << 24, j = 8; j > 0; --j) { - c = c & 0x80000000 ? (c << 1) ^ CRC32_POLY : (c << 1); - } - crcContext->crc32_table[i] = c; - } -#else - for (i=0; i<256; i++) { - c = i; - for (j=8; j>0; j--) { - if (c & 1) { - c = (c >> 1) ^ CRC32_POLY; - } else { - c >>= 1; - } - } - crcContext->crc32_table[i] = c; - } -#endif - - return(0); -} - -/* Complete CRC32 calculation on a memory block */ - -int utl_crc32Calc(CRC32_CTX * crcContext, CrcUint8 *inBuf, CrcUint32 inLen, CrcUint32 *crc32) -{ - if (utl_crc32CalcStart(crcContext,crc32)) { - return(-1); - } - if (utl_crc32CalcBuffer(crcContext, inBuf, inLen, crc32)) { - return(-1); - } - if (utl_crc32CalcEnd(crcContext, crc32)) { - return(-1); - } - return(0); -} - -/* Start crc calculation */ - -int utl_crc32CalcStart(CRC32_CTX * crcContext, CrcUint32 *crc32) -{ - /* Sanity check pointers */ - if (crcContext==NULL) { - *crc32=0; - return(-1); - } - - /* - * Preload shift register, per CRC-32 spec - */ - *crc32 = 0xffffffff; - - return(0); -} - -/* Finish crc calculation */ - -int utl_crc32CalcEnd(CRC32_CTX * crcContext, CrcUint32 *crc32) -{ - /* - * Return complement, per CRC-32 spec - */ - *crc32 = (~(*crc32)); - - return(0); -} - -/* Include memory block in crc */ - -int utl_crc32CalcBuffer(CRC32_CTX * crcContext, CrcUint8 *inBuf, CrcUint32 inLen, CrcUint32 *crc32) -{ - CrcUint8 *p; - register CrcUint32 crc; - - /* Sanity check pointers */ - if (crcContext==NULL) { - *crc32=0; - return(-1); - } - - - /* - * Calculate CRC from data - */ - crc = *crc32; - for (p = inBuf; inLen > 0; ++p, --inLen) { -#ifdef ORIGINAL_METHOD - crc = (crc << 8) ^ crcContext->crc32_table[(crc >> 24) ^ *p]; -#else - crc = ((crc >> 8) & 0x00FFFFFF) ^ crcContext->crc32_table[ (crc ^ *p) & 0xFF ]; -#endif - } - *crc32 = crc; - - return(0); -} - -int utl_crc32Done(CRC32_CTX * crcContext) -{ - /* Sanity check context pointer */ - if (crcContext==NULL) { - return(-1); - } - - return(0); -} diff --git a/test/test-automation/src/libSDLtest/fuzzer/utl_crc32.h b/test/test-automation/src/libSDLtest/fuzzer/utl_crc32.h deleted file mode 100644 index 418d7e488..000000000 --- a/test/test-automation/src/libSDLtest/fuzzer/utl_crc32.h +++ /dev/null @@ -1,113 +0,0 @@ -#ifndef _utl_crc32_h -#define _utl_crc32_h - -/* Set up for C function definitions, even when using C++ */ -#ifdef __cplusplus -extern "C" { -#endif - -/* ----------- Includes -------------- */ - -#include - -/* ------------ Definitions --------- */ - -/* Definition shared by all CRC routines */ - -#ifndef CrcUint32 - #define CrcUint32 unsigned int -#endif -#ifndef CrcUint8 - #define CrcUint8 unsigned char -#endif - -#ifdef ORIGINAL_METHOD - #define CRC32_POLY 0x04c11db7 /* AUTODIN II, Ethernet, & FDDI */ -#else - #define CRC32_POLY 0xEDB88320 /* Perl String::CRC32 compatible */ -#endif - -/* Data structure for CRC32 (checksum) computation */ - - typedef struct { - CrcUint32 crc32_table[256]; /* CRC table */ - } CRC32_CTX; - -/* ---------- Function Prototypes ------------- */ - -#ifdef WIN32 -#ifdef BUILD_DLL -#define DLLINTERFACE __declspec(dllexport) -#else -#define DLLINTERFACE __declspec(dllimport) -#endif -#else -#define DLLINTERFACE -#endif - -/* - * utl_crc32Init: initialize the CRC context - * - * Parameters: - * - * crcContext pointer to context variable - * - * Return value: - * - * 0 OK - * -1 error - * - * Note: The function initializes the crc table required for crc calcs. - */ - DLLINTERFACE int utl_crc32Init(CRC32_CTX * crcContext); - - -/* - * utl_crc32Calc: calculate a crc32 from a data block - * - * Parameters: - * - * crcContext pointer to context variable - * inBuf input buffer to checksum - * inLen length of input buffer - * crc32 pointer to Uint32 to store the final CRC into - * - * Return value: - * - * 0 OK - * -1 error - * -*/ - - DLLINTERFACE int utl_crc32Calc(CRC32_CTX * crcContext, CrcUint8 *inBuf, CrcUint32 inLen, CrcUint32 *crc32); - -/* Same routine broken down into three steps */ - - DLLINTERFACE int utl_crc32CalcStart(CRC32_CTX * crcContext, CrcUint32 *crc32); - DLLINTERFACE int utl_crc32CalcEnd(CRC32_CTX * crcContext, CrcUint32 *crc32); - DLLINTERFACE int utl_crc32CalcBuffer(CRC32_CTX * crcContext, CrcUint8 *inBuf, CrcUint32 inLen, CrcUint32 *crc32); - - -/* - * utl_crc32Done: clean up CRC context - * - * Parameters: - * - * crcContext pointer to context variable - * - * Return value: - * - * 0 OK - * -1 error - * -*/ - - DLLINTERFACE int utl_crc32Done(CRC32_CTX * crcContext); - - -/* Ends C function definitions when using C++ */ -#ifdef __cplusplus -}; -#endif - -#endif /* _utl_crc32_h */ diff --git a/test/test-automation/src/libSDLtest/fuzzer/utl_md5.c b/test/test-automation/src/libSDLtest/fuzzer/utl_md5.c deleted file mode 100644 index c4f224735..000000000 --- a/test/test-automation/src/libSDLtest/fuzzer/utl_md5.c +++ /dev/null @@ -1,314 +0,0 @@ - -/* - *********************************************************************** - ** utl_md5.c -- the source code for MD5 routines ** - ** RSA Data Security, Inc. MD5 Message-Digest Algorithm ** - ** Created: 2/17/90 RLR ** - ** Revised: 1/91 SRD,AJ,BSK,JT Reference C ver., 7/10 constant corr. ** - *********************************************************************** - */ - -/* - *********************************************************************** - ** Copyright (C) 1990, RSA Data Security, Inc. All rights reserved. ** - ** ** - ** License to copy and use this software is granted provided that ** - ** it is identified as the "RSA Data Security, Inc. MD5 Message- ** - ** Digest Algorithm" in all material mentioning or referencing this ** - ** software or this function. ** - ** ** - ** License is also granted to make and use derivative works ** - ** provided that such works are identified as "derived from the RSA ** - ** Data Security, Inc. MD5 Message-Digest Algorithm" in all ** - ** material mentioning or referencing the derived work. ** - ** ** - ** RSA Data Security, Inc. makes no representations concerning ** - ** either the merchantability of this software or the suitability ** - ** of this software for any particular purpose. It is provided "as ** - ** is" without express or implied warranty of any kind. ** - ** ** - ** These notices must be retained in any copies of any part of this ** - ** documentation and/or software. ** - *********************************************************************** - */ - -#include "utl_md5.h" - -/* forward declaration */ -static void Transform(MD5UINT4 * buf, MD5UINT4 * in); - -static unsigned char MD5PADDING[64] = { - 0x80, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, - 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, - 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, - 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, - 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, - 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, - 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, - 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00 -}; - -/* F, G, H and I are basic MD5 functions */ -#define F(x, y, z) (((x) & (y)) | ((~x) & (z))) -#define G(x, y, z) (((x) & (z)) | ((y) & (~z))) -#define H(x, y, z) ((x) ^ (y) ^ (z)) -#define I(x, y, z) ((y) ^ ((x) | (~z))) - -/* ROTATE_LEFT rotates x left n bits */ -#define ROTATE_LEFT(x, n) (((x) << (n)) | ((x) >> (32-(n)))) - -/* FF, GG, HH, and II transformations for rounds 1, 2, 3, and 4 */ - -/* Rotation is separate from addition to prevent recomputation */ -#define FF(a, b, c, d, x, s, ac) \ - {(a) += F ((b), (c), (d)) + (x) + (MD5UINT4)(ac); \ - (a) = ROTATE_LEFT ((a), (s)); \ - (a) += (b); \ - } -#define GG(a, b, c, d, x, s, ac) \ - {(a) += G ((b), (c), (d)) + (x) + (MD5UINT4)(ac); \ - (a) = ROTATE_LEFT ((a), (s)); \ - (a) += (b); \ - } -#define HH(a, b, c, d, x, s, ac) \ - {(a) += H ((b), (c), (d)) + (x) + (MD5UINT4)(ac); \ - (a) = ROTATE_LEFT ((a), (s)); \ - (a) += (b); \ - } -#define II(a, b, c, d, x, s, ac) \ - {(a) += I ((b), (c), (d)) + (x) + (MD5UINT4)(ac); \ - (a) = ROTATE_LEFT ((a), (s)); \ - (a) += (b); \ - } - -/* - The routine MD5Init initializes the message-digest context - mdContext. All fields are set to zero. -*/ - -void utl_md5Init(MD5_CTX * mdContext) -{ - mdContext->i[0] = mdContext->i[1] = (MD5UINT4) 0; - - /* - * Load magic initialization constants. - */ - mdContext->buf[0] = (MD5UINT4) 0x67452301; - mdContext->buf[1] = (MD5UINT4) 0xefcdab89; - mdContext->buf[2] = (MD5UINT4) 0x98badcfe; - mdContext->buf[3] = (MD5UINT4) 0x10325476; -} - -/* - The routine MD5Update updates the message-digest context to - account for the presence of each of the characters inBuf[0..inLen-1] - in the message whose digest is being computed. -*/ - -void utl_md5Update(MD5_CTX * mdContext, unsigned char *inBuf, - unsigned int inLen) -{ - MD5UINT4 in[16]; - int mdi; - unsigned int i, ii; - - /* - * compute number of bytes mod 64 - */ - mdi = (int) ((mdContext->i[0] >> 3) & 0x3F); - - /* - * update number of bits - */ - if ((mdContext->i[0] + ((MD5UINT4) inLen << 3)) < mdContext->i[0]) - mdContext->i[1]++; - mdContext->i[0] += ((MD5UINT4) inLen << 3); - mdContext->i[1] += ((MD5UINT4) inLen >> 29); - - while (inLen--) { - /* - * add new character to buffer, increment mdi - */ - mdContext->in[mdi++] = *inBuf++; - - /* - * transform if necessary - */ - if (mdi == 0x40) { - for (i = 0, ii = 0; i < 16; i++, ii += 4) - in[i] = (((MD5UINT4) mdContext->in[ii + 3]) << 24) | - (((MD5UINT4) mdContext->in[ii + 2]) << 16) | - (((MD5UINT4) mdContext->in[ii + 1]) << 8) | - ((MD5UINT4) mdContext->in[ii]); - Transform(mdContext->buf, in); - mdi = 0; - } - } -} - -/* - The routine MD5Final terminates the message-digest computation and - ends with the desired message digest in mdContext->digest[0...15]. -*/ - -void utl_md5Final(MD5_CTX * mdContext) -{ - MD5UINT4 in[16]; - int mdi; - unsigned int i, ii; - unsigned int padLen; - - /* - * save number of bits - */ - in[14] = mdContext->i[0]; - in[15] = mdContext->i[1]; - - /* - * compute number of bytes mod 64 - */ - mdi = (int) ((mdContext->i[0] >> 3) & 0x3F); - - /* - * pad out to 56 mod 64 - */ - padLen = (mdi < 56) ? (56 - mdi) : (120 - mdi); - utl_md5Update(mdContext, MD5PADDING, padLen); - - /* - * append length in bits and transform - */ - for (i = 0, ii = 0; i < 14; i++, ii += 4) - in[i] = (((MD5UINT4) mdContext->in[ii + 3]) << 24) | - (((MD5UINT4) mdContext->in[ii + 2]) << 16) | - (((MD5UINT4) mdContext->in[ii + 1]) << 8) | - ((MD5UINT4) mdContext->in[ii]); - Transform(mdContext->buf, in); - - /* - * store buffer in digest - */ - for (i = 0, ii = 0; i < 4; i++, ii += 4) { - mdContext->digest[ii] = (unsigned char) (mdContext->buf[i] & 0xFF); - mdContext->digest[ii + 1] = - (unsigned char) ((mdContext->buf[i] >> 8) & 0xFF); - mdContext->digest[ii + 2] = - (unsigned char) ((mdContext->buf[i] >> 16) & 0xFF); - mdContext->digest[ii + 3] = - (unsigned char) ((mdContext->buf[i] >> 24) & 0xFF); - } -} - -/* Basic MD5 step. Transforms buf based on in. - */ -static void Transform(MD5UINT4 * buf, MD5UINT4 * in) -{ - MD5UINT4 a = buf[0], b = buf[1], c = buf[2], d = buf[3]; - - /* - * Round 1 - */ -#define S11 7 -#define S12 12 -#define S13 17 -#define S14 22 - FF(a, b, c, d, in[0], S11, 3614090360u); /* 1 */ - FF(d, a, b, c, in[1], S12, 3905402710u); /* 2 */ - FF(c, d, a, b, in[2], S13, 606105819u); /* 3 */ - FF(b, c, d, a, in[3], S14, 3250441966u); /* 4 */ - FF(a, b, c, d, in[4], S11, 4118548399u); /* 5 */ - FF(d, a, b, c, in[5], S12, 1200080426u); /* 6 */ - FF(c, d, a, b, in[6], S13, 2821735955u); /* 7 */ - FF(b, c, d, a, in[7], S14, 4249261313u); /* 8 */ - FF(a, b, c, d, in[8], S11, 1770035416u); /* 9 */ - FF(d, a, b, c, in[9], S12, 2336552879u); /* 10 */ - FF(c, d, a, b, in[10], S13, 4294925233u); /* 11 */ - FF(b, c, d, a, in[11], S14, 2304563134u); /* 12 */ - FF(a, b, c, d, in[12], S11, 1804603682u); /* 13 */ - FF(d, a, b, c, in[13], S12, 4254626195u); /* 14 */ - FF(c, d, a, b, in[14], S13, 2792965006u); /* 15 */ - FF(b, c, d, a, in[15], S14, 1236535329u); /* 16 */ - - /* - * Round 2 - */ -#define S21 5 -#define S22 9 -#define S23 14 -#define S24 20 - GG(a, b, c, d, in[1], S21, 4129170786u); /* 17 */ - GG(d, a, b, c, in[6], S22, 3225465664u); /* 18 */ - GG(c, d, a, b, in[11], S23, 643717713u); /* 19 */ - GG(b, c, d, a, in[0], S24, 3921069994u); /* 20 */ - GG(a, b, c, d, in[5], S21, 3593408605u); /* 21 */ - GG(d, a, b, c, in[10], S22, 38016083u); /* 22 */ - GG(c, d, a, b, in[15], S23, 3634488961u); /* 23 */ - GG(b, c, d, a, in[4], S24, 3889429448u); /* 24 */ - GG(a, b, c, d, in[9], S21, 568446438u); /* 25 */ - GG(d, a, b, c, in[14], S22, 3275163606u); /* 26 */ - GG(c, d, a, b, in[3], S23, 4107603335u); /* 27 */ - GG(b, c, d, a, in[8], S24, 1163531501u); /* 28 */ - GG(a, b, c, d, in[13], S21, 2850285829u); /* 29 */ - GG(d, a, b, c, in[2], S22, 4243563512u); /* 30 */ - GG(c, d, a, b, in[7], S23, 1735328473u); /* 31 */ - GG(b, c, d, a, in[12], S24, 2368359562u); /* 32 */ - - /* - * Round 3 - */ -#define S31 4 -#define S32 11 -#define S33 16 -#define S34 23 - HH(a, b, c, d, in[5], S31, 4294588738u); /* 33 */ - HH(d, a, b, c, in[8], S32, 2272392833u); /* 34 */ - HH(c, d, a, b, in[11], S33, 1839030562u); /* 35 */ - HH(b, c, d, a, in[14], S34, 4259657740u); /* 36 */ - HH(a, b, c, d, in[1], S31, 2763975236u); /* 37 */ - HH(d, a, b, c, in[4], S32, 1272893353u); /* 38 */ - HH(c, d, a, b, in[7], S33, 4139469664u); /* 39 */ - HH(b, c, d, a, in[10], S34, 3200236656u); /* 40 */ - HH(a, b, c, d, in[13], S31, 681279174u); /* 41 */ - HH(d, a, b, c, in[0], S32, 3936430074u); /* 42 */ - HH(c, d, a, b, in[3], S33, 3572445317u); /* 43 */ - HH(b, c, d, a, in[6], S34, 76029189u); /* 44 */ - HH(a, b, c, d, in[9], S31, 3654602809u); /* 45 */ - HH(d, a, b, c, in[12], S32, 3873151461u); /* 46 */ - HH(c, d, a, b, in[15], S33, 530742520u); /* 47 */ - HH(b, c, d, a, in[2], S34, 3299628645u); /* 48 */ - - /* - * Round 4 - */ -#define S41 6 -#define S42 10 -#define S43 15 -#define S44 21 - II(a, b, c, d, in[0], S41, 4096336452u); /* 49 */ - II(d, a, b, c, in[7], S42, 1126891415u); /* 50 */ - II(c, d, a, b, in[14], S43, 2878612391u); /* 51 */ - II(b, c, d, a, in[5], S44, 4237533241u); /* 52 */ - II(a, b, c, d, in[12], S41, 1700485571u); /* 53 */ - II(d, a, b, c, in[3], S42, 2399980690u); /* 54 */ - II(c, d, a, b, in[10], S43, 4293915773u); /* 55 */ - II(b, c, d, a, in[1], S44, 2240044497u); /* 56 */ - II(a, b, c, d, in[8], S41, 1873313359u); /* 57 */ - II(d, a, b, c, in[15], S42, 4264355552u); /* 58 */ - II(c, d, a, b, in[6], S43, 2734768916u); /* 59 */ - II(b, c, d, a, in[13], S44, 1309151649u); /* 60 */ - II(a, b, c, d, in[4], S41, 4149444226u); /* 61 */ - II(d, a, b, c, in[11], S42, 3174756917u); /* 62 */ - II(c, d, a, b, in[2], S43, 718787259u); /* 63 */ - II(b, c, d, a, in[9], S44, 3951481745u); /* 64 */ - - buf[0] += a; - buf[1] += b; - buf[2] += c; - buf[3] += d; -} - -/* - *********************************************************************** - ** End of utl_md5.c ** - ******************************** (cut) ******************************** - */ diff --git a/test/test-automation/src/libSDLtest/fuzzer/utl_md5.h b/test/test-automation/src/libSDLtest/fuzzer/utl_md5.h deleted file mode 100644 index ab6dbe59e..000000000 --- a/test/test-automation/src/libSDLtest/fuzzer/utl_md5.h +++ /dev/null @@ -1,125 +0,0 @@ - -/* - *********************************************************************** - ** utl_md5.h -- header file for implementation of MD5 ** - ** RSA Data Security, Inc. MD5 Message-Digest Algorithm ** - ** Created: 2/17/90 RLR ** - ** Revised: 12/27/90 SRD,AJ,BSK,JT Reference C version ** - ** Revised (for MD5): RLR 4/27/91 ** - ** -- G modified to have y&~z instead of y&z ** - ** -- FF, GG, HH modified to add in last register done ** - ** -- Access pattern: round 2 works mod 5, round 3 works mod 3 ** - ** -- distinct additive constant for each step ** - ** -- round 4 added, working mod 7 ** - *********************************************************************** -*/ - -/* - *********************************************************************** - ** Message-digest routines: ** - ** To form the message digest for a message M ** - ** (1) Initialize a context buffer mdContext using MD5Init ** - ** (2) Call MD5Update on mdContext and M ** - ** (3) Call MD5Final on mdContext ** - ** The message digest is now in mdContext->digest[0...15] ** - *********************************************************************** -*/ - -#ifndef _utl_md5_h -#define _utl_md5_h - -/* Set up for C function definitions, even when using C++ */ -#ifdef __cplusplus -extern "C" { -#endif - -/* ------------ Definitions --------- */ - -/* typedef a 32-bit type */ - typedef unsigned long int MD5UINT4; - -/* Data structure for MD5 (Message-Digest) computation */ - typedef struct { - MD5UINT4 i[2]; /* number of _bits_ handled mod 2^64 */ - MD5UINT4 buf[4]; /* scratch buffer */ - unsigned char in[64]; /* input buffer */ - unsigned char digest[16]; /* actual digest after MD5Final call */ - } MD5_CTX; - -/* ---------- Function Prototypes ------------- */ - -#ifdef WIN32 -#ifdef BUILD_DLL -#define DLLINTERFACE __declspec(dllexport) -#else -#define DLLINTERFACE __declspec(dllimport) -#endif -#else -#define DLLINTERFACE -#endif - -/* - * utl_md5Init: initialize the context - * - * Parameters: - * - * mdContext pointer to context variable - * - * Return value: - * - * none - * - * Note: The function initializes the message-digest context - * mdContext. Call before each new use of the context - - * all fields are set to zero. - */ - DLLINTERFACE void utl_md5Init(MD5_CTX * mdContext); - - -/* - * utl_md5update: update digest from variable length data - * - * Parameters: - * - * mdContext pointer to context variable - * inBuf pointer to data array/string - * inLen length of data array/string - * - * Return value: - * - * none - * - * Note: The function updates the message-digest context to account - * for the presence of each of the characters inBuf[0..inLen-1] - * in the message whose digest is being computed. -*/ - - DLLINTERFACE void utl_md5Update(MD5_CTX * mdContext, unsigned char *inBuf, - unsigned int inLen); - - -/* - * utl_md5Final: complete digest computation - * - * Parameters: - * - * mdContext pointer to context variable - * - * Return value: - * - * none - * - * Note: The function terminates the message-digest computation and - * ends with the desired message digest in mdContext.digest[0..15]. - * Always call before using the digest[] variable. -*/ - - DLLINTERFACE void utl_md5Final(MD5_CTX * mdContext); - - -/* Ends C function definitions when using C++ */ -#ifdef __cplusplus -}; -#endif - -#endif /* _utl_md5_h */ diff --git a/test/test-automation/src/libSDLtest/fuzzer/utl_random.c b/test/test-automation/src/libSDLtest/fuzzer/utl_random.c deleted file mode 100644 index 7f540d622..000000000 --- a/test/test-automation/src/libSDLtest/fuzzer/utl_random.c +++ /dev/null @@ -1,63 +0,0 @@ - -/* - - utl_random - - A "32-bit Multiply with carry" random number generator. - -*/ - - -#include "utl_random.h" - - -/* Initialize random number generator with two integer variables */ - -void utl_randomInit(RND_CTX * rndContext, unsigned int xi, unsigned int ci) -{ - /* - * Choose a value for 'a' from this list - * 1791398085 1929682203 1683268614 1965537969 1675393560 - * 1967773755 1517746329 1447497129 1655692410 1606218150 - * 2051013963 1075433238 1557985959 1781943330 1893513180 - * 1631296680 2131995753 2083801278 1873196400 1554115554 - */ - rndContext->a = 1655692410; - rndContext->x = 30903; - rndContext->c = 0; - if (xi != 0) - rndContext->x = xi; - rndContext->c = ci; - rndContext->ah = rndContext->a >> 16; - rndContext->al = rndContext->a & 65535; -} - -/* Initialize random number generator from time */ - -void utl_randomInitTime(RND_CTX * rndContext) -{ - int a,b; - - srand(time(NULL)); - a=rand(); - srand(clock()); - b=rand(); - utl_randomInit(rndContext, a, b); -} - -/* Returns random numbers */ - -unsigned int utl_random(RND_CTX * rndContext) -{ - unsigned int xh, xl; - - xh = rndContext->x >> 16, xl = rndContext->x & 65535; - rndContext->x = rndContext->x * rndContext->a + rndContext->c; - rndContext->c = - xh * rndContext->ah + ((xh * rndContext->al) >> 16) + - ((xl * rndContext->ah) >> 16); - if (xl * rndContext->al >= (~rndContext->c + 1)) - rndContext->c++; - - return (rndContext->x); -} diff --git a/test/test-automation/src/libSDLtest/fuzzer/utl_random.h b/test/test-automation/src/libSDLtest/fuzzer/utl_random.h deleted file mode 100644 index cd4379c99..000000000 --- a/test/test-automation/src/libSDLtest/fuzzer/utl_random.h +++ /dev/null @@ -1,112 +0,0 @@ -/* - - A "32-bit Multiply with carry: random number generator. - Has a list of recommended multipliers. Very fast and good. - - multiply-with-carry generator" x(n) = a*x(n-1) + carry mod 2^32. - period" (a*2^31)-1 - -*/ - -#ifndef _utl_random_h -#define _utl_random_h - -/* Set up for C function definitions, even when using C++ */ -#ifdef __cplusplus -extern "C" { -#endif - -/* ------- Includes ---------- */ - -#include -#include -#include - -/* ------- Definitions ------- */ - -/* - * Macros that return random number in a specific format. See utl_random() - * below for details. Float values are in the range [0.0-1.0]. - */ -#define utl_randomInt(c) ((int)utl_random(c)) -#define utl_randomFloat(c) ((double)utl_random(c)/(unsigned long)0xffffffff) - - typedef struct { - unsigned int a; - unsigned int x; - unsigned int c; - unsigned int ah; - unsigned int al; - } RND_CTX; - -/* ---- Function Prototypes -------- */ - -#ifdef WIN32 -#ifdef BUILD_DLL -#define DLLINTERFACE __declspec(dllexport) -#else -#define DLLINTERFACE __declspec(dllimport) -#endif -#else -#define DLLINTERFACE -#endif - -/* - * utl_randomInit: Initialize random number generator with two integers. - * - * Paramaters: - * - * rndContext pointer to context structure - * xi, ci integers that define the random sequence - * - * Return value: - * - * none - * - * Note: The random sequence of numbers returned by utl_random() is the - * same for the same two integers and has a period of 2^31. - * - */ - DLLINTERFACE void utl_randomInit(RND_CTX * rndContext, unsigned int xi, - unsigned int ci); - -/* - * utl_randomInitTime: Initialize random number generator with the time - * - * Parameters: - * - * rndContext pointer to context structure - * - * Return value: - * - * none - * - */ - DLLINTERFACE void utl_randomInitTime(RND_CTX * rndContext); - - -/* - * utl_random: Returns random numbers - * - * Parameters: - * - * rndContext pointer to context structure - * - * Return value: - * - * random number (32bit unsigned integer) - * - * Note: utl_randomInit() or utl_randomInitTime() must have been called - * before using this function. - * - */ - DLLINTERFACE unsigned int utl_random(RND_CTX * rndContext); - - - -/* Ends C function definitions when using C++ */ -#ifdef __cplusplus -}; -#endif - -#endif /* _utl_random_h */ diff --git a/test/test-automation/src/libSDLtest/logger_helpers.c b/test/test-automation/src/libSDLtest/logger_helpers.c deleted file mode 100644 index 9e8eab025..000000000 --- a/test/test-automation/src/libSDLtest/logger_helpers.c +++ /dev/null @@ -1,182 +0,0 @@ -/* - Copyright (C) 2011 Markus Kauppila - - This software is provided 'as-is', without any express or implied - warranty. In no event will the authors be held liable for any damages - arising from the use of this software. - - Permission is granted to anyone to use this software for any purpose, - including commercial applications, and to alter it and redistribute it - freely, subject to the following restrictions: - - 1. The origin of this software must not be misrepresented; you must not - claim that you wrote the original software. If you use this software - in a product, an acknowledgment in the product documentation would be - appreciated but is not required. - 2. Altered source versions must be plainly marked as such, and must not be - misrepresented as being the original software. - 3. This notice may not be removed or altered from any source distribution. -*/ - -#include - -#include "logger_helpers.h" - -/*! - * Helper function. Turns the given integer in to a string - * - * Note: uses static buffer internally, so the return value - * isn't valid after the next call of this function. If you - * want to retain the return value, make a copy of it - * - * \param integer The converted integer - * \returns Given integer as string - */ -char *IntToString(const int integer) { - static char buffer[256]; // malloc might work better - memset(buffer, 0, sizeof(buffer)); - - SDL_snprintf(buffer, sizeof(buffer), "%d", integer); - - return buffer; -} - -/*! - * Helper function. Turns the given integer in to a string in - * hex format. - * - * Note: uses static buffer internally, so the return value - * isn't valid after the next call of this function. If you - * want to retain the return value, make a copy of it - * - * \param integer The converted integer - * \returns Given integer as string in hex fomat - */ -char *IntToHexString(const Uint64 integer) { - static char buffer[256]; // malloc might work better - memset(buffer, 0, sizeof(buffer)); - - SDL_snprintf(buffer, sizeof(buffer), "%llX", integer); - - return buffer; -} - -/*! - * Helper function. Turns the given double value in to a string - * - * Note: uses static buffer internally, so the return value - * isn't valid after the next call of this function. If you - * want to retain the return value, make a copy of it - * - * \param decimal The converted double value - * \returns Given double value as string - */ -char *DoubleToString(const double decimal) { - static char buffer[256]; // malloc might work better - memset(buffer, 0, sizeof(buffer)); - - SDL_snprintf(buffer, sizeof(buffer), "%.5f", decimal); - - return buffer; -} - -/*! - * Converts unix timestamp to its ascii presentation - * - * Note: uses static buffer internally, so the return value - * isn't valid after the next call of this function. If you - * want to retain the return value, make a copy of it - * - * \param timestamp Timestamp - * \return Ascii presentation - */ -char *TimestampToString(const time_t timestamp) { - static char buffer[256]; - memset(buffer, 0, sizeof(buffer)); - - time_t copy = timestamp; - - struct tm *local = localtime(©); - strftime(buffer, sizeof(buffer), "%a %Y-%m-%d %H:%M:%S %Z", local); - - return buffer; -} - -/*! - * Converts unix timestamp to its ascii presentation in given format - * - * Note: uses static buffer internally, so the return value - * isn't valid after the next call of this function. If you - * want to retain the return value, make a copy of it - * - * \param timestamp Timestamp - * \param format Formatting specification such as "%Y%m%d" - * - * \return Ascii presentation - */ -char *TimestampToStringWithFormat(const time_t timestamp, char *format) { - static char buffer[256]; - memset(buffer, 0, sizeof(buffer)); - - time_t copy = timestamp; - - struct tm *local = localtime(©); - strftime(buffer, sizeof(buffer), format, local); - - return buffer; -} - -/*! Turns all the characters of the given - * string to lowercase and returns the resulting string. - * - * \param string String to be converted - * \return Newly allocated lower-case version of the given string - */ -char * -ToLowerCase(const char *string) -{ - if(ValidateString(string) == 0) { - return NULL; - } - - const int size = SDL_strlen(string); - char *ret = SDL_malloc(size + 1); - strncpy(ret, string, size); - ret[size] = '\0'; - - int counter = 0; - for(; counter < size; ++counter) { - ret[counter] = tolower(ret[counter]); - } - - // printf("Debug: %s == %s\n", string, ret); - - return ret; -} - -/*! - * Validates string by checking that given string is not - * NULL, its length is non-zero etc. - * - * \param string Validated string - * \returns 1 if string is valid, otherwise 0 - */ -int -ValidateString(const char *string) -{ - int retVal = 1; - - if(string != NULL) { - if(SDL_strlen(string) > 0) { - retVal = 1; - } - - retVal = 1; - } else { - retVal = 0; - } - - return retVal; -} - - diff --git a/test/test-automation/src/libSDLtest/logger_helpers.h b/test/test-automation/src/libSDLtest/logger_helpers.h deleted file mode 100644 index 2528d5297..000000000 --- a/test/test-automation/src/libSDLtest/logger_helpers.h +++ /dev/null @@ -1,40 +0,0 @@ -/* - Copyright (C) 2011 Markus Kauppila - - This software is provided 'as-is', without any express or implied - warranty. In no event will the authors be held liable for any damages - arising from the use of this software. - - Permission is granted to anyone to use this software for any purpose, - including commercial applications, and to alter it and redistribute it - freely, subject to the following restrictions: - - 1. The origin of this software must not be misrepresented; you must not - claim that you wrote the original software. If you use this software - in a product, an acknowledgment in the product documentation would be - appreciated but is not required. - 2. Altered source versions must be plainly marked as such, and must not be - misrepresented as being the original software. - 3. This notice may not be removed or altered from any source distribution. -*/ - -#ifndef _LOGGER_HELPERS_G -#define _LOGGER_HELPERS_G - -#include - -char *IntToString(const int integer); - -char *IntToHexString(const Uint64 integer); - -char *DoubleToString(const double decimal); - -char *TimestampToString(const time_t timestamp); - -char *TimestampToStringWithFormat(const time_t timestamp, char *format); - -char *ToLowerCase(const char *string); - -int ValidateString(const char *string); - -#endif diff --git a/test/test-automation/src/libSDLtest/plain_logger.c b/test/test-automation/src/libSDLtest/plain_logger.c deleted file mode 100644 index 5fc4babb5..000000000 --- a/test/test-automation/src/libSDLtest/plain_logger.c +++ /dev/null @@ -1,225 +0,0 @@ -/* - Copyright (C) 2011 Markus Kauppila - - This software is provided 'as-is', without any express or implied - warranty. In no event will the authors be held liable for any damages - arising from the use of this software. - - Permission is granted to anyone to use this software for any purpose, - including commercial applications, and to alter it and redistribute it - freely, subject to the following restrictions: - - 1. The origin of this software must not be misrepresented; you must not - claim that you wrote the original software. If you use this software - in a product, an acknowledgment in the product documentation would be - appreciated but is not required. - 2. Altered source versions must be plainly marked as such, and must not be - misrepresented as being the original software. - 3. This notice may not be removed or altered from any source distribution. -*/ - -#ifndef _PLAIN_LOGGER -#define _PLAIN_LOGGER - -#include "stdio.h" - -#include "../../include/SDL_test.h" - -#include "../runner/logger.h" - -#include "logger_helpers.h" -#include "plain_logger.h" - -/*! Current indentationt level */ -static int indentLevel; - -/*! Logging level of the logger */ -static Level level = LOGGER_TERSE; - -//! Handle to log file -static FILE *logFile; - -/*! - * Prints out the output of the logger - * - * \param currentIndentLevel The currently used indentation level - * \param message The message to be printed out - */ -int -Output(const int currentIndentLevel, const char *message, ...) -{ - if(logFile == NULL) { - fprintf(stderr, "logfile is NULL\n"); - exit(3); - } - - int indent = 0; - for( ; indent < currentIndentLevel; ++indent) { - fprintf(logFile, " "); // \todo make configurable? - } - - char buffer[1024]; - memset(buffer, 0, 1024); - - va_list list; - va_start(list, message); - - SDL_vsnprintf(buffer, 1024, message, list); - - va_end(list); - fprintf(logFile, "%s\n", buffer); - fflush(logFile); -} - - -void -PlainRunStarted(int parameterCount, char *runnerParameters[], char *runSeed, - time_t eventTime, LoggerData *data) -{ - if(data == NULL) { - fprintf(stderr, "Logger data is NULL\n"); - exit(3); - } - - // Set up the logging destination - if(data->stdoutEnabled == 1) { - logFile = stdout; - } else { - logFile = fopen(data->filename, "w"); - if(logFile == NULL) { - fprintf(stderr, "Log file %s couldn't opened\n", data->filename); - exit(3); - } - } - - - level = data->level; - - Output(indentLevel, "Test run started at %s", TimestampToString(eventTime)); - Output(indentLevel, "Fuzzer seed is: %s", runSeed); - Output(indentLevel, "Runner parameters: "); - - int counter = 0; - for(counter = 0; counter < parameterCount; counter++) { - char *parameter = runnerParameters[counter]; - Output(indentLevel, "\t%s", parameter); - } - - Output(indentLevel, ""); -} - -void -PlainRunEnded(int testCount, int suiteCount, int testPassCount, int testFailCount, - int testSkippedCount, time_t endTime, double totalRuntime) -{ - Output(indentLevel, "Test run ended at %s", TimestampToString(endTime)); - - Output(indentLevel, "Ran %d tests in %0.5f seconds from %d suites.", - testCount, totalRuntime, suiteCount); - - Output(indentLevel, "%d tests passed", testPassCount); - Output(indentLevel, "%d tests failed", testFailCount); - Output(indentLevel, "%d tests skipped", testSkippedCount); - - fclose(logFile); -} - -void -PlainSuiteStarted(const char *suiteName, time_t eventTime) -{ - Output(indentLevel++, "Executing tests from %s", suiteName); -} - -void -PlainSuiteEnded(int testsPassed, int testsFailed, int testsSkipped, - time_t endTime, double totalRuntime) -{ - Output(--indentLevel, "Suite executed. %d passed, %d failed and %d skipped. Total runtime %0.5f seconds", - testsPassed, testsFailed, testsSkipped, totalRuntime); - Output(indentLevel, ""); -} - -void -PlainTestStarted(const char *testName, const char *suiteName, - const char *testDescription, Uint64 execKey, time_t startTime) -{ - Output(indentLevel, "Executing test: %s (in %s, exec key: %llX)", testName, suiteName, execKey); - Output(indentLevel++, "Test description: %s", testDescription); -} - -void -PlainTestEnded(const char *testName, const char *suiteName, - int testResult, time_t endTime, double totalRuntime) -{ - switch(testResult) { - case TEST_RESULT_PASS: - Output(--indentLevel, "%s: ok", testName); - break; - case TEST_RESULT_FAILURE: - Output(--indentLevel, "%s: failed", testName); - break; - case TEST_RESULT_NO_ASSERT: - Output(--indentLevel, "%s: failed -> no assert", testName); - break; - case TEST_RESULT_SKIPPED: - Output(--indentLevel, "%s: skipped", testName); - break; - case TEST_RESULT_KILLED: - Output(--indentLevel, "%s: killed, exceeded timeout", testName); - break; - case TEST_RESULT_SETUP_FAILURE: - Output(--indentLevel, "%s: killed, setup failure", testName); - break; - } -} - -void -PlainAssert(const char *assertName, int assertResult, const char *assertMessage, - time_t eventTime) -{ - // Log passed asserts only on VERBOSE level - if(level <= LOGGER_TERSE && assertResult == ASSERT_PASS) { - return ; - } - - const char *result = (assertResult) ? "passed" : "failed"; - Output(indentLevel, "%s: %s - %s", assertName, result, assertMessage); -} - -void -PlainAssertWithValues(const char *assertName, int assertResult, const char *assertMessage, - int actualValue, int expectedValue, time_t eventTime) -{ - // Log passed asserts only on VERBOSE level - if(level <= LOGGER_TERSE && assertResult == ASSERT_PASS) { - return ; - } - - const char *result = (assertResult) ? "passed" : "failed"; - Output(indentLevel, "%s: %s (expected %d, actualValue %d) - %s", - assertName, result, expectedValue, actualValue, assertMessage); -} - -void -PlainAssertSummary(int numAsserts, int numAssertsFailed, int numAssertsPass, time_t eventTime) -{ - Output(indentLevel, "Assert summary: %d failed, %d passed (total: %d)", - numAssertsFailed, numAssertsPass, numAsserts); -} - -void -PlainLog(time_t eventTime, char *fmt, ...) -{ - // create the log message - va_list args; - char logMessage[1024]; - memset(logMessage, 0, sizeof(logMessage)); - - va_start( args, fmt ); - SDL_vsnprintf( logMessage, sizeof(logMessage), fmt, args ); - va_end( args ); - - Output(indentLevel, "%s", logMessage); -} - -#endif diff --git a/test/test-automation/src/libSDLtest/plain_logger.h b/test/test-automation/src/libSDLtest/plain_logger.h deleted file mode 100644 index 00e525c9a..000000000 --- a/test/test-automation/src/libSDLtest/plain_logger.h +++ /dev/null @@ -1,142 +0,0 @@ -/* - Copyright (C) 2011 Markus Kauppila - - This software is provided 'as-is', without any express or implied - warranty. In no event will the authors be held liable for any damages - arising from the use of this software. - - Permission is granted to anyone to use this software for any purpose, - including commercial applications, and to alter it and redistribute it - freely, subject to the following restrictions: - - 1. The origin of this software must not be misrepresented; you must not - claim that you wrote the original software. If you use this software - in a product, an acknowledgment in the product documentation would be - appreciated but is not required. - 2. Altered source versions must be plainly marked as such, and must not be - misrepresented as being the original software. - 3. This notice may not be removed or altered from any source distribution. -*/ - -#ifndef _PLAIN_LOGGER_H -#define _PLAIN_LOGGER_H - -#include -#include "../runner/logger.h" - - -/*! - * Prints out information about starting the test run. - * - * \param parameterCount How many parameters were given - * \param runnerParameters What parameters were given to the runner - * \param runSeed Fuzzer seed of the harness - * \param eventTime When the execution started - * \param data LoggerData structure which contains data for the logger - * - */ -void PlainRunStarted(int parameterCount, char *runnerParameters[], char *runSeed, - time_t eventTime, LoggerData *data); - -/*! - * Prints out information about ending the test run. - * - * \param testCount How many tests were executed in total - * \param suiteCount How many suite were executed in total - * \param testPassCount How many tests passed in total - * \param testSkippedCount How many tests were skipped in total - * \param testFailCount How many tests failed in total - * \param endTime When the execution ended - * \param totalRuntime How long the execution took - */ -void PlainRunEnded(int testCount, int suiteCount, int testPassCount, int testFailCount, - int testSkippedCount, time_t endTime, double totalRuntime); - -/*! - * Prints the data about the test suite that'll be executed next - * - * \param suiteName Name of the test suite - * \param eventTime When the execution starts - */ -void PlainSuiteStarted(const char *suiteName, time_t eventTime); - -/*! - * Prints information about the test suite that was just executed - * - * \param testsPassed how many tests passed from this suite - * \param testsFailed how many tests failed from this suite - * \param testsSkipped how many tests were skipped (not implemented) - * \param endTime When the suite execution ended - * \param totalRuntime How long did the suite's execution take - */ -void PlainSuiteEnded(int testsPassed, int testsFailed, int testsSkipped, - time_t endTime, double totalRuntime); - -/*! - * Prints the data about the test test that'll be executed next - * - * \param testName Name of the test that'll be executed - * \param suiteName Name of the suite of the test - * \param testDescription Description of the test - * \param execKey Execution key for fuzzing - * \param startTime When the test started to execute - */ -void PlainTestStarted(const char *testName, const char *suiteName, - const char *testDescription, Uint64 execKey, time_t startTime); - -/*! - * Prints information about the test test that was just executed - * - * \param testName Name of the executed test - * \param suiteName Name of the suite of the test - * \param testResult Did the test fail (!= 0) or pass (== 0) - * \param endTime When the test execution ended - * \param totalRuntime Total runtime of the executed test - */ -void PlainTestEnded(const char *testName, const char *suiteName, - int testResult, time_t endTime, double totalRuntime); - - -/*! - * Prints information about plain assert - * - * \param assertName Name of the assert - * \param assertResult Did assert fail (== 0) or success (!= 0) - * \param assertMessage Message of the assert - * \param eventTime When the assert happened - */ -void PlainAssert(const char *assertName, int assertResult, const char *assertMessage, - time_t eventTime); - -/*! - * Prints information about assert that has actual and expected values - * - * \param assertName Name of the assert - * \param assertResult Did assert fail (== 0) or success (!= 0) - * \param assertMessage Message of the assert - * \param actualValue Actual value of assert - * \param expected Excepted value of assert - * \param eventTime When the assert happened - */ -void PlainAssertWithValues(const char *assertName, int assertResult, const char *assertMessage, - int actualValue, int expected, time_t eventTime); - -/*! - * Prints summary of all assertions of certain tests - * - * \param numAsserts Total assert count for the executed test - * \param numAssertsFailed Count of failed asserts in the test - * \param numAssertsPass Count of passed asserts in the test - * \param eventTime Timestamp of the summary - */ -void PlainAssertSummary(int numAsserts, int numAssertsFailed, int numAssertsPass, time_t eventTime); - -/*! - * Prints given message - * - * \param eventTime Timestamp for log message - * \param fmt Message to be logged - */ -void PlainLog(time_t eventTime, char *fmt, ...); - -#endif diff --git a/test/test-automation/src/libSDLtest/xml.c b/test/test-automation/src/libSDLtest/xml.c deleted file mode 100644 index c9cb58ef8..000000000 --- a/test/test-automation/src/libSDLtest/xml.c +++ /dev/null @@ -1,376 +0,0 @@ -/* - Copyright (C) 2011 Markus Kauppila - - This software is provided 'as-is', without any express or implied - warranty. In no event will the authors be held liable for any damages - arising from the use of this software. - - Permission is granted to anyone to use this software for any purpose, - including commercial applications, and to alter it and redistribute it - freely, subject to the following restrictions: - - 1. The origin of this software must not be misrepresented; you must not - claim that you wrote the original software. If you use this software - in a product, an acknowledgment in the product documentation would be - appreciated but is not required. - 2. Altered source versions must be plainly marked as such, and must not be - misrepresented as being the original software. - 3. This notice may not be removed or altered from any source distribution. -*/ - -#include -#include -#include - -#include - -#include "xml.h" -#include "logger_helpers.h" - -/*! Size for xml element buffer */ -#define bufferSize 1024 -/*! Buffer for storing the xml element under construction */ -static char buffer[bufferSize]; - -/*! Pointer to XML root element's tag */ -static const char *root; - -/*! - * Defines structure used for "counting" open XML-tags - */ -typedef struct TagList { - const char *tag; - struct TagList *next; -} TagList; - -static TagList *openTags = NULL; - -/*! - * Prepend the open tags list - * - * \return On error returns non-zero value, otherwise zero will returned - */ -static int -AddOpenTag(const char *tag) -{ - TagList *openTag = SDL_malloc(sizeof(TagList)); - if(openTag == NULL) { - return 1; - } - memset(openTag, 0, sizeof(TagList)); - - const int tagSize = SDL_strlen(tag) + 1; - openTag->tag = SDL_malloc(tagSize); - if(openTag->tag == NULL) { - SDL_free(openTag); - return 1; - } - - strncpy((char *)openTag->tag, (char *)tag, tagSize); - - openTag->next = openTags; - - openTags = openTag; - - return 0; -} - -/*! - * Removes the first tag from the open tag list - * - * \return On error returns non-zero value, otherwise zero will returned - */ -static int -RemoveOpenTag(const char *tag) -{ - if(openTags == NULL || ValidateString(tag) == 0) { - return 1; - } - - int retVal = 0; - - const int size = SDL_strlen(tag); - char *tempTag = SDL_malloc(size); - strncpy(tempTag, tag, size); - - // Tag should always be the same as previously opened tag - // It prevents opening and ending tag mismatch - if(SDL_strncmp(tempTag, tag, size) == 0) { - TagList *openTag = openTags; - SDL_free((char *)openTag->tag); - - openTags = openTags->next; - SDL_free(openTag); - } else { - //printf("Debug | xml.c:RemoveOpenTag(): open/end tag mismatch"); - retVal = 1; - } - - return retVal; -} - -/*! - * Debug function. Prints the contents of the open tags list. - */ -static void -PrintOpenTags() -{ - printf("\nOpen tags:\n"); - - TagList *openTag = NULL; - for(openTag = openTags; openTag; openTag = openTag->next) { - printf("\ttag: %s\n", openTag->tag); - } -} - - -/*! - * Converts the special characters ', ", <, >, and & to - * corresponding entities: ' " < > and & - * - * \param string String to be escaped - * \return Newly allocated escaped string - */ -const char * -EscapeString(const char *string) -{ - // Calculate the size of the escaped string - int totalSize = 0; - - const int maxCount = SDL_strlen(string); - - int counter = 0; - for(; counter < maxCount; ++counter) { - char character = string[counter]; - - switch(character) { - case '&': totalSize += 5; //SDL_strlen("&"); - break; - case '\'': totalSize += 6; //SDL_strlen("'"); - break; - case '"': totalSize += 6; //SDL_strlen("""); - break; - case '<': totalSize += 4; //SDL_strlen("<"); - break; - case '>': totalSize += 4; //SDL_strlen(">"); - break; - default: - totalSize += 1; - break; - } - } - totalSize += 1; // for '\0' - - char *retBuffer = SDL_malloc(totalSize * sizeof(char)); - if(retBuffer == NULL) { - return NULL; - } - - // escape the string - char *curRetBuffer = retBuffer; - const char *curString = string; - - char character = *curString; - while( (character = *curString++) ) { - - switch(character) { - case '&': - memcpy((void *)curRetBuffer, (void *)"&", 5); - curRetBuffer += 5; - break; - case '\'': - memcpy((void *)curRetBuffer, (void *)"'", 6); - curRetBuffer += 6; - break; - case '"': - memcpy((void *)curRetBuffer, (void *)""", 6); - curRetBuffer += 6; - break; - case '<': - memcpy((void *)curRetBuffer, (void *)"<", 4); - curRetBuffer += 4; - break; - case '>': - memcpy((void *)curRetBuffer, (void *)">", 4); - curRetBuffer += 4; - break; - default: - *curRetBuffer = character; - curRetBuffer += 1; - break; - } - } - - *curRetBuffer = '\0'; - - return retBuffer; -} - - -/* -=================== - - Functions to handle creation of XML elements - -=================== -*/ - -char * -XMLOpenDocument(const char *rootTag, const char *xslStyle) -{ - const char *doctype = "\n"; - - //! \todo refactor this mess - char *style = NULL; - if(xslStyle) { - const char *styleStart = "\n"; - - const int sizeStyleStart = SDL_strlen(styleStart); - const int sizeStyleEnd = SDL_strlen(styleEnd); - const int sizeStyleSheetName = SDL_strlen(xslStyle); - - const int tempSize = sizeStyleStart + sizeStyleEnd + sizeStyleSheetName + 1; - style = SDL_malloc(tempSize); - memset(style, 0, tempSize); - SDL_snprintf(style, tempSize, "%s%s%s", styleStart, xslStyle, styleEnd); - } - - memset(buffer, 0, bufferSize); - SDL_snprintf(buffer, bufferSize, "<%s>", rootTag); - - AddOpenTag(rootTag); - - root = rootTag; // it's fine, as long as rootTag points to static memory? - - char *retBuf = NULL; - if(xslStyle) { - const int doctypeSize = SDL_strlen(doctype); - const int styleSize = SDL_strlen(style); - const int tagSize = SDL_strlen(buffer); - - const int size = doctypeSize + styleSize + tagSize + 1; // extra byte for '\0' - retBuf = SDL_malloc(size); - - SDL_snprintf(retBuf, size, "%s%s%s", doctype, style, buffer); - - SDL_free(style); - } else { - const int doctypeSize = SDL_strlen(doctype); - const int tagSize = SDL_strlen(buffer); - - const int size = doctypeSize + tagSize + 1; // extra byte for '\0' - retBuf = SDL_malloc(size); - - SDL_snprintf(retBuf, size, "%s%s", doctype, buffer); - } - - return retBuf; -} - -char * -XMLCloseDocument() { - return XMLCloseElement(root); -} - -char * -XMLOpenElement(const char *tag) -{ - memset(buffer, 0, bufferSize); - SDL_snprintf(buffer, bufferSize, "<%s>", tag); - - AddOpenTag(tag); - - const int size = SDL_strlen(buffer); - char *ret = SDL_malloc(size + 1); - strncpy(ret, buffer, size); - ret[size] = '\0'; - - return ret; -} - -char * -XMLAddContent(const char *content) -{ - if(ValidateString(content) == 0) { - return NULL; - } - - const char *escapedContent = EscapeString(content); - - if(SDL_strlen(escapedContent) >= bufferSize) { - return NULL; - } - - memset(buffer, 0, bufferSize); - SDL_snprintf(buffer, bufferSize, "%s", escapedContent); - SDL_free((char *)escapedContent); - - const int size = SDL_strlen(buffer); - char *ret = SDL_malloc(size + 1); - strncpy(ret, buffer, size); - ret[size] = '\0'; - - return ret; -} - -char * -XMLCloseElement(const char *tag) -{ - if(ValidateString(tag) == 0) { - return NULL; - } - - int retBufferSize = 150; - char *ret = SDL_malloc(retBufferSize); - memset(ret, 0, retBufferSize); - - // \todo check that element we're trying to close is actually open, - // otherwise it'll cause nesting problems - - // Close the open tags with proper nesting. Closes tags until it finds - // the given tag which is the last tag that will be closed - TagList *openTag = openTags; - while(openTag) { - TagList *temp = openTag->next; - - char *lowOpenTag = ToLowerCase(openTag->tag); - char *lowTag = ToLowerCase(tag); - - const int openTagSize = SDL_strlen(lowOpenTag); - const int tagSize = SDL_strlen(lowTag); - const int compSize = (openTagSize > tagSize) ? openTagSize : tagSize; - - memset(buffer, 0, bufferSize); - - int breakOut = 0; - if(SDL_strncmp(lowOpenTag, lowTag, compSize) == 0) { - breakOut = 1; - SDL_snprintf(buffer, bufferSize, "", tag); - } else { - SDL_snprintf(buffer, bufferSize, "", openTag->tag); - } - - SDL_free(lowOpenTag); - SDL_free(lowTag); - - int bytesLeft = bufferSize - SDL_strlen(ret); - if(bytesLeft) { - strncat(ret, buffer, bytesLeft); - } else { - // \! todo there's probably better way to report an error? - fprintf(stderr, "xml.c | XMLCloseElement: Buffer is full"); - } - - RemoveOpenTag(openTag->tag); - - openTag = temp; - - if(breakOut) { - break; - } - } - - return ret; -} - diff --git a/test/test-automation/src/libSDLtest/xml.h b/test/test-automation/src/libSDLtest/xml.h deleted file mode 100644 index e31019f3b..000000000 --- a/test/test-automation/src/libSDLtest/xml.h +++ /dev/null @@ -1,76 +0,0 @@ -/* - Copyright (C) 2011 Markus Kauppila - - This software is provided 'as-is', without any express or implied - warranty. In no event will the authors be held liable for any damages - arising from the use of this software. - - Permission is granted to anyone to use this software for any purpose, - including commercial applications, and to alter it and redistribute it - freely, subject to the following restrictions: - - 1. The origin of this software must not be misrepresented; you must not - claim that you wrote the original software. If you use this software - in a product, an acknowledgment in the product documentation would be - appreciated but is not required. - 2. Altered source versions must be plainly marked as such, and must not be - misrepresented as being the original software. - 3. This notice may not be removed or altered from any source distribution. -*/ - -#ifndef _XML_H -#define _XML_H - -/*! Defines attribute for XML elements */ -typedef struct Attribute { - const char *attribute; - const char *value; -} Attribute; - - -/*! - * Opens XML document. - * Creates header and start tag for root element. - * - * Note: XML creation is not thread-safe! - * - * \param rootTag Root tag for the XML document - * \param xslStyle Name of the style sheet file. (empty string if no style is used) - * \return The generated XML output - */ -char *XMLOpenDocument(const char *rootTag, const char *xslStyle); - -/*! - * Closes the XML-document. - * Creates end tag for root element and closes other open elements - * with correct nesting. - */ -char *XMLCloseDocument(); - -/*! - * Opens XML-element. - * - * \param tag Element to be opened - */ -char *XMLOpenElement(const char *tag); - -/*! - * Add content to currently open element. - * - * \param content Content for the currently open element - */ -char *XMLAddContent(const char *content); - -/*! - * Closes previously opened element until tag given as parameter is met. - * Enforces proper nesting by not allowing to close elements out-of-order. - * - * Closes all the opened elements until the given element/tag is found - * which will be the last tag to be closed - * - * \param tag Element to close - */ -char *XMLCloseElement(const char *tag); - -#endif - diff --git a/test/test-automation/src/libSDLtest/xml_logger.c b/test/test-automation/src/libSDLtest/xml_logger.c deleted file mode 100644 index e164345f2..000000000 --- a/test/test-automation/src/libSDLtest/xml_logger.c +++ /dev/null @@ -1,674 +0,0 @@ -/* - Copyright (C) 2011 Markus Kauppila - - This software is provided 'as-is', without any express or implied - warranty. In no event will the authors be held liable for any damages - arising from the use of this software. - - Permission is granted to anyone to use this software for any purpose, - including commercial applications, and to alter it and redistribute it - freely, subject to the following restrictions: - - 1. The origin of this software must not be misrepresented; you must not - claim that you wrote the original software. If you use this software - in a product, an acknowledgment in the product documentation would be - appreciated but is not required. - 2. Altered source versions must be plainly marked as such, and must not be - misrepresented as being the original software. - 3. This notice may not be removed or altered from any source distribution. -*/ - -#include -#include -#include - -#include - -#include "../../include/SDL_test.h" - -#include "../runner/logger.h" - -#include "xml.h" -#include "logger_helpers.h" -#include "xml_logger.h" - -/*! Static strings for XML elements */ -const char *documentRoot = "testlog"; -const char *parametersElementName = "parameters"; -const char *parameterElementName = "parameter"; -const char *startTimeElementName = "startTime"; -const char *seedElementName = "seed"; -const char *execKeyElementName = "executionKey"; -const char *numSuitesElementName = "numSuites"; -const char *numTestElementName = "numTests"; -const char *numPassedTestsElementName = "numPassedTests"; -const char *numFailedTestsElementName = "numFailedTests"; -const char *numSkippedTestsElementName = "numSkippedTests"; -const char *endTimeElementName = "endTime"; -const char *totalRuntimeElementName = "totalRuntime"; -const char *suiteElementName = "suite"; -const char *testsPassedElementName = "testsPassed"; -const char *testsFailedElementName = "testsFailed"; -const char *testsSkippedElementName = "testsSkipped"; -const char *testElementName = "test"; -const char *nameElementName = "name"; -const char *descriptionElementName = "description"; -const char *resultElementName = "result"; -const char *resultDescriptionElementName = "resultDescription"; -const char *assertElementName = "assert"; -const char *messageElementName = "message"; -const char *timeElementName = "time"; -const char *assertSummaryElementName = "assertSummary"; -const char *assertCountElementName = "assertCount"; -const char *assertsPassedElementName = "assertsPassed"; -const char *assertsFailedElementName = "assertsFailed"; -const char *logElementName = "log"; - - -/*! Current indentationt level */ -static int indentLevel; - -/*! Logging level of the logger */ -static Level level = LOGGER_TERSE; - -//! Constants for XMLOuputters EOL parameter -#define YES 1 -#define NO 0 - -/*! Controls printing the indentation in relation to line breaks */ -static int prevEOL = YES; - -//! Handle to log file -static FILE *logFile = NULL; - -/* - * Prints out the given xml element etc. - * - * \todo Make the destination of the output changeable (defaults to stdout) - * - * \param currentIndentLevel the indent level of the message - * \param EOL will it print end of line character or not - * \param the XML element itself - * - */ -void -XMLOutputter(const int currentIndentLevel, - int EOL, const char *message) -{ - if(ValidateString(message)) { - int indent = 0; - for( ; indent < currentIndentLevel && prevEOL; ++indent) { - fprintf(logFile, " "); // \todo make configurable? - } - - prevEOL = EOL; - - if(EOL) { - fprintf(logFile, "%s\n", message); - } else { - fprintf(logFile, "%s", message); - } - - fflush(logFile); - } else { - fprintf(logFile, "Error: Tried to output invalid string!"); - } - - SDL_free((char *)message); -} - -void -XMLRunStarted(int parameterCount, char *runnerParameters[], char *runSeed, - time_t eventTime, LoggerData *data) -{ - // Set up the logging destination - if(data->stdoutEnabled) { - logFile = stdout; - } else { - logFile = fopen(data->filename, "w"); - if(logFile == NULL) { - fprintf(stderr, "Log file %s couldn't opened\n", data->filename); - exit(3); - } - } - - // Set up the style sheet - char *xslStylesheet = (char *)data->custom; - level = data->level; - //printf("Debug: %d == %d\n", level, data->level); - - char *output = XMLOpenDocument(documentRoot, xslStylesheet); - XMLOutputter(indentLevel++, YES, output); - - // log harness parameters - output = XMLOpenElement(parametersElementName); - XMLOutputter(indentLevel++, YES, output); - - int counter = 0; - for(counter = 0; counter < parameterCount; counter++) { - char *parameter = runnerParameters[counter]; - - output = XMLOpenElement(parameterElementName); - XMLOutputter(indentLevel++, NO, output); - - output = XMLAddContent(parameter); - XMLOutputter(indentLevel, NO, output); - - output = XMLCloseElement(parameterElementName); - XMLOutputter(--indentLevel, YES, output); - } - - output = XMLCloseElement(parametersElementName); - XMLOutputter(--indentLevel, YES, output); - - // log seed - output = XMLOpenElement(seedElementName); - XMLOutputter(indentLevel++, NO, output); - - output = XMLAddContent(runSeed); - XMLOutputter(indentLevel, NO, output); - - output = XMLCloseElement(seedElementName); - XMLOutputter(--indentLevel, YES, output); - - // log start time - output = XMLOpenElement(startTimeElementName); - XMLOutputter(indentLevel++, NO, output); - - output = XMLAddContent(TimestampToString(eventTime)); - XMLOutputter(indentLevel, NO, output); - - output = XMLCloseElement(startTimeElementName); - XMLOutputter(--indentLevel, YES, output); -} - -void -XMLRunEnded(int testCount, int suiteCount, int testPassCount, int testFailCount, - int testSkippedCount, time_t endTime, double totalRuntime) -{ - // log suite count - char *output = XMLOpenElement(numSuitesElementName); - XMLOutputter(indentLevel++, NO, output); - - output = XMLAddContent(IntToString(suiteCount)); - XMLOutputter(indentLevel, NO, output); - - output = XMLCloseElement(numSuitesElementName); - XMLOutputter(--indentLevel, YES, output); - - // log test count - output = XMLOpenElement(numTestElementName); - XMLOutputter(indentLevel++, NO, output); - - output = XMLAddContent(IntToString(testCount)); - XMLOutputter(indentLevel, NO, output); - - output = XMLCloseElement(numTestElementName); - XMLOutputter(--indentLevel, YES, output); - - // log passed test count - output = XMLOpenElement(numPassedTestsElementName); - XMLOutputter(indentLevel++, NO, output); - - output = XMLAddContent(IntToString(testPassCount)); - XMLOutputter(indentLevel, NO, output); - - output = XMLCloseElement(numPassedTestsElementName); - XMLOutputter(--indentLevel, YES, output); - - // log failed test count - output = XMLOpenElement(numFailedTestsElementName); - XMLOutputter(indentLevel++, NO, output); - - output = XMLAddContent(IntToString(testFailCount)); - XMLOutputter(indentLevel, NO, output); - - output = XMLCloseElement(numFailedTestsElementName); - XMLOutputter(--indentLevel, YES, output); - - // log skipped test count - output = XMLOpenElement(numSkippedTestsElementName); - XMLOutputter(indentLevel++, NO, output); - - output = XMLAddContent(IntToString(testSkippedCount)); - XMLOutputter(indentLevel, NO, output); - - output = XMLCloseElement(numSkippedTestsElementName); - XMLOutputter(--indentLevel, YES, output); - - // log end tite - output = XMLOpenElement(endTimeElementName); - XMLOutputter(indentLevel++, NO, output); - - output = XMLAddContent(TimestampToString(endTime)); - XMLOutputter(indentLevel, NO, output); - - output = XMLCloseElement(endTimeElementName); - XMLOutputter(--indentLevel, YES, output); - - // log total runtime - output = XMLOpenElement(totalRuntimeElementName); - XMLOutputter(indentLevel++, NO, output); - - output = XMLAddContent(DoubleToString(totalRuntime)); - XMLOutputter(indentLevel, NO, output); - - output = XMLCloseElement(totalRuntimeElementName); - XMLOutputter(--indentLevel, YES, output); - - output = XMLCloseDocument(documentRoot); - XMLOutputter(--indentLevel, YES, output); - - // close the log file - fclose(logFile); -} - -void -XMLSuiteStarted(const char *suiteName, time_t eventTime) -{ - // log suite name - char *output = XMLOpenElement(suiteElementName); - XMLOutputter(indentLevel++, YES, output); - - output = XMLOpenElement(nameElementName); - XMLOutputter(indentLevel++, NO, output); - - output = XMLAddContent(suiteName); - XMLOutputter(indentLevel, NO, output); - - // log test name - output = XMLCloseElement(nameElementName); - XMLOutputter(--indentLevel, YES, output); - - output = XMLOpenElement(startTimeElementName); - XMLOutputter(indentLevel++, NO, output); - - // log beginning time - output = XMLAddContent(TimestampToString(eventTime)); - XMLOutputter(indentLevel, NO, output); - - output = XMLCloseElement(startTimeElementName); - XMLOutputter(--indentLevel, YES, output); -} - -void -XMLSuiteEnded(int testsPassed, int testsFailed, int testsSkipped, - time_t endTime, double totalRuntime) -{ - // log tests passed - char *output = XMLOpenElement(testsPassedElementName); - XMLOutputter(indentLevel++, NO, output); - - output = XMLAddContent(IntToString(testsPassed)); - XMLOutputter(indentLevel, NO, output); - - output = XMLCloseElement(testsPassedElementName); - XMLOutputter(--indentLevel, YES, output); - - // log tests failed - output = XMLOpenElement(testsFailedElementName); - XMLOutputter(indentLevel++, NO, output); - - output = XMLAddContent(IntToString(testsFailed)); - XMLOutputter(indentLevel, NO, output); - - output = XMLCloseElement(testsFailedElementName); - XMLOutputter(--indentLevel, YES, output); - - // log tests skipped - output = XMLOpenElement(testsSkippedElementName); - XMLOutputter(indentLevel++, NO, output); - - output = XMLAddContent(IntToString(testsSkipped)); - XMLOutputter(indentLevel, NO, output); - - output = XMLCloseElement(testsSkippedElementName); - XMLOutputter(--indentLevel, YES, output); - - // log tests skipped - output = XMLOpenElement(endTimeElementName); - XMLOutputter(indentLevel++, NO, output); - - output = XMLAddContent(TimestampToString(endTime)); - XMLOutputter(indentLevel, NO, output); - - output = XMLCloseElement(endTimeElementName); - XMLOutputter(--indentLevel, YES, output); - - // log total runtime - output = XMLOpenElement(totalRuntimeElementName); - XMLOutputter(indentLevel++, NO, output); - - output = XMLAddContent(DoubleToString(totalRuntime)); - XMLOutputter(indentLevel, NO, output); - - output = XMLCloseElement(totalRuntimeElementName); - XMLOutputter(--indentLevel, YES, output); - - - output = XMLCloseElement(suiteElementName); - XMLOutputter(--indentLevel, YES, output); -} - -void -XMLTestStarted(const char *testName, const char *suiteName, - const char *testDescription, Uint64 execKey, time_t startTime) -{ - char * output = XMLOpenElement(testElementName); - XMLOutputter(indentLevel++, YES, output); - - // log test name - output = XMLOpenElement(nameElementName); - XMLOutputter(indentLevel++, NO, output); - - output = XMLAddContent(testName); - XMLOutputter(indentLevel, NO, output); - - output = XMLCloseElement(nameElementName); - XMLOutputter(--indentLevel, YES, output); - - // log test description - output = XMLOpenElement(descriptionElementName); - XMLOutputter(indentLevel++, NO, output); - - output = XMLAddContent(testDescription); - XMLOutputter(indentLevel, NO, output); - - output = XMLCloseElement(descriptionElementName); - XMLOutputter(--indentLevel, YES, output); - - // log execution key - output = XMLOpenElement(execKeyElementName); - XMLOutputter(indentLevel++, NO, output); - - output = XMLAddContent(IntToHexString(execKey)); - XMLOutputter(indentLevel, NO, output); - - output = XMLCloseElement(execKeyElementName); - XMLOutputter(--indentLevel, YES, output); - - // log start time - output = XMLOpenElement(startTimeElementName); - XMLOutputter(indentLevel++, NO, output); - - output = XMLAddContent(TimestampToString(startTime)); - XMLOutputter(indentLevel, NO, output); - - output = XMLCloseElement(startTimeElementName); - XMLOutputter(--indentLevel, YES, output); -} - -void -XMLTestEnded(const char *testName, const char *suiteName, - int testResult, time_t endTime, double totalRuntime) -{ - // Log test result - char *output = XMLOpenElement(resultElementName); - XMLOutputter(indentLevel++, NO, output); - - switch(testResult) { - case TEST_RESULT_PASS: - output = XMLAddContent("passed"); - break; - case TEST_RESULT_FAILURE: - output = XMLAddContent("failed"); - break; - case TEST_RESULT_NO_ASSERT: - output = XMLAddContent("failed"); - break; - case TEST_RESULT_SKIPPED: - output = XMLAddContent("skipped"); - break; - case TEST_RESULT_KILLED: - output = XMLAddContent("failed"); - break; - case TEST_RESULT_SETUP_FAILURE: - output = XMLAddContent("failed"); - break; - } - XMLOutputter(indentLevel, NO, output); - - output = XMLCloseElement(resultElementName); - XMLOutputter(--indentLevel, YES, output); - - // Log description of test result. Why the test failed, - // if there's some specific reason - output = XMLOpenElement(resultDescriptionElementName); - XMLOutputter(indentLevel++, NO, output); - - switch(testResult) { - case TEST_RESULT_PASS: - case TEST_RESULT_FAILURE: - case TEST_RESULT_SKIPPED: - output = XMLAddContent(""); - break; - case TEST_RESULT_NO_ASSERT: - output = XMLAddContent("No assert"); - break; - case TEST_RESULT_KILLED: - output = XMLAddContent("Timeout exceeded"); - break; - case TEST_RESULT_SETUP_FAILURE: - output = XMLAddContent("Setup failure, couldn't be executed"); - break; - } - XMLOutputter(indentLevel, NO, output); - - output = XMLCloseElement(resultDescriptionElementName); - XMLOutputter(--indentLevel, YES, output); - - // log total runtime - output = XMLOpenElement(endTimeElementName); - XMLOutputter(indentLevel++, NO, output); - - output = XMLAddContent(TimestampToString(endTime)); - XMLOutputter(indentLevel, NO, output); - - output = XMLCloseElement(endTimeElementName); - XMLOutputter(--indentLevel, YES, output); - - // log total runtime - output = XMLOpenElement(totalRuntimeElementName); - XMLOutputter(indentLevel++, NO, output); - - output = XMLAddContent(DoubleToString(totalRuntime)); - XMLOutputter(indentLevel, NO, output); - - output = XMLCloseElement(totalRuntimeElementName); - XMLOutputter(--indentLevel, YES, output); - - output = XMLCloseElement(testElementName); - XMLOutputter(--indentLevel, YES, output); -} - -void -XMLAssert(const char *assertName, int assertResult, const char *assertMessage, - time_t eventTime) -{ - // Log passed asserts only on VERBOSE level - if(level <= LOGGER_TERSE && assertResult == ASSERT_PASS) { - return ; - } - - char *output = XMLOpenElement(assertElementName); - XMLOutputter(indentLevel++, YES, output); - - // log assert name - output = XMLOpenElement(nameElementName); - XMLOutputter(indentLevel++, NO, output); - - output = XMLAddContent(assertName); - XMLOutputter(indentLevel, NO, output); - - output = XMLCloseElement(nameElementName); - XMLOutputter(--indentLevel, YES, output); - - - // log assert result - output = XMLOpenElement(resultElementName); - XMLOutputter(indentLevel++, NO, output); - - output = XMLAddContent((assertResult) ? "pass" : "failure"); - XMLOutputter(indentLevel, NO, output); - - output = XMLCloseElement(resultElementName); - XMLOutputter(--indentLevel, YES, output); - - // log assert message - output = XMLOpenElement(messageElementName); - XMLOutputter(indentLevel++, NO, output); - - output = XMLAddContent(assertMessage); - XMLOutputter(indentLevel, NO, output); - - output = XMLCloseElement(messageElementName); - XMLOutputter(--indentLevel, YES, output); - - // log event time - output = XMLOpenElement(timeElementName); - XMLOutputter(indentLevel++, NO, output); - - output = XMLAddContent(TimestampToString(eventTime)); - XMLOutputter(indentLevel, NO, output); - - output = XMLCloseElement(timeElementName); - XMLOutputter(--indentLevel, YES, output); - - output = XMLCloseElement(assertElementName); - XMLOutputter(--indentLevel, YES, output); -} - -void -XMLAssertWithValues(const char *assertName, int assertResult, const char *assertMessage, - int actualValue, int excpected, time_t eventTime) -{ - // Log passed asserts only on VERBOSE level - if(level <= LOGGER_TERSE && assertResult == ASSERT_PASS) { - return ; - } - - char *output = XMLOpenElement(assertElementName); - XMLOutputter(indentLevel++, YES, output); - - // log assert name - output = XMLOpenElement(nameElementName); - XMLOutputter(indentLevel++, NO, output); - - output = XMLAddContent(assertName); - XMLOutputter(indentLevel, NO, output); - - output = XMLCloseElement(nameElementName); - XMLOutputter(--indentLevel, YES, output); - - - // log assert result - output = XMLOpenElement(resultElementName); - XMLOutputter(indentLevel++, NO, output); - - output = XMLAddContent((assertResult) ? "pass" : "failure"); - XMLOutputter(indentLevel, NO, output); - - output = XMLCloseElement(resultElementName); - XMLOutputter(--indentLevel, YES, output); - - // log assert message - output = XMLOpenElement(messageElementName); - XMLOutputter(indentLevel++, NO, output); - - output = XMLAddContent(assertMessage); - XMLOutputter(indentLevel, NO, output); - - output = XMLCloseElement(messageElementName); - XMLOutputter(--indentLevel, YES, output); - - // log event time - output = XMLOpenElement(timeElementName); - XMLOutputter(indentLevel++, NO, output); - - output = XMLAddContent(TimestampToString(eventTime)); - XMLOutputter(indentLevel, NO, output); - - output = XMLCloseElement(timeElementName); - XMLOutputter(--indentLevel, YES, output); - - output = XMLCloseElement(assertElementName); - XMLOutputter(--indentLevel, YES, output); -} - -void -XMLAssertSummary(int numAsserts, int numAssertsFailed, - int numAssertsPass, time_t eventTime) -{ - char *output = XMLOpenElement(assertSummaryElementName); - XMLOutputter(indentLevel++, YES, output); - - output = XMLOpenElement(assertCountElementName); - XMLOutputter(indentLevel++, NO, output); - - output = XMLAddContent(IntToString(numAsserts)); - XMLOutputter(indentLevel, NO, output); - - output = XMLCloseElement(assertCountElementName); - XMLOutputter(--indentLevel, YES, output); - - output = XMLOpenElement(assertsPassedElementName); - XMLOutputter(indentLevel++, NO, output); - - output = XMLAddContent(IntToString(numAssertsPass)); - XMLOutputter(indentLevel, NO, output); - - output = XMLCloseElement(assertsPassedElementName); - XMLOutputter(--indentLevel, YES, output); - - output = XMLOpenElement(assertsFailedElementName); - XMLOutputter(indentLevel++, NO, output); - - output = XMLAddContent(IntToString(numAsserts)); - XMLOutputter(indentLevel, NO, output); - - output = XMLCloseElement(assertsFailedElementName); - XMLOutputter(--indentLevel, YES, output); - - output = XMLCloseElement(assertSummaryElementName); - XMLOutputter(--indentLevel, YES, output); -} - -void -XMLLog(time_t eventTime, char *fmt, ...) -{ - // create the log message - va_list args; - char logMessage[1024]; - memset(logMessage, 0, sizeof(logMessage)); - - va_start( args, fmt ); - SDL_vsnprintf( logMessage, sizeof(logMessage), fmt, args ); - va_end( args ); - - char *output = XMLOpenElement(logElementName); - XMLOutputter(indentLevel++, YES, output); - - // log message - output = XMLOpenElement(messageElementName); - XMLOutputter(indentLevel++, NO, output); - - // fix this here! - output = XMLAddContent(logMessage); - XMLOutputter(indentLevel, NO, output); - - output = XMLCloseElement(messageElementName); - XMLOutputter(--indentLevel, YES, output); - - // log eventTime - output = XMLOpenElement(timeElementName); - XMLOutputter(indentLevel++, NO, output); - - output = XMLAddContent(TimestampToString(eventTime)); - XMLOutputter(indentLevel, NO, output); - - output = XMLCloseElement(timeElementName); - XMLOutputter(--indentLevel, YES, output); - - output = XMLCloseElement(logElementName); - XMLOutputter(--indentLevel, YES, output); -} diff --git a/test/test-automation/src/libSDLtest/xml_logger.h b/test/test-automation/src/libSDLtest/xml_logger.h deleted file mode 100644 index fc04c52f1..000000000 --- a/test/test-automation/src/libSDLtest/xml_logger.h +++ /dev/null @@ -1,140 +0,0 @@ -/* - Copyright (C) 2011 Markus Kauppila - - This software is provided 'as-is', without any express or implied - warranty. In no event will the authors be held liable for any damages - arising from the use of this software. - - Permission is granted to anyone to use this software for any purpose, - including commercial applications, and to alter it and redistribute it - freely, subject to the following restrictions: - - 1. The origin of this software must not be misrepresented; you must not - claim that you wrote the original software. If you use this software - in a product, an acknowledgment in the product documentation would be - appreciated but is not required. - 2. Altered source versions must be plainly marked as such, and must not be - misrepresented as being the original software. - 3. This notice may not be removed or altered from any source distribution. -*/ - -#ifndef _XML_LOGGER_H -#define _XML_LOGGER_H - -#include - -#include "../runner/logger.h" - -/*! - * Prints out information about starting the test run in XML - * - * \param parameterCount How many parameters were given - * \param runnerParameters What parameters were given to the runner - * \param runSeed Fuzzer seed of the harness - * \param eventTime When the execution started - * \param data LoggerData structure which contains data for the logger - */ -void XMLRunStarted(int parameterCount, char *runnerParameters[], char *runSeed, - time_t eventTime, LoggerData *data); - -/*! - * Prints out information about ending the test run in XML - * - * \param testCount How many tests were executed in total - * \param suiteCount How many suite were executed in total - * \param testPassCount How many tests passed in total - * \param testFailCount How many tests failed in total - * \param testSkippedCount How many tests were skipped in total - * \param endTime When the execution ended - * \param totalRuntime How long the execution took - */ -void XMLRunEnded(int testCount, int suiteCount, int testPassCount, int testFailCount, - int testSkippedCount, time_t endTime, double totalRuntime); - -/*! - * Prints the data about the test suite that'll be executed next in XML - * - * \param suiteName Name of the test suite - * \param eventTime When the execution starts - */ -void XMLSuiteStarted(const char *suiteName, time_t eventTime); - -/*! - * Prints information about the test suite that was just executed in XML - * - * \param testsPassed how many tests passed from this suite - * \param testsFailed how many tests failed from this suite - * \param testsSkipped how many tests were skipped (not implemented) - * \param endTime When the suite execution ended - * \param totalRuntime How long did the suite's execution take - */ -void XMLSuiteEnded(int testsPassed, int testsFailed, int testsSkipped, - time_t endTime, double totalRuntime); - -/*! - * Prints the data about the test test that'll be executed next in XML - * - * \param testName Name of the test that'll be executed - * \param suiteName Name of the suite of the test - * \param testDescription Description of the test - * \param execKey Execution key for fuzzing - * \param startTime When the test started to execute - */ -void XMLTestStarted(const char *testName, const char *suiteName, - const char *testDescription, Uint64 execKey, time_t startTime); - -/*! - * Prints information about the test test that was just executed in XML - * - * \param testName Name of the executed test - * \param suiteName Name of the suite of the test - * \param testResult Did the test fail (!= 0) or pass (== 0) - * \param endTime When the test execution ended - * \param totalRuntime Total runtime of the executed test - */ -void XMLTestEnded(const char *testName, const char *suiteName, - int testResult, time_t endTime, double totalRuntime); - -/*! - * Prints information about plain assert in XML - * - * \param assertName Name of the assert - * \param assertResult Did assert fail (== 0) or success (!= 0) - * \param assertMessage Message of the assert - * \param eventTime When the assert happened - */ -void XMLAssert(const char *assertName, int assertResult, const char *assertMessage, - time_t eventTime); - -/*! - * Prints information about assert that has actual and expected values in XML - * - * \param assertName Name of the assert - * \param assertResult Did assert fail (== 0) or success (!= 0) - * \param assertMessage Message of the assert - * \param actualValue Actual value of assert - * \param expected Excepted value of assert - * \param eventTime When the assert happened - */ -void XMLAssertWithValues(const char *assertName, int assertResult, const char *assertMessage, - int actualValue, int expected, time_t eventTime); - -/*! - * Prints summary of all assertions of certain tests in XML - * - * \param numAsserts Total assert count for the executed test - * \param numAssertsFailed Count of failed asserts in the test - * \param numAssertsPass Count of passed asserts in the test - * \param eventTime Timestamp of the summary - */ -void XMLAssertSummary(int numAsserts, int numAssertsFailed, int numAssertsPass, time_t eventTime); - -/*! - * Prints given message in XML - * - * \param eventTime Timestamp for log message - * \param fmt Message to be logged - */ -void XMLLog(time_t eventTime, char *fmt, ...); - -#endif diff --git a/test/test-automation/src/runner/Makefile.am b/test/test-automation/src/runner/Makefile.am deleted file mode 100644 index f9e14ab37..000000000 --- a/test/test-automation/src/runner/Makefile.am +++ /dev/null @@ -1,7 +0,0 @@ -INCLUDE = -I../libSDLtest -I../../include - -bin_PROGRAMS = runner -runner_SOURCES = runner.c support.c -runner_LDADD = ../libSDLtest/libSDLtest.la -runner_CFLAGS = -W -Wall -Wextra -g `sdl-config --cflags` -DSDL_NO_COMPAT -runner_LDFLAGS = `sdl-config --libs` diff --git a/test/test-automation/src/runner/logger.h b/test/test-automation/src/runner/logger.h deleted file mode 100644 index 3c8538261..000000000 --- a/test/test-automation/src/runner/logger.h +++ /dev/null @@ -1,91 +0,0 @@ -/* - Copyright (C) 2011 Markus Kauppila - - This software is provided 'as-is', without any express or implied - warranty. In no event will the authors be held liable for any damages - arising from the use of this software. - - Permission is granted to anyone to use this software for any purpose, - including commercial applications, and to alter it and redistribute it - freely, subject to the following restrictions: - - 1. The origin of this software must not be misrepresented; you must not - claim that you wrote the original software. If you use this software - in a product, an acknowledgment in the product documentation would be - appreciated but is not required. - 2. Altered source versions must be plainly marked as such, and must not be - misrepresented as being the original software. - 3. This notice may not be removed or altered from any source distribution. -*/ - -#ifndef _LOGGER_H -#define _LOGGER_H - -#include -#include - -/* Logging levels */ -typedef enum LogLevel { - LOGGER_TERSE = 1, - LOGGER_VERBOSE -} Level; - -//! Default logging level -#define LOGGER_DEFAULT_LEVEL LOGGER_TERSE - -//! Contains information for the logger -typedef struct LoggerData { - //! If enabled logger will write to stdout instead of file - int stdoutEnabled; - //!< Name and directory of the log file (ie. logs/runner-seed.log) - char *filename; - //!< Logging level of the logger (such as VERBOSE) - Level level; - //!< Some custom data that a logger needs - char *custom; -} LoggerData; - -/*! - * Typedefs for function pointers that implement the generic - * logging interface. See the headers of implementations (plain_logger.h or - * xml_logger.h) for more information. - */ -typedef void (*RunStartedFp)(int parameterCount, char *runnerParameters[], char *runSeed, time_t eventTime, LoggerData *data); -typedef void (*RunEndedFp)(int testCount, int suiteCount, int testPassCount, int testFailCount, - int testSkippedCount, time_t endTime, double totalRuntime); - -typedef void (*SuiteStartedFp)(const char *suiteName, time_t eventTime); -typedef void (*SuiteEndedFp)(int testsPassed, int testsFailed, int testsSkipped, - time_t endTime, double totalRuntime); - -typedef void (*TestStartedFp)(const char *testName, const char *suiteName, - const char *testDescription, Uint64 execKey, time_t startTime); -typedef void (*TestEndedFp)(const char *testName, const char *suiteName, int testResult, - time_t endTime, double totalRuntime); - -typedef void (*AssertFp)(const char *assertName, int assertResult, - const char *assertMessage, time_t eventTime); - -typedef void (*AssertWithValuesFp)(const char *assertName, int assertResult, - const char *assertMessage, int actualValue, int expected, - time_t eventTime); - -typedef void (*AssertSummaryFp)(int numAsserts, int numAssertsFailed, - int numAssertsPass, time_t eventTime); - -typedef void (*LogFp)(time_t eventTime, char *fmt, ...); - - -/*! Function pointers to actual logging function implementations */ -extern RunStartedFp RunStarted; -extern RunEndedFp RunEnded; -extern SuiteStartedFp SuiteStarted; -extern SuiteEndedFp SuiteEnded; -extern TestStartedFp TestStarted; -extern TestEndedFp TestEnded; -extern AssertFp Assert; -extern AssertWithValuesFp AssertWithValues; -extern AssertSummaryFp AssertSummary; -extern LogFp Log; - -#endif diff --git a/test/test-automation/src/runner/runner.c b/test/test-automation/src/runner/runner.c deleted file mode 100644 index b45b33107..000000000 --- a/test/test-automation/src/runner/runner.c +++ /dev/null @@ -1,1506 +0,0 @@ -/* - Copyright (C) 2011 Markus Kauppila - - This software is provided 'as-is', without any express or implied - warranty. In no event will the authors be held liable for any damages - arising from the use of this software. - - Permission is granted to anyone to use this software for any purpose, - including commercial applications, and to alter it and redistribute it - freely, subject to the following restrictions: - - 1. The origin of this software must not be misrepresented; you must not - claim that you wrote the original software. If you use this software - in a product, an acknowledgment in the product documentation would be - appreciated but is not required. - 2. Altered source versions must be plainly marked as such, and must not be - misrepresented as being the original software. - 3. This notice may not be removed or altered from any source distribution. -*/ - -#include "SDL/SDL.h" - -#include -#include -#include -#include -#include - -#include -#include - -#include "../../include/SDL_test.h" -#include "../../config.h" - -#include "../libSDLtest/fuzzer/fuzzer.h" - -#include "../libSDLtest/plain_logger.h" -#include "../libSDLtest/xml_logger.h" -#include "../libSDLtest/logger_helpers.h" - -#include "logger.h" -#include "support.h" - -//!< Function pointer to a test case function -typedef void (*TestCaseFp)(void *arg); -//!< Function pointer to a test case init function -typedef void (*InitTestInvironmentFp)(Uint64, SDL_bool); -//!< Function pointer to a test case quit function -typedef int (*QuitTestInvironmentFp)(void); -//!< Function pointer to a test case set up function -typedef void (*TestCaseSetUpFp)(void *arg); -//!< Function pointer to a test case tear down function -typedef void (*TestCaseTearDownFp)(void *arg); -//!< Function pointer to a function which returns the failed assert count -typedef int (*CountFailedAssertsFp)(void); - - -//!< Flag for executing tests in-process -static int execute_inproc = 0; - -//!< Flag for only printing out the test names -static int only_print_tests = 0; - -//!< Flag for executing only test with selected name -static int only_selected_test = 0; - -//!< Flag for executing only the selected test suite -static int only_selected_suite = 0; - -//!< Flag for executing only tests that contain certain string in their name -static int only_tests_with_string = 0; - -//!< Flag for enabling XML logging -static int xml_enabled = 0; - -//! Flag for enabling user-supplied style sheet for XML test report -static int custom_xsl_enabled = 0; - -//! Flag for disabling xsl-style from xml report -static int xsl_enabled = 0; - -//! Flag for enabling universal timeout for tests -static int universal_timeout_enabled = 0; - -//! Flag for enabling verbose logging -static int enable_verbose_logger = 0; - -//! Flag for using user supplied run seed -static int userRunSeed = 0; - -//! Whether or not logger should log to stdout instead of file -static int log_stdout_enabled = 1; - -//! Whether or not dummy suite should be included to the test run -static int include_dummy_suite = 0; - -//!< Size of the test and suite name buffers -#define NAME_BUFFER_SIZE 1024 - -//!< Name of the selected test -char selected_test_name[NAME_BUFFER_SIZE]; - -//!< Name of the selected suite -char selected_suite_name[NAME_BUFFER_SIZE]; - -//!< substring of test case name -char testcase_name_substring[NAME_BUFFER_SIZE]; - -//! Name for user-supplied XSL style sheet name -char xsl_stylesheet_name[NAME_BUFFER_SIZE]; - -//! User-suppled timeout value for tests -int universal_timeout = -1; - -//! Default directory of the test suites -#define DEFAULT_TEST_DIRECTORY "tests/" - -//! Default directory for placing log files -#define DEFAULT_LOG_DIRECTORY "logs" - -//! Default directory of the test suites -#define DEFAULT_LOG_FILENAME "testrun" - -//! Defines directory separator -#define DIRECTORY_SEPARATOR '/' - -#define DUMMY_TEST_NAME "libtestdummy" - -//! Name of the default stylesheet -const char *defaultXSLStylesheet = "style.xsl"; - -//! Fuzzer seed for the harness -char *runSeed = NULL; - -//! Execution key that user supplied via command options -Uint64 userExecKey = 0; - -//! How man time a test will be invocated -int testInvocationCount = 1; - -//! Stores the basename for log files -char log_basename[NAME_BUFFER_SIZE]; - -//! Stores directory name for placing the logs -char log_directory[NAME_BUFFER_SIZE]; - -// \todo add comments -int totalTestFailureCount = 0, totalTestPassCount = 0, totalTestSkipCount = 0; -int testFailureCount = 0, testPassCount = 0, testSkipCount = 0; - - -/*! - * Holds information about test suite such as it's name - * and pointer to dynamic library. Implemented as linked list. - */ -typedef struct TestSuiteReference { - char *name; //!< test suite name - char *directoryPath; //!< test suites path (eg. tests/libtestsuite) - void *library; //!< pointer to shared/dynamic library implementing the suite - - struct TestSuiteReference *next; //!< Pointer to next item in the list -} TestSuiteReference; - - -/*! - * Holds information about the tests that will be executed. - * - * Implemented as linked list. - */ -typedef struct TestCaseItem { - char *testName; - char *suiteName; - - char *description; - long requirements; - long timeout; - - InitTestInvironmentFp initTestEnvironment; - TestCaseSetUpFp testSetUp; - TestCaseFp testCase; - TestCaseTearDownFp testTearDown; - QuitTestInvironmentFp quitTestEnvironment; - - CountFailedAssertsFp countFailedAsserts; - - struct TestCaseItem *next; -} TestCase; - - -/*! Some function prototypes. Add the rest of functions and move to runner.h */ -TestCaseFp LoadTestCaseFunction(void *suite, char *testName); -InitTestInvironmentFp LoadInitTestInvironmentFunction(void *suite); -QuitTestInvironmentFp LoadQuitTestInvironmentFunction(void *suite); -TestCaseReference **QueryTestCaseReferences(void *library); -TestCaseSetUpFp LoadTestSetUpFunction(void *suite); -TestCaseTearDownFp LoadTestTearDownFunction(void *suite); -CountFailedAssertsFp LoadCountFailedAssertsFunction(void *suite); -void KillHungTestInChildProcess(int signum); -void UnloadTestSuites(TestSuiteReference *suites); -int FilterTestCase(TestCaseReference *testReference); -int HandleChildProcessReturnValue(int stat_lock); - - -/*! Pointers to selected logger implementation */ -RunStartedFp RunStarted = NULL; -RunEndedFp RunEnded = NULL; -SuiteStartedFp SuiteStarted = NULL; -SuiteEndedFp SuiteEnded = NULL; -TestStartedFp TestStarted = NULL; -TestEndedFp TestEnded = NULL; -AssertFp Assert = NULL; -AssertWithValuesFp AssertWithValues = NULL; -AssertSummaryFp AssertSummary = NULL; -LogFp Log = NULL; - - -/*! - * Scans the tests/ directory and returns the names - * of the dynamic libraries implementing the test suites. - * - * Note: currently function assumes that test suites names - * are in following format: libtestsuite.dylib or libtestsuite.so. - * - * Note: if only_selected_suite flags is non-zero, only the selected - * test will be loaded. - * - * \param directoryName Name of the directory which will be scanned - * \param extension What file extension is used with dynamic objects - * - * \return Pointer to TestSuiteReference which holds all the info about suites - * or NULL on failure - */ -TestSuiteReference * -ScanForTestSuites(char *directoryName, char *extension) -{ - typedef struct dirent Entry; - TestSuiteReference *suites = NULL; - TestSuiteReference *reference = NULL; - Entry *entry = NULL; - DIR *directory = NULL; - - if(directoryName == NULL || extension == NULL || - SDL_strlen(directoryName) == 0 || SDL_strlen(extension) == 0) { - return NULL; - } - - directory = opendir(directoryName); - if(!directory) { - fprintf(stderr, "Failed to open test suite directory: %s\n", directoryName); - perror("Error message"); - exit(2); - } - - while( (entry = readdir(directory)) ) { - // discards . and .. and hidden files starting with dot and directories etc. - if(strlen(entry->d_name) > 2 && entry->d_name[0] != '.' && entry->d_type == DT_REG) { - const char *delimiters = "."; - char *name = strtok(entry->d_name, delimiters); - char *ext = strtok(NULL, delimiters); - - if(name == NULL || ext == NULL) { - goto error; - } - - - int ok = 1; // on default, we want to include all tests - - // filter out all other suites but the selected test suite - if(only_selected_suite) { - ok = SDL_strncmp(selected_suite_name, name, NAME_BUFFER_SIZE) == 0; - } - - if(SDL_strncmp(name, DUMMY_TEST_NAME, NAME_BUFFER_SIZE) == 0) { - if(include_dummy_suite) { - ok = 1; - } else { - ok = 0; - } - } - - if(ok && SDL_strncmp(ext, extension, SDL_strlen(extension)) == 0) { - // create test suite reference - reference = (TestSuiteReference *) SDL_malloc(sizeof(TestSuiteReference)); - if(reference == NULL) { - goto error; - } - - memset(reference, 0, sizeof(TestSuiteReference)); - - const Uint32 dirSize = SDL_strlen(directoryName); - const Uint32 extSize = SDL_strlen(ext); - const Uint32 nameSize = SDL_strlen(name) + 1; - - // copy the name - reference->name = SDL_malloc(nameSize * sizeof(char)); - if(reference->name == NULL) { - goto error; - } - - SDL_snprintf(reference->name, nameSize, "%s", name); - - // copy the directory path - const Uint32 dpSize = dirSize + nameSize + 1 + extSize + 1; - reference->directoryPath = SDL_malloc(dpSize * sizeof(char)); - if(reference->directoryPath == NULL) { - goto error; - } - - SDL_snprintf(reference->directoryPath, dpSize, "%s%s.%s", - directoryName, name, ext); - - reference->next = suites; - suites = reference; - } - } - } - - goto finished; - - error: - if(reference) { - SDL_free(reference->name); - SDL_free(reference->directoryPath); - SDL_free(reference); - } - - // Unload all the suites that are loaded thus far - UnloadTestSuites(suites); - suites = NULL; - - finished: - if(directory) { - closedir(directory); - } - - return suites; -} - - -/*! - * Loads test suite which is implemented as dynamic library. - * - * \param suite Reference to test suite that'll be loaded - * - * \return Pointer to loaded test suite, or NULL if library could not be loaded - */ -void * -LoadTestSuite(const TestSuiteReference *suite) -{ - void *library = SDL_LoadObject(suite->directoryPath); - if(library == NULL) { - fprintf(stderr, "Loading %s failed\n", suite->name); - fprintf(stderr, "%s\n", SDL_GetError()); - } - - return library; -} - - -/*! - * Goes through all the given TestSuiteReferences - * and loads the dynamic libraries. Updates the suites - * parameter on-the-fly and returns it. - * - * \param suites Suites that will be loaded - * - * \return Updated TestSuiteReferences with pointer to loaded libraries - */ -TestSuiteReference * -LoadTestSuites(TestSuiteReference *suites) -{ - TestSuiteReference *reference = NULL; - for(reference = suites; reference; reference = reference->next) { - reference->library = LoadTestSuite(reference); - } - - return suites; -} - - -/*! - * Unloads the given TestSuiteReferences. Frees all - * the allocated resources including the dynamic libraries. - * - * \param suites TestSuiteReferences for deallocation process - */ -void -UnloadTestSuites(TestSuiteReference *suites) -{ - TestSuiteReference *ref = suites; - while(ref) { - if(ref->name) - SDL_free(ref->name); - - if(ref->directoryPath) - SDL_free(ref->directoryPath); - - if(ref->library) - SDL_UnloadObject(ref->library); - - TestSuiteReference *temp = ref->next; - SDL_free(ref); - ref = temp; - } - - suites = NULL; -} - - -/*! - * Goes through the previously loaded test suites and - * loads test cases from them. Test cases are filtered - * during the process. Function will only return the - * test cases which aren't filtered out. - * - * \param suites previously loaded test suites - * - * \return Test cases that survived filtering process. - */ -TestCase * -LoadTestCases(TestSuiteReference *suites) -{ - TestCase *testCases = NULL; - - TestSuiteReference *suiteReference = NULL; - for(suiteReference = suites; suiteReference; suiteReference = suiteReference->next) { - TestCaseReference **tests = QueryTestCaseReferences(suiteReference->library); - - TestCaseReference *testReference = NULL; - int counter = 0; - for(testReference = tests[counter]; testReference; testReference = tests[++counter]) { - //void *suite = suiteReference->library; - - // Load test case functions - InitTestInvironmentFp initTestEnvironment = LoadInitTestInvironmentFunction(suiteReference->library); - QuitTestInvironmentFp quitTestEnvironment = LoadQuitTestInvironmentFunction(suiteReference->library); - - TestCaseSetUpFp testSetUp = LoadTestSetUpFunction(suiteReference->library); - TestCaseTearDownFp testTearDown = LoadTestTearDownFunction(suiteReference->library); - - TestCaseFp testCase = LoadTestCaseFunction(suiteReference->library, testReference->name); - - CountFailedAssertsFp countFailedAsserts = LoadCountFailedAssertsFunction(suiteReference->library); - - // Do the filtering - if(FilterTestCase(testReference)) { - TestCase *item = SDL_malloc(sizeof(TestCase)); - memset(item, 0, sizeof(TestCase)); - - item->initTestEnvironment = initTestEnvironment; - item->quitTestEnvironment = quitTestEnvironment; - - item->testSetUp = testSetUp; - item->testTearDown = testTearDown; - - item->testCase = testCase; - - item->countFailedAsserts = countFailedAsserts; - - // copy suite name - int length = SDL_strlen(suiteReference->name) + 1; - item->suiteName = SDL_malloc(length); - if(item->suiteName == NULL) { - SDL_free(item); - return NULL; - } - strncpy(item->suiteName, suiteReference->name, length); - - // copy test name - length = SDL_strlen(testReference->name) + 1; - item->testName = SDL_malloc(length); - if(item->testName == NULL) { - SDL_free(item->suiteName); - SDL_free(item); - return NULL; - } - strncpy(item->testName, testReference->name, length); - - // copy test description - length = SDL_strlen(testReference->description) + 1; - item->description = SDL_malloc(length); - if(item->description == NULL) { - SDL_free(item->description); - SDL_free(item->suiteName); - SDL_free(item); - return NULL; - } - strncpy(item->description, testReference->description, length); - - item->requirements = testReference->requirements; - item->timeout = testReference->timeout; - - // prepend the list - item->next = testCases; - testCases = item; - - //printf("Added test: %s\n", testReference->name); - } - } - } - - return testCases; -} - - -/*! - * Unloads the given TestCases. Frees all the resources - * allocated for test cases. - * - * \param testCases Test cases to be deallocated - */ -void -UnloadTestCases(TestCase *testCases) -{ - TestCase *ref = testCases; - while(ref) { - if(ref->testName) - SDL_free(ref->testName); - - if(ref->suiteName) - SDL_free(ref->suiteName); - - if(ref->description) - SDL_free(ref->description); - - TestCase *temp = ref->next; - SDL_free(ref); - ref = temp; - } - - testCases = NULL; -} - - -/*! - * Filters a test case based on its properties in TestCaseReference and user - * preference. - * - * \return Non-zero means test will be added to execution list, zero means opposite - */ -int -FilterTestCase(TestCaseReference *testReference) -{ - int retVal = 1; - - if(testReference->enabled == TEST_DISABLED) { - retVal = 0; - } - - if(only_selected_test) { - if(SDL_strncmp(testReference->name, selected_test_name, NAME_BUFFER_SIZE) == 0) { - retVal = 1; - } else { - retVal = 0; - } - } - - if(only_tests_with_string) { - if(strstr(testReference->name, testcase_name_substring) != NULL) { - retVal = 1; - } else { - retVal = 0; - } - } - - return retVal; -} - - -/*! - * Loads the test case references from the given test suite. - - * \param library Previously loaded dynamic library AKA test suite - * \return Pointer to array of TestCaseReferences or NULL if function failed - */ -TestCaseReference ** -QueryTestCaseReferences(void *library) -{ - TestCaseReference **(*suite)(void); - - suite = (TestCaseReference **(*)(void)) SDL_LoadFunction(library, "QueryTestSuite"); - if(suite == NULL) { - fprintf(stderr, "Loading QueryTestCaseReferences() failed.\n"); - fprintf(stderr, "%s\n", SDL_GetError()); - } - - TestCaseReference **tests = suite(); - if(tests == NULL) { - fprintf(stderr, "Failed to load test references.\n"); - fprintf(stderr, "%s\n", SDL_GetError()); - } - - return tests; -} - - -/*! - * Loads test case from a test suite - * - * \param suite a test suite - * \param testName Name of the test that is going to be loaded - * - * \return Function Pointer (TestCase) to loaded test case, NULL if function failed - */ -TestCaseFp -LoadTestCaseFunction(void *suite, char *testName) -{ - TestCaseFp test = (TestCaseFp) SDL_LoadFunction(suite, testName); - if(test == NULL) { - fprintf(stderr, "Loading test %s failed, test == NULL\n", testName); - fprintf(stderr, "%s\n", SDL_GetError()); - } - - return test; -} - - -/*! - * Loads function that sets up a fixture for a test case. Note: if there's - * no SetUp function present in the suite the function will return NULL. - * - * \param suite Used test suite - * - * \return Function pointer to test case's set up function - */ -TestCaseSetUpFp -LoadTestSetUpFunction(void *suite) { - return (TestCaseSetUpFp) SDL_LoadFunction(suite, "SetUp"); -} - - -/*! - * Loads function that tears down a fixture for a test case. Note: if there's - * no TearDown function present in the suite the function will return NULL. - * - * \param suite Used test suite - * - * \return Function pointer to test case's tear down function - */ -TestCaseTearDownFp -LoadTestTearDownFunction(void *suite) { - return (TestCaseTearDownFp) SDL_LoadFunction(suite, "TearDown"); -} - - -/*! - * Loads function that initialises the test environment for - * a test case in the given suite. - * - * \param suite Used test suite - * - * \return Function pointer (InitTestInvironmentFp) which points to loaded init function. NULL if function fails. - */ -InitTestInvironmentFp -LoadInitTestInvironmentFunction(void *suite) { - InitTestInvironmentFp testEnvInit = (InitTestInvironmentFp) SDL_LoadFunction(suite, "_InitTestEnvironment"); - if(testEnvInit == NULL) { - fprintf(stderr, "Loading _InitTestInvironment function failed, testEnvInit == NULL\n"); - fprintf(stderr, "%s\n", SDL_GetError()); - } - - return testEnvInit; -} - - -/*! - * Loads function that deinitialises the test environment (and returns - * the test case's result) created for the test case in the given suite. - * - * \param suite Used test suite - * - * \return Function pointer (QuitTestInvironmentFp) which points to loaded init function. NULL if function fails. - */ -QuitTestInvironmentFp -LoadQuitTestInvironmentFunction(void *suite) { - QuitTestInvironmentFp testEnvQuit = (QuitTestInvironmentFp) SDL_LoadFunction(suite, "_QuitTestEnvironment"); - if(testEnvQuit == NULL) { - fprintf(stderr, "Loading _QuitTestEnvironment function failed, testEnvQuit == NULL\n"); - fprintf(stderr, "%s\n", SDL_GetError()); - } - - return testEnvQuit; -} - - -/*! - * Loads function that returns failed assert count in the current - * test environment - * - * \param suite Used test suite - * - * \return Function pointer to _CountFailedAsserts function - */ -CountFailedAssertsFp -LoadCountFailedAssertsFunction(void *suite) { - CountFailedAssertsFp countFailedAssert = (CountFailedAssertsFp) SDL_LoadFunction(suite, "_CountFailedAsserts"); - if(countFailedAssert == NULL) { - fprintf(stderr, "Loading _CountFailedAsserts function failed, countFailedAssert == NULL\n"); - fprintf(stderr, "%s\n", SDL_GetError()); - } - - return countFailedAssert; -} - -#define USE_SDL_TIMER_FOR_TIMEOUT - -/*! - * Set timeout for test. - * - * \param timeout Timeout interval in seconds! - * \param callback Function that will be called after timeout has elapsed - */ -void -SetTestTimeout(int timeout, void (*callback)(int)) -{ - if(callback == NULL) { - fprintf(stderr, "Error: timeout callback can't be NULL"); - } - - if(timeout < 0) { - fprintf(stderr, "Error: timeout value must be bigger than zero."); - } - - int tm = (timeout > universal_timeout ? timeout : universal_timeout); - -#ifdef USE_SDL_TIMER_FOR_TIMEOUT - /* Init SDL timer if not initialized before */ - if(SDL_WasInit(SDL_INIT_TIMER) == 0) { - if(SDL_InitSubSystem(SDL_INIT_TIMER)) { - fprintf(stderr, "Error: Failed to init timer subsystem"); - fprintf(stderr, "%s\n", SDL_GetError()); - } - } - - /* Note: - * SDL_Init(SDL_INIT_TIMER) should be successfully called before using this - */ - int timeoutInMilliseconds = tm * 1000; - - SDL_TimerID timerID = SDL_AddTimer(timeoutInMilliseconds, (SDL_TimerCallback) callback, 0x0); - if(timerID == 0) { - fprintf(stderr, "Error: Creation of SDL timer failed.\n"); - fprintf(stderr, "Error: %s\n", SDL_GetError()); - } -#else - signal(SIGALRM, callback); - alarm((unsigned int) tm); -#endif -} - - -/*! - * Kills test that hungs. Test hungs when its execution - * takes longer than timeout specified for it. - * - * When test will be killed SIG_ALRM will be triggered and - * it'll call this function which kills the test process. - * - * Note: if runner is executed with --in-proc then hung tests - * can't be killed - * - * \param signum - */ -void -KillHungTestInChildProcess(int signum) -{ - (void)signum; // keeps the compiler silent about unused variable - - exit(TEST_RESULT_KILLED); -} - -/*! - * Checks if given test case can be executed on the current platform. - * - * \param testCase Test to be checked - * \returns 1 if test is runnable, otherwise 0. On error returns -1 - */ -int -CheckTestRequirements(TestCase *testCase) -{ - int retVal = 1; - - if(testCase == NULL) { - fprintf(stderr, "TestCase parameter can't be NULL"); - return -1; - } - - if(testCase->requirements & TEST_REQUIRES_AUDIO) { - retVal = PlatformSupportsAudio(); - } - - if(testCase->requirements & TEST_REQUIRES_STDIO) { - retVal = PlatformSupportsStdio(); - } - - - return retVal; -} - - -/* - * Execute a test. Loads the test, executes it and - * returns the tests return value to the caller. - * - * \param testItem Test to be executed - * \param test result - */ -int -RunTest(TestCase *testCase, Uint64 execKey) -{ - if(!testCase) { - return -1; - } - - int runnable = CheckTestRequirements(testCase); - if(runnable != 1) { - return TEST_RESULT_SKIPPED; - } - - if(testCase->timeout > 0 || universal_timeout > 0) { - if(execute_inproc) { - Log(time(0), "Test asked for timeout which is not supported."); - } - else { - SetTestTimeout(testCase->timeout, KillHungTestInChildProcess); - } - } - - testCase->initTestEnvironment(execKey, execute_inproc); - - if(testCase->testSetUp) { - testCase->testSetUp(0x0); - } - - int cntFailedAsserts = testCase->countFailedAsserts(); - if(cntFailedAsserts != 0) { - return TEST_RESULT_SETUP_FAILURE; - } - - testCase->testCase(0x0); - - if(testCase->testTearDown) { - testCase->testTearDown(0x0); - } - - return testCase->quitTestEnvironment(); -} - - -/*! - * Sets up a test case. Decideds wheter the test will - * be executed in-proc or out-of-proc. - * - * \param testItem The test case that will be executed - * \param execKey Execution key for the test case - * - * \return The return value of the test. Zero means success, non-zero failure. - */ -int -ExecuteTest(TestCase *testItem, Uint64 execKey) { - int retVal = -1; - - if(execute_inproc) { - retVal = RunTest(testItem, execKey); - } else { - int childpid = fork(); - if(childpid == 0) { - exit(RunTest(testItem, execKey)); - } else { - int stat_lock = -1; - wait(&stat_lock); - - retVal = HandleChildProcessReturnValue(stat_lock); - } - } - - if(retVal == TEST_RESULT_SKIPPED) { - testSkipCount++; - totalTestSkipCount++; - } - else if(retVal) { - totalTestFailureCount++; - testFailureCount++; - } - else { - totalTestPassCount++; - testPassCount++; - } - - // return the value for logger - return retVal; -} - - -/*! - * If using out-of-proc execution of tests. This function - * will handle the return value of the child process - * and interprets it to the runner. Also prints warnings - * if child was aborted by a signela. - * - * \param stat_lock information about the exited child process - * - * \return 0 if test case succeeded, 1 otherwise - */ -int -HandleChildProcessReturnValue(int stat_lock) -{ - int returnValue = -1; - - if(WIFEXITED(stat_lock)) { - returnValue = WEXITSTATUS(stat_lock); - } else if(WIFSIGNALED(stat_lock)) { - int signal = WTERMSIG(stat_lock); - // \todo add this to logger (add signal number) - Log(time(0), "FAILURE: test was aborted due to %d\n", signal); - returnValue = 1; - } - - return returnValue; -} - - -/*! - * Generates a random run seed for the harness. Seed - * can contain characters 0-9A-Z - * - * \param length The length of the generated seed - * - * \returns The generated seed - */ -char * -GenerateRunSeed(const int length) -{ - if(length <= 0) { - fprintf(stderr, "Error: length of the harness seed can't be less than zero\n"); - return NULL; - } - - char *seed = SDL_malloc((length + 1) * sizeof(char)); - if(seed == NULL) { - fprintf(stderr, "Error: malloc for run seed failed\n"); - return NULL; - } - - RND_CTX randomContext; - - utl_randomInitTime(&randomContext); - - int counter = 0; - for( ; counter < length - 1; ++counter) { - int number = abs(utl_random(&randomContext)); - char ch = (char) (number % (91 - 48)) + 48; - - if(ch >= 58 && ch <= 64) { - ch = 65; - } - - seed[counter] = ch; - } - - seed[counter] = '\0'; - - return seed; -} - -/*! - * Sets up the logger. - * - * \return Logger data structure (that needs be deallocated) - */ -LoggerData * -SetUpLogger(const int log_stdout_enabled, const int xml_enabled, const int xsl_enabled, - const int custom_xsl_enabled, const char *defaultXslSheet, const time_t timestamp) -{ - LoggerData *loggerData = SDL_malloc(sizeof(LoggerData)); - if(loggerData == NULL) { - fprintf(stderr, "Error: Logger data structure not allocated."); - return NULL; - } - memset(loggerData, 0, sizeof(LoggerData)); - - loggerData->level = (enable_verbose_logger ? LOGGER_VERBOSE : LOGGER_TERSE); - - if(log_stdout_enabled == 1) { - loggerData->stdoutEnabled = 1; - loggerData->filename = NULL; - } else { - loggerData->stdoutEnabled = 0; - - const char *extension = (xml_enabled ? "xml" : "log"); - - // create directory (if it doesn't exist yet) - unsigned int mode = S_IRWXU | S_IRGRP | S_ISUID; - mkdir(log_directory, mode); - - char *timeString = TimestampToStringWithFormat(timestamp, "%Y%m%d_%H:%M:%S"); - - - /* Combine and create directory for log file */ - const Uint32 directoryLength = SDL_strlen(log_directory); - const Uint32 basenameLength = SDL_strlen(log_basename); - const Uint32 seedLength = SDL_strlen(runSeed); - const Uint32 extensionLength = SDL_strlen(extension); - - const Uint32 timeLength = SDL_strlen(timeString); - - // couple of extras bytes for '/', '-', '.' and '\0' at the end - const Uint32 length = directoryLength + basenameLength + seedLength - + extensionLength + timeLength + 5; - - if(length <= 0) { - return NULL; - } - - char *filename = SDL_malloc(length); - if(filename == NULL) { - SDL_free(loggerData); - - fprintf(stderr, "Error: Failed to allocate memory for filename of log"); - return NULL; - } - memset(filename, 0, length); - - SDL_snprintf(filename, length, "%s%c%s-%s-%s.%s", log_directory, - DIRECTORY_SEPARATOR, log_basename, timeString, runSeed, extension); - - loggerData->filename = filename; - } - - if(xml_enabled) { - char *sheet = NULL; - if(xsl_enabled) { - sheet = (char *) defaultXslSheet; - } - - if(custom_xsl_enabled) { - sheet = xsl_stylesheet_name; - } - - loggerData->custom = sheet; - } - - if(xml_enabled) { - RunStarted = XMLRunStarted; - RunEnded = XMLRunEnded; - - SuiteStarted = XMLSuiteStarted; - SuiteEnded = XMLSuiteEnded; - - TestStarted = XMLTestStarted; - TestEnded = XMLTestEnded; - - Assert = XMLAssert; - AssertWithValues = XMLAssertWithValues; - AssertSummary = XMLAssertSummary; - - Log = XMLLog; - } else { - RunStarted = PlainRunStarted; - RunEnded = PlainRunEnded; - - SuiteStarted = PlainSuiteStarted; - SuiteEnded = PlainSuiteEnded; - - TestStarted = PlainTestStarted; - TestEnded = PlainTestEnded; - - Assert = PlainAssert; - AssertWithValues = PlainAssertWithValues; - AssertSummary = PlainAssertSummary; - - Log = PlainLog; - } - - return loggerData; -} - - -/*! - * Prints usage information - */ -void -PrintUsage() { - printf("Usage: ./runner [--in-proc] [--show-tests] [--verbose]\n"); - printf(" [--logfile [BASENAME]] [--logdir DIR] [--xml]\n"); - printf(" [--xsl [STYLESHEET]] [--seed VALUE] [--iterations VALUE]\n"); - printf(" [--exec-key KEY] [--timeout VALUE] [--test TEST]\n"); - printf(" [--name-contains SUBSTR] [--suite SUITE] [--include-dummy]\n"); - printf(" [--version] [--help]\n"); - printf("Options:\n"); - printf(" --in-proc Executes tests in-process\n"); - printf(" --show-tests Prints out all the executable tests\n"); - printf(" -v --verbose Enables verbose logging\n"); - printf(" --logfile [BASENAME] Enables logging to a file. If BASENAME is\n"); - printf(" specified it'll be used as basename for\n"); - printf(" the log file\n"); - printf(" --logdir DIR Define directory for logs. Defaults to 'logs'\n"); - printf(" --xml Enables XML logger\n"); - printf(" --xsl [STYLESHEET] Adds XSL stylesheet to the XML test reports for\n"); - printf(" browser viewing. Optionally uses the specified XSL\n"); - printf(" file or URL instead of the default one\n"); - printf(" --seed VALUE Specify fuzzing seed for the harness\n"); - printf(" --iterations VALUE Specify how many times a test will be executed\n"); - printf(" --exec-key KEY Run test(s) with specific execution key\n"); - printf(" -tm --timeout VALUE Specify common timeout value for all tests\n"); - printf(" Timeout is given in seconds and it'll override\n"); - printf(" test specific timeout value only if the given\n"); - printf(" value is greater than the test specific value\n"); - printf(" note: doesn't work with --in-proc option.\n"); - printf(" -t --test TEST Executes only tests with given name\n"); - printf(" -ts --name-contains SUBSTR Executes only tests that have given\n"); - printf(" substring in test name\n"); - printf(" -s --suite SUITE Executes only the given test suite\n"); - printf(" --include-dummy Includes dummy test suite in the test run\n"); - - printf(" --version Print version information\n"); - printf(" -h --help Print this help\n"); -} - - -/*! - * Parse command line arguments - * - * \param argc Count of command line arguments - * \param argv Array of commond lines arguments - */ -void -ParseOptions(int argc, char *argv[]) -{ - int i; - - for (i = 1; i < argc; ++i) { - const char *arg = argv[i]; - if(SDL_strcmp(arg, "--in-proc") == 0) { - execute_inproc = 1; - } - else if(SDL_strcmp(arg, "--show-tests") == 0) { - only_print_tests = 1; - } - else if(SDL_strcmp(arg, "--xml") == 0) { - xml_enabled = 1; - } - else if(SDL_strcmp(arg, "--verbose") == 0 || SDL_strcmp(arg, "-v") == 0) { - enable_verbose_logger = 1; - } - else if(SDL_strcmp(arg, "--logdir") == 0) { - char *dirString = NULL; - - if( (i + 1) < argc && argv[i+1][0] != '-') { - dirString = argv[++i]; - } else { - printf("runner: dir is missing\n"); - PrintUsage(); - exit(1); - } - - memset(log_directory, 0, NAME_BUFFER_SIZE); - memcpy(log_directory, dirString, SDL_strlen(dirString)); - - log_stdout_enabled = 0; - } - else if(SDL_strcmp(arg, "--logfile") == 0) { - char *fileString = NULL; - - if( (i + 1) < argc && argv[i+1][0] != '-') { - fileString = argv[++i]; - } else { - fileString = DEFAULT_LOG_FILENAME; - } - - memset(log_basename, 0, NAME_BUFFER_SIZE); - memcpy(log_basename, fileString, SDL_strlen(fileString)); - - log_stdout_enabled = 0; - } - else if(SDL_strcmp(arg, "--timeout") == 0 || SDL_strcmp(arg, "-tm") == 0) { - universal_timeout_enabled = 1; - char *timeoutString = NULL; - - if( (i + 1) < argc && argv[i+1][0] != '-') { - timeoutString = argv[++i]; - } else { - printf("runner: timeout is missing\n"); - PrintUsage(); - exit(1); - } - - universal_timeout = atoi(timeoutString); - } - else if(SDL_strcmp(arg, "--seed") == 0) { - userRunSeed = 1; - - if( (i + 1) < argc && argv[i+1][0] != '-') { - runSeed = argv[++i]; - } else { - printf("runner: seed value is missing\n"); - PrintUsage(); - exit(1); - } - //!\todo should the seed be copied to a buffer? - } - else if(SDL_strcmp(arg, "--iterations") == 0) { - char *iterationsString = NULL; - if( (i + 1) < argc && argv[i+1][0] != '-') { - iterationsString = argv[++i]; - } else { - printf("runner: iterations value is missing\n"); - PrintUsage(); - exit(1); - } - - testInvocationCount = atoi(iterationsString); - if(testInvocationCount < 1) { - printf("Iteration value has to bigger than 0.\n"); - exit(1); - } - } - else if(SDL_strcmp(arg, "--exec-key") == 0) { - char *execKeyString = NULL; - if( (i + 1) < argc && argv[i+1][0] != '-') { - execKeyString = argv[++i]; - } else { - printf("runner: execkey value is missing\n"); - PrintUsage(); - exit(1); - } - - int ret = sscanf(execKeyString, "%llx", &userExecKey); - if(ret != 1) { - fprintf(stderr, "Error: Failed to parse exec-key option"); - exit(1); - } - } - else if(SDL_strcmp(arg, "--test") == 0 || SDL_strcmp(arg, "-t") == 0) { - only_selected_test = 1; - char *testName = NULL; - - if( (i + 1) < argc && argv[i+1][0] != '-') { - testName = argv[++i]; - } else { - printf("runner: test name is missing\n"); - PrintUsage(); - exit(1); - } - - memset(selected_test_name, 0, NAME_BUFFER_SIZE); - strncpy(selected_test_name, testName, NAME_BUFFER_SIZE); - } - else if(SDL_strcmp(arg, "--xsl") == 0) { - xsl_enabled = 1; - - if( (i + 1) < argc && argv[i+1][0] != '-') { - char *stylesheet = argv[++i]; - if(stylesheet[0] != '-') { - custom_xsl_enabled = 1; - - memset(xsl_stylesheet_name, 0, NAME_BUFFER_SIZE); - strncpy(xsl_stylesheet_name, stylesheet, NAME_BUFFER_SIZE); - } - } - } - else if(SDL_strcmp(arg, "--name-contains") == 0 || SDL_strcmp(arg, "-ts") == 0) { - only_tests_with_string = 1; - char *substring = NULL; - - if( (i + 1) < argc && argv[i+1][0] != '-') { - substring = argv[++i]; - } else { - printf("runner: substring of test name is missing\n"); - PrintUsage(); - exit(1); - } - - memset(testcase_name_substring, 0, NAME_BUFFER_SIZE); - strncpy(testcase_name_substring, strdup(substring), NAME_BUFFER_SIZE); - } - else if(SDL_strcmp(arg, "--suite") == 0 || SDL_strcmp(arg, "-s") == 0) { - only_selected_suite = 1; - - char *suiteName = NULL; - if( (i + 1) < argc && argv[i+1][0] != '-') { - suiteName = argv[++i]; - } else { - printf("runner: suite name is missing\n"); - PrintUsage(); - exit(1); - } - - memset(selected_suite_name, 0, NAME_BUFFER_SIZE); - strcpy(selected_suite_name, suiteName); - } - else if(SDL_strcmp(arg, "--include-dummy") == 0) { - include_dummy_suite = 1; - } - else if(SDL_strcmp(arg, "--version") == 0) { - fprintf(stdout, "SDL test harness (version %s)\n", PACKAGE_VERSION); - - // print: Testing against SDL version fuu (rev: bar) - - exit(0); - } - else if(SDL_strcmp(arg, "--help") == 0 || SDL_strcmp(arg, "-h") == 0) { - PrintUsage(); - exit(0); - } - else { - printf("runner: unknown command '%s'\n", arg); - PrintUsage(); - exit(0); - } - } -} - -void -InitRunner() -{ - // Inits some global buffers to their default values - memcpy(log_basename, (void *)DEFAULT_LOG_FILENAME, SDL_strlen(DEFAULT_LOG_FILENAME)); - memcpy(log_directory, (void *)DEFAULT_LOG_DIRECTORY, SDL_strlen(DEFAULT_LOG_DIRECTORY)); - - memset(selected_test_name, 0, NAME_BUFFER_SIZE); - memset(selected_suite_name, 0, NAME_BUFFER_SIZE); - memset(testcase_name_substring, 0, NAME_BUFFER_SIZE); - memset(xsl_stylesheet_name, 0, NAME_BUFFER_SIZE); -} - - -/*! - * Entry point for test runner - * - * \param argc Count of command line arguments - * \param argv Array of commond lines arguments - */ -int -main(int argc, char *argv[]) -{ - InitRunner(); - - ParseOptions(argc, argv); - - int suiteCounter = 0; - -#if defined(linux) || defined( __linux) - char *extension = "so"; -#else - char *extension = "dylib"; -#endif - - const Uint32 startTicks = SDL_GetTicks(); - - TestSuiteReference *suites = ScanForTestSuites(DEFAULT_TEST_DIRECTORY, extension); - if(suites == NULL) { - fprintf(stderr, "No test suites loaded.\n"); - fprintf(stderr, "Compile you suites and install them to tests/\n"); - return 2; - } - suites = LoadTestSuites(suites); - - TestCase *testCases = LoadTestCases(suites); - if(testCases == NULL) { - fprintf(stderr, "Found zero test cases\n"); - fprintf(stderr, "Check out your command line options\n"); - return 2; - } - - // if --show-tests option is given, only print tests and exit - if(only_print_tests) { - TestCase *testItem = NULL; - char *lastSuiteName = NULL; - for(testItem = testCases; testItem; testItem = testItem->next) { - if ((lastSuiteName == NULL) || (strcmp(lastSuiteName, testItem->suiteName)!=0)) { - lastSuiteName = testItem->suiteName; - printf ("%s:\n", lastSuiteName); - } - printf(" %s: %s", testItem->testName, testItem->description); - if (testItem->timeout>0) { - printf (" (timeout: %i sec)", testItem->timeout); - } - printf ("\n"); - } - - return 0; - } - - if(userRunSeed == 0) { - runSeed = GenerateRunSeed(16); - if(runSeed == NULL) { - fprintf(stderr, "Error: Generating harness seed failed\n"); - return 2; - } - } - - const time_t startTimestamp = time(0); - - LoggerData *loggerData = SetUpLogger(log_stdout_enabled, xml_enabled, - xsl_enabled, custom_xsl_enabled, defaultXSLStylesheet, startTimestamp); - if(loggerData == NULL) { - printf("Failed to create a logger.\n"); - return 2; - } - - if(log_stdout_enabled == 0) { - printf("Runner is executing the tests.\n"); - if(enable_verbose_logger) { - printf("Logging level is set to verbose.\n"); - } - printf("Test report is created to: %s\n", loggerData->filename); - fflush(stdout); - } - - RunStarted(argc, argv, runSeed, startTimestamp, loggerData); - - // logger data is no longer used so free it - SDL_free(loggerData->filename); - SDL_free(loggerData); - - - // validate the parsed command options - // \todo add a lot more and refactor. There are many more combinations - // of commands that doesn't make sense together - if(execute_inproc && universal_timeout_enabled) { - Log(time(0), "Test timeout is not supported with in-proc execution."); - Log(time(0), "Timeout will be disabled..."); - - universal_timeout_enabled = 0; - universal_timeout = -1; - } /* - if(userExecKey && testInvocationCount > 1 || userRunSeed) { - printf("The given combination of command line options doesn't make sense\n"); - printf("--exec-key should only be used to rerun failed fuzz tests\n"); - }*/ - - char *currentSuiteName = NULL; - int suiteStartTime = SDL_GetTicks(); - - int notFirstSuite = 0; - int startNewSuite = 1; - TestCase *testItem = NULL; - for(testItem = testCases; testItem; testItem = testItem->next) { - if(currentSuiteName && strncmp(currentSuiteName, testItem->suiteName, NAME_BUFFER_SIZE) != 0) { - startNewSuite = 1; - } - - if(startNewSuite) { - if(notFirstSuite) { - const double suiteRuntime = (SDL_GetTicks() - suiteStartTime) / 1000.0f; - - SuiteEnded(testPassCount, testFailureCount, testSkipCount, time(0), - suiteRuntime); - } - - suiteStartTime = SDL_GetTicks(); - - currentSuiteName = testItem->suiteName; - SuiteStarted(currentSuiteName, time(0)); - testFailureCount = testPassCount = testSkipCount = 0; - suiteCounter++; - - startNewSuite = 0; - notFirstSuite = 1; - } - - int currentIteration = testInvocationCount; - while(currentIteration > 0) { - Uint64 execKey = 5; - if(userExecKey != 0) { - execKey = userExecKey; - } else { - execKey = GenerateExecKey(runSeed, testItem->suiteName, - testItem->testName, currentIteration); - } - - TestStarted(testItem->testName, testItem->suiteName, - testItem->description, execKey, time(0)); - - const Uint32 testTimeStart = SDL_GetTicks(); - - int retVal = ExecuteTest(testItem, execKey); - - const double testTotalRuntime = (SDL_GetTicks() - testTimeStart) / 1000.0f; - - TestEnded(testItem->testName, testItem->suiteName, retVal, time(0), testTotalRuntime); - - currentIteration--; - } - } - - if(currentSuiteName) { - SuiteEnded(testPassCount, testFailureCount, testSkipCount, time(0), - (SDL_GetTicks() - suiteStartTime) / 1000.0f); - } - - UnloadTestCases(testCases); - UnloadTestSuites(suites); - - const Uint32 endTicks = SDL_GetTicks(); - const double totalRunTime = (endTicks - startTicks) / 1000.0f; - - RunEnded(totalTestPassCount + totalTestFailureCount + totalTestSkipCount, suiteCounter, - totalTestPassCount, totalTestFailureCount, totalTestSkipCount, time(0), totalRunTime); - - // Some SDL subsystem might be init'ed so shut them down - SDL_Quit(); - - return (totalTestFailureCount ? 1 : 0); -} diff --git a/test/test-automation/src/runner/support.c b/test/test-automation/src/runner/support.c deleted file mode 100644 index e5cbfa599..000000000 --- a/test/test-automation/src/runner/support.c +++ /dev/null @@ -1,75 +0,0 @@ -/* - Copyright (C) 2011 Markus Kauppila - - This software is provided 'as-is', without any express or implied - warranty. In no event will the authors be held liable for any damages - arising from the use of this software. - - Permission is granted to anyone to use this software for any purpose, - including commercial applications, and to alter it and redistribute it - freely, subject to the following restrictions: - - 1. The origin of this software must not be misrepresented; you must not - claim that you wrote the original software. If you use this software - in a product, an acknowledgment in the product documentation would be - appreciated but is not required. - 2. Altered source versions must be plainly marked as such, and must not be - misrepresented as being the original software. - 3. This notice may not be removed or altered from any source distribution. -*/ - -#include "support.h" - -#include - -int -PlatformSupportsAudio() -{ - int retValue = 0; - -#ifdef SDL_AUDIO_DRIVER_COREAUDIO - retValue = 1; -#endif -#ifdef SDL_AUDIO_DRIVER_OSS - retValue = 1; -#endif - - return retValue; -} - -int -PlatformSupportsStdio() -{ - int retValue = 0; - -#ifdef HAVE_STDIO_H - retValue = 1; -#endif - - return retValue; -} - - -/* - -Example of implementing new PlatformSupportXXX functions. The function -should return 1 if the feature is supported. Otherwise return 0. - -Add call to the implemented function to runner.c in function -CheckTestRequirements. Use the current implementation as a guide. - -Also add TEST_REQUIRES_XXX to SDL_test.h and use it in your tests -TestCaseReference. In this case, you'd add TEST_REQUIRES_OPENGL to -SDL_test.h - -int -PlatformSupportsOpenGL() { - int retValue = 0; -#define SDL_VIDEO_OPENGL - retValue = 1; -#endif - - return retValue; -} - -*/ diff --git a/test/test-automation/src/runner/support.h b/test/test-automation/src/runner/support.h deleted file mode 100644 index 03a0faf9f..000000000 --- a/test/test-automation/src/runner/support.h +++ /dev/null @@ -1,39 +0,0 @@ -/* - Copyright (C) 2011 Markus Kauppila - - This software is provided 'as-is', without any express or implied - warranty. In no event will the authors be held liable for any damages - arising from the use of this software. - - Permission is granted to anyone to use this software for any purpose, - including commercial applications, and to alter it and redistribute it - freely, subject to the following restrictions: - - 1. The origin of this software must not be misrepresented; you must not - claim that you wrote the original software. If you use this software - in a product, an acknowledgment in the product documentation would be - appreciated but is not required. - 2. Altered source versions must be plainly marked as such, and must not be - misrepresented as being the original software. - 3. This notice may not be removed or altered from any source distribution. -*/ - -#ifndef _SUPPORT_H -#define _SUPPORT_H - -/*! - * Checks if platform supports audio. - * - * \return 1 if audio is supported, otherwise 0 - */ -int PlatformSupportsAudio(); - -/*! - * Checks if platform supports stdio. - * - * \return 1 if audio is supported, otherwise 0 - */ -int PlatformSupportsStdio(); - - -#endif diff --git a/test/test-automation/style.xsl b/test/test-automation/style.xsl deleted file mode 100644 index 01f800adc..000000000 --- a/test/test-automation/style.xsl +++ /dev/null @@ -1,248 +0,0 @@ - - - - - - - -Test report - - - - - - -

Test Report

-
- Start time:
- Total runtime: seconds.
- Fuzz seed:
- Harness parameters: - - - - - -
- Statistics:
-
- Executed test suites.
- Tests in total: (passed: , failed: , skipped: ) -
-
-
-
- Test Results
- [Show All Tests] | - [Show Everything] -
-
- - -
- Suite: () -
- Tests: passed , failed , skipped .
- Total runtime: seconds.
- [Show tests] -
- -
- Test : - - - - - - - - () - - - - exec-key: - (Total runtime: seconds)
- Description:
- [Show Assert Summary]
-
- -
- : - - - - - - . - Message: -
-
- Asserts in total: (passed: , failed: ) -
-
-
-
-
-
-
-
- - - - -
-
- diff --git a/test/test-automation/tests/testaudio/Makefile.am b/test/test-automation/tests/testaudio/Makefile.am deleted file mode 100644 index 6916c49b5..000000000 --- a/test/test-automation/tests/testaudio/Makefile.am +++ /dev/null @@ -1,4 +0,0 @@ -lib_LTLIBRARIES = libtestaudio.la -libtestaudio_la_SOURCES = testaudio.c -libtestaudio_la_CLAGS = -fPIC -g -libtestaudio_la_LDFLAGS = `sdl-config --libs` -I ../../src/libSDLtest/.libs/libSDLtest.la diff --git a/test/test-automation/tests/testaudio/testaudio.c b/test/test-automation/tests/testaudio/testaudio.c deleted file mode 100644 index 8d1f05ccb..000000000 --- a/test/test-automation/tests/testaudio/testaudio.c +++ /dev/null @@ -1,182 +0,0 @@ -/** - * Original code: automated SDL audio test written by Edgar Simo "bobbens" - * New/updated tests: aschiffler at ferzkopp dot net - */ - -#include - -#include - -#include "../../include/SDL_test.h" - -/* Test cases */ -static const TestCaseReference test1 = - (TestCaseReference){ "audio_enumerateAndNameAudioDevices", "Enumerate and name available audio devices (output and capture)", TEST_ENABLED, TEST_REQUIRES_AUDIO, 0}; - -static const TestCaseReference test2 = - (TestCaseReference){ "audio_enumerateAndNameAudioDevicesNegativeTests", "Netative tests around enumeration and naming of audio devices.", TEST_ENABLED, TEST_REQUIRES_AUDIO, 0}; - -static const TestCaseReference test3 = - (TestCaseReference){ "audio_printAudioDrivers", "Checks available audio driver names.", TEST_ENABLED, TEST_REQUIRES_AUDIO, 0}; - -static const TestCaseReference test4 = - (TestCaseReference){ "audio_printCurrentAudioDriver", "Checks current audio driver name with initialized audio.", TEST_ENABLED, TEST_REQUIRES_AUDIO, 0}; - -/* Test suite */ -extern const TestCaseReference *testSuite[] = { - &test1, &test2, &test3, &test4, NULL -}; - - -TestCaseReference **QueryTestSuite() { - return (TestCaseReference **)testSuite; -} - -/* Fixture */ - -void -SetUp(void *arg) -{ - /* Start SDL. */ - int ret = SDL_Init( SDL_INIT_AUDIO ); - AssertTrue(ret==0, "SDL_Init(SDL_INIT_AUDIO): %s", SDL_GetError()); -} - -void -TearDown(void *arg) -{ - /* Quit SDL. */ - SDL_Quit(); -} - -/* Test case functions */ - -/** - * \brief Enumerate and name available audio devices (output and capture). - * - * \sa http://wiki.libsdl.org/moin.cgi/SDL_GetNumAudioDevices - * \sa http://wiki.libsdl.org/moin.cgi/SDL_GetAudioDeviceName - */ -int audio_enumerateAndNameAudioDevices() -{ - int ret; - int t, tt; - int i, n, nn; - const char *name, *nameAgain; - - /* Iterate over types: t=0 output device, t=1 input/capture device */ - for (t=0; t<2; t++) { - - /* Get number of devices. */ - n = SDL_GetNumAudioDevices(t); - AssertTrue(n>=0, - "Number of %s devices < 0, reported as %i: %s", - (t) ? "output" : "capture", - n, - SDL_GetError()); - - /* Variation of non-zero type */ - if (t==1) { - tt = t + RandomIntegerInRange(1,10); - nn = SDL_GetNumAudioDevices(tt); - AssertTrue(n==nn, "SDL_GetNumAudioDevices(%i) : expected same number of audio devices %i, got %i", tt, n, nn); - nn = SDL_GetNumAudioDevices(-tt); - AssertTrue(n==nn, "SDL_GetNumAudioDevices(%i) : expected same number of audio devices %i, got %i", -tt, n, nn); - } - - /* List devices. */ - if (n>0) { - for (i=0; i0, "SDL_GetAudioDeviceName(%i, %i): returned empty name string", i, t); - if (t==1) { - /* Also try non-zero type */ - nameAgain = SDL_GetAudioDeviceName(i, tt); - AssertTrue(nameAgain != NULL, "SDL_GetAudioDeviceName(%i, %i): returned NULL name", i, tt); - AssertTrue(strlen(nameAgain)>0, "SDL_GetAudioDeviceName(%i, %i): returned empty name string", i, tt); - AssertTrue(strcmp(name, nameAgain)==0, - "SDL_GetAudioDeviceName(%i, %i): returned unexpected name string %s, expected %s", - i, tt, nameAgain, name); - } - } - } - } -} - -/** - * \brief Negative tests around enumeration and naming of audio devices. - * - * \sa http://wiki.libsdl.org/moin.cgi/SDL_GetNumAudioDevices - * \sa http://wiki.libsdl.org/moin.cgi/SDL_GetAudioDeviceName - */ -int audio_enumerateAndNameAudioDevicesNegativeTests() -{ - int ret; - int t; - int i, j, no, nc; - const char *name; - - /* Get number of devices. */ - no = SDL_GetNumAudioDevices(0); - nc = SDL_GetNumAudioDevices(1); - - /* Invalid device index when getting name */ - for (t=0; t<2; t++) { - /* Negative device index */ - i = -1; - name = SDL_GetAudioDeviceName(i, t); - AssertTrue(name == NULL, "SDL_GetAudioDeviceName(%i, %i): returned a name, should return NULL", i, t); - - /* Device index past range */ - for (j=0; j<3; j++) { - i = (t) ? nc+j : no+j; - name = SDL_GetAudioDeviceName(i, t); - AssertTrue(name == NULL, "SDL_GetAudioDeviceName(%i, %i): returned a name, should return NULL", i, t); - } - - /* Capture index past capture range but within output range */ - if ((no>0) && (no>nc) && (t==1)) { - i = no-1; - name = SDL_GetAudioDeviceName(i, t); - AssertTrue(name == NULL, "SDL_GetAudioDeviceName(%i, %i): returned a name, should return NULL", i, t); - } - } -} - -/** - * @brief Checks available audio driver names. - */ -int audio_printAudioDrivers() -{ - int i, n; - const char *name; - - /* Get number of drivers */ - n = SDL_GetNumAudioDrivers(); - AssertTrue(n>=0, "Number of audio drivers >= 0"); - - /* List drivers. */ - if (n>0) - { - for (i=0; i0, "name empty"); - } - } -} - -/** - * @brief Checks current audio driver name with initialized audio. - */ -int audio_printCurrentAudioDriver() -{ - int ret; - const char *name; - - /* Check current audio driver */ - name = SDL_GetCurrentAudioDriver(); - AssertTrue(name != NULL, "name != NULL"); - AssertTrue(strlen(name)>0, "name empty"); -} diff --git a/test/test-automation/tests/testclipboard/Makefile.am b/test/test-automation/tests/testclipboard/Makefile.am deleted file mode 100644 index 4fb4800e7..000000000 --- a/test/test-automation/tests/testclipboard/Makefile.am +++ /dev/null @@ -1,4 +0,0 @@ -lib_LTLIBRARIES = libtestclipboard.la -libtestclipboard_la_SOURCES = testclipboard.c -libtestclipboard_la_CLAGS = -fPIC -g -libtestclipboard_la_LDFLAGS = `sdl-config --libs` -I ../../src/libSDLtest/.libs/libSDLtest.la diff --git a/test/test-automation/tests/testclipboard/testclipboard.c b/test/test-automation/tests/testclipboard/testclipboard.c deleted file mode 100644 index c4ff59d1f..000000000 --- a/test/test-automation/tests/testclipboard/testclipboard.c +++ /dev/null @@ -1,168 +0,0 @@ -#include - -#include - -#include "../../include/SDL_test.h" - - -/*! - * Note: Add test for clipboard here - * - */ - -/* Test cases */ -static const TestCaseReference test1 = - (TestCaseReference){ "clipboard_testHasClipboardText", "Check call to SDL_HasClipboardText", TEST_ENABLED, 0, 0 }; - -static const TestCaseReference test2 = - (TestCaseReference){ "clipboard_testGetClipboardText", "Check call to SDL_GetClipboardText", TEST_ENABLED, 0, 0 }; - -static const TestCaseReference test3 = - (TestCaseReference){ "clipboard_testSetClipboardText", "Check call to SDL_SetClipboardText", TEST_ENABLED, 0, 0 }; - -static const TestCaseReference test4 = - (TestCaseReference){ "clipboard_testClipboardTextFunctions", "End-to-end test of SDL_xyzClipboardText functions", TEST_ENABLED, 0, 0 }; - -/* Test suite */ -extern const TestCaseReference *testSuite[] = { - &test1, &test2, &test3, &test4, NULL -}; - -TestCaseReference **QueryTestSuite() { - return (TestCaseReference **)testSuite; -} - -void -SetUp(void *arg) -{ - /* Start SDL video */ - int ret = SDL_InitSubSystem( SDL_INIT_VIDEO ); - AssertTrue(ret==0, "SDL_Init(SDL_INIT_VIDEO) failed: %s", SDL_GetError()); -} - -void -TearDown(void *arg) -{ - /* Quit SDL video */ - SDL_QuitSubSystem(SDL_INIT_VIDEO); -} - -/** - * \brief Check call to SDL_HasClipboardText - * - * \sa - * http://wiki.libsdl.org/moin.cgi/SDL_HasClipboardText - */ -int -clipboard_testHasClipboardText(void *arg) -{ - SDL_bool result; - result = SDL_HasClipboardText(); - AssertPass("Call to SDL_HasClipboardText succeeded"); -} - -/** - * \brief Check call to SDL_GetClipboardText - * - * \sa - * http://wiki.libsdl.org/moin.cgi/SDL_GetClipboardText - */ -int -clipboard_testGetClipboardText(void *arg) -{ - char *result; - result = SDL_GetClipboardText(); - AssertPass("Call to SDL_GetClipboardText succeeded"); -} - -/** - * \brief Check call to SDL_SetClipboardText - * \sa - * http://wiki.libsdl.org/moin.cgi/SDL_SetClipboardText - */ -int -clipboard_testSetClipboardText(void *arg) -{ - char *textRef = RandomAsciiString(); - char *text = strdup(textRef); - int result; - result = SDL_SetClipboardText((const char *)text); - AssertTrue( - result == 0, - "Call to SDL_SetClipboardText failed with error %i: %s", - result, SDL_GetError()); - AssertTrue( - strcmp(textRef, text) == 0, - "SDL_SetClipboardText modified input string: expected %s, got %s", - textRef, text); - - /* Cleanup */ - if (textRef) free(textRef); - if (text) free(text); -} - - -/** - * \brief End-to-end test of SDL_xyzClipboardText functions - * \sa - * http://wiki.libsdl.org/moin.cgi/SDL_HasClipboardText - * http://wiki.libsdl.org/moin.cgi/SDL_GetClipboardText - * http://wiki.libsdl.org/moin.cgi/SDL_SetClipboardText - */ -int -clipboard_testClipboardTextFunctions(void *arg) -{ - char *textRef = RandomAsciiString(); - char *text = strdup(textRef); - SDL_bool boolResult; - int intResult; - char *charResult; - - /* Clear clipboard text state */ - boolResult = SDL_HasClipboardText(); - if (boolResult == SDL_TRUE) { - intResult = SDL_SetClipboardText((const char *)NULL); - AssertTrue( - intResult == 0, - "Call to SDL_SetClipboardText("") failed with error %i: %s", - intResult, SDL_GetError()); - charResult = SDL_GetClipboardText(); - boolResult = SDL_HasClipboardText(); - AssertTrue( - boolResult == SDL_FALSE, - "SDL_HasClipboardText returned TRUE, expected FALSE"); - } - - /* Empty clipboard */ - charResult = SDL_GetClipboardText(); - AssertTrue( - charResult != NULL, - "SDL_GetClipboardText returned NULL"); - AssertTrue( - strlen(charResult) == 0, - "SDL_GetClipboardText returned string with length >0: got length %i", - strlen(charResult)); - intResult = SDL_SetClipboardText((const char *)text); - AssertTrue( - intResult == 0, - "Call to SDL_SetClipboardText failed with error %i: %s", - intResult, SDL_GetError()); - AssertTrue( - strcmp(textRef, text) == 0, - "SDL_SetClipboardText modified input string: expected %s, got %s", - textRef, text); - boolResult = SDL_HasClipboardText(); - AssertTrue( - boolResult == SDL_TRUE, - "SDL_HasClipboardText returned FALSE, expected TRUE"); - charResult = SDL_GetClipboardText(); - AssertTrue( - strcmp(textRef, charResult) == 0, - "SDL_GetClipboardText did not return correst string: expected %s, got %s", - textRef, charResult); - - /* Cleanup */ - if (textRef) free(textRef); - if (text) free(text); - if (charResult) free(charResult); -} diff --git a/test/test-automation/tests/testdummy/Makefile.am b/test/test-automation/tests/testdummy/Makefile.am deleted file mode 100644 index 2f63bf1ec..000000000 --- a/test/test-automation/tests/testdummy/Makefile.am +++ /dev/null @@ -1,4 +0,0 @@ -lib_LTLIBRARIES = libtestdummy.la -libtestdummy_la_SOURCES = testdummy.c -libtestdummy_la_CLAGS = -fPIC -g -libtestdummy_la_LDFLAGS = `sdl-config --libs` -I ../../src/libSDLtest/.libs/libSDLtest.la diff --git a/test/test-automation/tests/testdummy/testdummy.c b/test/test-automation/tests/testdummy/testdummy.c deleted file mode 100644 index 945a6620f..000000000 --- a/test/test-automation/tests/testdummy/testdummy.c +++ /dev/null @@ -1,172 +0,0 @@ -/* - Copyright (C) 2011 Markus Kauppila - - This software is provided 'as-is', without any express or implied - warranty. In no event will the authors be held liable for any damages - arising from the use of this software. - - Permission is granted to anyone to use this software for any purpose, - including commercial applications, and to alter it and redistribute it - freely, subject to the following restrictions: - - 1. The origin of this software must not be misrepresented; you must not - claim that you wrote the original software. If you use this software - in a product, an acknowledgment in the product documentation would be - appreciated but is not required. - 2. Altered source versions must be plainly marked as such, and must not be - misrepresented as being the original software. - 3. This notice may not be removed or altered from any source distribution. -*/ - -/*! \file - * Dummy test suite for test runner. This can be used as a base for - * writing new tests. Dummy suite also works as reference to using - * various asserts and other (possible) utilities. - */ - -#include -#include - -#include - -#include "../../include/SDL_test.h" - -#include - -/* Test case references */ -static const TestCaseReference test1 = - (TestCaseReference){ "test_dummy1", "description", TEST_ENABLED, 0, 4}; - -static const TestCaseReference test2 = - (TestCaseReference){ "test_dummy2", "description", TEST_ENABLED, 0, 0}; - -static const TestCaseReference test3 = - (TestCaseReference){ "test_fuzzy", "description", TEST_ENABLED, 0, 2}; - -static const TestCaseReference test4 = - (TestCaseReference){ "test_leak", "description", TEST_ENABLED, 0, 2}; - -/* Test suite */ -extern const TestCaseReference *testSuite[] = { - &test1, &test2, &test3, &test4, NULL -}; - - -TestCaseReference **QueryTestSuite() { - return (TestCaseReference **)testSuite; -} - -/* Create test fixture */ - -/*! - * SetUp function can be used to create a test fixture for test cases. - * The function will be called right before executing the test case. - * - * Note: If any assert in the function fails then the test will be skipped. - * In practice, the entire suite will be skipped if assert failure happens. - * - * Note: this function is optional. - * - * \param arg parameters given to test. Usually NULL - */ -void -SetUp(void *arg) -{ - // create test fixture, - // for example, set up static variables used by test cases here -} - -/*! - * TearDown function can be used to destroy a test fixture for test cases. - * The function will be called right after executing the test case. - * - * Note: this function is optional. - * - * \param arg parameters given to test. Usually NULL - */ -void -TearDown(void *arg) -{ - // destroy test fixture -} - -/* Test case functions */ -void -test_dummy1(void *arg) -{ - AssertEquals(5, 5, "Assert message"); - - /* - for( ; 1 ; ) - Log(0, "uint8 (same value): %u", RandomUint32()); - // */ - - //Log(0, "uint8 (same value): %d", RandomUint8BoundaryValue(200, 200, SDL_TRUE)); - - int c = 0; - //for(; c < 100 ; c++) - printf("%f\n", RandomUnitFloat()); - - for(; 0 ; ) - printf("%d\n", RandomSint16()); - - for( ; 0 ; ) { - //Log(0, "sint8: %d", RandomSint8BoundaryValue(-11, 10, SDL_TRUE)); - //Log(0, "sint16: %d", RandomSint16BoundaryValue(SHRT_MIN, SHRT_MAX, SDL_FALSE)); - Log(0, "sint32: %d", RandomSint32BoundaryValue(INT_MIN, 3000, SDL_FALSE)); - //Log(0, "sint64: %lld", RandomSint64BoundaryValue(-34, -34, SDL_FALSE)); - } - - for(; 0 ;) { - //Log(0, "int8: %u", RandomUint8BoundaryValue(0, 255, SDL_FALSE)); - //Log(0, "uint16: %u", RandomUint16BoundaryValue(0, UINT16_MAX, SDL_FALSE)); - //Log(0, "int32: %u", RandomUint32BoundaryValue(0, 0xFFFFFFFE, SDL_FALSE)); - Log(0, "int64: %llu", RandomUint64BoundaryValue(2, 0xFFFFFFFFFFFFFFFE, SDL_FALSE)); - } - - for(; 0 ;) { - int min = -5; - int max = 5; - int random = RandomIntegerInRange(min, max); - if(random < min || random > max ) { - AssertFail("Generated incorrect integer"); - } - Log(0, "%d", random); - } - - //Log(0, "Random: %s", RandomAsciiString()); -} - -void -test_dummy2(void *arg) -{ - char *msg = "eello"; - //msg[0] = 'H'; - AssertTrue(1, "Assert message"); - AssertTrue(0, "Assert message"); - AssertTrue(1, "Assert message"); -} - -void -test_fuzzy(void *arg) -{ - // Simulates a fuzzing failure - AssertTrue(RandomUint8() != 100, "Value is 100"); -} - -static void -f(void) { - int* x = malloc(10 * sizeof(int)); - x[10] = 0; // problem 1: heap block overrun -} // problem 2: memory leak -- x not freed - - -void -test_leak(void *arg) -{ - // Creates a memory leak - f(); - - AssertPass(""); -} - diff --git a/test/test-automation/tests/testevents/Makefile.am b/test/test-automation/tests/testevents/Makefile.am deleted file mode 100644 index 3f545ee08..000000000 --- a/test/test-automation/tests/testevents/Makefile.am +++ /dev/null @@ -1,4 +0,0 @@ -lib_LTLIBRARIES = libtestevents.la -libtestevents_la_SOURCES = testevents.c -libtestevents_la_CLAGS = -fPIC -g -libtestevents_la_LDFLAGS = `sdl-config --libs` -I ../../src/libSDLtest/.libs/libSDLtest.la diff --git a/test/test-automation/tests/testevents/testevents.c b/test/test-automation/tests/testevents/testevents.c deleted file mode 100644 index 3b5b7dc02..000000000 --- a/test/test-automation/tests/testevents/testevents.c +++ /dev/null @@ -1,34 +0,0 @@ -#include - -#include - -#include "../../include/SDL_test.h" - - - -/*! - * Note: Add test for events here - * - */ - -/* Test cases */ -static const TestCaseReference test1 = - (TestCaseReference){ "events_test", "description", TEST_DISABLED, 0, 0 }; - -/* Test suite */ -extern const TestCaseReference *testSuite[] = { - &test1, NULL -}; - -TestCaseReference **QueryTestSuite() { - return (TestCaseReference **)testSuite; -} - -/** - * @brief Document test case here - */ -int -events_test(void *arg) -{ - AssertPass(""); -} diff --git a/test/test-automation/tests/testkeyboard/Makefile.am b/test/test-automation/tests/testkeyboard/Makefile.am deleted file mode 100644 index 4becf49c3..000000000 --- a/test/test-automation/tests/testkeyboard/Makefile.am +++ /dev/null @@ -1,4 +0,0 @@ -lib_LTLIBRARIES = libtestkeyboard.la -libtestkeyboard_la_SOURCES = testkeyboard.c -libtestkeyboard_la_CLAGS = -fPIC -g -libtestkeyboard_la_LDFLAGS = `sdl-config --libs` -I ../../src/libSDLtest/.libs/libSDLtest.la diff --git a/test/test-automation/tests/testkeyboard/testkeyboard.c b/test/test-automation/tests/testkeyboard/testkeyboard.c deleted file mode 100644 index 47240399b..000000000 --- a/test/test-automation/tests/testkeyboard/testkeyboard.c +++ /dev/null @@ -1,34 +0,0 @@ -#include - -#include - -#include "../../include/SDL_test.h" - - - -/*! - * Note: Add test for keyboard here - * - */ - -/* Test cases */ -static const TestCaseReference test1 = - (TestCaseReference){ "keyboard_test", "description", TEST_DISABLED, 0, 0 }; - -/* Test suite */ -extern const TestCaseReference *testSuite[] = { - &test1, NULL -}; - -TestCaseReference **QueryTestSuite() { - return (TestCaseReference **)testSuite; -} - -/** - * @brief Document test case here - */ -int -keyboard_test(void *arg) -{ - AssertPass(""); -} diff --git a/test/test-automation/tests/testplatform/Makefile.am b/test/test-automation/tests/testplatform/Makefile.am deleted file mode 100644 index 0521e7372..000000000 --- a/test/test-automation/tests/testplatform/Makefile.am +++ /dev/null @@ -1,4 +0,0 @@ -lib_LTLIBRARIES = libtestplatform.la -libtestplatform_la_SOURCES = testplatform.c -libtestplatform_la_CLAGS = -fPIC -g -libtestplatform_la_LDFLAGS = `sdl-config --libs` -I ../../src/libSDLtest/.libs/libSDLtest.la diff --git a/test/test-automation/tests/testplatform/testplatform.c b/test/test-automation/tests/testplatform/testplatform.c deleted file mode 100644 index d4fb286bd..000000000 --- a/test/test-automation/tests/testplatform/testplatform.c +++ /dev/null @@ -1,508 +0,0 @@ -/** - * Original code: automated SDL platform test written by Edgar Simo "bobbens" - * Extended and updated by aschiffler at ferzkopp dot net - */ - -#include - -#include - -#include "../../include/SDL_test.h" - -/* Test cases */ -static const TestCaseReference test1 = - (TestCaseReference){ "platform_testTypes", "Tests predefined types", TEST_ENABLED, 0, 0 }; - -static const TestCaseReference test2 = - (TestCaseReference){ "platform_testEndianessAndSwap", "Tests endianess and swap functions", TEST_ENABLED, 0, 0 }; - -static const TestCaseReference test3 = - (TestCaseReference){ "platform_testGetFunctions", "Tests various SDL_GetXYZ functions", TEST_ENABLED, 0, 0 }; - -static const TestCaseReference test4 = - (TestCaseReference){ "platform_testHasFunctions", "Tests various SDL_HasXYZ functions", TEST_ENABLED, 0, 0 }; - -static const TestCaseReference test5 = - (TestCaseReference){ "platform_testGetVersion", "Tests SDL_GetVersion function", TEST_ENABLED, 0, 0 }; - -static const TestCaseReference test6 = - (TestCaseReference){ "platform_testSDLVersion", "Tests SDL_VERSION macro", TEST_ENABLED, 0, 0 }; - -static const TestCaseReference test7 = - (TestCaseReference){ "platform_testDefaultInit", "Tests default SDL_Init", TEST_ENABLED, 0, 0 }; - -static const TestCaseReference test8 = - (TestCaseReference){ "platform_testGetSetClearError", "Tests SDL_Get/Set/ClearError", TEST_ENABLED, 0, 0 }; - -static const TestCaseReference test9 = - (TestCaseReference){ "platform_testSetErrorEmptyInput", "Tests SDL_SetError with empty input", TEST_ENABLED, 0, 0 }; - -static const TestCaseReference test10 = - (TestCaseReference){ "platform_testSetErrorInvalidInput", "Tests SDL_SetError with invalid input", TEST_ENABLED, 0, 0 }; - -static const TestCaseReference test11 = - (TestCaseReference){ "platform_testGetPowerInfo", "Tests SDL_GetPowerInfo function", TEST_ENABLED, 0, 0 }; - -/* Test suite */ -extern const TestCaseReference *testSuite[] = { - &test1, &test2, &test3, &test4, &test5, &test6, &test7, &test8, &test9, &test10, &test11, NULL -}; - -TestCaseReference **QueryTestSuite() { - return (TestCaseReference **)testSuite; -} - -/** - * @brief Compare sizes of types. - * - * @note Watcom C flags these as Warning 201: "Unreachable code" if you just - * compare them directly, so we push it through a function to keep the - * compiler quiet. --ryan. - */ -static int _compareSizeOfType( size_t sizeoftype, size_t hardcodetype ) -{ - return sizeoftype != hardcodetype; -} - -/** - * @brief Tests type sizes. - */ -int platform_testTypes(void *arg) -{ - int ret; - - ret = _compareSizeOfType( sizeof(Uint8), 1 ); - AssertTrue( ret == 0, "sizeof(Uint8) = %lu, expected 1", sizeof(Uint8) ); - - ret = _compareSizeOfType( sizeof(Uint16), 2 ); - AssertTrue( ret == 0, "sizeof(Uint16) = %lu, expected 2", sizeof(Uint16) ); - - ret = _compareSizeOfType( sizeof(Uint32), 4 ); - AssertTrue( ret == 0, "sizeof(Uint32) = %lu, expected 4", sizeof(Uint32) ); - - ret = _compareSizeOfType( sizeof(Uint64), 8 ); - AssertTrue( ret == 0, "sizeof(Uint64) = %lu, expected 8", sizeof(Uint64) ); -} - -/** - * @brief Tests platform endianness and SDL_SwapXY functions. - */ -int platform_testEndianessAndSwap(void *arg) -{ - int real_byteorder; - Uint16 value = 0x1234; - Uint16 value16 = 0xCDAB; - Uint16 swapped16 = 0xABCD; - Uint32 value32 = 0xEFBEADDE; - Uint32 swapped32 = 0xDEADBEEF; - - Uint64 value64, swapped64; - value64 = 0xEFBEADDE; - value64 <<= 32; - value64 |= 0xCDAB3412; - swapped64 = 0x1234ABCD; - swapped64 <<= 32; - swapped64 |= 0xDEADBEEF; - - if ((*((char *) &value) >> 4) == 0x1) { - real_byteorder = SDL_BIG_ENDIAN; - } else { - real_byteorder = SDL_LIL_ENDIAN; - } - - /* Test endianness. */ - AssertTrue( real_byteorder == SDL_BYTEORDER, - "Machine detected as %s endian, appears to be %s endian.", - (SDL_BYTEORDER == SDL_LIL_ENDIAN) ? "little" : "big", - (real_byteorder == SDL_LIL_ENDIAN) ? "little" : "big" ); - - /* Test 16 swap. */ - AssertTrue( SDL_Swap16(value16) == swapped16, - "SDL_Swap16(): 16 bit swapped: 0x%X => 0x%X", - value16, SDL_Swap16(value16) ); - - /* Test 32 swap. */ - AssertTrue( SDL_Swap32(value32) == swapped32, - "SDL_Swap32(): 32 bit swapped: 0x%X => 0x%X", - value32, SDL_Swap32(value32) ); - - /* Test 64 swap. */ - AssertTrue( SDL_Swap64(value64) == swapped64, -#ifdef _MSC_VER - "SDL_Swap64(): 64 bit swapped: 0x%I64X => 0x%I64X", -#else - "SDL_Swap64(): 64 bit swapped: 0x%llX => 0x%llX", -#endif - value64, SDL_Swap64(value64) ); -} - -/*! - * \brief Tests SDL_GetXYZ() functions - * \sa - * http://wiki.libsdl.org/moin.cgi/SDL_GetPlatform - * http://wiki.libsdl.org/moin.cgi/SDL_GetCPUCount - * http://wiki.libsdl.org/moin.cgi/SDL_GetCPUCacheLineSize - * http://wiki.libsdl.org/moin.cgi/SDL_GetRevision - * http://wiki.libsdl.org/moin.cgi/SDL_GetRevisionNumber - */ -int platform_testGetFunctions (void *arg) -{ - char *platform; - char *revision; - int ret; - int len; - - platform = (char *)SDL_GetPlatform(); - AssertPass("SDL_GetPlatform()"); - AssertTrue(platform != NULL, "SDL_GetPlatform() != NULL"); - if (platform != NULL) { - len = strlen(platform); - AssertTrue(len > 0, - "SDL_GetPlatform(): expected non-empty platform, was platform: '%s', len: %i", - platform, - len); - } - - ret = SDL_GetCPUCount(); - AssertPass("SDL_GetCPUCount()"); - AssertTrue(ret > 0, - "SDL_GetCPUCount(): expected count > 0, was: %i", - ret); - - ret = SDL_GetCPUCacheLineSize(); - AssertPass("SDL_GetCPUCacheLineSize()"); - AssertTrue(ret >= 0, - "SDL_GetCPUCacheLineSize(): expected size >= 0, was: %i", - ret); - - revision = (char *)SDL_GetRevision(); - AssertPass("SDL_GetRevision()"); - AssertTrue(revision != NULL, "SDL_GetRevision() != NULL"); - - ret = SDL_GetRevisionNumber(); - AssertPass("SDL_GetRevisionNumber()"); -} - -/*! - * \brief Tests SDL_HasXYZ() functions - * \sa - * http://wiki.libsdl.org/moin.cgi/SDL_Has3DNow - * http://wiki.libsdl.org/moin.cgi/SDL_HasAltiVec - * http://wiki.libsdl.org/moin.cgi/SDL_HasMMX - * http://wiki.libsdl.org/moin.cgi/SDL_HasRDTSC - * http://wiki.libsdl.org/moin.cgi/SDL_HasSSE - * http://wiki.libsdl.org/moin.cgi/SDL_HasSSE2 - * http://wiki.libsdl.org/moin.cgi/SDL_HasSSE3 - * http://wiki.libsdl.org/moin.cgi/SDL_HasSSE41 - * http://wiki.libsdl.org/moin.cgi/SDL_HasSSE42 - */ -int platform_testHasFunctions (void *arg) -{ - int ret; - - // TODO: independently determine and compare values as well - - ret = SDL_HasRDTSC(); - AssertPass("SDL_HasRDTSC()"); - - ret = SDL_HasAltiVec(); - AssertPass("SDL_HasAltiVec()"); - - ret = SDL_HasMMX(); - AssertPass("SDL_HasMMX()"); - - ret = SDL_Has3DNow(); - AssertPass("SDL_Has3DNow()"); - - ret = SDL_HasSSE(); - AssertPass("SDL_HasSSE()"); - - ret = SDL_HasSSE2(); - AssertPass("SDL_HasSSE2()"); - - ret = SDL_HasSSE3(); - AssertPass("SDL_HasSSE3()"); - - ret = SDL_HasSSE41(); - AssertPass("SDL_HasSSE41()"); - - ret = SDL_HasSSE42(); - AssertPass("SDL_HasSSE42()"); -} - -/*! - * \brief Tests SDL_GetVersion - * \sa - * http://wiki.libsdl.org/moin.cgi/SDL_GetVersion - */ -int platform_testGetVersion(void *arg) -{ - SDL_version linked; - - SDL_GetVersion(&linked); - AssertTrue( linked.major >= SDL_MAJOR_VERSION, - "SDL_GetVersion(): returned major %i (>= %i)", - linked.major, - SDL_MAJOR_VERSION); - AssertTrue( linked.minor >= SDL_MINOR_VERSION, - "SDL_GetVersion(): returned minor %i (>= %i)", - linked.minor, - SDL_MINOR_VERSION); -} - -/*! - * \brief Tests SDL_VERSION macro - */ -int platform_testSDLVersion(void *arg) -{ - SDL_version compiled; - - SDL_VERSION(&compiled); - AssertTrue( compiled.major >= SDL_MAJOR_VERSION, - "SDL_VERSION() returned major %i (>= %i)", - compiled.major, - SDL_MAJOR_VERSION); - AssertTrue( compiled.minor >= SDL_MINOR_VERSION, - "SDL_VERSION() returned minor %i (>= %i)", - compiled.minor, - SDL_MINOR_VERSION); -} - -/*! - * \brief Tests default SDL_Init - */ -int platform_testDefaultInit(void *arg) -{ - int ret; - int subsystem; - - ret = SDL_Init(0); - AssertTrue( ret == 0, - "SDL_Init(0): returned %i, expected 0, error: %s", - ret, - SDL_GetError()); - - subsystem = SDL_WasInit(0); - AssertTrue( subsystem == 0, - "SDL_WasInit(0): returned %i, expected 0", - ret); - - SDL_Quit(); -} - -/*! - * \brief Tests SDL_Get/Set/ClearError - * \sa - * http://wiki.libsdl.org/moin.cgi/SDL_GetError - * http://wiki.libsdl.org/moin.cgi/SDL_SetError - * http://wiki.libsdl.org/moin.cgi/SDL_ClearError - */ -int platform_testGetSetClearError(void *arg) -{ - const char *testError = "Testing"; - char *lastError; - int len; - - SDL_ClearError(); - AssertPass("SDL_ClearError()"); - - lastError = (char *)SDL_GetError(); - AssertPass("SDL_GetError()"); - AssertTrue(lastError != NULL, - "SDL_GetError() != NULL"); - if (lastError != NULL) - { - len = strlen(lastError); - AssertTrue(len == 0, - "SDL_GetError(): no message expected, len: %i", len); - } - - SDL_SetError("%s", testError); - AssertPass("SDL_SetError()"); - lastError = (char *)SDL_GetError(); - AssertTrue(lastError != NULL, - "SDL_GetError() != NULL"); - if (lastError != NULL) - { - len = strlen(lastError); - AssertTrue(len == strlen(testError), - "SDL_GetError(): expected message len %i, was len: %i", - strlen(testError), - len); - AssertTrue(strcmp(lastError, testError) == 0, - "SDL_GetError(): expected message %s, was message: %s", - testError, - lastError); - } - - // Clean up - SDL_ClearError(); -} - -/*! - * \brief Tests SDL_SetError with empty input - * \sa - * http://wiki.libsdl.org/moin.cgi/SDL_SetError - */ -int platform_testSetErrorEmptyInput(void *arg) -{ - const char *testError = ""; - char *lastError; - int len; - - SDL_SetError("%s", testError); - AssertPass("SDL_SetError()"); - lastError = (char *)SDL_GetError(); - AssertTrue(lastError != NULL, - "SDL_GetError() != NULL"); - if (lastError != NULL) - { - len = strlen(lastError); - AssertTrue(len == strlen(testError), - "SDL_GetError(): expected message len %i, was len: %i", - strlen(testError), - len); - AssertTrue(strcmp(lastError, testError) == 0, - "SDL_GetError(): expected message '%s', was message: '%s'", - testError, - lastError); - } - - // Clean up - SDL_ClearError(); -} - -/*! - * \brief Tests SDL_SetError with invalid input - * \sa - * http://wiki.libsdl.org/moin.cgi/SDL_SetError - */ -int platform_testSetErrorInvalidInput(void *arg) -{ - const char *testError = NULL; - const char *probeError = "Testing"; - char *lastError; - int len; - - // Reset - SDL_ClearError(); - - // Check for no-op - SDL_SetError(testError); - AssertPass("SDL_SetError()"); - lastError = (char *)SDL_GetError(); - AssertTrue(lastError != NULL, - "SDL_GetError() != NULL"); - if (lastError != NULL) - { - len = strlen(lastError); - AssertTrue(len == 0, - "SDL_GetError(): expected message len 0, was len: %i", - 0, - len); - AssertTrue(strcmp(lastError, "") == 0, - "SDL_GetError(): expected message '', was message: '%s'", - lastError); - } - - // Set - SDL_SetError(probeError); - - // Check for no-op - SDL_SetError(testError); - AssertPass("SDL_SetError()"); - lastError = (char *)SDL_GetError(); - AssertTrue(lastError != NULL, - "SDL_GetError() != NULL"); - if (lastError != NULL) - { - len = strlen(lastError); - AssertTrue(len == strlen(probeError), - "SDL_GetError(): expected message len %i, was len: %i", - strlen(probeError), - len); - AssertTrue(strcmp(lastError, probeError) == 0, - "SDL_GetError(): expected message '%s', was message: '%s'", - probeError, - lastError); - } - - // Clean up - SDL_ClearError(); -} - -/*! - * \brief Tests SDL_GetPowerInfo - * \sa - * http://wiki.libsdl.org/moin.cgi/SDL_GetPowerInfo - */ -int platform_testGetPowerInfo(void *arg) -{ - SDL_PowerState state; - SDL_PowerState stateAgain; - int secs; - int secsAgain; - int pct; - int pctAgain; - - state = SDL_GetPowerInfo(&secs, &pct); - AssertPass("SDL_GetPowerInfo()"); - AssertTrue( - state==SDL_POWERSTATE_UNKNOWN || - state==SDL_POWERSTATE_ON_BATTERY || - state==SDL_POWERSTATE_NO_BATTERY || - state==SDL_POWERSTATE_CHARGING || - state==SDL_POWERSTATE_CHARGED, - "SDL_GetPowerInfo(): state %i is one of the expected values", - (int)state); - - if (state==SDL_POWERSTATE_ON_BATTERY) - { - AssertTrue( - secs >= 0, - "SDL_GetPowerInfo(): on battery, secs >= 0, was: %i", - secs); - AssertTrue( - (pct >= 0) && (pct <= 100), - "SDL_GetPowerInfo(): on battery, pct=[0,100], was: %i", - pct); - } - - if (state==SDL_POWERSTATE_UNKNOWN || - state==SDL_POWERSTATE_NO_BATTERY) - { - AssertTrue( - secs == -1, - "SDL_GetPowerInfo(): no battery, secs == -1, was: %i", - secs); - AssertTrue( - pct == -1, - "SDL_GetPowerInfo(): no battery, pct == -1, was: %i", - pct); - } - - // Partial return value variations - stateAgain = SDL_GetPowerInfo(&secsAgain, NULL); - AssertTrue( - state==stateAgain, - "State %i returned when only 'secs' requested", - stateAgain); - AssertTrue( - secs==secsAgain, - "Value %i matches when only 'secs' requested", - secsAgain); - stateAgain = SDL_GetPowerInfo(NULL, &pctAgain); - AssertTrue( - state==stateAgain, - "State %i returned when only 'pct' requested", - stateAgain); - AssertTrue( - pct==pctAgain, - "Value %i matches when only 'pct' requested", - pctAgain); - stateAgain = SDL_GetPowerInfo(NULL, NULL); - AssertTrue( - state==stateAgain, - "State %i returned when no value requested", - stateAgain); -} diff --git a/test/test-automation/tests/testrect/Makefile.am b/test/test-automation/tests/testrect/Makefile.am deleted file mode 100644 index f45899676..000000000 --- a/test/test-automation/tests/testrect/Makefile.am +++ /dev/null @@ -1,4 +0,0 @@ -lib_LTLIBRARIES = libtestrect.la -libtestrect_la_SOURCES = testrect.c -libtestrect_la_CLAGS = -fPIC -g -libtestrect_la_LDFLAGS = `sdl-config --libs` -I ../../src/libSDLtest/.libs/libSDLtest.la diff --git a/test/test-automation/tests/testrect/testrect.c b/test/test-automation/tests/testrect/testrect.c deleted file mode 100644 index ea2ce6b40..000000000 --- a/test/test-automation/tests/testrect/testrect.c +++ /dev/null @@ -1,1600 +0,0 @@ -/** - * Original code: automated SDL rect test written by Edgar Simo "bobbens" - * New/updated tests: aschiffler at ferzkopp dot net - */ - -#include - -#include - -#include "../../include/SDL_test.h" - -/* SDL_IntersectRectAndLine */ -static const TestCaseReference test1 = - (TestCaseReference){ "rect_testIntersectRectAndLine", "Tests SDL_IntersectRectAndLine clipping cases", TEST_ENABLED, 0, 0 }; - -static const TestCaseReference test2 = - (TestCaseReference){ "rect_testIntersectRectAndLineInside", "Tests SDL_IntersectRectAndLine with line fully contained in rect", TEST_ENABLED, 0, 0 }; - -static const TestCaseReference test3 = - (TestCaseReference){ "rect_testIntersectRectAndLineOutside", "Tests SDL_IntersectRectAndLine with line fully outside of rect", TEST_ENABLED, 0, 0 }; - -static const TestCaseReference test4 = - (TestCaseReference){ "rect_testIntersectRectAndLineEmpty", "Tests SDL_IntersectRectAndLine with empty rectangle ", TEST_ENABLED, 0, 0 }; - -static const TestCaseReference test5 = - (TestCaseReference){ "rect_testIntersectRectAndLineParam", "Negative tests against SDL_IntersectRectAndLine with invalid parameters", TEST_ENABLED, 0, 0 }; - -/* SDL_IntersectRect */ -static const TestCaseReference test6 = - (TestCaseReference){ "rect_testIntersectRectInside", "Tests SDL_IntersectRect with B fully contained in A", TEST_ENABLED, 0, 0 }; - -static const TestCaseReference test7 = - (TestCaseReference){ "rect_testIntersectRectOutside", "Tests SDL_IntersectRect with B fully outside of A", TEST_ENABLED, 0, 0 }; - -static const TestCaseReference test8 = - (TestCaseReference){ "rect_testIntersectRectPartial", "Tests SDL_IntersectRect with B partially intersecting A", TEST_ENABLED, 0, 0 }; - -static const TestCaseReference test9 = - (TestCaseReference){ "rect_testIntersectRectPoint", "Tests SDL_IntersectRect with 1x1 sized rectangles", TEST_ENABLED, 0, 0 }; - -static const TestCaseReference test10 = - (TestCaseReference){ "rect_testIntersectRectEmpty", "Tests SDL_IntersectRect with empty rectangles", TEST_ENABLED, 0, 0 }; - -static const TestCaseReference test11 = - (TestCaseReference){ "rect_testIntersectRectParam", "Negative tests against SDL_IntersectRect with invalid parameters", TEST_ENABLED, 0, 0 }; - -/* SDL_HasIntersection */ -static const TestCaseReference test12 = - (TestCaseReference){ "rect_testHasIntersectionInside", "Tests SDL_HasIntersection with B fully contained in A", TEST_ENABLED, 0, 0 }; - -static const TestCaseReference test13 = - (TestCaseReference){ "rect_testHasIntersectionOutside", "Tests SDL_HasIntersection with B fully outside of A", TEST_ENABLED, 0, 0 }; - -static const TestCaseReference test14 = - (TestCaseReference){ "rect_testHasIntersectionPartial", "Tests SDL_HasIntersection with B partially intersecting A", TEST_ENABLED, 0, 0 }; - -static const TestCaseReference test15 = - (TestCaseReference){ "rect_testHasIntersectionPoint", "Tests SDL_HasIntersection with 1x1 sized rectangles", TEST_ENABLED, 0, 0 }; - -static const TestCaseReference test16 = - (TestCaseReference){ "rect_testHasIntersectionEmpty", "Tests SDL_HasIntersection with empty rectangles", TEST_ENABLED, 0, 0 }; - -static const TestCaseReference test17 = - (TestCaseReference){ "rect_testHasIntersectionParam", "Negative tests against SDL_HasIntersection with invalid parameters", TEST_ENABLED, 0, 0 }; - -/* SDL_EnclosePoints */ -static const TestCaseReference test18 = - (TestCaseReference){ "rect_testEnclosePoints", "Tests SDL_EnclosePoints without clipping", TEST_ENABLED, 0, 0 }; - -static const TestCaseReference test19 = - (TestCaseReference){ "rect_testEnclosePointsWithClipping", "Tests SDL_EnclosePoints with clipping", TEST_ENABLED, 0, 0 }; - -static const TestCaseReference test20 = - (TestCaseReference){ "rect_testEnclosePointsRepeatedInput", "Tests SDL_EnclosePoints with repeated input", TEST_ENABLED, 0, 0 }; - -static const TestCaseReference test21 = - (TestCaseReference){ "rect_testEnclosePointsParam", "Negative tests against SDL_EnclosePoints with invalid parameters", TEST_ENABLED, 0, 0 }; - -/* SDL_UnionRect */ -static const TestCaseReference test22 = - (TestCaseReference){ "rect_testUnionRectInside", "Tests SDL_UnionRect where rect B is inside rect A", TEST_ENABLED, 0, 0 }; - -static const TestCaseReference test23 = - (TestCaseReference){ "rect_testUnionRectOutside", "Tests SDL_UnionRect where rect B is outside rect A", TEST_ENABLED, 0, 0 }; - -static const TestCaseReference test24 = - (TestCaseReference){ "rect_testUnionRectEmpty", "Tests SDL_UnionRect where rect A or rect B are empty", TEST_ENABLED, 0, 0 }; - -static const TestCaseReference test25 = - (TestCaseReference){ "rect_testUnionRectParam", "Negative tests against SDL_UnionRect with invalid parameters", TEST_ENABLED, 0, 0 }; - -/* SDL_RectEmpty */ -static const TestCaseReference test26 = - (TestCaseReference){ "rect_testRectEmpty", "Tests SDL_RectEmpty with various inputs", TEST_ENABLED, 0, 0 }; - -static const TestCaseReference test27 = - (TestCaseReference){ "rect_testRectEmptyParam", "Negative tests against SDL_RectEmpty with invalid parameters", TEST_ENABLED, 0, 0 }; - -/* SDL_RectEquals */ - -static const TestCaseReference test28 = - (TestCaseReference){ "rect_testRectEquals", "Tests SDL_RectEquals with various inputs", TEST_ENABLED, 0, 0 }; - -static const TestCaseReference test29 = - (TestCaseReference){ "rect_testRectEqualsParam", "Negative tests against SDL_RectEquals with invalid parameters", TEST_ENABLED, 0, 0 }; - - -/*! - * \brief Test suite for functions that handle simple rectangles including overlaps and merges. - * - * \sa - * http://wiki.libsdl.org/moin.cgi/CategoryRect - */ -extern const TestCaseReference *testSuite[] = { - &test1, &test2, &test3, &test4, &test5, &test6, &test7, &test8, &test9, &test10, &test11, &test12, &test13, &test14, - &test15, &test16, &test17, &test18, &test19, &test20, &test21, &test22, &test23, &test24, &test25, &test26, &test27, - &test28, &test29, NULL -}; - -TestCaseReference **QueryTestSuite() { - return (TestCaseReference **)testSuite; -} - -/*! - * \brief Private helper to check SDL_IntersectRectAndLine results - */ -void _validateIntersectRectAndLineResults( - SDL_bool intersection, SDL_bool expectedIntersection, - SDL_Rect *rect, SDL_Rect * refRect, - int x1, int y1, int x2, int y2, - int x1Ref, int y1Ref, int x2Ref, int y2Ref) -{ - AssertTrue(intersection == expectedIntersection, - "Incorrect intersection result: expected %s, got %s intersecting rect (%d,%d,%d,%d) with line (%d,%d - %d,%d)\n", - (expectedIntersection == SDL_TRUE) ? "true" : "false", - (intersection == SDL_TRUE) ? "true" : "false", - refRect->x, refRect->y, refRect->w, refRect->h, - x1Ref, y1Ref, x2Ref, y2Ref); - AssertTrue(rect->x == refRect->x && rect->y == refRect->y && rect->w == refRect->w && rect->h == refRect->h, - "Source rectangle was modified: got (%d,%d,%d,%d) expected (%d,%d,%d,%d)", - rect->x, rect->y, rect->w, rect->h, - refRect->x, refRect->y, refRect->w, refRect->h); - AssertTrue(x1 == x1Ref && y1 == y1Ref && x2 == x2Ref && y2 == y2Ref, - "Line was incorrectly clipped or modified: got (%d,%d - %d,%d) expected (%d,%d - %d,%d)", - x1, y1, x2, y2, - x1Ref, y1Ref, x2Ref, y2Ref); -} - -/*! - * \brief Tests SDL_IntersectRectAndLine() clipping cases - * - * \sa - * http://wiki.libsdl.org/moin.cgi/SDL_IntersectRectAndLine - */ -int rect_testIntersectRectAndLine (void *arg) -{ - SDL_Rect refRect = { 0, 0, 32, 32 }; - SDL_Rect rect; - int x1, y1; - int x2, y2; - SDL_bool intersected; - - int xLeft = -RandomIntegerInRange(1, refRect.w); - int xRight = refRect.w + RandomIntegerInRange(1, refRect.w); - int yTop = -RandomIntegerInRange(1, refRect.h); - int yBottom = refRect.h + RandomIntegerInRange(1, refRect.h); - - x1 = xLeft; - y1 = 15; - x2 = xRight; - y2 = 15; - rect = refRect; - intersected = SDL_IntersectRectAndLine(&rect, &x1, &y1, &x2, &y2); - _validateIntersectRectAndLineResults(intersected, SDL_TRUE, &rect, &refRect, x1, y1, x2, y2, 0, 15, 31, 15); - - x1 = 15; - y1 = yTop; - x2 = 15; - y2 = yBottom; - rect = refRect; - intersected = SDL_IntersectRectAndLine(&rect, &x1, &y1, &x2, &y2); - _validateIntersectRectAndLineResults(intersected, SDL_TRUE, &rect, &refRect, x1, y1, x2, y2, 15, 0, 15, 31); - - x1 = -refRect.w; - y1 = -refRect.h; - x2 = 2*refRect.w; - y2 = 2*refRect.h; - rect = refRect; - intersected = SDL_IntersectRectAndLine(&rect, &x1, &y1, &x2, &y2); - _validateIntersectRectAndLineResults(intersected, SDL_TRUE, &rect, &refRect, x1, y1, x2, y2, 0, 0, 31, 31); - - x1 = 2*refRect.w; - y1 = 2*refRect.h; - x2 = -refRect.w; - y2 = -refRect.h; - rect = refRect; - intersected = SDL_IntersectRectAndLine(&rect, &x1, &y1, &x2, &y2); - _validateIntersectRectAndLineResults(intersected, SDL_TRUE, &rect, &refRect, x1, y1, x2, y2, 31, 31, 0, 0); - - x1 = -1; - y1 = 32; - x2 = 32; - y2 = -1; - rect = refRect; - intersected = SDL_IntersectRectAndLine(&rect, &x1, &y1, &x2, &y2); - _validateIntersectRectAndLineResults(intersected, SDL_TRUE, &rect, &refRect, x1, y1, x2, y2, 0, 31, 31, 0); - - x1 = 32; - y1 = -1; - x2 = -1; - y2 = 32; - rect = refRect; - intersected = SDL_IntersectRectAndLine(&rect, &x1, &y1, &x2, &y2); - _validateIntersectRectAndLineResults(intersected, SDL_TRUE, &rect, &refRect, x1, y1, x2, y2, 31, 0, 0, 31); -} - -/*! - * \brief Tests SDL_IntersectRectAndLine() non-clipping case line inside - * - * \sa - * http://wiki.libsdl.org/moin.cgi/SDL_IntersectRectAndLine - */ -int rect_testIntersectRectAndLineInside (void *arg) -{ - SDL_Rect refRect = { 0, 0, 32, 32 }; - SDL_Rect rect; - int x1, y1; - int x2, y2; - SDL_bool intersected; - - int xmin = refRect.x; - int xmax = refRect.x + refRect.w - 1; - int ymin = refRect.y; - int ymax = refRect.y + refRect.h - 1; - int x1Ref = RandomIntegerInRange(xmin + 1, xmax - 1); - int y1Ref = RandomIntegerInRange(ymin + 1, ymax - 1); - int x2Ref = RandomIntegerInRange(xmin + 1, xmax - 1); - int y2Ref = RandomIntegerInRange(ymin + 1, ymax - 1); - - x1 = x1Ref; - y1 = y1Ref; - x2 = x2Ref; - y2 = y2Ref; - rect = refRect; - intersected = SDL_IntersectRectAndLine(&rect, &x1, &y1, &x2, &y2); - _validateIntersectRectAndLineResults(intersected, SDL_TRUE, &rect, &refRect, x1, y1, x2, y2, x1Ref, y1Ref, x2Ref, y2Ref); - - x1 = x1Ref; - y1 = y1Ref; - x2 = xmax; - y2 = ymax; - rect = refRect; - intersected = SDL_IntersectRectAndLine(&rect, &x1, &y1, &x2, &y2); - _validateIntersectRectAndLineResults(intersected, SDL_TRUE, &rect, &refRect, x1, y1, x2, y2, x1Ref, y1Ref, xmax, ymax); - - x1 = xmin; - y1 = ymin; - x2 = x2Ref; - y2 = y2Ref; - rect = refRect; - intersected = SDL_IntersectRectAndLine(&rect, &x1, &y1, &x2, &y2); - _validateIntersectRectAndLineResults(intersected, SDL_TRUE, &rect, &refRect, x1, y1, x2, y2, xmin, ymin, x2Ref, y2Ref); - - x1 = xmin; - y1 = ymin; - x2 = xmax; - y2 = ymax; - rect = refRect; - intersected = SDL_IntersectRectAndLine(&rect, &x1, &y1, &x2, &y2); - _validateIntersectRectAndLineResults(intersected, SDL_TRUE, &rect, &refRect, x1, y1, x2, y2, xmin, ymin, xmax, ymax); - - x1 = xmin; - y1 = ymax; - x2 = xmax; - y2 = ymin; - rect = refRect; - intersected = SDL_IntersectRectAndLine(&rect, &x1, &y1, &x2, &y2); - _validateIntersectRectAndLineResults(intersected, SDL_TRUE, &rect, &refRect, x1, y1, x2, y2, xmin, ymax, xmax, ymin); -} - - -/*! - * \brief Tests SDL_IntersectRectAndLine() non-clipping cases outside - * - * \sa - * http://wiki.libsdl.org/moin.cgi/SDL_IntersectRectAndLine - */ -int rect_testIntersectRectAndLineOutside (void *arg) -{ - SDL_Rect refRect = { 0, 0, 32, 32 }; - SDL_Rect rect; - int x1, y1; - int x2, y2; - SDL_bool intersected; - - int xLeft = -RandomIntegerInRange(1, refRect.w); - int xRight = refRect.w + RandomIntegerInRange(1, refRect.w); - int yTop = -RandomIntegerInRange(1, refRect.h); - int yBottom = refRect.h + RandomIntegerInRange(1, refRect.h); - - x1 = xLeft; - y1 = 0; - x2 = xLeft; - y2 = 31; - rect = refRect; - intersected = SDL_IntersectRectAndLine(&rect, &x1, &y1, &x2, &y2); - _validateIntersectRectAndLineResults(intersected, SDL_FALSE, &rect, &refRect, x1, y1, x2, y2, xLeft, 0, xLeft, 31); - - x1 = xRight; - y1 = 0; - x2 = xRight; - y2 = 31; - rect = refRect; - intersected = SDL_IntersectRectAndLine(&rect, &x1, &y1, &x2, &y2); - _validateIntersectRectAndLineResults(intersected, SDL_FALSE, &rect, &refRect, x1, y1, x2, y2, xRight, 0, xRight, 31); - - x1 = 0; - y1 = yTop; - x2 = 31; - y2 = yTop; - rect = refRect; - intersected = SDL_IntersectRectAndLine(&rect, &x1, &y1, &x2, &y2); - _validateIntersectRectAndLineResults(intersected, SDL_FALSE, &rect, &refRect, x1, y1, x2, y2, 0, yTop, 31, yTop); - - x1 = 0; - y1 = yBottom; - x2 = 31; - y2 = yBottom; - rect = refRect; - intersected = SDL_IntersectRectAndLine(&rect, &x1, &y1, &x2, &y2); - _validateIntersectRectAndLineResults(intersected, SDL_FALSE, &rect, &refRect, x1, y1, x2, y2, 0, yBottom, 31, yBottom); -} - -/*! - * \brief Tests SDL_IntersectRectAndLine() with empty rectangle - * - * \sa - * http://wiki.libsdl.org/moin.cgi/SDL_IntersectRectAndLine - */ -int rect_testIntersectRectAndLineEmpty (void *arg) -{ - SDL_Rect refRect; - SDL_Rect rect; - int x1, y1, x1Ref, y1Ref; - int x2, y2, x2Ref, y2Ref; - SDL_bool intersected; - - refRect.x = RandomIntegerInRange(1, 1024); - refRect.y = RandomIntegerInRange(1, 1024); - refRect.w = 0; - refRect.h = 0; - x1Ref = refRect.x; - y1Ref = refRect.y; - x2Ref = RandomIntegerInRange(1, 1024); - y2Ref = RandomIntegerInRange(1, 1024); - - x1 = x1Ref; - y1 = y1Ref; - x2 = x2Ref; - y2 = y2Ref; - rect = refRect; - intersected = SDL_IntersectRectAndLine(&rect, &x1, &y1, &x2, &y2); - _validateIntersectRectAndLineResults(intersected, SDL_FALSE, &rect, &refRect, x1, y1, x2, y2, x1Ref, y1Ref, x2Ref, y2Ref); -} - -/*! - * \brief Negative tests against SDL_IntersectRectAndLine() with invalid parameters - * - * \sa - * http://wiki.libsdl.org/moin.cgi/SDL_IntersectRectAndLine - */ -int rect_testIntersectRectAndLineParam (void *arg) -{ - SDL_Rect rect = { 0, 0, 32, 32 }; - int x1 = rect.w / 2; - int y1 = rect.h / 2; - int x2 = x1; - int y2 = 2 * rect.h; - SDL_bool intersected; - - intersected = SDL_IntersectRectAndLine(&rect, &x1, &y1, &x2, &y2); - AssertTrue(intersected == SDL_TRUE, "Test variables not intersected as expected"); - - intersected = SDL_IntersectRectAndLine((SDL_Rect *)NULL, &x1, &y1, &x2, &y2); - AssertTrue(intersected == SDL_FALSE, "Incorrect intersected result when 1st parameter is NULL"); - intersected = SDL_IntersectRectAndLine(&rect, (int *)NULL, &y1, &x2, &y2); - AssertTrue(intersected == SDL_FALSE, "Incorrect intersected result when 2nd parameter is NULL"); - intersected = SDL_IntersectRectAndLine(&rect, &x1, (int *)NULL, &x2, &y2); - AssertTrue(intersected == SDL_FALSE, "Incorrect intersected result when 3rd parameter is NULL"); - intersected = SDL_IntersectRectAndLine(&rect, &x1, &y1, (int *)NULL, &y2); - AssertTrue(intersected == SDL_FALSE, "Incorrect intersected result when 4th parameter is NULL"); - intersected = SDL_IntersectRectAndLine(&rect, &x1, &y1, &x2, (int *)NULL); - AssertTrue(intersected == SDL_FALSE, "Incorrect intersected result when 5th parameter is NULL"); - intersected = SDL_IntersectRectAndLine((SDL_Rect *)NULL, (int *)NULL, (int *)NULL, (int *)NULL, (int *)NULL); - AssertTrue(intersected == SDL_FALSE, "Incorrect intersected result when all parameters are NULL"); -} - -/*! - * \brief Private helper to check SDL_HasIntersection results - */ -void _validateHasIntersectionResults( - SDL_bool intersection, SDL_bool expectedIntersection, - SDL_Rect *rectA, SDL_Rect *rectB, SDL_Rect *refRectA, SDL_Rect *refRectB) -{ - AssertTrue(intersection == expectedIntersection, - "Incorrect intersection result: expected %s, got %s intersecting A (%d,%d,%d,%d) with B (%d,%d,%d,%d)\n", - (expectedIntersection == SDL_TRUE) ? "true" : "false", - (intersection == SDL_TRUE) ? "true" : "false", - rectA->x, rectA->y, rectA->w, rectA->h, - rectB->x, rectB->y, rectB->w, rectB->h); - AssertTrue(rectA->x == refRectA->x && rectA->y == refRectA->y && rectA->w == refRectA->w && rectA->h == refRectA->h, - "Source rectangle A was modified: got (%d,%d,%d,%d) expected (%d,%d,%d,%d)", - rectA->x, rectA->y, rectA->w, rectA->h, - refRectA->x, refRectA->y, refRectA->w, refRectA->h); - AssertTrue(rectB->x == refRectB->x && rectB->y == refRectB->y && rectB->w == refRectB->w && rectB->h == refRectB->h, - "Source rectangle B was modified: got (%d,%d,%d,%d) expected (%d,%d,%d,%d)", - rectB->x, rectB->y, rectB->w, rectB->h, - refRectB->x, refRectB->y, refRectB->w, refRectB->h); -} - -/*! - * \brief Private helper to check SDL_IntersectRect results - */ -void _validateIntersectRectResults( - SDL_bool intersection, SDL_bool expectedIntersection, - SDL_Rect *rectA, SDL_Rect *rectB, SDL_Rect *refRectA, SDL_Rect *refRectB, - SDL_Rect *result, SDL_Rect *expectedResult) -{ - _validateHasIntersectionResults(intersection, expectedIntersection, rectA, rectB, refRectA, refRectB); - if (result && expectedResult) { - AssertTrue(result->x == expectedResult->x && result->y == expectedResult->y && result->w == expectedResult->w && result->h == expectedResult->h, - "Intersection of rectangles A (%d,%d,%d,%d) and B (%d,%d,%d,%d) was incorrectly calculated, got (%d,%d,%d,%d) expected (%d,%d,%d,%d)", - rectA->x, rectA->y, rectA->w, rectA->h, - rectB->x, rectB->y, rectB->w, rectB->h, - result->x, result->y, result->w, result->h, - expectedResult->x, expectedResult->y, expectedResult->w, expectedResult->h); - } -} - -/*! - * \brief Private helper to check SDL_UnionRect results - */ -void _validateUnionRectResults( - SDL_Rect *rectA, SDL_Rect *rectB, SDL_Rect *refRectA, SDL_Rect *refRectB, - SDL_Rect *result, SDL_Rect *expectedResult) -{ - AssertTrue(rectA->x == refRectA->x && rectA->y == refRectA->y && rectA->w == refRectA->w && rectA->h == refRectA->h, - "Source rectangle A was modified: got (%d,%d,%d,%d) expected (%d,%d,%d,%d)", - rectA->x, rectA->y, rectA->w, rectA->h, - refRectA->x, refRectA->y, refRectA->w, refRectA->h); - AssertTrue(rectB->x == refRectB->x && rectB->y == refRectB->y && rectB->w == refRectB->w && rectB->h == refRectB->h, - "Source rectangle B was modified: got (%d,%d,%d,%d) expected (%d,%d,%d,%d)", - rectB->x, rectB->y, rectB->w, rectB->h, - refRectB->x, refRectB->y, refRectB->w, refRectB->h); - AssertTrue(result->x == expectedResult->x && result->y == expectedResult->y && result->w == expectedResult->w && result->h == expectedResult->h, - "Union of rectangles A (%d,%d,%d,%d) and B (%d,%d,%d,%d) was incorrectly calculated, got (%d,%d,%d,%d) expected (%d,%d,%d,%d)", - rectA->x, rectA->y, rectA->w, rectA->h, - rectB->x, rectB->y, rectB->w, rectB->h, - result->x, result->y, result->w, result->h, - expectedResult->x, expectedResult->y, expectedResult->w, expectedResult->h); -} - -/*! - * \brief Private helper to check SDL_RectEmpty results - */ -void _validateRectEmptyResults( - SDL_bool empty, SDL_bool expectedEmpty, - SDL_Rect *rect, SDL_Rect *refRect) -{ - AssertTrue(empty == expectedEmpty, - "Incorrect empty result: expected %s, got %s testing (%d,%d,%d,%d)\n", - (expectedEmpty == SDL_TRUE) ? "true" : "false", - (empty == SDL_TRUE) ? "true" : "false", - rect->x, rect->y, rect->w, rect->h); - AssertTrue(rect->x == refRect->x && rect->y == refRect->y && rect->w == refRect->w && rect->h == refRect->h, - "Source rectangle was modified: got (%d,%d,%d,%d) expected (%d,%d,%d,%d)", - rect->x, rect->y, rect->w, rect->h, - refRect->x, refRect->y, refRect->w, refRect->h); -} - -/*! - * \brief Private helper to check SDL_RectEquals results - */ -void _validateRectEqualsResults( - SDL_bool equals, SDL_bool expectedEquals, - SDL_Rect *rectA, SDL_Rect *rectB, SDL_Rect *refRectA, SDL_Rect *refRectB) -{ - AssertTrue(equals == expectedEquals, - "Incorrect equals result: expected %s, got %s testing (%d,%d,%d,%d) and (%d,%d,%d,%d) \n", - (expectedEquals == SDL_TRUE) ? "true" : "false", - (equals == SDL_TRUE) ? "true" : "false", - rectA->x, rectA->y, rectA->w, rectA->h, - rectB->x, rectB->y, rectB->w, rectB->h); - AssertTrue(rectA->x == refRectA->x && rectA->y == refRectA->y && rectA->w == refRectA->w && rectA->h == refRectA->h, - "Source rectangle A was modified: got (%d,%d,%d,%d) expected (%d,%d,%d,%d)", - rectA->x, rectA->y, rectA->w, rectA->h, - refRectA->x, refRectA->y, refRectA->w, refRectA->h); - AssertTrue(rectB->x == refRectB->x && rectB->y == refRectB->y && rectB->w == refRectB->w && rectB->h == refRectB->h, - "Source rectangle B was modified: got (%d,%d,%d,%d) expected (%d,%d,%d,%d)", - rectB->x, rectB->y, rectB->w, rectB->h, - refRectB->x, refRectB->y, refRectB->w, refRectB->h); -} - -/*! - * \brief Tests SDL_IntersectRect() with B fully inside A - * - * \sa - * http://wiki.libsdl.org/moin.cgi/SDL_IntersectRect - */ -int rect_testIntersectRectInside (void *arg) -{ - SDL_Rect refRectA = { 0, 0, 32, 32 }; - SDL_Rect refRectB; - SDL_Rect rectA; - SDL_Rect rectB; - SDL_Rect result; - SDL_bool intersection; - - // rectB fully contained in rectA - refRectB.x = 0; - refRectB.y = 0; - refRectB.w = RandomIntegerInRange(refRectA.x + 1, refRectA.x + refRectA.w - 1); - refRectB.h = RandomIntegerInRange(refRectA.y + 1, refRectA.y + refRectA.h - 1); - rectA = refRectA; - rectB = refRectB; - intersection = SDL_IntersectRect(&rectA, &rectB, &result); - _validateIntersectRectResults(intersection, SDL_TRUE, &rectA, &rectB, &refRectA, &refRectB, &result, &refRectB); -} - -/*! - * \brief Tests SDL_IntersectRect() with B fully outside A - * - * \sa - * http://wiki.libsdl.org/moin.cgi/SDL_IntersectRect - */ -int rect_testIntersectRectOutside (void *arg) -{ - SDL_Rect refRectA = { 0, 0, 32, 32 }; - SDL_Rect refRectB; - SDL_Rect rectA; - SDL_Rect rectB; - SDL_Rect result; - SDL_bool intersection; - - // rectB fully outside of rectA - refRectB.x = refRectA.x + refRectA.w + RandomIntegerInRange(1, 10); - refRectB.y = refRectA.y + refRectA.h + RandomIntegerInRange(1, 10); - refRectB.w = refRectA.w; - refRectB.h = refRectA.h; - rectA = refRectA; - rectB = refRectB; - intersection = SDL_IntersectRect(&rectA, &rectB, &result); - _validateIntersectRectResults(intersection, SDL_FALSE, &rectA, &rectB, &refRectA, &refRectB, (SDL_Rect *)NULL, (SDL_Rect *)NULL); -} - -/*! - * \brief Tests SDL_IntersectRect() with B partially intersecting A - * - * \sa - * http://wiki.libsdl.org/moin.cgi/SDL_IntersectRect - */ -int rect_testIntersectRectPartial (void *arg) -{ - SDL_Rect refRectA = { 0, 0, 32, 32 }; - SDL_Rect refRectB; - SDL_Rect rectA; - SDL_Rect rectB; - SDL_Rect result; - SDL_Rect expectedResult; - SDL_bool intersection; - - // rectB partially contained in rectA - refRectB.x = RandomIntegerInRange(refRectA.x + 1, refRectA.x + refRectA.w - 1); - refRectB.y = RandomIntegerInRange(refRectA.y + 1, refRectA.y + refRectA.h - 1); - refRectB.w = refRectA.w; - refRectB.h = refRectA.h; - rectA = refRectA; - rectB = refRectB; - expectedResult.x = refRectB.x; - expectedResult.y = refRectB.y; - expectedResult.w = refRectA.w - refRectB.x; - expectedResult.h = refRectA.h - refRectB.y; - intersection = SDL_IntersectRect(&rectA, &rectB, &result); - _validateIntersectRectResults(intersection, SDL_TRUE, &rectA, &rectB, &refRectA, &refRectB, &result, &expectedResult); - - // rectB right edge - refRectB.x = rectA.w - 1; - refRectB.y = rectA.y; - refRectB.w = RandomIntegerInRange(1, refRectA.w - 1); - refRectB.h = RandomIntegerInRange(1, refRectA.h - 1); - rectA = refRectA; - rectB = refRectB; - expectedResult.x = refRectB.x; - expectedResult.y = refRectB.y; - expectedResult.w = 1; - expectedResult.h = refRectB.h; - intersection = SDL_IntersectRect(&rectA, &rectB, &result); - _validateIntersectRectResults(intersection, SDL_TRUE, &rectA, &rectB, &refRectA, &refRectB, &result, &expectedResult); - - // rectB left edge - refRectB.x = 1 - rectA.w; - refRectB.y = rectA.y; - refRectB.w = refRectA.w; - refRectB.h = RandomIntegerInRange(1, refRectA.h - 1); - rectA = refRectA; - rectB = refRectB; - expectedResult.x = 0; - expectedResult.y = refRectB.y; - expectedResult.w = 1; - expectedResult.h = refRectB.h; - intersection = SDL_IntersectRect(&rectA, &rectB, &result); - _validateIntersectRectResults(intersection, SDL_TRUE, &rectA, &rectB, &refRectA, &refRectB, &result, &expectedResult); - - // rectB bottom edge - refRectB.x = rectA.x; - refRectB.y = rectA.h - 1; - refRectB.w = RandomIntegerInRange(1, refRectA.w - 1); - refRectB.h = RandomIntegerInRange(1, refRectA.h - 1); - rectA = refRectA; - rectB = refRectB; - expectedResult.x = refRectB.x; - expectedResult.y = refRectB.y; - expectedResult.w = refRectB.w; - expectedResult.h = 1; - intersection = SDL_IntersectRect(&rectA, &rectB, &result); - _validateIntersectRectResults(intersection, SDL_TRUE, &rectA, &rectB, &refRectA, &refRectB, &result, &expectedResult); - - // rectB top edge - refRectB.x = rectA.x; - refRectB.y = 1 - rectA.h; - refRectB.w = RandomIntegerInRange(1, refRectA.w - 1); - refRectB.h = rectA.h; - rectA = refRectA; - rectB = refRectB; - expectedResult.x = refRectB.x; - expectedResult.y = 0; - expectedResult.w = refRectB.w; - expectedResult.h = 1; - intersection = SDL_IntersectRect(&rectA, &rectB, &result); - _validateIntersectRectResults(intersection, SDL_TRUE, &rectA, &rectB, &refRectA, &refRectB, &result, &expectedResult); -} - -/*! - * \brief Tests SDL_IntersectRect() with 1x1 pixel sized rectangles - * - * \sa - * http://wiki.libsdl.org/moin.cgi/SDL_IntersectRect - */ -int rect_testIntersectRectPoint (void *arg) -{ - SDL_Rect refRectA = { 0, 0, 1, 1 }; - SDL_Rect refRectB = { 0, 0, 1, 1 }; - SDL_Rect rectA; - SDL_Rect rectB; - SDL_Rect result; - SDL_bool intersection; - int offsetX, offsetY; - - // intersecting pixels - refRectA.x = RandomIntegerInRange(1, 100); - refRectA.y = RandomIntegerInRange(1, 100); - refRectB.x = refRectA.x; - refRectB.y = refRectA.y; - rectA = refRectA; - rectB = refRectB; - intersection = SDL_IntersectRect(&rectA, &rectB, &result); - _validateIntersectRectResults(intersection, SDL_TRUE, &rectA, &rectB, &refRectA, &refRectB, &result, &refRectA); - - // non-intersecting pixels cases - for (offsetX = -1; offsetX <= 1; offsetX++) { - for (offsetY = -1; offsetY <= 1; offsetY++) { - if (offsetX != 0 || offsetY != 0) { - refRectA.x = RandomIntegerInRange(1, 100); - refRectA.y = RandomIntegerInRange(1, 100); - refRectB.x = refRectA.x; - refRectB.y = refRectA.y; - refRectB.x += offsetX; - refRectB.y += offsetY; - rectA = refRectA; - rectB = refRectB; - intersection = SDL_IntersectRect(&rectA, &rectB, &result); - _validateIntersectRectResults(intersection, SDL_FALSE, &rectA, &rectB, &refRectA, &refRectB, (SDL_Rect *)NULL, (SDL_Rect *)NULL); - } - } - } -} - -/*! - * \brief Tests SDL_IntersectRect() with empty rectangles - * - * \sa - * http://wiki.libsdl.org/moin.cgi/SDL_IntersectRect - */ -int rect_testIntersectRectEmpty (void *arg) -{ - SDL_Rect refRectA; - SDL_Rect refRectB; - SDL_Rect rectA; - SDL_Rect rectB; - SDL_Rect result; - SDL_bool intersection; - - // Rect A empty - refRectA.x = RandomIntegerInRange(1, 100); - refRectA.y = RandomIntegerInRange(1, 100); - refRectA.w = RandomIntegerInRange(1, 100); - refRectA.h = RandomIntegerInRange(1, 100); - refRectB = refRectA; - refRectA.w = 0; - refRectA.h = 0; - rectA = refRectA; - rectB = refRectB; - intersection = SDL_IntersectRect(&rectA, &rectB, &result); - _validateIntersectRectResults(intersection, SDL_FALSE, &rectA, &rectB, &refRectA, &refRectB, (SDL_Rect *)NULL, (SDL_Rect *)NULL); - - // Rect B empty - refRectA.x = RandomIntegerInRange(1, 100); - refRectA.y = RandomIntegerInRange(1, 100); - refRectA.w = RandomIntegerInRange(1, 100); - refRectA.h = RandomIntegerInRange(1, 100); - refRectB = refRectA; - refRectB.w = 0; - refRectB.h = 0; - rectA = refRectA; - rectB = refRectB; - intersection = SDL_IntersectRect(&rectA, &rectB, &result); - _validateIntersectRectResults(intersection, SDL_FALSE, &rectA, &rectB, &refRectA, &refRectB, (SDL_Rect *)NULL, (SDL_Rect *)NULL); - - // Rect A and B empty - refRectA.x = RandomIntegerInRange(1, 100); - refRectA.y = RandomIntegerInRange(1, 100); - refRectA.w = RandomIntegerInRange(1, 100); - refRectA.h = RandomIntegerInRange(1, 100); - refRectB = refRectA; - refRectA.w = 0; - refRectA.h = 0; - refRectB.w = 0; - refRectB.h = 0; - rectA = refRectA; - rectB = refRectB; - intersection = SDL_IntersectRect(&rectA, &rectB, &result); - _validateIntersectRectResults(intersection, SDL_FALSE, &rectA, &rectB, &refRectA, &refRectB, (SDL_Rect *)NULL, (SDL_Rect *)NULL); -} - -/*! - * \brief Negative tests against SDL_IntersectRect() with invalid parameters - * - * \sa - * http://wiki.libsdl.org/moin.cgi/SDL_IntersectRect - */ -int rect_testIntersectRectParam(void *arg) -{ - SDL_Rect rectA; - SDL_Rect rectB; - SDL_Rect result; - SDL_bool intersection; - - // invalid parameter combinations - intersection = SDL_IntersectRect((SDL_Rect *)NULL, &rectB, &result); - AssertTrue(intersection == SDL_FALSE, "Function did not return false when 1st parameter was NULL"); - intersection = SDL_IntersectRect(&rectA, (SDL_Rect *)NULL, &result); - AssertTrue(intersection == SDL_FALSE, "Function did not return false when 2st parameter was NULL"); - intersection = SDL_IntersectRect(&rectA, &rectB, (SDL_Rect *)NULL); - AssertTrue(intersection == SDL_FALSE, "Function did not return false when 3st parameter was NULL"); - intersection = SDL_IntersectRect((SDL_Rect *)NULL, (SDL_Rect *)NULL, &result); - AssertTrue(intersection == SDL_FALSE, "Function did not return false when 1st and 2nd parameters were NULL"); - intersection = SDL_IntersectRect((SDL_Rect *)NULL, &rectB, (SDL_Rect *)NULL); - AssertTrue(intersection == SDL_FALSE, "Function did not return false when 1st and 3rd parameters were NULL "); - intersection = SDL_IntersectRect((SDL_Rect *)NULL, (SDL_Rect *)NULL, (SDL_Rect *)NULL); - AssertTrue(intersection == SDL_FALSE, "Function did not return false when all parameters were NULL"); -} - -/*! - * \brief Tests SDL_HasIntersection() with B fully inside A - * - * \sa - * http://wiki.libsdl.org/moin.cgi/SDL_HasIntersection - */ -int rect_testHasIntersectionInside (void *arg) -{ - SDL_Rect refRectA = { 0, 0, 32, 32 }; - SDL_Rect refRectB; - SDL_Rect rectA; - SDL_Rect rectB; - SDL_bool intersection; - - // rectB fully contained in rectA - refRectB.x = 0; - refRectB.y = 0; - refRectB.w = RandomIntegerInRange(refRectA.x + 1, refRectA.x + refRectA.w - 1); - refRectB.h = RandomIntegerInRange(refRectA.y + 1, refRectA.y + refRectA.h - 1); - rectA = refRectA; - rectB = refRectB; - intersection = SDL_HasIntersection(&rectA, &rectB); - _validateHasIntersectionResults(intersection, SDL_TRUE, &rectA, &rectB, &refRectA, &refRectB); -} - -/*! - * \brief Tests SDL_HasIntersection() with B fully outside A - * - * \sa - * http://wiki.libsdl.org/moin.cgi/SDL_HasIntersection - */ -int rect_testHasIntersectionOutside (void *arg) -{ - SDL_Rect refRectA = { 0, 0, 32, 32 }; - SDL_Rect refRectB; - SDL_Rect rectA; - SDL_Rect rectB; - SDL_bool intersection; - - // rectB fully outside of rectA - refRectB.x = refRectA.x + refRectA.w + RandomIntegerInRange(1, 10); - refRectB.y = refRectA.y + refRectA.h + RandomIntegerInRange(1, 10); - refRectB.w = refRectA.w; - refRectB.h = refRectA.h; - rectA = refRectA; - rectB = refRectB; - intersection = SDL_HasIntersection(&rectA, &rectB); - _validateHasIntersectionResults(intersection, SDL_FALSE, &rectA, &rectB, &refRectA, &refRectB); -} - -/*! - * \brief Tests SDL_HasIntersection() with B partially intersecting A - * - * \sa - * http://wiki.libsdl.org/moin.cgi/SDL_HasIntersection - */ -int rect_testHasIntersectionPartial (void *arg) -{ - SDL_Rect refRectA = { 0, 0, 32, 32 }; - SDL_Rect refRectB; - SDL_Rect rectA; - SDL_Rect rectB; - SDL_bool intersection; - - // rectB partially contained in rectA - refRectB.x = RandomIntegerInRange(refRectA.x + 1, refRectA.x + refRectA.w - 1); - refRectB.y = RandomIntegerInRange(refRectA.y + 1, refRectA.y + refRectA.h - 1); - refRectB.w = refRectA.w; - refRectB.h = refRectA.h; - rectA = refRectA; - rectB = refRectB; - intersection = SDL_HasIntersection(&rectA, &rectB); - _validateHasIntersectionResults(intersection, SDL_TRUE, &rectA, &rectB, &refRectA, &refRectB); - - // rectB right edge - refRectB.x = rectA.w - 1; - refRectB.y = rectA.y; - refRectB.w = RandomIntegerInRange(1, refRectA.w - 1); - refRectB.h = RandomIntegerInRange(1, refRectA.h - 1); - rectA = refRectA; - rectB = refRectB; - intersection = SDL_HasIntersection(&rectA, &rectB); - _validateHasIntersectionResults(intersection, SDL_TRUE, &rectA, &rectB, &refRectA, &refRectB); - - // rectB left edge - refRectB.x = 1 - rectA.w; - refRectB.y = rectA.y; - refRectB.w = refRectA.w; - refRectB.h = RandomIntegerInRange(1, refRectA.h - 1); - rectA = refRectA; - rectB = refRectB; - intersection = SDL_HasIntersection(&rectA, &rectB); - _validateHasIntersectionResults(intersection, SDL_TRUE, &rectA, &rectB, &refRectA, &refRectB); - - // rectB bottom edge - refRectB.x = rectA.x; - refRectB.y = rectA.h - 1; - refRectB.w = RandomIntegerInRange(1, refRectA.w - 1); - refRectB.h = RandomIntegerInRange(1, refRectA.h - 1); - rectA = refRectA; - rectB = refRectB; - intersection = SDL_HasIntersection(&rectA, &rectB); - _validateHasIntersectionResults(intersection, SDL_TRUE, &rectA, &rectB, &refRectA, &refRectB); - - // rectB top edge - refRectB.x = rectA.x; - refRectB.y = 1 - rectA.h; - refRectB.w = RandomIntegerInRange(1, refRectA.w - 1); - refRectB.h = rectA.h; - rectA = refRectA; - rectB = refRectB; - intersection = SDL_HasIntersection(&rectA, &rectB); - _validateHasIntersectionResults(intersection, SDL_TRUE, &rectA, &rectB, &refRectA, &refRectB); -} - -/*! - * \brief Tests SDL_HasIntersection() with 1x1 pixel sized rectangles - * - * \sa - * http://wiki.libsdl.org/moin.cgi/SDL_HasIntersection - */ -int rect_testHasIntersectionPoint (void *arg) -{ - SDL_Rect refRectA = { 0, 0, 1, 1 }; - SDL_Rect refRectB = { 0, 0, 1, 1 }; - SDL_Rect rectA; - SDL_Rect rectB; - SDL_Rect result; - SDL_bool intersection; - int offsetX, offsetY; - - // intersecting pixels - refRectA.x = RandomIntegerInRange(1, 100); - refRectA.y = RandomIntegerInRange(1, 100); - refRectB.x = refRectA.x; - refRectB.y = refRectA.y; - rectA = refRectA; - rectB = refRectB; - intersection = SDL_HasIntersection(&rectA, &rectB); - _validateHasIntersectionResults(intersection, SDL_TRUE, &rectA, &rectB, &refRectA, &refRectB); - - // non-intersecting pixels cases - for (offsetX = -1; offsetX <= 1; offsetX++) { - for (offsetY = -1; offsetY <= 1; offsetY++) { - if (offsetX != 0 || offsetY != 0) { - refRectA.x = RandomIntegerInRange(1, 100); - refRectA.y = RandomIntegerInRange(1, 100); - refRectB.x = refRectA.x; - refRectB.y = refRectA.y; - refRectB.x += offsetX; - refRectB.y += offsetY; - rectA = refRectA; - rectB = refRectB; - intersection = SDL_HasIntersection(&rectA, &rectB); - _validateHasIntersectionResults(intersection, SDL_FALSE, &rectA, &rectB, &refRectA, &refRectB); - } - } - } -} - -/*! - * \brief Tests SDL_HasIntersection() with empty rectangles - * - * \sa - * http://wiki.libsdl.org/moin.cgi/SDL_HasIntersection - */ -int rect_testHasIntersectionEmpty (void *arg) -{ - SDL_Rect refRectA; - SDL_Rect refRectB; - SDL_Rect rectA; - SDL_Rect rectB; - SDL_bool intersection; - - // Rect A empty - refRectA.x = RandomIntegerInRange(1, 100); - refRectA.y = RandomIntegerInRange(1, 100); - refRectA.w = RandomIntegerInRange(1, 100); - refRectA.h = RandomIntegerInRange(1, 100); - refRectB = refRectA; - refRectA.w = 0; - refRectA.h = 0; - rectA = refRectA; - rectB = refRectB; - intersection = SDL_HasIntersection(&rectA, &rectB); - _validateHasIntersectionResults(intersection, SDL_FALSE, &rectA, &rectB, &refRectA, &refRectB); - - // Rect B empty - refRectA.x = RandomIntegerInRange(1, 100); - refRectA.y = RandomIntegerInRange(1, 100); - refRectA.w = RandomIntegerInRange(1, 100); - refRectA.h = RandomIntegerInRange(1, 100); - refRectB = refRectA; - refRectB.w = 0; - refRectB.h = 0; - rectA = refRectA; - rectB = refRectB; - intersection = SDL_HasIntersection(&rectA, &rectB); - _validateHasIntersectionResults(intersection, SDL_FALSE, &rectA, &rectB, &refRectA, &refRectB); - - // Rect A and B empty - refRectA.x = RandomIntegerInRange(1, 100); - refRectA.y = RandomIntegerInRange(1, 100); - refRectA.w = RandomIntegerInRange(1, 100); - refRectA.h = RandomIntegerInRange(1, 100); - refRectB = refRectA; - refRectA.w = 0; - refRectA.h = 0; - refRectB.w = 0; - refRectB.h = 0; - rectA = refRectA; - rectB = refRectB; - intersection = SDL_HasIntersection(&rectA, &rectB); - _validateHasIntersectionResults(intersection, SDL_FALSE, &rectA, &rectB, &refRectA, &refRectB); -} - -/*! - * \brief Negative tests against SDL_HasIntersection() with invalid parameters - * - * \sa - * http://wiki.libsdl.org/moin.cgi/SDL_HasIntersection - */ -int rect_testHasIntersectionParam(void *arg) -{ - SDL_Rect rectA; - SDL_Rect rectB; - SDL_bool intersection; - - // invalid parameter combinations - intersection = SDL_HasIntersection((SDL_Rect *)NULL, &rectB); - AssertTrue(intersection == SDL_FALSE, "Function did not return false when 1st parameter was NULL"); - intersection = SDL_HasIntersection(&rectA, (SDL_Rect *)NULL); - AssertTrue(intersection == SDL_FALSE, "Function did not return false when 2st parameter was NULL"); - intersection = SDL_HasIntersection((SDL_Rect *)NULL, (SDL_Rect *)NULL); - AssertTrue(intersection == SDL_FALSE, "Function did not return false when all parameters were NULL"); -} - -/*! - * \brief Test SDL_EnclosePoints() without clipping - * - * \sa - * http://wiki.libsdl.org/moin.cgi/SDL_EnclosePoints - */ -int rect_testEnclosePoints(void *arg) -{ - const int numPoints = 16; - SDL_Point refPoints[numPoints]; - SDL_Point points[numPoints]; - int count; - SDL_Rect result; - SDL_bool anyEnclosed; - SDL_bool anyEnclosedNoResult; - - // Create input data, tracking result - SDL_bool expectedEnclosed = SDL_TRUE; - int newx, newy; - int minx, maxx, miny, maxy; - int i; - for (i=0; imaxx) maxx=newx; - if (newymaxy) maxy=newy; - } - } - - // Call function and validate - special case: no result requested - anyEnclosedNoResult = SDL_EnclosePoints((const SDL_Point *)points, numPoints, (const SDL_Rect *)NULL, (SDL_Rect *)NULL); - AssertTrue(expectedEnclosed==anyEnclosedNoResult, - "Expected return value %s, got %s", - (expectedEnclosed==SDL_TRUE) ? "true" : "false", (anyEnclosedNoResult==SDL_TRUE) ? "true" : "false"); - for (i=0; imaxx) maxx=newx; - if (newymaxy) maxy=newy; - } - } - - // Call function and validate - special case: no result requested - anyEnclosedNoResult = SDL_EnclosePoints((const SDL_Point *)points, numPoints, (const SDL_Rect *)NULL, (SDL_Rect *)NULL); - AssertTrue(expectedEnclosed==anyEnclosedNoResult, - "Expected return value %s, got %s", - (expectedEnclosed==SDL_TRUE) ? "true" : "false", (anyEnclosedNoResult==SDL_TRUE) ? "true" : "false"); - for (i=0; i=refClip.x) && (newx<(refClip.x + refClip.w)) && - (newy>=refClip.y) && (newy<(refClip.y + refClip.h))) { - if (expectedEnclosed==SDL_FALSE) { - minx=maxx=newx; - miny=maxy=newy; - } else { - if (newxmaxx) maxx=newx; - if (newymaxy) maxy=newy; - } - expectedEnclosed = SDL_TRUE; - } - } - - // Call function and validate - special case: no result requested - clip = refClip; - anyEnclosedNoResult = SDL_EnclosePoints((const SDL_Point *)points, numPoints, (const SDL_Rect *)&clip, (SDL_Rect *)NULL); - AssertTrue(expectedEnclosed==anyEnclosedNoResult, - "Expected return value %s, got %s", - (expectedEnclosed==SDL_TRUE) ? "true" : "false", (anyEnclosedNoResult==SDL_TRUE) ? "true" : "false"); - for (i=0; irefRectB.x) ? refRectA.x : refRectB.x; - miny = (refRectA.yrefRectB.y) ? refRectA.y : refRectB.y; - expectedResult.x = minx; - expectedResult.y = miny; - expectedResult.w = maxx - minx + 1; - expectedResult.h = maxy - miny + 1; - rectA = refRectA; - rectB = refRectB; - SDL_UnionRect(&rectA, &rectB, &result); - _validateUnionRectResults(&rectA, &rectB, &refRectA, &refRectB, &result, &expectedResult); - } - } - } - - /* Union outside overlap */ - for (dx = -1; dx < 2; dx++) { - for (dy = -1; dy < 2; dy++) { - if ((dx != 0) || (dy != 0)) { - refRectA.x=RandomIntegerInRange(-1024, 1024); - refRectA.y=RandomIntegerInRange(-1024, 1024); - refRectA.w=RandomIntegerInRange(256, 512); - refRectA.h=RandomIntegerInRange(256, 512); - refRectB.x=refRectA.x + 1 + dx*2; - refRectB.y=refRectA.y + 1 + dy*2; - refRectB.w=refRectA.w - 2; - refRectB.h=refRectA.h - 2; - expectedResult = refRectA; - if (dx == -1) expectedResult.x--; - if (dy == -1) expectedResult.y--; - if ((dx == 1) || (dx == -1)) expectedResult.w++; - if ((dy == 1) || (dy == -1)) expectedResult.h++; - rectA = refRectA; - rectB = refRectB; - SDL_UnionRect(&rectA, &rectB, &result); - _validateUnionRectResults(&rectA, &rectB, &refRectA, &refRectB, &result, &expectedResult); - } - } - } -} - -/*! - * \brief Tests SDL_UnionRect() where rect A or rect B are empty - * - * \sa - * http://wiki.libsdl.org/moin.cgi/SDL_UnionRect - */ -int rect_testUnionRectEmpty(void *arg) -{ - SDL_Rect refRectA, refRectB; - SDL_Rect rectA, rectB; - SDL_Rect expectedResult; - SDL_Rect result; - - /* A empty */ - refRectA.x=RandomIntegerInRange(-1024, 1024); - refRectA.y=RandomIntegerInRange(-1024, 1024); - refRectA.w=0; - refRectA.h=0; - refRectB.x=RandomIntegerInRange(-1024, 1024); - refRectB.y=RandomIntegerInRange(-1024, 1024); - refRectB.w=RandomIntegerInRange(1, 1024); - refRectB.h=RandomIntegerInRange(1, 1024); - expectedResult = refRectB; - rectA = refRectA; - rectB = refRectB; - SDL_UnionRect(&rectA, &rectB, &result); - _validateUnionRectResults(&rectA, &rectB, &refRectA, &refRectB, &result, &expectedResult); - - /* B empty */ - refRectA.x=RandomIntegerInRange(-1024, 1024); - refRectA.y=RandomIntegerInRange(-1024, 1024); - refRectA.w=RandomIntegerInRange(1, 1024); - refRectA.h=RandomIntegerInRange(1, 1024); - refRectB.x=RandomIntegerInRange(-1024, 1024); - refRectB.y=RandomIntegerInRange(-1024, 1024); - refRectB.w=0; - refRectB.h=0; - expectedResult = refRectA; - rectA = refRectA; - rectB = refRectB; - SDL_UnionRect(&rectA, &rectB, &result); - _validateUnionRectResults(&rectA, &rectB, &refRectA, &refRectB, &result, &expectedResult); - - /* A and B empty */ - refRectA.x=RandomIntegerInRange(-1024, 1024); - refRectA.y=RandomIntegerInRange(-1024, 1024); - refRectA.w=0; - refRectA.h=0; - refRectB.x=RandomIntegerInRange(-1024, 1024); - refRectB.y=RandomIntegerInRange(-1024, 1024); - refRectB.w=0; - refRectB.h=0; - result.x=0; - result.y=0; - result.w=0; - result.h=0; - expectedResult = result; - rectA = refRectA; - rectB = refRectB; - SDL_UnionRect(&rectA, &rectB, &result); - _validateUnionRectResults(&rectA, &rectB, &refRectA, &refRectB, &result, &expectedResult); -} - -/*! - * \brief Tests SDL_UnionRect() where rect B is inside rect A - * - * \sa - * http://wiki.libsdl.org/moin.cgi/SDL_UnionRect - */ -int rect_testUnionRectInside(void *arg) -{ - SDL_Rect refRectA, refRectB; - SDL_Rect rectA, rectB; - SDL_Rect expectedResult; - SDL_Rect result; - int minx, maxx, miny, maxy; - int dx, dy; - - /* Union 1x1 with itself */ - refRectA.x=RandomIntegerInRange(-1024, 1024); - refRectA.y=RandomIntegerInRange(-1024, 1024); - refRectA.w=1; - refRectA.h=1; - expectedResult = refRectA; - rectA = refRectA; - SDL_UnionRect(&rectA, &rectA, &result); - _validateUnionRectResults(&rectA, &rectA, &refRectA, &refRectA, &result, &expectedResult); - - /* Union 1x1 somewhere inside */ - refRectA.x=RandomIntegerInRange(-1024, 1024); - refRectA.y=RandomIntegerInRange(-1024, 1024); - refRectA.w=RandomIntegerInRange(256, 1024); - refRectA.h=RandomIntegerInRange(256, 1024); - refRectB.x=refRectA.x + 1 + RandomIntegerInRange(1, refRectA.w - 2); - refRectB.y=refRectA.y + 1 + RandomIntegerInRange(1, refRectA.h - 2); - refRectB.w=1; - refRectB.h=1; - expectedResult = refRectA; - rectA = refRectA; - rectB = refRectB; - SDL_UnionRect(&rectA, &rectB, &result); - _validateUnionRectResults(&rectA, &rectB, &refRectA, &refRectB, &result, &expectedResult); - - /* Union inside with edges modified */ - for (dx = -1; dx < 2; dx++) { - for (dy = -1; dy < 2; dy++) { - if ((dx != 0) || (dy != 0)) { - refRectA.x=RandomIntegerInRange(-1024, 1024); - refRectA.y=RandomIntegerInRange(-1024, 1024); - refRectA.w=RandomIntegerInRange(256, 1024); - refRectA.h=RandomIntegerInRange(256, 1024); - refRectB = refRectA; - if (dx == -1) refRectB.x++; - if ((dx == 1) || (dx == -1)) refRectB.w--; - if (dy == -1) refRectB.y++; - if ((dy == 1) || (dy == -1)) refRectB.h--; - expectedResult = refRectA; - rectA = refRectA; - rectB = refRectB; - SDL_UnionRect(&rectA, &rectB, &result); - _validateUnionRectResults(&rectA, &rectB, &refRectA, &refRectB, &result, &expectedResult); - } - } - } -} - -/*! - * \brief Negative tests against SDL_UnionRect() with invalid parameters - * - * \sa - * http://wiki.libsdl.org/moin.cgi/SDL_UnionRect - */ -int rect_testUnionRectParam(void *arg) -{ - SDL_Rect rectA, rectB; - SDL_Rect result; - - // invalid parameter combinations - SDL_UnionRect((SDL_Rect *)NULL, &rectB, &result); - AssertPass("Function did return when 1st parameter was NULL"); - SDL_UnionRect(&rectA, (SDL_Rect *)NULL, &result); - AssertPass("Function did return when 2nd parameter was NULL"); - SDL_UnionRect(&rectA, &rectB, (SDL_Rect *)NULL); - AssertPass("Function did return when 3rd parameter was NULL"); - SDL_UnionRect((SDL_Rect *)NULL, &rectB, (SDL_Rect *)NULL); - AssertPass("Function did return when 1st and 3rd parameter were NULL"); - SDL_UnionRect(&rectA, (SDL_Rect *)NULL, (SDL_Rect *)NULL); - AssertPass("Function did return when 2nd and 3rd parameter were NULL"); - SDL_UnionRect((SDL_Rect *)NULL, (SDL_Rect *)NULL, (SDL_Rect *)NULL); - AssertPass("Function did return when all parameters were NULL"); -} - -/*! - * \brief Tests SDL_RectEmpty() with various inputs - * - * \sa - * http://wiki.libsdl.org/moin.cgi/SDL_RectEmpty - */ -int rect_testRectEmpty(void *arg) -{ - SDL_Rect refRect; - SDL_Rect rect; - SDL_bool expectedResult; - SDL_bool result; - int w, h; - - // Non-empty case - refRect.x=RandomIntegerInRange(-1024, 1024); - refRect.y=RandomIntegerInRange(-1024, 1024); - refRect.w=RandomIntegerInRange(256, 1024); - refRect.h=RandomIntegerInRange(256, 1024); - expectedResult = SDL_FALSE; - rect = refRect; - result = SDL_RectEmpty((const SDL_Rect *)&rect); - _validateRectEmptyResults(result, expectedResult, &rect, &refRect); - - // Empty case - for (w=-1; w<2; w++) { - for (h=-1; h<2; h++) { - if ((w != 1) || (h != 1)) { - refRect.x=RandomIntegerInRange(-1024, 1024); - refRect.y=RandomIntegerInRange(-1024, 1024); - refRect.w=w; - refRect.h=h; - expectedResult = SDL_TRUE; - rect = refRect; - result = SDL_RectEmpty((const SDL_Rect *)&rect); - _validateRectEmptyResults(result, expectedResult, &rect, &refRect); - } - } - } -} - -/*! - * \brief Negative tests against SDL_RectEmpty() with invalid parameters - * - * \sa - * http://wiki.libsdl.org/moin.cgi/SDL_RectEmpty - */ -int rect_testRectEmptyParam(void *arg) -{ - SDL_bool result; - - // invalid parameter combinations - result = SDL_RectEmpty((const SDL_Rect *)NULL); - AssertTrue(result == SDL_TRUE, "Function did not return TRUE when 1st parameter was NULL"); -} - -/*! - * \brief Tests SDL_RectEquals() with various inputs - * - * \sa - * http://wiki.libsdl.org/moin.cgi/SDL_RectEquals - */ -int rect_testRectEquals(void *arg) -{ - SDL_Rect refRectA; - SDL_Rect refRectB; - SDL_Rect rectA; - SDL_Rect rectB; - SDL_bool expectedResult; - SDL_bool result; - - // Equals - refRectA.x=RandomIntegerInRange(-1024, 1024); - refRectA.y=RandomIntegerInRange(-1024, 1024); - refRectA.w=RandomIntegerInRange(1, 1024); - refRectA.h=RandomIntegerInRange(1, 1024); - refRectB = refRectA; - expectedResult = SDL_TRUE; - rectA = refRectA; - rectB = refRectB; - result = SDL_RectEquals((const SDL_Rect *)&rectA, (const SDL_Rect *)&rectB); - _validateRectEqualsResults(result, expectedResult, &rectA, &rectB, &refRectA, &refRectB); -} - -/*! - * \brief Negative tests against SDL_RectEquals() with invalid parameters - * - * \sa - * http://wiki.libsdl.org/moin.cgi/SDL_RectEquals - */ -int rect_testRectEqualsParam(void *arg) -{ - SDL_Rect rectA; - SDL_Rect rectB; - SDL_bool result; - - /* data setup */ - rectA.x=RandomIntegerInRange(-1024, 1024); - rectA.y=RandomIntegerInRange(-1024, 1024); - rectA.w=RandomIntegerInRange(1, 1024); - rectA.h=RandomIntegerInRange(1, 1024); - rectB.x=RandomIntegerInRange(-1024, 1024); - rectB.y=RandomIntegerInRange(-1024, 1024); - rectB.w=RandomIntegerInRange(1, 1024); - rectB.h=RandomIntegerInRange(1, 1024); - - // invalid parameter combinations - result = SDL_RectEquals((const SDL_Rect *)NULL, (const SDL_Rect *)&rectB); - AssertTrue(result == SDL_FALSE, "Function did not return FALSE when 1st parameter was NULL"); - result = SDL_RectEquals((const SDL_Rect *)&rectA, (const SDL_Rect *)NULL); - AssertTrue(result == SDL_FALSE, "Function did not return FALSE when 2nd parameter was NULL"); - result = SDL_RectEquals((const SDL_Rect *)NULL, (const SDL_Rect *)NULL); - AssertTrue(result == SDL_FALSE, "Function did not return FALSE when 1st and 2nd parameter were NULL"); -} diff --git a/test/test-automation/tests/testrender/Makefile.am b/test/test-automation/tests/testrender/Makefile.am deleted file mode 100644 index 314322192..000000000 --- a/test/test-automation/tests/testrender/Makefile.am +++ /dev/null @@ -1,4 +0,0 @@ -lib_LTLIBRARIES = libtestrender.la -libtestrender_la_SOURCES = testrender.c -libtestrender_la_CLAGS = -fPIC -g -libtestrender_la_LDFLAGS = `sdl-config --libs` -I ../../src/libSDLtest/.libs/libSDLtest.la diff --git a/test/test-automation/tests/testrender/testrender.c b/test/test-automation/tests/testrender/testrender.c deleted file mode 100644 index f95469f8c..000000000 --- a/test/test-automation/tests/testrender/testrender.c +++ /dev/null @@ -1,925 +0,0 @@ -/** - * Original code: automated SDL platform test written by Edgar Simo "bobbens" - * Extended and updated by aschiffler at ferzkopp dot net - */ - -#include - -#include - -#include "../../include/SDL_test.h" - -#define SCREEN_W 80 -#define SCREEN_H 60 - -#define FACE_W img_face.width -#define FACE_H img_face.height - -static SDL_Renderer *renderer; - -/* Prototypes for helper functions */ -static int _clearScreen (void); -static void _compare(const char *msg, const SurfaceImage_t *s, int allowable_error); -static int _hasTexAlpha(void); -static int _hasTexColor(void); -static SDL_Texture *_loadTestFace(void); -static int _hasBlendModes(void); -static int _hasDrawColor(void); -static int _isSupported(int code); - - -/* Test cases */ -static const TestCaseReference test1 = - (TestCaseReference){ "render_testGetNumRenderDrivers", "Tests call to SDL_GetNumRenderDrivers", TEST_ENABLED, 0, 0 }; - -static const TestCaseReference test2 = - (TestCaseReference){ "render_testCreateRenderer", "Tests SDL_CreateRenderer", TEST_ENABLED, 0, 0 }; - -static const TestCaseReference test3 = - (TestCaseReference){ "render_testPrimitives", "Tests rendering primitives", TEST_ENABLED, 0, 0 }; - -static const TestCaseReference test4 = - (TestCaseReference){ "render_testPrimitivesBlend", "Tests rendering primitives with blending", TEST_ENABLED, 0, 0 }; - -static const TestCaseReference test5 = - (TestCaseReference){ "render_testBlit", "Tests blitting", TEST_ENABLED, 0, 0 }; - -static const TestCaseReference test6 = - (TestCaseReference){ "render_testBlitColour", "Tests blitting with color", TEST_ENABLED, 0, 0 }; - -static const TestCaseReference test7 = - (TestCaseReference){ "render_testBlitAlpha", "Tests blitting with alpha", TEST_ENABLED, 0, 0 }; - -static const TestCaseReference test8 = - (TestCaseReference){ "render_testBlitBlend", "Tests blitting with blending", TEST_ENABLED, 0, 0 }; - - - -/* Test suite */ -extern const TestCaseReference *testSuite[] = { - &test1, &test2, &test3, &test4, &test5, &test6, &test7, &test8, NULL -}; - -TestCaseReference **QueryTestSuite() { - return (TestCaseReference **)testSuite; -} - -// Fixture - -void -SetUp(void *arg) -{ - /* Start SDL. */ - int ret = SDL_InitSubSystem( SDL_INIT_VIDEO ); - AssertTrue(ret==0, "SDL_Init(SDL_INIT_VIDEO): %s", SDL_GetError()); - - SDL_Window *w = SDL_CreateWindow( "title", SDL_WINDOWPOS_CENTERED, SDL_WINDOWPOS_CENTERED, - 80, 60, SDL_WINDOW_SHOWN ); - renderer = SDL_CreateRenderer(w, 0, 0); -} - -void -TearDown(void *arg) -{ - /* Quit SDL video */ - SDL_QuitSubSystem(SDL_INIT_VIDEO); -} - -/** - * @brief Tests call to SDL_GetNumRenderDrivers - * - * \sa - * http://wiki.libsdl.org/moin.cgi/SDL_GetNumRenderDrivers - */ -int -render_testGetNumRenderDrivers(void *arg) -{ - int n; - n = SDL_GetNumRenderDrivers(); - AssertTrue(n>=1, "Number of renderers >= 1, reported as %i", n); - if (n<0) { - AssertFail("SDL_GetNumRenderDrivers() failed: %s", SDL_GetError()); - } -} - -/** - * @brief Tests call to SDL_CreateRenderer - * - * \sa - * http://wiki.libsdl.org/moin.cgi/SDL_CreateRenderer - */ -int -render_testCreateRenderer(void *arg) -{ - SDL_Window *window = NULL; - SDL_Renderer *renderer = NULL; - int posX = 100, posY = 100, width = 320, height = 240; - window = SDL_CreateWindow("Hello World", posX, posY, width, height, 0); - if (window != NULL) { - AssertPass("Window created"); - renderer = SDL_CreateRenderer(window, -1, SDL_RENDERER_SOFTWARE); - if (renderer) { - AssertPass("Renderer created"); - SDL_DestroyRenderer(renderer); - } else { - AssertFail("Could not create renderer: %s", SDL_GetError()); - } - SDL_DestroyWindow(window); - } else { - AssertFail("Could not create window: %s", SDL_GetError()); - } -} - - - - -/** - * @brief Tests the SDL primitives for rendering. - * - * \sa - * http://wiki.libsdl.org/moin.cgi/SDL_SetRenderDrawColor - * http://wiki.libsdl.org/moin.cgi/SDL_RenderFillRect - * http://wiki.libsdl.org/moin.cgi/SDL_RenderDrawLine - * - */ -int render_testPrimitives (void *arg) -{ - int ret; - int x, y; - SDL_Rect rect; - - /* Need drawcolour or just skip test. */ - AssertTrue(_hasDrawColor(), "hasDrawColor"); - - /* Draw a rectangle. */ - rect.x = 40; - rect.y = 0; - rect.w = 40; - rect.h = 80; - - ret = SDL_SetRenderDrawColor(renderer, 13, 73, 200, SDL_ALPHA_OPAQUE ); - AssertEquals(ret, 0, "SDL_SetRenderDrawColor"); - - ret = SDL_RenderFillRect(renderer, &rect ); - AssertEquals(ret, 0,"SDL_RenderFillRect"); - - /* Draw a rectangle. */ - rect.x = 10; - rect.y = 10; - rect.w = 60; - rect.h = 40; - ret = SDL_SetRenderDrawColor(renderer, 200, 0, 100, SDL_ALPHA_OPAQUE ); - AssertEquals(ret, 0, "SDL_SetRenderDrawColor"); - - ret = SDL_RenderFillRect(renderer, &rect ); - AssertEquals(ret, 0, "SDL_RenderFillRect"); - - /* Draw some points like so: - * X.X.X.X.. - * .X.X.X.X. - * X.X.X.X.. */ - for (y=0; y<3; y++) { - x = y % 2; - for (; x<80; x+=2) { - ret = SDL_SetRenderDrawColor(renderer, x*y, x*y/2, x*y/3, SDL_ALPHA_OPAQUE ); - AssertEquals(ret, 0, "SDL_SetRenderDrawColor"); - - ret = SDL_RenderDrawPoint(renderer, x, y ); - AssertEquals(ret, 0, "SDL_RenderDrawPoint"); - } - } - - /* Draw some lines. */ - ret = SDL_SetRenderDrawColor(renderer, 0, 255, 0, SDL_ALPHA_OPAQUE ); - AssertEquals(ret, 0, "SDL_SetRenderDrawColor"); - - ret = SDL_RenderDrawLine(renderer, 0, 30, 80, 30 ); - AssertEquals(ret, 0, "SDL_RenderDrawLine"); - - ret = SDL_SetRenderDrawColor(renderer, 55, 55, 5, SDL_ALPHA_OPAQUE ); - AssertEquals(ret, 0, "SDL_SetRenderDrawColor"); - - ret = SDL_RenderDrawLine(renderer, 40, 30, 40, 60 ); - AssertEquals(ret, 0, "SDL_RenderDrawLine"); - - ret = SDL_SetRenderDrawColor(renderer, 5, 105, 105, SDL_ALPHA_OPAQUE ); - AssertEquals(ret, 0, "SDL_SetRenderDrawColor"); - - ret = SDL_RenderDrawLine(renderer, 0, 0, 29, 29 ); - AssertEquals(ret, 0, "SDL_RenderDrawLine"); - - ret = SDL_RenderDrawLine(renderer, 29, 30, 0, 59 ); - AssertEquals(ret, 0, "SDL_RenderDrawLine"); - - ret = SDL_RenderDrawLine(renderer, 79, 0, 50, 29 ); - AssertEquals(ret, 0, "SDL_RenderDrawLine"); - - ret = SDL_RenderDrawLine(renderer, 79, 59, 50, 30 ); - AssertEquals(ret, 0, "SDL_RenderDrawLine"); - - /* See if it's the same. */ - _compare( "Primitives output not the same.", &img_primitives, ALLOWABLE_ERROR_OPAQUE ); -} - - -/** - * @brief Tests the SDL primitives with alpha for rendering. - * - * \sa - * http://wiki.libsdl.org/moin.cgi/SDL_SetRenderDrawColor - * http://wiki.libsdl.org/moin.cgi/SDL_SetRenderDrawBlendMode - * http://wiki.libsdl.org/moin.cgi/SDL_RenderFillRect - */ -int render_testPrimitivesBlend (void *arg) -{ - int ret; - int i, j; - SDL_Rect rect; - - /* Need drawcolour and blendmode or just skip test. */ - AssertTrue(_hasDrawColor(), "_hasDrawColor"); - AssertTrue(_hasBlendModes(), "_hasBlendModes"); - - /* Create some rectangles for each blend mode. */ - ret = SDL_SetRenderDrawColor(renderer, 255, 255, 255, 0 ); - AssertEquals(ret, 0, "SDL_SetRenderDrawColor" ); - - ret = SDL_SetRenderDrawBlendMode(renderer, SDL_BLENDMODE_NONE ); - AssertEquals(ret, 0, "SDL_SetRenderDrawBlendMode" ); - - ret = SDL_RenderFillRect(renderer, NULL ); - AssertEquals(ret, 0, "SDL_RenderFillRect" ); - - rect.x = 10; - rect.y = 25; - rect.w = 40; - rect.h = 25; - ret = SDL_SetRenderDrawColor(renderer, 240, 10, 10, 75 ); - AssertEquals(ret, 0, "SDL_SetRenderDrawColor" ); - - ret = SDL_SetRenderDrawBlendMode(renderer, SDL_BLENDMODE_ADD ); - AssertEquals(ret, 0, "SDL_SetRenderDrawBlendMode" ); - - ret = SDL_RenderFillRect(renderer, &rect ); - AssertEquals(ret, 0, "SDL_RenderFillRect" ); - - rect.x = 30; - rect.y = 40; - rect.w = 45; - rect.h = 15; - ret = SDL_SetRenderDrawColor(renderer, 10, 240, 10, 100 ); - AssertEquals(ret, 0, "SDL_SetRenderDrawColor" ); - - ret = SDL_SetRenderDrawBlendMode(renderer, SDL_BLENDMODE_BLEND ); - AssertEquals(ret, 0, "SDL_SetRenderDrawBlendMode" ); - - ret = SDL_RenderFillRect(renderer, &rect ); - AssertEquals(ret, 0, "SDL_RenderFillRect" ); - - rect.x = 25; - rect.y = 25; - rect.w = 25; - rect.h = 25; - ret = SDL_SetRenderDrawColor(renderer, 10, 10, 240, 125 ); - AssertEquals(ret, 0, "SDL_SetRenderDrawColor" ); - - ret = SDL_SetRenderDrawBlendMode(renderer, SDL_BLENDMODE_NONE ); - AssertEquals(ret, 0, "SDL_SetRenderDrawBlendMode" ); - - ret = SDL_RenderFillRect(renderer, &rect ); - AssertEquals(ret, 0, "SDL_RenderFillRect" ); - - - /* Draw blended lines, lines for everyone. */ - for (i=0; i -#include - -FILE* TestSupportRWops_OpenFPFromReadDir(const char *file, const char *mode); -FILE* TestSupportRWops_OpenFPFromWriteDir(const char *file, const char *mode); -SDL_RWops* TestSupportRWops_OpenRWopsFromReadDir(const char *file, const char *mode); -SDL_RWops* TestSupportRWops_OpenRWopsFromWriteDir(const char *file, const char *mode); - -#endif diff --git a/test/test-automation/tests/testrwops/read b/test/test-automation/tests/testrwops/read deleted file mode 100644 index c57eff55e..000000000 --- a/test/test-automation/tests/testrwops/read +++ /dev/null @@ -1 +0,0 @@ -Hello World! \ No newline at end of file diff --git a/test/test-automation/tests/testrwops/testrwops.c b/test/test-automation/tests/testrwops/testrwops.c deleted file mode 100644 index 6bc336d31..000000000 --- a/test/test-automation/tests/testrwops/testrwops.c +++ /dev/null @@ -1,284 +0,0 @@ -/** - * Automated SDL_RWops test. - * - * Original code written by Edgar Simo "bobbens" - * Ported by Markus Kauppila (markus.kauppila@gmail.com) - * - * Released under Public Domain. - */ - -#include - -#include - -#include "../../include/SDL_test.h" - -const char* RWOPS_READ = "rwops_read"; -const char* RWOPS_WRITE = "rwops_write"; - -static const char hello_world[] = "Hello World!"; -static const char const_mem[] = "Hello World!"; - - -/* Test cases */ -static const TestCaseReference test1 = - (TestCaseReference){ "rwops_testParam", " Negative test for SDL_RWFromFile parameters", TEST_ENABLED, 0, 60 }; - -static const TestCaseReference test2 = - (TestCaseReference){ "rwops_testMem", "Tests opening from memory", TEST_ENABLED, 0, 60 }; - -static const TestCaseReference test3 = - (TestCaseReference){ "rwops_testConstMem", "Tests opening from (const) memory", TEST_ENABLED, 0, 60 }; - -static const TestCaseReference test4 = - (TestCaseReference){ "rwops_testFileRead", "Tests reading from a file", TEST_ENABLED, 0, 60 }; - -static const TestCaseReference test5 = - (TestCaseReference){ "rwops_testFileWrite", "Test writing to a file", TEST_ENABLED, 0, 60 }; - -static const TestCaseReference test6 = - (TestCaseReference){ "rwops_testFPRead", "Test reading from stdio", TEST_ENABLED, TEST_REQUIRES_STDIO, 60 }; - -static const TestCaseReference test7 = - (TestCaseReference){ "rwops_testFPWrite", "Test writing to stdio", TEST_ENABLED, TEST_REQUIRES_STDIO, 60 }; - - - -/* Test suite */ -extern const TestCaseReference *testSuite[] = { - &test1, &test2, &test3, &test4, &test5, &test6, &test7, NULL -}; - -TestCaseReference **QueryTestSuite() { - return (TestCaseReference **)testSuite; -} - - -// Fixture -void -SetUp(void *arg) -{ - FILE *handle = fopen(RWOPS_READ, "w"); - AssertTrue(handle != NULL, "Creating file '%s' failed", RWOPS_READ); - - fwrite(hello_world, 1, SDL_strlen(hello_world), handle); - fclose(handle); -} - -void -TearDown(void *arg) -{ - // Remove the created files - remove(RWOPS_READ); - remove(RWOPS_WRITE); -} - -/** - * @brief Makes sure parameters work properly. Helper function - * - * \sa - * http://wiki.libsdl.org/moin.cgi/SDL_RWseek - * http://wiki.libsdl.org/moin.cgi/SDL_RWread - */ -int _testGeneric( SDL_RWops *rw, int write ) -{ - char buf[sizeof(hello_world)]; - int i; - - /* Set to start. */ - i = SDL_RWseek( rw, 0, RW_SEEK_SET ); - AssertEquals(i, 0, "Seeking with SDL_RWseek (RW_SEEK_SET)"); - - /* Test write. */ - i = SDL_RWwrite( rw, hello_world, sizeof(hello_world)-1, 1); - - if (write) { - AssertEquals(i, 1, "Writing with SDL_RWwrite (failed to write)"); - } - else { - AssertTrue(i <= 0, "Writing with SDL_RWwrite (wrote when shouldn't have): %d <= 0", i); - } - - /* Test seek. */ - i = SDL_RWseek( rw, 6, RW_SEEK_SET ); - - AssertEquals(i, 6, "Seeking with SDL_RWseek (RW_SEEK_SET)"); - - /* Test seek. */ - i = SDL_RWseek( rw, 0, RW_SEEK_SET ); - AssertEquals(i, 0, "Seeking with SDL_RWseek (RW_SEEK_SET)"); - - /* Test read. */ - i = SDL_RWread( rw, buf, 1, sizeof(hello_world)-1 ); - AssertEquals(i, sizeof(hello_world)-1, "Reading with SDL_RWread"); - AssertEquals(SDL_memcmp( buf, hello_world, sizeof(hello_world)-1 ), 0, "Memory read does not match memory written"); - - /* More seek tests. */ - i = SDL_RWseek( rw, -4, RW_SEEK_CUR ); - AssertEquals(i, sizeof(hello_world)-5, "Seeking with SDL_RWseek (RW_SEEK_CUR))"); - - i = SDL_RWseek( rw, -1, RW_SEEK_END ); - AssertEquals(i, sizeof(hello_world)-2, "Seeking with SDL_RWseek (RW_SEEK_END)"); -} - -/*! - * Negative test for SDL_RWFromFile parameters - * - * \sa http://wiki.libsdl.org/moin.cgi/SDL_RWFromFile - * - */ -void rwops_testParam (void) -{ - SDL_RWops *rwops; - - /* These should all fail. */ - rwops = SDL_RWFromFile(NULL, NULL); - AssertTrue(rwops == NULL, "SDL_RWFromFile(NULL, NULL) worked"); - - rwops = SDL_RWFromFile(NULL, "ab+"); - AssertTrue(rwops == NULL, "SDL_RWFromFile(NULL, NULL) worked"); - - rwops = SDL_RWFromFile(NULL, "sldfkjsldkfj"); - AssertTrue(rwops == NULL, "SDL_RWFromFile(NULL, \"sldfkjsldkfj\") worked"); - - rwops = SDL_RWFromFile("something", ""); - AssertTrue(rwops == NULL, "SDL_RWFromFile(\"something\", \"\") worked"); - - rwops = SDL_RWFromFile("something", NULL); - AssertTrue(rwops == NULL, "SDL_RWFromFile(\"something\", NULL) worked"); -} - - -/** - * @brief Tests opening from memory. - * - * \sa http://wiki.libsdl.org/moin.cgi/SDL_RWFromMem - */ -void rwops_testMem (void) -{ - char mem[sizeof(hello_world)]; - SDL_RWops *rw; - - /* Open. */ - rw = SDL_RWFromMem( mem, sizeof(hello_world)-1 ); - AssertTrue(rw != NULL, "Opening memory with SDL_RWFromMem"); - - /* Run generic tests. */ - _testGeneric( rw, 1 ); - - /* Close. */ - SDL_FreeRW( rw ); -} - - -/** - * @brief Tests opening from memory. - * - * \sa - * http://wiki.libsdl.org/moin.cgi/SDL_RWFromConstMem - */ -void rwops_testConstMem (void) -{ - SDL_RWops *rw; - - /* Open. */ - rw = SDL_RWFromConstMem( const_mem, sizeof(const_mem)-1 ); - AssertTrue(rw != NULL, "Opening memory with SDL_RWFromConstMem"); - - /* Run generic tests. */ - _testGeneric( rw, 0 ); - - /* Close. */ - SDL_FreeRW( rw ); -} - - -/** - * @brief Tests reading from memory. - * - * \sa - * http://wiki.libsdl.org/moin.cgi/SDL_RWFromFile - * http://wiki.libsdl.org/moin.cgi/SDL_FreeRW - */ -void -rwops_testFileRead(void) -{ - SDL_RWops *rw; - - /* Read test. */ - rw = SDL_RWFromFile(RWOPS_READ, "r"); - AssertTrue(rw != NULL, "Opening memory with SDL_RWFromFile RWOPS_READ"); - - _testGeneric( rw, 0 ); - - SDL_FreeRW( rw ); -} - -/** - * @brief Tests writing from memory. - * - * \sa - * http://wiki.libsdl.org/moin.cgi/SDL_RWFromFile - * http://wiki.libsdl.org/moin.cgi/SDL_FreeRW - */ -void -rwops_testFileWrite(void) -{ - SDL_RWops *rw; - - /* Write test. */ - rw = SDL_RWFromFile(RWOPS_WRITE, "w+"); - AssertTrue(rw != NULL, "Opening memory with SDL_RWFromFile RWOPS_WRITE"); - - _testGeneric( rw, 1 ); - - SDL_FreeRW( rw ); -} - - -/** - * @brief Tests reading from stdio - * - * \sa - * http://wiki.libsdl.org/moin.cgi/SDL_RWFromFP - * http://wiki.libsdl.org/moin.cgi/SDL_FreeRW - * - */ -void -rwops_testFPRead(void) -{ - FILE *fp; - SDL_RWops *rw; - - /* Run read tests. */ - fp = fopen(RWOPS_READ, "r"); - AssertTrue(fp != NULL, "Failed to open file %s,", RWOPS_READ); - - rw = SDL_RWFromFP( fp, 1 ); - AssertTrue(rw != NULL, "Opening memory with SDL_RWFromFP"); - - // TODO bail out if NULL - _testGeneric( rw, 0 ); - - SDL_FreeRW( rw ); - fclose(fp); -} - -void -rwops_testFPWrite(void) -{ - FILE *fp; - SDL_RWops *rw; - - /* Run write tests. */ - fp = fopen(RWOPS_WRITE, "w+"); - AssertTrue(fp != NULL, "Failed to open file %s", RWOPS_WRITE); - - rw = SDL_RWFromFP( fp, 1 ); - AssertTrue( rw != NULL, "Opening memory with SDL_RWFromFP"); - - _testGeneric( rw, 1 ); - - SDL_FreeRW( rw ); - fclose(fp); -} diff --git a/test/test-automation/tests/testsurface/Makefile.am b/test/test-automation/tests/testsurface/Makefile.am deleted file mode 100644 index 06fa5ea9a..000000000 --- a/test/test-automation/tests/testsurface/Makefile.am +++ /dev/null @@ -1,4 +0,0 @@ -lib_LTLIBRARIES = libtestsurface.la -libtestsurface_la_SOURCES = testsurface.c -libtestsurface_la_CLAGS = -fPIC -g -libtestsurface_la_LDFLAGS = `sdl-config --libs` -I ../../src/libSDLtest/.libs/libSDLtest.la diff --git a/test/test-automation/tests/testsurface/testsurface.c b/test/test-automation/tests/testsurface/testsurface.c deleted file mode 100644 index dda9b1c10..000000000 --- a/test/test-automation/tests/testsurface/testsurface.c +++ /dev/null @@ -1,675 +0,0 @@ -/** - * Original code: automated SDL surface test written by Edgar Simo "bobbens" - */ - -#include -#include - -#include - -#include "../../include/SDL_test.h" - -/* Test case references */ -static const TestCaseReference test1 = - (TestCaseReference){ "surface_testLoad", "Tests sprite loading.", TEST_ENABLED, 0, 0}; - -static const TestCaseReference test2 = - (TestCaseReference){ "surface_testBlit", "Tests some blitting routines.", TEST_ENABLED, 0, 0}; - -static const TestCaseReference test3 = - (TestCaseReference){ "surface_testBlitBlendNone", "Tests blitting routines with none blending.", TEST_ENABLED, 0, 0}; - -static const TestCaseReference test4 = - (TestCaseReference){ "surface_testLoadFailure", "Tests sprite loading. A failure case.", TEST_ENABLED, 0, 0}; - -static const TestCaseReference test5 = - (TestCaseReference){ "surface_testConversion", "Tests sprite conversion.", TEST_ENABLED, 0, 0}; - -static const TestCaseReference test6 = - (TestCaseReference){ "surface_testBlitColorMod", "Tests some blitting routines with color mod.", TEST_ENABLED, 0, 0}; - -static const TestCaseReference test7 = - (TestCaseReference){ "surface_testBlitAlphaMod", "Tests some blitting routines with alpha mod.", TEST_ENABLED, 0, 0}; - -static const TestCaseReference test8 = - (TestCaseReference){ "surface_testBlitBlendLoop", "Test blittin routines with blending", TEST_ENABLED, 0, 0}; - -static const TestCaseReference test9 = - (TestCaseReference){ "surface_testBlitBlendBlend", "Tests blitting routines with blend blending.", TEST_ENABLED, 0, 0}; - -static const TestCaseReference test10 = - (TestCaseReference){ "surface_testBlitBlendAdd", "Tests blitting routines with add blending.", TEST_ENABLED, 0, 0}; - -static const TestCaseReference test11 = - (TestCaseReference){ "surface_testBlitBlendMod", "Tests blitting routines with modblending.", TEST_ENABLED, 0, 0}; - -/* Test suite */ -extern const TestCaseReference *testSuite[] = { - &test1, &test2, &test3, &test4, &test5, - &test6, &test7, &test8, &test9, &test10, &test11, NULL -}; - - -TestCaseReference **QueryTestSuite() { - return (TestCaseReference **)testSuite; -} - -/* Function prototypes */ -SDL_Surface *_CreateTestSurface(); - - -/* Create test fixture */ - -static SDL_Surface *testsur = NULL; - - -void -SetUp(void *arg) -{ - int ret = SDL_Init(SDL_INIT_VIDEO); - AssertTrue(ret == 0, "SDL_Init(SDL_INIT_VIDEO)"); - - testsur = _CreateTestSurface(); - AssertTrue(testsur != NULL, "SDL_Init(SDL_INIT_VIDEO)"); -} - -void -TearDown(void *arg) -{ - SDL_FreeSurface( testsur ); - - SDL_Quit(); -} - -/* Helper functions for the test cases */ - -#define TEST_SURFACE_WIDTH 80 -#define TEST_SURFACE_HEIGHT 60 - - -/*! - * Creates test surface - */ -SDL_Surface * -_CreateTestSurface() -{ - SDL_Surface *testsur = NULL; - - /* Create the test surface. */ - testsur = SDL_CreateRGBSurface( 0, - TEST_SURFACE_WIDTH, TEST_SURFACE_HEIGHT, 32, - RMASK, GMASK, BMASK, AMASK ); - - if(testsur->w != TEST_SURFACE_WIDTH) { - AssertFail("Test surface width doesn't match"); - } - - if(testsur->h != TEST_SURFACE_HEIGHT) { - AssertFail("Test surface height doesn't match"); - } - - AssertTrue(testsur != NULL, "SDL_CreateRGBSurface"); - - return testsur; -} - -/*! - * Create test surface from in-memory image - */ -SDL_Surface * -_createTestSurfaceFromMemory() -{ - SDL_Surface *face = NULL; - - /* Create face surface. */ - face = SDL_CreateRGBSurfaceFrom( (void*)img_face.pixel_data, - img_face.width, img_face.height, 32, img_face.width*4, - #if (SDL_BYTEORDER == SDL_BIG_ENDIAN) - 0xff000000, /* Red bit mask. */ - 0x00ff0000, /* Green bit mask. */ - 0x0000ff00, /* Blue bit mask. */ - 0x000000ff /* Alpha bit mask. */ - #else - 0x000000ff, /* Red bit mask. */ - 0x0000ff00, /* Green bit mask. */ - 0x00ff0000, /* Blue bit mask. */ - 0xff000000 /* Alpha bit mask. */ - #endif - ); - AssertTrue(face != NULL, "SDL_CreateRGBSurfaceFrom"); - - return face; -} - -/** - * @brief Tests a blend mode. - */ -void _testBlitBlendMode(SDL_Surface *testsur, SDL_Surface *face, int mode) -{ - int ret; - int i, j, ni, nj; - SDL_Rect rect; - - AssertTrue(testsur != NULL, "testsur != NULL"); - AssertTrue(face != NULL, "face != NULL"); - - /* Clear surface. */ - ret = SDL_FillRect( testsur, NULL, - SDL_MapRGB( testsur->format, 0, 0, 0 ) ); - AssertTrue(ret == 0, "SDL_FillRect"); - - /* Steps to take. */ - ni = testsur->w - face->w; - nj = testsur->h - face->h; - - /* Constant values. */ - rect.w = face->w; - rect.h = face->h; - - /* Test blend mode. */ - for (j=0; j <= nj; j+=4) { - for (i=0; i <= ni; i+=4) { - /* Set blend mode. */ - ret = SDL_SetSurfaceBlendMode( face, mode ); - AssertTrue(ret == 0, "SDL_SetSurfaceBlendMode"); - - /* Blitting. */ - rect.x = i; - rect.y = j; - // TODO Add pixel level validation, SDL_BlitSurface might be no-op - ret = SDL_BlitSurface( face, NULL, testsur, &rect ); - AssertTrue(ret == 0, "SDL_BlitSurface"); - } - } -} - -int -_AssertFileExist(const char *filename) -{ - struct stat st; - int ret = stat(filename, &st); - - AssertTrue(ret == 0, "Does file %s exist", filename); -} - -/* Test case functions */ -/** - * @brief Tests sprite loading - */ -void surface_testLoad(void *arg) -{ - int ret; - SDL_Surface *face, *rface; - - /* Clear surface. */ - /* - ret = SDL_FillRect( testsur, NULL, - SDL_MapRGB( testsur->format, 0, 0, 0 ) ); - AssertTrue(ret == 0, "SDL_FillRect"); - */ - - /* Create the blit surface. */ - const char *filename = "data/images/icon.bmp"; - _AssertFileExist(filename); - - face = SDL_LoadBMP(filename); - AssertTrue(face != NULL, "SDL_CreateLoadBmp"); - - AssertTrue(face->w == 32, "testing icon width"); - AssertTrue(face->h == 32, "testing icon height"); -} - -/*! - * Tests sprite conversion. - */ -void surface_testConversion(void *arg) -{ - SDL_Surface *rface = NULL, *face = NULL; - int ret = 0; - - const char *filename = "data/images/icon.bmp"; - _AssertFileExist(filename); - - face = SDL_LoadBMP(filename); - AssertTrue(face != NULL, "SDL_CreateLoadBmp"); - - /* Set transparent pixel as the pixel at (0,0) */ - if (face->format->palette) { - ret = SDL_SetColorKey(face, SDL_RLEACCEL, *(Uint8 *) face->pixels); - AssertTrue(ret == 0, "SDL_SetColorKey"); - } - - /* Convert to 32 bit to compare. */ - rface = SDL_ConvertSurface( face, testsur->format, 0 ); - AssertTrue(rface != NULL, "SDL_ConvertSurface"); - - /* See if it's the same. */ - AssertTrue(surface_compare( rface, &img_face, 0 ) == 0, - "Comparing primitives output."); - - /* Clean up. */ - SDL_FreeSurface( rface ); - SDL_FreeSurface( face ); -} - - -/** - * @brief Tests sprite loading. A failure case. - */ -void surface_testLoadFailure(void *arg) -{ - SDL_Surface *face = SDL_LoadBMP("nonexistant.bmp"); - AssertTrue(face == NULL, "SDL_CreateLoadBmp"); -} - -/** - * @brief Tests some blitting routines. - */ -void surface_testBlit(void *arg) -{ - int ret; - SDL_Rect rect; - SDL_Surface *face; - int i, j, ni, nj; - - /* Clear surface. */ - - ret = SDL_FillRect( testsur, NULL, - SDL_MapRGB( testsur->format, 0, 0, 0 ) ); - - AssertTrue(ret == 0, "SDL_FillRect"); - - face = _createTestSurfaceFromMemory(); - - /* Constant values. */ - rect.w = face->w; - rect.h = face->h; - ni = testsur->w - face->w; - nj = testsur->h - face->h; - - /* Loop blit. */ - for (j=0; j <= nj; j+=4) { - for (i=0; i <= ni; i+=4) { - /* Blitting. */ - rect.x = i; - rect.y = j; - // TODO Add pixel level validation, SDL_BlitSurface might be no-op - ret = SDL_BlitSurface( face, NULL, testsur, &rect ); - - AssertTrue(ret == 0, "SDL_BlitSurface"); - } - } - - /* See if it's the same. */ - AssertTrue(surface_compare( testsur, &img_blit, 0 ) == 0, - "Comparing blitting output (normal blit)."); - - /* Clean up. */ - SDL_FreeSurface( face ); -} - -/** - * @brief Tests some blitting routines with color mod - */ -void surface_testBlitColorMod(void *arg) -{ - int ret; - SDL_Rect rect; - SDL_Surface *face; - int i, j, ni, nj; - - /* Clear surface. */ - - ret = SDL_FillRect( testsur, NULL, - SDL_MapRGB( testsur->format, 0, 0, 0 ) ); - - AssertTrue(ret == 0, "SDL_FillRect"); - - face = _createTestSurfaceFromMemory(); - - /* Constant values. */ - rect.w = face->w; - rect.h = face->h; - ni = testsur->w - face->w; - nj = testsur->h - face->h; - - /* Clear surface. */ - ret = SDL_FillRect( testsur, NULL, - SDL_MapRGB( testsur->format, 0, 0, 0 ) ); - AssertTrue(ret == 0, "SDL_FillRect"); - - /* Test blitting with colour mod. */ - for (j=0; j <= nj; j+=4) { - for (i=0; i <= ni; i+=4) { - /* Set colour mod. */ - ret = SDL_SetSurfaceColorMod( face, (255/nj)*j, (255/ni)*i, (255/nj)*j ); - AssertTrue(ret == 0, "SDL_SetSurfaceColorMod"); - - /* Blitting. */ - rect.x = i; - rect.y = j; - // TODO Add pixel level validation, SDL_BlitSurface might be no-op - ret = SDL_BlitSurface( face, NULL, testsur, &rect ); - - AssertTrue(ret == 0, "SDL_BlitSurface"); - } - } - - /* See if it's the same. */ - AssertTrue(surface_compare( testsur, &img_blitColour, 0 ) == 0, - "Comparing blitting output (using SDL_SetSurfaceColorMod)."); - - /* Clean up. */ - SDL_FreeSurface( face ); -} - -/** - * @brief Tests some blitting routines with alpha mod - */ -void surface_testBlitAlphaMod(void *arg) -{ - int ret; - SDL_Rect rect; - SDL_Surface *face; - int i, j, ni, nj; - - /* Clear surface. */ - - ret = SDL_FillRect( testsur, NULL, - SDL_MapRGB( testsur->format, 0, 0, 0 ) ); - - AssertTrue(ret == 0, "SDL_FillRect"); - - face = _createTestSurfaceFromMemory(); - - /* Constant values. */ - rect.w = face->w; - rect.h = face->h; - ni = testsur->w - face->w; - nj = testsur->h - face->h; - - /* Clear surface. */ - ret = SDL_FillRect( testsur, NULL, - SDL_MapRGB( testsur->format, 0, 0, 0 ) ); - AssertTrue(ret == 0, "SDL_FillRect"); - - /* Restore colour. */ - ret = SDL_SetSurfaceColorMod( face, 255, 255, 255 ); - AssertTrue(ret == 0, "SDL_SetSurfaceColorMod"); - - /* Test blitting with colour mod. */ - for (j=0; j <= nj; j+=4) { - for (i=0; i <= ni; i+=4) { - /* Set alpha mod. */ - ret = SDL_SetSurfaceAlphaMod( face, (255/ni)*i ); - AssertTrue(ret == 0, "SDL_SetSurfaceAlphaMod"); - - /* Blitting. */ - rect.x = i; - rect.y = j; - // TODO Add pixel level validation, SDL_BlitSurface might be no-op - ret = SDL_BlitSurface( face, NULL, testsur, &rect ); - AssertTrue(ret == 0, "SDL_BlitSurface"); - } - } - - /* See if it's the same. */ - AssertTrue(surface_compare( testsur, &img_blitAlpha, 0 ) == 0, - "Comparing blitting output (using SDL_SetSurfaceAlphaMod)."); - - /* Clean up. */ - SDL_FreeSurface( face ); -} - - -/** - * @brief Tests some more blitting routines. - */ -void surface_testBlitBlendNone(void *arg) -{ - int ret; - SDL_Rect rect; - SDL_Surface *face; - int i, j, ni, nj; - int mode; - - /* Clear surface. */ - ret = SDL_FillRect( testsur, NULL, - SDL_MapRGB( testsur->format, 0, 0, 0 ) ); - AssertTrue(ret == 0, "SDL_FillRect"); - - face = _createTestSurfaceFromMemory(); - - /* Set alpha mod. */ - // TODO alpha value could be generated by fuzzer - ret = SDL_SetSurfaceAlphaMod( face, 100 ); - AssertTrue(ret == 0, "SDL_SetSurfaceAlphaMod"); - - /* Steps to take. */ - ni = testsur->w - face->w; - nj = testsur->h - face->h; - - AssertTrue(ni != 0, "ni != 0"); - AssertTrue(nj != 0, "nj != 0"); - - /* Constant values. */ - rect.w = face->w; - rect.h = face->h; - /* Test None. */ - _testBlitBlendMode( testsur, face, SDL_BLENDMODE_NONE ); - AssertTrue(surface_compare( testsur, &img_blendNone, 0 ) == 0, - "Comparing blitting blending output (using SDL_BLENDMODE_NONE)."); - - /* Test Blend. */ - _testBlitBlendMode( testsur, face, SDL_BLENDMODE_BLEND ); - AssertTrue(surface_compare( testsur, &img_blendBlend, 0 ) == 0, - "Comparing blitting blending output (using SDL_BLENDMODE_BLEND)."); - - /* Test Add. */ - _testBlitBlendMode( testsur, face, SDL_BLENDMODE_ADD ); - AssertTrue(surface_compare( testsur, &img_blendAdd, 0 ) == 0, - "Comparing blitting blending output (using SDL_BLENDMODE_ADD)."); - - /* Test Mod. */ - _testBlitBlendMode( testsur, face, SDL_BLENDMODE_MOD ); - AssertTrue(surface_compare( testsur, &img_blendMod, 0 ) == 0, - "Comparing blitting blending output not the same (using SDL_BLENDMODE_MOD)."); -} - -/** - * @brief Tests some more blitting routines. - */ -void surface_testBlitBlendBlend(void *arg) -{ - int ret; - SDL_Rect rect; - SDL_Surface *face; - int i, j, ni, nj; - int mode; - - /* Clear surface. */ - ret = SDL_FillRect( testsur, NULL, - SDL_MapRGB( testsur->format, 0, 0, 0 ) ); - AssertTrue(ret == 0, "SDL_FillRect"); - - face = _createTestSurfaceFromMemory(); - - /* Set alpha mod. */ - // TODO alpha value could be generated by fuzzer - ret = SDL_SetSurfaceAlphaMod( face, 100 ); - AssertTrue(ret == 0, "SDL_SetSurfaceAlphaMod"); - - /* Steps to take. */ - ni = testsur->w - face->w; - nj = testsur->h - face->h; - - AssertTrue(ni != 0, "ni != 0"); - AssertTrue(nj != 0, "nj != 0"); - - /* Constant values. */ - rect.w = face->w; - rect.h = face->h; - - /* Test Blend. */ - _testBlitBlendMode( testsur, face, SDL_BLENDMODE_BLEND ); - AssertTrue(surface_compare( testsur, &img_blendBlend, 0 ) == 0, - "Comparing blitting blending output (using SDL_BLENDMODE_BLEND)."); -} - -/** - * @brief Tests some more blitting routines. - */ -void surface_testBlitBlendAdd(void *arg) -{ - int ret; - SDL_Rect rect; - SDL_Surface *face; - int i, j, ni, nj; - int mode; - - /* Clear surface. */ - ret = SDL_FillRect( testsur, NULL, - SDL_MapRGB( testsur->format, 0, 0, 0 ) ); - AssertTrue(ret == 0, "SDL_FillRect"); - - face = _createTestSurfaceFromMemory(); - - /* Set alpha mod. */ - // TODO alpha value could be generated by fuzzer - ret = SDL_SetSurfaceAlphaMod( face, 100 ); - AssertTrue(ret == 0, "SDL_SetSurfaceAlphaMod"); - - /* Steps to take. */ - ni = testsur->w - face->w; - nj = testsur->h - face->h; - - AssertTrue(ni != 0, "ni != 0"); - AssertTrue(nj != 0, "nj != 0"); - - /* Constant values. */ - rect.w = face->w; - rect.h = face->h; - - /* Test Add. */ - _testBlitBlendMode( testsur, face, SDL_BLENDMODE_ADD ); - AssertTrue(surface_compare( testsur, &img_blendAdd, 0 ) == 0, - "Comparing blitting blending output (using SDL_BLENDMODE_ADD)."); -} - -/** - * @brief Tests some more blitting routines. - */ -void surface_testBlitBlendMod(void *arg) -{ - int ret; - SDL_Rect rect; - SDL_Surface *face; - int i, j, ni, nj; - int mode; - - /* Clear surface. */ - ret = SDL_FillRect( testsur, NULL, - SDL_MapRGB( testsur->format, 0, 0, 0 ) ); - AssertTrue(ret == 0, "SDL_FillRect"); - - face = _createTestSurfaceFromMemory(); - - /* Set alpha mod. */ - // TODO alpha value could be generated by fuzzer - ret = SDL_SetSurfaceAlphaMod( face, 100 ); - AssertTrue(ret == 0, "SDL_SetSurfaceAlphaMod"); - - /* Steps to take. */ - ni = testsur->w - face->w; - nj = testsur->h - face->h; - - AssertTrue(ni != 0, "ni != 0"); - AssertTrue(nj != 0, "nj != 0"); - - /* Constant values. */ - rect.w = face->w; - rect.h = face->h; - /* Test None. */ - - /* Test Mod. */ - _testBlitBlendMode( testsur, face, SDL_BLENDMODE_MOD ); - AssertTrue(surface_compare( testsur, &img_blendMod, 0 ) == 0, - "Comparing blitting blending output (using SDL_BLENDMODE_MOD)."); -} - -/** - * @brief Tests some more blitting routines with loop - */ -void surface_testBlitBlendLoop(void *arg) { - int ret; - SDL_Rect rect; - SDL_Surface *face; - int i, j, ni, nj; - int mode; - - /* Clear surface. */ - ret = SDL_FillRect( testsur, NULL, - SDL_MapRGB( testsur->format, 0, 0, 0 ) ); - AssertTrue(ret == 0, "SDL_FillRect"); - - face = _createTestSurfaceFromMemory(); - - /* Set alpha mod. */ - // TODO alpha value could be generated by fuzzer - ret = SDL_SetSurfaceAlphaMod( face, 100 ); - AssertTrue(ret == 0, "SDL_SetSurfaceAlphaMod"); - - /* Steps to take. */ - ni = testsur->w - face->w; - nj = testsur->h - face->h; - - AssertTrue(ni != 0, "ni != 0"); - AssertTrue(nj != 0, "nj != 0"); - - /* Constant values. */ - rect.w = face->w; - rect.h = face->h; - - /* Clear surface. */ - ret = SDL_FillRect( testsur, NULL, - SDL_MapRGB( testsur->format, 0, 0, 0 ) ); - - AssertTrue(ret == 0, "SDL_FillRect"); - - /* Loop blit. */ - for (j=0; j <= nj; j+=4) { - for (i=0; i <= ni; i+=4) { - - /* Set colour mod. */ - ret = SDL_SetSurfaceColorMod( face, (255/nj)*j, (255/ni)*i, (255/nj)*j ); - AssertTrue(ret == 0, "SDL_SetSurfaceColorMod"); - - /* Set alpha mod. */ - ret = SDL_SetSurfaceAlphaMod( face, (100/ni)*i ); - AssertTrue(ret == 0, "SDL_SetSurfaceAlphaMod"); - - /* Crazy blending mode magic. */ - mode = (i/4*j/4) % 4; - if (mode==0) mode = SDL_BLENDMODE_NONE; - else if (mode==1) mode = SDL_BLENDMODE_BLEND; - else if (mode==2) mode = SDL_BLENDMODE_ADD; - else if (mode==3) mode = SDL_BLENDMODE_MOD; - ret = SDL_SetSurfaceBlendMode( face, mode ); - - AssertTrue(ret == 0, "SDL_SetSurfaceBlendMode"); - - /* Blitting. */ - rect.x = i; - rect.y = j; - ret = SDL_BlitSurface( face, NULL, testsur, &rect ); - AssertTrue(ret == 0, "SDL_BlitSurface"); - } - } - - /* Check to see if matches. */ - AssertTrue(surface_compare( testsur, &img_blendAll, 0 ) == 0, - "Surface comparison (surface_compare)."); - - /* Clean up. */ - SDL_FreeSurface( face ); -} diff --git a/test/test-automation/tests/testsyswm/Makefile.am b/test/test-automation/tests/testsyswm/Makefile.am deleted file mode 100644 index 2a3e8a617..000000000 --- a/test/test-automation/tests/testsyswm/Makefile.am +++ /dev/null @@ -1,4 +0,0 @@ -lib_LTLIBRARIES = libtestsyswm.la -libtestsyswm_la_SOURCES = testsyswm.c -libtestsyswm_la_CLAGS = -fPIC -g -libtestsyswm_la_LDFLAGS = `sdl-config --libs` -I ../../src/libSDLtest/.libs/libSDLtest.la diff --git a/test/test-automation/tests/testsyswm/testsyswm.c b/test/test-automation/tests/testsyswm/testsyswm.c deleted file mode 100644 index 6360eb4e0..000000000 --- a/test/test-automation/tests/testsyswm/testsyswm.c +++ /dev/null @@ -1,34 +0,0 @@ -#include - -#include - -#include "../../include/SDL_test.h" - - - -/*! - * Note: Add test for syswm here - * - */ - -/* Test cases */ -static const TestCaseReference test1 = - (TestCaseReference){ "syswm_test", "description", TEST_DISABLED, 0, 0 }; - -/* Test suite */ -extern const TestCaseReference *testSuite[] = { - &test1, NULL -}; - -TestCaseReference **QueryTestSuite() { - return (TestCaseReference **)testSuite; -} - -/** - * @brief Document test case here - */ -int -syswm_test(void *arg) -{ - AssertPass(""); -} diff --git a/test/test-automation/tests/testvideo/Makefile.am b/test/test-automation/tests/testvideo/Makefile.am deleted file mode 100644 index 75c806d9e..000000000 --- a/test/test-automation/tests/testvideo/Makefile.am +++ /dev/null @@ -1,4 +0,0 @@ -lib_LTLIBRARIES = libtestvideo.la -libtestvideo_la_SOURCES = testvideo.c -libtestvideo_la_CLAGS = -fPIC -g -libtestvideo_la_LDFLAGS = `sdl-config --libs` -I ../../src/libSDLtest/.libs/libSDLtest.la diff --git a/test/test-automation/tests/testvideo/testvideo.c b/test/test-automation/tests/testvideo/testvideo.c deleted file mode 100644 index 686c42881..000000000 --- a/test/test-automation/tests/testvideo/testvideo.c +++ /dev/null @@ -1,34 +0,0 @@ -#include - -#include - -#include "../../include/SDL_test.h" - - - -/*! - * Note: Add test for video here - * - */ - -/* Test cases */ -static const TestCaseReference test1 = - (TestCaseReference){ "video_test", "video stuff", TEST_DISABLED, 0, 0 }; - -/* Test suite */ -extern const TestCaseReference *testSuite[] = { - &test1, NULL -}; - -TestCaseReference **QueryTestSuite() { - return (TestCaseReference **)testSuite; -} - -/** - * @brief Document test case here - */ -int -video_test(void *arg) -{ - AssertPass(""); -} From 91ff680aa52f5136c0d3f49d1010f34178b69709 Mon Sep 17 00:00:00 2001 From: Sam Lantinga Date: Sun, 19 May 2013 22:28:10 -0700 Subject: [PATCH 112/542] Fixed bug 1837 - Use error extension instead of glGetError() Implemented support for GL_ARB_debug_output, but was unable to test it on Mac OS X. --- include/SDL_test_common.h | 1 + src/render/opengl/SDL_glfuncs.h | 2 +- src/render/opengl/SDL_render_gl.c | 159 ++++++++++++++++++++++-------- src/test/SDL_test_common.c | 10 +- test/testgl2.c | 1 + 5 files changed, 131 insertions(+), 42 deletions(-) diff --git a/include/SDL_test_common.h b/include/SDL_test_common.h index 76ad87781..611c54334 100644 --- a/include/SDL_test_common.h +++ b/include/SDL_test_common.h @@ -104,6 +104,7 @@ typedef struct int gl_accelerated; int gl_major_version; int gl_minor_version; + int gl_debug; } SDLTest_CommonState; #include "begin_code.h" diff --git a/src/render/opengl/SDL_glfuncs.h b/src/render/opengl/SDL_glfuncs.h index e7362cc37..1fff29717 100644 --- a/src/render/opengl/SDL_glfuncs.h +++ b/src/render/opengl/SDL_glfuncs.h @@ -152,7 +152,7 @@ SDL_PROC_UNUSED(void, glGetMaterialiv, SDL_PROC_UNUSED(void, glGetPixelMapfv, (GLenum map, GLfloat * values)) SDL_PROC_UNUSED(void, glGetPixelMapuiv, (GLenum map, GLuint * values)) SDL_PROC_UNUSED(void, glGetPixelMapusv, (GLenum map, GLushort * values)) -SDL_PROC_UNUSED(void, glGetPointerv, (GLenum pname, GLvoid * *params)) +SDL_PROC(void, glGetPointerv, (GLenum pname, GLvoid * *params)) SDL_PROC_UNUSED(void, glGetPolygonStipple, (GLubyte * mask)) SDL_PROC(const GLubyte *, glGetString, (GLenum name)) SDL_PROC_UNUSED(void, glGetTexEnvfv, diff --git a/src/render/opengl/SDL_render_gl.c b/src/render/opengl/SDL_render_gl.c index 73ec0a8f8..22b6bba7b 100644 --- a/src/render/opengl/SDL_render_gl.c +++ b/src/render/opengl/SDL_render_gl.c @@ -100,6 +100,13 @@ struct GL_FBOList typedef struct { SDL_GLContext context; + + SDL_bool GL_ARB_debug_output_supported; + int errors; + char **error_messages; + GLDEBUGPROCARB next_error_callback; + GLvoid *next_error_userparam; + SDL_bool GL_ARB_texture_rectangle_supported; struct { GL_Shader shader; @@ -151,7 +158,7 @@ typedef struct GL_FBOList *fbo; } GL_TextureData; -static __inline__ const char* +SDL_FORCE_INLINE const char* GL_TranslateError (GLenum error) { #define GL_ERROR_TRANSLATE(e) case e: return #e; @@ -170,22 +177,57 @@ GL_TranslateError (GLenum error) #undef GL_ERROR_TRANSLATE } -static __inline__ int -GL_CheckAllErrors (const char *prefix, SDL_Renderer * renderer, const char *file, int line, const char *function) +SDL_FORCE_INLINE void +GL_ClearErrors(SDL_Renderer *renderer) +{ + GL_RenderData *data = (GL_RenderData *) renderer->driverdata; + + if (data->GL_ARB_debug_output_supported) { + if (data->errors) { + int i; + for (i = 0; i < data->errors; ++i) { + SDL_free(data->error_messages[i]); + } + SDL_free(data->error_messages); + + data->errors = 0; + data->error_messages = NULL; + } + } else { + while (data->glGetError() != GL_NO_ERROR) { + continue; + } + } +} + +SDL_FORCE_INLINE int +GL_CheckAllErrors (const char *prefix, SDL_Renderer *renderer, const char *file, int line, const char *function) { GL_RenderData *data = (GL_RenderData *) renderer->driverdata; int ret = 0; - /* check gl errors (can return multiple errors) */ - for (;;) { - GLenum error = data->glGetError(); - if (error != GL_NO_ERROR) { - if (prefix == NULL || prefix[0] == '\0') { - prefix = "generic"; + + if (data->GL_ARB_debug_output_supported) { + if (data->errors) { + int i; + for (i = 0; i < data->errors; ++i) { + SDL_SetError("%s: %s (%d): %s %s", prefix, file, line, function, data->error_messages[i]); + ret = -1; + } + GL_ClearErrors(renderer); + } + } else { + /* check gl errors (can return multiple errors) */ + for (;;) { + GLenum error = data->glGetError(); + if (error != GL_NO_ERROR) { + if (prefix == NULL || prefix[0] == '\0') { + prefix = "generic"; + } + SDL_SetError("%s: %s (%d): %s %s (0x%X)", prefix, file, line, function, GL_TranslateError(error), error); + ret = -1; + } else { + break; } - SDL_SetError("%s: %s (%d): %s %s (0x%X)", prefix, file, line, function, GL_TranslateError(error), error); - ret++; - } else { - break; } } return ret; @@ -226,6 +268,7 @@ GL_ActivateRenderer(SDL_Renderer * renderer) { GL_RenderData *data = (GL_RenderData *) renderer->driverdata; + GL_ClearErrors(renderer); if (SDL_CurrentContext != data->context) { if (SDL_GL_MakeCurrent(renderer->window, data->context) < 0) { return -1; @@ -264,8 +307,35 @@ GL_ResetState(SDL_Renderer *renderer) GL_CheckError("", renderer); } +static void +GL_HandleDebugMessage(GLenum source, GLenum type, GLuint id, GLenum severity, GLsizei length, const char *message, void *userParam) +{ + SDL_Renderer *renderer = (SDL_Renderer *) userParam; + GL_RenderData *data = (GL_RenderData *) renderer->driverdata; -GL_FBOList * + if (type == GL_DEBUG_TYPE_ERROR_ARB) { + /* Record this error */ + ++data->errors; + data->error_messages = SDL_realloc(data->error_messages, data->errors * sizeof(*data->error_messages)); + if (data->error_messages) { + data->error_messages[data->errors-1] = SDL_strdup(message); + } + } + printf("%s\n", message); + + /* If there's another error callback, pass it along, otherwise log it */ + if (data->next_error_callback) { + data->next_error_callback(source, type, id, severity, length, message, data->next_error_userparam); + } else { + if (type == GL_DEBUG_TYPE_ERROR_ARB) { + SDL_LogError(SDL_LOG_CATEGORY_RENDER, "%s", message); + } else { + SDL_LogDebug(SDL_LOG_CATEGORY_RENDER, "%s", message); + } + } +} + +static GL_FBOList * GL_GetFBO(GL_RenderData *data, Uint32 w, Uint32 h) { GL_FBOList *result = data->framebuffers; @@ -374,6 +444,16 @@ GL_CreateRenderer(SDL_Window * window, Uint32 flags) renderer->info.flags |= SDL_RENDERER_PRESENTVSYNC; } + /* Check for debug output support */ + if (SDL_GL_ExtensionSupported("GL_ARB_debug_output")) { + PFNGLDEBUGMESSAGECALLBACKARBPROC glDebugMessageCallbackARBFunc = (PFNGLDEBUGMESSAGECALLBACKARBPROC) SDL_GL_GetProcAddress("glDebugMessageCallbackARB"); + + data->GL_ARB_debug_output_supported = SDL_TRUE; + data->glGetPointerv(GL_DEBUG_CALLBACK_FUNCTION_ARB, (GLvoid **)&data->next_error_callback); + data->glGetPointerv(GL_DEBUG_CALLBACK_USER_PARAM_ARB, &data->next_error_userparam); + glDebugMessageCallbackARBFunc(GL_HandleDebugMessage, renderer); + } + if (SDL_GL_ExtensionSupported("GL_ARB_texture_rectangle") || SDL_GL_ExtensionSupported("GL_EXT_texture_rectangle")) { data->GL_ARB_texture_rectangle_supported = SDL_TRUE; @@ -442,7 +522,7 @@ GL_WindowEvent(SDL_Renderer * renderer, const SDL_WindowEvent *event) } } -static __inline__ int +SDL_FORCE_INLINE int power_of_2(int input) { int value = 1; @@ -453,7 +533,7 @@ power_of_2(int input) return value; } -static __inline__ SDL_bool +SDL_FORCE_INLINE SDL_bool convert_format(GL_RenderData *renderdata, Uint32 pixel_format, GLint* internalFormat, GLenum* format, GLenum* type) { @@ -602,7 +682,7 @@ GL_CreateTexture(SDL_Renderer * renderer, SDL_Texture * texture) texture_h, 0, format, type, NULL); } renderdata->glDisable(data->type); - if (GL_CheckError("glTexImage2D()", renderer) > 0) { + if (GL_CheckError("glTexImage2D()", renderer) < 0) { return -1; } @@ -641,8 +721,7 @@ GL_CreateTexture(SDL_Renderer * renderer, SDL_Texture * texture) renderdata->glDisable(data->type); } - GL_CheckError("", renderer); - return 0; + return GL_CheckError("", renderer); } static int @@ -654,7 +733,6 @@ GL_UpdateTexture(SDL_Renderer * renderer, SDL_Texture * texture, GL_ActivateRenderer(renderer); - GL_CheckError("", renderer); renderdata->glEnable(data->type); renderdata->glBindTexture(data->type, data->texture); renderdata->glPixelStorei(GL_UNPACK_ALIGNMENT, 1); @@ -689,10 +767,7 @@ GL_UpdateTexture(SDL_Renderer * renderer, SDL_Texture * texture, data->format, data->formattype, pixels); } renderdata->glDisable(data->type); - if (GL_CheckError("glTexSubImage2D()", renderer) > 0) { - return -1; - } - return 0; + return GL_CheckError("glTexSubImage2D()", renderer); } static int @@ -782,8 +857,7 @@ GL_UpdateViewport(SDL_Renderer * renderer) (GLdouble) 0, 0.0, 1.0); } - GL_CheckError("", renderer); - return 0; + return GL_CheckError("", renderer); } static int @@ -965,9 +1039,7 @@ GL_RenderDrawLines(SDL_Renderer * renderer, const SDL_FPoint * points, #endif data->glEnd(); } - GL_CheckError("", renderer); - - return 0; + return GL_CheckError("", renderer); } static int @@ -983,9 +1055,7 @@ GL_RenderFillRects(SDL_Renderer * renderer, const SDL_FRect * rects, int count) data->glRectf(rect->x, rect->y, rect->x + rect->w, rect->y + rect->h); } - GL_CheckError("", renderer); - - return 0; + return GL_CheckError("", renderer); } static int @@ -1052,9 +1122,7 @@ GL_RenderCopy(SDL_Renderer * renderer, SDL_Texture * texture, data->glDisable(texturedata->type); - GL_CheckError("", renderer); - - return 0; + return GL_CheckError("", renderer); } static int @@ -1067,6 +1135,7 @@ GL_RenderCopyEx(SDL_Renderer * renderer, SDL_Texture * texture, GLfloat minx, miny, maxx, maxy; GLfloat centerx, centery; GLfloat minu, maxu, minv, maxv; + GL_ActivateRenderer(renderer); data->glEnable(texturedata->type); @@ -1144,9 +1213,7 @@ GL_RenderCopyEx(SDL_Renderer * renderer, SDL_Texture * texture, data->glDisable(texturedata->type); - GL_CheckError("", renderer); - - return 0; + return GL_CheckError("", renderer); } static int @@ -1247,6 +1314,14 @@ GL_DestroyRenderer(SDL_Renderer * renderer) GL_RenderData *data = (GL_RenderData *) renderer->driverdata; if (data) { + GL_ClearErrors(renderer); + if (data->GL_ARB_debug_output_supported) { + PFNGLDEBUGMESSAGECALLBACKARBPROC glDebugMessageCallbackARBFunc = (PFNGLDEBUGMESSAGECALLBACKARBPROC) SDL_GL_GetProcAddress("glDebugMessageCallbackARB"); + + /* Uh oh, we don't have a safe way of removing ourselves from the callback chain, if it changed after we set our callback. */ + /* For now, just always replace the callback with the original one */ + glDebugMessageCallbackARBFunc(data->next_error_callback, data->next_error_userparam); + } if (data->shaders) { GL_DestroyShaderContext(data->shaders); } @@ -1266,7 +1341,9 @@ GL_DestroyRenderer(SDL_Renderer * renderer) SDL_free(renderer); } -static int GL_BindTexture (SDL_Renderer * renderer, SDL_Texture *texture, float *texw, float *texh) { +static int +GL_BindTexture (SDL_Renderer * renderer, SDL_Texture *texture, float *texw, float *texh) +{ GL_RenderData *data = (GL_RenderData *) renderer->driverdata; GL_TextureData *texturedata = (GL_TextureData *) texture->driverdata; GL_ActivateRenderer(renderer); @@ -1289,7 +1366,9 @@ static int GL_BindTexture (SDL_Renderer * renderer, SDL_Texture *texture, float return 0; } -static int GL_UnbindTexture (SDL_Renderer * renderer, SDL_Texture *texture) { +static int +GL_UnbindTexture (SDL_Renderer * renderer, SDL_Texture *texture) +{ GL_RenderData *data = (GL_RenderData *) renderer->driverdata; GL_TextureData *texturedata = (GL_TextureData *) texture->driverdata; GL_ActivateRenderer(renderer); diff --git a/src/test/SDL_test_common.c b/src/test/SDL_test_common.c index cd028c7bf..8e0e4487c 100644 --- a/src/test/SDL_test_common.c +++ b/src/test/SDL_test_common.c @@ -27,7 +27,7 @@ #include #define VIDEO_USAGE \ -"[--video driver] [--renderer driver] [--info all|video|modes|render|event] [--log all|error|system|audio|video|render|input] [--display N] [--fullscreen | --fullscreen-desktop | --windows N] [--title title] [--icon icon.bmp] [--center | --position X,Y] [--geometry WxH] [--min-geometry WxH] [--max-geometry WxH] [--depth N] [--refresh R] [--vsync] [--noframe] [--resize] [--minimize] [--maximize] [--grab]" +"[--video driver] [--renderer driver] [--gldebug] [--info all|video|modes|render|event] [--log all|error|system|audio|video|render|input] [--display N] [--fullscreen | --fullscreen-desktop | --windows N] [--title title] [--icon icon.bmp] [--center | --position X,Y] [--geometry WxH] [--min-geometry WxH] [--max-geometry WxH] [--depth N] [--refresh R] [--vsync] [--noframe] [--resize] [--minimize] [--maximize] [--grab]" #define AUDIO_USAGE \ "[--rate N] [--format U8|S8|U16|U16LE|U16BE|S16|S16LE|S16BE] [--channels N] [--samples N]" @@ -74,6 +74,7 @@ SDLTest_CommonCreateState(char **argv, Uint32 flags) state->gl_multisamplesamples = 0; state->gl_retained_backing = 1; state->gl_accelerated = -1; + state->gl_debug = 0; return state; } @@ -99,6 +100,10 @@ SDLTest_CommonArg(SDLTest_CommonState * state, int index) state->renderdriver = argv[index]; return 2; } + if (SDL_strcasecmp(argv[index], "--gldebug") == 0) { + state->gl_debug = 1; + return 1; + } if (SDL_strcasecmp(argv[index], "--info") == 0) { ++index; if (!argv[index]) { @@ -656,6 +661,9 @@ SDLTest_CommonInit(SDLTest_CommonState * state) SDL_GL_SetAttribute(SDL_GL_CONTEXT_MAJOR_VERSION, state->gl_major_version); SDL_GL_SetAttribute(SDL_GL_CONTEXT_MINOR_VERSION, state->gl_minor_version); } + if (state->gl_debug) { + SDL_GL_SetAttribute(SDL_GL_CONTEXT_FLAGS, SDL_GL_CONTEXT_DEBUG_FLAG); + } if (state->verbose & VERBOSE_MODES) { SDL_Rect bounds; diff --git a/test/testgl2.c b/test/testgl2.c index f7e408546..7eea0f599 100644 --- a/test/testgl2.c +++ b/test/testgl2.c @@ -255,6 +255,7 @@ main(int argc, char *argv[]) printf("Vendor : %s\n", glGetString(GL_VENDOR)); printf("Renderer : %s\n", glGetString(GL_RENDERER)); printf("Version : %s\n", glGetString(GL_VERSION)); + printf("Extensions : %s\n", glGetString(GL_EXTENSIONS)); printf("\n"); status = SDL_GL_GetAttribute(SDL_GL_RED_SIZE, &value); From 30a001fdfacde6dd34d2158a8559def8522f8c36 Mon Sep 17 00:00:00 2001 From: Sam Lantinga Date: Sun, 19 May 2013 22:36:54 -0700 Subject: [PATCH 113/542] Fixed bug 1842 - [patch] SDL_SetWindowPosition sets bad position values when given SDL_WINDOWPOS_CENTERED args Alex Szpakowski When calling SDL_SetWindowPosition(window, SDL_WINDOWPOS_CENTERED, SDL_WINDOWPOS_CENTERED), the window moves to the correct position but it seems to internally set its x/y position values to the literal value of the SDL_WINDOWPOS_CENTERED define. This causes all sorts of problems when SDL functions which use the window position (e.g. SDL_SetWindowGrab) are called after the aforementioned SDL_SetWindowPosition call. Looking at the SDL_SetWindowPosition code, it seems that SDL_SendWindowEvent with the SDL_WINDOWEVENT_MOVED event is called at the end of the function using the literal value of the SDL_WINDOWPOS_CENTERED define, instead of the newly set window->x and window->y values. SDL_SendWindowEvent then sets the values of window->windowed.x and window->windowed.y to that value (0x2FFF0000, aka 805240832.) I have attached a patch which changes SDL_SetWindowPosition to make sure SDL_SendWindowEvent is called with the correct coordinate values, if SDL_WINDOWPOS_CENTERED is used (fixes the issue for me.) Tested with Mac OS 10.8.3. --- src/video/SDL_video.c | 18 ++++++++++-------- 1 file changed, 10 insertions(+), 8 deletions(-) diff --git a/src/video/SDL_video.c b/src/video/SDL_video.c index 57cc934df..f0f3380db 100644 --- a/src/video/SDL_video.c +++ b/src/video/SDL_video.c @@ -1497,12 +1497,6 @@ SDL_SetWindowPosition(SDL_Window * window, int x, int y) { CHECK_WINDOW_MAGIC(window, ); - if (!SDL_WINDOWPOS_ISUNDEFINED(x)) { - window->x = x; - } - if (!SDL_WINDOWPOS_ISUNDEFINED(y)) { - window->y = y; - } if (SDL_WINDOWPOS_ISCENTERED(x) || SDL_WINDOWPOS_ISCENTERED(y)) { SDL_VideoDisplay *display = SDL_GetDisplayForWindow(window); int displayIndex; @@ -1511,12 +1505,20 @@ SDL_SetWindowPosition(SDL_Window * window, int x, int y) displayIndex = SDL_GetIndexOfDisplay(display); SDL_GetDisplayBounds(displayIndex, &bounds); if (SDL_WINDOWPOS_ISCENTERED(x)) { - window->x = bounds.x + (bounds.w - window->w) / 2; + x = bounds.x + (bounds.w - window->w) / 2; } if (SDL_WINDOWPOS_ISCENTERED(y)) { - window->y = bounds.y + (bounds.h - window->h) / 2; + y = bounds.y + (bounds.h - window->h) / 2; } } + + if (!SDL_WINDOWPOS_ISUNDEFINED(x)) { + window->x = x; + } + if (!SDL_WINDOWPOS_ISUNDEFINED(y)) { + window->y = y; + } + if (!(window->flags & SDL_WINDOW_FULLSCREEN)) { if (_this->SetWindowPosition) { _this->SetWindowPosition(_this, window); From 11dfd2bff8a6b525452714c65f9c0ca3e0c4358d Mon Sep 17 00:00:00 2001 From: Sam Lantinga Date: Sun, 19 May 2013 22:45:52 -0700 Subject: [PATCH 114/542] Fixed windows build --- src/render/opengl/SDL_render_gl.c | 1 - 1 file changed, 1 deletion(-) diff --git a/src/render/opengl/SDL_render_gl.c b/src/render/opengl/SDL_render_gl.c index 22b6bba7b..982ede272 100644 --- a/src/render/opengl/SDL_render_gl.c +++ b/src/render/opengl/SDL_render_gl.c @@ -321,7 +321,6 @@ GL_HandleDebugMessage(GLenum source, GLenum type, GLuint id, GLenum severity, GL data->error_messages[data->errors-1] = SDL_strdup(message); } } - printf("%s\n", message); /* If there's another error callback, pass it along, otherwise log it */ if (data->next_error_callback) { From 635a32ed582bc7aba8b292d38581dcdf7c2309be Mon Sep 17 00:00:00 2001 From: Sam Lantinga Date: Sun, 19 May 2013 22:57:01 -0700 Subject: [PATCH 115/542] Fixed declaration of GL_HandleDebugMessage --- src/render/opengl/SDL_render_gl.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/render/opengl/SDL_render_gl.c b/src/render/opengl/SDL_render_gl.c index 982ede272..4b9655c29 100644 --- a/src/render/opengl/SDL_render_gl.c +++ b/src/render/opengl/SDL_render_gl.c @@ -307,7 +307,7 @@ GL_ResetState(SDL_Renderer *renderer) GL_CheckError("", renderer); } -static void +static void APIENTRY GL_HandleDebugMessage(GLenum source, GLenum type, GLuint id, GLenum severity, GLsizei length, const char *message, void *userParam) { SDL_Renderer *renderer = (SDL_Renderer *) userParam; From f56b6fdc45de36d769f540cf7778946e97e05e2e Mon Sep 17 00:00:00 2001 From: Sam Lantinga Date: Mon, 20 May 2013 12:01:31 -0700 Subject: [PATCH 116/542] It turns out that GL_ARB_debug_output is really only useful on debug contexts, so for consistency and performance we'll only check and report errors on debug contexts. I added a --gldebug command line option for the test programs to easily test this, and we may want a hint as well to enable OpenGL error checking. --- src/render/opengl/SDL_render_gl.c | 18 +++++++++++++++++- 1 file changed, 17 insertions(+), 1 deletion(-) diff --git a/src/render/opengl/SDL_render_gl.c b/src/render/opengl/SDL_render_gl.c index 4b9655c29..6e37cf552 100644 --- a/src/render/opengl/SDL_render_gl.c +++ b/src/render/opengl/SDL_render_gl.c @@ -101,6 +101,7 @@ typedef struct { SDL_GLContext context; + SDL_bool debug_enabled; SDL_bool GL_ARB_debug_output_supported; int errors; char **error_messages; @@ -182,6 +183,10 @@ GL_ClearErrors(SDL_Renderer *renderer) { GL_RenderData *data = (GL_RenderData *) renderer->driverdata; + if (!data->debug_enabled) + { + return; + } if (data->GL_ARB_debug_output_supported) { if (data->errors) { int i; @@ -206,6 +211,10 @@ GL_CheckAllErrors (const char *prefix, SDL_Renderer *renderer, const char *file, GL_RenderData *data = (GL_RenderData *) renderer->driverdata; int ret = 0; + if (!data->debug_enabled) + { + return 0; + } if (data->GL_ARB_debug_output_supported) { if (data->errors) { int i; @@ -444,13 +453,20 @@ GL_CreateRenderer(SDL_Window * window, Uint32 flags) } /* Check for debug output support */ - if (SDL_GL_ExtensionSupported("GL_ARB_debug_output")) { + if (SDL_GL_GetAttribute(SDL_GL_CONTEXT_FLAGS, &value) == 0 && + (value & SDL_GL_CONTEXT_DEBUG_FLAG)) { + data->debug_enabled = SDL_TRUE; + } + if (data->debug_enabled && SDL_GL_ExtensionSupported("GL_ARB_debug_output")) { PFNGLDEBUGMESSAGECALLBACKARBPROC glDebugMessageCallbackARBFunc = (PFNGLDEBUGMESSAGECALLBACKARBPROC) SDL_GL_GetProcAddress("glDebugMessageCallbackARB"); data->GL_ARB_debug_output_supported = SDL_TRUE; data->glGetPointerv(GL_DEBUG_CALLBACK_FUNCTION_ARB, (GLvoid **)&data->next_error_callback); data->glGetPointerv(GL_DEBUG_CALLBACK_USER_PARAM_ARB, &data->next_error_userparam); glDebugMessageCallbackARBFunc(GL_HandleDebugMessage, renderer); + + /* Make sure our callback is called when errors actually happen */ + data->glEnable(GL_DEBUG_OUTPUT_SYNCHRONOUS_ARB); } if (SDL_GL_ExtensionSupported("GL_ARB_texture_rectangle") From 2f9ac5db94bd855a081b41f0a930d50942437764 Mon Sep 17 00:00:00 2001 From: Sam Lantinga Date: Mon, 20 May 2013 12:25:16 -0700 Subject: [PATCH 117/542] Fixed losing ALT key modifiers on Unity --- src/video/x11/SDL_x11events.c | 8 +++++++- 1 file changed, 7 insertions(+), 1 deletion(-) diff --git a/src/video/x11/SDL_x11events.c b/src/video/x11/SDL_x11events.c index 757abd93c..318c2947b 100644 --- a/src/video/x11/SDL_x11events.c +++ b/src/video/x11/SDL_x11events.c @@ -356,7 +356,13 @@ X11_DispatchEvent(_THIS) /* We want to reset the keyboard here, because we may have missed keyboard messages after our previous FocusOut. */ - SDL_ResetKeyboard(); + /* Actually, if we do this we clear the ALT key on Unity + because it briefly takes focus for their dashboard. + + I think it's better to think the ALT key is held down + when it's not, then always lose the ALT modifier on Unity. + */ + /*SDL_ResetKeyboard();*/ } data->pending_focus = PENDING_FOCUS_IN; data->pending_focus_time = SDL_GetTicks() + PENDING_FOCUS_IN_TIME; From 97fba74bda5013b0b9f68b8c2c66c59e6e6781fe Mon Sep 17 00:00:00 2001 From: Sam Lantinga Date: Mon, 20 May 2013 22:05:49 -0700 Subject: [PATCH 118/542] Fixed bug 731 - No mechanism to extract the NSView for 3d library --- include/SDL_syswm.h | 2 ++ src/video/cocoa/SDL_cocoawindow.m | 1 + 2 files changed, 3 insertions(+) diff --git a/include/SDL_syswm.h b/include/SDL_syswm.h index 3ea026b44..539724f9e 100644 --- a/include/SDL_syswm.h +++ b/include/SDL_syswm.h @@ -82,6 +82,7 @@ struct SDL_SysWMinfo; #include #else typedef struct _NSWindow NSWindow; +typedef struct _NSView NSView; #endif #endif @@ -187,6 +188,7 @@ struct SDL_SysWMinfo struct { NSWindow *window; /* The Cocoa window */ + NSView *view; /* The Cocoa view */ } cocoa; #endif #if defined(SDL_VIDEO_DRIVER_UIKIT) diff --git a/src/video/cocoa/SDL_cocoawindow.m b/src/video/cocoa/SDL_cocoawindow.m index d0f825cba..010a9b41a 100644 --- a/src/video/cocoa/SDL_cocoawindow.m +++ b/src/video/cocoa/SDL_cocoawindow.m @@ -1131,6 +1131,7 @@ Cocoa_GetWindowWMInfo(_THIS, SDL_Window * window, SDL_SysWMinfo * info) if (info->version.major <= SDL_MAJOR_VERSION) { info->subsystem = SDL_SYSWM_COCOA; info->info.cocoa.window = nswindow; + info->info.cocoa.view = [nswindow contentView]; return SDL_TRUE; } else { SDL_SetError("Application not compiled with SDL %d.%d\n", From 3d5e0ce562cf630829aea817d3ed8bc2e7ea33b0 Mon Sep 17 00:00:00 2001 From: Sam Lantinga Date: Mon, 20 May 2013 23:04:25 -0700 Subject: [PATCH 119/542] Fixed bug 1113 - SDL_SetEventFilter()'s event deletion process is not safe against intervening event push. This is not completely thread-safe since it's possible for an event to come in and be unfiltered between the flush call and the setting of the new filter, but it's much better than it was. --- src/events/SDL_events.c | 7 +++---- 1 file changed, 3 insertions(+), 4 deletions(-) diff --git a/src/events/SDL_events.c b/src/events/SDL_events.c index f27c3cb85..047a07d7a 100644 --- a/src/events/SDL_events.c +++ b/src/events/SDL_events.c @@ -388,12 +388,11 @@ SDL_PushEvent(SDL_Event * event) void SDL_SetEventFilter(SDL_EventFilter filter, void *userdata) { - SDL_Event bitbucket; - /* Set filter and discard pending events */ - SDL_EventOK = filter; + SDL_EventOK = NULL; + SDL_FlushEvents(SDL_FIRSTEVENT, SDL_LASTEVENT); SDL_EventOKParam = userdata; - while (SDL_PollEvent(&bitbucket) > 0); + SDL_EventOK = filter; } SDL_bool From 44ae527164a6048769ff1f71e3066345c789138a Mon Sep 17 00:00:00 2001 From: Sam Lantinga Date: Mon, 20 May 2013 23:30:08 -0700 Subject: [PATCH 120/542] Fixed bug 1148 - SDL window white upon first appearing To be consistent with other platforms, we'll use black as the background color. --- src/video/cocoa/SDL_cocoawindow.m | 1 + 1 file changed, 1 insertion(+) diff --git a/src/video/cocoa/SDL_cocoawindow.m b/src/video/cocoa/SDL_cocoawindow.m index 010a9b41a..f12e25be1 100644 --- a/src/video/cocoa/SDL_cocoawindow.m +++ b/src/video/cocoa/SDL_cocoawindow.m @@ -690,6 +690,7 @@ Cocoa_CreateWindow(_THIS, SDL_Window * window) } } nswindow = [[SDLWindow alloc] initWithContentRect:rect styleMask:style backing:NSBackingStoreBuffered defer:NO screen:screen]; + [nswindow setBackgroundColor:NSColor.blackColor]; /* Create a default view for this window */ rect = [nswindow contentRectForFrameRect:[nswindow frame]]; From c2805292c80fc4f8c8bb70908914e9d3ec956ff7 Mon Sep 17 00:00:00 2001 From: Sam Lantinga Date: Mon, 20 May 2013 23:57:10 -0700 Subject: [PATCH 121/542] Fixed bug 1856 - (Patch) More bits for SDL_MouseMotionEvent.state Gerry JJ The state bitmask in SDL_MouseMotionEvent is stored in an Uint8. Unfortunately this doesn't actually have room for 8 buttons because SDL skips 4 button indices after the third mouse button (at least here on Linux x86-64, probably related to wheel handling?), so it's really just enough to track 4 buttons. For example, on a Logitech MX310 mouse I've got, even though the mouse has 6 buttons total, the left and right side buttons and extra middle button have indexes 8, 9 and 10, and the last two won't fit in the 8 bit button state. The source of the button state (in SDL_Mouse) is already 32-bit, and the state field in SDL_MouseMotionEvent is 32-bit aligned and followed by three 8-bit padding fields. So simply changing the SDL_MouseMotionEvent state to an Uint32 and removing the padding fields fixes this, and I think it should be binary compatible, at least for little endian. --- include/SDL_events.h | 5 +---- 1 file changed, 1 insertion(+), 4 deletions(-) diff --git a/include/SDL_events.h b/include/SDL_events.h index c2265bae6..ae0b0f166 100644 --- a/include/SDL_events.h +++ b/include/SDL_events.h @@ -221,10 +221,7 @@ typedef struct SDL_MouseMotionEvent Uint32 timestamp; Uint32 windowID; /**< The window with mouse focus, if any */ Uint32 which; /**< The mouse instance id, or SDL_TOUCH_MOUSEID */ - Uint8 state; /**< The current button state */ - Uint8 padding1; - Uint8 padding2; - Uint8 padding3; + Uint32 state; /**< The current button state */ Sint32 x; /**< X coordinate, relative to window */ Sint32 y; /**< Y coordinate, relative to window */ Sint32 xrel; /**< The relative motion in the X direction */ From adb0413171be009cd0d3ba6cf77b43c3c9ab91a1 Mon Sep 17 00:00:00 2001 From: Sam Lantinga Date: Tue, 21 May 2013 00:49:31 -0700 Subject: [PATCH 122/542] Fixed bug Bug 1817 - Haiku uses wrong default install prefix MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Axel Dörfler Currently, the default install target for Haiku is /boot/develop/tools/gnupro. However, this is not the expected install place. Instead, /boot/common should be used. --- configure.in | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/configure.in b/configure.in index cf4cc9d87..596de052d 100644 --- a/configure.in +++ b/configure.in @@ -2423,7 +2423,7 @@ AC_HELP_STRING([--enable-render-d3d], [enable the Direct3D render driver [[defau ;; *-*-beos* | *-*-haiku*) ARCH=beos - ac_default_prefix=/boot/develop/tools/gnupro + ac_default_prefix=/boot/common CheckDummyVideo CheckDiskAudio CheckDummyAudio From c9501781241a666ed3630906c37b7b28a8620455 Mon Sep 17 00:00:00 2001 From: "Ryan C. Gordon" Date: Tue, 21 May 2013 23:02:16 -0400 Subject: [PATCH 123/542] Patched to compile on older Mac OS X devtools (thanks, D B!). --- src/video/cocoa/SDL_cocoawindow.m | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/video/cocoa/SDL_cocoawindow.m b/src/video/cocoa/SDL_cocoawindow.m index f12e25be1..7e387a53e 100644 --- a/src/video/cocoa/SDL_cocoawindow.m +++ b/src/video/cocoa/SDL_cocoawindow.m @@ -690,7 +690,7 @@ Cocoa_CreateWindow(_THIS, SDL_Window * window) } } nswindow = [[SDLWindow alloc] initWithContentRect:rect styleMask:style backing:NSBackingStoreBuffered defer:NO screen:screen]; - [nswindow setBackgroundColor:NSColor.blackColor]; + [nswindow setBackgroundColor:[NSColor blackColor]]; /* Create a default view for this window */ rect = [nswindow contentRectForFrameRect:[nswindow frame]]; From a32de58414898b917320674636d242e2b510816d Mon Sep 17 00:00:00 2001 From: "Ryan C. Gordon" Date: Tue, 21 May 2013 23:13:52 -0400 Subject: [PATCH 124/542] Attempt to fix Haiku buildbot (and other systems with an old glext.h). --- include/SDL_opengl.h | 39 +++++++++++++++++++++++++++++++++++++++ 1 file changed, 39 insertions(+) diff --git a/include/SDL_opengl.h b/include/SDL_opengl.h index fecaca0c2..6d3131ef3 100644 --- a/include/SDL_opengl.h +++ b/include/SDL_opengl.h @@ -61,6 +61,45 @@ #undef __glext_h_ #endif +/* !!! FIXME: temporary solution, since we use this even if a system's glext.h doesn't have it */ +#ifndef GL_ARB_debug_output +#define GL_ARB_debug_output 1 +#define GL_DEBUG_OUTPUT_SYNCHRONOUS_ARB 0x8242 +#define GL_DEBUG_NEXT_LOGGED_MESSAGE_LENGTH_ARB 0x8243 +#define GL_DEBUG_CALLBACK_FUNCTION_ARB 0x8244 +#define GL_DEBUG_CALLBACK_USER_PARAM_ARB 0x8245 +#define GL_DEBUG_SOURCE_API_ARB 0x8246 +#define GL_DEBUG_SOURCE_WINDOW_SYSTEM_ARB 0x8247 +#define GL_DEBUG_SOURCE_SHADER_COMPILER_ARB 0x8248 +#define GL_DEBUG_SOURCE_THIRD_PARTY_ARB 0x8249 +#define GL_DEBUG_SOURCE_APPLICATION_ARB 0x824A +#define GL_DEBUG_SOURCE_OTHER_ARB 0x824B +#define GL_DEBUG_TYPE_ERROR_ARB 0x824C +#define GL_DEBUG_TYPE_DEPRECATED_BEHAVIOR_ARB 0x824D +#define GL_DEBUG_TYPE_UNDEFINED_BEHAVIOR_ARB 0x824E +#define GL_DEBUG_TYPE_PORTABILITY_ARB 0x824F +#define GL_DEBUG_TYPE_PERFORMANCE_ARB 0x8250 +#define GL_DEBUG_TYPE_OTHER_ARB 0x8251 +#define GL_MAX_DEBUG_MESSAGE_LENGTH_ARB 0x9143 +#define GL_MAX_DEBUG_LOGGED_MESSAGES_ARB 0x9144 +#define GL_DEBUG_LOGGED_MESSAGES_ARB 0x9145 +#define GL_DEBUG_SEVERITY_HIGH_ARB 0x9146 +#define GL_DEBUG_SEVERITY_MEDIUM_ARB 0x9147 +#define GL_DEBUG_SEVERITY_LOW_ARB 0x9148 +typedef void (APIENTRY *GLDEBUGPROCARB)(GLenum source,GLenum type,GLuint id,GLenum severity,GLsizei length,const GLchar *message,GLvoid *userParam); +#ifdef GL_GLEXT_PROTOTYPES +GLAPI void APIENTRY glDebugMessageControlARB (GLenum source, GLenum type, GLenum severity, GLsizei count, const GLuint *ids, GLboolean enabled); +GLAPI void APIENTRY glDebugMessageInsertARB (GLenum source, GLenum type, GLuint id, GLenum severity, GLsizei length, const GLchar *buf); +GLAPI void APIENTRY glDebugMessageCallbackARB (GLDEBUGPROCARB callback, const GLvoid *userParam); +GLAPI GLuint APIENTRY glGetDebugMessageLogARB (GLuint count, GLsizei bufsize, GLenum *sources, GLenum *types, GLuint *ids, GLenum *severities, GLsizei *lengths, GLchar *messageLog); +#endif /* GL_GLEXT_PROTOTYPES */ +typedef void (APIENTRYP PFNGLDEBUGMESSAGECONTROLARBPROC) (GLenum source, GLenum type, GLenum severity, GLsizei count, const GLuint *ids, GLboolean enabled); +typedef void (APIENTRYP PFNGLDEBUGMESSAGEINSERTARBPROC) (GLenum source, GLenum type, GLuint id, GLenum severity, GLsizei length, const GLchar *buf); +typedef void (APIENTRYP PFNGLDEBUGMESSAGECALLBACKARBPROC) (GLDEBUGPROCARB callback, const GLvoid *userParam); +typedef GLuint (APIENTRYP PFNGLGETDEBUGMESSAGELOGARBPROC) (GLuint count, GLsizei bufsize, GLenum *sources, GLenum *types, GLuint *ids, GLenum *severities, GLsizei *lengths, GLchar *messageLog); +#endif + + /** * \file SDL_opengl.h * From 80d6ec24cd1058a0aca2f8cbdcc397a4459b40ca Mon Sep 17 00:00:00 2001 From: "Ryan C. Gordon" Date: Tue, 21 May 2013 23:35:45 -0400 Subject: [PATCH 125/542] Backed out changeset b69dfd56e1b0 This was clearly not the right fix. --- include/SDL_opengl.h | 39 --------------------------------------- 1 file changed, 39 deletions(-) diff --git a/include/SDL_opengl.h b/include/SDL_opengl.h index 6d3131ef3..fecaca0c2 100644 --- a/include/SDL_opengl.h +++ b/include/SDL_opengl.h @@ -61,45 +61,6 @@ #undef __glext_h_ #endif -/* !!! FIXME: temporary solution, since we use this even if a system's glext.h doesn't have it */ -#ifndef GL_ARB_debug_output -#define GL_ARB_debug_output 1 -#define GL_DEBUG_OUTPUT_SYNCHRONOUS_ARB 0x8242 -#define GL_DEBUG_NEXT_LOGGED_MESSAGE_LENGTH_ARB 0x8243 -#define GL_DEBUG_CALLBACK_FUNCTION_ARB 0x8244 -#define GL_DEBUG_CALLBACK_USER_PARAM_ARB 0x8245 -#define GL_DEBUG_SOURCE_API_ARB 0x8246 -#define GL_DEBUG_SOURCE_WINDOW_SYSTEM_ARB 0x8247 -#define GL_DEBUG_SOURCE_SHADER_COMPILER_ARB 0x8248 -#define GL_DEBUG_SOURCE_THIRD_PARTY_ARB 0x8249 -#define GL_DEBUG_SOURCE_APPLICATION_ARB 0x824A -#define GL_DEBUG_SOURCE_OTHER_ARB 0x824B -#define GL_DEBUG_TYPE_ERROR_ARB 0x824C -#define GL_DEBUG_TYPE_DEPRECATED_BEHAVIOR_ARB 0x824D -#define GL_DEBUG_TYPE_UNDEFINED_BEHAVIOR_ARB 0x824E -#define GL_DEBUG_TYPE_PORTABILITY_ARB 0x824F -#define GL_DEBUG_TYPE_PERFORMANCE_ARB 0x8250 -#define GL_DEBUG_TYPE_OTHER_ARB 0x8251 -#define GL_MAX_DEBUG_MESSAGE_LENGTH_ARB 0x9143 -#define GL_MAX_DEBUG_LOGGED_MESSAGES_ARB 0x9144 -#define GL_DEBUG_LOGGED_MESSAGES_ARB 0x9145 -#define GL_DEBUG_SEVERITY_HIGH_ARB 0x9146 -#define GL_DEBUG_SEVERITY_MEDIUM_ARB 0x9147 -#define GL_DEBUG_SEVERITY_LOW_ARB 0x9148 -typedef void (APIENTRY *GLDEBUGPROCARB)(GLenum source,GLenum type,GLuint id,GLenum severity,GLsizei length,const GLchar *message,GLvoid *userParam); -#ifdef GL_GLEXT_PROTOTYPES -GLAPI void APIENTRY glDebugMessageControlARB (GLenum source, GLenum type, GLenum severity, GLsizei count, const GLuint *ids, GLboolean enabled); -GLAPI void APIENTRY glDebugMessageInsertARB (GLenum source, GLenum type, GLuint id, GLenum severity, GLsizei length, const GLchar *buf); -GLAPI void APIENTRY glDebugMessageCallbackARB (GLDEBUGPROCARB callback, const GLvoid *userParam); -GLAPI GLuint APIENTRY glGetDebugMessageLogARB (GLuint count, GLsizei bufsize, GLenum *sources, GLenum *types, GLuint *ids, GLenum *severities, GLsizei *lengths, GLchar *messageLog); -#endif /* GL_GLEXT_PROTOTYPES */ -typedef void (APIENTRYP PFNGLDEBUGMESSAGECONTROLARBPROC) (GLenum source, GLenum type, GLenum severity, GLsizei count, const GLuint *ids, GLboolean enabled); -typedef void (APIENTRYP PFNGLDEBUGMESSAGEINSERTARBPROC) (GLenum source, GLenum type, GLuint id, GLenum severity, GLsizei length, const GLchar *buf); -typedef void (APIENTRYP PFNGLDEBUGMESSAGECALLBACKARBPROC) (GLDEBUGPROCARB callback, const GLvoid *userParam); -typedef GLuint (APIENTRYP PFNGLGETDEBUGMESSAGELOGARBPROC) (GLuint count, GLsizei bufsize, GLenum *sources, GLenum *types, GLuint *ids, GLenum *severities, GLsizei *lengths, GLchar *messageLog); -#endif - - /** * \file SDL_opengl.h * From e2929bcb73fafb5520b81c568c39335623857508 Mon Sep 17 00:00:00 2001 From: Sam Lantinga Date: Tue, 21 May 2013 22:01:18 -0700 Subject: [PATCH 126/542] Fixed bug 1534 - SIGSEGV in SDL_ConvertSurface() for certain formats in SDL2 Don't assume that 8 bit formats are indexed. Thanks to Gabriel Jacobo for research and potential patches. --- src/video/SDL_blit.c | 15 +- src/video/SDL_blit_N.c | 401 ++++++++++++++++++++-------------------- src/video/SDL_stretch.c | 48 ++--- 3 files changed, 235 insertions(+), 229 deletions(-) diff --git a/src/video/SDL_blit.c b/src/video/SDL_blit.c index d7c258d4c..78e449dd0 100644 --- a/src/video/SDL_blit.c +++ b/src/video/SDL_blit.c @@ -239,9 +239,11 @@ SDL_CalculateBlit(SDL_Surface * surface) /* Choose a standard blit function */ if (map->identity && !(map->info.flags & ~SDL_COPY_RLE_DESIRED)) { blit = SDL_BlitCopy; - } else if (surface->format->BitsPerPixel < 8) { + } else if (surface->format->BitsPerPixel < 8 && + SDL_ISPIXELFORMAT_INDEXED(surface->format->format)) { blit = SDL_CalculateBlit0(surface); - } else if (surface->format->BytesPerPixel == 1) { + } else if (surface->format->BytesPerPixel == 1 && + SDL_ISPIXELFORMAT_INDEXED(surface->format->format)) { blit = SDL_CalculateBlit1(surface); } else if (map->info.flags & SDL_COPY_BLEND) { blit = SDL_CalculateBlitA(surface); @@ -260,8 +262,13 @@ SDL_CalculateBlit(SDL_Surface * surface) if (blit == NULL) #endif { - if (surface->format->BytesPerPixel > 1 - && dst->format->BytesPerPixel > 1) { + Uint32 src_format = surface->format->format; + Uint32 dst_format = dst->format->format; + + if (!SDL_ISPIXELFORMAT_INDEXED(src_format) && + !SDL_ISPIXELFORMAT_FOURCC(src_format) && + !SDL_ISPIXELFORMAT_INDEXED(dst_format) && + !SDL_ISPIXELFORMAT_FOURCC(dst_format)) { blit = SDL_Blit_Slow; } } diff --git a/src/video/SDL_blit_N.c b/src/video/SDL_blit_N.c index 4ca365680..cd127c9db 100644 --- a/src/video/SDL_blit_N.c +++ b/src/video/SDL_blit_N.c @@ -275,7 +275,7 @@ Blit_RGB565_32Altivec(SDL_BlitInfo * info) vector unsigned int v16 = vec_add(v8, v8); vector unsigned short v2 = vec_splat_u16(2); vector unsigned short v3 = vec_splat_u16(3); - /* + /* 0x10 - 0x1f is the alpha 0x00 - 0x0e evens are the red 0x01 - 0x0f odds are zero @@ -422,7 +422,7 @@ Blit_RGB555_32Altivec(SDL_BlitInfo * info) vector unsigned int v16 = vec_add(v8, v8); vector unsigned short v1 = vec_splat_u16(1); vector unsigned short v3 = vec_splat_u16(3); - /* + /* 0x10 - 0x1f is the alpha 0x00 - 0x0e evens are the red 0x01 - 0x0f odds are zero @@ -876,18 +876,18 @@ GetBlitFeatures(void) /* This is now endian dependent */ #if SDL_BYTEORDER == SDL_LIL_ENDIAN -#define HI 1 -#define LO 0 +#define HI 1 +#define LO 0 #else /* SDL_BYTEORDER == SDL_BIG_ENDIAN */ -#define HI 0 -#define LO 1 +#define HI 0 +#define LO 1 #endif /* Special optimized blit for RGB 8-8-8 --> RGB 3-3-2 */ #define RGB888_RGB332(dst, src) { \ - dst = (Uint8)((((src)&0x00E00000)>>16)| \ - (((src)&0x0000E000)>>11)| \ - (((src)&0x000000C0)>>6)); \ + dst = (Uint8)((((src)&0x00E00000)>>16)| \ + (((src)&0x0000E000)>>11)| \ + (((src)&0x000000C0)>>6)); \ } static void Blit_RGB888_index8(SDL_BlitInfo * info) @@ -913,11 +913,11 @@ Blit_RGB888_index8(SDL_BlitInfo * info) if (map == NULL) { while (height--) { #ifdef USE_DUFFS_LOOP - /* *INDENT-OFF* */ - DUFFS_LOOP( - RGB888_RGB332(*dst++, *src); - , width); - /* *INDENT-ON* */ + /* *INDENT-OFF* */ + DUFFS_LOOP( + RGB888_RGB332(*dst++, *src); + , width); + /* *INDENT-ON* */ #else for (c = width / 4; c; --c) { /* Pack RGB into 8bit pixel */ @@ -949,13 +949,13 @@ Blit_RGB888_index8(SDL_BlitInfo * info) while (height--) { #ifdef USE_DUFFS_LOOP - /* *INDENT-OFF* */ - DUFFS_LOOP( - RGB888_RGB332(Pixel, *src); - *dst++ = map[Pixel]; - ++src; - , width); - /* *INDENT-ON* */ + /* *INDENT-OFF* */ + DUFFS_LOOP( + RGB888_RGB332(Pixel, *src); + *dst++ = map[Pixel]; + ++src; + , width); + /* *INDENT-ON* */ #else for (c = width / 4; c; --c) { /* Pack RGB into 8bit pixel */ @@ -995,17 +995,17 @@ Blit_RGB888_index8(SDL_BlitInfo * info) /* Special optimized blit for RGB 8-8-8 --> RGB 5-5-5 */ #define RGB888_RGB555(dst, src) { \ - *(Uint16 *)(dst) = (Uint16)((((*src)&0x00F80000)>>9)| \ - (((*src)&0x0000F800)>>6)| \ - (((*src)&0x000000F8)>>3)); \ + *(Uint16 *)(dst) = (Uint16)((((*src)&0x00F80000)>>9)| \ + (((*src)&0x0000F800)>>6)| \ + (((*src)&0x000000F8)>>3)); \ } #define RGB888_RGB555_TWO(dst, src) { \ - *(Uint32 *)(dst) = (((((src[HI])&0x00F80000)>>9)| \ - (((src[HI])&0x0000F800)>>6)| \ - (((src[HI])&0x000000F8)>>3))<<16)| \ - (((src[LO])&0x00F80000)>>9)| \ - (((src[LO])&0x0000F800)>>6)| \ - (((src[LO])&0x000000F8)>>3); \ + *(Uint32 *)(dst) = (((((src[HI])&0x00F80000)>>9)| \ + (((src[HI])&0x0000F800)>>6)| \ + (((src[HI])&0x000000F8)>>3))<<16)| \ + (((src[LO])&0x00F80000)>>9)| \ + (((src[LO])&0x0000F800)>>6)| \ + (((src[LO])&0x000000F8)>>3); \ } static void Blit_RGB888_RGB555(SDL_BlitInfo * info) @@ -1028,13 +1028,13 @@ Blit_RGB888_RGB555(SDL_BlitInfo * info) #ifdef USE_DUFFS_LOOP while (height--) { - /* *INDENT-OFF* */ - DUFFS_LOOP( - RGB888_RGB555(dst, src); - ++src; - ++dst; - , width); - /* *INDENT-ON* */ + /* *INDENT-OFF* */ + DUFFS_LOOP( + RGB888_RGB555(dst, src); + ++src; + ++dst; + , width); + /* *INDENT-ON* */ src += srcskip; dst += dstskip; } @@ -1119,17 +1119,17 @@ Blit_RGB888_RGB555(SDL_BlitInfo * info) /* Special optimized blit for RGB 8-8-8 --> RGB 5-6-5 */ #define RGB888_RGB565(dst, src) { \ - *(Uint16 *)(dst) = (Uint16)((((*src)&0x00F80000)>>8)| \ - (((*src)&0x0000FC00)>>5)| \ - (((*src)&0x000000F8)>>3)); \ + *(Uint16 *)(dst) = (Uint16)((((*src)&0x00F80000)>>8)| \ + (((*src)&0x0000FC00)>>5)| \ + (((*src)&0x000000F8)>>3)); \ } #define RGB888_RGB565_TWO(dst, src) { \ - *(Uint32 *)(dst) = (((((src[HI])&0x00F80000)>>8)| \ - (((src[HI])&0x0000FC00)>>5)| \ - (((src[HI])&0x000000F8)>>3))<<16)| \ - (((src[LO])&0x00F80000)>>8)| \ - (((src[LO])&0x0000FC00)>>5)| \ - (((src[LO])&0x000000F8)>>3); \ + *(Uint32 *)(dst) = (((((src[HI])&0x00F80000)>>8)| \ + (((src[HI])&0x0000FC00)>>5)| \ + (((src[HI])&0x000000F8)>>3))<<16)| \ + (((src[LO])&0x00F80000)>>8)| \ + (((src[LO])&0x0000FC00)>>5)| \ + (((src[LO])&0x000000F8)>>3); \ } static void Blit_RGB888_RGB565(SDL_BlitInfo * info) @@ -1152,13 +1152,13 @@ Blit_RGB888_RGB565(SDL_BlitInfo * info) #ifdef USE_DUFFS_LOOP while (height--) { - /* *INDENT-OFF* */ - DUFFS_LOOP( - RGB888_RGB565(dst, src); - ++src; - ++dst; - , width); - /* *INDENT-ON* */ + /* *INDENT-OFF* */ + DUFFS_LOOP( + RGB888_RGB565(dst, src); + ++src; + ++dst; + , width); + /* *INDENT-ON* */ src += srcskip; dst += dstskip; } @@ -1265,14 +1265,14 @@ Blit_RGB565_32(SDL_BlitInfo * info, const Uint32 * map) #ifdef USE_DUFFS_LOOP while (height--) { - /* *INDENT-OFF* */ - DUFFS_LOOP( - { - *dst++ = RGB565_32(dst, src, map); - src += 2; - }, - width); - /* *INDENT-ON* */ + /* *INDENT-OFF* */ + DUFFS_LOOP( + { + *dst++ = RGB565_32(dst, src, map); + src += 2; + }, + width); + /* *INDENT-ON* */ src += srcskip; dst += dstskip; } @@ -1863,9 +1863,9 @@ Blit_RGB565_BGRA8888(SDL_BlitInfo * info) /* Special optimized blit for RGB 8-8-8 --> RGB 3-3-2 */ #ifndef RGB888_RGB332 #define RGB888_RGB332(dst, src) { \ - dst = (((src)&0x00E00000)>>16)| \ - (((src)&0x0000E000)>>11)| \ - (((src)&0x000000C0)>>6); \ + dst = (((src)&0x00E00000)>>16)| \ + (((src)&0x0000E000)>>11)| \ + (((src)&0x000000C0)>>6); \ } #endif static void @@ -1892,13 +1892,13 @@ Blit_RGB888_index8_map(SDL_BlitInfo * info) #ifdef USE_DUFFS_LOOP while (height--) { - /* *INDENT-OFF* */ - DUFFS_LOOP( - RGB888_RGB332(Pixel, *src); - *dst++ = map[Pixel]; - ++src; - , width); - /* *INDENT-ON* */ + /* *INDENT-OFF* */ + DUFFS_LOOP( + RGB888_RGB332(Pixel, *src); + *dst++ = map[Pixel]; + ++src; + , width); + /* *INDENT-ON* */ src += srcskip; dst += dstskip; } @@ -1969,20 +1969,20 @@ BlitNto1(SDL_BlitInfo * info) if (map == NULL) { while (height--) { #ifdef USE_DUFFS_LOOP - /* *INDENT-OFF* */ - DUFFS_LOOP( - DISEMBLE_RGB(src, srcbpp, srcfmt, Pixel, - sR, sG, sB); - if ( 1 ) { - /* Pack RGB into 8bit pixel */ - *dst = ((sR>>5)<<(3+2))| - ((sG>>5)<<(2)) | - ((sB>>6)<<(0)) ; - } - dst++; - src += srcbpp; - , width); - /* *INDENT-ON* */ + /* *INDENT-OFF* */ + DUFFS_LOOP( + DISEMBLE_RGB(src, srcbpp, srcfmt, Pixel, + sR, sG, sB); + if ( 1 ) { + /* Pack RGB into 8bit pixel */ + *dst = ((sR>>5)<<(3+2))| + ((sG>>5)<<(2)) | + ((sB>>6)<<(0)) ; + } + dst++; + src += srcbpp; + , width); + /* *INDENT-ON* */ #else for (c = width; c; --c) { DISEMBLE_RGB(src, srcbpp, srcfmt, Pixel, sR, sG, sB); @@ -2001,20 +2001,20 @@ BlitNto1(SDL_BlitInfo * info) } else { while (height--) { #ifdef USE_DUFFS_LOOP - /* *INDENT-OFF* */ - DUFFS_LOOP( - DISEMBLE_RGB(src, srcbpp, srcfmt, Pixel, - sR, sG, sB); - if ( 1 ) { - /* Pack RGB into 8bit pixel */ - *dst = map[((sR>>5)<<(3+2))| - ((sG>>5)<<(2)) | - ((sB>>6)<<(0)) ]; - } - dst++; - src += srcbpp; - , width); - /* *INDENT-ON* */ + /* *INDENT-OFF* */ + DUFFS_LOOP( + DISEMBLE_RGB(src, srcbpp, srcfmt, Pixel, + sR, sG, sB); + if ( 1 ) { + /* Pack RGB into 8bit pixel */ + *dst = map[((sR>>5)<<(3+2))| + ((sG>>5)<<(2)) | + ((sB>>6)<<(0)) ]; + } + dst++; + src += srcbpp; + , width); + /* *INDENT-ON* */ #else for (c = width; c; --c) { DISEMBLE_RGB(src, srcbpp, srcfmt, Pixel, sR, sG, sB); @@ -2051,15 +2051,15 @@ Blit4to4MaskAlpha(SDL_BlitInfo * info) Uint32 mask = (info->a >> dstfmt->Aloss) << dstfmt->Ashift; while (height--) { - /* *INDENT-OFF* */ - DUFFS_LOOP( - { - *dst = *src | mask; - ++dst; - ++src; - }, - width); - /* *INDENT-ON* */ + /* *INDENT-OFF* */ + DUFFS_LOOP( + { + *dst = *src | mask; + ++dst; + ++src; + }, + width); + /* *INDENT-ON* */ src = (Uint32 *) ((Uint8 *) src + srcskip); dst = (Uint32 *) ((Uint8 *) dst + dstskip); } @@ -2068,15 +2068,15 @@ Blit4to4MaskAlpha(SDL_BlitInfo * info) Uint32 mask = srcfmt->Rmask | srcfmt->Gmask | srcfmt->Bmask; while (height--) { - /* *INDENT-OFF* */ - DUFFS_LOOP( - { - *dst = *src & mask; - ++dst; - ++src; - }, - width); - /* *INDENT-ON* */ + /* *INDENT-OFF* */ + DUFFS_LOOP( + { + *dst = *src & mask; + ++dst; + ++src; + }, + width); + /* *INDENT-ON* */ src = (Uint32 *) ((Uint8 *) src + srcskip); dst = (Uint32 *) ((Uint8 *) dst + dstskip); } @@ -2099,20 +2099,20 @@ BlitNtoN(SDL_BlitInfo * info) unsigned alpha = dstfmt->Amask ? info->a : 0; while (height--) { - /* *INDENT-OFF* */ - DUFFS_LOOP( - { + /* *INDENT-OFF* */ + DUFFS_LOOP( + { Uint32 Pixel; - unsigned sR; - unsigned sG; - unsigned sB; - DISEMBLE_RGB(src, srcbpp, srcfmt, Pixel, sR, sG, sB); - ASSEMBLE_RGBA(dst, dstbpp, dstfmt, sR, sG, sB, alpha); - dst += dstbpp; - src += srcbpp; - }, - width); - /* *INDENT-ON* */ + unsigned sR; + unsigned sG; + unsigned sB; + DISEMBLE_RGB(src, srcbpp, srcfmt, Pixel, sR, sG, sB); + ASSEMBLE_RGBA(dst, dstbpp, dstfmt, sR, sG, sB, alpha); + dst += dstbpp; + src += srcbpp; + }, + width); + /* *INDENT-ON* */ src += srcskip; dst += dstskip; } @@ -2170,43 +2170,43 @@ BlitNto1Key(SDL_BlitInfo * info) if (palmap == NULL) { while (height--) { - /* *INDENT-OFF* */ - DUFFS_LOOP( - { - DISEMBLE_RGB(src, srcbpp, srcfmt, Pixel, - sR, sG, sB); - if ( (Pixel & rgbmask) != ckey ) { - /* Pack RGB into 8bit pixel */ - *dst = (Uint8)(((sR>>5)<<(3+2))| - ((sG>>5)<<(2)) | - ((sB>>6)<<(0))); - } - dst++; - src += srcbpp; - }, - width); - /* *INDENT-ON* */ + /* *INDENT-OFF* */ + DUFFS_LOOP( + { + DISEMBLE_RGB(src, srcbpp, srcfmt, Pixel, + sR, sG, sB); + if ( (Pixel & rgbmask) != ckey ) { + /* Pack RGB into 8bit pixel */ + *dst = (Uint8)(((sR>>5)<<(3+2))| + ((sG>>5)<<(2)) | + ((sB>>6)<<(0))); + } + dst++; + src += srcbpp; + }, + width); + /* *INDENT-ON* */ src += srcskip; dst += dstskip; } } else { while (height--) { - /* *INDENT-OFF* */ - DUFFS_LOOP( - { - DISEMBLE_RGB(src, srcbpp, srcfmt, Pixel, - sR, sG, sB); - if ( (Pixel & rgbmask) != ckey ) { - /* Pack RGB into 8bit pixel */ - *dst = (Uint8)palmap[((sR>>5)<<(3+2))| - ((sG>>5)<<(2)) | - ((sB>>6)<<(0)) ]; - } - dst++; - src += srcbpp; - }, - width); - /* *INDENT-ON* */ + /* *INDENT-OFF* */ + DUFFS_LOOP( + { + DISEMBLE_RGB(src, srcbpp, srcfmt, Pixel, + sR, sG, sB); + if ( (Pixel & rgbmask) != ckey ) { + /* Pack RGB into 8bit pixel */ + *dst = (Uint8)palmap[((sR>>5)<<(3+2))| + ((sG>>5)<<(2)) | + ((sB>>6)<<(0)) ]; + } + dst++; + src += srcbpp; + }, + width); + /* *INDENT-ON* */ src += srcskip; dst += dstskip; } @@ -2231,17 +2231,17 @@ Blit2to2Key(SDL_BlitInfo * info) ckey &= rgbmask; while (height--) { - /* *INDENT-OFF* */ - DUFFS_LOOP( - { - if ( (*srcp & rgbmask) != ckey ) { - *dstp = *srcp; - } - dstp++; - srcp++; - }, - width); - /* *INDENT-ON* */ + /* *INDENT-OFF* */ + DUFFS_LOOP( + { + if ( (*srcp & rgbmask) != ckey ) { + *dstp = *srcp; + } + dstp++; + srcp++; + }, + width); + /* *INDENT-ON* */ srcp += srcskip; dstp += dstskip; } @@ -2268,23 +2268,23 @@ BlitNtoNKey(SDL_BlitInfo * info) ckey &= rgbmask; while (height--) { - /* *INDENT-OFF* */ - DUFFS_LOOP( - { + /* *INDENT-OFF* */ + DUFFS_LOOP( + { Uint32 Pixel; - unsigned sR; - unsigned sG; - unsigned sB; - RETRIEVE_RGB_PIXEL(src, srcbpp, Pixel); - if ( (Pixel & rgbmask) != ckey ) { + unsigned sR; + unsigned sG; + unsigned sB; + RETRIEVE_RGB_PIXEL(src, srcbpp, Pixel); + if ( (Pixel & rgbmask) != ckey ) { RGB_FROM_PIXEL(Pixel, srcfmt, sR, sG, sB); - ASSEMBLE_RGBA(dst, dstbpp, dstfmt, sR, sG, sB, alpha); - } - dst += dstbpp; - src += srcbpp; - }, - width); - /* *INDENT-ON* */ + ASSEMBLE_RGBA(dst, dstbpp, dstfmt, sR, sG, sB, alpha); + } + dst += dstbpp; + src += srcbpp; + }, + width); + /* *INDENT-ON* */ src += srcskip; dst += dstskip; } @@ -2315,18 +2315,18 @@ BlitNtoNKeyCopyAlpha(SDL_BlitInfo * info) ckey &= rgbmask; while (height--) { - /* *INDENT-OFF* */ - DUFFS_LOOP( - { - DISEMBLE_RGBA(src, srcbpp, srcfmt, Pixel, sR, sG, sB, sA); - if ( (Pixel & rgbmask) != ckey ) { - ASSEMBLE_RGBA(dst, dstbpp, dstfmt, sR, sG, sB, sA); - } - dst += dstbpp; - src += srcbpp; - }, - width); - /* *INDENT-ON* */ + /* *INDENT-OFF* */ + DUFFS_LOOP( + { + DISEMBLE_RGBA(src, srcbpp, srcfmt, Pixel, sR, sG, sB, sA); + if ( (Pixel & rgbmask) != ckey ) { + ASSEMBLE_RGBA(dst, dstbpp, dstfmt, sR, sG, sB, sA); + } + dst += dstbpp; + src += srcbpp; + }, + width); + /* *INDENT-ON* */ src += srcskip; dst += dstskip; } @@ -2436,7 +2436,6 @@ SDL_CalculateBlitN(SDL_Surface * surface) case 0: blitfun = NULL; if (dstfmt->BitsPerPixel == 8) { - /* We assume 8-bit destinations are palettized */ if ((srcfmt->BytesPerPixel == 4) && (srcfmt->Rmask == 0x00FF0000) && (srcfmt->Gmask == 0x0000FF00) && diff --git a/src/video/SDL_stretch.c b/src/video/SDL_stretch.c index e976d10f0..660c93707 100644 --- a/src/video/SDL_stretch.c +++ b/src/video/SDL_stretch.c @@ -54,12 +54,12 @@ #endif #if defined(_M_IX86) || defined(i386) -#define PREFIX16 0x66 -#define STORE_BYTE 0xAA -#define STORE_WORD 0xAB -#define LOAD_BYTE 0xAC -#define LOAD_WORD 0xAD -#define RETURN 0xC3 +#define PREFIX16 0x66 +#define STORE_BYTE 0xAA +#define STORE_WORD 0xAB +#define LOAD_BYTE 0xAC +#define LOAD_WORD 0xAD +#define RETURN 0xC3 #else #error Need assembly opcodes for this architecture #endif @@ -148,23 +148,23 @@ generate_rowbytes(int src_w, int dst_w, int bpp) #endif /* USE_ASM_STRETCH */ -#define DEFINE_COPY_ROW(name, type) \ -static void name(type *src, int src_w, type *dst, int dst_w) \ -{ \ - int i; \ - int pos, inc; \ - type pixel = 0; \ - \ - pos = 0x10000; \ - inc = (src_w << 16) / dst_w; \ - for ( i=dst_w; i>0; --i ) { \ - while ( pos >= 0x10000L ) { \ - pixel = *src++; \ - pos -= 0x10000L; \ - } \ - *dst++ = pixel; \ - pos += inc; \ - } \ +#define DEFINE_COPY_ROW(name, type) \ +static void name(type *src, int src_w, type *dst, int dst_w) \ +{ \ + int i; \ + int pos, inc; \ + type pixel = 0; \ + \ + pos = 0x10000; \ + inc = (src_w << 16) / dst_w; \ + for ( i=dst_w; i>0; --i ) { \ + while ( pos >= 0x10000L ) { \ + pixel = *src++; \ + pos -= 0x10000L; \ + } \ + *dst++ = pixel; \ + pos += inc; \ + } \ } /* *INDENT-OFF* */ DEFINE_COPY_ROW(copy_row1, Uint8) @@ -220,7 +220,7 @@ SDL_SoftStretch(SDL_Surface * src, const SDL_Rect * srcrect, #endif /* USE_ASM_STRETCH */ const int bpp = dst->format->BytesPerPixel; - if (src->format->BitsPerPixel != dst->format->BitsPerPixel) { + if (src->format->format != dst->format->format) { return SDL_SetError("Only works with same format surfaces"); } From a1b0f0566bee9afd6594909004b2053c7017fd8d Mon Sep 17 00:00:00 2001 From: Sam Lantinga Date: Tue, 21 May 2013 22:04:14 -0700 Subject: [PATCH 127/542] Fixed macro line endings after whitespace was fixed --- src/video/SDL_stretch.c | 28 ++++++++++++++-------------- 1 file changed, 14 insertions(+), 14 deletions(-) diff --git a/src/video/SDL_stretch.c b/src/video/SDL_stretch.c index 660c93707..69980d076 100644 --- a/src/video/SDL_stretch.c +++ b/src/video/SDL_stretch.c @@ -150,21 +150,21 @@ generate_rowbytes(int src_w, int dst_w, int bpp) #define DEFINE_COPY_ROW(name, type) \ static void name(type *src, int src_w, type *dst, int dst_w) \ -{ \ - int i; \ - int pos, inc; \ - type pixel = 0; \ - \ - pos = 0x10000; \ +{ \ + int i; \ + int pos, inc; \ + type pixel = 0; \ + \ + pos = 0x10000; \ inc = (src_w << 16) / dst_w; \ - for ( i=dst_w; i>0; --i ) { \ - while ( pos >= 0x10000L ) { \ - pixel = *src++; \ - pos -= 0x10000L; \ - } \ - *dst++ = pixel; \ - pos += inc; \ - } \ + for ( i=dst_w; i>0; --i ) { \ + while ( pos >= 0x10000L ) { \ + pixel = *src++; \ + pos -= 0x10000L; \ + } \ + *dst++ = pixel; \ + pos += inc; \ + } \ } /* *INDENT-OFF* */ DEFINE_COPY_ROW(copy_row1, Uint8) From 077cd8d398781af4b99571362e837ada52f16ae1 Mon Sep 17 00:00:00 2001 From: "Ryan C. Gordon" Date: Wed, 22 May 2013 01:31:04 -0400 Subject: [PATCH 128/542] Use glGetStringi() for extension lookup on OpenGL contexts >= version 3.0. Fixes Bugzilla #1620. --HG-- extra : rebase_source : 5fa86e8591bfea85e1adf8a495a7b32c3d5dacd5 --- src/video/SDL_video.c | 41 +++++++++++++++++++++++++++++++++++++---- 1 file changed, 37 insertions(+), 4 deletions(-) diff --git a/src/video/SDL_video.c b/src/video/SDL_video.c index f0f3380db..bf72cf89c 100644 --- a/src/video/SDL_video.c +++ b/src/video/SDL_video.c @@ -2347,6 +2347,12 @@ SDL_GL_UnloadLibrary(void) } } +static __inline__ SDL_bool +isAtLeastGL3(const char *verstr) +{ + return ( verstr && (SDL_atoi(verstr) >= 3) ); +} + SDL_bool SDL_GL_ExtensionSupported(const char *extension) { @@ -2366,13 +2372,40 @@ SDL_GL_ExtensionSupported(const char *extension) if (start && *start == '0') { return SDL_FALSE; } + /* Lookup the available extensions */ + glGetStringFunc = SDL_GL_GetProcAddress("glGetString"); - if (glGetStringFunc) { - extensions = (const char *) glGetStringFunc(GL_EXTENSIONS); - } else { - extensions = NULL; + if (!glGetStringFunc) { + return SDL_FALSE; } + + if (isAtLeastGL3((const char *) glGetStringFunc(GL_VERSION))) { + const GLubyte *(APIENTRY * glGetStringiFunc) (GLenum, GLuint); + void (APIENTRY * glGetIntegervFunc) (GLenum pname, GLint * params); + GLint num_exts = 0; + GLint i; + + glGetStringiFunc = SDL_GL_GetProcAddress("glGetStringi"); + glGetIntegervFunc = SDL_GL_GetProcAddress("glGetIntegerv"); + if ((!glGetStringiFunc) || (!glGetIntegervFunc)) { + return SDL_FALSE; + } + + glGetIntegervFunc(GL_NUM_EXTENSIONS, &num_exts); + for (i = 0; i < num_exts; i++) { + const char *thisext = (const char *) glGetStringiFunc(GL_EXTENSIONS, i); + if (SDL_strcmp(thisext, extension) == 0) { + return SDL_TRUE; + } + } + + return SDL_FALSE; + } + + /* Try the old way with glGetString(GL_EXTENSIONS) ... */ + + extensions = (const char *) glGetStringFunc(GL_EXTENSIONS); if (!extensions) { return SDL_FALSE; } From e2039118c2bc2143f248fc4c32d058dd42ce3c53 Mon Sep 17 00:00:00 2001 From: Sam Lantinga Date: Tue, 21 May 2013 22:35:13 -0700 Subject: [PATCH 129/542] The Haiku install location fix needs to get into configure --- configure | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/configure b/configure index c54acd12a..3d12929ff 100755 --- a/configure +++ b/configure @@ -22255,7 +22255,7 @@ $as_echo "#define SDL_LOADSO_WINDOWS 1" >>confdefs.h ;; *-*-beos* | *-*-haiku*) ARCH=beos - ac_default_prefix=/boot/develop/tools/gnupro + ac_default_prefix=/boot/common CheckDummyVideo CheckDiskAudio CheckDummyAudio From a106589b149b81f11a092246cbd114aea60051b0 Mon Sep 17 00:00:00 2001 From: "Ryan C. Gordon" Date: Wed, 22 May 2013 01:36:37 -0400 Subject: [PATCH 130/542] Patched to compile with older glext.h that don't have GL_NUM_EXTENSIONS. --HG-- extra : rebase_source : e2ece9401f8f324875930d35c61514920732087b --- src/video/SDL_video.c | 3 +++ 1 file changed, 3 insertions(+) diff --git a/src/video/SDL_video.c b/src/video/SDL_video.c index bf72cf89c..8023b8536 100644 --- a/src/video/SDL_video.c +++ b/src/video/SDL_video.c @@ -2392,6 +2392,9 @@ SDL_GL_ExtensionSupported(const char *extension) return SDL_FALSE; } + #ifndef GL_NUM_EXTENSIONS + #define GL_NUM_EXTENSIONS 0x821D + #endif glGetIntegervFunc(GL_NUM_EXTENSIONS, &num_exts); for (i = 0; i < num_exts; i++) { const char *thisext = (const char *) glGetStringiFunc(GL_EXTENSIONS, i); From 9e842c74c1e1fcbf02725dc7701525bdae7bdc59 Mon Sep 17 00:00:00 2001 From: Sam Lantinga Date: Tue, 21 May 2013 22:48:50 -0700 Subject: [PATCH 131/542] Fixed Haiku build issue with missing extension support. The visibility attribute warnings in Haiku gl.h can be fixed by editing gl.h and changing the line: #elif defined(__GNUC__) || (defined(__SUNPRO_C) && (__SUNPRO_C >= 0x590)) to #elif (defined(__GNUC__) && __GNUC__ >= 4) || (defined(__SUNPRO_C) && (__SUNPRO_C >= 0x590)) as described in: http://dev.haiku-os.org/ticket/8882 --- include/SDL_opengl.h | 4 ---- 1 file changed, 4 deletions(-) diff --git a/include/SDL_opengl.h b/include/SDL_opengl.h index fecaca0c2..2f120aa95 100644 --- a/include/SDL_opengl.h +++ b/include/SDL_opengl.h @@ -40,10 +40,6 @@ #include #endif -#ifdef __HAIKU__ /* !!! FIXME: temp compiler warning fix... */ -#define NO_SDL_GLEXT 1 -#endif - #ifdef __glext_h_ /* Someone has already included glext.h */ #define NO_SDL_GLEXT From 0ce4bb89d8c13695e95efac0b990bed75054b4a4 Mon Sep 17 00:00:00 2001 From: Edward Rudd Date: Thu, 23 May 2013 18:45:14 -0400 Subject: [PATCH 132/542] Only free EventData if it's successfully retrieved. - straight from http://who-t.blogspot.com/2009/07/xi2-and-xlib-cookies.html - hopefully fixes random crash on some systems --- src/video/x11/SDL_x11events.c | 9 +++++---- 1 file changed, 5 insertions(+), 4 deletions(-) diff --git a/src/video/x11/SDL_x11events.c b/src/video/x11/SDL_x11events.c index 318c2947b..025777aee 100644 --- a/src/video/x11/SDL_x11events.c +++ b/src/video/x11/SDL_x11events.c @@ -187,10 +187,11 @@ static char* X11_URIToLocal(char* uri) { #if SDL_VIDEO_DRIVER_X11_SUPPORTS_GENERIC_EVENTS static void X11_HandleGenericEvent(SDL_VideoData *videodata,XEvent event) { - XGenericEventCookie *cookie = &event.xcookie; - XGetEventData(videodata->display, cookie); - X11_HandleXinput2Event(videodata,cookie); - XFreeEventData(videodata->display,cookie); + if (XGetEventData(videodata->display, &event)) { + XGenericEventCookie *cookie = &event.xcookie; + X11_HandleXinput2Event(videodata, cookie); + XFreeEventData(videodata->display, cookie); + } } #endif /* SDL_VIDEO_DRIVER_X11_SUPPORTS_GENERIC_EVENTS */ From 00abdbbc2aa39d93422078b3e8deb59cf3d2ef46 Mon Sep 17 00:00:00 2001 From: Sam Lantinga Date: Thu, 23 May 2013 23:27:48 -0700 Subject: [PATCH 133/542] Added a newline to OutputDebugString(), fixes output on Visual Studio 2008 --- src/SDL_log.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/src/SDL_log.c b/src/SDL_log.c index fd9545e4c..df6e1e6d4 100644 --- a/src/SDL_log.c +++ b/src/SDL_log.c @@ -299,9 +299,9 @@ SDL_LogOutput(void *userdata, int category, SDL_LogPriority priority, size_t length; LPTSTR tstr; - length = SDL_strlen(SDL_priority_prefixes[priority]) + 2 + SDL_strlen(message) + 1; + length = SDL_strlen(SDL_priority_prefixes[priority]) + 2 + SDL_strlen(message) + 1 + 1; output = SDL_stack_alloc(char, length); - SDL_snprintf(output, length, "%s: %s", SDL_priority_prefixes[priority], message); + SDL_snprintf(output, length, "%s: %s\n", SDL_priority_prefixes[priority], message); tstr = WIN_UTF8ToString(output); OutputDebugString(tstr); SDL_free(tstr); From 03210bff7e2f49ab8ed9f0b45749fb8a3ffd5dc4 Mon Sep 17 00:00:00 2001 From: Sam Lantinga Date: Fri, 24 May 2013 03:23:21 -0700 Subject: [PATCH 134/542] Added the beginning of automated tests for the standard C library routines. Implemented more SDL_snprintf format specifiers. --- src/stdlib/SDL_string.c | 317 ++++++++++++++++++++++------------- test/Makefile.in | 17 +- test/testautomation_stdlib.c | 142 ++++++++++++++++ test/testautomation_suites.h | 18 +- 4 files changed, 359 insertions(+), 135 deletions(-) create mode 100644 test/testautomation_stdlib.c diff --git a/src/stdlib/SDL_string.c b/src/stdlib/SDL_string.c index da02d8b09..dd3589e4e 100644 --- a/src/stdlib/SDL_string.c +++ b/src/stdlib/SDL_string.c @@ -1079,8 +1079,7 @@ SDL_sscanf(const char *text, const char *fmt, ...) ++index; } if (text[index] == '0') { - if (SDL_tolower((unsigned char) text[index + 1]) - == 'x') { + if (SDL_tolower((unsigned char) text[index + 1]) == 'x') { radix = 16; } else { radix = 8; @@ -1273,133 +1272,177 @@ SDL_snprintf(char *text, size_t maxlen, const char *fmt, ...) #undef SDL_vsnprintf int SDL_vsnprintf(char *text, size_t maxlen, const char *fmt, va_list ap) { return SDL_vsnprintf_inline(text, maxlen, fmt, ap); } #else -static size_t -SDL_PrintLong(char *text, long value, int radix, size_t maxlen) + /* FIXME: implement more of the format specifiers */ +typedef struct { - char num[130]; - size_t size; + SDL_bool left_justify; + SDL_bool force_sign; + SDL_bool force_type; + SDL_bool pad_zeroes; + SDL_bool do_lowercase; + int width; + int radix; + int precision; +} SDL_FormatInfo; - SDL_ltoa(value, num, radix); - size = SDL_strlen(num); - if (size >= maxlen) { - size = maxlen - 1; - } - SDL_strlcpy(text, num, size + 1); - - return size; +static size_t +SDL_PrintString(char *text, size_t maxlen, SDL_FormatInfo *info, const char *string) +{ + return SDL_strlcpy(text, string, maxlen); } static size_t -SDL_PrintUnsignedLong(char *text, unsigned long value, int radix, - size_t maxlen) +SDL_PrintLong(char *text, size_t maxlen, SDL_FormatInfo *info, long value) { char num[130]; - size_t size; - SDL_ultoa(value, num, radix); - size = SDL_strlen(num); - if (size >= maxlen) { - size = maxlen - 1; - } - SDL_strlcpy(text, num, size + 1); - - return size; + SDL_ltoa(value, num, info ? info->radix : 10); + return SDL_PrintString(text, maxlen, info, num); } static size_t -SDL_PrintLongLong(char *text, Sint64 value, int radix, size_t maxlen) +SDL_PrintUnsignedLong(char *text, size_t maxlen, SDL_FormatInfo *info, unsigned long value) { char num[130]; - size_t size; - SDL_lltoa(value, num, radix); - size = SDL_strlen(num); - if (size >= maxlen) { - size = maxlen - 1; - } - SDL_strlcpy(text, num, size + 1); - - return size; + SDL_ultoa(value, num, info ? info->radix : 10); + return SDL_PrintString(text, maxlen, info, num); } static size_t -SDL_PrintUnsignedLongLong(char *text, Uint64 value, int radix, size_t maxlen) +SDL_PrintLongLong(char *text, size_t maxlen, SDL_FormatInfo *info, Sint64 value) { char num[130]; - size_t size; - SDL_ulltoa(value, num, radix); - size = SDL_strlen(num); - if (size >= maxlen) { - size = maxlen - 1; - } - SDL_strlcpy(text, num, size + 1); - - return size; + SDL_lltoa(value, num, info ? info->radix : 10); + return SDL_PrintString(text, maxlen, info, num); } static size_t -SDL_PrintFloat(char *text, double arg, size_t maxlen) +SDL_PrintUnsignedLongLong(char *text, size_t maxlen, SDL_FormatInfo *info, Uint64 value) { + char num[130]; + + SDL_ulltoa(value, num, info ? info->radix : 10); + return SDL_PrintString(text, maxlen, info, num); +} + +static size_t +SDL_PrintFloat(char *text, size_t maxlen, SDL_FormatInfo *info, double arg) +{ + int i, width; + size_t len, spot; + size_t left = maxlen; char *textstart = text; + if (arg) { /* This isn't especially accurate, but hey, it's easy. :) */ - const double precision = 0.00000001; - size_t len; + double precision = 1.0; unsigned long value; if (arg < 0) { - *text++ = '-'; - --maxlen; + if (left > 1) { + *text = '-'; + --left; + } + ++text; arg = -arg; + } else if (info->force_sign) { + if (left > 1) { + *text = '+'; + --left; + } + ++text; } value = (unsigned long) arg; - len = SDL_PrintUnsignedLong(text, value, 10, maxlen); + len = SDL_PrintUnsignedLong(text, left, NULL, value); text += len; - maxlen -= len; + if (len >= left) { + left = SDL_min(left, 1); + } else { + left -= len; + } arg -= value; - if (arg > precision && maxlen) { + if (info->precision < 0) { + info->precision = 6; + } + for (i = 0; i < info->precision; ++i) { + precision *= 0.1; + } + if (info->force_type || info->precision > 0) { int mult = 10; - *text++ = '.'; - while ((arg > precision) && maxlen) { + if (left > 1) { + *text = '.'; + --left; + } + ++text; + while (info->precision-- > 0) { value = (unsigned long) (arg * mult); - len = SDL_PrintUnsignedLong(text, value, 10, maxlen); + len = SDL_PrintUnsignedLong(text, left, NULL, value); text += len; - maxlen -= len; + if (len >= left) { + left = SDL_min(left, 1); + } else { + left -= len; + } arg -= (double) value / mult; mult *= 10; } } } else { - *text++ = '0'; + if (left > 1) { + *text = '0'; + --left; + } + ++text; + if (info->force_type) { + if (left > 1) { + *text = '.'; + --left; + } + ++text; + } } - return (text - textstart); -} -static size_t -SDL_PrintString(char *text, const char *string, size_t maxlen) -{ - char *textstart = text; - while (*string && maxlen--) { - *text++ = *string++; + width = info->width - (int)(text - textstart); + if (width > 0) { + char fill = info->pad_zeroes ? '0' : ' '; + char *end = text+left-1; + len = (text - textstart); + for (len = (text - textstart); len--; ) { + if ((textstart+len+width) < end) { + *(textstart+len+width) = *(textstart+len); + } + } + len = (size_t)width; + text += len; + if (len >= left) { + left = SDL_min(left, 1); + } else { + left -= len; + } + while (len--) { + if (textstart+len < end) { + textstart[len] = fill; + } + } } + return (text - textstart); } int SDL_vsnprintf(char *text, size_t maxlen, const char *fmt, va_list ap) { + size_t left = maxlen; char *textstart = text; - if (maxlen <= 0) { - return 0; - } - --maxlen; /* For the trailing '\0' */ - while (*fmt && maxlen) { + + while (*fmt) { if (*fmt == '%') { SDL_bool done = SDL_FALSE; size_t len = 0; - SDL_bool do_lowercase = SDL_FALSE; - int radix = 10; + SDL_bool check_flag; + SDL_FormatInfo info; enum { DO_INT, @@ -1407,21 +1450,59 @@ SDL_vsnprintf(char *text, size_t maxlen, const char *fmt, va_list ap) DO_LONGLONG } inttype = DO_INT; - ++fmt; - /* FIXME: implement more of the format specifiers */ - while (*fmt == '.' || (*fmt >= '0' && *fmt <= '9')) { + SDL_zero(info); + info.radix = 10; + info.precision = -1; + + check_flag = SDL_TRUE; + while (check_flag) { ++fmt; + switch (*fmt) { + case '-': + info.left_justify = SDL_TRUE; + break; + case '+': + info.force_sign = SDL_TRUE; + break; + case '#': + info.force_type = SDL_TRUE; + break; + case '0': + info.pad_zeroes = SDL_TRUE; + break; + default: + check_flag = SDL_FALSE; + break; + } } + + if (*fmt >= '0' && *fmt <= '9') { + info.width = SDL_strtol(fmt, (char **)&fmt, 0); + } + + if (*fmt == '.') { + ++fmt; + if (*fmt >= '0' && *fmt <= '9') { + info.precision = SDL_strtol(fmt, (char **)&fmt, 0); + } else { + info.precision = 0; + } + } + while (!done) { switch (*fmt) { case '%': - *text = '%'; + if (left > 1) { + *text = '%'; + } len = 1; done = SDL_TRUE; break; case 'c': /* char is promoted to int when passed through (...) */ - *text = (char) va_arg(ap, int); + if (left > 1) { + *text = (char) va_arg(ap, int); + } len = 1; done = SDL_TRUE; break; @@ -1443,78 +1524,67 @@ SDL_vsnprintf(char *text, size_t maxlen, const char *fmt, va_list ap) case 'd': switch (inttype) { case DO_INT: - len = - SDL_PrintLong(text, - (long) va_arg(ap, int), - radix, maxlen); + len = SDL_PrintLong(text, left, &info, + (long) va_arg(ap, int)); break; case DO_LONG: - len = - SDL_PrintLong(text, va_arg(ap, long), - radix, maxlen); + len = SDL_PrintLong(text, left, &info, + va_arg(ap, long)); break; case DO_LONGLONG: - len = - SDL_PrintLongLong(text, - va_arg(ap, Sint64), - radix, maxlen); + len = SDL_PrintLongLong(text, left, &info, + va_arg(ap, Sint64)); break; } done = SDL_TRUE; break; case 'p': case 'x': - do_lowercase = SDL_TRUE; + info.do_lowercase = SDL_TRUE; /* Fall through to 'X' handling */ case 'X': - if (radix == 10) { - radix = 16; + if (info.radix == 10) { + info.radix = 16; } if (*fmt == 'p') { inttype = DO_LONG; } /* Fall through to unsigned handling */ case 'o': - if (radix == 10) { - radix = 8; + if (info.radix == 10) { + info.radix = 8; } /* Fall through to unsigned handling */ case 'u': switch (inttype) { case DO_INT: - len = SDL_PrintUnsignedLong(text, (unsigned long) - va_arg(ap, - unsigned - int), - radix, maxlen); + len = SDL_PrintUnsignedLong(text, left, &info, + (unsigned long) + va_arg(ap, unsigned int)); break; case DO_LONG: - len = - SDL_PrintUnsignedLong(text, - va_arg(ap, - unsigned - long), - radix, maxlen); + len = SDL_PrintUnsignedLong(text, left, &info, + va_arg(ap, unsigned long)); break; case DO_LONGLONG: - len = - SDL_PrintUnsignedLongLong(text, - va_arg(ap, - Uint64), - radix, maxlen); + len = SDL_PrintUnsignedLongLong(text, left, &info, + va_arg(ap, Uint64)); break; } - if (do_lowercase) { - SDL_strlwr(text); + if (info.do_lowercase) { + size_t i; + for (i = 0; i < len && i < left; ++i) { + text[i] = SDL_tolower((unsigned char)text[i]); + } } done = SDL_TRUE; break; case 'f': - len = SDL_PrintFloat(text, va_arg(ap, double), maxlen); + len = SDL_PrintFloat(text, left, &info, va_arg(ap, double)); done = SDL_TRUE; break; case 's': - len = SDL_PrintString(text, va_arg(ap, char *), maxlen); + len = SDL_PrintString(text, left, &info, va_arg(ap, char *)); done = SDL_TRUE; break; default: @@ -1524,14 +1594,23 @@ SDL_vsnprintf(char *text, size_t maxlen, const char *fmt, va_list ap) ++fmt; } text += len; - maxlen -= len; + if (len >= left) { + left = SDL_min(left, 1); + } else { + left -= len; + } } else { - *text++ = *fmt++; - --maxlen; + if (left > 1) { + *text = *fmt; + --left; + } + ++fmt; + ++text; } } - *text = '\0'; - + if (left > 0) { + *text = '\0'; + } return (int)(text - textstart); } #endif diff --git a/test/Makefile.in b/test/Makefile.in index 0240a2e60..48f7b1f81 100644 --- a/test/Makefile.in +++ b/test/Makefile.in @@ -69,22 +69,23 @@ testaudioinfo$(EXE): $(srcdir)/testaudioinfo.c $(CC) -o $@ $^ $(CFLAGS) $(LIBS) testautomation$(EXE): $(srcdir)/testautomation.c \ + $(srcdir)/testautomation_audio.c \ $(srcdir)/testautomation_clipboard.c \ + $(srcdir)/testautomation_events.c \ + $(srcdir)/testautomation_keyboard.c \ $(srcdir)/testautomation_main.c \ + $(srcdir)/testautomation_mouse.c \ + $(srcdir)/testautomation_pixels.c \ $(srcdir)/testautomation_platform.c \ $(srcdir)/testautomation_rect.c \ $(srcdir)/testautomation_render.c \ $(srcdir)/testautomation_rwops.c \ - $(srcdir)/testautomation_audio.c \ - $(srcdir)/testautomation_surface.c \ - $(srcdir)/testautomation_events.c \ - $(srcdir)/testautomation_keyboard.c \ - $(srcdir)/testautomation_video.c \ - $(srcdir)/testautomation_syswm.c \ $(srcdir)/testautomation_sdltest.c \ - $(srcdir)/testautomation_mouse.c \ + $(srcdir)/testautomation_stdlib.c \ + $(srcdir)/testautomation_surface.c \ + $(srcdir)/testautomation_syswm.c \ $(srcdir)/testautomation_timer.c \ - $(srcdir)/testautomation_pixels.c + $(srcdir)/testautomation_video.c $(CC) -o $@ $^ $(CFLAGS) -lSDL2_test $(LIBS) testmultiaudio$(EXE): $(srcdir)/testmultiaudio.c diff --git a/test/testautomation_stdlib.c b/test/testautomation_stdlib.c new file mode 100644 index 000000000..f086c6d44 --- /dev/null +++ b/test/testautomation_stdlib.c @@ -0,0 +1,142 @@ +/** + * Standard C library routine test suite + */ + +#include + +#include "SDL.h" +#include "SDL_test.h" + + +/* Test case functions */ + +/** + * @brief Call to SDL_strlcpy + */ +#undef SDL_strlcpy +int +stdlib_strlcpy(void *arg) +{ + size_t result; + char text[1024]; + const char *expected; + + result = SDL_strlcpy(text, "foo", sizeof(text)); + expected = "foo"; + SDLTest_AssertPass("Call to SDL_strlcpy(\"foo\")"); + SDLTest_AssertCheck(SDL_strcmp(text, expected) == 0, "Check text, expected: %s, got: %s", expected, text); + SDLTest_AssertCheck(result == SDL_strlen(text), "Check result value, expected: %d, got: %d", SDL_strlen(text), result); + + result = SDL_strlcpy(text, "foo", 2); + expected = "f"; + SDLTest_AssertPass("Call to SDL_strlcpy(\"foo\") with buffer size 2"); + SDLTest_AssertCheck(SDL_strcmp(text, expected) == 0, "Check text, expected: %s, got: %s", expected, text); + SDLTest_AssertCheck(result == 3, "Check result value, expected: 3, got: %d", result); + + return TEST_COMPLETED; +} + +/** + * @brief Call to SDL_snprintf + */ +#undef SDL_snprintf +int +stdlib_snprintf(void *arg) +{ + int result; + char text[1024]; + const char *expected; + + result = SDL_snprintf(text, sizeof(text), "%s", "foo"); + expected = "foo"; + SDLTest_AssertPass("Call to SDL_snprintf(\"%%s\", \"foo\")"); + SDLTest_AssertCheck(SDL_strcmp(text, expected) == 0, "Check text, expected: %s, got: %s", expected, text); + SDLTest_AssertCheck(result == SDL_strlen(text), "Check result value, expected: %d, got: %d", SDL_strlen(text), result); + + result = SDL_snprintf(text, 2, "%s", "foo"); + expected = "f"; + SDLTest_AssertPass("Call to SDL_snprintf(\"%%s\", \"foo\") with buffer size 2"); + SDLTest_AssertCheck(SDL_strcmp(text, expected) == 0, "Check text, expected: %s, got: %s", expected, text); + SDLTest_AssertCheck(result == 3, "Check result value, expected: 3, got: %d", result); + + result = SDL_snprintf(NULL, 0, "%s", "foo"); + SDLTest_AssertCheck(result == 3, "Check result value, expected: 3, got: %d", result); + + result = SDL_snprintf(text, sizeof(text), "%f", 1.0); + expected = "1.000000"; + SDLTest_AssertPass("Call to SDL_snprintf(\"%%f\", 1.0)"); + SDLTest_AssertCheck(SDL_strcmp(text, expected) == 0, "Check text, expected: %s, got: %s", expected, text); + SDLTest_AssertCheck(result == SDL_strlen(text), "Check result value, expected: %d, got: %d", SDL_strlen(text), result); + + result = SDL_snprintf(text, sizeof(text), "%.f", 1.0); + expected = "1"; + SDLTest_AssertPass("Call to SDL_snprintf(\"%%.f\", 1.0)"); + SDLTest_AssertCheck(SDL_strcmp(text, expected) == 0, "Check text, expected: %s, got: %s", expected, text); + SDLTest_AssertCheck(result == SDL_strlen(text), "Check result value, expected: %d, got: %d", SDL_strlen(text), result); + + result = SDL_snprintf(text, sizeof(text), "%#.f", 1.0); + expected = "1."; + SDLTest_AssertPass("Call to SDL_snprintf(\"%%#.f\", 1.0)"); + SDLTest_AssertCheck(SDL_strcmp(text, expected) == 0, "Check text, expected: %s, got: %s", expected, text); + SDLTest_AssertCheck(result == SDL_strlen(text), "Check result value, expected: %d, got: %d", SDL_strlen(text), result); + + result = SDL_snprintf(text, sizeof(text), "%f", 1.0 + 1.0 / 3.0); + expected = "1.333333"; + SDLTest_AssertPass("Call to SDL_snprintf(\"%%f\", 1.0 + 1.0 / 3.0)"); + SDLTest_AssertCheck(SDL_strcmp(text, expected) == 0, "Check text, expected: %s, got: %s", expected, text); + SDLTest_AssertCheck(result == SDL_strlen(text), "Check result value, expected: %d, got: %d", SDL_strlen(text), result); + + result = SDL_snprintf(text, sizeof(text), "%+f", 1.0 + 1.0 / 3.0); + expected = "+1.333333"; + SDLTest_AssertPass("Call to SDL_snprintf(\"%%+f\", 1.0 + 1.0 / 3.0)"); + SDLTest_AssertCheck(SDL_strcmp(text, expected) == 0, "Check text, expected: %s, got: %s", expected, text); + SDLTest_AssertCheck(result == SDL_strlen(text), "Check result value, expected: %d, got: %d", SDL_strlen(text), result); + + result = SDL_snprintf(text, sizeof(text), "%.2f", 1.0 + 1.0 / 3.0); + expected = "1.33"; + SDLTest_AssertPass("Call to SDL_snprintf(\"%%.2f\", 1.0 + 1.0 / 3.0)"); + SDLTest_AssertCheck(SDL_strcmp(text, expected) == 0, "Check text, expected: %s, got: %s", expected, text); + SDLTest_AssertCheck(result == SDL_strlen(text), "Check result value, expected: %d, got: %d", SDL_strlen(text), result); + + result = SDL_snprintf(text, sizeof(text), "%6.2f", 1.0 + 1.0 / 3.0); + expected = " 1.33"; + SDLTest_AssertPass("Call to SDL_snprintf(\"%%6.2f\", 1.0 + 1.0 / 3.0)"); + SDLTest_AssertCheck(SDL_strcmp(text, expected) == 0, "Check text, expected: '%s', got: '%s'", expected, text); + SDLTest_AssertCheck(result == SDL_strlen(text), "Check result value, expected: %d, got: %d", SDL_strlen(text), result); + + result = SDL_snprintf(text, sizeof(text), "%06.2f", 1.0 + 1.0 / 3.0); + expected = "001.33"; + SDLTest_AssertPass("Call to SDL_snprintf(\"%%06.2f\", 1.0 + 1.0 / 3.0)"); + SDLTest_AssertCheck(SDL_strcmp(text, expected) == 0, "Check text, expected: '%s', got: '%s'", expected, text); + SDLTest_AssertCheck(result == SDL_strlen(text), "Check result value, expected: %d, got: %d", SDL_strlen(text), result); + + result = SDL_snprintf(text, 5, "%06.2f", 1.0 + 1.0 / 3.0); + expected = "001."; + SDLTest_AssertPass("Call to SDL_snprintf(\"%%06.2f\", 1.0 + 1.0 / 3.0) with buffer size 5"); + SDLTest_AssertCheck(SDL_strcmp(text, expected) == 0, "Check text, expected: '%s', got: '%s'", expected, text); + SDLTest_AssertCheck(result == 6, "Check result value, expected: 6, got: %d", result); + + return TEST_COMPLETED; +} + +/* ================= Test References ================== */ + +/* Standard C routine test cases */ +static const SDLTest_TestCaseReference stdlibTest1 = + { (SDLTest_TestCaseFp)stdlib_strlcpy, "stdlib_strlcpy", "Call to SDL_strlcpy", TEST_ENABLED }; + +static const SDLTest_TestCaseReference stdlibTest2 = + { (SDLTest_TestCaseFp)stdlib_snprintf, "stdlib_snprintf", "Call to SDL_sprintf", TEST_ENABLED }; + +/* Sequence of Standard C routine test cases */ +static const SDLTest_TestCaseReference *stdlibTests[] = { + &stdlibTest1, &stdlibTest2, NULL +}; + +/* Timer test suite (global) */ +SDLTest_TestSuiteReference stdlibTestSuite = { + "Standard C routines", + NULL, + stdlibTests, + NULL +}; diff --git a/test/testautomation_suites.h b/test/testautomation_suites.h index e42cd4266..695681b13 100644 --- a/test/testautomation_suites.h +++ b/test/testautomation_suites.h @@ -14,17 +14,18 @@ extern SDLTest_TestSuiteReference clipboardTestSuite; extern SDLTest_TestSuiteReference eventsTestSuite; extern SDLTest_TestSuiteReference keyboardTestSuite; extern SDLTest_TestSuiteReference mainTestSuite; +extern SDLTest_TestSuiteReference mouseTestSuite; +extern SDLTest_TestSuiteReference pixelsTestSuite; extern SDLTest_TestSuiteReference platformTestSuite; extern SDLTest_TestSuiteReference rectTestSuite; extern SDLTest_TestSuiteReference renderTestSuite; extern SDLTest_TestSuiteReference rwopsTestSuite; +extern SDLTest_TestSuiteReference sdltestTestSuite; +extern SDLTest_TestSuiteReference stdlibTestSuite; extern SDLTest_TestSuiteReference surfaceTestSuite; extern SDLTest_TestSuiteReference syswmTestSuite; -extern SDLTest_TestSuiteReference sdltestTestSuite; -extern SDLTest_TestSuiteReference videoTestSuite; -extern SDLTest_TestSuiteReference mouseTestSuite; extern SDLTest_TestSuiteReference timerTestSuite; -extern SDLTest_TestSuiteReference pixelsTestSuite; +extern SDLTest_TestSuiteReference videoTestSuite; // All test suites SDLTest_TestSuiteReference *testSuites[] = { @@ -33,17 +34,18 @@ SDLTest_TestSuiteReference *testSuites[] = { &eventsTestSuite, &keyboardTestSuite, &mainTestSuite, + &mouseTestSuite, + &pixelsTestSuite, &platformTestSuite, &rectTestSuite, &renderTestSuite, &rwopsTestSuite, + &sdltestTestSuite, + &stdlibTestSuite, &surfaceTestSuite, &syswmTestSuite, - &sdltestTestSuite, - &videoTestSuite, - &mouseTestSuite, &timerTestSuite, - &pixelsTestSuite, + &videoTestSuite, NULL }; From f423813732bc3809f1c56a9da8ff64d75147b778 Mon Sep 17 00:00:00 2001 From: Sam Lantinga Date: Fri, 24 May 2013 03:29:31 -0700 Subject: [PATCH 135/542] Fixed Windows build --- .../testautomation_vs2010.vcxproj | 17 +++++++++-------- .../testautomation_vs2012.vcxproj | 17 +++++++++-------- src/stdlib/SDL_string.c | 2 +- 3 files changed, 19 insertions(+), 17 deletions(-) diff --git a/VisualC/tests/testautomation/testautomation_vs2010.vcxproj b/VisualC/tests/testautomation/testautomation_vs2010.vcxproj index 0947a9754..3c4fe9d9f 100644 --- a/VisualC/tests/testautomation/testautomation_vs2010.vcxproj +++ b/VisualC/tests/testautomation/testautomation_vs2010.vcxproj @@ -179,20 +179,21 @@ + + + + - - - - - - + + + - +
@@ -211,4 +212,4 @@ -
\ No newline at end of file +
diff --git a/VisualC/tests/testautomation/testautomation_vs2012.vcxproj b/VisualC/tests/testautomation/testautomation_vs2012.vcxproj index 340081bc2..1e6d973ab 100644 --- a/VisualC/tests/testautomation/testautomation_vs2012.vcxproj +++ b/VisualC/tests/testautomation/testautomation_vs2012.vcxproj @@ -183,20 +183,21 @@ - + + + + + - - - - - - + + + - + diff --git a/src/stdlib/SDL_string.c b/src/stdlib/SDL_string.c index dd3589e4e..3032d6a8d 100644 --- a/src/stdlib/SDL_string.c +++ b/src/stdlib/SDL_string.c @@ -1331,7 +1331,7 @@ static size_t SDL_PrintFloat(char *text, size_t maxlen, SDL_FormatInfo *info, double arg) { int i, width; - size_t len, spot; + size_t len; size_t left = maxlen; char *textstart = text; From a5ba9c22a72ee6de265fa45a3e833203dc2a1a7f Mon Sep 17 00:00:00 2001 From: Philipp Wiesemann Date: Sun, 26 May 2013 11:54:17 +0200 Subject: [PATCH 136/542] Changed three similar error messages to contain more context. --- src/audio/xaudio2/SDL_xaudio2.c | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/src/audio/xaudio2/SDL_xaudio2.c b/src/audio/xaudio2/SDL_xaudio2.c index db29e8dbb..44d24fa43 100644 --- a/src/audio/xaudio2/SDL_xaudio2.c +++ b/src/audio/xaudio2/SDL_xaudio2.c @@ -75,7 +75,7 @@ XAUDIO2_DetectDevices(int iscapture, SDL_AddAudioDevice addfn) SDL_SetError("XAudio2: capture devices unsupported."); return; } else if (XAudio2Create(&ixa2, 0, XAUDIO2_DEFAULT_PROCESSOR) != S_OK) { - SDL_SetError("XAudio2: XAudio2Create() failed."); + SDL_SetError("XAudio2: XAudio2Create() failed at detection."); return; } else if (IXAudio2_GetDeviceCount(ixa2, &devcount) != S_OK) { SDL_SetError("XAudio2: IXAudio2::GetDeviceCount() failed."); @@ -247,7 +247,7 @@ XAUDIO2_OpenDevice(_THIS, const char *devname, int iscapture) if (iscapture) { return SDL_SetError("XAudio2: capture devices unsupported."); } else if (XAudio2Create(&ixa2, 0, XAUDIO2_DEFAULT_PROCESSOR) != S_OK) { - return SDL_SetError("XAudio2: XAudio2Create() failed."); + return SDL_SetError("XAudio2: XAudio2Create() failed at open."); } if (devname != NULL) { @@ -405,7 +405,7 @@ XAUDIO2_Init(SDL_AudioDriverImpl * impl) if (XAudio2Create(&ixa2, 0, XAUDIO2_DEFAULT_PROCESSOR) != S_OK) { WIN_CoUninitialize(); - SDL_SetError("XAudio2: XAudio2Create() failed"); + SDL_SetError("XAudio2: XAudio2Create() failed at initialization"); return 0; /* not available. */ } IXAudio2_Release(ixa2); From c30845f58b63ae088b572073ffc95c014c5b5d2a Mon Sep 17 00:00:00 2001 From: Philipp Wiesemann Date: Sun, 26 May 2013 12:12:52 +0200 Subject: [PATCH 137/542] Fixed test description in test suite for standard library. --- test/testautomation_stdlib.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/test/testautomation_stdlib.c b/test/testautomation_stdlib.c index f086c6d44..93ce8911d 100644 --- a/test/testautomation_stdlib.c +++ b/test/testautomation_stdlib.c @@ -126,7 +126,7 @@ static const SDLTest_TestCaseReference stdlibTest1 = { (SDLTest_TestCaseFp)stdlib_strlcpy, "stdlib_strlcpy", "Call to SDL_strlcpy", TEST_ENABLED }; static const SDLTest_TestCaseReference stdlibTest2 = - { (SDLTest_TestCaseFp)stdlib_snprintf, "stdlib_snprintf", "Call to SDL_sprintf", TEST_ENABLED }; + { (SDLTest_TestCaseFp)stdlib_snprintf, "stdlib_snprintf", "Call to SDL_snprintf", TEST_ENABLED }; /* Sequence of Standard C routine test cases */ static const SDLTest_TestCaseReference *stdlibTests[] = { From c1b6e054554e812c877313c415ddd1ef55090772 Mon Sep 17 00:00:00 2001 From: Philipp Wiesemann Date: Sun, 26 May 2013 12:15:15 +0200 Subject: [PATCH 138/542] Fixed wrong documentation for haptic implementation. --- src/haptic/SDL_syshaptic.h | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/haptic/SDL_syshaptic.h b/src/haptic/SDL_syshaptic.h index 28ef84399..ac5198ffd 100644 --- a/src/haptic/SDL_syshaptic.h +++ b/src/haptic/SDL_syshaptic.h @@ -59,7 +59,7 @@ struct _SDL_Haptic /* * Scans the system for haptic devices. * - * Returns 0 on success, -1 on error. + * Returns number of devices on success, -1 on error. */ extern int SDL_SYS_HapticInit(void); From 27d4a625ba5bccf27b5976d4e868232b26ff1f40 Mon Sep 17 00:00:00 2001 From: Philipp Wiesemann Date: Sun, 26 May 2013 12:30:52 +0200 Subject: [PATCH 139/542] Corrected documentation errors in header file. --- include/SDL_haptic.h | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/include/SDL_haptic.h b/include/SDL_haptic.h index 6548ad616..a06c310b0 100644 --- a/include/SDL_haptic.h +++ b/include/SDL_haptic.h @@ -614,7 +614,7 @@ typedef struct SDL_HapticCondition * * The ramp effect starts at start strength and ends at end strength. * It augments in linear fashion. If you use attack and fade with a ramp - * they effects get added to the ramp effect making the effect become + * the effects get added to the ramp effect making the effect become * quadratic instead of linear. * * \sa SDL_HAPTIC_RAMP @@ -700,7 +700,7 @@ typedef struct SDL_HapticCustom * * Button triggers may not be supported on all devices, it is advised to not * use them if possible. Buttons start at index 1 instead of index 0 like - * they joystick. + * the joystick. * * If both attack_length and fade_level are 0, the envelope is not used, * otherwise both values are used. @@ -767,7 +767,7 @@ typedef union SDL_HapticEffect /* Function prototypes */ /** - * \brief Count the number of joysticks attached to the system. + * \brief Count the number of haptic devices attached to the system. * * \return Number of haptic devices detected on the system. */ From 2b824bd331274bafa3cf231a33e1573a8ee271c8 Mon Sep 17 00:00:00 2001 From: Sam Lantinga Date: Sun, 26 May 2013 11:06:17 -0700 Subject: [PATCH 140/542] Renamed documentation files to .txt and converted them to DOS line endings so they would open properly on all systems. Updated Makefile.in so "make dist" includes everything necessary for release. --HG-- rename : BUGS => BUGS.txt rename : COPYING => COPYING.txt rename : CREDITS => CREDITS.txt rename : INSTALL => INSTALL.txt rename : README.android => README-android.txt rename : README.cmake => README-cmake.txt rename : README.DirectFB => README-directfb.txt rename : README.gesture => README-gesture.txt rename : README.HG => README-hg.txt rename : README.iOS => README-ios.txt rename : README.MacOSX => README-macosx.txt rename : README.pandora => README-pandora.txt rename : README.Platforms => README-platforms.txt rename : README.Porting => README-porting.txt rename : README.psp => README-psp.txt rename : README.touch => README-touch.txt rename : README.WinCE => README-wince.txt rename : README => README.txt rename : TODO => TODO.txt --- .DISABLED-hgeol | 57 - .indent.pro | 1 - BUGS => BUGS.txt | 35 +- COPYING => COPYING.txt | 40 +- CREDITS | 70 - CREDITS.txt | 33 + INSTALL => INSTALL.txt | 54 +- Makefile.in | 27 +- README-SDL.txt | 26 +- README.android => README-android.txt | 768 +- README.cmake => README-cmake.txt | 62 +- README.DirectFB => README-directfb.txt | 212 +- README.gesture => README-gesture.txt | 144 +- README.HG => README-hg.txt | 46 +- README.iOS => README-ios.txt | 444 +- README.MacOSX => README-macosx.txt | 372 +- README.pandora => README-pandora.txt | 32 +- README.Platforms => README-platforms.txt | 64 +- README.Porting => README-porting.txt | 122 +- README.psp => README-psp.txt | 34 +- README.touch => README-touch.txt | 168 +- README.WinCE => README-wince.txt | 18 +- README => README.txt | 78 +- SDL2.spec.in | 2 +- TODO => TODO.txt | 33 +- aclocal.m4 | 9313 ---------------------- autogen.sh | 1 - configure | 2 +- configure.in | 2 +- debian/docs | 6 +- 30 files changed, 1415 insertions(+), 10851 deletions(-) delete mode 100644 .DISABLED-hgeol delete mode 100644 .indent.pro rename BUGS => BUGS.txt (96%) rename COPYING => COPYING.txt (97%) delete mode 100644 CREDITS create mode 100644 CREDITS.txt rename INSTALL => INSTALL.txt (97%) rename README.android => README-android.txt (97%) rename README.cmake => README-cmake.txt (97%) rename README.DirectFB => README-directfb.txt (94%) rename README.gesture => README-gesture.txt (93%) rename README.HG => README-hg.txt (86%) rename README.iOS => README-ios.txt (97%) rename README.MacOSX => README-macosx.txt (97%) rename README.pandora => README-pandora.txt (97%) rename README.Platforms => README-platforms.txt (94%) rename README.Porting => README-porting.txt (96%) rename README.psp => README-psp.txt (89%) rename README.touch => README-touch.txt (97%) rename README.WinCE => README-wince.txt (95%) rename README => README.txt (93%) rename TODO => TODO.txt (79%) delete mode 100644 aclocal.m4 diff --git a/.DISABLED-hgeol b/.DISABLED-hgeol deleted file mode 100644 index b03b4cfb1..000000000 --- a/.DISABLED-hgeol +++ /dev/null @@ -1,57 +0,0 @@ -[patterns] -.hgeol = native -.hgignore = native -BUGS = native -CREDITS = native -INSTALL = native -NOTES = native -TODO = native -WhatsNew = native -**COPYING = native -**README = native -**doxyfile = native -**Doxyfile = native -**install-sh = LF -**mkinstalldirs = LF -**Makefile = LF -**Makefile.* = LF -test/automated/rwops/read = LF -**README.* = native -**.S = native -**.bmp = BIN -**.c = native -**.cc = native -**.cpp = native -**.csh = LF -**.dat = BIN -**.gdbinit = LF -build-scripts/config.guess = LF -**.h = native -**.htm = native -**.html = native -**.icns = BIN -**.in = LF -**.java = native -**.m = native -**.m4 = native -**.mk = LF -**.nib = BIN -**.pch = BIN -**.pdf = BIN -**.pl = native -**.plist = native -**.png = BIN -.indent.pro = LF -**.rc = native -**.rtf = BIN -**.sh = LF -**.sln = native -**.txt = native -**.vcp = native -**.vcproj = native -**.vcw = native -**.vcxproj = native -**.wav = BIN -**.xbm = BIN -**.xml = native -**.zip = BIN diff --git a/.indent.pro b/.indent.pro deleted file mode 100644 index d95d15d95..000000000 --- a/.indent.pro +++ /dev/null @@ -1 +0,0 @@ --i4 -nut -nsc -br -ce -cdw -npcs diff --git a/BUGS b/BUGS.txt similarity index 96% rename from BUGS rename to BUGS.txt index 218bf3d15..77d0e5edf 100644 --- a/BUGS +++ b/BUGS.txt @@ -1,18 +1,17 @@ - -Bugs are now managed in the SDL bug tracker, here: - - http://bugzilla.libsdl.org/ - -You may report bugs there, and search to see if a given issue has already - been reported, discussed, and maybe even fixed. - - - -You may also find help at the SDL mailing list. Subscription information: - - http://lists.libsdl.org/listinfo.cgi/sdl-libsdl.org - -Bug reports are welcome here, but we really appreciate if you use Bugzilla, as - bugs discussed on the mailing list may be forgotten or missed. - - + +Bugs are now managed in the SDL bug tracker, here: + + http://bugzilla.libsdl.org/ + +You may report bugs there, and search to see if a given issue has already + been reported, discussed, and maybe even fixed. + + + +You may also find help at the SDL mailing list. Subscription information: + + http://lists.libsdl.org/listinfo.cgi/sdl-libsdl.org + +Bug reports are welcome here, but we really appreciate if you use Bugzilla, as + bugs discussed on the mailing list may be forgotten or missed. + diff --git a/COPYING b/COPYING.txt similarity index 97% rename from COPYING rename to COPYING.txt index 397e7b45d..391424f79 100644 --- a/COPYING +++ b/COPYING.txt @@ -1,20 +1,20 @@ - -Simple DirectMedia Layer -Copyright (C) 1997-2013 Sam Lantinga - -This software is provided 'as-is', without any express or implied -warranty. In no event will the authors be held liable for any damages -arising from the use of this software. - -Permission is granted to anyone to use this software for any purpose, -including commercial applications, and to alter it and redistribute it -freely, subject to the following restrictions: - -1. The origin of this software must not be misrepresented; you must not - claim that you wrote the original software. If you use this software - in a product, an acknowledgment in the product documentation would be - appreciated but is not required. -2. Altered source versions must be plainly marked as such, and must not be - misrepresented as being the original software. -3. This notice may not be removed or altered from any source distribution. - + +Simple DirectMedia Layer +Copyright (C) 1997-2013 Sam Lantinga + +This software is provided 'as-is', without any express or implied +warranty. In no event will the authors be held liable for any damages +arising from the use of this software. + +Permission is granted to anyone to use this software for any purpose, +including commercial applications, and to alter it and redistribute it +freely, subject to the following restrictions: + +1. The origin of this software must not be misrepresented; you must not + claim that you wrote the original software. If you use this software + in a product, an acknowledgment in the product documentation would be + appreciated but is not required. +2. Altered source versions must be plainly marked as such, and must not be + misrepresented as being the original software. +3. This notice may not be removed or altered from any source distribution. + diff --git a/CREDITS b/CREDITS deleted file mode 100644 index 4bf1f96bf..000000000 --- a/CREDITS +++ /dev/null @@ -1,70 +0,0 @@ - -Simple DirectMedia Layer CREDITS -Thanks to everyone who made this possible, including: - -* Cliff Matthews, for giving me a reason to start this project. :) - -- Executor rocks! *grin* - -* The Linux Fund, C Magazine, Educational Technology Resources Inc., - Gareth Noyce, Jesse Pavel, Keith Kitchin, Jeremy Horvath, Thomas Nicholson, - Hans-Peter Gygax, the Eternal Lands Development Team, Lars Brubaker, - and Phoenix Kokido for financial contributions - -* Edgar "bobbens" Simo for his force feedback API development during the - Google Summer of Code 2008 - -* Aaron Wishnick for his work on audio resampling and pitch shifting during - the Google Summer of Code 2008 - -* Holmes Futrell for port of SDL to the iPhone and iPod Touch during the - Google Summer of Code 2008 - -* Szymon "Wilku" Wilczek for adding support for multiple mice and tablets - during the Google Summer of Code 2008 - -* Marty Leisner, Andrew, Will, Edgar Simo, Donny Viszneki, Andrea Mazzoleni, - Dmytro Bogovych, and Couriersud for helping find SDL 1.3 bugs in the great - SDL Bug Hunt of January 2009! - -* Donny Viszneki for helping fix SDL 1.3 bugs in the great SDL Bug Hunt of - January 2009! - -* Luke Benstead for OpenGL 3.0 support - -* Gatan de Menten for writing the PHP and SQL behind the SDL website - -* Tim Jones for the new look of the SDL website - -* Ryan Gordon for helping everybody out and keeping the dream alive. :) - -* Mattias Engdegrd, for help with the Solaris port and lots of other help - -* Eric Wing, Max Horn, and Darrell Walisser for unflagging work on the Mac OS X port - -* David Carr, for the Pandora port - -* Couriersud for the DirectFB driver - -* Jon Atkins for SDL_image, SDL_mixer and SDL_net documentation - -* Arne Claus, for the 2004 winning SDL logo, - and Shandy Brown, Jac, Alex Lyman, Mikkel Gjoel, #Guy, Jonas Hartmann, - Daniel Liljeberg, Ronald Sowa, DocD, Pekka Jaervinen, Patrick Avella, - Erkki Kontilla, Levon Gavalian, Hal Emerich, David Wiktorsson, - S. Schury and F. Hufsky, Ciska de Ruyver, Shredweat, Tyler Montbriand, - Martin Andersson, Merlyn Wysard, Fernando Ibanez, David Miller, - Andre Bommele, lovesby.com, Francisco Camenforte Torres, and David Igreja - for other logo entries. - -* Bob Pendleton and David Olofson for being long time contributors to - the SDL mailing list. - -* Everybody at Loki Software, Inc. for their great contributions! - - And a big hand to everyone else who gave me appreciation, advice, - and suggestions, especially the good folks on the SDL mailing list. - -THANKS! :) - - -- Sam Lantinga - diff --git a/CREDITS.txt b/CREDITS.txt new file mode 100644 index 000000000..b7d302ab8 --- /dev/null +++ b/CREDITS.txt @@ -0,0 +1,33 @@ + +Simple DirectMedia Layer CREDITS +Thanks to everyone who made this possible, including: + +* Cliff Matthews, for giving me a reason to start this project. :) + -- Executor rocks! *grin* + +* The Linux Fund, C Magazine, Educational Technology Resources Inc., + Gareth Noyce, Jesse Pavel, Keith Kitchin, Jeremy Horvath, Thomas Nicholson, + Hans-Peter Gygax, the Eternal Lands Development Team, Lars Brubaker, + and Phoenix Kokido for financial contributions + +* Edgar "bobbens" Simo for his force feedback API development during the + Google Summer of Code 2008 + +* Aaron Wishnick for his work on audio resampling and pitch shifting during + the Google Summer of Code 2008 + +* Holmes Futrell for port of SDL to the iPhone and iPod Touch during the + Google Summer of Code 2008 + +* Szymon "Wilku" Wilczek for adding support for multiple mice and tablets + during the Google Summer of Code 2008 + +* Marty Leisner, Andrew, Will, Edgar Simo, Donny Viszneki, Andrea Mazzoleni, + Dmytro Bogovych, and Couriersud for helping find SDL 1.3 bugs in the great + SDL Bug Hunt of January 2009! + +* Donny Viszneki for helping fix SDL 1.3 bugs in the great SDL Bug Hunt of + January 2009! + +* Luke Benstead for OpenGL 3.0 support + diff --git a/INSTALL b/INSTALL.txt similarity index 97% rename from INSTALL rename to INSTALL.txt index 66cbfdf76..4492a0763 100644 --- a/INSTALL +++ b/INSTALL.txt @@ -1,27 +1,27 @@ - -To compile and install SDL: - - 0. If you have downloaded this from the website, skip to the next step. - If you have checked this out from subversion, you'll need to run - ./autogen.sh to build the configure script. - - 1. Run './configure; make; make install' - - If you are compiling for Windows using gcc, read the FAQ at: - http://www.libsdl.org/faq.php?action=listentries&category=4#42 - - If you are compiling using Visual C++ on Win32, you should read - the file VisualC.html - - 2. Look at the example programs in ./test, and check out the online - documentation at http://wiki.libsdl.org/ - - 3. Join the SDL developer mailing list by sending E-mail to - sdl-request@libsdl.org - and put "subscribe" in the subject of the message. - - Or alternatively you can use the web interface: - http://www.libsdl.org/mailing-list.php - -That's it! -Sam Lantinga + +To compile and install SDL: + + 0. If you have downloaded this from the website, skip to the next step. + If you have checked this out from subversion, you'll need to run + ./autogen.sh to build the configure script. + + 1. Run './configure; make; make install' + + If you are compiling for Windows using gcc, read the FAQ at: + http://www.libsdl.org/faq.php?action=listentries&category=4#42 + + If you are compiling using Visual C++ on Win32, you should read + the file VisualC.html + + 2. Look at the example programs in ./test, and check out the online + documentation at http://wiki.libsdl.org/ + + 3. Join the SDL developer mailing list by sending E-mail to + sdl-request@libsdl.org + and put "subscribe" in the subject of the message. + + Or alternatively you can use the web interface: + http://www.libsdl.org/mailing-list.php + +That's it! +Sam Lantinga diff --git a/Makefile.in b/Makefile.in index dda6692e1..5793bc7bb 100644 --- a/Makefile.in +++ b/Makefile.in @@ -39,7 +39,7 @@ SDLMAIN_OBJECTS = @SDLMAIN_OBJECTS@ SDLTEST_TARGET = libSDL2_test.a SDLTEST_OBJECTS = @SDLTEST_OBJECTS@ -SRC_DIST = acinclude Android.mk autogen.sh BUGS build-scripts configure configure.in COPYING CREDITS debian include INSTALL Makefile.minimal Makefile.in README* sdl2-config.in sdl2.m4 sdl2.pc.in SDL2.spec.in src test TODO VisualC.html VisualC WhatsNew Xcode Xcode-iOS +SRC_DIST = *.txt acinclude Android.mk autogen.sh android-project build-scripts cmake configure configure.in debian include Makefile.* sdl2-config.in sdl2.m4 sdl2.pc.in SDL2.spec.in src test VisualC.html VisualC WhatsNew Xcode Xcode-iOS GEN_DIST = SDL2.spec HDRS = \ @@ -47,7 +47,7 @@ HDRS = \ SDL_assert.h \ SDL_atomic.h \ SDL_audio.h \ - SDL_bits.h \ + SDL_bits.h \ SDL_blendmode.h \ SDL_clipboard.h \ SDL_cpuinfo.h \ @@ -216,26 +216,3 @@ dist $(distfile): rpm: $(distfile) rpmbuild -ta $? - -# Run indent on the source to standardize coding style -indent: - @echo "Running indent... modified files:" - @cd $(srcdir) && \ - find . \( \ - -name '*.h' -o \ - -name '*.c' -o \ - -name '*.cc' \) \ - -print | fgrep -v ./Xcode | \ - while read file; do \ - indent "$$file" -o "$$file.indent"; \ - if cmp "$$file" "$$file.indent" >/dev/null; then \ - rm -f "$$file.indent"; \ - else \ - echo "$$file"; \ - mv -f "$$file.indent" "$$file"; \ - fi; \ - done - -# Run indent and then commit modified files -commit: indent - hg commit diff --git a/README-SDL.txt b/README-SDL.txt index fade0b958..0630395e5 100644 --- a/README-SDL.txt +++ b/README-SDL.txt @@ -1,13 +1,13 @@ - -Please distribute this file with the SDL runtime environment: - -The Simple DirectMedia Layer (SDL for short) is a cross-platform library -designed to make it easy to write multi-media software, such as games and -emulators. - -The Simple DirectMedia Layer library source code is available from: -http://www.libsdl.org/ - -This library is distributed under the terms of the zlib license: -http://www.zlib.net/zlib_license.html - + +Please distribute this file with the SDL runtime environment: + +The Simple DirectMedia Layer (SDL for short) is a cross-platform library +designed to make it easy to write multi-media software, such as games and +emulators. + +The Simple DirectMedia Layer library source code is available from: +http://www.libsdl.org/ + +This library is distributed under the terms of the zlib license: +http://www.zlib.net/zlib_license.html + diff --git a/README.android b/README-android.txt similarity index 97% rename from README.android rename to README-android.txt index 1cebe15ba..a9da30085 100644 --- a/README.android +++ b/README-android.txt @@ -1,384 +1,384 @@ -================================================================================ -Simple DirectMedia Layer for Android -================================================================================ - -Requirements: - -Android SDK (version 10 or later) -http://developer.android.com/sdk/index.html - -Android NDK r7 or later -http://developer.android.com/sdk/ndk/index.html - -Minimum API level supported by SDL: 10 (Android 2.3.3) - -================================================================================ - How the port works -================================================================================ - -- Android applications are Java-based, optionally with parts written in C -- As SDL apps are C-based, we use a small Java shim that uses JNI to talk to -the SDL library -- This means that your application C code must be placed inside an Android -Java project, along with some C support code that communicates with Java -- This eventually produces a standard Android .apk package - -The Android Java code implements an "Activity" and can be found in: -android-project/src/org/libsdl/app/SDLActivity.java - -The Java code loads your game code, the SDL shared library, and -dispatches to native functions implemented in the SDL library: -src/SDL_android.cpp - -Your project must include some glue code that starts your main() routine: -src/main/android/SDL_android_main.cpp - - -================================================================================ - Building an app -================================================================================ - -Instructions: -1. Copy the android-project directory wherever you want to keep your projects - and rename it to the name of your project. -2. Move or symlink this SDL directory into the /jni directory -3. Edit /jni/src/Android.mk to include your source files -4. Run 'ndk-build' (a script provided by the NDK). This compiles the C source - -If you want to use the Eclipse IDE, skip to the Eclipse section below. - -5. Create /local.properties and use that to point to the Android SDK directory, by writing a line with the following form: -sdk.dir=PATH_TO_ANDROID_SDK -6. Run 'ant debug' in android/project. This compiles the .java and eventually - creates a .apk with the native code embedded -7. 'ant debug install' will push the apk to the device or emulator (if connected) - -Here's an explanation of the files in the Android project, so you can customize them: - -android-project/ - AndroidManifest.xml - package manifest. Among others, it contains the class name - of the main Activity and the package name of the application. - build.properties - empty - build.xml - build description file, used by ant. The actual application name - is specified here. - default.properties - holds the target ABI for the application, android-10 and up - project.properties - holds the target ABI for the application, android-10 and up - local.properties - holds the SDK path, you should change this to the path to your SDK - jni/ - directory holding native code - jni/Android.mk - Android makefile that can call recursively the Android.mk files - in all subdirectories - jni/SDL/ - (symlink to) directory holding the SDL library files - jni/SDL/Android.mk - Android makefile for creating the SDL shared library - jni/src/ - directory holding your C/C++ source - jni/src/Android.mk - Android makefile that you should customize to include your - source code and any library references - res/ - directory holding resources for your application - res/drawable-* - directories holding icons for different phone hardware. Could be - one dir called "drawable". - res/layout/main.xml - Usually contains a file main.xml, which declares the screen layout. - We don't need it because we use the SDL video output. - res/values/strings.xml - strings used in your application, including the application name - shown on the phone. - src/org/libsdl/app/SDLActivity.java - the Java class handling the initialization and binding - to SDL. Be very careful changing this, as the SDL library relies - on this implementation. - - -================================================================================ - Customizing your application name -================================================================================ - -To customize your application name, edit AndroidManifest.xml and replace -"org.libsdl.app" with an identifier for your product package. - -Then create a Java class extending SDLActivity and place it in a directory -under src matching your package, e.g. - src/com/gamemaker/game/MyGame.java - -Here's an example of a minimal class file: ---- MyGame.java -------------------------- -package com.gamemaker.game; - -import org.libsdl.app.SDLActivity; - -/* - * A sample wrapper class that just calls SDLActivity - */ - -public class MyGame extends SDLActivity { } - ------------------------------------------- - -Then replace "SDLActivity" in AndroidManifest.xml with the name of your -class, .e.g. "MyGame" - -================================================================================ - Customizing your application icon -================================================================================ - -Conceptually changing your icon is just replacing the "ic_launcher.png" files in -the drawable directories under the res directory. There are four directories for -different screen sizes. These can be replaced with one dir called "drawable", -containing an icon file "ic_launcher.png" with dimensions 48x48 or 72x72. - -You may need to change the name of your icon in AndroidManifest.xml to match -this icon filename. - -================================================================================ - Loading assets -================================================================================ - -Any files you put in the "assets" directory of your android-project directory -will get bundled into the application package and you can load them using the -standard functions in SDL_rwops.h. - -There are also a few Android specific functions that allow you to get other -useful paths for saving and loading data: -SDL_AndroidGetInternalStoragePath() -SDL_AndroidGetExternalStorageState() -SDL_AndroidGetExternalStoragePath() - -See SDL_system.h for more details on these functions. - -The asset packaging system will, by default, compress certain file extensions. -SDL includes two asset file access mechanisms, the preferred one is the so -called "File Descriptor" method, which is faster and doesn't involve the Dalvik -GC, but given this method does not work on compressed assets, there is also the -"Input Stream" method, which is automatically used as a fall back by SDL. You -may want to keep this fact in mind when building your APK, specially when large -files are involved. -For more information on which extensions get compressed by default and how to -disable this behaviour, see for example: - -http://ponystyle.com/blog/2010/03/26/dealing-with-asset-compression-in-android-apps/ - -================================================================================ - Pause / Resume behaviour -================================================================================ - -If SDL is compiled with SDL_ANDROID_BLOCK_ON_PAUSE defined (the default), -the event loop will block itself when the app is paused (ie, when the user -returns to the main Android dashboard). Blocking is better in terms of battery -use, and it allows your app to spring back to life instantaneously after resume -(versus polling for a resume message). - -Upon resume, SDL will attempt to restore the GL context automatically. -In modern devices (Android 3.0 and up) this will most likely succeed and your -app can continue to operate as it was. - -However, there's a chance (on older hardware, or on systems under heavy load), -where the GL context can not be restored. In that case you have to listen for -a specific message, (which is not yet implemented!) and restore your textures -manually or quit the app (which is actually the kind of behaviour you'll see -under iOS, if the OS can not restore your GL context it will just kill your app) - -================================================================================ - Threads and the Java VM -================================================================================ - -For a quick tour on how Linux native threads interoperate with the Java VM, take -a look here: http://developer.android.com/guide/practices/jni.html -If you want to use threads in your SDL app, it's strongly recommended that you -do so by creating them using SDL functions. This way, the required attach/detach -handling is managed by SDL automagically. If you have threads created by other -means and they make calls to SDL functions, make sure that you call -Android_JNI_SetupThread before doing anything else otherwise SDL will attach -your thread automatically anyway (when you make an SDL call), but it'll never -detach it. - -================================================================================ - Using STL -================================================================================ - -You can use STL in your project by creating an Application.mk file in the jni -folder and adding the following line: -APP_STL := stlport_static - -For more information check out CPLUSPLUS-SUPPORT.html in the NDK documentation. - -================================================================================ - Additional documentation -================================================================================ - -The documentation in the NDK docs directory is very helpful in understanding the -build process and how to work with native code on the Android platform. - -The best place to start is with docs/OVERVIEW.TXT - - -================================================================================ - Using Eclipse -================================================================================ - -First make sure that you've installed Eclipse and the Android extensions as described here: - http://developer.android.com/sdk/eclipse-adt.html - -Once you've copied the SDL android project and customized it, you can create an Eclipse project from it: - * File -> New -> Other - * Select the Android -> Android Project wizard and click Next - * Enter the name you'd like your project to have - * Select "Create project from existing source" and browse for your project directory - * Make sure the Build Target is set to Android 2.0 - * Click Finish - - -================================================================================ - Using the emulator -================================================================================ - -There are some good tips and tricks for getting the most out of the -emulator here: http://developer.android.com/tools/devices/emulator.html - -Especially useful is the info on setting up OpenGL ES 2.0 emulation. - -Notice that this software emulator is incredibly slow and needs a lot of disk space. -Using a real device works better. - -================================================================================ - Troubleshooting -================================================================================ - -You can create and run an emulator from the Eclipse IDE: - * Window -> Android SDK and AVD Manager - -You can see if adb can see any devices with the following command: - adb devices - -You can see the output of log messages on the default device with: - adb logcat - -You can push files to the device with: - adb push local_file remote_path_and_file - -You can push files to the SD Card at /sdcard, for example: - adb push moose.dat /sdcard/moose.dat - -You can see the files on the SD card with a shell command: - adb shell ls /sdcard/ - -You can start a command shell on the default device with: - adb shell - -You can remove the library files of your project (and not the SDL lib files) with: - ndk-build clean - -You can do a build with the following command: - ndk-build - -You can see the complete command line that ndk-build is using by passing V=1 on the command line: - ndk-build V=1 - -If your application crashes in native code, you can use addr2line to convert the -addresses in the stack trace to lines in your code. - -For example, if your crash looks like this: -I/DEBUG ( 31): signal 11 (SIGSEGV), code 2 (SEGV_ACCERR), fault addr 400085d0 -I/DEBUG ( 31): r0 00000000 r1 00001000 r2 00000003 r3 400085d4 -I/DEBUG ( 31): r4 400085d0 r5 40008000 r6 afd41504 r7 436c6a7c -I/DEBUG ( 31): r8 436c6b30 r9 435c6fb0 10 435c6f9c fp 4168d82c -I/DEBUG ( 31): ip 8346aff0 sp 436c6a60 lr afd1c8ff pc afd1c902 cpsr 60000030 -I/DEBUG ( 31): #00 pc 0001c902 /system/lib/libc.so -I/DEBUG ( 31): #01 pc 0001ccf6 /system/lib/libc.so -I/DEBUG ( 31): #02 pc 000014bc /data/data/org.libsdl.app/lib/libmain.so -I/DEBUG ( 31): #03 pc 00001506 /data/data/org.libsdl.app/lib/libmain.so - -You can see that there's a crash in the C library being called from the main code. -I run addr2line with the debug version of my code: - arm-eabi-addr2line -C -f -e obj/local/armeabi/libmain.so -and then paste in the number after "pc" in the call stack, from the line that I care about: -000014bc - -I get output from addr2line showing that it's in the quit function, in testspriteminimal.c, on line 23. - -You can add logging to your code to help show what's happening: - -#include - - __android_log_print(ANDROID_LOG_INFO, "foo", "Something happened! x = %d", x); - -If you need to build without optimization turned on, you can create a file called -"Application.mk" in the jni directory, with the following line in it: -APP_OPTIM := debug - - -================================================================================ - Memory debugging -================================================================================ - -The best (and slowest) way to debug memory issues on Android is valgrind. -Valgrind has support for Android out of the box, just grab code using: - svn co svn://svn.valgrind.org/valgrind/trunk valgrind -... and follow the instructions in the file README.android to build it. - -One thing I needed to do on Mac OS X was change the path to the toolchain, -and add ranlib to the environment variables: -export RANLIB=$NDKROOT/toolchains/arm-linux-androideabi-4.4.3/prebuilt/darwin-x86/bin/arm-linux-androideabi-ranlib - -Once valgrind is built, you can create a wrapper script to launch your -application with it, changing org.libsdl.app to your package identifier: ---- start_valgrind_app ------------------- -#!/system/bin/sh -export TMPDIR=/data/data/org.libsdl.app -exec /data/local/Inst/bin/valgrind --log-file=/sdcard/valgrind.log --error-limit=no $* ------------------------------------------- - -Then push it to the device: - adb push start_valgrind_app /data/local - -and make it executable: - adb shell chmod 755 /data/local/start_valgrind_app - -and tell Android to use the script to launch your application: - adb shell setprop wrap.org.libsdl.app "logwrapper /data/local/start_valgrind_app" - -If the setprop command says "could not set property", it's likely that -your package name is too long and you should make it shorter by changing -AndroidManifest.xml and the path to your class file in android-project/src - -You can then launch your application normally and waaaaaaaiiittt for it. -You can monitor the startup process with the logcat command above, and -when it's done (or even while it's running) you can grab the valgrind -output file: - adb pull /sdcard/valgrind.log - -When you're done instrumenting with valgrind, you can disable the wrapper: - adb shell setprop wrap.org.libsdl.app "" - -================================================================================ - Why is API level 10 the minimum required? -================================================================================ - -API level 10 is required because SDL requires some functionality for running not -available on older devices and some for building which is not in older NDK/SDKs. - -Support for native OpenGL ES and ES2 applications was introduced in the NDK for -API level 4 and 8. EGL was made a stable API in the NDK for API level 9, which -has since then been obsoleted, with the recommendation to developers to bump the -required API level to 10. -As of this writing, according to http://developer.android.com/about/dashboards/index.html -about 90% of the Android devices accessing Google Play support API level 10 or -higher (March 2013). - -================================================================================ - A note regarding the use of the "dirty rectangles" rendering technique -================================================================================ - -If your app uses a variation of the "dirty rectangles" rendering technique, -where you only update a portion of the screen on each frame, you may notice a -variety of visual glitches on Android, that are not present on other platforms. -This is caused by SDL's use of EGL as the support system to handle OpenGL ES/ES2 -contexts, in particular the use of the eglSwapBuffers function. As stated in the -documentation for the function "The contents of ancillary buffers are always -undefined after calling eglSwapBuffers". -Setting the EGL_SWAP_BEHAVIOR attribute of the surface to EGL_BUFFER_PRESERVED -is not possible for SDL as it requires EGL 1.4, available only on the API level -17+, so the only workaround available on this platform is to redraw the entire -screen each frame. - -Reference: http://www.khronos.org/registry/egl/specs/EGLTechNote0001.html - -================================================================================ - Known issues -================================================================================ - -- TODO. I'm sure there's a bunch more stuff I haven't thought of +================================================================================ +Simple DirectMedia Layer for Android +================================================================================ + +Requirements: + +Android SDK (version 10 or later) +http://developer.android.com/sdk/index.html + +Android NDK r7 or later +http://developer.android.com/sdk/ndk/index.html + +inimum API level supported by SDL: 10 (Android 2.3.3) + +================================================================================ + How the port works +================================================================================ + +- Android applications are Java-based, optionally with parts written in C +- As SDL apps are C-based, we use a small Java shim that uses JNI to talk to +the SDL library +- This means that your application C code must be placed inside an Android +Java project, along with some C support code that communicates with Java +- This eventually produces a standard Android .apk package + +The Android Java code implements an "Activity" and can be found in: +android-project/src/org/libsdl/app/SDLActivity.java + +The Java code loads your game code, the SDL shared library, and +dispatches to native functions implemented in the SDL library: +src/SDL_android.cpp + +Your project must include some glue code that starts your main() routine: +src/main/android/SDL_android_main.cpp + + +================================================================================ + Building an app +================================================================================ + +Instructions: +1. Copy the android-project directory wherever you want to keep your projects + and rename it to the name of your project. +2. Move or symlink this SDL directory into the /jni directory +3. Edit /jni/src/Android.mk to include your source files +4. Run 'ndk-build' (a script provided by the NDK). This compiles the C source + +If you want to use the Eclipse IDE, skip to the Eclipse section below. + +5. Create /local.properties and use that to point to the Android SDK directory, by writing a line with the following form: +sdk.dir=PATH_TO_ANDROID_SDK +6. Run 'ant debug' in android/project. This compiles the .java and eventually + creates a .apk with the native code embedded +7. 'ant debug install' will push the apk to the device or emulator (if connected) + +Here's an explanation of the files in the Android project, so you can customize them: + +android-project/ + AndroidManifest.xml - package manifest. Among others, it contains the class name + of the main Activity and the package name of the application. + build.properties - empty + build.xml - build description file, used by ant. The actual application name + is specified here. + default.properties - holds the target ABI for the application, android-10 and up + project.properties - holds the target ABI for the application, android-10 and up + local.properties - holds the SDK path, you should change this to the path to your SDK + jni/ - directory holding native code + jni/Android.mk - Android makefile that can call recursively the Android.mk files + in all subdirectories + jni/SDL/ - (symlink to) directory holding the SDL library files + jni/SDL/Android.mk - Android makefile for creating the SDL shared library + jni/src/ - directory holding your C/C++ source + jni/src/Android.mk - Android makefile that you should customize to include your + source code and any library references + res/ - directory holding resources for your application + res/drawable-* - directories holding icons for different phone hardware. Could be + one dir called "drawable". + res/layout/main.xml - Usually contains a file main.xml, which declares the screen layout. + We don't need it because we use the SDL video output. + res/values/strings.xml - strings used in your application, including the application name + shown on the phone. + src/org/libsdl/app/SDLActivity.java - the Java class handling the initialization and binding + to SDL. Be very careful changing this, as the SDL library relies + on this implementation. + + +================================================================================ + Customizing your application name +================================================================================ + +To customize your application name, edit AndroidManifest.xml and replace +"org.libsdl.app" with an identifier for your product package. + +Then create a Java class extending SDLActivity and place it in a directory +under src matching your package, e.g. + src/com/gamemaker/game/MyGame.java + +Here's an example of a minimal class file: +--- MyGame.java -------------------------- +package com.gamemaker.game; + +import org.libsdl.app.SDLActivity; + +/* + * A sample wrapper class that just calls SDLActivity + */ + +public class MyGame extends SDLActivity { } + +------------------------------------------ + +Then replace "SDLActivity" in AndroidManifest.xml with the name of your +class, .e.g. "MyGame" + +================================================================================ + Customizing your application icon +================================================================================ + +Conceptually changing your icon is just replacing the "ic_launcher.png" files in +the drawable directories under the res directory. There are four directories for +different screen sizes. These can be replaced with one dir called "drawable", +containing an icon file "ic_launcher.png" with dimensions 48x48 or 72x72. + +You may need to change the name of your icon in AndroidManifest.xml to match +this icon filename. + +================================================================================ + Loading assets +================================================================================ + +Any files you put in the "assets" directory of your android-project directory +will get bundled into the application package and you can load them using the +standard functions in SDL_rwops.h. + +There are also a few Android specific functions that allow you to get other +useful paths for saving and loading data: +SDL_AndroidGetInternalStoragePath() +SDL_AndroidGetExternalStorageState() +SDL_AndroidGetExternalStoragePath() + +See SDL_system.h for more details on these functions. + +The asset packaging system will, by default, compress certain file extensions. +SDL includes two asset file access mechanisms, the preferred one is the so +called "File Descriptor" method, which is faster and doesn't involve the Dalvik +GC, but given this method does not work on compressed assets, there is also the +"Input Stream" method, which is automatically used as a fall back by SDL. You +may want to keep this fact in mind when building your APK, specially when large +files are involved. +For more information on which extensions get compressed by default and how to +disable this behaviour, see for example: + +http://ponystyle.com/blog/2010/03/26/dealing-with-asset-compression-in-android-apps/ + +================================================================================ + Pause / Resume behaviour +================================================================================ + +If SDL is compiled with SDL_ANDROID_BLOCK_ON_PAUSE defined (the default), +the event loop will block itself when the app is paused (ie, when the user +returns to the main Android dashboard). Blocking is better in terms of battery +use, and it allows your app to spring back to life instantaneously after resume +(versus polling for a resume message). + +Upon resume, SDL will attempt to restore the GL context automatically. +In modern devices (Android 3.0 and up) this will most likely succeed and your +app can continue to operate as it was. + +However, there's a chance (on older hardware, or on systems under heavy load), +where the GL context can not be restored. In that case you have to listen for +a specific message, (which is not yet implemented!) and restore your textures +manually or quit the app (which is actually the kind of behaviour you'll see +under iOS, if the OS can not restore your GL context it will just kill your app) + +================================================================================ + Threads and the Java VM +================================================================================ + +For a quick tour on how Linux native threads interoperate with the Java VM, take +a look here: http://developer.android.com/guide/practices/jni.html +If you want to use threads in your SDL app, it's strongly recommended that you +do so by creating them using SDL functions. This way, the required attach/detach +handling is managed by SDL automagically. If you have threads created by other +means and they make calls to SDL functions, make sure that you call +Android_JNI_SetupThread before doing anything else otherwise SDL will attach +your thread automatically anyway (when you make an SDL call), but it'll never +detach it. + +================================================================================ + Using STL +================================================================================ + +You can use STL in your project by creating an Application.mk file in the jni +folder and adding the following line: +APP_STL := stlport_static + +For more information check out CPLUSPLUS-SUPPORT.html in the NDK documentation. + +================================================================================ + Additional documentation +================================================================================ + +The documentation in the NDK docs directory is very helpful in understanding the +build process and how to work with native code on the Android platform. + +The best place to start is with docs/OVERVIEW.TXT + + +================================================================================ + Using Eclipse +================================================================================ + +First make sure that you've installed Eclipse and the Android extensions as described here: + http://developer.android.com/sdk/eclipse-adt.html + +Once you've copied the SDL android project and customized it, you can create an Eclipse project from it: + * File -> New -> Other + * Select the Android -> Android Project wizard and click Next + * Enter the name you'd like your project to have + * Select "Create project from existing source" and browse for your project directory + * Make sure the Build Target is set to Android 2.0 + * Click Finish + + +================================================================================ + Using the emulator +================================================================================ + +There are some good tips and tricks for getting the most out of the +emulator here: http://developer.android.com/tools/devices/emulator.html + +Especially useful is the info on setting up OpenGL ES 2.0 emulation. + +Notice that this software emulator is incredibly slow and needs a lot of disk space. +Using a real device works better. + +================================================================================ + Troubleshooting +================================================================================ + +You can create and run an emulator from the Eclipse IDE: + * Window -> Android SDK and AVD Manager + +You can see if adb can see any devices with the following command: + adb devices + +You can see the output of log messages on the default device with: + adb logcat + +You can push files to the device with: + adb push local_file remote_path_and_file + +You can push files to the SD Card at /sdcard, for example: + adb push moose.dat /sdcard/moose.dat + +You can see the files on the SD card with a shell command: + adb shell ls /sdcard/ + +You can start a command shell on the default device with: + adb shell + +You can remove the library files of your project (and not the SDL lib files) with: + ndk-build clean + +You can do a build with the following command: + ndk-build + +You can see the complete command line that ndk-build is using by passing V=1 on the command line: + ndk-build V=1 + +If your application crashes in native code, you can use addr2line to convert the +addresses in the stack trace to lines in your code. + +For example, if your crash looks like this: +I/DEBUG ( 31): signal 11 (SIGSEGV), code 2 (SEGV_ACCERR), fault addr 400085d0 +I/DEBUG ( 31): r0 00000000 r1 00001000 r2 00000003 r3 400085d4 +I/DEBUG ( 31): r4 400085d0 r5 40008000 r6 afd41504 r7 436c6a7c +I/DEBUG ( 31): r8 436c6b30 r9 435c6fb0 10 435c6f9c fp 4168d82c +I/DEBUG ( 31): ip 8346aff0 sp 436c6a60 lr afd1c8ff pc afd1c902 cpsr 60000030 +I/DEBUG ( 31): #00 pc 0001c902 /system/lib/libc.so +I/DEBUG ( 31): #01 pc 0001ccf6 /system/lib/libc.so +I/DEBUG ( 31): #02 pc 000014bc /data/data/org.libsdl.app/lib/libmain.so +I/DEBUG ( 31): #03 pc 00001506 /data/data/org.libsdl.app/lib/libmain.so + +You can see that there's a crash in the C library being called from the main code. +I run addr2line with the debug version of my code: + arm-eabi-addr2line -C -f -e obj/local/armeabi/libmain.so +and then paste in the number after "pc" in the call stack, from the line that I care about: +000014bc + +I get output from addr2line showing that it's in the quit function, in testspriteminimal.c, on line 23. + +You can add logging to your code to help show what's happening: + +#include + + __android_log_print(ANDROID_LOG_INFO, "foo", "Something happened! x = %d", x); + +If you need to build without optimization turned on, you can create a file called +"Application.mk" in the jni directory, with the following line in it: +APP_OPTIM := debug + + +================================================================================ + Memory debugging +================================================================================ + +The best (and slowest) way to debug memory issues on Android is valgrind. +Valgrind has support for Android out of the box, just grab code using: + svn co svn://svn.valgrind.org/valgrind/trunk valgrind +... and follow the instructions in the file README.android to build it. + +One thing I needed to do on Mac OS X was change the path to the toolchain, +and add ranlib to the environment variables: +export RANLIB=$NDKROOT/toolchains/arm-linux-androideabi-4.4.3/prebuilt/darwin-x86/bin/arm-linux-androideabi-ranlib + +Once valgrind is built, you can create a wrapper script to launch your +application with it, changing org.libsdl.app to your package identifier: +--- start_valgrind_app ------------------- +#!/system/bin/sh +export TMPDIR=/data/data/org.libsdl.app +exec /data/local/Inst/bin/valgrind --log-file=/sdcard/valgrind.log --error-limit=no $* +------------------------------------------ + +Then push it to the device: + adb push start_valgrind_app /data/local + +and make it executable: + adb shell chmod 755 /data/local/start_valgrind_app + +and tell Android to use the script to launch your application: + adb shell setprop wrap.org.libsdl.app "logwrapper /data/local/start_valgrind_app" + +If the setprop command says "could not set property", it's likely that +your package name is too long and you should make it shorter by changing +AndroidManifest.xml and the path to your class file in android-project/src + +You can then launch your application normally and waaaaaaaiiittt for it. +You can monitor the startup process with the logcat command above, and +when it's done (or even while it's running) you can grab the valgrind +output file: + adb pull /sdcard/valgrind.log + +When you're done instrumenting with valgrind, you can disable the wrapper: + adb shell setprop wrap.org.libsdl.app "" + +================================================================================ + Why is API level 10 the minimum required? +================================================================================ + +API level 10 is required because SDL requires some functionality for running not +available on older devices and some for building which is not in older NDK/SDKs. + +Support for native OpenGL ES and ES2 applications was introduced in the NDK for +API level 4 and 8. EGL was made a stable API in the NDK for API level 9, which +has since then been obsoleted, with the recommendation to developers to bump the +required API level to 10. +As of this writing, according to http://developer.android.com/about/dashboards/index.html +about 90% of the Android devices accessing Google Play support API level 10 or +higher (March 2013). + +================================================================================ + A note regarding the use of the "dirty rectangles" rendering technique +================================================================================ + +If your app uses a variation of the "dirty rectangles" rendering technique, +where you only update a portion of the screen on each frame, you may notice a +variety of visual glitches on Android, that are not present on other platforms. +This is caused by SDL's use of EGL as the support system to handle OpenGL ES/ES2 +contexts, in particular the use of the eglSwapBuffers function. As stated in the +documentation for the function "The contents of ancillary buffers are always +undefined after calling eglSwapBuffers". +Setting the EGL_SWAP_BEHAVIOR attribute of the surface to EGL_BUFFER_PRESERVED +is not possible for SDL as it requires EGL 1.4, available only on the API level +17+, so the only workaround available on this platform is to redraw the entire +screen each frame. + +Reference: http://www.khronos.org/registry/egl/specs/EGLTechNote0001.html + +================================================================================ + Known issues +================================================================================ + +- TODO. I'm sure there's a bunch more stuff I haven't thought of diff --git a/README.cmake b/README-cmake.txt similarity index 97% rename from README.cmake rename to README-cmake.txt index 7f5ac80dd..63c762b53 100644 --- a/README.cmake +++ b/README-cmake.txt @@ -1,31 +1,31 @@ -================================================================================ -CMake build system for SDL (www.cmake.org) -================================================================================ - -SDL's build system was traditionally based on autotools. Over time, this -approach has suffered from several issues across the different supported -platforms. -To solve these problems, a new build system based on CMake is under development. -It works in parallel to the legacy system, so users can experiment with it -without complication. -While still experimental, the build system should be usable on the following -platforms: - - * FreeBSD - * Linux - * VS.NET 2010 - * MinGW and Msys - * OS X with support for XCode - -================================================================================ -Usage -================================================================================ - -Assuming the source for SDL is located at ~/sdl - -cd ~ -mkdir build -cd build -cmake ../sdl - -This will build the static and dynamic versions of SDL in the ~/build directory. +================================================================================ +CMake build system for SDL (www.cmake.org) +================================================================================ + +SDL's build system was traditionally based on autotools. Over time, this +approach has suffered from several issues across the different supported +platforms. +To solve these problems, a new build system based on CMake is under development. +It works in parallel to the legacy system, so users can experiment with it +without complication. +While still experimental, the build system should be usable on the following +platforms: + + * FreeBSD + * Linux + * VS.NET 2010 + * MinGW and Msys + * OS X with support for XCode + +================================================================================ +Usage +================================================================================ + +Assuming the source for SDL is located at ~/sdl + +cd ~ +mkdir build +cd build +cmake ../sdl + +This will build the static and dynamic versions of SDL in the ~/build directory. diff --git a/README.DirectFB b/README-directfb.txt similarity index 94% rename from README.DirectFB rename to README-directfb.txt index 9c16a7b67..b284775fc 100644 --- a/README.DirectFB +++ b/README-directfb.txt @@ -1,106 +1,106 @@ -SDL on DirectFB - -Supports: - -- Hardware YUV overlays -- OpenGL - software only -- 2D/3D accelerations (depends on directfb driver) -- multiple displays -- windows - -What you need: - -DirectFB 1.0.1, 1.2.x, 1.3.0 -Kernel-Framebuffer support: required: vesafb, radeonfb .... -Mesa 7.0.x - optional for OpenGL - -/etc/directfbrc - -This file should contain the following lines to make -your joystick work and avoid crashes: ------------------------- -disable-module=joystick -disable-module=cle266 -disable-module=cyber5k -no-linux-input-grab ------------------------- - -To disable to use x11 backend when DISPLAY variable is found use - -export SDL_DIRECTFB_X11_CHECK=0 - -To disable the use of linux input devices, i.e. multimice/multikeyboard support, -use - -export SDL_DIRECTFB_LINUX_INPUT=0 - -To use hardware accelerated YUV-overlays for YUV-textures, use: - -export SDL_DIRECTFB_YUV_DIRECT=1 - -This is disabled by default. It will only support one -YUV texture, namely the first. Every other YUV texture will be -rendered in software. - -In addition, you may use (directfb-1.2.x) - -export SDL_DIRECTFB_YUV_UNDERLAY=1 - -to make the YUV texture an underlay. This will make the cursor to -be shown. - -Simple Window Manager -===================== - -The driver has support for a very, very basic window manager you may -want to use when running with "wm=default". Use - -export SDL_DIRECTFB_WM=1 - -to enable basic window borders. In order to have the window title rendered, -you need to have the following font installed: - -/usr/share/fonts/truetype/freefont/FreeSans.ttf - -OpenGL Support -============== - -The following instructions will give you *software* OpenGL. However this -works at least on all directfb supported platforms. - -As of this writing 20100802 you need to pull Mesa from git and do the following: - ------------------------- -git clone git://anongit.freedesktop.org/git/mesa/mesa -cd mesa -git checkout 2c9fdaf7292423c157fc79b5ce43f0f199dd753a ------------------------- - -Edit configs/linux-directfb so that the Directories-section looks like ------------------------- -# Directories -SRC_DIRS = mesa glu -GLU_DIRS = sgi -DRIVER_DIRS = directfb -PROGRAM_DIRS = ------------------------- - -make linux-directfb -make - -echo Installing - please enter sudo pw. - -sudo make install INSTALL_DIR=/usr/local/dfb_GL -cd src/mesa/drivers/directfb -make -sudo make install INSTALL_DIR=/usr/local/dfb_GL ------------------------- - -To run the SDL - testprograms: - -export SDL_VIDEODRIVER=directfb -export LD_LIBRARY_PATH=/usr/local/dfb_GL/lib -export LD_PRELOAD=/usr/local/dfb_GL/libGL.so.7 - -./testgl - +SDL on DirectFB + +Supports: + +- Hardware YUV overlays +- OpenGL - software only +- 2D/3D accelerations (depends on directfb driver) +- multiple displays +- windows + +What you need: + +DirectFB 1.0.1, 1.2.x, 1.3.0 +Kernel-Framebuffer support: required: vesafb, radeonfb .... +esa 7.0.x - optional for OpenGL + +/etc/directfbrc + +This file should contain the following lines to make +your joystick work and avoid crashes: +------------------------ +disable-module=joystick +disable-module=cle266 +disable-module=cyber5k +no-linux-input-grab +------------------------ + +To disable to use x11 backend when DISPLAY variable is found use + +export SDL_DIRECTFB_X11_CHECK=0 + +To disable the use of linux input devices, i.e. multimice/multikeyboard support, +use + +export SDL_DIRECTFB_LINUX_INPUT=0 + +To use hardware accelerated YUV-overlays for YUV-textures, use: + +export SDL_DIRECTFB_YUV_DIRECT=1 + +This is disabled by default. It will only support one +YUV texture, namely the first. Every other YUV texture will be +rendered in software. + +In addition, you may use (directfb-1.2.x) + +export SDL_DIRECTFB_YUV_UNDERLAY=1 + +to make the YUV texture an underlay. This will make the cursor to +be shown. + +Simple Window Manager +===================== + +The driver has support for a very, very basic window manager you may +want to use when running with "wm=default". Use + +export SDL_DIRECTFB_WM=1 + +to enable basic window borders. In order to have the window title rendered, +you need to have the following font installed: + +/usr/share/fonts/truetype/freefont/FreeSans.ttf + +OpenGL Support +============== + +The following instructions will give you *software* OpenGL. However this +works at least on all directfb supported platforms. + +As of this writing 20100802 you need to pull Mesa from git and do the following: + +------------------------ +git clone git://anongit.freedesktop.org/git/mesa/mesa +cd mesa +git checkout 2c9fdaf7292423c157fc79b5ce43f0f199dd753a +------------------------ + +Edit configs/linux-directfb so that the Directories-section looks like +------------------------ +# Directories +SRC_DIRS = mesa glu +GLU_DIRS = sgi +DRIVER_DIRS = directfb +PROGRAM_DIRS = +------------------------ + +make linux-directfb +make + +echo Installing - please enter sudo pw. + +sudo make install INSTALL_DIR=/usr/local/dfb_GL +cd src/mesa/drivers/directfb +make +sudo make install INSTALL_DIR=/usr/local/dfb_GL +------------------------ + +To run the SDL - testprograms: + +export SDL_VIDEODRIVER=directfb +export LD_LIBRARY_PATH=/usr/local/dfb_GL/lib +export LD_PRELOAD=/usr/local/dfb_GL/libGL.so.7 + +./testgl + diff --git a/README.gesture b/README-gesture.txt similarity index 93% rename from README.gesture rename to README-gesture.txt index d52c4c5a2..336fb304a 100644 --- a/README.gesture +++ b/README-gesture.txt @@ -1,72 +1,72 @@ -=========================================================================== -Dollar Gestures -=========================================================================== -SDL Provides an implementation of the $1 gesture recognition system. This allows for recording, saving, loading, and performing single stroke gestures. - -Gestures can be performed with any number of fingers (the centroid of the fingers must follow the path of the gesture), but the number of fingers must be constant (a finger cannot go down in the middle of a gesture). The path of a gesture is considered the path from the time when the final finger went down, to the first time any finger comes up. - -Dollar gestures are assigned an Id based on a hash function. This is guaranteed to remain constant for a given gesture. There is a (small) chance that two different gestures will be assigned the same ID. In this case, simply re-recording one of the gestures should result in a different ID. - -Recording: ----------- -To begin recording on a touch device call: -SDL_RecordGesture(SDL_TouchID touchId), where touchId is the id of the touch device you wish to record on, or -1 to record on all connected devices. - -Recording terminates as soon as a finger comes up. Recording is acknowledged by an SDL_DOLLARRECORD event. -A SDL_DOLLARRECORD event is a dgesture with the following fields: - -event.dgesture.touchId - the Id of the touch used to record the gesture. -event.dgesture.gestureId - the unique id of the recorded gesture. - - -Performing: ------------ -As long as there is a dollar gesture assigned to a touch, every finger-up event will also cause an SDL_DOLLARGESTURE event with the following fields: - -event.dgesture.touchId - the Id of the touch which performed the gesture. -event.dgesture.gestureId - the unique id of the closest gesture to the performed stroke. -event.dgesture.error - the difference between the gesture template and the actual performed gesture. Lower error is a better match. -event.dgesture.numFingers - the number of fingers used to draw the stroke. - -Most programs will want to define an appropriate error threshold and check to be sure that the error of a gesture is not abnormally high (an indicator that no gesture was performed). - - - -Saving: -------- -To save a template, call SDL_SaveDollarTemplate(gestureId, src) where gestureId is the id of the gesture you want to save, and src is an SDL_RWops pointer to the file where the gesture will be stored. - -To save all currently loaded templates, call SDL_SaveAllDollarTemplates(src) where source is an SDL_RWops pointer to the file where the gesture will be stored. - -Both functions return the number of gestures successfully saved. - - -Loading: --------- -To load templates from a file, call SDL_LoadDollarTemplates(touchId,src) where touchId is the id of the touch to load to (or -1 to load to all touch devices), and src is an SDL_RWops pointer to a gesture save file. - -SDL_LoadDollarTemplates returns the number of templates successfully loaded. - - - -=========================================================================== -Multi Gestures -=========================================================================== -SDL provides simple support for pinch/rotate/swipe gestures. -Every time a finger is moved an SDL_MULTIGESTURE event is sent with the following fields: - -event.mgesture.touchId - the Id of the touch on which the gesture was performed. -event.mgesture.x - the normalized x coordinate of the gesture. (0..1) -event.mgesture.y - the normalized y coordinate of the gesture. (0..1) -event.mgesture.dTheta - the amount that the fingers rotated during this motion. -event.mgesture.dDist - the amount that the fingers pinched during this motion. -event.mgesture.numFingers - the number of fingers used in the gesture. - - -=========================================================================== -Notes -=========================================================================== -For a complete example see test/testgesture.c - -Please direct questions/comments to: - jim.tla+sdl_touch@gmail.com +=========================================================================== +Dollar Gestures +=========================================================================== +SDL Provides an implementation of the $1 gesture recognition system. This allows for recording, saving, loading, and performing single stroke gestures. + +Gestures can be performed with any number of fingers (the centroid of the fingers must follow the path of the gesture), but the number of fingers must be constant (a finger cannot go down in the middle of a gesture). The path of a gesture is considered the path from the time when the final finger went down, to the first time any finger comes up. + +Dollar gestures are assigned an Id based on a hash function. This is guaranteed to remain constant for a given gesture. There is a (small) chance that two different gestures will be assigned the same ID. In this case, simply re-recording one of the gestures should result in a different ID. + +Recording: +---------- +To begin recording on a touch device call: +SDL_RecordGesture(SDL_TouchID touchId), where touchId is the id of the touch device you wish to record on, or -1 to record on all connected devices. + +Recording terminates as soon as a finger comes up. Recording is acknowledged by an SDL_DOLLARRECORD event. +A SDL_DOLLARRECORD event is a dgesture with the following fields: + +event.dgesture.touchId - the Id of the touch used to record the gesture. +event.dgesture.gestureId - the unique id of the recorded gesture. + + +Performing: +----------- +As long as there is a dollar gesture assigned to a touch, every finger-up event will also cause an SDL_DOLLARGESTURE event with the following fields: + +event.dgesture.touchId - the Id of the touch which performed the gesture. +event.dgesture.gestureId - the unique id of the closest gesture to the performed stroke. +event.dgesture.error - the difference between the gesture template and the actual performed gesture. Lower error is a better match. +event.dgesture.numFingers - the number of fingers used to draw the stroke. + +ost programs will want to define an appropriate error threshold and check to be sure that the error of a gesture is not abnormally high (an indicator that no gesture was performed). + + + +Saving: +------- +To save a template, call SDL_SaveDollarTemplate(gestureId, src) where gestureId is the id of the gesture you want to save, and src is an SDL_RWops pointer to the file where the gesture will be stored. + +To save all currently loaded templates, call SDL_SaveAllDollarTemplates(src) where source is an SDL_RWops pointer to the file where the gesture will be stored. + +Both functions return the number of gestures successfully saved. + + +Loading: +-------- +To load templates from a file, call SDL_LoadDollarTemplates(touchId,src) where touchId is the id of the touch to load to (or -1 to load to all touch devices), and src is an SDL_RWops pointer to a gesture save file. + +SDL_LoadDollarTemplates returns the number of templates successfully loaded. + + + +=========================================================================== +ulti Gestures +=========================================================================== +SDL provides simple support for pinch/rotate/swipe gestures. +Every time a finger is moved an SDL_MULTIGESTURE event is sent with the following fields: + +event.mgesture.touchId - the Id of the touch on which the gesture was performed. +event.mgesture.x - the normalized x coordinate of the gesture. (0..1) +event.mgesture.y - the normalized y coordinate of the gesture. (0..1) +event.mgesture.dTheta - the amount that the fingers rotated during this motion. +event.mgesture.dDist - the amount that the fingers pinched during this motion. +event.mgesture.numFingers - the number of fingers used in the gesture. + + +=========================================================================== +Notes +=========================================================================== +For a complete example see test/testgesture.c + +Please direct questions/comments to: + jim.tla+sdl_touch@gmail.com diff --git a/README.HG b/README-hg.txt similarity index 86% rename from README.HG rename to README-hg.txt index 616307c6c..e007a81dd 100644 --- a/README.HG +++ b/README-hg.txt @@ -1,23 +1,23 @@ -The latest development version of SDL is available via Mercurial. -Mercurial allows you to get up-to-the-minute fixes and enhancements; -as a developer works on a source tree, you can use "hg" to mirror that -source tree instead of waiting for an official release. Please look -at the Mercurial website ( http://mercurial.selenic.com/ ) for more -information on using hg, where you can also download software for -Mac OS X, Windows, and Unix systems. - - hg clone http://hg.libsdl.org/SDL - -If you are building SDL with an IDE, you will need to copy the file -include/SDL_config.h.default to include/SDL_config.h before building. - -If you are building SDL via configure, you will need to run autogen.sh -before running configure. - -There is a web interface to the subversion repository at: - - http://hg.libsdl.org/SDL/ - -There is an RSS feed available at that URL, for those that want to -track commits in real time. - +The latest development version of SDL is available via Mercurial. +ercurial allows you to get up-to-the-minute fixes and enhancements; +as a developer works on a source tree, you can use "hg" to mirror that +source tree instead of waiting for an official release. Please look +at the Mercurial website ( http://mercurial.selenic.com/ ) for more +information on using hg, where you can also download software for +ac OS X, Windows, and Unix systems. + + hg clone http://hg.libsdl.org/SDL + +If you are building SDL with an IDE, you will need to copy the file +include/SDL_config.h.default to include/SDL_config.h before building. + +If you are building SDL via configure, you will need to run autogen.sh +before running configure. + +There is a web interface to the subversion repository at: + + http://hg.libsdl.org/SDL/ + +There is an RSS feed available at that URL, for those that want to +track commits in real time. + diff --git a/README.iOS b/README-ios.txt similarity index 97% rename from README.iOS rename to README-ios.txt index 60f3391dc..6567087b2 100644 --- a/README.iOS +++ b/README-ios.txt @@ -1,222 +1,222 @@ -============================================================================== -Building the Simple DirectMedia Layer for iPhone OS 2.0 -============================================================================== - -Requirements: Mac OS X v10.5 or later and the iPhone SDK. - -Instructions: -1. Open SDL.xcodeproj (located in Xcode-iOS/SDL) in XCode. -2. Select your desired target, and hit build. - -There are three build targets: -- libSDL.a: - Build SDL as a statically linked library -- testsdl - Build a test program (there are known test failures which are fine) -- Template: - Package a project template together with the SDL for iPhone static libraries and copies of the SDL headers. The template includes proper references to the SDL library and headers, skeleton code for a basic SDL program, and placeholder graphics for the application icon and startup screen. - -============================================================================== -Build SDL for iOS from the command line -============================================================================== - -1. cd (PATH WHERE THE SDL CODE IS)/build-scripts -2. ./iosbuild.sh - -If everything goes fine, you should see a build/ios directory, inside there's -two directories "lib" and "include". -"include" contains a copy of the SDL headers that you'll need for your project, -make sure to configure XCode to look for headers there. -"lib" contains find two files, libSDL2.a and libSDL2main.a, you have to add both -to your XCode project. These libraries contain three architectures in them, -armv6 for legacy devices, armv7, and i386 (for the simulator). -By default, iosbuild.sh will autodetect the SDK version you have installed using -xcodebuild -showsdks, and build for iOS >= 3.0, you can override this behaviour -by setting the MIN_OS_VERSION variable, ie: - -MIN_OS_VERSION=4.2 ./iosbuild.sh - -============================================================================== -Using the Simple DirectMedia Layer for iOS -============================================================================== - -FIXME: This needs to be updated for the latest methods - -Here is the easiest method: -1. Build the SDL libraries (libSDL.a and libSDLSimulator.a) and the iPhone SDL Application template. -1. Install the iPhone SDL Application template by copying it to one of XCode's template directories. I recommend creating a directory called "SDL" in "/Developer/Platforms/iOS.platform/Developer/Library/XCode/Project Templates/" and placing it there. -2. Start a new project using the template. The project should be immediately ready for use with SDL. - -Here is a more manual method: -1. Create a new iPhone view based application. -2. Build the SDL static libraries (libSDL.a and libSDLSimulator.a) for iPhone and include them in your project. XCode will ignore the library that is not currently of the correct architecture, hence your app will work both on iPhone and in the iPhone Simulator. -3. Include the SDL header files in your project. -4. Remove the ApplicationDelegate.h and ApplicationDelegate.m files -- SDL for iPhone provides its own UIApplicationDelegate. Remove MainWindow.xib -- SDL for iPhone produces its user interface programmatically. -5. Delete the contents of main.m and program your app as a regular SDL program instead. You may replace main.m with your own main.c, but you must tell XCode not to use the project prefix file, as it includes Objective-C code. - -============================================================================== -Notes -- Application events -============================================================================== - -On iOS the application goes through a fixed life cycle and you will get -notifications of state changes via application events. When these events -are delivered you must handle them in an event callback because the OS may -not give you any processing time after the events are delivered. - -e.g. - -int HandleAppEvents(void *userdata, SDL_Event *event) -{ - switch (event->type) - { - case SDL_APP_TERMINATING: - /* Terminate the app. - Shut everything down before returning from this function. - */ - return 0; - case SDL_APP_LOWMEMORY: - /* You will get this when your app is paused and iOS wants more memory. - Release as much memory as possible. - */ - return 0; - case SDL_APP_WILLENTERBACKGROUND: - /* Prepare your app to go into the background. Stop loops, etc. - This gets called when the user hits the home button, or gets a call. - */ - return 0; - case SDL_APP_DIDENTERBACKGROUND: - /* This will get called if the user accepted whatever sent your app to the background. - If the user got a phone call and canceled it, you'll instead get an SDL_APP_DIDENTERFOREGROUND event and restart your loops. - When you get this, you have 5 seconds to save all your state or the app will be terminated. - Your app is NOT active at this point. - */ - return 0; - case SDL_APP_WILLENTERFOREGROUND: - /* This call happens when your app is coming back to the foreground. - Restore all your state here. - */ - return 0; - case SDL_APP_DIDENTERFOREGROUND: - /* Restart your loops here. - Your app is interactive and getting CPU again. - */ - return 0; - default: - /* No special processing, add it to the event queue */ - return 1; - } -} - -int main(int argc, char *argv[]) -{ - SDL_SetEventFilter(HandleAppEvents, NULL); - - ... run your main loop - - return 0; -} - - -============================================================================== -Notes -- Accelerometer as Joystick -============================================================================== - -SDL for iPhone supports polling the built in accelerometer as a joystick device. For an example on how to do this, see the accelerometer.c in the demos directory. - -The main thing to note when using the accelerometer with SDL is that while the iPhone natively reports accelerometer as floating point values in units of g-force, SDL_JoystickGetAxis reports joystick values as signed integers. Hence, in order to convert between the two, some clamping and scaling is necessary on the part of the iPhone SDL joystick driver. To convert SDL_JoystickGetAxis reported values BACK to units of g-force, simply multiply the values by SDL_IPHONE_MAX_GFORCE / 0x7FFF. - -============================================================================== -Notes -- OpenGL ES -============================================================================== - -Your SDL application for iPhone uses OpenGL ES for video by default. - -OpenGL ES for iPhone supports several display pixel formats, such as RGBA8 and RGB565, which provide a 32 bit and 16 bit color buffer respectively. By default, the implementation uses RGB565, but you may use RGBA8 by setting each color component to 8 bits in SDL_GL_SetAttribute. - -If your application doesn't use OpenGL's depth buffer, you may find significant performance improvement by setting SDL_GL_DEPTH_SIZE to 0. - -Finally, if your application completely redraws the screen each frame, you may find significant performance improvement by setting the attribute SDL_GL_RETAINED_BACKING to 1. - -============================================================================== -Notes -- Keyboard -============================================================================== - -The SDL keyboard API has been extended to support on-screen keyboards: - -void SDL_StartTextInput() - -- enables text events and reveals the onscreen keyboard. -void SDL_StopTextInput() - -- disables text events and hides the onscreen keyboard. -SDL_bool SDL_IsTextInputActive() - -- returns whether or not text events are enabled (and the onscreen keyboard is visible) - -============================================================================== -Notes -- Reading and Writing files -============================================================================== - -Each application installed on iPhone resides in a sandbox which includes its own Application Home directory. Your application may not access files outside this directory. - -Once your application is installed its directory tree looks like: - -MySDLApp Home/ - MySDLApp.app - Documents/ - Library/ - Preferences/ - tmp/ - -When your SDL based iPhone application starts up, it sets the working directory to the main bundle (MySDLApp Home/MySDLApp.app), where your application resources are stored. You cannot write to this directory. Instead, I advise you to write document files to "../Documents/" and preferences to "../Library/Preferences". - -More information on this subject is available here: -http://developer.apple.com/library/ios/#documentation/iPhone/Conceptual/iPhoneOSProgrammingGuide/Introduction/Introduction.html - -============================================================================== -Notes -- iPhone SDL limitations -============================================================================== - -Windows: - Full-size, single window applications only. You cannot create multi-window SDL applications for iPhone OS. The application window will fill the display, though you have the option of turning on or off the menu-bar (pass SDL_CreateWindow the flag SDL_WINDOW_BORDERLESS). - -Textures: - The optimal texture formats on iOS are SDL_PIXELFORMAT_ABGR8888, SDL_PIXELFORMAT_ABGR8888, SDL_PIXELFORMAT_BGR888, and SDL_PIXELFORMAT_RGB24 pixel formats. - -Loading Shared Objects: - This is disabled by default since it seems to break the terms of the iPhone SDK agreement. It can be re-enabled in SDL_config_iphoneos.h. - -============================================================================== -Game Center -============================================================================== - -Game Center integration requires that you break up your main loop in order to yield control back to the system. In other words, instead of running an endless main loop, you run each frame in a callback function, using: - -int SDL_iPhoneSetAnimationCallback(SDL_Window * window, int interval, void (*callback)(void*), void *callbackParam); - -This will set up the given function to be called back on the animation callback, and then you have to return from main() to let the Cocoa event loop run. - -e.g. - -extern "C" -void ShowFrame(void*) -{ - ... do event handling, frame logic and rendering -} - -int main(int argc, char *argv[]) -{ - ... initialize game ... - -#if __IPHONEOS__ - // Initialize the Game Center for scoring and matchmaking - InitGameCenter(); - - // Set up the game to run in the window animation callback on iOS - // so that Game Center and so forth works correctly. - SDL_iPhoneSetAnimationCallback(window, 1, ShowFrame, NULL); -#else - while ( running ) { - ShowFrame(0); - DelayFrame(); - } -#endif - return 0; -} +============================================================================== +Building the Simple DirectMedia Layer for iPhone OS 2.0 +============================================================================== + +Requirements: Mac OS X v10.5 or later and the iPhone SDK. + +Instructions: +1. Open SDL.xcodeproj (located in Xcode-iOS/SDL) in XCode. +2. Select your desired target, and hit build. + +There are three build targets: +- libSDL.a: + Build SDL as a statically linked library +- testsdl + Build a test program (there are known test failures which are fine) +- Template: + Package a project template together with the SDL for iPhone static libraries and copies of the SDL headers. The template includes proper references to the SDL library and headers, skeleton code for a basic SDL program, and placeholder graphics for the application icon and startup screen. + +============================================================================== +Build SDL for iOS from the command line +============================================================================== + +1. cd (PATH WHERE THE SDL CODE IS)/build-scripts +2. ./iosbuild.sh + +If everything goes fine, you should see a build/ios directory, inside there's +two directories "lib" and "include". +"include" contains a copy of the SDL headers that you'll need for your project, +make sure to configure XCode to look for headers there. +"lib" contains find two files, libSDL2.a and libSDL2main.a, you have to add both +to your XCode project. These libraries contain three architectures in them, +armv6 for legacy devices, armv7, and i386 (for the simulator). +By default, iosbuild.sh will autodetect the SDK version you have installed using +xcodebuild -showsdks, and build for iOS >= 3.0, you can override this behaviour +by setting the MIN_OS_VERSION variable, ie: + +IN_OS_VERSION=4.2 ./iosbuild.sh + +============================================================================== +Using the Simple DirectMedia Layer for iOS +============================================================================== + +FIXME: This needs to be updated for the latest methods + +Here is the easiest method: +1. Build the SDL libraries (libSDL.a and libSDLSimulator.a) and the iPhone SDL Application template. +1. Install the iPhone SDL Application template by copying it to one of XCode's template directories. I recommend creating a directory called "SDL" in "/Developer/Platforms/iOS.platform/Developer/Library/XCode/Project Templates/" and placing it there. +2. Start a new project using the template. The project should be immediately ready for use with SDL. + +Here is a more manual method: +1. Create a new iPhone view based application. +2. Build the SDL static libraries (libSDL.a and libSDLSimulator.a) for iPhone and include them in your project. XCode will ignore the library that is not currently of the correct architecture, hence your app will work both on iPhone and in the iPhone Simulator. +3. Include the SDL header files in your project. +4. Remove the ApplicationDelegate.h and ApplicationDelegate.m files -- SDL for iPhone provides its own UIApplicationDelegate. Remove MainWindow.xib -- SDL for iPhone produces its user interface programmatically. +5. Delete the contents of main.m and program your app as a regular SDL program instead. You may replace main.m with your own main.c, but you must tell XCode not to use the project prefix file, as it includes Objective-C code. + +============================================================================== +Notes -- Application events +============================================================================== + +On iOS the application goes through a fixed life cycle and you will get +notifications of state changes via application events. When these events +are delivered you must handle them in an event callback because the OS may +not give you any processing time after the events are delivered. + +e.g. + +int HandleAppEvents(void *userdata, SDL_Event *event) +{ + switch (event->type) + { + case SDL_APP_TERMINATING: + /* Terminate the app. + Shut everything down before returning from this function. + */ + return 0; + case SDL_APP_LOWMEMORY: + /* You will get this when your app is paused and iOS wants more memory. + Release as much memory as possible. + */ + return 0; + case SDL_APP_WILLENTERBACKGROUND: + /* Prepare your app to go into the background. Stop loops, etc. + This gets called when the user hits the home button, or gets a call. + */ + return 0; + case SDL_APP_DIDENTERBACKGROUND: + /* This will get called if the user accepted whatever sent your app to the background. + If the user got a phone call and canceled it, you'll instead get an SDL_APP_DIDENTERFOREGROUND event and restart your loops. + When you get this, you have 5 seconds to save all your state or the app will be terminated. + Your app is NOT active at this point. + */ + return 0; + case SDL_APP_WILLENTERFOREGROUND: + /* This call happens when your app is coming back to the foreground. + Restore all your state here. + */ + return 0; + case SDL_APP_DIDENTERFOREGROUND: + /* Restart your loops here. + Your app is interactive and getting CPU again. + */ + return 0; + default: + /* No special processing, add it to the event queue */ + return 1; + } +} + +int main(int argc, char *argv[]) +{ + SDL_SetEventFilter(HandleAppEvents, NULL); + + ... run your main loop + + return 0; +} + + +============================================================================== +Notes -- Accelerometer as Joystick +============================================================================== + +SDL for iPhone supports polling the built in accelerometer as a joystick device. For an example on how to do this, see the accelerometer.c in the demos directory. + +The main thing to note when using the accelerometer with SDL is that while the iPhone natively reports accelerometer as floating point values in units of g-force, SDL_JoystickGetAxis reports joystick values as signed integers. Hence, in order to convert between the two, some clamping and scaling is necessary on the part of the iPhone SDL joystick driver. To convert SDL_JoystickGetAxis reported values BACK to units of g-force, simply multiply the values by SDL_IPHONE_MAX_GFORCE / 0x7FFF. + +============================================================================== +Notes -- OpenGL ES +============================================================================== + +Your SDL application for iPhone uses OpenGL ES for video by default. + +OpenGL ES for iPhone supports several display pixel formats, such as RGBA8 and RGB565, which provide a 32 bit and 16 bit color buffer respectively. By default, the implementation uses RGB565, but you may use RGBA8 by setting each color component to 8 bits in SDL_GL_SetAttribute. + +If your application doesn't use OpenGL's depth buffer, you may find significant performance improvement by setting SDL_GL_DEPTH_SIZE to 0. + +Finally, if your application completely redraws the screen each frame, you may find significant performance improvement by setting the attribute SDL_GL_RETAINED_BACKING to 1. + +============================================================================== +Notes -- Keyboard +============================================================================== + +The SDL keyboard API has been extended to support on-screen keyboards: + +void SDL_StartTextInput() + -- enables text events and reveals the onscreen keyboard. +void SDL_StopTextInput() + -- disables text events and hides the onscreen keyboard. +SDL_bool SDL_IsTextInputActive() + -- returns whether or not text events are enabled (and the onscreen keyboard is visible) + +============================================================================== +Notes -- Reading and Writing files +============================================================================== + +Each application installed on iPhone resides in a sandbox which includes its own Application Home directory. Your application may not access files outside this directory. + +Once your application is installed its directory tree looks like: + +ySDLApp Home/ + MySDLApp.app + Documents/ + Library/ + Preferences/ + tmp/ + +When your SDL based iPhone application starts up, it sets the working directory to the main bundle (MySDLApp Home/MySDLApp.app), where your application resources are stored. You cannot write to this directory. Instead, I advise you to write document files to "../Documents/" and preferences to "../Library/Preferences". + +ore information on this subject is available here: +http://developer.apple.com/library/ios/#documentation/iPhone/Conceptual/iPhoneOSProgrammingGuide/Introduction/Introduction.html + +============================================================================== +Notes -- iPhone SDL limitations +============================================================================== + +Windows: + Full-size, single window applications only. You cannot create multi-window SDL applications for iPhone OS. The application window will fill the display, though you have the option of turning on or off the menu-bar (pass SDL_CreateWindow the flag SDL_WINDOW_BORDERLESS). + +Textures: + The optimal texture formats on iOS are SDL_PIXELFORMAT_ABGR8888, SDL_PIXELFORMAT_ABGR8888, SDL_PIXELFORMAT_BGR888, and SDL_PIXELFORMAT_RGB24 pixel formats. + +Loading Shared Objects: + This is disabled by default since it seems to break the terms of the iPhone SDK agreement. It can be re-enabled in SDL_config_iphoneos.h. + +============================================================================== +Game Center +============================================================================== + +Game Center integration requires that you break up your main loop in order to yield control back to the system. In other words, instead of running an endless main loop, you run each frame in a callback function, using: + +int SDL_iPhoneSetAnimationCallback(SDL_Window * window, int interval, void (*callback)(void*), void *callbackParam); + +This will set up the given function to be called back on the animation callback, and then you have to return from main() to let the Cocoa event loop run. + +e.g. + +extern "C" +void ShowFrame(void*) +{ + ... do event handling, frame logic and rendering +} + +int main(int argc, char *argv[]) +{ + ... initialize game ... + +#if __IPHONEOS__ + // Initialize the Game Center for scoring and matchmaking + InitGameCenter(); + + // Set up the game to run in the window animation callback on iOS + // so that Game Center and so forth works correctly. + SDL_iPhoneSetAnimationCallback(window, 1, ShowFrame, NULL); +#else + while ( running ) { + ShowFrame(0); + DelayFrame(); + } +#endif + return 0; +} diff --git a/README.MacOSX b/README-macosx.txt similarity index 97% rename from README.MacOSX rename to README-macosx.txt index 572a86b19..c5cc89b5b 100644 --- a/README.MacOSX +++ b/README-macosx.txt @@ -1,186 +1,186 @@ -============================================================================== -Using the Simple DirectMedia Layer with Mac OS X -============================================================================== - -These instructions are for people using Apple's Mac OS X (pronounced -"ten"). - -From the developer's point of view, OS X is a sort of hybrid Mac and -Unix system, and you have the option of using either traditional -command line tools or Apple's IDE Xcode. - -To build SDL using the command line, use the standard configure and make -process: - - ./configure - make - sudo make install - -You can also build SDL as a Universal library (a single binary for both -PowerPC and Intel architectures), on Mac OS X 10.4 and newer, by using -the fatbuild.sh script in build-scripts: - sh build-scripts/fatbuild.sh - sudo build-scripts/fatbuild.sh install -This script builds SDL with 10.2 ABI compatibility on PowerPC and 10.4 -ABI compatibility on Intel architectures. For best compatibility you -should compile your application the same way. A script which wraps -gcc to make this easy is provided in test/gcc-fat.sh - -To use the library once it's built, you essential have two possibilities: -use the traditional autoconf/automake/make method, or use Xcode. - -============================================================================== -Using the Simple DirectMedia Layer with a traditional Makefile -============================================================================== - -An existing autoconf/automake build system for your SDL app has good chances -to work almost unchanged on OS X. However, to produce a "real" Mac OS X binary -that you can distribute to users, you need to put the generated binary into a -so called "bundle", which basically is a fancy folder with a name like -"MyCoolGame.app". - -To get this build automatically, add something like the following rule to -your Makefile.am: - -bundle_contents = APP_NAME.app/Contents -APP_NAME_bundle: EXE_NAME - mkdir -p $(bundle_contents)/MacOS - mkdir -p $(bundle_contents)/Resources - echo "APPL????" > $(bundle_contents)/PkgInfo - $(INSTALL_PROGRAM) $< $(bundle_contents)/MacOS/ - -You should replace EXE_NAME with the name of the executable. APP_NAME is what -will be visible to the user in the Finder. Usually it will be the same -as EXE_NAME but capitalized. E.g. if EXE_NAME is "testgame" then APP_NAME -usually is "TestGame". You might also want to use @PACKAGE@ to use the package -name as specified in your configure.in file. - -If your project builds more than one application, you will have to do a bit -more. For each of your target applications, you need a separate rule. - -If you want the created bundles to be installed, you may want to add this -rule to your Makefile.am: - -install-exec-hook: APP_NAME_bundle - rm -rf $(DESTDIR)$(prefix)/Applications/APP_NAME.app - mkdir -p $(DESTDIR)$(prefix)/Applications/ - cp -r $< /$(DESTDIR)$(prefix)Applications/ - -This rule takes the Bundle created by the rule from step 3 and installs them -into $(DESTDIR)$(prefix)/Applications/. - -Again, if you want to install multiple applications, you will have to augment -the make rule accordingly. - - -But beware! That is only part of the story! With the above, you end up with -a bare bone .app bundle, which is double clickable from the Finder. But -there are some more things you should do before shipping your product... - -1) The bundle right now probably is dynamically linked against SDL. That - means that when you copy it to another computer, *it will not run*, - unless you also install SDL on that other computer. A good solution - for this dilemma is to static link against SDL. On OS X, you can - achieve that by linking against the libraries listed by - sdl-config --static-libs - instead of those listed by - sdl-config --libs - Depending on how exactly SDL is integrated into your build systems, the - way to achieve that varies, so I won't describe it here in detail -2) Add an 'Info.plist' to your application. That is a special XML file which - contains some meta-information about your application (like some copyright - information, the version of your app, the name of an optional icon file, - and other things). Part of that information is displayed by the Finder - when you click on the .app, or if you look at the "Get Info" window. - More information about Info.plist files can be found on Apple's homepage. - - -As a final remark, let me add that I use some of the techniques (and some -variations of them) in Exult and ScummVM; both are available in source on -the net, so feel free to take a peek at them for inspiration! - - -============================================================================== -Using the Simple DirectMedia Layer with Xcode -============================================================================== - -These instructions are for using Apple's Xcode IDE to build SDL applications. - -- First steps - -The first thing to do is to unpack the Xcode.tar.gz archive in the -top level SDL directory (where the Xcode.tar.gz archive resides). -Because Stuffit Expander will unpack the archive into a subdirectory, -you should unpack the archive manually from the command line: - cd [path_to_SDL_source] - tar zxf Xcode.tar.gz -This will create a new folder called Xcode, which you can browse -normally from the Finder. - -- Building the Framework - -The SDL Library is packaged as a framework bundle, an organized -relocatable folder hierarchy of executable code, interface headers, -and additional resources. For practical purposes, you can think of a -framework as a more user and system-friendly shared library, whose library -file behaves more or less like a standard UNIX shared library. - -To build the framework, simply open the framework project and build it. -By default, the framework bundle "SDL.framework" is installed in -/Library/Frameworks. Therefore, the testers and project stationary expect -it to be located there. However, it will function the same in any of the -following locations: - - ~/Library/Frameworks - /Local/Library/Frameworks - /System/Library/Frameworks - -- Build Options - There are two "Build Styles" (See the "Targets" tab) for SDL. - "Deployment" should be used if you aren't tweaking the SDL library. - "Development" should be used to debug SDL apps or the library itself. - -- Building the Testers - Open the SDLTest project and build away! - -- Using the Project Stationary - Copy the stationary to the indicated folders to access it from - the "New Project" and "Add target" menus. What could be easier? - -- Setting up a new project by hand - Some of you won't want to use the Stationary so I'll give some tips: - * Create a new "Cocoa Application" - * Add src/main/macosx/SDLMain.m , .h and .nib to your project - * Remove "main.c" from your project - * Remove "MainMenu.nib" from your project - * Add "$(HOME)/Library/Frameworks/SDL.framework/Headers" to include path - * Add "$(HOME)/Library/Frameworks" to the frameworks search path - * Add "-framework SDL -framework Foundation -framework AppKit" to "OTHER_LDFLAGS" - * Set the "Main Nib File" under "Application Settings" to "SDLMain.nib" - * Add your files - * Clean and build - -- Building from command line - Use pbxbuild in the same directory as your .pbproj file - -- Running your app - You can send command line args to your app by either invoking it from - the command line (in *.app/Contents/MacOS) or by entering them in the - "Executables" panel of the target settings. - -- Implementation Notes - Some things that may be of interest about how it all works... - * Working directory - As defined in the SDL_main.m file, the working directory of your SDL app - is by default set to its parent. You may wish to change this to better - suit your needs. - * You have a Cocoa App! - Your SDL app is essentially a Cocoa application. When your app - starts up and the libraries finish loading, a Cocoa procedure is called, - which sets up the working directory and calls your main() method. - You are free to modify your Cocoa app with generally no consequence - to SDL. You cannot, however, easily change the SDL window itself. - Functionality may be added in the future to help this. - - -Known bugs are listed in the file "BUGS" +============================================================================== +Using the Simple DirectMedia Layer with Mac OS X +============================================================================== + +These instructions are for people using Apple's Mac OS X (pronounced +"ten"). + +From the developer's point of view, OS X is a sort of hybrid Mac and +Unix system, and you have the option of using either traditional +command line tools or Apple's IDE Xcode. + +To build SDL using the command line, use the standard configure and make +process: + + ./configure + make + sudo make install + +You can also build SDL as a Universal library (a single binary for both +PowerPC and Intel architectures), on Mac OS X 10.4 and newer, by using +the fatbuild.sh script in build-scripts: + sh build-scripts/fatbuild.sh + sudo build-scripts/fatbuild.sh install +This script builds SDL with 10.2 ABI compatibility on PowerPC and 10.4 +ABI compatibility on Intel architectures. For best compatibility you +should compile your application the same way. A script which wraps +gcc to make this easy is provided in test/gcc-fat.sh + +To use the library once it's built, you essential have two possibilities: +use the traditional autoconf/automake/make method, or use Xcode. + +============================================================================== +Using the Simple DirectMedia Layer with a traditional Makefile +============================================================================== + +An existing autoconf/automake build system for your SDL app has good chances +to work almost unchanged on OS X. However, to produce a "real" Mac OS X binary +that you can distribute to users, you need to put the generated binary into a +so called "bundle", which basically is a fancy folder with a name like +"MyCoolGame.app". + +To get this build automatically, add something like the following rule to +your Makefile.am: + +bundle_contents = APP_NAME.app/Contents +APP_NAME_bundle: EXE_NAME + mkdir -p $(bundle_contents)/MacOS + mkdir -p $(bundle_contents)/Resources + echo "APPL????" > $(bundle_contents)/PkgInfo + $(INSTALL_PROGRAM) $< $(bundle_contents)/MacOS/ + +You should replace EXE_NAME with the name of the executable. APP_NAME is what +will be visible to the user in the Finder. Usually it will be the same +as EXE_NAME but capitalized. E.g. if EXE_NAME is "testgame" then APP_NAME +usually is "TestGame". You might also want to use @PACKAGE@ to use the package +name as specified in your configure.in file. + +If your project builds more than one application, you will have to do a bit +more. For each of your target applications, you need a separate rule. + +If you want the created bundles to be installed, you may want to add this +rule to your Makefile.am: + +install-exec-hook: APP_NAME_bundle + rm -rf $(DESTDIR)$(prefix)/Applications/APP_NAME.app + mkdir -p $(DESTDIR)$(prefix)/Applications/ + cp -r $< /$(DESTDIR)$(prefix)Applications/ + +This rule takes the Bundle created by the rule from step 3 and installs them +into $(DESTDIR)$(prefix)/Applications/. + +Again, if you want to install multiple applications, you will have to augment +the make rule accordingly. + + +But beware! That is only part of the story! With the above, you end up with +a bare bone .app bundle, which is double clickable from the Finder. But +there are some more things you should do before shipping your product... + +1) The bundle right now probably is dynamically linked against SDL. That + means that when you copy it to another computer, *it will not run*, + unless you also install SDL on that other computer. A good solution + for this dilemma is to static link against SDL. On OS X, you can + achieve that by linking against the libraries listed by + sdl-config --static-libs + instead of those listed by + sdl-config --libs + Depending on how exactly SDL is integrated into your build systems, the + way to achieve that varies, so I won't describe it here in detail +2) Add an 'Info.plist' to your application. That is a special XML file which + contains some meta-information about your application (like some copyright + information, the version of your app, the name of an optional icon file, + and other things). Part of that information is displayed by the Finder + when you click on the .app, or if you look at the "Get Info" window. + More information about Info.plist files can be found on Apple's homepage. + + +As a final remark, let me add that I use some of the techniques (and some +variations of them) in Exult and ScummVM; both are available in source on +the net, so feel free to take a peek at them for inspiration! + + +============================================================================== +Using the Simple DirectMedia Layer with Xcode +============================================================================== + +These instructions are for using Apple's Xcode IDE to build SDL applications. + +- First steps + +The first thing to do is to unpack the Xcode.tar.gz archive in the +top level SDL directory (where the Xcode.tar.gz archive resides). +Because Stuffit Expander will unpack the archive into a subdirectory, +you should unpack the archive manually from the command line: + cd [path_to_SDL_source] + tar zxf Xcode.tar.gz +This will create a new folder called Xcode, which you can browse +normally from the Finder. + +- Building the Framework + +The SDL Library is packaged as a framework bundle, an organized +relocatable folder hierarchy of executable code, interface headers, +and additional resources. For practical purposes, you can think of a +framework as a more user and system-friendly shared library, whose library +file behaves more or less like a standard UNIX shared library. + +To build the framework, simply open the framework project and build it. +By default, the framework bundle "SDL.framework" is installed in +/Library/Frameworks. Therefore, the testers and project stationary expect +it to be located there. However, it will function the same in any of the +following locations: + + ~/Library/Frameworks + /Local/Library/Frameworks + /System/Library/Frameworks + +- Build Options + There are two "Build Styles" (See the "Targets" tab) for SDL. + "Deployment" should be used if you aren't tweaking the SDL library. + "Development" should be used to debug SDL apps or the library itself. + +- Building the Testers + Open the SDLTest project and build away! + +- Using the Project Stationary + Copy the stationary to the indicated folders to access it from + the "New Project" and "Add target" menus. What could be easier? + +- Setting up a new project by hand + Some of you won't want to use the Stationary so I'll give some tips: + * Create a new "Cocoa Application" + * Add src/main/macosx/SDLMain.m , .h and .nib to your project + * Remove "main.c" from your project + * Remove "MainMenu.nib" from your project + * Add "$(HOME)/Library/Frameworks/SDL.framework/Headers" to include path + * Add "$(HOME)/Library/Frameworks" to the frameworks search path + * Add "-framework SDL -framework Foundation -framework AppKit" to "OTHER_LDFLAGS" + * Set the "Main Nib File" under "Application Settings" to "SDLMain.nib" + * Add your files + * Clean and build + +- Building from command line + Use pbxbuild in the same directory as your .pbproj file + +- Running your app + You can send command line args to your app by either invoking it from + the command line (in *.app/Contents/MacOS) or by entering them in the + "Executables" panel of the target settings. + +- Implementation Notes + Some things that may be of interest about how it all works... + * Working directory + As defined in the SDL_main.m file, the working directory of your SDL app + is by default set to its parent. You may wish to change this to better + suit your needs. + * You have a Cocoa App! + Your SDL app is essentially a Cocoa application. When your app + starts up and the libraries finish loading, a Cocoa procedure is called, + which sets up the working directory and calls your main() method. + You are free to modify your Cocoa app with generally no consequence + to SDL. You cannot, however, easily change the SDL window itself. + Functionality may be added in the future to help this. + + +Known bugs are listed in the file "BUGS" diff --git a/README.pandora b/README-pandora.txt similarity index 97% rename from README.pandora rename to README-pandora.txt index d522bc77a..f70ed6725 100644 --- a/README.pandora +++ b/README-pandora.txt @@ -1,16 +1,16 @@ -SDL 2.0 with open pandora console support ( http://openpandora.org/ ) -===================================================================== - -- A pandora specific video driver was written to allow SDL 2.0 with OpenGL ES -support to work on the pandora under the framebuffer. This driver do not have -input support for now, so if you use it you will have to add your own control code. -The video driver name is "pandora" so if you have problem running it from -the framebuffer, try to set the following variable before starting your application : -"export SDL_VIDEODRIVER=pandora" - -- OpenGL ES support was added to the x11 driver, so it's working like the normal -x11 driver one with OpenGLX support, with SDL input event's etc.. - - -David Carré (Cpasjuste) -cpasjuste@gmail.com +SDL 2.0 with open pandora console support ( http://openpandora.org/ ) +===================================================================== + +- A pandora specific video driver was written to allow SDL 2.0 with OpenGL ES +support to work on the pandora under the framebuffer. This driver do not have +input support for now, so if you use it you will have to add your own control code. +The video driver name is "pandora" so if you have problem running it from +the framebuffer, try to set the following variable before starting your application : +"export SDL_VIDEODRIVER=pandora" + +- OpenGL ES support was added to the x11 driver, so it's working like the normal +x11 driver one with OpenGLX support, with SDL input event's etc.. + + +David Carré (Cpasjuste) +cpasjuste@gmail.com diff --git a/README.Platforms b/README-platforms.txt similarity index 94% rename from README.Platforms rename to README-platforms.txt index 1e0e7a6aa..22343ccf3 100644 --- a/README.Platforms +++ b/README-platforms.txt @@ -1,32 +1,32 @@ - -This is a list of the platforms SDL supports, and who maintains them. - -Officially supported platforms -============================== -(code compiles, and thoroughly tested for release) -============================== -Windows XP -Windows Vista -Windows 7 -Mac OS X 10.4+ -Linux 2.6+ -iOS 3.1.3+ -Android 2.3.3+ - -Unofficially supported platforms -================================ -(code compiles, but not thoroughly tested) -================================ -FreeBSD -NetBSD -OpenBSD -Solaris - -Platforms supported by volunteers -================================= -Haiku - maintained by Axel Dörfler -PSP - maintained by 527721088@qq.com -Pandora - maintained by Scott Smith - -Platforms that need maintainers -=============================== + +This is a list of the platforms SDL supports, and who maintains them. + +Officially supported platforms +============================== +(code compiles, and thoroughly tested for release) +============================== +Windows XP +Windows Vista +Windows 7 +ac OS X 10.4+ +Linux 2.6+ +iOS 3.1.3+ +Android 2.3.3+ + +Unofficially supported platforms +================================ +(code compiles, but not thoroughly tested) +================================ +FreeBSD +NetBSD +OpenBSD +Solaris + +Platforms supported by volunteers +================================= +Haiku - maintained by Axel Dörfler +PSP - maintained by 527721088@qq.com +Pandora - maintained by Scott Smith + +Platforms that need maintainers +=============================== diff --git a/README.Porting b/README-porting.txt similarity index 96% rename from README.Porting rename to README-porting.txt index f8540b600..bea194a4a 100644 --- a/README.Porting +++ b/README-porting.txt @@ -1,61 +1,61 @@ - -* Porting To A New Platform - - The first thing you have to do when porting to a new platform, is look at -include/SDL_platform.h and create an entry there for your operating system. -The standard format is __PLATFORM__, where PLATFORM is the name of the OS. -Ideally SDL_platform.h will be able to auto-detect the system it's building -on based on C preprocessor symbols. - -There are two basic ways of building SDL at the moment: - -1. The "UNIX" way: ./configure; make; make install - - If you have a GNUish system, then you might try this. Edit configure.in, - take a look at the large section labelled: - "Set up the configuration based on the target platform!" - Add a section for your platform, and then re-run autogen.sh and build! - -2. Using an IDE: - - If you're using an IDE or other non-configure build system, you'll probably - want to create a custom SDL_config.h for your platform. Edit SDL_config.h, - add a section for your platform, and create a custom SDL_config_{platform}.h, - based on SDL_config.h.minimal and SDL_config.h.in - - Add the top level include directory to the header search path, and then add - the following sources to the project: - src/*.c - src/atomic/*.c - src/audio/*.c - src/cpuinfo/*.c - src/events/*.c - src/file/*.c - src/haptic/*.c - src/joystick/*.c - src/power/*.c - src/render/*.c - src/stdlib/*.c - src/thread/*.c - src/timer/*.c - src/video/*.c - src/audio/disk/*.c - src/audio/dummy/*.c - src/video/dummy/*.c - src/haptic/dummy/*.c - src/joystick/dummy/*.c - src/main/dummy/*.c - src/thread/generic/*.c - src/timer/dummy/*.c - src/loadso/dummy/*.c - - -Once you have a working library without any drivers, you can go back to each -of the major subsystems and start implementing drivers for your platform. - -If you have any questions, don't hesitate to ask on the SDL mailing list: - http://www.libsdl.org/mailing-list.php - -Enjoy! - Sam Lantinga (slouken@libsdl.org) - + +* Porting To A New Platform + + The first thing you have to do when porting to a new platform, is look at +include/SDL_platform.h and create an entry there for your operating system. +The standard format is __PLATFORM__, where PLATFORM is the name of the OS. +Ideally SDL_platform.h will be able to auto-detect the system it's building +on based on C preprocessor symbols. + +There are two basic ways of building SDL at the moment: + +1. The "UNIX" way: ./configure; make; make install + + If you have a GNUish system, then you might try this. Edit configure.in, + take a look at the large section labelled: + "Set up the configuration based on the target platform!" + Add a section for your platform, and then re-run autogen.sh and build! + +2. Using an IDE: + + If you're using an IDE or other non-configure build system, you'll probably + want to create a custom SDL_config.h for your platform. Edit SDL_config.h, + add a section for your platform, and create a custom SDL_config_{platform}.h, + based on SDL_config.h.minimal and SDL_config.h.in + + Add the top level include directory to the header search path, and then add + the following sources to the project: + src/*.c + src/atomic/*.c + src/audio/*.c + src/cpuinfo/*.c + src/events/*.c + src/file/*.c + src/haptic/*.c + src/joystick/*.c + src/power/*.c + src/render/*.c + src/stdlib/*.c + src/thread/*.c + src/timer/*.c + src/video/*.c + src/audio/disk/*.c + src/audio/dummy/*.c + src/video/dummy/*.c + src/haptic/dummy/*.c + src/joystick/dummy/*.c + src/main/dummy/*.c + src/thread/generic/*.c + src/timer/dummy/*.c + src/loadso/dummy/*.c + + +Once you have a working library without any drivers, you can go back to each +of the major subsystems and start implementing drivers for your platform. + +If you have any questions, don't hesitate to ask on the SDL mailing list: + http://www.libsdl.org/mailing-list.php + +Enjoy! + Sam Lantinga (slouken@libsdl.org) + diff --git a/README.psp b/README-psp.txt similarity index 89% rename from README.psp rename to README-psp.txt index 469febb9a..e9e32ea5c 100644 --- a/README.psp +++ b/README-psp.txt @@ -1,17 +1,17 @@ -SDL port for the Sony PSP contributed by - Captian Lex - -Credit to - Marcus R.Brown,Jim Paris,Matthew H for the original SDL 1.2 for PSP - Geecko for his PSP GU lib "Glib2d" - -Building --------- -To build for the PSP, make sure psp-config is in the path and run: - make -f Makefile.psp - - - -To Do ------- -PSP Screen Keyboard \ No newline at end of file +SDL port for the Sony PSP contributed by + Captian Lex + +Credit to + Marcus R.Brown,Jim Paris,Matthew H for the original SDL 1.2 for PSP + Geecko for his PSP GU lib "Glib2d" + +Building +-------- +To build for the PSP, make sure psp-config is in the path and run: + make -f Makefile.psp + + + +To Do +------ +PSP Screen Keyboard diff --git a/README.touch b/README-touch.txt similarity index 97% rename from README.touch rename to README-touch.txt index d099bb107..f07c9110e 100644 --- a/README.touch +++ b/README-touch.txt @@ -1,84 +1,84 @@ -=========================================================================== -System Specific Notes -=========================================================================== -Linux: -The linux touch system is currently based off event streams, and proc/bus/devices. The active user must be given permissions to read /dev/input/TOUCHDEVICE, where TOUCHDEVICE is the event stream for your device. Currently only Wacom tablets are supported. If you have an unsupported tablet contact me at jim.tla+sdl_touch@gmail.com and I will help you get support for it. - -Mac: -The Mac and iPhone APIs are pretty. If your touch device supports them then you'll be fine. If it doesn't, then there isn't much we can do. - -iPhone: -Works out of box. - -Windows: -Unfortunately there is no windows support as of yet. Support for Windows 7 is planned, but we currently have no way to test. If you have a Windows 7 WM_TOUCH supported device, and are willing to help test please contact me at jim.tla+sdl_touch@gmail.com - -=========================================================================== -Events -=========================================================================== -SDL_FINGERDOWN: -Sent when a finger (or stylus) is placed on a touch device. -Fields: -event.tfinger.touchId - the Id of the touch device. -event.tfinger.fingerId - the Id of the finger which just went down. -event.tfinger.x - the x coordinate of the touch (0..1) -event.tfinger.y - the y coordinate of the touch (0..1) -event.tfinger.pressure - the pressure of the touch (0..1) - -SDL_FINGERMOTION: -Sent when a finger (or stylus) is moved on the touch device. -Fields: -Same as SDL_FINGERDOWN but with additional: -event.tfinger.dx - change in x coordinate during this motion event. -event.tfinger.dy - change in y coordinate during this motion event. - -SDL_FINGERUP: -Sent when a finger (or stylus) is lifted from the touch device. -Fields: -Same as SDL_FINGERDOWN. - - -=========================================================================== -Functions -=========================================================================== -SDL provides the ability to access the underlying Finger structures. -These structures should _never_ be modified. - -The following functions are included from SDL_touch.h - -To get a SDL_TouchID call SDL_GetTouchDevice(index). -This returns a SDL_TouchID. -IMPORTANT: If the touch has been removed, or there is no touch with the given ID, SDL_GetTouchID will return 0. Be sure to check for this! - -The number of touch devices can be queried with SDL_GetNumTouchDevices(). - -A SDL_TouchID may be used to get pointers to SDL_Finger. - -SDL_GetNumTouchFingers(touchID) may be used to get the number of fingers currently down on the device. - -The most common reason to access SDL_Finger is to query the fingers outside the event. In most cases accessing the fingers is using the event. This would be accomplished by code like the following: - - float x = event.tfinger.x; - float y = event.tfinger.y; - - - -To get a SDL_Finger, call SDL_GetTouchFinger(touchID,index), where touchID is a SDL_TouchID, and index is the requested finger. -This returns a SDL_Finger*, or NULL if the finger does not exist, or has been removed. -A SDL_Finger is guaranteed to be persistent for the duration of a touch, but it will be de-allocated as soon as the finger is removed. This occurs when the SDL_FINGERUP event is _added_ to the event queue, and thus _before_ the SDL_FINGERUP event is polled. -As a result, be very careful to check for NULL return values. - -A SDL_Finger has the following fields: ->x,y,pressure: - The current coordinates of the touch. ->pressure: - The pressure of the touch. - -=========================================================================== -Notes -=========================================================================== -For a complete example see test/testgesture.c - -Please direct questions/comments to: - jim.tla+sdl_touch@gmail.com - (original author, API was changed since) +=========================================================================== +System Specific Notes +=========================================================================== +Linux: +The linux touch system is currently based off event streams, and proc/bus/devices. The active user must be given permissions to read /dev/input/TOUCHDEVICE, where TOUCHDEVICE is the event stream for your device. Currently only Wacom tablets are supported. If you have an unsupported tablet contact me at jim.tla+sdl_touch@gmail.com and I will help you get support for it. + +ac: +The Mac and iPhone APIs are pretty. If your touch device supports them then you'll be fine. If it doesn't, then there isn't much we can do. + +iPhone: +Works out of box. + +Windows: +Unfortunately there is no windows support as of yet. Support for Windows 7 is planned, but we currently have no way to test. If you have a Windows 7 WM_TOUCH supported device, and are willing to help test please contact me at jim.tla+sdl_touch@gmail.com + +=========================================================================== +Events +=========================================================================== +SDL_FINGERDOWN: +Sent when a finger (or stylus) is placed on a touch device. +Fields: +event.tfinger.touchId - the Id of the touch device. +event.tfinger.fingerId - the Id of the finger which just went down. +event.tfinger.x - the x coordinate of the touch (0..1) +event.tfinger.y - the y coordinate of the touch (0..1) +event.tfinger.pressure - the pressure of the touch (0..1) + +SDL_FINGERMOTION: +Sent when a finger (or stylus) is moved on the touch device. +Fields: +Same as SDL_FINGERDOWN but with additional: +event.tfinger.dx - change in x coordinate during this motion event. +event.tfinger.dy - change in y coordinate during this motion event. + +SDL_FINGERUP: +Sent when a finger (or stylus) is lifted from the touch device. +Fields: +Same as SDL_FINGERDOWN. + + +=========================================================================== +Functions +=========================================================================== +SDL provides the ability to access the underlying Finger structures. +These structures should _never_ be modified. + +The following functions are included from SDL_touch.h + +To get a SDL_TouchID call SDL_GetTouchDevice(index). +This returns a SDL_TouchID. +IMPORTANT: If the touch has been removed, or there is no touch with the given ID, SDL_GetTouchID will return 0. Be sure to check for this! + +The number of touch devices can be queried with SDL_GetNumTouchDevices(). + +A SDL_TouchID may be used to get pointers to SDL_Finger. + +SDL_GetNumTouchFingers(touchID) may be used to get the number of fingers currently down on the device. + +The most common reason to access SDL_Finger is to query the fingers outside the event. In most cases accessing the fingers is using the event. This would be accomplished by code like the following: + + float x = event.tfinger.x; + float y = event.tfinger.y; + + + +To get a SDL_Finger, call SDL_GetTouchFinger(touchID,index), where touchID is a SDL_TouchID, and index is the requested finger. +This returns a SDL_Finger*, or NULL if the finger does not exist, or has been removed. +A SDL_Finger is guaranteed to be persistent for the duration of a touch, but it will be de-allocated as soon as the finger is removed. This occurs when the SDL_FINGERUP event is _added_ to the event queue, and thus _before_ the SDL_FINGERUP event is polled. +As a result, be very careful to check for NULL return values. + +A SDL_Finger has the following fields: +>x,y,pressure: + The current coordinates of the touch. +>pressure: + The pressure of the touch. + +=========================================================================== +Notes +=========================================================================== +For a complete example see test/testgesture.c + +Please direct questions/comments to: + jim.tla+sdl_touch@gmail.com + (original author, API was changed since) diff --git a/README.WinCE b/README-wince.txt similarity index 95% rename from README.WinCE rename to README-wince.txt index 8e316d35d..eaacc4982 100644 --- a/README.WinCE +++ b/README-wince.txt @@ -1,9 +1,9 @@ - -Windows CE is no longer supported by SDL. - -We have left the CE support in SDL 1.2 for those that must have it, and we -will accept patches that support more modern Windows Mobile platforms for -SDL 2.0. - ---ryan. - + +Windows CE is no longer supported by SDL. + +We have left the CE support in SDL 1.2 for those that must have it, and we +will accept patches that support more modern Windows Mobile platforms for +SDL 2.0. + +--ryan. + diff --git a/README b/README.txt similarity index 93% rename from README rename to README.txt index 65a07551a..104cea58e 100644 --- a/README +++ b/README.txt @@ -1,39 +1,39 @@ - - Simple DirectMedia Layer - - (SDL) - - Version 2.0 - ---- -http://www.libsdl.org/ - -This is the Simple DirectMedia Layer, a general API that provides low -level access to audio, keyboard, mouse, joystick, 3D hardware via OpenGL, -and 2D framebuffer across multiple platforms. - -The current version supports Windows, Mac OS X, Linux, FreeBSD, -NetBSD, OpenBSD, BSD/OS, Solaris, iOS, and Android. The code contains -support for other operating systems but those are not officially supported. - -SDL is written in C, but works with C++ natively, and has bindings to -several other languages, including Ada, C#, Eiffel, Erlang, Euphoria, -Go, Guile, Haskell, Java, Lisp, Lua, ML, Objective C, Pascal, Perl, PHP, -Pike, Pliant, Python, Ruby, and Smalltalk. - -This library is distributed under the zlib license, which can be found -in the file "COPYING". - -The best way to learn how to use SDL is to check out the header files in -the "include" subdirectory and the programs in the "test" subdirectory. -The header files and test programs are well commented and always up to date. -More documentation and FAQs are available online at: - http://wiki.libsdl.org/ - -If you need help with the library, or just want to discuss SDL related -issues, you can join the developers mailing list: - http://www.libsdl.org/mailing-list.php - -Enjoy! - Sam Lantinga (slouken@libsdl.org) - + + Simple DirectMedia Layer + + (SDL) + + Version 2.0 + +--- +http://www.libsdl.org/ + +This is the Simple DirectMedia Layer, a general API that provides low +level access to audio, keyboard, mouse, joystick, 3D hardware via OpenGL, +and 2D framebuffer across multiple platforms. + +The current version supports Windows, Mac OS X, Linux, FreeBSD, +NetBSD, OpenBSD, BSD/OS, Solaris, iOS, and Android. The code contains +support for other operating systems but those are not officially supported. + +SDL is written in C, but works with C++ natively, and has bindings to +several other languages, including Ada, C#, Eiffel, Erlang, Euphoria, +Go, Guile, Haskell, Java, Lisp, Lua, ML, Objective C, Pascal, Perl, PHP, +Pike, Pliant, Python, Ruby, and Smalltalk. + +This library is distributed under the zlib license, which can be found +in the file "COPYING". + +The best way to learn how to use SDL is to check out the header files in +the "include" subdirectory and the programs in the "test" subdirectory. +The header files and test programs are well commented and always up to date. +ore documentation and FAQs are available online at: + http://wiki.libsdl.org/ + +If you need help with the library, or just want to discuss SDL related +issues, you can join the developers mailing list: + http://www.libsdl.org/mailing-list.php + +Enjoy! + Sam Lantinga (slouken@libsdl.org) + diff --git a/SDL2.spec.in b/SDL2.spec.in index ad0d57f76..2a5c47924 100644 --- a/SDL2.spec.in +++ b/SDL2.spec.in @@ -63,7 +63,7 @@ rm -rf $RPM_BUILD_ROOT %files %{__defattr} -%doc README-SDL.txt COPYING CREDITS BUGS +%doc README-SDL.txt COPYING.txt CREDITS.txt BUGS.txt %{_libdir}/lib*.%{__soext}.* %files devel diff --git a/TODO b/TODO.txt similarity index 79% rename from TODO rename to TODO.txt index 3db10b850..14c47d0eb 100644 --- a/TODO +++ b/TODO.txt @@ -1,18 +1,15 @@ -2.0 release checklist: - * http://wiki.libsdl.org/moin.cgi/Roadmap - - * See why windows are being rearranged. Is the shield window not up? - * Make sure you can create and show a fullscreen window in one step - * Write automated test case for multi-draw APIs - * Implement assertion code on iPhone - * Add __WINDOWS__ in addition to __WIN32__ - * Write test for fullscreen gamma to check X11 colormap handling - - * Check 1.2 revisions: - 3554 - Need to resolve semantics for locking keys on different platforms - 4874 - Do we want screen rotation? At what level? - 4974 - Windows file code needs to convert UTF-8 to Unicode, but we don't need to tap dance for Windows 95/98 - 4484, 4485 - Verify that SDL's Windows keyboard handling works correctly - 4865 - See if this is still needed (mouse coordinate clamping) - 4866 - See if this is still needed (blocking window repositioning) - +Future work roadmap: + * http://wiki.libsdl.org/moin.cgi/Roadmap + + * See why windows are being rearranged. Is the shield window not up? + * Add __WINDOWS__ in addition to __WIN32__ + * Write test for fullscreen gamma to check X11 colormap handling + + * Check 1.2 revisions: + 3554 - Need to resolve semantics for locking keys on different platforms + 4874 - Do we want screen rotation? At what level? + 4974 - Windows file code needs to convert UTF-8 to Unicode, but we don't need to tap dance for Windows 95/98 + 4484, 4485 - Verify that SDL's Windows keyboard handling works correctly + 4865 - See if this is still needed (mouse coordinate clamping) + 4866 - See if this is still needed (blocking window repositioning) + diff --git a/aclocal.m4 b/aclocal.m4 deleted file mode 100644 index 71c3d2be0..000000000 --- a/aclocal.m4 +++ /dev/null @@ -1,9313 +0,0 @@ -AC_DEFUN([AC_CHECK_DEFINE],[dnl - AC_CACHE_CHECK(for $1 in $2, ac_cv_define_$1, - AC_EGREP_CPP([YES_IS_DEFINED], [ -#include <$2> -#ifdef $1 -YES_IS_DEFINED -#endif - ], ac_cv_define_$1=yes, ac_cv_define_$1=no) - ) - if test "$ac_cv_define_$1" = "yes" ; then - AC_DEFINE([HAVE_$1],[],[Added by AC_CHECK_DEFINE]) - fi -])dnl -AC_DEFINE([HAVE_$1],[],[Added by AC_CHECK_DEFINE]) -############################################################################## -dnl Configure Paths for Alsa -dnl Some modifications by Richard Boulton -dnl Christopher Lansdown -dnl Jaroslav Kysela -dnl Last modification: alsa.m4,v 1.23 2004/01/16 18:14:22 tiwai Exp -dnl AM_PATH_ALSA([MINIMUM-VERSION [, ACTION-IF-FOUND [, ACTION-IF-NOT-FOUND]]]) -dnl Test for libasound, and define ALSA_CFLAGS and ALSA_LIBS as appropriate. -dnl enables arguments --with-alsa-prefix= -dnl --with-alsa-enc-prefix= -dnl --disable-alsatest -dnl -dnl For backwards compatibility, if ACTION_IF_NOT_FOUND is not specified, -dnl and the alsa libraries are not found, a fatal AC_MSG_ERROR() will result. -dnl -AC_DEFUN([AM_PATH_ALSA], -[dnl Save the original CFLAGS, LDFLAGS, and LIBS -alsa_save_CFLAGS="$CFLAGS" -alsa_save_LDFLAGS="$LDFLAGS" -alsa_save_LIBS="$LIBS" -alsa_found=yes - -dnl -dnl Get the cflags and libraries for alsa -dnl -AC_ARG_WITH(alsa-prefix, -[ --with-alsa-prefix=PFX Prefix where Alsa library is installed(optional)], -[alsa_prefix="$withval"], [alsa_prefix=""]) - -AC_ARG_WITH(alsa-inc-prefix, -[ --with-alsa-inc-prefix=PFX Prefix where include libraries are (optional)], -[alsa_inc_prefix="$withval"], [alsa_inc_prefix=""]) - -dnl FIXME: this is not yet implemented -AC_ARG_ENABLE(alsatest, -[ --disable-alsatest Do not try to compile and run a test Alsa program], -[enable_alsatest="$enableval"], -[enable_alsatest=yes]) - -dnl Add any special include directories -AC_MSG_CHECKING(for ALSA CFLAGS) -if test "$alsa_inc_prefix" != "" ; then - ALSA_CFLAGS="$ALSA_CFLAGS -I$alsa_inc_prefix" - CFLAGS="$CFLAGS -I$alsa_inc_prefix" -fi -AC_MSG_RESULT($ALSA_CFLAGS) - -dnl add any special lib dirs -AC_MSG_CHECKING(for ALSA LDFLAGS) -if test "$alsa_prefix" != "" ; then - ALSA_LIBS="$ALSA_LIBS -L$alsa_prefix" - LDFLAGS="$LDFLAGS $ALSA_LIBS" -fi - -dnl add the alsa library -ALSA_LIBS="$ALSA_LIBS -lasound -lm -ldl -lpthread" -LIBS=`echo $LIBS | sed 's/-lm//'` -LIBS=`echo $LIBS | sed 's/-ldl//'` -LIBS=`echo $LIBS | sed 's/-lpthread//'` -LIBS=`echo $LIBS | sed 's/ //'` -LIBS="$ALSA_LIBS $LIBS" -AC_MSG_RESULT($ALSA_LIBS) - -dnl Check for a working version of libasound that is of the right version. -min_alsa_version=ifelse([$1], ,0.1.1,$1) -AC_MSG_CHECKING(for libasound headers version >= $min_alsa_version) -no_alsa="" - alsa_min_major_version=`echo $min_alsa_version | \ - sed 's/\([[0-9]]*\).\([[0-9]]*\).\([[0-9]]*\)/\1/'` - alsa_min_minor_version=`echo $min_alsa_version | \ - sed 's/\([[0-9]]*\).\([[0-9]]*\).\([[0-9]]*\)/\2/'` - alsa_min_micro_version=`echo $min_alsa_version | \ - sed 's/\([[0-9]]*\).\([[0-9]]*\).\([[0-9]]*\)/\3/'` - -AC_LANG_SAVE -AC_LANG_C -AC_TRY_COMPILE([ -#include -], [ -/* ensure backward compatibility */ -#if !defined(SND_LIB_MAJOR) && defined(SOUNDLIB_VERSION_MAJOR) -#define SND_LIB_MAJOR SOUNDLIB_VERSION_MAJOR -#endif -#if !defined(SND_LIB_MINOR) && defined(SOUNDLIB_VERSION_MINOR) -#define SND_LIB_MINOR SOUNDLIB_VERSION_MINOR -#endif -#if !defined(SND_LIB_SUBMINOR) && defined(SOUNDLIB_VERSION_SUBMINOR) -#define SND_LIB_SUBMINOR SOUNDLIB_VERSION_SUBMINOR -#endif - -# if(SND_LIB_MAJOR > $alsa_min_major_version) - exit(0); -# else -# if(SND_LIB_MAJOR < $alsa_min_major_version) -# error not present -# endif - -# if(SND_LIB_MINOR > $alsa_min_minor_version) - exit(0); -# else -# if(SND_LIB_MINOR < $alsa_min_minor_version) -# error not present -# endif - -# if(SND_LIB_SUBMINOR < $alsa_min_micro_version) -# error not present -# endif -# endif -# endif -exit(0); -], - [AC_MSG_RESULT(found.)], - [AC_MSG_RESULT(not present.) - ifelse([$3], , [AC_MSG_ERROR(Sufficiently new version of libasound not found.)]) - alsa_found=no] -) -AC_LANG_RESTORE - -dnl Now that we know that we have the right version, let's see if we have the library and not just the headers. -if test "x$enable_alsatest" = "xyes"; then -AC_CHECK_LIB([asound], [snd_ctl_open],, - [ifelse([$3], , [AC_MSG_ERROR(No linkable libasound was found.)]) - alsa_found=no] -) -fi - -if test "x$alsa_found" = "xyes" ; then - ifelse([$2], , :, [$2]) - LIBS=`echo $LIBS | sed 's/-lasound//g'` - LIBS=`echo $LIBS | sed 's/ //'` - LIBS="-lasound $LIBS" -fi -if test "x$alsa_found" = "xno" ; then - ifelse([$3], , :, [$3]) - CFLAGS="$alsa_save_CFLAGS" - LDFLAGS="$alsa_save_LDFLAGS" - LIBS="$alsa_save_LIBS" - ALSA_CFLAGS="" - ALSA_LIBS="" -fi - -dnl That should be it. Now just export out symbols: -AC_SUBST(ALSA_CFLAGS) -AC_SUBST(ALSA_LIBS) -]) -# =========================================================================== -# http://www.gnu.org/software/autoconf-archive/ax_check_compiler_flags.html -# =========================================================================== -# -# SYNOPSIS -# -# AX_CHECK_COMPILER_FLAGS(FLAGS, [ACTION-SUCCESS], [ACTION-FAILURE]) -# -# DESCRIPTION -# -# Check whether the given compiler FLAGS work with the current language's -# compiler, or whether they give an error. (Warnings, however, are -# ignored.) -# -# ACTION-SUCCESS/ACTION-FAILURE are shell commands to execute on -# success/failure. -# -# LICENSE -# -# Copyright (c) 2009 Steven G. Johnson -# Copyright (c) 2009 Matteo Frigo -# -# This program is free software: you can redistribute it and/or modify it -# under the terms of the GNU General Public License as published by the -# Free Software Foundation, either version 3 of the License, or (at your -# option) any later version. -# -# This program is distributed in the hope that it will be useful, but -# WITHOUT ANY WARRANTY; without even the implied warranty of -# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU General -# Public License for more details. -# -# You should have received a copy of the GNU General Public License along -# with this program. If not, see . -# -# As a special exception, the respective Autoconf Macro's copyright owner -# gives unlimited permission to copy, distribute and modify the configure -# scripts that are the output of Autoconf when processing the Macro. You -# need not follow the terms of the GNU General Public License when using -# or distributing such scripts, even though portions of the text of the -# Macro appear in them. The GNU General Public License (GPL) does govern -# all other use of the material that constitutes the Autoconf Macro. -# -# This special exception to the GPL applies to versions of the Autoconf -# Macro released by the Autoconf Archive. When you make and distribute a -# modified version of the Autoconf Macro, you may extend this special -# exception to the GPL to apply to your modified version as well. - -#serial 9 - -AC_DEFUN([AX_CHECK_COMPILER_FLAGS], -[AC_PREREQ(2.59) dnl for _AC_LANG_PREFIX -AC_MSG_CHECKING([whether _AC_LANG compiler accepts $1]) -dnl Some hackery here since AC_CACHE_VAL can't handle a non-literal varname: -AS_LITERAL_IF([$1], - [AC_CACHE_VAL(AS_TR_SH(ax_cv_[]_AC_LANG_ABBREV[]_flags_[$1]), [ - ax_save_FLAGS=$[]_AC_LANG_PREFIX[]FLAGS - _AC_LANG_PREFIX[]FLAGS="$1" - AC_COMPILE_IFELSE([AC_LANG_PROGRAM()], - AS_TR_SH(ax_cv_[]_AC_LANG_ABBREV[]_flags_[$1])=yes, - AS_TR_SH(ax_cv_[]_AC_LANG_ABBREV[]_flags_[$1])=no) - _AC_LANG_PREFIX[]FLAGS=$ax_save_FLAGS])], - [ax_save_FLAGS=$[]_AC_LANG_PREFIX[]FLAGS - _AC_LANG_PREFIX[]FLAGS="$1" - AC_COMPILE_IFELSE([AC_LANG_PROGRAM()], - eval AS_TR_SH(ax_cv_[]_AC_LANG_ABBREV[]_flags_[$1])=yes, - eval AS_TR_SH(ax_cv_[]_AC_LANG_ABBREV[]_flags_[$1])=no) - _AC_LANG_PREFIX[]FLAGS=$ax_save_FLAGS]) -eval ax_check_compiler_flags=$AS_TR_SH(ax_cv_[]_AC_LANG_ABBREV[]_flags_[$1]) -AC_MSG_RESULT($ax_check_compiler_flags) -if test "x$ax_check_compiler_flags" = xyes; then - m4_default([$2], :) -else - m4_default([$3], :) -fi -])dnl AX_CHECK_COMPILER_FLAGS -# =========================================================================== -# http://www.gnu.org/software/autoconf-archive/ax_gcc_archflag.html -# =========================================================================== -# -# SYNOPSIS -# -# AX_GCC_ARCHFLAG([PORTABLE?], [ACTION-SUCCESS], [ACTION-FAILURE]) -# -# DESCRIPTION -# -# This macro tries to guess the "native" arch corresponding to the target -# architecture for use with gcc's -march=arch or -mtune=arch flags. If -# found, the cache variable $ax_cv_gcc_archflag is set to this flag and -# ACTION-SUCCESS is executed; otherwise $ax_cv_gcc_archflag is is set to -# "unknown" and ACTION-FAILURE is executed. The default ACTION-SUCCESS is -# to add $ax_cv_gcc_archflag to the end of $CFLAGS. -# -# PORTABLE? should be either [yes] (default) or [no]. In the former case, -# the flag is set to -mtune (or equivalent) so that the architecture is -# only used for tuning, but the instruction set used is still portable. In -# the latter case, the flag is set to -march (or equivalent) so that -# architecture-specific instructions are enabled. -# -# The user can specify --with-gcc-arch= in order to override the -# macro's choice of architecture, or --without-gcc-arch to disable this. -# -# When cross-compiling, or if $CC is not gcc, then ACTION-FAILURE is -# called unless the user specified --with-gcc-arch manually. -# -# Requires macros: AX_CHECK_COMPILER_FLAGS, AX_GCC_X86_CPUID -# -# (The main emphasis here is on recent CPUs, on the principle that doing -# high-performance computing on old hardware is uncommon.) -# -# LICENSE -# -# Copyright (c) 2008 Steven G. Johnson -# Copyright (c) 2008 Matteo Frigo -# -# This program is free software: you can redistribute it and/or modify it -# under the terms of the GNU General Public License as published by the -# Free Software Foundation, either version 3 of the License, or (at your -# option) any later version. -# -# This program is distributed in the hope that it will be useful, but -# WITHOUT ANY WARRANTY; without even the implied warranty of -# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU General -# Public License for more details. -# -# You should have received a copy of the GNU General Public License along -# with this program. If not, see . -# -# As a special exception, the respective Autoconf Macro's copyright owner -# gives unlimited permission to copy, distribute and modify the configure -# scripts that are the output of Autoconf when processing the Macro. You -# need not follow the terms of the GNU General Public License when using -# or distributing such scripts, even though portions of the text of the -# Macro appear in them. The GNU General Public License (GPL) does govern -# all other use of the material that constitutes the Autoconf Macro. -# -# This special exception to the GPL applies to versions of the Autoconf -# Macro released by the Autoconf Archive. When you make and distribute a -# modified version of the Autoconf Macro, you may extend this special -# exception to the GPL to apply to your modified version as well. - -#serial 8 - -AC_DEFUN([AX_GCC_ARCHFLAG], -[AC_REQUIRE([AC_PROG_CC]) -AC_REQUIRE([AC_CANONICAL_HOST]) - -AC_ARG_WITH(gcc-arch, [AS_HELP_STRING([--with-gcc-arch=], [use architecture for gcc -march/-mtune, instead of guessing])], - ax_gcc_arch=$withval, ax_gcc_arch=yes) - -AC_MSG_CHECKING([for gcc architecture flag]) -AC_MSG_RESULT([]) -AC_CACHE_VAL(ax_cv_gcc_archflag, -[ -ax_cv_gcc_archflag="unknown" - -if test "$GCC" = yes; then - -if test "x$ax_gcc_arch" = xyes; then -ax_gcc_arch="" -if test "$cross_compiling" = no; then -case $host_cpu in - i[[3456]]86*|x86_64*) # use cpuid codes, in part from x86info-1.7 by D. Jones - AX_GCC_X86_CPUID(0) - AX_GCC_X86_CPUID(1) - case $ax_cv_gcc_x86_cpuid_0 in - *:756e6547:*:*) # Intel - case $ax_cv_gcc_x86_cpuid_1 in - *5[[48]]?:*:*:*) ax_gcc_arch="pentium-mmx pentium" ;; - *5??:*:*:*) ax_gcc_arch=pentium ;; - *6[[3456]]?:*:*:*) ax_gcc_arch="pentium2 pentiumpro" ;; - *6a?:*[[01]]:*:*) ax_gcc_arch="pentium2 pentiumpro" ;; - *6a?:*[[234]]:*:*) ax_gcc_arch="pentium3 pentiumpro" ;; - *6[[9d]]?:*:*:*) ax_gcc_arch="pentium-m pentium3 pentiumpro" ;; - *6[[78b]]?:*:*:*) ax_gcc_arch="pentium3 pentiumpro" ;; - *6??:*:*:*) ax_gcc_arch=pentiumpro ;; - *f3[[347]]:*:*:*|*f4[1347]:*:*:*) - case $host_cpu in - x86_64*) ax_gcc_arch="nocona pentium4 pentiumpro" ;; - *) ax_gcc_arch="prescott pentium4 pentiumpro" ;; - esac ;; - *f??:*:*:*) ax_gcc_arch="pentium4 pentiumpro";; - esac ;; - *:68747541:*:*) # AMD - case $ax_cv_gcc_x86_cpuid_1 in - *5[[67]]?:*:*:*) ax_gcc_arch=k6 ;; - *5[[8d]]?:*:*:*) ax_gcc_arch="k6-2 k6" ;; - *5[[9]]?:*:*:*) ax_gcc_arch="k6-3 k6" ;; - *60?:*:*:*) ax_gcc_arch=k7 ;; - *6[[12]]?:*:*:*) ax_gcc_arch="athlon k7" ;; - *6[[34]]?:*:*:*) ax_gcc_arch="athlon-tbird k7" ;; - *67?:*:*:*) ax_gcc_arch="athlon-4 athlon k7" ;; - *6[[68a]]?:*:*:*) - AX_GCC_X86_CPUID(0x80000006) # L2 cache size - case $ax_cv_gcc_x86_cpuid_0x80000006 in - *:*:*[[1-9a-f]]??????:*) # (L2 = ecx >> 16) >= 256 - ax_gcc_arch="athlon-xp athlon-4 athlon k7" ;; - *) ax_gcc_arch="athlon-4 athlon k7" ;; - esac ;; - *f[[4cef8b]]?:*:*:*) ax_gcc_arch="athlon64 k8" ;; - *f5?:*:*:*) ax_gcc_arch="opteron k8" ;; - *f7?:*:*:*) ax_gcc_arch="athlon-fx opteron k8" ;; - *f??:*:*:*) ax_gcc_arch="k8" ;; - esac ;; - *:746e6543:*:*) # IDT - case $ax_cv_gcc_x86_cpuid_1 in - *54?:*:*:*) ax_gcc_arch=winchip-c6 ;; - *58?:*:*:*) ax_gcc_arch=winchip2 ;; - *6[[78]]?:*:*:*) ax_gcc_arch=c3 ;; - *69?:*:*:*) ax_gcc_arch="c3-2 c3" ;; - esac ;; - esac - if test x"$ax_gcc_arch" = x; then # fallback - case $host_cpu in - i586*) ax_gcc_arch=pentium ;; - i686*) ax_gcc_arch=pentiumpro ;; - esac - fi - ;; - - sparc*) - AC_PATH_PROG([PRTDIAG], [prtdiag], [prtdiag], [$PATH:/usr/platform/`uname -i`/sbin/:/usr/platform/`uname -m`/sbin/]) - cputype=`(((grep cpu /proc/cpuinfo | cut -d: -f2) ; ($PRTDIAG -v |grep -i sparc) ; grep -i cpu /var/run/dmesg.boot ) | head -n 1) 2> /dev/null` - cputype=`echo "$cputype" | tr -d ' -' |tr $as_cr_LETTERS $as_cr_letters` - case $cputype in - *ultrasparciv*) ax_gcc_arch="ultrasparc4 ultrasparc3 ultrasparc v9" ;; - *ultrasparciii*) ax_gcc_arch="ultrasparc3 ultrasparc v9" ;; - *ultrasparc*) ax_gcc_arch="ultrasparc v9" ;; - *supersparc*|*tms390z5[[05]]*) ax_gcc_arch="supersparc v8" ;; - *hypersparc*|*rt62[[056]]*) ax_gcc_arch="hypersparc v8" ;; - *cypress*) ax_gcc_arch=cypress ;; - esac ;; - - alphaev5) ax_gcc_arch=ev5 ;; - alphaev56) ax_gcc_arch=ev56 ;; - alphapca56) ax_gcc_arch="pca56 ev56" ;; - alphapca57) ax_gcc_arch="pca57 pca56 ev56" ;; - alphaev6) ax_gcc_arch=ev6 ;; - alphaev67) ax_gcc_arch=ev67 ;; - alphaev68) ax_gcc_arch="ev68 ev67" ;; - alphaev69) ax_gcc_arch="ev69 ev68 ev67" ;; - alphaev7) ax_gcc_arch="ev7 ev69 ev68 ev67" ;; - alphaev79) ax_gcc_arch="ev79 ev7 ev69 ev68 ev67" ;; - - powerpc*) - cputype=`((grep cpu /proc/cpuinfo | head -n 1 | cut -d: -f2 | cut -d, -f1 | sed 's/ //g') ; /usr/bin/machine ; /bin/machine; grep CPU /var/run/dmesg.boot | head -n 1 | cut -d" " -f2) 2> /dev/null` - cputype=`echo $cputype | sed -e 's/ppc//g;s/ *//g'` - case $cputype in - *750*) ax_gcc_arch="750 G3" ;; - *740[[0-9]]*) ax_gcc_arch="$cputype 7400 G4" ;; - *74[[4-5]][[0-9]]*) ax_gcc_arch="$cputype 7450 G4" ;; - *74[[0-9]][[0-9]]*) ax_gcc_arch="$cputype G4" ;; - *970*) ax_gcc_arch="970 G5 power4";; - *POWER4*|*power4*|*gq*) ax_gcc_arch="power4 970";; - *POWER5*|*power5*|*gr*|*gs*) ax_gcc_arch="power5 power4 970";; - 603ev|8240) ax_gcc_arch="$cputype 603e 603";; - *) ax_gcc_arch=$cputype ;; - esac - ax_gcc_arch="$ax_gcc_arch powerpc" - ;; -esac -fi # not cross-compiling -fi # guess arch - -if test "x$ax_gcc_arch" != x -a "x$ax_gcc_arch" != xno; then -for arch in $ax_gcc_arch; do - if test "x[]m4_default([$1],yes)" = xyes; then # if we require portable code - flags="-mtune=$arch" - # -mcpu=$arch and m$arch generate nonportable code on every arch except - # x86. And some other arches (e.g. Alpha) don't accept -mtune. Grrr. - case $host_cpu in i*86|x86_64*) flags="$flags -mcpu=$arch -m$arch";; esac - else - flags="-march=$arch -mcpu=$arch -m$arch" - fi - for flag in $flags; do - AX_CHECK_COMPILER_FLAGS($flag, [ax_cv_gcc_archflag=$flag; break]) - done - test "x$ax_cv_gcc_archflag" = xunknown || break -done -fi - -fi # $GCC=yes -]) -AC_MSG_CHECKING([for gcc architecture flag]) -AC_MSG_RESULT($ax_cv_gcc_archflag) -if test "x$ax_cv_gcc_archflag" = xunknown; then - m4_default([$3],:) -else - m4_default([$2], [CFLAGS="$CFLAGS $ax_cv_gcc_archflag"]) -fi -]) -# =========================================================================== -# http://www.gnu.org/software/autoconf-archive/ax_gcc_x86_cpuid.html -# =========================================================================== -# -# SYNOPSIS -# -# AX_GCC_X86_CPUID(OP) -# -# DESCRIPTION -# -# On Pentium and later x86 processors, with gcc or a compiler that has a -# compatible syntax for inline assembly instructions, run a small program -# that executes the cpuid instruction with input OP. This can be used to -# detect the CPU type. -# -# On output, the values of the eax, ebx, ecx, and edx registers are stored -# as hexadecimal strings as "eax:ebx:ecx:edx" in the cache variable -# ax_cv_gcc_x86_cpuid_OP. -# -# If the cpuid instruction fails (because you are running a -# cross-compiler, or because you are not using gcc, or because you are on -# a processor that doesn't have this instruction), ax_cv_gcc_x86_cpuid_OP -# is set to the string "unknown". -# -# This macro mainly exists to be used in AX_GCC_ARCHFLAG. -# -# LICENSE -# -# Copyright (c) 2008 Steven G. Johnson -# Copyright (c) 2008 Matteo Frigo -# -# This program is free software: you can redistribute it and/or modify it -# under the terms of the GNU General Public License as published by the -# Free Software Foundation, either version 3 of the License, or (at your -# option) any later version. -# -# This program is distributed in the hope that it will be useful, but -# WITHOUT ANY WARRANTY; without even the implied warranty of -# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU General -# Public License for more details. -# -# You should have received a copy of the GNU General Public License along -# with this program. If not, see . -# -# As a special exception, the respective Autoconf Macro's copyright owner -# gives unlimited permission to copy, distribute and modify the configure -# scripts that are the output of Autoconf when processing the Macro. You -# need not follow the terms of the GNU General Public License when using -# or distributing such scripts, even though portions of the text of the -# Macro appear in them. The GNU General Public License (GPL) does govern -# all other use of the material that constitutes the Autoconf Macro. -# -# This special exception to the GPL applies to versions of the Autoconf -# Macro released by the Autoconf Archive. When you make and distribute a -# modified version of the Autoconf Macro, you may extend this special -# exception to the GPL to apply to your modified version as well. - -#serial 7 - -AC_DEFUN([AX_GCC_X86_CPUID], -[AC_REQUIRE([AC_PROG_CC]) -AC_LANG_PUSH([C]) -AC_CACHE_CHECK(for x86 cpuid $1 output, ax_cv_gcc_x86_cpuid_$1, - [AC_RUN_IFELSE([AC_LANG_PROGRAM([#include ], [ - int op = $1, eax, ebx, ecx, edx; - FILE *f; - __asm__("cpuid" - : "=a" (eax), "=b" (ebx), "=c" (ecx), "=d" (edx) - : "a" (op)); - f = fopen("conftest_cpuid", "w"); if (!f) return 1; - fprintf(f, "%x:%x:%x:%x\n", eax, ebx, ecx, edx); - fclose(f); - return 0; -])], - [ax_cv_gcc_x86_cpuid_$1=`cat conftest_cpuid`; rm -f conftest_cpuid], - [ax_cv_gcc_x86_cpuid_$1=unknown; rm -f conftest_cpuid], - [ax_cv_gcc_x86_cpuid_$1=unknown])]) -AC_LANG_POP([C]) -]) -############################################################################## -# -# --- esd.m4 --- -# -# Configure paths for ESD -# Manish Singh 98-9-30 -# stolen back from Frank Belew -# stolen from Manish Singh -# Shamelessly stolen from Owen Taylor - -dnl AM_PATH_ESD([MINIMUM-VERSION, [ACTION-IF-FOUND [, ACTION-IF-NOT-FOUND]]]) -dnl Test for ESD, and define ESD_CFLAGS and ESD_LIBS -dnl -AC_DEFUN([AM_PATH_ESD], -[dnl -dnl Get the cflags and libraries from the esd-config script -dnl -AC_ARG_WITH(esd-prefix,[ --with-esd-prefix=PFX Prefix where ESD is installed (optional)], - esd_prefix="$withval", esd_prefix="") -AC_ARG_WITH(esd-exec-prefix,[ --with-esd-exec-prefix=PFX Exec prefix where ESD is installed (optional)], - esd_exec_prefix="$withval", esd_exec_prefix="") -AC_ARG_ENABLE(esdtest, [ --disable-esdtest Do not try to compile and run a test ESD program], - , enable_esdtest=yes) - - if test x$esd_exec_prefix != x ; then - esd_args="$esd_args --exec-prefix=$esd_exec_prefix" - if test x${ESD_CONFIG+set} != xset ; then - ESD_CONFIG=$esd_exec_prefix/bin/esd-config - fi - fi - if test x$esd_prefix != x ; then - esd_args="$esd_args --prefix=$esd_prefix" - if test x${ESD_CONFIG+set} != xset ; then - ESD_CONFIG=$esd_prefix/bin/esd-config - fi - fi - - AC_PATH_PROG(ESD_CONFIG, esd-config, no) - min_esd_version=ifelse([$1], ,0.2.7,$1) - AC_MSG_CHECKING(for ESD - version >= $min_esd_version) - no_esd="" - if test "$ESD_CONFIG" = "no" ; then - no_esd=yes - else - ESD_CFLAGS=`$ESD_CONFIG $esdconf_args --cflags` - ESD_LIBS=`$ESD_CONFIG $esdconf_args --libs` - - esd_major_version=`$ESD_CONFIG $esd_args --version | \ - sed 's/\([[0-9]]*\).\([[0-9]]*\).\([[0-9]]*\)/\1/'` - esd_minor_version=`$ESD_CONFIG $esd_args --version | \ - sed 's/\([[0-9]]*\).\([[0-9]]*\).\([[0-9]]*\)/\2/'` - esd_micro_version=`$ESD_CONFIG $esd_config_args --version | \ - sed 's/\([[0-9]]*\).\([[0-9]]*\).\([[0-9]]*\)/\3/'` - if test "x$enable_esdtest" = "xyes" ; then - ac_save_CFLAGS="$CFLAGS" - ac_save_LIBS="$LIBS" - CFLAGS="$CFLAGS $ESD_CFLAGS" - LIBS="$LIBS $ESD_LIBS" -dnl -dnl Now check if the installed ESD is sufficiently new. (Also sanity -dnl checks the results of esd-config to some extent -dnl - rm -f conf.esdtest - AC_TRY_RUN([ -#include -#include -#include -#include - -char* -my_strdup (char *str) -{ - char *new_str; - - if (str) - { - new_str = malloc ((strlen (str) + 1) * sizeof(char)); - strcpy (new_str, str); - } - else - new_str = NULL; - - return new_str; -} - -int main () -{ - int major, minor, micro; - char *tmp_version; - - system ("touch conf.esdtest"); - - /* HP/UX 9 (%@#!) writes to sscanf strings */ - tmp_version = my_strdup("$min_esd_version"); - if (sscanf(tmp_version, "%d.%d.%d", &major, &minor, µ) != 3) { - printf("%s, bad version string\n", "$min_esd_version"); - exit(1); - } - - if (($esd_major_version > major) || - (($esd_major_version == major) && ($esd_minor_version > minor)) || - (($esd_major_version == major) && ($esd_minor_version == minor) && ($esd_micro_version >= micro))) - { - return 0; - } - else - { - printf("\n*** 'esd-config --version' returned %d.%d.%d, but the minimum version\n", $esd_major_version, $esd_minor_version, $esd_micro_version); - printf("*** of ESD required is %d.%d.%d. If esd-config is correct, then it is\n", major, minor, micro); - printf("*** best to upgrade to the required version.\n"); - printf("*** If esd-config was wrong, set the environment variable ESD_CONFIG\n"); - printf("*** to point to the correct copy of esd-config, and remove the file\n"); - printf("*** config.cache before re-running configure\n"); - return 1; - } -} - -],, no_esd=yes,[echo $ac_n "cross compiling; assumed OK... $ac_c"]) - CFLAGS="$ac_save_CFLAGS" - LIBS="$ac_save_LIBS" - fi - fi - if test "x$no_esd" = x ; then - AC_MSG_RESULT(yes) - ifelse([$2], , :, [$2]) - else - AC_MSG_RESULT(no) - if test "$ESD_CONFIG" = "no" ; then - echo "*** The esd-config script installed by ESD could not be found" - echo "*** If ESD was installed in PREFIX, make sure PREFIX/bin is in" - echo "*** your path, or set the ESD_CONFIG environment variable to the" - echo "*** full path to esd-config." - else - if test -f conf.esdtest ; then - : - else - echo "*** Could not run ESD test program, checking why..." - CFLAGS="$CFLAGS $ESD_CFLAGS" - LIBS="$LIBS $ESD_LIBS" - AC_TRY_LINK([ -#include -#include -], [ return 0; ], - [ echo "*** The test program compiled, but did not run. This usually means" - echo "*** that the run-time linker is not finding ESD or finding the wrong" - echo "*** version of ESD. If it is not finding ESD, you'll need to set your" - echo "*** LD_LIBRARY_PATH environment variable, or edit /etc/ld.so.conf to point" - echo "*** to the installed location Also, make sure you have run ldconfig if that" - echo "*** is required on your system" - echo "***" - echo "*** If you have an old version installed, it is best to remove it, although" - echo "*** you may also be able to get things to work by modifying LD_LIBRARY_PATH"], - [ echo "*** The test program failed to compile or link. See the file config.log for the" - echo "*** exact error that occured. This usually means ESD was incorrectly installed" - echo "*** or that you have moved ESD since it was installed. In the latter case, you" - echo "*** may want to edit the esd-config script: $ESD_CONFIG" ]) - CFLAGS="$ac_save_CFLAGS" - LIBS="$ac_save_LIBS" - fi - fi - ESD_CFLAGS="" - ESD_LIBS="" - ifelse([$3], , :, [$3]) - fi - AC_SUBST(ESD_CFLAGS) - AC_SUBST(ESD_LIBS) - rm -f conf.esdtest -]) -############################################################################## -# Based on libtool-2.4.2 -# libtool.m4 - Configure libtool for the host system. -*-Autoconf-*- -# -# Copyright (C) 1996, 1997, 1998, 1999, 2000, 2001, 2003, 2004, 2005, -# 2006, 2007, 2008, 2009, 2010, 2011 Free Software -# Foundation, Inc. -# Written by Gordon Matzigkeit, 1996 -# -# This file is free software; the Free Software Foundation gives -# unlimited permission to copy and/or distribute it, with or without -# modifications, as long as this notice is preserved. - -m4_define([_LT_COPYING], [dnl -# Copyright (C) 1996, 1997, 1998, 1999, 2000, 2001, 2003, 2004, 2005, -# 2006, 2007, 2008, 2009, 2010, 2011 Free Software -# Foundation, Inc. -# Written by Gordon Matzigkeit, 1996 -# -# This file is part of GNU Libtool. -# -# GNU Libtool is free software; you can redistribute it and/or -# modify it under the terms of the GNU General Public License as -# published by the Free Software Foundation; either version 2 of -# the License, or (at your option) any later version. -# -# As a special exception to the GNU General Public License, -# if you distribute this file as part of a program or library that -# is built using GNU Libtool, you may include this file under the -# same distribution terms that you use for the rest of that program. -# -# GNU Libtool is distributed in the hope that it will be useful, -# but WITHOUT ANY WARRANTY; without even the implied warranty of -# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the -# GNU General Public License for more details. -# -# You should have received a copy of the GNU General Public License -# along with GNU Libtool; see the file COPYING. If not, a copy -# can be downloaded from http://www.gnu.org/licenses/gpl.html, or -# obtained by writing to the Free Software Foundation, Inc., -# 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA. -]) - -# serial 57 LT_INIT - - -# LT_PREREQ(VERSION) -# ------------------ -# Complain and exit if this libtool version is less that VERSION. -m4_defun([LT_PREREQ], -[m4_if(m4_version_compare(m4_defn([LT_PACKAGE_VERSION]), [$1]), -1, - [m4_default([$3], - [m4_fatal([Libtool version $1 or higher is required], - 63)])], - [$2])]) - - -# _LT_CHECK_BUILDDIR -# ------------------ -# Complain if the absolute build directory name contains unusual characters -m4_defun([_LT_CHECK_BUILDDIR], -[case `pwd` in - *\ * | *\ *) - AC_MSG_WARN([Libtool does not cope well with whitespace in `pwd`]) ;; -esac -]) - - -# LT_INIT([OPTIONS]) -# ------------------ -AC_DEFUN([LT_INIT], -[AC_PREREQ([2.58])dnl We use AC_INCLUDES_DEFAULT -AC_REQUIRE([AC_CONFIG_AUX_DIR_DEFAULT])dnl -AC_BEFORE([$0], [LT_LANG])dnl -AC_BEFORE([$0], [LT_OUTPUT])dnl -AC_BEFORE([$0], [LTDL_INIT])dnl -m4_require([_LT_CHECK_BUILDDIR])dnl - -dnl Autoconf doesn't catch unexpanded LT_ macros by default: -m4_pattern_forbid([^_?LT_[A-Z_]+$])dnl -m4_pattern_allow([^(_LT_EOF|LT_DLGLOBAL|LT_DLLAZY_OR_NOW|LT_MULTI_MODULE)$])dnl -dnl aclocal doesn't pull ltoptions.m4, ltsugar.m4, or ltversion.m4 -dnl unless we require an AC_DEFUNed macro: -AC_REQUIRE([LTOPTIONS_VERSION])dnl -AC_REQUIRE([LTSUGAR_VERSION])dnl -AC_REQUIRE([LTVERSION_VERSION])dnl -AC_REQUIRE([LTOBSOLETE_VERSION])dnl -m4_require([_LT_PROG_LTMAIN])dnl - -_LT_SHELL_INIT([SHELL=${CONFIG_SHELL-/bin/sh}]) - -dnl Parse OPTIONS -_LT_SET_OPTIONS([$0], [$1]) - -# This can be used to rebuild libtool when needed -LIBTOOL_DEPS="$ltmain" - -# Always use our own libtool. -LIBTOOL='$(SHELL) $(top_builddir)/libtool' -AC_SUBST(LIBTOOL)dnl - -_LT_SETUP - -# Only expand once: -m4_define([LT_INIT]) -])# LT_INIT - -# Old names: -AU_ALIAS([AC_PROG_LIBTOOL], [LT_INIT]) -AU_ALIAS([AM_PROG_LIBTOOL], [LT_INIT]) -dnl aclocal-1.4 backwards compatibility: -dnl AC_DEFUN([AC_PROG_LIBTOOL], []) -dnl AC_DEFUN([AM_PROG_LIBTOOL], []) - - -# _LT_CC_BASENAME(CC) -# ------------------- -# Calculate cc_basename. Skip known compiler wrappers and cross-prefix. -m4_defun([_LT_CC_BASENAME], -[for cc_temp in $1""; do - case $cc_temp in - compile | *[[\\/]]compile | ccache | *[[\\/]]ccache ) ;; - distcc | *[[\\/]]distcc | purify | *[[\\/]]purify ) ;; - \-*) ;; - *) break;; - esac -done -cc_basename=`$ECHO "$cc_temp" | $SED "s%.*/%%; s%^$host_alias-%%"` -]) - - -# _LT_FILEUTILS_DEFAULTS -# ---------------------- -# It is okay to use these file commands and assume they have been set -# sensibly after `m4_require([_LT_FILEUTILS_DEFAULTS])'. -m4_defun([_LT_FILEUTILS_DEFAULTS], -[: ${CP="cp -f"} -: ${MV="mv -f"} -: ${RM="rm -f"} -])# _LT_FILEUTILS_DEFAULTS - - -# _LT_SETUP -# --------- -m4_defun([_LT_SETUP], -[AC_REQUIRE([AC_CANONICAL_HOST])dnl -AC_REQUIRE([AC_CANONICAL_BUILD])dnl -AC_REQUIRE([_LT_PREPARE_SED_QUOTE_VARS])dnl -AC_REQUIRE([_LT_PROG_ECHO_BACKSLASH])dnl - -_LT_DECL([], [PATH_SEPARATOR], [1], [The PATH separator for the build system])dnl -dnl -_LT_DECL([], [host_alias], [0], [The host system])dnl -_LT_DECL([], [host], [0])dnl -_LT_DECL([], [host_os], [0])dnl -dnl -_LT_DECL([], [build_alias], [0], [The build system])dnl -_LT_DECL([], [build], [0])dnl -_LT_DECL([], [build_os], [0])dnl -dnl -AC_REQUIRE([AC_PROG_CC])dnl -AC_REQUIRE([LT_PATH_LD])dnl -AC_REQUIRE([LT_PATH_NM])dnl -dnl -AC_REQUIRE([AC_PROG_LN_S])dnl -test -z "$LN_S" && LN_S="ln -s" -_LT_DECL([], [LN_S], [1], [Whether we need soft or hard links])dnl -dnl -AC_REQUIRE([LT_CMD_MAX_LEN])dnl -_LT_DECL([objext], [ac_objext], [0], [Object file suffix (normally "o")])dnl -_LT_DECL([], [exeext], [0], [Executable file suffix (normally "")])dnl -dnl -m4_require([_LT_FILEUTILS_DEFAULTS])dnl -m4_require([_LT_CHECK_SHELL_FEATURES])dnl -m4_require([_LT_PATH_CONVERSION_FUNCTIONS])dnl -m4_require([_LT_CMD_RELOAD])dnl -m4_require([_LT_CHECK_MAGIC_METHOD])dnl -m4_require([_LT_CHECK_SHAREDLIB_FROM_LINKLIB])dnl -m4_require([_LT_CMD_OLD_ARCHIVE])dnl -m4_require([_LT_CMD_GLOBAL_SYMBOLS])dnl -m4_require([_LT_WITH_SYSROOT])dnl - -_LT_CONFIG_LIBTOOL_INIT([ -# See if we are running on zsh, and set the options which allow our -# commands through without removal of \ escapes INIT. -if test -n "\${ZSH_VERSION+set}" ; then - setopt NO_GLOB_SUBST -fi -]) -if test -n "${ZSH_VERSION+set}" ; then - setopt NO_GLOB_SUBST -fi - -_LT_CHECK_OBJDIR - -m4_require([_LT_TAG_COMPILER])dnl - -case $host_os in -aix3*) - # AIX sometimes has problems with the GCC collect2 program. For some - # reason, if we set the COLLECT_NAMES environment variable, the problems - # vanish in a puff of smoke. - if test "X${COLLECT_NAMES+set}" != Xset; then - COLLECT_NAMES= - export COLLECT_NAMES - fi - ;; -esac - -# Global variables: -ofile=libtool -can_build_shared=yes - -# All known linkers require a `.a' archive for static linking (except MSVC, -# which needs '.lib'). -libext=a - -with_gnu_ld="$lt_cv_prog_gnu_ld" - -old_CC="$CC" -old_CFLAGS="$CFLAGS" - -# Set sane defaults for various variables -test -z "$CC" && CC=cc -test -z "$LTCC" && LTCC=$CC -test -z "$LTCFLAGS" && LTCFLAGS=$CFLAGS -test -z "$LD" && LD=ld -test -z "$ac_objext" && ac_objext=o - -_LT_CC_BASENAME([$compiler]) - -# Only perform the check for file, if the check method requires it -test -z "$MAGIC_CMD" && MAGIC_CMD=file -case $deplibs_check_method in -file_magic*) - if test "$file_magic_cmd" = '$MAGIC_CMD'; then - _LT_PATH_MAGIC - fi - ;; -esac - -# Use C for the default configuration in the libtool script -LT_SUPPORTED_TAG([CC]) -_LT_LANG_C_CONFIG -_LT_LANG_DEFAULT_CONFIG -_LT_CONFIG_COMMANDS -])# _LT_SETUP - - -# _LT_PREPARE_SED_QUOTE_VARS -# -------------------------- -# Define a few sed substitution that help us do robust quoting. -m4_defun([_LT_PREPARE_SED_QUOTE_VARS], -[# Backslashify metacharacters that are still active within -# double-quoted strings. -sed_quote_subst='s/\([["`$\\]]\)/\\\1/g' - -# Same as above, but do not quote variable references. -double_quote_subst='s/\([["`\\]]\)/\\\1/g' - -# Sed substitution to delay expansion of an escaped shell variable in a -# double_quote_subst'ed string. -delay_variable_subst='s/\\\\\\\\\\\$/\\\\\\$/g' - -# Sed substitution to delay expansion of an escaped single quote. -delay_single_quote_subst='s/'\''/'\'\\\\\\\'\''/g' - -# Sed substitution to avoid accidental globbing in evaled expressions -no_glob_subst='s/\*/\\\*/g' -]) - -# _LT_PROG_LTMAIN -# --------------- -# Note that this code is called both from `configure', and `config.status' -# now that we use AC_CONFIG_COMMANDS to generate libtool. Notably, -# `config.status' has no value for ac_aux_dir unless we are using Automake, -# so we pass a copy along to make sure it has a sensible value anyway. -m4_defun([_LT_PROG_LTMAIN], -[m4_ifdef([AC_REQUIRE_AUX_FILE], [AC_REQUIRE_AUX_FILE([ltmain.sh])])dnl -_LT_CONFIG_LIBTOOL_INIT([ac_aux_dir='$ac_aux_dir']) -ltmain="$ac_aux_dir/ltmain.sh" -])# _LT_PROG_LTMAIN - - -## ------------------------------------- ## -## Accumulate code for creating libtool. ## -## ------------------------------------- ## - -# So that we can recreate a full libtool script including additional -# tags, we accumulate the chunks of code to send to AC_CONFIG_COMMANDS -# in macros and then make a single call at the end using the `libtool' -# label. - - -# _LT_CONFIG_LIBTOOL_INIT([INIT-COMMANDS]) -# ---------------------------------------- -# Register INIT-COMMANDS to be passed to AC_CONFIG_COMMANDS later. -m4_define([_LT_CONFIG_LIBTOOL_INIT], -[m4_ifval([$1], - [m4_append([_LT_OUTPUT_LIBTOOL_INIT], - [$1 -])])]) - -# Initialize. -m4_define([_LT_OUTPUT_LIBTOOL_INIT]) - - -# _LT_CONFIG_LIBTOOL([COMMANDS]) -# ------------------------------ -# Register COMMANDS to be passed to AC_CONFIG_COMMANDS later. -m4_define([_LT_CONFIG_LIBTOOL], -[m4_ifval([$1], - [m4_append([_LT_OUTPUT_LIBTOOL_COMMANDS], - [$1 -])])]) - -# Initialize. -m4_define([_LT_OUTPUT_LIBTOOL_COMMANDS]) - - -# _LT_CONFIG_SAVE_COMMANDS([COMMANDS], [INIT_COMMANDS]) -# ----------------------------------------------------- -m4_defun([_LT_CONFIG_SAVE_COMMANDS], -[_LT_CONFIG_LIBTOOL([$1]) -_LT_CONFIG_LIBTOOL_INIT([$2]) -]) - - -# _LT_FORMAT_COMMENT([COMMENT]) -# ----------------------------- -# Add leading comment marks to the start of each line, and a trailing -# full-stop to the whole comment if one is not present already. -m4_define([_LT_FORMAT_COMMENT], -[m4_ifval([$1], [ -m4_bpatsubst([m4_bpatsubst([$1], [^ *], [# ])], - [['`$\]], [\\\&])]m4_bmatch([$1], [[!?.]$], [], [.]) -)]) - - - -## ------------------------ ## -## FIXME: Eliminate VARNAME ## -## ------------------------ ## - - -# _LT_DECL([CONFIGNAME], VARNAME, VALUE, [DESCRIPTION], [IS-TAGGED?]) -# ------------------------------------------------------------------- -# CONFIGNAME is the name given to the value in the libtool script. -# VARNAME is the (base) name used in the configure script. -# VALUE may be 0, 1 or 2 for a computed quote escaped value based on -# VARNAME. Any other value will be used directly. -m4_define([_LT_DECL], -[lt_if_append_uniq([lt_decl_varnames], [$2], [, ], - [lt_dict_add_subkey([lt_decl_dict], [$2], [libtool_name], - [m4_ifval([$1], [$1], [$2])]) - lt_dict_add_subkey([lt_decl_dict], [$2], [value], [$3]) - m4_ifval([$4], - [lt_dict_add_subkey([lt_decl_dict], [$2], [description], [$4])]) - lt_dict_add_subkey([lt_decl_dict], [$2], - [tagged?], [m4_ifval([$5], [yes], [no])])]) -]) - - -# _LT_TAGDECL([CONFIGNAME], VARNAME, VALUE, [DESCRIPTION]) -# -------------------------------------------------------- -m4_define([_LT_TAGDECL], [_LT_DECL([$1], [$2], [$3], [$4], [yes])]) - - -# lt_decl_tag_varnames([SEPARATOR], [VARNAME1...]) -# ------------------------------------------------ -m4_define([lt_decl_tag_varnames], -[_lt_decl_filter([tagged?], [yes], $@)]) - - -# _lt_decl_filter(SUBKEY, VALUE, [SEPARATOR], [VARNAME1..]) -# --------------------------------------------------------- -m4_define([_lt_decl_filter], -[m4_case([$#], - [0], [m4_fatal([$0: too few arguments: $#])], - [1], [m4_fatal([$0: too few arguments: $#: $1])], - [2], [lt_dict_filter([lt_decl_dict], [$1], [$2], [], lt_decl_varnames)], - [3], [lt_dict_filter([lt_decl_dict], [$1], [$2], [$3], lt_decl_varnames)], - [lt_dict_filter([lt_decl_dict], $@)])[]dnl -]) - - -# lt_decl_quote_varnames([SEPARATOR], [VARNAME1...]) -# -------------------------------------------------- -m4_define([lt_decl_quote_varnames], -[_lt_decl_filter([value], [1], $@)]) - - -# lt_decl_dquote_varnames([SEPARATOR], [VARNAME1...]) -# --------------------------------------------------- -m4_define([lt_decl_dquote_varnames], -[_lt_decl_filter([value], [2], $@)]) - - -# lt_decl_varnames_tagged([SEPARATOR], [VARNAME1...]) -# --------------------------------------------------- -m4_define([lt_decl_varnames_tagged], -[m4_assert([$# <= 2])dnl -_$0(m4_quote(m4_default([$1], [[, ]])), - m4_ifval([$2], [[$2]], [m4_dquote(lt_decl_tag_varnames)]), - m4_split(m4_normalize(m4_quote(_LT_TAGS)), [ ]))]) -m4_define([_lt_decl_varnames_tagged], -[m4_ifval([$3], [lt_combine([$1], [$2], [_], $3)])]) - - -# lt_decl_all_varnames([SEPARATOR], [VARNAME1...]) -# ------------------------------------------------ -m4_define([lt_decl_all_varnames], -[_$0(m4_quote(m4_default([$1], [[, ]])), - m4_if([$2], [], - m4_quote(lt_decl_varnames), - m4_quote(m4_shift($@))))[]dnl -]) -m4_define([_lt_decl_all_varnames], -[lt_join($@, lt_decl_varnames_tagged([$1], - lt_decl_tag_varnames([[, ]], m4_shift($@))))dnl -]) - - -# _LT_CONFIG_STATUS_DECLARE([VARNAME]) -# ------------------------------------ -# Quote a variable value, and forward it to `config.status' so that its -# declaration there will have the same value as in `configure'. VARNAME -# must have a single quote delimited value for this to work. -m4_define([_LT_CONFIG_STATUS_DECLARE], -[$1='`$ECHO "$][$1" | $SED "$delay_single_quote_subst"`']) - - -# _LT_CONFIG_STATUS_DECLARATIONS -# ------------------------------ -# We delimit libtool config variables with single quotes, so when -# we write them to config.status, we have to be sure to quote all -# embedded single quotes properly. In configure, this macro expands -# each variable declared with _LT_DECL (and _LT_TAGDECL) into: -# -# ='`$ECHO "$" | $SED "$delay_single_quote_subst"`' -m4_defun([_LT_CONFIG_STATUS_DECLARATIONS], -[m4_foreach([_lt_var], m4_quote(lt_decl_all_varnames), - [m4_n([_LT_CONFIG_STATUS_DECLARE(_lt_var)])])]) - - -# _LT_LIBTOOL_TAGS -# ---------------- -# Output comment and list of tags supported by the script -m4_defun([_LT_LIBTOOL_TAGS], -[_LT_FORMAT_COMMENT([The names of the tagged configurations supported by this script])dnl -available_tags="_LT_TAGS"dnl -]) - - -# _LT_LIBTOOL_DECLARE(VARNAME, [TAG]) -# ----------------------------------- -# Extract the dictionary values for VARNAME (optionally with TAG) and -# expand to a commented shell variable setting: -# -# # Some comment about what VAR is for. -# visible_name=$lt_internal_name -m4_define([_LT_LIBTOOL_DECLARE], -[_LT_FORMAT_COMMENT(m4_quote(lt_dict_fetch([lt_decl_dict], [$1], - [description])))[]dnl -m4_pushdef([_libtool_name], - m4_quote(lt_dict_fetch([lt_decl_dict], [$1], [libtool_name])))[]dnl -m4_case(m4_quote(lt_dict_fetch([lt_decl_dict], [$1], [value])), - [0], [_libtool_name=[$]$1], - [1], [_libtool_name=$lt_[]$1], - [2], [_libtool_name=$lt_[]$1], - [_libtool_name=lt_dict_fetch([lt_decl_dict], [$1], [value])])[]dnl -m4_ifval([$2], [_$2])[]m4_popdef([_libtool_name])[]dnl -]) - - -# _LT_LIBTOOL_CONFIG_VARS -# ----------------------- -# Produce commented declarations of non-tagged libtool config variables -# suitable for insertion in the LIBTOOL CONFIG section of the `libtool' -# script. Tagged libtool config variables (even for the LIBTOOL CONFIG -# section) are produced by _LT_LIBTOOL_TAG_VARS. -m4_defun([_LT_LIBTOOL_CONFIG_VARS], -[m4_foreach([_lt_var], - m4_quote(_lt_decl_filter([tagged?], [no], [], lt_decl_varnames)), - [m4_n([_LT_LIBTOOL_DECLARE(_lt_var)])])]) - - -# _LT_LIBTOOL_TAG_VARS(TAG) -# ------------------------- -m4_define([_LT_LIBTOOL_TAG_VARS], -[m4_foreach([_lt_var], m4_quote(lt_decl_tag_varnames), - [m4_n([_LT_LIBTOOL_DECLARE(_lt_var, [$1])])])]) - - -# _LT_TAGVAR(VARNAME, [TAGNAME]) -# ------------------------------ -m4_define([_LT_TAGVAR], [m4_ifval([$2], [$1_$2], [$1])]) - - -# _LT_CONFIG_COMMANDS -# ------------------- -# Send accumulated output to $CONFIG_STATUS. Thanks to the lists of -# variables for single and double quote escaping we saved from calls -# to _LT_DECL, we can put quote escaped variables declarations -# into `config.status', and then the shell code to quote escape them in -# for loops in `config.status'. Finally, any additional code accumulated -# from calls to _LT_CONFIG_LIBTOOL_INIT is expanded. -m4_defun([_LT_CONFIG_COMMANDS], -[AC_PROVIDE_IFELSE([LT_OUTPUT], - dnl If the libtool generation code has been placed in $CONFIG_LT, - dnl instead of duplicating it all over again into config.status, - dnl then we will have config.status run $CONFIG_LT later, so it - dnl needs to know what name is stored there: - [AC_CONFIG_COMMANDS([libtool], - [$SHELL $CONFIG_LT || AS_EXIT(1)], [CONFIG_LT='$CONFIG_LT'])], - dnl If the libtool generation code is destined for config.status, - dnl expand the accumulated commands and init code now: - [AC_CONFIG_COMMANDS([libtool], - [_LT_OUTPUT_LIBTOOL_COMMANDS], [_LT_OUTPUT_LIBTOOL_COMMANDS_INIT])]) -])#_LT_CONFIG_COMMANDS - - -# Initialize. -m4_define([_LT_OUTPUT_LIBTOOL_COMMANDS_INIT], -[ - -# The HP-UX ksh and POSIX shell print the target directory to stdout -# if CDPATH is set. -(unset CDPATH) >/dev/null 2>&1 && unset CDPATH - -sed_quote_subst='$sed_quote_subst' -double_quote_subst='$double_quote_subst' -delay_variable_subst='$delay_variable_subst' -_LT_CONFIG_STATUS_DECLARATIONS -LTCC='$LTCC' -LTCFLAGS='$LTCFLAGS' -compiler='$compiler_DEFAULT' - -# A function that is used when there is no print builtin or printf. -func_fallback_echo () -{ - eval 'cat <<_LTECHO_EOF -\$[]1 -_LTECHO_EOF' -} - -# Quote evaled strings. -for var in lt_decl_all_varnames([[ \ -]], lt_decl_quote_varnames); do - case \`eval \\\\\$ECHO \\\\""\\\\\$\$var"\\\\"\` in - *[[\\\\\\\`\\"\\\$]]*) - eval "lt_\$var=\\\\\\"\\\`\\\$ECHO \\"\\\$\$var\\" | \\\$SED \\"\\\$sed_quote_subst\\"\\\`\\\\\\"" - ;; - *) - eval "lt_\$var=\\\\\\"\\\$\$var\\\\\\"" - ;; - esac -done - -# Double-quote double-evaled strings. -for var in lt_decl_all_varnames([[ \ -]], lt_decl_dquote_varnames); do - case \`eval \\\\\$ECHO \\\\""\\\\\$\$var"\\\\"\` in - *[[\\\\\\\`\\"\\\$]]*) - eval "lt_\$var=\\\\\\"\\\`\\\$ECHO \\"\\\$\$var\\" | \\\$SED -e \\"\\\$double_quote_subst\\" -e \\"\\\$sed_quote_subst\\" -e \\"\\\$delay_variable_subst\\"\\\`\\\\\\"" - ;; - *) - eval "lt_\$var=\\\\\\"\\\$\$var\\\\\\"" - ;; - esac -done - -_LT_OUTPUT_LIBTOOL_INIT -]) - -# _LT_GENERATED_FILE_INIT(FILE, [COMMENT]) -# ------------------------------------ -# Generate a child script FILE with all initialization necessary to -# reuse the environment learned by the parent script, and make the -# file executable. If COMMENT is supplied, it is inserted after the -# `#!' sequence but before initialization text begins. After this -# macro, additional text can be appended to FILE to form the body of -# the child script. The macro ends with non-zero status if the -# file could not be fully written (such as if the disk is full). -m4_ifdef([AS_INIT_GENERATED], -[m4_defun([_LT_GENERATED_FILE_INIT],[AS_INIT_GENERATED($@)])], -[m4_defun([_LT_GENERATED_FILE_INIT], -[m4_require([AS_PREPARE])]dnl -[m4_pushdef([AS_MESSAGE_LOG_FD])]dnl -[lt_write_fail=0 -cat >$1 <<_ASEOF || lt_write_fail=1 -#! $SHELL -# Generated by $as_me. -$2 -SHELL=\${CONFIG_SHELL-$SHELL} -export SHELL -_ASEOF -cat >>$1 <<\_ASEOF || lt_write_fail=1 -AS_SHELL_SANITIZE -_AS_PREPARE -exec AS_MESSAGE_FD>&1 -_ASEOF -test $lt_write_fail = 0 && chmod +x $1[]dnl -m4_popdef([AS_MESSAGE_LOG_FD])])])# _LT_GENERATED_FILE_INIT - -# LT_OUTPUT -# --------- -# This macro allows early generation of the libtool script (before -# AC_OUTPUT is called), incase it is used in configure for compilation -# tests. -AC_DEFUN([LT_OUTPUT], -[: ${CONFIG_LT=./config.lt} -AC_MSG_NOTICE([creating $CONFIG_LT]) -_LT_GENERATED_FILE_INIT(["$CONFIG_LT"], -[# Run this file to recreate a libtool stub with the current configuration.]) - -cat >>"$CONFIG_LT" <<\_LTEOF -lt_cl_silent=false -exec AS_MESSAGE_LOG_FD>>config.log -{ - echo - AS_BOX([Running $as_me.]) -} >&AS_MESSAGE_LOG_FD - -lt_cl_help="\ -\`$as_me' creates a local libtool stub from the current configuration, -for use in further configure time tests before the real libtool is -generated. - -Usage: $[0] [[OPTIONS]] - - -h, --help print this help, then exit - -V, --version print version number, then exit - -q, --quiet do not print progress messages - -d, --debug don't remove temporary files - -Report bugs to ." - -lt_cl_version="\ -m4_ifset([AC_PACKAGE_NAME], [AC_PACKAGE_NAME ])config.lt[]dnl -m4_ifset([AC_PACKAGE_VERSION], [ AC_PACKAGE_VERSION]) -configured by $[0], generated by m4_PACKAGE_STRING. - -Copyright (C) 2011 Free Software Foundation, Inc. -This config.lt script is free software; the Free Software Foundation -gives unlimited permision to copy, distribute and modify it." - -while test $[#] != 0 -do - case $[1] in - --version | --v* | -V ) - echo "$lt_cl_version"; exit 0 ;; - --help | --h* | -h ) - echo "$lt_cl_help"; exit 0 ;; - --debug | --d* | -d ) - debug=: ;; - --quiet | --q* | --silent | --s* | -q ) - lt_cl_silent=: ;; - - -*) AC_MSG_ERROR([unrecognized option: $[1] -Try \`$[0] --help' for more information.]) ;; - - *) AC_MSG_ERROR([unrecognized argument: $[1] -Try \`$[0] --help' for more information.]) ;; - esac - shift -done - -if $lt_cl_silent; then - exec AS_MESSAGE_FD>/dev/null -fi -_LTEOF - -cat >>"$CONFIG_LT" <<_LTEOF -_LT_OUTPUT_LIBTOOL_COMMANDS_INIT -_LTEOF - -cat >>"$CONFIG_LT" <<\_LTEOF -AC_MSG_NOTICE([creating $ofile]) -_LT_OUTPUT_LIBTOOL_COMMANDS -AS_EXIT(0) -_LTEOF -chmod +x "$CONFIG_LT" - -# configure is writing to config.log, but config.lt does its own redirection, -# appending to config.log, which fails on DOS, as config.log is still kept -# open by configure. Here we exec the FD to /dev/null, effectively closing -# config.log, so it can be properly (re)opened and appended to by config.lt. -lt_cl_success=: -test "$silent" = yes && - lt_config_lt_args="$lt_config_lt_args --quiet" -exec AS_MESSAGE_LOG_FD>/dev/null -$SHELL "$CONFIG_LT" $lt_config_lt_args || lt_cl_success=false -exec AS_MESSAGE_LOG_FD>>config.log -$lt_cl_success || AS_EXIT(1) -])# LT_OUTPUT - - -# _LT_CONFIG(TAG) -# --------------- -# If TAG is the built-in tag, create an initial libtool script with a -# default configuration from the untagged config vars. Otherwise add code -# to config.status for appending the configuration named by TAG from the -# matching tagged config vars. -m4_defun([_LT_CONFIG], -[m4_require([_LT_FILEUTILS_DEFAULTS])dnl -_LT_CONFIG_SAVE_COMMANDS([ - m4_define([_LT_TAG], m4_if([$1], [], [C], [$1]))dnl - m4_if(_LT_TAG, [C], [ - # See if we are running on zsh, and set the options which allow our - # commands through without removal of \ escapes. - if test -n "${ZSH_VERSION+set}" ; then - setopt NO_GLOB_SUBST - fi - - cfgfile="${ofile}T" - trap "$RM \"$cfgfile\"; exit 1" 1 2 15 - $RM "$cfgfile" - - cat <<_LT_EOF >> "$cfgfile" -#! $SHELL - -# `$ECHO "$ofile" | sed 's%^.*/%%'` - Provide generalized library-building support services. -# Generated automatically by $as_me ($PACKAGE$TIMESTAMP) $VERSION -# Libtool was configured on host `(hostname || uname -n) 2>/dev/null | sed 1q`: -# NOTE: Changes made to this file will be lost: look at ltmain.sh. -# -_LT_COPYING -_LT_LIBTOOL_TAGS - -# ### BEGIN LIBTOOL CONFIG -_LT_LIBTOOL_CONFIG_VARS -_LT_LIBTOOL_TAG_VARS -# ### END LIBTOOL CONFIG - -_LT_EOF - - case $host_os in - aix3*) - cat <<\_LT_EOF >> "$cfgfile" -# AIX sometimes has problems with the GCC collect2 program. For some -# reason, if we set the COLLECT_NAMES environment variable, the problems -# vanish in a puff of smoke. -if test "X${COLLECT_NAMES+set}" != Xset; then - COLLECT_NAMES= - export COLLECT_NAMES -fi -_LT_EOF - ;; - esac - - _LT_PROG_LTMAIN - - # We use sed instead of cat because bash on DJGPP gets confused if - # if finds mixed CR/LF and LF-only lines. Since sed operates in - # text mode, it properly converts lines to CR/LF. This bash problem - # is reportedly fixed, but why not run on old versions too? - sed '$q' "$ltmain" >> "$cfgfile" \ - || (rm -f "$cfgfile"; exit 1) - - _LT_PROG_REPLACE_SHELLFNS - - mv -f "$cfgfile" "$ofile" || - (rm -f "$ofile" && cp "$cfgfile" "$ofile" && rm -f "$cfgfile") - chmod +x "$ofile" -], -[cat <<_LT_EOF >> "$ofile" - -dnl Unfortunately we have to use $1 here, since _LT_TAG is not expanded -dnl in a comment (ie after a #). -# ### BEGIN LIBTOOL TAG CONFIG: $1 -_LT_LIBTOOL_TAG_VARS(_LT_TAG) -# ### END LIBTOOL TAG CONFIG: $1 -_LT_EOF -])dnl /m4_if -], -[m4_if([$1], [], [ - PACKAGE='$PACKAGE' - VERSION='$VERSION' - TIMESTAMP='$TIMESTAMP' - RM='$RM' - ofile='$ofile'], []) -])dnl /_LT_CONFIG_SAVE_COMMANDS -])# _LT_CONFIG - - -# LT_SUPPORTED_TAG(TAG) -# --------------------- -# Trace this macro to discover what tags are supported by the libtool -# --tag option, using: -# autoconf --trace 'LT_SUPPORTED_TAG:$1' -AC_DEFUN([LT_SUPPORTED_TAG], []) - - -# C support is built-in for now -m4_define([_LT_LANG_C_enabled], []) -m4_define([_LT_TAGS], []) - - -# LT_LANG(LANG) -# ------------- -# Enable libtool support for the given language if not already enabled. -AC_DEFUN([LT_LANG], -[AC_BEFORE([$0], [LT_OUTPUT])dnl -m4_case([$1], - [C], [_LT_LANG(C)], - [C++], [_LT_LANG(CXX)], - [Go], [_LT_LANG(GO)], - [Java], [_LT_LANG(GCJ)], - [Fortran 77], [_LT_LANG(F77)], - [Fortran], [_LT_LANG(FC)], - [Windows Resource], [_LT_LANG(RC)], - [m4_ifdef([_LT_LANG_]$1[_CONFIG], - [_LT_LANG($1)], - [m4_fatal([$0: unsupported language: "$1"])])])dnl -])# LT_LANG - - -# _LT_LANG(LANGNAME) -# ------------------ -m4_defun([_LT_LANG], -[m4_ifdef([_LT_LANG_]$1[_enabled], [], - [LT_SUPPORTED_TAG([$1])dnl - m4_append([_LT_TAGS], [$1 ])dnl - m4_define([_LT_LANG_]$1[_enabled], [])dnl - _LT_LANG_$1_CONFIG($1)])dnl -])# _LT_LANG - - -m4_ifndef([AC_PROG_GO], [ -############################################################ -# NOTE: This macro has been submitted for inclusion into # -# GNU Autoconf as AC_PROG_GO. When it is available in # -# a released version of Autoconf we should remove this # -# macro and use it instead. # -############################################################ -m4_defun([AC_PROG_GO], -[AC_LANG_PUSH(Go)dnl -AC_ARG_VAR([GOC], [Go compiler command])dnl -AC_ARG_VAR([GOFLAGS], [Go compiler flags])dnl -_AC_ARG_VAR_LDFLAGS()dnl -AC_CHECK_TOOL(GOC, gccgo) -if test -z "$GOC"; then - if test -n "$ac_tool_prefix"; then - AC_CHECK_PROG(GOC, [${ac_tool_prefix}gccgo], [${ac_tool_prefix}gccgo]) - fi -fi -if test -z "$GOC"; then - AC_CHECK_PROG(GOC, gccgo, gccgo, false) -fi -])#m4_defun -])#m4_ifndef - - -# _LT_LANG_DEFAULT_CONFIG -# ----------------------- -m4_defun([_LT_LANG_DEFAULT_CONFIG], -[AC_PROVIDE_IFELSE([AC_PROG_CXX], - [LT_LANG(CXX)], - [m4_define([AC_PROG_CXX], defn([AC_PROG_CXX])[LT_LANG(CXX)])]) - -AC_PROVIDE_IFELSE([AC_PROG_F77], - [LT_LANG(F77)], - [m4_define([AC_PROG_F77], defn([AC_PROG_F77])[LT_LANG(F77)])]) - -AC_PROVIDE_IFELSE([AC_PROG_FC], - [LT_LANG(FC)], - [m4_define([AC_PROG_FC], defn([AC_PROG_FC])[LT_LANG(FC)])]) - -dnl The call to [A][M_PROG_GCJ] is quoted like that to stop aclocal -dnl pulling things in needlessly. -AC_PROVIDE_IFELSE([AC_PROG_GCJ], - [LT_LANG(GCJ)], - [AC_PROVIDE_IFELSE([A][M_PROG_GCJ], - [LT_LANG(GCJ)], - [AC_PROVIDE_IFELSE([LT_PROG_GCJ], - [LT_LANG(GCJ)], - [m4_ifdef([AC_PROG_GCJ], - [m4_define([AC_PROG_GCJ], defn([AC_PROG_GCJ])[LT_LANG(GCJ)])]) - m4_ifdef([A][M_PROG_GCJ], - [m4_define([A][M_PROG_GCJ], defn([A][M_PROG_GCJ])[LT_LANG(GCJ)])]) - m4_ifdef([LT_PROG_GCJ], - [m4_define([LT_PROG_GCJ], defn([LT_PROG_GCJ])[LT_LANG(GCJ)])])])])]) - -AC_PROVIDE_IFELSE([AC_PROG_GO], - [LT_LANG(GO)], - [m4_define([AC_PROG_GO], defn([AC_PROG_GO])[LT_LANG(GO)])]) - -AC_PROVIDE_IFELSE([LT_PROG_RC], - [LT_LANG(RC)], - [m4_define([LT_PROG_RC], defn([LT_PROG_RC])[LT_LANG(RC)])]) -])# _LT_LANG_DEFAULT_CONFIG - -# Obsolete macros: -AU_DEFUN([AC_LIBTOOL_CXX], [LT_LANG(C++)]) -AU_DEFUN([AC_LIBTOOL_F77], [LT_LANG(Fortran 77)]) -AU_DEFUN([AC_LIBTOOL_FC], [LT_LANG(Fortran)]) -AU_DEFUN([AC_LIBTOOL_GCJ], [LT_LANG(Java)]) -AU_DEFUN([AC_LIBTOOL_RC], [LT_LANG(Windows Resource)]) -dnl aclocal-1.4 backwards compatibility: -dnl AC_DEFUN([AC_LIBTOOL_CXX], []) -dnl AC_DEFUN([AC_LIBTOOL_F77], []) -dnl AC_DEFUN([AC_LIBTOOL_FC], []) -dnl AC_DEFUN([AC_LIBTOOL_GCJ], []) -dnl AC_DEFUN([AC_LIBTOOL_RC], []) - - -# _LT_TAG_COMPILER -# ---------------- -m4_defun([_LT_TAG_COMPILER], -[AC_REQUIRE([AC_PROG_CC])dnl - -_LT_DECL([LTCC], [CC], [1], [A C compiler])dnl -_LT_DECL([LTCFLAGS], [CFLAGS], [1], [LTCC compiler flags])dnl -_LT_TAGDECL([CC], [compiler], [1], [A language specific compiler])dnl -_LT_TAGDECL([with_gcc], [GCC], [0], [Is the compiler the GNU compiler?])dnl - -# If no C compiler was specified, use CC. -LTCC=${LTCC-"$CC"} - -# If no C compiler flags were specified, use CFLAGS. -LTCFLAGS=${LTCFLAGS-"$CFLAGS"} - -# Allow CC to be a program name with arguments. -compiler=$CC -])# _LT_TAG_COMPILER - - -# _LT_COMPILER_BOILERPLATE -# ------------------------ -# Check for compiler boilerplate output or warnings with -# the simple compiler test code. -m4_defun([_LT_COMPILER_BOILERPLATE], -[m4_require([_LT_DECL_SED])dnl -ac_outfile=conftest.$ac_objext -echo "$lt_simple_compile_test_code" >conftest.$ac_ext -eval "$ac_compile" 2>&1 >/dev/null | $SED '/^$/d; /^ *+/d' >conftest.err -_lt_compiler_boilerplate=`cat conftest.err` -$RM conftest* -])# _LT_COMPILER_BOILERPLATE - - -# _LT_LINKER_BOILERPLATE -# ---------------------- -# Check for linker boilerplate output or warnings with -# the simple link test code. -m4_defun([_LT_LINKER_BOILERPLATE], -[m4_require([_LT_DECL_SED])dnl -ac_outfile=conftest.$ac_objext -echo "$lt_simple_link_test_code" >conftest.$ac_ext -eval "$ac_link" 2>&1 >/dev/null | $SED '/^$/d; /^ *+/d' >conftest.err -_lt_linker_boilerplate=`cat conftest.err` -$RM -r conftest* -])# _LT_LINKER_BOILERPLATE - -# _LT_REQUIRED_DARWIN_CHECKS -# ------------------------- -m4_defun_once([_LT_REQUIRED_DARWIN_CHECKS],[ - case $host_os in - rhapsody* | darwin*) - AC_CHECK_TOOL([DSYMUTIL], [dsymutil], [:]) - AC_CHECK_TOOL([NMEDIT], [nmedit], [:]) - AC_CHECK_TOOL([LIPO], [lipo], [:]) - AC_CHECK_TOOL([OTOOL], [otool], [:]) - AC_CHECK_TOOL([OTOOL64], [otool64], [:]) - _LT_DECL([], [DSYMUTIL], [1], - [Tool to manipulate archived DWARF debug symbol files on Mac OS X]) - _LT_DECL([], [NMEDIT], [1], - [Tool to change global to local symbols on Mac OS X]) - _LT_DECL([], [LIPO], [1], - [Tool to manipulate fat objects and archives on Mac OS X]) - _LT_DECL([], [OTOOL], [1], - [ldd/readelf like tool for Mach-O binaries on Mac OS X]) - _LT_DECL([], [OTOOL64], [1], - [ldd/readelf like tool for 64 bit Mach-O binaries on Mac OS X 10.4]) - - AC_CACHE_CHECK([for -single_module linker flag],[lt_cv_apple_cc_single_mod], - [lt_cv_apple_cc_single_mod=no - if test -z "${LT_MULTI_MODULE}"; then - # By default we will add the -single_module flag. You can override - # by either setting the environment variable LT_MULTI_MODULE - # non-empty at configure time, or by adding -multi_module to the - # link flags. - rm -rf libconftest.dylib* - echo "int foo(void){return 1;}" > conftest.c - echo "$LTCC $LTCFLAGS $LDFLAGS -o libconftest.dylib \ --dynamiclib -Wl,-single_module conftest.c" >&AS_MESSAGE_LOG_FD - $LTCC $LTCFLAGS $LDFLAGS -o libconftest.dylib \ - -dynamiclib -Wl,-single_module conftest.c 2>conftest.err - _lt_result=$? - # If there is a non-empty error log, and "single_module" - # appears in it, assume the flag caused a linker warning - if test -s conftest.err && $GREP single_module conftest.err; then - cat conftest.err >&AS_MESSAGE_LOG_FD - # Otherwise, if the output was created with a 0 exit code from - # the compiler, it worked. - elif test -f libconftest.dylib && test $_lt_result -eq 0; then - lt_cv_apple_cc_single_mod=yes - else - cat conftest.err >&AS_MESSAGE_LOG_FD - fi - rm -rf libconftest.dylib* - rm -f conftest.* - fi]) - - AC_CACHE_CHECK([for -exported_symbols_list linker flag], - [lt_cv_ld_exported_symbols_list], - [lt_cv_ld_exported_symbols_list=no - save_LDFLAGS=$LDFLAGS - echo "_main" > conftest.sym - LDFLAGS="$LDFLAGS -Wl,-exported_symbols_list,conftest.sym" - AC_LINK_IFELSE([AC_LANG_PROGRAM([],[])], - [lt_cv_ld_exported_symbols_list=yes], - [lt_cv_ld_exported_symbols_list=no]) - LDFLAGS="$save_LDFLAGS" - ]) - - AC_CACHE_CHECK([for -force_load linker flag],[lt_cv_ld_force_load], - [lt_cv_ld_force_load=no - cat > conftest.c << _LT_EOF -int forced_loaded() { return 2;} -_LT_EOF - echo "$LTCC $LTCFLAGS -c -o conftest.o conftest.c" >&AS_MESSAGE_LOG_FD - $LTCC $LTCFLAGS -c -o conftest.o conftest.c 2>&AS_MESSAGE_LOG_FD - echo "$AR cru libconftest.a conftest.o" >&AS_MESSAGE_LOG_FD - $AR cru libconftest.a conftest.o 2>&AS_MESSAGE_LOG_FD - echo "$RANLIB libconftest.a" >&AS_MESSAGE_LOG_FD - $RANLIB libconftest.a 2>&AS_MESSAGE_LOG_FD - cat > conftest.c << _LT_EOF -int main() { return 0;} -_LT_EOF - echo "$LTCC $LTCFLAGS $LDFLAGS -o conftest conftest.c -Wl,-force_load,./libconftest.a" >&AS_MESSAGE_LOG_FD - $LTCC $LTCFLAGS $LDFLAGS -o conftest conftest.c -Wl,-force_load,./libconftest.a 2>conftest.err - _lt_result=$? - if test -s conftest.err && $GREP force_load conftest.err; then - cat conftest.err >&AS_MESSAGE_LOG_FD - elif test -f conftest && test $_lt_result -eq 0 && $GREP forced_load conftest >/dev/null 2>&1 ; then - lt_cv_ld_force_load=yes - else - cat conftest.err >&AS_MESSAGE_LOG_FD - fi - rm -f conftest.err libconftest.a conftest conftest.c - rm -rf conftest.dSYM - ]) - case $host_os in - rhapsody* | darwin1.[[012]]) - _lt_dar_allow_undefined='${wl}-undefined ${wl}suppress' ;; - darwin1.*) - _lt_dar_allow_undefined='${wl}-flat_namespace ${wl}-undefined ${wl}suppress' ;; - darwin*) # darwin 5.x on - # if running on 10.5 or later, the deployment target defaults - # to the OS version, if on x86, and 10.4, the deployment - # target defaults to 10.4. Don't you love it? - case ${MACOSX_DEPLOYMENT_TARGET-10.0},$host in - 10.0,*86*-darwin8*|10.0,*-darwin[[91]]*) - _lt_dar_allow_undefined='${wl}-undefined ${wl}dynamic_lookup' ;; - 10.[[012]]*) - _lt_dar_allow_undefined='${wl}-flat_namespace ${wl}-undefined ${wl}suppress' ;; - 10.*) - _lt_dar_allow_undefined='${wl}-undefined ${wl}dynamic_lookup' ;; - esac - ;; - esac - if test "$lt_cv_apple_cc_single_mod" = "yes"; then - _lt_dar_single_mod='$single_module' - fi - if test "$lt_cv_ld_exported_symbols_list" = "yes"; then - _lt_dar_export_syms=' ${wl}-exported_symbols_list,$output_objdir/${libname}-symbols.expsym' - else - _lt_dar_export_syms='~$NMEDIT -s $output_objdir/${libname}-symbols.expsym ${lib}' - fi - if test "$DSYMUTIL" != ":" && test "$lt_cv_ld_force_load" = "no"; then - _lt_dsymutil='~$DSYMUTIL $lib || :' - else - _lt_dsymutil= - fi - ;; - esac -]) - - -# _LT_DARWIN_LINKER_FEATURES([TAG]) -# --------------------------------- -# Checks for linker and compiler features on darwin -m4_defun([_LT_DARWIN_LINKER_FEATURES], -[ - m4_require([_LT_REQUIRED_DARWIN_CHECKS]) - _LT_TAGVAR(archive_cmds_need_lc, $1)=no - _LT_TAGVAR(hardcode_direct, $1)=no - _LT_TAGVAR(hardcode_automatic, $1)=yes - _LT_TAGVAR(hardcode_shlibpath_var, $1)=unsupported - if test "$lt_cv_ld_force_load" = "yes"; then - _LT_TAGVAR(whole_archive_flag_spec, $1)='`for conv in $convenience\"\"; do test -n \"$conv\" && new_convenience=\"$new_convenience ${wl}-force_load,$conv\"; done; func_echo_all \"$new_convenience\"`' - m4_case([$1], [F77], [_LT_TAGVAR(compiler_needs_object, $1)=yes], - [FC], [_LT_TAGVAR(compiler_needs_object, $1)=yes]) - else - _LT_TAGVAR(whole_archive_flag_spec, $1)='' - fi - _LT_TAGVAR(link_all_deplibs, $1)=yes - _LT_TAGVAR(allow_undefined_flag, $1)="$_lt_dar_allow_undefined" - case $cc_basename in - ifort*) _lt_dar_can_shared=yes ;; - *) _lt_dar_can_shared=$GCC ;; - esac - if test "$_lt_dar_can_shared" = "yes"; then - output_verbose_link_cmd=func_echo_all - _LT_TAGVAR(archive_cmds, $1)="\$CC -dynamiclib \$allow_undefined_flag -o \$lib \$libobjs \$deplibs \$compiler_flags -install_name \$rpath/\$soname \$verstring $_lt_dar_single_mod${_lt_dsymutil}" - _LT_TAGVAR(module_cmds, $1)="\$CC \$allow_undefined_flag -o \$lib -bundle \$libobjs \$deplibs \$compiler_flags${_lt_dsymutil}" - _LT_TAGVAR(archive_expsym_cmds, $1)="sed 's,^,_,' < \$export_symbols > \$output_objdir/\${libname}-symbols.expsym~\$CC -dynamiclib \$allow_undefined_flag -o \$lib \$libobjs \$deplibs \$compiler_flags -install_name \$rpath/\$soname \$verstring ${_lt_dar_single_mod}${_lt_dar_export_syms}${_lt_dsymutil}" - _LT_TAGVAR(module_expsym_cmds, $1)="sed -e 's,^,_,' < \$export_symbols > \$output_objdir/\${libname}-symbols.expsym~\$CC \$allow_undefined_flag -o \$lib -bundle \$libobjs \$deplibs \$compiler_flags${_lt_dar_export_syms}${_lt_dsymutil}" - m4_if([$1], [CXX], -[ if test "$lt_cv_apple_cc_single_mod" != "yes"; then - _LT_TAGVAR(archive_cmds, $1)="\$CC -r -keep_private_externs -nostdlib -o \${lib}-master.o \$libobjs~\$CC -dynamiclib \$allow_undefined_flag -o \$lib \${lib}-master.o \$deplibs \$compiler_flags -install_name \$rpath/\$soname \$verstring${_lt_dsymutil}" - _LT_TAGVAR(archive_expsym_cmds, $1)="sed 's,^,_,' < \$export_symbols > \$output_objdir/\${libname}-symbols.expsym~\$CC -r -keep_private_externs -nostdlib -o \${lib}-master.o \$libobjs~\$CC -dynamiclib \$allow_undefined_flag -o \$lib \${lib}-master.o \$deplibs \$compiler_flags -install_name \$rpath/\$soname \$verstring${_lt_dar_export_syms}${_lt_dsymutil}" - fi -],[]) - else - _LT_TAGVAR(ld_shlibs, $1)=no - fi -]) - -# _LT_SYS_MODULE_PATH_AIX([TAGNAME]) -# ---------------------------------- -# Links a minimal program and checks the executable -# for the system default hardcoded library path. In most cases, -# this is /usr/lib:/lib, but when the MPI compilers are used -# the location of the communication and MPI libs are included too. -# If we don't find anything, use the default library path according -# to the aix ld manual. -# Store the results from the different compilers for each TAGNAME. -# Allow to override them for all tags through lt_cv_aix_libpath. -m4_defun([_LT_SYS_MODULE_PATH_AIX], -[m4_require([_LT_DECL_SED])dnl -if test "${lt_cv_aix_libpath+set}" = set; then - aix_libpath=$lt_cv_aix_libpath -else - AC_CACHE_VAL([_LT_TAGVAR([lt_cv_aix_libpath_], [$1])], - [AC_LINK_IFELSE([AC_LANG_PROGRAM],[ - lt_aix_libpath_sed='[ - /Import File Strings/,/^$/ { - /^0/ { - s/^0 *\([^ ]*\) *$/\1/ - p - } - }]' - _LT_TAGVAR([lt_cv_aix_libpath_], [$1])=`dump -H conftest$ac_exeext 2>/dev/null | $SED -n -e "$lt_aix_libpath_sed"` - # Check for a 64-bit object if we didn't find anything. - if test -z "$_LT_TAGVAR([lt_cv_aix_libpath_], [$1])"; then - _LT_TAGVAR([lt_cv_aix_libpath_], [$1])=`dump -HX64 conftest$ac_exeext 2>/dev/null | $SED -n -e "$lt_aix_libpath_sed"` - fi],[]) - if test -z "$_LT_TAGVAR([lt_cv_aix_libpath_], [$1])"; then - _LT_TAGVAR([lt_cv_aix_libpath_], [$1])="/usr/lib:/lib" - fi - ]) - aix_libpath=$_LT_TAGVAR([lt_cv_aix_libpath_], [$1]) -fi -])# _LT_SYS_MODULE_PATH_AIX - - -# _LT_SHELL_INIT(ARG) -# ------------------- -m4_define([_LT_SHELL_INIT], -[m4_divert_text([M4SH-INIT], [$1 -])])# _LT_SHELL_INIT - - - -# _LT_PROG_ECHO_BACKSLASH -# ----------------------- -# Find how we can fake an echo command that does not interpret backslash. -# In particular, with Autoconf 2.60 or later we add some code to the start -# of the generated configure script which will find a shell with a builtin -# printf (which we can use as an echo command). -m4_defun([_LT_PROG_ECHO_BACKSLASH], -[ECHO='\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\' -ECHO=$ECHO$ECHO$ECHO$ECHO$ECHO -ECHO=$ECHO$ECHO$ECHO$ECHO$ECHO$ECHO - -AC_MSG_CHECKING([how to print strings]) -# Test print first, because it will be a builtin if present. -if test "X`( print -r -- -n ) 2>/dev/null`" = X-n && \ - test "X`print -r -- $ECHO 2>/dev/null`" = "X$ECHO"; then - ECHO='print -r --' -elif test "X`printf %s $ECHO 2>/dev/null`" = "X$ECHO"; then - ECHO='printf %s\n' -else - # Use this function as a fallback that always works. - func_fallback_echo () - { - eval 'cat <<_LTECHO_EOF -$[]1 -_LTECHO_EOF' - } - ECHO='func_fallback_echo' -fi - -# func_echo_all arg... -# Invoke $ECHO with all args, space-separated. -func_echo_all () -{ - $ECHO "$*" -} - -case "$ECHO" in - printf*) AC_MSG_RESULT([printf]) ;; - print*) AC_MSG_RESULT([print -r]) ;; - *) AC_MSG_RESULT([cat]) ;; -esac - -m4_ifdef([_AS_DETECT_SUGGESTED], -[_AS_DETECT_SUGGESTED([ - test -n "${ZSH_VERSION+set}${BASH_VERSION+set}" || ( - ECHO='\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\' - ECHO=$ECHO$ECHO$ECHO$ECHO$ECHO - ECHO=$ECHO$ECHO$ECHO$ECHO$ECHO$ECHO - PATH=/empty FPATH=/empty; export PATH FPATH - test "X`printf %s $ECHO`" = "X$ECHO" \ - || test "X`print -r -- $ECHO`" = "X$ECHO" )])]) - -_LT_DECL([], [SHELL], [1], [Shell to use when invoking shell scripts]) -_LT_DECL([], [ECHO], [1], [An echo program that protects backslashes]) -])# _LT_PROG_ECHO_BACKSLASH - - -# _LT_WITH_SYSROOT -# ---------------- -AC_DEFUN([_LT_WITH_SYSROOT], -[AC_MSG_CHECKING([for sysroot]) -AC_ARG_WITH([sysroot], -[ --with-sysroot[=DIR] Search for dependent libraries within DIR - (or the compiler's sysroot if not specified).], -[], [with_sysroot=no]) - -dnl lt_sysroot will always be passed unquoted. We quote it here -dnl in case the user passed a directory name. -lt_sysroot= -case ${with_sysroot} in #( - yes) - if test "$GCC" = yes; then - lt_sysroot=`$CC --print-sysroot 2>/dev/null` - fi - ;; #( - /*) - lt_sysroot=`echo "$with_sysroot" | sed -e "$sed_quote_subst"` - ;; #( - no|'') - ;; #( - *) - AC_MSG_RESULT([${with_sysroot}]) - AC_MSG_ERROR([The sysroot must be an absolute path.]) - ;; -esac - - AC_MSG_RESULT([${lt_sysroot:-no}]) -_LT_DECL([], [lt_sysroot], [0], [The root where to search for ]dnl -[dependent libraries, and in which our libraries should be installed.])]) - -# _LT_ENABLE_LOCK -# --------------- -m4_defun([_LT_ENABLE_LOCK], -[AC_ARG_ENABLE([libtool-lock], - [AS_HELP_STRING([--disable-libtool-lock], - [avoid locking (might break parallel builds)])]) -test "x$enable_libtool_lock" != xno && enable_libtool_lock=yes - -# Some flags need to be propagated to the compiler or linker for good -# libtool support. -case $host in -ia64-*-hpux*) - # Find out which ABI we are using. - echo 'int i;' > conftest.$ac_ext - if AC_TRY_EVAL(ac_compile); then - case `/usr/bin/file conftest.$ac_objext` in - *ELF-32*) - HPUX_IA64_MODE="32" - ;; - *ELF-64*) - HPUX_IA64_MODE="64" - ;; - esac - fi - rm -rf conftest* - ;; -*-*-irix6*) - # Find out which ABI we are using. - echo '[#]line '$LINENO' "configure"' > conftest.$ac_ext - if AC_TRY_EVAL(ac_compile); then - if test "$lt_cv_prog_gnu_ld" = yes; then - case `/usr/bin/file conftest.$ac_objext` in - *32-bit*) - LD="${LD-ld} -melf32bsmip" - ;; - *N32*) - LD="${LD-ld} -melf32bmipn32" - ;; - *64-bit*) - LD="${LD-ld} -melf64bmip" - ;; - esac - else - case `/usr/bin/file conftest.$ac_objext` in - *32-bit*) - LD="${LD-ld} -32" - ;; - *N32*) - LD="${LD-ld} -n32" - ;; - *64-bit*) - LD="${LD-ld} -64" - ;; - esac - fi - fi - rm -rf conftest* - ;; - -x86_64-*kfreebsd*-gnu|x86_64-*linux*|ppc*-*linux*|powerpc*-*linux*| \ -s390*-*linux*|s390*-*tpf*|sparc*-*linux*) - # Find out which ABI we are using. - echo 'int i;' > conftest.$ac_ext - if AC_TRY_EVAL(ac_compile); then - case `/usr/bin/file conftest.o` in - *32-bit*) - case $host in - x86_64-*kfreebsd*-gnu) - LD="${LD-ld} -m elf_i386_fbsd" - ;; - x86_64-*linux*) - LD="${LD-ld} -m elf_i386" - ;; - ppc64-*linux*|powerpc64-*linux*) - LD="${LD-ld} -m elf32ppclinux" - ;; - s390x-*linux*) - LD="${LD-ld} -m elf_s390" - ;; - sparc64-*linux*) - LD="${LD-ld} -m elf32_sparc" - ;; - esac - ;; - *64-bit*) - case $host in - x86_64-*kfreebsd*-gnu) - LD="${LD-ld} -m elf_x86_64_fbsd" - ;; - x86_64-*linux*) - LD="${LD-ld} -m elf_x86_64" - ;; - ppc*-*linux*|powerpc*-*linux*) - LD="${LD-ld} -m elf64ppc" - ;; - s390*-*linux*|s390*-*tpf*) - LD="${LD-ld} -m elf64_s390" - ;; - sparc*-*linux*) - LD="${LD-ld} -m elf64_sparc" - ;; - esac - ;; - esac - fi - rm -rf conftest* - ;; - -*-*-sco3.2v5*) - # On SCO OpenServer 5, we need -belf to get full-featured binaries. - SAVE_CFLAGS="$CFLAGS" - CFLAGS="$CFLAGS -belf" - AC_CACHE_CHECK([whether the C compiler needs -belf], lt_cv_cc_needs_belf, - [AC_LANG_PUSH(C) - AC_LINK_IFELSE([AC_LANG_PROGRAM([[]],[[]])],[lt_cv_cc_needs_belf=yes],[lt_cv_cc_needs_belf=no]) - AC_LANG_POP]) - if test x"$lt_cv_cc_needs_belf" != x"yes"; then - # this is probably gcc 2.8.0, egcs 1.0 or newer; no need for -belf - CFLAGS="$SAVE_CFLAGS" - fi - ;; -*-*solaris*) - # Find out which ABI we are using. - echo 'int i;' > conftest.$ac_ext - if AC_TRY_EVAL(ac_compile); then - case `/usr/bin/file conftest.o` in - *64-bit*) - case $lt_cv_prog_gnu_ld in - yes*) - case $host in - i?86-*-solaris*) - LD="${LD-ld} -m elf_x86_64" - ;; - sparc*-*-solaris*) - LD="${LD-ld} -m elf64_sparc" - ;; - esac - # GNU ld 2.21 introduced _sol2 emulations. Use them if available. - if ${LD-ld} -V | grep _sol2 >/dev/null 2>&1; then - LD="${LD-ld}_sol2" - fi - ;; - *) - if ${LD-ld} -64 -r -o conftest2.o conftest.o >/dev/null 2>&1; then - LD="${LD-ld} -64" - fi - ;; - esac - ;; - esac - fi - rm -rf conftest* - ;; -esac - -need_locks="$enable_libtool_lock" -])# _LT_ENABLE_LOCK - - -# _LT_PROG_AR -# ----------- -m4_defun([_LT_PROG_AR], -[AC_CHECK_TOOLS(AR, [ar], false) -: ${AR=ar} -: ${AR_FLAGS=cru} -_LT_DECL([], [AR], [1], [The archiver]) -_LT_DECL([], [AR_FLAGS], [1], [Flags to create an archive]) - -AC_CACHE_CHECK([for archiver @FILE support], [lt_cv_ar_at_file], - [lt_cv_ar_at_file=no - AC_COMPILE_IFELSE([AC_LANG_PROGRAM], - [echo conftest.$ac_objext > conftest.lst - lt_ar_try='$AR $AR_FLAGS libconftest.a @conftest.lst >&AS_MESSAGE_LOG_FD' - AC_TRY_EVAL([lt_ar_try]) - if test "$ac_status" -eq 0; then - # Ensure the archiver fails upon bogus file names. - rm -f conftest.$ac_objext libconftest.a - AC_TRY_EVAL([lt_ar_try]) - if test "$ac_status" -ne 0; then - lt_cv_ar_at_file=@ - fi - fi - rm -f conftest.* libconftest.a - ]) - ]) - -if test "x$lt_cv_ar_at_file" = xno; then - archiver_list_spec= -else - archiver_list_spec=$lt_cv_ar_at_file -fi -_LT_DECL([], [archiver_list_spec], [1], - [How to feed a file listing to the archiver]) -])# _LT_PROG_AR - - -# _LT_CMD_OLD_ARCHIVE -# ------------------- -m4_defun([_LT_CMD_OLD_ARCHIVE], -[_LT_PROG_AR - -AC_CHECK_TOOL(STRIP, strip, :) -test -z "$STRIP" && STRIP=: -_LT_DECL([], [STRIP], [1], [A symbol stripping program]) - -AC_CHECK_TOOL(RANLIB, ranlib, :) -test -z "$RANLIB" && RANLIB=: -_LT_DECL([], [RANLIB], [1], - [Commands used to install an old-style archive]) - -# Determine commands to create old-style static archives. -old_archive_cmds='$AR $AR_FLAGS $oldlib$oldobjs' -old_postinstall_cmds='chmod 644 $oldlib' -old_postuninstall_cmds= - -if test -n "$RANLIB"; then - case $host_os in - openbsd*) - old_postinstall_cmds="$old_postinstall_cmds~\$RANLIB -t \$tool_oldlib" - ;; - *) - old_postinstall_cmds="$old_postinstall_cmds~\$RANLIB \$tool_oldlib" - ;; - esac - old_archive_cmds="$old_archive_cmds~\$RANLIB \$tool_oldlib" -fi - -case $host_os in - darwin*) - lock_old_archive_extraction=yes ;; - *) - lock_old_archive_extraction=no ;; -esac -_LT_DECL([], [old_postinstall_cmds], [2]) -_LT_DECL([], [old_postuninstall_cmds], [2]) -_LT_TAGDECL([], [old_archive_cmds], [2], - [Commands used to build an old-style archive]) -_LT_DECL([], [lock_old_archive_extraction], [0], - [Whether to use a lock for old archive extraction]) -])# _LT_CMD_OLD_ARCHIVE - - -# _LT_COMPILER_OPTION(MESSAGE, VARIABLE-NAME, FLAGS, -# [OUTPUT-FILE], [ACTION-SUCCESS], [ACTION-FAILURE]) -# ---------------------------------------------------------------- -# Check whether the given compiler option works -AC_DEFUN([_LT_COMPILER_OPTION], -[m4_require([_LT_FILEUTILS_DEFAULTS])dnl -m4_require([_LT_DECL_SED])dnl -AC_CACHE_CHECK([$1], [$2], - [$2=no - m4_if([$4], , [ac_outfile=conftest.$ac_objext], [ac_outfile=$4]) - echo "$lt_simple_compile_test_code" > conftest.$ac_ext - lt_compiler_flag="$3" - # Insert the option either (1) after the last *FLAGS variable, or - # (2) before a word containing "conftest.", or (3) at the end. - # Note that $ac_compile itself does not contain backslashes and begins - # with a dollar sign (not a hyphen), so the echo should work correctly. - # The option is referenced via a variable to avoid confusing sed. - lt_compile=`echo "$ac_compile" | $SED \ - -e 's:.*FLAGS}\{0,1\} :&$lt_compiler_flag :; t' \ - -e 's: [[^ ]]*conftest\.: $lt_compiler_flag&:; t' \ - -e 's:$: $lt_compiler_flag:'` - (eval echo "\"\$as_me:$LINENO: $lt_compile\"" >&AS_MESSAGE_LOG_FD) - (eval "$lt_compile" 2>conftest.err) - ac_status=$? - cat conftest.err >&AS_MESSAGE_LOG_FD - echo "$as_me:$LINENO: \$? = $ac_status" >&AS_MESSAGE_LOG_FD - if (exit $ac_status) && test -s "$ac_outfile"; then - # The compiler can only warn and ignore the option if not recognized - # So say no if there are warnings other than the usual output. - $ECHO "$_lt_compiler_boilerplate" | $SED '/^$/d' >conftest.exp - $SED '/^$/d; /^ *+/d' conftest.err >conftest.er2 - if test ! -s conftest.er2 || diff conftest.exp conftest.er2 >/dev/null; then - $2=yes - fi - fi - $RM conftest* -]) - -if test x"[$]$2" = xyes; then - m4_if([$5], , :, [$5]) -else - m4_if([$6], , :, [$6]) -fi -])# _LT_COMPILER_OPTION - -# Old name: -AU_ALIAS([AC_LIBTOOL_COMPILER_OPTION], [_LT_COMPILER_OPTION]) -dnl aclocal-1.4 backwards compatibility: -dnl AC_DEFUN([AC_LIBTOOL_COMPILER_OPTION], []) - - -# _LT_LINKER_OPTION(MESSAGE, VARIABLE-NAME, FLAGS, -# [ACTION-SUCCESS], [ACTION-FAILURE]) -# ---------------------------------------------------- -# Check whether the given linker option works -AC_DEFUN([_LT_LINKER_OPTION], -[m4_require([_LT_FILEUTILS_DEFAULTS])dnl -m4_require([_LT_DECL_SED])dnl -AC_CACHE_CHECK([$1], [$2], - [$2=no - save_LDFLAGS="$LDFLAGS" - LDFLAGS="$LDFLAGS $3" - echo "$lt_simple_link_test_code" > conftest.$ac_ext - if (eval $ac_link 2>conftest.err) && test -s conftest$ac_exeext; then - # The linker can only warn and ignore the option if not recognized - # So say no if there are warnings - if test -s conftest.err; then - # Append any errors to the config.log. - cat conftest.err 1>&AS_MESSAGE_LOG_FD - $ECHO "$_lt_linker_boilerplate" | $SED '/^$/d' > conftest.exp - $SED '/^$/d; /^ *+/d' conftest.err >conftest.er2 - if diff conftest.exp conftest.er2 >/dev/null; then - $2=yes - fi - else - $2=yes - fi - fi - $RM -r conftest* - LDFLAGS="$save_LDFLAGS" -]) - -if test x"[$]$2" = xyes; then - m4_if([$4], , :, [$4]) -else - m4_if([$5], , :, [$5]) -fi -])# _LT_LINKER_OPTION - -# Old name: -AU_ALIAS([AC_LIBTOOL_LINKER_OPTION], [_LT_LINKER_OPTION]) -dnl aclocal-1.4 backwards compatibility: -dnl AC_DEFUN([AC_LIBTOOL_LINKER_OPTION], []) - - -# LT_CMD_MAX_LEN -#--------------- -AC_DEFUN([LT_CMD_MAX_LEN], -[AC_REQUIRE([AC_CANONICAL_HOST])dnl -# find the maximum length of command line arguments -AC_MSG_CHECKING([the maximum length of command line arguments]) -AC_CACHE_VAL([lt_cv_sys_max_cmd_len], [dnl - i=0 - teststring="ABCD" - - case $build_os in - msdosdjgpp*) - # On DJGPP, this test can blow up pretty badly due to problems in libc - # (any single argument exceeding 2000 bytes causes a buffer overrun - # during glob expansion). Even if it were fixed, the result of this - # check would be larger than it should be. - lt_cv_sys_max_cmd_len=12288; # 12K is about right - ;; - - gnu*) - # Under GNU Hurd, this test is not required because there is - # no limit to the length of command line arguments. - # Libtool will interpret -1 as no limit whatsoever - lt_cv_sys_max_cmd_len=-1; - ;; - - cygwin* | mingw* | cegcc*) - # On Win9x/ME, this test blows up -- it succeeds, but takes - # about 5 minutes as the teststring grows exponentially. - # Worse, since 9x/ME are not pre-emptively multitasking, - # you end up with a "frozen" computer, even though with patience - # the test eventually succeeds (with a max line length of 256k). - # Instead, let's just punt: use the minimum linelength reported by - # all of the supported platforms: 8192 (on NT/2K/XP). - lt_cv_sys_max_cmd_len=8192; - ;; - - mint*) - # On MiNT this can take a long time and run out of memory. - lt_cv_sys_max_cmd_len=8192; - ;; - - amigaos*) - # On AmigaOS with pdksh, this test takes hours, literally. - # So we just punt and use a minimum line length of 8192. - lt_cv_sys_max_cmd_len=8192; - ;; - - netbsd* | freebsd* | openbsd* | darwin* | dragonfly*) - # This has been around since 386BSD, at least. Likely further. - if test -x /sbin/sysctl; then - lt_cv_sys_max_cmd_len=`/sbin/sysctl -n kern.argmax` - elif test -x /usr/sbin/sysctl; then - lt_cv_sys_max_cmd_len=`/usr/sbin/sysctl -n kern.argmax` - else - lt_cv_sys_max_cmd_len=65536 # usable default for all BSDs - fi - # And add a safety zone - lt_cv_sys_max_cmd_len=`expr $lt_cv_sys_max_cmd_len \/ 4` - lt_cv_sys_max_cmd_len=`expr $lt_cv_sys_max_cmd_len \* 3` - ;; - - interix*) - # We know the value 262144 and hardcode it with a safety zone (like BSD) - lt_cv_sys_max_cmd_len=196608 - ;; - - os2*) - # The test takes a long time on OS/2. - lt_cv_sys_max_cmd_len=8192 - ;; - - osf*) - # Dr. Hans Ekkehard Plesser reports seeing a kernel panic running configure - # due to this test when exec_disable_arg_limit is 1 on Tru64. It is not - # nice to cause kernel panics so lets avoid the loop below. - # First set a reasonable default. - lt_cv_sys_max_cmd_len=16384 - # - if test -x /sbin/sysconfig; then - case `/sbin/sysconfig -q proc exec_disable_arg_limit` in - *1*) lt_cv_sys_max_cmd_len=-1 ;; - esac - fi - ;; - sco3.2v5*) - lt_cv_sys_max_cmd_len=102400 - ;; - sysv5* | sco5v6* | sysv4.2uw2*) - kargmax=`grep ARG_MAX /etc/conf/cf.d/stune 2>/dev/null` - if test -n "$kargmax"; then - lt_cv_sys_max_cmd_len=`echo $kargmax | sed 's/.*[[ ]]//'` - else - lt_cv_sys_max_cmd_len=32768 - fi - ;; - *) - lt_cv_sys_max_cmd_len=`(getconf ARG_MAX) 2> /dev/null` - if test -n "$lt_cv_sys_max_cmd_len"; then - lt_cv_sys_max_cmd_len=`expr $lt_cv_sys_max_cmd_len \/ 4` - lt_cv_sys_max_cmd_len=`expr $lt_cv_sys_max_cmd_len \* 3` - else - # Make teststring a little bigger before we do anything with it. - # a 1K string should be a reasonable start. - for i in 1 2 3 4 5 6 7 8 ; do - teststring=$teststring$teststring - done - SHELL=${SHELL-${CONFIG_SHELL-/bin/sh}} - # If test is not a shell built-in, we'll probably end up computing a - # maximum length that is only half of the actual maximum length, but - # we can't tell. - while { test "X"`env echo "$teststring$teststring" 2>/dev/null` \ - = "X$teststring$teststring"; } >/dev/null 2>&1 && - test $i != 17 # 1/2 MB should be enough - do - i=`expr $i + 1` - teststring=$teststring$teststring - done - # Only check the string length outside the loop. - lt_cv_sys_max_cmd_len=`expr "X$teststring" : ".*" 2>&1` - teststring= - # Add a significant safety factor because C++ compilers can tack on - # massive amounts of additional arguments before passing them to the - # linker. It appears as though 1/2 is a usable value. - lt_cv_sys_max_cmd_len=`expr $lt_cv_sys_max_cmd_len \/ 2` - fi - ;; - esac -]) -if test -n $lt_cv_sys_max_cmd_len ; then - AC_MSG_RESULT($lt_cv_sys_max_cmd_len) -else - AC_MSG_RESULT(none) -fi -max_cmd_len=$lt_cv_sys_max_cmd_len -_LT_DECL([], [max_cmd_len], [0], - [What is the maximum length of a command?]) -])# LT_CMD_MAX_LEN - -# Old name: -AU_ALIAS([AC_LIBTOOL_SYS_MAX_CMD_LEN], [LT_CMD_MAX_LEN]) -dnl aclocal-1.4 backwards compatibility: -dnl AC_DEFUN([AC_LIBTOOL_SYS_MAX_CMD_LEN], []) - - -# _LT_HEADER_DLFCN -# ---------------- -m4_defun([_LT_HEADER_DLFCN], -[AC_CHECK_HEADERS([dlfcn.h], [], [], [AC_INCLUDES_DEFAULT])dnl -])# _LT_HEADER_DLFCN - - -# _LT_TRY_DLOPEN_SELF (ACTION-IF-TRUE, ACTION-IF-TRUE-W-USCORE, -# ACTION-IF-FALSE, ACTION-IF-CROSS-COMPILING) -# ---------------------------------------------------------------- -m4_defun([_LT_TRY_DLOPEN_SELF], -[m4_require([_LT_HEADER_DLFCN])dnl -if test "$cross_compiling" = yes; then : - [$4] -else - lt_dlunknown=0; lt_dlno_uscore=1; lt_dlneed_uscore=2 - lt_status=$lt_dlunknown - cat > conftest.$ac_ext <<_LT_EOF -[#line $LINENO "configure" -#include "confdefs.h" - -#if HAVE_DLFCN_H -#include -#endif - -#include - -#ifdef RTLD_GLOBAL -# define LT_DLGLOBAL RTLD_GLOBAL -#else -# ifdef DL_GLOBAL -# define LT_DLGLOBAL DL_GLOBAL -# else -# define LT_DLGLOBAL 0 -# endif -#endif - -/* We may have to define LT_DLLAZY_OR_NOW in the command line if we - find out it does not work in some platform. */ -#ifndef LT_DLLAZY_OR_NOW -# ifdef RTLD_LAZY -# define LT_DLLAZY_OR_NOW RTLD_LAZY -# else -# ifdef DL_LAZY -# define LT_DLLAZY_OR_NOW DL_LAZY -# else -# ifdef RTLD_NOW -# define LT_DLLAZY_OR_NOW RTLD_NOW -# else -# ifdef DL_NOW -# define LT_DLLAZY_OR_NOW DL_NOW -# else -# define LT_DLLAZY_OR_NOW 0 -# endif -# endif -# endif -# endif -#endif - -/* When -fvisbility=hidden is used, assume the code has been annotated - correspondingly for the symbols needed. */ -#if defined(__GNUC__) && (((__GNUC__ == 3) && (__GNUC_MINOR__ >= 3)) || (__GNUC__ > 3)) -int fnord () __attribute__((visibility("default"))); -#endif - -int fnord () { return 42; } -int main () -{ - void *self = dlopen (0, LT_DLGLOBAL|LT_DLLAZY_OR_NOW); - int status = $lt_dlunknown; - - if (self) - { - if (dlsym (self,"fnord")) status = $lt_dlno_uscore; - else - { - if (dlsym( self,"_fnord")) status = $lt_dlneed_uscore; - else puts (dlerror ()); - } - /* dlclose (self); */ - } - else - puts (dlerror ()); - - return status; -}] -_LT_EOF - if AC_TRY_EVAL(ac_link) && test -s conftest${ac_exeext} 2>/dev/null; then - (./conftest; exit; ) >&AS_MESSAGE_LOG_FD 2>/dev/null - lt_status=$? - case x$lt_status in - x$lt_dlno_uscore) $1 ;; - x$lt_dlneed_uscore) $2 ;; - x$lt_dlunknown|x*) $3 ;; - esac - else : - # compilation failed - $3 - fi -fi -rm -fr conftest* -])# _LT_TRY_DLOPEN_SELF - - -# LT_SYS_DLOPEN_SELF -# ------------------ -AC_DEFUN([LT_SYS_DLOPEN_SELF], -[m4_require([_LT_HEADER_DLFCN])dnl -if test "x$enable_dlopen" != xyes; then - enable_dlopen=unknown - enable_dlopen_self=unknown - enable_dlopen_self_static=unknown -else - lt_cv_dlopen=no - lt_cv_dlopen_libs= - - case $host_os in - beos*) - lt_cv_dlopen="load_add_on" - lt_cv_dlopen_libs= - lt_cv_dlopen_self=yes - ;; - - mingw* | pw32* | cegcc*) - lt_cv_dlopen="LoadLibrary" - lt_cv_dlopen_libs= - ;; - - cygwin*) - lt_cv_dlopen="dlopen" - lt_cv_dlopen_libs= - ;; - - darwin*) - # if libdl is installed we need to link against it - AC_CHECK_LIB([dl], [dlopen], - [lt_cv_dlopen="dlopen" lt_cv_dlopen_libs="-ldl"],[ - lt_cv_dlopen="dyld" - lt_cv_dlopen_libs= - lt_cv_dlopen_self=yes - ]) - ;; - - *) - AC_CHECK_FUNC([shl_load], - [lt_cv_dlopen="shl_load"], - [AC_CHECK_LIB([dld], [shl_load], - [lt_cv_dlopen="shl_load" lt_cv_dlopen_libs="-ldld"], - [AC_CHECK_FUNC([dlopen], - [lt_cv_dlopen="dlopen"], - [AC_CHECK_LIB([dl], [dlopen], - [lt_cv_dlopen="dlopen" lt_cv_dlopen_libs="-ldl"], - [AC_CHECK_LIB([svld], [dlopen], - [lt_cv_dlopen="dlopen" lt_cv_dlopen_libs="-lsvld"], - [AC_CHECK_LIB([dld], [dld_link], - [lt_cv_dlopen="dld_link" lt_cv_dlopen_libs="-ldld"]) - ]) - ]) - ]) - ]) - ]) - ;; - esac - - if test "x$lt_cv_dlopen" != xno; then - enable_dlopen=yes - else - enable_dlopen=no - fi - - case $lt_cv_dlopen in - dlopen) - save_CPPFLAGS="$CPPFLAGS" - test "x$ac_cv_header_dlfcn_h" = xyes && CPPFLAGS="$CPPFLAGS -DHAVE_DLFCN_H" - - save_LDFLAGS="$LDFLAGS" - wl=$lt_prog_compiler_wl eval LDFLAGS=\"\$LDFLAGS $export_dynamic_flag_spec\" - - save_LIBS="$LIBS" - LIBS="$lt_cv_dlopen_libs $LIBS" - - AC_CACHE_CHECK([whether a program can dlopen itself], - lt_cv_dlopen_self, [dnl - _LT_TRY_DLOPEN_SELF( - lt_cv_dlopen_self=yes, lt_cv_dlopen_self=yes, - lt_cv_dlopen_self=no, lt_cv_dlopen_self=cross) - ]) - - if test "x$lt_cv_dlopen_self" = xyes; then - wl=$lt_prog_compiler_wl eval LDFLAGS=\"\$LDFLAGS $lt_prog_compiler_static\" - AC_CACHE_CHECK([whether a statically linked program can dlopen itself], - lt_cv_dlopen_self_static, [dnl - _LT_TRY_DLOPEN_SELF( - lt_cv_dlopen_self_static=yes, lt_cv_dlopen_self_static=yes, - lt_cv_dlopen_self_static=no, lt_cv_dlopen_self_static=cross) - ]) - fi - - CPPFLAGS="$save_CPPFLAGS" - LDFLAGS="$save_LDFLAGS" - LIBS="$save_LIBS" - ;; - esac - - case $lt_cv_dlopen_self in - yes|no) enable_dlopen_self=$lt_cv_dlopen_self ;; - *) enable_dlopen_self=unknown ;; - esac - - case $lt_cv_dlopen_self_static in - yes|no) enable_dlopen_self_static=$lt_cv_dlopen_self_static ;; - *) enable_dlopen_self_static=unknown ;; - esac -fi -_LT_DECL([dlopen_support], [enable_dlopen], [0], - [Whether dlopen is supported]) -_LT_DECL([dlopen_self], [enable_dlopen_self], [0], - [Whether dlopen of programs is supported]) -_LT_DECL([dlopen_self_static], [enable_dlopen_self_static], [0], - [Whether dlopen of statically linked programs is supported]) -])# LT_SYS_DLOPEN_SELF - -# Old name: -AU_ALIAS([AC_LIBTOOL_DLOPEN_SELF], [LT_SYS_DLOPEN_SELF]) -dnl aclocal-1.4 backwards compatibility: -dnl AC_DEFUN([AC_LIBTOOL_DLOPEN_SELF], []) - - -# _LT_COMPILER_C_O([TAGNAME]) -# --------------------------- -# Check to see if options -c and -o are simultaneously supported by compiler. -# This macro does not hard code the compiler like AC_PROG_CC_C_O. -m4_defun([_LT_COMPILER_C_O], -[m4_require([_LT_DECL_SED])dnl -m4_require([_LT_FILEUTILS_DEFAULTS])dnl -m4_require([_LT_TAG_COMPILER])dnl -AC_CACHE_CHECK([if $compiler supports -c -o file.$ac_objext], - [_LT_TAGVAR(lt_cv_prog_compiler_c_o, $1)], - [_LT_TAGVAR(lt_cv_prog_compiler_c_o, $1)=no - $RM -r conftest 2>/dev/null - mkdir conftest - cd conftest - mkdir out - echo "$lt_simple_compile_test_code" > conftest.$ac_ext - - lt_compiler_flag="-o out/conftest2.$ac_objext" - # Insert the option either (1) after the last *FLAGS variable, or - # (2) before a word containing "conftest.", or (3) at the end. - # Note that $ac_compile itself does not contain backslashes and begins - # with a dollar sign (not a hyphen), so the echo should work correctly. - lt_compile=`echo "$ac_compile" | $SED \ - -e 's:.*FLAGS}\{0,1\} :&$lt_compiler_flag :; t' \ - -e 's: [[^ ]]*conftest\.: $lt_compiler_flag&:; t' \ - -e 's:$: $lt_compiler_flag:'` - (eval echo "\"\$as_me:$LINENO: $lt_compile\"" >&AS_MESSAGE_LOG_FD) - (eval "$lt_compile" 2>out/conftest.err) - ac_status=$? - cat out/conftest.err >&AS_MESSAGE_LOG_FD - echo "$as_me:$LINENO: \$? = $ac_status" >&AS_MESSAGE_LOG_FD - if (exit $ac_status) && test -s out/conftest2.$ac_objext - then - # The compiler can only warn and ignore the option if not recognized - # So say no if there are warnings - $ECHO "$_lt_compiler_boilerplate" | $SED '/^$/d' > out/conftest.exp - $SED '/^$/d; /^ *+/d' out/conftest.err >out/conftest.er2 - if test ! -s out/conftest.er2 || diff out/conftest.exp out/conftest.er2 >/dev/null; then - _LT_TAGVAR(lt_cv_prog_compiler_c_o, $1)=yes - fi - fi - chmod u+w . 2>&AS_MESSAGE_LOG_FD - $RM conftest* - # SGI C++ compiler will create directory out/ii_files/ for - # template instantiation - test -d out/ii_files && $RM out/ii_files/* && rmdir out/ii_files - $RM out/* && rmdir out - cd .. - $RM -r conftest - $RM conftest* -]) -_LT_TAGDECL([compiler_c_o], [lt_cv_prog_compiler_c_o], [1], - [Does compiler simultaneously support -c and -o options?]) -])# _LT_COMPILER_C_O - - -# _LT_COMPILER_FILE_LOCKS([TAGNAME]) -# ---------------------------------- -# Check to see if we can do hard links to lock some files if needed -m4_defun([_LT_COMPILER_FILE_LOCKS], -[m4_require([_LT_ENABLE_LOCK])dnl -m4_require([_LT_FILEUTILS_DEFAULTS])dnl -_LT_COMPILER_C_O([$1]) - -hard_links="nottested" -if test "$_LT_TAGVAR(lt_cv_prog_compiler_c_o, $1)" = no && test "$need_locks" != no; then - # do not overwrite the value of need_locks provided by the user - AC_MSG_CHECKING([if we can lock with hard links]) - hard_links=yes - $RM conftest* - ln conftest.a conftest.b 2>/dev/null && hard_links=no - touch conftest.a - ln conftest.a conftest.b 2>&5 || hard_links=no - ln conftest.a conftest.b 2>/dev/null && hard_links=no - AC_MSG_RESULT([$hard_links]) - if test "$hard_links" = no; then - AC_MSG_WARN([`$CC' does not support `-c -o', so `make -j' may be unsafe]) - need_locks=warn - fi -else - need_locks=no -fi -_LT_DECL([], [need_locks], [1], [Must we lock files when doing compilation?]) -])# _LT_COMPILER_FILE_LOCKS - - -# _LT_CHECK_OBJDIR -# ---------------- -m4_defun([_LT_CHECK_OBJDIR], -[AC_CACHE_CHECK([for objdir], [lt_cv_objdir], -[rm -f .libs 2>/dev/null -mkdir .libs 2>/dev/null -if test -d .libs; then - lt_cv_objdir=.libs -else - # MS-DOS does not allow filenames that begin with a dot. - lt_cv_objdir=_libs -fi -rmdir .libs 2>/dev/null]) -objdir=$lt_cv_objdir -_LT_DECL([], [objdir], [0], - [The name of the directory that contains temporary libtool files])dnl -m4_pattern_allow([LT_OBJDIR])dnl -AC_DEFINE_UNQUOTED(LT_OBJDIR, "$lt_cv_objdir/", - [Define to the sub-directory in which libtool stores uninstalled libraries.]) -])# _LT_CHECK_OBJDIR - - -# _LT_LINKER_HARDCODE_LIBPATH([TAGNAME]) -# -------------------------------------- -# Check hardcoding attributes. -m4_defun([_LT_LINKER_HARDCODE_LIBPATH], -[AC_MSG_CHECKING([how to hardcode library paths into programs]) -_LT_TAGVAR(hardcode_action, $1)= -if test -n "$_LT_TAGVAR(hardcode_libdir_flag_spec, $1)" || - test -n "$_LT_TAGVAR(runpath_var, $1)" || - test "X$_LT_TAGVAR(hardcode_automatic, $1)" = "Xyes" ; then - - # We can hardcode non-existent directories. - if test "$_LT_TAGVAR(hardcode_direct, $1)" != no && - # If the only mechanism to avoid hardcoding is shlibpath_var, we - # have to relink, otherwise we might link with an installed library - # when we should be linking with a yet-to-be-installed one - ## test "$_LT_TAGVAR(hardcode_shlibpath_var, $1)" != no && - test "$_LT_TAGVAR(hardcode_minus_L, $1)" != no; then - # Linking always hardcodes the temporary library directory. - _LT_TAGVAR(hardcode_action, $1)=relink - else - # We can link without hardcoding, and we can hardcode nonexisting dirs. - _LT_TAGVAR(hardcode_action, $1)=immediate - fi -else - # We cannot hardcode anything, or else we can only hardcode existing - # directories. - _LT_TAGVAR(hardcode_action, $1)=unsupported -fi -AC_MSG_RESULT([$_LT_TAGVAR(hardcode_action, $1)]) - -if test "$_LT_TAGVAR(hardcode_action, $1)" = relink || - test "$_LT_TAGVAR(inherit_rpath, $1)" = yes; then - # Fast installation is not supported - enable_fast_install=no -elif test "$shlibpath_overrides_runpath" = yes || - test "$enable_shared" = no; then - # Fast installation is not necessary - enable_fast_install=needless -fi -_LT_TAGDECL([], [hardcode_action], [0], - [How to hardcode a shared library path into an executable]) -])# _LT_LINKER_HARDCODE_LIBPATH - - -# _LT_CMD_STRIPLIB -# ---------------- -m4_defun([_LT_CMD_STRIPLIB], -[m4_require([_LT_DECL_EGREP]) -striplib= -old_striplib= -AC_MSG_CHECKING([whether stripping libraries is possible]) -if test -n "$STRIP" && $STRIP -V 2>&1 | $GREP "GNU strip" >/dev/null; then - test -z "$old_striplib" && old_striplib="$STRIP --strip-debug" - test -z "$striplib" && striplib="$STRIP --strip-unneeded" - AC_MSG_RESULT([yes]) -else -# FIXME - insert some real tests, host_os isn't really good enough - case $host_os in - darwin*) - if test -n "$STRIP" ; then - striplib="$STRIP -x" - old_striplib="$STRIP -S" - AC_MSG_RESULT([yes]) - else - AC_MSG_RESULT([no]) - fi - ;; - *) - AC_MSG_RESULT([no]) - ;; - esac -fi -_LT_DECL([], [old_striplib], [1], [Commands to strip libraries]) -_LT_DECL([], [striplib], [1]) -])# _LT_CMD_STRIPLIB - - -# _LT_SYS_DYNAMIC_LINKER([TAG]) -# ----------------------------- -# PORTME Fill in your ld.so characteristics -m4_defun([_LT_SYS_DYNAMIC_LINKER], -[AC_REQUIRE([AC_CANONICAL_HOST])dnl -m4_require([_LT_DECL_EGREP])dnl -m4_require([_LT_FILEUTILS_DEFAULTS])dnl -m4_require([_LT_DECL_OBJDUMP])dnl -m4_require([_LT_DECL_SED])dnl -m4_require([_LT_CHECK_SHELL_FEATURES])dnl -AC_MSG_CHECKING([dynamic linker characteristics]) -m4_if([$1], - [], [ -if test "$GCC" = yes; then - case $host_os in - darwin*) lt_awk_arg="/^libraries:/,/LR/" ;; - *) lt_awk_arg="/^libraries:/" ;; - esac - case $host_os in - mingw* | cegcc*) lt_sed_strip_eq="s,=\([[A-Za-z]]:\),\1,g" ;; - *) lt_sed_strip_eq="s,=/,/,g" ;; - esac - lt_search_path_spec=`$CC -print-search-dirs | awk $lt_awk_arg | $SED -e "s/^libraries://" -e $lt_sed_strip_eq` - case $lt_search_path_spec in - *\;*) - # if the path contains ";" then we assume it to be the separator - # otherwise default to the standard path separator (i.e. ":") - it is - # assumed that no part of a normal pathname contains ";" but that should - # okay in the real world where ";" in dirpaths is itself problematic. - lt_search_path_spec=`$ECHO "$lt_search_path_spec" | $SED 's/;/ /g'` - ;; - *) - lt_search_path_spec=`$ECHO "$lt_search_path_spec" | $SED "s/$PATH_SEPARATOR/ /g"` - ;; - esac - # Ok, now we have the path, separated by spaces, we can step through it - # and add multilib dir if necessary. - lt_tmp_lt_search_path_spec= - lt_multi_os_dir=`$CC $CPPFLAGS $CFLAGS $LDFLAGS -print-multi-os-directory 2>/dev/null` - for lt_sys_path in $lt_search_path_spec; do - if test -d "$lt_sys_path/$lt_multi_os_dir"; then - lt_tmp_lt_search_path_spec="$lt_tmp_lt_search_path_spec $lt_sys_path/$lt_multi_os_dir" - else - test -d "$lt_sys_path" && \ - lt_tmp_lt_search_path_spec="$lt_tmp_lt_search_path_spec $lt_sys_path" - fi - done - lt_search_path_spec=`$ECHO "$lt_tmp_lt_search_path_spec" | awk ' -BEGIN {RS=" "; FS="/|\n";} { - lt_foo=""; - lt_count=0; - for (lt_i = NF; lt_i > 0; lt_i--) { - if ($lt_i != "" && $lt_i != ".") { - if ($lt_i == "..") { - lt_count++; - } else { - if (lt_count == 0) { - lt_foo="/" $lt_i lt_foo; - } else { - lt_count--; - } - } - } - } - if (lt_foo != "") { lt_freq[[lt_foo]]++; } - if (lt_freq[[lt_foo]] == 1) { print lt_foo; } -}'` - # AWK program above erroneously prepends '/' to C:/dos/paths - # for these hosts. - case $host_os in - mingw* | cegcc*) lt_search_path_spec=`$ECHO "$lt_search_path_spec" |\ - $SED 's,/\([[A-Za-z]]:\),\1,g'` ;; - esac - sys_lib_search_path_spec=`$ECHO "$lt_search_path_spec" | $lt_NL2SP` -else - sys_lib_search_path_spec="/lib /usr/lib /usr/local/lib" -fi]) -library_names_spec= -libname_spec='lib$name' -soname_spec= -shrext_cmds=".so" -postinstall_cmds= -postuninstall_cmds= -finish_cmds= -finish_eval= -shlibpath_var= -shlibpath_overrides_runpath=unknown -version_type=none -dynamic_linker="$host_os ld.so" -sys_lib_dlsearch_path_spec="/lib /usr/lib" -need_lib_prefix=unknown -hardcode_into_libs=no - -# when you set need_version to no, make sure it does not cause -set_version -# flags to be left without arguments -need_version=unknown - -case $host_os in -aix3*) - version_type=linux # correct to gnu/linux during the next big refactor - library_names_spec='${libname}${release}${shared_ext}$versuffix $libname.a' - shlibpath_var=LIBPATH - - # AIX 3 has no versioning support, so we append a major version to the name. - soname_spec='${libname}${release}${shared_ext}$major' - ;; - -aix[[4-9]]*) - version_type=linux # correct to gnu/linux during the next big refactor - need_lib_prefix=no - need_version=no - hardcode_into_libs=yes - if test "$host_cpu" = ia64; then - # AIX 5 supports IA64 - library_names_spec='${libname}${release}${shared_ext}$major ${libname}${release}${shared_ext}$versuffix $libname${shared_ext}' - shlibpath_var=LD_LIBRARY_PATH - else - # With GCC up to 2.95.x, collect2 would create an import file - # for dependence libraries. The import file would start with - # the line `#! .'. This would cause the generated library to - # depend on `.', always an invalid library. This was fixed in - # development snapshots of GCC prior to 3.0. - case $host_os in - aix4 | aix4.[[01]] | aix4.[[01]].*) - if { echo '#if __GNUC__ > 2 || (__GNUC__ == 2 && __GNUC_MINOR__ >= 97)' - echo ' yes ' - echo '#endif'; } | ${CC} -E - | $GREP yes > /dev/null; then - : - else - can_build_shared=no - fi - ;; - esac - # AIX (on Power*) has no versioning support, so currently we can not hardcode correct - # soname into executable. Probably we can add versioning support to - # collect2, so additional links can be useful in future. - if test "$aix_use_runtimelinking" = yes; then - # If using run time linking (on AIX 4.2 or later) use lib.so - # instead of lib.a to let people know that these are not - # typical AIX shared libraries. - library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}$major $libname${shared_ext}' - else - # We preserve .a as extension for shared libraries through AIX4.2 - # and later when we are not doing run time linking. - library_names_spec='${libname}${release}.a $libname.a' - soname_spec='${libname}${release}${shared_ext}$major' - fi - shlibpath_var=LIBPATH - fi - ;; - -amigaos*) - case $host_cpu in - powerpc) - # Since July 2007 AmigaOS4 officially supports .so libraries. - # When compiling the executable, add -use-dynld -Lsobjs: to the compileline. - library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}$major $libname${shared_ext}' - ;; - m68k) - library_names_spec='$libname.ixlibrary $libname.a' - # Create ${libname}_ixlibrary.a entries in /sys/libs. - finish_eval='for lib in `ls $libdir/*.ixlibrary 2>/dev/null`; do libname=`func_echo_all "$lib" | $SED '\''s%^.*/\([[^/]]*\)\.ixlibrary$%\1%'\''`; test $RM /sys/libs/${libname}_ixlibrary.a; $show "cd /sys/libs && $LN_S $lib ${libname}_ixlibrary.a"; cd /sys/libs && $LN_S $lib ${libname}_ixlibrary.a || exit 1; done' - ;; - esac - ;; - -beos*) - library_names_spec='${libname}${shared_ext}' - dynamic_linker="$host_os ld.so" - shlibpath_var=LIBRARY_PATH - ;; - -bsdi[[45]]*) - version_type=linux # correct to gnu/linux during the next big refactor - need_version=no - library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}$major $libname${shared_ext}' - soname_spec='${libname}${release}${shared_ext}$major' - finish_cmds='PATH="\$PATH:/sbin" ldconfig $libdir' - shlibpath_var=LD_LIBRARY_PATH - sys_lib_search_path_spec="/shlib /usr/lib /usr/X11/lib /usr/contrib/lib /lib /usr/local/lib" - sys_lib_dlsearch_path_spec="/shlib /usr/lib /usr/local/lib" - # the default ld.so.conf also contains /usr/contrib/lib and - # /usr/X11R6/lib (/usr/X11 is a link to /usr/X11R6), but let us allow - # libtool to hard-code these into programs - ;; - -cygwin* | mingw* | pw32* | cegcc*) - version_type=windows - shrext_cmds=".dll" - need_version=no - need_lib_prefix=no - - case $GCC,$cc_basename in - yes,*) - # gcc - library_names_spec='$libname.dll.a' - # DLL is installed to $(libdir)/../bin by postinstall_cmds - postinstall_cmds='base_file=`basename \${file}`~ - dlpath=`$SHELL 2>&1 -c '\''. $dir/'\''\${base_file}'\''i; echo \$dlname'\''`~ - dldir=$destdir/`dirname \$dlpath`~ - test -d \$dldir || mkdir -p \$dldir~ - $install_prog $dir/$dlname \$dldir/$dlname~ - chmod a+x \$dldir/$dlname~ - if test -n '\''$stripme'\'' && test -n '\''$striplib'\''; then - eval '\''$striplib \$dldir/$dlname'\'' || exit \$?; - fi' - postuninstall_cmds='dldll=`$SHELL 2>&1 -c '\''. $file; echo \$dlname'\''`~ - dlpath=$dir/\$dldll~ - $RM \$dlpath' - shlibpath_overrides_runpath=yes - - case $host_os in - cygwin*) - # Cygwin DLLs use 'cyg' prefix rather than 'lib' - #soname_spec='`echo ${libname} | sed -e 's/^lib/cyg/'``echo ${release} | $SED -e 's/[[.]]/-/g'`${versuffix}${shared_ext}' - soname_spec='`echo ${libname} | sed -e 's/^lib//'`${shared_ext}' -m4_if([$1], [],[ - sys_lib_search_path_spec="$sys_lib_search_path_spec /usr/lib/w32api"]) - ;; - mingw* | cegcc*) - # MinGW DLLs use traditional 'lib' prefix - #soname_spec='${libname}`echo ${release} | $SED -e 's/[[.]]/-/g'`${versuffix}${shared_ext}' - soname_spec='`echo ${libname} | $SED -e 's/^lib//'`${shared_ext}' - ;; - pw32*) - # pw32 DLLs use 'pw' prefix rather than 'lib' - library_names_spec='`echo ${libname} | sed -e 's/^lib/pw/'``echo ${release} | $SED -e 's/[[.]]/-/g'`${versuffix}${shared_ext}' - ;; - esac - dynamic_linker='Win32 ld.exe' - ;; - - *,cl*) - # Native MSVC - libname_spec='$name' - soname_spec='${libname}`echo ${release} | $SED -e 's/[[.]]/-/g'`${versuffix}${shared_ext}' - library_names_spec='${libname}.dll.lib' - - case $build_os in - mingw*) - sys_lib_search_path_spec= - lt_save_ifs=$IFS - IFS=';' - for lt_path in $LIB - do - IFS=$lt_save_ifs - # Let DOS variable expansion print the short 8.3 style file name. - lt_path=`cd "$lt_path" 2>/dev/null && cmd //C "for %i in (".") do @echo %~si"` - sys_lib_search_path_spec="$sys_lib_search_path_spec $lt_path" - done - IFS=$lt_save_ifs - # Convert to MSYS style. - sys_lib_search_path_spec=`$ECHO "$sys_lib_search_path_spec" | sed -e 's|\\\\|/|g' -e 's| \\([[a-zA-Z]]\\):| /\\1|g' -e 's|^ ||'` - ;; - cygwin*) - # Convert to unix form, then to dos form, then back to unix form - # but this time dos style (no spaces!) so that the unix form looks - # like /cygdrive/c/PROGRA~1:/cygdr... - sys_lib_search_path_spec=`cygpath --path --unix "$LIB"` - sys_lib_search_path_spec=`cygpath --path --dos "$sys_lib_search_path_spec" 2>/dev/null` - sys_lib_search_path_spec=`cygpath --path --unix "$sys_lib_search_path_spec" | $SED -e "s/$PATH_SEPARATOR/ /g"` - ;; - *) - sys_lib_search_path_spec="$LIB" - if $ECHO "$sys_lib_search_path_spec" | [$GREP ';[c-zC-Z]:/' >/dev/null]; then - # It is most probably a Windows format PATH. - sys_lib_search_path_spec=`$ECHO "$sys_lib_search_path_spec" | $SED -e 's/;/ /g'` - else - sys_lib_search_path_spec=`$ECHO "$sys_lib_search_path_spec" | $SED -e "s/$PATH_SEPARATOR/ /g"` - fi - # FIXME: find the short name or the path components, as spaces are - # common. (e.g. "Program Files" -> "PROGRA~1") - ;; - esac - - # DLL is installed to $(libdir)/../bin by postinstall_cmds - postinstall_cmds='base_file=`basename \${file}`~ - dlpath=`$SHELL 2>&1 -c '\''. $dir/'\''\${base_file}'\''i; echo \$dlname'\''`~ - dldir=$destdir/`dirname \$dlpath`~ - test -d \$dldir || mkdir -p \$dldir~ - $install_prog $dir/$dlname \$dldir/$dlname' - postuninstall_cmds='dldll=`$SHELL 2>&1 -c '\''. $file; echo \$dlname'\''`~ - dlpath=$dir/\$dldll~ - $RM \$dlpath' - shlibpath_overrides_runpath=yes - dynamic_linker='Win32 link.exe' - ;; - - *) - # Assume MSVC wrapper - library_names_spec='${libname}`echo ${release} | $SED -e 's/[[.]]/-/g'`${versuffix}${shared_ext} $libname.lib' - dynamic_linker='Win32 ld.exe' - ;; - esac - # FIXME: first we should search . and the directory the executable is in - shlibpath_var=PATH - ;; - -darwin* | rhapsody*) - dynamic_linker="$host_os dyld" - version_type=darwin - need_lib_prefix=no - need_version=no - library_names_spec='${libname}${release}${major}$shared_ext ${libname}$shared_ext' - soname_spec='${libname}${release}${major}$shared_ext' - shlibpath_overrides_runpath=yes - shlibpath_var=DYLD_LIBRARY_PATH - shrext_cmds='`test .$module = .yes && echo .so || echo .dylib`' -m4_if([$1], [],[ - sys_lib_search_path_spec="$sys_lib_search_path_spec /usr/local/lib"]) - sys_lib_dlsearch_path_spec='/usr/local/lib /lib /usr/lib' - ;; - -dgux*) - version_type=linux # correct to gnu/linux during the next big refactor - need_lib_prefix=no - need_version=no - library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}$major $libname$shared_ext' - soname_spec='${libname}${release}${shared_ext}$major' - shlibpath_var=LD_LIBRARY_PATH - ;; - -freebsd* | dragonfly*) - # DragonFly does not have aout. When/if they implement a new - # versioning mechanism, adjust this. - if test -x /usr/bin/objformat; then - objformat=`/usr/bin/objformat` - else - case $host_os in - freebsd[[23]].*) objformat=aout ;; - *) objformat=elf ;; - esac - fi - version_type=freebsd-$objformat - case $version_type in - freebsd-elf*) - library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext} $libname${shared_ext}' - need_version=no - need_lib_prefix=no - ;; - freebsd-*) - library_names_spec='${libname}${release}${shared_ext}$versuffix $libname${shared_ext}$versuffix' - need_version=yes - ;; - esac - shlibpath_var=LD_LIBRARY_PATH - case $host_os in - freebsd2.*) - shlibpath_overrides_runpath=yes - ;; - freebsd3.[[01]]* | freebsdelf3.[[01]]*) - shlibpath_overrides_runpath=yes - hardcode_into_libs=yes - ;; - freebsd3.[[2-9]]* | freebsdelf3.[[2-9]]* | \ - freebsd4.[[0-5]] | freebsdelf4.[[0-5]] | freebsd4.1.1 | freebsdelf4.1.1) - shlibpath_overrides_runpath=no - hardcode_into_libs=yes - ;; - *) # from 4.6 on, and DragonFly - shlibpath_overrides_runpath=yes - hardcode_into_libs=yes - ;; - esac - ;; - -gnu*) - version_type=linux # correct to gnu/linux during the next big refactor - need_lib_prefix=no - need_version=no - library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}${major} ${libname}${shared_ext}' - soname_spec='${libname}${release}${shared_ext}$major' - shlibpath_var=LD_LIBRARY_PATH - shlibpath_overrides_runpath=no - hardcode_into_libs=yes - ;; - -haiku*) - version_type=linux # correct to gnu/linux during the next big refactor - need_lib_prefix=no - need_version=no - dynamic_linker="$host_os runtime_loader" - library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}${major} ${libname}${shared_ext}' - soname_spec='${libname}${release}${shared_ext}$major' - shlibpath_var=LIBRARY_PATH - shlibpath_overrides_runpath=yes - sys_lib_dlsearch_path_spec='/boot/home/config/lib /boot/common/lib /boot/system/lib' - hardcode_into_libs=yes - ;; - -hpux9* | hpux10* | hpux11*) - # Give a soname corresponding to the major version so that dld.sl refuses to - # link against other versions. - version_type=sunos - need_lib_prefix=no - need_version=no - case $host_cpu in - ia64*) - shrext_cmds='.so' - hardcode_into_libs=yes - dynamic_linker="$host_os dld.so" - shlibpath_var=LD_LIBRARY_PATH - shlibpath_overrides_runpath=yes # Unless +noenvvar is specified. - library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}$major $libname${shared_ext}' - soname_spec='${libname}${release}${shared_ext}$major' - if test "X$HPUX_IA64_MODE" = X32; then - sys_lib_search_path_spec="/usr/lib/hpux32 /usr/local/lib/hpux32 /usr/local/lib" - else - sys_lib_search_path_spec="/usr/lib/hpux64 /usr/local/lib/hpux64" - fi - sys_lib_dlsearch_path_spec=$sys_lib_search_path_spec - ;; - hppa*64*) - shrext_cmds='.sl' - hardcode_into_libs=yes - dynamic_linker="$host_os dld.sl" - shlibpath_var=LD_LIBRARY_PATH # How should we handle SHLIB_PATH - shlibpath_overrides_runpath=yes # Unless +noenvvar is specified. - library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}$major $libname${shared_ext}' - soname_spec='${libname}${release}${shared_ext}$major' - sys_lib_search_path_spec="/usr/lib/pa20_64 /usr/ccs/lib/pa20_64" - sys_lib_dlsearch_path_spec=$sys_lib_search_path_spec - ;; - *) - shrext_cmds='.sl' - dynamic_linker="$host_os dld.sl" - shlibpath_var=SHLIB_PATH - shlibpath_overrides_runpath=no # +s is required to enable SHLIB_PATH - library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}$major $libname${shared_ext}' - soname_spec='${libname}${release}${shared_ext}$major' - ;; - esac - # HP-UX runs *really* slowly unless shared libraries are mode 555, ... - postinstall_cmds='chmod 555 $lib' - # or fails outright, so override atomically: - install_override_mode=555 - ;; - -interix[[3-9]]*) - version_type=linux # correct to gnu/linux during the next big refactor - need_lib_prefix=no - need_version=no - library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}$major ${libname}${shared_ext}' - soname_spec='${libname}${release}${shared_ext}$major' - dynamic_linker='Interix 3.x ld.so.1 (PE, like ELF)' - shlibpath_var=LD_LIBRARY_PATH - shlibpath_overrides_runpath=no - hardcode_into_libs=yes - ;; - -irix5* | irix6* | nonstopux*) - case $host_os in - nonstopux*) version_type=nonstopux ;; - *) - if test "$lt_cv_prog_gnu_ld" = yes; then - version_type=linux # correct to gnu/linux during the next big refactor - else - version_type=irix - fi ;; - esac - need_lib_prefix=no - need_version=no - soname_spec='${libname}${release}${shared_ext}$major' - library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}$major ${libname}${release}${shared_ext} $libname${shared_ext}' - case $host_os in - irix5* | nonstopux*) - libsuff= shlibsuff= - ;; - *) - case $LD in # libtool.m4 will add one of these switches to LD - *-32|*"-32 "|*-melf32bsmip|*"-melf32bsmip ") - libsuff= shlibsuff= libmagic=32-bit;; - *-n32|*"-n32 "|*-melf32bmipn32|*"-melf32bmipn32 ") - libsuff=32 shlibsuff=N32 libmagic=N32;; - *-64|*"-64 "|*-melf64bmip|*"-melf64bmip ") - libsuff=64 shlibsuff=64 libmagic=64-bit;; - *) libsuff= shlibsuff= libmagic=never-match;; - esac - ;; - esac - shlibpath_var=LD_LIBRARY${shlibsuff}_PATH - shlibpath_overrides_runpath=no - sys_lib_search_path_spec="/usr/lib${libsuff} /lib${libsuff} /usr/local/lib${libsuff}" - sys_lib_dlsearch_path_spec="/usr/lib${libsuff} /lib${libsuff}" - hardcode_into_libs=yes - ;; - -# No shared lib support for Linux oldld, aout, or coff. -linux*oldld* | linux*aout* | linux*coff*) - dynamic_linker=no - ;; - -# This must be glibc/ELF. -linux* | k*bsd*-gnu | kopensolaris*-gnu) - version_type=linux # correct to gnu/linux during the next big refactor - need_lib_prefix=no - need_version=no - library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}$major $libname${shared_ext}' - soname_spec='${libname}${release}${shared_ext}$major' - finish_cmds='PATH="\$PATH:/sbin" ldconfig -n $libdir' - shlibpath_var=LD_LIBRARY_PATH - shlibpath_overrides_runpath=no - - # Some binutils ld are patched to set DT_RUNPATH - AC_CACHE_VAL([lt_cv_shlibpath_overrides_runpath], - [lt_cv_shlibpath_overrides_runpath=no - save_LDFLAGS=$LDFLAGS - save_libdir=$libdir - eval "libdir=/foo; wl=\"$_LT_TAGVAR(lt_prog_compiler_wl, $1)\"; \ - LDFLAGS=\"\$LDFLAGS $_LT_TAGVAR(hardcode_libdir_flag_spec, $1)\"" - AC_LINK_IFELSE([AC_LANG_PROGRAM([],[])], - [AS_IF([ ($OBJDUMP -p conftest$ac_exeext) 2>/dev/null | grep "RUNPATH.*$libdir" >/dev/null], - [lt_cv_shlibpath_overrides_runpath=yes])]) - LDFLAGS=$save_LDFLAGS - libdir=$save_libdir - ]) - shlibpath_overrides_runpath=$lt_cv_shlibpath_overrides_runpath - - # This implies no fast_install, which is unacceptable. - # Some rework will be needed to allow for fast_install - # before this can be enabled. - hardcode_into_libs=yes - - # Append ld.so.conf contents to the search path - if test -f /etc/ld.so.conf; then - lt_ld_extra=`awk '/^include / { system(sprintf("cd /etc; cat %s 2>/dev/null", \[$]2)); skip = 1; } { if (!skip) print \[$]0; skip = 0; }' < /etc/ld.so.conf | $SED -e 's/#.*//;/^[ ]*hwcap[ ]/d;s/[:, ]/ /g;s/=[^=]*$//;s/=[^= ]* / /g;s/"//g;/^$/d' | tr '\n' ' '` - sys_lib_dlsearch_path_spec="/lib /usr/lib $lt_ld_extra" - fi - - # We used to test for /lib/ld.so.1 and disable shared libraries on - # powerpc, because MkLinux only supported shared libraries with the - # GNU dynamic linker. Since this was broken with cross compilers, - # most powerpc-linux boxes support dynamic linking these days and - # people can always --disable-shared, the test was removed, and we - # assume the GNU/Linux dynamic linker is in use. - dynamic_linker='GNU/Linux ld.so' - ;; - -netbsd*) - version_type=sunos - need_lib_prefix=no - need_version=no - if echo __ELF__ | $CC -E - | $GREP __ELF__ >/dev/null; then - library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${shared_ext}$versuffix' - finish_cmds='PATH="\$PATH:/sbin" ldconfig -m $libdir' - dynamic_linker='NetBSD (a.out) ld.so' - else - library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}$major ${libname}${shared_ext}' - soname_spec='${libname}${release}${shared_ext}$major' - dynamic_linker='NetBSD ld.elf_so' - fi - shlibpath_var=LD_LIBRARY_PATH - shlibpath_overrides_runpath=yes - hardcode_into_libs=yes - ;; - -newsos6) - version_type=linux # correct to gnu/linux during the next big refactor - library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}$major $libname${shared_ext}' - shlibpath_var=LD_LIBRARY_PATH - shlibpath_overrides_runpath=yes - ;; - -*nto* | *qnx*) - version_type=qnx - need_lib_prefix=no - need_version=no - library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}$major $libname${shared_ext}' - soname_spec='${libname}${release}${shared_ext}$major' - shlibpath_var=LD_LIBRARY_PATH - shlibpath_overrides_runpath=no - hardcode_into_libs=yes - dynamic_linker='ldqnx.so' - ;; - -openbsd*) - version_type=sunos - sys_lib_dlsearch_path_spec="/usr/lib" - need_lib_prefix=no - # Some older versions of OpenBSD (3.3 at least) *do* need versioned libs. - case $host_os in - openbsd3.3 | openbsd3.3.*) need_version=yes ;; - *) need_version=no ;; - esac - library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${shared_ext}$versuffix' - finish_cmds='PATH="\$PATH:/sbin" ldconfig -m $libdir' - shlibpath_var=LD_LIBRARY_PATH - if test -z "`echo __ELF__ | $CC -E - | $GREP __ELF__`" || test "$host_os-$host_cpu" = "openbsd2.8-powerpc"; then - case $host_os in - openbsd2.[[89]] | openbsd2.[[89]].*) - shlibpath_overrides_runpath=no - ;; - *) - shlibpath_overrides_runpath=yes - ;; - esac - else - shlibpath_overrides_runpath=yes - fi - ;; - -os2*) - libname_spec='$name' - shrext_cmds=".dll" - need_lib_prefix=no - library_names_spec='$libname${shared_ext} $libname.a' - dynamic_linker='OS/2 ld.exe' - shlibpath_var=LIBPATH - ;; - -osf3* | osf4* | osf5*) - version_type=osf - need_lib_prefix=no - need_version=no - soname_spec='${libname}${release}${shared_ext}$major' - library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}$major $libname${shared_ext}' - shlibpath_var=LD_LIBRARY_PATH - sys_lib_search_path_spec="/usr/shlib /usr/ccs/lib /usr/lib/cmplrs/cc /usr/lib /usr/local/lib /var/shlib" - sys_lib_dlsearch_path_spec="$sys_lib_search_path_spec" - ;; - -rdos*) - dynamic_linker=no - ;; - -solaris*) - version_type=linux # correct to gnu/linux during the next big refactor - need_lib_prefix=no - need_version=no - library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}$major $libname${shared_ext}' - soname_spec='${libname}${release}${shared_ext}$major' - shlibpath_var=LD_LIBRARY_PATH - shlibpath_overrides_runpath=yes - hardcode_into_libs=yes - # ldd complains unless libraries are executable - postinstall_cmds='chmod +x $lib' - ;; - -sunos4*) - version_type=sunos - library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${shared_ext}$versuffix' - finish_cmds='PATH="\$PATH:/usr/etc" ldconfig $libdir' - shlibpath_var=LD_LIBRARY_PATH - shlibpath_overrides_runpath=yes - if test "$with_gnu_ld" = yes; then - need_lib_prefix=no - fi - need_version=yes - ;; - -sysv4 | sysv4.3*) - version_type=linux # correct to gnu/linux during the next big refactor - library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}$major $libname${shared_ext}' - soname_spec='${libname}${release}${shared_ext}$major' - shlibpath_var=LD_LIBRARY_PATH - case $host_vendor in - sni) - shlibpath_overrides_runpath=no - need_lib_prefix=no - runpath_var=LD_RUN_PATH - ;; - siemens) - need_lib_prefix=no - ;; - motorola) - need_lib_prefix=no - need_version=no - shlibpath_overrides_runpath=no - sys_lib_search_path_spec='/lib /usr/lib /usr/ccs/lib' - ;; - esac - ;; - -sysv4*MP*) - if test -d /usr/nec ;then - version_type=linux # correct to gnu/linux during the next big refactor - library_names_spec='$libname${shared_ext}.$versuffix $libname${shared_ext}.$major $libname${shared_ext}' - soname_spec='$libname${shared_ext}.$major' - shlibpath_var=LD_LIBRARY_PATH - fi - ;; - -sysv5* | sco3.2v5* | sco5v6* | unixware* | OpenUNIX* | sysv4*uw2*) - version_type=freebsd-elf - need_lib_prefix=no - need_version=no - library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext} $libname${shared_ext}' - soname_spec='${libname}${release}${shared_ext}$major' - shlibpath_var=LD_LIBRARY_PATH - shlibpath_overrides_runpath=yes - hardcode_into_libs=yes - if test "$with_gnu_ld" = yes; then - sys_lib_search_path_spec='/usr/local/lib /usr/gnu/lib /usr/ccs/lib /usr/lib /lib' - else - sys_lib_search_path_spec='/usr/ccs/lib /usr/lib' - case $host_os in - sco3.2v5*) - sys_lib_search_path_spec="$sys_lib_search_path_spec /lib" - ;; - esac - fi - sys_lib_dlsearch_path_spec='/usr/lib' - ;; - -tpf*) - # TPF is a cross-target only. Preferred cross-host = GNU/Linux. - version_type=linux # correct to gnu/linux during the next big refactor - need_lib_prefix=no - need_version=no - library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}$major $libname${shared_ext}' - shlibpath_var=LD_LIBRARY_PATH - shlibpath_overrides_runpath=no - hardcode_into_libs=yes - ;; - -uts4*) - version_type=linux # correct to gnu/linux during the next big refactor - library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}$major $libname${shared_ext}' - soname_spec='${libname}${release}${shared_ext}$major' - shlibpath_var=LD_LIBRARY_PATH - ;; - -*) - dynamic_linker=no - ;; -esac -AC_MSG_RESULT([$dynamic_linker]) -test "$dynamic_linker" = no && can_build_shared=no - -variables_saved_for_relink="PATH $shlibpath_var $runpath_var" -if test "$GCC" = yes; then - variables_saved_for_relink="$variables_saved_for_relink GCC_EXEC_PREFIX COMPILER_PATH LIBRARY_PATH" -fi - -if test "${lt_cv_sys_lib_search_path_spec+set}" = set; then - sys_lib_search_path_spec="$lt_cv_sys_lib_search_path_spec" -fi -if test "${lt_cv_sys_lib_dlsearch_path_spec+set}" = set; then - sys_lib_dlsearch_path_spec="$lt_cv_sys_lib_dlsearch_path_spec" -fi - -_LT_DECL([], [variables_saved_for_relink], [1], - [Variables whose values should be saved in libtool wrapper scripts and - restored at link time]) -_LT_DECL([], [need_lib_prefix], [0], - [Do we need the "lib" prefix for modules?]) -_LT_DECL([], [need_version], [0], [Do we need a version for libraries?]) -_LT_DECL([], [version_type], [0], [Library versioning type]) -_LT_DECL([], [runpath_var], [0], [Shared library runtime path variable]) -_LT_DECL([], [shlibpath_var], [0],[Shared library path variable]) -_LT_DECL([], [shlibpath_overrides_runpath], [0], - [Is shlibpath searched before the hard-coded library search path?]) -_LT_DECL([], [libname_spec], [1], [Format of library name prefix]) -_LT_DECL([], [library_names_spec], [1], - [[List of archive names. First name is the real one, the rest are links. - The last name is the one that the linker finds with -lNAME]]) -_LT_DECL([], [soname_spec], [1], - [[The coded name of the library, if different from the real name]]) -_LT_DECL([], [install_override_mode], [1], - [Permission mode override for installation of shared libraries]) -_LT_DECL([], [postinstall_cmds], [2], - [Command to use after installation of a shared archive]) -_LT_DECL([], [postuninstall_cmds], [2], - [Command to use after uninstallation of a shared archive]) -_LT_DECL([], [finish_cmds], [2], - [Commands used to finish a libtool library installation in a directory]) -_LT_DECL([], [finish_eval], [1], - [[As "finish_cmds", except a single script fragment to be evaled but - not shown]]) -_LT_DECL([], [hardcode_into_libs], [0], - [Whether we should hardcode library paths into libraries]) -_LT_DECL([], [sys_lib_search_path_spec], [2], - [Compile-time system search path for libraries]) -_LT_DECL([], [sys_lib_dlsearch_path_spec], [2], - [Run-time system search path for libraries]) -])# _LT_SYS_DYNAMIC_LINKER - - -# _LT_PATH_TOOL_PREFIX(TOOL) -# -------------------------- -# find a file program which can recognize shared library -AC_DEFUN([_LT_PATH_TOOL_PREFIX], -[m4_require([_LT_DECL_EGREP])dnl -AC_MSG_CHECKING([for $1]) -AC_CACHE_VAL(lt_cv_path_MAGIC_CMD, -[case $MAGIC_CMD in -[[\\/*] | ?:[\\/]*]) - lt_cv_path_MAGIC_CMD="$MAGIC_CMD" # Let the user override the test with a path. - ;; -*) - lt_save_MAGIC_CMD="$MAGIC_CMD" - lt_save_ifs="$IFS"; IFS=$PATH_SEPARATOR -dnl $ac_dummy forces splitting on constant user-supplied paths. -dnl POSIX.2 word splitting is done only on the output of word expansions, -dnl not every word. This closes a longstanding sh security hole. - ac_dummy="m4_if([$2], , $PATH, [$2])" - for ac_dir in $ac_dummy; do - IFS="$lt_save_ifs" - test -z "$ac_dir" && ac_dir=. - if test -f $ac_dir/$1; then - lt_cv_path_MAGIC_CMD="$ac_dir/$1" - if test -n "$file_magic_test_file"; then - case $deplibs_check_method in - "file_magic "*) - file_magic_regex=`expr "$deplibs_check_method" : "file_magic \(.*\)"` - MAGIC_CMD="$lt_cv_path_MAGIC_CMD" - if eval $file_magic_cmd \$file_magic_test_file 2> /dev/null | - $EGREP "$file_magic_regex" > /dev/null; then - : - else - cat <<_LT_EOF 1>&2 - -*** Warning: the command libtool uses to detect shared libraries, -*** $file_magic_cmd, produces output that libtool cannot recognize. -*** The result is that libtool may fail to recognize shared libraries -*** as such. This will affect the creation of libtool libraries that -*** depend on shared libraries, but programs linked with such libtool -*** libraries will work regardless of this problem. Nevertheless, you -*** may want to report the problem to your system manager and/or to -*** bug-libtool@gnu.org - -_LT_EOF - fi ;; - esac - fi - break - fi - done - IFS="$lt_save_ifs" - MAGIC_CMD="$lt_save_MAGIC_CMD" - ;; -esac]) -MAGIC_CMD="$lt_cv_path_MAGIC_CMD" -if test -n "$MAGIC_CMD"; then - AC_MSG_RESULT($MAGIC_CMD) -else - AC_MSG_RESULT(no) -fi -_LT_DECL([], [MAGIC_CMD], [0], - [Used to examine libraries when file_magic_cmd begins with "file"])dnl -])# _LT_PATH_TOOL_PREFIX - -# Old name: -AU_ALIAS([AC_PATH_TOOL_PREFIX], [_LT_PATH_TOOL_PREFIX]) -dnl aclocal-1.4 backwards compatibility: -dnl AC_DEFUN([AC_PATH_TOOL_PREFIX], []) - - -# _LT_PATH_MAGIC -# -------------- -# find a file program which can recognize a shared library -m4_defun([_LT_PATH_MAGIC], -[_LT_PATH_TOOL_PREFIX(${ac_tool_prefix}file, /usr/bin$PATH_SEPARATOR$PATH) -if test -z "$lt_cv_path_MAGIC_CMD"; then - if test -n "$ac_tool_prefix"; then - _LT_PATH_TOOL_PREFIX(file, /usr/bin$PATH_SEPARATOR$PATH) - else - MAGIC_CMD=: - fi -fi -])# _LT_PATH_MAGIC - - -# LT_PATH_LD -# ---------- -# find the pathname to the GNU or non-GNU linker -AC_DEFUN([LT_PATH_LD], -[AC_REQUIRE([AC_PROG_CC])dnl -AC_REQUIRE([AC_CANONICAL_HOST])dnl -AC_REQUIRE([AC_CANONICAL_BUILD])dnl -m4_require([_LT_DECL_SED])dnl -m4_require([_LT_DECL_EGREP])dnl -m4_require([_LT_PROG_ECHO_BACKSLASH])dnl - -AC_ARG_WITH([gnu-ld], - [AS_HELP_STRING([--with-gnu-ld], - [assume the C compiler uses GNU ld @<:@default=no@:>@])], - [test "$withval" = no || with_gnu_ld=yes], - [with_gnu_ld=no])dnl - -ac_prog=ld -if test "$GCC" = yes; then - # Check if gcc -print-prog-name=ld gives a path. - AC_MSG_CHECKING([for ld used by $CC]) - case $host in - *-*-mingw*) - # gcc leaves a trailing carriage return which upsets mingw - ac_prog=`($CC -print-prog-name=ld) 2>&5 | tr -d '\015'` ;; - *) - ac_prog=`($CC -print-prog-name=ld) 2>&5` ;; - esac - case $ac_prog in - # Accept absolute paths. - [[\\/]]* | ?:[[\\/]]*) - re_direlt='/[[^/]][[^/]]*/\.\./' - # Canonicalize the pathname of ld - ac_prog=`$ECHO "$ac_prog"| $SED 's%\\\\%/%g'` - while $ECHO "$ac_prog" | $GREP "$re_direlt" > /dev/null 2>&1; do - ac_prog=`$ECHO $ac_prog| $SED "s%$re_direlt%/%"` - done - test -z "$LD" && LD="$ac_prog" - ;; - "") - # If it fails, then pretend we aren't using GCC. - ac_prog=ld - ;; - *) - # If it is relative, then search for the first ld in PATH. - with_gnu_ld=unknown - ;; - esac -elif test "$with_gnu_ld" = yes; then - AC_MSG_CHECKING([for GNU ld]) -else - AC_MSG_CHECKING([for non-GNU ld]) -fi -AC_CACHE_VAL(lt_cv_path_LD, -[if test -z "$LD"; then - lt_save_ifs="$IFS"; IFS=$PATH_SEPARATOR - for ac_dir in $PATH; do - IFS="$lt_save_ifs" - test -z "$ac_dir" && ac_dir=. - if test -f "$ac_dir/$ac_prog" || test -f "$ac_dir/$ac_prog$ac_exeext"; then - lt_cv_path_LD="$ac_dir/$ac_prog" - # Check to see if the program is GNU ld. I'd rather use --version, - # but apparently some variants of GNU ld only accept -v. - # Break only if it was the GNU/non-GNU ld that we prefer. - case `"$lt_cv_path_LD" -v 2>&1 &1 /dev/null 2>&1; then - lt_cv_deplibs_check_method='file_magic ^x86 archive import|^x86 DLL' - lt_cv_file_magic_cmd='func_win32_libid' - else - # Keep this pattern in sync with the one in func_win32_libid. - lt_cv_deplibs_check_method='file_magic file format (pei*-i386(.*architecture: i386)?|pe-arm-wince|pe-x86-64)' - lt_cv_file_magic_cmd='$OBJDUMP -f' - fi - lt_cv_deplibs_check_method=pass_all - ;; - -cegcc*) - # use the weaker test based on 'objdump'. See mingw*. - lt_cv_deplibs_check_method='file_magic file format pe-arm-.*little(.*architecture: arm)?' - lt_cv_file_magic_cmd='$OBJDUMP -f' - ;; - -darwin* | rhapsody*) - lt_cv_deplibs_check_method=pass_all - ;; - -freebsd* | dragonfly*) - if echo __ELF__ | $CC -E - | $GREP __ELF__ > /dev/null; then - case $host_cpu in - i*86 ) - # Not sure whether the presence of OpenBSD here was a mistake. - # Let's accept both of them until this is cleared up. - lt_cv_deplibs_check_method='file_magic (FreeBSD|OpenBSD|DragonFly)/i[[3-9]]86 (compact )?demand paged shared library' - lt_cv_file_magic_cmd=/usr/bin/file - lt_cv_file_magic_test_file=`echo /usr/lib/libc.so.*` - ;; - esac - else - lt_cv_deplibs_check_method=pass_all - fi - ;; - -gnu*) - lt_cv_deplibs_check_method=pass_all - ;; - -haiku*) - lt_cv_deplibs_check_method=pass_all - ;; - -hpux10.20* | hpux11*) - lt_cv_file_magic_cmd=/usr/bin/file - case $host_cpu in - ia64*) - lt_cv_deplibs_check_method='file_magic (s[[0-9]][[0-9]][[0-9]]|ELF-[[0-9]][[0-9]]) shared object file - IA64' - lt_cv_file_magic_test_file=/usr/lib/hpux32/libc.so - ;; - hppa*64*) - [lt_cv_deplibs_check_method='file_magic (s[0-9][0-9][0-9]|ELF[ -][0-9][0-9])(-bit)?( [LM]SB)? shared object( file)?[, -]* PA-RISC [0-9]\.[0-9]'] - lt_cv_file_magic_test_file=/usr/lib/pa20_64/libc.sl - ;; - *) - lt_cv_deplibs_check_method='file_magic (s[[0-9]][[0-9]][[0-9]]|PA-RISC[[0-9]]\.[[0-9]]) shared library' - lt_cv_file_magic_test_file=/usr/lib/libc.sl - ;; - esac - ;; - -interix[[3-9]]*) - # PIC code is broken on Interix 3.x, that's why |\.a not |_pic\.a here - lt_cv_deplibs_check_method='match_pattern /lib[[^/]]+(\.so|\.a)$' - ;; - -irix5* | irix6* | nonstopux*) - case $LD in - *-32|*"-32 ") libmagic=32-bit;; - *-n32|*"-n32 ") libmagic=N32;; - *-64|*"-64 ") libmagic=64-bit;; - *) libmagic=never-match;; - esac - lt_cv_deplibs_check_method=pass_all - ;; - -# This must be glibc/ELF. -linux* | k*bsd*-gnu | kopensolaris*-gnu) - lt_cv_deplibs_check_method=pass_all - ;; - -netbsd*) - if echo __ELF__ | $CC -E - | $GREP __ELF__ > /dev/null; then - lt_cv_deplibs_check_method='match_pattern /lib[[^/]]+(\.so\.[[0-9]]+\.[[0-9]]+|_pic\.a)$' - else - lt_cv_deplibs_check_method='match_pattern /lib[[^/]]+(\.so|_pic\.a)$' - fi - ;; - -newos6*) - lt_cv_deplibs_check_method='file_magic ELF [[0-9]][[0-9]]*-bit [[ML]]SB (executable|dynamic lib)' - lt_cv_file_magic_cmd=/usr/bin/file - lt_cv_file_magic_test_file=/usr/lib/libnls.so - ;; - -*nto* | *qnx*) - lt_cv_deplibs_check_method=pass_all - ;; - -openbsd*) - if test -z "`echo __ELF__ | $CC -E - | $GREP __ELF__`" || test "$host_os-$host_cpu" = "openbsd2.8-powerpc"; then - lt_cv_deplibs_check_method='match_pattern /lib[[^/]]+(\.so\.[[0-9]]+\.[[0-9]]+|\.so|_pic\.a)$' - else - lt_cv_deplibs_check_method='match_pattern /lib[[^/]]+(\.so\.[[0-9]]+\.[[0-9]]+|_pic\.a)$' - fi - ;; - -osf3* | osf4* | osf5*) - lt_cv_deplibs_check_method=pass_all - ;; - -rdos*) - lt_cv_deplibs_check_method=pass_all - ;; - -solaris*) - lt_cv_deplibs_check_method=pass_all - ;; - -sysv5* | sco3.2v5* | sco5v6* | unixware* | OpenUNIX* | sysv4*uw2*) - lt_cv_deplibs_check_method=pass_all - ;; - -sysv4 | sysv4.3*) - case $host_vendor in - motorola) - lt_cv_deplibs_check_method='file_magic ELF [[0-9]][[0-9]]*-bit [[ML]]SB (shared object|dynamic lib) M[[0-9]][[0-9]]* Version [[0-9]]' - lt_cv_file_magic_test_file=`echo /usr/lib/libc.so*` - ;; - ncr) - lt_cv_deplibs_check_method=pass_all - ;; - sequent) - lt_cv_file_magic_cmd='/bin/file' - lt_cv_deplibs_check_method='file_magic ELF [[0-9]][[0-9]]*-bit [[LM]]SB (shared object|dynamic lib )' - ;; - sni) - lt_cv_file_magic_cmd='/bin/file' - lt_cv_deplibs_check_method="file_magic ELF [[0-9]][[0-9]]*-bit [[LM]]SB dynamic lib" - lt_cv_file_magic_test_file=/lib/libc.so - ;; - siemens) - lt_cv_deplibs_check_method=pass_all - ;; - pc) - lt_cv_deplibs_check_method=pass_all - ;; - esac - ;; - -tpf*) - lt_cv_deplibs_check_method=pass_all - ;; -esac -]) - -file_magic_glob= -want_nocaseglob=no -if test "$build" = "$host"; then - case $host_os in - mingw* | pw32*) - if ( shopt | grep nocaseglob ) >/dev/null 2>&1; then - want_nocaseglob=yes - else - file_magic_glob=`echo aAbBcCdDeEfFgGhHiIjJkKlLmMnNoOpPqQrRsStTuUvVwWxXyYzZ | $SED -e "s/\(..\)/s\/[[\1]]\/[[\1]]\/g;/g"` - fi - ;; - esac -fi - -file_magic_cmd=$lt_cv_file_magic_cmd -deplibs_check_method=$lt_cv_deplibs_check_method -test -z "$deplibs_check_method" && deplibs_check_method=unknown - -_LT_DECL([], [deplibs_check_method], [1], - [Method to check whether dependent libraries are shared objects]) -_LT_DECL([], [file_magic_cmd], [1], - [Command to use when deplibs_check_method = "file_magic"]) -_LT_DECL([], [file_magic_glob], [1], - [How to find potential files when deplibs_check_method = "file_magic"]) -_LT_DECL([], [want_nocaseglob], [1], - [Find potential files using nocaseglob when deplibs_check_method = "file_magic"]) -])# _LT_CHECK_MAGIC_METHOD - - -# LT_PATH_NM -# ---------- -# find the pathname to a BSD- or MS-compatible name lister -AC_DEFUN([LT_PATH_NM], -[AC_REQUIRE([AC_PROG_CC])dnl -AC_CACHE_CHECK([for BSD- or MS-compatible name lister (nm)], lt_cv_path_NM, -[if test -n "$NM"; then - # Let the user override the test. - lt_cv_path_NM="$NM" -else - lt_nm_to_check="${ac_tool_prefix}nm" - if test -n "$ac_tool_prefix" && test "$build" = "$host"; then - lt_nm_to_check="$lt_nm_to_check nm" - fi - for lt_tmp_nm in $lt_nm_to_check; do - lt_save_ifs="$IFS"; IFS=$PATH_SEPARATOR - for ac_dir in $PATH /usr/ccs/bin/elf /usr/ccs/bin /usr/ucb /bin; do - IFS="$lt_save_ifs" - test -z "$ac_dir" && ac_dir=. - tmp_nm="$ac_dir/$lt_tmp_nm" - if test -f "$tmp_nm" || test -f "$tmp_nm$ac_exeext" ; then - # Check to see if the nm accepts a BSD-compat flag. - # Adding the `sed 1q' prevents false positives on HP-UX, which says: - # nm: unknown option "B" ignored - # Tru64's nm complains that /dev/null is an invalid object file - case `"$tmp_nm" -B /dev/null 2>&1 | sed '1q'` in - */dev/null* | *'Invalid file or object type'*) - lt_cv_path_NM="$tmp_nm -B" - break - ;; - *) - case `"$tmp_nm" -p /dev/null 2>&1 | sed '1q'` in - */dev/null*) - lt_cv_path_NM="$tmp_nm -p" - break - ;; - *) - lt_cv_path_NM=${lt_cv_path_NM="$tmp_nm"} # keep the first match, but - continue # so that we can try to find one that supports BSD flags - ;; - esac - ;; - esac - fi - done - IFS="$lt_save_ifs" - done - : ${lt_cv_path_NM=no} -fi]) -if test "$lt_cv_path_NM" != "no"; then - NM="$lt_cv_path_NM" -else - # Didn't find any BSD compatible name lister, look for dumpbin. - if test -n "$DUMPBIN"; then : - # Let the user override the test. - else - AC_CHECK_TOOLS(DUMPBIN, [dumpbin "link -dump"], :) - case `$DUMPBIN -symbols /dev/null 2>&1 | sed '1q'` in - *COFF*) - DUMPBIN="$DUMPBIN -symbols" - ;; - *) - DUMPBIN=: - ;; - esac - fi - AC_SUBST([DUMPBIN]) - if test "$DUMPBIN" != ":"; then - NM="$DUMPBIN" - fi -fi -test -z "$NM" && NM=nm -AC_SUBST([NM]) -_LT_DECL([], [NM], [1], [A BSD- or MS-compatible name lister])dnl - -AC_CACHE_CHECK([the name lister ($NM) interface], [lt_cv_nm_interface], - [lt_cv_nm_interface="BSD nm" - echo "int some_variable = 0;" > conftest.$ac_ext - (eval echo "\"\$as_me:$LINENO: $ac_compile\"" >&AS_MESSAGE_LOG_FD) - (eval "$ac_compile" 2>conftest.err) - cat conftest.err >&AS_MESSAGE_LOG_FD - (eval echo "\"\$as_me:$LINENO: $NM \\\"conftest.$ac_objext\\\"\"" >&AS_MESSAGE_LOG_FD) - (eval "$NM \"conftest.$ac_objext\"" 2>conftest.err > conftest.out) - cat conftest.err >&AS_MESSAGE_LOG_FD - (eval echo "\"\$as_me:$LINENO: output\"" >&AS_MESSAGE_LOG_FD) - cat conftest.out >&AS_MESSAGE_LOG_FD - if $GREP 'External.*some_variable' conftest.out > /dev/null; then - lt_cv_nm_interface="MS dumpbin" - fi - rm -f conftest*]) -])# LT_PATH_NM - -# Old names: -AU_ALIAS([AM_PROG_NM], [LT_PATH_NM]) -AU_ALIAS([AC_PROG_NM], [LT_PATH_NM]) -dnl aclocal-1.4 backwards compatibility: -dnl AC_DEFUN([AM_PROG_NM], []) -dnl AC_DEFUN([AC_PROG_NM], []) - -# _LT_CHECK_SHAREDLIB_FROM_LINKLIB -# -------------------------------- -# how to determine the name of the shared library -# associated with a specific link library. -# -- PORTME fill in with the dynamic library characteristics -m4_defun([_LT_CHECK_SHAREDLIB_FROM_LINKLIB], -[m4_require([_LT_DECL_EGREP]) -m4_require([_LT_DECL_OBJDUMP]) -m4_require([_LT_DECL_DLLTOOL]) -AC_CACHE_CHECK([how to associate runtime and link libraries], -lt_cv_sharedlib_from_linklib_cmd, -[lt_cv_sharedlib_from_linklib_cmd='unknown' - -case $host_os in -cygwin* | mingw* | pw32* | cegcc*) - # two different shell functions defined in ltmain.sh - # decide which to use based on capabilities of $DLLTOOL - case `$DLLTOOL --help 2>&1` in - *--identify-strict*) - lt_cv_sharedlib_from_linklib_cmd=func_cygming_dll_for_implib - ;; - *) - lt_cv_sharedlib_from_linklib_cmd=func_cygming_dll_for_implib_fallback - ;; - esac - ;; -*) - # fallback: assume linklib IS sharedlib - lt_cv_sharedlib_from_linklib_cmd="$ECHO" - ;; -esac -]) -sharedlib_from_linklib_cmd=$lt_cv_sharedlib_from_linklib_cmd -test -z "$sharedlib_from_linklib_cmd" && sharedlib_from_linklib_cmd=$ECHO - -_LT_DECL([], [sharedlib_from_linklib_cmd], [1], - [Command to associate shared and link libraries]) -])# _LT_CHECK_SHAREDLIB_FROM_LINKLIB - - -# _LT_PATH_MANIFEST_TOOL -# ---------------------- -# locate the manifest tool -m4_defun([_LT_PATH_MANIFEST_TOOL], -[AC_CHECK_TOOL(MANIFEST_TOOL, mt, :) -test -z "$MANIFEST_TOOL" && MANIFEST_TOOL=mt -AC_CACHE_CHECK([if $MANIFEST_TOOL is a manifest tool], [lt_cv_path_mainfest_tool], - [lt_cv_path_mainfest_tool=no - echo "$as_me:$LINENO: $MANIFEST_TOOL '-?'" >&AS_MESSAGE_LOG_FD - $MANIFEST_TOOL '-?' 2>conftest.err > conftest.out - cat conftest.err >&AS_MESSAGE_LOG_FD - if $GREP 'Manifest Tool' conftest.out > /dev/null; then - lt_cv_path_mainfest_tool=yes - fi - rm -f conftest*]) -if test "x$lt_cv_path_mainfest_tool" != xyes; then - MANIFEST_TOOL=: -fi -_LT_DECL([], [MANIFEST_TOOL], [1], [Manifest tool])dnl -])# _LT_PATH_MANIFEST_TOOL - - -# LT_LIB_M -# -------- -# check for math library -AC_DEFUN([LT_LIB_M], -[AC_REQUIRE([AC_CANONICAL_HOST])dnl -LIBM= -case $host in -*-*-beos* | *-*-cegcc* | *-*-cygwin* | *-*-haiku* | *-*-pw32* | *-*-darwin*) - # These system don't have libm, or don't need it - ;; -*-ncr-sysv4.3*) - AC_CHECK_LIB(mw, _mwvalidcheckl, LIBM="-lmw") - AC_CHECK_LIB(m, cos, LIBM="$LIBM -lm") - ;; -*) - AC_CHECK_LIB(m, cos, LIBM="-lm") - ;; -esac -AC_SUBST([LIBM]) -])# LT_LIB_M - -# Old name: -AU_ALIAS([AC_CHECK_LIBM], [LT_LIB_M]) -dnl aclocal-1.4 backwards compatibility: -dnl AC_DEFUN([AC_CHECK_LIBM], []) - - -# _LT_COMPILER_NO_RTTI([TAGNAME]) -# ------------------------------- -m4_defun([_LT_COMPILER_NO_RTTI], -[m4_require([_LT_TAG_COMPILER])dnl - -_LT_TAGVAR(lt_prog_compiler_no_builtin_flag, $1)= - -if test "$GCC" = yes; then - case $cc_basename in - nvcc*) - _LT_TAGVAR(lt_prog_compiler_no_builtin_flag, $1)=' -Xcompiler -fno-builtin' ;; - *) - _LT_TAGVAR(lt_prog_compiler_no_builtin_flag, $1)=' -fno-builtin' ;; - esac - - _LT_COMPILER_OPTION([if $compiler supports -fno-rtti -fno-exceptions], - lt_cv_prog_compiler_rtti_exceptions, - [-fno-rtti -fno-exceptions], [], - [_LT_TAGVAR(lt_prog_compiler_no_builtin_flag, $1)="$_LT_TAGVAR(lt_prog_compiler_no_builtin_flag, $1) -fno-rtti -fno-exceptions"]) -fi -_LT_TAGDECL([no_builtin_flag], [lt_prog_compiler_no_builtin_flag], [1], - [Compiler flag to turn off builtin functions]) -])# _LT_COMPILER_NO_RTTI - - -# _LT_CMD_GLOBAL_SYMBOLS -# ---------------------- -m4_defun([_LT_CMD_GLOBAL_SYMBOLS], -[AC_REQUIRE([AC_CANONICAL_HOST])dnl -AC_REQUIRE([AC_PROG_CC])dnl -AC_REQUIRE([AC_PROG_AWK])dnl -AC_REQUIRE([LT_PATH_NM])dnl -AC_REQUIRE([LT_PATH_LD])dnl -m4_require([_LT_DECL_SED])dnl -m4_require([_LT_DECL_EGREP])dnl -m4_require([_LT_TAG_COMPILER])dnl - -# Check for command to grab the raw symbol name followed by C symbol from nm. -AC_MSG_CHECKING([command to parse $NM output from $compiler object]) -AC_CACHE_VAL([lt_cv_sys_global_symbol_pipe], -[ -# These are sane defaults that work on at least a few old systems. -# [They come from Ultrix. What could be older than Ultrix?!! ;)] - -# Character class describing NM global symbol codes. -symcode='[[BCDEGRST]]' - -# Regexp to match symbols that can be accessed directly from C. -sympat='\([[_A-Za-z]][[_A-Za-z0-9]]*\)' - -# Define system-specific variables. -case $host_os in -aix*) - symcode='[[BCDT]]' - ;; -cygwin* | mingw* | pw32* | cegcc*) - symcode='[[ABCDGISTW]]' - ;; -hpux*) - if test "$host_cpu" = ia64; then - symcode='[[ABCDEGRST]]' - fi - ;; -irix* | nonstopux*) - symcode='[[BCDEGRST]]' - ;; -osf*) - symcode='[[BCDEGQRST]]' - ;; -solaris*) - symcode='[[BDRT]]' - ;; -sco3.2v5*) - symcode='[[DT]]' - ;; -sysv4.2uw2*) - symcode='[[DT]]' - ;; -sysv5* | sco5v6* | unixware* | OpenUNIX*) - symcode='[[ABDT]]' - ;; -sysv4) - symcode='[[DFNSTU]]' - ;; -esac - -# If we're using GNU nm, then use its standard symbol codes. -case `$NM -V 2>&1` in -*GNU* | *'with BFD'*) - symcode='[[ABCDGIRSTW]]' ;; -esac - -# Transform an extracted symbol line into a proper C declaration. -# Some systems (esp. on ia64) link data and code symbols differently, -# so use this general approach. -lt_cv_sys_global_symbol_to_cdecl="sed -n -e 's/^T .* \(.*\)$/extern int \1();/p' -e 's/^$symcode* .* \(.*\)$/extern char \1;/p'" - -# Transform an extracted symbol line into symbol name and symbol address -lt_cv_sys_global_symbol_to_c_name_address="sed -n -e 's/^: \([[^ ]]*\)[[ ]]*$/ {\\\"\1\\\", (void *) 0},/p' -e 's/^$symcode* \([[^ ]]*\) \([[^ ]]*\)$/ {\"\2\", (void *) \&\2},/p'" -lt_cv_sys_global_symbol_to_c_name_address_lib_prefix="sed -n -e 's/^: \([[^ ]]*\)[[ ]]*$/ {\\\"\1\\\", (void *) 0},/p' -e 's/^$symcode* \([[^ ]]*\) \(lib[[^ ]]*\)$/ {\"\2\", (void *) \&\2},/p' -e 's/^$symcode* \([[^ ]]*\) \([[^ ]]*\)$/ {\"lib\2\", (void *) \&\2},/p'" - -# Handle CRLF in mingw tool chain -opt_cr= -case $build_os in -mingw*) - opt_cr=`$ECHO 'x\{0,1\}' | tr x '\015'` # option cr in regexp - ;; -esac - -# Try without a prefix underscore, then with it. -for ac_symprfx in "" "_"; do - - # Transform symcode, sympat, and symprfx into a raw symbol and a C symbol. - symxfrm="\\1 $ac_symprfx\\2 \\2" - - # Write the raw and C identifiers. - if test "$lt_cv_nm_interface" = "MS dumpbin"; then - # Fake it for dumpbin and say T for any non-static function - # and D for any global variable. - # Also find C++ and __fastcall symbols from MSVC++, - # which start with @ or ?. - lt_cv_sys_global_symbol_pipe="$AWK ['"\ -" {last_section=section; section=\$ 3};"\ -" /^COFF SYMBOL TABLE/{for(i in hide) delete hide[i]};"\ -" /Section length .*#relocs.*(pick any)/{hide[last_section]=1};"\ -" \$ 0!~/External *\|/{next};"\ -" / 0+ UNDEF /{next}; / UNDEF \([^|]\)*()/{next};"\ -" {if(hide[section]) next};"\ -" {f=0}; \$ 0~/\(\).*\|/{f=1}; {printf f ? \"T \" : \"D \"};"\ -" {split(\$ 0, a, /\||\r/); split(a[2], s)};"\ -" s[1]~/^[@?]/{print s[1], s[1]; next};"\ -" s[1]~prfx {split(s[1],t,\"@\"); print t[1], substr(t[1],length(prfx))}"\ -" ' prfx=^$ac_symprfx]" - else - lt_cv_sys_global_symbol_pipe="sed -n -e 's/^.*[[ ]]\($symcode$symcode*\)[[ ]][[ ]]*$ac_symprfx$sympat$opt_cr$/$symxfrm/p'" - fi - lt_cv_sys_global_symbol_pipe="$lt_cv_sys_global_symbol_pipe | sed '/ __gnu_lto/d'" - - # Check to see that the pipe works correctly. - pipe_works=no - - rm -f conftest* - cat > conftest.$ac_ext <<_LT_EOF -#ifdef __cplusplus -extern "C" { -#endif -char nm_test_var; -void nm_test_func(void); -void nm_test_func(void){} -#ifdef __cplusplus -} -#endif -int main(){nm_test_var='a';nm_test_func();return(0);} -_LT_EOF - - if AC_TRY_EVAL(ac_compile); then - # Now try to grab the symbols. - nlist=conftest.nm - if AC_TRY_EVAL(NM conftest.$ac_objext \| "$lt_cv_sys_global_symbol_pipe" \> $nlist) && test -s "$nlist"; then - # Try sorting and uniquifying the output. - if sort "$nlist" | uniq > "$nlist"T; then - mv -f "$nlist"T "$nlist" - else - rm -f "$nlist"T - fi - - # Make sure that we snagged all the symbols we need. - if $GREP ' nm_test_var$' "$nlist" >/dev/null; then - if $GREP ' nm_test_func$' "$nlist" >/dev/null; then - cat <<_LT_EOF > conftest.$ac_ext -/* Keep this code in sync between libtool.m4, ltmain, lt_system.h, and tests. */ -#if defined(_WIN32) || defined(__CYGWIN__) || defined(_WIN32_WCE) -/* DATA imports from DLLs on WIN32 con't be const, because runtime - relocations are performed -- see ld's documentation on pseudo-relocs. */ -# define LT@&t@_DLSYM_CONST -#elif defined(__osf__) -/* This system does not cope well with relocations in const data. */ -# define LT@&t@_DLSYM_CONST -#else -# define LT@&t@_DLSYM_CONST const -#endif - -#ifdef __cplusplus -extern "C" { -#endif - -_LT_EOF - # Now generate the symbol file. - eval "$lt_cv_sys_global_symbol_to_cdecl"' < "$nlist" | $GREP -v main >> conftest.$ac_ext' - - cat <<_LT_EOF >> conftest.$ac_ext - -/* The mapping between symbol names and symbols. */ -LT@&t@_DLSYM_CONST struct { - const char *name; - void *address; -} -lt__PROGRAM__LTX_preloaded_symbols[[]] = -{ - { "@PROGRAM@", (void *) 0 }, -_LT_EOF - $SED "s/^$symcode$symcode* \(.*\) \(.*\)$/ {\"\2\", (void *) \&\2},/" < "$nlist" | $GREP -v main >> conftest.$ac_ext - cat <<\_LT_EOF >> conftest.$ac_ext - {0, (void *) 0} -}; - -/* This works around a problem in FreeBSD linker */ -#ifdef FREEBSD_WORKAROUND -static const void *lt_preloaded_setup() { - return lt__PROGRAM__LTX_preloaded_symbols; -} -#endif - -#ifdef __cplusplus -} -#endif -_LT_EOF - # Now try linking the two files. - mv conftest.$ac_objext conftstm.$ac_objext - lt_globsym_save_LIBS=$LIBS - lt_globsym_save_CFLAGS=$CFLAGS - LIBS="conftstm.$ac_objext" - CFLAGS="$CFLAGS$_LT_TAGVAR(lt_prog_compiler_no_builtin_flag, $1)" - if AC_TRY_EVAL(ac_link) && test -s conftest${ac_exeext}; then - pipe_works=yes - fi - LIBS=$lt_globsym_save_LIBS - CFLAGS=$lt_globsym_save_CFLAGS - else - echo "cannot find nm_test_func in $nlist" >&AS_MESSAGE_LOG_FD - fi - else - echo "cannot find nm_test_var in $nlist" >&AS_MESSAGE_LOG_FD - fi - else - echo "cannot run $lt_cv_sys_global_symbol_pipe" >&AS_MESSAGE_LOG_FD - fi - else - echo "$progname: failed program was:" >&AS_MESSAGE_LOG_FD - cat conftest.$ac_ext >&5 - fi - rm -rf conftest* conftst* - - # Do not use the global_symbol_pipe unless it works. - if test "$pipe_works" = yes; then - break - else - lt_cv_sys_global_symbol_pipe= - fi -done -]) -if test -z "$lt_cv_sys_global_symbol_pipe"; then - lt_cv_sys_global_symbol_to_cdecl= -fi -if test -z "$lt_cv_sys_global_symbol_pipe$lt_cv_sys_global_symbol_to_cdecl"; then - AC_MSG_RESULT(failed) -else - AC_MSG_RESULT(ok) -fi - -# Response file support. -if test "$lt_cv_nm_interface" = "MS dumpbin"; then - nm_file_list_spec='@' -elif $NM --help 2>/dev/null | grep '[[@]]FILE' >/dev/null; then - nm_file_list_spec='@' -fi - -_LT_DECL([global_symbol_pipe], [lt_cv_sys_global_symbol_pipe], [1], - [Take the output of nm and produce a listing of raw symbols and C names]) -_LT_DECL([global_symbol_to_cdecl], [lt_cv_sys_global_symbol_to_cdecl], [1], - [Transform the output of nm in a proper C declaration]) -_LT_DECL([global_symbol_to_c_name_address], - [lt_cv_sys_global_symbol_to_c_name_address], [1], - [Transform the output of nm in a C name address pair]) -_LT_DECL([global_symbol_to_c_name_address_lib_prefix], - [lt_cv_sys_global_symbol_to_c_name_address_lib_prefix], [1], - [Transform the output of nm in a C name address pair when lib prefix is needed]) -_LT_DECL([], [nm_file_list_spec], [1], - [Specify filename containing input files for $NM]) -]) # _LT_CMD_GLOBAL_SYMBOLS - - -# _LT_COMPILER_PIC([TAGNAME]) -# --------------------------- -m4_defun([_LT_COMPILER_PIC], -[m4_require([_LT_TAG_COMPILER])dnl -_LT_TAGVAR(lt_prog_compiler_wl, $1)= -_LT_TAGVAR(lt_prog_compiler_pic, $1)= -_LT_TAGVAR(lt_prog_compiler_static, $1)= - -m4_if([$1], [CXX], [ - # C++ specific cases for pic, static, wl, etc. - if test "$GXX" = yes; then - _LT_TAGVAR(lt_prog_compiler_wl, $1)='-Wl,' - _LT_TAGVAR(lt_prog_compiler_static, $1)='-static' - - case $host_os in - aix*) - # All AIX code is PIC. - if test "$host_cpu" = ia64; then - # AIX 5 now supports IA64 processor - _LT_TAGVAR(lt_prog_compiler_static, $1)='-Bstatic' - fi - ;; - - amigaos*) - case $host_cpu in - powerpc) - # see comment about AmigaOS4 .so support - _LT_TAGVAR(lt_prog_compiler_pic, $1)='-fPIC' - ;; - m68k) - # FIXME: we need at least 68020 code to build shared libraries, but - # adding the `-m68020' flag to GCC prevents building anything better, - # like `-m68040'. - _LT_TAGVAR(lt_prog_compiler_pic, $1)='-m68020 -resident32 -malways-restore-a4' - ;; - esac - ;; - - beos* | irix5* | irix6* | nonstopux* | osf3* | osf4* | osf5*) - # PIC is the default for these OSes. - ;; - mingw* | cygwin* | os2* | pw32* | cegcc*) - # This hack is so that the source file can tell whether it is being - # built for inclusion in a dll (and should export symbols for example). - # Although the cygwin gcc ignores -fPIC, still need this for old-style - # (--disable-auto-import) libraries - m4_if([$1], [GCJ], [], - [_LT_TAGVAR(lt_prog_compiler_pic, $1)='-DDLL_EXPORT']) - ;; - darwin* | rhapsody*) - # PIC is the default on this platform - # Common symbols not allowed in MH_DYLIB files - _LT_TAGVAR(lt_prog_compiler_pic, $1)='-fno-common' - ;; - *djgpp*) - # DJGPP does not support shared libraries at all - _LT_TAGVAR(lt_prog_compiler_pic, $1)= - ;; - haiku*) - # PIC is the default for Haiku. - # The "-static" flag exists, but is broken. - _LT_TAGVAR(lt_prog_compiler_static, $1)= - ;; - interix[[3-9]]*) - # Interix 3.x gcc -fpic/-fPIC options generate broken code. - # Instead, we relocate shared libraries at runtime. - ;; - sysv4*MP*) - if test -d /usr/nec; then - _LT_TAGVAR(lt_prog_compiler_pic, $1)=-Kconform_pic - fi - ;; - hpux*) - # PIC is the default for 64-bit PA HP-UX, but not for 32-bit - # PA HP-UX. On IA64 HP-UX, PIC is the default but the pic flag - # sets the default TLS model and affects inlining. - case $host_cpu in - hppa*64*) - ;; - *) - _LT_TAGVAR(lt_prog_compiler_pic, $1)='-fPIC' - ;; - esac - ;; - *qnx* | *nto*) - # QNX uses GNU C++, but need to define -shared option too, otherwise - # it will coredump. - _LT_TAGVAR(lt_prog_compiler_pic, $1)='-fPIC -shared' - ;; - *) - _LT_TAGVAR(lt_prog_compiler_pic, $1)='-fPIC' - ;; - esac - else - case $host_os in - aix[[4-9]]*) - # All AIX code is PIC. - if test "$host_cpu" = ia64; then - # AIX 5 now supports IA64 processor - _LT_TAGVAR(lt_prog_compiler_static, $1)='-Bstatic' - else - _LT_TAGVAR(lt_prog_compiler_static, $1)='-bnso -bI:/lib/syscalls.exp' - fi - ;; - chorus*) - case $cc_basename in - cxch68*) - # Green Hills C++ Compiler - # _LT_TAGVAR(lt_prog_compiler_static, $1)="--no_auto_instantiation -u __main -u __premain -u _abort -r $COOL_DIR/lib/libOrb.a $MVME_DIR/lib/CC/libC.a $MVME_DIR/lib/classix/libcx.s.a" - ;; - esac - ;; - mingw* | cygwin* | os2* | pw32* | cegcc*) - # This hack is so that the source file can tell whether it is being - # built for inclusion in a dll (and should export symbols for example). - m4_if([$1], [GCJ], [], - [_LT_TAGVAR(lt_prog_compiler_pic, $1)='-DDLL_EXPORT']) - ;; - dgux*) - case $cc_basename in - ec++*) - _LT_TAGVAR(lt_prog_compiler_pic, $1)='-KPIC' - ;; - ghcx*) - # Green Hills C++ Compiler - _LT_TAGVAR(lt_prog_compiler_pic, $1)='-pic' - ;; - *) - ;; - esac - ;; - freebsd* | dragonfly*) - # FreeBSD uses GNU C++ - ;; - hpux9* | hpux10* | hpux11*) - case $cc_basename in - CC*) - _LT_TAGVAR(lt_prog_compiler_wl, $1)='-Wl,' - _LT_TAGVAR(lt_prog_compiler_static, $1)='${wl}-a ${wl}archive' - if test "$host_cpu" != ia64; then - _LT_TAGVAR(lt_prog_compiler_pic, $1)='+Z' - fi - ;; - aCC*) - _LT_TAGVAR(lt_prog_compiler_wl, $1)='-Wl,' - _LT_TAGVAR(lt_prog_compiler_static, $1)='${wl}-a ${wl}archive' - case $host_cpu in - hppa*64*|ia64*) - # +Z the default - ;; - *) - _LT_TAGVAR(lt_prog_compiler_pic, $1)='+Z' - ;; - esac - ;; - *) - ;; - esac - ;; - interix*) - # This is c89, which is MS Visual C++ (no shared libs) - # Anyone wants to do a port? - ;; - irix5* | irix6* | nonstopux*) - case $cc_basename in - CC*) - _LT_TAGVAR(lt_prog_compiler_wl, $1)='-Wl,' - _LT_TAGVAR(lt_prog_compiler_static, $1)='-non_shared' - # CC pic flag -KPIC is the default. - ;; - *) - ;; - esac - ;; - linux* | k*bsd*-gnu | kopensolaris*-gnu) - case $cc_basename in - KCC*) - # KAI C++ Compiler - _LT_TAGVAR(lt_prog_compiler_wl, $1)='--backend -Wl,' - _LT_TAGVAR(lt_prog_compiler_pic, $1)='-fPIC' - ;; - ecpc* ) - # old Intel C++ for x86_64 which still supported -KPIC. - _LT_TAGVAR(lt_prog_compiler_wl, $1)='-Wl,' - _LT_TAGVAR(lt_prog_compiler_pic, $1)='-KPIC' - _LT_TAGVAR(lt_prog_compiler_static, $1)='-static' - ;; - icpc* ) - # Intel C++, used to be incompatible with GCC. - # ICC 10 doesn't accept -KPIC any more. - _LT_TAGVAR(lt_prog_compiler_wl, $1)='-Wl,' - _LT_TAGVAR(lt_prog_compiler_pic, $1)='-fPIC' - _LT_TAGVAR(lt_prog_compiler_static, $1)='-static' - ;; - pgCC* | pgcpp*) - # Portland Group C++ compiler - _LT_TAGVAR(lt_prog_compiler_wl, $1)='-Wl,' - _LT_TAGVAR(lt_prog_compiler_pic, $1)='-fpic' - _LT_TAGVAR(lt_prog_compiler_static, $1)='-Bstatic' - ;; - cxx*) - # Compaq C++ - # Make sure the PIC flag is empty. It appears that all Alpha - # Linux and Compaq Tru64 Unix objects are PIC. - _LT_TAGVAR(lt_prog_compiler_pic, $1)= - _LT_TAGVAR(lt_prog_compiler_static, $1)='-non_shared' - ;; - xlc* | xlC* | bgxl[[cC]]* | mpixl[[cC]]*) - # IBM XL 8.0, 9.0 on PPC and BlueGene - _LT_TAGVAR(lt_prog_compiler_wl, $1)='-Wl,' - _LT_TAGVAR(lt_prog_compiler_pic, $1)='-qpic' - _LT_TAGVAR(lt_prog_compiler_static, $1)='-qstaticlink' - ;; - *) - case `$CC -V 2>&1 | sed 5q` in - *Sun\ C*) - # Sun C++ 5.9 - _LT_TAGVAR(lt_prog_compiler_pic, $1)='-KPIC' - _LT_TAGVAR(lt_prog_compiler_static, $1)='-Bstatic' - _LT_TAGVAR(lt_prog_compiler_wl, $1)='-Qoption ld ' - ;; - esac - ;; - esac - ;; - lynxos*) - ;; - m88k*) - ;; - mvs*) - case $cc_basename in - cxx*) - _LT_TAGVAR(lt_prog_compiler_pic, $1)='-W c,exportall' - ;; - *) - ;; - esac - ;; - netbsd*) - ;; - *qnx* | *nto*) - # QNX uses GNU C++, but need to define -shared option too, otherwise - # it will coredump. - _LT_TAGVAR(lt_prog_compiler_pic, $1)='-fPIC -shared' - ;; - osf3* | osf4* | osf5*) - case $cc_basename in - KCC*) - _LT_TAGVAR(lt_prog_compiler_wl, $1)='--backend -Wl,' - ;; - RCC*) - # Rational C++ 2.4.1 - _LT_TAGVAR(lt_prog_compiler_pic, $1)='-pic' - ;; - cxx*) - # Digital/Compaq C++ - _LT_TAGVAR(lt_prog_compiler_wl, $1)='-Wl,' - # Make sure the PIC flag is empty. It appears that all Alpha - # Linux and Compaq Tru64 Unix objects are PIC. - _LT_TAGVAR(lt_prog_compiler_pic, $1)= - _LT_TAGVAR(lt_prog_compiler_static, $1)='-non_shared' - ;; - *) - ;; - esac - ;; - psos*) - ;; - solaris*) - case $cc_basename in - CC* | sunCC*) - # Sun C++ 4.2, 5.x and Centerline C++ - _LT_TAGVAR(lt_prog_compiler_pic, $1)='-KPIC' - _LT_TAGVAR(lt_prog_compiler_static, $1)='-Bstatic' - _LT_TAGVAR(lt_prog_compiler_wl, $1)='-Qoption ld ' - ;; - gcx*) - # Green Hills C++ Compiler - _LT_TAGVAR(lt_prog_compiler_pic, $1)='-PIC' - ;; - *) - ;; - esac - ;; - sunos4*) - case $cc_basename in - CC*) - # Sun C++ 4.x - _LT_TAGVAR(lt_prog_compiler_pic, $1)='-pic' - _LT_TAGVAR(lt_prog_compiler_static, $1)='-Bstatic' - ;; - lcc*) - # Lucid - _LT_TAGVAR(lt_prog_compiler_pic, $1)='-pic' - ;; - *) - ;; - esac - ;; - sysv5* | unixware* | sco3.2v5* | sco5v6* | OpenUNIX*) - case $cc_basename in - CC*) - _LT_TAGVAR(lt_prog_compiler_wl, $1)='-Wl,' - _LT_TAGVAR(lt_prog_compiler_pic, $1)='-KPIC' - _LT_TAGVAR(lt_prog_compiler_static, $1)='-Bstatic' - ;; - esac - ;; - tandem*) - case $cc_basename in - NCC*) - # NonStop-UX NCC 3.20 - _LT_TAGVAR(lt_prog_compiler_pic, $1)='-KPIC' - ;; - *) - ;; - esac - ;; - vxworks*) - ;; - *) - _LT_TAGVAR(lt_prog_compiler_can_build_shared, $1)=no - ;; - esac - fi -], -[ - if test "$GCC" = yes; then - _LT_TAGVAR(lt_prog_compiler_wl, $1)='-Wl,' - _LT_TAGVAR(lt_prog_compiler_static, $1)='-static' - - case $host_os in - aix*) - # All AIX code is PIC. - if test "$host_cpu" = ia64; then - # AIX 5 now supports IA64 processor - _LT_TAGVAR(lt_prog_compiler_static, $1)='-Bstatic' - fi - ;; - - amigaos*) - case $host_cpu in - powerpc) - # see comment about AmigaOS4 .so support - _LT_TAGVAR(lt_prog_compiler_pic, $1)='-fPIC' - ;; - m68k) - # FIXME: we need at least 68020 code to build shared libraries, but - # adding the `-m68020' flag to GCC prevents building anything better, - # like `-m68040'. - _LT_TAGVAR(lt_prog_compiler_pic, $1)='-m68020 -resident32 -malways-restore-a4' - ;; - esac - ;; - - beos* | irix5* | irix6* | nonstopux* | osf3* | osf4* | osf5*) - # PIC is the default for these OSes. - ;; - - mingw* | cygwin* | pw32* | os2* | cegcc*) - # This hack is so that the source file can tell whether it is being - # built for inclusion in a dll (and should export symbols for example). - # Although the cygwin gcc ignores -fPIC, still need this for old-style - # (--disable-auto-import) libraries - m4_if([$1], [GCJ], [], - [_LT_TAGVAR(lt_prog_compiler_pic, $1)='-DDLL_EXPORT']) - ;; - - darwin* | rhapsody*) - # PIC is the default on this platform - # Common symbols not allowed in MH_DYLIB files - _LT_TAGVAR(lt_prog_compiler_pic, $1)='-fno-common' - ;; - - haiku*) - # PIC is the default for Haiku. - # The "-static" flag exists, but is broken. - _LT_TAGVAR(lt_prog_compiler_static, $1)= - ;; - - hpux*) - # PIC is the default for 64-bit PA HP-UX, but not for 32-bit - # PA HP-UX. On IA64 HP-UX, PIC is the default but the pic flag - # sets the default TLS model and affects inlining. - case $host_cpu in - hppa*64*) - # +Z the default - ;; - *) - _LT_TAGVAR(lt_prog_compiler_pic, $1)='-fPIC' - ;; - esac - ;; - - interix[[3-9]]*) - # Interix 3.x gcc -fpic/-fPIC options generate broken code. - # Instead, we relocate shared libraries at runtime. - ;; - - msdosdjgpp*) - # Just because we use GCC doesn't mean we suddenly get shared libraries - # on systems that don't support them. - _LT_TAGVAR(lt_prog_compiler_can_build_shared, $1)=no - enable_shared=no - ;; - - *nto* | *qnx*) - # QNX uses GNU C++, but need to define -shared option too, otherwise - # it will coredump. - _LT_TAGVAR(lt_prog_compiler_pic, $1)='-fPIC -shared' - ;; - - sysv4*MP*) - if test -d /usr/nec; then - _LT_TAGVAR(lt_prog_compiler_pic, $1)=-Kconform_pic - fi - ;; - - *) - _LT_TAGVAR(lt_prog_compiler_pic, $1)='-fPIC' - ;; - esac - - case $cc_basename in - nvcc*) # Cuda Compiler Driver 2.2 - _LT_TAGVAR(lt_prog_compiler_wl, $1)='-Xlinker ' - if test -n "$_LT_TAGVAR(lt_prog_compiler_pic, $1)"; then - _LT_TAGVAR(lt_prog_compiler_pic, $1)="-Xcompiler $_LT_TAGVAR(lt_prog_compiler_pic, $1)" - fi - ;; - esac - else - # PORTME Check for flag to pass linker flags through the system compiler. - case $host_os in - aix*) - _LT_TAGVAR(lt_prog_compiler_wl, $1)='-Wl,' - if test "$host_cpu" = ia64; then - # AIX 5 now supports IA64 processor - _LT_TAGVAR(lt_prog_compiler_static, $1)='-Bstatic' - else - _LT_TAGVAR(lt_prog_compiler_static, $1)='-bnso -bI:/lib/syscalls.exp' - fi - ;; - - mingw* | cygwin* | pw32* | os2* | cegcc*) - # This hack is so that the source file can tell whether it is being - # built for inclusion in a dll (and should export symbols for example). - m4_if([$1], [GCJ], [], - [_LT_TAGVAR(lt_prog_compiler_pic, $1)='-DDLL_EXPORT']) - ;; - - hpux9* | hpux10* | hpux11*) - _LT_TAGVAR(lt_prog_compiler_wl, $1)='-Wl,' - # PIC is the default for IA64 HP-UX and 64-bit HP-UX, but - # not for PA HP-UX. - case $host_cpu in - hppa*64*|ia64*) - # +Z the default - ;; - *) - _LT_TAGVAR(lt_prog_compiler_pic, $1)='+Z' - ;; - esac - # Is there a better lt_prog_compiler_static that works with the bundled CC? - _LT_TAGVAR(lt_prog_compiler_static, $1)='${wl}-a ${wl}archive' - ;; - - irix5* | irix6* | nonstopux*) - _LT_TAGVAR(lt_prog_compiler_wl, $1)='-Wl,' - # PIC (with -KPIC) is the default. - _LT_TAGVAR(lt_prog_compiler_static, $1)='-non_shared' - ;; - - linux* | k*bsd*-gnu | kopensolaris*-gnu) - case $cc_basename in - # old Intel for x86_64 which still supported -KPIC. - ecc*) - _LT_TAGVAR(lt_prog_compiler_wl, $1)='-Wl,' - _LT_TAGVAR(lt_prog_compiler_pic, $1)='-KPIC' - _LT_TAGVAR(lt_prog_compiler_static, $1)='-static' - ;; - # icc used to be incompatible with GCC. - # ICC 10 doesn't accept -KPIC any more. - icc* | ifort*) - _LT_TAGVAR(lt_prog_compiler_wl, $1)='-Wl,' - _LT_TAGVAR(lt_prog_compiler_pic, $1)='-fPIC' - _LT_TAGVAR(lt_prog_compiler_static, $1)='-static' - ;; - # Lahey Fortran 8.1. - lf95*) - _LT_TAGVAR(lt_prog_compiler_wl, $1)='-Wl,' - _LT_TAGVAR(lt_prog_compiler_pic, $1)='--shared' - _LT_TAGVAR(lt_prog_compiler_static, $1)='--static' - ;; - nagfor*) - # NAG Fortran compiler - _LT_TAGVAR(lt_prog_compiler_wl, $1)='-Wl,-Wl,,' - _LT_TAGVAR(lt_prog_compiler_pic, $1)='-PIC' - _LT_TAGVAR(lt_prog_compiler_static, $1)='-Bstatic' - ;; - pgcc* | pgf77* | pgf90* | pgf95* | pgfortran*) - # Portland Group compilers (*not* the Pentium gcc compiler, - # which looks to be a dead project) - _LT_TAGVAR(lt_prog_compiler_wl, $1)='-Wl,' - _LT_TAGVAR(lt_prog_compiler_pic, $1)='-fpic' - _LT_TAGVAR(lt_prog_compiler_static, $1)='-Bstatic' - ;; - ccc*) - _LT_TAGVAR(lt_prog_compiler_wl, $1)='-Wl,' - # All Alpha code is PIC. - _LT_TAGVAR(lt_prog_compiler_static, $1)='-non_shared' - ;; - xl* | bgxl* | bgf* | mpixl*) - # IBM XL C 8.0/Fortran 10.1, 11.1 on PPC and BlueGene - _LT_TAGVAR(lt_prog_compiler_wl, $1)='-Wl,' - _LT_TAGVAR(lt_prog_compiler_pic, $1)='-qpic' - _LT_TAGVAR(lt_prog_compiler_static, $1)='-qstaticlink' - ;; - *) - case `$CC -V 2>&1 | sed 5q` in - *Sun\ Ceres\ Fortran* | *Sun*Fortran*\ [[1-7]].* | *Sun*Fortran*\ 8.[[0-3]]*) - # Sun Fortran 8.3 passes all unrecognized flags to the linker - _LT_TAGVAR(lt_prog_compiler_pic, $1)='-KPIC' - _LT_TAGVAR(lt_prog_compiler_static, $1)='-Bstatic' - _LT_TAGVAR(lt_prog_compiler_wl, $1)='' - ;; - *Sun\ F* | *Sun*Fortran*) - _LT_TAGVAR(lt_prog_compiler_pic, $1)='-KPIC' - _LT_TAGVAR(lt_prog_compiler_static, $1)='-Bstatic' - _LT_TAGVAR(lt_prog_compiler_wl, $1)='-Qoption ld ' - ;; - *Sun\ C*) - # Sun C 5.9 - _LT_TAGVAR(lt_prog_compiler_pic, $1)='-KPIC' - _LT_TAGVAR(lt_prog_compiler_static, $1)='-Bstatic' - _LT_TAGVAR(lt_prog_compiler_wl, $1)='-Wl,' - ;; - *Intel*\ [[CF]]*Compiler*) - _LT_TAGVAR(lt_prog_compiler_wl, $1)='-Wl,' - _LT_TAGVAR(lt_prog_compiler_pic, $1)='-fPIC' - _LT_TAGVAR(lt_prog_compiler_static, $1)='-static' - ;; - *Portland\ Group*) - _LT_TAGVAR(lt_prog_compiler_wl, $1)='-Wl,' - _LT_TAGVAR(lt_prog_compiler_pic, $1)='-fpic' - _LT_TAGVAR(lt_prog_compiler_static, $1)='-Bstatic' - ;; - esac - ;; - esac - ;; - - newsos6) - _LT_TAGVAR(lt_prog_compiler_pic, $1)='-KPIC' - _LT_TAGVAR(lt_prog_compiler_static, $1)='-Bstatic' - ;; - - *nto* | *qnx*) - # QNX uses GNU C++, but need to define -shared option too, otherwise - # it will coredump. - _LT_TAGVAR(lt_prog_compiler_pic, $1)='-fPIC -shared' - ;; - - osf3* | osf4* | osf5*) - _LT_TAGVAR(lt_prog_compiler_wl, $1)='-Wl,' - # All OSF/1 code is PIC. - _LT_TAGVAR(lt_prog_compiler_static, $1)='-non_shared' - ;; - - rdos*) - _LT_TAGVAR(lt_prog_compiler_static, $1)='-non_shared' - ;; - - solaris*) - _LT_TAGVAR(lt_prog_compiler_pic, $1)='-KPIC' - _LT_TAGVAR(lt_prog_compiler_static, $1)='-Bstatic' - case $cc_basename in - f77* | f90* | f95* | sunf77* | sunf90* | sunf95*) - _LT_TAGVAR(lt_prog_compiler_wl, $1)='-Qoption ld ';; - *) - _LT_TAGVAR(lt_prog_compiler_wl, $1)='-Wl,';; - esac - ;; - - sunos4*) - _LT_TAGVAR(lt_prog_compiler_wl, $1)='-Qoption ld ' - _LT_TAGVAR(lt_prog_compiler_pic, $1)='-PIC' - _LT_TAGVAR(lt_prog_compiler_static, $1)='-Bstatic' - ;; - - sysv4 | sysv4.2uw2* | sysv4.3*) - _LT_TAGVAR(lt_prog_compiler_wl, $1)='-Wl,' - _LT_TAGVAR(lt_prog_compiler_pic, $1)='-KPIC' - _LT_TAGVAR(lt_prog_compiler_static, $1)='-Bstatic' - ;; - - sysv4*MP*) - if test -d /usr/nec ;then - _LT_TAGVAR(lt_prog_compiler_pic, $1)='-Kconform_pic' - _LT_TAGVAR(lt_prog_compiler_static, $1)='-Bstatic' - fi - ;; - - sysv5* | unixware* | sco3.2v5* | sco5v6* | OpenUNIX*) - _LT_TAGVAR(lt_prog_compiler_wl, $1)='-Wl,' - _LT_TAGVAR(lt_prog_compiler_pic, $1)='-KPIC' - _LT_TAGVAR(lt_prog_compiler_static, $1)='-Bstatic' - ;; - - unicos*) - _LT_TAGVAR(lt_prog_compiler_wl, $1)='-Wl,' - _LT_TAGVAR(lt_prog_compiler_can_build_shared, $1)=no - ;; - - uts4*) - _LT_TAGVAR(lt_prog_compiler_pic, $1)='-pic' - _LT_TAGVAR(lt_prog_compiler_static, $1)='-Bstatic' - ;; - - *) - _LT_TAGVAR(lt_prog_compiler_can_build_shared, $1)=no - ;; - esac - fi -]) -case $host_os in - # For platforms which do not support PIC, -DPIC is meaningless: - *djgpp*) - _LT_TAGVAR(lt_prog_compiler_pic, $1)= - ;; - *) - _LT_TAGVAR(lt_prog_compiler_pic, $1)="$_LT_TAGVAR(lt_prog_compiler_pic, $1)@&t@m4_if([$1],[],[ -DPIC],[m4_if([$1],[CXX],[ -DPIC],[])])" - ;; -esac - -AC_CACHE_CHECK([for $compiler option to produce PIC], - [_LT_TAGVAR(lt_cv_prog_compiler_pic, $1)], - [_LT_TAGVAR(lt_cv_prog_compiler_pic, $1)=$_LT_TAGVAR(lt_prog_compiler_pic, $1)]) -_LT_TAGVAR(lt_prog_compiler_pic, $1)=$_LT_TAGVAR(lt_cv_prog_compiler_pic, $1) - -# -# Check to make sure the PIC flag actually works. -# -if test -n "$_LT_TAGVAR(lt_prog_compiler_pic, $1)"; then - _LT_COMPILER_OPTION([if $compiler PIC flag $_LT_TAGVAR(lt_prog_compiler_pic, $1) works], - [_LT_TAGVAR(lt_cv_prog_compiler_pic_works, $1)], - [$_LT_TAGVAR(lt_prog_compiler_pic, $1)@&t@m4_if([$1],[],[ -DPIC],[m4_if([$1],[CXX],[ -DPIC],[])])], [], - [case $_LT_TAGVAR(lt_prog_compiler_pic, $1) in - "" | " "*) ;; - *) _LT_TAGVAR(lt_prog_compiler_pic, $1)=" $_LT_TAGVAR(lt_prog_compiler_pic, $1)" ;; - esac], - [_LT_TAGVAR(lt_prog_compiler_pic, $1)= - _LT_TAGVAR(lt_prog_compiler_can_build_shared, $1)=no]) -fi -_LT_TAGDECL([pic_flag], [lt_prog_compiler_pic], [1], - [Additional compiler flags for building library objects]) - -_LT_TAGDECL([wl], [lt_prog_compiler_wl], [1], - [How to pass a linker flag through the compiler]) -# -# Check to make sure the static flag actually works. -# -wl=$_LT_TAGVAR(lt_prog_compiler_wl, $1) eval lt_tmp_static_flag=\"$_LT_TAGVAR(lt_prog_compiler_static, $1)\" -_LT_LINKER_OPTION([if $compiler static flag $lt_tmp_static_flag works], - _LT_TAGVAR(lt_cv_prog_compiler_static_works, $1), - $lt_tmp_static_flag, - [], - [_LT_TAGVAR(lt_prog_compiler_static, $1)=]) -_LT_TAGDECL([link_static_flag], [lt_prog_compiler_static], [1], - [Compiler flag to prevent dynamic linking]) -])# _LT_COMPILER_PIC - - -# _LT_LINKER_SHLIBS([TAGNAME]) -# ---------------------------- -# See if the linker supports building shared libraries. -m4_defun([_LT_LINKER_SHLIBS], -[AC_REQUIRE([LT_PATH_LD])dnl -AC_REQUIRE([LT_PATH_NM])dnl -m4_require([_LT_PATH_MANIFEST_TOOL])dnl -m4_require([_LT_FILEUTILS_DEFAULTS])dnl -m4_require([_LT_DECL_EGREP])dnl -m4_require([_LT_DECL_SED])dnl -m4_require([_LT_CMD_GLOBAL_SYMBOLS])dnl -m4_require([_LT_TAG_COMPILER])dnl -AC_MSG_CHECKING([whether the $compiler linker ($LD) supports shared libraries]) -m4_if([$1], [CXX], [ - _LT_TAGVAR(export_symbols_cmds, $1)='$NM $libobjs $convenience | $global_symbol_pipe | $SED '\''s/.* //'\'' | sort | uniq > $export_symbols' - _LT_TAGVAR(exclude_expsyms, $1)=['_GLOBAL_OFFSET_TABLE_|_GLOBAL__F[ID]_.*'] - case $host_os in - aix[[4-9]]*) - # If we're using GNU nm, then we don't want the "-C" option. - # -C means demangle to AIX nm, but means don't demangle with GNU nm - # Also, AIX nm treats weak defined symbols like other global defined - # symbols, whereas GNU nm marks them as "W". - if $NM -V 2>&1 | $GREP 'GNU' > /dev/null; then - _LT_TAGVAR(export_symbols_cmds, $1)='$NM -Bpg $libobjs $convenience | awk '\''{ if (((\$ 2 == "T") || (\$ 2 == "D") || (\$ 2 == "B") || (\$ 2 == "W")) && ([substr](\$ 3,1,1) != ".")) { print \$ 3 } }'\'' | sort -u > $export_symbols' - else - _LT_TAGVAR(export_symbols_cmds, $1)='$NM -BCpg $libobjs $convenience | awk '\''{ if (((\$ 2 == "T") || (\$ 2 == "D") || (\$ 2 == "B")) && ([substr](\$ 3,1,1) != ".")) { print \$ 3 } }'\'' | sort -u > $export_symbols' - fi - ;; - pw32*) - _LT_TAGVAR(export_symbols_cmds, $1)="$ltdll_cmds" - ;; - cygwin* | mingw* | cegcc*) - case $cc_basename in - cl*) - _LT_TAGVAR(exclude_expsyms, $1)='_NULL_IMPORT_DESCRIPTOR|_IMPORT_DESCRIPTOR_.*' - ;; - *) - _LT_TAGVAR(export_symbols_cmds, $1)='$NM $libobjs $convenience | $global_symbol_pipe | $SED -e '\''/^[[BCDGRS]][[ ]]/s/.*[[ ]]\([[^ ]]*\)/\1 DATA/;s/^.*[[ ]]__nm__\([[^ ]]*\)[[ ]][[^ ]]*/\1 DATA/;/^I[[ ]]/d;/^[[AITW]][[ ]]/s/.* //'\'' | sort | uniq > $export_symbols' - _LT_TAGVAR(exclude_expsyms, $1)=['[_]+GLOBAL_OFFSET_TABLE_|[_]+GLOBAL__[FID]_.*|[_]+head_[A-Za-z0-9_]+_dll|[A-Za-z0-9_]+_dll_iname'] - ;; - esac - ;; - *) - _LT_TAGVAR(export_symbols_cmds, $1)='$NM $libobjs $convenience | $global_symbol_pipe | $SED '\''s/.* //'\'' | sort | uniq > $export_symbols' - ;; - esac -], [ - runpath_var= - _LT_TAGVAR(allow_undefined_flag, $1)= - _LT_TAGVAR(always_export_symbols, $1)=no - _LT_TAGVAR(archive_cmds, $1)= - _LT_TAGVAR(archive_expsym_cmds, $1)= - _LT_TAGVAR(compiler_needs_object, $1)=no - _LT_TAGVAR(enable_shared_with_static_runtimes, $1)=no - _LT_TAGVAR(export_dynamic_flag_spec, $1)= - _LT_TAGVAR(export_symbols_cmds, $1)='$NM $libobjs $convenience | $global_symbol_pipe | $SED '\''s/.* //'\'' | sort | uniq > $export_symbols' - _LT_TAGVAR(hardcode_automatic, $1)=no - _LT_TAGVAR(hardcode_direct, $1)=no - _LT_TAGVAR(hardcode_direct_absolute, $1)=no - _LT_TAGVAR(hardcode_libdir_flag_spec, $1)= - _LT_TAGVAR(hardcode_libdir_separator, $1)= - _LT_TAGVAR(hardcode_minus_L, $1)=no - _LT_TAGVAR(hardcode_shlibpath_var, $1)=unsupported - _LT_TAGVAR(inherit_rpath, $1)=no - _LT_TAGVAR(link_all_deplibs, $1)=unknown - _LT_TAGVAR(module_cmds, $1)= - _LT_TAGVAR(module_expsym_cmds, $1)= - _LT_TAGVAR(old_archive_from_new_cmds, $1)= - _LT_TAGVAR(old_archive_from_expsyms_cmds, $1)= - _LT_TAGVAR(thread_safe_flag_spec, $1)= - _LT_TAGVAR(whole_archive_flag_spec, $1)= - # include_expsyms should be a list of space-separated symbols to be *always* - # included in the symbol list - _LT_TAGVAR(include_expsyms, $1)= - # exclude_expsyms can be an extended regexp of symbols to exclude - # it will be wrapped by ` (' and `)$', so one must not match beginning or - # end of line. Example: `a|bc|.*d.*' will exclude the symbols `a' and `bc', - # as well as any symbol that contains `d'. - _LT_TAGVAR(exclude_expsyms, $1)=['_GLOBAL_OFFSET_TABLE_|_GLOBAL__F[ID]_.*'] - # Although _GLOBAL_OFFSET_TABLE_ is a valid symbol C name, most a.out - # platforms (ab)use it in PIC code, but their linkers get confused if - # the symbol is explicitly referenced. Since portable code cannot - # rely on this symbol name, it's probably fine to never include it in - # preloaded symbol tables. - # Exclude shared library initialization/finalization symbols. -dnl Note also adjust exclude_expsyms for C++ above. - extract_expsyms_cmds= - - case $host_os in - cygwin* | mingw* | pw32* | cegcc*) - # FIXME: the MSVC++ port hasn't been tested in a loooong time - # When not using gcc, we currently assume that we are using - # Microsoft Visual C++. - if test "$GCC" != yes; then - with_gnu_ld=no - fi - ;; - interix*) - # we just hope/assume this is gcc and not c89 (= MSVC++) - with_gnu_ld=yes - ;; - openbsd*) - with_gnu_ld=no - ;; - esac - - _LT_TAGVAR(ld_shlibs, $1)=yes - - # On some targets, GNU ld is compatible enough with the native linker - # that we're better off using the native interface for both. - lt_use_gnu_ld_interface=no - if test "$with_gnu_ld" = yes; then - case $host_os in - aix*) - # The AIX port of GNU ld has always aspired to compatibility - # with the native linker. However, as the warning in the GNU ld - # block says, versions before 2.19.5* couldn't really create working - # shared libraries, regardless of the interface used. - case `$LD -v 2>&1` in - *\ \(GNU\ Binutils\)\ 2.19.5*) ;; - *\ \(GNU\ Binutils\)\ 2.[[2-9]]*) ;; - *\ \(GNU\ Binutils\)\ [[3-9]]*) ;; - *) - lt_use_gnu_ld_interface=yes - ;; - esac - ;; - *) - lt_use_gnu_ld_interface=yes - ;; - esac - fi - - if test "$lt_use_gnu_ld_interface" = yes; then - # If archive_cmds runs LD, not CC, wlarc should be empty - wlarc='${wl}' - - # Set some defaults for GNU ld with shared library support. These - # are reset later if shared libraries are not supported. Putting them - # here allows them to be overridden if necessary. - runpath_var=LD_RUN_PATH - _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='${wl}-rpath ${wl}$libdir' - _LT_TAGVAR(export_dynamic_flag_spec, $1)='${wl}--export-dynamic' - # ancient GNU ld didn't support --whole-archive et. al. - if $LD --help 2>&1 | $GREP 'no-whole-archive' > /dev/null; then - _LT_TAGVAR(whole_archive_flag_spec, $1)="$wlarc"'--whole-archive$convenience '"$wlarc"'--no-whole-archive' - else - _LT_TAGVAR(whole_archive_flag_spec, $1)= - fi - supports_anon_versioning=no - case `$LD -v 2>&1` in - *GNU\ gold*) supports_anon_versioning=yes ;; - *\ [[01]].* | *\ 2.[[0-9]].* | *\ 2.10.*) ;; # catch versions < 2.11 - *\ 2.11.93.0.2\ *) supports_anon_versioning=yes ;; # RH7.3 ... - *\ 2.11.92.0.12\ *) supports_anon_versioning=yes ;; # Mandrake 8.2 ... - *\ 2.11.*) ;; # other 2.11 versions - *) supports_anon_versioning=yes ;; - esac - - # See if GNU ld supports shared libraries. - case $host_os in - aix[[3-9]]*) - # On AIX/PPC, the GNU linker is very broken - if test "$host_cpu" != ia64; then - _LT_TAGVAR(ld_shlibs, $1)=no - cat <<_LT_EOF 1>&2 - -*** Warning: the GNU linker, at least up to release 2.19, is reported -*** to be unable to reliably create shared libraries on AIX. -*** Therefore, libtool is disabling shared libraries support. If you -*** really care for shared libraries, you may want to install binutils -*** 2.20 or above, or modify your PATH so that a non-GNU linker is found. -*** You will then need to restart the configuration process. - -_LT_EOF - fi - ;; - - amigaos*) - case $host_cpu in - powerpc) - # see comment about AmigaOS4 .so support - _LT_TAGVAR(archive_cmds, $1)='$CC -shared $libobjs $deplibs $compiler_flags ${wl}-soname $wl$soname -o $lib' - _LT_TAGVAR(archive_expsym_cmds, $1)='' - ;; - m68k) - _LT_TAGVAR(archive_cmds, $1)='$RM $output_objdir/a2ixlibrary.data~$ECHO "#define NAME $libname" > $output_objdir/a2ixlibrary.data~$ECHO "#define LIBRARY_ID 1" >> $output_objdir/a2ixlibrary.data~$ECHO "#define VERSION $major" >> $output_objdir/a2ixlibrary.data~$ECHO "#define REVISION $revision" >> $output_objdir/a2ixlibrary.data~$AR $AR_FLAGS $lib $libobjs~$RANLIB $lib~(cd $output_objdir && a2ixlibrary -32)' - _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='-L$libdir' - _LT_TAGVAR(hardcode_minus_L, $1)=yes - ;; - esac - ;; - - beos*) - if $LD --help 2>&1 | $GREP ': supported targets:.* elf' > /dev/null; then - _LT_TAGVAR(allow_undefined_flag, $1)=unsupported - # Joseph Beckenbach says some releases of gcc - # support --undefined. This deserves some investigation. FIXME - _LT_TAGVAR(archive_cmds, $1)='$CC -nostart $libobjs $deplibs $compiler_flags ${wl}-soname $wl$soname -o $lib' - else - _LT_TAGVAR(ld_shlibs, $1)=no - fi - ;; - - cygwin* | mingw* | pw32* | cegcc*) - # _LT_TAGVAR(hardcode_libdir_flag_spec, $1) is actually meaningless, - # as there is no search path for DLLs. - _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='-L$libdir' - _LT_TAGVAR(export_dynamic_flag_spec, $1)='${wl}--export-all-symbols' - _LT_TAGVAR(allow_undefined_flag, $1)=unsupported - _LT_TAGVAR(always_export_symbols, $1)=no - _LT_TAGVAR(enable_shared_with_static_runtimes, $1)=yes - _LT_TAGVAR(export_symbols_cmds, $1)='$NM $libobjs $convenience | $global_symbol_pipe | $SED -e '\''/^[[BCDGRS]][[ ]]/s/.*[[ ]]\([[^ ]]*\)/\1 DATA/;s/^.*[[ ]]__nm__\([[^ ]]*\)[[ ]][[^ ]]*/\1 DATA/;/^I[[ ]]/d;/^[[AITW]][[ ]]/s/.* //'\'' | sort | uniq > $export_symbols' - _LT_TAGVAR(exclude_expsyms, $1)=['[_]+GLOBAL_OFFSET_TABLE_|[_]+GLOBAL__[FID]_.*|[_]+head_[A-Za-z0-9_]+_dll|[A-Za-z0-9_]+_dll_iname'] - - if $LD --help 2>&1 | $GREP 'auto-import' > /dev/null; then - _LT_TAGVAR(archive_cmds, $1)='$CC -shared $libobjs $deplibs $compiler_flags -o $output_objdir/$soname ${wl}--enable-auto-image-base -Xlinker --out-implib -Xlinker $lib' - # If the export-symbols file already is a .def file (1st line - # is EXPORTS), use it as is; otherwise, prepend... - _LT_TAGVAR(archive_expsym_cmds, $1)='if test "x`$SED 1q $export_symbols`" = xEXPORTS; then - cp $export_symbols $output_objdir/$soname.def; - else - echo EXPORTS > $output_objdir/$soname.def; - cat $export_symbols >> $output_objdir/$soname.def; - fi~ - $CC -shared $output_objdir/$soname.def $libobjs $deplibs $compiler_flags -o $output_objdir/$soname ${wl}--enable-auto-image-base -Xlinker --out-implib -Xlinker $lib' - else - _LT_TAGVAR(ld_shlibs, $1)=no - fi - ;; - - haiku*) - _LT_TAGVAR(archive_cmds, $1)='$CC -shared $libobjs $deplibs $compiler_flags ${wl}-soname $wl$soname -o $lib' - _LT_TAGVAR(link_all_deplibs, $1)=yes - ;; - - interix[[3-9]]*) - _LT_TAGVAR(hardcode_direct, $1)=no - _LT_TAGVAR(hardcode_shlibpath_var, $1)=no - _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='${wl}-rpath,$libdir' - _LT_TAGVAR(export_dynamic_flag_spec, $1)='${wl}-E' - # Hack: On Interix 3.x, we cannot compile PIC because of a broken gcc. - # Instead, shared libraries are loaded at an image base (0x10000000 by - # default) and relocated if they conflict, which is a slow very memory - # consuming and fragmenting process. To avoid this, we pick a random, - # 256 KiB-aligned image base between 0x50000000 and 0x6FFC0000 at link - # time. Moving up from 0x10000000 also allows more sbrk(2) space. - _LT_TAGVAR(archive_cmds, $1)='$CC -shared $pic_flag $libobjs $deplibs $compiler_flags ${wl}-h,$soname ${wl}--image-base,`expr ${RANDOM-$$} % 4096 / 2 \* 262144 + 1342177280` -o $lib' - _LT_TAGVAR(archive_expsym_cmds, $1)='sed "s,^,_," $export_symbols >$output_objdir/$soname.expsym~$CC -shared $pic_flag $libobjs $deplibs $compiler_flags ${wl}-h,$soname ${wl}--retain-symbols-file,$output_objdir/$soname.expsym ${wl}--image-base,`expr ${RANDOM-$$} % 4096 / 2 \* 262144 + 1342177280` -o $lib' - ;; - - gnu* | linux* | tpf* | k*bsd*-gnu | kopensolaris*-gnu) - tmp_diet=no - if test "$host_os" = linux-dietlibc; then - case $cc_basename in - diet\ *) tmp_diet=yes;; # linux-dietlibc with static linking (!diet-dyn) - esac - fi - if $LD --help 2>&1 | $EGREP ': supported targets:.* elf' > /dev/null \ - && test "$tmp_diet" = no - then - tmp_addflag=' $pic_flag' - tmp_sharedflag='-shared' - case $cc_basename,$host_cpu in - pgcc*) # Portland Group C compiler - _LT_TAGVAR(whole_archive_flag_spec, $1)='${wl}--whole-archive`for conv in $convenience\"\"; do test -n \"$conv\" && new_convenience=\"$new_convenience,$conv\"; done; func_echo_all \"$new_convenience\"` ${wl}--no-whole-archive' - tmp_addflag=' $pic_flag' - ;; - pgf77* | pgf90* | pgf95* | pgfortran*) - # Portland Group f77 and f90 compilers - _LT_TAGVAR(whole_archive_flag_spec, $1)='${wl}--whole-archive`for conv in $convenience\"\"; do test -n \"$conv\" && new_convenience=\"$new_convenience,$conv\"; done; func_echo_all \"$new_convenience\"` ${wl}--no-whole-archive' - tmp_addflag=' $pic_flag -Mnomain' ;; - ecc*,ia64* | icc*,ia64*) # Intel C compiler on ia64 - tmp_addflag=' -i_dynamic' ;; - efc*,ia64* | ifort*,ia64*) # Intel Fortran compiler on ia64 - tmp_addflag=' -i_dynamic -nofor_main' ;; - ifc* | ifort*) # Intel Fortran compiler - tmp_addflag=' -nofor_main' ;; - lf95*) # Lahey Fortran 8.1 - _LT_TAGVAR(whole_archive_flag_spec, $1)= - tmp_sharedflag='--shared' ;; - xl[[cC]]* | bgxl[[cC]]* | mpixl[[cC]]*) # IBM XL C 8.0 on PPC (deal with xlf below) - tmp_sharedflag='-qmkshrobj' - tmp_addflag= ;; - nvcc*) # Cuda Compiler Driver 2.2 - _LT_TAGVAR(whole_archive_flag_spec, $1)='${wl}--whole-archive`for conv in $convenience\"\"; do test -n \"$conv\" && new_convenience=\"$new_convenience,$conv\"; done; func_echo_all \"$new_convenience\"` ${wl}--no-whole-archive' - _LT_TAGVAR(compiler_needs_object, $1)=yes - ;; - esac - case `$CC -V 2>&1 | sed 5q` in - *Sun\ C*) # Sun C 5.9 - _LT_TAGVAR(whole_archive_flag_spec, $1)='${wl}--whole-archive`new_convenience=; for conv in $convenience\"\"; do test -z \"$conv\" || new_convenience=\"$new_convenience,$conv\"; done; func_echo_all \"$new_convenience\"` ${wl}--no-whole-archive' - _LT_TAGVAR(compiler_needs_object, $1)=yes - tmp_sharedflag='-G' ;; - *Sun\ F*) # Sun Fortran 8.3 - tmp_sharedflag='-G' ;; - esac - _LT_TAGVAR(archive_cmds, $1)='$CC '"$tmp_sharedflag""$tmp_addflag"' $libobjs $deplibs $compiler_flags ${wl}-soname $wl$soname -o $lib' - - if test "x$supports_anon_versioning" = xyes; then - _LT_TAGVAR(archive_expsym_cmds, $1)='echo "{ global:" > $output_objdir/$libname.ver~ - cat $export_symbols | sed -e "s/\(.*\)/\1;/" >> $output_objdir/$libname.ver~ - echo "local: *; };" >> $output_objdir/$libname.ver~ - $CC '"$tmp_sharedflag""$tmp_addflag"' $libobjs $deplibs $compiler_flags ${wl}-soname $wl$soname ${wl}-version-script ${wl}$output_objdir/$libname.ver -o $lib' - fi - - case $cc_basename in - xlf* | bgf* | bgxlf* | mpixlf*) - # IBM XL Fortran 10.1 on PPC cannot create shared libs itself - _LT_TAGVAR(whole_archive_flag_spec, $1)='--whole-archive$convenience --no-whole-archive' - _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='${wl}-rpath ${wl}$libdir' - _LT_TAGVAR(archive_cmds, $1)='$LD -shared $libobjs $deplibs $linker_flags -soname $soname -o $lib' - if test "x$supports_anon_versioning" = xyes; then - _LT_TAGVAR(archive_expsym_cmds, $1)='echo "{ global:" > $output_objdir/$libname.ver~ - cat $export_symbols | sed -e "s/\(.*\)/\1;/" >> $output_objdir/$libname.ver~ - echo "local: *; };" >> $output_objdir/$libname.ver~ - $LD -shared $libobjs $deplibs $linker_flags -soname $soname -version-script $output_objdir/$libname.ver -o $lib' - fi - ;; - esac - else - _LT_TAGVAR(ld_shlibs, $1)=no - fi - ;; - - netbsd*) - if echo __ELF__ | $CC -E - | $GREP __ELF__ >/dev/null; then - _LT_TAGVAR(archive_cmds, $1)='$LD -Bshareable $libobjs $deplibs $linker_flags -o $lib' - wlarc= - else - _LT_TAGVAR(archive_cmds, $1)='$CC -shared $pic_flag $libobjs $deplibs $compiler_flags ${wl}-soname $wl$soname -o $lib' - _LT_TAGVAR(archive_expsym_cmds, $1)='$CC -shared $pic_flag $libobjs $deplibs $compiler_flags ${wl}-soname $wl$soname ${wl}-retain-symbols-file $wl$export_symbols -o $lib' - fi - ;; - - solaris*) - if $LD -v 2>&1 | $GREP 'BFD 2\.8' > /dev/null; then - _LT_TAGVAR(ld_shlibs, $1)=no - cat <<_LT_EOF 1>&2 - -*** Warning: The releases 2.8.* of the GNU linker cannot reliably -*** create shared libraries on Solaris systems. Therefore, libtool -*** is disabling shared libraries support. We urge you to upgrade GNU -*** binutils to release 2.9.1 or newer. Another option is to modify -*** your PATH or compiler configuration so that the native linker is -*** used, and then restart. - -_LT_EOF - elif $LD --help 2>&1 | $GREP ': supported targets:.* elf' > /dev/null; then - _LT_TAGVAR(archive_cmds, $1)='$CC -shared $pic_flag $libobjs $deplibs $compiler_flags ${wl}-soname $wl$soname -o $lib' - _LT_TAGVAR(archive_expsym_cmds, $1)='$CC -shared $pic_flag $libobjs $deplibs $compiler_flags ${wl}-soname $wl$soname ${wl}-retain-symbols-file $wl$export_symbols -o $lib' - else - _LT_TAGVAR(ld_shlibs, $1)=no - fi - ;; - - sysv5* | sco3.2v5* | sco5v6* | unixware* | OpenUNIX*) - case `$LD -v 2>&1` in - *\ [[01]].* | *\ 2.[[0-9]].* | *\ 2.1[[0-5]].*) - _LT_TAGVAR(ld_shlibs, $1)=no - cat <<_LT_EOF 1>&2 - -*** Warning: Releases of the GNU linker prior to 2.16.91.0.3 can not -*** reliably create shared libraries on SCO systems. Therefore, libtool -*** is disabling shared libraries support. We urge you to upgrade GNU -*** binutils to release 2.16.91.0.3 or newer. Another option is to modify -*** your PATH or compiler configuration so that the native linker is -*** used, and then restart. - -_LT_EOF - ;; - *) - # For security reasons, it is highly recommended that you always - # use absolute paths for naming shared libraries, and exclude the - # DT_RUNPATH tag from executables and libraries. But doing so - # requires that you compile everything twice, which is a pain. - if $LD --help 2>&1 | $GREP ': supported targets:.* elf' > /dev/null; then - _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='${wl}-rpath ${wl}$libdir' - _LT_TAGVAR(archive_cmds, $1)='$CC -shared $libobjs $deplibs $compiler_flags ${wl}-soname $wl$soname -o $lib' - _LT_TAGVAR(archive_expsym_cmds, $1)='$CC -shared $libobjs $deplibs $compiler_flags ${wl}-soname $wl$soname ${wl}-retain-symbols-file $wl$export_symbols -o $lib' - else - _LT_TAGVAR(ld_shlibs, $1)=no - fi - ;; - esac - ;; - - sunos4*) - _LT_TAGVAR(archive_cmds, $1)='$LD -assert pure-text -Bshareable -o $lib $libobjs $deplibs $linker_flags' - wlarc= - _LT_TAGVAR(hardcode_direct, $1)=yes - _LT_TAGVAR(hardcode_shlibpath_var, $1)=no - ;; - - *) - if $LD --help 2>&1 | $GREP ': supported targets:.* elf' > /dev/null; then - _LT_TAGVAR(archive_cmds, $1)='$CC -shared $pic_flag $libobjs $deplibs $compiler_flags ${wl}-soname $wl$soname -o $lib' - _LT_TAGVAR(archive_expsym_cmds, $1)='$CC -shared $pic_flag $libobjs $deplibs $compiler_flags ${wl}-soname $wl$soname ${wl}-retain-symbols-file $wl$export_symbols -o $lib' - else - _LT_TAGVAR(ld_shlibs, $1)=no - fi - ;; - esac - - if test "$_LT_TAGVAR(ld_shlibs, $1)" = no; then - runpath_var= - _LT_TAGVAR(hardcode_libdir_flag_spec, $1)= - _LT_TAGVAR(export_dynamic_flag_spec, $1)= - _LT_TAGVAR(whole_archive_flag_spec, $1)= - fi - else - # PORTME fill in a description of your system's linker (not GNU ld) - case $host_os in - aix3*) - _LT_TAGVAR(allow_undefined_flag, $1)=unsupported - _LT_TAGVAR(always_export_symbols, $1)=yes - _LT_TAGVAR(archive_expsym_cmds, $1)='$LD -o $output_objdir/$soname $libobjs $deplibs $linker_flags -bE:$export_symbols -T512 -H512 -bM:SRE~$AR $AR_FLAGS $lib $output_objdir/$soname' - # Note: this linker hardcodes the directories in LIBPATH if there - # are no directories specified by -L. - _LT_TAGVAR(hardcode_minus_L, $1)=yes - if test "$GCC" = yes && test -z "$lt_prog_compiler_static"; then - # Neither direct hardcoding nor static linking is supported with a - # broken collect2. - _LT_TAGVAR(hardcode_direct, $1)=unsupported - fi - ;; - - aix[[4-9]]*) - if test "$host_cpu" = ia64; then - # On IA64, the linker does run time linking by default, so we don't - # have to do anything special. - aix_use_runtimelinking=no - exp_sym_flag='-Bexport' - no_entry_flag="" - else - # If we're using GNU nm, then we don't want the "-C" option. - # -C means demangle to AIX nm, but means don't demangle with GNU nm - # Also, AIX nm treats weak defined symbols like other global - # defined symbols, whereas GNU nm marks them as "W". - if $NM -V 2>&1 | $GREP 'GNU' > /dev/null; then - _LT_TAGVAR(export_symbols_cmds, $1)='$NM -Bpg $libobjs $convenience | awk '\''{ if (((\$ 2 == "T") || (\$ 2 == "D") || (\$ 2 == "B") || (\$ 2 == "W")) && ([substr](\$ 3,1,1) != ".")) { print \$ 3 } }'\'' | sort -u > $export_symbols' - else - _LT_TAGVAR(export_symbols_cmds, $1)='$NM -BCpg $libobjs $convenience | awk '\''{ if (((\$ 2 == "T") || (\$ 2 == "D") || (\$ 2 == "B")) && ([substr](\$ 3,1,1) != ".")) { print \$ 3 } }'\'' | sort -u > $export_symbols' - fi - aix_use_runtimelinking=no - - # Test if we are trying to use run time linking or normal - # AIX style linking. If -brtl is somewhere in LDFLAGS, we - # need to do runtime linking. - case $host_os in aix4.[[23]]|aix4.[[23]].*|aix[[5-9]]*) - for ld_flag in $LDFLAGS; do - if (test $ld_flag = "-brtl" || test $ld_flag = "-Wl,-brtl"); then - aix_use_runtimelinking=yes - break - fi - done - ;; - esac - - exp_sym_flag='-bexport' - no_entry_flag='-bnoentry' - fi - - # When large executables or shared objects are built, AIX ld can - # have problems creating the table of contents. If linking a library - # or program results in "error TOC overflow" add -mminimal-toc to - # CXXFLAGS/CFLAGS for g++/gcc. In the cases where that is not - # enough to fix the problem, add -Wl,-bbigtoc to LDFLAGS. - - _LT_TAGVAR(archive_cmds, $1)='' - _LT_TAGVAR(hardcode_direct, $1)=yes - _LT_TAGVAR(hardcode_direct_absolute, $1)=yes - _LT_TAGVAR(hardcode_libdir_separator, $1)=':' - _LT_TAGVAR(link_all_deplibs, $1)=yes - _LT_TAGVAR(file_list_spec, $1)='${wl}-f,' - - if test "$GCC" = yes; then - case $host_os in aix4.[[012]]|aix4.[[012]].*) - # We only want to do this on AIX 4.2 and lower, the check - # below for broken collect2 doesn't work under 4.3+ - collect2name=`${CC} -print-prog-name=collect2` - if test -f "$collect2name" && - strings "$collect2name" | $GREP resolve_lib_name >/dev/null - then - # We have reworked collect2 - : - else - # We have old collect2 - _LT_TAGVAR(hardcode_direct, $1)=unsupported - # It fails to find uninstalled libraries when the uninstalled - # path is not listed in the libpath. Setting hardcode_minus_L - # to unsupported forces relinking - _LT_TAGVAR(hardcode_minus_L, $1)=yes - _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='-L$libdir' - _LT_TAGVAR(hardcode_libdir_separator, $1)= - fi - ;; - esac - shared_flag='-shared' - if test "$aix_use_runtimelinking" = yes; then - shared_flag="$shared_flag "'${wl}-G' - fi - else - # not using gcc - if test "$host_cpu" = ia64; then - # VisualAge C++, Version 5.5 for AIX 5L for IA-64, Beta 3 Release - # chokes on -Wl,-G. The following line is correct: - shared_flag='-G' - else - if test "$aix_use_runtimelinking" = yes; then - shared_flag='${wl}-G' - else - shared_flag='${wl}-bM:SRE' - fi - fi - fi - - _LT_TAGVAR(export_dynamic_flag_spec, $1)='${wl}-bexpall' - # It seems that -bexpall does not export symbols beginning with - # underscore (_), so it is better to generate a list of symbols to export. - _LT_TAGVAR(always_export_symbols, $1)=yes - if test "$aix_use_runtimelinking" = yes; then - # Warning - without using the other runtime loading flags (-brtl), - # -berok will link without error, but may produce a broken library. - _LT_TAGVAR(allow_undefined_flag, $1)='-berok' - # Determine the default libpath from the value encoded in an - # empty executable. - _LT_SYS_MODULE_PATH_AIX([$1]) - _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='${wl}-blibpath:$libdir:'"$aix_libpath" - _LT_TAGVAR(archive_expsym_cmds, $1)='$CC -o $output_objdir/$soname $libobjs $deplibs '"\${wl}$no_entry_flag"' $compiler_flags `if test "x${allow_undefined_flag}" != "x"; then func_echo_all "${wl}${allow_undefined_flag}"; else :; fi` '"\${wl}$exp_sym_flag:\$export_symbols $shared_flag" - else - if test "$host_cpu" = ia64; then - _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='${wl}-R $libdir:/usr/lib:/lib' - _LT_TAGVAR(allow_undefined_flag, $1)="-z nodefs" - _LT_TAGVAR(archive_expsym_cmds, $1)="\$CC $shared_flag"' -o $output_objdir/$soname $libobjs $deplibs '"\${wl}$no_entry_flag"' $compiler_flags ${wl}${allow_undefined_flag} '"\${wl}$exp_sym_flag:\$export_symbols" - else - # Determine the default libpath from the value encoded in an - # empty executable. - _LT_SYS_MODULE_PATH_AIX([$1]) - _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='${wl}-blibpath:$libdir:'"$aix_libpath" - # Warning - without using the other run time loading flags, - # -berok will link without error, but may produce a broken library. - _LT_TAGVAR(no_undefined_flag, $1)=' ${wl}-bernotok' - _LT_TAGVAR(allow_undefined_flag, $1)=' ${wl}-berok' - if test "$with_gnu_ld" = yes; then - # We only use this code for GNU lds that support --whole-archive. - _LT_TAGVAR(whole_archive_flag_spec, $1)='${wl}--whole-archive$convenience ${wl}--no-whole-archive' - else - # Exported symbols can be pulled into shared objects from archives - _LT_TAGVAR(whole_archive_flag_spec, $1)='$convenience' - fi - _LT_TAGVAR(archive_cmds_need_lc, $1)=yes - # This is similar to how AIX traditionally builds its shared libraries. - _LT_TAGVAR(archive_expsym_cmds, $1)="\$CC $shared_flag"' -o $output_objdir/$soname $libobjs $deplibs ${wl}-bnoentry $compiler_flags ${wl}-bE:$export_symbols${allow_undefined_flag}~$AR $AR_FLAGS $output_objdir/$libname$release.a $output_objdir/$soname' - fi - fi - ;; - - amigaos*) - case $host_cpu in - powerpc) - # see comment about AmigaOS4 .so support - _LT_TAGVAR(archive_cmds, $1)='$CC -shared $libobjs $deplibs $compiler_flags ${wl}-soname $wl$soname -o $lib' - _LT_TAGVAR(archive_expsym_cmds, $1)='' - ;; - m68k) - _LT_TAGVAR(archive_cmds, $1)='$RM $output_objdir/a2ixlibrary.data~$ECHO "#define NAME $libname" > $output_objdir/a2ixlibrary.data~$ECHO "#define LIBRARY_ID 1" >> $output_objdir/a2ixlibrary.data~$ECHO "#define VERSION $major" >> $output_objdir/a2ixlibrary.data~$ECHO "#define REVISION $revision" >> $output_objdir/a2ixlibrary.data~$AR $AR_FLAGS $lib $libobjs~$RANLIB $lib~(cd $output_objdir && a2ixlibrary -32)' - _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='-L$libdir' - _LT_TAGVAR(hardcode_minus_L, $1)=yes - ;; - esac - ;; - - bsdi[[45]]*) - _LT_TAGVAR(export_dynamic_flag_spec, $1)=-rdynamic - ;; - - cygwin* | mingw* | pw32* | cegcc*) - # When not using gcc, we currently assume that we are using - # Microsoft Visual C++. - # hardcode_libdir_flag_spec is actually meaningless, as there is - # no search path for DLLs. - case $cc_basename in - cl*) - # Native MSVC - _LT_TAGVAR(hardcode_libdir_flag_spec, $1)=' ' - _LT_TAGVAR(allow_undefined_flag, $1)=unsupported - _LT_TAGVAR(always_export_symbols, $1)=yes - _LT_TAGVAR(file_list_spec, $1)='@' - # Tell ltmain to make .lib files, not .a files. - libext=lib - # Tell ltmain to make .dll files, not .so files. - shrext_cmds=".dll" - # FIXME: Setting linknames here is a bad hack. - _LT_TAGVAR(archive_cmds, $1)='$CC -o $output_objdir/$soname $libobjs $compiler_flags $deplibs -Wl,-dll~linknames=' - _LT_TAGVAR(archive_expsym_cmds, $1)='if test "x`$SED 1q $export_symbols`" = xEXPORTS; then - sed -n -e 's/\\\\\\\(.*\\\\\\\)/-link\\\ -EXPORT:\\\\\\\1/' -e '1\\\!p' < $export_symbols > $output_objdir/$soname.exp; - else - sed -e 's/\\\\\\\(.*\\\\\\\)/-link\\\ -EXPORT:\\\\\\\1/' < $export_symbols > $output_objdir/$soname.exp; - fi~ - $CC -o $tool_output_objdir$soname $libobjs $compiler_flags $deplibs "@$tool_output_objdir$soname.exp" -Wl,-DLL,-IMPLIB:"$tool_output_objdir$libname.dll.lib"~ - linknames=' - # The linker will not automatically build a static lib if we build a DLL. - # _LT_TAGVAR(old_archive_from_new_cmds, $1)='true' - _LT_TAGVAR(enable_shared_with_static_runtimes, $1)=yes - _LT_TAGVAR(exclude_expsyms, $1)='_NULL_IMPORT_DESCRIPTOR|_IMPORT_DESCRIPTOR_.*' - _LT_TAGVAR(export_symbols_cmds, $1)='$NM $libobjs $convenience | $global_symbol_pipe | $SED -e '\''/^[[BCDGRS]][[ ]]/s/.*[[ ]]\([[^ ]]*\)/\1,DATA/'\'' | $SED -e '\''/^[[AITW]][[ ]]/s/.*[[ ]]//'\'' | sort | uniq > $export_symbols' - # Don't use ranlib - _LT_TAGVAR(old_postinstall_cmds, $1)='chmod 644 $oldlib' - _LT_TAGVAR(postlink_cmds, $1)='lt_outputfile="@OUTPUT@"~ - lt_tool_outputfile="@TOOL_OUTPUT@"~ - case $lt_outputfile in - *.exe|*.EXE) ;; - *) - lt_outputfile="$lt_outputfile.exe" - lt_tool_outputfile="$lt_tool_outputfile.exe" - ;; - esac~ - if test "$MANIFEST_TOOL" != ":" && test -f "$lt_outputfile.manifest"; then - $MANIFEST_TOOL -manifest "$lt_tool_outputfile.manifest" -outputresource:"$lt_tool_outputfile" || exit 1; - $RM "$lt_outputfile.manifest"; - fi' - ;; - *) - # Assume MSVC wrapper - _LT_TAGVAR(hardcode_libdir_flag_spec, $1)=' ' - _LT_TAGVAR(allow_undefined_flag, $1)=unsupported - # Tell ltmain to make .lib files, not .a files. - libext=lib - # Tell ltmain to make .dll files, not .so files. - shrext_cmds=".dll" - # FIXME: Setting linknames here is a bad hack. - _LT_TAGVAR(archive_cmds, $1)='$CC -o $lib $libobjs $compiler_flags `func_echo_all "$deplibs" | $SED '\''s/ -lc$//'\''` -link -dll~linknames=' - # The linker will automatically build a .lib file if we build a DLL. - _LT_TAGVAR(old_archive_from_new_cmds, $1)='true' - # FIXME: Should let the user specify the lib program. - _LT_TAGVAR(old_archive_cmds, $1)='lib -OUT:$oldlib$oldobjs$old_deplibs' - _LT_TAGVAR(enable_shared_with_static_runtimes, $1)=yes - ;; - esac - ;; - - darwin* | rhapsody*) - _LT_DARWIN_LINKER_FEATURES($1) - ;; - - dgux*) - _LT_TAGVAR(archive_cmds, $1)='$LD -G -h $soname -o $lib $libobjs $deplibs $linker_flags' - _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='-L$libdir' - _LT_TAGVAR(hardcode_shlibpath_var, $1)=no - ;; - - # FreeBSD 2.2.[012] allows us to include c++rt0.o to get C++ constructor - # support. Future versions do this automatically, but an explicit c++rt0.o - # does not break anything, and helps significantly (at the cost of a little - # extra space). - freebsd2.2*) - _LT_TAGVAR(archive_cmds, $1)='$LD -Bshareable -o $lib $libobjs $deplibs $linker_flags /usr/lib/c++rt0.o' - _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='-R$libdir' - _LT_TAGVAR(hardcode_direct, $1)=yes - _LT_TAGVAR(hardcode_shlibpath_var, $1)=no - ;; - - # Unfortunately, older versions of FreeBSD 2 do not have this feature. - freebsd2.*) - _LT_TAGVAR(archive_cmds, $1)='$LD -Bshareable -o $lib $libobjs $deplibs $linker_flags' - _LT_TAGVAR(hardcode_direct, $1)=yes - _LT_TAGVAR(hardcode_minus_L, $1)=yes - _LT_TAGVAR(hardcode_shlibpath_var, $1)=no - ;; - - # FreeBSD 3 and greater uses gcc -shared to do shared libraries. - freebsd* | dragonfly*) - _LT_TAGVAR(archive_cmds, $1)='$CC -shared $pic_flag -o $lib $libobjs $deplibs $compiler_flags' - _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='-R$libdir' - _LT_TAGVAR(hardcode_direct, $1)=yes - _LT_TAGVAR(hardcode_shlibpath_var, $1)=no - ;; - - hpux9*) - if test "$GCC" = yes; then - _LT_TAGVAR(archive_cmds, $1)='$RM $output_objdir/$soname~$CC -shared $pic_flag ${wl}+b ${wl}$install_libdir -o $output_objdir/$soname $libobjs $deplibs $compiler_flags~test $output_objdir/$soname = $lib || mv $output_objdir/$soname $lib' - else - _LT_TAGVAR(archive_cmds, $1)='$RM $output_objdir/$soname~$LD -b +b $install_libdir -o $output_objdir/$soname $libobjs $deplibs $linker_flags~test $output_objdir/$soname = $lib || mv $output_objdir/$soname $lib' - fi - _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='${wl}+b ${wl}$libdir' - _LT_TAGVAR(hardcode_libdir_separator, $1)=: - _LT_TAGVAR(hardcode_direct, $1)=yes - - # hardcode_minus_L: Not really in the search PATH, - # but as the default location of the library. - _LT_TAGVAR(hardcode_minus_L, $1)=yes - _LT_TAGVAR(export_dynamic_flag_spec, $1)='${wl}-E' - ;; - - hpux10*) - if test "$GCC" = yes && test "$with_gnu_ld" = no; then - _LT_TAGVAR(archive_cmds, $1)='$CC -shared $pic_flag ${wl}+h ${wl}$soname ${wl}+b ${wl}$install_libdir -o $lib $libobjs $deplibs $compiler_flags' - else - _LT_TAGVAR(archive_cmds, $1)='$LD -b +h $soname +b $install_libdir -o $lib $libobjs $deplibs $linker_flags' - fi - if test "$with_gnu_ld" = no; then - _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='${wl}+b ${wl}$libdir' - _LT_TAGVAR(hardcode_libdir_separator, $1)=: - _LT_TAGVAR(hardcode_direct, $1)=yes - _LT_TAGVAR(hardcode_direct_absolute, $1)=yes - _LT_TAGVAR(export_dynamic_flag_spec, $1)='${wl}-E' - # hardcode_minus_L: Not really in the search PATH, - # but as the default location of the library. - _LT_TAGVAR(hardcode_minus_L, $1)=yes - fi - ;; - - hpux11*) - if test "$GCC" = yes && test "$with_gnu_ld" = no; then - case $host_cpu in - hppa*64*) - _LT_TAGVAR(archive_cmds, $1)='$CC -shared ${wl}+h ${wl}$soname -o $lib $libobjs $deplibs $compiler_flags' - ;; - ia64*) - _LT_TAGVAR(archive_cmds, $1)='$CC -shared $pic_flag ${wl}+h ${wl}$soname ${wl}+nodefaultrpath -o $lib $libobjs $deplibs $compiler_flags' - ;; - *) - _LT_TAGVAR(archive_cmds, $1)='$CC -shared $pic_flag ${wl}+h ${wl}$soname ${wl}+b ${wl}$install_libdir -o $lib $libobjs $deplibs $compiler_flags' - ;; - esac - else - case $host_cpu in - hppa*64*) - _LT_TAGVAR(archive_cmds, $1)='$CC -b ${wl}+h ${wl}$soname -o $lib $libobjs $deplibs $compiler_flags' - ;; - ia64*) - _LT_TAGVAR(archive_cmds, $1)='$CC -b ${wl}+h ${wl}$soname ${wl}+nodefaultrpath -o $lib $libobjs $deplibs $compiler_flags' - ;; - *) - m4_if($1, [], [ - # Older versions of the 11.00 compiler do not understand -b yet - # (HP92453-01 A.11.01.20 doesn't, HP92453-01 B.11.X.35175-35176.GP does) - _LT_LINKER_OPTION([if $CC understands -b], - _LT_TAGVAR(lt_cv_prog_compiler__b, $1), [-b], - [_LT_TAGVAR(archive_cmds, $1)='$CC -b ${wl}+h ${wl}$soname ${wl}+b ${wl}$install_libdir -o $lib $libobjs $deplibs $compiler_flags'], - [_LT_TAGVAR(archive_cmds, $1)='$LD -b +h $soname +b $install_libdir -o $lib $libobjs $deplibs $linker_flags'])], - [_LT_TAGVAR(archive_cmds, $1)='$CC -b ${wl}+h ${wl}$soname ${wl}+b ${wl}$install_libdir -o $lib $libobjs $deplibs $compiler_flags']) - ;; - esac - fi - if test "$with_gnu_ld" = no; then - _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='${wl}+b ${wl}$libdir' - _LT_TAGVAR(hardcode_libdir_separator, $1)=: - - case $host_cpu in - hppa*64*|ia64*) - _LT_TAGVAR(hardcode_direct, $1)=no - _LT_TAGVAR(hardcode_shlibpath_var, $1)=no - ;; - *) - _LT_TAGVAR(hardcode_direct, $1)=yes - _LT_TAGVAR(hardcode_direct_absolute, $1)=yes - _LT_TAGVAR(export_dynamic_flag_spec, $1)='${wl}-E' - - # hardcode_minus_L: Not really in the search PATH, - # but as the default location of the library. - _LT_TAGVAR(hardcode_minus_L, $1)=yes - ;; - esac - fi - ;; - - irix5* | irix6* | nonstopux*) - if test "$GCC" = yes; then - _LT_TAGVAR(archive_cmds, $1)='$CC -shared $pic_flag $libobjs $deplibs $compiler_flags ${wl}-soname ${wl}$soname `test -n "$verstring" && func_echo_all "${wl}-set_version ${wl}$verstring"` ${wl}-update_registry ${wl}${output_objdir}/so_locations -o $lib' - # Try to use the -exported_symbol ld option, if it does not - # work, assume that -exports_file does not work either and - # implicitly export all symbols. - # This should be the same for all languages, so no per-tag cache variable. - AC_CACHE_CHECK([whether the $host_os linker accepts -exported_symbol], - [lt_cv_irix_exported_symbol], - [save_LDFLAGS="$LDFLAGS" - LDFLAGS="$LDFLAGS -shared ${wl}-exported_symbol ${wl}foo ${wl}-update_registry ${wl}/dev/null" - AC_LINK_IFELSE( - [AC_LANG_SOURCE( - [AC_LANG_CASE([C], [[int foo (void) { return 0; }]], - [C++], [[int foo (void) { return 0; }]], - [Fortran 77], [[ - subroutine foo - end]], - [Fortran], [[ - subroutine foo - end]])])], - [lt_cv_irix_exported_symbol=yes], - [lt_cv_irix_exported_symbol=no]) - LDFLAGS="$save_LDFLAGS"]) - if test "$lt_cv_irix_exported_symbol" = yes; then - _LT_TAGVAR(archive_expsym_cmds, $1)='$CC -shared $pic_flag $libobjs $deplibs $compiler_flags ${wl}-soname ${wl}$soname `test -n "$verstring" && func_echo_all "${wl}-set_version ${wl}$verstring"` ${wl}-update_registry ${wl}${output_objdir}/so_locations ${wl}-exports_file ${wl}$export_symbols -o $lib' - fi - else - _LT_TAGVAR(archive_cmds, $1)='$CC -shared $libobjs $deplibs $compiler_flags -soname $soname `test -n "$verstring" && func_echo_all "-set_version $verstring"` -update_registry ${output_objdir}/so_locations -o $lib' - _LT_TAGVAR(archive_expsym_cmds, $1)='$CC -shared $libobjs $deplibs $compiler_flags -soname $soname `test -n "$verstring" && func_echo_all "-set_version $verstring"` -update_registry ${output_objdir}/so_locations -exports_file $export_symbols -o $lib' - fi - _LT_TAGVAR(archive_cmds_need_lc, $1)='no' - _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='${wl}-rpath ${wl}$libdir' - _LT_TAGVAR(hardcode_libdir_separator, $1)=: - _LT_TAGVAR(inherit_rpath, $1)=yes - _LT_TAGVAR(link_all_deplibs, $1)=yes - ;; - - netbsd*) - if echo __ELF__ | $CC -E - | $GREP __ELF__ >/dev/null; then - _LT_TAGVAR(archive_cmds, $1)='$LD -Bshareable -o $lib $libobjs $deplibs $linker_flags' # a.out - else - _LT_TAGVAR(archive_cmds, $1)='$LD -shared -o $lib $libobjs $deplibs $linker_flags' # ELF - fi - _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='-R$libdir' - _LT_TAGVAR(hardcode_direct, $1)=yes - _LT_TAGVAR(hardcode_shlibpath_var, $1)=no - ;; - - newsos6) - _LT_TAGVAR(archive_cmds, $1)='$LD -G -h $soname -o $lib $libobjs $deplibs $linker_flags' - _LT_TAGVAR(hardcode_direct, $1)=yes - _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='${wl}-rpath ${wl}$libdir' - _LT_TAGVAR(hardcode_libdir_separator, $1)=: - _LT_TAGVAR(hardcode_shlibpath_var, $1)=no - ;; - - *nto* | *qnx*) - ;; - - openbsd*) - if test -f /usr/libexec/ld.so; then - _LT_TAGVAR(hardcode_direct, $1)=yes - _LT_TAGVAR(hardcode_shlibpath_var, $1)=no - _LT_TAGVAR(hardcode_direct_absolute, $1)=yes - if test -z "`echo __ELF__ | $CC -E - | $GREP __ELF__`" || test "$host_os-$host_cpu" = "openbsd2.8-powerpc"; then - _LT_TAGVAR(archive_cmds, $1)='$CC -shared $pic_flag -o $lib $libobjs $deplibs $compiler_flags' - _LT_TAGVAR(archive_expsym_cmds, $1)='$CC -shared $pic_flag -o $lib $libobjs $deplibs $compiler_flags ${wl}-retain-symbols-file,$export_symbols' - _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='${wl}-rpath,$libdir' - _LT_TAGVAR(export_dynamic_flag_spec, $1)='${wl}-E' - else - case $host_os in - openbsd[[01]].* | openbsd2.[[0-7]] | openbsd2.[[0-7]].*) - _LT_TAGVAR(archive_cmds, $1)='$LD -Bshareable -o $lib $libobjs $deplibs $linker_flags' - _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='-R$libdir' - ;; - *) - _LT_TAGVAR(archive_cmds, $1)='$CC -shared $pic_flag -o $lib $libobjs $deplibs $compiler_flags' - _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='${wl}-rpath,$libdir' - ;; - esac - fi - else - _LT_TAGVAR(ld_shlibs, $1)=no - fi - ;; - - os2*) - _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='-L$libdir' - _LT_TAGVAR(hardcode_minus_L, $1)=yes - _LT_TAGVAR(allow_undefined_flag, $1)=unsupported - _LT_TAGVAR(archive_cmds, $1)='$ECHO "LIBRARY $libname INITINSTANCE" > $output_objdir/$libname.def~$ECHO "DESCRIPTION \"$libname\"" >> $output_objdir/$libname.def~echo DATA >> $output_objdir/$libname.def~echo " SINGLE NONSHARED" >> $output_objdir/$libname.def~echo EXPORTS >> $output_objdir/$libname.def~emxexp $libobjs >> $output_objdir/$libname.def~$CC -Zdll -Zcrtdll -o $lib $libobjs $deplibs $compiler_flags $output_objdir/$libname.def' - _LT_TAGVAR(old_archive_from_new_cmds, $1)='emximp -o $output_objdir/$libname.a $output_objdir/$libname.def' - ;; - - osf3*) - if test "$GCC" = yes; then - _LT_TAGVAR(allow_undefined_flag, $1)=' ${wl}-expect_unresolved ${wl}\*' - _LT_TAGVAR(archive_cmds, $1)='$CC -shared${allow_undefined_flag} $libobjs $deplibs $compiler_flags ${wl}-soname ${wl}$soname `test -n "$verstring" && func_echo_all "${wl}-set_version ${wl}$verstring"` ${wl}-update_registry ${wl}${output_objdir}/so_locations -o $lib' - else - _LT_TAGVAR(allow_undefined_flag, $1)=' -expect_unresolved \*' - _LT_TAGVAR(archive_cmds, $1)='$CC -shared${allow_undefined_flag} $libobjs $deplibs $compiler_flags -soname $soname `test -n "$verstring" && func_echo_all "-set_version $verstring"` -update_registry ${output_objdir}/so_locations -o $lib' - fi - _LT_TAGVAR(archive_cmds_need_lc, $1)='no' - _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='${wl}-rpath ${wl}$libdir' - _LT_TAGVAR(hardcode_libdir_separator, $1)=: - ;; - - osf4* | osf5*) # as osf3* with the addition of -msym flag - if test "$GCC" = yes; then - _LT_TAGVAR(allow_undefined_flag, $1)=' ${wl}-expect_unresolved ${wl}\*' - _LT_TAGVAR(archive_cmds, $1)='$CC -shared${allow_undefined_flag} $pic_flag $libobjs $deplibs $compiler_flags ${wl}-msym ${wl}-soname ${wl}$soname `test -n "$verstring" && func_echo_all "${wl}-set_version ${wl}$verstring"` ${wl}-update_registry ${wl}${output_objdir}/so_locations -o $lib' - _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='${wl}-rpath ${wl}$libdir' - else - _LT_TAGVAR(allow_undefined_flag, $1)=' -expect_unresolved \*' - _LT_TAGVAR(archive_cmds, $1)='$CC -shared${allow_undefined_flag} $libobjs $deplibs $compiler_flags -msym -soname $soname `test -n "$verstring" && func_echo_all "-set_version $verstring"` -update_registry ${output_objdir}/so_locations -o $lib' - _LT_TAGVAR(archive_expsym_cmds, $1)='for i in `cat $export_symbols`; do printf "%s %s\\n" -exported_symbol "\$i" >> $lib.exp; done; printf "%s\\n" "-hidden">> $lib.exp~ - $CC -shared${allow_undefined_flag} ${wl}-input ${wl}$lib.exp $compiler_flags $libobjs $deplibs -soname $soname `test -n "$verstring" && $ECHO "-set_version $verstring"` -update_registry ${output_objdir}/so_locations -o $lib~$RM $lib.exp' - - # Both c and cxx compiler support -rpath directly - _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='-rpath $libdir' - fi - _LT_TAGVAR(archive_cmds_need_lc, $1)='no' - _LT_TAGVAR(hardcode_libdir_separator, $1)=: - ;; - - solaris*) - _LT_TAGVAR(no_undefined_flag, $1)=' -z defs' - if test "$GCC" = yes; then - wlarc='${wl}' - _LT_TAGVAR(archive_cmds, $1)='$CC -shared $pic_flag ${wl}-z ${wl}text ${wl}-h ${wl}$soname -o $lib $libobjs $deplibs $compiler_flags' - _LT_TAGVAR(archive_expsym_cmds, $1)='echo "{ global:" > $lib.exp~cat $export_symbols | $SED -e "s/\(.*\)/\1;/" >> $lib.exp~echo "local: *; };" >> $lib.exp~ - $CC -shared $pic_flag ${wl}-z ${wl}text ${wl}-M ${wl}$lib.exp ${wl}-h ${wl}$soname -o $lib $libobjs $deplibs $compiler_flags~$RM $lib.exp' - else - case `$CC -V 2>&1` in - *"Compilers 5.0"*) - wlarc='' - _LT_TAGVAR(archive_cmds, $1)='$LD -G${allow_undefined_flag} -h $soname -o $lib $libobjs $deplibs $linker_flags' - _LT_TAGVAR(archive_expsym_cmds, $1)='echo "{ global:" > $lib.exp~cat $export_symbols | $SED -e "s/\(.*\)/\1;/" >> $lib.exp~echo "local: *; };" >> $lib.exp~ - $LD -G${allow_undefined_flag} -M $lib.exp -h $soname -o $lib $libobjs $deplibs $linker_flags~$RM $lib.exp' - ;; - *) - wlarc='${wl}' - _LT_TAGVAR(archive_cmds, $1)='$CC -G${allow_undefined_flag} -h $soname -o $lib $libobjs $deplibs $compiler_flags' - _LT_TAGVAR(archive_expsym_cmds, $1)='echo "{ global:" > $lib.exp~cat $export_symbols | $SED -e "s/\(.*\)/\1;/" >> $lib.exp~echo "local: *; };" >> $lib.exp~ - $CC -G${allow_undefined_flag} -M $lib.exp -h $soname -o $lib $libobjs $deplibs $compiler_flags~$RM $lib.exp' - ;; - esac - fi - _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='-R$libdir' - _LT_TAGVAR(hardcode_shlibpath_var, $1)=no - case $host_os in - solaris2.[[0-5]] | solaris2.[[0-5]].*) ;; - *) - # The compiler driver will combine and reorder linker options, - # but understands `-z linker_flag'. GCC discards it without `$wl', - # but is careful enough not to reorder. - # Supported since Solaris 2.6 (maybe 2.5.1?) - if test "$GCC" = yes; then - _LT_TAGVAR(whole_archive_flag_spec, $1)='${wl}-z ${wl}allextract$convenience ${wl}-z ${wl}defaultextract' - else - _LT_TAGVAR(whole_archive_flag_spec, $1)='-z allextract$convenience -z defaultextract' - fi - ;; - esac - _LT_TAGVAR(link_all_deplibs, $1)=yes - ;; - - sunos4*) - if test "x$host_vendor" = xsequent; then - # Use $CC to link under sequent, because it throws in some extra .o - # files that make .init and .fini sections work. - _LT_TAGVAR(archive_cmds, $1)='$CC -G ${wl}-h $soname -o $lib $libobjs $deplibs $compiler_flags' - else - _LT_TAGVAR(archive_cmds, $1)='$LD -assert pure-text -Bstatic -o $lib $libobjs $deplibs $linker_flags' - fi - _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='-L$libdir' - _LT_TAGVAR(hardcode_direct, $1)=yes - _LT_TAGVAR(hardcode_minus_L, $1)=yes - _LT_TAGVAR(hardcode_shlibpath_var, $1)=no - ;; - - sysv4) - case $host_vendor in - sni) - _LT_TAGVAR(archive_cmds, $1)='$LD -G -h $soname -o $lib $libobjs $deplibs $linker_flags' - _LT_TAGVAR(hardcode_direct, $1)=yes # is this really true??? - ;; - siemens) - ## LD is ld it makes a PLAMLIB - ## CC just makes a GrossModule. - _LT_TAGVAR(archive_cmds, $1)='$LD -G -o $lib $libobjs $deplibs $linker_flags' - _LT_TAGVAR(reload_cmds, $1)='$CC -r -o $output$reload_objs' - _LT_TAGVAR(hardcode_direct, $1)=no - ;; - motorola) - _LT_TAGVAR(archive_cmds, $1)='$LD -G -h $soname -o $lib $libobjs $deplibs $linker_flags' - _LT_TAGVAR(hardcode_direct, $1)=no #Motorola manual says yes, but my tests say they lie - ;; - esac - runpath_var='LD_RUN_PATH' - _LT_TAGVAR(hardcode_shlibpath_var, $1)=no - ;; - - sysv4.3*) - _LT_TAGVAR(archive_cmds, $1)='$LD -G -h $soname -o $lib $libobjs $deplibs $linker_flags' - _LT_TAGVAR(hardcode_shlibpath_var, $1)=no - _LT_TAGVAR(export_dynamic_flag_spec, $1)='-Bexport' - ;; - - sysv4*MP*) - if test -d /usr/nec; then - _LT_TAGVAR(archive_cmds, $1)='$LD -G -h $soname -o $lib $libobjs $deplibs $linker_flags' - _LT_TAGVAR(hardcode_shlibpath_var, $1)=no - runpath_var=LD_RUN_PATH - hardcode_runpath_var=yes - _LT_TAGVAR(ld_shlibs, $1)=yes - fi - ;; - - sysv4*uw2* | sysv5OpenUNIX* | sysv5UnixWare7.[[01]].[[10]]* | unixware7* | sco3.2v5.0.[[024]]*) - _LT_TAGVAR(no_undefined_flag, $1)='${wl}-z,text' - _LT_TAGVAR(archive_cmds_need_lc, $1)=no - _LT_TAGVAR(hardcode_shlibpath_var, $1)=no - runpath_var='LD_RUN_PATH' - - if test "$GCC" = yes; then - _LT_TAGVAR(archive_cmds, $1)='$CC -shared ${wl}-h,$soname -o $lib $libobjs $deplibs $compiler_flags' - _LT_TAGVAR(archive_expsym_cmds, $1)='$CC -shared ${wl}-Bexport:$export_symbols ${wl}-h,$soname -o $lib $libobjs $deplibs $compiler_flags' - else - _LT_TAGVAR(archive_cmds, $1)='$CC -G ${wl}-h,$soname -o $lib $libobjs $deplibs $compiler_flags' - _LT_TAGVAR(archive_expsym_cmds, $1)='$CC -G ${wl}-Bexport:$export_symbols ${wl}-h,$soname -o $lib $libobjs $deplibs $compiler_flags' - fi - ;; - - sysv5* | sco3.2v5* | sco5v6*) - # Note: We can NOT use -z defs as we might desire, because we do not - # link with -lc, and that would cause any symbols used from libc to - # always be unresolved, which means just about no library would - # ever link correctly. If we're not using GNU ld we use -z text - # though, which does catch some bad symbols but isn't as heavy-handed - # as -z defs. - _LT_TAGVAR(no_undefined_flag, $1)='${wl}-z,text' - _LT_TAGVAR(allow_undefined_flag, $1)='${wl}-z,nodefs' - _LT_TAGVAR(archive_cmds_need_lc, $1)=no - _LT_TAGVAR(hardcode_shlibpath_var, $1)=no - _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='${wl}-R,$libdir' - _LT_TAGVAR(hardcode_libdir_separator, $1)=':' - _LT_TAGVAR(link_all_deplibs, $1)=yes - _LT_TAGVAR(export_dynamic_flag_spec, $1)='${wl}-Bexport' - runpath_var='LD_RUN_PATH' - - if test "$GCC" = yes; then - _LT_TAGVAR(archive_cmds, $1)='$CC -shared ${wl}-h,$soname -o $lib $libobjs $deplibs $compiler_flags' - _LT_TAGVAR(archive_expsym_cmds, $1)='$CC -shared ${wl}-Bexport:$export_symbols ${wl}-h,$soname -o $lib $libobjs $deplibs $compiler_flags' - else - _LT_TAGVAR(archive_cmds, $1)='$CC -G ${wl}-h,$soname -o $lib $libobjs $deplibs $compiler_flags' - _LT_TAGVAR(archive_expsym_cmds, $1)='$CC -G ${wl}-Bexport:$export_symbols ${wl}-h,$soname -o $lib $libobjs $deplibs $compiler_flags' - fi - ;; - - uts4*) - _LT_TAGVAR(archive_cmds, $1)='$LD -G -h $soname -o $lib $libobjs $deplibs $linker_flags' - _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='-L$libdir' - _LT_TAGVAR(hardcode_shlibpath_var, $1)=no - ;; - - *) - _LT_TAGVAR(ld_shlibs, $1)=no - ;; - esac - - if test x$host_vendor = xsni; then - case $host in - sysv4 | sysv4.2uw2* | sysv4.3* | sysv5*) - _LT_TAGVAR(export_dynamic_flag_spec, $1)='${wl}-Blargedynsym' - ;; - esac - fi - fi -]) -AC_MSG_RESULT([$_LT_TAGVAR(ld_shlibs, $1)]) -test "$_LT_TAGVAR(ld_shlibs, $1)" = no && can_build_shared=no - -_LT_TAGVAR(with_gnu_ld, $1)=$with_gnu_ld - -_LT_DECL([], [libext], [0], [Old archive suffix (normally "a")])dnl -_LT_DECL([], [shrext_cmds], [1], [Shared library suffix (normally ".so")])dnl -_LT_DECL([], [extract_expsyms_cmds], [2], - [The commands to extract the exported symbol list from a shared archive]) - -# -# Do we need to explicitly link libc? -# -case "x$_LT_TAGVAR(archive_cmds_need_lc, $1)" in -x|xyes) - # Assume -lc should be added - _LT_TAGVAR(archive_cmds_need_lc, $1)=yes - - if test "$enable_shared" = yes && test "$GCC" = yes; then - case $_LT_TAGVAR(archive_cmds, $1) in - *'~'*) - # FIXME: we may have to deal with multi-command sequences. - ;; - '$CC '*) - # Test whether the compiler implicitly links with -lc since on some - # systems, -lgcc has to come before -lc. If gcc already passes -lc - # to ld, don't add -lc before -lgcc. - AC_CACHE_CHECK([whether -lc should be explicitly linked in], - [lt_cv_]_LT_TAGVAR(archive_cmds_need_lc, $1), - [$RM conftest* - echo "$lt_simple_compile_test_code" > conftest.$ac_ext - - if AC_TRY_EVAL(ac_compile) 2>conftest.err; then - soname=conftest - lib=conftest - libobjs=conftest.$ac_objext - deplibs= - wl=$_LT_TAGVAR(lt_prog_compiler_wl, $1) - pic_flag=$_LT_TAGVAR(lt_prog_compiler_pic, $1) - compiler_flags=-v - linker_flags=-v - verstring= - output_objdir=. - libname=conftest - lt_save_allow_undefined_flag=$_LT_TAGVAR(allow_undefined_flag, $1) - _LT_TAGVAR(allow_undefined_flag, $1)= - if AC_TRY_EVAL(_LT_TAGVAR(archive_cmds, $1) 2\>\&1 \| $GREP \" -lc \" \>/dev/null 2\>\&1) - then - lt_cv_[]_LT_TAGVAR(archive_cmds_need_lc, $1)=no - else - lt_cv_[]_LT_TAGVAR(archive_cmds_need_lc, $1)=yes - fi - _LT_TAGVAR(allow_undefined_flag, $1)=$lt_save_allow_undefined_flag - else - cat conftest.err 1>&5 - fi - $RM conftest* - ]) - _LT_TAGVAR(archive_cmds_need_lc, $1)=$lt_cv_[]_LT_TAGVAR(archive_cmds_need_lc, $1) - ;; - esac - fi - ;; -esac - -_LT_TAGDECL([build_libtool_need_lc], [archive_cmds_need_lc], [0], - [Whether or not to add -lc for building shared libraries]) -_LT_TAGDECL([allow_libtool_libs_with_static_runtimes], - [enable_shared_with_static_runtimes], [0], - [Whether or not to disallow shared libs when runtime libs are static]) -_LT_TAGDECL([], [export_dynamic_flag_spec], [1], - [Compiler flag to allow reflexive dlopens]) -_LT_TAGDECL([], [whole_archive_flag_spec], [1], - [Compiler flag to generate shared objects directly from archives]) -_LT_TAGDECL([], [compiler_needs_object], [1], - [Whether the compiler copes with passing no objects directly]) -_LT_TAGDECL([], [old_archive_from_new_cmds], [2], - [Create an old-style archive from a shared archive]) -_LT_TAGDECL([], [old_archive_from_expsyms_cmds], [2], - [Create a temporary old-style archive to link instead of a shared archive]) -_LT_TAGDECL([], [archive_cmds], [2], [Commands used to build a shared archive]) -_LT_TAGDECL([], [archive_expsym_cmds], [2]) -_LT_TAGDECL([], [module_cmds], [2], - [Commands used to build a loadable module if different from building - a shared archive.]) -_LT_TAGDECL([], [module_expsym_cmds], [2]) -_LT_TAGDECL([], [with_gnu_ld], [1], - [Whether we are building with GNU ld or not]) -_LT_TAGDECL([], [allow_undefined_flag], [1], - [Flag that allows shared libraries with undefined symbols to be built]) -_LT_TAGDECL([], [no_undefined_flag], [1], - [Flag that enforces no undefined symbols]) -_LT_TAGDECL([], [hardcode_libdir_flag_spec], [1], - [Flag to hardcode $libdir into a binary during linking. - This must work even if $libdir does not exist]) -_LT_TAGDECL([], [hardcode_libdir_separator], [1], - [Whether we need a single "-rpath" flag with a separated argument]) -_LT_TAGDECL([], [hardcode_direct], [0], - [Set to "yes" if using DIR/libNAME${shared_ext} during linking hardcodes - DIR into the resulting binary]) -_LT_TAGDECL([], [hardcode_direct_absolute], [0], - [Set to "yes" if using DIR/libNAME${shared_ext} during linking hardcodes - DIR into the resulting binary and the resulting library dependency is - "absolute", i.e impossible to change by setting ${shlibpath_var} if the - library is relocated]) -_LT_TAGDECL([], [hardcode_minus_L], [0], - [Set to "yes" if using the -LDIR flag during linking hardcodes DIR - into the resulting binary]) -_LT_TAGDECL([], [hardcode_shlibpath_var], [0], - [Set to "yes" if using SHLIBPATH_VAR=DIR during linking hardcodes DIR - into the resulting binary]) -_LT_TAGDECL([], [hardcode_automatic], [0], - [Set to "yes" if building a shared library automatically hardcodes DIR - into the library and all subsequent libraries and executables linked - against it]) -_LT_TAGDECL([], [inherit_rpath], [0], - [Set to yes if linker adds runtime paths of dependent libraries - to runtime path list]) -_LT_TAGDECL([], [link_all_deplibs], [0], - [Whether libtool must link a program against all its dependency libraries]) -_LT_TAGDECL([], [always_export_symbols], [0], - [Set to "yes" if exported symbols are required]) -_LT_TAGDECL([], [export_symbols_cmds], [2], - [The commands to list exported symbols]) -_LT_TAGDECL([], [exclude_expsyms], [1], - [Symbols that should not be listed in the preloaded symbols]) -_LT_TAGDECL([], [include_expsyms], [1], - [Symbols that must always be exported]) -_LT_TAGDECL([], [prelink_cmds], [2], - [Commands necessary for linking programs (against libraries) with templates]) -_LT_TAGDECL([], [postlink_cmds], [2], - [Commands necessary for finishing linking programs]) -_LT_TAGDECL([], [file_list_spec], [1], - [Specify filename containing input files]) -dnl FIXME: Not yet implemented -dnl _LT_TAGDECL([], [thread_safe_flag_spec], [1], -dnl [Compiler flag to generate thread safe objects]) -])# _LT_LINKER_SHLIBS - - -# _LT_LANG_C_CONFIG([TAG]) -# ------------------------ -# Ensure that the configuration variables for a C compiler are suitably -# defined. These variables are subsequently used by _LT_CONFIG to write -# the compiler configuration to `libtool'. -m4_defun([_LT_LANG_C_CONFIG], -[m4_require([_LT_DECL_EGREP])dnl -lt_save_CC="$CC" -AC_LANG_PUSH(C) - -# Source file extension for C test sources. -ac_ext=c - -# Object file extension for compiled C test sources. -objext=o -_LT_TAGVAR(objext, $1)=$objext - -# Code to be used in simple compile tests -lt_simple_compile_test_code="int some_variable = 0;" - -# Code to be used in simple link tests -lt_simple_link_test_code='int main(){return(0);}' - -_LT_TAG_COMPILER -# Save the default compiler, since it gets overwritten when the other -# tags are being tested, and _LT_TAGVAR(compiler, []) is a NOP. -compiler_DEFAULT=$CC - -# save warnings/boilerplate of simple test code -_LT_COMPILER_BOILERPLATE -_LT_LINKER_BOILERPLATE - -## CAVEAT EMPTOR: -## There is no encapsulation within the following macros, do not change -## the running order or otherwise move them around unless you know exactly -## what you are doing... -if test -n "$compiler"; then - _LT_COMPILER_NO_RTTI($1) - _LT_COMPILER_PIC($1) - _LT_COMPILER_C_O($1) - _LT_COMPILER_FILE_LOCKS($1) - _LT_LINKER_SHLIBS($1) - _LT_SYS_DYNAMIC_LINKER($1) - _LT_LINKER_HARDCODE_LIBPATH($1) - LT_SYS_DLOPEN_SELF - _LT_CMD_STRIPLIB - - # Report which library types will actually be built - AC_MSG_CHECKING([if libtool supports shared libraries]) - AC_MSG_RESULT([$can_build_shared]) - - AC_MSG_CHECKING([whether to build shared libraries]) - test "$can_build_shared" = "no" && enable_shared=no - - # On AIX, shared libraries and static libraries use the same namespace, and - # are all built from PIC. - case $host_os in - aix3*) - test "$enable_shared" = yes && enable_static=no - if test -n "$RANLIB"; then - archive_cmds="$archive_cmds~\$RANLIB \$lib" - postinstall_cmds='$RANLIB $lib' - fi - ;; - - aix[[4-9]]*) - if test "$host_cpu" != ia64 && test "$aix_use_runtimelinking" = no ; then - test "$enable_shared" = yes && enable_static=no - fi - ;; - esac - AC_MSG_RESULT([$enable_shared]) - - AC_MSG_CHECKING([whether to build static libraries]) - # Make sure either enable_shared or enable_static is yes. - test "$enable_shared" = yes || enable_static=yes - AC_MSG_RESULT([$enable_static]) - - _LT_CONFIG($1) -fi -AC_LANG_POP -CC="$lt_save_CC" -])# _LT_LANG_C_CONFIG - - -# _LT_LANG_CXX_CONFIG([TAG]) -# -------------------------- -# Ensure that the configuration variables for a C++ compiler are suitably -# defined. These variables are subsequently used by _LT_CONFIG to write -# the compiler configuration to `libtool'. -m4_defun([_LT_LANG_CXX_CONFIG], -[m4_require([_LT_FILEUTILS_DEFAULTS])dnl -m4_require([_LT_DECL_EGREP])dnl -m4_require([_LT_PATH_MANIFEST_TOOL])dnl -if test -n "$CXX" && ( test "X$CXX" != "Xno" && - ( (test "X$CXX" = "Xg++" && `g++ -v >/dev/null 2>&1` ) || - (test "X$CXX" != "Xg++"))) ; then - AC_PROG_CXXCPP -else - _lt_caught_CXX_error=yes -fi - -AC_LANG_PUSH(C++) -_LT_TAGVAR(archive_cmds_need_lc, $1)=no -_LT_TAGVAR(allow_undefined_flag, $1)= -_LT_TAGVAR(always_export_symbols, $1)=no -_LT_TAGVAR(archive_expsym_cmds, $1)= -_LT_TAGVAR(compiler_needs_object, $1)=no -_LT_TAGVAR(export_dynamic_flag_spec, $1)= -_LT_TAGVAR(hardcode_direct, $1)=no -_LT_TAGVAR(hardcode_direct_absolute, $1)=no -_LT_TAGVAR(hardcode_libdir_flag_spec, $1)= -_LT_TAGVAR(hardcode_libdir_separator, $1)= -_LT_TAGVAR(hardcode_minus_L, $1)=no -_LT_TAGVAR(hardcode_shlibpath_var, $1)=unsupported -_LT_TAGVAR(hardcode_automatic, $1)=no -_LT_TAGVAR(inherit_rpath, $1)=no -_LT_TAGVAR(module_cmds, $1)= -_LT_TAGVAR(module_expsym_cmds, $1)= -_LT_TAGVAR(link_all_deplibs, $1)=unknown -_LT_TAGVAR(old_archive_cmds, $1)=$old_archive_cmds -_LT_TAGVAR(reload_flag, $1)=$reload_flag -_LT_TAGVAR(reload_cmds, $1)=$reload_cmds -_LT_TAGVAR(no_undefined_flag, $1)= -_LT_TAGVAR(whole_archive_flag_spec, $1)= -_LT_TAGVAR(enable_shared_with_static_runtimes, $1)=no - -# Source file extension for C++ test sources. -ac_ext=cpp - -# Object file extension for compiled C++ test sources. -objext=o -_LT_TAGVAR(objext, $1)=$objext - -# No sense in running all these tests if we already determined that -# the CXX compiler isn't working. Some variables (like enable_shared) -# are currently assumed to apply to all compilers on this platform, -# and will be corrupted by setting them based on a non-working compiler. -if test "$_lt_caught_CXX_error" != yes; then - # Code to be used in simple compile tests - lt_simple_compile_test_code="int some_variable = 0;" - - # Code to be used in simple link tests - lt_simple_link_test_code='int main(int, char *[[]]) { return(0); }' - - # ltmain only uses $CC for tagged configurations so make sure $CC is set. - _LT_TAG_COMPILER - - # save warnings/boilerplate of simple test code - _LT_COMPILER_BOILERPLATE - _LT_LINKER_BOILERPLATE - - # Allow CC to be a program name with arguments. - lt_save_CC=$CC - lt_save_CFLAGS=$CFLAGS - lt_save_LD=$LD - lt_save_GCC=$GCC - GCC=$GXX - lt_save_with_gnu_ld=$with_gnu_ld - lt_save_path_LD=$lt_cv_path_LD - if test -n "${lt_cv_prog_gnu_ldcxx+set}"; then - lt_cv_prog_gnu_ld=$lt_cv_prog_gnu_ldcxx - else - $as_unset lt_cv_prog_gnu_ld - fi - if test -n "${lt_cv_path_LDCXX+set}"; then - lt_cv_path_LD=$lt_cv_path_LDCXX - else - $as_unset lt_cv_path_LD - fi - test -z "${LDCXX+set}" || LD=$LDCXX - CC=${CXX-"c++"} - CFLAGS=$CXXFLAGS - compiler=$CC - _LT_TAGVAR(compiler, $1)=$CC - _LT_CC_BASENAME([$compiler]) - - if test -n "$compiler"; then - # We don't want -fno-exception when compiling C++ code, so set the - # no_builtin_flag separately - if test "$GXX" = yes; then - _LT_TAGVAR(lt_prog_compiler_no_builtin_flag, $1)=' -fno-builtin' - else - _LT_TAGVAR(lt_prog_compiler_no_builtin_flag, $1)= - fi - - if test "$GXX" = yes; then - # Set up default GNU C++ configuration - - LT_PATH_LD - - # Check if GNU C++ uses GNU ld as the underlying linker, since the - # archiving commands below assume that GNU ld is being used. - if test "$with_gnu_ld" = yes; then - _LT_TAGVAR(archive_cmds, $1)='$CC $pic_flag -shared -nostdlib $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags ${wl}-soname $wl$soname -o $lib' - _LT_TAGVAR(archive_expsym_cmds, $1)='$CC $pic_flag -shared -nostdlib $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags ${wl}-soname $wl$soname ${wl}-retain-symbols-file $wl$export_symbols -o $lib' - - _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='${wl}-rpath ${wl}$libdir' - _LT_TAGVAR(export_dynamic_flag_spec, $1)='${wl}--export-dynamic' - - # If archive_cmds runs LD, not CC, wlarc should be empty - # XXX I think wlarc can be eliminated in ltcf-cxx, but I need to - # investigate it a little bit more. (MM) - wlarc='${wl}' - - # ancient GNU ld didn't support --whole-archive et. al. - if eval "`$CC -print-prog-name=ld` --help 2>&1" | - $GREP 'no-whole-archive' > /dev/null; then - _LT_TAGVAR(whole_archive_flag_spec, $1)="$wlarc"'--whole-archive$convenience '"$wlarc"'--no-whole-archive' - else - _LT_TAGVAR(whole_archive_flag_spec, $1)= - fi - else - with_gnu_ld=no - wlarc= - - # A generic and very simple default shared library creation - # command for GNU C++ for the case where it uses the native - # linker, instead of GNU ld. If possible, this setting should - # overridden to take advantage of the native linker features on - # the platform it is being used on. - _LT_TAGVAR(archive_cmds, $1)='$CC -shared -nostdlib $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags -o $lib' - fi - - # Commands to make compiler produce verbose output that lists - # what "hidden" libraries, object files and flags are used when - # linking a shared library. - output_verbose_link_cmd='$CC -shared $CFLAGS -v conftest.$objext 2>&1 | $GREP -v "^Configured with:" | $GREP "\-L"' - - else - GXX=no - with_gnu_ld=no - wlarc= - fi - - # PORTME: fill in a description of your system's C++ link characteristics - AC_MSG_CHECKING([whether the $compiler linker ($LD) supports shared libraries]) - _LT_TAGVAR(ld_shlibs, $1)=yes - case $host_os in - aix3*) - # FIXME: insert proper C++ library support - _LT_TAGVAR(ld_shlibs, $1)=no - ;; - aix[[4-9]]*) - if test "$host_cpu" = ia64; then - # On IA64, the linker does run time linking by default, so we don't - # have to do anything special. - aix_use_runtimelinking=no - exp_sym_flag='-Bexport' - no_entry_flag="" - else - aix_use_runtimelinking=no - - # Test if we are trying to use run time linking or normal - # AIX style linking. If -brtl is somewhere in LDFLAGS, we - # need to do runtime linking. - case $host_os in aix4.[[23]]|aix4.[[23]].*|aix[[5-9]]*) - for ld_flag in $LDFLAGS; do - case $ld_flag in - *-brtl*) - aix_use_runtimelinking=yes - break - ;; - esac - done - ;; - esac - - exp_sym_flag='-bexport' - no_entry_flag='-bnoentry' - fi - - # When large executables or shared objects are built, AIX ld can - # have problems creating the table of contents. If linking a library - # or program results in "error TOC overflow" add -mminimal-toc to - # CXXFLAGS/CFLAGS for g++/gcc. In the cases where that is not - # enough to fix the problem, add -Wl,-bbigtoc to LDFLAGS. - - _LT_TAGVAR(archive_cmds, $1)='' - _LT_TAGVAR(hardcode_direct, $1)=yes - _LT_TAGVAR(hardcode_direct_absolute, $1)=yes - _LT_TAGVAR(hardcode_libdir_separator, $1)=':' - _LT_TAGVAR(link_all_deplibs, $1)=yes - _LT_TAGVAR(file_list_spec, $1)='${wl}-f,' - - if test "$GXX" = yes; then - case $host_os in aix4.[[012]]|aix4.[[012]].*) - # We only want to do this on AIX 4.2 and lower, the check - # below for broken collect2 doesn't work under 4.3+ - collect2name=`${CC} -print-prog-name=collect2` - if test -f "$collect2name" && - strings "$collect2name" | $GREP resolve_lib_name >/dev/null - then - # We have reworked collect2 - : - else - # We have old collect2 - _LT_TAGVAR(hardcode_direct, $1)=unsupported - # It fails to find uninstalled libraries when the uninstalled - # path is not listed in the libpath. Setting hardcode_minus_L - # to unsupported forces relinking - _LT_TAGVAR(hardcode_minus_L, $1)=yes - _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='-L$libdir' - _LT_TAGVAR(hardcode_libdir_separator, $1)= - fi - esac - shared_flag='-shared' - if test "$aix_use_runtimelinking" = yes; then - shared_flag="$shared_flag "'${wl}-G' - fi - else - # not using gcc - if test "$host_cpu" = ia64; then - # VisualAge C++, Version 5.5 for AIX 5L for IA-64, Beta 3 Release - # chokes on -Wl,-G. The following line is correct: - shared_flag='-G' - else - if test "$aix_use_runtimelinking" = yes; then - shared_flag='${wl}-G' - else - shared_flag='${wl}-bM:SRE' - fi - fi - fi - - _LT_TAGVAR(export_dynamic_flag_spec, $1)='${wl}-bexpall' - # It seems that -bexpall does not export symbols beginning with - # underscore (_), so it is better to generate a list of symbols to - # export. - _LT_TAGVAR(always_export_symbols, $1)=yes - if test "$aix_use_runtimelinking" = yes; then - # Warning - without using the other runtime loading flags (-brtl), - # -berok will link without error, but may produce a broken library. - _LT_TAGVAR(allow_undefined_flag, $1)='-berok' - # Determine the default libpath from the value encoded in an empty - # executable. - _LT_SYS_MODULE_PATH_AIX([$1]) - _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='${wl}-blibpath:$libdir:'"$aix_libpath" - - _LT_TAGVAR(archive_expsym_cmds, $1)='$CC -o $output_objdir/$soname $libobjs $deplibs '"\${wl}$no_entry_flag"' $compiler_flags `if test "x${allow_undefined_flag}" != "x"; then func_echo_all "${wl}${allow_undefined_flag}"; else :; fi` '"\${wl}$exp_sym_flag:\$export_symbols $shared_flag" - else - if test "$host_cpu" = ia64; then - _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='${wl}-R $libdir:/usr/lib:/lib' - _LT_TAGVAR(allow_undefined_flag, $1)="-z nodefs" - _LT_TAGVAR(archive_expsym_cmds, $1)="\$CC $shared_flag"' -o $output_objdir/$soname $libobjs $deplibs '"\${wl}$no_entry_flag"' $compiler_flags ${wl}${allow_undefined_flag} '"\${wl}$exp_sym_flag:\$export_symbols" - else - # Determine the default libpath from the value encoded in an - # empty executable. - _LT_SYS_MODULE_PATH_AIX([$1]) - _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='${wl}-blibpath:$libdir:'"$aix_libpath" - # Warning - without using the other run time loading flags, - # -berok will link without error, but may produce a broken library. - _LT_TAGVAR(no_undefined_flag, $1)=' ${wl}-bernotok' - _LT_TAGVAR(allow_undefined_flag, $1)=' ${wl}-berok' - if test "$with_gnu_ld" = yes; then - # We only use this code for GNU lds that support --whole-archive. - _LT_TAGVAR(whole_archive_flag_spec, $1)='${wl}--whole-archive$convenience ${wl}--no-whole-archive' - else - # Exported symbols can be pulled into shared objects from archives - _LT_TAGVAR(whole_archive_flag_spec, $1)='$convenience' - fi - _LT_TAGVAR(archive_cmds_need_lc, $1)=yes - # This is similar to how AIX traditionally builds its shared - # libraries. - _LT_TAGVAR(archive_expsym_cmds, $1)="\$CC $shared_flag"' -o $output_objdir/$soname $libobjs $deplibs ${wl}-bnoentry $compiler_flags ${wl}-bE:$export_symbols${allow_undefined_flag}~$AR $AR_FLAGS $output_objdir/$libname$release.a $output_objdir/$soname' - fi - fi - ;; - - beos*) - if $LD --help 2>&1 | $GREP ': supported targets:.* elf' > /dev/null; then - _LT_TAGVAR(allow_undefined_flag, $1)=unsupported - # Joseph Beckenbach says some releases of gcc - # support --undefined. This deserves some investigation. FIXME - _LT_TAGVAR(archive_cmds, $1)='$CC -nostart $libobjs $deplibs $compiler_flags ${wl}-soname $wl$soname -o $lib' - else - _LT_TAGVAR(ld_shlibs, $1)=no - fi - ;; - - chorus*) - case $cc_basename in - *) - # FIXME: insert proper C++ library support - _LT_TAGVAR(ld_shlibs, $1)=no - ;; - esac - ;; - - cygwin* | mingw* | pw32* | cegcc*) - case $GXX,$cc_basename in - ,cl* | no,cl*) - # Native MSVC - # hardcode_libdir_flag_spec is actually meaningless, as there is - # no search path for DLLs. - _LT_TAGVAR(hardcode_libdir_flag_spec, $1)=' ' - _LT_TAGVAR(allow_undefined_flag, $1)=unsupported - _LT_TAGVAR(always_export_symbols, $1)=yes - _LT_TAGVAR(file_list_spec, $1)='@' - # Tell ltmain to make .lib files, not .a files. - libext=lib - # Tell ltmain to make .dll files, not .so files. - shrext_cmds=".dll" - # FIXME: Setting linknames here is a bad hack. - _LT_TAGVAR(archive_cmds, $1)='$CC -o $output_objdir/$soname $libobjs $compiler_flags $deplibs -Wl,-dll~linknames=' - _LT_TAGVAR(archive_expsym_cmds, $1)='if test "x`$SED 1q $export_symbols`" = xEXPORTS; then - $SED -n -e 's/\\\\\\\(.*\\\\\\\)/-link\\\ -EXPORT:\\\\\\\1/' -e '1\\\!p' < $export_symbols > $output_objdir/$soname.exp; - else - $SED -e 's/\\\\\\\(.*\\\\\\\)/-link\\\ -EXPORT:\\\\\\\1/' < $export_symbols > $output_objdir/$soname.exp; - fi~ - $CC -o $tool_output_objdir$soname $libobjs $compiler_flags $deplibs "@$tool_output_objdir$soname.exp" -Wl,-DLL,-IMPLIB:"$tool_output_objdir$libname.dll.lib"~ - linknames=' - # The linker will not automatically build a static lib if we build a DLL. - # _LT_TAGVAR(old_archive_from_new_cmds, $1)='true' - _LT_TAGVAR(enable_shared_with_static_runtimes, $1)=yes - # Don't use ranlib - _LT_TAGVAR(old_postinstall_cmds, $1)='chmod 644 $oldlib' - _LT_TAGVAR(postlink_cmds, $1)='lt_outputfile="@OUTPUT@"~ - lt_tool_outputfile="@TOOL_OUTPUT@"~ - case $lt_outputfile in - *.exe|*.EXE) ;; - *) - lt_outputfile="$lt_outputfile.exe" - lt_tool_outputfile="$lt_tool_outputfile.exe" - ;; - esac~ - func_to_tool_file "$lt_outputfile"~ - if test "$MANIFEST_TOOL" != ":" && test -f "$lt_outputfile.manifest"; then - $MANIFEST_TOOL -manifest "$lt_tool_outputfile.manifest" -outputresource:"$lt_tool_outputfile" || exit 1; - $RM "$lt_outputfile.manifest"; - fi' - ;; - *) - # g++ - # _LT_TAGVAR(hardcode_libdir_flag_spec, $1) is actually meaningless, - # as there is no search path for DLLs. - _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='-L$libdir' - _LT_TAGVAR(export_dynamic_flag_spec, $1)='${wl}--export-all-symbols' - _LT_TAGVAR(allow_undefined_flag, $1)=unsupported - _LT_TAGVAR(always_export_symbols, $1)=no - _LT_TAGVAR(enable_shared_with_static_runtimes, $1)=yes - - if $LD --help 2>&1 | $GREP 'auto-import' > /dev/null; then - _LT_TAGVAR(archive_cmds, $1)='$CC -shared -nostdlib $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags -o $output_objdir/$soname ${wl}--enable-auto-image-base -Xlinker --out-implib -Xlinker $lib' - # If the export-symbols file already is a .def file (1st line - # is EXPORTS), use it as is; otherwise, prepend... - _LT_TAGVAR(archive_expsym_cmds, $1)='if test "x`$SED 1q $export_symbols`" = xEXPORTS; then - cp $export_symbols $output_objdir/$soname.def; - else - echo EXPORTS > $output_objdir/$soname.def; - cat $export_symbols >> $output_objdir/$soname.def; - fi~ - $CC -shared -nostdlib $output_objdir/$soname.def $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags -o $output_objdir/$soname ${wl}--enable-auto-image-base -Xlinker --out-implib -Xlinker $lib' - else - _LT_TAGVAR(ld_shlibs, $1)=no - fi - ;; - esac - ;; - darwin* | rhapsody*) - _LT_DARWIN_LINKER_FEATURES($1) - ;; - - dgux*) - case $cc_basename in - ec++*) - # FIXME: insert proper C++ library support - _LT_TAGVAR(ld_shlibs, $1)=no - ;; - ghcx*) - # Green Hills C++ Compiler - # FIXME: insert proper C++ library support - _LT_TAGVAR(ld_shlibs, $1)=no - ;; - *) - # FIXME: insert proper C++ library support - _LT_TAGVAR(ld_shlibs, $1)=no - ;; - esac - ;; - - freebsd2.*) - # C++ shared libraries reported to be fairly broken before - # switch to ELF - _LT_TAGVAR(ld_shlibs, $1)=no - ;; - - freebsd-elf*) - _LT_TAGVAR(archive_cmds_need_lc, $1)=no - ;; - - freebsd* | dragonfly*) - # FreeBSD 3 and later use GNU C++ and GNU ld with standard ELF - # conventions - _LT_TAGVAR(ld_shlibs, $1)=yes - ;; - - gnu*) - ;; - - haiku*) - _LT_TAGVAR(archive_cmds, $1)='$CC -shared $libobjs $deplibs $compiler_flags ${wl}-soname $wl$soname -o $lib' - _LT_TAGVAR(link_all_deplibs, $1)=yes - ;; - - hpux9*) - _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='${wl}+b ${wl}$libdir' - _LT_TAGVAR(hardcode_libdir_separator, $1)=: - _LT_TAGVAR(export_dynamic_flag_spec, $1)='${wl}-E' - _LT_TAGVAR(hardcode_direct, $1)=yes - _LT_TAGVAR(hardcode_minus_L, $1)=yes # Not in the search PATH, - # but as the default - # location of the library. - - case $cc_basename in - CC*) - # FIXME: insert proper C++ library support - _LT_TAGVAR(ld_shlibs, $1)=no - ;; - aCC*) - _LT_TAGVAR(archive_cmds, $1)='$RM $output_objdir/$soname~$CC -b ${wl}+b ${wl}$install_libdir -o $output_objdir/$soname $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags~test $output_objdir/$soname = $lib || mv $output_objdir/$soname $lib' - # Commands to make compiler produce verbose output that lists - # what "hidden" libraries, object files and flags are used when - # linking a shared library. - # - # There doesn't appear to be a way to prevent this compiler from - # explicitly linking system object files so we need to strip them - # from the output so that they don't get included in the library - # dependencies. - output_verbose_link_cmd='templist=`($CC -b $CFLAGS -v conftest.$objext 2>&1) | $EGREP "\-L"`; list=""; for z in $templist; do case $z in conftest.$objext) list="$list $z";; *.$objext);; *) list="$list $z";;esac; done; func_echo_all "$list"' - ;; - *) - if test "$GXX" = yes; then - _LT_TAGVAR(archive_cmds, $1)='$RM $output_objdir/$soname~$CC -shared -nostdlib $pic_flag ${wl}+b ${wl}$install_libdir -o $output_objdir/$soname $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags~test $output_objdir/$soname = $lib || mv $output_objdir/$soname $lib' - else - # FIXME: insert proper C++ library support - _LT_TAGVAR(ld_shlibs, $1)=no - fi - ;; - esac - ;; - - hpux10*|hpux11*) - if test $with_gnu_ld = no; then - _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='${wl}+b ${wl}$libdir' - _LT_TAGVAR(hardcode_libdir_separator, $1)=: - - case $host_cpu in - hppa*64*|ia64*) - ;; - *) - _LT_TAGVAR(export_dynamic_flag_spec, $1)='${wl}-E' - ;; - esac - fi - case $host_cpu in - hppa*64*|ia64*) - _LT_TAGVAR(hardcode_direct, $1)=no - _LT_TAGVAR(hardcode_shlibpath_var, $1)=no - ;; - *) - _LT_TAGVAR(hardcode_direct, $1)=yes - _LT_TAGVAR(hardcode_direct_absolute, $1)=yes - _LT_TAGVAR(hardcode_minus_L, $1)=yes # Not in the search PATH, - # but as the default - # location of the library. - ;; - esac - - case $cc_basename in - CC*) - # FIXME: insert proper C++ library support - _LT_TAGVAR(ld_shlibs, $1)=no - ;; - aCC*) - case $host_cpu in - hppa*64*) - _LT_TAGVAR(archive_cmds, $1)='$CC -b ${wl}+h ${wl}$soname -o $lib $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags' - ;; - ia64*) - _LT_TAGVAR(archive_cmds, $1)='$CC -b ${wl}+h ${wl}$soname ${wl}+nodefaultrpath -o $lib $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags' - ;; - *) - _LT_TAGVAR(archive_cmds, $1)='$CC -b ${wl}+h ${wl}$soname ${wl}+b ${wl}$install_libdir -o $lib $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags' - ;; - esac - # Commands to make compiler produce verbose output that lists - # what "hidden" libraries, object files and flags are used when - # linking a shared library. - # - # There doesn't appear to be a way to prevent this compiler from - # explicitly linking system object files so we need to strip them - # from the output so that they don't get included in the library - # dependencies. - output_verbose_link_cmd='templist=`($CC -b $CFLAGS -v conftest.$objext 2>&1) | $GREP "\-L"`; list=""; for z in $templist; do case $z in conftest.$objext) list="$list $z";; *.$objext);; *) list="$list $z";;esac; done; func_echo_all "$list"' - ;; - *) - if test "$GXX" = yes; then - if test $with_gnu_ld = no; then - case $host_cpu in - hppa*64*) - _LT_TAGVAR(archive_cmds, $1)='$CC -shared -nostdlib -fPIC ${wl}+h ${wl}$soname -o $lib $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags' - ;; - ia64*) - _LT_TAGVAR(archive_cmds, $1)='$CC -shared -nostdlib $pic_flag ${wl}+h ${wl}$soname ${wl}+nodefaultrpath -o $lib $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags' - ;; - *) - _LT_TAGVAR(archive_cmds, $1)='$CC -shared -nostdlib $pic_flag ${wl}+h ${wl}$soname ${wl}+b ${wl}$install_libdir -o $lib $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags' - ;; - esac - fi - else - # FIXME: insert proper C++ library support - _LT_TAGVAR(ld_shlibs, $1)=no - fi - ;; - esac - ;; - - interix[[3-9]]*) - _LT_TAGVAR(hardcode_direct, $1)=no - _LT_TAGVAR(hardcode_shlibpath_var, $1)=no - _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='${wl}-rpath,$libdir' - _LT_TAGVAR(export_dynamic_flag_spec, $1)='${wl}-E' - # Hack: On Interix 3.x, we cannot compile PIC because of a broken gcc. - # Instead, shared libraries are loaded at an image base (0x10000000 by - # default) and relocated if they conflict, which is a slow very memory - # consuming and fragmenting process. To avoid this, we pick a random, - # 256 KiB-aligned image base between 0x50000000 and 0x6FFC0000 at link - # time. Moving up from 0x10000000 also allows more sbrk(2) space. - _LT_TAGVAR(archive_cmds, $1)='$CC -shared $pic_flag $libobjs $deplibs $compiler_flags ${wl}-h,$soname ${wl}--image-base,`expr ${RANDOM-$$} % 4096 / 2 \* 262144 + 1342177280` -o $lib' - _LT_TAGVAR(archive_expsym_cmds, $1)='sed "s,^,_," $export_symbols >$output_objdir/$soname.expsym~$CC -shared $pic_flag $libobjs $deplibs $compiler_flags ${wl}-h,$soname ${wl}--retain-symbols-file,$output_objdir/$soname.expsym ${wl}--image-base,`expr ${RANDOM-$$} % 4096 / 2 \* 262144 + 1342177280` -o $lib' - ;; - irix5* | irix6*) - case $cc_basename in - CC*) - # SGI C++ - _LT_TAGVAR(archive_cmds, $1)='$CC -shared -all -multigot $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags -soname $soname `test -n "$verstring" && func_echo_all "-set_version $verstring"` -update_registry ${output_objdir}/so_locations -o $lib' - - # Archives containing C++ object files must be created using - # "CC -ar", where "CC" is the IRIX C++ compiler. This is - # necessary to make sure instantiated templates are included - # in the archive. - _LT_TAGVAR(old_archive_cmds, $1)='$CC -ar -WR,-u -o $oldlib $oldobjs' - ;; - *) - if test "$GXX" = yes; then - if test "$with_gnu_ld" = no; then - _LT_TAGVAR(archive_cmds, $1)='$CC -shared $pic_flag -nostdlib $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags ${wl}-soname ${wl}$soname `test -n "$verstring" && func_echo_all "${wl}-set_version ${wl}$verstring"` ${wl}-update_registry ${wl}${output_objdir}/so_locations -o $lib' - else - _LT_TAGVAR(archive_cmds, $1)='$CC -shared $pic_flag -nostdlib $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags ${wl}-soname ${wl}$soname `test -n "$verstring" && func_echo_all "${wl}-set_version ${wl}$verstring"` -o $lib' - fi - fi - _LT_TAGVAR(link_all_deplibs, $1)=yes - ;; - esac - _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='${wl}-rpath ${wl}$libdir' - _LT_TAGVAR(hardcode_libdir_separator, $1)=: - _LT_TAGVAR(inherit_rpath, $1)=yes - ;; - - linux* | k*bsd*-gnu | kopensolaris*-gnu) - case $cc_basename in - KCC*) - # Kuck and Associates, Inc. (KAI) C++ Compiler - - # KCC will only create a shared library if the output file - # ends with ".so" (or ".sl" for HP-UX), so rename the library - # to its proper name (with version) after linking. - _LT_TAGVAR(archive_cmds, $1)='tempext=`echo $shared_ext | $SED -e '\''s/\([[^()0-9A-Za-z{}]]\)/\\\\\1/g'\''`; templib=`echo $lib | $SED -e "s/\${tempext}\..*/.so/"`; $CC $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags --soname $soname -o \$templib; mv \$templib $lib' - _LT_TAGVAR(archive_expsym_cmds, $1)='tempext=`echo $shared_ext | $SED -e '\''s/\([[^()0-9A-Za-z{}]]\)/\\\\\1/g'\''`; templib=`echo $lib | $SED -e "s/\${tempext}\..*/.so/"`; $CC $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags --soname $soname -o \$templib ${wl}-retain-symbols-file,$export_symbols; mv \$templib $lib' - # Commands to make compiler produce verbose output that lists - # what "hidden" libraries, object files and flags are used when - # linking a shared library. - # - # There doesn't appear to be a way to prevent this compiler from - # explicitly linking system object files so we need to strip them - # from the output so that they don't get included in the library - # dependencies. - output_verbose_link_cmd='templist=`$CC $CFLAGS -v conftest.$objext -o libconftest$shared_ext 2>&1 | $GREP "ld"`; rm -f libconftest$shared_ext; list=""; for z in $templist; do case $z in conftest.$objext) list="$list $z";; *.$objext);; *) list="$list $z";;esac; done; func_echo_all "$list"' - - _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='${wl}-rpath,$libdir' - _LT_TAGVAR(export_dynamic_flag_spec, $1)='${wl}--export-dynamic' - - # Archives containing C++ object files must be created using - # "CC -Bstatic", where "CC" is the KAI C++ compiler. - _LT_TAGVAR(old_archive_cmds, $1)='$CC -Bstatic -o $oldlib $oldobjs' - ;; - icpc* | ecpc* ) - # Intel C++ - with_gnu_ld=yes - # version 8.0 and above of icpc choke on multiply defined symbols - # if we add $predep_objects and $postdep_objects, however 7.1 and - # earlier do not add the objects themselves. - case `$CC -V 2>&1` in - *"Version 7."*) - _LT_TAGVAR(archive_cmds, $1)='$CC -shared $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags ${wl}-soname $wl$soname -o $lib' - _LT_TAGVAR(archive_expsym_cmds, $1)='$CC -shared $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags ${wl}-soname $wl$soname ${wl}-retain-symbols-file $wl$export_symbols -o $lib' - ;; - *) # Version 8.0 or newer - tmp_idyn= - case $host_cpu in - ia64*) tmp_idyn=' -i_dynamic';; - esac - _LT_TAGVAR(archive_cmds, $1)='$CC -shared'"$tmp_idyn"' $libobjs $deplibs $compiler_flags ${wl}-soname $wl$soname -o $lib' - _LT_TAGVAR(archive_expsym_cmds, $1)='$CC -shared'"$tmp_idyn"' $libobjs $deplibs $compiler_flags ${wl}-soname $wl$soname ${wl}-retain-symbols-file $wl$export_symbols -o $lib' - ;; - esac - _LT_TAGVAR(archive_cmds_need_lc, $1)=no - _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='${wl}-rpath,$libdir' - _LT_TAGVAR(export_dynamic_flag_spec, $1)='${wl}--export-dynamic' - _LT_TAGVAR(whole_archive_flag_spec, $1)='${wl}--whole-archive$convenience ${wl}--no-whole-archive' - ;; - pgCC* | pgcpp*) - # Portland Group C++ compiler - case `$CC -V` in - *pgCC\ [[1-5]].* | *pgcpp\ [[1-5]].*) - _LT_TAGVAR(prelink_cmds, $1)='tpldir=Template.dir~ - rm -rf $tpldir~ - $CC --prelink_objects --instantiation_dir $tpldir $objs $libobjs $compile_deplibs~ - compile_command="$compile_command `find $tpldir -name \*.o | sort | $NL2SP`"' - _LT_TAGVAR(old_archive_cmds, $1)='tpldir=Template.dir~ - rm -rf $tpldir~ - $CC --prelink_objects --instantiation_dir $tpldir $oldobjs$old_deplibs~ - $AR $AR_FLAGS $oldlib$oldobjs$old_deplibs `find $tpldir -name \*.o | sort | $NL2SP`~ - $RANLIB $oldlib' - _LT_TAGVAR(archive_cmds, $1)='tpldir=Template.dir~ - rm -rf $tpldir~ - $CC --prelink_objects --instantiation_dir $tpldir $predep_objects $libobjs $deplibs $convenience $postdep_objects~ - $CC -shared $pic_flag $predep_objects $libobjs $deplibs `find $tpldir -name \*.o | sort | $NL2SP` $postdep_objects $compiler_flags ${wl}-soname ${wl}$soname -o $lib' - _LT_TAGVAR(archive_expsym_cmds, $1)='tpldir=Template.dir~ - rm -rf $tpldir~ - $CC --prelink_objects --instantiation_dir $tpldir $predep_objects $libobjs $deplibs $convenience $postdep_objects~ - $CC -shared $pic_flag $predep_objects $libobjs $deplibs `find $tpldir -name \*.o | sort | $NL2SP` $postdep_objects $compiler_flags ${wl}-soname ${wl}$soname ${wl}-retain-symbols-file ${wl}$export_symbols -o $lib' - ;; - *) # Version 6 and above use weak symbols - _LT_TAGVAR(archive_cmds, $1)='$CC -shared $pic_flag $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags ${wl}-soname ${wl}$soname -o $lib' - _LT_TAGVAR(archive_expsym_cmds, $1)='$CC -shared $pic_flag $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags ${wl}-soname ${wl}$soname ${wl}-retain-symbols-file ${wl}$export_symbols -o $lib' - ;; - esac - - _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='${wl}--rpath ${wl}$libdir' - _LT_TAGVAR(export_dynamic_flag_spec, $1)='${wl}--export-dynamic' - _LT_TAGVAR(whole_archive_flag_spec, $1)='${wl}--whole-archive`for conv in $convenience\"\"; do test -n \"$conv\" && new_convenience=\"$new_convenience,$conv\"; done; func_echo_all \"$new_convenience\"` ${wl}--no-whole-archive' - ;; - cxx*) - # Compaq C++ - _LT_TAGVAR(archive_cmds, $1)='$CC -shared $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags ${wl}-soname $wl$soname -o $lib' - _LT_TAGVAR(archive_expsym_cmds, $1)='$CC -shared $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags ${wl}-soname $wl$soname -o $lib ${wl}-retain-symbols-file $wl$export_symbols' - - runpath_var=LD_RUN_PATH - _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='-rpath $libdir' - _LT_TAGVAR(hardcode_libdir_separator, $1)=: - - # Commands to make compiler produce verbose output that lists - # what "hidden" libraries, object files and flags are used when - # linking a shared library. - # - # There doesn't appear to be a way to prevent this compiler from - # explicitly linking system object files so we need to strip them - # from the output so that they don't get included in the library - # dependencies. - output_verbose_link_cmd='templist=`$CC -shared $CFLAGS -v conftest.$objext 2>&1 | $GREP "ld"`; templist=`func_echo_all "$templist" | $SED "s/\(^.*ld.*\)\( .*ld .*$\)/\1/"`; list=""; for z in $templist; do case $z in conftest.$objext) list="$list $z";; *.$objext);; *) list="$list $z";;esac; done; func_echo_all "X$list" | $Xsed' - ;; - xl* | mpixl* | bgxl*) - # IBM XL 8.0 on PPC, with GNU ld - _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='${wl}-rpath ${wl}$libdir' - _LT_TAGVAR(export_dynamic_flag_spec, $1)='${wl}--export-dynamic' - _LT_TAGVAR(archive_cmds, $1)='$CC -qmkshrobj $libobjs $deplibs $compiler_flags ${wl}-soname $wl$soname -o $lib' - if test "x$supports_anon_versioning" = xyes; then - _LT_TAGVAR(archive_expsym_cmds, $1)='echo "{ global:" > $output_objdir/$libname.ver~ - cat $export_symbols | sed -e "s/\(.*\)/\1;/" >> $output_objdir/$libname.ver~ - echo "local: *; };" >> $output_objdir/$libname.ver~ - $CC -qmkshrobj $libobjs $deplibs $compiler_flags ${wl}-soname $wl$soname ${wl}-version-script ${wl}$output_objdir/$libname.ver -o $lib' - fi - ;; - *) - case `$CC -V 2>&1 | sed 5q` in - *Sun\ C*) - # Sun C++ 5.9 - _LT_TAGVAR(no_undefined_flag, $1)=' -zdefs' - _LT_TAGVAR(archive_cmds, $1)='$CC -G${allow_undefined_flag} -h$soname -o $lib $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags' - _LT_TAGVAR(archive_expsym_cmds, $1)='$CC -G${allow_undefined_flag} -h$soname -o $lib $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags ${wl}-retain-symbols-file ${wl}$export_symbols' - _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='-R$libdir' - _LT_TAGVAR(whole_archive_flag_spec, $1)='${wl}--whole-archive`new_convenience=; for conv in $convenience\"\"; do test -z \"$conv\" || new_convenience=\"$new_convenience,$conv\"; done; func_echo_all \"$new_convenience\"` ${wl}--no-whole-archive' - _LT_TAGVAR(compiler_needs_object, $1)=yes - - # Not sure whether something based on - # $CC $CFLAGS -v conftest.$objext -o libconftest$shared_ext 2>&1 - # would be better. - output_verbose_link_cmd='func_echo_all' - - # Archives containing C++ object files must be created using - # "CC -xar", where "CC" is the Sun C++ compiler. This is - # necessary to make sure instantiated templates are included - # in the archive. - _LT_TAGVAR(old_archive_cmds, $1)='$CC -xar -o $oldlib $oldobjs' - ;; - esac - ;; - esac - ;; - - lynxos*) - # FIXME: insert proper C++ library support - _LT_TAGVAR(ld_shlibs, $1)=no - ;; - - m88k*) - # FIXME: insert proper C++ library support - _LT_TAGVAR(ld_shlibs, $1)=no - ;; - - mvs*) - case $cc_basename in - cxx*) - # FIXME: insert proper C++ library support - _LT_TAGVAR(ld_shlibs, $1)=no - ;; - *) - # FIXME: insert proper C++ library support - _LT_TAGVAR(ld_shlibs, $1)=no - ;; - esac - ;; - - netbsd*) - if echo __ELF__ | $CC -E - | $GREP __ELF__ >/dev/null; then - _LT_TAGVAR(archive_cmds, $1)='$LD -Bshareable -o $lib $predep_objects $libobjs $deplibs $postdep_objects $linker_flags' - wlarc= - _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='-R$libdir' - _LT_TAGVAR(hardcode_direct, $1)=yes - _LT_TAGVAR(hardcode_shlibpath_var, $1)=no - fi - # Workaround some broken pre-1.5 toolchains - output_verbose_link_cmd='$CC -shared $CFLAGS -v conftest.$objext 2>&1 | $GREP conftest.$objext | $SED -e "s:-lgcc -lc -lgcc::"' - ;; - - *nto* | *qnx*) - _LT_TAGVAR(ld_shlibs, $1)=yes - ;; - - openbsd2*) - # C++ shared libraries are fairly broken - _LT_TAGVAR(ld_shlibs, $1)=no - ;; - - openbsd*) - if test -f /usr/libexec/ld.so; then - _LT_TAGVAR(hardcode_direct, $1)=yes - _LT_TAGVAR(hardcode_shlibpath_var, $1)=no - _LT_TAGVAR(hardcode_direct_absolute, $1)=yes - _LT_TAGVAR(archive_cmds, $1)='$CC -shared $pic_flag $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags -o $lib' - _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='${wl}-rpath,$libdir' - if test -z "`echo __ELF__ | $CC -E - | grep __ELF__`" || test "$host_os-$host_cpu" = "openbsd2.8-powerpc"; then - _LT_TAGVAR(archive_expsym_cmds, $1)='$CC -shared $pic_flag $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags ${wl}-retain-symbols-file,$export_symbols -o $lib' - _LT_TAGVAR(export_dynamic_flag_spec, $1)='${wl}-E' - _LT_TAGVAR(whole_archive_flag_spec, $1)="$wlarc"'--whole-archive$convenience '"$wlarc"'--no-whole-archive' - fi - output_verbose_link_cmd=func_echo_all - else - _LT_TAGVAR(ld_shlibs, $1)=no - fi - ;; - - osf3* | osf4* | osf5*) - case $cc_basename in - KCC*) - # Kuck and Associates, Inc. (KAI) C++ Compiler - - # KCC will only create a shared library if the output file - # ends with ".so" (or ".sl" for HP-UX), so rename the library - # to its proper name (with version) after linking. - _LT_TAGVAR(archive_cmds, $1)='tempext=`echo $shared_ext | $SED -e '\''s/\([[^()0-9A-Za-z{}]]\)/\\\\\1/g'\''`; templib=`echo "$lib" | $SED -e "s/\${tempext}\..*/.so/"`; $CC $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags --soname $soname -o \$templib; mv \$templib $lib' - - _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='${wl}-rpath,$libdir' - _LT_TAGVAR(hardcode_libdir_separator, $1)=: - - # Archives containing C++ object files must be created using - # the KAI C++ compiler. - case $host in - osf3*) _LT_TAGVAR(old_archive_cmds, $1)='$CC -Bstatic -o $oldlib $oldobjs' ;; - *) _LT_TAGVAR(old_archive_cmds, $1)='$CC -o $oldlib $oldobjs' ;; - esac - ;; - RCC*) - # Rational C++ 2.4.1 - # FIXME: insert proper C++ library support - _LT_TAGVAR(ld_shlibs, $1)=no - ;; - cxx*) - case $host in - osf3*) - _LT_TAGVAR(allow_undefined_flag, $1)=' ${wl}-expect_unresolved ${wl}\*' - _LT_TAGVAR(archive_cmds, $1)='$CC -shared${allow_undefined_flag} $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags ${wl}-soname $soname `test -n "$verstring" && func_echo_all "${wl}-set_version $verstring"` -update_registry ${output_objdir}/so_locations -o $lib' - _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='${wl}-rpath ${wl}$libdir' - ;; - *) - _LT_TAGVAR(allow_undefined_flag, $1)=' -expect_unresolved \*' - _LT_TAGVAR(archive_cmds, $1)='$CC -shared${allow_undefined_flag} $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags -msym -soname $soname `test -n "$verstring" && func_echo_all "-set_version $verstring"` -update_registry ${output_objdir}/so_locations -o $lib' - _LT_TAGVAR(archive_expsym_cmds, $1)='for i in `cat $export_symbols`; do printf "%s %s\\n" -exported_symbol "\$i" >> $lib.exp; done~ - echo "-hidden">> $lib.exp~ - $CC -shared$allow_undefined_flag $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags -msym -soname $soname ${wl}-input ${wl}$lib.exp `test -n "$verstring" && $ECHO "-set_version $verstring"` -update_registry ${output_objdir}/so_locations -o $lib~ - $RM $lib.exp' - _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='-rpath $libdir' - ;; - esac - - _LT_TAGVAR(hardcode_libdir_separator, $1)=: - - # Commands to make compiler produce verbose output that lists - # what "hidden" libraries, object files and flags are used when - # linking a shared library. - # - # There doesn't appear to be a way to prevent this compiler from - # explicitly linking system object files so we need to strip them - # from the output so that they don't get included in the library - # dependencies. - output_verbose_link_cmd='templist=`$CC -shared $CFLAGS -v conftest.$objext 2>&1 | $GREP "ld" | $GREP -v "ld:"`; templist=`func_echo_all "$templist" | $SED "s/\(^.*ld.*\)\( .*ld.*$\)/\1/"`; list=""; for z in $templist; do case $z in conftest.$objext) list="$list $z";; *.$objext);; *) list="$list $z";;esac; done; func_echo_all "$list"' - ;; - *) - if test "$GXX" = yes && test "$with_gnu_ld" = no; then - _LT_TAGVAR(allow_undefined_flag, $1)=' ${wl}-expect_unresolved ${wl}\*' - case $host in - osf3*) - _LT_TAGVAR(archive_cmds, $1)='$CC -shared -nostdlib ${allow_undefined_flag} $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags ${wl}-soname ${wl}$soname `test -n "$verstring" && func_echo_all "${wl}-set_version ${wl}$verstring"` ${wl}-update_registry ${wl}${output_objdir}/so_locations -o $lib' - ;; - *) - _LT_TAGVAR(archive_cmds, $1)='$CC -shared $pic_flag -nostdlib ${allow_undefined_flag} $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags ${wl}-msym ${wl}-soname ${wl}$soname `test -n "$verstring" && func_echo_all "${wl}-set_version ${wl}$verstring"` ${wl}-update_registry ${wl}${output_objdir}/so_locations -o $lib' - ;; - esac - - _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='${wl}-rpath ${wl}$libdir' - _LT_TAGVAR(hardcode_libdir_separator, $1)=: - - # Commands to make compiler produce verbose output that lists - # what "hidden" libraries, object files and flags are used when - # linking a shared library. - output_verbose_link_cmd='$CC -shared $CFLAGS -v conftest.$objext 2>&1 | $GREP -v "^Configured with:" | $GREP "\-L"' - - else - # FIXME: insert proper C++ library support - _LT_TAGVAR(ld_shlibs, $1)=no - fi - ;; - esac - ;; - - psos*) - # FIXME: insert proper C++ library support - _LT_TAGVAR(ld_shlibs, $1)=no - ;; - - sunos4*) - case $cc_basename in - CC*) - # Sun C++ 4.x - # FIXME: insert proper C++ library support - _LT_TAGVAR(ld_shlibs, $1)=no - ;; - lcc*) - # Lucid - # FIXME: insert proper C++ library support - _LT_TAGVAR(ld_shlibs, $1)=no - ;; - *) - # FIXME: insert proper C++ library support - _LT_TAGVAR(ld_shlibs, $1)=no - ;; - esac - ;; - - solaris*) - case $cc_basename in - CC* | sunCC*) - # Sun C++ 4.2, 5.x and Centerline C++ - _LT_TAGVAR(archive_cmds_need_lc,$1)=yes - _LT_TAGVAR(no_undefined_flag, $1)=' -zdefs' - _LT_TAGVAR(archive_cmds, $1)='$CC -G${allow_undefined_flag} -h$soname -o $lib $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags' - _LT_TAGVAR(archive_expsym_cmds, $1)='echo "{ global:" > $lib.exp~cat $export_symbols | $SED -e "s/\(.*\)/\1;/" >> $lib.exp~echo "local: *; };" >> $lib.exp~ - $CC -G${allow_undefined_flag} ${wl}-M ${wl}$lib.exp -h$soname -o $lib $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags~$RM $lib.exp' - - _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='-R$libdir' - _LT_TAGVAR(hardcode_shlibpath_var, $1)=no - case $host_os in - solaris2.[[0-5]] | solaris2.[[0-5]].*) ;; - *) - # The compiler driver will combine and reorder linker options, - # but understands `-z linker_flag'. - # Supported since Solaris 2.6 (maybe 2.5.1?) - _LT_TAGVAR(whole_archive_flag_spec, $1)='-z allextract$convenience -z defaultextract' - ;; - esac - _LT_TAGVAR(link_all_deplibs, $1)=yes - - output_verbose_link_cmd='func_echo_all' - - # Archives containing C++ object files must be created using - # "CC -xar", where "CC" is the Sun C++ compiler. This is - # necessary to make sure instantiated templates are included - # in the archive. - _LT_TAGVAR(old_archive_cmds, $1)='$CC -xar -o $oldlib $oldobjs' - ;; - gcx*) - # Green Hills C++ Compiler - _LT_TAGVAR(archive_cmds, $1)='$CC -shared $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags ${wl}-h $wl$soname -o $lib' - - # The C++ compiler must be used to create the archive. - _LT_TAGVAR(old_archive_cmds, $1)='$CC $LDFLAGS -archive -o $oldlib $oldobjs' - ;; - *) - # GNU C++ compiler with Solaris linker - if test "$GXX" = yes && test "$with_gnu_ld" = no; then - _LT_TAGVAR(no_undefined_flag, $1)=' ${wl}-z ${wl}defs' - if $CC --version | $GREP -v '^2\.7' > /dev/null; then - _LT_TAGVAR(archive_cmds, $1)='$CC -shared $pic_flag -nostdlib $LDFLAGS $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags ${wl}-h $wl$soname -o $lib' - _LT_TAGVAR(archive_expsym_cmds, $1)='echo "{ global:" > $lib.exp~cat $export_symbols | $SED -e "s/\(.*\)/\1;/" >> $lib.exp~echo "local: *; };" >> $lib.exp~ - $CC -shared $pic_flag -nostdlib ${wl}-M $wl$lib.exp -o $lib $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags~$RM $lib.exp' - - # Commands to make compiler produce verbose output that lists - # what "hidden" libraries, object files and flags are used when - # linking a shared library. - output_verbose_link_cmd='$CC -shared $CFLAGS -v conftest.$objext 2>&1 | $GREP -v "^Configured with:" | $GREP "\-L"' - else - # g++ 2.7 appears to require `-G' NOT `-shared' on this - # platform. - _LT_TAGVAR(archive_cmds, $1)='$CC -G -nostdlib $LDFLAGS $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags ${wl}-h $wl$soname -o $lib' - _LT_TAGVAR(archive_expsym_cmds, $1)='echo "{ global:" > $lib.exp~cat $export_symbols | $SED -e "s/\(.*\)/\1;/" >> $lib.exp~echo "local: *; };" >> $lib.exp~ - $CC -G -nostdlib ${wl}-M $wl$lib.exp -o $lib $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags~$RM $lib.exp' - - # Commands to make compiler produce verbose output that lists - # what "hidden" libraries, object files and flags are used when - # linking a shared library. - output_verbose_link_cmd='$CC -G $CFLAGS -v conftest.$objext 2>&1 | $GREP -v "^Configured with:" | $GREP "\-L"' - fi - - _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='${wl}-R $wl$libdir' - case $host_os in - solaris2.[[0-5]] | solaris2.[[0-5]].*) ;; - *) - _LT_TAGVAR(whole_archive_flag_spec, $1)='${wl}-z ${wl}allextract$convenience ${wl}-z ${wl}defaultextract' - ;; - esac - fi - ;; - esac - ;; - - sysv4*uw2* | sysv5OpenUNIX* | sysv5UnixWare7.[[01]].[[10]]* | unixware7* | sco3.2v5.0.[[024]]*) - _LT_TAGVAR(no_undefined_flag, $1)='${wl}-z,text' - _LT_TAGVAR(archive_cmds_need_lc, $1)=no - _LT_TAGVAR(hardcode_shlibpath_var, $1)=no - runpath_var='LD_RUN_PATH' - - case $cc_basename in - CC*) - _LT_TAGVAR(archive_cmds, $1)='$CC -G ${wl}-h,$soname -o $lib $libobjs $deplibs $compiler_flags' - _LT_TAGVAR(archive_expsym_cmds, $1)='$CC -G ${wl}-Bexport:$export_symbols ${wl}-h,$soname -o $lib $libobjs $deplibs $compiler_flags' - ;; - *) - _LT_TAGVAR(archive_cmds, $1)='$CC -shared ${wl}-h,$soname -o $lib $libobjs $deplibs $compiler_flags' - _LT_TAGVAR(archive_expsym_cmds, $1)='$CC -shared ${wl}-Bexport:$export_symbols ${wl}-h,$soname -o $lib $libobjs $deplibs $compiler_flags' - ;; - esac - ;; - - sysv5* | sco3.2v5* | sco5v6*) - # Note: We can NOT use -z defs as we might desire, because we do not - # link with -lc, and that would cause any symbols used from libc to - # always be unresolved, which means just about no library would - # ever link correctly. If we're not using GNU ld we use -z text - # though, which does catch some bad symbols but isn't as heavy-handed - # as -z defs. - _LT_TAGVAR(no_undefined_flag, $1)='${wl}-z,text' - _LT_TAGVAR(allow_undefined_flag, $1)='${wl}-z,nodefs' - _LT_TAGVAR(archive_cmds_need_lc, $1)=no - _LT_TAGVAR(hardcode_shlibpath_var, $1)=no - _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='${wl}-R,$libdir' - _LT_TAGVAR(hardcode_libdir_separator, $1)=':' - _LT_TAGVAR(link_all_deplibs, $1)=yes - _LT_TAGVAR(export_dynamic_flag_spec, $1)='${wl}-Bexport' - runpath_var='LD_RUN_PATH' - - case $cc_basename in - CC*) - _LT_TAGVAR(archive_cmds, $1)='$CC -G ${wl}-h,$soname -o $lib $libobjs $deplibs $compiler_flags' - _LT_TAGVAR(archive_expsym_cmds, $1)='$CC -G ${wl}-Bexport:$export_symbols ${wl}-h,$soname -o $lib $libobjs $deplibs $compiler_flags' - _LT_TAGVAR(old_archive_cmds, $1)='$CC -Tprelink_objects $oldobjs~ - '"$_LT_TAGVAR(old_archive_cmds, $1)" - _LT_TAGVAR(reload_cmds, $1)='$CC -Tprelink_objects $reload_objs~ - '"$_LT_TAGVAR(reload_cmds, $1)" - ;; - *) - _LT_TAGVAR(archive_cmds, $1)='$CC -shared ${wl}-h,$soname -o $lib $libobjs $deplibs $compiler_flags' - _LT_TAGVAR(archive_expsym_cmds, $1)='$CC -shared ${wl}-Bexport:$export_symbols ${wl}-h,$soname -o $lib $libobjs $deplibs $compiler_flags' - ;; - esac - ;; - - tandem*) - case $cc_basename in - NCC*) - # NonStop-UX NCC 3.20 - # FIXME: insert proper C++ library support - _LT_TAGVAR(ld_shlibs, $1)=no - ;; - *) - # FIXME: insert proper C++ library support - _LT_TAGVAR(ld_shlibs, $1)=no - ;; - esac - ;; - - vxworks*) - # FIXME: insert proper C++ library support - _LT_TAGVAR(ld_shlibs, $1)=no - ;; - - *) - # FIXME: insert proper C++ library support - _LT_TAGVAR(ld_shlibs, $1)=no - ;; - esac - - AC_MSG_RESULT([$_LT_TAGVAR(ld_shlibs, $1)]) - test "$_LT_TAGVAR(ld_shlibs, $1)" = no && can_build_shared=no - - _LT_TAGVAR(GCC, $1)="$GXX" - _LT_TAGVAR(LD, $1)="$LD" - - ## CAVEAT EMPTOR: - ## There is no encapsulation within the following macros, do not change - ## the running order or otherwise move them around unless you know exactly - ## what you are doing... - _LT_SYS_HIDDEN_LIBDEPS($1) - _LT_COMPILER_PIC($1) - _LT_COMPILER_C_O($1) - _LT_COMPILER_FILE_LOCKS($1) - _LT_LINKER_SHLIBS($1) - _LT_SYS_DYNAMIC_LINKER($1) - _LT_LINKER_HARDCODE_LIBPATH($1) - - _LT_CONFIG($1) - fi # test -n "$compiler" - - CC=$lt_save_CC - CFLAGS=$lt_save_CFLAGS - LDCXX=$LD - LD=$lt_save_LD - GCC=$lt_save_GCC - with_gnu_ld=$lt_save_with_gnu_ld - lt_cv_path_LDCXX=$lt_cv_path_LD - lt_cv_path_LD=$lt_save_path_LD - lt_cv_prog_gnu_ldcxx=$lt_cv_prog_gnu_ld - lt_cv_prog_gnu_ld=$lt_save_with_gnu_ld -fi # test "$_lt_caught_CXX_error" != yes - -AC_LANG_POP -])# _LT_LANG_CXX_CONFIG - - -# _LT_FUNC_STRIPNAME_CNF -# ---------------------- -# func_stripname_cnf prefix suffix name -# strip PREFIX and SUFFIX off of NAME. -# PREFIX and SUFFIX must not contain globbing or regex special -# characters, hashes, percent signs, but SUFFIX may contain a leading -# dot (in which case that matches only a dot). -# -# This function is identical to the (non-XSI) version of func_stripname, -# except this one can be used by m4 code that may be executed by configure, -# rather than the libtool script. -m4_defun([_LT_FUNC_STRIPNAME_CNF],[dnl -AC_REQUIRE([_LT_DECL_SED]) -AC_REQUIRE([_LT_PROG_ECHO_BACKSLASH]) -func_stripname_cnf () -{ - case ${2} in - .*) func_stripname_result=`$ECHO "${3}" | $SED "s%^${1}%%; s%\\\\${2}\$%%"`;; - *) func_stripname_result=`$ECHO "${3}" | $SED "s%^${1}%%; s%${2}\$%%"`;; - esac -} # func_stripname_cnf -])# _LT_FUNC_STRIPNAME_CNF - -# _LT_SYS_HIDDEN_LIBDEPS([TAGNAME]) -# --------------------------------- -# Figure out "hidden" library dependencies from verbose -# compiler output when linking a shared library. -# Parse the compiler output and extract the necessary -# objects, libraries and library flags. -m4_defun([_LT_SYS_HIDDEN_LIBDEPS], -[m4_require([_LT_FILEUTILS_DEFAULTS])dnl -AC_REQUIRE([_LT_FUNC_STRIPNAME_CNF])dnl -# Dependencies to place before and after the object being linked: -_LT_TAGVAR(predep_objects, $1)= -_LT_TAGVAR(postdep_objects, $1)= -_LT_TAGVAR(predeps, $1)= -_LT_TAGVAR(postdeps, $1)= -_LT_TAGVAR(compiler_lib_search_path, $1)= - -dnl we can't use the lt_simple_compile_test_code here, -dnl because it contains code intended for an executable, -dnl not a library. It's possible we should let each -dnl tag define a new lt_????_link_test_code variable, -dnl but it's only used here... -m4_if([$1], [], [cat > conftest.$ac_ext <<_LT_EOF -int a; -void foo (void) { a = 0; } -_LT_EOF -], [$1], [CXX], [cat > conftest.$ac_ext <<_LT_EOF -class Foo -{ -public: - Foo (void) { a = 0; } -private: - int a; -}; -_LT_EOF -], [$1], [F77], [cat > conftest.$ac_ext <<_LT_EOF - subroutine foo - implicit none - integer*4 a - a=0 - return - end -_LT_EOF -], [$1], [FC], [cat > conftest.$ac_ext <<_LT_EOF - subroutine foo - implicit none - integer a - a=0 - return - end -_LT_EOF -], [$1], [GCJ], [cat > conftest.$ac_ext <<_LT_EOF -public class foo { - private int a; - public void bar (void) { - a = 0; - } -}; -_LT_EOF -], [$1], [GO], [cat > conftest.$ac_ext <<_LT_EOF -package foo -func foo() { -} -_LT_EOF -]) - -_lt_libdeps_save_CFLAGS=$CFLAGS -case "$CC $CFLAGS " in #( -*\ -flto*\ *) CFLAGS="$CFLAGS -fno-lto" ;; -*\ -fwhopr*\ *) CFLAGS="$CFLAGS -fno-whopr" ;; -*\ -fuse-linker-plugin*\ *) CFLAGS="$CFLAGS -fno-use-linker-plugin" ;; -esac - -dnl Parse the compiler output and extract the necessary -dnl objects, libraries and library flags. -if AC_TRY_EVAL(ac_compile); then - # Parse the compiler output and extract the necessary - # objects, libraries and library flags. - - # Sentinel used to keep track of whether or not we are before - # the conftest object file. - pre_test_object_deps_done=no - - for p in `eval "$output_verbose_link_cmd"`; do - case ${prev}${p} in - - -L* | -R* | -l*) - # Some compilers place space between "-{L,R}" and the path. - # Remove the space. - if test $p = "-L" || - test $p = "-R"; then - prev=$p - continue - fi - - # Expand the sysroot to ease extracting the directories later. - if test -z "$prev"; then - case $p in - -L*) func_stripname_cnf '-L' '' "$p"; prev=-L; p=$func_stripname_result ;; - -R*) func_stripname_cnf '-R' '' "$p"; prev=-R; p=$func_stripname_result ;; - -l*) func_stripname_cnf '-l' '' "$p"; prev=-l; p=$func_stripname_result ;; - esac - fi - case $p in - =*) func_stripname_cnf '=' '' "$p"; p=$lt_sysroot$func_stripname_result ;; - esac - if test "$pre_test_object_deps_done" = no; then - case ${prev} in - -L | -R) - # Internal compiler library paths should come after those - # provided the user. The postdeps already come after the - # user supplied libs so there is no need to process them. - if test -z "$_LT_TAGVAR(compiler_lib_search_path, $1)"; then - _LT_TAGVAR(compiler_lib_search_path, $1)="${prev}${p}" - else - _LT_TAGVAR(compiler_lib_search_path, $1)="${_LT_TAGVAR(compiler_lib_search_path, $1)} ${prev}${p}" - fi - ;; - # The "-l" case would never come before the object being - # linked, so don't bother handling this case. - esac - else - if test -z "$_LT_TAGVAR(postdeps, $1)"; then - _LT_TAGVAR(postdeps, $1)="${prev}${p}" - else - _LT_TAGVAR(postdeps, $1)="${_LT_TAGVAR(postdeps, $1)} ${prev}${p}" - fi - fi - prev= - ;; - - *.lto.$objext) ;; # Ignore GCC LTO objects - *.$objext) - # This assumes that the test object file only shows up - # once in the compiler output. - if test "$p" = "conftest.$objext"; then - pre_test_object_deps_done=yes - continue - fi - - if test "$pre_test_object_deps_done" = no; then - if test -z "$_LT_TAGVAR(predep_objects, $1)"; then - _LT_TAGVAR(predep_objects, $1)="$p" - else - _LT_TAGVAR(predep_objects, $1)="$_LT_TAGVAR(predep_objects, $1) $p" - fi - else - if test -z "$_LT_TAGVAR(postdep_objects, $1)"; then - _LT_TAGVAR(postdep_objects, $1)="$p" - else - _LT_TAGVAR(postdep_objects, $1)="$_LT_TAGVAR(postdep_objects, $1) $p" - fi - fi - ;; - - *) ;; # Ignore the rest. - - esac - done - - # Clean up. - rm -f a.out a.exe -else - echo "libtool.m4: error: problem compiling $1 test program" -fi - -$RM -f confest.$objext -CFLAGS=$_lt_libdeps_save_CFLAGS - -# PORTME: override above test on systems where it is broken -m4_if([$1], [CXX], -[case $host_os in -interix[[3-9]]*) - # Interix 3.5 installs completely hosed .la files for C++, so rather than - # hack all around it, let's just trust "g++" to DTRT. - _LT_TAGVAR(predep_objects,$1)= - _LT_TAGVAR(postdep_objects,$1)= - _LT_TAGVAR(postdeps,$1)= - ;; - -linux*) - case `$CC -V 2>&1 | sed 5q` in - *Sun\ C*) - # Sun C++ 5.9 - - # The more standards-conforming stlport4 library is - # incompatible with the Cstd library. Avoid specifying - # it if it's in CXXFLAGS. Ignore libCrun as - # -library=stlport4 depends on it. - case " $CXX $CXXFLAGS " in - *" -library=stlport4 "*) - solaris_use_stlport4=yes - ;; - esac - - if test "$solaris_use_stlport4" != yes; then - _LT_TAGVAR(postdeps,$1)='-library=Cstd -library=Crun' - fi - ;; - esac - ;; - -solaris*) - case $cc_basename in - CC* | sunCC*) - # The more standards-conforming stlport4 library is - # incompatible with the Cstd library. Avoid specifying - # it if it's in CXXFLAGS. Ignore libCrun as - # -library=stlport4 depends on it. - case " $CXX $CXXFLAGS " in - *" -library=stlport4 "*) - solaris_use_stlport4=yes - ;; - esac - - # Adding this requires a known-good setup of shared libraries for - # Sun compiler versions before 5.6, else PIC objects from an old - # archive will be linked into the output, leading to subtle bugs. - if test "$solaris_use_stlport4" != yes; then - _LT_TAGVAR(postdeps,$1)='-library=Cstd -library=Crun' - fi - ;; - esac - ;; -esac -]) - -case " $_LT_TAGVAR(postdeps, $1) " in -*" -lc "*) _LT_TAGVAR(archive_cmds_need_lc, $1)=no ;; -esac - _LT_TAGVAR(compiler_lib_search_dirs, $1)= -if test -n "${_LT_TAGVAR(compiler_lib_search_path, $1)}"; then - _LT_TAGVAR(compiler_lib_search_dirs, $1)=`echo " ${_LT_TAGVAR(compiler_lib_search_path, $1)}" | ${SED} -e 's! -L! !g' -e 's!^ !!'` -fi -_LT_TAGDECL([], [compiler_lib_search_dirs], [1], - [The directories searched by this compiler when creating a shared library]) -_LT_TAGDECL([], [predep_objects], [1], - [Dependencies to place before and after the objects being linked to - create a shared library]) -_LT_TAGDECL([], [postdep_objects], [1]) -_LT_TAGDECL([], [predeps], [1]) -_LT_TAGDECL([], [postdeps], [1]) -_LT_TAGDECL([], [compiler_lib_search_path], [1], - [The library search path used internally by the compiler when linking - a shared library]) -])# _LT_SYS_HIDDEN_LIBDEPS - - -# _LT_LANG_F77_CONFIG([TAG]) -# -------------------------- -# Ensure that the configuration variables for a Fortran 77 compiler are -# suitably defined. These variables are subsequently used by _LT_CONFIG -# to write the compiler configuration to `libtool'. -m4_defun([_LT_LANG_F77_CONFIG], -[AC_LANG_PUSH(Fortran 77) -if test -z "$F77" || test "X$F77" = "Xno"; then - _lt_disable_F77=yes -fi - -_LT_TAGVAR(archive_cmds_need_lc, $1)=no -_LT_TAGVAR(allow_undefined_flag, $1)= -_LT_TAGVAR(always_export_symbols, $1)=no -_LT_TAGVAR(archive_expsym_cmds, $1)= -_LT_TAGVAR(export_dynamic_flag_spec, $1)= -_LT_TAGVAR(hardcode_direct, $1)=no -_LT_TAGVAR(hardcode_direct_absolute, $1)=no -_LT_TAGVAR(hardcode_libdir_flag_spec, $1)= -_LT_TAGVAR(hardcode_libdir_separator, $1)= -_LT_TAGVAR(hardcode_minus_L, $1)=no -_LT_TAGVAR(hardcode_automatic, $1)=no -_LT_TAGVAR(inherit_rpath, $1)=no -_LT_TAGVAR(module_cmds, $1)= -_LT_TAGVAR(module_expsym_cmds, $1)= -_LT_TAGVAR(link_all_deplibs, $1)=unknown -_LT_TAGVAR(old_archive_cmds, $1)=$old_archive_cmds -_LT_TAGVAR(reload_flag, $1)=$reload_flag -_LT_TAGVAR(reload_cmds, $1)=$reload_cmds -_LT_TAGVAR(no_undefined_flag, $1)= -_LT_TAGVAR(whole_archive_flag_spec, $1)= -_LT_TAGVAR(enable_shared_with_static_runtimes, $1)=no - -# Source file extension for f77 test sources. -ac_ext=f - -# Object file extension for compiled f77 test sources. -objext=o -_LT_TAGVAR(objext, $1)=$objext - -# No sense in running all these tests if we already determined that -# the F77 compiler isn't working. Some variables (like enable_shared) -# are currently assumed to apply to all compilers on this platform, -# and will be corrupted by setting them based on a non-working compiler. -if test "$_lt_disable_F77" != yes; then - # Code to be used in simple compile tests - lt_simple_compile_test_code="\ - subroutine t - return - end -" - - # Code to be used in simple link tests - lt_simple_link_test_code="\ - program t - end -" - - # ltmain only uses $CC for tagged configurations so make sure $CC is set. - _LT_TAG_COMPILER - - # save warnings/boilerplate of simple test code - _LT_COMPILER_BOILERPLATE - _LT_LINKER_BOILERPLATE - - # Allow CC to be a program name with arguments. - lt_save_CC="$CC" - lt_save_GCC=$GCC - lt_save_CFLAGS=$CFLAGS - CC=${F77-"f77"} - CFLAGS=$FFLAGS - compiler=$CC - _LT_TAGVAR(compiler, $1)=$CC - _LT_CC_BASENAME([$compiler]) - GCC=$G77 - if test -n "$compiler"; then - AC_MSG_CHECKING([if libtool supports shared libraries]) - AC_MSG_RESULT([$can_build_shared]) - - AC_MSG_CHECKING([whether to build shared libraries]) - test "$can_build_shared" = "no" && enable_shared=no - - # On AIX, shared libraries and static libraries use the same namespace, and - # are all built from PIC. - case $host_os in - aix3*) - test "$enable_shared" = yes && enable_static=no - if test -n "$RANLIB"; then - archive_cmds="$archive_cmds~\$RANLIB \$lib" - postinstall_cmds='$RANLIB $lib' - fi - ;; - aix[[4-9]]*) - if test "$host_cpu" != ia64 && test "$aix_use_runtimelinking" = no ; then - test "$enable_shared" = yes && enable_static=no - fi - ;; - esac - AC_MSG_RESULT([$enable_shared]) - - AC_MSG_CHECKING([whether to build static libraries]) - # Make sure either enable_shared or enable_static is yes. - test "$enable_shared" = yes || enable_static=yes - AC_MSG_RESULT([$enable_static]) - - _LT_TAGVAR(GCC, $1)="$G77" - _LT_TAGVAR(LD, $1)="$LD" - - ## CAVEAT EMPTOR: - ## There is no encapsulation within the following macros, do not change - ## the running order or otherwise move them around unless you know exactly - ## what you are doing... - _LT_COMPILER_PIC($1) - _LT_COMPILER_C_O($1) - _LT_COMPILER_FILE_LOCKS($1) - _LT_LINKER_SHLIBS($1) - _LT_SYS_DYNAMIC_LINKER($1) - _LT_LINKER_HARDCODE_LIBPATH($1) - - _LT_CONFIG($1) - fi # test -n "$compiler" - - GCC=$lt_save_GCC - CC="$lt_save_CC" - CFLAGS="$lt_save_CFLAGS" -fi # test "$_lt_disable_F77" != yes - -AC_LANG_POP -])# _LT_LANG_F77_CONFIG - - -# _LT_LANG_FC_CONFIG([TAG]) -# ------------------------- -# Ensure that the configuration variables for a Fortran compiler are -# suitably defined. These variables are subsequently used by _LT_CONFIG -# to write the compiler configuration to `libtool'. -m4_defun([_LT_LANG_FC_CONFIG], -[AC_LANG_PUSH(Fortran) - -if test -z "$FC" || test "X$FC" = "Xno"; then - _lt_disable_FC=yes -fi - -_LT_TAGVAR(archive_cmds_need_lc, $1)=no -_LT_TAGVAR(allow_undefined_flag, $1)= -_LT_TAGVAR(always_export_symbols, $1)=no -_LT_TAGVAR(archive_expsym_cmds, $1)= -_LT_TAGVAR(export_dynamic_flag_spec, $1)= -_LT_TAGVAR(hardcode_direct, $1)=no -_LT_TAGVAR(hardcode_direct_absolute, $1)=no -_LT_TAGVAR(hardcode_libdir_flag_spec, $1)= -_LT_TAGVAR(hardcode_libdir_separator, $1)= -_LT_TAGVAR(hardcode_minus_L, $1)=no -_LT_TAGVAR(hardcode_automatic, $1)=no -_LT_TAGVAR(inherit_rpath, $1)=no -_LT_TAGVAR(module_cmds, $1)= -_LT_TAGVAR(module_expsym_cmds, $1)= -_LT_TAGVAR(link_all_deplibs, $1)=unknown -_LT_TAGVAR(old_archive_cmds, $1)=$old_archive_cmds -_LT_TAGVAR(reload_flag, $1)=$reload_flag -_LT_TAGVAR(reload_cmds, $1)=$reload_cmds -_LT_TAGVAR(no_undefined_flag, $1)= -_LT_TAGVAR(whole_archive_flag_spec, $1)= -_LT_TAGVAR(enable_shared_with_static_runtimes, $1)=no - -# Source file extension for fc test sources. -ac_ext=${ac_fc_srcext-f} - -# Object file extension for compiled fc test sources. -objext=o -_LT_TAGVAR(objext, $1)=$objext - -# No sense in running all these tests if we already determined that -# the FC compiler isn't working. Some variables (like enable_shared) -# are currently assumed to apply to all compilers on this platform, -# and will be corrupted by setting them based on a non-working compiler. -if test "$_lt_disable_FC" != yes; then - # Code to be used in simple compile tests - lt_simple_compile_test_code="\ - subroutine t - return - end -" - - # Code to be used in simple link tests - lt_simple_link_test_code="\ - program t - end -" - - # ltmain only uses $CC for tagged configurations so make sure $CC is set. - _LT_TAG_COMPILER - - # save warnings/boilerplate of simple test code - _LT_COMPILER_BOILERPLATE - _LT_LINKER_BOILERPLATE - - # Allow CC to be a program name with arguments. - lt_save_CC="$CC" - lt_save_GCC=$GCC - lt_save_CFLAGS=$CFLAGS - CC=${FC-"f95"} - CFLAGS=$FCFLAGS - compiler=$CC - GCC=$ac_cv_fc_compiler_gnu - - _LT_TAGVAR(compiler, $1)=$CC - _LT_CC_BASENAME([$compiler]) - - if test -n "$compiler"; then - AC_MSG_CHECKING([if libtool supports shared libraries]) - AC_MSG_RESULT([$can_build_shared]) - - AC_MSG_CHECKING([whether to build shared libraries]) - test "$can_build_shared" = "no" && enable_shared=no - - # On AIX, shared libraries and static libraries use the same namespace, and - # are all built from PIC. - case $host_os in - aix3*) - test "$enable_shared" = yes && enable_static=no - if test -n "$RANLIB"; then - archive_cmds="$archive_cmds~\$RANLIB \$lib" - postinstall_cmds='$RANLIB $lib' - fi - ;; - aix[[4-9]]*) - if test "$host_cpu" != ia64 && test "$aix_use_runtimelinking" = no ; then - test "$enable_shared" = yes && enable_static=no - fi - ;; - esac - AC_MSG_RESULT([$enable_shared]) - - AC_MSG_CHECKING([whether to build static libraries]) - # Make sure either enable_shared or enable_static is yes. - test "$enable_shared" = yes || enable_static=yes - AC_MSG_RESULT([$enable_static]) - - _LT_TAGVAR(GCC, $1)="$ac_cv_fc_compiler_gnu" - _LT_TAGVAR(LD, $1)="$LD" - - ## CAVEAT EMPTOR: - ## There is no encapsulation within the following macros, do not change - ## the running order or otherwise move them around unless you know exactly - ## what you are doing... - _LT_SYS_HIDDEN_LIBDEPS($1) - _LT_COMPILER_PIC($1) - _LT_COMPILER_C_O($1) - _LT_COMPILER_FILE_LOCKS($1) - _LT_LINKER_SHLIBS($1) - _LT_SYS_DYNAMIC_LINKER($1) - _LT_LINKER_HARDCODE_LIBPATH($1) - - _LT_CONFIG($1) - fi # test -n "$compiler" - - GCC=$lt_save_GCC - CC=$lt_save_CC - CFLAGS=$lt_save_CFLAGS -fi # test "$_lt_disable_FC" != yes - -AC_LANG_POP -])# _LT_LANG_FC_CONFIG - - -# _LT_LANG_GCJ_CONFIG([TAG]) -# -------------------------- -# Ensure that the configuration variables for the GNU Java Compiler compiler -# are suitably defined. These variables are subsequently used by _LT_CONFIG -# to write the compiler configuration to `libtool'. -m4_defun([_LT_LANG_GCJ_CONFIG], -[AC_REQUIRE([LT_PROG_GCJ])dnl -AC_LANG_SAVE - -# Source file extension for Java test sources. -ac_ext=java - -# Object file extension for compiled Java test sources. -objext=o -_LT_TAGVAR(objext, $1)=$objext - -# Code to be used in simple compile tests -lt_simple_compile_test_code="class foo {}" - -# Code to be used in simple link tests -lt_simple_link_test_code='public class conftest { public static void main(String[[]] argv) {}; }' - -# ltmain only uses $CC for tagged configurations so make sure $CC is set. -_LT_TAG_COMPILER - -# save warnings/boilerplate of simple test code -_LT_COMPILER_BOILERPLATE -_LT_LINKER_BOILERPLATE - -# Allow CC to be a program name with arguments. -lt_save_CC=$CC -lt_save_CFLAGS=$CFLAGS -lt_save_GCC=$GCC -GCC=yes -CC=${GCJ-"gcj"} -CFLAGS=$GCJFLAGS -compiler=$CC -_LT_TAGVAR(compiler, $1)=$CC -_LT_TAGVAR(LD, $1)="$LD" -_LT_CC_BASENAME([$compiler]) - -# GCJ did not exist at the time GCC didn't implicitly link libc in. -_LT_TAGVAR(archive_cmds_need_lc, $1)=no - -_LT_TAGVAR(old_archive_cmds, $1)=$old_archive_cmds -_LT_TAGVAR(reload_flag, $1)=$reload_flag -_LT_TAGVAR(reload_cmds, $1)=$reload_cmds - -## CAVEAT EMPTOR: -## There is no encapsulation within the following macros, do not change -## the running order or otherwise move them around unless you know exactly -## what you are doing... -if test -n "$compiler"; then - _LT_COMPILER_NO_RTTI($1) - _LT_COMPILER_PIC($1) - _LT_COMPILER_C_O($1) - _LT_COMPILER_FILE_LOCKS($1) - _LT_LINKER_SHLIBS($1) - _LT_LINKER_HARDCODE_LIBPATH($1) - - _LT_CONFIG($1) -fi - -AC_LANG_RESTORE - -GCC=$lt_save_GCC -CC=$lt_save_CC -CFLAGS=$lt_save_CFLAGS -])# _LT_LANG_GCJ_CONFIG - - -# _LT_LANG_GO_CONFIG([TAG]) -# -------------------------- -# Ensure that the configuration variables for the GNU Go compiler -# are suitably defined. These variables are subsequently used by _LT_CONFIG -# to write the compiler configuration to `libtool'. -m4_defun([_LT_LANG_GO_CONFIG], -[AC_REQUIRE([LT_PROG_GO])dnl -AC_LANG_SAVE - -# Source file extension for Go test sources. -ac_ext=go - -# Object file extension for compiled Go test sources. -objext=o -_LT_TAGVAR(objext, $1)=$objext - -# Code to be used in simple compile tests -lt_simple_compile_test_code="package main; func main() { }" - -# Code to be used in simple link tests -lt_simple_link_test_code='package main; func main() { }' - -# ltmain only uses $CC for tagged configurations so make sure $CC is set. -_LT_TAG_COMPILER - -# save warnings/boilerplate of simple test code -_LT_COMPILER_BOILERPLATE -_LT_LINKER_BOILERPLATE - -# Allow CC to be a program name with arguments. -lt_save_CC=$CC -lt_save_CFLAGS=$CFLAGS -lt_save_GCC=$GCC -GCC=yes -CC=${GOC-"gccgo"} -CFLAGS=$GOFLAGS -compiler=$CC -_LT_TAGVAR(compiler, $1)=$CC -_LT_TAGVAR(LD, $1)="$LD" -_LT_CC_BASENAME([$compiler]) - -# Go did not exist at the time GCC didn't implicitly link libc in. -_LT_TAGVAR(archive_cmds_need_lc, $1)=no - -_LT_TAGVAR(old_archive_cmds, $1)=$old_archive_cmds -_LT_TAGVAR(reload_flag, $1)=$reload_flag -_LT_TAGVAR(reload_cmds, $1)=$reload_cmds - -## CAVEAT EMPTOR: -## There is no encapsulation within the following macros, do not change -## the running order or otherwise move them around unless you know exactly -## what you are doing... -if test -n "$compiler"; then - _LT_COMPILER_NO_RTTI($1) - _LT_COMPILER_PIC($1) - _LT_COMPILER_C_O($1) - _LT_COMPILER_FILE_LOCKS($1) - _LT_LINKER_SHLIBS($1) - _LT_LINKER_HARDCODE_LIBPATH($1) - - _LT_CONFIG($1) -fi - -AC_LANG_RESTORE - -GCC=$lt_save_GCC -CC=$lt_save_CC -CFLAGS=$lt_save_CFLAGS -])# _LT_LANG_GO_CONFIG - - -# _LT_LANG_RC_CONFIG([TAG]) -# ------------------------- -# Ensure that the configuration variables for the Windows resource compiler -# are suitably defined. These variables are subsequently used by _LT_CONFIG -# to write the compiler configuration to `libtool'. -m4_defun([_LT_LANG_RC_CONFIG], -[AC_REQUIRE([LT_PROG_RC])dnl -AC_LANG_SAVE - -# Source file extension for RC test sources. -ac_ext=rc - -# Object file extension for compiled RC test sources. -objext=o -_LT_TAGVAR(objext, $1)=$objext - -# Code to be used in simple compile tests -lt_simple_compile_test_code='sample MENU { MENUITEM "&Soup", 100, CHECKED }' - -# Code to be used in simple link tests -lt_simple_link_test_code="$lt_simple_compile_test_code" - -# ltmain only uses $CC for tagged configurations so make sure $CC is set. -_LT_TAG_COMPILER - -# save warnings/boilerplate of simple test code -_LT_COMPILER_BOILERPLATE -_LT_LINKER_BOILERPLATE - -# Allow CC to be a program name with arguments. -lt_save_CC="$CC" -lt_save_CFLAGS=$CFLAGS -lt_save_GCC=$GCC -GCC= -CC=${RC-"windres"} -CFLAGS= -compiler=$CC -_LT_TAGVAR(compiler, $1)=$CC -_LT_CC_BASENAME([$compiler]) -_LT_TAGVAR(lt_cv_prog_compiler_c_o, $1)=yes - -if test -n "$compiler"; then - : - _LT_CONFIG($1) -fi - -GCC=$lt_save_GCC -AC_LANG_RESTORE -CC=$lt_save_CC -CFLAGS=$lt_save_CFLAGS -])# _LT_LANG_RC_CONFIG - - -# LT_PROG_GCJ -# ----------- -AC_DEFUN([LT_PROG_GCJ], -[m4_ifdef([AC_PROG_GCJ], [AC_PROG_GCJ], - [m4_ifdef([A][M_PROG_GCJ], [A][M_PROG_GCJ], - [AC_CHECK_TOOL(GCJ, gcj,) - test "x${GCJFLAGS+set}" = xset || GCJFLAGS="-g -O2" - AC_SUBST(GCJFLAGS)])])[]dnl -]) - -# Old name: -AU_ALIAS([LT_AC_PROG_GCJ], [LT_PROG_GCJ]) -dnl aclocal-1.4 backwards compatibility: -dnl AC_DEFUN([LT_AC_PROG_GCJ], []) - - -# LT_PROG_GO -# ---------- -AC_DEFUN([LT_PROG_GO], -[AC_CHECK_TOOL(GOC, gccgo,) -]) - - -# LT_PROG_RC -# ---------- -AC_DEFUN([LT_PROG_RC], -[AC_CHECK_TOOL(RC, windres,) -]) - -# Old name: -AU_ALIAS([LT_AC_PROG_RC], [LT_PROG_RC]) -dnl aclocal-1.4 backwards compatibility: -dnl AC_DEFUN([LT_AC_PROG_RC], []) - - -# _LT_DECL_EGREP -# -------------- -# If we don't have a new enough Autoconf to choose the best grep -# available, choose the one first in the user's PATH. -m4_defun([_LT_DECL_EGREP], -[AC_REQUIRE([AC_PROG_EGREP])dnl -AC_REQUIRE([AC_PROG_FGREP])dnl -test -z "$GREP" && GREP=grep -_LT_DECL([], [GREP], [1], [A grep program that handles long lines]) -_LT_DECL([], [EGREP], [1], [An ERE matcher]) -_LT_DECL([], [FGREP], [1], [A literal string matcher]) -dnl Non-bleeding-edge autoconf doesn't subst GREP, so do it here too -AC_SUBST([GREP]) -]) - - -# _LT_DECL_OBJDUMP -# -------------- -# If we don't have a new enough Autoconf to choose the best objdump -# available, choose the one first in the user's PATH. -m4_defun([_LT_DECL_OBJDUMP], -[AC_CHECK_TOOL(OBJDUMP, objdump, false) -test -z "$OBJDUMP" && OBJDUMP=objdump -_LT_DECL([], [OBJDUMP], [1], [An object symbol dumper]) -AC_SUBST([OBJDUMP]) -]) - -# _LT_DECL_DLLTOOL -# ---------------- -# Ensure DLLTOOL variable is set. -m4_defun([_LT_DECL_DLLTOOL], -[AC_CHECK_TOOL(DLLTOOL, dlltool, false) -test -z "$DLLTOOL" && DLLTOOL=dlltool -_LT_DECL([], [DLLTOOL], [1], [DLL creation program]) -AC_SUBST([DLLTOOL]) -]) - -# _LT_DECL_SED -# ------------ -# Check for a fully-functional sed program, that truncates -# as few characters as possible. Prefer GNU sed if found. -m4_defun([_LT_DECL_SED], -[AC_PROG_SED -test -z "$SED" && SED=sed -Xsed="$SED -e 1s/^X//" -_LT_DECL([], [SED], [1], [A sed program that does not truncate output]) -_LT_DECL([], [Xsed], ["\$SED -e 1s/^X//"], - [Sed that helps us avoid accidentally triggering echo(1) options like -n]) -])# _LT_DECL_SED - -m4_ifndef([AC_PROG_SED], [ -############################################################ -# NOTE: This macro has been submitted for inclusion into # -# GNU Autoconf as AC_PROG_SED. When it is available in # -# a released version of Autoconf we should remove this # -# macro and use it instead. # -############################################################ - -m4_defun([AC_PROG_SED], -[AC_MSG_CHECKING([for a sed that does not truncate output]) -AC_CACHE_VAL(lt_cv_path_SED, -[# Loop through the user's path and test for sed and gsed. -# Then use that list of sed's as ones to test for truncation. -as_save_IFS=$IFS; IFS=$PATH_SEPARATOR -for as_dir in $PATH -do - IFS=$as_save_IFS - test -z "$as_dir" && as_dir=. - for lt_ac_prog in sed gsed; do - for ac_exec_ext in '' $ac_executable_extensions; do - if $as_executable_p "$as_dir/$lt_ac_prog$ac_exec_ext"; then - lt_ac_sed_list="$lt_ac_sed_list $as_dir/$lt_ac_prog$ac_exec_ext" - fi - done - done -done -IFS=$as_save_IFS -lt_ac_max=0 -lt_ac_count=0 -# Add /usr/xpg4/bin/sed as it is typically found on Solaris -# along with /bin/sed that truncates output. -for lt_ac_sed in $lt_ac_sed_list /usr/xpg4/bin/sed; do - test ! -f $lt_ac_sed && continue - cat /dev/null > conftest.in - lt_ac_count=0 - echo $ECHO_N "0123456789$ECHO_C" >conftest.in - # Check for GNU sed and select it if it is found. - if "$lt_ac_sed" --version 2>&1 < /dev/null | grep 'GNU' > /dev/null; then - lt_cv_path_SED=$lt_ac_sed - break - fi - while true; do - cat conftest.in conftest.in >conftest.tmp - mv conftest.tmp conftest.in - cp conftest.in conftest.nl - echo >>conftest.nl - $lt_ac_sed -e 's/a$//' < conftest.nl >conftest.out || break - cmp -s conftest.out conftest.nl || break - # 10000 chars as input seems more than enough - test $lt_ac_count -gt 10 && break - lt_ac_count=`expr $lt_ac_count + 1` - if test $lt_ac_count -gt $lt_ac_max; then - lt_ac_max=$lt_ac_count - lt_cv_path_SED=$lt_ac_sed - fi - done -done -]) -SED=$lt_cv_path_SED -AC_SUBST([SED]) -AC_MSG_RESULT([$SED]) -])#AC_PROG_SED -])#m4_ifndef - -# Old name: -AU_ALIAS([LT_AC_PROG_SED], [AC_PROG_SED]) -dnl aclocal-1.4 backwards compatibility: -dnl AC_DEFUN([LT_AC_PROG_SED], []) - - -# _LT_CHECK_SHELL_FEATURES -# ------------------------ -# Find out whether the shell is Bourne or XSI compatible, -# or has some other useful features. -m4_defun([_LT_CHECK_SHELL_FEATURES], -[AC_MSG_CHECKING([whether the shell understands some XSI constructs]) -# Try some XSI features -xsi_shell=no -( _lt_dummy="a/b/c" - test "${_lt_dummy##*/},${_lt_dummy%/*},${_lt_dummy#??}"${_lt_dummy%"$_lt_dummy"}, \ - = c,a/b,b/c, \ - && eval 'test $(( 1 + 1 )) -eq 2 \ - && test "${#_lt_dummy}" -eq 5' ) >/dev/null 2>&1 \ - && xsi_shell=yes -AC_MSG_RESULT([$xsi_shell]) -_LT_CONFIG_LIBTOOL_INIT([xsi_shell='$xsi_shell']) - -AC_MSG_CHECKING([whether the shell understands "+="]) -lt_shell_append=no -( foo=bar; set foo baz; eval "$[1]+=\$[2]" && test "$foo" = barbaz ) \ - >/dev/null 2>&1 \ - && lt_shell_append=yes -AC_MSG_RESULT([$lt_shell_append]) -_LT_CONFIG_LIBTOOL_INIT([lt_shell_append='$lt_shell_append']) - -if ( (MAIL=60; unset MAIL) || exit) >/dev/null 2>&1; then - lt_unset=unset -else - lt_unset=false -fi -_LT_DECL([], [lt_unset], [0], [whether the shell understands "unset"])dnl - -# test EBCDIC or ASCII -case `echo X|tr X '\101'` in - A) # ASCII based system - # \n is not interpreted correctly by Solaris 8 /usr/ucb/tr - lt_SP2NL='tr \040 \012' - lt_NL2SP='tr \015\012 \040\040' - ;; - *) # EBCDIC based system - lt_SP2NL='tr \100 \n' - lt_NL2SP='tr \r\n \100\100' - ;; -esac -_LT_DECL([SP2NL], [lt_SP2NL], [1], [turn spaces into newlines])dnl -_LT_DECL([NL2SP], [lt_NL2SP], [1], [turn newlines into spaces])dnl -])# _LT_CHECK_SHELL_FEATURES - - -# _LT_PROG_FUNCTION_REPLACE (FUNCNAME, REPLACEMENT-BODY) -# ------------------------------------------------------ -# In `$cfgfile', look for function FUNCNAME delimited by `^FUNCNAME ()$' and -# '^} FUNCNAME ', and replace its body with REPLACEMENT-BODY. -m4_defun([_LT_PROG_FUNCTION_REPLACE], -[dnl { -sed -e '/^$1 ()$/,/^} # $1 /c\ -$1 ()\ -{\ -m4_bpatsubsts([$2], [$], [\\], [^\([ ]\)], [\\\1]) -} # Extended-shell $1 implementation' "$cfgfile" > $cfgfile.tmp \ - && mv -f "$cfgfile.tmp" "$cfgfile" \ - || (rm -f "$cfgfile" && cp "$cfgfile.tmp" "$cfgfile" && rm -f "$cfgfile.tmp") -test 0 -eq $? || _lt_function_replace_fail=: -]) - - -# _LT_PROG_REPLACE_SHELLFNS -# ------------------------- -# Replace existing portable implementations of several shell functions with -# equivalent extended shell implementations where those features are available.. -m4_defun([_LT_PROG_REPLACE_SHELLFNS], -[if test x"$xsi_shell" = xyes; then - _LT_PROG_FUNCTION_REPLACE([func_dirname], [dnl - case ${1} in - */*) func_dirname_result="${1%/*}${2}" ;; - * ) func_dirname_result="${3}" ;; - esac]) - - _LT_PROG_FUNCTION_REPLACE([func_basename], [dnl - func_basename_result="${1##*/}"]) - - _LT_PROG_FUNCTION_REPLACE([func_dirname_and_basename], [dnl - case ${1} in - */*) func_dirname_result="${1%/*}${2}" ;; - * ) func_dirname_result="${3}" ;; - esac - func_basename_result="${1##*/}"]) - - _LT_PROG_FUNCTION_REPLACE([func_stripname], [dnl - # pdksh 5.2.14 does not do ${X%$Y} correctly if both X and Y are - # positional parameters, so assign one to ordinary parameter first. - func_stripname_result=${3} - func_stripname_result=${func_stripname_result#"${1}"} - func_stripname_result=${func_stripname_result%"${2}"}]) - - _LT_PROG_FUNCTION_REPLACE([func_split_long_opt], [dnl - func_split_long_opt_name=${1%%=*} - func_split_long_opt_arg=${1#*=}]) - - _LT_PROG_FUNCTION_REPLACE([func_split_short_opt], [dnl - func_split_short_opt_arg=${1#??} - func_split_short_opt_name=${1%"$func_split_short_opt_arg"}]) - - _LT_PROG_FUNCTION_REPLACE([func_lo2o], [dnl - case ${1} in - *.lo) func_lo2o_result=${1%.lo}.${objext} ;; - *) func_lo2o_result=${1} ;; - esac]) - - _LT_PROG_FUNCTION_REPLACE([func_xform], [ func_xform_result=${1%.*}.lo]) - - _LT_PROG_FUNCTION_REPLACE([func_arith], [ func_arith_result=$(( $[*] ))]) - - _LT_PROG_FUNCTION_REPLACE([func_len], [ func_len_result=${#1}]) -fi - -if test x"$lt_shell_append" = xyes; then - _LT_PROG_FUNCTION_REPLACE([func_append], [ eval "${1}+=\\${2}"]) - - _LT_PROG_FUNCTION_REPLACE([func_append_quoted], [dnl - func_quote_for_eval "${2}" -dnl m4 expansion turns \\\\ into \\, and then the shell eval turns that into \ - eval "${1}+=\\\\ \\$func_quote_for_eval_result"]) - - # Save a `func_append' function call where possible by direct use of '+=' - sed -e 's%func_append \([[a-zA-Z_]]\{1,\}\) "%\1+="%g' $cfgfile > $cfgfile.tmp \ - && mv -f "$cfgfile.tmp" "$cfgfile" \ - || (rm -f "$cfgfile" && cp "$cfgfile.tmp" "$cfgfile" && rm -f "$cfgfile.tmp") - test 0 -eq $? || _lt_function_replace_fail=: -else - # Save a `func_append' function call even when '+=' is not available - sed -e 's%func_append \([[a-zA-Z_]]\{1,\}\) "%\1="$\1%g' $cfgfile > $cfgfile.tmp \ - && mv -f "$cfgfile.tmp" "$cfgfile" \ - || (rm -f "$cfgfile" && cp "$cfgfile.tmp" "$cfgfile" && rm -f "$cfgfile.tmp") - test 0 -eq $? || _lt_function_replace_fail=: -fi - -if test x"$_lt_function_replace_fail" = x":"; then - AC_MSG_WARN([Unable to substitute extended shell functions in $ofile]) -fi -]) - -# _LT_PATH_CONVERSION_FUNCTIONS -# ----------------------------- -# Determine which file name conversion functions should be used by -# func_to_host_file (and, implicitly, by func_to_host_path). These are needed -# for certain cross-compile configurations and native mingw. -m4_defun([_LT_PATH_CONVERSION_FUNCTIONS], -[AC_REQUIRE([AC_CANONICAL_HOST])dnl -AC_REQUIRE([AC_CANONICAL_BUILD])dnl -AC_MSG_CHECKING([how to convert $build file names to $host format]) -AC_CACHE_VAL(lt_cv_to_host_file_cmd, -[case $host in - *-*-mingw* ) - case $build in - *-*-mingw* ) # actually msys - lt_cv_to_host_file_cmd=func_convert_file_msys_to_w32 - ;; - *-*-cygwin* ) - lt_cv_to_host_file_cmd=func_convert_file_cygwin_to_w32 - ;; - * ) # otherwise, assume *nix - lt_cv_to_host_file_cmd=func_convert_file_nix_to_w32 - ;; - esac - ;; - *-*-cygwin* ) - case $build in - *-*-mingw* ) # actually msys - lt_cv_to_host_file_cmd=func_convert_file_msys_to_cygwin - ;; - *-*-cygwin* ) - lt_cv_to_host_file_cmd=func_convert_file_noop - ;; - * ) # otherwise, assume *nix - lt_cv_to_host_file_cmd=func_convert_file_nix_to_cygwin - ;; - esac - ;; - * ) # unhandled hosts (and "normal" native builds) - lt_cv_to_host_file_cmd=func_convert_file_noop - ;; -esac -]) -to_host_file_cmd=$lt_cv_to_host_file_cmd -AC_MSG_RESULT([$lt_cv_to_host_file_cmd]) -_LT_DECL([to_host_file_cmd], [lt_cv_to_host_file_cmd], - [0], [convert $build file names to $host format])dnl - -AC_MSG_CHECKING([how to convert $build file names to toolchain format]) -AC_CACHE_VAL(lt_cv_to_tool_file_cmd, -[#assume ordinary cross tools, or native build. -lt_cv_to_tool_file_cmd=func_convert_file_noop -case $host in - *-*-mingw* ) - case $build in - *-*-mingw* ) # actually msys - lt_cv_to_tool_file_cmd=func_convert_file_msys_to_w32 - ;; - esac - ;; -esac -]) -to_tool_file_cmd=$lt_cv_to_tool_file_cmd -AC_MSG_RESULT([$lt_cv_to_tool_file_cmd]) -_LT_DECL([to_tool_file_cmd], [lt_cv_to_tool_file_cmd], - [0], [convert $build files to toolchain format])dnl -])# _LT_PATH_CONVERSION_FUNCTIONS -# Helper functions for option handling. -*- Autoconf -*- -# -# Copyright (C) 2004, 2005, 2007, 2008, 2009 Free Software Foundation, -# Inc. -# Written by Gary V. Vaughan, 2004 -# -# This file is free software; the Free Software Foundation gives -# unlimited permission to copy and/or distribute it, with or without -# modifications, as long as this notice is preserved. - -# serial 7 ltoptions.m4 - -# This is to help aclocal find these macros, as it can't see m4_define. -AC_DEFUN([LTOPTIONS_VERSION], [m4_if([1])]) - - -# _LT_MANGLE_OPTION(MACRO-NAME, OPTION-NAME) -# ------------------------------------------ -m4_define([_LT_MANGLE_OPTION], -[[_LT_OPTION_]m4_bpatsubst($1__$2, [[^a-zA-Z0-9_]], [_])]) - - -# _LT_SET_OPTION(MACRO-NAME, OPTION-NAME) -# --------------------------------------- -# Set option OPTION-NAME for macro MACRO-NAME, and if there is a -# matching handler defined, dispatch to it. Other OPTION-NAMEs are -# saved as a flag. -m4_define([_LT_SET_OPTION], -[m4_define(_LT_MANGLE_OPTION([$1], [$2]))dnl -m4_ifdef(_LT_MANGLE_DEFUN([$1], [$2]), - _LT_MANGLE_DEFUN([$1], [$2]), - [m4_warning([Unknown $1 option `$2'])])[]dnl -]) - - -# _LT_IF_OPTION(MACRO-NAME, OPTION-NAME, IF-SET, [IF-NOT-SET]) -# ------------------------------------------------------------ -# Execute IF-SET if OPTION is set, IF-NOT-SET otherwise. -m4_define([_LT_IF_OPTION], -[m4_ifdef(_LT_MANGLE_OPTION([$1], [$2]), [$3], [$4])]) - - -# _LT_UNLESS_OPTIONS(MACRO-NAME, OPTION-LIST, IF-NOT-SET) -# ------------------------------------------------------- -# Execute IF-NOT-SET unless all options in OPTION-LIST for MACRO-NAME -# are set. -m4_define([_LT_UNLESS_OPTIONS], -[m4_foreach([_LT_Option], m4_split(m4_normalize([$2])), - [m4_ifdef(_LT_MANGLE_OPTION([$1], _LT_Option), - [m4_define([$0_found])])])[]dnl -m4_ifdef([$0_found], [m4_undefine([$0_found])], [$3 -])[]dnl -]) - - -# _LT_SET_OPTIONS(MACRO-NAME, OPTION-LIST) -# ---------------------------------------- -# OPTION-LIST is a space-separated list of Libtool options associated -# with MACRO-NAME. If any OPTION has a matching handler declared with -# LT_OPTION_DEFINE, dispatch to that macro; otherwise complain about -# the unknown option and exit. -m4_defun([_LT_SET_OPTIONS], -[# Set options -m4_foreach([_LT_Option], m4_split(m4_normalize([$2])), - [_LT_SET_OPTION([$1], _LT_Option)]) - -m4_if([$1],[LT_INIT],[ - dnl - dnl Simply set some default values (i.e off) if boolean options were not - dnl specified: - _LT_UNLESS_OPTIONS([LT_INIT], [dlopen], [enable_dlopen=no - ]) - _LT_UNLESS_OPTIONS([LT_INIT], [win32-dll], [enable_win32_dll=no - ]) - dnl - dnl If no reference was made to various pairs of opposing options, then - dnl we run the default mode handler for the pair. For example, if neither - dnl `shared' nor `disable-shared' was passed, we enable building of shared - dnl archives by default: - _LT_UNLESS_OPTIONS([LT_INIT], [shared disable-shared], [_LT_ENABLE_SHARED]) - _LT_UNLESS_OPTIONS([LT_INIT], [static disable-static], [_LT_ENABLE_STATIC]) - _LT_UNLESS_OPTIONS([LT_INIT], [pic-only no-pic], [_LT_WITH_PIC]) - _LT_UNLESS_OPTIONS([LT_INIT], [fast-install disable-fast-install], - [_LT_ENABLE_FAST_INSTALL]) - ]) -])# _LT_SET_OPTIONS - - -## --------------------------------- ## -## Macros to handle LT_INIT options. ## -## --------------------------------- ## - -# _LT_MANGLE_DEFUN(MACRO-NAME, OPTION-NAME) -# ----------------------------------------- -m4_define([_LT_MANGLE_DEFUN], -[[_LT_OPTION_DEFUN_]m4_bpatsubst(m4_toupper([$1__$2]), [[^A-Z0-9_]], [_])]) - - -# LT_OPTION_DEFINE(MACRO-NAME, OPTION-NAME, CODE) -# ----------------------------------------------- -m4_define([LT_OPTION_DEFINE], -[m4_define(_LT_MANGLE_DEFUN([$1], [$2]), [$3])[]dnl -])# LT_OPTION_DEFINE - - -# dlopen -# ------ -LT_OPTION_DEFINE([LT_INIT], [dlopen], [enable_dlopen=yes -]) - -AU_DEFUN([AC_LIBTOOL_DLOPEN], -[_LT_SET_OPTION([LT_INIT], [dlopen]) -AC_DIAGNOSE([obsolete], -[$0: Remove this warning and the call to _LT_SET_OPTION when you -put the `dlopen' option into LT_INIT's first parameter.]) -]) - -dnl aclocal-1.4 backwards compatibility: -dnl AC_DEFUN([AC_LIBTOOL_DLOPEN], []) - - -# win32-dll -# --------- -# Declare package support for building win32 dll's. -LT_OPTION_DEFINE([LT_INIT], [win32-dll], -[enable_win32_dll=yes - -case $host in -*-*-cygwin* | *-*-mingw* | *-*-pw32* | *-*-cegcc*) - AC_CHECK_TOOL(AS, as, false) - AC_CHECK_TOOL(DLLTOOL, dlltool, false) - AC_CHECK_TOOL(OBJDUMP, objdump, false) - ;; -esac - -test -z "$AS" && AS=as -_LT_DECL([], [AS], [1], [Assembler program])dnl - -test -z "$DLLTOOL" && DLLTOOL=dlltool -_LT_DECL([], [DLLTOOL], [1], [DLL creation program])dnl - -test -z "$OBJDUMP" && OBJDUMP=objdump -_LT_DECL([], [OBJDUMP], [1], [Object dumper program])dnl -])# win32-dll - -AU_DEFUN([AC_LIBTOOL_WIN32_DLL], -[AC_REQUIRE([AC_CANONICAL_HOST])dnl -_LT_SET_OPTION([LT_INIT], [win32-dll]) -AC_DIAGNOSE([obsolete], -[$0: Remove this warning and the call to _LT_SET_OPTION when you -put the `win32-dll' option into LT_INIT's first parameter.]) -]) - -dnl aclocal-1.4 backwards compatibility: -dnl AC_DEFUN([AC_LIBTOOL_WIN32_DLL], []) - - -# _LT_ENABLE_SHARED([DEFAULT]) -# ---------------------------- -# implement the --enable-shared flag, and supports the `shared' and -# `disable-shared' LT_INIT options. -# DEFAULT is either `yes' or `no'. If omitted, it defaults to `yes'. -m4_define([_LT_ENABLE_SHARED], -[m4_define([_LT_ENABLE_SHARED_DEFAULT], [m4_if($1, no, no, yes)])dnl -AC_ARG_ENABLE([shared], - [AS_HELP_STRING([--enable-shared@<:@=PKGS@:>@], - [build shared libraries @<:@default=]_LT_ENABLE_SHARED_DEFAULT[@:>@])], - [p=${PACKAGE-default} - case $enableval in - yes) enable_shared=yes ;; - no) enable_shared=no ;; - *) - enable_shared=no - # Look at the argument we got. We use all the common list separators. - lt_save_ifs="$IFS"; IFS="${IFS}$PATH_SEPARATOR," - for pkg in $enableval; do - IFS="$lt_save_ifs" - if test "X$pkg" = "X$p"; then - enable_shared=yes - fi - done - IFS="$lt_save_ifs" - ;; - esac], - [enable_shared=]_LT_ENABLE_SHARED_DEFAULT) - - _LT_DECL([build_libtool_libs], [enable_shared], [0], - [Whether or not to build shared libraries]) -])# _LT_ENABLE_SHARED - -LT_OPTION_DEFINE([LT_INIT], [shared], [_LT_ENABLE_SHARED([yes])]) -LT_OPTION_DEFINE([LT_INIT], [disable-shared], [_LT_ENABLE_SHARED([no])]) - -# Old names: -AC_DEFUN([AC_ENABLE_SHARED], -[_LT_SET_OPTION([LT_INIT], m4_if([$1], [no], [disable-])[shared]) -]) - -AC_DEFUN([AC_DISABLE_SHARED], -[_LT_SET_OPTION([LT_INIT], [disable-shared]) -]) - -AU_DEFUN([AM_ENABLE_SHARED], [AC_ENABLE_SHARED($@)]) -AU_DEFUN([AM_DISABLE_SHARED], [AC_DISABLE_SHARED($@)]) - -dnl aclocal-1.4 backwards compatibility: -dnl AC_DEFUN([AM_ENABLE_SHARED], []) -dnl AC_DEFUN([AM_DISABLE_SHARED], []) - - - -# _LT_ENABLE_STATIC([DEFAULT]) -# ---------------------------- -# implement the --enable-static flag, and support the `static' and -# `disable-static' LT_INIT options. -# DEFAULT is either `yes' or `no'. If omitted, it defaults to `yes'. -m4_define([_LT_ENABLE_STATIC], -[m4_define([_LT_ENABLE_STATIC_DEFAULT], [m4_if($1, no, no, yes)])dnl -AC_ARG_ENABLE([static], - [AS_HELP_STRING([--enable-static@<:@=PKGS@:>@], - [build static libraries @<:@default=]_LT_ENABLE_STATIC_DEFAULT[@:>@])], - [p=${PACKAGE-default} - case $enableval in - yes) enable_static=yes ;; - no) enable_static=no ;; - *) - enable_static=no - # Look at the argument we got. We use all the common list separators. - lt_save_ifs="$IFS"; IFS="${IFS}$PATH_SEPARATOR," - for pkg in $enableval; do - IFS="$lt_save_ifs" - if test "X$pkg" = "X$p"; then - enable_static=yes - fi - done - IFS="$lt_save_ifs" - ;; - esac], - [enable_static=]_LT_ENABLE_STATIC_DEFAULT) - - _LT_DECL([build_old_libs], [enable_static], [0], - [Whether or not to build static libraries]) -])# _LT_ENABLE_STATIC - -LT_OPTION_DEFINE([LT_INIT], [static], [_LT_ENABLE_STATIC([yes])]) -LT_OPTION_DEFINE([LT_INIT], [disable-static], [_LT_ENABLE_STATIC([no])]) - -# Old names: -AC_DEFUN([AC_ENABLE_STATIC], -[_LT_SET_OPTION([LT_INIT], m4_if([$1], [no], [disable-])[static]) -]) - -AC_DEFUN([AC_DISABLE_STATIC], -[_LT_SET_OPTION([LT_INIT], [disable-static]) -]) - -AU_DEFUN([AM_ENABLE_STATIC], [AC_ENABLE_STATIC($@)]) -AU_DEFUN([AM_DISABLE_STATIC], [AC_DISABLE_STATIC($@)]) - -dnl aclocal-1.4 backwards compatibility: -dnl AC_DEFUN([AM_ENABLE_STATIC], []) -dnl AC_DEFUN([AM_DISABLE_STATIC], []) - - - -# _LT_ENABLE_FAST_INSTALL([DEFAULT]) -# ---------------------------------- -# implement the --enable-fast-install flag, and support the `fast-install' -# and `disable-fast-install' LT_INIT options. -# DEFAULT is either `yes' or `no'. If omitted, it defaults to `yes'. -m4_define([_LT_ENABLE_FAST_INSTALL], -[m4_define([_LT_ENABLE_FAST_INSTALL_DEFAULT], [m4_if($1, no, no, yes)])dnl -AC_ARG_ENABLE([fast-install], - [AS_HELP_STRING([--enable-fast-install@<:@=PKGS@:>@], - [optimize for fast installation @<:@default=]_LT_ENABLE_FAST_INSTALL_DEFAULT[@:>@])], - [p=${PACKAGE-default} - case $enableval in - yes) enable_fast_install=yes ;; - no) enable_fast_install=no ;; - *) - enable_fast_install=no - # Look at the argument we got. We use all the common list separators. - lt_save_ifs="$IFS"; IFS="${IFS}$PATH_SEPARATOR," - for pkg in $enableval; do - IFS="$lt_save_ifs" - if test "X$pkg" = "X$p"; then - enable_fast_install=yes - fi - done - IFS="$lt_save_ifs" - ;; - esac], - [enable_fast_install=]_LT_ENABLE_FAST_INSTALL_DEFAULT) - -_LT_DECL([fast_install], [enable_fast_install], [0], - [Whether or not to optimize for fast installation])dnl -])# _LT_ENABLE_FAST_INSTALL - -LT_OPTION_DEFINE([LT_INIT], [fast-install], [_LT_ENABLE_FAST_INSTALL([yes])]) -LT_OPTION_DEFINE([LT_INIT], [disable-fast-install], [_LT_ENABLE_FAST_INSTALL([no])]) - -# Old names: -AU_DEFUN([AC_ENABLE_FAST_INSTALL], -[_LT_SET_OPTION([LT_INIT], m4_if([$1], [no], [disable-])[fast-install]) -AC_DIAGNOSE([obsolete], -[$0: Remove this warning and the call to _LT_SET_OPTION when you put -the `fast-install' option into LT_INIT's first parameter.]) -]) - -AU_DEFUN([AC_DISABLE_FAST_INSTALL], -[_LT_SET_OPTION([LT_INIT], [disable-fast-install]) -AC_DIAGNOSE([obsolete], -[$0: Remove this warning and the call to _LT_SET_OPTION when you put -the `disable-fast-install' option into LT_INIT's first parameter.]) -]) - -dnl aclocal-1.4 backwards compatibility: -dnl AC_DEFUN([AC_ENABLE_FAST_INSTALL], []) -dnl AC_DEFUN([AM_DISABLE_FAST_INSTALL], []) - - -# _LT_WITH_PIC([MODE]) -# -------------------- -# implement the --with-pic flag, and support the `pic-only' and `no-pic' -# LT_INIT options. -# MODE is either `yes' or `no'. If omitted, it defaults to `both'. -m4_define([_LT_WITH_PIC], -[AC_ARG_WITH([pic], - [AS_HELP_STRING([--with-pic@<:@=PKGS@:>@], - [try to use only PIC/non-PIC objects @<:@default=use both@:>@])], - [lt_p=${PACKAGE-default} - case $withval in - yes|no) pic_mode=$withval ;; - *) - pic_mode=default - # Look at the argument we got. We use all the common list separators. - lt_save_ifs="$IFS"; IFS="${IFS}$PATH_SEPARATOR," - for lt_pkg in $withval; do - IFS="$lt_save_ifs" - if test "X$lt_pkg" = "X$lt_p"; then - pic_mode=yes - fi - done - IFS="$lt_save_ifs" - ;; - esac], - [pic_mode=default]) - -test -z "$pic_mode" && pic_mode=m4_default([$1], [default]) - -_LT_DECL([], [pic_mode], [0], [What type of objects to build])dnl -])# _LT_WITH_PIC - -LT_OPTION_DEFINE([LT_INIT], [pic-only], [_LT_WITH_PIC([yes])]) -LT_OPTION_DEFINE([LT_INIT], [no-pic], [_LT_WITH_PIC([no])]) - -# Old name: -AU_DEFUN([AC_LIBTOOL_PICMODE], -[_LT_SET_OPTION([LT_INIT], [pic-only]) -AC_DIAGNOSE([obsolete], -[$0: Remove this warning and the call to _LT_SET_OPTION when you -put the `pic-only' option into LT_INIT's first parameter.]) -]) - -dnl aclocal-1.4 backwards compatibility: -dnl AC_DEFUN([AC_LIBTOOL_PICMODE], []) - -## ----------------- ## -## LTDL_INIT Options ## -## ----------------- ## - -m4_define([_LTDL_MODE], []) -LT_OPTION_DEFINE([LTDL_INIT], [nonrecursive], - [m4_define([_LTDL_MODE], [nonrecursive])]) -LT_OPTION_DEFINE([LTDL_INIT], [recursive], - [m4_define([_LTDL_MODE], [recursive])]) -LT_OPTION_DEFINE([LTDL_INIT], [subproject], - [m4_define([_LTDL_MODE], [subproject])]) - -m4_define([_LTDL_TYPE], []) -LT_OPTION_DEFINE([LTDL_INIT], [installable], - [m4_define([_LTDL_TYPE], [installable])]) -LT_OPTION_DEFINE([LTDL_INIT], [convenience], - [m4_define([_LTDL_TYPE], [convenience])]) -# ltsugar.m4 -- libtool m4 base layer. -*-Autoconf-*- -# -# Copyright (C) 2004, 2005, 2007, 2008 Free Software Foundation, Inc. -# Written by Gary V. Vaughan, 2004 -# -# This file is free software; the Free Software Foundation gives -# unlimited permission to copy and/or distribute it, with or without -# modifications, as long as this notice is preserved. - -# serial 6 ltsugar.m4 - -# This is to help aclocal find these macros, as it can't see m4_define. -AC_DEFUN([LTSUGAR_VERSION], [m4_if([0.1])]) - - -# lt_join(SEP, ARG1, [ARG2...]) -# ----------------------------- -# Produce ARG1SEPARG2...SEPARGn, omitting [] arguments and their -# associated separator. -# Needed until we can rely on m4_join from Autoconf 2.62, since all earlier -# versions in m4sugar had bugs. -m4_define([lt_join], -[m4_if([$#], [1], [], - [$#], [2], [[$2]], - [m4_if([$2], [], [], [[$2]_])$0([$1], m4_shift(m4_shift($@)))])]) -m4_define([_lt_join], -[m4_if([$#$2], [2], [], - [m4_if([$2], [], [], [[$1$2]])$0([$1], m4_shift(m4_shift($@)))])]) - - -# lt_car(LIST) -# lt_cdr(LIST) -# ------------ -# Manipulate m4 lists. -# These macros are necessary as long as will still need to support -# Autoconf-2.59 which quotes differently. -m4_define([lt_car], [[$1]]) -m4_define([lt_cdr], -[m4_if([$#], 0, [m4_fatal([$0: cannot be called without arguments])], - [$#], 1, [], - [m4_dquote(m4_shift($@))])]) -m4_define([lt_unquote], $1) - - -# lt_append(MACRO-NAME, STRING, [SEPARATOR]) -# ------------------------------------------ -# Redefine MACRO-NAME to hold its former content plus `SEPARATOR'`STRING'. -# Note that neither SEPARATOR nor STRING are expanded; they are appended -# to MACRO-NAME as is (leaving the expansion for when MACRO-NAME is invoked). -# No SEPARATOR is output if MACRO-NAME was previously undefined (different -# than defined and empty). -# -# This macro is needed until we can rely on Autoconf 2.62, since earlier -# versions of m4sugar mistakenly expanded SEPARATOR but not STRING. -m4_define([lt_append], -[m4_define([$1], - m4_ifdef([$1], [m4_defn([$1])[$3]])[$2])]) - - - -# lt_combine(SEP, PREFIX-LIST, INFIX, SUFFIX1, [SUFFIX2...]) -# ---------------------------------------------------------- -# Produce a SEP delimited list of all paired combinations of elements of -# PREFIX-LIST with SUFFIX1 through SUFFIXn. Each element of the list -# has the form PREFIXmINFIXSUFFIXn. -# Needed until we can rely on m4_combine added in Autoconf 2.62. -m4_define([lt_combine], -[m4_if(m4_eval([$# > 3]), [1], - [m4_pushdef([_Lt_sep], [m4_define([_Lt_sep], m4_defn([lt_car]))])]]dnl -[[m4_foreach([_Lt_prefix], [$2], - [m4_foreach([_Lt_suffix], - ]m4_dquote(m4_dquote(m4_shift(m4_shift(m4_shift($@)))))[, - [_Lt_sep([$1])[]m4_defn([_Lt_prefix])[$3]m4_defn([_Lt_suffix])])])])]) - - -# lt_if_append_uniq(MACRO-NAME, VARNAME, [SEPARATOR], [UNIQ], [NOT-UNIQ]) -# ----------------------------------------------------------------------- -# Iff MACRO-NAME does not yet contain VARNAME, then append it (delimited -# by SEPARATOR if supplied) and expand UNIQ, else NOT-UNIQ. -m4_define([lt_if_append_uniq], -[m4_ifdef([$1], - [m4_if(m4_index([$3]m4_defn([$1])[$3], [$3$2$3]), [-1], - [lt_append([$1], [$2], [$3])$4], - [$5])], - [lt_append([$1], [$2], [$3])$4])]) - - -# lt_dict_add(DICT, KEY, VALUE) -# ----------------------------- -m4_define([lt_dict_add], -[m4_define([$1($2)], [$3])]) - - -# lt_dict_add_subkey(DICT, KEY, SUBKEY, VALUE) -# -------------------------------------------- -m4_define([lt_dict_add_subkey], -[m4_define([$1($2:$3)], [$4])]) - - -# lt_dict_fetch(DICT, KEY, [SUBKEY]) -# ---------------------------------- -m4_define([lt_dict_fetch], -[m4_ifval([$3], - m4_ifdef([$1($2:$3)], [m4_defn([$1($2:$3)])]), - m4_ifdef([$1($2)], [m4_defn([$1($2)])]))]) - - -# lt_if_dict_fetch(DICT, KEY, [SUBKEY], VALUE, IF-TRUE, [IF-FALSE]) -# ----------------------------------------------------------------- -m4_define([lt_if_dict_fetch], -[m4_if(lt_dict_fetch([$1], [$2], [$3]), [$4], - [$5], - [$6])]) - - -# lt_dict_filter(DICT, [SUBKEY], VALUE, [SEPARATOR], KEY, [...]) -# -------------------------------------------------------------- -m4_define([lt_dict_filter], -[m4_if([$5], [], [], - [lt_join(m4_quote(m4_default([$4], [[, ]])), - lt_unquote(m4_split(m4_normalize(m4_foreach(_Lt_key, lt_car([m4_shiftn(4, $@)]), - [lt_if_dict_fetch([$1], _Lt_key, [$2], [$3], [_Lt_key ])])))))])[]dnl -]) -# ltversion.m4 -- version numbers -*- Autoconf -*- -# -# Copyright (C) 2004 Free Software Foundation, Inc. -# Written by Scott James Remnant, 2004 -# -# This file is free software; the Free Software Foundation gives -# unlimited permission to copy and/or distribute it, with or without -# modifications, as long as this notice is preserved. - -# @configure_input@ - -# serial 3337 ltversion.m4 -# This file is part of GNU Libtool - -m4_define([LT_PACKAGE_VERSION], [2.4.2]) -m4_define([LT_PACKAGE_REVISION], [1.3337]) - -AC_DEFUN([LTVERSION_VERSION], -[macro_version='2.4.2' -macro_revision='1.3337' -_LT_DECL(, macro_version, 0, [Which release of libtool.m4 was used?]) -_LT_DECL(, macro_revision, 0) -]) -# lt~obsolete.m4 -- aclocal satisfying obsolete definitions. -*-Autoconf-*- -# -# Copyright (C) 2004, 2005, 2007, 2009 Free Software Foundation, Inc. -# Written by Scott James Remnant, 2004. -# -# This file is free software; the Free Software Foundation gives -# unlimited permission to copy and/or distribute it, with or without -# modifications, as long as this notice is preserved. - -# serial 5 lt~obsolete.m4 - -# These exist entirely to fool aclocal when bootstrapping libtool. -# -# In the past libtool.m4 has provided macros via AC_DEFUN (or AU_DEFUN) -# which have later been changed to m4_define as they aren't part of the -# exported API, or moved to Autoconf or Automake where they belong. -# -# The trouble is, aclocal is a bit thick. It'll see the old AC_DEFUN -# in /usr/share/aclocal/libtool.m4 and remember it, then when it sees us -# using a macro with the same name in our local m4/libtool.m4 it'll -# pull the old libtool.m4 in (it doesn't see our shiny new m4_define -# and doesn't know about Autoconf macros at all.) -# -# So we provide this file, which has a silly filename so it's always -# included after everything else. This provides aclocal with the -# AC_DEFUNs it wants, but when m4 processes it, it doesn't do anything -# because those macros already exist, or will be overwritten later. -# We use AC_DEFUN over AU_DEFUN for compatibility with aclocal-1.6. -# -# Anytime we withdraw an AC_DEFUN or AU_DEFUN, remember to add it here. -# Yes, that means every name once taken will need to remain here until -# we give up compatibility with versions before 1.7, at which point -# we need to keep only those names which we still refer to. - -# This is to help aclocal find these macros, as it can't see m4_define. -AC_DEFUN([LTOBSOLETE_VERSION], [m4_if([1])]) - -m4_ifndef([AC_LIBTOOL_LINKER_OPTION], [AC_DEFUN([AC_LIBTOOL_LINKER_OPTION])]) -m4_ifndef([AC_PROG_EGREP], [AC_DEFUN([AC_PROG_EGREP])]) -m4_ifndef([_LT_AC_PROG_ECHO_BACKSLASH], [AC_DEFUN([_LT_AC_PROG_ECHO_BACKSLASH])]) -m4_ifndef([_LT_AC_SHELL_INIT], [AC_DEFUN([_LT_AC_SHELL_INIT])]) -m4_ifndef([_LT_AC_SYS_LIBPATH_AIX], [AC_DEFUN([_LT_AC_SYS_LIBPATH_AIX])]) -m4_ifndef([_LT_PROG_LTMAIN], [AC_DEFUN([_LT_PROG_LTMAIN])]) -m4_ifndef([_LT_AC_TAGVAR], [AC_DEFUN([_LT_AC_TAGVAR])]) -m4_ifndef([AC_LTDL_ENABLE_INSTALL], [AC_DEFUN([AC_LTDL_ENABLE_INSTALL])]) -m4_ifndef([AC_LTDL_PREOPEN], [AC_DEFUN([AC_LTDL_PREOPEN])]) -m4_ifndef([_LT_AC_SYS_COMPILER], [AC_DEFUN([_LT_AC_SYS_COMPILER])]) -m4_ifndef([_LT_AC_LOCK], [AC_DEFUN([_LT_AC_LOCK])]) -m4_ifndef([AC_LIBTOOL_SYS_OLD_ARCHIVE], [AC_DEFUN([AC_LIBTOOL_SYS_OLD_ARCHIVE])]) -m4_ifndef([_LT_AC_TRY_DLOPEN_SELF], [AC_DEFUN([_LT_AC_TRY_DLOPEN_SELF])]) -m4_ifndef([AC_LIBTOOL_PROG_CC_C_O], [AC_DEFUN([AC_LIBTOOL_PROG_CC_C_O])]) -m4_ifndef([AC_LIBTOOL_SYS_HARD_LINK_LOCKS], [AC_DEFUN([AC_LIBTOOL_SYS_HARD_LINK_LOCKS])]) -m4_ifndef([AC_LIBTOOL_OBJDIR], [AC_DEFUN([AC_LIBTOOL_OBJDIR])]) -m4_ifndef([AC_LTDL_OBJDIR], [AC_DEFUN([AC_LTDL_OBJDIR])]) -m4_ifndef([AC_LIBTOOL_PROG_LD_HARDCODE_LIBPATH], [AC_DEFUN([AC_LIBTOOL_PROG_LD_HARDCODE_LIBPATH])]) -m4_ifndef([AC_LIBTOOL_SYS_LIB_STRIP], [AC_DEFUN([AC_LIBTOOL_SYS_LIB_STRIP])]) -m4_ifndef([AC_PATH_MAGIC], [AC_DEFUN([AC_PATH_MAGIC])]) -m4_ifndef([AC_PROG_LD_GNU], [AC_DEFUN([AC_PROG_LD_GNU])]) -m4_ifndef([AC_PROG_LD_RELOAD_FLAG], [AC_DEFUN([AC_PROG_LD_RELOAD_FLAG])]) -m4_ifndef([AC_DEPLIBS_CHECK_METHOD], [AC_DEFUN([AC_DEPLIBS_CHECK_METHOD])]) -m4_ifndef([AC_LIBTOOL_PROG_COMPILER_NO_RTTI], [AC_DEFUN([AC_LIBTOOL_PROG_COMPILER_NO_RTTI])]) -m4_ifndef([AC_LIBTOOL_SYS_GLOBAL_SYMBOL_PIPE], [AC_DEFUN([AC_LIBTOOL_SYS_GLOBAL_SYMBOL_PIPE])]) -m4_ifndef([AC_LIBTOOL_PROG_COMPILER_PIC], [AC_DEFUN([AC_LIBTOOL_PROG_COMPILER_PIC])]) -m4_ifndef([AC_LIBTOOL_PROG_LD_SHLIBS], [AC_DEFUN([AC_LIBTOOL_PROG_LD_SHLIBS])]) -m4_ifndef([AC_LIBTOOL_POSTDEP_PREDEP], [AC_DEFUN([AC_LIBTOOL_POSTDEP_PREDEP])]) -m4_ifndef([LT_AC_PROG_EGREP], [AC_DEFUN([LT_AC_PROG_EGREP])]) -m4_ifndef([LT_AC_PROG_SED], [AC_DEFUN([LT_AC_PROG_SED])]) -m4_ifndef([_LT_CC_BASENAME], [AC_DEFUN([_LT_CC_BASENAME])]) -m4_ifndef([_LT_COMPILER_BOILERPLATE], [AC_DEFUN([_LT_COMPILER_BOILERPLATE])]) -m4_ifndef([_LT_LINKER_BOILERPLATE], [AC_DEFUN([_LT_LINKER_BOILERPLATE])]) -m4_ifndef([_AC_PROG_LIBTOOL], [AC_DEFUN([_AC_PROG_LIBTOOL])]) -m4_ifndef([AC_LIBTOOL_SETUP], [AC_DEFUN([AC_LIBTOOL_SETUP])]) -m4_ifndef([_LT_AC_CHECK_DLFCN], [AC_DEFUN([_LT_AC_CHECK_DLFCN])]) -m4_ifndef([AC_LIBTOOL_SYS_DYNAMIC_LINKER], [AC_DEFUN([AC_LIBTOOL_SYS_DYNAMIC_LINKER])]) -m4_ifndef([_LT_AC_TAGCONFIG], [AC_DEFUN([_LT_AC_TAGCONFIG])]) -m4_ifndef([AC_DISABLE_FAST_INSTALL], [AC_DEFUN([AC_DISABLE_FAST_INSTALL])]) -m4_ifndef([_LT_AC_LANG_CXX], [AC_DEFUN([_LT_AC_LANG_CXX])]) -m4_ifndef([_LT_AC_LANG_F77], [AC_DEFUN([_LT_AC_LANG_F77])]) -m4_ifndef([_LT_AC_LANG_GCJ], [AC_DEFUN([_LT_AC_LANG_GCJ])]) -m4_ifndef([AC_LIBTOOL_LANG_C_CONFIG], [AC_DEFUN([AC_LIBTOOL_LANG_C_CONFIG])]) -m4_ifndef([_LT_AC_LANG_C_CONFIG], [AC_DEFUN([_LT_AC_LANG_C_CONFIG])]) -m4_ifndef([AC_LIBTOOL_LANG_CXX_CONFIG], [AC_DEFUN([AC_LIBTOOL_LANG_CXX_CONFIG])]) -m4_ifndef([_LT_AC_LANG_CXX_CONFIG], [AC_DEFUN([_LT_AC_LANG_CXX_CONFIG])]) -m4_ifndef([AC_LIBTOOL_LANG_F77_CONFIG], [AC_DEFUN([AC_LIBTOOL_LANG_F77_CONFIG])]) -m4_ifndef([_LT_AC_LANG_F77_CONFIG], [AC_DEFUN([_LT_AC_LANG_F77_CONFIG])]) -m4_ifndef([AC_LIBTOOL_LANG_GCJ_CONFIG], [AC_DEFUN([AC_LIBTOOL_LANG_GCJ_CONFIG])]) -m4_ifndef([_LT_AC_LANG_GCJ_CONFIG], [AC_DEFUN([_LT_AC_LANG_GCJ_CONFIG])]) -m4_ifndef([AC_LIBTOOL_LANG_RC_CONFIG], [AC_DEFUN([AC_LIBTOOL_LANG_RC_CONFIG])]) -m4_ifndef([_LT_AC_LANG_RC_CONFIG], [AC_DEFUN([_LT_AC_LANG_RC_CONFIG])]) -m4_ifndef([AC_LIBTOOL_CONFIG], [AC_DEFUN([AC_LIBTOOL_CONFIG])]) -m4_ifndef([_LT_AC_FILE_LTDLL_C], [AC_DEFUN([_LT_AC_FILE_LTDLL_C])]) -m4_ifndef([_LT_REQUIRED_DARWIN_CHECKS], [AC_DEFUN([_LT_REQUIRED_DARWIN_CHECKS])]) -m4_ifndef([_LT_AC_PROG_CXXCPP], [AC_DEFUN([_LT_AC_PROG_CXXCPP])]) -m4_ifndef([_LT_PREPARE_SED_QUOTE_VARS], [AC_DEFUN([_LT_PREPARE_SED_QUOTE_VARS])]) -m4_ifndef([_LT_PROG_ECHO_BACKSLASH], [AC_DEFUN([_LT_PROG_ECHO_BACKSLASH])]) -m4_ifndef([_LT_PROG_F77], [AC_DEFUN([_LT_PROG_F77])]) -m4_ifndef([_LT_PROG_FC], [AC_DEFUN([_LT_PROG_FC])]) -m4_ifndef([_LT_PROG_CXX], [AC_DEFUN([_LT_PROG_CXX])]) diff --git a/autogen.sh b/autogen.sh index 649d7b31e..a41f09578 100755 --- a/autogen.sh +++ b/autogen.sh @@ -4,7 +4,6 @@ echo "Generating build information using autoconf" echo "This may take a while ..." # Regenerate configuration files -cat acinclude/* >aclocal.m4 found=false for autoconf in autoconf autoconf259 autoconf-2.59 do if which $autoconf >/dev/null 2>&1; then $autoconf && found=true; break; fi diff --git a/configure b/configure index 3d12929ff..7fd145b19 100755 --- a/configure +++ b/configure @@ -592,7 +592,7 @@ PACKAGE_STRING= PACKAGE_BUGREPORT= PACKAGE_URL= -ac_unique_file="README" +ac_unique_file="README.txt" # Factoring default headers for most tests. ac_includes_default="\ #include diff --git a/configure.in b/configure.in index 596de052d..a3cb9f4b0 100644 --- a/configure.in +++ b/configure.in @@ -1,5 +1,5 @@ dnl Process this file with autoconf to produce a configure script. -AC_INIT(README) +AC_INIT(README.txt) AC_CONFIG_HEADER(include/SDL_config.h) AC_CONFIG_AUX_DIR(build-scripts) AC_CONFIG_MACRO_DIR([acinclude]) diff --git a/debian/docs b/debian/docs index c7f962913..2e2e9c4ee 100644 --- a/debian/docs +++ b/debian/docs @@ -1,4 +1,4 @@ -BUGS -CREDITS -README +BUGS.txt +CREDITS.txt +README.txt README-SDL.txt From 8408ce85ee0ea9b000bf198874c724a002cbe1e2 Mon Sep 17 00:00:00 2001 From: Sam Lantinga Date: Sun, 26 May 2013 11:34:04 -0700 Subject: [PATCH 141/542] Fixed compile errors building with mingw64 --- src/joystick/windows/SDL_dxjoystick.c | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/src/joystick/windows/SDL_dxjoystick.c b/src/joystick/windows/SDL_dxjoystick.c index 9e86e2f0e..384159885 100644 --- a/src/joystick/windows/SDL_dxjoystick.c +++ b/src/joystick/windows/SDL_dxjoystick.c @@ -373,7 +373,9 @@ SetDIerror(const char *function, HRESULT code) DEFINE_GUID(CLSID_WbemLocator, 0x4590f811,0x1d3a,0x11d0,0x89,0x1F,0x00,0xaa,0x00,0x4b,0x2e,0x24); +#ifndef __IWbemLocator_INTERFACE_DEFINED__ DEFINE_GUID(IID_IWbemLocator, 0xdc12a687,0x737f,0x11cf,0x88,0x4d,0x00,0xaa,0x00,0x4b,0x2e,0x24); +#endif /*----------------------------------------------------------------------------- * @@ -546,7 +548,6 @@ DEFINE_GUID(GUID_DEVINTERFACE_USB_DEVICE, 0xA5DCBF10L, 0x6530, 0x11D2, 0x90, 0x1 static int SDL_JoystickThread(void *_data) { - HRESULT result = S_OK; HWND messageWindow = 0; HDEVNOTIFY hNotify = 0; DEV_BROADCAST_DEVICEINTERFACE dbh; @@ -555,7 +556,7 @@ SDL_JoystickThread(void *_data) SDL_memset( bOpenedXInputDevices, 0x0, sizeof(bOpenedXInputDevices) ); - result = WIN_CoInitialize(); + WIN_CoInitialize(); SDL_memset( &wincl, 0x0, sizeof(wincl) ); wincl.hInstance = GetModuleHandle( NULL ); @@ -813,7 +814,6 @@ static BOOL CALLBACK /* detect any new joysticks being inserted into the system */ void SDL_SYS_JoystickDetect() { - HRESULT result; JoyStick_DeviceData *pCurList = NULL; /* only enum the devices if the joystick thread told us something changed */ if ( s_bDeviceAdded || s_bDeviceRemoved ) @@ -832,7 +832,7 @@ void SDL_SYS_JoystickDetect() SDL_memset( s_pKnownJoystickGUIDs, 0x0, sizeof(GUID)*MAX_JOYSTICKS ); /* Look for joysticks, wheels, head trackers, gamepads, etc.. */ - result = IDirectInput8_EnumDevices(dinput, + IDirectInput8_EnumDevices(dinput, DI8DEVCLASS_GAMECTRL, EnumJoysticksCallback, &pCurList, DIEDFL_ATTACHEDONLY); From 6ff3478440d01c5a7bdd4c4289f92b882b4799f8 Mon Sep 17 00:00:00 2001 From: Sam Lantinga Date: Sun, 26 May 2013 11:39:19 -0700 Subject: [PATCH 142/542] Don't assume the XAudio2 APIs will never be available --- include/SDL_config_windows.h | 2 -- 1 file changed, 2 deletions(-) diff --git a/include/SDL_config_windows.h b/include/SDL_config_windows.h index e63e531a5..0883056d6 100644 --- a/include/SDL_config_windows.h +++ b/include/SDL_config_windows.h @@ -142,9 +142,7 @@ typedef unsigned int uintptr_t; /* Enable various audio drivers */ #define SDL_AUDIO_DRIVER_DSOUND 1 -#ifndef __GNUC__ #define SDL_AUDIO_DRIVER_XAUDIO2 1 -#endif #define SDL_AUDIO_DRIVER_WINMM 1 #define SDL_AUDIO_DRIVER_DISK 1 #define SDL_AUDIO_DRIVER_DUMMY 1 From 07424fd0ca5f23f9df127ede89cba9991f4fda3e Mon Sep 17 00:00:00 2001 From: Sam Lantinga Date: Sun, 26 May 2013 11:44:03 -0700 Subject: [PATCH 143/542] Fixed compiler warning --- src/video/windows/SDL_windowskeyboard.c | 3 +-- 1 file changed, 1 insertion(+), 2 deletions(-) diff --git a/src/video/windows/SDL_windowskeyboard.c b/src/video/windows/SDL_windowskeyboard.c index 5bb9d4217..b9b342df0 100644 --- a/src/video/windows/SDL_windowskeyboard.c +++ b/src/video/windows/SDL_windowskeyboard.c @@ -1351,7 +1351,6 @@ IME_RenderCandidateList(SDL_VideoData *videodata, HDC hdc) SIZE candsizes[MAX_CANDLIST]; SIZE maxcandsize = {0}; HBITMAP hbm = NULL; - BYTE *bits = NULL; const int candcount = SDL_min(SDL_min(MAX_CANDLIST, videodata->ime_candcount), videodata->ime_candpgsize); SDL_bool vertical = videodata->ime_candvertical; @@ -1433,7 +1432,7 @@ IME_RenderCandidateList(SDL_VideoData *videodata, HDC hdc) ; } - bits = StartDrawToBitmap(hdc, &hbm, size.cx, size.cy); + StartDrawToBitmap(hdc, &hbm, size.cx, size.cy); SelectObject(hdc, listpen); SelectObject(hdc, listbrush); From 9ce206cdc099c0fea5c1e2a104e635b2ba3c94fe Mon Sep 17 00:00:00 2001 From: Sam Lantinga Date: Sun, 26 May 2013 12:20:23 -0700 Subject: [PATCH 144/542] Fixed compiling XAudio2 code with mingw64 --- src/audio/xaudio2/SDL_xaudio2.c | 8 ++++++-- 1 file changed, 6 insertions(+), 2 deletions(-) diff --git a/src/audio/xaudio2/SDL_xaudio2.c b/src/audio/xaudio2/SDL_xaudio2.c index 44d24fa43..a2c45ba86 100644 --- a/src/audio/xaudio2/SDL_xaudio2.c +++ b/src/audio/xaudio2/SDL_xaudio2.c @@ -28,17 +28,22 @@ #include "../SDL_sysaudio.h" #include "SDL_assert.h" +#ifdef __GNUC__ +/* The configure script already did any necessary checking */ +# define SDL_XAUDIO2_HAS_SDK 1 +#else #include /* XAudio2 exists as of the March 2008 DirectX SDK */ #if (!defined(_DXSDK_BUILD_MAJOR) || (_DXSDK_BUILD_MAJOR < 1284)) # pragma message("Your DirectX SDK is too old. Disabling XAudio2 support.") #else # define SDL_XAUDIO2_HAS_SDK 1 #endif +#endif /* __GNUC__ */ #ifdef SDL_XAUDIO2_HAS_SDK #define INITGUID 1 -#include +#include /* Hidden "this" pointer for the audio functions */ #define _THIS SDL_AudioDevice *this @@ -69,7 +74,6 @@ XAUDIO2_DetectDevices(int iscapture, SDL_AddAudioDevice addfn) IXAudio2 *ixa2 = NULL; UINT32 devcount = 0; UINT32 i = 0; - void *ptr = NULL; if (iscapture) { SDL_SetError("XAudio2: capture devices unsupported."); From b70d031fbae057cf70a0e37cd30941077cf2dda4 Mon Sep 17 00:00:00 2001 From: Sam Lantinga Date: Sun, 26 May 2013 12:42:46 -0700 Subject: [PATCH 145/542] Updated the installation instructions to cover all supported platforms --- INSTALL.txt | 29 +++++++++++++++++++++-------- 1 file changed, 21 insertions(+), 8 deletions(-) diff --git a/INSTALL.txt b/INSTALL.txt index 4492a0763..ce77664c9 100644 --- a/INSTALL.txt +++ b/INSTALL.txt @@ -1,17 +1,30 @@ To compile and install SDL: - 0. If you have downloaded this from the website, skip to the next step. - If you have checked this out from subversion, you'll need to run - ./autogen.sh to build the configure script. + 1. Windows with Visual Studio: + * Read VisualC.html - 1. Run './configure; make; make install' + Windows with gcc, either native or cross-compiling: + * Read the FAQ at http://wiki.libsdl.org/moin.fcg/FAQWindows + * Run './configure; make; make install' - If you are compiling for Windows using gcc, read the FAQ at: - http://www.libsdl.org/faq.php?action=listentries&category=4#42 + Mac OS X with Xcode: + * Read README-macosx.txt - If you are compiling using Visual C++ on Win32, you should read - the file VisualC.html + Mac OS X from the command line: + * Run './configure; make; make install' + + Linux and other UNIX systems: + * Run './configure; make; make install' + + Android: + * Read README-android.txt + + iOS: + * Read README-ios.txt + + Using Cmake: + * Read README-cmake.txt 2. Look at the example programs in ./test, and check out the online documentation at http://wiki.libsdl.org/ From 2f9f779e702c4466f37c59ff7e1e8db823ac01bb Mon Sep 17 00:00:00 2001 From: Sam Lantinga Date: Sun, 26 May 2013 12:43:03 -0700 Subject: [PATCH 146/542] Renamed WhatsNew so it can be easily read on Windows --HG-- rename : WhatsNew => WhatsNew.txt --- Makefile.in | 2 +- WhatsNew => WhatsNew.txt | 6 +++--- 2 files changed, 4 insertions(+), 4 deletions(-) rename WhatsNew => WhatsNew.txt (95%) diff --git a/Makefile.in b/Makefile.in index 5793bc7bb..ae6293e7d 100644 --- a/Makefile.in +++ b/Makefile.in @@ -39,7 +39,7 @@ SDLMAIN_OBJECTS = @SDLMAIN_OBJECTS@ SDLTEST_TARGET = libSDL2_test.a SDLTEST_OBJECTS = @SDLTEST_OBJECTS@ -SRC_DIST = *.txt acinclude Android.mk autogen.sh android-project build-scripts cmake configure configure.in debian include Makefile.* sdl2-config.in sdl2.m4 sdl2.pc.in SDL2.spec.in src test VisualC.html VisualC WhatsNew Xcode Xcode-iOS +SRC_DIST = *.txt acinclude Android.mk autogen.sh android-project build-scripts cmake configure configure.in debian include Makefile.* sdl2-config.in sdl2.m4 sdl2.pc.in SDL2.spec.in src test VisualC.html VisualC Xcode Xcode-iOS GEN_DIST = SDL2.spec HDRS = \ diff --git a/WhatsNew b/WhatsNew.txt similarity index 95% rename from WhatsNew rename to WhatsNew.txt index a54ab0abb..c3784deab 100644 --- a/WhatsNew +++ b/WhatsNew.txt @@ -1,3 +1,3 @@ - -This is a list of API changes in SDL's version history. - + +This is a list of API changes in SDL's version history. + From 3cde28eb67f55ab0d1cbc16b9ffd11af24ffe300 Mon Sep 17 00:00:00 2001 From: Sam Lantinga Date: Sun, 26 May 2013 13:06:54 -0700 Subject: [PATCH 147/542] Updated VisualC.html for SDL 2.0 --- VisualC.html | 41 +++++++++++++---------------------------- 1 file changed, 13 insertions(+), 28 deletions(-) diff --git a/VisualC.html b/VisualC.html index fdaeecd32..a481936a3 100644 --- a/VisualC.html +++ b/VisualC.html @@ -4,25 +4,20 @@

- Using SDL with Microsoft Visual C++ 5,6 and 7 + Using SDL with Microsoft Visual C++

by Lion Kimbro and additions by James Turk

- You can either use the precompiled libraries from - the SDL Download web site , or you can build SDL yourself. + You can either use the precompiled libraries from the SDL Download web site , or you can build SDL yourself.

Building SDL

- Go into the VisualC directory and double-click on the VC++ file "SDL.dsw" ("SDL.sln"). This should open up the IDE. -

-

- You may be prompted at this point to upgrade the workspace, should you be using - a more recent version of Visual C++. If so, allow the workspace to be upgraded. + Go into the VisualC directory and double-click on the Visual Studio solution for your version of Visual Studio, e.g. SDL_VS2008.sln This should open up the IDE.

Build the .dll and .lib files. @@ -31,32 +26,22 @@ This is done by right clicking on each project in turn (Projects are listed in the Workspace panel in the FileView tab), and selecting "Build".

-

- If you get an error about SDL_config.h being missing, you should - copy include/SDL_config.h.default to include/SDL_config.h and try again. -

You may get a few warnings, but you should not get any errors. You do have to - have at least the DirectX 5 SDK installed, however. The latest - version of DirectX can be downloaded or purchased on a cheap CD (my - recommendation) from Microsoft . + have at least the DirectX 9 SDK installed, however. The latest + version of DirectX can be downloaded from Microsoft.

Later, we will refer to the following .lib and .dll files that have just been generated:

    -
  • SDL.dll
  • -
  • SDL.lib
  • -
  • SDLmain.lib
  • +
  • SDL2.dll
  • +
  • SDL2.lib
  • +
  • SDL2main.lib

- Search for these using the Windows Find (Windows-F) utility, if you don't - already know where they should be. For those of you with a clue, look inside - the Debug or Release directories of the subdirectories of the Project folder. - (It might be easier to just use Windows Find if this sounds confusing. And - don't worry about needing a clue; we all need visits from the clue fairy - frequently.) + Search for these using the Windows Find (Windows-F) utility inside the VisualC directory.

Creating a Project with SDL @@ -96,15 +81,15 @@ Copy the following files into your Project directory:

    -
  • SDL.dll
  • +
  • SDL2.dll

Add the following files to your project (It is not necessary to copy them to your project directory):

    -
  • SDL.lib
  • -
  • SDLmain.lib
  • +
  • SDL2.lib
  • +
  • SDL2main.lib

(To add them to your project, right click on your project, and select "Add @@ -122,7 +107,7 @@ Now create the basic body of your project. The body of your program should take the following form:

-#include "SDL.h"
+#include "SDL2.h"
 
 int main( int argc, char* argv[] )
 {

From fbef22a01a595a2dd9fc36689459a1c936e92933 Mon Sep 17 00:00:00 2001
From: Sam Lantinga 
Date: Sun, 26 May 2013 14:37:41 -0700
Subject: [PATCH 148/542] Fixed Visual Studio build

---
 src/joystick/windows/SDL_dxjoystick.c | 5 +++--
 1 file changed, 3 insertions(+), 2 deletions(-)

diff --git a/src/joystick/windows/SDL_dxjoystick.c b/src/joystick/windows/SDL_dxjoystick.c
index 384159885..48d4272c1 100644
--- a/src/joystick/windows/SDL_dxjoystick.c
+++ b/src/joystick/windows/SDL_dxjoystick.c
@@ -373,9 +373,10 @@ SetDIerror(const char *function, HRESULT code)
 
 
 DEFINE_GUID(CLSID_WbemLocator,   0x4590f811,0x1d3a,0x11d0,0x89,0x1F,0x00,0xaa,0x00,0x4b,0x2e,0x24);
-#ifndef __IWbemLocator_INTERFACE_DEFINED__
+#ifdef _MSC_VER
+/* The Windows SDK doesn't define this GUID */
 DEFINE_GUID(IID_IWbemLocator,    0xdc12a687,0x737f,0x11cf,0x88,0x4d,0x00,0xaa,0x00,0x4b,0x2e,0x24);
-#endif
+#endif /* _MSC_VER */
 
 /*-----------------------------------------------------------------------------
  *

From b3d555764f4a3bc50987cf20ff7616ea54fcca10 Mon Sep 17 00:00:00 2001
From: Sam Lantinga 
Date: Sun, 26 May 2013 15:50:20 -0700
Subject: [PATCH 149/542] Don't use the C runtime library on Windows, to avoid
 C runtime dependencies and manifest issues.

---
 include/SDL_config_windows.h | 2 --
 1 file changed, 2 deletions(-)

diff --git a/include/SDL_config_windows.h b/include/SDL_config_windows.h
index 0883056d6..3f142dcfe 100644
--- a/include/SDL_config_windows.h
+++ b/include/SDL_config_windows.h
@@ -76,8 +76,6 @@ typedef unsigned int uintptr_t;
 # define SIZEOF_VOIDP 4
 #endif
 
-/* Enabled for SDL 1.2 (binary compatibility) */
-//#define HAVE_LIBC     1
 #ifdef HAVE_LIBC
 /* Useful headers */
 #define HAVE_STDIO_H 1

From 10fbebcc51b1677f6ed8980809295e0d96cb132a Mon Sep 17 00:00:00 2001
From: Sam Lantinga 
Date: Sun, 26 May 2013 16:01:40 -0700
Subject: [PATCH 150/542] Need to generate aclocal.m4 when rebuilding
 configure, but we don't need to check it in.

---
 .hgignore  | 2 +-
 autogen.sh | 1 +
 2 files changed, 2 insertions(+), 1 deletion(-)

diff --git a/.hgignore b/.hgignore
index c74c5047f..ed369a331 100644
--- a/.hgignore
+++ b/.hgignore
@@ -1,5 +1,5 @@
 syntax:glob
-.svn
+aclocal.m4
 autom4te*
 config.cache
 config.log
diff --git a/autogen.sh b/autogen.sh
index a41f09578..649d7b31e 100755
--- a/autogen.sh
+++ b/autogen.sh
@@ -4,6 +4,7 @@ echo "Generating build information using autoconf"
 echo "This may take a while ..."
 
 # Regenerate configuration files
+cat acinclude/* >aclocal.m4
 found=false
 for autoconf in autoconf autoconf259 autoconf-2.59
 do if which $autoconf >/dev/null 2>&1; then $autoconf && found=true; break; fi

From d944115cb1fa4265783c97c7e3f57360399d1a51 Mon Sep 17 00:00:00 2001
From: Sam Lantinga 
Date: Sun, 26 May 2013 16:08:15 -0700
Subject: [PATCH 151/542] Added a comment to say why C runtime is off by
 default

---
 include/SDL_config_windows.h | 1 +
 1 file changed, 1 insertion(+)

diff --git a/include/SDL_config_windows.h b/include/SDL_config_windows.h
index 3f142dcfe..0b7621564 100644
--- a/include/SDL_config_windows.h
+++ b/include/SDL_config_windows.h
@@ -76,6 +76,7 @@ typedef unsigned int uintptr_t;
 # define SIZEOF_VOIDP 4
 #endif
 
+/* This is disabled by default to avoid C runtime dependencies and manifest requirements */
 #ifdef HAVE_LIBC
 /* Useful headers */
 #define HAVE_STDIO_H 1

From 1990b00614c199187bcf63d83e80b1797d04f4d5 Mon Sep 17 00:00:00 2001
From: Sam Lantinga 
Date: Sun, 26 May 2013 16:29:57 -0700
Subject: [PATCH 152/542] Removed dependency on libgcc_s_sjlj-1.dll when
 building with mingw64

---
 build-scripts/ltmain.sh | 3 ++-
 configure               | 5 +----
 configure.in            | 5 +----
 3 files changed, 4 insertions(+), 9 deletions(-)

diff --git a/build-scripts/ltmain.sh b/build-scripts/ltmain.sh
index 63ae69dc6..5607845bc 100755
--- a/build-scripts/ltmain.sh
+++ b/build-scripts/ltmain.sh
@@ -5851,9 +5851,10 @@ func_mode_link ()
       # -tp=*                Portland pgcc target processor selection
       # --sysroot=*          for sysroot support
       # -O*, -flto*, -fwhopr*, -fuse-linker-plugin GCC link-time optimization
+      # -{shared,static}-lib*: force GCC to link against specified libgcc
       -64|-mips[0-9]|-r[0-9][0-9]*|-xarch=*|-xtarget=*|+DA*|+DD*|-q*|-m*| \
       -t[45]*|-txscale*|-p|-pg|--coverage|-fprofile-*|-F*|@*|-tp=*|--sysroot=*| \
-      -O*|-flto*|-fwhopr*|-fuse-linker-plugin)
+      -O*|-flto*|-fwhopr*|-fuse-linker-plugin|-shared-lib*|-static-lib*)
         func_quote_for_eval "$arg"
 	arg="$func_quote_for_eval_result"
         func_append compile_command " $arg"
diff --git a/configure b/configure
index 7fd145b19..913cc214d 100755
--- a/configure
+++ b/configure
@@ -22243,10 +22243,7 @@ $as_echo "#define SDL_LOADSO_WINDOWS 1" >>confdefs.h
             have_loadso=yes
         fi
         # Set up the system libraries we need
-        # SDL is unicode, and unicows emulates this on Windows 98/ME
-        # You can get this here: http://libunicows.sourceforge.net/
-        #EXTRA_LDFLAGS="$EXTRA_LDFLAGS -lunicows"
-        EXTRA_LDFLAGS="$EXTRA_LDFLAGS -luser32 -lgdi32 -lwinmm -limm32 -lole32 -loleaut32 -lversion -luuid"
+        EXTRA_LDFLAGS="$EXTRA_LDFLAGS -luser32 -lgdi32 -lwinmm -limm32 -lole32 -loleaut32 -lshell32 -lversion -luuid -static-libgcc"
         # The Windows platform requires special setup
         VERSION_SOURCES="$srcdir/src/main/windows/*.rc"
         SDLMAIN_SOURCES="$srcdir/src/main/windows/*.c"
diff --git a/configure.in b/configure.in
index a3cb9f4b0..e10c8bb0a 100644
--- a/configure.in
+++ b/configure.in
@@ -2411,10 +2411,7 @@ AC_HELP_STRING([--enable-render-d3d], [enable the Direct3D render driver [[defau
             have_loadso=yes
         fi
         # Set up the system libraries we need
-        # SDL is unicode, and unicows emulates this on Windows 98/ME
-        # You can get this here: http://libunicows.sourceforge.net/
-        #EXTRA_LDFLAGS="$EXTRA_LDFLAGS -lunicows"
-        EXTRA_LDFLAGS="$EXTRA_LDFLAGS -luser32 -lgdi32 -lwinmm -limm32 -lole32 -loleaut32 -lversion -luuid"
+        EXTRA_LDFLAGS="$EXTRA_LDFLAGS -luser32 -lgdi32 -lwinmm -limm32 -lole32 -loleaut32 -lshell32 -lversion -luuid -static-libgcc"
         # The Windows platform requires special setup
         VERSION_SOURCES="$srcdir/src/main/windows/*.rc"
         SDLMAIN_SOURCES="$srcdir/src/main/windows/*.c"

From 21512a77b73f494592a37a3677939628d9fdf117 Mon Sep 17 00:00:00 2001
From: Sam Lantinga 
Date: Sun, 26 May 2013 22:16:42 -0700
Subject: [PATCH 153/542] Better mingw32-x64 linker flag fix, which doesn't
 require libtool patch

---
 build-scripts/ltmain.sh | 3 +--
 configure               | 2 +-
 configure.in            | 2 +-
 3 files changed, 3 insertions(+), 4 deletions(-)

diff --git a/build-scripts/ltmain.sh b/build-scripts/ltmain.sh
index 5607845bc..63ae69dc6 100755
--- a/build-scripts/ltmain.sh
+++ b/build-scripts/ltmain.sh
@@ -5851,10 +5851,9 @@ func_mode_link ()
       # -tp=*                Portland pgcc target processor selection
       # --sysroot=*          for sysroot support
       # -O*, -flto*, -fwhopr*, -fuse-linker-plugin GCC link-time optimization
-      # -{shared,static}-lib*: force GCC to link against specified libgcc
       -64|-mips[0-9]|-r[0-9][0-9]*|-xarch=*|-xtarget=*|+DA*|+DD*|-q*|-m*| \
       -t[45]*|-txscale*|-p|-pg|--coverage|-fprofile-*|-F*|@*|-tp=*|--sysroot=*| \
-      -O*|-flto*|-fwhopr*|-fuse-linker-plugin|-shared-lib*|-static-lib*)
+      -O*|-flto*|-fwhopr*|-fuse-linker-plugin)
         func_quote_for_eval "$arg"
 	arg="$func_quote_for_eval_result"
         func_append compile_command " $arg"
diff --git a/configure b/configure
index 913cc214d..4fec887cb 100755
--- a/configure
+++ b/configure
@@ -22243,7 +22243,7 @@ $as_echo "#define SDL_LOADSO_WINDOWS 1" >>confdefs.h
             have_loadso=yes
         fi
         # Set up the system libraries we need
-        EXTRA_LDFLAGS="$EXTRA_LDFLAGS -luser32 -lgdi32 -lwinmm -limm32 -lole32 -loleaut32 -lshell32 -lversion -luuid -static-libgcc"
+        EXTRA_LDFLAGS="$EXTRA_LDFLAGS -luser32 -lgdi32 -lwinmm -limm32 -lole32 -loleaut32 -lshell32 -lversion -luuid -XCClinker -static-libgcc"
         # The Windows platform requires special setup
         VERSION_SOURCES="$srcdir/src/main/windows/*.rc"
         SDLMAIN_SOURCES="$srcdir/src/main/windows/*.c"
diff --git a/configure.in b/configure.in
index e10c8bb0a..1f75d565b 100644
--- a/configure.in
+++ b/configure.in
@@ -2411,7 +2411,7 @@ AC_HELP_STRING([--enable-render-d3d], [enable the Direct3D render driver [[defau
             have_loadso=yes
         fi
         # Set up the system libraries we need
-        EXTRA_LDFLAGS="$EXTRA_LDFLAGS -luser32 -lgdi32 -lwinmm -limm32 -lole32 -loleaut32 -lshell32 -lversion -luuid -static-libgcc"
+        EXTRA_LDFLAGS="$EXTRA_LDFLAGS -luser32 -lgdi32 -lwinmm -limm32 -lole32 -loleaut32 -lshell32 -lversion -luuid -XCClinker -static-libgcc"
         # The Windows platform requires special setup
         VERSION_SOURCES="$srcdir/src/main/windows/*.rc"
         SDLMAIN_SOURCES="$srcdir/src/main/windows/*.c"

From b3ec1b660bc20dfbead31194ec045e56ec9fb2e2 Mon Sep 17 00:00:00 2001
From: Sam Lantinga 
Date: Mon, 27 May 2013 16:18:11 -0700
Subject: [PATCH 154/542] Fixed crash with movaps instruction in SDL_memcpy(),
 due to unaligned Uint32* cast and -O3 vectorization optimizations with gcc
 4.9.0

---
 src/stdlib/SDL_string.c | 60 +++++++++++++++++++++++++++--------------
 1 file changed, 40 insertions(+), 20 deletions(-)

diff --git a/src/stdlib/SDL_string.c b/src/stdlib/SDL_string.c
index 3032d6a8d..f2b2f31f8 100644
--- a/src/stdlib/SDL_string.c
+++ b/src/stdlib/SDL_string.c
@@ -310,29 +310,49 @@ void *SDL_memcpy(void *dst, const void *src, size_t len) { return SDL_memcpy_inl
 void *
 SDL_memcpy(void *dst, const void *src, size_t len)
 {
-    size_t left = (len % 4);
-    Uint32 *srcp4, *dstp4;
-    Uint8 *srcp1, *dstp1;
+#ifdef __GNUC__
+    /* Presumably this is well tuned for speed.
+       On my machine this is twice as fast as the C code below.
+     */
+    return __builtin_memcpy(dst, src, len);
+#else
+    /* GCC 4.9.0 with -O3 will generate movaps instructions with the loop
+       using Uint32* pointers, so we need to make sure the pointers are
+       aligned before we loop using them.
+     */
+    if (((intptr_t)src & 0x3) || ((intptr_t)dst & 0x3)) {
+        /* Do an unaligned byte copy */
+        Uint8 *srcp1 = (Uint8 *)src;
+        Uint8 *dstp1 = (Uint8 *)dst;
 
-    srcp4 = (Uint32 *) src;
-    dstp4 = (Uint32 *) dst;
-    len /= 4;
-    while (len--) {
-        *dstp4++ = *srcp4++;
+        while (len--) {
+            *dstp1++ = *srcp1++;
+        }
+    } else {
+        size_t left = (len % 4);
+        Uint32 *srcp4, *dstp4;
+        Uint8 *srcp1, *dstp1;
+
+        srcp4 = (Uint32 *) src;
+        dstp4 = (Uint32 *) dst;
+        len /= 4;
+        while (len--) {
+            *dstp4++ = *srcp4++;
+        }
+
+        srcp1 = (Uint8 *) srcp4;
+        dstp1 = (Uint8 *) dstp4;
+        switch (left) {
+        case 3:
+            *dstp1++ = *srcp1++;
+        case 2:
+            *dstp1++ = *srcp1++;
+        case 1:
+            *dstp1++ = *srcp1++;
+        }
     }
-
-    srcp1 = (Uint8 *) srcp4;
-    dstp1 = (Uint8 *) dstp4;
-    switch (left) {
-    case 3:
-        *dstp1++ = *srcp1++;
-    case 2:
-        *dstp1++ = *srcp1++;
-    case 1:
-        *dstp1++ = *srcp1++;
-    }
-
     return dst;
+#endif /* __GNUC__ */
 }
 #endif
 

From 78b22c119d8c2ab693c70575fdb1ff01623ce93f Mon Sep 17 00:00:00 2001
From: Sam Lantinga 
Date: Mon, 27 May 2013 20:53:19 -0700
Subject: [PATCH 155/542] Updated supported platforms

---
 README-platforms.txt | 8 +++-----
 1 file changed, 3 insertions(+), 5 deletions(-)

diff --git a/README-platforms.txt b/README-platforms.txt
index 22343ccf3..700664dc3 100644
--- a/README-platforms.txt
+++ b/README-platforms.txt
@@ -5,12 +5,10 @@ Officially supported platforms
 ==============================
 (code compiles, and thoroughly tested for release)
 ==============================
-Windows XP
-Windows Vista
-Windows 7
-ac OS X 10.4+
+Windows XP/Vista/7/8
+Mac OS X 10.5+
 Linux 2.6+
-iOS 3.1.3+
+iOS 4.0.1+
 Android 2.3.3+
 
 Unofficially supported platforms

From b337b40e3318b4bc7a3a9b8737ff34004c9fb1a5 Mon Sep 17 00:00:00 2001
From: Sam Lantinga 
Date: Mon, 27 May 2013 21:44:16 -0700
Subject: [PATCH 156/542] Credits were truncated in a previous commit.

---
 BUGS.txt    |  3 +--
 CREDITS.txt | 37 +++++++++++++++++++++++++++++++++++++
 2 files changed, 38 insertions(+), 2 deletions(-)

diff --git a/BUGS.txt b/BUGS.txt
index 77d0e5edf..7ef553875 100644
--- a/BUGS.txt
+++ b/BUGS.txt
@@ -7,8 +7,7 @@ You may report bugs there, and search to see if a given issue has already
  been reported, discussed, and maybe even fixed.
 
 
-
-You may also find help at the SDL mailing list. Subscription information:
+You may also find help on the SDL mailing list. Subscription information:
 
     http://lists.libsdl.org/listinfo.cgi/sdl-libsdl.org
 
diff --git a/CREDITS.txt b/CREDITS.txt
index b7d302ab8..6b983f4b0 100644
--- a/CREDITS.txt
+++ b/CREDITS.txt
@@ -31,3 +31,40 @@ Thanks to everyone who made this possible, including:
 
 * Luke Benstead for OpenGL 3.0 support
 
+* Gaëtan de Menten for writing the PHP and SQL behind the SDL website
+
+* Tim Jones for the new look of the SDL website
+
+* Ryan Gordon for helping everybody out and keeping the dream alive. :)
+
+* Mattias Engdegård, for help with the Solaris port and lots of other help
+
+* Eric Wing, Max Horn, and Darrell Walisser for unflagging work on the Mac OS X port
+
+* David Carré, for the Pandora port
+
+* Couriersud for the DirectFB driver
+
+* Jon Atkins for SDL_image, SDL_mixer and SDL_net documentation
+
+* Arne Claus, for the 2004 winning SDL logo,
+  and Shandy Brown, Jac, Alex Lyman, Mikkel Gjoel, #Guy, Jonas Hartmann,
+  Daniel Liljeberg,  Ronald Sowa, DocD, Pekka Jaervinen, Patrick Avella,
+  Erkki Kontilla, Levon Gavalian, Hal Emerich, David Wiktorsson,
+  S. Schury and F. Hufsky, Ciska de Ruyver, Shredweat, Tyler Montbriand,
+  Martin Andersson, Merlyn Wysard, Fernando Ibanez, David Miller,
+  Andre Bommele, lovesby.com, Francisco Camenforte Torres, and David Igreja
+  for other logo entries.
+
+* Bob Pendleton and David Olofson for being long time contributors to
+  the SDL mailing list.
+
+* Everybody at Loki Software, Inc. for their great contributions!
+
+ And a big hand to everyone else who gave me appreciation, advice,
+ and suggestions, especially the good folks on the SDL mailing list.
+
+THANKS! :)
+
+  -- Sam Lantinga			
+

From c55f53aa4088e2e407bf7d5ccdaa5c8fe9a4cb78 Mon Sep 17 00:00:00 2001
From: Sam Lantinga 
Date: Wed, 29 May 2013 03:07:55 -0700
Subject: [PATCH 157/542] Fixed bug 1622 - SDL_RenderSetViewport with empty
 SDL_Rect raises wrong error for OpenGL rendering backend

It's now legal to set an empty viewport rect - it will prevent any rendering.

Also added an API to query the output size: SDL_GetRendererOutputSize()
---
 include/SDL_render.h                    |  6 ++++
 src/render/SDL_render.c                 | 40 ++++++++++++++-----------
 src/render/SDL_sysrender.h              |  1 +
 src/render/direct3d/SDL_render_d3d.c    | 36 +++++++++++-----------
 src/render/opengl/SDL_render_gl.c       | 31 +++++++++----------
 src/render/opengles/SDL_render_gles.c   | 14 +++++----
 src/render/opengles2/SDL_render_gles2.c |  4 +++
 src/render/software/SDL_render_sw.c     | 35 +++++++++++++++++-----
 8 files changed, 103 insertions(+), 64 deletions(-)

diff --git a/include/SDL_render.h b/include/SDL_render.h
index aa92559a3..4e85cfcd7 100644
--- a/include/SDL_render.h
+++ b/include/SDL_render.h
@@ -211,6 +211,12 @@ extern DECLSPEC SDL_Renderer * SDLCALL SDL_GetRenderer(SDL_Window * window);
 extern DECLSPEC int SDLCALL SDL_GetRendererInfo(SDL_Renderer * renderer,
                                                 SDL_RendererInfo * info);
 
+/**
+ *  \brief Get the output size of a rendering context.
+ */
+extern DECLSPEC int SDLCALL SDL_GetRendererOutputSize(SDL_Renderer * renderer,
+                                                      int *w, int *h);
+
 /**
  *  \brief Create a texture for a rendering context.
  *
diff --git a/src/render/SDL_render.c b/src/render/SDL_render.c
index 785e0b905..fcab8c44f 100644
--- a/src/render/SDL_render.c
+++ b/src/render/SDL_render.c
@@ -337,6 +337,25 @@ SDL_GetRendererInfo(SDL_Renderer * renderer, SDL_RendererInfo * info)
     return 0;
 }
 
+int
+SDL_GetRendererOutputSize(SDL_Renderer * renderer, int *w, int *h)
+{
+    CHECK_RENDERER_MAGIC(renderer, -1);
+
+    if (renderer->target) {
+        return SDL_QueryTexture(renderer->target, NULL, NULL, w, h);
+    } else if (renderer->window) {
+        SDL_GetWindowSize(renderer->window, w, h);
+        return 0;
+    } else if (renderer->GetOutputSize) {
+        return renderer->GetOutputSize(renderer, w, h);
+    } else {
+        /* This should never happen */
+        SDL_SetError("Renderer doesn't support querying output size");
+        return -1;
+    }
+}
+
 static SDL_bool
 IsSupportedFormat(SDL_Renderer * renderer, Uint32 format)
 {
@@ -985,13 +1004,8 @@ UpdateLogicalSize(SDL_Renderer *renderer)
     float scale;
     SDL_Rect viewport;
 
-    if (renderer->target) {
-        SDL_QueryTexture(renderer->target, NULL, NULL, &w, &h);
-    } else if (renderer->window) {
-        SDL_GetWindowSize(renderer->window, &w, &h);
-    } else {
-        /* FIXME */
-        return SDL_SetError("Internal error: No way to get output resolution");
+    if (SDL_GetRendererOutputSize(renderer, &w, &h) < 0) {
+        return -1;
     }
 
     want_aspect = (float)renderer->logical_w / renderer->logical_h;
@@ -1074,16 +1088,8 @@ SDL_RenderSetViewport(SDL_Renderer * renderer, const SDL_Rect * rect)
     } else {
         renderer->viewport.x = 0;
         renderer->viewport.y = 0;
-        if (renderer->target) {
-            SDL_QueryTexture(renderer->target, NULL, NULL,
-                              &renderer->viewport.w, &renderer->viewport.h);
-        } else if (renderer->window) {
-            SDL_GetWindowSize(renderer->window,
-                              &renderer->viewport.w, &renderer->viewport.h);
-        } else {
-            /* This will be filled in by UpdateViewport() */
-            renderer->viewport.w = 0;
-            renderer->viewport.h = 0;
+        if (SDL_GetRendererOutputSize(renderer, &renderer->viewport.w, &renderer->viewport.h) < 0) {
+            return -1;
         }
     }
     return renderer->UpdateViewport(renderer);
diff --git a/src/render/SDL_sysrender.h b/src/render/SDL_sysrender.h
index 4f0795274..b01ac887c 100644
--- a/src/render/SDL_sysrender.h
+++ b/src/render/SDL_sysrender.h
@@ -78,6 +78,7 @@ struct SDL_Renderer
     const void *magic;
 
     void (*WindowEvent) (SDL_Renderer * renderer, const SDL_WindowEvent *event);
+    int (*GetOutputSize) (SDL_Renderer * renderer, int *w, int *h);
     int (*CreateTexture) (SDL_Renderer * renderer, SDL_Texture * texture);
     int (*SetTextureColorMod) (SDL_Renderer * renderer,
                                SDL_Texture * texture);
diff --git a/src/render/direct3d/SDL_render_d3d.c b/src/render/direct3d/SDL_render_d3d.c
index dea31f644..1ab27ab7e 100644
--- a/src/render/direct3d/SDL_render_d3d.c
+++ b/src/render/direct3d/SDL_render_d3d.c
@@ -866,23 +866,25 @@ D3D_UpdateViewport(SDL_Renderer * renderer)
     IDirect3DDevice9_SetViewport(data->device, &viewport);
 
     /* Set an orthographic projection matrix */
-    matrix.m[0][0] = 2.0f / renderer->viewport.w;
-    matrix.m[0][1] = 0.0f;
-    matrix.m[0][2] = 0.0f;
-    matrix.m[0][3] = 0.0f;
-    matrix.m[1][0] = 0.0f;
-    matrix.m[1][1] = -2.0f / renderer->viewport.h;
-    matrix.m[1][2] = 0.0f;
-    matrix.m[1][3] = 0.0f;
-    matrix.m[2][0] = 0.0f;
-    matrix.m[2][1] = 0.0f;
-    matrix.m[2][2] = 1.0f;
-    matrix.m[2][3] = 0.0f;
-    matrix.m[3][0] = -1.0f;
-    matrix.m[3][1] = 1.0f;
-    matrix.m[3][2] = 0.0f;
-    matrix.m[3][3] = 1.0f;
-    IDirect3DDevice9_SetTransform(data->device, D3DTS_PROJECTION, &matrix);
+    if (renderer->viewport.w && renderer->viewport.h) {
+        matrix.m[0][0] = 2.0f / renderer->viewport.w;
+        matrix.m[0][1] = 0.0f;
+        matrix.m[0][2] = 0.0f;
+        matrix.m[0][3] = 0.0f;
+        matrix.m[1][0] = 0.0f;
+        matrix.m[1][1] = -2.0f / renderer->viewport.h;
+        matrix.m[1][2] = 0.0f;
+        matrix.m[1][3] = 0.0f;
+        matrix.m[2][0] = 0.0f;
+        matrix.m[2][1] = 0.0f;
+        matrix.m[2][2] = 1.0f;
+        matrix.m[2][3] = 0.0f;
+        matrix.m[3][0] = -1.0f;
+        matrix.m[3][1] = 1.0f;
+        matrix.m[3][2] = 0.0f;
+        matrix.m[3][3] = 1.0f;
+        IDirect3DDevice9_SetTransform(data->device, D3DTS_PROJECTION, &matrix);
+    }
 
     return 0;
 }
diff --git a/src/render/opengl/SDL_render_gl.c b/src/render/opengl/SDL_render_gl.c
index 6e37cf552..77248e421 100644
--- a/src/render/opengl/SDL_render_gl.c
+++ b/src/render/opengl/SDL_render_gl.c
@@ -849,28 +849,25 @@ GL_UpdateViewport(SDL_Renderer * renderer)
         return 0;
     }
 
-    if (!renderer->viewport.w || !renderer->viewport.h) {
-        /* The viewport isn't set up yet, ignore it */
-        return -1;
-    }
-
     data->glViewport(renderer->viewport.x, renderer->viewport.y,
                      renderer->viewport.w, renderer->viewport.h);
 
     data->glMatrixMode(GL_PROJECTION);
     data->glLoadIdentity();
-    if (renderer->target) {
-        data->glOrtho((GLdouble) 0,
-                      (GLdouble) renderer->viewport.w,
-                      (GLdouble) 0,
-                      (GLdouble) renderer->viewport.h,
-                       0.0, 1.0);
-    } else {
-        data->glOrtho((GLdouble) 0,
-                      (GLdouble) renderer->viewport.w,
-                      (GLdouble) renderer->viewport.h,
-                      (GLdouble) 0,
-                       0.0, 1.0);
+    if (renderer->viewport.w && renderer->viewport.h) {
+        if (renderer->target) {
+            data->glOrtho((GLdouble) 0,
+                          (GLdouble) renderer->viewport.w,
+                          (GLdouble) 0,
+                          (GLdouble) renderer->viewport.h,
+                           0.0, 1.0);
+        } else {
+            data->glOrtho((GLdouble) 0,
+                          (GLdouble) renderer->viewport.w,
+                          (GLdouble) renderer->viewport.h,
+                          (GLdouble) 0,
+                           0.0, 1.0);
+        }
     }
     return GL_CheckError("", renderer);
 }
diff --git a/src/render/opengles/SDL_render_gles.c b/src/render/opengles/SDL_render_gles.c
index bd3eedfea..920b35fb0 100644
--- a/src/render/opengles/SDL_render_gles.c
+++ b/src/render/opengles/SDL_render_gles.c
@@ -623,12 +623,14 @@ GLES_UpdateViewport(SDL_Renderer * renderer)
     data->glViewport(renderer->viewport.x, renderer->viewport.y,
                renderer->viewport.w, renderer->viewport.h);
 
-    data->glMatrixMode(GL_PROJECTION);
-    data->glLoadIdentity();
-    data->glOrthof((GLfloat) 0,
-             (GLfloat) renderer->viewport.w,
-             (GLfloat) renderer->viewport.h,
-             (GLfloat) 0, 0.0, 1.0);
+    if (renderer->viewport.w && renderer->viewport.h) {
+        data->glMatrixMode(GL_PROJECTION);
+        data->glLoadIdentity();
+        data->glOrthof((GLfloat) 0,
+                 (GLfloat) renderer->viewport.w,
+                 (GLfloat) renderer->viewport.h,
+                 (GLfloat) 0, 0.0, 1.0);
+    }
     return 0;
 }
 
diff --git a/src/render/opengles2/SDL_render_gles2.c b/src/render/opengles2/SDL_render_gles2.c
index 3933100d6..f52afc15a 100644
--- a/src/render/opengles2/SDL_render_gles2.c
+++ b/src/render/opengles2/SDL_render_gles2.c
@@ -906,6 +906,10 @@ GLES2_SetOrthographicProjection(SDL_Renderer *renderer)
     GLfloat projection[4][4];
     GLuint locProjection;
 
+    if (!renderer->viewport.w || !renderer->viewport.h) {
+        return 0;
+    }
+
     /* Prepare an orthographic projection */
     projection[0][0] = 2.0f / renderer->viewport.w;
     projection[0][1] = 0.0f;
diff --git a/src/render/software/SDL_render_sw.c b/src/render/software/SDL_render_sw.c
index 8c84da143..b7f2b1798 100644
--- a/src/render/software/SDL_render_sw.c
+++ b/src/render/software/SDL_render_sw.c
@@ -39,6 +39,7 @@
 static SDL_Renderer *SW_CreateRenderer(SDL_Window * window, Uint32 flags);
 static void SW_WindowEvent(SDL_Renderer * renderer,
                            const SDL_WindowEvent *event);
+static int SW_GetOutputSize(SDL_Renderer * renderer, int *w, int *h);
 static int SW_CreateTexture(SDL_Renderer * renderer, SDL_Texture * texture);
 static int SW_SetTextureColorMod(SDL_Renderer * renderer,
                                  SDL_Texture * texture);
@@ -110,9 +111,14 @@ SW_ActivateRenderer(SDL_Renderer * renderer)
         data->surface = data->window;
     }
     if (!data->surface) {
-        data->surface = data->window = SDL_GetWindowSurface(renderer->window);
+        SDL_Surface *surface = SDL_GetWindowSurface(renderer->window);
+        if (surface) {
+            data->surface = data->window = surface;
+            renderer->viewport.w = surface->w;
+            renderer->viewport.h = surface->h;
 
-        SW_UpdateViewport(renderer);
+            SW_UpdateViewport(renderer);
+        }
     }
     return data->surface;
 }
@@ -143,6 +149,7 @@ SW_CreateRendererForSurface(SDL_Surface * surface)
     data->surface = surface;
 
     renderer->WindowEvent = SW_WindowEvent;
+    renderer->GetOutputSize = SW_GetOutputSize;
     renderer->CreateTexture = SW_CreateTexture;
     renderer->SetTextureColorMod = SW_SetTextureColorMod;
     renderer->SetTextureAlphaMod = SW_SetTextureAlphaMod;
@@ -194,6 +201,25 @@ SW_WindowEvent(SDL_Renderer * renderer, const SDL_WindowEvent *event)
     }
 }
 
+static int
+SW_GetOutputSize(SDL_Renderer * renderer, int *w, int *h)
+{
+    SDL_Surface *surface = SW_ActivateRenderer(renderer);
+
+    if (surface) {
+        if (w) {
+            *w = surface->w;
+        }
+        if (h) {
+            *h = surface->h;
+        }
+        return 0;
+    } else {
+        SDL_SetError("Software renderer doesn't have an output surface");
+        return -1;
+    }
+}
+
 static int
 SW_CreateTexture(SDL_Renderer * renderer, SDL_Texture * texture)
 {
@@ -313,11 +339,6 @@ SW_UpdateViewport(SDL_Renderer * renderer)
         return 0;
     }
 
-    if (!renderer->viewport.w && !renderer->viewport.h) {
-        /* There may be no window, so update the viewport directly */
-        renderer->viewport.w = surface->w;
-        renderer->viewport.h = surface->h;
-    }
     SDL_SetClipRect(data->surface, &renderer->viewport);
     return 0;
 }

From 20c5cf1e8b1ee47360abc43d3eeba669e99f6542 Mon Sep 17 00:00:00 2001
From: Sam Lantinga 
Date: Wed, 29 May 2013 03:22:19 -0700
Subject: [PATCH 158/542] When the window is resized, the viewport is
 automatically reset. This resolves lots of confusion around resizable
 windows.  Most people don't expect a viewport to be implicitly set when the
 renderer is created and then not to be reset to the window size if the window
 is resized.

Added common test command line parameters --logical WxH and --scale N to test the render logical size and scaling APIs.
---
 include/SDL_render.h       |  3 +--
 include/SDL_test_common.h  |  3 +++
 src/render/SDL_render.c    | 25 +++---------------
 src/render/SDL_sysrender.h |  1 -
 src/test/SDL_test_common.c | 52 ++++++++++++++++++++++++--------------
 5 files changed, 40 insertions(+), 44 deletions(-)

diff --git a/include/SDL_render.h b/include/SDL_render.h
index 4e85cfcd7..2551f3a69 100644
--- a/include/SDL_render.h
+++ b/include/SDL_render.h
@@ -481,8 +481,7 @@ extern DECLSPEC void SDLCALL SDL_RenderGetLogicalSize(SDL_Renderer * renderer, i
  *
  *  \return 0 on success, or -1 on error
  *
- *  \note When the window is resized, the current viewport is automatically
- *        centered within the new window size.
+ *  \note If the window associated with the renderer is resized, the viewport is automatically reset.
  *
  *  \sa SDL_RenderGetViewport()
  *  \sa SDL_RenderSetLogicalSize()
diff --git a/include/SDL_test_common.h b/include/SDL_test_common.h
index 611c54334..f07acf7c1 100644
--- a/include/SDL_test_common.h
+++ b/include/SDL_test_common.h
@@ -69,6 +69,9 @@ typedef struct
     int window_minH;
     int window_maxW;
     int window_maxH;
+    int logical_w;
+    int logical_h;
+    float scale;
     int depth;
     int refresh_rate;
     int num_windows;
diff --git a/src/render/SDL_render.c b/src/render/SDL_render.c
index fcab8c44f..5167f029d 100644
--- a/src/render/SDL_render.c
+++ b/src/render/SDL_render.c
@@ -110,29 +110,11 @@ SDL_RendererEventWatch(void *userdata, SDL_Event *event)
                 renderer->WindowEvent(renderer, &event->window);
             }
 
-            if (event->window.event == SDL_WINDOWEVENT_RESIZED) {
-                if (renderer->logical_w) {
-                    /* We'll update the renderer in the SIZE_CHANGED event */
-                } else {
-                    /* Try to keep the previous viewport centered */
-                    int w, h;
-
-                    SDL_GetWindowSize(window, &w, &h);
-                    if (renderer->target) {
-                        renderer->viewport_backup.x = (w - renderer->viewport_backup.w) / 2;
-                        renderer->viewport_backup.y = (h - renderer->viewport_backup.h) / 2;
-                    } else {
-                        renderer->viewport.x = (w - renderer->viewport.w) / 2;
-                        renderer->viewport.y = (h - renderer->viewport.h) / 2;
-                        renderer->UpdateViewport(renderer);
-                    }
-                }
-                renderer->resized = SDL_TRUE;
-            } else if (event->window.event == SDL_WINDOWEVENT_SIZE_CHANGED) {
+            if (event->window.event == SDL_WINDOWEVENT_SIZE_CHANGED) {
                 if (renderer->logical_w) {
                     UpdateLogicalSize(renderer);
-                } else if (!renderer->resized) {
-                    /* Window was programmatically resized, reset viewport */
+                } else {
+                    /* Window was resized, reset viewport */
                     int w, h;
 
                     SDL_GetWindowSize(window, &w, &h);
@@ -149,7 +131,6 @@ SDL_RendererEventWatch(void *userdata, SDL_Event *event)
                         renderer->UpdateViewport(renderer);
                     }
                 }
-                renderer->resized = SDL_FALSE;
             } else if (event->window.event == SDL_WINDOWEVENT_HIDDEN) {
                 renderer->hidden = SDL_TRUE;
             } else if (event->window.event == SDL_WINDOWEVENT_SHOWN) {
diff --git a/src/render/SDL_sysrender.h b/src/render/SDL_sysrender.h
index b01ac887c..f06ee1d80 100644
--- a/src/render/SDL_sysrender.h
+++ b/src/render/SDL_sysrender.h
@@ -123,7 +123,6 @@ struct SDL_Renderer
     /* The window associated with the renderer */
     SDL_Window *window;
     SDL_bool hidden;
-    SDL_bool resized;
 
     /* The logical resolution for rendering */
     int logical_w;
diff --git a/src/test/SDL_test_common.c b/src/test/SDL_test_common.c
index 8e0e4487c..304e74de5 100644
--- a/src/test/SDL_test_common.c
+++ b/src/test/SDL_test_common.c
@@ -27,7 +27,7 @@
 #include 
 
 #define VIDEO_USAGE \
-"[--video driver] [--renderer driver] [--gldebug] [--info all|video|modes|render|event] [--log all|error|system|audio|video|render|input] [--display N] [--fullscreen | --fullscreen-desktop | --windows N] [--title title] [--icon icon.bmp] [--center | --position X,Y] [--geometry WxH] [--min-geometry WxH] [--max-geometry WxH] [--depth N] [--refresh R] [--vsync] [--noframe] [--resize] [--minimize] [--maximize] [--grab]"
+"[--video driver] [--renderer driver] [--gldebug] [--info all|video|modes|render|event] [--log all|error|system|audio|video|render|input] [--display N] [--fullscreen | --fullscreen-desktop | --windows N] [--title title] [--icon icon.bmp] [--center | --position X,Y] [--geometry WxH] [--min-geometry WxH] [--max-geometry WxH] [--logical WxH] [--scale N] [--depth N] [--refresh R] [--vsync] [--noframe] [--resize] [--minimize] [--maximize] [--grab]"
 
 #define AUDIO_USAGE \
 "[--rate N] [--format U8|S8|U16|U16LE|U16BE|S16|S16LE|S16BE] [--channels N] [--samples N]"
@@ -301,6 +301,33 @@ SDLTest_CommonArg(SDLTest_CommonState * state, int index)
         state->window_maxH = SDL_atoi(h);
         return 2;
     }
+    if (SDL_strcasecmp(argv[index], "--logical") == 0) {
+        char *w, *h;
+        ++index;
+        if (!argv[index]) {
+            return -1;
+        }
+        w = argv[index];
+        h = argv[index];
+        while (*h && *h != 'x') {
+            ++h;
+        }
+        if (!*h) {
+            return -1;
+        }
+        *h++ = '\0';
+        state->logical_w = SDL_atoi(w);
+        state->logical_h = SDL_atoi(h);
+        return 2;
+    }
+    if (SDL_strcasecmp(argv[index], "--scale") == 0) {
+        ++index;
+        if (!argv[index]) {
+            return -1;
+        }
+        state->scale = SDL_atof(argv[index]);
+        return 2;
+    }
     if (SDL_strcasecmp(argv[index], "--depth") == 0) {
         ++index;
         if (!argv[index]) {
@@ -849,6 +876,11 @@ SDLTest_CommonInit(SDLTest_CommonState * state)
                             SDL_GetError());
                     return SDL_FALSE;
                 }
+                if (state->logical_w && state->logical_h) {
+                    SDL_RenderSetLogicalSize(state->renderers[i], state->logical_w, state->logical_h);
+                } else if (state->scale) {
+                    SDL_RenderSetScale(state->renderers[i], state->scale, state->scale);
+                }
                 if (state->verbose & VERBOSE_RENDER) {
                     SDL_RendererInfo info;
 
@@ -1140,24 +1172,6 @@ SDLTest_CommonEvent(SDLTest_CommonState * state, SDL_Event * event, int *done)
     switch (event->type) {
     case SDL_WINDOWEVENT:
         switch (event->window.event) {
-        case SDL_WINDOWEVENT_SIZE_CHANGED:
-            {
-                SDL_Window *window = SDL_GetWindowFromID(event->window.windowID);
-                if (window) {
-                    for (i = 0; i < state->num_windows; ++i) {
-                        if (window == state->windows[i] &&
-                            (state->window_flags & SDL_WINDOW_RESIZABLE)) {
-                            SDL_Rect viewport;
-
-                            viewport.x = 0;
-                            viewport.y = 0;
-                            SDL_GetWindowSize(window, &viewport.w, &viewport.h);
-                            SDL_RenderSetViewport(state->renderers[i], &viewport);
-                        }
-                    }
-                }
-            }
-            break;
         case SDL_WINDOWEVENT_CLOSE:
             {
                 SDL_Window *window = SDL_GetWindowFromID(event->window.windowID);

From 689a31a050b091b5e2facf0a41cbf62992fb5a46 Mon Sep 17 00:00:00 2001
From: Philipp Wiesemann 
Date: Thu, 30 May 2013 12:15:00 +0200
Subject: [PATCH 159/542] Fixed recently deleted Ms in READMEs.

---
 README-android.txt  | 2 +-
 README-directfb.txt | 2 +-
 README-gesture.txt  | 4 ++--
 README-hg.txt       | 4 ++--
 README-ios.txt      | 6 +++---
 README-touch.txt    | 2 +-
 README.txt          | 2 +-
 7 files changed, 11 insertions(+), 11 deletions(-)

diff --git a/README-android.txt b/README-android.txt
index a9da30085..fa0f470b9 100644
--- a/README-android.txt
+++ b/README-android.txt
@@ -10,7 +10,7 @@ http://developer.android.com/sdk/index.html
 Android NDK r7 or later
 http://developer.android.com/sdk/ndk/index.html
 
-inimum API level supported by SDL: 10 (Android 2.3.3)
+Minimum API level supported by SDL: 10 (Android 2.3.3)
 
 ================================================================================
  How the port works
diff --git a/README-directfb.txt b/README-directfb.txt
index b284775fc..e358278ca 100644
--- a/README-directfb.txt
+++ b/README-directfb.txt
@@ -12,7 +12,7 @@ What you need:
 
 DirectFB 1.0.1, 1.2.x, 1.3.0
 Kernel-Framebuffer support: required: vesafb, radeonfb .... 
-esa 7.0.x	   - optional for OpenGL
+Mesa 7.0.x	   - optional for OpenGL
 
 /etc/directfbrc
 
diff --git a/README-gesture.txt b/README-gesture.txt
index 336fb304a..4d0a8d681 100644
--- a/README-gesture.txt
+++ b/README-gesture.txt
@@ -28,7 +28,7 @@ event.dgesture.gestureId  - the unique id of the closest gesture to the performe
 event.dgesture.error      - the difference between the gesture template and the actual performed gesture. Lower error is a better match.
 event.dgesture.numFingers - the number of fingers used to draw the stroke.
 
-ost programs will want to define an appropriate error threshold and check to be sure that the error of a gesture is not abnormally high (an indicator that no gesture was performed).
+Most programs will want to define an appropriate error threshold and check to be sure that the error of a gesture is not abnormally high (an indicator that no gesture was performed).
 
 
 
@@ -50,7 +50,7 @@ SDL_LoadDollarTemplates returns the number of templates successfully loaded.
 
 
 ===========================================================================
-ulti Gestures
+Multi Gestures
 ===========================================================================
 SDL provides simple support for pinch/rotate/swipe gestures. 
 Every time a finger is moved an SDL_MULTIGESTURE event is sent with the following fields:
diff --git a/README-hg.txt b/README-hg.txt
index e007a81dd..32fb8f99d 100644
--- a/README-hg.txt
+++ b/README-hg.txt
@@ -1,10 +1,10 @@
 The latest development version of SDL is available via Mercurial.
-ercurial allows you to get up-to-the-minute fixes and enhancements;
+Mercurial allows you to get up-to-the-minute fixes and enhancements;
 as a developer works on a source tree, you can use "hg" to mirror that
 source tree instead of waiting for an official release. Please look
 at the Mercurial website ( http://mercurial.selenic.com/ ) for more
 information on using hg, where you can also download software for
-ac OS X, Windows, and Unix systems.
+Mac OS X, Windows, and Unix systems.
 
   hg clone http://hg.libsdl.org/SDL
 
diff --git a/README-ios.txt b/README-ios.txt
index 6567087b2..ee0a16d4a 100644
--- a/README-ios.txt
+++ b/README-ios.txt
@@ -34,7 +34,7 @@ By default, iosbuild.sh will autodetect the SDK version you have installed using
 xcodebuild -showsdks, and build for iOS >= 3.0, you can override this behaviour 
 by setting the MIN_OS_VERSION variable, ie:
 
-IN_OS_VERSION=4.2 ./iosbuild.sh
+MIN_OS_VERSION=4.2 ./iosbuild.sh
 
 ==============================================================================
 Using the Simple DirectMedia Layer for iOS
@@ -158,7 +158,7 @@ Each application installed on iPhone resides in a sandbox which includes its own
 
 Once your application is installed its directory tree looks like:
 
-ySDLApp Home/
+MySDLApp Home/
 	MySDLApp.app
 	Documents/
 	Library/
@@ -167,7 +167,7 @@ ySDLApp Home/
 
 When your SDL based iPhone application starts up, it sets the working directory to the main bundle (MySDLApp Home/MySDLApp.app), where your application resources are stored.  You cannot write to this directory.  Instead, I advise you to write document files to "../Documents/" and preferences to "../Library/Preferences".  
 
-ore information on this subject is available here:
+More information on this subject is available here:
 http://developer.apple.com/library/ios/#documentation/iPhone/Conceptual/iPhoneOSProgrammingGuide/Introduction/Introduction.html
 
 ==============================================================================
diff --git a/README-touch.txt b/README-touch.txt
index f07c9110e..07823c934 100644
--- a/README-touch.txt
+++ b/README-touch.txt
@@ -4,7 +4,7 @@ System Specific Notes
 Linux:
 The linux touch system is currently based off event streams, and proc/bus/devices. The active user must be given permissions to read /dev/input/TOUCHDEVICE, where TOUCHDEVICE is the event stream for your device. Currently only Wacom tablets are supported. If you have an unsupported tablet contact me at jim.tla+sdl_touch@gmail.com and I will help you get support for it.
 
-ac: 
+Mac:
 The Mac and iPhone APIs are pretty. If your touch device supports them then you'll be fine. If it doesn't, then there isn't much we can do.
 
 iPhone: 
diff --git a/README.txt b/README.txt
index 104cea58e..5cf8da280 100644
--- a/README.txt
+++ b/README.txt
@@ -27,7 +27,7 @@ in the file "COPYING".
 The best way to learn how to use SDL is to check out the header files in
 the "include" subdirectory and the programs in the "test" subdirectory.
 The header files and test programs are well commented and always up to date.
-ore documentation and FAQs are available online at:
+More documentation and FAQs are available online at:
 	http://wiki.libsdl.org/
 
 If you need help with the library, or just want to discuss SDL related

From 8fc42c451c86c197f8be06f7029399ab8eb36fc9 Mon Sep 17 00:00:00 2001
From: Philipp Wiesemann 
Date: Thu, 30 May 2013 12:23:36 +0200
Subject: [PATCH 160/542] Added deactivated loading of SDL2_net to Java file.

---
 android-project/src/org/libsdl/app/SDLActivity.java | 1 +
 1 file changed, 1 insertion(+)

diff --git a/android-project/src/org/libsdl/app/SDLActivity.java b/android-project/src/org/libsdl/app/SDLActivity.java
index 04bbeff15..3d4011597 100644
--- a/android-project/src/org/libsdl/app/SDLActivity.java
+++ b/android-project/src/org/libsdl/app/SDLActivity.java
@@ -55,6 +55,7 @@ public class SDLActivity extends Activity {
         System.loadLibrary("SDL2");
         //System.loadLibrary("SDL2_image");
         //System.loadLibrary("SDL2_mixer");
+        //System.loadLibrary("SDL2_net");
         //System.loadLibrary("SDL2_ttf");
         System.loadLibrary("main");
     }

From 89b36c9f2138bb600a8719e1e649c935d61748a2 Mon Sep 17 00:00:00 2001
From: Edward Rudd 
Date: Tue, 28 May 2013 16:26:44 -0400
Subject: [PATCH 161/542] Fixups to the main Xcode project due to renamed
 README files and long since removed test files.

--HG--
extra : rebase_source : d8aa77e63cfe38bdcb228587db612f5d4696e13c
---
 Xcode/SDL/SDL.xcodeproj/project.pbxproj | 213 +-----------------------
 Xcode/SDL/testsdl-Info.plist            |  28 ----
 2 files changed, 6 insertions(+), 235 deletions(-)
 delete mode 100644 Xcode/SDL/testsdl-Info.plist

diff --git a/Xcode/SDL/SDL.xcodeproj/project.pbxproj b/Xcode/SDL/SDL.xcodeproj/project.pbxproj
index 7cfd9ddb7..006b548ac 100755
--- a/Xcode/SDL/SDL.xcodeproj/project.pbxproj
+++ b/Xcode/SDL/SDL.xcodeproj/project.pbxproj
@@ -21,16 +21,6 @@
 /* End PBXAggregateTarget section */
 
 /* Begin PBXBuildFile section */
-		001E39EE1196F75000A3F5B8 /* TestSupportRWops_Cocoa.m in Sources */ = {isa = PBXBuildFile; fileRef = 001E39EC1196F75000A3F5B8 /* TestSupportRWops_Cocoa.m */; };
-		006E94A3119511A1001DE610 /* icon.bmp in Resources */ = {isa = PBXBuildFile; fileRef = 006E949C119511A1001DE610 /* icon.bmp */; };
-		006E94A4119511A1001DE610 /* moose.dat in Resources */ = {isa = PBXBuildFile; fileRef = 006E949D119511A1001DE610 /* moose.dat */; };
-		006E94A5119511A1001DE610 /* picture.xbm in Resources */ = {isa = PBXBuildFile; fileRef = 006E949E119511A1001DE610 /* picture.xbm */; };
-		006E94A7119511A1001DE610 /* sample.bmp in Resources */ = {isa = PBXBuildFile; fileRef = 006E94A0119511A1001DE610 /* sample.bmp */; };
-		006E94A8119511A1001DE610 /* sample.wav in Resources */ = {isa = PBXBuildFile; fileRef = 006E94A1119511A1001DE610 /* sample.wav */; };
-		006E94A9119511A1001DE610 /* utf8.txt in Resources */ = {isa = PBXBuildFile; fileRef = 006E94A2119511A1001DE610 /* utf8.txt */; };
-		006E94BC11951217001DE610 /* read in Copy rwops */ = {isa = PBXBuildFile; fileRef = 00D8DA121195093100638393 /* read */; };
-		006E94EF11951255001DE610 /* SDL2.framework in Frameworks */ = {isa = PBXBuildFile; fileRef = BECDF66C0761BA81005FE872 /* SDL2.framework */; };
-		006E94F01195125B001DE610 /* SDL2.framework in Copy Frameworks */ = {isa = PBXBuildFile; fileRef = BECDF66C0761BA81005FE872 /* SDL2.framework */; };
 		007317A20858DECD00B2BC32 /* AudioToolbox.framework in Frameworks */ = {isa = PBXBuildFile; fileRef = 0073179B0858DECD00B2BC32 /* AudioToolbox.framework */; };
 		007317A30858DECD00B2BC32 /* AudioUnit.framework in Frameworks */ = {isa = PBXBuildFile; fileRef = 0073179C0858DECD00B2BC32 /* AudioUnit.framework */; };
 		007317A40858DECD00B2BC32 /* Cocoa.framework in Frameworks */ = {isa = PBXBuildFile; fileRef = 0073179D0858DECD00B2BC32 /* Cocoa.framework */; };
@@ -47,15 +37,6 @@
 		00CFA89D106B4BA100758660 /* ForceFeedback.framework in Frameworks */ = {isa = PBXBuildFile; fileRef = 00CFA89C106B4BA100758660 /* ForceFeedback.framework */; };
 		00D0D08410675DD9004B05EF /* CoreFoundation.framework in Frameworks */ = {isa = PBXBuildFile; fileRef = 00D0D08310675DD9004B05EF /* CoreFoundation.framework */; };
 		00D0D0D810675E46004B05EF /* Carbon.framework in Frameworks */ = {isa = PBXBuildFile; fileRef = 007317C10858E15000B2BC32 /* Carbon.framework */; };
-		00D8DA1B1195093100638393 /* audio.c in Sources */ = {isa = PBXBuildFile; fileRef = 00D8D9FC1195093100638393 /* audio.c */; };
-		00D8DA1C1195093100638393 /* common.c in Sources */ = {isa = PBXBuildFile; fileRef = 00D8D9FF1195093100638393 /* common.c */; };
-		00D8DA221195093100638393 /* platform.c in Sources */ = {isa = PBXBuildFile; fileRef = 00D8DA081195093100638393 /* platform.c */; };
-		00D8DA241195093100638393 /* rect.c in Sources */ = {isa = PBXBuildFile; fileRef = 00D8DA0C1195093100638393 /* rect.c */; };
-		00D8DA251195093100638393 /* render.c in Sources */ = {isa = PBXBuildFile; fileRef = 00D8DA0F1195093100638393 /* render.c */; };
-		00D8DA271195093100638393 /* rwops.c in Sources */ = {isa = PBXBuildFile; fileRef = 00D8DA131195093100638393 /* rwops.c */; };
-		00D8DA281195093100638393 /* SDL_at.c in Sources */ = {isa = PBXBuildFile; fileRef = 00D8DA151195093100638393 /* SDL_at.c */; };
-		00D8DA291195093100638393 /* surface.c in Sources */ = {isa = PBXBuildFile; fileRef = 00D8DA181195093100638393 /* surface.c */; };
-		00D8DA2A1195093100638393 /* testsdl.c in Sources */ = {isa = PBXBuildFile; fileRef = 00D8DA1A1195093100638393 /* testsdl.c */; };
 		04043BBB12FEB1BE0076DB1F /* SDL_glfuncs.h in Headers */ = {isa = PBXBuildFile; fileRef = 04043BBA12FEB1BE0076DB1F /* SDL_glfuncs.h */; };
 		04043BBC12FEB1BE0076DB1F /* SDL_glfuncs.h in Headers */ = {isa = PBXBuildFile; fileRef = 04043BBA12FEB1BE0076DB1F /* SDL_glfuncs.h */; };
 		041B2CA512FA0D680087D585 /* SDL_render.c in Sources */ = {isa = PBXBuildFile; fileRef = 041B2C9E12FA0D680087D585 /* SDL_render.c */; };
@@ -560,13 +541,6 @@
 			remoteGlobalIDString = 0083103F1072EA5700A531F1;
 			remoteInfo = "Generate Doxygen DocSet";
 		};
-		00D8DA2E1195094500638393 /* PBXContainerItemProxy */ = {
-			isa = PBXContainerItemProxy;
-			containerPortal = 0867D690FE84028FC02AAC07 /* Project object */;
-			proxyType = 1;
-			remoteGlobalIDString = BECDF5FE0761BA81005FE872;
-			remoteInfo = Framework;
-		};
 		BECDF6C50761BA81005FE872 /* PBXContainerItemProxy */ = {
 			isa = PBXContainerItemProxy;
 			containerPortal = 0867D690FE84028FC02AAC07 /* Project object */;
@@ -576,40 +550,7 @@
 		};
 /* End PBXContainerItemProxy section */
 
-/* Begin PBXCopyFilesBuildPhase section */
-		006E9491119510E1001DE610 /* Copy Frameworks */ = {
-			isa = PBXCopyFilesBuildPhase;
-			buildActionMask = 2147483647;
-			dstPath = "";
-			dstSubfolderSpec = 10;
-			files = (
-				006E94F01195125B001DE610 /* SDL2.framework in Copy Frameworks */,
-			);
-			name = "Copy Frameworks";
-			runOnlyForDeploymentPostprocessing = 0;
-		};
-		006E94B3119511CE001DE610 /* Copy rwops */ = {
-			isa = PBXCopyFilesBuildPhase;
-			buildActionMask = 2147483647;
-			dstPath = rwops;
-			dstSubfolderSpec = 7;
-			files = (
-				006E94BC11951217001DE610 /* read in Copy rwops */,
-			);
-			name = "Copy rwops";
-			runOnlyForDeploymentPostprocessing = 0;
-		};
-/* End PBXCopyFilesBuildPhase section */
-
 /* Begin PBXFileReference section */
-		001E39EC1196F75000A3F5B8 /* TestSupportRWops_Cocoa.m */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.objc; path = TestSupportRWops_Cocoa.m; sourceTree = ""; };
-		001E39ED1196F75000A3F5B8 /* TestSupportRWops.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = TestSupportRWops.h; sourceTree = ""; };
-		006E949C119511A1001DE610 /* icon.bmp */ = {isa = PBXFileReference; lastKnownFileType = image.bmp; name = icon.bmp; path = ../../test/icon.bmp; sourceTree = SOURCE_ROOT; };
-		006E949D119511A1001DE610 /* moose.dat */ = {isa = PBXFileReference; lastKnownFileType = file; name = moose.dat; path = ../../test/moose.dat; sourceTree = SOURCE_ROOT; };
-		006E949E119511A1001DE610 /* picture.xbm */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = text; name = picture.xbm; path = ../../test/picture.xbm; sourceTree = SOURCE_ROOT; };
-		006E94A0119511A1001DE610 /* sample.bmp */ = {isa = PBXFileReference; lastKnownFileType = image.bmp; name = sample.bmp; path = ../../test/sample.bmp; sourceTree = SOURCE_ROOT; };
-		006E94A1119511A1001DE610 /* sample.wav */ = {isa = PBXFileReference; lastKnownFileType = audio.wav; name = sample.wav; path = ../../test/sample.wav; sourceTree = SOURCE_ROOT; };
-		006E94A2119511A1001DE610 /* utf8.txt */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = text; name = utf8.txt; path = ../../test/utf8.txt; sourceTree = SOURCE_ROOT; };
 		0073179B0858DECD00B2BC32 /* AudioToolbox.framework */ = {isa = PBXFileReference; lastKnownFileType = wrapper.framework; name = AudioToolbox.framework; path = /System/Library/Frameworks/AudioToolbox.framework; sourceTree = ""; };
 		0073179C0858DECD00B2BC32 /* AudioUnit.framework */ = {isa = PBXFileReference; lastKnownFileType = wrapper.framework; name = AudioUnit.framework; path = /System/Library/Frameworks/AudioUnit.framework; sourceTree = ""; };
 		0073179D0858DECD00B2BC32 /* Cocoa.framework */ = {isa = PBXFileReference; lastKnownFileType = wrapper.framework; name = Cocoa.framework; path = /System/Library/Frameworks/Cocoa.framework; sourceTree = ""; };
@@ -617,34 +558,10 @@
 		0073179F0858DECD00B2BC32 /* IOKit.framework */ = {isa = PBXFileReference; lastKnownFileType = wrapper.framework; name = IOKit.framework; path = /System/Library/Frameworks/IOKit.framework; sourceTree = ""; };
 		007317A00858DECD00B2BC32 /* OpenGL.framework */ = {isa = PBXFileReference; lastKnownFileType = wrapper.framework; name = OpenGL.framework; path = /System/Library/Frameworks/OpenGL.framework; sourceTree = ""; };
 		007317C10858E15000B2BC32 /* Carbon.framework */ = {isa = PBXFileReference; lastKnownFileType = wrapper.framework; name = Carbon.framework; path = /System/Library/Frameworks/Carbon.framework; sourceTree = ""; };
-		00794D3F09D0C461003FC8A1 /* License.rtf */ = {isa = PBXFileReference; lastKnownFileType = text.rtf; path = License.rtf; sourceTree = ""; };
+		00794D3F09D0C461003FC8A1 /* License.txt */ = {isa = PBXFileReference; lastKnownFileType = text; path = License.txt; sourceTree = ""; };
 		00AE6E1E08B958CC00255E2F /* ReadMeDevLite.txt */ = {isa = PBXFileReference; fileEncoding = 30; lastKnownFileType = text; path = ReadMeDevLite.txt; sourceTree = ""; };
 		00CFA89C106B4BA100758660 /* ForceFeedback.framework */ = {isa = PBXFileReference; lastKnownFileType = wrapper.framework; name = ForceFeedback.framework; path = /System/Library/Frameworks/ForceFeedback.framework; sourceTree = ""; };
 		00D0D08310675DD9004B05EF /* CoreFoundation.framework */ = {isa = PBXFileReference; lastKnownFileType = wrapper.framework; name = CoreFoundation.framework; path = /System/Library/Frameworks/CoreFoundation.framework; sourceTree = ""; };
-		00D8D9EF1195090700638393 /* testsdl.app */ = {isa = PBXFileReference; explicitFileType = wrapper.application; includeInIndex = 0; path = testsdl.app; sourceTree = BUILT_PRODUCTS_DIR; };
-		00D8D9F11195090700638393 /* testsdl-Info.plist */ = {isa = PBXFileReference; lastKnownFileType = text.plist.xml; path = "testsdl-Info.plist"; sourceTree = ""; };
-		00D8D9FC1195093100638393 /* audio.c */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.c; path = audio.c; sourceTree = ""; };
-		00D8D9FD1195093100638393 /* audio.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = audio.h; sourceTree = ""; };
-		00D8D9FF1195093100638393 /* common.c */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.c; path = common.c; sourceTree = ""; };
-		00D8DA001195093100638393 /* common.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = common.h; sourceTree = ""; };
-		00D8DA011195093100638393 /* images.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = images.h; sourceTree = ""; };
-		00D8DA021195093100638393 /* img_blit.c */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.c; path = img_blit.c; sourceTree = ""; };
-		00D8DA031195093100638393 /* img_blitblend.c */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.c; path = img_blitblend.c; sourceTree = ""; };
-		00D8DA041195093100638393 /* img_face.c */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.c; path = img_face.c; sourceTree = ""; };
-		00D8DA051195093100638393 /* img_primitives.c */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.c; path = img_primitives.c; sourceTree = ""; };
-		00D8DA061195093100638393 /* img_primitivesblend.c */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.c; path = img_primitivesblend.c; sourceTree = ""; };
-		00D8DA081195093100638393 /* platform.c */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.c; path = platform.c; sourceTree = ""; };
-		00D8DA091195093100638393 /* platform.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = platform.h; sourceTree = ""; };
-		00D8DA0C1195093100638393 /* rect.c */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.c; path = rect.c; sourceTree = ""; };
-		00D8DA0D1195093100638393 /* rect.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = rect.h; sourceTree = ""; };
-		00D8DA0F1195093100638393 /* render.c */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.c; path = render.c; sourceTree = ""; };
-		00D8DA101195093100638393 /* render.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = render.h; sourceTree = ""; };
-		00D8DA121195093100638393 /* read */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = text; path = read; sourceTree = ""; };
-		00D8DA131195093100638393 /* rwops.c */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.c; path = rwops.c; sourceTree = ""; };
-		00D8DA141195093100638393 /* rwops.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = rwops.h; sourceTree = ""; };
-		00D8DA181195093100638393 /* surface.c */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.c; path = surface.c; sourceTree = ""; };
-		00D8DA191195093100638393 /* surface.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = surface.h; sourceTree = ""; };
-		00F5D79E0990CA0D0051C449 /* UniversalBinaryNotes.rtf */ = {isa = PBXFileReference; lastKnownFileType = text.rtf; path = UniversalBinaryNotes.rtf; sourceTree = ""; };
 		04043BBA12FEB1BE0076DB1F /* SDL_glfuncs.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = SDL_glfuncs.h; sourceTree = ""; };
 		041B2C9E12FA0D680087D585 /* SDL_render.c */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.c; path = SDL_render.c; sourceTree = ""; };
 		041B2C9F12FA0D680087D585 /* SDL_sysrender.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = SDL_sysrender.h; sourceTree = ""; };
@@ -904,20 +821,12 @@
 		F59C710500D5CB5801000001 /* SDL-devel.info */ = {isa = PBXFileReference; fileEncoding = 30; lastKnownFileType = text; path = "SDL-devel.info"; sourceTree = ""; };
 		F59C710600D5CB5801000001 /* SDL.info */ = {isa = PBXFileReference; fileEncoding = 30; lastKnownFileType = text; path = SDL.info; sourceTree = ""; };
 		F59C710C00D5D15801000001 /* install.sh */ = {isa = PBXFileReference; fileEncoding = 30; lastKnownFileType = text.script.sh; path = install.sh; sourceTree = ""; };
-		F5A2EF3900C6A39A01000001 /* BUGS */ = {isa = PBXFileReference; fileEncoding = 30; lastKnownFileType = text; name = BUGS; path = ../../BUGS; sourceTree = SOURCE_ROOT; };
-		F5A2EF3A00C6A3C201000001 /* README.MacOSX */ = {isa = PBXFileReference; fileEncoding = 30; lastKnownFileType = text; name = README.MacOSX; path = ../../README.MacOSX; sourceTree = SOURCE_ROOT; };
+		F5A2EF3900C6A39A01000001 /* BUGS.txt */ = {isa = PBXFileReference; fileEncoding = 30; lastKnownFileType = text; name = BUGS.txt; path = ../../BUGS.txt; sourceTree = SOURCE_ROOT; };
+		F5A2EF3A00C6A3C201000001 /* README-macosx.txt */ = {isa = PBXFileReference; fileEncoding = 30; lastKnownFileType = text; name = "README-macosx.txt"; path = "../../README-macosx.txt"; sourceTree = SOURCE_ROOT; };
 		F5F81AD400D706B101000001 /* Readme SDL Developer.txt */ = {isa = PBXFileReference; fileEncoding = 30; lastKnownFileType = text; name = "Readme SDL Developer.txt"; path = "pkg-support/Readme SDL Developer.txt"; sourceTree = SOURCE_ROOT; };
 /* End PBXFileReference section */
 
 /* Begin PBXFrameworksBuildPhase section */
-		00D8D9ED1195090700638393 /* Frameworks */ = {
-			isa = PBXFrameworksBuildPhase;
-			buildActionMask = 2147483647;
-			files = (
-				006E94EF11951255001DE610 /* SDL2.framework in Frameworks */,
-			);
-			runOnlyForDeploymentPostprocessing = 0;
-		};
 		BECDF6680761BA81005FE872 /* Frameworks */ = {
 			isa = PBXFrameworksBuildPhase;
 			buildActionMask = 2147483647;
@@ -951,19 +860,6 @@
 /* End PBXFrameworksBuildPhase section */
 
 /* Begin PBXGroup section */
-		006E949B11951160001DE610 /* TestResources */ = {
-			isa = PBXGroup;
-			children = (
-				006E949C119511A1001DE610 /* icon.bmp */,
-				006E949D119511A1001DE610 /* moose.dat */,
-				006E949E119511A1001DE610 /* picture.xbm */,
-				006E94A0119511A1001DE610 /* sample.bmp */,
-				006E94A1119511A1001DE610 /* sample.wav */,
-				006E94A2119511A1001DE610 /* utf8.txt */,
-			);
-			name = TestResources;
-			sourceTree = "";
-		};
 		0153844A006D81B07F000001 /* Public Headers */ = {
 			isa = PBXGroup;
 			children = (
@@ -1033,7 +929,6 @@
 				BECDF6B30761BA81005FE872 /* libSDL2.a */,
 				BECDF6BE0761BA81005FE872 /* Standard DMG */,
 				BECDF6C30761BA81005FE872 /* Developer Extras Package */,
-				00D8D9EF1195090700638393 /* testsdl.app */,
 			);
 			name = Products;
 			sourceTree = "";
@@ -1459,16 +1354,14 @@
 		0867D691FE84028FC02AAC07 /* SDLFramework */ = {
 			isa = PBXGroup;
 			children = (
-				F5A2EF3900C6A39A01000001 /* BUGS */,
-				F5A2EF3A00C6A3C201000001 /* README.MacOSX */,
+				F5A2EF3900C6A39A01000001 /* BUGS.txt */,
+				F5A2EF3A00C6A3C201000001 /* README-macosx.txt */,
 				F59C70FC00D5CB5801000001 /* pkg-support */,
 				0153844A006D81B07F000001 /* Public Headers */,
 				08FB77ACFE841707C02AAC07 /* Library Source */,
-				006E949B11951160001DE610 /* TestResources */,
 				034768DDFF38A45A11DB9C8B /* Products */,
 				BECDF66B0761BA81005FE872 /* Info-Framework.plist */,
 				BEC562FE0761C0E800A33029 /* Linked Frameworks */,
-				00D8D9F11195090700638393 /* testsdl-Info.plist */,
 			);
 			comments = "To build Universal Binaries, we have experimented with a variety of different options.\nThe complication is that we must retain compatibility with at least 10.2. \nThe Universal Binary defaults only work for > 10.3.9\n\nSo far, we have found:\ngcc 4.0.0 with Xcode 2.1 always links against libgcc_s. gcc 4.0.1 from Xcode 2.2 fixes this problem.\n\nBut gcc 4.0 will not work with < 10.3.9 because we continue to get an undefined symbol to _fprintf$LDBL128.\nSo we must use gcc 3.3 on PPC to accomplish 10.2 support. (But 4.0 is required for i386.)\n\nSetting the deployment target to 10.4 will disable prebinding, so for PPC, we set it less than 10.4 to preserve prebinding for legacy support.\n\nSetting the PPC SDKROOT to /Developers/SDKs/MacOSX10.2.8.sdk will link to 63.0.0 libSystem.B.dylib. Leaving it at current or 10.4u links to 88.1.2. However, as long as we are using gcc 3.3, it doesn't seem to matter as testing has demonstrated both will run. We have decided not to invoke the 10.2.8 SDK because it is not a default installed component with Xcode which will probably cause most people problems. However, rather than deleting the SDKROOT_ppc entry entirely, we have mapped it to 10.4u in case we decide we need to change this setting.\n\nTo use Altivec or SSE, we needed architecture specific flags:\nOTHER_CFLAGS_ppc\nOTHER_CFLAGS_i386\nOTHER_CFLAGS=$(OTHER_CFLAGS_($CURRENT_ARCH))\n\nThe general OTHER_CFLAGS needed to be manually mapped to architecture specific options because Xcode didn't do this automatically for us.\n\n\n";
 			name = SDLFramework;
@@ -1552,8 +1445,7 @@
 		F59C710100D5CB5801000001 /* resources */ = {
 			isa = PBXGroup;
 			children = (
-				00794D3F09D0C461003FC8A1 /* License.rtf */,
-				00F5D79E0990CA0D0051C449 /* UniversalBinaryNotes.rtf */,
+				00794D3F09D0C461003FC8A1 /* License.txt */,
 				00AE6E1E08B958CC00255E2F /* ReadMeDevLite.txt */,
 				F59C710300D5CB5801000001 /* ReadMe.txt */,
 			);
@@ -1856,26 +1748,6 @@
 /* End PBXHeadersBuildPhase section */
 
 /* Begin PBXNativeTarget section */
-		00D8D9EE1195090700638393 /* testsdl */ = {
-			isa = PBXNativeTarget;
-			buildConfigurationList = 00D8D9F71195090900638393 /* Build configuration list for PBXNativeTarget "testsdl" */;
-			buildPhases = (
-				00D8D9EB1195090700638393 /* Resources */,
-				00D8D9EC1195090700638393 /* Sources */,
-				00D8D9ED1195090700638393 /* Frameworks */,
-				006E9491119510E1001DE610 /* Copy Frameworks */,
-				006E94B3119511CE001DE610 /* Copy rwops */,
-			);
-			buildRules = (
-			);
-			dependencies = (
-				00D8DA2F1195094500638393 /* PBXTargetDependency */,
-			);
-			name = testsdl;
-			productName = testsdl;
-			productReference = 00D8D9EF1195090700638393 /* testsdl.app */;
-			productType = "com.apple.product-type.application";
-		};
 		BECDF5FE0761BA81005FE872 /* Framework */ = {
 			isa = PBXNativeTarget;
 			buildConfigurationList = 0073177A0858DB0500B2BC32 /* Build configuration list for PBXNativeTarget "Framework" */;
@@ -1978,25 +1850,11 @@
 				BECDF6BB0761BA81005FE872 /* Standard DMG */,
 				BECDF6C00761BA81005FE872 /* Developer Extras Package */,
 				0083103F1072EA5700A531F1 /* Generate Doxygen DocSet */,
-				00D8D9EE1195090700638393 /* testsdl */,
 			);
 		};
 /* End PBXProject section */
 
 /* Begin PBXResourcesBuildPhase section */
-		00D8D9EB1195090700638393 /* Resources */ = {
-			isa = PBXResourcesBuildPhase;
-			buildActionMask = 2147483647;
-			files = (
-				006E94A3119511A1001DE610 /* icon.bmp in Resources */,
-				006E94A4119511A1001DE610 /* moose.dat in Resources */,
-				006E94A5119511A1001DE610 /* picture.xbm in Resources */,
-				006E94A7119511A1001DE610 /* sample.bmp in Resources */,
-				006E94A8119511A1001DE610 /* sample.wav in Resources */,
-				006E94A9119511A1001DE610 /* utf8.txt in Resources */,
-			);
-			runOnlyForDeploymentPostprocessing = 0;
-		};
 		BECDF62A0761BA81005FE872 /* Resources */ = {
 			isa = PBXResourcesBuildPhase;
 			buildActionMask = 2147483647;
@@ -2052,23 +1910,6 @@
 /* End PBXShellScriptBuildPhase section */
 
 /* Begin PBXSourcesBuildPhase section */
-		00D8D9EC1195090700638393 /* Sources */ = {
-			isa = PBXSourcesBuildPhase;
-			buildActionMask = 2147483647;
-			files = (
-				00D8DA1B1195093100638393 /* audio.c in Sources */,
-				00D8DA1C1195093100638393 /* common.c in Sources */,
-				00D8DA221195093100638393 /* platform.c in Sources */,
-				00D8DA241195093100638393 /* rect.c in Sources */,
-				00D8DA251195093100638393 /* render.c in Sources */,
-				00D8DA271195093100638393 /* rwops.c in Sources */,
-				00D8DA281195093100638393 /* SDL_at.c in Sources */,
-				00D8DA291195093100638393 /* surface.c in Sources */,
-				00D8DA2A1195093100638393 /* testsdl.c in Sources */,
-				001E39EE1196F75000A3F5B8 /* TestSupportRWops_Cocoa.m in Sources */,
-			);
-			runOnlyForDeploymentPostprocessing = 0;
-		};
 		BECDF62C0761BA81005FE872 /* Sources */ = {
 			isa = PBXSourcesBuildPhase;
 			buildActionMask = 2147483647;
@@ -2309,11 +2150,6 @@
 			target = 0083103F1072EA5700A531F1 /* Generate Doxygen DocSet */;
 			targetProxy = 008310451072EA9000A531F1 /* PBXContainerItemProxy */;
 		};
-		00D8DA2F1195094500638393 /* PBXTargetDependency */ = {
-			isa = PBXTargetDependency;
-			target = BECDF5FE0761BA81005FE872 /* Framework */;
-			targetProxy = 00D8DA2E1195094500638393 /* PBXContainerItemProxy */;
-		};
 		BECDF6C60761BA81005FE872 /* PBXTargetDependency */ = {
 			isa = PBXTargetDependency;
 			target = BECDF5FE0761BA81005FE872 /* Framework */;
@@ -2464,34 +2300,6 @@
 			};
 			name = Debug;
 		};
-		00D8D9F41195090800638393 /* Debug */ = {
-			isa = XCBuildConfiguration;
-			buildSettings = {
-				INFOPLIST_FILE = "testsdl-Info.plist";
-				OTHER_LDFLAGS = (
-					"-framework",
-					Foundation,
-					"-framework",
-					AppKit,
-				);
-				PRODUCT_NAME = testsdl;
-			};
-			name = Debug;
-		};
-		00D8D9F51195090800638393 /* Release */ = {
-			isa = XCBuildConfiguration;
-			buildSettings = {
-				INFOPLIST_FILE = "testsdl-Info.plist";
-				OTHER_LDFLAGS = (
-					"-framework",
-					Foundation,
-					"-framework",
-					AppKit,
-				);
-				PRODUCT_NAME = testsdl;
-			};
-			name = Release;
-		};
 /* End XCBuildConfiguration section */
 
 /* Begin XCConfigurationList section */
@@ -2549,15 +2357,6 @@
 			defaultConfigurationIsVisible = 0;
 			defaultConfigurationName = Debug;
 		};
-		00D8D9F71195090900638393 /* Build configuration list for PBXNativeTarget "testsdl" */ = {
-			isa = XCConfigurationList;
-			buildConfigurations = (
-				00D8D9F41195090800638393 /* Debug */,
-				00D8D9F51195090800638393 /* Release */,
-			);
-			defaultConfigurationIsVisible = 0;
-			defaultConfigurationName = Debug;
-		};
 /* End XCConfigurationList section */
 	};
 	rootObject = 0867D690FE84028FC02AAC07 /* Project object */;
diff --git a/Xcode/SDL/testsdl-Info.plist b/Xcode/SDL/testsdl-Info.plist
deleted file mode 100644
index 88ac6abca..000000000
--- a/Xcode/SDL/testsdl-Info.plist
+++ /dev/null
@@ -1,28 +0,0 @@
-
-
-
-
-	CFBundleDevelopmentRegion
-	English
-	CFBundleExecutable
-	${EXECUTABLE_NAME}
-	CFBundleIdentifier
-	com.yourcompany.${PRODUCT_NAME:rfc1034identifier}
-	CFBundleInfoDictionaryVersion
-	6.0
-	CFBundlePackageType
-	APPL
-	CFBundleShortVersionString
-	1.0
-	CFBundleSignature
-	????
-	CFBundleVersion
-	1
-	LSMinimumSystemVersion
-	${MACOSX_DEPLOYMENT_TARGET}
-	NSMainNibFile
-	SDLMain
-	NSPrincipalClass
-	NSApplication
-
-

From c30228737be96d571f1f4943e38ee0480d9d01a6 Mon Sep 17 00:00:00 2001
From: Edward Rudd 
Date: Thu, 30 May 2013 10:02:26 -0400
Subject: [PATCH 162/542] Add an OS X Shared library target

--HG--
extra : rebase_source : 766ce377779ecfb4ab2717ffeb803932d7c905e5
---
 Xcode/SDL/SDL.xcodeproj/project.pbxproj | 608 ++++++++++++++++++++++++
 1 file changed, 608 insertions(+)

diff --git a/Xcode/SDL/SDL.xcodeproj/project.pbxproj b/Xcode/SDL/SDL.xcodeproj/project.pbxproj
index 006b548ac..4755774d8 100755
--- a/Xcode/SDL/SDL.xcodeproj/project.pbxproj
+++ b/Xcode/SDL/SDL.xcodeproj/project.pbxproj
@@ -531,6 +531,261 @@
 		AADA5B8716CCAB3000107CF7 /* SDL_bits.h in Headers */ = {isa = PBXBuildFile; fileRef = AADA5B8616CCAB3000107CF7 /* SDL_bits.h */; };
 		AADA5B8816CCAB3000107CF7 /* SDL_bits.h in Headers */ = {isa = PBXBuildFile; fileRef = AADA5B8616CCAB3000107CF7 /* SDL_bits.h */; };
 		BBFC088D164C6647003E6A99 /* SDL_gamecontroller.c in Sources */ = {isa = PBXBuildFile; fileRef = BBFC088A164C6514003E6A99 /* SDL_gamecontroller.c */; };
+		DB313F7417554B71006C0E22 /* SDL_diskaudio.h in Headers */ = {isa = PBXBuildFile; fileRef = 04BDFD8912E6671700899322 /* SDL_diskaudio.h */; };
+		DB313F7517554B71006C0E22 /* SDL_dummyaudio.h in Headers */ = {isa = PBXBuildFile; fileRef = 04BDFD9512E6671700899322 /* SDL_dummyaudio.h */; };
+		DB313F7617554B71006C0E22 /* SDL_coreaudio.h in Headers */ = {isa = PBXBuildFile; fileRef = 04BDFDA112E6671700899322 /* SDL_coreaudio.h */; };
+		DB313F7717554B71006C0E22 /* SDL_audio_c.h in Headers */ = {isa = PBXBuildFile; fileRef = 04BDFDB512E6671700899322 /* SDL_audio_c.h */; };
+		DB313F7817554B71006C0E22 /* SDL_audiodev_c.h in Headers */ = {isa = PBXBuildFile; fileRef = 04BDFDB812E6671700899322 /* SDL_audiodev_c.h */; };
+		DB313F7917554B71006C0E22 /* SDL_audiomem.h in Headers */ = {isa = PBXBuildFile; fileRef = 04BDFDB912E6671700899322 /* SDL_audiomem.h */; };
+		DB313F7A17554B71006C0E22 /* SDL_sysaudio.h in Headers */ = {isa = PBXBuildFile; fileRef = 04BDFDC212E6671700899322 /* SDL_sysaudio.h */; };
+		DB313F7B17554B71006C0E22 /* SDL_wave.h in Headers */ = {isa = PBXBuildFile; fileRef = 04BDFDC412E6671700899322 /* SDL_wave.h */; };
+		DB313F7C17554B71006C0E22 /* blank_cursor.h in Headers */ = {isa = PBXBuildFile; fileRef = 04BDFDD612E6671700899322 /* blank_cursor.h */; };
+		DB313F7D17554B71006C0E22 /* default_cursor.h in Headers */ = {isa = PBXBuildFile; fileRef = 04BDFDD712E6671700899322 /* default_cursor.h */; };
+		DB313F7E17554B71006C0E22 /* scancodes_darwin.h in Headers */ = {isa = PBXBuildFile; fileRef = 04BDFDD812E6671700899322 /* scancodes_darwin.h */; };
+		DB313F7F17554B71006C0E22 /* scancodes_linux.h in Headers */ = {isa = PBXBuildFile; fileRef = 04BDFDD912E6671700899322 /* scancodes_linux.h */; };
+		DB313F8017554B71006C0E22 /* scancodes_xfree86.h in Headers */ = {isa = PBXBuildFile; fileRef = 04BDFDDB12E6671700899322 /* scancodes_xfree86.h */; };
+		DB313F8117554B71006C0E22 /* SDL_clipboardevents_c.h in Headers */ = {isa = PBXBuildFile; fileRef = 04BDFDDD12E6671700899322 /* SDL_clipboardevents_c.h */; };
+		DB313F8217554B71006C0E22 /* SDL_events_c.h in Headers */ = {isa = PBXBuildFile; fileRef = 04BDFDDF12E6671700899322 /* SDL_events_c.h */; };
+		DB313F8317554B71006C0E22 /* SDL_gesture_c.h in Headers */ = {isa = PBXBuildFile; fileRef = 04BDFDE112E6671700899322 /* SDL_gesture_c.h */; };
+		DB313F8417554B71006C0E22 /* SDL_keyboard_c.h in Headers */ = {isa = PBXBuildFile; fileRef = 04BDFDE312E6671700899322 /* SDL_keyboard_c.h */; };
+		DB313F8517554B71006C0E22 /* SDL_mouse_c.h in Headers */ = {isa = PBXBuildFile; fileRef = 04BDFDE512E6671700899322 /* SDL_mouse_c.h */; };
+		DB313F8617554B71006C0E22 /* SDL_sysevents.h in Headers */ = {isa = PBXBuildFile; fileRef = 04BDFDE712E6671700899322 /* SDL_sysevents.h */; };
+		DB313F8717554B71006C0E22 /* SDL_touch_c.h in Headers */ = {isa = PBXBuildFile; fileRef = 04BDFDE912E6671700899322 /* SDL_touch_c.h */; };
+		DB313F8817554B71006C0E22 /* SDL_windowevents_c.h in Headers */ = {isa = PBXBuildFile; fileRef = 04BDFDEB12E6671700899322 /* SDL_windowevents_c.h */; };
+		DB313F8917554B71006C0E22 /* SDL_rwopsbundlesupport.h in Headers */ = {isa = PBXBuildFile; fileRef = 04BDFDEE12E6671700899322 /* SDL_rwopsbundlesupport.h */; };
+		DB313F8A17554B71006C0E22 /* SDL_haptic_c.h in Headers */ = {isa = PBXBuildFile; fileRef = 04BDFDFB12E6671700899322 /* SDL_haptic_c.h */; };
+		DB313F8B17554B71006C0E22 /* SDL_syshaptic.h in Headers */ = {isa = PBXBuildFile; fileRef = 04BDFDFC12E6671700899322 /* SDL_syshaptic.h */; };
+		DB313F8C17554B71006C0E22 /* SDL_sysjoystick_c.h in Headers */ = {isa = PBXBuildFile; fileRef = 04BDFE0812E6671700899322 /* SDL_sysjoystick_c.h */; };
+		DB313F8D17554B71006C0E22 /* SDL_joystick_c.h in Headers */ = {isa = PBXBuildFile; fileRef = 04BDFE1712E6671700899322 /* SDL_joystick_c.h */; };
+		DB313F8E17554B71006C0E22 /* SDL_sysjoystick.h in Headers */ = {isa = PBXBuildFile; fileRef = 04BDFE1812E6671700899322 /* SDL_sysjoystick.h */; };
+		DB313F8F17554B71006C0E22 /* SDL_assert_c.h in Headers */ = {isa = PBXBuildFile; fileRef = 04BDFE5512E6671700899322 /* SDL_assert_c.h */; };
+		DB313F9017554B71006C0E22 /* SDL_error_c.h in Headers */ = {isa = PBXBuildFile; fileRef = 04BDFE5812E6671700899322 /* SDL_error_c.h */; };
+		DB313F9117554B71006C0E22 /* SDL_fatal.h in Headers */ = {isa = PBXBuildFile; fileRef = 04BDFE5B12E6671700899322 /* SDL_fatal.h */; };
+		DB313F9217554B71006C0E22 /* SDL_sysmutex_c.h in Headers */ = {isa = PBXBuildFile; fileRef = 04BDFE8012E6671800899322 /* SDL_sysmutex_c.h */; };
+		DB313F9317554B71006C0E22 /* SDL_systhread_c.h in Headers */ = {isa = PBXBuildFile; fileRef = 04BDFE8312E6671800899322 /* SDL_systhread_c.h */; };
+		DB313F9417554B71006C0E22 /* SDL_systhread.h in Headers */ = {isa = PBXBuildFile; fileRef = 04BDFE8B12E6671800899322 /* SDL_systhread.h */; };
+		DB313F9517554B71006C0E22 /* SDL_thread_c.h in Headers */ = {isa = PBXBuildFile; fileRef = 04BDFE8D12E6671800899322 /* SDL_thread_c.h */; };
+		DB313F9617554B71006C0E22 /* SDL_timer_c.h in Headers */ = {isa = PBXBuildFile; fileRef = 04BDFEA012E6671800899322 /* SDL_timer_c.h */; };
+		DB313F9717554B71006C0E22 /* SDL_cocoaclipboard.h in Headers */ = {isa = PBXBuildFile; fileRef = 04BDFEC212E6671800899322 /* SDL_cocoaclipboard.h */; };
+		DB313F9817554B71006C0E22 /* SDL_cocoaevents.h in Headers */ = {isa = PBXBuildFile; fileRef = 04BDFEC412E6671800899322 /* SDL_cocoaevents.h */; };
+		DB313F9917554B71006C0E22 /* SDL_cocoakeyboard.h in Headers */ = {isa = PBXBuildFile; fileRef = 04BDFEC612E6671800899322 /* SDL_cocoakeyboard.h */; };
+		DB313F9A17554B71006C0E22 /* SDL_cocoamodes.h in Headers */ = {isa = PBXBuildFile; fileRef = 04BDFEC812E6671800899322 /* SDL_cocoamodes.h */; };
+		DB313F9B17554B71006C0E22 /* SDL_cocoamouse.h in Headers */ = {isa = PBXBuildFile; fileRef = 04BDFECA12E6671800899322 /* SDL_cocoamouse.h */; };
+		DB313F9C17554B71006C0E22 /* SDL_cocoaopengl.h in Headers */ = {isa = PBXBuildFile; fileRef = 04BDFECC12E6671800899322 /* SDL_cocoaopengl.h */; };
+		DB313F9D17554B71006C0E22 /* SDL_cocoashape.h in Headers */ = {isa = PBXBuildFile; fileRef = 04BDFECE12E6671800899322 /* SDL_cocoashape.h */; };
+		DB313F9E17554B71006C0E22 /* SDL_cocoavideo.h in Headers */ = {isa = PBXBuildFile; fileRef = 04BDFED012E6671800899322 /* SDL_cocoavideo.h */; };
+		DB313F9F17554B71006C0E22 /* SDL_cocoawindow.h in Headers */ = {isa = PBXBuildFile; fileRef = 04BDFED212E6671800899322 /* SDL_cocoawindow.h */; };
+		DB313FA017554B71006C0E22 /* SDL_nullevents_c.h in Headers */ = {isa = PBXBuildFile; fileRef = 04BDFEE912E6671800899322 /* SDL_nullevents_c.h */; };
+		DB313FA117554B71006C0E22 /* SDL_nullvideo.h in Headers */ = {isa = PBXBuildFile; fileRef = 04BDFEED12E6671800899322 /* SDL_nullvideo.h */; };
+		DB313FA217554B71006C0E22 /* SDL_blit.h in Headers */ = {isa = PBXBuildFile; fileRef = 04BDFF4F12E6671800899322 /* SDL_blit.h */; };
+		DB313FA317554B71006C0E22 /* SDL_blit_auto.h in Headers */ = {isa = PBXBuildFile; fileRef = 04BDFF5412E6671800899322 /* SDL_blit_auto.h */; };
+		DB313FA417554B71006C0E22 /* SDL_blit_copy.h in Headers */ = {isa = PBXBuildFile; fileRef = 04BDFF5612E6671800899322 /* SDL_blit_copy.h */; };
+		DB313FA517554B71006C0E22 /* SDL_blit_slow.h in Headers */ = {isa = PBXBuildFile; fileRef = 04BDFF5912E6671800899322 /* SDL_blit_slow.h */; };
+		DB313FA617554B71006C0E22 /* SDL_pixels_c.h in Headers */ = {isa = PBXBuildFile; fileRef = 04BDFF6612E6671800899322 /* SDL_pixels_c.h */; };
+		DB313FA717554B71006C0E22 /* SDL_RLEaccel_c.h in Headers */ = {isa = PBXBuildFile; fileRef = 04BDFF7012E6671800899322 /* SDL_RLEaccel_c.h */; };
+		DB313FA817554B71006C0E22 /* SDL_shape_internals.h in Headers */ = {isa = PBXBuildFile; fileRef = 04BDFF7212E6671800899322 /* SDL_shape_internals.h */; };
+		DB313FA917554B71006C0E22 /* SDL_sysvideo.h in Headers */ = {isa = PBXBuildFile; fileRef = 04BDFF7512E6671800899322 /* SDL_sysvideo.h */; };
+		DB313FAA17554B71006C0E22 /* imKStoUCS.h in Headers */ = {isa = PBXBuildFile; fileRef = 04BDFFB912E6671800899322 /* imKStoUCS.h */; };
+		DB313FAB17554B71006C0E22 /* SDL_x11clipboard.h in Headers */ = {isa = PBXBuildFile; fileRef = 04BDFFBB12E6671800899322 /* SDL_x11clipboard.h */; };
+		DB313FAC17554B71006C0E22 /* SDL_x11dyn.h in Headers */ = {isa = PBXBuildFile; fileRef = 04BDFFBD12E6671800899322 /* SDL_x11dyn.h */; };
+		DB313FAD17554B71006C0E22 /* SDL_x11events.h in Headers */ = {isa = PBXBuildFile; fileRef = 04BDFFBF12E6671800899322 /* SDL_x11events.h */; };
+		DB313FAE17554B71006C0E22 /* SDL_x11keyboard.h in Headers */ = {isa = PBXBuildFile; fileRef = 04BDFFC312E6671800899322 /* SDL_x11keyboard.h */; };
+		DB313FAF17554B71006C0E22 /* SDL_x11modes.h in Headers */ = {isa = PBXBuildFile; fileRef = 04BDFFC512E6671800899322 /* SDL_x11modes.h */; };
+		DB313FB017554B71006C0E22 /* SDL_x11mouse.h in Headers */ = {isa = PBXBuildFile; fileRef = 04BDFFC712E6671800899322 /* SDL_x11mouse.h */; };
+		DB313FB117554B71006C0E22 /* SDL_x11opengl.h in Headers */ = {isa = PBXBuildFile; fileRef = 04BDFFC912E6671800899322 /* SDL_x11opengl.h */; };
+		DB313FB217554B71006C0E22 /* SDL_x11opengles.h in Headers */ = {isa = PBXBuildFile; fileRef = 04BDFFCB12E6671800899322 /* SDL_x11opengles.h */; };
+		DB313FB317554B71006C0E22 /* SDL_x11shape.h in Headers */ = {isa = PBXBuildFile; fileRef = 04BDFFCF12E6671800899322 /* SDL_x11shape.h */; };
+		DB313FB417554B71006C0E22 /* SDL_x11sym.h in Headers */ = {isa = PBXBuildFile; fileRef = 04BDFFD012E6671800899322 /* SDL_x11sym.h */; };
+		DB313FB517554B71006C0E22 /* SDL_x11touch.h in Headers */ = {isa = PBXBuildFile; fileRef = 04BDFFD212E6671800899322 /* SDL_x11touch.h */; };
+		DB313FB617554B71006C0E22 /* SDL_x11video.h in Headers */ = {isa = PBXBuildFile; fileRef = 04BDFFD412E6671800899322 /* SDL_x11video.h */; };
+		DB313FB717554B71006C0E22 /* SDL_x11window.h in Headers */ = {isa = PBXBuildFile; fileRef = 04BDFFD612E6671800899322 /* SDL_x11window.h */; };
+		DB313FB817554B71006C0E22 /* SDL_sysrender.h in Headers */ = {isa = PBXBuildFile; fileRef = 041B2C9F12FA0D680087D585 /* SDL_sysrender.h */; };
+		DB313FB917554B71006C0E22 /* mmx.h in Headers */ = {isa = PBXBuildFile; fileRef = 04409B8D12FA97ED00FB9AA8 /* mmx.h */; };
+		DB313FBA17554B71006C0E22 /* SDL_yuv_sw_c.h in Headers */ = {isa = PBXBuildFile; fileRef = 04409B8F12FA97ED00FB9AA8 /* SDL_yuv_sw_c.h */; };
+		DB313FBB17554B71006C0E22 /* SDL_nullframebuffer_c.h in Headers */ = {isa = PBXBuildFile; fileRef = 04F7803712FB748500FC43C0 /* SDL_nullframebuffer_c.h */; };
+		DB313FBC17554B71006C0E22 /* SDL_blendfillrect.h in Headers */ = {isa = PBXBuildFile; fileRef = 04F7803E12FB74A200FC43C0 /* SDL_blendfillrect.h */; };
+		DB313FBD17554B71006C0E22 /* SDL_blendline.h in Headers */ = {isa = PBXBuildFile; fileRef = 04F7804012FB74A200FC43C0 /* SDL_blendline.h */; };
+		DB313FBE17554B71006C0E22 /* SDL_blendpoint.h in Headers */ = {isa = PBXBuildFile; fileRef = 04F7804212FB74A200FC43C0 /* SDL_blendpoint.h */; };
+		DB313FBF17554B71006C0E22 /* SDL_draw.h in Headers */ = {isa = PBXBuildFile; fileRef = 04F7804312FB74A200FC43C0 /* SDL_draw.h */; };
+		DB313FC017554B71006C0E22 /* SDL_drawline.h in Headers */ = {isa = PBXBuildFile; fileRef = 04F7804512FB74A200FC43C0 /* SDL_drawline.h */; };
+		DB313FC117554B71006C0E22 /* SDL_drawpoint.h in Headers */ = {isa = PBXBuildFile; fileRef = 04F7804712FB74A200FC43C0 /* SDL_drawpoint.h */; };
+		DB313FC217554B71006C0E22 /* SDL_render_sw_c.h in Headers */ = {isa = PBXBuildFile; fileRef = 0442EC1A12FE1BCB004C9285 /* SDL_render_sw_c.h */; };
+		DB313FC317554B71006C0E22 /* SDL_x11framebuffer.h in Headers */ = {isa = PBXBuildFile; fileRef = 0442EC5912FE1C60004C9285 /* SDL_x11framebuffer.h */; };
+		DB313FC417554B71006C0E22 /* SDL_glfuncs.h in Headers */ = {isa = PBXBuildFile; fileRef = 04043BBA12FEB1BE0076DB1F /* SDL_glfuncs.h */; };
+		DB313FC517554B71006C0E22 /* SDL_shaders_gl.h in Headers */ = {isa = PBXBuildFile; fileRef = 0435673D1303160F00BA5428 /* SDL_shaders_gl.h */; };
+		DB313FC617554B71006C0E22 /* SDL_rotate.h in Headers */ = {isa = PBXBuildFile; fileRef = AA628AC9159367B7005138DD /* SDL_rotate.h */; };
+		DB313FC717554B71006C0E22 /* SDL_x11xinput2.h in Headers */ = {isa = PBXBuildFile; fileRef = AA628AD0159367F2005138DD /* SDL_x11xinput2.h */; };
+		DB313FC817554B71006C0E22 /* begin_code.h in Headers */ = {isa = PBXBuildFile; fileRef = AA7557C71595D4D800BBD41B /* begin_code.h */; };
+		DB313FC917554B71006C0E22 /* close_code.h in Headers */ = {isa = PBXBuildFile; fileRef = AA7557C81595D4D800BBD41B /* close_code.h */; };
+		DB313FCA17554B71006C0E22 /* SDL_assert.h in Headers */ = {isa = PBXBuildFile; fileRef = AA7557C91595D4D800BBD41B /* SDL_assert.h */; };
+		DB313FCB17554B71006C0E22 /* SDL_atomic.h in Headers */ = {isa = PBXBuildFile; fileRef = AA7557CA1595D4D800BBD41B /* SDL_atomic.h */; };
+		DB313FCC17554B71006C0E22 /* SDL_audio.h in Headers */ = {isa = PBXBuildFile; fileRef = AA7557CB1595D4D800BBD41B /* SDL_audio.h */; };
+		DB313FCD17554B71006C0E22 /* SDL_blendmode.h in Headers */ = {isa = PBXBuildFile; fileRef = AA7557CC1595D4D800BBD41B /* SDL_blendmode.h */; };
+		DB313FCE17554B71006C0E22 /* SDL_clipboard.h in Headers */ = {isa = PBXBuildFile; fileRef = AA7557CD1595D4D800BBD41B /* SDL_clipboard.h */; };
+		DB313FCF17554B71006C0E22 /* SDL_config_macosx.h in Headers */ = {isa = PBXBuildFile; fileRef = AA7557CE1595D4D800BBD41B /* SDL_config_macosx.h */; };
+		DB313FD017554B71006C0E22 /* SDL_config.h in Headers */ = {isa = PBXBuildFile; fileRef = AA7557CF1595D4D800BBD41B /* SDL_config.h */; };
+		DB313FD117554B71006C0E22 /* SDL_copying.h in Headers */ = {isa = PBXBuildFile; fileRef = AA7557D01595D4D800BBD41B /* SDL_copying.h */; };
+		DB313FD217554B71006C0E22 /* SDL_cpuinfo.h in Headers */ = {isa = PBXBuildFile; fileRef = AA7557D11595D4D800BBD41B /* SDL_cpuinfo.h */; };
+		DB313FD317554B71006C0E22 /* SDL_endian.h in Headers */ = {isa = PBXBuildFile; fileRef = AA7557D21595D4D800BBD41B /* SDL_endian.h */; };
+		DB313FD417554B71006C0E22 /* SDL_error.h in Headers */ = {isa = PBXBuildFile; fileRef = AA7557D31595D4D800BBD41B /* SDL_error.h */; };
+		DB313FD517554B71006C0E22 /* SDL_events.h in Headers */ = {isa = PBXBuildFile; fileRef = AA7557D41595D4D800BBD41B /* SDL_events.h */; };
+		DB313FD617554B71006C0E22 /* SDL_gesture.h in Headers */ = {isa = PBXBuildFile; fileRef = AA7557D51595D4D800BBD41B /* SDL_gesture.h */; };
+		DB313FD717554B71006C0E22 /* SDL_haptic.h in Headers */ = {isa = PBXBuildFile; fileRef = AA7557D61595D4D800BBD41B /* SDL_haptic.h */; };
+		DB313FD817554B71006C0E22 /* SDL_hints.h in Headers */ = {isa = PBXBuildFile; fileRef = AA7557D71595D4D800BBD41B /* SDL_hints.h */; };
+		DB313FD917554B71006C0E22 /* SDL_joystick.h in Headers */ = {isa = PBXBuildFile; fileRef = AA7557D91595D4D800BBD41B /* SDL_joystick.h */; };
+		DB313FDA17554B71006C0E22 /* SDL_keyboard.h in Headers */ = {isa = PBXBuildFile; fileRef = AA7557DA1595D4D800BBD41B /* SDL_keyboard.h */; };
+		DB313FDB17554B71006C0E22 /* SDL_keycode.h in Headers */ = {isa = PBXBuildFile; fileRef = AA7557DB1595D4D800BBD41B /* SDL_keycode.h */; };
+		DB313FDC17554B71006C0E22 /* SDL_loadso.h in Headers */ = {isa = PBXBuildFile; fileRef = AA7557DC1595D4D800BBD41B /* SDL_loadso.h */; };
+		DB313FDD17554B71006C0E22 /* SDL_log.h in Headers */ = {isa = PBXBuildFile; fileRef = AA7557DD1595D4D800BBD41B /* SDL_log.h */; };
+		DB313FDE17554B71006C0E22 /* SDL_main.h in Headers */ = {isa = PBXBuildFile; fileRef = AA7557DE1595D4D800BBD41B /* SDL_main.h */; };
+		DB313FDF17554B71006C0E22 /* SDL_mouse.h in Headers */ = {isa = PBXBuildFile; fileRef = AA7557DF1595D4D800BBD41B /* SDL_mouse.h */; };
+		DB313FE017554B71006C0E22 /* SDL_mutex.h in Headers */ = {isa = PBXBuildFile; fileRef = AA7557E01595D4D800BBD41B /* SDL_mutex.h */; };
+		DB313FE117554B71006C0E22 /* SDL_name.h in Headers */ = {isa = PBXBuildFile; fileRef = AA7557E11595D4D800BBD41B /* SDL_name.h */; };
+		DB313FE217554B71006C0E22 /* SDL_opengl.h in Headers */ = {isa = PBXBuildFile; fileRef = AA7557E21595D4D800BBD41B /* SDL_opengl.h */; };
+		DB313FE317554B71006C0E22 /* SDL_opengles.h in Headers */ = {isa = PBXBuildFile; fileRef = AA7557E31595D4D800BBD41B /* SDL_opengles.h */; };
+		DB313FE417554B71006C0E22 /* SDL_opengles2.h in Headers */ = {isa = PBXBuildFile; fileRef = AA7557E41595D4D800BBD41B /* SDL_opengles2.h */; };
+		DB313FE517554B71006C0E22 /* SDL_pixels.h in Headers */ = {isa = PBXBuildFile; fileRef = AA7557E51595D4D800BBD41B /* SDL_pixels.h */; };
+		DB313FE617554B71006C0E22 /* SDL_platform.h in Headers */ = {isa = PBXBuildFile; fileRef = AA7557E61595D4D800BBD41B /* SDL_platform.h */; };
+		DB313FE717554B71006C0E22 /* SDL_power.h in Headers */ = {isa = PBXBuildFile; fileRef = AA7557E71595D4D800BBD41B /* SDL_power.h */; };
+		DB313FE817554B71006C0E22 /* SDL_quit.h in Headers */ = {isa = PBXBuildFile; fileRef = AA7557E81595D4D800BBD41B /* SDL_quit.h */; };
+		DB313FE917554B71006C0E22 /* SDL_rect.h in Headers */ = {isa = PBXBuildFile; fileRef = AA7557E91595D4D800BBD41B /* SDL_rect.h */; };
+		DB313FEA17554B71006C0E22 /* SDL_render.h in Headers */ = {isa = PBXBuildFile; fileRef = AA7557EA1595D4D800BBD41B /* SDL_render.h */; };
+		DB313FEB17554B71006C0E22 /* SDL_revision.h in Headers */ = {isa = PBXBuildFile; fileRef = AA7557EB1595D4D800BBD41B /* SDL_revision.h */; };
+		DB313FEC17554B71006C0E22 /* SDL_rwops.h in Headers */ = {isa = PBXBuildFile; fileRef = AA7557EC1595D4D800BBD41B /* SDL_rwops.h */; };
+		DB313FED17554B71006C0E22 /* SDL_scancode.h in Headers */ = {isa = PBXBuildFile; fileRef = AA7557ED1595D4D800BBD41B /* SDL_scancode.h */; };
+		DB313FEE17554B71006C0E22 /* SDL_shape.h in Headers */ = {isa = PBXBuildFile; fileRef = AA7557EE1595D4D800BBD41B /* SDL_shape.h */; };
+		DB313FEF17554B71006C0E22 /* SDL_stdinc.h in Headers */ = {isa = PBXBuildFile; fileRef = AA7557EF1595D4D800BBD41B /* SDL_stdinc.h */; };
+		DB313FF017554B71006C0E22 /* SDL_surface.h in Headers */ = {isa = PBXBuildFile; fileRef = AA7557F01595D4D800BBD41B /* SDL_surface.h */; };
+		DB313FF117554B71006C0E22 /* SDL_system.h in Headers */ = {isa = PBXBuildFile; fileRef = AA7557F11595D4D800BBD41B /* SDL_system.h */; };
+		DB313FF217554B71006C0E22 /* SDL_syswm.h in Headers */ = {isa = PBXBuildFile; fileRef = AA7557F21595D4D800BBD41B /* SDL_syswm.h */; };
+		DB313FF317554B71006C0E22 /* SDL_thread.h in Headers */ = {isa = PBXBuildFile; fileRef = AA7557F31595D4D800BBD41B /* SDL_thread.h */; };
+		DB313FF417554B71006C0E22 /* SDL_timer.h in Headers */ = {isa = PBXBuildFile; fileRef = AA7557F41595D4D800BBD41B /* SDL_timer.h */; };
+		DB313FF517554B71006C0E22 /* SDL_touch.h in Headers */ = {isa = PBXBuildFile; fileRef = AA7557F51595D4D800BBD41B /* SDL_touch.h */; };
+		DB313FF617554B71006C0E22 /* SDL_types.h in Headers */ = {isa = PBXBuildFile; fileRef = AA7557F61595D4D800BBD41B /* SDL_types.h */; };
+		DB313FF717554B71006C0E22 /* SDL_version.h in Headers */ = {isa = PBXBuildFile; fileRef = AA7557F71595D4D800BBD41B /* SDL_version.h */; };
+		DB313FF817554B71006C0E22 /* SDL_video.h in Headers */ = {isa = PBXBuildFile; fileRef = AA7557F81595D4D800BBD41B /* SDL_video.h */; };
+		DB313FF917554B71006C0E22 /* SDL.h in Headers */ = {isa = PBXBuildFile; fileRef = AA7557F91595D4D800BBD41B /* SDL.h */; };
+		DB313FFA17554B71006C0E22 /* SDL_cocoamessagebox.h in Headers */ = {isa = PBXBuildFile; fileRef = AABCC38B164063D200AB8930 /* SDL_cocoamessagebox.h */; };
+		DB313FFB17554B71006C0E22 /* SDL_gamecontroller.h in Headers */ = {isa = PBXBuildFile; fileRef = A77E6EB3167AB0A90010E40B /* SDL_gamecontroller.h */; };
+		DB313FFC17554B71006C0E22 /* SDL_bits.h in Headers */ = {isa = PBXBuildFile; fileRef = AADA5B8616CCAB3000107CF7 /* SDL_bits.h */; };
+		DB313FFE17554B71006C0E22 /* SDL_atomic.c in Sources */ = {isa = PBXBuildFile; fileRef = 04BDFD7412E6671700899322 /* SDL_atomic.c */; };
+		DB313FFF17554B71006C0E22 /* SDL_spinlock.c in Sources */ = {isa = PBXBuildFile; fileRef = 04BDFD7512E6671700899322 /* SDL_spinlock.c */; };
+		DB31400017554B71006C0E22 /* SDL_diskaudio.c in Sources */ = {isa = PBXBuildFile; fileRef = 04BDFD8812E6671700899322 /* SDL_diskaudio.c */; };
+		DB31400117554B71006C0E22 /* SDL_dummyaudio.c in Sources */ = {isa = PBXBuildFile; fileRef = 04BDFD9412E6671700899322 /* SDL_dummyaudio.c */; };
+		DB31400217554B71006C0E22 /* SDL_coreaudio.c in Sources */ = {isa = PBXBuildFile; fileRef = 04BDFDA012E6671700899322 /* SDL_coreaudio.c */; };
+		DB31400317554B71006C0E22 /* SDL_audio.c in Sources */ = {isa = PBXBuildFile; fileRef = 04BDFDB412E6671700899322 /* SDL_audio.c */; };
+		DB31400417554B71006C0E22 /* SDL_audiocvt.c in Sources */ = {isa = PBXBuildFile; fileRef = 04BDFDB612E6671700899322 /* SDL_audiocvt.c */; };
+		DB31400517554B71006C0E22 /* SDL_audiodev.c in Sources */ = {isa = PBXBuildFile; fileRef = 04BDFDB712E6671700899322 /* SDL_audiodev.c */; };
+		DB31400617554B71006C0E22 /* SDL_audiotypecvt.c in Sources */ = {isa = PBXBuildFile; fileRef = 04BDFDBA12E6671700899322 /* SDL_audiotypecvt.c */; };
+		DB31400717554B71006C0E22 /* SDL_mixer.c in Sources */ = {isa = PBXBuildFile; fileRef = 04BDFDBB12E6671700899322 /* SDL_mixer.c */; };
+		DB31400817554B71006C0E22 /* SDL_wave.c in Sources */ = {isa = PBXBuildFile; fileRef = 04BDFDC312E6671700899322 /* SDL_wave.c */; };
+		DB31400917554B71006C0E22 /* SDL_cpuinfo.c in Sources */ = {isa = PBXBuildFile; fileRef = 04BDFDD412E6671700899322 /* SDL_cpuinfo.c */; };
+		DB31400A17554B71006C0E22 /* SDL_clipboardevents.c in Sources */ = {isa = PBXBuildFile; fileRef = 04BDFDDC12E6671700899322 /* SDL_clipboardevents.c */; };
+		DB31400B17554B71006C0E22 /* SDL_events.c in Sources */ = {isa = PBXBuildFile; fileRef = 04BDFDDE12E6671700899322 /* SDL_events.c */; };
+		DB31400C17554B71006C0E22 /* SDL_dropevents.c in Sources */ = {isa = PBXBuildFile; fileRef = 566CDE8E148F0AC200C5A9BB /* SDL_dropevents.c */; };
+		DB31400D17554B71006C0E22 /* SDL_gesture.c in Sources */ = {isa = PBXBuildFile; fileRef = 04BDFDE012E6671700899322 /* SDL_gesture.c */; };
+		DB31400E17554B71006C0E22 /* SDL_keyboard.c in Sources */ = {isa = PBXBuildFile; fileRef = 04BDFDE212E6671700899322 /* SDL_keyboard.c */; };
+		DB31400F17554B71006C0E22 /* SDL_mouse.c in Sources */ = {isa = PBXBuildFile; fileRef = 04BDFDE412E6671700899322 /* SDL_mouse.c */; };
+		DB31401017554B71006C0E22 /* SDL_quit.c in Sources */ = {isa = PBXBuildFile; fileRef = 04BDFDE612E6671700899322 /* SDL_quit.c */; };
+		DB31401117554B71006C0E22 /* SDL_touch.c in Sources */ = {isa = PBXBuildFile; fileRef = 04BDFDE812E6671700899322 /* SDL_touch.c */; };
+		DB31401217554B71006C0E22 /* SDL_windowevents.c in Sources */ = {isa = PBXBuildFile; fileRef = 04BDFDEA12E6671700899322 /* SDL_windowevents.c */; };
+		DB31401317554B71006C0E22 /* SDL_rwopsbundlesupport.m in Sources */ = {isa = PBXBuildFile; fileRef = 04BDFDEF12E6671700899322 /* SDL_rwopsbundlesupport.m */; };
+		DB31401417554B71006C0E22 /* SDL_rwops.c in Sources */ = {isa = PBXBuildFile; fileRef = 04BDFDF012E6671700899322 /* SDL_rwops.c */; };
+		DB31401517554B71006C0E22 /* SDL_syshaptic.c in Sources */ = {isa = PBXBuildFile; fileRef = 04BDFDF312E6671700899322 /* SDL_syshaptic.c */; };
+		DB31401617554B71006C0E22 /* SDL_haptic.c in Sources */ = {isa = PBXBuildFile; fileRef = 04BDFDFA12E6671700899322 /* SDL_haptic.c */; };
+		DB31401717554B71006C0E22 /* SDL_sysjoystick.c in Sources */ = {isa = PBXBuildFile; fileRef = 04BDFE0712E6671700899322 /* SDL_sysjoystick.c */; };
+		DB31401817554B71006C0E22 /* SDL_gamecontroller.c in Sources */ = {isa = PBXBuildFile; fileRef = BBFC088A164C6514003E6A99 /* SDL_gamecontroller.c */; };
+		DB31401917554B71006C0E22 /* SDL_joystick.c in Sources */ = {isa = PBXBuildFile; fileRef = 04BDFE1612E6671700899322 /* SDL_joystick.c */; };
+		DB31401A17554B71006C0E22 /* SDL_sysloadso.c in Sources */ = {isa = PBXBuildFile; fileRef = 04BDFE3312E6671700899322 /* SDL_sysloadso.c */; };
+		DB31401B17554B71006C0E22 /* SDL_syspower.c in Sources */ = {isa = PBXBuildFile; fileRef = 04BDFE4B12E6671700899322 /* SDL_syspower.c */; };
+		DB31401C17554B71006C0E22 /* SDL_power.c in Sources */ = {isa = PBXBuildFile; fileRef = 04BDFE4E12E6671700899322 /* SDL_power.c */; };
+		DB31401D17554B71006C0E22 /* SDL_assert.c in Sources */ = {isa = PBXBuildFile; fileRef = 04BDFE5612E6671700899322 /* SDL_assert.c */; };
+		DB31401E17554B71006C0E22 /* SDL_error.c in Sources */ = {isa = PBXBuildFile; fileRef = 04BDFE5912E6671700899322 /* SDL_error.c */; };
+		DB31401F17554B71006C0E22 /* SDL_fatal.c in Sources */ = {isa = PBXBuildFile; fileRef = 04BDFE5A12E6671700899322 /* SDL_fatal.c */; };
+		DB31402017554B71006C0E22 /* SDL.c in Sources */ = {isa = PBXBuildFile; fileRef = 04BDFE5C12E6671700899322 /* SDL.c */; };
+		DB31402117554B71006C0E22 /* SDL_getenv.c in Sources */ = {isa = PBXBuildFile; fileRef = 04BDFE5E12E6671700899322 /* SDL_getenv.c */; };
+		DB31402217554B71006C0E22 /* SDL_iconv.c in Sources */ = {isa = PBXBuildFile; fileRef = 04BDFE5F12E6671700899322 /* SDL_iconv.c */; };
+		DB31402317554B71006C0E22 /* SDL_malloc.c in Sources */ = {isa = PBXBuildFile; fileRef = 04BDFE6012E6671700899322 /* SDL_malloc.c */; };
+		DB31402417554B71006C0E22 /* SDL_qsort.c in Sources */ = {isa = PBXBuildFile; fileRef = 04BDFE6112E6671700899322 /* SDL_qsort.c */; };
+		DB31402517554B71006C0E22 /* SDL_stdlib.c in Sources */ = {isa = PBXBuildFile; fileRef = 04BDFE6212E6671700899322 /* SDL_stdlib.c */; };
+		DB31402617554B71006C0E22 /* SDL_string.c in Sources */ = {isa = PBXBuildFile; fileRef = 04BDFE6312E6671700899322 /* SDL_string.c */; };
+		DB31402717554B71006C0E22 /* SDL_syscond.c in Sources */ = {isa = PBXBuildFile; fileRef = 04BDFE7E12E6671800899322 /* SDL_syscond.c */; };
+		DB31402817554B71006C0E22 /* SDL_sysmutex.c in Sources */ = {isa = PBXBuildFile; fileRef = 04BDFE7F12E6671800899322 /* SDL_sysmutex.c */; };
+		DB31402917554B71006C0E22 /* SDL_syssem.c in Sources */ = {isa = PBXBuildFile; fileRef = 04BDFE8112E6671800899322 /* SDL_syssem.c */; };
+		DB31402A17554B71006C0E22 /* SDL_systhread.c in Sources */ = {isa = PBXBuildFile; fileRef = 04BDFE8212E6671800899322 /* SDL_systhread.c */; };
+		DB31402B17554B71006C0E22 /* SDL_thread.c in Sources */ = {isa = PBXBuildFile; fileRef = 04BDFE8C12E6671800899322 /* SDL_thread.c */; };
+		DB31402C17554B71006C0E22 /* SDL_timer.c in Sources */ = {isa = PBXBuildFile; fileRef = 04BDFE9F12E6671800899322 /* SDL_timer.c */; };
+		DB31402D17554B71006C0E22 /* SDL_systimer.c in Sources */ = {isa = PBXBuildFile; fileRef = 04BDFEA212E6671800899322 /* SDL_systimer.c */; };
+		DB31402E17554B71006C0E22 /* SDL_cocoaclipboard.m in Sources */ = {isa = PBXBuildFile; fileRef = 04BDFEC312E6671800899322 /* SDL_cocoaclipboard.m */; };
+		DB31402F17554B71006C0E22 /* SDL_cocoaevents.m in Sources */ = {isa = PBXBuildFile; fileRef = 04BDFEC512E6671800899322 /* SDL_cocoaevents.m */; };
+		DB31403017554B71006C0E22 /* SDL_cocoakeyboard.m in Sources */ = {isa = PBXBuildFile; fileRef = 04BDFEC712E6671800899322 /* SDL_cocoakeyboard.m */; };
+		DB31403117554B71006C0E22 /* SDL_cocoamodes.m in Sources */ = {isa = PBXBuildFile; fileRef = 04BDFEC912E6671800899322 /* SDL_cocoamodes.m */; };
+		DB31403217554B71006C0E22 /* SDL_cocoamouse.m in Sources */ = {isa = PBXBuildFile; fileRef = 04BDFECB12E6671800899322 /* SDL_cocoamouse.m */; };
+		DB31403317554B71006C0E22 /* SDL_cocoaopengl.m in Sources */ = {isa = PBXBuildFile; fileRef = 04BDFECD12E6671800899322 /* SDL_cocoaopengl.m */; };
+		DB31403417554B71006C0E22 /* SDL_cocoashape.m in Sources */ = {isa = PBXBuildFile; fileRef = 04BDFECF12E6671800899322 /* SDL_cocoashape.m */; };
+		DB31403517554B71006C0E22 /* SDL_cocoavideo.m in Sources */ = {isa = PBXBuildFile; fileRef = 04BDFED112E6671800899322 /* SDL_cocoavideo.m */; };
+		DB31403617554B71006C0E22 /* SDL_cocoawindow.m in Sources */ = {isa = PBXBuildFile; fileRef = 04BDFED312E6671800899322 /* SDL_cocoawindow.m */; };
+		DB31403717554B71006C0E22 /* SDL_nullevents.c in Sources */ = {isa = PBXBuildFile; fileRef = 04BDFEE812E6671800899322 /* SDL_nullevents.c */; };
+		DB31403817554B71006C0E22 /* SDL_nullvideo.c in Sources */ = {isa = PBXBuildFile; fileRef = 04BDFEEC12E6671800899322 /* SDL_nullvideo.c */; };
+		DB31403917554B71006C0E22 /* SDL_blit.c in Sources */ = {isa = PBXBuildFile; fileRef = 04BDFF4E12E6671800899322 /* SDL_blit.c */; };
+		DB31403A17554B71006C0E22 /* SDL_blit_0.c in Sources */ = {isa = PBXBuildFile; fileRef = 04BDFF5012E6671800899322 /* SDL_blit_0.c */; };
+		DB31403B17554B71006C0E22 /* SDL_blit_1.c in Sources */ = {isa = PBXBuildFile; fileRef = 04BDFF5112E6671800899322 /* SDL_blit_1.c */; };
+		DB31403C17554B71006C0E22 /* SDL_blit_A.c in Sources */ = {isa = PBXBuildFile; fileRef = 04BDFF5212E6671800899322 /* SDL_blit_A.c */; };
+		DB31403D17554B71006C0E22 /* SDL_blit_auto.c in Sources */ = {isa = PBXBuildFile; fileRef = 04BDFF5312E6671800899322 /* SDL_blit_auto.c */; };
+		DB31403E17554B71006C0E22 /* SDL_blit_copy.c in Sources */ = {isa = PBXBuildFile; fileRef = 04BDFF5512E6671800899322 /* SDL_blit_copy.c */; };
+		DB31403F17554B71006C0E22 /* SDL_blit_N.c in Sources */ = {isa = PBXBuildFile; fileRef = 04BDFF5712E6671800899322 /* SDL_blit_N.c */; };
+		DB31404017554B71006C0E22 /* SDL_blit_slow.c in Sources */ = {isa = PBXBuildFile; fileRef = 04BDFF5812E6671800899322 /* SDL_blit_slow.c */; };
+		DB31404117554B71006C0E22 /* SDL_bmp.c in Sources */ = {isa = PBXBuildFile; fileRef = 04BDFF5A12E6671800899322 /* SDL_bmp.c */; };
+		DB31404217554B71006C0E22 /* SDL_clipboard.c in Sources */ = {isa = PBXBuildFile; fileRef = 04BDFF5B12E6671800899322 /* SDL_clipboard.c */; };
+		DB31404317554B71006C0E22 /* SDL_fillrect.c in Sources */ = {isa = PBXBuildFile; fileRef = 04BDFF6012E6671800899322 /* SDL_fillrect.c */; };
+		DB31404417554B71006C0E22 /* SDL_pixels.c in Sources */ = {isa = PBXBuildFile; fileRef = 04BDFF6512E6671800899322 /* SDL_pixels.c */; };
+		DB31404517554B71006C0E22 /* SDL_rect.c in Sources */ = {isa = PBXBuildFile; fileRef = 04BDFF6712E6671800899322 /* SDL_rect.c */; };
+		DB31404617554B71006C0E22 /* SDL_RLEaccel.c in Sources */ = {isa = PBXBuildFile; fileRef = 04BDFF6F12E6671800899322 /* SDL_RLEaccel.c */; };
+		DB31404717554B71006C0E22 /* SDL_shape.c in Sources */ = {isa = PBXBuildFile; fileRef = 04BDFF7112E6671800899322 /* SDL_shape.c */; };
+		DB31404817554B71006C0E22 /* SDL_stretch.c in Sources */ = {isa = PBXBuildFile; fileRef = 04BDFF7312E6671800899322 /* SDL_stretch.c */; };
+		DB31404917554B71006C0E22 /* SDL_surface.c in Sources */ = {isa = PBXBuildFile; fileRef = 04BDFF7412E6671800899322 /* SDL_surface.c */; };
+		DB31404A17554B71006C0E22 /* SDL_video.c in Sources */ = {isa = PBXBuildFile; fileRef = 04BDFF7612E6671800899322 /* SDL_video.c */; };
+		DB31404B17554B71006C0E22 /* imKStoUCS.c in Sources */ = {isa = PBXBuildFile; fileRef = 04BDFFB812E6671800899322 /* imKStoUCS.c */; };
+		DB31404C17554B71006C0E22 /* SDL_x11clipboard.c in Sources */ = {isa = PBXBuildFile; fileRef = 04BDFFBA12E6671800899322 /* SDL_x11clipboard.c */; };
+		DB31404D17554B71006C0E22 /* SDL_x11dyn.c in Sources */ = {isa = PBXBuildFile; fileRef = 04BDFFBC12E6671800899322 /* SDL_x11dyn.c */; };
+		DB31404E17554B71006C0E22 /* SDL_x11events.c in Sources */ = {isa = PBXBuildFile; fileRef = 04BDFFBE12E6671800899322 /* SDL_x11events.c */; };
+		DB31404F17554B71006C0E22 /* SDL_x11keyboard.c in Sources */ = {isa = PBXBuildFile; fileRef = 04BDFFC212E6671800899322 /* SDL_x11keyboard.c */; };
+		DB31405017554B71006C0E22 /* SDL_x11modes.c in Sources */ = {isa = PBXBuildFile; fileRef = 04BDFFC412E6671800899322 /* SDL_x11modes.c */; };
+		DB31405117554B71006C0E22 /* SDL_x11mouse.c in Sources */ = {isa = PBXBuildFile; fileRef = 04BDFFC612E6671800899322 /* SDL_x11mouse.c */; };
+		DB31405217554B71006C0E22 /* SDL_x11opengl.c in Sources */ = {isa = PBXBuildFile; fileRef = 04BDFFC812E6671800899322 /* SDL_x11opengl.c */; };
+		DB31405317554B71006C0E22 /* SDL_x11opengles.c in Sources */ = {isa = PBXBuildFile; fileRef = 04BDFFCA12E6671800899322 /* SDL_x11opengles.c */; };
+		DB31405417554B71006C0E22 /* SDL_x11shape.c in Sources */ = {isa = PBXBuildFile; fileRef = 04BDFFCE12E6671800899322 /* SDL_x11shape.c */; };
+		DB31405517554B71006C0E22 /* SDL_x11touch.c in Sources */ = {isa = PBXBuildFile; fileRef = 04BDFFD112E6671800899322 /* SDL_x11touch.c */; };
+		DB31405617554B71006C0E22 /* SDL_x11video.c in Sources */ = {isa = PBXBuildFile; fileRef = 04BDFFD312E6671800899322 /* SDL_x11video.c */; };
+		DB31405717554B71006C0E22 /* SDL_x11window.c in Sources */ = {isa = PBXBuildFile; fileRef = 04BDFFD512E6671800899322 /* SDL_x11window.c */; };
+		DB31405817554B71006C0E22 /* SDL_render.c in Sources */ = {isa = PBXBuildFile; fileRef = 041B2C9E12FA0D680087D585 /* SDL_render.c */; };
+		DB31405917554B71006C0E22 /* SDL_yuv_mmx.c in Sources */ = {isa = PBXBuildFile; fileRef = 04409B8E12FA97ED00FB9AA8 /* SDL_yuv_mmx.c */; };
+		DB31405A17554B71006C0E22 /* SDL_yuv_sw.c in Sources */ = {isa = PBXBuildFile; fileRef = 04409B9012FA97ED00FB9AA8 /* SDL_yuv_sw.c */; };
+		DB31405B17554B71006C0E22 /* SDL_nullframebuffer.c in Sources */ = {isa = PBXBuildFile; fileRef = 04F7803812FB748500FC43C0 /* SDL_nullframebuffer.c */; };
+		DB31405C17554B71006C0E22 /* SDL_blendfillrect.c in Sources */ = {isa = PBXBuildFile; fileRef = 04F7803D12FB74A200FC43C0 /* SDL_blendfillrect.c */; };
+		DB31405D17554B71006C0E22 /* SDL_blendline.c in Sources */ = {isa = PBXBuildFile; fileRef = 04F7803F12FB74A200FC43C0 /* SDL_blendline.c */; };
+		DB31405E17554B71006C0E22 /* SDL_blendpoint.c in Sources */ = {isa = PBXBuildFile; fileRef = 04F7804112FB74A200FC43C0 /* SDL_blendpoint.c */; };
+		DB31405F17554B71006C0E22 /* SDL_drawline.c in Sources */ = {isa = PBXBuildFile; fileRef = 04F7804412FB74A200FC43C0 /* SDL_drawline.c */; };
+		DB31406017554B71006C0E22 /* SDL_drawpoint.c in Sources */ = {isa = PBXBuildFile; fileRef = 04F7804612FB74A200FC43C0 /* SDL_drawpoint.c */; };
+		DB31406117554B71006C0E22 /* SDL_render_gl.c in Sources */ = {isa = PBXBuildFile; fileRef = 0442EC1712FE1BBA004C9285 /* SDL_render_gl.c */; };
+		DB31406217554B71006C0E22 /* SDL_render_sw.c in Sources */ = {isa = PBXBuildFile; fileRef = 0442EC1B12FE1BCB004C9285 /* SDL_render_sw.c */; };
+		DB31406317554B71006C0E22 /* SDL_x11framebuffer.c in Sources */ = {isa = PBXBuildFile; fileRef = 0442EC5812FE1C60004C9285 /* SDL_x11framebuffer.c */; };
+		DB31406417554B71006C0E22 /* SDL_hints.c in Sources */ = {isa = PBXBuildFile; fileRef = 0442EC5E12FE1C75004C9285 /* SDL_hints.c */; };
+		DB31406517554B71006C0E22 /* SDL_log.c in Sources */ = {isa = PBXBuildFile; fileRef = 04BAC0C71300C2160055DE28 /* SDL_log.c */; };
+		DB31406617554B71006C0E22 /* SDL_shaders_gl.c in Sources */ = {isa = PBXBuildFile; fileRef = 0435673C1303160F00BA5428 /* SDL_shaders_gl.c */; };
+		DB31406717554B71006C0E22 /* SDL_rotate.c in Sources */ = {isa = PBXBuildFile; fileRef = AA628AC8159367B7005138DD /* SDL_rotate.c */; };
+		DB31406817554B71006C0E22 /* SDL_x11xinput2.c in Sources */ = {isa = PBXBuildFile; fileRef = AA628ACF159367F2005138DD /* SDL_x11xinput2.c */; };
+		DB31406917554B71006C0E22 /* SDL_x11messagebox.c in Sources */ = {isa = PBXBuildFile; fileRef = AA9E4092163BE51E007A2AD0 /* SDL_x11messagebox.c */; };
+		DB31406A17554B71006C0E22 /* SDL_cocoamessagebox.m in Sources */ = {isa = PBXBuildFile; fileRef = AABCC38C164063D200AB8930 /* SDL_cocoamessagebox.m */; };
+		DB31406C17554B71006C0E22 /* AudioToolbox.framework in Frameworks */ = {isa = PBXBuildFile; fileRef = 0073179B0858DECD00B2BC32 /* AudioToolbox.framework */; };
+		DB31406D17554B71006C0E22 /* AudioUnit.framework in Frameworks */ = {isa = PBXBuildFile; fileRef = 0073179C0858DECD00B2BC32 /* AudioUnit.framework */; };
+		DB31406E17554B71006C0E22 /* Cocoa.framework in Frameworks */ = {isa = PBXBuildFile; fileRef = 0073179D0858DECD00B2BC32 /* Cocoa.framework */; };
+		DB31406F17554B71006C0E22 /* CoreAudio.framework in Frameworks */ = {isa = PBXBuildFile; fileRef = 0073179E0858DECD00B2BC32 /* CoreAudio.framework */; };
+		DB31407017554B71006C0E22 /* IOKit.framework in Frameworks */ = {isa = PBXBuildFile; fileRef = 0073179F0858DECD00B2BC32 /* IOKit.framework */; };
+		DB31407117554B71006C0E22 /* OpenGL.framework in Frameworks */ = {isa = PBXBuildFile; fileRef = 007317A00858DECD00B2BC32 /* OpenGL.framework */; };
+		DB31407217554B71006C0E22 /* Carbon.framework in Frameworks */ = {isa = PBXBuildFile; fileRef = 007317C10858E15000B2BC32 /* Carbon.framework */; };
+		DB31408B17554D37006C0E22 /* ForceFeedback.framework in Frameworks */ = {isa = PBXBuildFile; fileRef = 00CFA89C106B4BA100758660 /* ForceFeedback.framework */; };
+		DB31408D17554D3C006C0E22 /* ForceFeedback.framework in Frameworks */ = {isa = PBXBuildFile; fileRef = 00CFA89C106B4BA100758660 /* ForceFeedback.framework */; };
 /* End PBXBuildFile section */
 
 /* Begin PBXContainerItemProxy section */
@@ -815,6 +1070,7 @@
 		BECDF6B30761BA81005FE872 /* libSDL2.a */ = {isa = PBXFileReference; explicitFileType = archive.ar; includeInIndex = 0; path = libSDL2.a; sourceTree = BUILT_PRODUCTS_DIR; };
 		BECDF6BE0761BA81005FE872 /* Standard DMG */ = {isa = PBXFileReference; explicitFileType = "compiled.mach-o.executable"; includeInIndex = 0; path = "Standard DMG"; sourceTree = BUILT_PRODUCTS_DIR; };
 		BECDF6C30761BA81005FE872 /* Developer Extras Package */ = {isa = PBXFileReference; explicitFileType = "compiled.mach-o.executable"; includeInIndex = 0; path = "Developer Extras Package"; sourceTree = BUILT_PRODUCTS_DIR; };
+		DB31407717554B71006C0E22 /* libSDL2.dylib */ = {isa = PBXFileReference; explicitFileType = "compiled.mach-o.dylib"; includeInIndex = 0; path = libSDL2.dylib; sourceTree = BUILT_PRODUCTS_DIR; };
 		F59C70FF00D5CB5801000001 /* ReadMe.txt */ = {isa = PBXFileReference; fileEncoding = 30; lastKnownFileType = text; path = ReadMe.txt; sourceTree = ""; };
 		F59C710000D5CB5801000001 /* Welcome.txt */ = {isa = PBXFileReference; fileEncoding = 30; lastKnownFileType = text; path = Welcome.txt; sourceTree = ""; };
 		F59C710300D5CB5801000001 /* ReadMe.txt */ = {isa = PBXFileReference; fileEncoding = 30; lastKnownFileType = text; path = ReadMe.txt; sourceTree = ""; };
@@ -854,6 +1110,22 @@
 				007317AD0858DECD00B2BC32 /* IOKit.framework in Frameworks */,
 				007317AE0858DECD00B2BC32 /* OpenGL.framework in Frameworks */,
 				007317C30858E15000B2BC32 /* Carbon.framework in Frameworks */,
+				DB31408B17554D37006C0E22 /* ForceFeedback.framework in Frameworks */,
+			);
+			runOnlyForDeploymentPostprocessing = 0;
+		};
+		DB31406B17554B71006C0E22 /* Frameworks */ = {
+			isa = PBXFrameworksBuildPhase;
+			buildActionMask = 2147483647;
+			files = (
+				DB31406C17554B71006C0E22 /* AudioToolbox.framework in Frameworks */,
+				DB31406D17554B71006C0E22 /* AudioUnit.framework in Frameworks */,
+				DB31406E17554B71006C0E22 /* Cocoa.framework in Frameworks */,
+				DB31406F17554B71006C0E22 /* CoreAudio.framework in Frameworks */,
+				DB31407017554B71006C0E22 /* IOKit.framework in Frameworks */,
+				DB31407117554B71006C0E22 /* OpenGL.framework in Frameworks */,
+				DB31407217554B71006C0E22 /* Carbon.framework in Frameworks */,
+				DB31408D17554D3C006C0E22 /* ForceFeedback.framework in Frameworks */,
 			);
 			runOnlyForDeploymentPostprocessing = 0;
 		};
@@ -929,6 +1201,7 @@
 				BECDF6B30761BA81005FE872 /* libSDL2.a */,
 				BECDF6BE0761BA81005FE872 /* Standard DMG */,
 				BECDF6C30761BA81005FE872 /* Developer Extras Package */,
+				DB31407717554B71006C0E22 /* libSDL2.dylib */,
 			);
 			name = Products;
 			sourceTree = "";
@@ -1745,6 +2018,150 @@
 			);
 			runOnlyForDeploymentPostprocessing = 0;
 		};
+		DB313F7317554B71006C0E22 /* Headers */ = {
+			isa = PBXHeadersBuildPhase;
+			buildActionMask = 2147483647;
+			files = (
+				DB313F7417554B71006C0E22 /* SDL_diskaudio.h in Headers */,
+				DB313F7517554B71006C0E22 /* SDL_dummyaudio.h in Headers */,
+				DB313F7617554B71006C0E22 /* SDL_coreaudio.h in Headers */,
+				DB313F7717554B71006C0E22 /* SDL_audio_c.h in Headers */,
+				DB313F7817554B71006C0E22 /* SDL_audiodev_c.h in Headers */,
+				DB313F7917554B71006C0E22 /* SDL_audiomem.h in Headers */,
+				DB313F7A17554B71006C0E22 /* SDL_sysaudio.h in Headers */,
+				DB313F7B17554B71006C0E22 /* SDL_wave.h in Headers */,
+				DB313F7C17554B71006C0E22 /* blank_cursor.h in Headers */,
+				DB313F7D17554B71006C0E22 /* default_cursor.h in Headers */,
+				DB313F7E17554B71006C0E22 /* scancodes_darwin.h in Headers */,
+				DB313F7F17554B71006C0E22 /* scancodes_linux.h in Headers */,
+				DB313F8017554B71006C0E22 /* scancodes_xfree86.h in Headers */,
+				DB313F8117554B71006C0E22 /* SDL_clipboardevents_c.h in Headers */,
+				DB313F8217554B71006C0E22 /* SDL_events_c.h in Headers */,
+				DB313F8317554B71006C0E22 /* SDL_gesture_c.h in Headers */,
+				DB313F8417554B71006C0E22 /* SDL_keyboard_c.h in Headers */,
+				DB313F8517554B71006C0E22 /* SDL_mouse_c.h in Headers */,
+				DB313F8617554B71006C0E22 /* SDL_sysevents.h in Headers */,
+				DB313F8717554B71006C0E22 /* SDL_touch_c.h in Headers */,
+				DB313F8817554B71006C0E22 /* SDL_windowevents_c.h in Headers */,
+				DB313F8917554B71006C0E22 /* SDL_rwopsbundlesupport.h in Headers */,
+				DB313F8A17554B71006C0E22 /* SDL_haptic_c.h in Headers */,
+				DB313F8B17554B71006C0E22 /* SDL_syshaptic.h in Headers */,
+				DB313F8C17554B71006C0E22 /* SDL_sysjoystick_c.h in Headers */,
+				DB313F8D17554B71006C0E22 /* SDL_joystick_c.h in Headers */,
+				DB313F8E17554B71006C0E22 /* SDL_sysjoystick.h in Headers */,
+				DB313F8F17554B71006C0E22 /* SDL_assert_c.h in Headers */,
+				DB313F9017554B71006C0E22 /* SDL_error_c.h in Headers */,
+				DB313F9117554B71006C0E22 /* SDL_fatal.h in Headers */,
+				DB313F9217554B71006C0E22 /* SDL_sysmutex_c.h in Headers */,
+				DB313F9317554B71006C0E22 /* SDL_systhread_c.h in Headers */,
+				DB313F9417554B71006C0E22 /* SDL_systhread.h in Headers */,
+				DB313F9517554B71006C0E22 /* SDL_thread_c.h in Headers */,
+				DB313F9617554B71006C0E22 /* SDL_timer_c.h in Headers */,
+				DB313F9717554B71006C0E22 /* SDL_cocoaclipboard.h in Headers */,
+				DB313F9817554B71006C0E22 /* SDL_cocoaevents.h in Headers */,
+				DB313F9917554B71006C0E22 /* SDL_cocoakeyboard.h in Headers */,
+				DB313F9A17554B71006C0E22 /* SDL_cocoamodes.h in Headers */,
+				DB313F9B17554B71006C0E22 /* SDL_cocoamouse.h in Headers */,
+				DB313F9C17554B71006C0E22 /* SDL_cocoaopengl.h in Headers */,
+				DB313F9D17554B71006C0E22 /* SDL_cocoashape.h in Headers */,
+				DB313F9E17554B71006C0E22 /* SDL_cocoavideo.h in Headers */,
+				DB313F9F17554B71006C0E22 /* SDL_cocoawindow.h in Headers */,
+				DB313FA017554B71006C0E22 /* SDL_nullevents_c.h in Headers */,
+				DB313FA117554B71006C0E22 /* SDL_nullvideo.h in Headers */,
+				DB313FA217554B71006C0E22 /* SDL_blit.h in Headers */,
+				DB313FA317554B71006C0E22 /* SDL_blit_auto.h in Headers */,
+				DB313FA417554B71006C0E22 /* SDL_blit_copy.h in Headers */,
+				DB313FA517554B71006C0E22 /* SDL_blit_slow.h in Headers */,
+				DB313FA617554B71006C0E22 /* SDL_pixels_c.h in Headers */,
+				DB313FA717554B71006C0E22 /* SDL_RLEaccel_c.h in Headers */,
+				DB313FA817554B71006C0E22 /* SDL_shape_internals.h in Headers */,
+				DB313FA917554B71006C0E22 /* SDL_sysvideo.h in Headers */,
+				DB313FAA17554B71006C0E22 /* imKStoUCS.h in Headers */,
+				DB313FAB17554B71006C0E22 /* SDL_x11clipboard.h in Headers */,
+				DB313FAC17554B71006C0E22 /* SDL_x11dyn.h in Headers */,
+				DB313FAD17554B71006C0E22 /* SDL_x11events.h in Headers */,
+				DB313FAE17554B71006C0E22 /* SDL_x11keyboard.h in Headers */,
+				DB313FAF17554B71006C0E22 /* SDL_x11modes.h in Headers */,
+				DB313FB017554B71006C0E22 /* SDL_x11mouse.h in Headers */,
+				DB313FB117554B71006C0E22 /* SDL_x11opengl.h in Headers */,
+				DB313FB217554B71006C0E22 /* SDL_x11opengles.h in Headers */,
+				DB313FB317554B71006C0E22 /* SDL_x11shape.h in Headers */,
+				DB313FB417554B71006C0E22 /* SDL_x11sym.h in Headers */,
+				DB313FB517554B71006C0E22 /* SDL_x11touch.h in Headers */,
+				DB313FB617554B71006C0E22 /* SDL_x11video.h in Headers */,
+				DB313FB717554B71006C0E22 /* SDL_x11window.h in Headers */,
+				DB313FB817554B71006C0E22 /* SDL_sysrender.h in Headers */,
+				DB313FB917554B71006C0E22 /* mmx.h in Headers */,
+				DB313FBA17554B71006C0E22 /* SDL_yuv_sw_c.h in Headers */,
+				DB313FBB17554B71006C0E22 /* SDL_nullframebuffer_c.h in Headers */,
+				DB313FBC17554B71006C0E22 /* SDL_blendfillrect.h in Headers */,
+				DB313FBD17554B71006C0E22 /* SDL_blendline.h in Headers */,
+				DB313FBE17554B71006C0E22 /* SDL_blendpoint.h in Headers */,
+				DB313FBF17554B71006C0E22 /* SDL_draw.h in Headers */,
+				DB313FC017554B71006C0E22 /* SDL_drawline.h in Headers */,
+				DB313FC117554B71006C0E22 /* SDL_drawpoint.h in Headers */,
+				DB313FC217554B71006C0E22 /* SDL_render_sw_c.h in Headers */,
+				DB313FC317554B71006C0E22 /* SDL_x11framebuffer.h in Headers */,
+				DB313FC417554B71006C0E22 /* SDL_glfuncs.h in Headers */,
+				DB313FC517554B71006C0E22 /* SDL_shaders_gl.h in Headers */,
+				DB313FC617554B71006C0E22 /* SDL_rotate.h in Headers */,
+				DB313FC717554B71006C0E22 /* SDL_x11xinput2.h in Headers */,
+				DB313FC817554B71006C0E22 /* begin_code.h in Headers */,
+				DB313FC917554B71006C0E22 /* close_code.h in Headers */,
+				DB313FCA17554B71006C0E22 /* SDL_assert.h in Headers */,
+				DB313FCB17554B71006C0E22 /* SDL_atomic.h in Headers */,
+				DB313FCC17554B71006C0E22 /* SDL_audio.h in Headers */,
+				DB313FCD17554B71006C0E22 /* SDL_blendmode.h in Headers */,
+				DB313FCE17554B71006C0E22 /* SDL_clipboard.h in Headers */,
+				DB313FCF17554B71006C0E22 /* SDL_config_macosx.h in Headers */,
+				DB313FD017554B71006C0E22 /* SDL_config.h in Headers */,
+				DB313FD117554B71006C0E22 /* SDL_copying.h in Headers */,
+				DB313FD217554B71006C0E22 /* SDL_cpuinfo.h in Headers */,
+				DB313FD317554B71006C0E22 /* SDL_endian.h in Headers */,
+				DB313FD417554B71006C0E22 /* SDL_error.h in Headers */,
+				DB313FD517554B71006C0E22 /* SDL_events.h in Headers */,
+				DB313FD617554B71006C0E22 /* SDL_gesture.h in Headers */,
+				DB313FD717554B71006C0E22 /* SDL_haptic.h in Headers */,
+				DB313FD817554B71006C0E22 /* SDL_hints.h in Headers */,
+				DB313FD917554B71006C0E22 /* SDL_joystick.h in Headers */,
+				DB313FDA17554B71006C0E22 /* SDL_keyboard.h in Headers */,
+				DB313FDB17554B71006C0E22 /* SDL_keycode.h in Headers */,
+				DB313FDC17554B71006C0E22 /* SDL_loadso.h in Headers */,
+				DB313FDD17554B71006C0E22 /* SDL_log.h in Headers */,
+				DB313FDE17554B71006C0E22 /* SDL_main.h in Headers */,
+				DB313FDF17554B71006C0E22 /* SDL_mouse.h in Headers */,
+				DB313FE017554B71006C0E22 /* SDL_mutex.h in Headers */,
+				DB313FE117554B71006C0E22 /* SDL_name.h in Headers */,
+				DB313FE217554B71006C0E22 /* SDL_opengl.h in Headers */,
+				DB313FE317554B71006C0E22 /* SDL_opengles.h in Headers */,
+				DB313FE417554B71006C0E22 /* SDL_opengles2.h in Headers */,
+				DB313FE517554B71006C0E22 /* SDL_pixels.h in Headers */,
+				DB313FE617554B71006C0E22 /* SDL_platform.h in Headers */,
+				DB313FE717554B71006C0E22 /* SDL_power.h in Headers */,
+				DB313FE817554B71006C0E22 /* SDL_quit.h in Headers */,
+				DB313FE917554B71006C0E22 /* SDL_rect.h in Headers */,
+				DB313FEA17554B71006C0E22 /* SDL_render.h in Headers */,
+				DB313FEB17554B71006C0E22 /* SDL_revision.h in Headers */,
+				DB313FEC17554B71006C0E22 /* SDL_rwops.h in Headers */,
+				DB313FED17554B71006C0E22 /* SDL_scancode.h in Headers */,
+				DB313FEE17554B71006C0E22 /* SDL_shape.h in Headers */,
+				DB313FEF17554B71006C0E22 /* SDL_stdinc.h in Headers */,
+				DB313FF017554B71006C0E22 /* SDL_surface.h in Headers */,
+				DB313FF117554B71006C0E22 /* SDL_system.h in Headers */,
+				DB313FF217554B71006C0E22 /* SDL_syswm.h in Headers */,
+				DB313FF317554B71006C0E22 /* SDL_thread.h in Headers */,
+				DB313FF417554B71006C0E22 /* SDL_timer.h in Headers */,
+				DB313FF517554B71006C0E22 /* SDL_touch.h in Headers */,
+				DB313FF617554B71006C0E22 /* SDL_types.h in Headers */,
+				DB313FF717554B71006C0E22 /* SDL_version.h in Headers */,
+				DB313FF817554B71006C0E22 /* SDL_video.h in Headers */,
+				DB313FF917554B71006C0E22 /* SDL.h in Headers */,
+				DB313FFA17554B71006C0E22 /* SDL_cocoamessagebox.h in Headers */,
+				DB313FFB17554B71006C0E22 /* SDL_gamecontroller.h in Headers */,
+				DB313FFC17554B71006C0E22 /* SDL_bits.h in Headers */,
+			);
+			runOnlyForDeploymentPostprocessing = 0;
+		};
 /* End PBXHeadersBuildPhase section */
 
 /* Begin PBXNativeTarget section */
@@ -1822,6 +2239,26 @@
 			productReference = BECDF6C30761BA81005FE872 /* Developer Extras Package */;
 			productType = "com.apple.product-type.tool";
 		};
+		DB313F7217554B71006C0E22 /* Shared Library */ = {
+			isa = PBXNativeTarget;
+			buildConfigurationList = DB31407417554B71006C0E22 /* Build configuration list for PBXNativeTarget "Shared Library" */;
+			buildPhases = (
+				DB313F7317554B71006C0E22 /* Headers */,
+				DB313FFD17554B71006C0E22 /* Sources */,
+				DB31406B17554B71006C0E22 /* Frameworks */,
+				DB31407317554B71006C0E22 /* Rez */,
+			);
+			buildRules = (
+			);
+			comments = "This produces libSDL2.dylib, which is the shared build of SDL.";
+			dependencies = (
+			);
+			name = "Shared Library";
+			productInstallPath = /usr/local/lib;
+			productName = "Shared Library";
+			productReference = DB31407717554B71006C0E22 /* libSDL2.dylib */;
+			productType = "com.apple.product-type.library.dynamic";
+		};
 /* End PBXNativeTarget section */
 
 /* Begin PBXProject section */
@@ -1847,6 +2284,7 @@
 			targets = (
 				BECDF5FE0761BA81005FE872 /* Framework */,
 				BECDF66D0761BA81005FE872 /* Static Library */,
+				DB313F7217554B71006C0E22 /* Shared Library */,
 				BECDF6BB0761BA81005FE872 /* Standard DMG */,
 				BECDF6C00761BA81005FE872 /* Developer Extras Package */,
 				0083103F1072EA5700A531F1 /* Generate Doxygen DocSet */,
@@ -1872,6 +2310,13 @@
 			);
 			runOnlyForDeploymentPostprocessing = 0;
 		};
+		DB31407317554B71006C0E22 /* Rez */ = {
+			isa = PBXRezBuildPhase;
+			buildActionMask = 2147483647;
+			files = (
+			);
+			runOnlyForDeploymentPostprocessing = 0;
+		};
 /* End PBXRezBuildPhase section */
 
 /* Begin PBXShellScriptBuildPhase section */
@@ -2142,6 +2587,122 @@
 			);
 			runOnlyForDeploymentPostprocessing = 0;
 		};
+		DB313FFD17554B71006C0E22 /* Sources */ = {
+			isa = PBXSourcesBuildPhase;
+			buildActionMask = 2147483647;
+			files = (
+				DB313FFE17554B71006C0E22 /* SDL_atomic.c in Sources */,
+				DB313FFF17554B71006C0E22 /* SDL_spinlock.c in Sources */,
+				DB31400017554B71006C0E22 /* SDL_diskaudio.c in Sources */,
+				DB31400117554B71006C0E22 /* SDL_dummyaudio.c in Sources */,
+				DB31400217554B71006C0E22 /* SDL_coreaudio.c in Sources */,
+				DB31400317554B71006C0E22 /* SDL_audio.c in Sources */,
+				DB31400417554B71006C0E22 /* SDL_audiocvt.c in Sources */,
+				DB31400517554B71006C0E22 /* SDL_audiodev.c in Sources */,
+				DB31400617554B71006C0E22 /* SDL_audiotypecvt.c in Sources */,
+				DB31400717554B71006C0E22 /* SDL_mixer.c in Sources */,
+				DB31400817554B71006C0E22 /* SDL_wave.c in Sources */,
+				DB31400917554B71006C0E22 /* SDL_cpuinfo.c in Sources */,
+				DB31400A17554B71006C0E22 /* SDL_clipboardevents.c in Sources */,
+				DB31400B17554B71006C0E22 /* SDL_events.c in Sources */,
+				DB31400C17554B71006C0E22 /* SDL_dropevents.c in Sources */,
+				DB31400D17554B71006C0E22 /* SDL_gesture.c in Sources */,
+				DB31400E17554B71006C0E22 /* SDL_keyboard.c in Sources */,
+				DB31400F17554B71006C0E22 /* SDL_mouse.c in Sources */,
+				DB31401017554B71006C0E22 /* SDL_quit.c in Sources */,
+				DB31401117554B71006C0E22 /* SDL_touch.c in Sources */,
+				DB31401217554B71006C0E22 /* SDL_windowevents.c in Sources */,
+				DB31401317554B71006C0E22 /* SDL_rwopsbundlesupport.m in Sources */,
+				DB31401417554B71006C0E22 /* SDL_rwops.c in Sources */,
+				DB31401517554B71006C0E22 /* SDL_syshaptic.c in Sources */,
+				DB31401617554B71006C0E22 /* SDL_haptic.c in Sources */,
+				DB31401717554B71006C0E22 /* SDL_sysjoystick.c in Sources */,
+				DB31401817554B71006C0E22 /* SDL_gamecontroller.c in Sources */,
+				DB31401917554B71006C0E22 /* SDL_joystick.c in Sources */,
+				DB31401A17554B71006C0E22 /* SDL_sysloadso.c in Sources */,
+				DB31401B17554B71006C0E22 /* SDL_syspower.c in Sources */,
+				DB31401C17554B71006C0E22 /* SDL_power.c in Sources */,
+				DB31401D17554B71006C0E22 /* SDL_assert.c in Sources */,
+				DB31401E17554B71006C0E22 /* SDL_error.c in Sources */,
+				DB31401F17554B71006C0E22 /* SDL_fatal.c in Sources */,
+				DB31402017554B71006C0E22 /* SDL.c in Sources */,
+				DB31402117554B71006C0E22 /* SDL_getenv.c in Sources */,
+				DB31402217554B71006C0E22 /* SDL_iconv.c in Sources */,
+				DB31402317554B71006C0E22 /* SDL_malloc.c in Sources */,
+				DB31402417554B71006C0E22 /* SDL_qsort.c in Sources */,
+				DB31402517554B71006C0E22 /* SDL_stdlib.c in Sources */,
+				DB31402617554B71006C0E22 /* SDL_string.c in Sources */,
+				DB31402717554B71006C0E22 /* SDL_syscond.c in Sources */,
+				DB31402817554B71006C0E22 /* SDL_sysmutex.c in Sources */,
+				DB31402917554B71006C0E22 /* SDL_syssem.c in Sources */,
+				DB31402A17554B71006C0E22 /* SDL_systhread.c in Sources */,
+				DB31402B17554B71006C0E22 /* SDL_thread.c in Sources */,
+				DB31402C17554B71006C0E22 /* SDL_timer.c in Sources */,
+				DB31402D17554B71006C0E22 /* SDL_systimer.c in Sources */,
+				DB31402E17554B71006C0E22 /* SDL_cocoaclipboard.m in Sources */,
+				DB31402F17554B71006C0E22 /* SDL_cocoaevents.m in Sources */,
+				DB31403017554B71006C0E22 /* SDL_cocoakeyboard.m in Sources */,
+				DB31403117554B71006C0E22 /* SDL_cocoamodes.m in Sources */,
+				DB31403217554B71006C0E22 /* SDL_cocoamouse.m in Sources */,
+				DB31403317554B71006C0E22 /* SDL_cocoaopengl.m in Sources */,
+				DB31403417554B71006C0E22 /* SDL_cocoashape.m in Sources */,
+				DB31403517554B71006C0E22 /* SDL_cocoavideo.m in Sources */,
+				DB31403617554B71006C0E22 /* SDL_cocoawindow.m in Sources */,
+				DB31403717554B71006C0E22 /* SDL_nullevents.c in Sources */,
+				DB31403817554B71006C0E22 /* SDL_nullvideo.c in Sources */,
+				DB31403917554B71006C0E22 /* SDL_blit.c in Sources */,
+				DB31403A17554B71006C0E22 /* SDL_blit_0.c in Sources */,
+				DB31403B17554B71006C0E22 /* SDL_blit_1.c in Sources */,
+				DB31403C17554B71006C0E22 /* SDL_blit_A.c in Sources */,
+				DB31403D17554B71006C0E22 /* SDL_blit_auto.c in Sources */,
+				DB31403E17554B71006C0E22 /* SDL_blit_copy.c in Sources */,
+				DB31403F17554B71006C0E22 /* SDL_blit_N.c in Sources */,
+				DB31404017554B71006C0E22 /* SDL_blit_slow.c in Sources */,
+				DB31404117554B71006C0E22 /* SDL_bmp.c in Sources */,
+				DB31404217554B71006C0E22 /* SDL_clipboard.c in Sources */,
+				DB31404317554B71006C0E22 /* SDL_fillrect.c in Sources */,
+				DB31404417554B71006C0E22 /* SDL_pixels.c in Sources */,
+				DB31404517554B71006C0E22 /* SDL_rect.c in Sources */,
+				DB31404617554B71006C0E22 /* SDL_RLEaccel.c in Sources */,
+				DB31404717554B71006C0E22 /* SDL_shape.c in Sources */,
+				DB31404817554B71006C0E22 /* SDL_stretch.c in Sources */,
+				DB31404917554B71006C0E22 /* SDL_surface.c in Sources */,
+				DB31404A17554B71006C0E22 /* SDL_video.c in Sources */,
+				DB31404B17554B71006C0E22 /* imKStoUCS.c in Sources */,
+				DB31404C17554B71006C0E22 /* SDL_x11clipboard.c in Sources */,
+				DB31404D17554B71006C0E22 /* SDL_x11dyn.c in Sources */,
+				DB31404E17554B71006C0E22 /* SDL_x11events.c in Sources */,
+				DB31404F17554B71006C0E22 /* SDL_x11keyboard.c in Sources */,
+				DB31405017554B71006C0E22 /* SDL_x11modes.c in Sources */,
+				DB31405117554B71006C0E22 /* SDL_x11mouse.c in Sources */,
+				DB31405217554B71006C0E22 /* SDL_x11opengl.c in Sources */,
+				DB31405317554B71006C0E22 /* SDL_x11opengles.c in Sources */,
+				DB31405417554B71006C0E22 /* SDL_x11shape.c in Sources */,
+				DB31405517554B71006C0E22 /* SDL_x11touch.c in Sources */,
+				DB31405617554B71006C0E22 /* SDL_x11video.c in Sources */,
+				DB31405717554B71006C0E22 /* SDL_x11window.c in Sources */,
+				DB31405817554B71006C0E22 /* SDL_render.c in Sources */,
+				DB31405917554B71006C0E22 /* SDL_yuv_mmx.c in Sources */,
+				DB31405A17554B71006C0E22 /* SDL_yuv_sw.c in Sources */,
+				DB31405B17554B71006C0E22 /* SDL_nullframebuffer.c in Sources */,
+				DB31405C17554B71006C0E22 /* SDL_blendfillrect.c in Sources */,
+				DB31405D17554B71006C0E22 /* SDL_blendline.c in Sources */,
+				DB31405E17554B71006C0E22 /* SDL_blendpoint.c in Sources */,
+				DB31405F17554B71006C0E22 /* SDL_drawline.c in Sources */,
+				DB31406017554B71006C0E22 /* SDL_drawpoint.c in Sources */,
+				DB31406117554B71006C0E22 /* SDL_render_gl.c in Sources */,
+				DB31406217554B71006C0E22 /* SDL_render_sw.c in Sources */,
+				DB31406317554B71006C0E22 /* SDL_x11framebuffer.c in Sources */,
+				DB31406417554B71006C0E22 /* SDL_hints.c in Sources */,
+				DB31406517554B71006C0E22 /* SDL_log.c in Sources */,
+				DB31406617554B71006C0E22 /* SDL_shaders_gl.c in Sources */,
+				DB31406717554B71006C0E22 /* SDL_rotate.c in Sources */,
+				DB31406817554B71006C0E22 /* SDL_x11xinput2.c in Sources */,
+				DB31406917554B71006C0E22 /* SDL_x11messagebox.c in Sources */,
+				DB31406A17554B71006C0E22 /* SDL_cocoamessagebox.m in Sources */,
+			);
+			runOnlyForDeploymentPostprocessing = 0;
+		};
 /* End PBXSourcesBuildPhase section */
 
 /* Begin PBXTargetDependency section */
@@ -2300,6 +2861,44 @@
 			};
 			name = Debug;
 		};
+		DB31407517554B71006C0E22 /* Debug */ = {
+			isa = XCBuildConfiguration;
+			buildSettings = {
+				EXECUTABLE_PREFIX = lib;
+				GCC_PREPROCESSOR_DEFINITIONS = (
+					"$(GCC_PREPROCESSOR_DEFINITIONS)",
+					"$(GCC_PREPROCESSOR_DEFINITIONS_QUOTED_1)",
+					"$(GCC_PREPROCESSOR_DEFINITIONS_QUOTED_2)",
+					"$(GCC_PREPROCESSOR_DEFINITIONS_QUOTED_3)",
+					"$(GCC_PREPROCESSOR_DEFINITIONS_QUOTED_4)",
+				);
+				GCC_SYMBOLS_PRIVATE_EXTERN = YES;
+				HEADER_SEARCH_PATHS = /usr/X11R6/include;
+				INSTALL_PATH = "@loader_path";
+				PRODUCT_NAME = SDL2;
+				SKIP_INSTALL = YES;
+			};
+			name = Debug;
+		};
+		DB31407617554B71006C0E22 /* Release */ = {
+			isa = XCBuildConfiguration;
+			buildSettings = {
+				EXECUTABLE_PREFIX = lib;
+				GCC_PREPROCESSOR_DEFINITIONS = (
+					"$(GCC_PREPROCESSOR_DEFINITIONS)",
+					"$(GCC_PREPROCESSOR_DEFINITIONS_QUOTED_1)",
+					"$(GCC_PREPROCESSOR_DEFINITIONS_QUOTED_2)",
+					"$(GCC_PREPROCESSOR_DEFINITIONS_QUOTED_3)",
+					"$(GCC_PREPROCESSOR_DEFINITIONS_QUOTED_4)",
+				);
+				GCC_SYMBOLS_PRIVATE_EXTERN = YES;
+				HEADER_SEARCH_PATHS = /usr/X11R6/include;
+				INSTALL_PATH = "@loader_path";
+				PRODUCT_NAME = SDL2;
+				SKIP_INSTALL = YES;
+			};
+			name = Release;
+		};
 /* End XCBuildConfiguration section */
 
 /* Begin XCConfigurationList section */
@@ -2357,6 +2956,15 @@
 			defaultConfigurationIsVisible = 0;
 			defaultConfigurationName = Debug;
 		};
+		DB31407417554B71006C0E22 /* Build configuration list for PBXNativeTarget "Shared Library" */ = {
+			isa = XCConfigurationList;
+			buildConfigurations = (
+				DB31407517554B71006C0E22 /* Debug */,
+				DB31407617554B71006C0E22 /* Release */,
+			);
+			defaultConfigurationIsVisible = 0;
+			defaultConfigurationName = Debug;
+		};
 /* End XCConfigurationList section */
 	};
 	rootObject = 0867D690FE84028FC02AAC07 /* Project object */;

From f2763e240df9f791e042e3c5fc7ceb452ea965c1 Mon Sep 17 00:00:00 2001
From: Philipp Wiesemann 
Date: Thu, 30 May 2013 23:08:35 +0200
Subject: [PATCH 163/542] Changed line comments in header file.

---
 src/core/android/SDL_android.h | 6 +++---
 1 file changed, 3 insertions(+), 3 deletions(-)

diff --git a/src/core/android/SDL_android.h b/src/core/android/SDL_android.h
index 7eddcfac8..0d5595dde 100644
--- a/src/core/android/SDL_android.h
+++ b/src/core/android/SDL_android.h
@@ -37,7 +37,7 @@ extern SDL_bool Android_JNI_GetAccelerometerValues(float values[3]);
 extern void Android_JNI_ShowTextInput(SDL_Rect *inputRect);
 extern void Android_JNI_HideTextInput();
 
-// Audio support
+/* Audio support */
 extern int Android_JNI_OpenAudioDevice(int sampleRate, int is16Bit, int channelCount, int desiredBufferFrames);
 extern void* Android_JNI_GetAudioBuffer();
 extern void Android_JNI_WriteAudioBuffer();
@@ -60,13 +60,13 @@ SDL_bool Android_JNI_HasClipboardText();
 /* Power support */
 int Android_JNI_GetPowerInfo(int* plugged, int* charged, int* battery, int* seconds, int* percent);
 
-// Threads
+/* Threads */
 #include 
 static void Android_JNI_ThreadDestroyed(void*);
 JNIEnv *Android_JNI_GetEnv(void);
 int Android_JNI_SetupThread(void);
 
-// Generic messages
+/* Generic messages */
 int Android_JNI_SendMessage(int command, int param);
 
 /* Ends C function definitions when using C++ */

From 9afcdd0a1460136762646689ef988abb6040d1d9 Mon Sep 17 00:00:00 2001
From: Philipp Wiesemann 
Date: Thu, 30 May 2013 23:25:03 +0200
Subject: [PATCH 164/542] Moved prototype for static function out of header
 file to prevent warnings.

---
 src/core/android/SDL_android.cpp | 2 ++
 src/core/android/SDL_android.h   | 1 -
 2 files changed, 2 insertions(+), 1 deletion(-)

diff --git a/src/core/android/SDL_android.cpp b/src/core/android/SDL_android.cpp
index 6fbb678fd..5b0197fdd 100644
--- a/src/core/android/SDL_android.cpp
+++ b/src/core/android/SDL_android.cpp
@@ -50,6 +50,8 @@ extern "C" {
 
 /* Implemented in audio/android/SDL_androidaudio.c */
 extern void Android_RunAudioThread();
+
+static void Android_JNI_ThreadDestroyed(void*);
 } // C
 
 /*******************************************************************************
diff --git a/src/core/android/SDL_android.h b/src/core/android/SDL_android.h
index 0d5595dde..d53652f88 100644
--- a/src/core/android/SDL_android.h
+++ b/src/core/android/SDL_android.h
@@ -62,7 +62,6 @@ int Android_JNI_GetPowerInfo(int* plugged, int* charged, int* battery, int* seco
 
 /* Threads */
 #include 
-static void Android_JNI_ThreadDestroyed(void*);
 JNIEnv *Android_JNI_GetEnv(void);
 int Android_JNI_SetupThread(void);
 

From 3d874237bcab205ebb0095b0f2af5d0b191cde51 Mon Sep 17 00:00:00 2001
From: Edward Rudd 
Date: Thu, 30 May 2013 10:42:52 -0400
Subject: [PATCH 165/542] add in Controller configs for Logitech F510 for OS X
 / Linux

--HG--
extra : rebase_source : 68a7469d9e85d5f090d0299abed42f8ed577499a
---
 src/joystick/SDL_gamecontroller.c | 2 ++
 1 file changed, 2 insertions(+)

diff --git a/src/joystick/SDL_gamecontroller.c b/src/joystick/SDL_gamecontroller.c
index b8718a190..0d5ae7176 100644
--- a/src/joystick/SDL_gamecontroller.c
+++ b/src/joystick/SDL_gamecontroller.c
@@ -104,6 +104,7 @@ const char *s_ControllerMappings [] =
     "6d040000000000001fc2000000000000,Logitech F710 Gamepad Controller (XInput),a:b0,b:b1,y:b3,x:b2,start:b8,guide:b10,back:b9,leftstick:b6,rightstick:b7,leftshoulder:b4,rightshoulder:b5,dpup:b11,dpleft:b13,dpdown:b12,dpright:b14,leftx:a0,lefty:a1,rightx:a3,righty:a4,lefttrigger:a2,righttrigger:a5,",
     "6d0400000000000016c2000000000000,Logitech F310 Gamepad Controller (DInput),a:b1,b:b2,y:b3,x:b0,start:b9,back:b8,leftstick:b10,rightstick:b11,leftshoulder:b4,rightshoulder:b5,dpup:h0.1,dpleft:h0.8,dpdown:h0.4,dpright:h0.2,leftx:a0,lefty:a1,rightx:a2,righty:a3,lefttrigger:b6,righttrigger:b7,", /* Guide button doesn't seem to be sent in DInput mode. */
     "6d0400000000000019c2000000000000,Logitech Wireless Gamepad Controller (DInput),a:b1,b:b2,y:b3,x:b0,start:b9,back:b8,leftstick:b10,rightstick:b11,leftshoulder:b4,rightshoulder:b5,dpup:h0.1,dpleft:h0.8,dpdown:h0.4,dpright:h0.2,leftx:a0,lefty:a1,rightx:a2,righty:a3,lefttrigger:b6,righttrigger:b7,", /* This includes F710 in DInput mode and the "Logitech Cordless RumblePad 2", at the very least. */
+    "6d0400000000000018c2000000000000,Logitech Rumble Gamepad F510(DInput),a:b1,b:b2,y:b3,x:b0,start:b9,back:b8,leftstick:b10,rightstick:b11,leftshoulder:b4,rightshoulder:b5,dpup:h0.1,dpleft:h0.8,dpdown:h0.4,dpright:h0.2,leftx:a0,rightx:a2,lefty:a1,righty:a3,lefttrigger:b6,righttrigger:b7,",
 #elif defined(__LINUX__)
     "030000005e0400008e02000014010000,X360 Controller,a:b0,b:b1,y:b3,x:b2,start:b7,guide:b8,back:b6,dpup:h0.1,dpleft:h0.8,dpdown:h0.4,dpright:h0.2,leftshoulder:b4,rightshoulder:b5,leftstick:b9,rightstick:b10,leftx:a0,lefty:a1,rightx:a3,righty:a4,lefttrigger:a2,righttrigger:a5",
     "030000005e0400008e02000010010000,X360 Controller,a:b0,b:b1,y:b3,x:b2,start:b7,guide:b8,back:b6,leftstick:b9,rightstick:b10,leftshoulder:b4,rightshoulder:b5,dpup:h0.1,dpleft:h0.8,dpdown:h0.4,dpright:h0.2,leftx:a0,lefty:a1,rightx:a3,righty:a4,lefttrigger:a2,righttrigger:a5,",
@@ -115,6 +116,7 @@ const char *s_ControllerMappings [] =
     "030000006d04000019c2000010010000,Logitech Cordless RumblePad 2,a:b1,b:b2,y:b3,x:b0,start:b9,guide:,back:b8,leftstick:b10,rightstick:b11,leftshoulder:b4,rightshoulder:b5,dpup:h0.1,dpleft:h0.8,dpdown:h0.4,dpright:h0.2,leftx:a0,lefty:a1,rightx:a2,righty:a3,lefttrigger:b6,righttrigger:b7,",
     "0500000047532047616d657061640000,GameStop Gamepad,a:b0,b:b1,y:b3,x:b2,start:b9,guide:,back:b8,leftstick:b10,rightstick:b11,leftshoulder:b4,rightshoulder:b5,dpup:h0.1,dpleft:h0.8,dpdown:h0.4,dpright:h0.2,leftx:a0,lefty:a1,rightx:a2,righty:a3,lefttrigger:b6,righttrigger:b7,",
     "03000000ba2200002010000001010000,Jess Technology USB Game Controller,start:b9,a:b2,b:b1,x:b3,y:b0,dpup:h0.1,dpleft:h0.8,dpdown:h0.4,dpright:h0.2,leftx:a0,lefty:a1,rightx:a3,righty:a2,lefttrigger:b6,righttrigger:b7,leftshoulder:b4,rightshoulder:b5,guide:,back:b8",
+    "030000006d0400001ec2000020200000,Logitech Rumble Gamepad F510(XInput),a:b0,b:b1,x:b2,y:b3,start:b7,back:b6,guide:b8,leftstick:b9,rightstick:b10,leftshoulder:b4,rightshoulder:b5,dpup:h0.1,dpleft:h0.8,dpdown:h0.4,dpright:h0.2,leftx:a0,lefty:a1,rightx:a3,righty:a4,lefttrigger:a2,righttrigger:a5,",
 #endif
     NULL
 };

From acb14cfc03c27d661de3f3cae5e63d7b3198678e Mon Sep 17 00:00:00 2001
From: Edward Rudd 
Date: Thu, 30 May 2013 22:14:24 -0400
Subject: [PATCH 166/542] Add trigger value adjustment code to the
 SDL_GameControllerGetAxis code as well.

- fixes Trigger values when polling instead of using event driven
---
 src/joystick/SDL_gamecontroller.c | 12 +++++++++++-
 1 file changed, 11 insertions(+), 1 deletion(-)

diff --git a/src/joystick/SDL_gamecontroller.c b/src/joystick/SDL_gamecontroller.c
index 0d5ae7176..bf85cdc10 100644
--- a/src/joystick/SDL_gamecontroller.c
+++ b/src/joystick/SDL_gamecontroller.c
@@ -960,7 +960,17 @@ SDL_GameControllerGetAxis(SDL_GameController * gamecontroller, SDL_GameControlle
 
     if (gamecontroller->mapping.axes[axis] >= 0 )
     {
-        return ( SDL_JoystickGetAxis( gamecontroller->joystick, gamecontroller->mapping.axes[axis]) );
+        Sint16 value = ( SDL_JoystickGetAxis( gamecontroller->joystick, gamecontroller->mapping.axes[axis]) );
+        switch (axis)
+        {
+            case SDL_CONTROLLER_AXIS_TRIGGERLEFT:
+            case SDL_CONTROLLER_AXIS_TRIGGERRIGHT:
+                /* Shift it to be 0 - 32767. */
+                value = value / 2 + 16384;
+            default:
+                break;
+        }
+        return value;
     }
     else if (gamecontroller->mapping.buttonasaxis[axis] >= 0 )
     {

From 5d3e05c2c4650c7a16bc5678da37ee359cf6b763 Mon Sep 17 00:00:00 2001
From: Andreas Schiffler 
Date: Thu, 30 May 2013 20:03:56 -0700
Subject: [PATCH 167/542] Fix bug 1492: Visual Studio builds sdl.lib and
 sdl.dll for version 2.0 (contributed by Jan Reitz); update SDL_bool handling
 in test_common to fix VS compiler warnings

---
 VisualC/SDL/SDL_VS2012.vcxproj                     |  2 +-
 VisualC/SDLmain/SDLmain_VS2012.vcxproj             |  2 +-
 VisualC/SDLtest/SDLtest_VS2012.vcxproj             |  2 +-
 VisualC/tests/checkkeys/checkkeys_VS2012.vcxproj   | 12 ++++++------
 VisualC/tests/loopwave/loopwave_VS2012.vcxproj     | 12 ++++++------
 .../testautomation/testautomation_vs2012.vcxproj   | 14 +++++++-------
 VisualC/tests/testdraw2/testdraw2_VS2012.vcxproj   | 14 +++++++-------
 VisualC/tests/testfile/testfile_VS2012.vcxproj     | 12 ++++++------
 .../testgamecontroller_VS2010.vcxproj              | 12 ++++++------
 VisualC/tests/testgl2/testgl2_VS2012.vcxproj       | 14 +++++++-------
 .../tests/testplatform/testplatform_VS2012.vcxproj | 12 ++++++------
 VisualC/tests/testpower/testpower_VS2012.vcxproj   | 12 ++++++------
 VisualC/tests/testshape/testshape_VS2012.vcxproj   | 12 ++++++------
 .../tests/testsprite2/testsprite2_VS2012.vcxproj   | 14 +++++++-------
 .../tests/testvidinfo/testvidinfo_VS2010.vcxproj   |  2 +-
 src/test/SDL_test_common.c                         |  8 ++++----
 16 files changed, 78 insertions(+), 78 deletions(-)

diff --git a/VisualC/SDL/SDL_VS2012.vcxproj b/VisualC/SDL/SDL_VS2012.vcxproj
index 9d5a3f7a0..efe911951 100644
--- a/VisualC/SDL/SDL_VS2012.vcxproj
+++ b/VisualC/SDL/SDL_VS2012.vcxproj
@@ -19,7 +19,7 @@
     
   
   
-    SDL
+    SDL2
     {81CE8DAF-EBB2-4761-8E45-B71ABCCA8C68}
     SDL
   
diff --git a/VisualC/SDLmain/SDLmain_VS2012.vcxproj b/VisualC/SDLmain/SDLmain_VS2012.vcxproj
index 52a9851c1..d44ea95c1 100644
--- a/VisualC/SDLmain/SDLmain_VS2012.vcxproj
+++ b/VisualC/SDLmain/SDLmain_VS2012.vcxproj
@@ -19,7 +19,7 @@
     
   
   
-    SDLmain
+    SDL2main
     {DA956FD3-E142-46F2-9DD5-C78BEBB56B7A}
   
   
diff --git a/VisualC/SDLtest/SDLtest_VS2012.vcxproj b/VisualC/SDLtest/SDLtest_VS2012.vcxproj
index 08375db88..a0d78c6b5 100644
--- a/VisualC/SDLtest/SDLtest_VS2012.vcxproj
+++ b/VisualC/SDLtest/SDLtest_VS2012.vcxproj
@@ -19,7 +19,7 @@
     
   
   
-    SDLtest
+    SDL2test
     {DA956FD3-E143-46F2-9FE5-C77BEBC56B1A}
   
   
diff --git a/VisualC/tests/checkkeys/checkkeys_VS2012.vcxproj b/VisualC/tests/checkkeys/checkkeys_VS2012.vcxproj
index 954e97eb5..10ac85e90 100644
--- a/VisualC/tests/checkkeys/checkkeys_VS2012.vcxproj
+++ b/VisualC/tests/checkkeys/checkkeys_VS2012.vcxproj
@@ -109,7 +109,7 @@
       Windows
     
     
-      copy "$(SolutionDir)\SDL\$(Platform)\$(Configuration)\SDL.dll" "$(TargetDir)\SDL.dll"
+      copy "$(SolutionDir)\SDL\$(Platform)\$(Configuration)\SDL2.dll" "$(TargetDir)\SDL2.dll"
     
     
       Copy SDL
@@ -143,7 +143,7 @@
       Windows
     
     
-      copy "$(SolutionDir)\SDL\$(Platform)\$(Configuration)\SDL.dll" "$(TargetDir)\SDL.dll"
+      copy "$(SolutionDir)\SDL\$(Platform)\$(Configuration)\SDL2.dll" "$(TargetDir)\SDL2.dll"
     
     
       Copy SDL
@@ -178,7 +178,7 @@
       Windows
     
     
-      copy "$(SolutionDir)\SDL\$(Platform)\$(Configuration)\SDL.dll" "$(TargetDir)\SDL.dll"
+      copy "$(SolutionDir)\SDL\$(Platform)\$(Configuration)\SDL2.dll" "$(TargetDir)\SDL2.dll"
     
     
       Copy SDL
@@ -212,7 +212,7 @@
       Windows
     
     
-      copy "$(SolutionDir)\SDL\$(Platform)\$(Configuration)\SDL.dll" "$(TargetDir)\SDL.dll"
+      copy "$(SolutionDir)\SDL\$(Platform)\$(Configuration)\SDL2.dll" "$(TargetDir)\SDL2.dll"
     
     
       Copy SDL
@@ -222,8 +222,8 @@
     
   
   
-    
-    
+    
+    
   
   
   
diff --git a/VisualC/tests/loopwave/loopwave_VS2012.vcxproj b/VisualC/tests/loopwave/loopwave_VS2012.vcxproj
index 0919528a3..0a648593e 100644
--- a/VisualC/tests/loopwave/loopwave_VS2012.vcxproj
+++ b/VisualC/tests/loopwave/loopwave_VS2012.vcxproj
@@ -109,7 +109,7 @@
       Windows
     
     
-      copy "$(SolutionDir)\SDL\$(Platform)\$(Configuration)\SDL.dll" "$(TargetDir)\SDL.dll"
+      copy "$(SolutionDir)\SDL\$(Platform)\$(Configuration)\SDL2.dll" "$(TargetDir)\SDL2.dll"
     
     
       Copy SDL
@@ -143,7 +143,7 @@
       Windows
     
     
-      copy "$(SolutionDir)\SDL\$(Platform)\$(Configuration)\SDL.dll" "$(TargetDir)\SDL.dll"
+      copy "$(SolutionDir)\SDL\$(Platform)\$(Configuration)\SDL2.dll" "$(TargetDir)\SDL2.dll"
     
     
       Copy SDL
@@ -178,7 +178,7 @@
       Windows
     
     
-      copy "$(SolutionDir)\SDL\$(Platform)\$(Configuration)\SDL.dll" "$(TargetDir)\SDL.dll"
+      copy "$(SolutionDir)\SDL\$(Platform)\$(Configuration)\SDL2.dll" "$(TargetDir)\SDL2.dll"
     
     
       Copy SDL
@@ -212,7 +212,7 @@
       Windows
     
     
-      copy "$(SolutionDir)\SDL\$(Platform)\$(Configuration)\SDL.dll" "$(TargetDir)\SDL.dll"
+      copy "$(SolutionDir)\SDL\$(Platform)\$(Configuration)\SDL2.dll" "$(TargetDir)\SDL2.dll"
     
     
       Copy SDL
@@ -222,8 +222,8 @@
     
   
   
-    
-    
+    
+    
   
   
   
diff --git a/VisualC/tests/testautomation/testautomation_vs2012.vcxproj b/VisualC/tests/testautomation/testautomation_vs2012.vcxproj
index 1e6d973ab..a026096bc 100644
--- a/VisualC/tests/testautomation/testautomation_vs2012.vcxproj
+++ b/VisualC/tests/testautomation/testautomation_vs2012.vcxproj
@@ -97,7 +97,7 @@
       MachineX86
     
     
-      copy "$(SolutionDir)\SDL\$(Platform)\$(Configuration)\SDL.dll" "$(TargetDir)\SDL.dll"
+      copy "$(SolutionDir)\SDL\$(Platform)\$(Configuration)\SDL2.dll" "$(TargetDir)\SDL2.dll"
     
     
       Copy SDL
@@ -120,7 +120,7 @@
       Windows
     
     
-      copy "$(SolutionDir)\SDL\$(Platform)\$(Configuration)\SDL.dll" "$(TargetDir)\SDL.dll"
+      copy "$(SolutionDir)\SDL\$(Platform)\$(Configuration)\SDL2.dll" "$(TargetDir)\SDL2.dll"
     
     
       Copy SDL
@@ -147,7 +147,7 @@
       MachineX86
     
     
-      copy "$(SolutionDir)\SDL\$(Platform)\$(Configuration)\SDL.dll" "$(TargetDir)\SDL.dll"
+      copy "$(SolutionDir)\SDL\$(Platform)\$(Configuration)\SDL2.dll" "$(TargetDir)\SDL2.dll"
     
     
       Copy SDL
@@ -173,7 +173,7 @@
       true
     
     
-      copy "$(SolutionDir)\SDL\$(Platform)\$(Configuration)\SDL.dll" "$(TargetDir)\SDL.dll"
+      copy "$(SolutionDir)\SDL\$(Platform)\$(Configuration)\SDL2.dll" "$(TargetDir)\SDL2.dll"
     
     
       Copy SDL
@@ -203,9 +203,9 @@
     
   
   
-    
-    
-    
+    
+    
+    
   
   
   
diff --git a/VisualC/tests/testdraw2/testdraw2_VS2012.vcxproj b/VisualC/tests/testdraw2/testdraw2_VS2012.vcxproj
index c1003f21f..e95358feb 100644
--- a/VisualC/tests/testdraw2/testdraw2_VS2012.vcxproj
+++ b/VisualC/tests/testdraw2/testdraw2_VS2012.vcxproj
@@ -109,7 +109,7 @@
       Windows
     
     
-      copy "$(SolutionDir)\SDL\$(Platform)\$(Configuration)\SDL.dll" "$(TargetDir)\SDL.dll"
+      copy "$(SolutionDir)\SDL\$(Platform)\$(Configuration)\SDL2.dll" "$(TargetDir)\SDL2.dll"
     
     
       Copy SDL
@@ -143,7 +143,7 @@
       Windows
     
     
-      copy "$(SolutionDir)\SDL\$(Platform)\$(Configuration)\SDL.dll" "$(TargetDir)\SDL.dll"
+      copy "$(SolutionDir)\SDL\$(Platform)\$(Configuration)\SDL2.dll" "$(TargetDir)\SDL2.dll"
     
     
       Copy SDL
@@ -178,7 +178,7 @@
       Windows
     
     
-      copy "$(SolutionDir)\SDL\$(Platform)\$(Configuration)\SDL.dll" "$(TargetDir)\SDL.dll"
+      copy "$(SolutionDir)\SDL\$(Platform)\$(Configuration)\SDL2.dll" "$(TargetDir)\SDL2.dll"
     
     
       Copy SDL
@@ -212,7 +212,7 @@
       Windows
     
     
-      copy "$(SolutionDir)\SDL\$(Platform)\$(Configuration)\SDL.dll" "$(TargetDir)\SDL.dll"
+      copy "$(SolutionDir)\SDL\$(Platform)\$(Configuration)\SDL2.dll" "$(TargetDir)\SDL2.dll"
     
     
       Copy SDL
@@ -222,9 +222,9 @@
     
   
   
-    
-    
-    
+    
+    
+    
   
   
   
diff --git a/VisualC/tests/testfile/testfile_VS2012.vcxproj b/VisualC/tests/testfile/testfile_VS2012.vcxproj
index 9033fc77a..dc9f82827 100644
--- a/VisualC/tests/testfile/testfile_VS2012.vcxproj
+++ b/VisualC/tests/testfile/testfile_VS2012.vcxproj
@@ -109,7 +109,7 @@
       Windows
     
     
-      copy "$(SolutionDir)\SDL\$(Platform)\$(Configuration)\SDL.dll" "$(TargetDir)\SDL.dll"
+      copy "$(SolutionDir)\SDL\$(Platform)\$(Configuration)\SDL2.dll" "$(TargetDir)\SDL2.dll"
     
     
       Copy SDL
@@ -143,7 +143,7 @@
       Windows
     
     
-      copy "$(SolutionDir)\SDL\$(Platform)\$(Configuration)\SDL.dll" "$(TargetDir)\SDL.dll"
+      copy "$(SolutionDir)\SDL\$(Platform)\$(Configuration)\SDL2.dll" "$(TargetDir)\SDL2.dll"
     
     
       Copy SDL
@@ -178,7 +178,7 @@
       Windows
     
     
-      copy "$(SolutionDir)\SDL\$(Platform)\$(Configuration)\SDL.dll" "$(TargetDir)\SDL.dll"
+      copy "$(SolutionDir)\SDL\$(Platform)\$(Configuration)\SDL2.dll" "$(TargetDir)\SDL2.dll"
     
     
       Copy SDL
@@ -212,15 +212,15 @@
       Windows
     
     
-      copy "$(SolutionDir)\SDL\$(Platform)\$(Configuration)\SDL.dll" "$(TargetDir)\SDL.dll"
+      copy "$(SolutionDir)\SDL\$(Platform)\$(Configuration)\SDL2.dll" "$(TargetDir)\SDL2.dll"
     
     
       Copy SDL
     
   
   
-    
-    
+    
+    
   
   
     
diff --git a/VisualC/tests/testgamecontroller/testgamecontroller_VS2010.vcxproj b/VisualC/tests/testgamecontroller/testgamecontroller_VS2010.vcxproj
index 19049dc26..e2d7b6b05 100644
--- a/VisualC/tests/testgamecontroller/testgamecontroller_VS2010.vcxproj
+++ b/VisualC/tests/testgamecontroller/testgamecontroller_VS2010.vcxproj
@@ -105,7 +105,7 @@
       Windows
     
     
-      copy "$(SolutionDir)\SDL\$(Platform)\$(Configuration)\SDL.dll" "$(TargetDir)\SDL.dll"
+      copy "$(SolutionDir)\SDL\$(Platform)\$(Configuration)\SDL2.dll" "$(TargetDir)\SDL2.dll"
     
     
       Copy SDL
@@ -139,7 +139,7 @@
       Windows
     
     
-      copy "$(SolutionDir)\SDL\$(Platform)\$(Configuration)\SDL.dll" "$(TargetDir)\SDL.dll"
+      copy "$(SolutionDir)\SDL\$(Platform)\$(Configuration)\SDL2.dll" "$(TargetDir)\SDL2.dll"
     
     
       Copy SDL
@@ -174,7 +174,7 @@
       Windows
     
     
-      copy "$(SolutionDir)\SDL\$(Platform)\$(Configuration)\SDL.dll" "$(TargetDir)\SDL.dll"
+      copy "$(SolutionDir)\SDL\$(Platform)\$(Configuration)\SDL2.dll" "$(TargetDir)\SDL2.dll"
     
     
       Copy SDL
@@ -208,15 +208,15 @@
       Windows
     
     
-      copy "$(SolutionDir)\SDL\$(Platform)\$(Configuration)\SDL.dll" "$(TargetDir)\SDL.dll"
+      copy "$(SolutionDir)\SDL\$(Platform)\$(Configuration)\SDL2.dll" "$(TargetDir)\SDL2.dll"
     
     
       Copy SDL
     
   
   
-    
-    
+    
+    
   
   
     
diff --git a/VisualC/tests/testgl2/testgl2_VS2012.vcxproj b/VisualC/tests/testgl2/testgl2_VS2012.vcxproj
index 4f4aa9552..d02101fe7 100644
--- a/VisualC/tests/testgl2/testgl2_VS2012.vcxproj
+++ b/VisualC/tests/testgl2/testgl2_VS2012.vcxproj
@@ -110,7 +110,7 @@
       Windows
     
     
-      copy "$(SolutionDir)\SDL\$(Platform)\$(Configuration)\SDL.dll" "$(TargetDir)\SDL.dll"
+      copy "$(SolutionDir)\SDL\$(Platform)\$(Configuration)\SDL2.dll" "$(TargetDir)\SDL2.dll"
     
     
       Copy SDL
@@ -145,7 +145,7 @@
       Windows
     
     
-      copy "$(SolutionDir)\SDL\$(Platform)\$(Configuration)\SDL.dll" "$(TargetDir)\SDL.dll"
+      copy "$(SolutionDir)\SDL\$(Platform)\$(Configuration)\SDL2.dll" "$(TargetDir)\SDL2.dll"
     
     
       Copy SDL
@@ -181,7 +181,7 @@
       Windows
     
     
-      copy "$(SolutionDir)\SDL\$(Platform)\$(Configuration)\SDL.dll" "$(TargetDir)\SDL.dll"
+      copy "$(SolutionDir)\SDL\$(Platform)\$(Configuration)\SDL2.dll" "$(TargetDir)\SDL2.dll"
     
     
       Copy SDL
@@ -216,7 +216,7 @@
       Windows
     
     
-      copy "$(SolutionDir)\SDL\$(Platform)\$(Configuration)\SDL.dll" "$(TargetDir)\SDL.dll"
+      copy "$(SolutionDir)\SDL\$(Platform)\$(Configuration)\SDL2.dll" "$(TargetDir)\SDL2.dll"
     
     
       Copy SDL
@@ -226,9 +226,9 @@
     
   
   
-    
-    
-    
+    
+    
+    
   
   
   
diff --git a/VisualC/tests/testplatform/testplatform_VS2012.vcxproj b/VisualC/tests/testplatform/testplatform_VS2012.vcxproj
index d4f0475e9..8885fdf71 100644
--- a/VisualC/tests/testplatform/testplatform_VS2012.vcxproj
+++ b/VisualC/tests/testplatform/testplatform_VS2012.vcxproj
@@ -110,7 +110,7 @@
       true
     
     
-      copy "$(SolutionDir)\SDL\$(Platform)\$(Configuration)\SDL.dll" "$(TargetDir)\SDL.dll"
+      copy "$(SolutionDir)\SDL\$(Platform)\$(Configuration)\SDL2.dll" "$(TargetDir)\SDL2.dll"
     
     
       Copy SDL
@@ -144,7 +144,7 @@
       true
     
     
-      copy "$(SolutionDir)\SDL\$(Platform)\$(Configuration)\SDL.dll" "$(TargetDir)\SDL.dll"
+      copy "$(SolutionDir)\SDL\$(Platform)\$(Configuration)\SDL2.dll" "$(TargetDir)\SDL2.dll"
     
     
       Copy SDL
@@ -186,7 +186,7 @@
       true
     
     
-      copy "$(SolutionDir)\SDL\$(Platform)\$(Configuration)\SDL.dll" "$(TargetDir)\SDL.dll"
+      copy "$(SolutionDir)\SDL\$(Platform)\$(Configuration)\SDL2.dll" "$(TargetDir)\SDL2.dll"
     
     
       Copy SDL
@@ -221,15 +221,15 @@
       true
     
     
-      copy "$(SolutionDir)\SDL\$(Platform)\$(Configuration)\SDL.dll" "$(TargetDir)\SDL.dll"
+      copy "$(SolutionDir)\SDL\$(Platform)\$(Configuration)\SDL2.dll" "$(TargetDir)\SDL2.dll"
     
     
       Copy SDL
     
   
   
-    
-    
+    
+    
   
   
     
diff --git a/VisualC/tests/testpower/testpower_VS2012.vcxproj b/VisualC/tests/testpower/testpower_VS2012.vcxproj
index 3983a7bbb..60c8981c6 100644
--- a/VisualC/tests/testpower/testpower_VS2012.vcxproj
+++ b/VisualC/tests/testpower/testpower_VS2012.vcxproj
@@ -109,7 +109,7 @@
       Windows
     
     
-      copy "$(SolutionDir)\SDL\$(Platform)\$(Configuration)\SDL.dll" "$(TargetDir)\SDL.dll"
+      copy "$(SolutionDir)\SDL\$(Platform)\$(Configuration)\SDL2.dll" "$(TargetDir)\SDL2.dll"
     
     
       Copy SDL
@@ -143,7 +143,7 @@
       Windows
     
     
-      copy "$(SolutionDir)\SDL\$(Platform)\$(Configuration)\SDL.dll" "$(TargetDir)\SDL.dll"
+      copy "$(SolutionDir)\SDL\$(Platform)\$(Configuration)\SDL2.dll" "$(TargetDir)\SDL2.dll"
     
     
       Copy SDL
@@ -178,7 +178,7 @@
       Windows
     
     
-      copy "$(SolutionDir)\SDL\$(Platform)\$(Configuration)\SDL.dll" "$(TargetDir)\SDL.dll"
+      copy "$(SolutionDir)\SDL\$(Platform)\$(Configuration)\SDL2.dll" "$(TargetDir)\SDL2.dll"
     
     
       Copy SDL
@@ -212,15 +212,15 @@
       Windows
     
     
-      copy "$(SolutionDir)\SDL\$(Platform)\$(Configuration)\SDL.dll" "$(TargetDir)\SDL.dll"
+      copy "$(SolutionDir)\SDL\$(Platform)\$(Configuration)\SDL2.dll" "$(TargetDir)\SDL2.dll"
     
     
       Copy SDL
     
   
   
-    
-    
+    
+    
   
   
     
diff --git a/VisualC/tests/testshape/testshape_VS2012.vcxproj b/VisualC/tests/testshape/testshape_VS2012.vcxproj
index 847dfa50a..b7c4e5e1c 100644
--- a/VisualC/tests/testshape/testshape_VS2012.vcxproj
+++ b/VisualC/tests/testshape/testshape_VS2012.vcxproj
@@ -109,7 +109,7 @@
       Windows
     
     
-      copy "$(SolutionDir)\SDL\$(Platform)\$(Configuration)\SDL.dll" "$(TargetDir)\SDL.dll"
+      copy "$(SolutionDir)\SDL\$(Platform)\$(Configuration)\SDL2.dll" "$(TargetDir)\SDL2.dll"
     
     
       Copy SDL
@@ -143,7 +143,7 @@
       Windows
     
     
-      copy "$(SolutionDir)\SDL\$(Platform)\$(Configuration)\SDL.dll" "$(TargetDir)\SDL.dll"
+      copy "$(SolutionDir)\SDL\$(Platform)\$(Configuration)\SDL2.dll" "$(TargetDir)\SDL2.dll"
     
     
       Copy SDL
@@ -178,7 +178,7 @@
       Windows
     
     
-      copy "$(SolutionDir)\SDL\$(Platform)\$(Configuration)\SDL.dll" "$(TargetDir)\SDL.dll"
+      copy "$(SolutionDir)\SDL\$(Platform)\$(Configuration)\SDL2.dll" "$(TargetDir)\SDL2.dll"
     
     
       Copy SDL
@@ -212,15 +212,15 @@
       Windows
     
     
-      copy "$(SolutionDir)\SDL\$(Platform)\$(Configuration)\SDL.dll" "$(TargetDir)\SDL.dll"
+      copy "$(SolutionDir)\SDL\$(Platform)\$(Configuration)\SDL2.dll" "$(TargetDir)\SDL2.dll"
     
     
       Copy SDL
     
   
   
-    
-    
+    
+    
   
   
     
diff --git a/VisualC/tests/testsprite2/testsprite2_VS2012.vcxproj b/VisualC/tests/testsprite2/testsprite2_VS2012.vcxproj
index a633da983..c2ac6e0e3 100644
--- a/VisualC/tests/testsprite2/testsprite2_VS2012.vcxproj
+++ b/VisualC/tests/testsprite2/testsprite2_VS2012.vcxproj
@@ -109,7 +109,7 @@
       Windows
     
     
-      copy "$(SolutionDir)\SDL\$(Platform)\$(Configuration)\SDL.dll" "$(TargetDir)\SDL.dll"
+      copy "$(SolutionDir)\SDL\$(Platform)\$(Configuration)\SDL2.dll" "$(TargetDir)\SDL2.dll"
 copy "$(SolutionDir)\..\test\icon.bmp" "$(TargetDir)\icon.bmp"
     
     
@@ -144,7 +144,7 @@ copy "$(SolutionDir)\..\test\icon.bmp" "$(TargetDir)\icon.bmp"
       Windows
     
     
-      copy "$(SolutionDir)\SDL\$(Platform)\$(Configuration)\SDL.dll" "$(TargetDir)\SDL.dll"
+      copy "$(SolutionDir)\SDL\$(Platform)\$(Configuration)\SDL2.dll" "$(TargetDir)\SDL2.dll"
 copy "$(SolutionDir)\..\test\icon.bmp" "$(TargetDir)\icon.bmp"
     
     
@@ -180,7 +180,7 @@ copy "$(SolutionDir)\..\test\icon.bmp" "$(TargetDir)\icon.bmp"
       Windows
     
     
-      copy "$(SolutionDir)\SDL\$(Platform)\$(Configuration)\SDL.dll" "$(TargetDir)\SDL.dll"
+      copy "$(SolutionDir)\SDL\$(Platform)\$(Configuration)\SDL2.dll" "$(TargetDir)\SDL2.dll"
 copy "$(SolutionDir)\..\test\icon.bmp" "$(TargetDir)\icon.bmp"
     
     
@@ -215,7 +215,7 @@ copy "$(SolutionDir)\..\test\icon.bmp" "$(TargetDir)\icon.bmp"
       Windows
     
     
-      copy "$(SolutionDir)\SDL\$(Platform)\$(Configuration)\SDL.dll" "$(TargetDir)\SDL.dll"
+      copy "$(SolutionDir)\SDL\$(Platform)\$(Configuration)\SDL2.dll" "$(TargetDir)\SDL2.dll"
 copy "$(SolutionDir)\..\test\icon.bmp" "$(TargetDir)\icon.bmp"
     
     
@@ -226,9 +226,9 @@ copy "$(SolutionDir)\..\test\icon.bmp" "$(TargetDir)\icon.bmp"
     
   
   
-    
-    
-    
+    
+    
+    
   
   
   
diff --git a/VisualC/tests/testvidinfo/testvidinfo_VS2010.vcxproj b/VisualC/tests/testvidinfo/testvidinfo_VS2010.vcxproj
index 574606b57..af69df17d 100644
--- a/VisualC/tests/testvidinfo/testvidinfo_VS2010.vcxproj
+++ b/VisualC/tests/testvidinfo/testvidinfo_VS2010.vcxproj
@@ -139,7 +139,7 @@
       Windows
     
     
-      copy "$(SolutionDir)\SDL\$(Platform)\$(Configuration)\SDL2.dll" "$(TargetDir)\SDL.dl"l
+      copy "$(SolutionDir)\SDL\$(Platform)\$(Configuration)\SDL2.dll" "$(TargetDir)\SDL2.dll"
     
     
       Copy SDL
diff --git a/src/test/SDL_test_common.c b/src/test/SDL_test_common.c
index 304e74de5..dd7c233ae 100644
--- a/src/test/SDL_test_common.c
+++ b/src/test/SDL_test_common.c
@@ -325,7 +325,7 @@ SDLTest_CommonArg(SDLTest_CommonState * state, int index)
         if (!argv[index]) {
             return -1;
         }
-        state->scale = SDL_atof(argv[index]);
+        state->scale = (float)SDL_atof(argv[index]);
         return 2;
     }
     if (SDL_strcasecmp(argv[index], "--depth") == 0) {
@@ -1262,7 +1262,7 @@ SDLTest_CommonEvent(SDLTest_CommonState * state, SDL_Event * event, int *done)
                 /* Ctrl-G toggle grab */
                 SDL_Window *window = SDL_GetWindowFromID(event->key.windowID);
                 if (window) {
-                    SDL_SetWindowGrab(window, !SDL_GetWindowGrab(window));
+                    SDL_SetWindowGrab(window, !SDL_GetWindowGrab(window) ? SDL_TRUE : SDL_FALSE);
                 }
             }
             break;
@@ -1283,7 +1283,7 @@ SDLTest_CommonEvent(SDLTest_CommonState * state, SDL_Event * event, int *done)
         case SDLK_r:
             if (event->key.keysym.mod & KMOD_CTRL) {
                 /* Ctrl-R toggle mouse relative mode */
-                SDL_SetRelativeMouseMode(!SDL_GetRelativeMouseMode());
+                SDL_SetRelativeMouseMode(!SDL_GetRelativeMouseMode() ? SDL_TRUE : SDL_FALSE);
             }
             break;
         case SDLK_z:
@@ -1315,7 +1315,7 @@ SDLTest_CommonEvent(SDLTest_CommonState * state, SDL_Event * event, int *done)
                 SDL_Window *window = SDL_GetWindowFromID(event->key.windowID);
                 if (window) {
                     const Uint32 flags = SDL_GetWindowFlags(window);
-                    const SDL_bool b = ((flags & SDL_WINDOW_BORDERLESS) != 0);
+                    const SDL_bool b = ((flags & SDL_WINDOW_BORDERLESS) != 0) ? SDL_TRUE : SDL_FALSE;
                     SDL_SetWindowBordered(window, b);
                 }
             }

From 5480cdd85c5909dfa9265b40c52c9dcbc4cacbdb Mon Sep 17 00:00:00 2001
From: "Yuri K. Schlesner" 
Date: Wed, 29 May 2013 06:31:48 -0500
Subject: [PATCH 168/542] Re-apply texture filter when resetting direct3d
 renderer.

---
 src/render/direct3d/SDL_render_d3d.c | 1 +
 1 file changed, 1 insertion(+)

diff --git a/src/render/direct3d/SDL_render_d3d.c b/src/render/direct3d/SDL_render_d3d.c
index 1ab27ab7e..e59f6d419 100644
--- a/src/render/direct3d/SDL_render_d3d.c
+++ b/src/render/direct3d/SDL_render_d3d.c
@@ -384,6 +384,7 @@ D3D_Reset(SDL_Renderer * renderer)
                                     D3DCULL_NONE);
     IDirect3DDevice9_SetRenderState(data->device, D3DRS_LIGHTING, FALSE);
     IDirect3DDevice9_GetRenderTarget(data->device, 0, &data->defaultRenderTarget);
+    data->scaleMode = D3DTEXF_FORCE_DWORD;
     return 0;
 }
 

From 8792a8d88aa8b5b81f7bb7760c8da04e1f4a9cd9 Mon Sep 17 00:00:00 2001
From: Sam Lantinga 
Date: Sat, 1 Jun 2013 08:57:17 -0700
Subject: [PATCH 169/542] Default the minimum required version to 2.0.0

---
 sdl2.m4 | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/sdl2.m4 b/sdl2.m4
index 93bc4b0f1..4c89fc4b5 100644
--- a/sdl2.m4
+++ b/sdl2.m4
@@ -21,7 +21,7 @@ AC_ARG_WITH(sdl-exec-prefix,[  --with-sdl-exec-prefix=PFX Exec prefix where SDL
 AC_ARG_ENABLE(sdltest, [  --disable-sdltest       Do not try to compile and run a test SDL program],
 		    , enable_sdltest=yes)
 
-  min_sdl_version=ifelse([$1], ,0.9.0,$1)
+  min_sdl_version=ifelse([$1], ,2.0.0,$1)
 
   if test "x$sdl_prefix$sdl_exec_prefix" = x ; then
     PKG_CHECK_MODULES([SDL], [sdl2 >= $min_sdl_version],

From 17fab0296b2cac782c725224bbdcf66d1ce7c7f8 Mon Sep 17 00:00:00 2001
From: Philipp Wiesemann 
Date: Sat, 1 Jun 2013 21:09:36 +0200
Subject: [PATCH 170/542] Corrected indentation of license.

---
 src/events/SDL_gesture.c | 8 ++++----
 1 file changed, 4 insertions(+), 4 deletions(-)

diff --git a/src/events/SDL_gesture.c b/src/events/SDL_gesture.c
index f7c8c8932..8e764318a 100644
--- a/src/events/SDL_gesture.c
+++ b/src/events/SDL_gesture.c
@@ -11,11 +11,11 @@
   freely, subject to the following restrictions:
 
   1. The origin of this software must not be misrepresented; you must not
-  claim that you wrote the original software. If you use this software
-  in a product, an acknowledgment in the product documentation would be
-  appreciated but is not required.
+     claim that you wrote the original software. If you use this software
+     in a product, an acknowledgment in the product documentation would be
+     appreciated but is not required.
   2. Altered source versions must be plainly marked as such, and must not be
-  misrepresented as being the original software.
+     misrepresented as being the original software.
   3. This notice may not be removed or altered from any source distribution.
 */
 

From 6096e60a4b5cf55dae82d711a6c375c75dfc069c Mon Sep 17 00:00:00 2001
From: Philipp Wiesemann 
Date: Sat, 1 Jun 2013 21:11:52 +0200
Subject: [PATCH 171/542] Removed debug output.

---
 src/video/android/SDL_androidvideo.c | 1 -
 1 file changed, 1 deletion(-)

diff --git a/src/video/android/SDL_androidvideo.c b/src/video/android/SDL_androidvideo.c
index 4b4a85196..6dcb81e70 100644
--- a/src/video/android/SDL_androidvideo.c
+++ b/src/video/android/SDL_androidvideo.c
@@ -83,7 +83,6 @@ Android_DeleteDevice(SDL_VideoDevice * device)
 static SDL_VideoDevice *
 Android_CreateDevice(int devindex)
 {
-    printf("Creating video device\n");
     SDL_VideoDevice *device;
     SDL_VideoData *data;
 

From 3472d792a99c4b082723ea756ab4860eb49dde50 Mon Sep 17 00:00:00 2001
From: Philipp Wiesemann 
Date: Sat, 1 Jun 2013 21:17:43 +0200
Subject: [PATCH 172/542] Fixed implicit function declarations and their
 warnings. For the SDL_SetMouseFocus() and SDL_SetKeyboardFocus().

---
 src/video/android/SDL_androidwindow.c | 2 ++
 1 file changed, 2 insertions(+)

diff --git a/src/video/android/SDL_androidwindow.c b/src/video/android/SDL_androidwindow.c
index b3c6cd9a4..70e244e1a 100644
--- a/src/video/android/SDL_androidwindow.c
+++ b/src/video/android/SDL_androidwindow.c
@@ -23,6 +23,8 @@
 #if SDL_VIDEO_DRIVER_ANDROID
 
 #include "../SDL_sysvideo.h"
+#include "../../events/SDL_keyboard_c.h"
+#include "../../events/SDL_mouse_c.h"
 
 #include "SDL_androidvideo.h"
 #include "SDL_androidwindow.h"

From 226679f4bb1a1920f7b7907b0fec414ab3518af7 Mon Sep 17 00:00:00 2001
From: Sam Lantinga 
Date: Sat, 1 Jun 2013 12:53:06 -0700
Subject: [PATCH 173/542] The standard fat gcc scripts work well with SDL 2.0

---
 build-scripts/fatbuild.sh | 294 --------------------------------------
 build-scripts/g++-fat.sh  | 103 +++++++++++++
 build-scripts/gcc-fat.sh  | 103 +++++++++++++
 3 files changed, 206 insertions(+), 294 deletions(-)
 delete mode 100755 build-scripts/fatbuild.sh
 create mode 100755 build-scripts/g++-fat.sh
 create mode 100755 build-scripts/gcc-fat.sh

diff --git a/build-scripts/fatbuild.sh b/build-scripts/fatbuild.sh
deleted file mode 100755
index 807238f4b..000000000
--- a/build-scripts/fatbuild.sh
+++ /dev/null
@@ -1,294 +0,0 @@
-#!/bin/sh
-#
-# Build a fat binary on Mac OS X, thanks Ryan!
-
-# Number of CPUs (for make -j)
-NCPU=`sysctl -n hw.ncpu`
-if test x$NJOB = x; then
-    NJOB=$NCPU
-fi
-
-# Generic, cross-platform CFLAGS you always want go here.
-CFLAGS="-O3 -g -pipe"
-
-# We dynamically load X11, so using the system X11 headers is fine.
-BASE_CONFIG_FLAGS="--build=`uname -p`-apple-darwin \
---x-includes=/usr/X11R6/include --x-libraries=/usr/X11R6/lib"
-
-# PowerPC 32-bit compiler flags
-CONFIG_PPC="--host=powerpc-apple-darwin"
-CC_PPC="gcc-4.0"
-CXX_PPC="g++-4.0"
-BUILD_FLAGS_PPC="-arch ppc -mmacosx-version-min=10.4"
-
-# Intel 32-bit compiler flags
-CONFIG_X86="--host=i386-apple-darwin"
-CC_X86="gcc"
-CXX_X86="g++"
-BUILD_FLAGS_X86="-arch i386 -mmacosx-version-min=10.4"
-
-# Intel 64-bit compiler flags
-CONFIG_X64="--host=x86_64-apple-darwin"
-CC_X64="gcc"
-CXX_X64="g++"
-BUILD_FLAGS_X64="-arch x86_64 -mmacosx-version-min=10.6"
-
-#
-# Find the configure script
-#
-srcdir=`dirname $0`/..
-srcdir=`cd $srcdir && pwd`
-auxdir=$srcdir/build-scripts
-cd $srcdir
-
-allow_ppc="yes"
-which gcc-4.0 >/dev/null 2>/dev/null
-if [ "x$?" = "x1" ]; then
-    #echo "WARNING: Can't find gcc-4.0, which means you don't have Xcode 3."
-    #echo "WARNING: Therefore, we can't do PowerPC support."
-    allow_ppc="no"
-fi
-
-#
-# Figure out which phase to build:
-# all,
-# configure, configure-ppc, configure-x86, configure-x64
-# make, make-ppc, make-x86, make-x64, merge
-# install
-# clean
-if test x"$1" = x; then
-    phase=all
-else
-    phase="$1"
-fi
-case $phase in
-    all)
-        configure_ppc="$allow_ppc"
-        configure_x86="yes"
-        configure_x64="yes"
-        make_ppc="$allow_ppc"
-        make_x86="yes"
-        make_x64="yes"
-        merge="yes"
-        ;;
-    configure)
-        configure_ppc="$allow_ppc"
-        configure_x86="yes"
-        configure_x64="yes"
-        ;;
-    configure-ppc)
-        configure_ppc="$allow_ppc"
-        ;;
-    configure-x86)
-        configure_x86="yes"
-        ;;
-    configure-x64)
-        configure_x64="yes"
-        ;;
-    make)
-        make_ppc="$allow_ppc"
-        make_x86="yes"
-        make_x64="yes"
-        merge="yes"
-        ;;
-    make-ppc)
-        make_ppc="$allow_ppc"
-        ;;
-    make-x86)
-        make_x86="yes"
-        ;;
-    make-x64)
-        make_x64="yes"
-        ;;
-    merge)
-        merge="yes"
-        ;;
-    install)
-        install_bin="yes"
-        install_hdrs="yes"
-        install_lib="yes"
-        install_data="yes"
-        ;;
-    install-bin)
-        install_bin="yes"
-        ;;
-    install-hdrs)
-        install_hdrs="yes"
-        ;;
-    install-lib)
-        install_lib="yes"
-        ;;
-    install-data)
-        install_data="yes"
-        ;;
-    clean)
-        clean_ppc="yes"
-        clean_x86="yes"
-        clean_x64="yes"
-        ;;
-    clean-ppc)
-        clean_ppc="yes"
-        ;;
-    clean-x86)
-        clean_x86="yes"
-        ;;
-    clean-x64)
-        clean_x64="yes"
-        ;;
-    *)
-        echo "Usage: $0 [all|configure[-ppc|-x86|-x64]|make[-ppc|-x86|-x64]|merge|install|clean[-ppc|-x86|-x64]]"
-        exit 1
-        ;;
-esac
-case `uname -p` in
-    *86)
-        native_path=x86
-        ;;
-    *powerpc)
-        native_path=ppc
-        ;;
-    x86_64)
-        native_path=x64
-        ;;
-    *)
-        echo "Couldn't figure out native architecture path"
-        exit 1
-        ;;
-esac
-
-#
-# Create the build directories
-#
-for dir in build build/ppc build/x86 build/x64; do
-    if test -d $dir; then
-        :
-    else
-        mkdir $dir || exit 1
-    fi
-done
-
-
-#
-# Build the PowerPC 32-bit binary
-#
-if test x$configure_ppc = xyes; then
-    (cd build/ppc && \
-     sh ../../configure $BASE_CONFIG_FLAGS $CONFIG_PPC CC="$CC_PPC" CXX="$CXX_PPC" CFLAGS="$CFLAGS $BUILD_FLAGS_PPC $CFLAGS_PPC" LDFLAGS="$BUILD_FLAGS_PPC $LFLAGS_PPC") || exit 2
-fi
-if test x$make_ppc = xyes; then
-    (cd build/ppc && make -j$NJOB) || exit 3
-fi
-#
-# Build the Intel 32-bit binary
-#
-if test x$configure_x86 = xyes; then
-    (cd build/x86 && \
-     sh ../../configure $BASE_CONFIG_FLAGS $CONFIG_X86 CC="$CC_X86" CXX="$CXX_X86" CFLAGS="$CFLAGS $BUILD_FLAGS_X86 $CFLAGS_X86" LDFLAGS="$BUILD_FLAGS_X86 $LFLAGS_X86") || exit 2
-fi
-if test x$make_x86 = xyes; then
-    (cd build/x86 && make -j$NJOB) || exit 3
-fi
-
-#
-# Build the Intel 64-bit binary
-#
-if test x$configure_x64 = xyes; then
-    (cd build/x64 && \
-     sh ../../configure $BASE_CONFIG_FLAGS $CONFIG_X64 CC="$CC_X64" CXX="$CXX_X64" CFLAGS="$CFLAGS $BUILD_FLAGS_X64 $CFLAGS_X64" LDFLAGS="$BUILD_FLAGS_X64 $LFLAGS_X64") || exit 2
-fi
-if test x$make_x64 = xyes; then
-    (cd build/x64 && make -j$NJOB) || exit 3
-fi
-
-#
-# Combine into fat binary
-#
-if test x$merge = xyes; then
-    output=.libs
-    sh $auxdir/mkinstalldirs build/$output
-    cd build
-    target=`find . -mindepth 4 -maxdepth 4 -type f -name '*.dylib' | head -1 | sed 's|.*/||'`
-    (lipo -create -o $output/$target `find . -mindepth 4 -maxdepth 4 -type f -name "*.dylib"` &&
-     ln -sf $target $output/libSDL2.dylib &&
-     lipo -create -o $output/libSDL2.a */build/.libs/libSDL2.a &&
-     cp $native_path/build/.libs/libSDL2.la $output &&
-     cp $native_path/build/.libs/libSDL2.lai $output &&
-     cp $native_path/build/libSDL2.la . &&
-     lipo -create -o libSDL2main.a */build/libSDL2main.a &&
-     lipo -create -o libSDL2_test.a */build/libSDL2_test.a &&
-     echo "Build complete!" &&
-     echo "Files can be found in the build directory.") || exit 4
-    cd ..
-fi
-
-#
-# Install
-#
-do_install()
-{
-    echo $*
-    $* || exit 5
-}
-if test x$prefix = x; then
-    prefix=/usr/local
-fi
-if test x$exec_prefix = x; then
-    exec_prefix=$prefix
-fi
-if test x$bindir = x; then
-    bindir=$exec_prefix/bin
-fi
-if test x$libdir = x; then
-    libdir=$exec_prefix/lib
-fi
-if test x$includedir = x; then
-    includedir=$prefix/include
-fi
-if test x$datadir = x; then
-    datadir=$prefix/share
-fi
-if test x$mandir = x; then
-    mandir=$prefix/man
-fi
-if test x$install_bin = xyes; then
-    do_install sh $auxdir/mkinstalldirs $bindir
-    do_install /usr/bin/install -c -m 755 build/$native_path/sdl2-config $bindir/sdl2-config
-fi
-if test x$install_hdrs = xyes; then
-    do_install sh $auxdir/mkinstalldirs $includedir/SDL2
-    for src in $srcdir/include/*.h; do \
-        file=`echo $src | sed -e 's|^.*/||'`; \
-        do_install /usr/bin/install -c -m 644 $src $includedir/SDL2/$file; \
-    done
-    do_install /usr/bin/install -c -m 644 $srcdir/include/SDL_config_macosx.h $includedir/SDL2/SDL_config.h
-fi
-if test x$install_lib = xyes; then
-    do_install sh $auxdir/mkinstalldirs $libdir
-    do_install sh build/$native_path/libtool --mode=install /usr/bin/install -c  build/libSDL2.la $libdir/libSDL2.la
-    do_install /usr/bin/install -c -m 644 build/libSDL2main.a $libdir/libSDL2main.a
-    do_install ranlib $libdir/libSDL2main.a
-    do_install /usr/bin/install -c -m 644 build/libSDL2_test.a $libdir/libSDL2_test.a
-    do_install ranlib $libdir/libSDL2_test.a
-fi
-if test x$install_data = xyes; then
-    do_install sh $auxdir/mkinstalldirs $datadir/aclocal
-    do_install /usr/bin/install -c -m 644 $srcdir/sdl2.m4 $datadir/aclocal/sdl2.m4
-fi
-
-#
-# Clean up
-#
-do_clean()
-{
-    echo $*
-    $* || exit 6
-}
-if test x$clean_ppc = xyes; then
-    do_clean rm -r build/ppc
-fi
-if test x$clean_x86 = xyes; then
-    do_clean rm -r build/x86
-fi
-if test x$clean_x64 = xyes; then
-    do_clean rm -r build/x64
-fi
diff --git a/build-scripts/g++-fat.sh b/build-scripts/g++-fat.sh
new file mode 100755
index 000000000..3c4cab717
--- /dev/null
+++ b/build-scripts/g++-fat.sh
@@ -0,0 +1,103 @@
+#!/bin/sh
+#
+# Build Universal binaries on Mac OS X, thanks Ryan!
+#
+# Usage: ./configure CXX="sh g++-fat.sh" && make && rm -rf x86 x64
+
+DEVELOPER="`xcode-select -print-path`/Platforms/MacOSX.platform/Developer"
+
+# Intel 32-bit compiler flags (10.6 runtime compatibility)
+GCC_COMPILE_X86="g++ -arch i386 -mmacosx-version-min=10.6 \
+-DMAC_OS_X_VERSION_MIN_REQUIRED=1040 \
+-I/usr/local/include"
+
+GCC_LINK_X86="-mmacosx-version-min=10.6"
+
+# Intel 64-bit compiler flags (10.6 runtime compatibility)
+GCC_COMPILE_X64="g++ -arch x86_64 -mmacosx-version-min=10.6 \
+-DMAC_OS_X_VERSION_MIN_REQUIRED=1050 \
+-I/usr/local/include"
+
+GCC_LINK_X64="-mmacosx-version-min=10.6"
+
+# Output both PowerPC and Intel object files
+args="$*"
+compile=yes
+link=yes
+while test x$1 != x; do
+    case $1 in
+        --version) exec g++ $1;;
+        -v) exec g++ $1;;
+        -V) exec g++ $1;;
+        -print-prog-name=*) exec g++ $1;;
+        -print-search-dirs) exec g++ $1;;
+        -E) GCC_COMPILE_X86="$GCC_COMPILE_X86 -E"
+            GCC_COMPILE_X64="$GCC_COMPILE_X64 -E"
+            compile=no; link=no;;
+        -c) link=no;;
+        -o) output=$2;;
+        *.c|*.cc|*.cpp|*.S) source=$1;;
+    esac
+    shift
+done
+if test x$link = xyes; then
+    GCC_COMPILE_X86="$GCC_COMPILE_X86 $GCC_LINK_X86"
+    GCC_COMPILE_X64="$GCC_COMPILE_X64 $GCC_LINK_X64"
+fi
+if test x"$output" = x; then
+    if test x$link = xyes; then
+        output=a.out
+    elif test x$compile = xyes; then
+        output=`echo $source | sed -e 's|.*/||' -e 's|\(.*\)\.[^\.]*|\1|'`.o
+    fi
+fi
+
+# Compile X86 32-bit
+if test x"$output" != x; then
+    dir=x86/`dirname $output`
+    if test -d $dir; then
+        :
+    else
+        mkdir -p $dir
+    fi
+fi
+set -- $args
+while test x$1 != x; do
+    if test -f "x86/$1" && test "$1" != "$output"; then
+        x86_args="$x86_args x86/$1"
+    else
+        x86_args="$x86_args $1"
+    fi
+    shift
+done
+$GCC_COMPILE_X86 $x86_args || exit $?
+if test x"$output" != x; then
+    cp $output x86/$output
+fi
+
+# Compile X86 32-bit
+if test x"$output" != x; then
+    dir=x64/`dirname $output`
+    if test -d $dir; then
+        :
+    else
+        mkdir -p $dir
+    fi
+fi
+set -- $args
+while test x$1 != x; do
+    if test -f "x64/$1" && test "$1" != "$output"; then
+        x64_args="$x64_args x64/$1"
+    else
+        x64_args="$x64_args $1"
+    fi
+    shift
+done
+$GCC_COMPILE_X64 $x64_args || exit $?
+if test x"$output" != x; then
+    cp $output x64/$output
+fi
+
+if test x"$output" != x; then
+    lipo -create -o $output x86/$output x64/$output
+fi
diff --git a/build-scripts/gcc-fat.sh b/build-scripts/gcc-fat.sh
new file mode 100755
index 000000000..1601c9db8
--- /dev/null
+++ b/build-scripts/gcc-fat.sh
@@ -0,0 +1,103 @@
+#!/bin/sh
+#
+# Build Universal binaries on Mac OS X, thanks Ryan!
+#
+# Usage: ./configure CC="sh gcc-fat.sh" && make && rm -rf x86 x64
+
+DEVELOPER="`xcode-select -print-path`/Platforms/MacOSX.platform/Developer"
+
+# Intel 32-bit compiler flags (10.6 runtime compatibility)
+GCC_COMPILE_X86="gcc -arch i386 -mmacosx-version-min=10.6 \
+-DMAC_OS_X_VERSION_MIN_REQUIRED=1040 \
+-I/usr/local/include"
+
+GCC_LINK_X86="-mmacosx-version-min=10.6"
+
+# Intel 64-bit compiler flags (10.6 runtime compatibility)
+GCC_COMPILE_X64="gcc -arch x86_64 -mmacosx-version-min=10.6 \
+-DMAC_OS_X_VERSION_MIN_REQUIRED=1050 \
+-I/usr/local/include"
+
+GCC_LINK_X64="-mmacosx-version-min=10.6"
+
+# Output both PowerPC and Intel object files
+args="$*"
+compile=yes
+link=yes
+while test x$1 != x; do
+    case $1 in
+        --version) exec gcc $1;;
+        -v) exec gcc $1;;
+        -V) exec gcc $1;;
+        -print-prog-name=*) exec gcc $1;;
+        -print-search-dirs) exec gcc $1;;
+        -E) GCC_COMPILE_X86="$GCC_COMPILE_X86 -E"
+            GCC_COMPILE_X64="$GCC_COMPILE_X64 -E"
+            compile=no; link=no;;
+        -c) link=no;;
+        -o) output=$2;;
+        *.c|*.cc|*.cpp|*.S) source=$1;;
+    esac
+    shift
+done
+if test x$link = xyes; then
+    GCC_COMPILE_X86="$GCC_COMPILE_X86 $GCC_LINK_X86"
+    GCC_COMPILE_X64="$GCC_COMPILE_X64 $GCC_LINK_X64"
+fi
+if test x"$output" = x; then
+    if test x$link = xyes; then
+        output=a.out
+    elif test x$compile = xyes; then
+        output=`echo $source | sed -e 's|.*/||' -e 's|\(.*\)\.[^\.]*|\1|'`.o
+    fi
+fi
+
+# Compile X86 32-bit
+if test x"$output" != x; then
+    dir=x86/`dirname $output`
+    if test -d $dir; then
+        :
+    else
+        mkdir -p $dir
+    fi
+fi
+set -- $args
+while test x$1 != x; do
+    if test -f "x86/$1" && test "$1" != "$output"; then
+        x86_args="$x86_args x86/$1"
+    else
+        x86_args="$x86_args $1"
+    fi
+    shift
+done
+$GCC_COMPILE_X86 $x86_args || exit $?
+if test x"$output" != x; then
+    cp $output x86/$output
+fi
+
+# Compile X86 32-bit
+if test x"$output" != x; then
+    dir=x64/`dirname $output`
+    if test -d $dir; then
+        :
+    else
+        mkdir -p $dir
+    fi
+fi
+set -- $args
+while test x$1 != x; do
+    if test -f "x64/$1" && test "$1" != "$output"; then
+        x64_args="$x64_args x64/$1"
+    else
+        x64_args="$x64_args $1"
+    fi
+    shift
+done
+$GCC_COMPILE_X64 $x64_args || exit $?
+if test x"$output" != x; then
+    cp $output x64/$output
+fi
+
+if test x"$output" != x; then
+    lipo -create -o $output x86/$output x64/$output
+fi

From a54ea6ce9fe66d210a50b213575834a3e27a66ff Mon Sep 17 00:00:00 2001
From: Sam Lantinga 
Date: Sun, 2 Jun 2013 01:08:14 -0700
Subject: [PATCH 174/542] Fixed testnative on Mac OS X, which no longer ships
 X11 by default.

---
 test/Makefile.in | 6 ++----
 1 file changed, 2 insertions(+), 4 deletions(-)

diff --git a/test/Makefile.in b/test/Makefile.in
index 48f7b1f81..c0dc376f6 100644
--- a/test/Makefile.in
+++ b/test/Makefile.in
@@ -150,10 +150,8 @@ testlock$(EXE): $(srcdir)/testlock.c
 
 ifeq (@ISMACOSX@,true)
 testnative$(EXE): $(srcdir)/testnative.c \
-			$(srcdir)/testnativecocoa.m \
-			$(srcdir)/testnativew32.c \
-			$(srcdir)/testnativex11.c
-	$(CC) -o $@ $^ $(CFLAGS) $(LIBS) -L/usr/X11/lib -lX11 -framework Cocoa
+			$(srcdir)/testnativecocoa.m
+	$(CC) -o $@ $^ $(CFLAGS) $(LIBS) -framework Cocoa
 endif
 
 ifeq (@ISWINDOWS@,true)

From cb62e2540a8d12c8b108a84c18d2c469dd0dadff Mon Sep 17 00:00:00 2001
From: Sam Lantinga 
Date: Sun, 2 Jun 2013 01:09:12 -0700
Subject: [PATCH 175/542] Fixed bug 1882 - SDL_GetKeyboardState should return
 const.

Yuri K. Schlesner

The array returned by SDL_GetKeyboardState is also used internally by SDL to keep track of pressed/released keys and must not be modified, lest weird behaviour occurs. Because of this I believe it's return type should be changed to return a const pointer, which will provide a code indication of that fact.
---
 include/SDL_keyboard.h    | 4 ++--
 src/events/SDL_keyboard.c | 2 +-
 2 files changed, 3 insertions(+), 3 deletions(-)

diff --git a/include/SDL_keyboard.h b/include/SDL_keyboard.h
index 9b44df322..ece05b9bf 100644
--- a/include/SDL_keyboard.h
+++ b/include/SDL_keyboard.h
@@ -66,13 +66,13 @@ extern DECLSPEC SDL_Window * SDLCALL SDL_GetKeyboardFocus(void);
  *
  *  \b Example:
  *  \code
- *  Uint8 *state = SDL_GetKeyboardState(NULL);
+ *  const Uint8 *state = SDL_GetKeyboardState(NULL);
  *  if ( state[SDL_SCANCODE_RETURN] )   {
  *      printf(" is pressed.\n");
  *  }
  *  \endcode
  */
-extern DECLSPEC Uint8 *SDLCALL SDL_GetKeyboardState(int *numkeys);
+extern DECLSPEC const Uint8 *SDLCALL SDL_GetKeyboardState(int *numkeys);
 
 /**
  *  \brief Get the current key modifier state for the keyboard.
diff --git a/src/events/SDL_keyboard.c b/src/events/SDL_keyboard.c
index 680091f42..468c3d109 100644
--- a/src/events/SDL_keyboard.c
+++ b/src/events/SDL_keyboard.c
@@ -829,7 +829,7 @@ SDL_KeyboardQuit(void)
 {
 }
 
-Uint8 *
+const Uint8 *
 SDL_GetKeyboardState(int *numkeys)
 {
     SDL_Keyboard *keyboard = &SDL_keyboard;

From d2a0d0fb585f6250d1d57f302fa78812f2f84bd7 Mon Sep 17 00:00:00 2001
From: Sam Lantinga 
Date: Sun, 2 Jun 2013 01:12:29 -0700
Subject: [PATCH 176/542] Fixed bug 1881 - SDL will not compile with
 "SDL_THREADS" disabled.

MakoEnergy02

I am attempting to compile SDL on WindowsXP 32-bit, using MinGW.  The problem I am having is when I attempt to compile, when it gets to "SDL_systhread.c" it errors:

C:\Repos\Mezzanine\Mezzanine\libincludes\common\sdlsrc\SDL\src\thread\generic\SDL_systhread.c|29|error: conflicting types for 'SDL_SYS_CreateThread'
C:\Repos\Mezzanine\Mezzanine\libincludes\common\sdlsrc\SDL\src\thread\generic\..\SDL_systhread.h|35|note: previous declaration of 'SDL_SYS_CreateThread' was here

I do have SDL_THREADS disabled in my cmake configuration as I do not want or need SDL making threads for me, I have another thread provider.  It seems the generic "dummy" implementation does not account for the two extra parameters needed for the "SDL_SYS_CreateThread" method when "SDL_PASSED_BEGINTHREAD_ENDTHREAD" is defined.
---
 src/thread/generic/SDL_systhread.c | 7 +++++++
 1 file changed, 7 insertions(+)

diff --git a/src/thread/generic/SDL_systhread.c b/src/thread/generic/SDL_systhread.c
index deebc64fb..139f8ac03 100644
--- a/src/thread/generic/SDL_systhread.c
+++ b/src/thread/generic/SDL_systhread.c
@@ -25,8 +25,15 @@
 #include "SDL_thread.h"
 #include "../SDL_systhread.h"
 
+#ifdef SDL_PASSED_BEGINTHREAD_ENDTHREAD
+int
+SDL_SYS_CreateThread(SDL_Thread * thread, void *args,
+                     pfnSDL_CurrentBeginThread pfnBeginThread,
+                     pfnSDL_CurrentEndThread pfnEndThread)
+#else
 int
 SDL_SYS_CreateThread(SDL_Thread * thread, void *args)
+#endif /* SDL_PASSED_BEGINTHREAD_ENDTHREAD */
 {
     return SDL_SetError("Threads are not supported on this platform");
 }

From cd88135edc0ce4a013dabd8b669c7691613a759c Mon Sep 17 00:00:00 2001
From: Sam Lantinga 
Date: Sun, 2 Jun 2013 01:35:38 -0700
Subject: [PATCH 177/542] Gyrations to get the code to compile with the latest
 version of mingw-w64 as well as Visual Studio. I think in this case mingw-w64
 is incorrect in defining the GUID instead of declaring it like Visual Studio
 and the older mingw32 compilers.

---
 src/joystick/windows/SDL_dxjoystick.c | 35 ++++++++++++++++++++++-----
 1 file changed, 29 insertions(+), 6 deletions(-)

diff --git a/src/joystick/windows/SDL_dxjoystick.c b/src/joystick/windows/SDL_dxjoystick.c
index 48d4272c1..d95711e11 100644
--- a/src/joystick/windows/SDL_dxjoystick.c
+++ b/src/joystick/windows/SDL_dxjoystick.c
@@ -35,19 +35,44 @@
 #include "SDL_error.h"
 #include "SDL_assert.h"
 #include "SDL_events.h"
-#include "SDL_joystick.h"
-#include "../SDL_sysjoystick.h"
-#define INITGUID /* Only set here, if set twice will cause mingw32 to break. */
-#include "SDL_dxjoystick_c.h"
 #include "SDL_thread.h"
 #include "SDL_timer.h"
 #include "SDL_mutex.h"
 #include "SDL_events.h"
 #include "SDL_hints.h"
+#include "SDL_joystick.h"
+#include "../SDL_sysjoystick.h"
 #if !SDL_EVENTS_DISABLED
 #include "../../events/SDL_events_c.h"
 #endif
 
+/* The latest version of mingw-w64 defines IID_IWbemLocator in wbemcli.h
+   instead of declaring it like Visual Studio and other mingw32 compilers.
+   So, we need to take care of this here before we define INITGUID.
+*/
+#ifdef __MINGW32__
+#define __IWbemLocator_INTERFACE_DEFINED__
+#endif /* __MINGW32__ */
+
+#define INITGUID /* Only set here, if set twice will cause mingw32 to break. */
+#include "SDL_dxjoystick_c.h"
+
+#ifdef __MINGW32__
+/* And now that we've included wbemcli.h we need to declare these interfaces */
+typedef struct IWbemLocatorVtbl {
+  BEGIN_INTERFACE
+    HRESULT (WINAPI *QueryInterface)(IWbemLocator *This,REFIID riid,void **ppvObject);
+    ULONG (WINAPI *AddRef)(IWbemLocator *This);
+    ULONG (WINAPI *Release)(IWbemLocator *This);
+    HRESULT (WINAPI *ConnectServer)(IWbemLocator *This,const BSTR strNetworkResource,const BSTR strUser,const BSTR strPassword,const BSTR strLocale,__LONG32 lSecurityFlags,const BSTR strAuthority,IWbemContext *pCtx,IWbemServices **ppNamespace);
+  END_INTERFACE
+} IWbemLocatorVtbl;
+struct IWbemLocator {
+  CONST_VTBL struct IWbemLocatorVtbl *lpVtbl;
+};
+#define IWbemLocator_ConnectServer(This,strNetworkResource,strUser,strPassword,strLocale,lSecurityFlags,strAuthority,pCtx,ppNamespace) (This)->lpVtbl->ConnectServer(This,strNetworkResource,strUser,strPassword,strLocale,lSecurityFlags,strAuthority,pCtx,ppNamespace)
+#endif /* __MINGW32__ */
+
 #ifndef DIDFT_OPTIONAL
 #define DIDFT_OPTIONAL      0x80000000
 #endif
@@ -373,10 +398,8 @@ SetDIerror(const char *function, HRESULT code)
 
 
 DEFINE_GUID(CLSID_WbemLocator,   0x4590f811,0x1d3a,0x11d0,0x89,0x1F,0x00,0xaa,0x00,0x4b,0x2e,0x24);
-#ifdef _MSC_VER
 /* The Windows SDK doesn't define this GUID */
 DEFINE_GUID(IID_IWbemLocator,    0xdc12a687,0x737f,0x11cf,0x88,0x4d,0x00,0xaa,0x00,0x4b,0x2e,0x24);
-#endif /* _MSC_VER */
 
 /*-----------------------------------------------------------------------------
  *

From 64f1ac9002262904e0c66cda4c15e5e713dc4e1a Mon Sep 17 00:00:00 2001
From: Philipp Wiesemann 
Date: Sun, 2 Jun 2013 14:11:04 +0200
Subject: [PATCH 178/542] Fixed implicit function declaration and warning for
 SDL_Log().

---
 src/video/android/SDL_androidtouch.c | 1 +
 1 file changed, 1 insertion(+)

diff --git a/src/video/android/SDL_androidtouch.c b/src/video/android/SDL_androidtouch.c
index 1b42b5f77..3265b54eb 100644
--- a/src/video/android/SDL_androidtouch.c
+++ b/src/video/android/SDL_androidtouch.c
@@ -27,6 +27,7 @@
 #include "SDL_events.h"
 #include "../../events/SDL_mouse_c.h"
 #include "../../events/SDL_touch_c.h"
+#include "SDL_log.h"
 
 #include "SDL_androidtouch.h"
 

From 663e2c37ae03b59d9bfdb4b8f3855f4ea75850e7 Mon Sep 17 00:00:00 2001
From: Philipp Wiesemann 
Date: Sun, 2 Jun 2013 14:13:21 +0200
Subject: [PATCH 179/542] Fixed implicit function declaration for
 SDL_AndroidGetInternalStoragePath().

---
 src/file/SDL_rwops.c | 1 +
 1 file changed, 1 insertion(+)

diff --git a/src/file/SDL_rwops.c b/src/file/SDL_rwops.c
index 59e83c89a..afbc39aa0 100644
--- a/src/file/SDL_rwops.c
+++ b/src/file/SDL_rwops.c
@@ -35,6 +35,7 @@
 
 #ifdef ANDROID
 #include "../core/android/SDL_android.h"
+#include "SDL_system.h"
 #endif
 
 #ifdef __WIN32__

From 5966837f4a763b243574c5de134d49edf9304105 Mon Sep 17 00:00:00 2001
From: Philipp Wiesemann 
Date: Sun, 2 Jun 2013 14:18:26 +0200
Subject: [PATCH 180/542] Changed haptic test program to use announced effect
 type.

---
 test/testhaptic.c | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/test/testhaptic.c b/test/testhaptic.c
index 2a8c2f42c..e832815b7 100644
--- a/test/testhaptic.c
+++ b/test/testhaptic.c
@@ -145,7 +145,7 @@ main(int argc, char **argv)
     /* Now we'll try a SAWTOOTHUP */
     if (supported & SDL_HAPTIC_SAWTOOTHUP) {
         printf("   effect %d: Sawtooth Up\n", nefx);
-        efx[nefx].type = SDL_HAPTIC_SQUARE;
+        efx[nefx].type = SDL_HAPTIC_SAWTOOTHUP;
         efx[nefx].periodic.period = 500;
         efx[nefx].periodic.magnitude = 0x5000;
         efx[nefx].periodic.length = 5000;

From 579a0da656d8593677d0e2cfcb526653ef329dc0 Mon Sep 17 00:00:00 2001
From: Philipp Wiesemann 
Date: Sun, 2 Jun 2013 14:27:54 +0200
Subject: [PATCH 181/542] Changed documentation in header because
 LocalReferenceHolder not public API.

---
 include/SDL_system.h | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/include/SDL_system.h b/include/SDL_system.h
index 5a6126157..26e9eaa0a 100644
--- a/include/SDL_system.h
+++ b/include/SDL_system.h
@@ -62,7 +62,7 @@ extern DECLSPEC void * SDLCALL SDL_AndroidGetJNIEnv();
    This returns jobject, but the prototype is void* so we don't need jni.h
    The jobject returned by SDL_AndroidGetActivity is a local reference.
    It is the caller's responsibility to properly release it
-   (using LocalReferenceHolder or manually with env->DeleteLocalRef)
+   (using env->Push/PopLocalFrame or manually with env->DeleteLocalRef)
  */
 extern DECLSPEC void * SDLCALL SDL_AndroidGetActivity();
 

From 86b3564df2e14d3ef561af99379e9fb4ab9e01c2 Mon Sep 17 00:00:00 2001
From: Sam Lantinga 
Date: Sun, 2 Jun 2013 08:48:52 -0700
Subject: [PATCH 182/542] Hopefully fixed mingw32 build

---
 src/joystick/windows/SDL_dxjoystick.c | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/src/joystick/windows/SDL_dxjoystick.c b/src/joystick/windows/SDL_dxjoystick.c
index d95711e11..629cc3408 100644
--- a/src/joystick/windows/SDL_dxjoystick.c
+++ b/src/joystick/windows/SDL_dxjoystick.c
@@ -64,7 +64,7 @@ typedef struct IWbemLocatorVtbl {
     HRESULT (WINAPI *QueryInterface)(IWbemLocator *This,REFIID riid,void **ppvObject);
     ULONG (WINAPI *AddRef)(IWbemLocator *This);
     ULONG (WINAPI *Release)(IWbemLocator *This);
-    HRESULT (WINAPI *ConnectServer)(IWbemLocator *This,const BSTR strNetworkResource,const BSTR strUser,const BSTR strPassword,const BSTR strLocale,__LONG32 lSecurityFlags,const BSTR strAuthority,IWbemContext *pCtx,IWbemServices **ppNamespace);
+    HRESULT (WINAPI *ConnectServer)(IWbemLocator *This,const BSTR strNetworkResource,const BSTR strUser,const BSTR strPassword,const BSTR strLocale,LONG lSecurityFlags,const BSTR strAuthority,IWbemContext *pCtx,IWbemServices **ppNamespace);
   END_INTERFACE
 } IWbemLocatorVtbl;
 struct IWbemLocator {

From 1732f61b810dcedeecd3e0388235584b11e00eeb Mon Sep 17 00:00:00 2001
From: "Azamat H. Hackimov" 
Date: Sun, 2 Jun 2013 20:20:18 +0600
Subject: [PATCH 183/542] Fix compilation with libX11 >= 1.5.99.902.

These changes fixes bug #1769 for SDL2
(http://bugzilla.libsdl.org/show_bug.cgi?id=1769).
---
 cmake/sdlchecks.cmake      |  8 ++++++++
 configure                  | 29 +++++++++++++++++++++++++++++
 configure.in               | 12 ++++++++++++
 include/SDL_config.h.cmake |  1 +
 include/SDL_config.h.in    |  1 +
 src/video/x11/SDL_x11sym.h |  4 ++++
 6 files changed, 55 insertions(+)

diff --git a/cmake/sdlchecks.cmake b/cmake/sdlchecks.cmake
index bc5edf035..40936b996 100644
--- a/cmake/sdlchecks.cmake
+++ b/cmake/sdlchecks.cmake
@@ -356,6 +356,14 @@ macro(CheckX11)
         set(SDL_VIDEO_DRIVER_X11_SUPPORTS_GENERIC_EVENTS 1)
       endif(HAVE_XGENERICEVENT)
 
+      check_c_source_compiles("
+          #include 
+          extern int _XData32(Display *dpy,register _Xconst long *data,unsigned len);
+          int main(int argc, char **argv) {}" HAVE_CONST_XDATA32)
+      if(HAVE_CONST_XDATA32)
+        set(SDL_VIDEO_DRIVER_X11_CONST_PARAM_XDATA32 1)
+      endif(HAVE_CONST_XDATA32)
+
       check_function_exists(XkbKeycodeToKeysym SDL_VIDEO_DRIVER_X11_HAS_XKBKEYCODETOKEYSYM)
 
       if(VIDEO_X11_XCURSOR AND HAVE_XCURSOR_H)
diff --git a/configure b/configure
index 4fec887cb..f353418df 100755
--- a/configure
+++ b/configure
@@ -19492,6 +19492,35 @@ rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
             { $as_echo "$as_me:${as_lineno-$LINENO}: result: $have_const_param_XextAddDisplay" >&5
 $as_echo "$have_const_param_XextAddDisplay" >&6; }
 
+            { $as_echo "$as_me:${as_lineno-$LINENO}: checking for const parameter to _XData32" >&5
+$as_echo_n "checking for const parameter to _XData32... " >&6; }
+	    have_const_param_xdata32=no
+	    cat confdefs.h - <<_ACEOF >conftest.$ac_ext
+/* end confdefs.h.  */
+
+	      #include 
+	      extern int _XData32(Display *dpy,register _Xconst long *data,unsigned len);
+
+int
+main ()
+{
+
+
+  ;
+  return 0;
+}
+_ACEOF
+if ac_fn_c_try_compile "$LINENO"; then :
+
+	    have_const_param_xdata32=yes
+	    $as_echo "#define SDL_VIDEO_DRIVER_X11_CONST_PARAM_XDATA32 1" >>confdefs.h
+
+
+fi
+rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
+	    { $as_echo "$as_me:${as_lineno-$LINENO}: result: $have_const_param_xdata32" >&5
+$as_echo "$have_const_param_xdata32" >&6; }
+
                         { $as_echo "$as_me:${as_lineno-$LINENO}: checking for XGenericEvent" >&5
 $as_echo_n "checking for XGenericEvent... " >&6; }
             have_XGenericEvent=no
diff --git a/configure.in b/configure.in
index 1f75d565b..47bb1a61a 100644
--- a/configure.in
+++ b/configure.in
@@ -1144,6 +1144,18 @@ AC_HELP_STRING([--enable-x11-shared], [dynamically load X11 support [[default=ma
             ])
             AC_MSG_RESULT($have_const_param_XextAddDisplay)
 
+            AC_MSG_CHECKING(for const parameter to _XData32)
+	    have_const_param_xdata32=no
+	    AC_TRY_COMPILE([
+	      #include 
+	      extern int _XData32(Display *dpy,register _Xconst long *data,unsigned len);
+	    ],[
+	    ],[
+	    have_const_param_xdata32=yes
+	    AC_DEFINE(SDL_VIDEO_DRIVER_X11_CONST_PARAM_XDATA32)
+	    ])
+	    AC_MSG_RESULT($have_const_param_xdata32)
+
             dnl AC_CHECK_LIB(X11, XGetEventData, AC_DEFINE(SDL_VIDEO_DRIVER_X11_SUPPORTS_GENERIC_EVENTS, 1, [Have XGenericEvent]))
             AC_MSG_CHECKING([for XGenericEvent])
             have_XGenericEvent=no
diff --git a/include/SDL_config.h.cmake b/include/SDL_config.h.cmake
index c3b9bc708..c212bae9e 100644
--- a/include/SDL_config.h.cmake
+++ b/include/SDL_config.h.cmake
@@ -266,6 +266,7 @@
 #cmakedefine SDL_VIDEO_DRIVER_X11_XSHAPE @SDL_VIDEO_DRIVER_X11_XSHAPE@
 #cmakedefine SDL_VIDEO_DRIVER_X11_XVIDMODE @SDL_VIDEO_DRIVER_X11_XVIDMODE@
 #cmakedefine SDL_VIDEO_DRIVER_X11_SUPPORTS_GENERIC_EVENTS @SDL_VIDEO_DRIVER_X11_SUPPORTS_GENERIC_EVENTS@
+#cmakedefine SDL_VIDEO_DRIVER_X11_CONST_PARAM_XDATA32 @SDL_VIDEO_DRIVER_X11_CONST_PARAM_XDATA32@
 #cmakedefine SDL_VIDEO_DRIVER_X11_CONST_PARAM_XEXTADDDISPLAY @SDL_VIDEO_DRIVER_X11_CONST_PARAM_XEXTADDDISPLAY@
 #cmakedefine SDL_VIDEO_DRIVER_X11_HAS_XKBKEYCODETOKEYSYM @SDL_VIDEO_DRIVER_X11_HAS_XKBKEYCODETOKEYSYM@
 
diff --git a/include/SDL_config.h.in b/include/SDL_config.h.in
index bd2be4b2f..b9ba3ffd4 100644
--- a/include/SDL_config.h.in
+++ b/include/SDL_config.h.in
@@ -268,6 +268,7 @@
 #undef SDL_VIDEO_DRIVER_X11_XSHAPE
 #undef SDL_VIDEO_DRIVER_X11_XVIDMODE
 #undef SDL_VIDEO_DRIVER_X11_SUPPORTS_GENERIC_EVENTS
+#undef SDL_VIDEO_DRIVER_X11_CONST_PARAM_XDATA32
 #undef SDL_VIDEO_DRIVER_X11_CONST_PARAM_XEXTADDDISPLAY
 #undef SDL_VIDEO_DRIVER_X11_HAS_XKBKEYCODETOKEYSYM
 
diff --git a/src/video/x11/SDL_x11sym.h b/src/video/x11/SDL_x11sym.h
index b6e99aa47..24ad5097f 100644
--- a/src/video/x11/SDL_x11sym.h
+++ b/src/video/x11/SDL_x11sym.h
@@ -203,7 +203,11 @@ SDL_X11_SYM(Bool,XShmQueryExtension,(Display* a),(a),return)
  */
 #ifdef LONG64
 SDL_X11_MODULE(IO_32BIT)
+#if SDL_VIDEO_DRIVER_X11_CONST_PARAM_XDATA32
+SDL_X11_SYM(int,_XData32,(Display *dpy,register _Xconst long *data,unsigned len),(dpy,data,len),return)
+#else
 SDL_X11_SYM(int,_XData32,(Display *dpy,register long *data,unsigned len),(dpy,data,len),return)
+#endif
 SDL_X11_SYM(void,_XRead32,(Display *dpy,register long *data,long len),(dpy,data,len),)
 #endif
 

From 3426ac11adad758882b684e9fb4df1eb37c3f080 Mon Sep 17 00:00:00 2001
From: Andreas Schiffler 
Date: Mon, 3 Jun 2013 07:28:55 -0700
Subject: [PATCH 184/542] Remove deprecated/deleted VS test projects

---
 VisualC/tests/graywin/graywin_VS2008.vcproj   | 205 ---------------
 VisualC/tests/graywin/graywin_VS2010.vcxproj  | 227 ----------------
 .../tests/testalpha/testalpha_VS2008.vcproj   | 205 ---------------
 .../tests/testalpha/testalpha_VS2010.vcxproj  | 231 ----------------
 .../tests/testcursor/testcursor_VS2008.vcproj | 209 ---------------
 .../testcursor/testcursor_VS2010.vcxproj      | 247 ------------------
 .../tests/testgamma/testgamma_VS2008.vcproj   | 205 ---------------
 .../tests/testgamma/testgamma_VS2010.vcxproj  | 231 ----------------
 VisualC/tests/testgl/testgl_VS2008.vcproj     | 207 ---------------
 VisualC/tests/testgl/testgl_VS2010.vcxproj    | 231 ----------------
 .../testoverlay/testoverlay_VS2008.vcproj     | 205 ---------------
 .../testoverlay/testoverlay_VS2010.vcxproj    | 232 ----------------
 .../tests/testsprite/testsprite_VS2008.vcproj | 205 ---------------
 .../testsprite/testsprite_VS2010.vcxproj      | 232 ----------------
 .../testvidinfo/testvidinfo_VS2008.vcproj     | 205 ---------------
 .../testvidinfo/testvidinfo_VS2010.vcxproj    | 227 ----------------
 VisualC/tests/testwin/testwin_VS2008.vcproj   | 205 ---------------
 VisualC/tests/testwin/testwin_VS2010.vcxproj  | 232 ----------------
 VisualC/tests/testwm/testwm_VS2008.vcproj     | 205 ---------------
 VisualC/tests/testwm/testwm_VS2010.vcxproj    | 227 ----------------
 20 files changed, 4373 deletions(-)
 delete mode 100644 VisualC/tests/graywin/graywin_VS2008.vcproj
 delete mode 100644 VisualC/tests/graywin/graywin_VS2010.vcxproj
 delete mode 100644 VisualC/tests/testalpha/testalpha_VS2008.vcproj
 delete mode 100644 VisualC/tests/testalpha/testalpha_VS2010.vcxproj
 delete mode 100755 VisualC/tests/testcursor/testcursor_VS2008.vcproj
 delete mode 100755 VisualC/tests/testcursor/testcursor_VS2010.vcxproj
 delete mode 100644 VisualC/tests/testgamma/testgamma_VS2008.vcproj
 delete mode 100644 VisualC/tests/testgamma/testgamma_VS2010.vcxproj
 delete mode 100644 VisualC/tests/testgl/testgl_VS2008.vcproj
 delete mode 100644 VisualC/tests/testgl/testgl_VS2010.vcxproj
 delete mode 100644 VisualC/tests/testoverlay/testoverlay_VS2008.vcproj
 delete mode 100644 VisualC/tests/testoverlay/testoverlay_VS2010.vcxproj
 delete mode 100644 VisualC/tests/testsprite/testsprite_VS2008.vcproj
 delete mode 100644 VisualC/tests/testsprite/testsprite_VS2010.vcxproj
 delete mode 100644 VisualC/tests/testvidinfo/testvidinfo_VS2008.vcproj
 delete mode 100644 VisualC/tests/testvidinfo/testvidinfo_VS2010.vcxproj
 delete mode 100644 VisualC/tests/testwin/testwin_VS2008.vcproj
 delete mode 100644 VisualC/tests/testwin/testwin_VS2010.vcxproj
 delete mode 100644 VisualC/tests/testwm/testwm_VS2008.vcproj
 delete mode 100644 VisualC/tests/testwm/testwm_VS2010.vcxproj

diff --git a/VisualC/tests/graywin/graywin_VS2008.vcproj b/VisualC/tests/graywin/graywin_VS2008.vcproj
deleted file mode 100644
index 97b4ccc2a..000000000
--- a/VisualC/tests/graywin/graywin_VS2008.vcproj
+++ /dev/null
@@ -1,205 +0,0 @@
-
-
-	
-		
-	
-	
-	
-	
-		
-			
-			
-			
-			
-			
-			
-			
-			
-			
-			
-			
-			
-			
-			
-			
-			
-			
-		
-		
-			
-			
-			
-			
-			
-			
-			
-			
-			
-			
-			
-			
-			
-			
-			
-			
-			
-		
-	
-	
-	
-	
-		
-		
-	
-	
-	
-
diff --git a/VisualC/tests/graywin/graywin_VS2010.vcxproj b/VisualC/tests/graywin/graywin_VS2010.vcxproj
deleted file mode 100644
index 6688dc088..000000000
--- a/VisualC/tests/graywin/graywin_VS2010.vcxproj
+++ /dev/null
@@ -1,227 +0,0 @@
-
-
-  
-    
-      Debug
-      Win32
-    
-    
-      Debug
-      x64
-    
-    
-      Release
-      Win32
-    
-    
-      Release
-      x64
-    
-  
-  
-    graywin
-    graywin
-    {0BCCA0BF-073E-439E-BCE0-C9353C177487}
-  
-  
-  
-    Application
-    false
-  
-  
-    Application
-    false
-  
-  
-    Application
-    false
-  
-  
-    Application
-    false
-    MultiByte
-  
-  
-  
-  
-  
-    
-    
-  
-  
-    
-    
-  
-  
-    
-    
-  
-  
-    
-    
-  
-  
-  
-    <_ProjectFileVersion>10.0.30319.1
-    $(Platform)\$(Configuration)\
-    $(Platform)\$(Configuration)\
-    $(Platform)\$(Configuration)\
-    $(Platform)\$(Configuration)\
-    true
-    true
-    $(Platform)\$(Configuration)\
-    $(Platform)\$(Configuration)\
-    $(Platform)\$(Configuration)\
-    $(Platform)\$(Configuration)\
-    false
-    false
-  
-  
-    
-      _DEBUG;%(PreprocessorDefinitions)
-      true
-      true
-      Win32
-    
-    
-      Disabled
-      ..\..\..\include;%(AdditionalIncludeDirectories)
-      WIN32;_DEBUG;_WINDOWS;%(PreprocessorDefinitions)
-      MultiThreadedDebugDLL
-      
-      
-      Level3
-      true
-      EditAndContinue
-      Default
-    
-    
-      _DEBUG;%(PreprocessorDefinitions)
-      0x0409
-    
-    
-      true
-      true
-      Windows
-    
-    
-      copy "$(SolutionDir)\SDL\$(Platform)\$(Configuration)\SDL2.dll" "$(TargetDir)\SDL2.dll"
-    
-    
-      Copy SDL
-    
-  
-  
-    
-      _DEBUG;%(PreprocessorDefinitions)
-      true
-      true
-    
-    
-      Disabled
-      ..\..\..\include;%(AdditionalIncludeDirectories)
-      WIN32;_DEBUG;_WINDOWS;%(PreprocessorDefinitions)
-      MultiThreadedDebugDLL
-      
-      
-      Level3
-      true
-      ProgramDatabase
-      Default
-    
-    
-      _DEBUG;%(PreprocessorDefinitions)
-      0x0409
-    
-    
-      true
-      true
-      Windows
-    
-    
-      copy "$(SolutionDir)\SDL\$(Platform)\$(Configuration)\SDL2.dll" "$(TargetDir)\SDL2.dll"
-    
-    
-      Copy SDL
-    
-  
-  
-    
-      NDEBUG;%(PreprocessorDefinitions)
-      true
-      true
-      Win32
-    
-    
-      OnlyExplicitInline
-      ..\..\..\include;%(AdditionalIncludeDirectories)
-      WIN32;NDEBUG;_WINDOWS;%(PreprocessorDefinitions)
-      true
-      MultiThreadedDLL
-      true
-      
-      
-      Level3
-      true
-      Default
-    
-    
-      NDEBUG;%(PreprocessorDefinitions)
-      0x0409
-    
-    
-      true
-      Windows
-    
-    
-      copy "$(SolutionDir)\SDL\$(Platform)\$(Configuration)\SDL2.dll" "$(TargetDir)\SDL2.dll"
-    
-    
-      Copy SDL
-    
-  
-  
-    
-      NDEBUG;%(PreprocessorDefinitions)
-      true
-      true
-    
-    
-      OnlyExplicitInline
-      ..\..\..\include;%(AdditionalIncludeDirectories)
-      WIN32;NDEBUG;_WINDOWS;%(PreprocessorDefinitions)
-      true
-      MultiThreadedDLL
-      true
-      
-      
-      Level3
-      true
-      Default
-    
-    
-      NDEBUG;%(PreprocessorDefinitions)
-      0x0409
-    
-    
-      true
-      Windows
-    
-    
-      copy "$(SolutionDir)\SDL\$(Platform)\$(Configuration)\SDL2.dll" "$(TargetDir)\SDL2.dll"
-    
-    
-      Copy SDL
-    
-  
-  
-    
-  
-  
-    
-    
-  
-  
-  
-  
-
diff --git a/VisualC/tests/testalpha/testalpha_VS2008.vcproj b/VisualC/tests/testalpha/testalpha_VS2008.vcproj
deleted file mode 100644
index af8314b1b..000000000
--- a/VisualC/tests/testalpha/testalpha_VS2008.vcproj
+++ /dev/null
@@ -1,205 +0,0 @@
-
-
-	
-		
-	
-	
-	
-	
-		
-			
-			
-			
-			
-			
-			
-			
-			
-			
-			
-			
-			
-			
-			
-			
-			
-			
-		
-		
-			
-			
-			
-			
-			
-			
-			
-			
-			
-			
-			
-			
-			
-			
-			
-			
-			
-		
-	
-	
-	
-	
-		
-		
-	
-	
-	
-
diff --git a/VisualC/tests/testalpha/testalpha_VS2010.vcxproj b/VisualC/tests/testalpha/testalpha_VS2010.vcxproj
deleted file mode 100644
index 2e348c00b..000000000
--- a/VisualC/tests/testalpha/testalpha_VS2010.vcxproj
+++ /dev/null
@@ -1,231 +0,0 @@
-
-
-  
-    
-      Debug
-      Win32
-    
-    
-      Debug
-      x64
-    
-    
-      Release
-      Win32
-    
-    
-      Release
-      x64
-    
-  
-  
-    testalpha
-    testalpha
-    {7814D54B-65D3-4677-AD77-E0B980B4FA2D}
-  
-  
-  
-    Application
-    false
-  
-  
-    Application
-    false
-  
-  
-    Application
-    false
-  
-  
-    Application
-    false
-    MultiByte
-  
-  
-  
-  
-  
-    
-    
-  
-  
-    
-    
-  
-  
-    
-    
-  
-  
-    
-    
-  
-  
-  
-    <_ProjectFileVersion>10.0.30319.1
-    $(Platform)\$(Configuration)\
-    $(Platform)\$(Configuration)\
-    $(Platform)\$(Configuration)\
-    $(Platform)\$(Configuration)\
-    true
-    true
-    $(Platform)\$(Configuration)\
-    $(Platform)\$(Configuration)\
-    $(Platform)\$(Configuration)\
-    $(Platform)\$(Configuration)\
-    false
-    false
-  
-  
-    
-      _DEBUG;%(PreprocessorDefinitions)
-      true
-      true
-      Win32
-    
-    
-      Disabled
-      ..\..\..\include;%(AdditionalIncludeDirectories)
-      WIN32;_DEBUG;_WINDOWS;%(PreprocessorDefinitions)
-      MultiThreadedDebugDLL
-      
-      
-      Level3
-      true
-      EditAndContinue
-      Default
-    
-    
-      _DEBUG;%(PreprocessorDefinitions)
-      0x0409
-    
-    
-      true
-      true
-      Windows
-    
-    
-      copy "$(SolutionDir)\SDL\$(Platform)\$(Configuration)\SDL2.dll" "$(TargetDir)\SDL2.dll"
-copy "$(SolutionDir)\..\test\icon.bmp" "$(TargetDir)\icon.bmp"
-    
-    
-      Copy SDL and data files
-    
-  
-  
-    
-      _DEBUG;%(PreprocessorDefinitions)
-      true
-      true
-    
-    
-      Disabled
-      ..\..\..\include;%(AdditionalIncludeDirectories)
-      WIN32;_DEBUG;_WINDOWS;%(PreprocessorDefinitions)
-      MultiThreadedDebugDLL
-      
-      
-      Level3
-      true
-      ProgramDatabase
-      Default
-    
-    
-      _DEBUG;%(PreprocessorDefinitions)
-      0x0409
-    
-    
-      true
-      true
-      Windows
-    
-    
-      copy "$(SolutionDir)\SDL\$(Platform)\$(Configuration)\SDL2.dll" "$(TargetDir)\SDL2.dll"
-copy "$(SolutionDir)\..\test\icon.bmp" "$(TargetDir)\icon.bmp"
-    
-    
-      Copy SDL and data files
-    
-  
-  
-    
-      NDEBUG;%(PreprocessorDefinitions)
-      true
-      true
-      Win32
-    
-    
-      OnlyExplicitInline
-      ..\..\..\include;%(AdditionalIncludeDirectories)
-      WIN32;NDEBUG;_WINDOWS;%(PreprocessorDefinitions)
-      true
-      MultiThreadedDLL
-      true
-      
-      
-      Level3
-      true
-      Default
-    
-    
-      NDEBUG;%(PreprocessorDefinitions)
-      0x0409
-    
-    
-      true
-      Windows
-    
-    
-      copy "$(SolutionDir)\SDL\$(Platform)\$(Configuration)\SDL2.dll" "$(TargetDir)\SDL2.dll"
-copy "$(SolutionDir)\..\test\icon.bmp" "$(TargetDir)\icon.bmp"
-    
-    
-      Copy SDL and data files
-    
-  
-  
-    
-      NDEBUG;%(PreprocessorDefinitions)
-      true
-      true
-    
-    
-      OnlyExplicitInline
-      ..\..\..\include;%(AdditionalIncludeDirectories)
-      WIN32;NDEBUG;_WINDOWS;%(PreprocessorDefinitions)
-      true
-      MultiThreadedDLL
-      true
-      
-      
-      Level3
-      true
-      Default
-    
-    
-      NDEBUG;%(PreprocessorDefinitions)
-      0x0409
-    
-    
-      true
-      Windows
-    
-    
-      copy "$(SolutionDir)\SDL\$(Platform)\$(Configuration)\SDL2.dll" "$(TargetDir)\SDL2.dll"
-copy "$(SolutionDir)\..\test\icon.bmp" "$(TargetDir)\icon.bmp"
-    
-    
-      Copy SDL and data files
-    
-  
-  
-    
-    
-  
-  
-    
-  
-  
-  
-  
-
diff --git a/VisualC/tests/testcursor/testcursor_VS2008.vcproj b/VisualC/tests/testcursor/testcursor_VS2008.vcproj
deleted file mode 100755
index 6f2c89733..000000000
--- a/VisualC/tests/testcursor/testcursor_VS2008.vcproj
+++ /dev/null
@@ -1,209 +0,0 @@
-
-
-	
-		
-	
-	
-	
-	
-		
-			
-			
-			
-			
-			
-			
-			
-			
-			
-			
-			
-			
-			
-			
-			
-			
-			
-		
-		
-			
-			
-			
-			
-			
-			
-			
-			
-			
-			
-			
-			
-			
-			
-			
-			
-			
-		
-	
-	
-	
-	
-		
-		
-	
-	
-	
-
diff --git a/VisualC/tests/testcursor/testcursor_VS2010.vcxproj b/VisualC/tests/testcursor/testcursor_VS2010.vcxproj
deleted file mode 100755
index 9c3b45464..000000000
--- a/VisualC/tests/testcursor/testcursor_VS2010.vcxproj
+++ /dev/null
@@ -1,247 +0,0 @@
-
-
-  
-    
-      Debug
-      Win32
-    
-    
-      Debug
-      x64
-    
-    
-      Release
-      Win32
-    
-    
-      Release
-      x64
-    
-  
-  
-    testcursor
-    testcursor
-    {20839E82-6F23-429D-91D7-8A2601BC7EA8}
-  
-  
-  
-    Application
-    false
-  
-  
-    Application
-    false
-  
-  
-    Application
-    false
-  
-  
-    Application
-    false
-    MultiByte
-  
-  
-  
-  
-  
-    
-    
-  
-  
-    
-    
-  
-  
-    
-    
-  
-  
-    
-    
-  
-  
-  
-    <_ProjectFileVersion>10.0.30319.1
-    $(Platform)\$(Configuration)\
-    $(Platform)\$(Configuration)\
-    $(Platform)\$(Configuration)\
-    $(Platform)\$(Configuration)\
-    true
-    true
-    $(Platform)\$(Configuration)\
-    $(Platform)\$(Configuration)\
-    $(Platform)\$(Configuration)\
-    $(Platform)\$(Configuration)\
-    false
-    false
-  
-  
-    
-      _DEBUG;%(PreprocessorDefinitions)
-      true
-      true
-      Win32
-    
-    
-      Disabled
-      ..\..\..\include;%(AdditionalIncludeDirectories)
-      WIN32;_DEBUG;_WINDOWS;%(PreprocessorDefinitions)
-      true
-      MultiThreadedDebugDLL
-      Level3
-      true
-      EditAndContinue
-    
-    
-      _DEBUG;%(PreprocessorDefinitions)
-      0x0409
-    
-    
-      true
-      true
-      Windows
-    
-    
-      true
-      .\Debug/testcursor.bsc
-    
-    
-      copy "$(SolutionDir)\SDL\$(Platform)\$(Configuration)\SDL2.dll" "$(TargetDir)\SDL2.dll"
-copy "$(SolutionDir)\..\test\icon.bmp" "$(TargetDir)\icon.bmp"
-    
-    
-      Copy SDL and data files
-    
-  
-  
-    
-      _DEBUG;%(PreprocessorDefinitions)
-      true
-      true
-    
-    
-      Disabled
-      ..\..\..\include;%(AdditionalIncludeDirectories)
-      WIN32;_DEBUG;_WINDOWS;%(PreprocessorDefinitions)
-      MultiThreadedDebugDLL
-      Level3
-      true
-      ProgramDatabase
-    
-    
-      _DEBUG;%(PreprocessorDefinitions)
-      0x0409
-    
-    
-      true
-      true
-      Windows
-    
-    
-      true
-      .\Debug/testcursor.bsc
-    
-    
-      copy "$(SolutionDir)\SDL\$(Platform)\$(Configuration)\SDL2.dll" "$(TargetDir)\SDL2.dll"
-copy "$(SolutionDir)\..\test\icon.bmp" "$(TargetDir)\icon.bmp"
-    
-    
-      Copy SDL and data files
-    
-  
-  
-    
-      NDEBUG;%(PreprocessorDefinitions)
-      true
-      true
-      Win32
-    
-    
-      MaxSpeed
-      OnlyExplicitInline
-      ..\..\..\include;%(AdditionalIncludeDirectories)
-      WIN32;NDEBUG;_WINDOWS;%(PreprocessorDefinitions)
-      true
-      MultiThreadedDLL
-      true
-      Level3
-      true
-    
-    
-      NDEBUG;%(PreprocessorDefinitions)
-      0x0409
-    
-    
-      true
-      Windows
-    
-    
-      true
-      .\Release/testcursor.bsc
-    
-    
-      copy "$(SolutionDir)\SDL\$(Platform)\$(Configuration)\SDL2.dll" "$(TargetDir)\SDL2.dll"
-copy "$(SolutionDir)\..\test\icon.bmp" "$(TargetDir)\icon.bmp"
-    
-    
-      Copy SDL and data files
-    
-  
-  
-    
-      NDEBUG;%(PreprocessorDefinitions)
-      true
-      true
-    
-    
-      MaxSpeed
-      OnlyExplicitInline
-      ..\..\..\include;%(AdditionalIncludeDirectories)
-      WIN32;NDEBUG;_WINDOWS;%(PreprocessorDefinitions)
-      true
-      MultiThreadedDLL
-      true
-      Level3
-      true
-    
-    
-      NDEBUG;%(PreprocessorDefinitions)
-      0x0409
-    
-    
-      true
-      Windows
-    
-    
-      true
-      .\Release/testcursor.bsc
-    
-    
-      copy "$(SolutionDir)\SDL\$(Platform)\$(Configuration)\SDL2.dll" "$(TargetDir)\SDL2.dll"
-copy "$(SolutionDir)\..\test\icon.bmp" "$(TargetDir)\icon.bmp"
-    
-    
-      Copy SDL and data files
-    
-  
-  
-    
-    
-  
-  
-    
-      %(AdditionalIncludeDirectories)
-      %(AdditionalIncludeDirectories)
-      %(PreprocessorDefinitions)
-      %(PreprocessorDefinitions)
-      %(AdditionalIncludeDirectories)
-      %(AdditionalIncludeDirectories)
-      %(PreprocessorDefinitions)
-      %(PreprocessorDefinitions)
-    
-  
-  
-  
-  
-
diff --git a/VisualC/tests/testgamma/testgamma_VS2008.vcproj b/VisualC/tests/testgamma/testgamma_VS2008.vcproj
deleted file mode 100644
index c274acce5..000000000
--- a/VisualC/tests/testgamma/testgamma_VS2008.vcproj
+++ /dev/null
@@ -1,205 +0,0 @@
-
-
-	
-		
-	
-	
-	
-	
-		
-			
-			
-			
-			
-			
-			
-			
-			
-			
-			
-			
-			
-			
-			
-			
-			
-			
-		
-		
-			
-			
-			
-			
-			
-			
-			
-			
-			
-			
-			
-			
-			
-			
-			
-			
-			
-		
-	
-	
-	
-	
-		
-		
-	
-	
-	
-
diff --git a/VisualC/tests/testgamma/testgamma_VS2010.vcxproj b/VisualC/tests/testgamma/testgamma_VS2010.vcxproj
deleted file mode 100644
index db3c4e13c..000000000
--- a/VisualC/tests/testgamma/testgamma_VS2010.vcxproj
+++ /dev/null
@@ -1,231 +0,0 @@
-
-
-  
-    
-      Debug
-      Win32
-    
-    
-      Debug
-      x64
-    
-    
-      Release
-      Win32
-    
-    
-      Release
-      x64
-    
-  
-  
-    testgamma
-    testgamma
-    {D974A0DF-3E2E-445C-A2EB-E899E9B582CB}
-  
-  
-  
-    Application
-    false
-  
-  
-    Application
-    false
-  
-  
-    Application
-    false
-  
-  
-    Application
-    false
-    MultiByte
-  
-  
-  
-  
-  
-    
-    
-  
-  
-    
-    
-  
-  
-    
-    
-  
-  
-    
-    
-  
-  
-  
-    <_ProjectFileVersion>10.0.30319.1
-    $(Platform)\$(Configuration)\
-    $(Platform)\$(Configuration)\
-    $(Platform)\$(Configuration)\
-    $(Platform)\$(Configuration)\
-    true
-    true
-    $(Platform)\$(Configuration)\
-    $(Platform)\$(Configuration)\
-    $(Platform)\$(Configuration)\
-    $(Platform)\$(Configuration)\
-    false
-    false
-  
-  
-    
-      _DEBUG;%(PreprocessorDefinitions)
-      true
-      true
-      Win32
-    
-    
-      Disabled
-      ..\..\..\include;%(AdditionalIncludeDirectories)
-      WIN32;_DEBUG;_WINDOWS;%(PreprocessorDefinitions)
-      MultiThreadedDebugDLL
-      
-      
-      Level3
-      true
-      EditAndContinue
-      Default
-    
-    
-      _DEBUG;%(PreprocessorDefinitions)
-      0x0409
-    
-    
-      true
-      true
-      Windows
-    
-    
-      copy "$(SolutionDir)\SDL\$(Platform)\$(Configuration)\SDL2.dll" "$(TargetDir)\SDL2.dll"
-copy "$(SolutionDir)\..\test\sample.bmp" "$(TargetDir)\sample.bmp"
-    
-    
-      Copy SDL and data files
-    
-  
-  
-    
-      _DEBUG;%(PreprocessorDefinitions)
-      true
-      true
-    
-    
-      Disabled
-      ..\..\..\include;%(AdditionalIncludeDirectories)
-      WIN32;_DEBUG;_WINDOWS;%(PreprocessorDefinitions)
-      MultiThreadedDebugDLL
-      
-      
-      Level3
-      true
-      ProgramDatabase
-      Default
-    
-    
-      _DEBUG;%(PreprocessorDefinitions)
-      0x0409
-    
-    
-      true
-      true
-      Windows
-    
-    
-      copy "$(SolutionDir)\SDL\$(Platform)\$(Configuration)\SDL2.dll" "$(TargetDir)\SDL2.dll"
-copy "$(SolutionDir)\..\test\sample.bmp" "$(TargetDir)\sample.bmp"
-    
-    
-      Copy SDL and data files
-    
-  
-  
-    
-      NDEBUG;%(PreprocessorDefinitions)
-      true
-      true
-      Win32
-    
-    
-      OnlyExplicitInline
-      ..\..\..\include;%(AdditionalIncludeDirectories)
-      WIN32;NDEBUG;_WINDOWS;%(PreprocessorDefinitions)
-      true
-      MultiThreadedDLL
-      true
-      
-      
-      Level3
-      true
-      Default
-    
-    
-      NDEBUG;%(PreprocessorDefinitions)
-      0x0409
-    
-    
-      true
-      Windows
-    
-    
-      copy "$(SolutionDir)\SDL\$(Platform)\$(Configuration)\SDL2.dll" "$(TargetDir)\SDL2.dll"
-copy "$(SolutionDir)\..\test\sample.bmp" "$(TargetDir)\sample.bmp"
-    
-    
-      Copy SDL and data files
-    
-  
-  
-    
-      NDEBUG;%(PreprocessorDefinitions)
-      true
-      true
-    
-    
-      OnlyExplicitInline
-      ..\..\..\include;%(AdditionalIncludeDirectories)
-      WIN32;NDEBUG;_WINDOWS;%(PreprocessorDefinitions)
-      true
-      MultiThreadedDLL
-      true
-      
-      
-      Level3
-      true
-      Default
-    
-    
-      NDEBUG;%(PreprocessorDefinitions)
-      0x0409
-    
-    
-      true
-      Windows
-    
-    
-      copy "$(SolutionDir)\SDL\$(Platform)\$(Configuration)\SDL2.dll" "$(TargetDir)\SDL2.dll"
-copy "$(SolutionDir)\..\test\sample.bmp" "$(TargetDir)\sample.bmp"
-    
-    
-      Copy SDL and data files
-    
-  
-  
-    
-    
-  
-  
-    
-  
-  
-  
-  
-
diff --git a/VisualC/tests/testgl/testgl_VS2008.vcproj b/VisualC/tests/testgl/testgl_VS2008.vcproj
deleted file mode 100644
index 6d384a148..000000000
--- a/VisualC/tests/testgl/testgl_VS2008.vcproj
+++ /dev/null
@@ -1,207 +0,0 @@
-
-
-	
-		
-	
-	
-	
-	
-		
-			
-			
-			
-			
-			
-			
-			
-			
-			
-			
-			
-			
-			
-			
-			
-			
-			
-		
-		
-			
-			
-			
-			
-			
-			
-			
-			
-			
-			
-			
-			
-			
-			
-			
-			
-			
-		
-	
-	
-	
-	
-		
-		
-	
-	
-	
-
diff --git a/VisualC/tests/testgl/testgl_VS2010.vcxproj b/VisualC/tests/testgl/testgl_VS2010.vcxproj
deleted file mode 100644
index 1665eb86e..000000000
--- a/VisualC/tests/testgl/testgl_VS2010.vcxproj
+++ /dev/null
@@ -1,231 +0,0 @@
-
-
-  
-    
-      Debug
-      Win32
-    
-    
-      Debug
-      x64
-    
-    
-      Release
-      Win32
-    
-    
-      Release
-      x64
-    
-  
-  
-    testgl
-    testgl
-    {272D976B-A1DF-4DEB-BD7F-5C0D330E0C7D}
-  
-  
-  
-    Application
-    false
-  
-  
-    Application
-    false
-  
-  
-    Application
-    false
-  
-  
-    Application
-    false
-    MultiByte
-  
-  
-  
-  
-  
-    
-    
-  
-  
-    
-    
-  
-  
-    
-    
-  
-  
-    
-    
-  
-  
-  
-    <_ProjectFileVersion>10.0.30319.1
-    $(Platform)\$(Configuration)\
-    $(Platform)\$(Configuration)\
-    $(Platform)\$(Configuration)\
-    $(Platform)\$(Configuration)\
-    true
-    true
-    $(Platform)\$(Configuration)\
-    $(Platform)\$(Configuration)\
-    $(Platform)\$(Configuration)\
-    $(Platform)\$(Configuration)\
-    false
-    false
-  
-  
-    
-      _DEBUG;%(PreprocessorDefinitions)
-      true
-      true
-      Win32
-    
-    
-      Disabled
-      ..\..\..\include;%(AdditionalIncludeDirectories)
-      _DEBUG;WIN32;_WINDOWS;HAVE_OPENGL;%(PreprocessorDefinitions)
-      MultiThreadedDebugDLL
-      
-      
-      Level3
-      true
-      EditAndContinue
-      Default
-    
-    
-      _DEBUG;%(PreprocessorDefinitions)
-      0x0409
-    
-    
-      opengl32.lib;%(AdditionalDependencies)
-      true
-      true
-      Windows
-    
-    
-      copy "$(SolutionDir)\SDL\$(Platform)\$(Configuration)\SDL2.dll" "$(TargetDir)\SDL2.dll"
-    
-    
-      Copy SDL
-    
-  
-  
-    
-      _DEBUG;%(PreprocessorDefinitions)
-      true
-      true
-    
-    
-      Disabled
-      ..\..\..\include;%(AdditionalIncludeDirectories)
-      _DEBUG;WIN32;_WINDOWS;HAVE_OPENGL;%(PreprocessorDefinitions)
-      MultiThreadedDebugDLL
-      
-      
-      Level3
-      true
-      ProgramDatabase
-      Default
-    
-    
-      _DEBUG;%(PreprocessorDefinitions)
-      0x0409
-    
-    
-      opengl32.lib;%(AdditionalDependencies)
-      true
-      true
-      Windows
-    
-    
-      copy "$(SolutionDir)\SDL\$(Platform)\$(Configuration)\SDL2.dll" "$(TargetDir)\SDL2.dll"
-    
-    
-      Copy SDL
-    
-  
-  
-    
-      NDEBUG;%(PreprocessorDefinitions)
-      true
-      true
-      Win32
-    
-    
-      OnlyExplicitInline
-      ..\..\..\include;%(AdditionalIncludeDirectories)
-      NDEBUG;WIN32;_WINDOWS;HAVE_OPENGL;%(PreprocessorDefinitions)
-      true
-      MultiThreadedDLL
-      true
-      
-      
-      Level3
-      true
-      Default
-    
-    
-      NDEBUG;%(PreprocessorDefinitions)
-      0x0409
-    
-    
-      opengl32.lib;%(AdditionalDependencies)
-      true
-      Windows
-    
-    
-      copy "$(SolutionDir)\SDL\$(Platform)\$(Configuration)\SDL2.dll" "$(TargetDir)\SDL2.dll"
-    
-    
-      Copy SDL
-    
-  
-  
-    
-      NDEBUG;%(PreprocessorDefinitions)
-      true
-      true
-    
-    
-      OnlyExplicitInline
-      ..\..\..\include;%(AdditionalIncludeDirectories)
-      NDEBUG;WIN32;_WINDOWS;HAVE_OPENGL;%(PreprocessorDefinitions)
-      true
-      MultiThreadedDLL
-      true
-      
-      
-      Level3
-      true
-      Default
-    
-    
-      NDEBUG;%(PreprocessorDefinitions)
-      0x0409
-    
-    
-      opengl32.lib;%(AdditionalDependencies)
-      true
-      Windows
-    
-    
-      copy "$(SolutionDir)\SDL\$(Platform)\$(Configuration)\SDL2.dll" "$(TargetDir)\SDL2.dll"
-    
-    
-      Copy SDL
-    
-  
-  
-    
-    
-  
-  
-    
-  
-  
-  
-  
-
diff --git a/VisualC/tests/testoverlay/testoverlay_VS2008.vcproj b/VisualC/tests/testoverlay/testoverlay_VS2008.vcproj
deleted file mode 100644
index 7752c1f6e..000000000
--- a/VisualC/tests/testoverlay/testoverlay_VS2008.vcproj
+++ /dev/null
@@ -1,205 +0,0 @@
-
-
-	
-		
-	
-	
-	
-	
-		
-			
-			
-			
-			
-			
-			
-			
-			
-			
-			
-			
-			
-			
-			
-			
-			
-			
-		
-		
-			
-			
-			
-			
-			
-			
-			
-			
-			
-			
-			
-			
-			
-			
-			
-			
-			
-		
-	
-	
-	
-	
-		
-		
-	
-	
-	
-
diff --git a/VisualC/tests/testoverlay/testoverlay_VS2010.vcxproj b/VisualC/tests/testoverlay/testoverlay_VS2010.vcxproj
deleted file mode 100644
index 9c3d75be1..000000000
--- a/VisualC/tests/testoverlay/testoverlay_VS2010.vcxproj
+++ /dev/null
@@ -1,232 +0,0 @@
-
-
-  
-    
-      Debug
-      Win32
-    
-    
-      Debug
-      x64
-    
-    
-      Release
-      Win32
-    
-    
-      Release
-      x64
-    
-  
-  
-    testoverlay
-    testoverlay
-    {9E320A14-B443-4DD7-8725-B7020DCFF730}
-  
-  
-  
-    Application
-    false
-  
-  
-    Application
-    false
-    MultiByte
-  
-  
-    Application
-    false
-  
-  
-    Application
-    false
-  
-  
-  
-  
-  
-    
-    
-  
-  
-    
-    
-  
-  
-    
-    
-  
-  
-    
-    
-  
-  
-  
-    <_ProjectFileVersion>10.0.30319.1
-    $(Platform)\$(Configuration)\
-    $(Platform)\$(Configuration)\
-    $(Platform)\$(Configuration)\
-    $(Platform)\$(Configuration)\
-    false
-    false
-    $(Platform)\$(Configuration)\
-    $(Platform)\$(Configuration)\
-    $(Platform)\$(Configuration)\
-    $(Platform)\$(Configuration)\
-    true
-    true
-  
-  
-    
-      NDEBUG;%(PreprocessorDefinitions)
-      true
-      true
-      Win32
-      .\Release/testoverlay.tlb
-    
-    
-      OnlyExplicitInline
-      ..\..\..\include;%(AdditionalIncludeDirectories)
-      WIN32;NDEBUG;_WINDOWS;%(PreprocessorDefinitions)
-      true
-      MultiThreadedDLL
-      true
-      
-      
-      Level3
-      true
-      Default
-    
-    
-      NDEBUG;%(PreprocessorDefinitions)
-      0x0409
-    
-    
-      true
-      Windows
-    
-    
-      copy "$(SolutionDir)\SDL\$(Platform)\$(Configuration)\SDL2.dll" "$(TargetDir)\SDL2.dll"
-copy "$(SolutionDir)\..\test\sample.bmp" "$(TargetDir)\sample.bmp"
-    
-    
-      Copy SDL and data files
-    
-  
-  
-    
-      NDEBUG;%(PreprocessorDefinitions)
-      true
-      true
-    
-    
-      OnlyExplicitInline
-      ..\..\..\include;%(AdditionalIncludeDirectories)
-      WIN32;NDEBUG;_WINDOWS;%(PreprocessorDefinitions)
-      true
-      MultiThreadedDLL
-      true
-      
-      
-      Level3
-      true
-      Default
-    
-    
-      NDEBUG;%(PreprocessorDefinitions)
-      0x0409
-    
-    
-      true
-      Windows
-    
-    
-      copy "$(SolutionDir)\SDL\$(Platform)\$(Configuration)\SDL2.dll" "$(TargetDir)\SDL2.dll"
-copy $(SolutionDir)\..\test\sample.bmp" "$(TargetDir)\sample.bmp"
-    
-    
-      Copy SDL and data files
-    
-  
-  
-    
-      _DEBUG;%(PreprocessorDefinitions)
-      true
-      true
-      Win32
-    
-    
-      Disabled
-      ..\..\..\include;%(AdditionalIncludeDirectories)
-      WIN32;_DEBUG;_WINDOWS;%(PreprocessorDefinitions)
-      MultiThreadedDebugDLL
-      
-      
-      Level3
-      true
-      EditAndContinue
-      Default
-    
-    
-      _DEBUG;%(PreprocessorDefinitions)
-      0x0409
-    
-    
-      true
-      true
-      Windows
-    
-    
-      copy "$(SolutionDir)\SDL\$(Platform)\$(Configuration)\SDL2.dll" "$(TargetDir)\SDL2.dll"
-copy "$(SolutionDir)\..\test\sample.bmp" "$(TargetDir)\sample.bmp"
-    
-    
-      Copy SDL and data files
-    
-  
-  
-    
-      _DEBUG;%(PreprocessorDefinitions)
-      true
-      true
-    
-    
-      Disabled
-      ..\..\..\include;%(AdditionalIncludeDirectories)
-      WIN32;_DEBUG;_WINDOWS;%(PreprocessorDefinitions)
-      MultiThreadedDebugDLL
-      
-      
-      Level3
-      true
-      ProgramDatabase
-      Default
-    
-    
-      _DEBUG;%(PreprocessorDefinitions)
-      0x0409
-    
-    
-      true
-      true
-      Windows
-    
-    
-      copy" $(SolutionDir)\SDL\$(Platform)\$(Configuration)\SDL2.dll" "$(TargetDir)\SDL2.dll"
-copy "$(SolutionDir)\..\test\sample.bmp" "$(TargetDir)\sample.bm"p
-    
-    
-      Copy SDL and data files
-    
-  
-  
-    
-    
-  
-  
-    
-  
-  
-  
-  
-
diff --git a/VisualC/tests/testsprite/testsprite_VS2008.vcproj b/VisualC/tests/testsprite/testsprite_VS2008.vcproj
deleted file mode 100644
index 256d7125e..000000000
--- a/VisualC/tests/testsprite/testsprite_VS2008.vcproj
+++ /dev/null
@@ -1,205 +0,0 @@
-
-
-	
-		
-	
-	
-	
-	
-		
-			
-			
-			
-			
-			
-			
-			
-			
-			
-			
-			
-			
-			
-			
-			
-			
-			
-		
-		
-			
-			
-			
-			
-			
-			
-			
-			
-			
-			
-			
-			
-			
-			
-			
-			
-			
-		
-	
-	
-	
-	
-		
-		
-	
-	
-	
-
diff --git a/VisualC/tests/testsprite/testsprite_VS2010.vcxproj b/VisualC/tests/testsprite/testsprite_VS2010.vcxproj
deleted file mode 100644
index c1459bfc0..000000000
--- a/VisualC/tests/testsprite/testsprite_VS2010.vcxproj
+++ /dev/null
@@ -1,232 +0,0 @@
-
-
-  
-    
-      Debug
-      Win32
-    
-    
-      Debug
-      x64
-    
-    
-      Release
-      Win32
-    
-    
-      Release
-      x64
-    
-  
-  
-    testsprite
-    testsprite
-    {5D0930C0-7C91-4ECE-9014-7B7DDE9502E5}
-  
-  
-  
-    Application
-    false
-  
-  
-    Application
-    false
-    MultiByte
-  
-  
-    Application
-    false
-  
-  
-    Application
-    false
-  
-  
-  
-  
-  
-    
-    
-  
-  
-    
-    
-  
-  
-    
-    
-  
-  
-    
-    
-  
-  
-  
-    <_ProjectFileVersion>10.0.30319.1
-    $(Platform)\$(Configuration)\
-    $(Platform)\$(Configuration)\
-    $(Platform)\$(Configuration)\
-    $(Platform)\$(Configuration)\
-    false
-    false
-    $(Platform)\$(Configuration)\
-    $(Platform)\$(Configuration)\
-    $(Platform)\$(Configuration)\
-    $(Platform)\$(Configuration)\
-    true
-    true
-  
-  
-    
-      NDEBUG;%(PreprocessorDefinitions)
-      true
-      true
-      Win32
-    
-    
-      OnlyExplicitInline
-      ..\..\..\include;%(AdditionalIncludeDirectories)
-      WIN32;NDEBUG;_WINDOWS;%(PreprocessorDefinitions)
-      true
-      MultiThreadedDLL
-      true
-      
-      
-      Level3
-      true
-      Default
-    
-    
-      NDEBUG;%(PreprocessorDefinitions)
-      0x0409
-    
-    
-      true
-      Windows
-    
-    
-      copy "$(SolutionDir)\SDL\$(Platform)\$(Configuration)\SDL2.dll" "$(TargetDir)\SDL2.dll"
-copy "$(SolutionDir)\..\test\icon.bmp" "$(TargetDir)\icon.bmp"
-    
-    
-      Copy SDL and data files
-    
-  
-  
-    
-      NDEBUG;%(PreprocessorDefinitions)
-      true
-      true
-    
-    
-      OnlyExplicitInline
-      ..\..\..\include;%(AdditionalIncludeDirectories)
-      WIN32;NDEBUG;_WINDOWS;%(PreprocessorDefinitions)
-      true
-      MultiThreadedDLL
-      true
-      
-      
-      Level3
-      true
-      Default
-    
-    
-      NDEBUG;%(PreprocessorDefinitions)
-      0x0409
-    
-    
-      true
-      Windows
-    
-    
-      copy "$(SolutionDir)\SDL\$(Platform)\$(Configuration)\SDL2.dll" "$(TargetDir)\SDL2.dll"
-copy "$(SolutionDir)\..\test\icon.bmp" "$(TargetDir)\icon.bmp"
-    
-    
-      Copy SDL and data files
-    
-  
-  
-    
-      _DEBUG;%(PreprocessorDefinitions)
-      true
-      true
-      Win32
-    
-    
-      Disabled
-      ..\..\..\include;%(AdditionalIncludeDirectories)
-      WIN32;_DEBUG;_WINDOWS;%(PreprocessorDefinitions)
-      MultiThreadedDebugDLL
-      
-      
-      Level3
-      true
-      EditAndContinue
-      Default
-    
-    
-      _DEBUG;%(PreprocessorDefinitions)
-      0x0409
-    
-    
-      true
-      true
-      Windows
-    
-    
-      copy "$(SolutionDir)\SDL\$(Platform)\$(Configuration)\SDL2.dll" "$(TargetDir)\SDL2.dll"
-copy "$(SolutionDir)\..\test\icon.bmp" "$(TargetDir)\icon.bmp"
-    
-    
-      Copy SDL and data files
-    
-  
-  
-    
-      _DEBUG;%(PreprocessorDefinitions)
-      true
-      true
-    
-    
-      Disabled
-      ..\..\..\include;%(AdditionalIncludeDirectories)
-      WIN32;_DEBUG;_WINDOWS;%(PreprocessorDefinitions)
-      MultiThreadedDebugDLL
-      
-      
-      Level3
-      true
-      ProgramDatabase
-      Default
-    
-    
-      _DEBUG;%(PreprocessorDefinitions)
-      0x0409
-    
-    
-      true
-      true
-      Windows
-    
-    
-      
-        copy "$(SolutionDir)\SDL\$(Platform)\$(Configuration)\SDL2.dll" "$(TargetDir)\SDL2.dll"
-        copy "$(SolutionDir)\..\test\icon.bmp" "$(TargetDir)\icon.bmp"
-    
-    
-      Copy SDL and data files
-    
-  
-  
-    
-    
-  
-  
-    
-  
-  
-  
-  
-
diff --git a/VisualC/tests/testvidinfo/testvidinfo_VS2008.vcproj b/VisualC/tests/testvidinfo/testvidinfo_VS2008.vcproj
deleted file mode 100644
index b71b54fc4..000000000
--- a/VisualC/tests/testvidinfo/testvidinfo_VS2008.vcproj
+++ /dev/null
@@ -1,205 +0,0 @@
-
-
-	
-		
-	
-	
-	
-	
-		
-			
-			
-			
-			
-			
-			
-			
-			
-			
-			
-			
-			
-			
-			
-			
-			
-			
-		
-		
-			
-			
-			
-			
-			
-			
-			
-			
-			
-			
-			
-			
-			
-			
-			
-			
-			
-		
-	
-	
-	
-	
-		
-		
-	
-	
-	
-
diff --git a/VisualC/tests/testvidinfo/testvidinfo_VS2010.vcxproj b/VisualC/tests/testvidinfo/testvidinfo_VS2010.vcxproj
deleted file mode 100644
index af69df17d..000000000
--- a/VisualC/tests/testvidinfo/testvidinfo_VS2010.vcxproj
+++ /dev/null
@@ -1,227 +0,0 @@
-
-
-  
-    
-      Debug
-      Win32
-    
-    
-      Debug
-      x64
-    
-    
-      Release
-      Win32
-    
-    
-      Release
-      x64
-    
-  
-  
-    testvidinfo
-    testvidinfo
-    {575FD095-EDAB-4BD4-B733-CD4A874F6FB0}
-  
-  
-  
-    Application
-    false
-  
-  
-    Application
-    false
-    MultiByte
-  
-  
-    Application
-    false
-  
-  
-    Application
-    false
-  
-  
-  
-  
-  
-    
-    
-  
-  
-    
-    
-  
-  
-    
-    
-  
-  
-    
-    
-  
-  
-  
-    <_ProjectFileVersion>10.0.30319.1
-    $(Platform)\$(Configuration)\
-    $(Platform)\$(Configuration)\
-    $(Platform)\$(Configuration)\
-    $(Platform)\$(Configuration)\
-    false
-    false
-    $(Platform)\$(Configuration)\
-    $(Platform)\$(Configuration)\
-    $(Platform)\$(Configuration)\
-    $(Platform)\$(Configuration)\
-    true
-    true
-  
-  
-    
-      NDEBUG;%(PreprocessorDefinitions)
-      true
-      true
-      Win32
-    
-    
-      OnlyExplicitInline
-      ..\..\..\include;%(AdditionalIncludeDirectories)
-      WIN32;NDEBUG;_WINDOWS;%(PreprocessorDefinitions)
-      true
-      MultiThreadedDLL
-      true
-      
-      
-      Level3
-      true
-      Default
-    
-    
-      NDEBUG;%(PreprocessorDefinitions)
-      0x0409
-    
-    
-      true
-      Windows
-    
-    
-      copy "$(SolutionDir)\SDL\$(Platform)\$(Configuration)\SDL2.dll" "$(TargetDir)\SDL2.dll"
-    
-    
-      Copy SDL
-    
-  
-  
-    
-      NDEBUG;%(PreprocessorDefinitions)
-      true
-      true
-    
-    
-      OnlyExplicitInline
-      ..\..\..\include;%(AdditionalIncludeDirectories)
-      WIN32;NDEBUG;_WINDOWS;%(PreprocessorDefinitions)
-      true
-      MultiThreadedDLL
-      true
-      
-      
-      Level3
-      true
-      Default
-    
-    
-      NDEBUG;%(PreprocessorDefinitions)
-      0x0409
-    
-    
-      true
-      Windows
-    
-    
-      copy "$(SolutionDir)\SDL\$(Platform)\$(Configuration)\SDL2.dll" "$(TargetDir)\SDL2.dll"
-    
-    
-      Copy SDL
-    
-  
-  
-    
-      _DEBUG;%(PreprocessorDefinitions)
-      true
-      true
-      Win32
-    
-    
-      Disabled
-      ..\..\..\include;%(AdditionalIncludeDirectories)
-      WIN32;_DEBUG;_WINDOWS;%(PreprocessorDefinitions)
-      MultiThreadedDebugDLL
-      
-      
-      Level3
-      true
-      EditAndContinue
-      Default
-    
-    
-      _DEBUG;%(PreprocessorDefinitions)
-      0x0409
-    
-    
-      true
-      true
-      Windows
-    
-    
-      copy "$(SolutionDir)\SDL\$(Platform)\$(Configuration)\SDL2.dll" "$(TargetDir)\SDL2.dll"
-    
-    
-      Copy SDL
-    
-  
-  
-    
-      _DEBUG;%(PreprocessorDefinitions)
-      true
-      true
-    
-    
-      Disabled
-      ..\..\..\include;%(AdditionalIncludeDirectories)
-      WIN32;_DEBUG;_WINDOWS;%(PreprocessorDefinitions)
-      MultiThreadedDebugDLL
-      
-      
-      Level3
-      true
-      ProgramDatabase
-      Default
-    
-    
-      _DEBUG;%(PreprocessorDefinitions)
-      0x0409
-    
-    
-      true
-      true
-      Windows
-    
-    
-      copy "$(SolutionDir)\SDL\$(Platform)\$(Configuration)\SDL2.dll" "$(TargetDir)\SDL2.dll"
-    
-    
-      Copy SDL
-    
-  
-  
-    
-    
-  
-  
-    
-  
-  
-  
-  
-
diff --git a/VisualC/tests/testwin/testwin_VS2008.vcproj b/VisualC/tests/testwin/testwin_VS2008.vcproj
deleted file mode 100644
index d1e760685..000000000
--- a/VisualC/tests/testwin/testwin_VS2008.vcproj
+++ /dev/null
@@ -1,205 +0,0 @@
-
-
-	
-		
-	
-	
-	
-	
-		
-			
-			
-			
-			
-			
-			
-			
-			
-			
-			
-			
-			
-			
-			
-			
-			
-			
-		
-		
-			
-			
-			
-			
-			
-			
-			
-			
-			
-			
-			
-			
-			
-			
-			
-			
-			
-		
-	
-	
-	
-	
-		
-		
-	
-	
-	
-
diff --git a/VisualC/tests/testwin/testwin_VS2010.vcxproj b/VisualC/tests/testwin/testwin_VS2010.vcxproj
deleted file mode 100644
index 679c322ea..000000000
--- a/VisualC/tests/testwin/testwin_VS2010.vcxproj
+++ /dev/null
@@ -1,232 +0,0 @@
-
-
-  
-    
-      Debug
-      Win32
-    
-    
-      Debug
-      x64
-    
-    
-      Release
-      Win32
-    
-    
-      Release
-      x64
-    
-  
-  
-    testwin
-    testwin
-    {0FFD1A21-11DB-492C-A989-E4F195B0C441}
-  
-  
-  
-    Application
-    false
-  
-  
-    Application
-    false
-  
-  
-    Application
-    false
-  
-  
-    Application
-    false
-    MultiByte
-  
-  
-  
-  
-  
-    
-    
-  
-  
-    
-    
-  
-  
-    
-    
-  
-  
-    
-    
-  
-  
-  
-    <_ProjectFileVersion>10.0.30319.1
-    $(Platform)\$(Configuration)\
-    $(Platform)\$(Configuration)\
-    $(Platform)\$(Configuration)\
-    $(Platform)\$(Configuration)\
-    true
-    true
-    $(Platform)\$(Configuration)\
-    $(Platform)\$(Configuration)\
-    $(Platform)\$(Configuration)\
-    $(Platform)\$(Configuration)\
-    false
-    false
-  
-  
-    
-      _DEBUG;%(PreprocessorDefinitions)
-      true
-      true
-      Win32
-    
-    
-      Disabled
-      ..\..\..\include;%(AdditionalIncludeDirectories)
-      WIN32;_DEBUG;_WINDOWS;%(PreprocessorDefinitions)
-      MultiThreadedDebugDLL
-      
-      
-      Level3
-      true
-      EditAndContinue
-      Default
-    
-    
-      _DEBUG;%(PreprocessorDefinitions)
-      0x0409
-    
-    
-      true
-      true
-      Windows
-    
-    
-      copy "$(SolutionDir)\SDL\$(Platform)\$(Configuration)\SDL2.dll" "$(TargetDir)\SDL2.dll"
-copy "$(SolutionDir)\..\test\sample.bmp" "$(TargetDir)\sample.bmp"
-    
-    
-      Copy SDL and data files
-    
-  
-  
-    
-      _DEBUG;%(PreprocessorDefinitions)
-      true
-      true
-    
-    
-      Disabled
-      ..\..\..\include;%(AdditionalIncludeDirectories)
-      WIN32;_DEBUG;_WINDOWS;%(PreprocessorDefinitions)
-      MultiThreadedDebugDLL
-      
-      
-      Level3
-      true
-      ProgramDatabase
-      Default
-    
-    
-      _DEBUG;%(PreprocessorDefinitions)
-      0x0409
-    
-    
-      true
-      true
-      Windows
-    
-    
-      copy "$(SolutionDir)\SDL\$(Platform)\$(Configuration)\SDL2.dll" "$(TargetDir)\SDL2.dll"
-copy "$(SolutionDir)\..\test\sample.bmp" "$(TargetDir)\sample.bmp"
-    
-    
-      Copy SDL and data files
-    
-  
-  
-    
-      NDEBUG;%(PreprocessorDefinitions)
-      true
-      true
-      Win32
-    
-    
-      OnlyExplicitInline
-      ..\..\..\include;%(AdditionalIncludeDirectories)
-      WIN32;NDEBUG;_WINDOWS;%(PreprocessorDefinitions)
-      true
-      MultiThreadedDLL
-      true
-      
-      
-      Level3
-      true
-      Default
-    
-    
-      NDEBUG;%(PreprocessorDefinitions)
-      0x0409
-    
-    
-      true
-      Windows
-    
-    
-      copy "$(SolutionDir)\SDL\$(Platform)\$(Configuration)\SDL2.dll" "$(TargetDir)\SDL2.dll"
-copy "$(SolutionDir)\..\test\sample.bmp" "$(TargetDir)\sample.bmp"
-    
-    
-      Copy SDL and data files
-    
-  
-  
-    
-      NDEBUG;%(PreprocessorDefinitions)
-      true
-      true
-    
-    
-      OnlyExplicitInline
-      ..\..\..\include;%(AdditionalIncludeDirectories)
-      WIN32;NDEBUG;_WINDOWS;%(PreprocessorDefinitions)
-      true
-      MultiThreadedDLL
-      true
-      
-      
-      Level3
-      true
-      Default
-    
-    
-      NDEBUG;%(PreprocessorDefinitions)
-      0x0409
-    
-    
-      true
-      Windows
-    
-    
-      
-        copy $(SolutionDir)\SDL\$(Platform)\$(Configuration)\SDL2.dll $(TargetDir)\SDL2.dll
-        copy $(SolutionDir)\..\test\sample.bmp $(TargetDir)\sample.bmp
-    
-    
-      Copy SDL and data files
-    
-  
-  
-    
-    
-  
-  
-    
-  
-  
-  
-  
-
diff --git a/VisualC/tests/testwm/testwm_VS2008.vcproj b/VisualC/tests/testwm/testwm_VS2008.vcproj
deleted file mode 100644
index de3c6034a..000000000
--- a/VisualC/tests/testwm/testwm_VS2008.vcproj
+++ /dev/null
@@ -1,205 +0,0 @@
-
-
-	
-		
-	
-	
-	
-	
-		
-			
-			
-			
-			
-			
-			
-			
-			
-			
-			
-			
-			
-			
-			
-			
-			
-			
-		
-		
-			
-			
-			
-			
-			
-			
-			
-			
-			
-			
-			
-			
-			
-			
-			
-			
-			
-		
-	
-	
-	
-	
-		
-		
-	
-	
-	
-
diff --git a/VisualC/tests/testwm/testwm_VS2010.vcxproj b/VisualC/tests/testwm/testwm_VS2010.vcxproj
deleted file mode 100644
index b4d231650..000000000
--- a/VisualC/tests/testwm/testwm_VS2010.vcxproj
+++ /dev/null
@@ -1,227 +0,0 @@
-
-
-  
-    
-      Debug
-      Win32
-    
-    
-      Debug
-      x64
-    
-    
-      Release
-      Win32
-    
-    
-      Release
-      x64
-    
-  
-  
-    testwm
-    testwm
-    {6AF0724B-BAC1-4C9D-AFBF-F63B4A2FB8FB}
-  
-  
-  
-    Application
-    false
-  
-  
-    Application
-    false
-  
-  
-    Application
-    false
-  
-  
-    Application
-    false
-    MultiByte
-  
-  
-  
-  
-  
-    
-    
-  
-  
-    
-    
-  
-  
-    
-    
-  
-  
-    
-    
-  
-  
-  
-    <_ProjectFileVersion>10.0.30319.1
-    $(Platform)\$(Configuration)\
-    $(Platform)\$(Configuration)\
-    $(Platform)\$(Configuration)\
-    $(Platform)\$(Configuration)\
-    true
-    true
-    $(Platform)\$(Configuration)\
-    $(Platform)\$(Configuration)\
-    $(Platform)\$(Configuration)\
-    $(Platform)\$(Configuration)\
-    false
-    false
-  
-  
-    
-      _DEBUG;%(PreprocessorDefinitions)
-      true
-      true
-      Win32
-    
-    
-      Disabled
-      ..\..\..\include;%(AdditionalIncludeDirectories)
-      WIN32;_DEBUG;_WINDOWS;%(PreprocessorDefinitions)
-      MultiThreadedDebugDLL
-      
-      
-      Level3
-      true
-      EditAndContinue
-      Default
-    
-    
-      _DEBUG;%(PreprocessorDefinitions)
-      0x0409
-    
-    
-      true
-      true
-      Windows
-    
-    
-      copy "$(SolutionDir)\SDL\$(Platform)\$(Configuration)\SDL2.dll" "$(TargetDir)\SDL2.dll"
-    
-    
-      Copy SDL
-    
-  
-  
-    
-      _DEBUG;%(PreprocessorDefinitions)
-      true
-      true
-    
-    
-      Disabled
-      ..\..\..\include;%(AdditionalIncludeDirectories)
-      WIN32;_DEBUG;_WINDOWS;%(PreprocessorDefinitions)
-      MultiThreadedDebugDLL
-      
-      
-      Level3
-      true
-      ProgramDatabase
-      Default
-    
-    
-      _DEBUG;%(PreprocessorDefinitions)
-      0x0409
-    
-    
-      true
-      true
-      Windows
-    
-    
-      copy "$(SolutionDir)\SDL\$(Platform)\$(Configuration)\SDL2.dll" "$(TargetDir)\SDL2.dll"
-    
-    
-      Copy SDL
-    
-  
-  
-    
-      NDEBUG;%(PreprocessorDefinitions)
-      true
-      true
-      Win32
-    
-    
-      OnlyExplicitInline
-      ..\..\..\include;%(AdditionalIncludeDirectories)
-      WIN32;NDEBUG;_WINDOWS;%(PreprocessorDefinitions)
-      true
-      MultiThreadedDLL
-      true
-      
-      
-      Level3
-      true
-      Default
-    
-    
-      NDEBUG;%(PreprocessorDefinitions)
-      0x0409
-    
-    
-      true
-      Windows
-    
-    
-      copy "$(SolutionDir)\SDL\$(Platform)\$(Configuration)\SDL2.dll" "$(TargetDir)\SDL2.dll"
-    
-    
-      Copy SDL
-    
-  
-  
-    
-      NDEBUG;%(PreprocessorDefinitions)
-      true
-      true
-    
-    
-      OnlyExplicitInline
-      ..\..\..\include;%(AdditionalIncludeDirectories)
-      WIN32;NDEBUG;_WINDOWS;%(PreprocessorDefinitions)
-      true
-      MultiThreadedDLL
-      true
-      
-      
-      Level3
-      true
-      Default
-    
-    
-      NDEBUG;%(PreprocessorDefinitions)
-      0x0409
-    
-    
-      true
-      Windows
-    
-    
-      copy "$(SolutionDir)\SDL\$(Platform)\$(Configuration)\SDL2.dll" "$(TargetDir)\SDL2.dll"
-    
-    
-      Copy SDL
-    
-  
-  
-    
-    
-  
-  
-    
-  
-  
-  
-  
-

From 5a7d3757f5e5b251d7cd7d663ff53f150a426049 Mon Sep 17 00:00:00 2001
From: Andreas Schiffler 
Date: Mon, 3 Jun 2013 19:24:18 -0700
Subject: [PATCH 185/542] Add missing VS2012 test projects; update VS2010 and
 VS2012 solutions; update keybord suite for VS compiler warnings

---
 VisualC/SDL_VS2010.sln                        |  45 +++-
 VisualC/SDL_VS2012.sln                        |  39 ++-
 .../testatomic/testatomic_VS2010.vcxproj      | 161 +++++++++---
 .../testatomic/testatomic_VS2012.vcxproj      | 235 +++++++++++++++++
 .../testrendertarget_VS2010.vcxproj           | 214 +++++++--------
 .../testrendertarget_VS2012.vcxproj           | 245 +++++++++++++++++
 .../tests/testscale/testscale_VS2010.vcxproj  | 214 +++++++--------
 .../tests/testscale/testscale_VS2012.vcxproj  | 246 ++++++++++++++++++
 test/testautomation_keyboard.c                |   4 +-
 9 files changed, 1151 insertions(+), 252 deletions(-)
 create mode 100644 VisualC/tests/testatomic/testatomic_VS2012.vcxproj
 create mode 100644 VisualC/tests/testrendertarget/testrendertarget_VS2012.vcxproj
 create mode 100644 VisualC/tests/testscale/testscale_VS2012.vcxproj

diff --git a/VisualC/SDL_VS2010.sln b/VisualC/SDL_VS2010.sln
index 5b95292ab..9128a2f21 100644
--- a/VisualC/SDL_VS2010.sln
+++ b/VisualC/SDL_VS2010.sln
@@ -29,6 +29,12 @@ Project("{8BC9CEB8-8B4A-11D0-8D11-00A0C91BC942}") = "SDL2test", "SDLtest\SDLtest
 EndProject
 Project("{8BC9CEB8-8B4A-11D0-8D11-00A0C91BC942}") = "testautomation", "tests\testautomation\testautomation_vs2010.vcxproj", "{FEE710DB-EC7B-4CCB-BD75-535D401A2FE0}"
 EndProject
+Project("{8BC9CEB8-8B4A-11D0-8D11-00A0C91BC942}") = "testatomic", "tests\testatomic\testatomic_VS2010.vcxproj", "{2271060E-98B4-4596-8172-A041E4B2EC7A}"
+EndProject
+Project("{8BC9CEB8-8B4A-11D0-8D11-00A0C91BC942}") = "testscale", "tests\testscale\testscale_VS2010.vcxproj", "{E7A6C41C-E059-4C9C-8CCC-73586A540B62}"
+EndProject
+Project("{8BC9CEB8-8B4A-11D0-8D11-00A0C91BC942}") = "testrendertarget", "tests\testrendertarget\testrendertarget_VS2010.vcxproj", "{43A06713-A52D-4008-AD7E-A69DF3FCFFA8}"
+EndProject
 Global
 	GlobalSection(SolutionConfigurationPlatforms) = preSolution
 		Debug|Win32 = Debug|Win32
@@ -141,20 +147,45 @@ Global
 		{FEE710DB-EC7B-4CCB-BD75-535D401A2FE0}.Release|Win32.Build.0 = Release|Win32
 		{FEE710DB-EC7B-4CCB-BD75-535D401A2FE0}.Release|x64.ActiveCfg = Release|x64
 		{FEE710DB-EC7B-4CCB-BD75-535D401A2FE0}.Release|x64.Build.0 = Release|x64
+		{2271060E-98B4-4596-8172-A041E4B2EC7A}.Debug|Win32.ActiveCfg = Debug|Win32
+		{2271060E-98B4-4596-8172-A041E4B2EC7A}.Debug|Win32.Build.0 = Debug|Win32
+		{2271060E-98B4-4596-8172-A041E4B2EC7A}.Debug|x64.ActiveCfg = Debug|Win32
+		{2271060E-98B4-4596-8172-A041E4B2EC7A}.Release|Win32.ActiveCfg = Release|Win32
+		{2271060E-98B4-4596-8172-A041E4B2EC7A}.Release|Win32.Build.0 = Release|Win32
+		{2271060E-98B4-4596-8172-A041E4B2EC7A}.Release|x64.ActiveCfg = Release|Win32
+		{E7A6C41C-E059-4C9C-8CCC-73586A540B62}.Debug|Win32.ActiveCfg = Debug|Win32
+		{E7A6C41C-E059-4C9C-8CCC-73586A540B62}.Debug|Win32.Build.0 = Debug|Win32
+		{E7A6C41C-E059-4C9C-8CCC-73586A540B62}.Debug|x64.ActiveCfg = Debug|x64
+		{E7A6C41C-E059-4C9C-8CCC-73586A540B62}.Debug|x64.Build.0 = Debug|x64
+		{E7A6C41C-E059-4C9C-8CCC-73586A540B62}.Release|Win32.ActiveCfg = Release|Win32
+		{E7A6C41C-E059-4C9C-8CCC-73586A540B62}.Release|Win32.Build.0 = Release|Win32
+		{E7A6C41C-E059-4C9C-8CCC-73586A540B62}.Release|x64.ActiveCfg = Release|x64
+		{E7A6C41C-E059-4C9C-8CCC-73586A540B62}.Release|x64.Build.0 = Release|x64
+		{43A06713-A52D-4008-AD7E-A69DF3FCFFA8}.Debug|Win32.ActiveCfg = Debug|Win32
+		{43A06713-A52D-4008-AD7E-A69DF3FCFFA8}.Debug|Win32.Build.0 = Debug|Win32
+		{43A06713-A52D-4008-AD7E-A69DF3FCFFA8}.Debug|x64.ActiveCfg = Debug|x64
+		{43A06713-A52D-4008-AD7E-A69DF3FCFFA8}.Debug|x64.Build.0 = Debug|x64
+		{43A06713-A52D-4008-AD7E-A69DF3FCFFA8}.Release|Win32.ActiveCfg = Release|Win32
+		{43A06713-A52D-4008-AD7E-A69DF3FCFFA8}.Release|Win32.Build.0 = Release|Win32
+		{43A06713-A52D-4008-AD7E-A69DF3FCFFA8}.Release|x64.ActiveCfg = Release|x64
+		{43A06713-A52D-4008-AD7E-A69DF3FCFFA8}.Release|x64.Build.0 = Release|x64
 	EndGlobalSection
 	GlobalSection(SolutionProperties) = preSolution
 		HideSolutionNode = FALSE
 	EndGlobalSection
 	GlobalSection(NestedProjects) = preSolution
-		{FEE710DB-EC7B-4CCB-BD75-535D401A2FE0} = {CE748C1F-3C21-4825-AA6A-F895A023F7E7}
-		{40FB7794-D3C3-4CFE-BCF4-A80C96635682} = {CE748C1F-3C21-4825-AA6A-F895A023F7E7}
-		{8682FE1E-0CF6-4EDD-9BB5-1733D8C8B4DF} = {CE748C1F-3C21-4825-AA6A-F895A023F7E7}
+		{AAAD1CB5-7ADA-47AE-85A0-08A6EC48FAFB} = {CE748C1F-3C21-4825-AA6A-F895A023F7E7}
+		{26932B24-EFC6-4E3A-B277-ED653DA37968} = {CE748C1F-3C21-4825-AA6A-F895A023F7E7}
 		{CAE4F1D0-314F-4B10-805B-0EFD670133A0} = {CE748C1F-3C21-4825-AA6A-F895A023F7E7}
 		{8B5CFB38-CCBA-40A8-AD7A-89C57B070884} = {CE748C1F-3C21-4825-AA6A-F895A023F7E7}
-		{26932B24-EFC6-4E3A-B277-ED653DA37968} = {CE748C1F-3C21-4825-AA6A-F895A023F7E7}
-		{C4E04D18-EF76-4B42-B4C2-16A1BACDC0A3} = {CE748C1F-3C21-4825-AA6A-F895A023F7E7}
-		{EDEA9D00-AF64-45DE-8F60-5957048F2F0F} = {CE748C1F-3C21-4825-AA6A-F895A023F7E7}
 		{26828762-C95D-4637-9CB1-7F0979523813} = {CE748C1F-3C21-4825-AA6A-F895A023F7E7}
-		{AAAD1CB5-7ADA-47AE-85A0-08A6EC48FAFB} = {CE748C1F-3C21-4825-AA6A-F895A023F7E7}
+		{40FB7794-D3C3-4CFE-BCF4-A80C96635682} = {CE748C1F-3C21-4825-AA6A-F895A023F7E7}
+		{EDEA9D00-AF64-45DE-8F60-5957048F2F0F} = {CE748C1F-3C21-4825-AA6A-F895A023F7E7}
+		{8682FE1E-0CF6-4EDD-9BB5-1733D8C8B4DF} = {CE748C1F-3C21-4825-AA6A-F895A023F7E7}
+		{C4E04D18-EF76-4B42-B4C2-16A1BACDC0A3} = {CE748C1F-3C21-4825-AA6A-F895A023F7E7}
+		{FEE710DB-EC7B-4CCB-BD75-535D401A2FE0} = {CE748C1F-3C21-4825-AA6A-F895A023F7E7}
+		{2271060E-98B4-4596-8172-A041E4B2EC7A} = {CE748C1F-3C21-4825-AA6A-F895A023F7E7}
+		{E7A6C41C-E059-4C9C-8CCC-73586A540B62} = {CE748C1F-3C21-4825-AA6A-F895A023F7E7}
+		{43A06713-A52D-4008-AD7E-A69DF3FCFFA8} = {CE748C1F-3C21-4825-AA6A-F895A023F7E7}
 	EndGlobalSection
 EndGlobal
diff --git a/VisualC/SDL_VS2012.sln b/VisualC/SDL_VS2012.sln
index f0e01b233..430b3147c 100644
--- a/VisualC/SDL_VS2012.sln
+++ b/VisualC/SDL_VS2012.sln
@@ -1,9 +1,9 @@
 
 Microsoft Visual Studio Solution File, Format Version 12.00
 # Visual Studio 2012
-Project("{8BC9CEB8-8B4A-11D0-8D11-00A0C91BC942}") = "SDL", "SDL\SDL_VS2012.vcxproj", "{81CE8DAF-EBB2-4761-8E45-B71ABCCA8C68}"
+Project("{8BC9CEB8-8B4A-11D0-8D11-00A0C91BC942}") = "SDL2", "SDL\SDL_VS2012.vcxproj", "{81CE8DAF-EBB2-4761-8E45-B71ABCCA8C68}"
 EndProject
-Project("{8BC9CEB8-8B4A-11D0-8D11-00A0C91BC942}") = "SDLmain", "SDLmain\SDLmain_VS2012.vcxproj", "{DA956FD3-E142-46F2-9DD5-C78BEBB56B7A}"
+Project("{8BC9CEB8-8B4A-11D0-8D11-00A0C91BC942}") = "SDL2main", "SDLmain\SDLmain_VS2012.vcxproj", "{DA956FD3-E142-46F2-9DD5-C78BEBB56B7A}"
 EndProject
 Project("{2150E333-8FDC-42A3-9474-1A3956D46DE8}") = "tests", "tests", "{CE748C1F-3C21-4825-AA6A-F895A023F7E7}"
 EndProject
@@ -64,7 +64,7 @@ Project("{8BC9CEB8-8B4A-11D0-8D11-00A0C91BC942}") = "testpower", "tests\testpowe
 		{DA956FD3-E142-46F2-9DD5-C78BEBB56B7A} = {DA956FD3-E142-46F2-9DD5-C78BEBB56B7A}
 	EndProjectSection
 EndProject
-Project("{8BC9CEB8-8B4A-11D0-8D11-00A0C91BC942}") = "SDLtest", "SDLtest\SDLtest_VS2012.vcxproj", "{DA956FD3-E143-46F2-9FE5-C77BEBC56B1A}"
+Project("{8BC9CEB8-8B4A-11D0-8D11-00A0C91BC942}") = "SDL2test", "SDLtest\SDLtest_VS2012.vcxproj", "{DA956FD3-E143-46F2-9FE5-C77BEBC56B1A}"
 	ProjectSection(ProjectDependencies) = postProject
 		{81CE8DAF-EBB2-4761-8E45-B71ABCCA8C68} = {81CE8DAF-EBB2-4761-8E45-B71ABCCA8C68}
 	EndProjectSection
@@ -76,6 +76,12 @@ Project("{8BC9CEB8-8B4A-11D0-8D11-00A0C91BC942}") = "testautomation", "tests\tes
 		{DA956FD3-E143-46F2-9FE5-C77BEBC56B1A} = {DA956FD3-E143-46F2-9FE5-C77BEBC56B1A}
 	EndProjectSection
 EndProject
+Project("{8BC9CEB8-8B4A-11D0-8D11-00A0C91BC942}") = "testatomic", "tests\testatomic\testatomic_VS2012.vcxproj", "{2271060E-98B4-4596-8172-A041E4B2EC7A}"
+EndProject
+Project("{8BC9CEB8-8B4A-11D0-8D11-00A0C91BC942}") = "testscale", "tests\testscale\testscale_VS2012.vcxproj", "{E7A6C41C-E059-4C9C-8CCC-73586A540B62}"
+EndProject
+Project("{8BC9CEB8-8B4A-11D0-8D11-00A0C91BC942}") = "testrendertarget", "tests\testrendertarget\testrendertarget_VS2012.vcxproj", "{43A06713-A52D-4008-AD7E-A69DF3FCFFA8}"
+EndProject
 Global
 	GlobalSection(SolutionConfigurationPlatforms) = preSolution
 		Debug|Win32 = Debug|Win32
@@ -178,6 +184,30 @@ Global
 		{FEE710DB-EC7B-4CCB-BD75-535D401A2FE0}.Release|Win32.Build.0 = Release|Win32
 		{FEE710DB-EC7B-4CCB-BD75-535D401A2FE0}.Release|x64.ActiveCfg = Release|x64
 		{FEE710DB-EC7B-4CCB-BD75-535D401A2FE0}.Release|x64.Build.0 = Release|x64
+		{2271060E-98B4-4596-8172-A041E4B2EC7A}.Debug|Win32.ActiveCfg = Debug|Win32
+		{2271060E-98B4-4596-8172-A041E4B2EC7A}.Debug|Win32.Build.0 = Debug|Win32
+		{2271060E-98B4-4596-8172-A041E4B2EC7A}.Debug|x64.ActiveCfg = Debug|x64
+		{2271060E-98B4-4596-8172-A041E4B2EC7A}.Debug|x64.Build.0 = Debug|x64
+		{2271060E-98B4-4596-8172-A041E4B2EC7A}.Release|Win32.ActiveCfg = Release|Win32
+		{2271060E-98B4-4596-8172-A041E4B2EC7A}.Release|Win32.Build.0 = Release|Win32
+		{2271060E-98B4-4596-8172-A041E4B2EC7A}.Release|x64.ActiveCfg = Release|x64
+		{2271060E-98B4-4596-8172-A041E4B2EC7A}.Release|x64.Build.0 = Release|x64
+		{E7A6C41C-E059-4C9C-8CCC-73586A540B62}.Debug|Win32.ActiveCfg = Debug|Win32
+		{E7A6C41C-E059-4C9C-8CCC-73586A540B62}.Debug|Win32.Build.0 = Debug|Win32
+		{E7A6C41C-E059-4C9C-8CCC-73586A540B62}.Debug|x64.ActiveCfg = Debug|x64
+		{E7A6C41C-E059-4C9C-8CCC-73586A540B62}.Debug|x64.Build.0 = Debug|x64
+		{E7A6C41C-E059-4C9C-8CCC-73586A540B62}.Release|Win32.ActiveCfg = Release|Win32
+		{E7A6C41C-E059-4C9C-8CCC-73586A540B62}.Release|Win32.Build.0 = Release|Win32
+		{E7A6C41C-E059-4C9C-8CCC-73586A540B62}.Release|x64.ActiveCfg = Release|x64
+		{E7A6C41C-E059-4C9C-8CCC-73586A540B62}.Release|x64.Build.0 = Release|x64
+		{43A06713-A52D-4008-AD7E-A69DF3FCFFA8}.Debug|Win32.ActiveCfg = Debug|Win32
+		{43A06713-A52D-4008-AD7E-A69DF3FCFFA8}.Debug|Win32.Build.0 = Debug|Win32
+		{43A06713-A52D-4008-AD7E-A69DF3FCFFA8}.Debug|x64.ActiveCfg = Debug|x64
+		{43A06713-A52D-4008-AD7E-A69DF3FCFFA8}.Debug|x64.Build.0 = Debug|x64
+		{43A06713-A52D-4008-AD7E-A69DF3FCFFA8}.Release|Win32.ActiveCfg = Release|Win32
+		{43A06713-A52D-4008-AD7E-A69DF3FCFFA8}.Release|Win32.Build.0 = Release|Win32
+		{43A06713-A52D-4008-AD7E-A69DF3FCFFA8}.Release|x64.ActiveCfg = Release|x64
+		{43A06713-A52D-4008-AD7E-A69DF3FCFFA8}.Release|x64.Build.0 = Release|x64
 	EndGlobalSection
 	GlobalSection(SolutionProperties) = preSolution
 		HideSolutionNode = FALSE
@@ -193,5 +223,8 @@ Global
 		{8682FE1E-0CF6-4EDD-9BB5-1733D8C8B4DF} = {CE748C1F-3C21-4825-AA6A-F895A023F7E7}
 		{C4E04D18-EF76-4B42-B4C2-16A1BACDC0A3} = {CE748C1F-3C21-4825-AA6A-F895A023F7E7}
 		{FEE710DB-EC7B-4CCB-BD75-535D401A2FE0} = {CE748C1F-3C21-4825-AA6A-F895A023F7E7}
+		{2271060E-98B4-4596-8172-A041E4B2EC7A} = {CE748C1F-3C21-4825-AA6A-F895A023F7E7}
+		{E7A6C41C-E059-4C9C-8CCC-73586A540B62} = {CE748C1F-3C21-4825-AA6A-F895A023F7E7}
+		{43A06713-A52D-4008-AD7E-A69DF3FCFFA8} = {CE748C1F-3C21-4825-AA6A-F895A023F7E7}
 	EndGlobalSection
 EndGlobal
diff --git a/VisualC/tests/testatomic/testatomic_VS2010.vcxproj b/VisualC/tests/testatomic/testatomic_VS2010.vcxproj
index bac44109f..3b7c7e100 100644
--- a/VisualC/tests/testatomic/testatomic_VS2010.vcxproj
+++ b/VisualC/tests/testatomic/testatomic_VS2010.vcxproj
@@ -1,22 +1,34 @@
-
+
 
   
     
       Debug
       Win32
     
+    
+      Debug
+      x64
+    
     
       Release
       Win32
     
+    
+      Release
+      x64
+    
   
   
     testatomic
-    {C4E04D18-EF76-4B42-B4C2-16A1BACDC0A3}
+    {2271060E-98B4-4596-8172-A041E4B2EC7A}
     testatomic
   
   
-  
+   
+    Application
+    false
+  
+  
     Application
     false
   
@@ -24,26 +36,45 @@
     Application
     false
   
-  
+  
+    Application
+    false
+    MultiByte
+  
+ 
   
   
   
     
     
   
+  
+    
+    
+  
   
     
     
   
+  
+    
+    
+  
   
   
     <_ProjectFileVersion>10.0.30319.1
-    .\Debug\
-    .\Debug\
+    $(Platform)\$(Configuration)\
+    $(Platform)\$(Configuration)\
+    $(Platform)\$(Configuration)\
+    $(Platform)\$(Configuration)\
     true
-    .\Release\
-    .\Release\
+    true
+    $(Platform)\$(Configuration)\
+    $(Platform)\$(Configuration)\
+    $(Platform)\$(Configuration)\
+    $(Platform)\$(Configuration)\
     false
+    false
   
   
     
@@ -51,19 +82,14 @@
       true
       true
       Win32
-      .\Debug/testatomic.tlb
     
     
       Disabled
       ..\..\..\include;%(AdditionalIncludeDirectories)
       WIN32;_DEBUG;_WINDOWS;%(PreprocessorDefinitions)
-      MultiThreadedDLL
+      MultiThreadedDebugDLL
       
       
-      .\Debug/testatomic.pch
-      .\Debug/
-      .\Debug/
-      .\Debug/
       Level3
       true
       EditAndContinue
@@ -74,13 +100,50 @@
       0x0409
     
     
-      /MACHINE:I386 %(AdditionalOptions)
-      .\Debug/testatomic.exe
       true
       true
-      .\Debug/testatomic.pdb
       Windows
     
+    
+      copy "$(SolutionDir)\SDL\$(Platform)\$(Configuration)\SDL2.dll" "$(TargetDir)\SDL2.dll"
+    
+    
+      Copy SDL
+    
+  
+  
+    
+      _DEBUG;%(PreprocessorDefinitions)
+      true
+      true
+    
+    
+      Disabled
+      ..\..\..\include;%(AdditionalIncludeDirectories)
+      WIN32;_DEBUG;_WINDOWS;%(PreprocessorDefinitions)
+      MultiThreadedDebugDLL
+      
+      
+      Level3
+      true
+      ProgramDatabase
+      Default
+    
+    
+      _DEBUG;%(PreprocessorDefinitions)
+      0x0409
+    
+    
+      true
+      true
+      Windows
+    
+    
+      copy "$(SolutionDir)\SDL\$(Platform)\$(Configuration)\SDL2.dll" "$(TargetDir)\SDL2.dll"
+    
+    
+      Copy SDL
+    
   
   
     
@@ -88,7 +151,6 @@
       true
       true
       Win32
-      .\Release/testatomic.tlb
     
     
       OnlyExplicitInline
@@ -99,10 +161,6 @@
       true
       
       
-      .\Release/testatomic.pch
-      .\Release/
-      .\Release/
-      .\Release/
       Level3
       true
       Default
@@ -112,23 +170,62 @@
       0x0409
     
     
-      /MACHINE:I386 %(AdditionalOptions)
-      .\Release/testatomic.exe
       true
-      .\Release/testatomic.pdb
       Windows
     
+    
+      copy "$(SolutionDir)\SDL\$(Platform)\$(Configuration)\SDL2.dll" "$(TargetDir)\SDL2.dll"
+    
+    
+      Copy SDL
+    
+  
+  
+    
+      NDEBUG;%(PreprocessorDefinitions)
+      true
+      true
+    
+    
+      OnlyExplicitInline
+      ..\..\..\include;%(AdditionalIncludeDirectories)
+      WIN32;NDEBUG;_WINDOWS;%(PreprocessorDefinitions)
+      true
+      MultiThreadedDLL
+      true
+      
+      
+      Level3
+      true
+      Default
+    
+    
+      NDEBUG;%(PreprocessorDefinitions)
+      0x0409
+    
+    
+      true
+      Windows
+    
+    
+      copy "$(SolutionDir)\SDL\$(Platform)\$(Configuration)\SDL2.dll" "$(TargetDir)\SDL2.dll"
+    
+    
+      Copy SDL
+    
   
   
-    
-    
+    
   
   
-    
-      .\Debug/testatomic.pch
-    
-  
+    
+      {da956fd3-e142-46f2-9dd5-c78bebb56b7a}
+    
+    
+      {81ce8daf-ebb2-4761-8e45-b71abcca8c68}
+    
+    
   
   
   
-
+
\ No newline at end of file
diff --git a/VisualC/tests/testatomic/testatomic_VS2012.vcxproj b/VisualC/tests/testatomic/testatomic_VS2012.vcxproj
new file mode 100644
index 000000000..9cd90ca73
--- /dev/null
+++ b/VisualC/tests/testatomic/testatomic_VS2012.vcxproj
@@ -0,0 +1,235 @@
+
+
+  
+    
+      Debug
+      Win32
+    
+    
+      Debug
+      x64
+    
+    
+      Release
+      Win32
+    
+    
+      Release
+      x64
+    
+  
+  
+    testatomic
+    {2271060E-98B4-4596-8172-A041E4B2EC7A}
+    testatomic
+  
+  
+  
+    Application
+    false
+    v110
+  
+  
+    Application
+    false
+    v110
+  
+  
+    Application
+    false
+    v110
+  
+  
+    Application
+    false
+    MultiByte
+    v110
+  
+  
+  
+  
+  
+    
+    
+  
+  
+    
+    
+  
+  
+    
+    
+  
+  
+    
+    
+  
+  
+  
+    <_ProjectFileVersion>10.0.30319.1
+    $(Platform)\$(Configuration)\
+    $(Platform)\$(Configuration)\
+    $(Platform)\$(Configuration)\
+    $(Platform)\$(Configuration)\
+    true
+    true
+    $(Platform)\$(Configuration)\
+    $(Platform)\$(Configuration)\
+    $(Platform)\$(Configuration)\
+    $(Platform)\$(Configuration)\
+    false
+    false
+  
+  
+    
+      _DEBUG;%(PreprocessorDefinitions)
+      true
+      true
+      Win32
+    
+    
+      Disabled
+      ..\..\..\include;%(AdditionalIncludeDirectories)
+      WIN32;_DEBUG;_WINDOWS;%(PreprocessorDefinitions)
+      MultiThreadedDebugDLL
+      
+      
+      Level3
+      true
+      EditAndContinue
+      Default
+    
+    
+      _DEBUG;%(PreprocessorDefinitions)
+      0x0409
+    
+    
+      true
+      true
+      Windows
+    
+    
+      copy "$(SolutionDir)\SDL\$(Platform)\$(Configuration)\SDL2.dll" "$(TargetDir)\SDL2.dll"
+    
+    
+      Copy SDL
+    
+  
+  
+    
+      _DEBUG;%(PreprocessorDefinitions)
+      true
+      true
+    
+    
+      Disabled
+      ..\..\..\include;%(AdditionalIncludeDirectories)
+      WIN32;_DEBUG;_WINDOWS;%(PreprocessorDefinitions)
+      MultiThreadedDebugDLL
+      
+      
+      Level3
+      true
+      ProgramDatabase
+      Default
+    
+    
+      _DEBUG;%(PreprocessorDefinitions)
+      0x0409
+    
+    
+      true
+      true
+      Windows
+    
+    
+      copy "$(SolutionDir)\SDL\$(Platform)\$(Configuration)\SDL2.dll" "$(TargetDir)\SDL2.dll"
+    
+    
+      Copy SDL
+    
+  
+  
+    
+      NDEBUG;%(PreprocessorDefinitions)
+      true
+      true
+      Win32
+    
+    
+      OnlyExplicitInline
+      ..\..\..\include;%(AdditionalIncludeDirectories)
+      WIN32;NDEBUG;_WINDOWS;%(PreprocessorDefinitions)
+      true
+      MultiThreadedDLL
+      true
+      
+      
+      Level3
+      true
+      Default
+    
+    
+      NDEBUG;%(PreprocessorDefinitions)
+      0x0409
+    
+    
+      true
+      Windows
+    
+    
+      copy "$(SolutionDir)\SDL\$(Platform)\$(Configuration)\SDL2.dll" "$(TargetDir)\SDL2.dll"
+    
+    
+      Copy SDL
+    
+  
+  
+    
+      NDEBUG;%(PreprocessorDefinitions)
+      true
+      true
+    
+    
+      OnlyExplicitInline
+      ..\..\..\include;%(AdditionalIncludeDirectories)
+      WIN32;NDEBUG;_WINDOWS;%(PreprocessorDefinitions)
+      true
+      MultiThreadedDLL
+      true
+      
+      
+      Level3
+      true
+      Default
+    
+    
+      NDEBUG;%(PreprocessorDefinitions)
+      0x0409
+    
+    
+      true
+      Windows
+    
+    
+      copy "$(SolutionDir)\SDL\$(Platform)\$(Configuration)\SDL2.dll" "$(TargetDir)\SDL2.dll"
+    
+    
+      Copy SDL
+    
+  
+  
+    
+  
+  
+    
+      {da956fd3-e142-46f2-9dd5-c78bebb56b7a}
+    
+    
+      {81ce8daf-ebb2-4761-8e45-b71abcca8c68}
+    
+  
+  
+  
+  
+
\ No newline at end of file
diff --git a/VisualC/tests/testrendertarget/testrendertarget_VS2010.vcxproj b/VisualC/tests/testrendertarget/testrendertarget_VS2010.vcxproj
index d7772e436..133366f5c 100644
--- a/VisualC/tests/testrendertarget/testrendertarget_VS2010.vcxproj
+++ b/VisualC/tests/testrendertarget/testrendertarget_VS2010.vcxproj
@@ -1,4 +1,4 @@
-
+
 
   
     
@@ -20,10 +20,18 @@
   
   
     testrendertarget
+    {43A06713-A52D-4008-AD7E-A69DF3FCFFA8}
     testrendertarget
-    {40FB7794-D3C3-4CFE-BCF4-A80C96635682}
   
   
+   
+    Application
+    false
+  
+  
+    Application
+    false
+  
   
     Application
     false
@@ -33,25 +41,9 @@
     false
     MultiByte
   
-  
-    Application
-    false
-  
-  
-    Application
-    false
-  
-  
+ 
   
   
-  
-    
-    
-  
-  
-    
-    
-  
   
     
     
@@ -60,95 +52,30 @@
     
     
   
+  
+    
+    
+  
+  
+    
+    
+  
   
   
     <_ProjectFileVersion>10.0.30319.1
-    $(Platform)\$(Configuration)\
-    $(Platform)\$(Configuration)\
-    $(Platform)\$(Configuration)\
-    $(Platform)\$(Configuration)\
-    false
-    false
     $(Platform)\$(Configuration)\
     $(Platform)\$(Configuration)\
     $(Platform)\$(Configuration)\
     $(Platform)\$(Configuration)\
     true
     true
+    $(Platform)\$(Configuration)\
+    $(Platform)\$(Configuration)\
+    $(Platform)\$(Configuration)\
+    $(Platform)\$(Configuration)\
+    false
+    false
   
-  
-    
-      NDEBUG;%(PreprocessorDefinitions)
-      true
-      true
-      Win32
-    
-    
-      OnlyExplicitInline
-      ..\..\..\include;%(AdditionalIncludeDirectories)
-      WIN32;NDEBUG;_WINDOWS;%(PreprocessorDefinitions)
-      true
-      MultiThreadedDLL
-      true
-      
-      
-      Level3
-      true
-      Default
-    
-    
-      NDEBUG;%(PreprocessorDefinitions)
-      0x0409
-    
-    
-      true
-      Windows
-    
-    
-      copy "$(SolutionDir)\SDL\$(Platform)\$(Configuration)\SDL2.dll" "$(TargetDir)\SDL2.dll"
-copy "$(SolutionDir)\..\test\icon.bmp" "$(TargetDir)\icon.bmp"
-copy "$(SolutionDir)\..\test\sample.bmp" "$(TargetDir)\sample.bmp"
-    
-    
-      Copy SDL and data files
-    
-  
-  
-    
-      NDEBUG;%(PreprocessorDefinitions)
-      true
-      true
-    
-    
-      OnlyExplicitInline
-      ..\..\..\include;%(AdditionalIncludeDirectories)
-      WIN32;NDEBUG;_WINDOWS;%(PreprocessorDefinitions)
-      true
-      MultiThreadedDLL
-      true
-      
-      
-      Level3
-      true
-      Default
-    
-    
-      NDEBUG;%(PreprocessorDefinitions)
-      0x0409
-    
-    
-      true
-      Windows
-    
-    
-      copy "$(SolutionDir)\SDL\$(Platform)\$(Configuration)\SDL2.dll" "$(TargetDir)\SDL2.dll"
-copy "$(SolutionDir)\..\test\icon.bmp" "$(TargetDir)\icon.bmp"
-copy "$(SolutionDir)\..\test\sample.bmp" "$(TargetDir)\sample.bmp"
-    
-    
-      Copy SDL and data files
-    
-  
   
     
       _DEBUG;%(PreprocessorDefinitions)
@@ -180,7 +107,7 @@ copy "$(SolutionDir)\..\test\sample.bmp" "$(TargetDir)\sample.bmp"
     
       copy "$(SolutionDir)\SDL\$(Platform)\$(Configuration)\SDL2.dll" "$(TargetDir)\SDL2.dll"
 copy "$(SolutionDir)\..\test\icon.bmp" "$(TargetDir)\icon.bmp"
-copy "$(SolutionDir)\..\test\sample.bmp" "$(TargetDir)\sample.bmp"
+copy "$(SolutionDir)\..\test\sample.bmp" "$(TargetDir)\sample.bmp"      
     
     
       Copy SDL and data files
@@ -216,20 +143,99 @@ copy "$(SolutionDir)\..\test\sample.bmp" "$(TargetDir)\sample.bmp"
     
       copy "$(SolutionDir)\SDL\$(Platform)\$(Configuration)\SDL2.dll" "$(TargetDir)\SDL2.dll"
 copy "$(SolutionDir)\..\test\icon.bmp" "$(TargetDir)\icon.bmp"
-copy "$(SolutionDir)\..\test\sample.bmp" "$(TargetDir)\sample.bmp"
+copy "$(SolutionDir)\..\test\sample.bmp" "$(TargetDir)\sample.bmp"      
+    
+    
+      Copy SDL and data files
+    
+  
+  
+    
+      NDEBUG;%(PreprocessorDefinitions)
+      true
+      true
+      Win32
+    
+    
+      OnlyExplicitInline
+      ..\..\..\include;%(AdditionalIncludeDirectories)
+      WIN32;NDEBUG;_WINDOWS;%(PreprocessorDefinitions)
+      true
+      MultiThreadedDLL
+      true
+      
+      
+      Level3
+      true
+      Default
+    
+    
+      NDEBUG;%(PreprocessorDefinitions)
+      0x0409
+    
+    
+      true
+      Windows
+    
+    
+      copy "$(SolutionDir)\SDL\$(Platform)\$(Configuration)\SDL2.dll" "$(TargetDir)\SDL2.dll"
+copy "$(SolutionDir)\..\test\icon.bmp" "$(TargetDir)\icon.bmp"
+copy "$(SolutionDir)\..\test\sample.bmp" "$(TargetDir)\sample.bmp"      
+    
+    
+      Copy SDL and data files
+    
+  
+  
+    
+      NDEBUG;%(PreprocessorDefinitions)
+      true
+      true
+    
+    
+      OnlyExplicitInline
+      ..\..\..\include;%(AdditionalIncludeDirectories)
+      WIN32;NDEBUG;_WINDOWS;%(PreprocessorDefinitions)
+      true
+      MultiThreadedDLL
+      true
+      
+      
+      Level3
+      true
+      Default
+    
+    
+      NDEBUG;%(PreprocessorDefinitions)
+      0x0409
+    
+    
+      true
+      Windows
+    
+    
+      copy "$(SolutionDir)\SDL\$(Platform)\$(Configuration)\SDL2.dll" "$(TargetDir)\SDL2.dll"
+copy "$(SolutionDir)\..\test\icon.bmp" "$(TargetDir)\icon.bmp"
+copy "$(SolutionDir)\..\test\sample.bmp" "$(TargetDir)\sample.bmp"      
     
     
       Copy SDL and data files
     
   
   
-    
     
   
   
-    
-    
-  
+    
+      {da956fd3-e142-46f2-9dd5-c78bebb56b7a}
+    
+    
+      {da956fd3-e143-46f2-9fe5-c77bebc56b1a}
+    
+    
+      {81ce8daf-ebb2-4761-8e45-b71abcca8c68}
+    
+    
   
   
   
diff --git a/VisualC/tests/testrendertarget/testrendertarget_VS2012.vcxproj b/VisualC/tests/testrendertarget/testrendertarget_VS2012.vcxproj
new file mode 100644
index 000000000..4a3cb077b
--- /dev/null
+++ b/VisualC/tests/testrendertarget/testrendertarget_VS2012.vcxproj
@@ -0,0 +1,245 @@
+
+
+  
+    
+      Debug
+      Win32
+    
+    
+      Debug
+      x64
+    
+    
+      Release
+      Win32
+    
+    
+      Release
+      x64
+    
+  
+  
+    testrendertarget
+    {43A06713-A52D-4008-AD7E-A69DF3FCFFA8}
+    testrendertarget
+  
+  
+   
+    Application
+    false
+    v110
+  
+  
+    Application
+    false
+    v110
+  
+  
+    Application
+    false
+    v110
+  
+  
+    Application
+    false
+    v110
+  
+ 
+  
+  
+  
+    
+    
+  
+  
+    
+    
+  
+  
+    
+    
+  
+  
+    
+    
+  
+  
+  
+    <_ProjectFileVersion>10.0.30319.1
+    $(Platform)\$(Configuration)\
+    $(Platform)\$(Configuration)\
+    $(Platform)\$(Configuration)\
+    $(Platform)\$(Configuration)\
+    true
+    true
+    $(Platform)\$(Configuration)\
+    $(Platform)\$(Configuration)\
+    $(Platform)\$(Configuration)\
+    $(Platform)\$(Configuration)\
+    false
+    false
+  
+  
+    
+      _DEBUG;%(PreprocessorDefinitions)
+      true
+      true
+      Win32
+    
+    
+      Disabled
+      ..\..\..\include;%(AdditionalIncludeDirectories)
+      WIN32;_DEBUG;_WINDOWS;%(PreprocessorDefinitions)
+      MultiThreadedDebugDLL
+      
+      
+      Level3
+      true
+      EditAndContinue
+      Default
+    
+    
+      _DEBUG;%(PreprocessorDefinitions)
+      0x0409
+    
+    
+      true
+      true
+      Windows
+    
+    
+      copy "$(SolutionDir)\SDL\$(Platform)\$(Configuration)\SDL2.dll" "$(TargetDir)\SDL2.dll"
+copy "$(SolutionDir)\..\test\icon.bmp" "$(TargetDir)\icon.bmp"
+copy "$(SolutionDir)\..\test\sample.bmp" "$(TargetDir)\sample.bmp"      
+    
+    
+      Copy SDL and data files
+    
+  
+  
+    
+      _DEBUG;%(PreprocessorDefinitions)
+      true
+      true
+    
+    
+      Disabled
+      ..\..\..\include;%(AdditionalIncludeDirectories)
+      WIN32;_DEBUG;_WINDOWS;%(PreprocessorDefinitions)
+      MultiThreadedDebugDLL
+      
+      
+      Level3
+      true
+      ProgramDatabase
+      Default
+    
+    
+      _DEBUG;%(PreprocessorDefinitions)
+      0x0409
+    
+    
+      true
+      true
+      Windows
+    
+    
+      copy "$(SolutionDir)\SDL\$(Platform)\$(Configuration)\SDL2.dll" "$(TargetDir)\SDL2.dll"
+copy "$(SolutionDir)\..\test\icon.bmp" "$(TargetDir)\icon.bmp"
+copy "$(SolutionDir)\..\test\sample.bmp" "$(TargetDir)\sample.bmp"      
+    
+    
+      Copy SDL and data files
+    
+  
+  
+    
+      NDEBUG;%(PreprocessorDefinitions)
+      true
+      true
+      Win32
+    
+    
+      OnlyExplicitInline
+      ..\..\..\include;%(AdditionalIncludeDirectories)
+      WIN32;NDEBUG;_WINDOWS;%(PreprocessorDefinitions)
+      true
+      MultiThreadedDLL
+      true
+      
+      
+      Level3
+      true
+      Default
+    
+    
+      NDEBUG;%(PreprocessorDefinitions)
+      0x0409
+    
+    
+      true
+      Windows
+    
+    
+      copy "$(SolutionDir)\SDL\$(Platform)\$(Configuration)\SDL2.dll" "$(TargetDir)\SDL2.dll"
+copy "$(SolutionDir)\..\test\icon.bmp" "$(TargetDir)\icon.bmp"
+copy "$(SolutionDir)\..\test\sample.bmp" "$(TargetDir)\sample.bmp"      
+    
+    
+      Copy SDL and data files
+    
+  
+  
+    
+      NDEBUG;%(PreprocessorDefinitions)
+      true
+      true
+    
+    
+      OnlyExplicitInline
+      ..\..\..\include;%(AdditionalIncludeDirectories)
+      WIN32;NDEBUG;_WINDOWS;%(PreprocessorDefinitions)
+      true
+      MultiThreadedDLL
+      true
+      
+      
+      Level3
+      true
+      Default
+    
+    
+      NDEBUG;%(PreprocessorDefinitions)
+      0x0409
+    
+    
+      true
+      Windows
+    
+    
+      copy "$(SolutionDir)\SDL\$(Platform)\$(Configuration)\SDL2.dll" "$(TargetDir)\SDL2.dll"
+copy "$(SolutionDir)\..\test\icon.bmp" "$(TargetDir)\icon.bmp"
+copy "$(SolutionDir)\..\test\sample.bmp" "$(TargetDir)\sample.bmp"      
+    
+    
+      Copy SDL and data files
+    
+  
+  
+    
+  
+  
+    
+      {da956fd3-e142-46f2-9dd5-c78bebb56b7a}
+    
+    
+      {da956fd3-e143-46f2-9fe5-c77bebc56b1a}
+    
+    
+      {81ce8daf-ebb2-4761-8e45-b71abcca8c68}
+    
+    
+  
+  
+  
+
diff --git a/VisualC/tests/testscale/testscale_VS2010.vcxproj b/VisualC/tests/testscale/testscale_VS2010.vcxproj
index 0c3d5c032..6753c1cd2 100644
--- a/VisualC/tests/testscale/testscale_VS2010.vcxproj
+++ b/VisualC/tests/testscale/testscale_VS2010.vcxproj
@@ -1,4 +1,4 @@
-
+
 
   
     
@@ -20,10 +20,18 @@
   
   
     testscale
+    {E7A6C41C-E059-4C9C-8CCC-73586A540B62}
     testscale
-    {40FB7794-D3C3-4CFE-BCF4-A80C96635682}
   
   
+   
+    Application
+    false
+  
+  
+    Application
+    false
+  
   
     Application
     false
@@ -33,25 +41,9 @@
     false
     MultiByte
   
-  
-    Application
-    false
-  
-  
-    Application
-    false
-  
-  
+ 
   
   
-  
-    
-    
-  
-  
-    
-    
-  
   
     
     
@@ -60,95 +52,30 @@
     
     
   
+  
+    
+    
+  
+  
+    
+    
+  
   
   
     <_ProjectFileVersion>10.0.30319.1
-    $(Platform)\$(Configuration)\
-    $(Platform)\$(Configuration)\
-    $(Platform)\$(Configuration)\
-    $(Platform)\$(Configuration)\
-    false
-    false
     $(Platform)\$(Configuration)\
     $(Platform)\$(Configuration)\
     $(Platform)\$(Configuration)\
     $(Platform)\$(Configuration)\
     true
     true
+    $(Platform)\$(Configuration)\
+    $(Platform)\$(Configuration)\
+    $(Platform)\$(Configuration)\
+    $(Platform)\$(Configuration)\
+    false
+    false
   
-  
-    
-      NDEBUG;%(PreprocessorDefinitions)
-      true
-      true
-      Win32
-    
-    
-      OnlyExplicitInline
-      ..\..\..\include;%(AdditionalIncludeDirectories)
-      WIN32;NDEBUG;_WINDOWS;%(PreprocessorDefinitions)
-      true
-      MultiThreadedDLL
-      true
-      
-      
-      Level3
-      true
-      Default
-    
-    
-      NDEBUG;%(PreprocessorDefinitions)
-      0x0409
-    
-    
-      true
-      Windows
-    
-    
-      copy "$(SolutionDir)\SDL\$(Platform)\$(Configuration)\SDL2.dll" "$(TargetDir)\SDL2.dll"
-copy "$(SolutionDir)\..\test\icon.bmp" "$(TargetDir)\icon.bmp"
-copy "$(SolutionDir)\..\test\sample.bmp" "$(TargetDir)\sample.bmp"
-    
-    
-      Copy SDL and data files
-    
-  
-  
-    
-      NDEBUG;%(PreprocessorDefinitions)
-      true
-      true
-    
-    
-      OnlyExplicitInline
-      ..\..\..\include;%(AdditionalIncludeDirectories)
-      WIN32;NDEBUG;_WINDOWS;%(PreprocessorDefinitions)
-      true
-      MultiThreadedDLL
-      true
-      
-      
-      Level3
-      true
-      Default
-    
-    
-      NDEBUG;%(PreprocessorDefinitions)
-      0x0409
-    
-    
-      true
-      Windows
-    
-    
-      copy "$(SolutionDir)\SDL\$(Platform)\$(Configuration)\SDL2.dll" "$(TargetDir)\SDL2.dll"
-copy "$(SolutionDir)\..\test\icon.bmp" "$(TargetDir)\icon.bmp"
-copy "$(SolutionDir)\..\test\sample.bmp" "$(TargetDir)\sample.bmp"
-    
-    
-      Copy SDL and data files
-    
-  
   
     
       _DEBUG;%(PreprocessorDefinitions)
@@ -180,7 +107,7 @@ copy "$(SolutionDir)\..\test\sample.bmp" "$(TargetDir)\sample.bmp"
     
       copy "$(SolutionDir)\SDL\$(Platform)\$(Configuration)\SDL2.dll" "$(TargetDir)\SDL2.dll"
 copy "$(SolutionDir)\..\test\icon.bmp" "$(TargetDir)\icon.bmp"
-copy "$(SolutionDir)\..\test\sample.bmp" "$(TargetDir)\sample.bmp"
+copy "$(SolutionDir)\..\test\sample.bmp" "$(TargetDir)\sample.bmp"      
     
     
       Copy SDL and data files
@@ -216,20 +143,99 @@ copy "$(SolutionDir)\..\test\sample.bmp" "$(TargetDir)\sample.bmp"
     
       copy "$(SolutionDir)\SDL\$(Platform)\$(Configuration)\SDL2.dll" "$(TargetDir)\SDL2.dll"
 copy "$(SolutionDir)\..\test\icon.bmp" "$(TargetDir)\icon.bmp"
-copy "$(SolutionDir)\..\test\sample.bmp" "$(TargetDir)\sample.bmp"
+copy "$(SolutionDir)\..\test\sample.bmp" "$(TargetDir)\sample.bmp"      
+    
+    
+      Copy SDL and data files
+    
+  
+  
+    
+      NDEBUG;%(PreprocessorDefinitions)
+      true
+      true
+      Win32
+    
+    
+      OnlyExplicitInline
+      ..\..\..\include;%(AdditionalIncludeDirectories)
+      WIN32;NDEBUG;_WINDOWS;%(PreprocessorDefinitions)
+      true
+      MultiThreadedDLL
+      true
+      
+      
+      Level3
+      true
+      Default
+    
+    
+      NDEBUG;%(PreprocessorDefinitions)
+      0x0409
+    
+    
+      true
+      Windows
+    
+    
+      copy "$(SolutionDir)\SDL\$(Platform)\$(Configuration)\SDL2.dll" "$(TargetDir)\SDL2.dll"
+copy "$(SolutionDir)\..\test\icon.bmp" "$(TargetDir)\icon.bmp"
+copy "$(SolutionDir)\..\test\sample.bmp" "$(TargetDir)\sample.bmp"      
+    
+    
+      Copy SDL and data files
+    
+  
+  
+    
+      NDEBUG;%(PreprocessorDefinitions)
+      true
+      true
+    
+    
+      OnlyExplicitInline
+      ..\..\..\include;%(AdditionalIncludeDirectories)
+      WIN32;NDEBUG;_WINDOWS;%(PreprocessorDefinitions)
+      true
+      MultiThreadedDLL
+      true
+      
+      
+      Level3
+      true
+      Default
+    
+    
+      NDEBUG;%(PreprocessorDefinitions)
+      0x0409
+    
+    
+      true
+      Windows
+    
+    
+      copy "$(SolutionDir)\SDL\$(Platform)\$(Configuration)\SDL2.dll" "$(TargetDir)\SDL2.dll"
+copy "$(SolutionDir)\..\test\icon.bmp" "$(TargetDir)\icon.bmp"
+copy "$(SolutionDir)\..\test\sample.bmp" "$(TargetDir)\sample.bmp"      
     
     
       Copy SDL and data files
     
   
   
-    
     
   
   
-    
-    
-  
+    
+      {da956fd3-e142-46f2-9dd5-c78bebb56b7a}
+    
+    
+      {da956fd3-e143-46f2-9fe5-c77bebc56b1a}
+    
+    
+      {81ce8daf-ebb2-4761-8e45-b71abcca8c68}
+    
+    
   
   
   
diff --git a/VisualC/tests/testscale/testscale_VS2012.vcxproj b/VisualC/tests/testscale/testscale_VS2012.vcxproj
new file mode 100644
index 000000000..6eb222896
--- /dev/null
+++ b/VisualC/tests/testscale/testscale_VS2012.vcxproj
@@ -0,0 +1,246 @@
+
+
+  
+    
+      Debug
+      Win32
+    
+    
+      Debug
+      x64
+    
+    
+      Release
+      Win32
+    
+    
+      Release
+      x64
+    
+  
+  
+    testscale
+    {E7A6C41C-E059-4C9C-8CCC-73586A540B62}
+    testscale
+  
+  
+   
+    Application
+    false
+    v110
+  
+  
+    Application
+    false
+    v110
+  
+  
+    Application
+    false
+    v110
+  
+  
+    Application
+    false
+    MultiByte
+    v110
+  
+ 
+  
+  
+  
+    
+    
+  
+  
+    
+    
+  
+  
+    
+    
+  
+  
+    
+    
+  
+  
+  
+    <_ProjectFileVersion>10.0.30319.1
+    $(Platform)\$(Configuration)\
+    $(Platform)\$(Configuration)\
+    $(Platform)\$(Configuration)\
+    $(Platform)\$(Configuration)\
+    true
+    true
+    $(Platform)\$(Configuration)\
+    $(Platform)\$(Configuration)\
+    $(Platform)\$(Configuration)\
+    $(Platform)\$(Configuration)\
+    false
+    false
+  
+  
+    
+      _DEBUG;%(PreprocessorDefinitions)
+      true
+      true
+      Win32
+    
+    
+      Disabled
+      ..\..\..\include;%(AdditionalIncludeDirectories)
+      WIN32;_DEBUG;_WINDOWS;%(PreprocessorDefinitions)
+      MultiThreadedDebugDLL
+      
+      
+      Level3
+      true
+      EditAndContinue
+      Default
+    
+    
+      _DEBUG;%(PreprocessorDefinitions)
+      0x0409
+    
+    
+      true
+      true
+      Windows
+    
+    
+      copy "$(SolutionDir)\SDL\$(Platform)\$(Configuration)\SDL2.dll" "$(TargetDir)\SDL2.dll"
+copy "$(SolutionDir)\..\test\icon.bmp" "$(TargetDir)\icon.bmp"
+copy "$(SolutionDir)\..\test\sample.bmp" "$(TargetDir)\sample.bmp"      
+    
+    
+      Copy SDL and data files
+    
+  
+  
+    
+      _DEBUG;%(PreprocessorDefinitions)
+      true
+      true
+    
+    
+      Disabled
+      ..\..\..\include;%(AdditionalIncludeDirectories)
+      WIN32;_DEBUG;_WINDOWS;%(PreprocessorDefinitions)
+      MultiThreadedDebugDLL
+      
+      
+      Level3
+      true
+      ProgramDatabase
+      Default
+    
+    
+      _DEBUG;%(PreprocessorDefinitions)
+      0x0409
+    
+    
+      true
+      true
+      Windows
+    
+    
+      copy "$(SolutionDir)\SDL\$(Platform)\$(Configuration)\SDL2.dll" "$(TargetDir)\SDL2.dll"
+copy "$(SolutionDir)\..\test\icon.bmp" "$(TargetDir)\icon.bmp"
+copy "$(SolutionDir)\..\test\sample.bmp" "$(TargetDir)\sample.bmp"      
+    
+    
+      Copy SDL and data files
+    
+  
+  
+    
+      NDEBUG;%(PreprocessorDefinitions)
+      true
+      true
+      Win32
+    
+    
+      OnlyExplicitInline
+      ..\..\..\include;%(AdditionalIncludeDirectories)
+      WIN32;NDEBUG;_WINDOWS;%(PreprocessorDefinitions)
+      true
+      MultiThreadedDLL
+      true
+      
+      
+      Level3
+      true
+      Default
+    
+    
+      NDEBUG;%(PreprocessorDefinitions)
+      0x0409
+    
+    
+      true
+      Windows
+    
+    
+      copy "$(SolutionDir)\SDL\$(Platform)\$(Configuration)\SDL2.dll" "$(TargetDir)\SDL2.dll"
+copy "$(SolutionDir)\..\test\icon.bmp" "$(TargetDir)\icon.bmp"
+copy "$(SolutionDir)\..\test\sample.bmp" "$(TargetDir)\sample.bmp"      
+    
+    
+      Copy SDL and data files
+    
+  
+  
+    
+      NDEBUG;%(PreprocessorDefinitions)
+      true
+      true
+    
+    
+      OnlyExplicitInline
+      ..\..\..\include;%(AdditionalIncludeDirectories)
+      WIN32;NDEBUG;_WINDOWS;%(PreprocessorDefinitions)
+      true
+      MultiThreadedDLL
+      true
+      
+      
+      Level3
+      true
+      Default
+    
+    
+      NDEBUG;%(PreprocessorDefinitions)
+      0x0409
+    
+    
+      true
+      Windows
+    
+    
+      copy "$(SolutionDir)\SDL\$(Platform)\$(Configuration)\SDL2.dll" "$(TargetDir)\SDL2.dll"
+copy "$(SolutionDir)\..\test\icon.bmp" "$(TargetDir)\icon.bmp"
+copy "$(SolutionDir)\..\test\sample.bmp" "$(TargetDir)\sample.bmp"      
+    
+    
+      Copy SDL and data files
+    
+  
+  
+    
+  
+  
+    
+      {da956fd3-e142-46f2-9dd5-c78bebb56b7a}
+    
+    
+      {da956fd3-e143-46f2-9fe5-c77bebc56b1a}
+    
+    
+      {81ce8daf-ebb2-4761-8e45-b71abcca8c68}
+    
+    
+  
+  
+  
+
diff --git a/test/testautomation_keyboard.c b/test/testautomation_keyboard.c
index 1e5df4ff0..453832e25 100644
--- a/test/testautomation_keyboard.c
+++ b/test/testautomation_keyboard.c
@@ -25,13 +25,13 @@ keyboard_getKeyboardState(void *arg)
    Uint8 *state;
 
    /* Case where numkeys pointer is NULL */
-   state = SDL_GetKeyboardState(NULL);
+   state = (Uint8 *)SDL_GetKeyboardState(NULL);
    SDLTest_AssertPass("Call to SDL_GetKeyboardState(NULL)");
    SDLTest_AssertCheck(state != NULL, "Validate that return value from SDL_GetKeyboardState is not NULL");
 
    /* Case where numkeys pointer is not NULL */
    numkeys = -1;
-   state = SDL_GetKeyboardState(&numkeys);
+   state = (Uint8 *)SDL_GetKeyboardState(&numkeys);
    SDLTest_AssertPass("Call to SDL_GetKeyboardState(&numkeys)");
    SDLTest_AssertCheck(state != NULL, "Validate that return value from SDL_GetKeyboardState is not NULL");
    SDLTest_AssertCheck(numkeys >= 0, "Validate that value of numkeys is >= 0, got: %i", numkeys);

From 449d63452e1d3dbe48a24b7d727bc55ce028047e Mon Sep 17 00:00:00 2001
From: =?UTF-8?q?J=C3=B8rgen=20P=2E=20Tjern=C3=B8?=
 
Date: Tue, 4 Jun 2013 13:47:51 -0700
Subject: [PATCH 186/542] - fix misleading hint about minimising on focus loss

---
 src/video/SDL_video.c | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/src/video/SDL_video.c b/src/video/SDL_video.c
index 8023b8536..721f3c2e5 100644
--- a/src/video/SDL_video.c
+++ b/src/video/SDL_video.c
@@ -2087,7 +2087,7 @@ SDL_OnWindowFocusLost(SDL_Window * window)
 
     SDL_UpdateWindowGrab(window);
 
-    /* If we're fullscreen on a single-head system and lose focus, minimize */
+    /* If we're fullscreen and lose focus, minimize unless the hint tells us otherwise */
      if ((window->flags & SDL_WINDOW_FULLSCREEN) && ShouldMinimizeOnFocusLoss() ) {
             SDL_MinimizeWindow(window);
     }

From 95cf57b19fe4dd632bf80a0e2d638713a1feb8fe Mon Sep 17 00:00:00 2001
From: =?UTF-8?q?J=C3=B8rgen=20P=2E=20Tjern=C3=B8?=
 
Date: Tue, 4 Jun 2013 13:53:55 -0700
Subject: [PATCH 187/542] Mac: Hide cursor in relative mode.

This hides the cursor when you SDL_SetRelativeMouseMode, as intended.

Fixes http://bugzilla.libsdl.org/show_bug.cgi?id=1860
---
 src/video/cocoa/SDL_cocoawindow.m | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/src/video/cocoa/SDL_cocoawindow.m b/src/video/cocoa/SDL_cocoawindow.m
index 7e387a53e..06f0fd28e 100644
--- a/src/video/cocoa/SDL_cocoawindow.m
+++ b/src/video/cocoa/SDL_cocoawindow.m
@@ -538,7 +538,7 @@ static __inline__ void ConvertNSRect(NSRect *r)
     [super resetCursorRects];
     SDL_Mouse *mouse = SDL_GetMouse();
 
-    if (mouse->cursor_shown && mouse->cur_cursor) {
+    if (mouse->cursor_shown && mouse->cur_cursor && !mouse->relative_mode) {
         [self addCursorRect:[self bounds]
                      cursor:mouse->cur_cursor->driverdata];
     } else {

From f1fc414daaf6f9beb3d54062a35efd403ce6068f Mon Sep 17 00:00:00 2001
From: =?UTF-8?q?J=C3=B8rgen=20P=2E=20Tjern=C3=B8?=
 
Date: Tue, 4 Jun 2013 14:54:49 -0700
Subject: [PATCH 188/542] Mac: Fix incorrect relative jump on focus / start.

We should no longer send huge jumps on relative mode focus changes if
the cursor was moved around, or on initial start.

Fixes http://bugzilla.libsdl.org/show_bug.cgi?id=1836
---
 src/video/cocoa/SDL_cocoamouse.m  | 10 ++++++----
 src/video/cocoa/SDL_cocoawindow.m |  3 ++-
 2 files changed, 8 insertions(+), 5 deletions(-)

diff --git a/src/video/cocoa/SDL_cocoamouse.m b/src/video/cocoa/SDL_cocoamouse.m
index fd76bb584..58b666f03 100644
--- a/src/video/cocoa/SDL_cocoamouse.m
+++ b/src/video/cocoa/SDL_cocoamouse.m
@@ -224,10 +224,12 @@ Cocoa_WarpMouse(SDL_Window * window, int x, int y)
     CGWarpMouseCursorPosition(point);
     CGSetLocalEventsSuppressionInterval(0.25);
 
-    /* CGWarpMouseCursorPosition doesn't generate a window event, unlike our
-     * other implementations' APIs.
-     */
-    SDL_SendMouseMotion(mouse->focus, mouse->mouseID, 0, x, y);
+    if (!mouse->relative_mode) {
+        /* CGWarpMouseCursorPosition doesn't generate a window event, unlike our
+         * other implementations' APIs.
+         */
+        SDL_SendMouseMotion(mouse->focus, mouse->mouseID, 0, x, y);
+    }
 }
 
 static int
diff --git a/src/video/cocoa/SDL_cocoawindow.m b/src/video/cocoa/SDL_cocoawindow.m
index 06f0fd28e..a3053075e 100644
--- a/src/video/cocoa/SDL_cocoawindow.m
+++ b/src/video/cocoa/SDL_cocoawindow.m
@@ -240,12 +240,13 @@ static __inline__ void ConvertNSRect(NSRect *r)
 - (void)windowDidBecomeKey:(NSNotification *)aNotification
 {
     SDL_Window *window = _data->window;
+    SDL_Mouse *mouse = SDL_GetMouse();
 
     /* We're going to get keyboard events, since we're key. */
     SDL_SetKeyboardFocus(window);
 
     /* If we just gained focus we need the updated mouse position */
-    {
+    if (!mouse->relative_mode) {
         NSPoint point;
         int x, y;
 

From bc5b08c0fdf26d6b5eb03c12642ed8f892ddc01c Mon Sep 17 00:00:00 2001
From: "Ryan C. Gordon" 
Date: Wed, 5 Jun 2013 00:42:39 -0400
Subject: [PATCH 189/542] Fixed build on newer Cygwin installs.

---
 configure.in | 8 ++++++++
 1 file changed, 8 insertions(+)

diff --git a/configure.in b/configure.in
index 47bb1a61a..e90ff7b6c 100644
--- a/configure.in
+++ b/configure.in
@@ -2016,6 +2016,14 @@ AC_HELP_STRING([--enable-directx], [use DirectX for Windows audio/video [[defaul
         AC_CHECK_HEADER(dsound.h, have_dsound=yes)
         AC_CHECK_HEADER(dinput.h, have_dinput=yes)
         AC_CHECK_HEADER(xaudio2.h, have_xaudio2=yes)
+
+        # FIXME: latest Cygwin finds dinput headers, but we die on other win32 headers.
+        # FIXME:  ...so force it off for now.
+        case "$host" in
+            *-*-cygwin*)
+            have_dinput=false
+            ;;
+        esac
     fi
 }
 

From e569ac658f09379604e4c0a6616f38cb6ac921f9 Mon Sep 17 00:00:00 2001
From: Sam Lantinga 
Date: Tue, 4 Jun 2013 22:13:06 -0700
Subject: [PATCH 190/542] Updated configure with Ryan's cygwin workaround

---
 configure | 8 ++++++++
 1 file changed, 8 insertions(+)

diff --git a/configure b/configure
index f353418df..789436acb 100755
--- a/configure
+++ b/configure
@@ -21427,6 +21427,14 @@ if test "x$ac_cv_header_xaudio2_h" = xyes; then :
 fi
 
 
+
+        # FIXME: latest Cygwin finds dinput headers, but we die on other win32 headers.
+        # FIXME:  ...so force it off for now.
+        case "$host" in
+            *-*-cygwin*)
+            have_dinput=false
+            ;;
+        esac
     fi
 }
 

From 6c06aefaf28f1432a6bbe99dc56adfdd2059d8a8 Mon Sep 17 00:00:00 2001
From: Andreas Schiffler 
Date: Wed, 5 Jun 2013 07:22:45 -0700
Subject: [PATCH 191/542] Update SDL_LogOutput for WIN32 so it writes to the
 console

---
 src/SDL_log.c | 61 ++++++++++++++++++++++++++++++++++++++++++++++++++-
 1 file changed, 60 insertions(+), 1 deletion(-)

diff --git a/src/SDL_log.c b/src/SDL_log.c
index df6e1e6d4..272943035 100644
--- a/src/SDL_log.c
+++ b/src/SDL_log.c
@@ -39,6 +39,9 @@
 #define DEFAULT_APPLICATION_PRIORITY    SDL_LOG_PRIORITY_INFO
 #define DEFAULT_TEST_PRIORITY           SDL_LOG_PRIORITY_VERBOSE
 
+/* Forward definition of error function */
+extern int SDL_SetError(const char *fmt, ...);
+
 typedef struct SDL_LogLevel
 {
     int category;
@@ -288,6 +291,14 @@ SDL_LogMessageV(int category, SDL_LogPriority priority, const char *fmt, va_list
     SDL_stack_free(message);
 }
 
+#if defined(__WIN32__)
+/* Flag tracking the attachment of the console: 0=unattached, 1=attached, -1=error */
+static int consoleAttached = 0;
+
+/* Handle to stderr output of console. */
+static HANDLE stderrHandle = NULL;
+#endif
+
 static void
 SDL_LogOutput(void *userdata, int category, SDL_LogPriority priority,
               const char *message)
@@ -298,12 +309,60 @@ SDL_LogOutput(void *userdata, int category, SDL_LogPriority priority,
         char *output;
         size_t length;
         LPTSTR tstr;
+        BOOL pbRemoteDebuggerPresent;        
+        BOOL attachResult;
+        DWORD attachError;
+        unsigned long charsWritten; 
+
+        /* Maybe attach console and get stderr handle */
+        if (consoleAttached == 0) {
+            attachResult = AttachConsole(ATTACH_PARENT_PROCESS);
+            if (!attachResult) {
+                    attachError = GetLastError();
+                    if (attachError == ERROR_INVALID_HANDLE) {
+                        SDL_SetError("Parent process has no console");
+                        consoleAttached = -1;
+                    } else if (attachError == ERROR_GEN_FAILURE) {
+                         SDL_SetError("Could not attach to console of parent process");
+                         consoleAttached = -1;
+                    } else if (attachError == ERROR_ACCESS_DENIED) {  
+                         /* Already attached */
+                        consoleAttached = 1;
+                    } else {
+                        SDL_SetError("Error %d attaching console", attachError);
+                        consoleAttached = -1;
+                    }
+                } else {
+                    /* Newly attached */
+                    consoleAttached = 1;
+                }
+			
+                if (consoleAttached == 1) {
+                        stderrHandle = GetStdHandle(STD_ERROR_HANDLE);
+                }
+        }
 
         length = SDL_strlen(SDL_priority_prefixes[priority]) + 2 + SDL_strlen(message) + 1 + 1;
         output = SDL_stack_alloc(char, length);
         SDL_snprintf(output, length, "%s: %s\n", SDL_priority_prefixes[priority], message);
         tstr = WIN_UTF8ToString(output);
-        OutputDebugString(tstr);
+        
+        /* Debugger output, if attached. Check each time since debugger can be attached at runtime. */
+        CheckRemoteDebuggerPresent(GetCurrentProcess(), &pbRemoteDebuggerPresent);
+        if (pbRemoteDebuggerPresent || IsDebuggerPresent()) {
+            OutputDebugString(tstr);
+        }
+       
+        /* Screen output to stderr, if console was attached. */
+        if (consoleAttached == 1) {
+                if (!WriteConsole(stderrHandle, tstr, lstrlen(tstr), &charsWritten, NULL)) {
+                    SDL_SetError("Error %d calling WriteConsole", GetLastError());
+                }
+                if (charsWritten == ERROR_NOT_ENOUGH_MEMORY) {
+                    SDL_SetError("Insufficient heap memory to write message of size %d", length);
+                }
+        }
+
         SDL_free(tstr);
         SDL_stack_free(output);
     }

From c6dd828f1e7ad41fcfdb42f1eca2ba57dc6db9d5 Mon Sep 17 00:00:00 2001
From: =?UTF-8?q?J=C3=B8rgen=20P=2E=20Tjern=C3=B8?=
 
Date: Wed, 5 Jun 2013 12:00:15 -0700
Subject: [PATCH 192/542] Win32: Ignore WM_MOUSELEAVE in relative mode.

We get an WM_MOUSELEAVE when we switch to relative mode, even though the cursor is still in the window.
Ignoring this event to not end up with a NULL mouse focus.

This fixes http://bugzilla.libsdl.org/show_bug.cgi?id=1861
---
 src/video/windows/SDL_windowsevents.c | 13 +++++--------
 1 file changed, 5 insertions(+), 8 deletions(-)

diff --git a/src/video/windows/SDL_windowsevents.c b/src/video/windows/SDL_windowsevents.c
index b30b8364b..4ceac554f 100644
--- a/src/video/windows/SDL_windowsevents.c
+++ b/src/video/windows/SDL_windowsevents.c
@@ -446,14 +446,11 @@ WIN_WindowProc(HWND hwnd, UINT msg, WPARAM wParam, LPARAM lParam)
 
 #ifdef WM_MOUSELEAVE
     case WM_MOUSELEAVE:
-        if (SDL_GetMouseFocus() == data->window) {
-            if (!SDL_GetMouse()->relative_mode) {
-                POINT cursorPos;
-                GetCursorPos(&cursorPos);
-                ScreenToClient(hwnd, &cursorPos);
-                SDL_SendMouseMotion(data->window, 0, 0, cursorPos.x, cursorPos.y);
-            }
-
+        if (SDL_GetMouseFocus() == data->window && !SDL_GetMouse()->relative_mode) {
+            POINT cursorPos;
+            GetCursorPos(&cursorPos);
+            ScreenToClient(hwnd, &cursorPos);
+            SDL_SendMouseMotion(data->window, 0, 0, cursorPos.x, cursorPos.y);
             SDL_SetMouseFocus(NULL);
         }
         returnCode = 0;

From df3b1a6ed12d98852bb18ce8f12c53cec83ec9bd Mon Sep 17 00:00:00 2001
From: =?UTF-8?q?J=C3=B8rgen=20P=2E=20Tjern=C3=B8?=
 
Date: Wed, 5 Jun 2013 12:00:18 -0700
Subject: [PATCH 193/542] Win32: Fix issue with SetCapture & negative values.

This fixes an issue where we were using the wrong macros to extract the position from WM_MOUSEMOVE, so negative values were behaving incorrectly.
These would be generated in multimon situations, or if you use SetCapture.

Fixes http://bugzilla.libsdl.org/show_bug.cgi?id=1175
---
 src/video/windows/SDL_windowsevents.c | 4 +++-
 1 file changed, 3 insertions(+), 1 deletion(-)

diff --git a/src/video/windows/SDL_windowsevents.c b/src/video/windows/SDL_windowsevents.c
index 4ceac554f..dcd183d6f 100644
--- a/src/video/windows/SDL_windowsevents.c
+++ b/src/video/windows/SDL_windowsevents.c
@@ -33,6 +33,8 @@
 /* Dropfile support */
 #include 
 
+/* For GET_X_LPARAM, GET_Y_LPARAM. */
+#include 
 
 /*#define WMMSG_DEBUG*/
 #ifdef WMMSG_DEBUG
@@ -381,7 +383,7 @@ WIN_WindowProc(HWND hwnd, UINT msg, WPARAM wParam, LPARAM lParam)
 
     case WM_MOUSEMOVE:
         if( !SDL_GetMouse()->relative_mode )
-            SDL_SendMouseMotion(data->window, 0, 0, LOWORD(lParam), HIWORD(lParam));
+            SDL_SendMouseMotion(data->window, 0, 0, GET_X_LPARAM(lParam), GET_Y_LPARAM(lParam));
         /* don't break here, fall through to check the wParam like the button presses */
     case WM_LBUTTONUP:
     case WM_RBUTTONUP:

From 24fc22545b2f83ea518bdd907ea06fea41517cba Mon Sep 17 00:00:00 2001
From: =?UTF-8?q?J=C3=B8rgen=20P=2E=20Tjern=C3=B8?=
 
Date: Wed, 5 Jun 2013 12:48:44 -0700
Subject: [PATCH 194/542] Mac: Fix invalid PS3 controller mapping.

PS3 controller had swapped D-Pad down & left buttons, as well as X & Y buttons.
Thanks to Alex Szpakowski for the bug report and fix.

Fixes http://bugzilla.libsdl.org/show_bug.cgi?id=1891
---
 src/joystick/SDL_gamecontroller.c | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/src/joystick/SDL_gamecontroller.c b/src/joystick/SDL_gamecontroller.c
index bf85cdc10..e0d9bc74c 100644
--- a/src/joystick/SDL_gamecontroller.c
+++ b/src/joystick/SDL_gamecontroller.c
@@ -99,7 +99,7 @@ const char *s_ControllerMappings [] =
     "6d0416c2000000000000504944564944,Generic DirectInput Controller,a:b1,b:b2,y:b3,x:b0,start:b9,back:b8,leftstick:b10,rightstick:b11,leftshoulder:b4,rightshoulder:b5,dpup:h0.1,dpleft:h0.8,dpdown:h0.4,dpright:h0.2,leftx:a0,lefty:a1,rightx:a2,righty:a3,lefttrigger:b6,righttrigger:b7,",
 #elif defined(__MACOSX__)
     "5e040000000000008e02000000000000,X360 Controller,a:b0,b:b1,y:b3,x:b2,start:b8,guide:b10,back:b9,dpup:b11,dpleft:b13,dpdown:b12,dpright:b14,leftshoulder:b4,rightshoulder:b5,leftstick:b6,rightstick:b7,leftx:a0,lefty:a1,rightx:a3,righty:a4,lefttrigger:a2,righttrigger:a5",
-    "4c050000000000006802000000000000,PS3 Controller,a:b14,b:b13,x:b12,y:b15,start:b3,guide:b16,back:b0,leftstick:b1,rightstick:b2,leftshoulder:b10,rightshoulder:b11,dpup:b4,dpleft:b6,dpdown:b7,dpright:b5,leftx:a0,lefty:a1,rightx:a2,righty:a3,lefttrigger:b8,righttrigger:b9",
+    "4c050000000000006802000000000000,PS3 Controller,a:b14,b:b13,x:b15,y:b12,start:b3,guide:b16,back:b0,leftstick:b1,rightstick:b2,leftshoulder:b10,rightshoulder:b11,dpup:b4,dpleft:b7,dpdown:b6,dpright:b5,leftx:a0,lefty:a1,rightx:a2,righty:a3,lefttrigger:b8,righttrigger:b9",
     "0500000047532047616d657061640000,GameStop Gamepad,a:b0,b:b1,y:b3,x:b2,start:b9,guide:,back:b8,leftstick:b10,rightstick:b11,leftshoulder:b4,rightshoulder:b5,dpup:h0.1,dpleft:h0.8,dpdown:h0.4,dpright:h0.2,leftx:a0,lefty:a1,rightx:a2,righty:a3,lefttrigger:b6,righttrigger:b7,",
     "6d040000000000001fc2000000000000,Logitech F710 Gamepad Controller (XInput),a:b0,b:b1,y:b3,x:b2,start:b8,guide:b10,back:b9,leftstick:b6,rightstick:b7,leftshoulder:b4,rightshoulder:b5,dpup:b11,dpleft:b13,dpdown:b12,dpright:b14,leftx:a0,lefty:a1,rightx:a3,righty:a4,lefttrigger:a2,righttrigger:a5,",
     "6d0400000000000016c2000000000000,Logitech F310 Gamepad Controller (DInput),a:b1,b:b2,y:b3,x:b0,start:b9,back:b8,leftstick:b10,rightstick:b11,leftshoulder:b4,rightshoulder:b5,dpup:h0.1,dpleft:h0.8,dpdown:h0.4,dpright:h0.2,leftx:a0,lefty:a1,rightx:a2,righty:a3,lefttrigger:b6,righttrigger:b7,", /* Guide button doesn't seem to be sent in DInput mode. */

From c2d84dbad6f53a27e1f79960cfd4aba58fb39b68 Mon Sep 17 00:00:00 2001
From: Philipp Wiesemann 
Date: Wed, 5 Jun 2013 23:33:15 +0200
Subject: [PATCH 195/542] Fixed doxygen warnings and corrected documentation in
 header files.

---
 include/SDL_events.h  | 4 ++--
 include/SDL_haptic.h  | 7 +++----
 include/SDL_surface.h | 4 ++--
 3 files changed, 7 insertions(+), 8 deletions(-)

diff --git a/include/SDL_events.h b/include/SDL_events.h
index ae0b0f166..0281b89d7 100644
--- a/include/SDL_events.h
+++ b/include/SDL_events.h
@@ -462,7 +462,7 @@ typedef struct SDL_OSEvent
  */
 typedef struct SDL_UserEvent
 {
-    Uint32 type;        /**< ::SDL_USEREVENT through ::SDL_NUMEVENTS-1 */
+    Uint32 type;        /**< ::SDL_USEREVENT through ::SDL_LASTEVENT-1 */
     Uint32 timestamp;
     Uint32 windowID;    /**< The associated window if any */
     Sint32 code;        /**< User defined event code */
@@ -642,7 +642,7 @@ typedef int (SDLCALL * SDL_EventFilter) (void *userdata, SDL_Event * event);
  *  \warning  Be very careful of what you do in the event filter function, as
  *            it may run in a different thread!
  *
- *  There is one caveat when dealing with the ::SDL_QUITEVENT event type.  The
+ *  There is one caveat when dealing with the ::SDL_QuitEvent event type.  The
  *  event filter is only called when the window manager desires to close the
  *  application window.  If the event filter returns 1, then the window will
  *  be closed, otherwise the window will remain open if possible.
diff --git a/include/SDL_haptic.h b/include/SDL_haptic.h
index a06c310b0..56af6a614 100644
--- a/include/SDL_haptic.h
+++ b/include/SDL_haptic.h
@@ -1052,8 +1052,7 @@ extern DECLSPEC void SDLCALL SDL_HapticDestroyEffect(SDL_Haptic * haptic,
  *
  *  \param haptic Haptic device to query the effect status on.
  *  \param effect Identifier of the effect to query its status.
- *  \return 0 if it isn't playing, ::SDL_HAPTIC_PLAYING if it is playing
- *          or -1 on error.
+ *  \return 0 if it isn't playing, 1 if it is playing or -1 on error.
  *
  *  \sa SDL_HapticRunEffect
  *  \sa SDL_HapticStopEffect
@@ -1067,8 +1066,8 @@ extern DECLSPEC int SDLCALL SDL_HapticGetEffectStatus(SDL_Haptic * haptic,
  *  Device must support the ::SDL_HAPTIC_GAIN feature.
  *
  *  The user may specify the maximum gain by setting the environment variable
- *  ::SDL_HAPTIC_GAIN_MAX which should be between 0 and 100.  All calls to
- *  SDL_HapticSetGain() will scale linearly using ::SDL_HAPTIC_GAIN_MAX as the
+ *  SDL_HAPTIC_GAIN_MAX which should be between 0 and 100.  All calls to
+ *  SDL_HapticSetGain() will scale linearly using SDL_HAPTIC_GAIN_MAX as the
  *  maximum.
  *
  *  \param haptic Haptic device to set the gain on.
diff --git a/include/SDL_surface.h b/include/SDL_surface.h
index 4ebeadd8f..76fcfde32 100644
--- a/include/SDL_surface.h
+++ b/include/SDL_surface.h
@@ -22,7 +22,7 @@
 /**
  *  \file SDL_surface.h
  *
- *  Header file for ::SDL_surface definition and management functions.
+ *  Header file for ::SDL_Surface definition and management functions.
  */
 
 #ifndef _SDL_surface_h
@@ -43,7 +43,7 @@ extern "C" {
 /**
  *  \name Surface flags
  *
- *  These are the currently supported flags for the ::SDL_surface.
+ *  These are the currently supported flags for the ::SDL_Surface.
  *
  *  \internal
  *  Used internally (read-only).

From e1e1fa3d6125376168ad25c387f0e0985d46e383 Mon Sep 17 00:00:00 2001
From: =?UTF-8?q?J=C3=B8rgen=20P=2E=20Tjern=C3=B8?=
 
Date: Wed, 5 Jun 2013 15:11:38 -0700
Subject: [PATCH 196/542] Joystick: Only send joy events when focused.

This changes makes it so that you only receive joystick (and implicitly
gamecontroller) input events when your application has keyboard focus.
If you'd like to still receive events when your application is in the
background, set the SDL_JOYSTICK_ALLOW_BACKGROUND_EVENTS hint to "1".

This fixes http://bugzilla.libsdl.org/show_bug.cgi?id=1892
---
 include/SDL_hints.h         | 14 +++++++++++
 src/joystick/SDL_joystick.c | 49 ++++++++++++++++++++++++++++++++++++-
 2 files changed, 62 insertions(+), 1 deletion(-)

diff --git a/include/SDL_hints.h b/include/SDL_hints.h
index c96d88745..e38a577bd 100644
--- a/include/SDL_hints.h
+++ b/include/SDL_hints.h
@@ -215,6 +215,20 @@ extern "C" {
 #define SDL_HINT_GAMECONTROLLERCONFIG "SDL_GAMECONTROLLERCONFIG"
 
 
+/**
+ *  \brief  A variable that lets you enable joystick (and gamecontroller) events even when your app is in the background.
+ *
+ * The default value is "0".
+ *
+ *  The variable can be set to the following values:
+ *    "0"       - Disable joystick & gamecontroller input events when the
+ *                application is in the background.
+ *    "1"       - Enable joystick & gamecontroller input events when the
+ *                application is in the backgroumd.
+ */
+#define SDL_HINT_JOYSTICK_ALLOW_BACKGROUND_EVENTS "SDL_JOYSTICK_ALLOW_BACKGROUND_EVENTS"
+
+
 /**
  *  \brief If set to 0 then never set the top most bit on a SDL Window, even if the video mode expects it.
  *      This is a debugging aid for developers and not expected to be used by end users. The default is "1"
diff --git a/src/joystick/SDL_joystick.c b/src/joystick/SDL_joystick.c
index 0e9c3f74c..0342e6ba9 100644
--- a/src/joystick/SDL_joystick.c
+++ b/src/joystick/SDL_joystick.c
@@ -25,6 +25,7 @@
 #include "SDL_events.h"
 #include "SDL_sysjoystick.h"
 #include "SDL_assert.h"
+#include "SDL_hints.h"
 
 #if !SDL_EVENTS_DISABLED
 #include "../events/SDL_events_c.h"
@@ -451,6 +452,22 @@ SDL_JoystickQuit(void)
 }
 
 
+static SDL_bool
+SDL_PrivateJoystickShouldIgnoreEvent()
+{
+    const char *hint;
+    if (SDL_GetKeyboardFocus() != NULL) {
+        return SDL_FALSE;
+    }
+
+    hint = SDL_GetHint(SDL_HINT_JOYSTICK_ALLOW_BACKGROUND_EVENTS);
+    if (hint && *hint == '1') {
+        return SDL_FALSE;
+    }
+
+    return SDL_TRUE;
+}
+
 /* These are global for SDL_sysjoystick.c and SDL_events.c */
 
 int
@@ -469,6 +486,15 @@ SDL_PrivateJoystickAxis(SDL_Joystick * joystick, Uint8 axis, Sint16 value)
     }
     joystick->axes[axis] = value;
 
+    /* We ignore events if we don't have keyboard focus, except for centering
+     * events.
+     */
+    if (SDL_PrivateJoystickShouldIgnoreEvent()) {
+        if (!(joystick->closed && joystick->uncentered)) {
+            return 0;
+        }
+    }
+
     /* Post the event, if desired */
     posted = 0;
 #if !SDL_EVENTS_DISABLED
@@ -497,6 +523,16 @@ SDL_PrivateJoystickHat(SDL_Joystick * joystick, Uint8 hat, Uint8 value)
     /* Update internal joystick state */
     joystick->hats[hat] = value;
 
+    /* We ignore events if we don't have keyboard focus, except for centering
+     * events.
+     */
+    if (SDL_PrivateJoystickShouldIgnoreEvent()) {
+        if (!(joystick->closed && joystick->uncentered)) {
+            return 0;
+        }
+    }
+
+
     /* Post the event, if desired */
     posted = 0;
 #if !SDL_EVENTS_DISABLED
@@ -523,6 +559,11 @@ SDL_PrivateJoystickBall(SDL_Joystick * joystick, Uint8 ball,
         return 0;
     }
 
+    /* We ignore events if we don't have keyboard focus. */
+    if (SDL_PrivateJoystickShouldIgnoreEvent()) {
+        return 0;
+    }
+
     /* Update internal mouse state */
     joystick->balls[ball].dx += xrel;
     joystick->balls[ball].dy += yrel;
@@ -568,6 +609,12 @@ SDL_PrivateJoystickButton(SDL_Joystick * joystick, Uint8 button, Uint8 state)
         return 0;
     }
 
+    /* We ignore events if we don't have keyboard focus, except for button
+     * release. */
+    if (SDL_PrivateJoystickShouldIgnoreEvent() && event.type == SDL_JOYBUTTONDOWN) {
+        return 0;
+    }
+
     /* Update internal joystick state */
     joystick->buttons[button] = state;
 
@@ -605,7 +652,6 @@ SDL_JoystickUpdate(void)
         if ( joystick->closed && joystick->uncentered )
         {
             int i;
-            joystick->uncentered = 0;
 
             /* Tell the app that everything is centered/unpressed...  */
             for (i = 0; i < joystick->naxes; i++)
@@ -617,6 +663,7 @@ SDL_JoystickUpdate(void)
             for (i = 0; i < joystick->nhats; i++)
                 SDL_PrivateJoystickHat(joystick, i, SDL_HAT_CENTERED);
 
+            joystick->uncentered = 0;
         }
 
         SDL_updating_joystick = NULL;

From 8731286cb426c89828302a1c2a37212eff3bfca5 Mon Sep 17 00:00:00 2001
From: Sam Lantinga 
Date: Wed, 5 Jun 2013 21:14:26 -0700
Subject: [PATCH 197/542] We already link SDL2_test by default now.

---
 test/Makefile.in | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/test/Makefile.in b/test/Makefile.in
index c0dc376f6..d7386992b 100644
--- a/test/Makefile.in
+++ b/test/Makefile.in
@@ -86,7 +86,7 @@ testautomation$(EXE): $(srcdir)/testautomation.c \
 		      $(srcdir)/testautomation_syswm.c \
 		      $(srcdir)/testautomation_timer.c \
 		      $(srcdir)/testautomation_video.c
-	$(CC) -o $@ $^ $(CFLAGS) -lSDL2_test $(LIBS) 
+	$(CC) -o $@ $^ $(CFLAGS) $(LIBS) 
 
 testmultiaudio$(EXE): $(srcdir)/testmultiaudio.c
 	$(CC) -o $@ $^ $(CFLAGS) $(LIBS)

From 47f2eaf41580614a47ecc8544b3ed8b7f3caba4e Mon Sep 17 00:00:00 2001
From: Sam Lantinga 
Date: Wed, 5 Jun 2013 21:23:59 -0700
Subject: [PATCH 198/542] Added some extra protection to notify the developer
 if they haven't initialized the application properly.

This will help reduce issues like that reported in bug 1819:

Wouter van Oortmerssen 2013-04-23 20:12:07 EDT
#0  0x01d1e881 in __HALT ()
#1  0x01c58971 in _CFRuntimeCreateInstance ()
#2  0x02e4acc1 in GSFontCreateWithName ()
#3  0x00adc0e1 in UINewFont ()
#4  0x00adc24c in +[UIFont systemFontOfSize:traits:] ()
#5  0x00adc298 in +[UIFont systemFontOfSize:] ()
#6  0x009fb5d9 in +[UITextFieldLabel defaultFont] ()
#7  0x00a8ccd5 in -[UILabel _commonInit] ()
#8  0x00a8ce14 in -[UILabel initWithFrame:] ()
#9  0x00a052eb in -[UITextField createTextLabelWithTextColor:] ()
#10 0x009fbede in -[UITextField initWithFrame:] ()
#11 0x00152ead in -[SDL_uikitview initializeKeyboard] at /Users/aardappel/lobster/external/SDL-2.0.0-7046/Xcode-iOS/SDL/../../src/video/uikit/SDL_uikitview.m:208
#12 0x0015290c in -[SDL_uikitview initWithFrame:] at /Users/aardappel/lobster/external/SDL-2.0.0-7046/Xcode-iOS/SDL/../../src/video/uikit/SDL_uikitview.m:50
#13 0x00153b5b in -[SDL_uikitopenglview initWithFrame:scale:retainBacking:rBits:gBits:bBits:aBits:depthBits:stencilBits:majorVersion:] at /Users/aardappel/lobster/external/SDL-2.0.0-7046/Xcode-iOS/SDL/../../src/video/uikit/SDL_uikitopenglview.m:53
#14 0x001524ff in UIKit_GL_CreateContext at /Users/aardappel/lobster/external/SDL-2.0.0-7046/Xcode-iOS/SDL/../../src/video/uikit/SDL_uikitopengles.m:114
#15 0x0015078f in SDL_GL_CreateContext at /Users/aardappel/lobster/external/SDL-2.0.0-7046/Xcode-iOS/SDL/../../src/video/SDL_video.c:2666
#16 0x000d8c5c in SDLInit(char const*, vec&) at /Users/aardappel/lobster/dev/xcode/lobster/../../src/sdlsystem.cpp:193
---
 include/SDL_main.h                     |  9 +++++++++
 src/SDL.c                              | 16 ++++++++++++++++
 src/main/android/SDL_android_main.cpp  |  2 ++
 src/main/psp/SDL_psp_main.c            |  4 ++--
 src/main/windows/SDL_windows_main.c    |  2 ++
 src/video/uikit/SDL_uikitappdelegate.m |  3 ++-
 6 files changed, 33 insertions(+), 3 deletions(-)

diff --git a/include/SDL_main.h b/include/SDL_main.h
index 59bd20167..7a766d24c 100644
--- a/include/SDL_main.h
+++ b/include/SDL_main.h
@@ -72,6 +72,15 @@ extern C_LINKAGE int SDL_main(int argc, char *argv[]);
 extern "C" {
 #endif
 
+/*
+ *  This is called by the real SDL main function to let the rest of the
+ *  library know that initialization was done properly.
+ *
+ *  Calling this yourself without knowing what you're doing can cause
+ *  crashes and hard to diagnose problems with your application.
+ */
+extern DECLSPEC void SDL_SetMainReady(void);
+
 #ifdef __WIN32__
 
 /**
diff --git a/src/SDL.c b/src/SDL.c
index 5f28373a1..f6f3dec69 100644
--- a/src/SDL.c
+++ b/src/SDL.c
@@ -43,6 +43,11 @@ extern int SDL_HelperWindowDestroy(void);
 
 
 /* The initialized subsystems */
+#ifdef SDL_MAIN_NEEDED
+static SDL_bool SDL_MainIsReady = SDL_FALSE;
+#else
+static SDL_bool SDL_MainIsReady = SDL_TRUE;
+#endif
 static SDL_bool SDL_bInMainQuit = SDL_FALSE;
 static Uint8 SDL_SubsystemRefCount[ 32 ];
 
@@ -88,9 +93,20 @@ SDL_PrivateShouldQuitSubsystem(Uint32 subsystem) {
     return SDL_SubsystemRefCount[subsystem_index] == 1 || SDL_bInMainQuit;
 }
 
+void
+SDL_SetMainReady(void)
+{
+    SDL_MainIsReady = SDL_TRUE;
+}
+
 int
 SDL_InitSubSystem(Uint32 flags)
 {
+    if (!SDL_MainIsReady) {
+        SDL_SetError("Application didn't initialize properly, did you include SDL_main.h in the file containing your main() function?");
+        return -1;
+    }
+
 #if !SDL_TIMERS_DISABLED
     SDL_InitTicks();
 #endif
diff --git a/src/main/android/SDL_android_main.cpp b/src/main/android/SDL_android_main.cpp
index 4581e1c3b..5f3abbab8 100644
--- a/src/main/android/SDL_android_main.cpp
+++ b/src/main/android/SDL_android_main.cpp
@@ -20,6 +20,8 @@ extern "C" void Java_org_libsdl_app_SDLActivity_nativeInit(JNIEnv* env, jclass c
     /* This interface could expand with ABI negotiation, calbacks, etc. */
     SDL_Android_Init(env, cls);
 
+    SDL_SetMainReady();
+
     /* Run the application code! */
     int status;
     char *argv[2];
diff --git a/src/main/psp/SDL_psp_main.c b/src/main/psp/SDL_psp_main.c
index c60e8441b..77ef39d5a 100644
--- a/src/main/psp/SDL_psp_main.c
+++ b/src/main/psp/SDL_psp_main.c
@@ -37,8 +37,6 @@
    PSP_MAIN_THREAD_STACK_SIZE, etc.
 */
 
-extern int SDL_main(int argc, char *argv[]);
-
 PSP_MODULE_INFO("SDL App", 0, 1, 1);
 
 int sdl_psp_exit_callback(int arg1, int arg2, void *common)
@@ -75,6 +73,8 @@ int main(int argc, char *argv[])
     /* Register sceKernelExitGame() to be called when we exit */
     atexit(sceKernelExitGame);
 
+    SDL_SetMainReady();
+
     (void)SDL_main(argc, argv);
     return 0;
 }
diff --git a/src/main/windows/SDL_windows_main.c b/src/main/windows/SDL_windows_main.c
index f4f78f68c..bea208224 100644
--- a/src/main/windows/SDL_windows_main.c
+++ b/src/main/windows/SDL_windows_main.c
@@ -134,6 +134,8 @@ console_main(int argc, char *argv[])
 {
     int status;
 
+    SDL_SetMainReady();
+
     /* Run the application main() code */
     status = SDL_main(argc, argv);
 
diff --git a/src/video/uikit/SDL_uikitappdelegate.m b/src/video/uikit/SDL_uikitappdelegate.m
index d13c2bbce..93af43821 100644
--- a/src/video/uikit/SDL_uikitappdelegate.m
+++ b/src/video/uikit/SDL_uikitappdelegate.m
@@ -37,7 +37,6 @@
 #undef main
 #endif
 
-extern int SDL_main(int argc, char *argv[]);
 static int forward_argc;
 static char **forward_argv;
 static int exit_status;
@@ -187,6 +186,8 @@ static void SDL_IdleTimerDisabledChanged(const char *name, const char *oldValue,
 
 - (void)postFinishLaunch
 {
+    SDL_SetMainReady();
+
     /* run the user's application, passing argc and argv */
     SDL_iPhoneSetEventPump(SDL_TRUE);
     exit_status = SDL_main(forward_argc, forward_argv);

From 5a85d1d29ac9a6cd5b01eea0ec5ec0a126e68b9a Mon Sep 17 00:00:00 2001
From: Sam Lantinga 
Date: Wed, 5 Jun 2013 21:31:22 -0700
Subject: [PATCH 199/542] This patch isn't needed because you have the window
 and can do [nswindow contentView] yourself. I'm rolling this back so we
 minimize the things exposed that we have to keep consistent in the API.

---
 include/SDL_syswm.h               | 2 --
 src/video/cocoa/SDL_cocoawindow.m | 1 -
 2 files changed, 3 deletions(-)

diff --git a/include/SDL_syswm.h b/include/SDL_syswm.h
index 539724f9e..3ea026b44 100644
--- a/include/SDL_syswm.h
+++ b/include/SDL_syswm.h
@@ -82,7 +82,6 @@ struct SDL_SysWMinfo;
 #include 
 #else
 typedef struct _NSWindow NSWindow;
-typedef struct _NSView NSView;
 #endif
 #endif
 
@@ -188,7 +187,6 @@ struct SDL_SysWMinfo
         struct
         {
             NSWindow *window;           /* The Cocoa window */
-            NSView *view;               /* The Cocoa view */
         } cocoa;
 #endif
 #if defined(SDL_VIDEO_DRIVER_UIKIT)
diff --git a/src/video/cocoa/SDL_cocoawindow.m b/src/video/cocoa/SDL_cocoawindow.m
index a3053075e..bb30391fa 100644
--- a/src/video/cocoa/SDL_cocoawindow.m
+++ b/src/video/cocoa/SDL_cocoawindow.m
@@ -1133,7 +1133,6 @@ Cocoa_GetWindowWMInfo(_THIS, SDL_Window * window, SDL_SysWMinfo * info)
     if (info->version.major <= SDL_MAJOR_VERSION) {
         info->subsystem = SDL_SYSWM_COCOA;
         info->info.cocoa.window = nswindow;
-        info->info.cocoa.view = [nswindow contentView];
         return SDL_TRUE;
     } else {
         SDL_SetError("Application not compiled with SDL %d.%d\n",

From eeffdf78ab2d4f8171a2956f9777ebb141d50c58 Mon Sep 17 00:00:00 2001
From: Sam Lantinga 
Date: Wed, 5 Jun 2013 21:38:54 -0700
Subject: [PATCH 200/542] Need to include SDL_main.h when we call SDL_main()

---
 src/video/uikit/SDL_uikitappdelegate.m | 1 +
 1 file changed, 1 insertion(+)

diff --git a/src/video/uikit/SDL_uikitappdelegate.m b/src/video/uikit/SDL_uikitappdelegate.m
index 93af43821..3a6755048 100644
--- a/src/video/uikit/SDL_uikitappdelegate.m
+++ b/src/video/uikit/SDL_uikitappdelegate.m
@@ -27,6 +27,7 @@
 #include "SDL_hints.h"
 #include "../../SDL_hints_c.h"
 #include "SDL_system.h"
+#include "SDL_main.h"
 
 #include "SDL_uikitappdelegate.h"
 #include "SDL_uikitmodes.h"

From 9f08f67e678c661ae77c8db2920ed6d3516b95b7 Mon Sep 17 00:00:00 2001
From: Sam Lantinga 
Date: Wed, 5 Jun 2013 21:47:49 -0700
Subject: [PATCH 201/542] The jump hack is no longer used.

Cheers!
---
 Xcode-iOS/SDL/SDL.xcodeproj/project.pbxproj | 34 +++------------
 src/video/uikit/SDL_uikitappdelegate.m      |  1 -
 src/video/uikit/SDL_uikitevents.m           | 47 +++++++--------------
 src/video/uikit/jumphack.c                  | 19 ---------
 src/video/uikit/jumphack.h                  | 18 --------
 5 files changed, 22 insertions(+), 97 deletions(-)
 delete mode 100644 src/video/uikit/jumphack.c
 delete mode 100644 src/video/uikit/jumphack.h

diff --git a/Xcode-iOS/SDL/SDL.xcodeproj/project.pbxproj b/Xcode-iOS/SDL/SDL.xcodeproj/project.pbxproj
index 0db2b2037..8849b8d41 100755
--- a/Xcode-iOS/SDL/SDL.xcodeproj/project.pbxproj
+++ b/Xcode-iOS/SDL/SDL.xcodeproj/project.pbxproj
@@ -25,14 +25,14 @@
 		006E9852119550FB001DE610 /* audio.c in Sources */ = {isa = PBXBuildFile; fileRef = 006E9831119550FB001DE610 /* audio.c */; };
 		006E9853119550FB001DE610 /* common.c in Sources */ = {isa = PBXBuildFile; fileRef = 006E9834119550FB001DE610 /* common.c */; };
 		006E9859119550FB001DE610 /* platform.c in Sources */ = {isa = PBXBuildFile; fileRef = 006E983D119550FB001DE610 /* platform.c */; };
-		006E985A119550FB001DE610 /* README in Resources */ = {isa = PBXBuildFile; fileRef = 006E983F119550FB001DE610 /* README */; };
+		006E985A119550FB001DE610 /* (null) in Resources */ = {isa = PBXBuildFile; };
 		006E985B119550FB001DE610 /* rect.c in Sources */ = {isa = PBXBuildFile; fileRef = 006E9841119550FB001DE610 /* rect.c */; };
 		006E985C119550FB001DE610 /* render.c in Sources */ = {isa = PBXBuildFile; fileRef = 006E9844119550FB001DE610 /* render.c */; };
 		006E985D119550FB001DE610 /* read in Copy rwops */ = {isa = PBXBuildFile; fileRef = 006E9847119550FB001DE610 /* read */; };
 		006E985E119550FB001DE610 /* rwops.c in Sources */ = {isa = PBXBuildFile; fileRef = 006E9848119550FB001DE610 /* rwops.c */; };
-		006E9860119550FB001DE610 /* SDL_at.c in Sources */ = {isa = PBXBuildFile; fileRef = 006E984C119550FB001DE610 /* SDL_at.c */; };
+		006E9860119550FB001DE610 /* (null) in Sources */ = {isa = PBXBuildFile; };
 		006E9861119550FB001DE610 /* surface.c in Sources */ = {isa = PBXBuildFile; fileRef = 006E984F119550FB001DE610 /* surface.c */; };
-		006E9862119550FB001DE610 /* testsdl.c in Sources */ = {isa = PBXBuildFile; fileRef = 006E9851119550FB001DE610 /* testsdl.c */; };
+		006E9862119550FB001DE610 /* (null) in Sources */ = {isa = PBXBuildFile; };
 		006E986A1195513D001DE610 /* icon.bmp in Resources */ = {isa = PBXBuildFile; fileRef = 006E98631195513D001DE610 /* icon.bmp */; };
 		006E986B1195513D001DE610 /* moose.dat in Resources */ = {isa = PBXBuildFile; fileRef = 006E98641195513D001DE610 /* moose.dat */; };
 		006E986C1195513D001DE610 /* picture.xbm in Resources */ = {isa = PBXBuildFile; fileRef = 006E98651195513D001DE610 /* picture.xbm */; };
@@ -235,8 +235,6 @@
 		FDA685FC0DF244C800F98A1A /* SDL_nullevents_c.h in Headers */ = {isa = PBXBuildFile; fileRef = FDA685F60DF244C800F98A1A /* SDL_nullevents_c.h */; };
 		FDA685FF0DF244C800F98A1A /* SDL_nullvideo.c in Sources */ = {isa = PBXBuildFile; fileRef = FDA685F90DF244C800F98A1A /* SDL_nullvideo.c */; };
 		FDA686000DF244C800F98A1A /* SDL_nullvideo.h in Headers */ = {isa = PBXBuildFile; fileRef = FDA685FA0DF244C800F98A1A /* SDL_nullvideo.h */; };
-		FDC656480E560DF800311C8E /* jumphack.c in Sources */ = {isa = PBXBuildFile; fileRef = FDC656440E560DF800311C8E /* jumphack.c */; };
-		FDC656490E560DF800311C8E /* jumphack.h in Headers */ = {isa = PBXBuildFile; fileRef = FDC656450E560DF800311C8E /* jumphack.h */; };
 /* End PBXBuildFile section */
 
 /* Begin PBXContainerItemProxy section */
@@ -265,30 +263,16 @@
 
 /* Begin PBXFileReference section */
 		001E39A51196EE6F00A3F5B8 /* TestSupportRWops_Cocoa.m */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.objc; path = TestSupportRWops_Cocoa.m; sourceTree = ""; };
-		001E39A61196EE6F00A3F5B8 /* TestSupportRWops.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = TestSupportRWops.h; sourceTree = ""; };
 		006E982211955059001DE610 /* testsdl.app */ = {isa = PBXFileReference; explicitFileType = wrapper.application; includeInIndex = 0; path = testsdl.app; sourceTree = BUILT_PRODUCTS_DIR; };
 		006E982411955059001DE610 /* testsdl-Info.plist */ = {isa = PBXFileReference; lastKnownFileType = text.plist.xml; path = "testsdl-Info.plist"; sourceTree = ""; };
 		006E9831119550FB001DE610 /* audio.c */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.c; path = audio.c; sourceTree = ""; };
-		006E9832119550FB001DE610 /* audio.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = audio.h; sourceTree = ""; };
 		006E9834119550FB001DE610 /* common.c */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.c; path = common.c; sourceTree = ""; };
-		006E9835119550FB001DE610 /* common.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = common.h; sourceTree = ""; };
-		006E9836119550FB001DE610 /* images.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = images.h; sourceTree = ""; };
-		006E9837119550FB001DE610 /* img_blit.c */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.c; path = img_blit.c; sourceTree = ""; };
-		006E9838119550FB001DE610 /* img_blitblend.c */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.c; path = img_blitblend.c; sourceTree = ""; };
-		006E9839119550FB001DE610 /* img_face.c */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.c; path = img_face.c; sourceTree = ""; };
-		006E983A119550FB001DE610 /* img_primitives.c */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.c; path = img_primitives.c; sourceTree = ""; };
-		006E983B119550FB001DE610 /* img_primitivesblend.c */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.c; path = img_primitivesblend.c; sourceTree = ""; };
 		006E983D119550FB001DE610 /* platform.c */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.c; path = platform.c; sourceTree = ""; };
-		006E983E119550FB001DE610 /* platform.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = platform.h; sourceTree = ""; };
 		006E9841119550FB001DE610 /* rect.c */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.c; path = rect.c; sourceTree = ""; };
-		006E9842119550FB001DE610 /* rect.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = rect.h; sourceTree = ""; };
 		006E9844119550FB001DE610 /* render.c */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.c; path = render.c; sourceTree = ""; };
-		006E9845119550FB001DE610 /* render.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = render.h; sourceTree = ""; };
 		006E9847119550FB001DE610 /* read */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = text; path = read; sourceTree = ""; };
 		006E9848119550FB001DE610 /* rwops.c */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.c; path = rwops.c; sourceTree = ""; };
-		006E9849119550FB001DE610 /* rwops.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = rwops.h; sourceTree = ""; };
 		006E984F119550FB001DE610 /* surface.c */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.c; path = surface.c; sourceTree = ""; };
-		006E9850119550FB001DE610 /* surface.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = surface.h; sourceTree = ""; };
 		006E98631195513D001DE610 /* icon.bmp */ = {isa = PBXFileReference; lastKnownFileType = image.bmp; name = icon.bmp; path = ../../test/icon.bmp; sourceTree = SOURCE_ROOT; };
 		006E98641195513D001DE610 /* moose.dat */ = {isa = PBXFileReference; lastKnownFileType = file; name = moose.dat; path = ../../test/moose.dat; sourceTree = SOURCE_ROOT; };
 		006E98651195513D001DE610 /* picture.xbm */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = text; name = picture.xbm; path = ../../test/picture.xbm; sourceTree = SOURCE_ROOT; };
@@ -515,8 +499,6 @@
 		FDA685F90DF244C800F98A1A /* SDL_nullvideo.c */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.c; path = SDL_nullvideo.c; sourceTree = ""; };
 		FDA685FA0DF244C800F98A1A /* SDL_nullvideo.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = SDL_nullvideo.h; sourceTree = ""; };
 		FDC261780E3A3FC8001C4554 /* keyinfotable.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = keyinfotable.h; sourceTree = ""; };
-		FDC656440E560DF800311C8E /* jumphack.c */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.c; path = jumphack.c; sourceTree = ""; };
-		FDC656450E560DF800311C8E /* jumphack.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = jumphack.h; sourceTree = ""; };
 /* End PBXFileReference section */
 
 /* Begin PBXFrameworksBuildPhase section */
@@ -754,8 +736,6 @@
 		FD689F090E26E5D900F90B21 /* uikit */ = {
 			isa = PBXGroup;
 			children = (
-				FDC656440E560DF800311C8E /* jumphack.c */,
-				FDC656450E560DF800311C8E /* jumphack.h */,
 				FDC261780E3A3FC8001C4554 /* keyinfotable.h */,
 				FD689FCD0E26E9D400F90B21 /* SDL_uikitappdelegate.h */,
 				FD689FCC0E26E9D400F90B21 /* SDL_uikitappdelegate.m */,
@@ -1084,7 +1064,6 @@
 				FD689F240E26E5D900F90B21 /* SDL_uikitwindow.h in Headers */,
 				FD689F260E26E5D900F90B21 /* SDL_uikitopenglview.h in Headers */,
 				FD689FCF0E26E9D400F90B21 /* SDL_uikitappdelegate.h in Headers */,
-				FDC656490E560DF800311C8E /* jumphack.h in Headers */,
 				047677BD0EA76A31008ABAF1 /* SDL_syshaptic.h in Headers */,
 				046387420F0B5B7D0041FD65 /* SDL_blit_slow.h in Headers */,
 				006E9888119552DD001DE610 /* SDL_rwopsbundlesupport.h in Headers */,
@@ -1239,7 +1218,7 @@
 			isa = PBXResourcesBuildPhase;
 			buildActionMask = 2147483647;
 			files = (
-				006E985A119550FB001DE610 /* README in Resources */,
+				006E985A119550FB001DE610 /* (null) in Resources */,
 				006E986A1195513D001DE610 /* icon.bmp in Resources */,
 				006E986B1195513D001DE610 /* moose.dat in Resources */,
 				006E986C1195513D001DE610 /* picture.xbm in Resources */,
@@ -1279,9 +1258,9 @@
 				006E985B119550FB001DE610 /* rect.c in Sources */,
 				006E985C119550FB001DE610 /* render.c in Sources */,
 				006E985E119550FB001DE610 /* rwops.c in Sources */,
-				006E9860119550FB001DE610 /* SDL_at.c in Sources */,
+				006E9860119550FB001DE610 /* (null) in Sources */,
 				006E9861119550FB001DE610 /* surface.c in Sources */,
-				006E9862119550FB001DE610 /* testsdl.c in Sources */,
+				006E9862119550FB001DE610 /* (null) in Sources */,
 				001E39A71196EE6F00A3F5B8 /* TestSupportRWops_Cocoa.m in Sources */,
 			);
 			runOnlyForDeploymentPostprocessing = 0;
@@ -1347,7 +1326,6 @@
 				FD689F270E26E5D900F90B21 /* SDL_uikitopenglview.m in Sources */,
 				FD689FCE0E26E9D400F90B21 /* SDL_uikitappdelegate.m in Sources */,
 				FD8BD8250E27E25900B52CD5 /* SDL_sysloadso.c in Sources */,
-				FDC656480E560DF800311C8E /* jumphack.c in Sources */,
 				047677BB0EA76A31008ABAF1 /* SDL_syshaptic.c in Sources */,
 				047677BC0EA76A31008ABAF1 /* SDL_haptic.c in Sources */,
 				047AF1B30EA98D6C00811173 /* SDL_sysloadso.c in Sources */,
diff --git a/src/video/uikit/SDL_uikitappdelegate.m b/src/video/uikit/SDL_uikitappdelegate.m
index 3a6755048..3b544db2c 100644
--- a/src/video/uikit/SDL_uikitappdelegate.m
+++ b/src/video/uikit/SDL_uikitappdelegate.m
@@ -32,7 +32,6 @@
 #include "SDL_uikitappdelegate.h"
 #include "SDL_uikitmodes.h"
 #include "../../events/SDL_events_c.h"
-#include "jumphack.h"
 
 #ifdef main
 #undef main
diff --git a/src/video/uikit/SDL_uikitevents.m b/src/video/uikit/SDL_uikitevents.m
index b3f380eb8..43dc74767 100644
--- a/src/video/uikit/SDL_uikitevents.m
+++ b/src/video/uikit/SDL_uikitevents.m
@@ -44,39 +44,24 @@ UIKit_PumpEvents(_THIS)
     if (!UIKit_EventPumpEnabled)
         return;
 
-    /*
-        When the user presses the 'home' button on the iPod
-        the application exits -- immediatly.
+    /* Let the run loop run for a short amount of time: long enough for
+       touch events to get processed (which is important to get certain
+       elements of Game Center's GKLeaderboardViewController to respond
+       to touch input), but not long enough to introduce a significant
+       delay in the rest of the app.
+    */
+    const CFTimeInterval seconds = 0.000002;
 
-        Unlike in Mac OS X, it appears there is no way to cancel the termination.
+    /* Pump most event types. */
+    SInt32 result;
+    do {
+        result = CFRunLoopRunInMode(kCFRunLoopDefaultMode, seconds, TRUE);
+    } while (result == kCFRunLoopRunHandledSource);
 
-        This doesn't give the SDL user's application time to respond to an SDL_Quit event.
-        So what we do is that in the UIApplicationDelegate class (SDLUIApplicationDelegate),
-        when the delegate receives the ApplicationWillTerminate message, we execute
-        a longjmp statement to get back here, preventing an immediate exit.
-     */
-    if (setjmp(*jump_env()) == 0) {
-        /* if we're setting the jump, rather than jumping back */
-
-        /* Let the run loop run for a short amount of time: long enough for
-           touch events to get processed (which is important to get certain
-           elements of Game Center's GKLeaderboardViewController to respond
-           to touch input), but not long enough to introduce a significant
-           delay in the rest of the app.
-        */
-        const CFTimeInterval seconds = 0.000002;
-
-        /* Pump most event types. */
-        SInt32 result;
-        do {
-            result = CFRunLoopRunInMode(kCFRunLoopDefaultMode, seconds, TRUE);
-        } while (result == kCFRunLoopRunHandledSource);
-
-        /* Make sure UIScrollView objects scroll properly. */
-        do {
-            result = CFRunLoopRunInMode((CFStringRef)UITrackingRunLoopMode, seconds, TRUE);
-        } while(result == kCFRunLoopRunHandledSource);
-    }
+    /* Make sure UIScrollView objects scroll properly. */
+    do {
+        result = CFRunLoopRunInMode((CFStringRef)UITrackingRunLoopMode, seconds, TRUE);
+    } while(result == kCFRunLoopRunHandledSource);
 }
 
 #endif /* SDL_VIDEO_DRIVER_UIKIT */
diff --git a/src/video/uikit/jumphack.c b/src/video/uikit/jumphack.c
deleted file mode 100644
index 982ddda3e..000000000
--- a/src/video/uikit/jumphack.c
+++ /dev/null
@@ -1,19 +0,0 @@
-/*
- *  jumphack.c
- *  SDLiPhoneOS
- *
- */
-
-#include "jumphack.h"
-
-/* see SDL_uikitevents.m for more info */
-
-/* stores the information we need to jump back */
-jmp_buf env;
-
-/* returns the jump environment for setting / getting purposes */
-jmp_buf *
-jump_env(void)
-{
-    return &env;
-}
diff --git a/src/video/uikit/jumphack.h b/src/video/uikit/jumphack.h
deleted file mode 100644
index 169498303..000000000
--- a/src/video/uikit/jumphack.h
+++ /dev/null
@@ -1,18 +0,0 @@
-/*
- *  jumphack.h
- *  SDLiPhoneOS
- *
- */
-
-#ifndef _jumphack_h
-#define _jumphack_h
-
-#include "setjmp.h"
-
-/* see SDL_uikitevents.m for more info */
-
-extern jmp_buf *jump_env(void);
-
-#endif
-
-/* vi: set ts=4 sw=4 expandtab: */

From a14efd4af1425097ca5e8e7b5e1fe3d21f85e9e9 Mon Sep 17 00:00:00 2001
From: Sam Lantinga 
Date: Wed, 5 Jun 2013 21:48:53 -0700
Subject: [PATCH 202/542] Fixed compile errors on iOS

---
 src/video/uikit/SDL_uikitevents.m   | 1 -
 src/video/uikit/SDL_uikitopengles.m | 1 -
 2 files changed, 2 deletions(-)

diff --git a/src/video/uikit/SDL_uikitevents.m b/src/video/uikit/SDL_uikitevents.m
index 43dc74767..16c120d79 100644
--- a/src/video/uikit/SDL_uikitevents.m
+++ b/src/video/uikit/SDL_uikitevents.m
@@ -28,7 +28,6 @@
 #include "SDL_uikitevents.h"
 
 #import 
-#include "jumphack.h"
 
 static BOOL UIKit_EventPumpEnabled = YES;
 
diff --git a/src/video/uikit/SDL_uikitopengles.m b/src/video/uikit/SDL_uikitopengles.m
index a7d370f2b..b27b3ca93 100644
--- a/src/video/uikit/SDL_uikitopengles.m
+++ b/src/video/uikit/SDL_uikitopengles.m
@@ -27,7 +27,6 @@
 #include "SDL_uikitappdelegate.h"
 #include "SDL_uikitmodes.h"
 #include "SDL_uikitwindow.h"
-#include "jumphack.h"
 #include "../SDL_sysvideo.h"
 #include "../../events/SDL_keyboard_c.h"
 #include "../../events/SDL_mouse_c.h"

From b42b0c3e914d6e762f4627b21a2255c337f9ef92 Mon Sep 17 00:00:00 2001
From: Sam Lantinga 
Date: Wed, 5 Jun 2013 22:33:10 -0700
Subject: [PATCH 203/542] Added testautomation to the Visual Studio 2008
 project.

---
 VisualC/SDL_VS2008.sln                        |  17 ++
 .../testautomation_VS2008.vcproj              | 277 ++++++++++++++++++
 2 files changed, 294 insertions(+)
 create mode 100755 VisualC/tests/testautomation/testautomation_VS2008.vcproj

diff --git a/VisualC/SDL_VS2008.sln b/VisualC/SDL_VS2008.sln
index 91735bdab..b82c27f1d 100644
--- a/VisualC/SDL_VS2008.sln
+++ b/VisualC/SDL_VS2008.sln
@@ -91,6 +91,13 @@ Project("{8BC9CEB8-8B4A-11D0-8D11-00A0C91BC942}") = "testrendertarget", "tests\t
 EndProject
 Project("{8BC9CEB8-8B4A-11D0-8D11-00A0C91BC942}") = "SDL2test", "SDLtest\SDLtest_VS2008.vcproj", "{DA956FD3-E143-46F2-9FE5-C77BEBC56B1A}"
 EndProject
+Project("{8BC9CEB8-8B4A-11D0-8D11-00A0C91BC942}") = "testautomation", "tests\testautomation\testautomation_VS2008.vcproj", "{9C7E8C03-3130-436D-A97E-E8F8ED1AC4EA}"
+	ProjectSection(ProjectDependencies) = postProject
+		{81CE8DAF-EBB2-4761-8E45-B71ABCCA8C68} = {81CE8DAF-EBB2-4761-8E45-B71ABCCA8C68}
+		{DA956FD3-E142-46F2-9DD5-C78BEBB56B7A} = {DA956FD3-E142-46F2-9DD5-C78BEBB56B7A}
+		{DA956FD3-E143-46F2-9FE5-C77BEBC56B1A} = {DA956FD3-E143-46F2-9FE5-C77BEBC56B1A}
+	EndProjectSection
+EndProject
 Global
 	GlobalSection(SolutionConfigurationPlatforms) = preSolution
 		Debug|Win32 = Debug|Win32
@@ -253,6 +260,15 @@ Global
 		{DA956FD3-E143-46F2-9FE5-C77BEBC56B1A}.Release|Win32.Build.0 = Release|Win32
 		{DA956FD3-E143-46F2-9FE5-C77BEBC56B1A}.Release|x64.ActiveCfg = Release|x64
 		{DA956FD3-E143-46F2-9FE5-C77BEBC56B1A}.Release|x64.Build.0 = Release|x64
+		{9C7E8C03-3130-436D-A97E-E8F8ED1AC4EA}.Debug|Win32.ActiveCfg = Debug|Win32
+		{9C7E8C03-3130-436D-A97E-E8F8ED1AC4EA}.Debug|Win32.Build.0 = Debug|Win32
+		{9C7E8C03-3130-436D-A97E-E8F8ED1AC4EA}.Debug|x64.ActiveCfg = Debug|Win32
+		{9C7E8C03-3130-436D-A97E-E8F8ED1AC4EA}.Release_NoSTDIO|Win32.ActiveCfg = Release|Win32
+		{9C7E8C03-3130-436D-A97E-E8F8ED1AC4EA}.Release_NoSTDIO|Win32.Build.0 = Release|Win32
+		{9C7E8C03-3130-436D-A97E-E8F8ED1AC4EA}.Release_NoSTDIO|x64.ActiveCfg = Release|Win32
+		{9C7E8C03-3130-436D-A97E-E8F8ED1AC4EA}.Release|Win32.ActiveCfg = Release|Win32
+		{9C7E8C03-3130-436D-A97E-E8F8ED1AC4EA}.Release|Win32.Build.0 = Release|Win32
+		{9C7E8C03-3130-436D-A97E-E8F8ED1AC4EA}.Release|x64.ActiveCfg = Release|Win32
 	EndGlobalSection
 	GlobalSection(SolutionProperties) = preSolution
 		HideSolutionNode = FALSE
@@ -271,5 +287,6 @@ Global
 		{66B32F7E-5716-48D0-B5B9-D832FD052DD5} = {CE748C1F-3C21-4825-AA6A-F895A023F7E7}
 		{5D0930C0-7C91-4ECE-9014-7B7DDE9502E6} = {CE748C1F-3C21-4825-AA6A-F895A023F7E7}
 		{2D17C1EB-1157-460E-9A99-A82BFC1F9D1E} = {CE748C1F-3C21-4825-AA6A-F895A023F7E7}
+		{9C7E8C03-3130-436D-A97E-E8F8ED1AC4EA} = {CE748C1F-3C21-4825-AA6A-F895A023F7E7}
 	EndGlobalSection
 EndGlobal
diff --git a/VisualC/tests/testautomation/testautomation_VS2008.vcproj b/VisualC/tests/testautomation/testautomation_VS2008.vcproj
new file mode 100755
index 000000000..5b5ffa66f
--- /dev/null
+++ b/VisualC/tests/testautomation/testautomation_VS2008.vcproj
@@ -0,0 +1,277 @@
+
+
+	
+		
+	
+	
+	
+	
+		
+			
+			
+			
+			
+			
+			
+			
+			
+			
+			
+			
+			
+			
+			
+			
+			
+			
+		
+		
+			
+			
+			
+			
+			
+			
+			
+			
+			
+			
+			
+			
+			
+			
+			
+			
+			
+		
+	
+	
+	
+	
+		
+		
+		
+		
+		
+		
+		
+		
+		
+		
+		
+		
+		
+		
+		
+		
+		
+		
+		
+		
+		
+		
+		
+		
+		
+		
+		
+		
+		
+		
+		
+		
+		
+		
+		
+		
+		
+		
+	
+	
+	
+

From 199bed480139c82d6c8cabd3d1c9a76ac08c8237 Mon Sep 17 00:00:00 2001
From: Sam Lantinga 
Date: Wed, 5 Jun 2013 22:35:13 -0700
Subject: [PATCH 204/542] Removed obsolete NoStdio configurations.

---
 VisualC/SDL_VS2008.sln | 55 ------------------------------------------
 1 file changed, 55 deletions(-)

diff --git a/VisualC/SDL_VS2008.sln b/VisualC/SDL_VS2008.sln
index b82c27f1d..3c6a38058 100644
--- a/VisualC/SDL_VS2008.sln
+++ b/VisualC/SDL_VS2008.sln
@@ -102,8 +102,6 @@ Global
 	GlobalSection(SolutionConfigurationPlatforms) = preSolution
 		Debug|Win32 = Debug|Win32
 		Debug|x64 = Debug|x64
-		Release_NoSTDIO|Win32 = Release_NoSTDIO|Win32
-		Release_NoSTDIO|x64 = Release_NoSTDIO|x64
 		Release|Win32 = Release|Win32
 		Release|x64 = Release|x64
 	EndGlobalSection
@@ -112,9 +110,6 @@ Global
 		{81CE8DAF-EBB2-4761-8E45-B71ABCCA8C68}.Debug|Win32.Build.0 = Debug|Win32
 		{81CE8DAF-EBB2-4761-8E45-B71ABCCA8C68}.Debug|x64.ActiveCfg = Debug|x64
 		{81CE8DAF-EBB2-4761-8E45-B71ABCCA8C68}.Debug|x64.Build.0 = Debug|x64
-		{81CE8DAF-EBB2-4761-8E45-B71ABCCA8C68}.Release_NoSTDIO|Win32.ActiveCfg = Release|x64
-		{81CE8DAF-EBB2-4761-8E45-B71ABCCA8C68}.Release_NoSTDIO|x64.ActiveCfg = Release|x64
-		{81CE8DAF-EBB2-4761-8E45-B71ABCCA8C68}.Release_NoSTDIO|x64.Build.0 = Release|x64
 		{81CE8DAF-EBB2-4761-8E45-B71ABCCA8C68}.Release|Win32.ActiveCfg = Release|Win32
 		{81CE8DAF-EBB2-4761-8E45-B71ABCCA8C68}.Release|Win32.Build.0 = Release|Win32
 		{81CE8DAF-EBB2-4761-8E45-B71ABCCA8C68}.Release|x64.ActiveCfg = Release|x64
@@ -123,10 +118,6 @@ Global
 		{DA956FD3-E142-46F2-9DD5-C78BEBB56B7A}.Debug|Win32.Build.0 = Debug|Win32
 		{DA956FD3-E142-46F2-9DD5-C78BEBB56B7A}.Debug|x64.ActiveCfg = Debug|x64
 		{DA956FD3-E142-46F2-9DD5-C78BEBB56B7A}.Debug|x64.Build.0 = Debug|x64
-		{DA956FD3-E142-46F2-9DD5-C78BEBB56B7A}.Release_NoSTDIO|Win32.ActiveCfg = Release_NoSTDIO|Win32
-		{DA956FD3-E142-46F2-9DD5-C78BEBB56B7A}.Release_NoSTDIO|Win32.Build.0 = Release_NoSTDIO|Win32
-		{DA956FD3-E142-46F2-9DD5-C78BEBB56B7A}.Release_NoSTDIO|x64.ActiveCfg = Release_NoSTDIO|x64
-		{DA956FD3-E142-46F2-9DD5-C78BEBB56B7A}.Release_NoSTDIO|x64.Build.0 = Release_NoSTDIO|x64
 		{DA956FD3-E142-46F2-9DD5-C78BEBB56B7A}.Release|Win32.ActiveCfg = Release|Win32
 		{DA956FD3-E142-46F2-9DD5-C78BEBB56B7A}.Release|Win32.Build.0 = Release|Win32
 		{DA956FD3-E142-46F2-9DD5-C78BEBB56B7A}.Release|x64.ActiveCfg = Release|x64
@@ -134,117 +125,78 @@ Global
 		{26828762-C95D-4637-9CB1-7F0979523813}.Debug|Win32.ActiveCfg = Debug|Win32
 		{26828762-C95D-4637-9CB1-7F0979523813}.Debug|Win32.Build.0 = Debug|Win32
 		{26828762-C95D-4637-9CB1-7F0979523813}.Debug|x64.ActiveCfg = Debug|Win32
-		{26828762-C95D-4637-9CB1-7F0979523813}.Release_NoSTDIO|Win32.ActiveCfg = Release|Win32
-		{26828762-C95D-4637-9CB1-7F0979523813}.Release_NoSTDIO|Win32.Build.0 = Release|Win32
-		{26828762-C95D-4637-9CB1-7F0979523813}.Release_NoSTDIO|x64.ActiveCfg = Release|Win32
 		{26828762-C95D-4637-9CB1-7F0979523813}.Release|Win32.ActiveCfg = Release|Win32
 		{26828762-C95D-4637-9CB1-7F0979523813}.Release|Win32.Build.0 = Release|Win32
 		{26828762-C95D-4637-9CB1-7F0979523813}.Release|x64.ActiveCfg = Release|Win32
 		{AAAD1CB5-7ADA-47AE-85A0-08A6EC48FAFB}.Debug|Win32.ActiveCfg = Debug|Win32
 		{AAAD1CB5-7ADA-47AE-85A0-08A6EC48FAFB}.Debug|Win32.Build.0 = Debug|Win32
 		{AAAD1CB5-7ADA-47AE-85A0-08A6EC48FAFB}.Debug|x64.ActiveCfg = Debug|Win32
-		{AAAD1CB5-7ADA-47AE-85A0-08A6EC48FAFB}.Release_NoSTDIO|Win32.ActiveCfg = Release|Win32
-		{AAAD1CB5-7ADA-47AE-85A0-08A6EC48FAFB}.Release_NoSTDIO|Win32.Build.0 = Release|Win32
-		{AAAD1CB5-7ADA-47AE-85A0-08A6EC48FAFB}.Release_NoSTDIO|x64.ActiveCfg = Release|Win32
 		{AAAD1CB5-7ADA-47AE-85A0-08A6EC48FAFB}.Release|Win32.ActiveCfg = Release|Win32
 		{AAAD1CB5-7ADA-47AE-85A0-08A6EC48FAFB}.Release|Win32.Build.0 = Release|Win32
 		{AAAD1CB5-7ADA-47AE-85A0-08A6EC48FAFB}.Release|x64.ActiveCfg = Release|Win32
 		{8682FE1E-0CF6-4EDD-9BB5-1733D8C8B4DF}.Debug|Win32.ActiveCfg = Debug|Win32
 		{8682FE1E-0CF6-4EDD-9BB5-1733D8C8B4DF}.Debug|Win32.Build.0 = Debug|Win32
 		{8682FE1E-0CF6-4EDD-9BB5-1733D8C8B4DF}.Debug|x64.ActiveCfg = Debug|Win32
-		{8682FE1E-0CF6-4EDD-9BB5-1733D8C8B4DF}.Release_NoSTDIO|Win32.ActiveCfg = Release|Win32
-		{8682FE1E-0CF6-4EDD-9BB5-1733D8C8B4DF}.Release_NoSTDIO|Win32.Build.0 = Release|Win32
-		{8682FE1E-0CF6-4EDD-9BB5-1733D8C8B4DF}.Release_NoSTDIO|x64.ActiveCfg = Release|Win32
 		{8682FE1E-0CF6-4EDD-9BB5-1733D8C8B4DF}.Release|Win32.ActiveCfg = Release|Win32
 		{8682FE1E-0CF6-4EDD-9BB5-1733D8C8B4DF}.Release|Win32.Build.0 = Release|Win32
 		{8682FE1E-0CF6-4EDD-9BB5-1733D8C8B4DF}.Release|x64.ActiveCfg = Release|Win32
 		{CAE4F1D0-314F-4B10-805B-0EFD670133A0}.Debug|Win32.ActiveCfg = Debug|Win32
 		{CAE4F1D0-314F-4B10-805B-0EFD670133A0}.Debug|Win32.Build.0 = Debug|Win32
 		{CAE4F1D0-314F-4B10-805B-0EFD670133A0}.Debug|x64.ActiveCfg = Debug|Win32
-		{CAE4F1D0-314F-4B10-805B-0EFD670133A0}.Release_NoSTDIO|Win32.ActiveCfg = Release|Win32
-		{CAE4F1D0-314F-4B10-805B-0EFD670133A0}.Release_NoSTDIO|Win32.Build.0 = Release|Win32
-		{CAE4F1D0-314F-4B10-805B-0EFD670133A0}.Release_NoSTDIO|x64.ActiveCfg = Release|Win32
 		{CAE4F1D0-314F-4B10-805B-0EFD670133A0}.Release|Win32.ActiveCfg = Release|Win32
 		{CAE4F1D0-314F-4B10-805B-0EFD670133A0}.Release|Win32.Build.0 = Release|Win32
 		{CAE4F1D0-314F-4B10-805B-0EFD670133A0}.Release|x64.ActiveCfg = Release|Win32
 		{8B5CFB38-CCBA-40A8-AD7A-89C57B070884}.Debug|Win32.ActiveCfg = Debug|Win32
 		{8B5CFB38-CCBA-40A8-AD7A-89C57B070884}.Debug|Win32.Build.0 = Debug|Win32
 		{8B5CFB38-CCBA-40A8-AD7A-89C57B070884}.Debug|x64.ActiveCfg = Debug|Win32
-		{8B5CFB38-CCBA-40A8-AD7A-89C57B070884}.Release_NoSTDIO|Win32.ActiveCfg = Release|Win32
-		{8B5CFB38-CCBA-40A8-AD7A-89C57B070884}.Release_NoSTDIO|Win32.Build.0 = Release|Win32
-		{8B5CFB38-CCBA-40A8-AD7A-89C57B070884}.Release_NoSTDIO|x64.ActiveCfg = Release|Win32
 		{8B5CFB38-CCBA-40A8-AD7A-89C57B070884}.Release|Win32.ActiveCfg = Release|Win32
 		{8B5CFB38-CCBA-40A8-AD7A-89C57B070884}.Release|Win32.Build.0 = Release|Win32
 		{8B5CFB38-CCBA-40A8-AD7A-89C57B070884}.Release|x64.ActiveCfg = Release|Win32
 		{26932B24-EFC6-4E3A-B277-ED653DA37968}.Debug|Win32.ActiveCfg = Debug|Win32
 		{26932B24-EFC6-4E3A-B277-ED653DA37968}.Debug|Win32.Build.0 = Debug|Win32
 		{26932B24-EFC6-4E3A-B277-ED653DA37968}.Debug|x64.ActiveCfg = Debug|Win32
-		{26932B24-EFC6-4E3A-B277-ED653DA37968}.Release_NoSTDIO|Win32.ActiveCfg = Release|Win32
-		{26932B24-EFC6-4E3A-B277-ED653DA37968}.Release_NoSTDIO|Win32.Build.0 = Release|Win32
-		{26932B24-EFC6-4E3A-B277-ED653DA37968}.Release_NoSTDIO|x64.ActiveCfg = Release|Win32
 		{26932B24-EFC6-4E3A-B277-ED653DA37968}.Release|Win32.ActiveCfg = Release|Win32
 		{26932B24-EFC6-4E3A-B277-ED653DA37968}.Release|Win32.Build.0 = Release|Win32
 		{26932B24-EFC6-4E3A-B277-ED653DA37968}.Release|x64.ActiveCfg = Release|Win32
 		{C4E04D18-EF76-4B42-B4C2-16A1BACDC0A3}.Debug|Win32.ActiveCfg = Debug|Win32
 		{C4E04D18-EF76-4B42-B4C2-16A1BACDC0A3}.Debug|Win32.Build.0 = Debug|Win32
 		{C4E04D18-EF76-4B42-B4C2-16A1BACDC0A3}.Debug|x64.ActiveCfg = Debug|Win32
-		{C4E04D18-EF76-4B42-B4C2-16A1BACDC0A3}.Release_NoSTDIO|Win32.ActiveCfg = Release|Win32
-		{C4E04D18-EF76-4B42-B4C2-16A1BACDC0A3}.Release_NoSTDIO|Win32.Build.0 = Release|Win32
-		{C4E04D18-EF76-4B42-B4C2-16A1BACDC0A3}.Release_NoSTDIO|x64.ActiveCfg = Release|Win32
 		{C4E04D18-EF76-4B42-B4C2-16A1BACDC0A3}.Release|Win32.ActiveCfg = Release|Win32
 		{C4E04D18-EF76-4B42-B4C2-16A1BACDC0A3}.Release|Win32.Build.0 = Release|Win32
 		{C4E04D18-EF76-4B42-B4C2-16A1BACDC0A3}.Release|x64.ActiveCfg = Release|Win32
 		{40FB7794-D3C3-4CFE-BCF4-A80C96635682}.Debug|Win32.ActiveCfg = Debug|Win32
 		{40FB7794-D3C3-4CFE-BCF4-A80C96635682}.Debug|Win32.Build.0 = Debug|Win32
 		{40FB7794-D3C3-4CFE-BCF4-A80C96635682}.Debug|x64.ActiveCfg = Debug|Win32
-		{40FB7794-D3C3-4CFE-BCF4-A80C96635682}.Release_NoSTDIO|Win32.ActiveCfg = Release|Win32
-		{40FB7794-D3C3-4CFE-BCF4-A80C96635682}.Release_NoSTDIO|Win32.Build.0 = Release|Win32
-		{40FB7794-D3C3-4CFE-BCF4-A80C96635682}.Release_NoSTDIO|x64.ActiveCfg = Release|Win32
 		{40FB7794-D3C3-4CFE-BCF4-A80C96635682}.Release|Win32.ActiveCfg = Release|Win32
 		{40FB7794-D3C3-4CFE-BCF4-A80C96635682}.Release|Win32.Build.0 = Release|Win32
 		{40FB7794-D3C3-4CFE-BCF4-A80C96635682}.Release|x64.ActiveCfg = Release|Win32
 		{31A3E4E1-AAE9-4EF3-9B23-18D0924BE4D2}.Debug|Win32.ActiveCfg = Debug|Win32
 		{31A3E4E1-AAE9-4EF3-9B23-18D0924BE4D2}.Debug|Win32.Build.0 = Debug|Win32
 		{31A3E4E1-AAE9-4EF3-9B23-18D0924BE4D2}.Debug|x64.ActiveCfg = Debug|Win32
-		{31A3E4E1-AAE9-4EF3-9B23-18D0924BE4D2}.Release_NoSTDIO|Win32.ActiveCfg = Release|Win32
-		{31A3E4E1-AAE9-4EF3-9B23-18D0924BE4D2}.Release_NoSTDIO|Win32.Build.0 = Release|Win32
-		{31A3E4E1-AAE9-4EF3-9B23-18D0924BE4D2}.Release_NoSTDIO|x64.ActiveCfg = Release|Win32
 		{31A3E4E1-AAE9-4EF3-9B23-18D0924BE4D2}.Release|Win32.ActiveCfg = Release|Win32
 		{31A3E4E1-AAE9-4EF3-9B23-18D0924BE4D2}.Release|Win32.Build.0 = Release|Win32
 		{31A3E4E1-AAE9-4EF3-9B23-18D0924BE4D2}.Release|x64.ActiveCfg = Release|Win32
 		{79CEE57E-1BC3-4FF6-90B3-9E39763CDAFF}.Debug|Win32.ActiveCfg = Debug|Win32
 		{79CEE57E-1BC3-4FF6-90B3-9E39763CDAFF}.Debug|Win32.Build.0 = Debug|Win32
 		{79CEE57E-1BC3-4FF6-90B3-9E39763CDAFF}.Debug|x64.ActiveCfg = Debug|Win32
-		{79CEE57E-1BC3-4FF6-90B3-9E39763CDAFF}.Release_NoSTDIO|Win32.ActiveCfg = Release|Win32
-		{79CEE57E-1BC3-4FF6-90B3-9E39763CDAFF}.Release_NoSTDIO|Win32.Build.0 = Release|Win32
-		{79CEE57E-1BC3-4FF6-90B3-9E39763CDAFF}.Release_NoSTDIO|x64.ActiveCfg = Release|Win32
 		{79CEE57E-1BC3-4FF6-90B3-9E39763CDAFF}.Release|Win32.ActiveCfg = Release|Win32
 		{79CEE57E-1BC3-4FF6-90B3-9E39763CDAFF}.Release|Win32.Build.0 = Release|Win32
 		{79CEE57E-1BC3-4FF6-90B3-9E39763CDAFF}.Release|x64.ActiveCfg = Release|Win32
 		{66B32F7E-5716-48D0-B5B9-D832FD052DD5}.Debug|Win32.ActiveCfg = Debug|Win32
 		{66B32F7E-5716-48D0-B5B9-D832FD052DD5}.Debug|Win32.Build.0 = Debug|Win32
 		{66B32F7E-5716-48D0-B5B9-D832FD052DD5}.Debug|x64.ActiveCfg = Debug|Win32
-		{66B32F7E-5716-48D0-B5B9-D832FD052DD5}.Release_NoSTDIO|Win32.ActiveCfg = Release|Win32
-		{66B32F7E-5716-48D0-B5B9-D832FD052DD5}.Release_NoSTDIO|Win32.Build.0 = Release|Win32
-		{66B32F7E-5716-48D0-B5B9-D832FD052DD5}.Release_NoSTDIO|x64.ActiveCfg = Release|Win32
 		{66B32F7E-5716-48D0-B5B9-D832FD052DD5}.Release|Win32.ActiveCfg = Release|Win32
 		{66B32F7E-5716-48D0-B5B9-D832FD052DD5}.Release|Win32.Build.0 = Release|Win32
 		{66B32F7E-5716-48D0-B5B9-D832FD052DD5}.Release|x64.ActiveCfg = Release|Win32
 		{5D0930C0-7C91-4ECE-9014-7B7DDE9502E6}.Debug|Win32.ActiveCfg = Debug|Win32
 		{5D0930C0-7C91-4ECE-9014-7B7DDE9502E6}.Debug|Win32.Build.0 = Debug|Win32
 		{5D0930C0-7C91-4ECE-9014-7B7DDE9502E6}.Debug|x64.ActiveCfg = Debug|Win32
-		{5D0930C0-7C91-4ECE-9014-7B7DDE9502E6}.Release_NoSTDIO|Win32.ActiveCfg = Release|Win32
-		{5D0930C0-7C91-4ECE-9014-7B7DDE9502E6}.Release_NoSTDIO|Win32.Build.0 = Release|Win32
-		{5D0930C0-7C91-4ECE-9014-7B7DDE9502E6}.Release_NoSTDIO|x64.ActiveCfg = Release|Win32
 		{5D0930C0-7C91-4ECE-9014-7B7DDE9502E6}.Release|Win32.ActiveCfg = Release|Win32
 		{5D0930C0-7C91-4ECE-9014-7B7DDE9502E6}.Release|Win32.Build.0 = Release|Win32
 		{5D0930C0-7C91-4ECE-9014-7B7DDE9502E6}.Release|x64.ActiveCfg = Release|Win32
 		{2D17C1EB-1157-460E-9A99-A82BFC1F9D1E}.Debug|Win32.ActiveCfg = Debug|Win32
 		{2D17C1EB-1157-460E-9A99-A82BFC1F9D1E}.Debug|Win32.Build.0 = Debug|Win32
 		{2D17C1EB-1157-460E-9A99-A82BFC1F9D1E}.Debug|x64.ActiveCfg = Debug|Win32
-		{2D17C1EB-1157-460E-9A99-A82BFC1F9D1E}.Release_NoSTDIO|Win32.ActiveCfg = Release|Win32
-		{2D17C1EB-1157-460E-9A99-A82BFC1F9D1E}.Release_NoSTDIO|Win32.Build.0 = Release|Win32
-		{2D17C1EB-1157-460E-9A99-A82BFC1F9D1E}.Release_NoSTDIO|x64.ActiveCfg = Release|Win32
 		{2D17C1EB-1157-460E-9A99-A82BFC1F9D1E}.Release|Win32.ActiveCfg = Release|Win32
 		{2D17C1EB-1157-460E-9A99-A82BFC1F9D1E}.Release|Win32.Build.0 = Release|Win32
 		{2D17C1EB-1157-460E-9A99-A82BFC1F9D1E}.Release|x64.ActiveCfg = Release|Win32
@@ -252,10 +204,6 @@ Global
 		{DA956FD3-E143-46F2-9FE5-C77BEBC56B1A}.Debug|Win32.Build.0 = Debug|Win32
 		{DA956FD3-E143-46F2-9FE5-C77BEBC56B1A}.Debug|x64.ActiveCfg = Debug|x64
 		{DA956FD3-E143-46F2-9FE5-C77BEBC56B1A}.Debug|x64.Build.0 = Debug|x64
-		{DA956FD3-E143-46F2-9FE5-C77BEBC56B1A}.Release_NoSTDIO|Win32.ActiveCfg = Release_NoSTDIO|Win32
-		{DA956FD3-E143-46F2-9FE5-C77BEBC56B1A}.Release_NoSTDIO|Win32.Build.0 = Release_NoSTDIO|Win32
-		{DA956FD3-E143-46F2-9FE5-C77BEBC56B1A}.Release_NoSTDIO|x64.ActiveCfg = Release_NoSTDIO|x64
-		{DA956FD3-E143-46F2-9FE5-C77BEBC56B1A}.Release_NoSTDIO|x64.Build.0 = Release_NoSTDIO|x64
 		{DA956FD3-E143-46F2-9FE5-C77BEBC56B1A}.Release|Win32.ActiveCfg = Release|Win32
 		{DA956FD3-E143-46F2-9FE5-C77BEBC56B1A}.Release|Win32.Build.0 = Release|Win32
 		{DA956FD3-E143-46F2-9FE5-C77BEBC56B1A}.Release|x64.ActiveCfg = Release|x64
@@ -263,9 +211,6 @@ Global
 		{9C7E8C03-3130-436D-A97E-E8F8ED1AC4EA}.Debug|Win32.ActiveCfg = Debug|Win32
 		{9C7E8C03-3130-436D-A97E-E8F8ED1AC4EA}.Debug|Win32.Build.0 = Debug|Win32
 		{9C7E8C03-3130-436D-A97E-E8F8ED1AC4EA}.Debug|x64.ActiveCfg = Debug|Win32
-		{9C7E8C03-3130-436D-A97E-E8F8ED1AC4EA}.Release_NoSTDIO|Win32.ActiveCfg = Release|Win32
-		{9C7E8C03-3130-436D-A97E-E8F8ED1AC4EA}.Release_NoSTDIO|Win32.Build.0 = Release|Win32
-		{9C7E8C03-3130-436D-A97E-E8F8ED1AC4EA}.Release_NoSTDIO|x64.ActiveCfg = Release|Win32
 		{9C7E8C03-3130-436D-A97E-E8F8ED1AC4EA}.Release|Win32.ActiveCfg = Release|Win32
 		{9C7E8C03-3130-436D-A97E-E8F8ED1AC4EA}.Release|Win32.Build.0 = Release|Win32
 		{9C7E8C03-3130-436D-A97E-E8F8ED1AC4EA}.Release|x64.ActiveCfg = Release|Win32

From 8e07b6b727cdc87e3d32a5b854f26a9315fabf5c Mon Sep 17 00:00:00 2001
From: Sam Lantinga 
Date: Wed, 5 Jun 2013 22:56:42 -0700
Subject: [PATCH 205/542] Fixed building tests on iOS

---
 .../SDL2test.xcodeproj/project.pbxproj        | 272 ++++++++++++++++++
 .../TestiPhoneOS.xcodeproj/project.pbxproj    |  58 ++--
 test/testtimer.c                              |   1 +
 3 files changed, 315 insertions(+), 16 deletions(-)
 create mode 100644 Xcode-iOS/SDLtest/SDL2test.xcodeproj/project.pbxproj

diff --git a/Xcode-iOS/SDLtest/SDL2test.xcodeproj/project.pbxproj b/Xcode-iOS/SDLtest/SDL2test.xcodeproj/project.pbxproj
new file mode 100644
index 000000000..0995735e9
--- /dev/null
+++ b/Xcode-iOS/SDLtest/SDL2test.xcodeproj/project.pbxproj
@@ -0,0 +1,272 @@
+// !$*UTF8*$!
+{
+	archiveVersion = 1;
+	classes = {
+	};
+	objectVersion = 46;
+	objects = {
+
+/* Begin PBXBuildFile section */
+		AA1EE462176059AB0029C7A5 /* SDL_test_common.c in Sources */ = {isa = PBXBuildFile; fileRef = AA1EE454176059AB0029C7A5 /* SDL_test_common.c */; };
+		AA1EE463176059AB0029C7A5 /* SDL_test_compare.c in Sources */ = {isa = PBXBuildFile; fileRef = AA1EE455176059AB0029C7A5 /* SDL_test_compare.c */; };
+		AA1EE464176059AB0029C7A5 /* SDL_test_crc32.c in Sources */ = {isa = PBXBuildFile; fileRef = AA1EE456176059AB0029C7A5 /* SDL_test_crc32.c */; };
+		AA1EE465176059AB0029C7A5 /* SDL_test_font.c in Sources */ = {isa = PBXBuildFile; fileRef = AA1EE457176059AB0029C7A5 /* SDL_test_font.c */; };
+		AA1EE466176059AB0029C7A5 /* SDL_test_fuzzer.c in Sources */ = {isa = PBXBuildFile; fileRef = AA1EE458176059AB0029C7A5 /* SDL_test_fuzzer.c */; };
+		AA1EE467176059AB0029C7A5 /* SDL_test_harness.c in Sources */ = {isa = PBXBuildFile; fileRef = AA1EE459176059AB0029C7A5 /* SDL_test_harness.c */; };
+		AA1EE468176059AB0029C7A5 /* SDL_test_imageBlit.c in Sources */ = {isa = PBXBuildFile; fileRef = AA1EE45A176059AB0029C7A5 /* SDL_test_imageBlit.c */; };
+		AA1EE469176059AB0029C7A5 /* SDL_test_imageBlitBlend.c in Sources */ = {isa = PBXBuildFile; fileRef = AA1EE45B176059AB0029C7A5 /* SDL_test_imageBlitBlend.c */; };
+		AA1EE46A176059AB0029C7A5 /* SDL_test_imageFace.c in Sources */ = {isa = PBXBuildFile; fileRef = AA1EE45C176059AB0029C7A5 /* SDL_test_imageFace.c */; };
+		AA1EE46B176059AB0029C7A5 /* SDL_test_imagePrimitives.c in Sources */ = {isa = PBXBuildFile; fileRef = AA1EE45D176059AB0029C7A5 /* SDL_test_imagePrimitives.c */; };
+		AA1EE46C176059AB0029C7A5 /* SDL_test_imagePrimitivesBlend.c in Sources */ = {isa = PBXBuildFile; fileRef = AA1EE45E176059AB0029C7A5 /* SDL_test_imagePrimitivesBlend.c */; };
+		AA1EE46D176059AB0029C7A5 /* SDL_test_log.c in Sources */ = {isa = PBXBuildFile; fileRef = AA1EE45F176059AB0029C7A5 /* SDL_test_log.c */; };
+		AA1EE46E176059AB0029C7A5 /* SDL_test_md5.c in Sources */ = {isa = PBXBuildFile; fileRef = AA1EE460176059AB0029C7A5 /* SDL_test_md5.c */; };
+		AA1EE46F176059AB0029C7A5 /* SDL_test_random.c in Sources */ = {isa = PBXBuildFile; fileRef = AA1EE461176059AB0029C7A5 /* SDL_test_random.c */; };
+/* End PBXBuildFile section */
+
+/* Begin PBXFileReference section */
+		AA1EE4461760589B0029C7A5 /* libSDL2test.a */ = {isa = PBXFileReference; explicitFileType = archive.ar; includeInIndex = 0; path = libSDL2test.a; sourceTree = BUILT_PRODUCTS_DIR; };
+		AA1EE454176059AB0029C7A5 /* SDL_test_common.c */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.c; name = SDL_test_common.c; path = ../../src/test/SDL_test_common.c; sourceTree = ""; };
+		AA1EE455176059AB0029C7A5 /* SDL_test_compare.c */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.c; name = SDL_test_compare.c; path = ../../src/test/SDL_test_compare.c; sourceTree = ""; };
+		AA1EE456176059AB0029C7A5 /* SDL_test_crc32.c */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.c; name = SDL_test_crc32.c; path = ../../src/test/SDL_test_crc32.c; sourceTree = ""; };
+		AA1EE457176059AB0029C7A5 /* SDL_test_font.c */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.c; name = SDL_test_font.c; path = ../../src/test/SDL_test_font.c; sourceTree = ""; };
+		AA1EE458176059AB0029C7A5 /* SDL_test_fuzzer.c */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.c; name = SDL_test_fuzzer.c; path = ../../src/test/SDL_test_fuzzer.c; sourceTree = ""; };
+		AA1EE459176059AB0029C7A5 /* SDL_test_harness.c */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.c; name = SDL_test_harness.c; path = ../../src/test/SDL_test_harness.c; sourceTree = ""; };
+		AA1EE45A176059AB0029C7A5 /* SDL_test_imageBlit.c */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.c; name = SDL_test_imageBlit.c; path = ../../src/test/SDL_test_imageBlit.c; sourceTree = ""; };
+		AA1EE45B176059AB0029C7A5 /* SDL_test_imageBlitBlend.c */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.c; name = SDL_test_imageBlitBlend.c; path = ../../src/test/SDL_test_imageBlitBlend.c; sourceTree = ""; };
+		AA1EE45C176059AB0029C7A5 /* SDL_test_imageFace.c */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.c; name = SDL_test_imageFace.c; path = ../../src/test/SDL_test_imageFace.c; sourceTree = ""; };
+		AA1EE45D176059AB0029C7A5 /* SDL_test_imagePrimitives.c */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.c; name = SDL_test_imagePrimitives.c; path = ../../src/test/SDL_test_imagePrimitives.c; sourceTree = ""; };
+		AA1EE45E176059AB0029C7A5 /* SDL_test_imagePrimitivesBlend.c */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.c; name = SDL_test_imagePrimitivesBlend.c; path = ../../src/test/SDL_test_imagePrimitivesBlend.c; sourceTree = ""; };
+		AA1EE45F176059AB0029C7A5 /* SDL_test_log.c */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.c; name = SDL_test_log.c; path = ../../src/test/SDL_test_log.c; sourceTree = ""; };
+		AA1EE460176059AB0029C7A5 /* SDL_test_md5.c */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.c; name = SDL_test_md5.c; path = ../../src/test/SDL_test_md5.c; sourceTree = ""; };
+		AA1EE461176059AB0029C7A5 /* SDL_test_random.c */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.c; name = SDL_test_random.c; path = ../../src/test/SDL_test_random.c; sourceTree = ""; };
+/* End PBXFileReference section */
+
+/* Begin PBXFrameworksBuildPhase section */
+		AA1EE4431760589B0029C7A5 /* Frameworks */ = {
+			isa = PBXFrameworksBuildPhase;
+			buildActionMask = 2147483647;
+			files = (
+			);
+			runOnlyForDeploymentPostprocessing = 0;
+		};
+/* End PBXFrameworksBuildPhase section */
+
+/* Begin PBXGroup section */
+		AA1EE43D1760589B0029C7A5 = {
+			isa = PBXGroup;
+			children = (
+				AA1EE453176059770029C7A5 /* Library Source */,
+				AA1EE4471760589B0029C7A5 /* Products */,
+			);
+			sourceTree = "";
+		};
+		AA1EE4471760589B0029C7A5 /* Products */ = {
+			isa = PBXGroup;
+			children = (
+				AA1EE4461760589B0029C7A5 /* libSDL2test.a */,
+			);
+			name = Products;
+			sourceTree = "";
+		};
+		AA1EE453176059770029C7A5 /* Library Source */ = {
+			isa = PBXGroup;
+			children = (
+				AA1EE454176059AB0029C7A5 /* SDL_test_common.c */,
+				AA1EE455176059AB0029C7A5 /* SDL_test_compare.c */,
+				AA1EE456176059AB0029C7A5 /* SDL_test_crc32.c */,
+				AA1EE457176059AB0029C7A5 /* SDL_test_font.c */,
+				AA1EE458176059AB0029C7A5 /* SDL_test_fuzzer.c */,
+				AA1EE459176059AB0029C7A5 /* SDL_test_harness.c */,
+				AA1EE45A176059AB0029C7A5 /* SDL_test_imageBlit.c */,
+				AA1EE45B176059AB0029C7A5 /* SDL_test_imageBlitBlend.c */,
+				AA1EE45C176059AB0029C7A5 /* SDL_test_imageFace.c */,
+				AA1EE45D176059AB0029C7A5 /* SDL_test_imagePrimitives.c */,
+				AA1EE45E176059AB0029C7A5 /* SDL_test_imagePrimitivesBlend.c */,
+				AA1EE45F176059AB0029C7A5 /* SDL_test_log.c */,
+				AA1EE460176059AB0029C7A5 /* SDL_test_md5.c */,
+				AA1EE461176059AB0029C7A5 /* SDL_test_random.c */,
+			);
+			name = "Library Source";
+			sourceTree = "";
+		};
+/* End PBXGroup section */
+
+/* Begin PBXHeadersBuildPhase section */
+		AA1EE4441760589B0029C7A5 /* Headers */ = {
+			isa = PBXHeadersBuildPhase;
+			buildActionMask = 2147483647;
+			files = (
+			);
+			runOnlyForDeploymentPostprocessing = 0;
+		};
+/* End PBXHeadersBuildPhase section */
+
+/* Begin PBXNativeTarget section */
+		AA1EE4451760589B0029C7A5 /* SDL2test */ = {
+			isa = PBXNativeTarget;
+			buildConfigurationList = AA1EE44A1760589B0029C7A5 /* Build configuration list for PBXNativeTarget "SDL2test" */;
+			buildPhases = (
+				AA1EE4421760589B0029C7A5 /* Sources */,
+				AA1EE4431760589B0029C7A5 /* Frameworks */,
+				AA1EE4441760589B0029C7A5 /* Headers */,
+			);
+			buildRules = (
+			);
+			dependencies = (
+			);
+			name = SDL2test;
+			productName = SDL2test;
+			productReference = AA1EE4461760589B0029C7A5 /* libSDL2test.a */;
+			productType = "com.apple.product-type.library.static";
+		};
+/* End PBXNativeTarget section */
+
+/* Begin PBXProject section */
+		AA1EE43E1760589B0029C7A5 /* Project object */ = {
+			isa = PBXProject;
+			attributes = {
+				LastUpgradeCheck = 0460;
+				ORGANIZATIONNAME = "Sam Lantinga";
+			};
+			buildConfigurationList = AA1EE4411760589B0029C7A5 /* Build configuration list for PBXProject "SDL2test" */;
+			compatibilityVersion = "Xcode 3.2";
+			developmentRegion = English;
+			hasScannedForEncodings = 0;
+			knownRegions = (
+				en,
+			);
+			mainGroup = AA1EE43D1760589B0029C7A5;
+			productRefGroup = AA1EE4471760589B0029C7A5 /* Products */;
+			projectDirPath = "";
+			projectRoot = "";
+			targets = (
+				AA1EE4451760589B0029C7A5 /* SDL2test */,
+			);
+		};
+/* End PBXProject section */
+
+/* Begin PBXSourcesBuildPhase section */
+		AA1EE4421760589B0029C7A5 /* Sources */ = {
+			isa = PBXSourcesBuildPhase;
+			buildActionMask = 2147483647;
+			files = (
+				AA1EE462176059AB0029C7A5 /* SDL_test_common.c in Sources */,
+				AA1EE463176059AB0029C7A5 /* SDL_test_compare.c in Sources */,
+				AA1EE464176059AB0029C7A5 /* SDL_test_crc32.c in Sources */,
+				AA1EE465176059AB0029C7A5 /* SDL_test_font.c in Sources */,
+				AA1EE466176059AB0029C7A5 /* SDL_test_fuzzer.c in Sources */,
+				AA1EE467176059AB0029C7A5 /* SDL_test_harness.c in Sources */,
+				AA1EE468176059AB0029C7A5 /* SDL_test_imageBlit.c in Sources */,
+				AA1EE469176059AB0029C7A5 /* SDL_test_imageBlitBlend.c in Sources */,
+				AA1EE46A176059AB0029C7A5 /* SDL_test_imageFace.c in Sources */,
+				AA1EE46B176059AB0029C7A5 /* SDL_test_imagePrimitives.c in Sources */,
+				AA1EE46C176059AB0029C7A5 /* SDL_test_imagePrimitivesBlend.c in Sources */,
+				AA1EE46D176059AB0029C7A5 /* SDL_test_log.c in Sources */,
+				AA1EE46E176059AB0029C7A5 /* SDL_test_md5.c in Sources */,
+				AA1EE46F176059AB0029C7A5 /* SDL_test_random.c in Sources */,
+			);
+			runOnlyForDeploymentPostprocessing = 0;
+		};
+/* End PBXSourcesBuildPhase section */
+
+/* Begin XCBuildConfiguration section */
+		AA1EE4481760589B0029C7A5 /* Debug */ = {
+			isa = XCBuildConfiguration;
+			buildSettings = {
+				ALWAYS_SEARCH_USER_PATHS = NO;
+				ARCHS = "$(ARCHS_STANDARD_32_BIT)";
+				CLANG_CXX_LANGUAGE_STANDARD = "gnu++0x";
+				CLANG_CXX_LIBRARY = "libc++";
+				CLANG_WARN_CONSTANT_CONVERSION = YES;
+				CLANG_WARN_EMPTY_BODY = YES;
+				CLANG_WARN_ENUM_CONVERSION = YES;
+				CLANG_WARN_INT_CONVERSION = YES;
+				CLANG_WARN__DUPLICATE_METHOD_MATCH = YES;
+				COPY_PHASE_STRIP = NO;
+				GCC_C_LANGUAGE_STANDARD = gnu99;
+				GCC_DYNAMIC_NO_PIC = NO;
+				GCC_ENABLE_OBJC_EXCEPTIONS = YES;
+				GCC_OPTIMIZATION_LEVEL = 0;
+				GCC_PREPROCESSOR_DEFINITIONS = (
+					"DEBUG=1",
+					"$(inherited)",
+				);
+				GCC_SYMBOLS_PRIVATE_EXTERN = NO;
+				GCC_WARN_64_TO_32_BIT_CONVERSION = YES;
+				GCC_WARN_ABOUT_RETURN_TYPE = YES;
+				GCC_WARN_UNINITIALIZED_AUTOS = YES;
+				GCC_WARN_UNUSED_VARIABLE = YES;
+				MACOSX_DEPLOYMENT_TARGET = 10.8;
+				ONLY_ACTIVE_ARCH = YES;
+				SDKROOT = iphoneos;
+			};
+			name = Debug;
+		};
+		AA1EE4491760589B0029C7A5 /* Release */ = {
+			isa = XCBuildConfiguration;
+			buildSettings = {
+				ALWAYS_SEARCH_USER_PATHS = NO;
+				ARCHS = "$(ARCHS_STANDARD_32_BIT)";
+				CLANG_CXX_LANGUAGE_STANDARD = "gnu++0x";
+				CLANG_CXX_LIBRARY = "libc++";
+				CLANG_WARN_CONSTANT_CONVERSION = YES;
+				CLANG_WARN_EMPTY_BODY = YES;
+				CLANG_WARN_ENUM_CONVERSION = YES;
+				CLANG_WARN_INT_CONVERSION = YES;
+				CLANG_WARN__DUPLICATE_METHOD_MATCH = YES;
+				COPY_PHASE_STRIP = YES;
+				DEBUG_INFORMATION_FORMAT = "dwarf-with-dsym";
+				GCC_C_LANGUAGE_STANDARD = gnu99;
+				GCC_ENABLE_OBJC_EXCEPTIONS = YES;
+				GCC_WARN_64_TO_32_BIT_CONVERSION = YES;
+				GCC_WARN_ABOUT_RETURN_TYPE = YES;
+				GCC_WARN_UNINITIALIZED_AUTOS = YES;
+				GCC_WARN_UNUSED_VARIABLE = YES;
+				MACOSX_DEPLOYMENT_TARGET = 10.8;
+				SDKROOT = iphoneos;
+			};
+			name = Release;
+		};
+		AA1EE44B1760589B0029C7A5 /* Debug */ = {
+			isa = XCBuildConfiguration;
+			buildSettings = {
+				EXECUTABLE_PREFIX = lib;
+				HEADER_SEARCH_PATHS = ../../include;
+				PRODUCT_NAME = "$(TARGET_NAME)";
+			};
+			name = Debug;
+		};
+		AA1EE44C1760589B0029C7A5 /* Release */ = {
+			isa = XCBuildConfiguration;
+			buildSettings = {
+				EXECUTABLE_PREFIX = lib;
+				HEADER_SEARCH_PATHS = ../../include;
+				PRODUCT_NAME = "$(TARGET_NAME)";
+			};
+			name = Release;
+		};
+/* End XCBuildConfiguration section */
+
+/* Begin XCConfigurationList section */
+		AA1EE4411760589B0029C7A5 /* Build configuration list for PBXProject "SDL2test" */ = {
+			isa = XCConfigurationList;
+			buildConfigurations = (
+				AA1EE4481760589B0029C7A5 /* Debug */,
+				AA1EE4491760589B0029C7A5 /* Release */,
+			);
+			defaultConfigurationIsVisible = 0;
+			defaultConfigurationName = Release;
+		};
+		AA1EE44A1760589B0029C7A5 /* Build configuration list for PBXNativeTarget "SDL2test" */ = {
+			isa = XCConfigurationList;
+			buildConfigurations = (
+				AA1EE44B1760589B0029C7A5 /* Debug */,
+				AA1EE44C1760589B0029C7A5 /* Release */,
+			);
+			defaultConfigurationIsVisible = 0;
+			defaultConfigurationName = Release;
+		};
+/* End XCConfigurationList section */
+	};
+	rootObject = AA1EE43E1760589B0029C7A5 /* Project object */;
+}
diff --git a/Xcode-iOS/Test/TestiPhoneOS.xcodeproj/project.pbxproj b/Xcode-iOS/Test/TestiPhoneOS.xcodeproj/project.pbxproj
index 1993661b1..0b35c22cf 100755
--- a/Xcode-iOS/Test/TestiPhoneOS.xcodeproj/project.pbxproj
+++ b/Xcode-iOS/Test/TestiPhoneOS.xcodeproj/project.pbxproj
@@ -36,8 +36,14 @@
 		56ED0508118A8FE400A56AA6 /* Foundation.framework in Frameworks */ = {isa = PBXBuildFile; fileRef = FDA8A89D0E2D111A00EA573E /* Foundation.framework */; };
 		56ED0509118A8FE400A56AA6 /* CoreAudio.framework in Frameworks */ = {isa = PBXBuildFile; fileRef = FDA8A89E0E2D111A00EA573E /* CoreAudio.framework */; };
 		56ED0511118A904200A56AA6 /* testpower.c in Sources */ = {isa = PBXBuildFile; fileRef = 56ED0510118A904200A56AA6 /* testpower.c */; };
+		AA1EE470176059D00029C7A5 /* libSDL2test.a in Frameworks */ = {isa = PBXBuildFile; fileRef = AA1EE452176059230029C7A5 /* libSDL2test.a */; };
+		AA1EE47117605A7F0029C7A5 /* libSDL2test.a in Frameworks */ = {isa = PBXBuildFile; fileRef = AA1EE452176059230029C7A5 /* libSDL2test.a */; };
+		AA1EE47417605B5C0029C7A5 /* libSDL2test.a in Frameworks */ = {isa = PBXBuildFile; fileRef = AA1EE452176059230029C7A5 /* libSDL2test.a */; };
+		AA1EE47517605B930029C7A5 /* libSDL2test.a in Frameworks */ = {isa = PBXBuildFile; fileRef = AA1EE452176059230029C7A5 /* libSDL2test.a */; };
+		AA1EE47617605B9E0029C7A5 /* libSDL2test.a in Frameworks */ = {isa = PBXBuildFile; fileRef = AA1EE452176059230029C7A5 /* libSDL2test.a */; };
+		AA1EE47717605BAB0029C7A5 /* libSDL2test.a in Frameworks */ = {isa = PBXBuildFile; fileRef = AA1EE452176059230029C7A5 /* libSDL2test.a */; };
+		AA1EE47817605BF60029C7A5 /* libSDL2test.a in Frameworks */ = {isa = PBXBuildFile; fileRef = AA1EE452176059230029C7A5 /* libSDL2test.a */; };
 		AAE7DEDC14CBB1E100DF1A0E /* icon.bmp in Resources */ = {isa = PBXBuildFile; fileRef = FDA8AAD90E2D33B000EA573E /* icon.bmp */; };
-		AAE7DEDE14CBB1E100DF1A0E /* common.c in Sources */ = {isa = PBXBuildFile; fileRef = FDA8A7840E2D0F1F00EA573E /* common.c */; };
 		AAE7DEE114CBB1E100DF1A0E /* libSDL2.a in Frameworks */ = {isa = PBXBuildFile; fileRef = FD1B48B80E3131CA007AB34E /* libSDL2.a */; };
 		AAE7DEE214CBB1E100DF1A0E /* AudioToolbox.framework in Frameworks */ = {isa = PBXBuildFile; fileRef = FDA8A8980E2D111A00EA573E /* AudioToolbox.framework */; };
 		AAE7DEE314CBB1E100DF1A0E /* QuartzCore.framework in Frameworks */ = {isa = PBXBuildFile; fileRef = FDA8A8990E2D111A00EA573E /* QuartzCore.framework */; };
@@ -50,7 +56,6 @@
 		AAE7DF4714CBB45000DF1A0E /* sample.bmp in Resources */ = {isa = PBXBuildFile; fileRef = FDA8AADE0E2D33C100EA573E /* sample.bmp */; };
 		AAE7DFA014CBB54E00DF1A0E /* icon.bmp in Resources */ = {isa = PBXBuildFile; fileRef = FDA8AAD90E2D33B000EA573E /* icon.bmp */; };
 		AAE7DFA114CBB54E00DF1A0E /* sample.bmp in Resources */ = {isa = PBXBuildFile; fileRef = FDA8AADE0E2D33C100EA573E /* sample.bmp */; };
-		AAE7DFA314CBB54E00DF1A0E /* common.c in Sources */ = {isa = PBXBuildFile; fileRef = FDA8A7840E2D0F1F00EA573E /* common.c */; };
 		AAE7DFA614CBB54E00DF1A0E /* libSDL2.a in Frameworks */ = {isa = PBXBuildFile; fileRef = FD1B48B80E3131CA007AB34E /* libSDL2.a */; };
 		AAE7DFA714CBB54E00DF1A0E /* AudioToolbox.framework in Frameworks */ = {isa = PBXBuildFile; fileRef = FDA8A8980E2D111A00EA573E /* AudioToolbox.framework */; };
 		AAE7DFA814CBB54E00DF1A0E /* QuartzCore.framework in Frameworks */ = {isa = PBXBuildFile; fileRef = FDA8A8990E2D111A00EA573E /* QuartzCore.framework */; };
@@ -60,7 +65,6 @@
 		AAE7DFAC14CBB54E00DF1A0E /* Foundation.framework in Frameworks */ = {isa = PBXBuildFile; fileRef = FDA8A89D0E2D111A00EA573E /* Foundation.framework */; };
 		AAE7DFAD14CBB54E00DF1A0E /* CoreAudio.framework in Frameworks */ = {isa = PBXBuildFile; fileRef = FDA8A89E0E2D111A00EA573E /* CoreAudio.framework */; };
 		AAE7DFB514CBB5F700DF1A0E /* testrendertarget.c in Sources */ = {isa = PBXBuildFile; fileRef = AAE7DFB414CBB5F700DF1A0E /* testrendertarget.c */; };
-		FDA8A79B0E2D0F8B00EA573E /* common.c in Sources */ = {isa = PBXBuildFile; fileRef = FDA8A7840E2D0F1F00EA573E /* common.c */; };
 		FDA8A79C0E2D0F9300EA573E /* testwm2.c in Sources */ = {isa = PBXBuildFile; fileRef = FDA8A75F0E2D0F1600EA573E /* testwm2.c */; };
 		FDA8A89F0E2D111A00EA573E /* AudioToolbox.framework in Frameworks */ = {isa = PBXBuildFile; fileRef = FDA8A8980E2D111A00EA573E /* AudioToolbox.framework */; };
 		FDA8A8A00E2D111A00EA573E /* QuartzCore.framework in Frameworks */ = {isa = PBXBuildFile; fileRef = FDA8A8990E2D111A00EA573E /* QuartzCore.framework */; };
@@ -111,7 +115,6 @@
 		FDAAC6220E2D5914001DB1D8 /* CoreAudio.framework in Frameworks */ = {isa = PBXBuildFile; fileRef = FDA8A89E0E2D111A00EA573E /* CoreAudio.framework */; };
 		FDAAC62A0E2D5960001DB1D8 /* testgles.c in Sources */ = {isa = PBXBuildFile; fileRef = FDAAC6290E2D5960001DB1D8 /* testgles.c */; };
 		FDAAC6390E2D59BE001DB1D8 /* icon.bmp in Resources */ = {isa = PBXBuildFile; fileRef = FDA8AAD90E2D33B000EA573E /* icon.bmp */; };
-		FDAAC7780E2D7024001DB1D8 /* common.c in Sources */ = {isa = PBXBuildFile; fileRef = FDA8A7840E2D0F1F00EA573E /* common.c */; };
 		FDBDE57C0E313445006BAC0B /* libSDL2.a in Frameworks */ = {isa = PBXBuildFile; fileRef = FD1B48B80E3131CA007AB34E /* libSDL2.a */; };
 		FDBDE5810E313465006BAC0B /* libSDL2.a in Frameworks */ = {isa = PBXBuildFile; fileRef = FD1B48B80E3131CA007AB34E /* libSDL2.a */; };
 		FDBDE5850E313495006BAC0B /* libSDL2.a in Frameworks */ = {isa = PBXBuildFile; fileRef = FD1B48B80E3131CA007AB34E /* libSDL2.a */; };
@@ -138,7 +141,6 @@
 		FDC42FFB0F0D866D009C87E1 /* Foundation.framework in Frameworks */ = {isa = PBXBuildFile; fileRef = FDA8A89D0E2D111A00EA573E /* Foundation.framework */; };
 		FDC42FFC0F0D866D009C87E1 /* CoreAudio.framework in Frameworks */ = {isa = PBXBuildFile; fileRef = FDA8A89E0E2D111A00EA573E /* CoreAudio.framework */; };
 		FDC4300A0F0D86BF009C87E1 /* testdraw2.c in Sources */ = {isa = PBXBuildFile; fileRef = FDC430090F0D86BF009C87E1 /* testdraw2.c */; };
-		FDC4301F0F0D8702009C87E1 /* common.c in Sources */ = {isa = PBXBuildFile; fileRef = FDA8A7840E2D0F1F00EA573E /* common.c */; };
 		FDD2C1000E2E4F4B00B7A85F /* AudioToolbox.framework in Frameworks */ = {isa = PBXBuildFile; fileRef = FDA8A8980E2D111A00EA573E /* AudioToolbox.framework */; };
 		FDD2C1010E2E4F4B00B7A85F /* QuartzCore.framework in Frameworks */ = {isa = PBXBuildFile; fileRef = FDA8A8990E2D111A00EA573E /* QuartzCore.framework */; };
 		FDD2C1020E2E4F4B00B7A85F /* OpenGLES.framework in Frameworks */ = {isa = PBXBuildFile; fileRef = FDA8A89A0E2D111A00EA573E /* OpenGLES.framework */; };
@@ -205,7 +207,6 @@
 		FDD2C54A0E2E80E400B7A85F /* CoreAudio.framework in Frameworks */ = {isa = PBXBuildFile; fileRef = FDA8A89E0E2D111A00EA573E /* CoreAudio.framework */; };
 		FDD2C5510E2E80F400B7A85F /* testsprite2.c in Sources */ = {isa = PBXBuildFile; fileRef = FDA8A7590E2D0F1600EA573E /* testsprite2.c */; };
 		FDD2C5520E2E812C00B7A85F /* icon.bmp in Resources */ = {isa = PBXBuildFile; fileRef = FDA8AAD90E2D33B000EA573E /* icon.bmp */; };
-		FDD2C5630E2E815C00B7A85F /* common.c in Sources */ = {isa = PBXBuildFile; fileRef = FDA8A7840E2D0F1F00EA573E /* common.c */; };
 		FDD2C5760E2E8C7400B7A85F /* icon.bmp in Resources */ = {isa = PBXBuildFile; fileRef = FDA8AAD90E2D33B000EA573E /* icon.bmp */; };
 		FDD2C57D0E2E8C7400B7A85F /* AudioToolbox.framework in Frameworks */ = {isa = PBXBuildFile; fileRef = FDA8A8980E2D111A00EA573E /* AudioToolbox.framework */; };
 		FDD2C57E0E2E8C7400B7A85F /* QuartzCore.framework in Frameworks */ = {isa = PBXBuildFile; fileRef = FDA8A8990E2D111A00EA573E /* QuartzCore.framework */; };
@@ -242,6 +243,13 @@
 			remoteGlobalIDString = 006E982211955059001DE610;
 			remoteInfo = testsdl;
 		};
+		AA1EE451176059230029C7A5 /* PBXContainerItemProxy */ = {
+			isa = PBXContainerItemProxy;
+			containerPortal = AA1EE44D176059220029C7A5 /* SDL2test.xcodeproj */;
+			proxyType = 2;
+			remoteGlobalIDString = AA1EE4461760589B0029C7A5;
+			remoteInfo = SDL2test;
+		};
 		FD1B48B70E3131CA007AB34E /* PBXContainerItemProxy */ = {
 			isa = PBXContainerItemProxy;
 			containerPortal = FD1B48AC0E3131CA007AB34E /* SDL.xcodeproj */;
@@ -259,6 +267,7 @@
 		1D6058910D05DD3D006BFB54 /* testwm2.app */ = {isa = PBXFileReference; explicitFileType = wrapper.application; includeInIndex = 0; path = testwm2.app; sourceTree = BUILT_PRODUCTS_DIR; };
 		56ED050D118A8FE400A56AA6 /* testpower.app */ = {isa = PBXFileReference; explicitFileType = wrapper.application; includeInIndex = 0; path = testpower.app; sourceTree = BUILT_PRODUCTS_DIR; };
 		56ED0510118A904200A56AA6 /* testpower.c */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.c; name = testpower.c; path = ../../test/testpower.c; sourceTree = SOURCE_ROOT; };
+		AA1EE44D176059220029C7A5 /* SDL2test.xcodeproj */ = {isa = PBXFileReference; lastKnownFileType = "wrapper.pb-project"; name = SDL2test.xcodeproj; path = ../SDLtest/SDL2test.xcodeproj; sourceTree = ""; };
 		AAE7DEEC14CBB1E100DF1A0E /* testscale.app */ = {isa = PBXFileReference; explicitFileType = wrapper.application; includeInIndex = 0; path = testscale.app; sourceTree = BUILT_PRODUCTS_DIR; };
 		AAE7DF4514CBB43900DF1A0E /* testscale.c */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.c; name = testscale.c; path = ../../test/testscale.c; sourceTree = ""; };
 		AAE7DFB114CBB54E00DF1A0E /* testrendertarget.app */ = {isa = PBXFileReference; explicitFileType = wrapper.application; includeInIndex = 0; path = testrendertarget.app; sourceTree = BUILT_PRODUCTS_DIR; };
@@ -280,8 +289,6 @@
 		FDA8A75B0E2D0F1600EA573E /* testver.c */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.c; name = testver.c; path = ../../test/testver.c; sourceTree = SOURCE_ROOT; };
 		FDA8A75F0E2D0F1600EA573E /* testwm2.c */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.c; name = testwm2.c; path = ../../test/testwm2.c; sourceTree = SOURCE_ROOT; };
 		FDA8A7610E2D0F1600EA573E /* torturethread.c */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.c; name = torturethread.c; path = ../../test/torturethread.c; sourceTree = SOURCE_ROOT; };
-		FDA8A7840E2D0F1F00EA573E /* common.c */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.c; name = common.c; path = ../../test/common.c; sourceTree = SOURCE_ROOT; };
-		FDA8A7850E2D0F1F00EA573E /* common.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; name = common.h; path = ../../test/common.h; sourceTree = SOURCE_ROOT; };
 		FDA8A78B0E2D0F3D00EA573E /* loopwave.c */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.c; name = loopwave.c; path = ../../test/loopwave.c; sourceTree = SOURCE_ROOT; };
 		FDA8A8980E2D111A00EA573E /* AudioToolbox.framework */ = {isa = PBXFileReference; lastKnownFileType = wrapper.framework; name = AudioToolbox.framework; path = System/Library/Frameworks/AudioToolbox.framework; sourceTree = SDKROOT; };
 		FDA8A8990E2D111A00EA573E /* QuartzCore.framework */ = {isa = PBXFileReference; lastKnownFileType = wrapper.framework; name = QuartzCore.framework; path = System/Library/Frameworks/QuartzCore.framework; sourceTree = SDKROOT; };
@@ -337,6 +344,7 @@
 			isa = PBXFrameworksBuildPhase;
 			buildActionMask = 2147483647;
 			files = (
+				AA1EE470176059D00029C7A5 /* libSDL2test.a in Frameworks */,
 				047A63E213285C3200CD7973 /* libSDL2.a in Frameworks */,
 				047A63E313285C3200CD7973 /* AudioToolbox.framework in Frameworks */,
 				047A63E413285C3200CD7973 /* QuartzCore.framework in Frameworks */,
@@ -352,6 +360,7 @@
 			isa = PBXFrameworksBuildPhase;
 			buildActionMask = 2147483647;
 			files = (
+				AA1EE47817605BF60029C7A5 /* libSDL2test.a in Frameworks */,
 				FDBDE5810E313465006BAC0B /* libSDL2.a in Frameworks */,
 				FDA8A89F0E2D111A00EA573E /* AudioToolbox.framework in Frameworks */,
 				FDA8A8A00E2D111A00EA573E /* QuartzCore.framework in Frameworks */,
@@ -382,6 +391,7 @@
 			isa = PBXFrameworksBuildPhase;
 			buildActionMask = 2147483647;
 			files = (
+				AA1EE47617605B9E0029C7A5 /* libSDL2test.a in Frameworks */,
 				AAE7DEE114CBB1E100DF1A0E /* libSDL2.a in Frameworks */,
 				AAE7DEE214CBB1E100DF1A0E /* AudioToolbox.framework in Frameworks */,
 				AAE7DEE314CBB1E100DF1A0E /* QuartzCore.framework in Frameworks */,
@@ -397,6 +407,7 @@
 			isa = PBXFrameworksBuildPhase;
 			buildActionMask = 2147483647;
 			files = (
+				AA1EE47517605B930029C7A5 /* libSDL2test.a in Frameworks */,
 				AAE7DFA614CBB54E00DF1A0E /* libSDL2.a in Frameworks */,
 				AAE7DFA714CBB54E00DF1A0E /* AudioToolbox.framework in Frameworks */,
 				AAE7DFA814CBB54E00DF1A0E /* QuartzCore.framework in Frameworks */,
@@ -472,6 +483,7 @@
 			isa = PBXFrameworksBuildPhase;
 			buildActionMask = 2147483647;
 			files = (
+				AA1EE47417605B5C0029C7A5 /* libSDL2test.a in Frameworks */,
 				FDBDE57C0E313445006BAC0B /* libSDL2.a in Frameworks */,
 				FDAAC61C0E2D5914001DB1D8 /* AudioToolbox.framework in Frameworks */,
 				FDAAC61D0E2D5914001DB1D8 /* QuartzCore.framework in Frameworks */,
@@ -487,6 +499,7 @@
 			isa = PBXFrameworksBuildPhase;
 			buildActionMask = 2147483647;
 			files = (
+				AA1EE47117605A7F0029C7A5 /* libSDL2test.a in Frameworks */,
 				FDC42FF40F0D866D009C87E1 /* libSDL2.a in Frameworks */,
 				FDC42FF60F0D866D009C87E1 /* AudioToolbox.framework in Frameworks */,
 				FDC42FF70F0D866D009C87E1 /* QuartzCore.framework in Frameworks */,
@@ -607,6 +620,7 @@
 			isa = PBXFrameworksBuildPhase;
 			buildActionMask = 2147483647;
 			files = (
+				AA1EE47717605BAB0029C7A5 /* libSDL2test.a in Frameworks */,
 				FDBDE5CA0E313712006BAC0B /* libSDL2.a in Frameworks */,
 				FDD2C5440E2E80E400B7A85F /* AudioToolbox.framework in Frameworks */,
 				FDD2C5450E2E80E400B7A85F /* QuartzCore.framework in Frameworks */,
@@ -699,6 +713,7 @@
 		29B97314FDCFA39411CA2CEA /* CustomTemplate */ = {
 			isa = PBXGroup;
 			children = (
+				AA1EE44D176059220029C7A5 /* SDL2test.xcodeproj */,
 				FD1B48AC0E3131CA007AB34E /* SDL.xcodeproj */,
 				FDA8AAD60E2D339A00EA573E /* Resources */,
 				FDA8A7C30E2D10FA00EA573E /* Linked Frameworks */,
@@ -708,6 +723,14 @@
 			name = CustomTemplate;
 			sourceTree = "";
 		};
+		AA1EE44E176059220029C7A5 /* Products */ = {
+			isa = PBXGroup;
+			children = (
+				AA1EE452176059230029C7A5 /* libSDL2test.a */,
+			);
+			name = Products;
+			sourceTree = "";
+		};
 		FD1B48AD0E3131CA007AB34E /* Products */ = {
 			isa = PBXGroup;
 			children = (
@@ -721,8 +744,6 @@
 			isa = PBXGroup;
 			children = (
 				047A63F013285CD100CD7973 /* checkkeys.c */,
-				FDA8A7840E2D0F1F00EA573E /* common.c */,
-				FDA8A7850E2D0F1F00EA573E /* common.h */,
 				FDA8A78B0E2D0F3D00EA573E /* loopwave.c */,
 				FDA8A7410E2D0F1600EA573E /* testaudioinfo.c */,
 				FDC430090F0D86BF009C87E1 /* testdraw2.c */,
@@ -1196,6 +1217,10 @@
 					ProductGroup = FD1B48AD0E3131CA007AB34E /* Products */;
 					ProjectRef = FD1B48AC0E3131CA007AB34E /* SDL.xcodeproj */;
 				},
+				{
+					ProductGroup = AA1EE44E176059220029C7A5 /* Products */;
+					ProjectRef = AA1EE44D176059220029C7A5 /* SDL2test.xcodeproj */;
+				},
 			);
 			projectRoot = "";
 			targets = (
@@ -1234,6 +1259,13 @@
 			remoteRef = 0466EE6F11E565E4000198A4 /* PBXContainerItemProxy */;
 			sourceTree = BUILT_PRODUCTS_DIR;
 		};
+		AA1EE452176059230029C7A5 /* libSDL2test.a */ = {
+			isa = PBXReferenceProxy;
+			fileType = archive.ar;
+			path = libSDL2test.a;
+			remoteRef = AA1EE451176059230029C7A5 /* PBXContainerItemProxy */;
+			sourceTree = BUILT_PRODUCTS_DIR;
+		};
 		FD1B48B80E3131CA007AB34E /* libSDL2.a */ = {
 			isa = PBXReferenceProxy;
 			fileType = archive.ar;
@@ -1440,7 +1472,6 @@
 			isa = PBXSourcesBuildPhase;
 			buildActionMask = 2147483647;
 			files = (
-				FDA8A79B0E2D0F8B00EA573E /* common.c in Sources */,
 				FDA8A79C0E2D0F9300EA573E /* testwm2.c in Sources */,
 			);
 			runOnlyForDeploymentPostprocessing = 0;
@@ -1457,7 +1488,6 @@
 			isa = PBXSourcesBuildPhase;
 			buildActionMask = 2147483647;
 			files = (
-				AAE7DEDE14CBB1E100DF1A0E /* common.c in Sources */,
 				AAE7DF4614CBB43900DF1A0E /* testscale.c in Sources */,
 			);
 			runOnlyForDeploymentPostprocessing = 0;
@@ -1466,7 +1496,6 @@
 			isa = PBXSourcesBuildPhase;
 			buildActionMask = 2147483647;
 			files = (
-				AAE7DFA314CBB54E00DF1A0E /* common.c in Sources */,
 				AAE7DFB514CBB5F700DF1A0E /* testrendertarget.c in Sources */,
 			);
 			runOnlyForDeploymentPostprocessing = 0;
@@ -1508,7 +1537,6 @@
 			buildActionMask = 2147483647;
 			files = (
 				FDAAC62A0E2D5960001DB1D8 /* testgles.c in Sources */,
-				FDAAC7780E2D7024001DB1D8 /* common.c in Sources */,
 			);
 			runOnlyForDeploymentPostprocessing = 0;
 		};
@@ -1516,7 +1544,6 @@
 			isa = PBXSourcesBuildPhase;
 			buildActionMask = 2147483647;
 			files = (
-				FDC4301F0F0D8702009C87E1 /* common.c in Sources */,
 				FDC4300A0F0D86BF009C87E1 /* testdraw2.c in Sources */,
 			);
 			runOnlyForDeploymentPostprocessing = 0;
@@ -1581,7 +1608,6 @@
 			isa = PBXSourcesBuildPhase;
 			buildActionMask = 2147483647;
 			files = (
-				FDD2C5630E2E815C00B7A85F /* common.c in Sources */,
 				FDD2C5510E2E80F400B7A85F /* testsprite2.c in Sources */,
 			);
 			runOnlyForDeploymentPostprocessing = 0;
diff --git a/test/testtimer.c b/test/testtimer.c
index 8ba808692..a98ad6348 100644
--- a/test/testtimer.c
+++ b/test/testtimer.c
@@ -16,6 +16,7 @@
 
 #if 1 /* FIXME: Rework this using the 2.0 API */
 #include 
+#include "SDL.h"
 
 int main(int argc, char *argv[])
 {

From b95977a499764d61087ff8e7a6f51fe977c012e7 Mon Sep 17 00:00:00 2001
From: Sam Lantinga 
Date: Wed, 5 Jun 2013 23:09:13 -0700
Subject: [PATCH 206/542] Removed obsolete testsdl target

---
 Xcode-iOS/SDL/SDL.xcodeproj/project.pbxproj | 224 --------------------
 Xcode-iOS/SDL/testsdl-Info.plist            |  20 --
 2 files changed, 244 deletions(-)
 delete mode 100644 Xcode-iOS/SDL/testsdl-Info.plist

diff --git a/Xcode-iOS/SDL/SDL.xcodeproj/project.pbxproj b/Xcode-iOS/SDL/SDL.xcodeproj/project.pbxproj
index 8849b8d41..64f7d6d3b 100755
--- a/Xcode-iOS/SDL/SDL.xcodeproj/project.pbxproj
+++ b/Xcode-iOS/SDL/SDL.xcodeproj/project.pbxproj
@@ -21,32 +21,8 @@
 /* End PBXAggregateTarget section */
 
 /* Begin PBXBuildFile section */
-		001E39A71196EE6F00A3F5B8 /* TestSupportRWops_Cocoa.m in Sources */ = {isa = PBXBuildFile; fileRef = 001E39A51196EE6F00A3F5B8 /* TestSupportRWops_Cocoa.m */; };
-		006E9852119550FB001DE610 /* audio.c in Sources */ = {isa = PBXBuildFile; fileRef = 006E9831119550FB001DE610 /* audio.c */; };
-		006E9853119550FB001DE610 /* common.c in Sources */ = {isa = PBXBuildFile; fileRef = 006E9834119550FB001DE610 /* common.c */; };
-		006E9859119550FB001DE610 /* platform.c in Sources */ = {isa = PBXBuildFile; fileRef = 006E983D119550FB001DE610 /* platform.c */; };
-		006E985A119550FB001DE610 /* (null) in Resources */ = {isa = PBXBuildFile; };
-		006E985B119550FB001DE610 /* rect.c in Sources */ = {isa = PBXBuildFile; fileRef = 006E9841119550FB001DE610 /* rect.c */; };
-		006E985C119550FB001DE610 /* render.c in Sources */ = {isa = PBXBuildFile; fileRef = 006E9844119550FB001DE610 /* render.c */; };
-		006E985D119550FB001DE610 /* read in Copy rwops */ = {isa = PBXBuildFile; fileRef = 006E9847119550FB001DE610 /* read */; };
-		006E985E119550FB001DE610 /* rwops.c in Sources */ = {isa = PBXBuildFile; fileRef = 006E9848119550FB001DE610 /* rwops.c */; };
-		006E9860119550FB001DE610 /* (null) in Sources */ = {isa = PBXBuildFile; };
-		006E9861119550FB001DE610 /* surface.c in Sources */ = {isa = PBXBuildFile; fileRef = 006E984F119550FB001DE610 /* surface.c */; };
-		006E9862119550FB001DE610 /* (null) in Sources */ = {isa = PBXBuildFile; };
-		006E986A1195513D001DE610 /* icon.bmp in Resources */ = {isa = PBXBuildFile; fileRef = 006E98631195513D001DE610 /* icon.bmp */; };
-		006E986B1195513D001DE610 /* moose.dat in Resources */ = {isa = PBXBuildFile; fileRef = 006E98641195513D001DE610 /* moose.dat */; };
-		006E986C1195513D001DE610 /* picture.xbm in Resources */ = {isa = PBXBuildFile; fileRef = 006E98651195513D001DE610 /* picture.xbm */; };
-		006E986E1195513D001DE610 /* sample.bmp in Resources */ = {isa = PBXBuildFile; fileRef = 006E98671195513D001DE610 /* sample.bmp */; };
-		006E986F1195513D001DE610 /* sample.wav in Resources */ = {isa = PBXBuildFile; fileRef = 006E98681195513D001DE610 /* sample.wav */; };
-		006E98701195513D001DE610 /* utf8.txt in Resources */ = {isa = PBXBuildFile; fileRef = 006E98691195513D001DE610 /* utf8.txt */; };
 		006E9888119552DD001DE610 /* SDL_rwopsbundlesupport.h in Headers */ = {isa = PBXBuildFile; fileRef = 006E9886119552DD001DE610 /* SDL_rwopsbundlesupport.h */; };
 		006E9889119552DD001DE610 /* SDL_rwopsbundlesupport.m in Sources */ = {isa = PBXBuildFile; fileRef = 006E9887119552DD001DE610 /* SDL_rwopsbundlesupport.m */; };
-		0098A55B1195B4D900343137 /* AudioToolbox.framework in Frameworks */ = {isa = PBXBuildFile; fileRef = 0098A55A1195B4D900343137 /* AudioToolbox.framework */; };
-		0098A55F1195B4D900343137 /* CoreAudio.framework in Frameworks */ = {isa = PBXBuildFile; fileRef = 0098A55E1195B4D900343137 /* CoreAudio.framework */; };
-		0098A5611195B4D900343137 /* CoreGraphics.framework in Frameworks */ = {isa = PBXBuildFile; fileRef = 0098A5601195B4D900343137 /* CoreGraphics.framework */; };
-		0098A5631195B4D900343137 /* OpenGLES.framework in Frameworks */ = {isa = PBXBuildFile; fileRef = 0098A5621195B4D900343137 /* OpenGLES.framework */; };
-		0098A5651195B4D900343137 /* UIKit.framework in Frameworks */ = {isa = PBXBuildFile; fileRef = 0098A5641195B4D900343137 /* UIKit.framework */; };
-		0098A5851195B5E200343137 /* QuartzCore.framework in Frameworks */ = {isa = PBXBuildFile; fileRef = 0098A5841195B5E200343137 /* QuartzCore.framework */; };
 		0402A85812FE70C600CECEE3 /* SDL_render_gles2.c in Sources */ = {isa = PBXBuildFile; fileRef = 0402A85512FE70C600CECEE3 /* SDL_render_gles2.c */; };
 		0402A85912FE70C600CECEE3 /* SDL_shaders_gles2.c in Sources */ = {isa = PBXBuildFile; fileRef = 0402A85612FE70C600CECEE3 /* SDL_shaders_gles2.c */; };
 		0402A85A12FE70C600CECEE3 /* SDL_shaders_gles2.h in Headers */ = {isa = PBXBuildFile; fileRef = 0402A85712FE70C600CECEE3 /* SDL_shaders_gles2.h */; };
@@ -156,7 +132,6 @@
 		AA7558C81595D55500BBD41B /* SDL_version.h in Headers */ = {isa = PBXBuildFile; fileRef = AA7558951595D55500BBD41B /* SDL_version.h */; };
 		AA7558C91595D55500BBD41B /* SDL_video.h in Headers */ = {isa = PBXBuildFile; fileRef = AA7558961595D55500BBD41B /* SDL_video.h */; };
 		AA7558CA1595D55500BBD41B /* SDL.h in Headers */ = {isa = PBXBuildFile; fileRef = AA7558971595D55500BBD41B /* SDL.h */; };
-		AA9781C91576A7FA00472542 /* libSDL2.a in Frameworks */ = {isa = PBXBuildFile; fileRef = FD6526630DE8FCCB002AD96B /* libSDL2.a */; };
 		AA9FF9511637C6E5000DF050 /* SDL_messagebox.h in Headers */ = {isa = PBXBuildFile; fileRef = AA9FF9501637C6E5000DF050 /* SDL_messagebox.h */; };
 		AABCC3941640643D00AB8930 /* SDL_uikitmessagebox.h in Headers */ = {isa = PBXBuildFile; fileRef = AABCC3921640643D00AB8930 /* SDL_uikitmessagebox.h */; };
 		AABCC3951640643D00AB8930 /* SDL_uikitmessagebox.m in Sources */ = {isa = PBXBuildFile; fileRef = AABCC3931640643D00AB8930 /* SDL_uikitmessagebox.m */; };
@@ -237,56 +212,9 @@
 		FDA686000DF244C800F98A1A /* SDL_nullvideo.h in Headers */ = {isa = PBXBuildFile; fileRef = FDA685FA0DF244C800F98A1A /* SDL_nullvideo.h */; };
 /* End PBXBuildFile section */
 
-/* Begin PBXContainerItemProxy section */
-		006E982A11955065001DE610 /* PBXContainerItemProxy */ = {
-			isa = PBXContainerItemProxy;
-			containerPortal = 29B97313FDCFA39411CA2CEA /* Project object */;
-			proxyType = 1;
-			remoteGlobalIDString = FD6526620DE8FCCB002AD96B;
-			remoteInfo = StaticLib;
-		};
-/* End PBXContainerItemProxy section */
-
-/* Begin PBXCopyFilesBuildPhase section */
-		006E9881119551D0001DE610 /* Copy rwops */ = {
-			isa = PBXCopyFilesBuildPhase;
-			buildActionMask = 2147483647;
-			dstPath = rwops;
-			dstSubfolderSpec = 7;
-			files = (
-				006E985D119550FB001DE610 /* read in Copy rwops */,
-			);
-			name = "Copy rwops";
-			runOnlyForDeploymentPostprocessing = 0;
-		};
-/* End PBXCopyFilesBuildPhase section */
-
 /* Begin PBXFileReference section */
-		001E39A51196EE6F00A3F5B8 /* TestSupportRWops_Cocoa.m */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.objc; path = TestSupportRWops_Cocoa.m; sourceTree = ""; };
-		006E982211955059001DE610 /* testsdl.app */ = {isa = PBXFileReference; explicitFileType = wrapper.application; includeInIndex = 0; path = testsdl.app; sourceTree = BUILT_PRODUCTS_DIR; };
-		006E982411955059001DE610 /* testsdl-Info.plist */ = {isa = PBXFileReference; lastKnownFileType = text.plist.xml; path = "testsdl-Info.plist"; sourceTree = ""; };
-		006E9831119550FB001DE610 /* audio.c */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.c; path = audio.c; sourceTree = ""; };
-		006E9834119550FB001DE610 /* common.c */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.c; path = common.c; sourceTree = ""; };
-		006E983D119550FB001DE610 /* platform.c */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.c; path = platform.c; sourceTree = ""; };
-		006E9841119550FB001DE610 /* rect.c */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.c; path = rect.c; sourceTree = ""; };
-		006E9844119550FB001DE610 /* render.c */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.c; path = render.c; sourceTree = ""; };
-		006E9847119550FB001DE610 /* read */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = text; path = read; sourceTree = ""; };
-		006E9848119550FB001DE610 /* rwops.c */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.c; path = rwops.c; sourceTree = ""; };
-		006E984F119550FB001DE610 /* surface.c */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.c; path = surface.c; sourceTree = ""; };
-		006E98631195513D001DE610 /* icon.bmp */ = {isa = PBXFileReference; lastKnownFileType = image.bmp; name = icon.bmp; path = ../../test/icon.bmp; sourceTree = SOURCE_ROOT; };
-		006E98641195513D001DE610 /* moose.dat */ = {isa = PBXFileReference; lastKnownFileType = file; name = moose.dat; path = ../../test/moose.dat; sourceTree = SOURCE_ROOT; };
-		006E98651195513D001DE610 /* picture.xbm */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = text; name = picture.xbm; path = ../../test/picture.xbm; sourceTree = SOURCE_ROOT; };
-		006E98671195513D001DE610 /* sample.bmp */ = {isa = PBXFileReference; lastKnownFileType = image.bmp; name = sample.bmp; path = ../../test/sample.bmp; sourceTree = SOURCE_ROOT; };
-		006E98681195513D001DE610 /* sample.wav */ = {isa = PBXFileReference; lastKnownFileType = audio.wav; name = sample.wav; path = ../../test/sample.wav; sourceTree = SOURCE_ROOT; };
-		006E98691195513D001DE610 /* utf8.txt */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = text; name = utf8.txt; path = ../../test/utf8.txt; sourceTree = SOURCE_ROOT; };
 		006E9886119552DD001DE610 /* SDL_rwopsbundlesupport.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = SDL_rwopsbundlesupport.h; sourceTree = ""; };
 		006E9887119552DD001DE610 /* SDL_rwopsbundlesupport.m */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.objc; path = SDL_rwopsbundlesupport.m; sourceTree = ""; };
-		0098A55A1195B4D900343137 /* AudioToolbox.framework */ = {isa = PBXFileReference; lastKnownFileType = wrapper.framework; name = AudioToolbox.framework; path = System/Library/Frameworks/AudioToolbox.framework; sourceTree = SDKROOT; };
-		0098A55E1195B4D900343137 /* CoreAudio.framework */ = {isa = PBXFileReference; lastKnownFileType = wrapper.framework; name = CoreAudio.framework; path = System/Library/Frameworks/CoreAudio.framework; sourceTree = SDKROOT; };
-		0098A5601195B4D900343137 /* CoreGraphics.framework */ = {isa = PBXFileReference; lastKnownFileType = wrapper.framework; name = CoreGraphics.framework; path = System/Library/Frameworks/CoreGraphics.framework; sourceTree = SDKROOT; };
-		0098A5621195B4D900343137 /* OpenGLES.framework */ = {isa = PBXFileReference; lastKnownFileType = wrapper.framework; name = OpenGLES.framework; path = System/Library/Frameworks/OpenGLES.framework; sourceTree = SDKROOT; };
-		0098A5641195B4D900343137 /* UIKit.framework */ = {isa = PBXFileReference; lastKnownFileType = wrapper.framework; name = UIKit.framework; path = System/Library/Frameworks/UIKit.framework; sourceTree = SDKROOT; };
-		0098A5841195B5E200343137 /* QuartzCore.framework */ = {isa = PBXFileReference; lastKnownFileType = wrapper.framework; name = QuartzCore.framework; path = System/Library/Frameworks/QuartzCore.framework; sourceTree = SDKROOT; };
 		0402A85512FE70C600CECEE3 /* SDL_render_gles2.c */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.c; path = SDL_render_gles2.c; sourceTree = ""; };
 		0402A85612FE70C600CECEE3 /* SDL_shaders_gles2.c */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.c; path = SDL_shaders_gles2.c; sourceTree = ""; };
 		0402A85712FE70C600CECEE3 /* SDL_shaders_gles2.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = SDL_shaders_gles2.h; sourceTree = ""; };
@@ -501,37 +429,7 @@
 		FDC261780E3A3FC8001C4554 /* keyinfotable.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = keyinfotable.h; sourceTree = ""; };
 /* End PBXFileReference section */
 
-/* Begin PBXFrameworksBuildPhase section */
-		006E982011955059001DE610 /* Frameworks */ = {
-			isa = PBXFrameworksBuildPhase;
-			buildActionMask = 2147483647;
-			files = (
-				0098A55B1195B4D900343137 /* AudioToolbox.framework in Frameworks */,
-				0098A55F1195B4D900343137 /* CoreAudio.framework in Frameworks */,
-				0098A5611195B4D900343137 /* CoreGraphics.framework in Frameworks */,
-				0098A5631195B4D900343137 /* OpenGLES.framework in Frameworks */,
-				0098A5651195B4D900343137 /* UIKit.framework in Frameworks */,
-				0098A5851195B5E200343137 /* QuartzCore.framework in Frameworks */,
-				AA9781C91576A7FA00472542 /* libSDL2.a in Frameworks */,
-			);
-			runOnlyForDeploymentPostprocessing = 0;
-		};
-/* End PBXFrameworksBuildPhase section */
-
 /* Begin PBXGroup section */
-		006E982F119550E4001DE610 /* TestResources */ = {
-			isa = PBXGroup;
-			children = (
-				006E98631195513D001DE610 /* icon.bmp */,
-				006E98641195513D001DE610 /* moose.dat */,
-				006E98651195513D001DE610 /* picture.xbm */,
-				006E98671195513D001DE610 /* sample.bmp */,
-				006E98681195513D001DE610 /* sample.wav */,
-				006E98691195513D001DE610 /* utf8.txt */,
-			);
-			name = TestResources;
-			sourceTree = "";
-		};
 		006E9885119552DD001DE610 /* cocoa */ = {
 			isa = PBXGroup;
 			children = (
@@ -639,7 +537,6 @@
 			isa = PBXGroup;
 			children = (
 				FD6526630DE8FCCB002AD96B /* libSDL2.a */,
-				006E982211955059001DE610 /* testsdl.app */,
 			);
 			name = Products;
 			sourceTree = "";
@@ -649,27 +546,11 @@
 			children = (
 				FD99B8BC0DD52E5C00FB1D6B /* Public Headers */,
 				FD99B8BD0DD52E6D00FB1D6B /* Library Source */,
-				006E982F119550E4001DE610 /* TestResources */,
-				29B97323FDCFA39411CA2CEA /* Frameworks */,
 				19C28FACFE9D520D11CA2CBB /* Products */,
-				006E982411955059001DE610 /* testsdl-Info.plist */,
-				0098A5841195B5E200343137 /* QuartzCore.framework */,
 			);
 			name = CustomTemplate;
 			sourceTree = "";
 		};
-		29B97323FDCFA39411CA2CEA /* Frameworks */ = {
-			isa = PBXGroup;
-			children = (
-				0098A55A1195B4D900343137 /* AudioToolbox.framework */,
-				0098A55E1195B4D900343137 /* CoreAudio.framework */,
-				0098A5601195B4D900343137 /* CoreGraphics.framework */,
-				0098A5621195B4D900343137 /* OpenGLES.framework */,
-				0098A5641195B4D900343137 /* UIKit.framework */,
-			);
-			name = Frameworks;
-			sourceTree = "";
-		};
 		56EA86F813E9EBF9002E47EB /* coreaudio */ = {
 			isa = PBXGroup;
 			children = (
@@ -1149,25 +1030,6 @@
 /* End PBXHeadersBuildPhase section */
 
 /* Begin PBXNativeTarget section */
-		006E982111955059001DE610 /* testsdl */ = {
-			isa = PBXNativeTarget;
-			buildConfigurationList = 006E98271195505B001DE610 /* Build configuration list for PBXNativeTarget "testsdl" */;
-			buildPhases = (
-				006E981E11955059001DE610 /* Resources */,
-				006E981F11955059001DE610 /* Sources */,
-				006E982011955059001DE610 /* Frameworks */,
-				006E9881119551D0001DE610 /* Copy rwops */,
-			);
-			buildRules = (
-			);
-			dependencies = (
-				006E982B11955065001DE610 /* PBXTargetDependency */,
-			);
-			name = testsdl;
-			productName = testsdl;
-			productReference = 006E982211955059001DE610 /* testsdl.app */;
-			productType = "com.apple.product-type.application";
-		};
 		FD6526620DE8FCCB002AD96B /* libSDL */ = {
 			isa = PBXNativeTarget;
 			buildConfigurationList = FD6526990DE8FD14002AD96B /* Build configuration list for PBXNativeTarget "libSDL" */;
@@ -1207,29 +1069,11 @@
 			projectRoot = ../..;
 			targets = (
 				FD6526620DE8FCCB002AD96B /* libSDL */,
-				006E982111955059001DE610 /* testsdl */,
 				00B4F48B12F6A69C0084EC00 /* PrepareXcodeProjectTemplate */,
 			);
 		};
 /* End PBXProject section */
 
-/* Begin PBXResourcesBuildPhase section */
-		006E981E11955059001DE610 /* Resources */ = {
-			isa = PBXResourcesBuildPhase;
-			buildActionMask = 2147483647;
-			files = (
-				006E985A119550FB001DE610 /* (null) in Resources */,
-				006E986A1195513D001DE610 /* icon.bmp in Resources */,
-				006E986B1195513D001DE610 /* moose.dat in Resources */,
-				006E986C1195513D001DE610 /* picture.xbm in Resources */,
-				006E986E1195513D001DE610 /* sample.bmp in Resources */,
-				006E986F1195513D001DE610 /* sample.wav in Resources */,
-				006E98701195513D001DE610 /* utf8.txt in Resources */,
-			);
-			runOnlyForDeploymentPostprocessing = 0;
-		};
-/* End PBXResourcesBuildPhase section */
-
 /* Begin PBXShellScriptBuildPhase section */
 		00B4F48A12F6A69C0084EC00 /* ShellScript */ = {
 			isa = PBXShellScriptBuildPhase;
@@ -1248,23 +1092,6 @@
 /* End PBXShellScriptBuildPhase section */
 
 /* Begin PBXSourcesBuildPhase section */
-		006E981F11955059001DE610 /* Sources */ = {
-			isa = PBXSourcesBuildPhase;
-			buildActionMask = 2147483647;
-			files = (
-				006E9852119550FB001DE610 /* audio.c in Sources */,
-				006E9853119550FB001DE610 /* common.c in Sources */,
-				006E9859119550FB001DE610 /* platform.c in Sources */,
-				006E985B119550FB001DE610 /* rect.c in Sources */,
-				006E985C119550FB001DE610 /* render.c in Sources */,
-				006E985E119550FB001DE610 /* rwops.c in Sources */,
-				006E9860119550FB001DE610 /* (null) in Sources */,
-				006E9861119550FB001DE610 /* surface.c in Sources */,
-				006E9862119550FB001DE610 /* (null) in Sources */,
-				001E39A71196EE6F00A3F5B8 /* TestSupportRWops_Cocoa.m in Sources */,
-			);
-			runOnlyForDeploymentPostprocessing = 0;
-		};
 		FD6526600DE8FCCB002AD96B /* Sources */ = {
 			isa = PBXSourcesBuildPhase;
 			buildActionMask = 2147483647;
@@ -1367,49 +1194,7 @@
 		};
 /* End PBXSourcesBuildPhase section */
 
-/* Begin PBXTargetDependency section */
-		006E982B11955065001DE610 /* PBXTargetDependency */ = {
-			isa = PBXTargetDependency;
-			target = FD6526620DE8FCCB002AD96B /* libSDL */;
-			targetProxy = 006E982A11955065001DE610 /* PBXContainerItemProxy */;
-		};
-/* End PBXTargetDependency section */
-
 /* Begin XCBuildConfiguration section */
-		006E98251195505B001DE610 /* Debug */ = {
-			isa = XCBuildConfiguration;
-			buildSettings = {
-				CODE_SIGN_IDENTITY = "iPhone Developer";
-				COPY_PHASE_STRIP = NO;
-				INFOPLIST_FILE = "testsdl-Info.plist";
-				INSTALL_PATH = "$(HOME)/Applications";
-				OTHER_LDFLAGS = (
-					"-framework",
-					Foundation,
-					"-framework",
-					UIKit,
-				);
-				PRODUCT_NAME = testsdl;
-			};
-			name = Debug;
-		};
-		006E98261195505B001DE610 /* Release */ = {
-			isa = XCBuildConfiguration;
-			buildSettings = {
-				CODE_SIGN_IDENTITY = "iPhone Developer";
-				COPY_PHASE_STRIP = YES;
-				INFOPLIST_FILE = "testsdl-Info.plist";
-				INSTALL_PATH = "$(HOME)/Applications";
-				OTHER_LDFLAGS = (
-					"-framework",
-					Foundation,
-					"-framework",
-					UIKit,
-				);
-				PRODUCT_NAME = testsdl;
-			};
-			name = Release;
-		};
 		00B4F48C12F6A69C0084EC00 /* Debug */ = {
 			isa = XCBuildConfiguration;
 			buildSettings = {
@@ -1478,15 +1263,6 @@
 /* End XCBuildConfiguration section */
 
 /* Begin XCConfigurationList section */
-		006E98271195505B001DE610 /* Build configuration list for PBXNativeTarget "testsdl" */ = {
-			isa = XCConfigurationList;
-			buildConfigurations = (
-				006E98251195505B001DE610 /* Debug */,
-				006E98261195505B001DE610 /* Release */,
-			);
-			defaultConfigurationIsVisible = 0;
-			defaultConfigurationName = Release;
-		};
 		00B4F48E12F6A6BA0084EC00 /* Build configuration list for PBXAggregateTarget "PrepareXcodeProjectTemplate" */ = {
 			isa = XCConfigurationList;
 			buildConfigurations = (
diff --git a/Xcode-iOS/SDL/testsdl-Info.plist b/Xcode-iOS/SDL/testsdl-Info.plist
deleted file mode 100644
index af9a1cadb..000000000
--- a/Xcode-iOS/SDL/testsdl-Info.plist
+++ /dev/null
@@ -1,20 +0,0 @@
-
-
-
-
-	CFBundleDevelopmentRegion
-	English
-	CFBundleExecutable
-	${EXECUTABLE_NAME}
-	CFBundleIdentifier
-	com.yourcompany.${PRODUCT_NAME:identifier}
-	CFBundleInfoDictionaryVersion
-	6.0
-	CFBundlePackageType
-	APPL
-	CFBundleSignature
-	????
-	CFBundleVersion
-	1.0
-
-

From 7fe9747caffc615340184faeddfac89303ef63f9 Mon Sep 17 00:00:00 2001
From: Sam Lantinga 
Date: Wed, 5 Jun 2013 23:11:20 -0700
Subject: [PATCH 207/542] Fixed compiling iOS demos

---
 Xcode-iOS/Demos/src/keyboard.c | 6 ++----
 Xcode-iOS/Demos/src/mixer.c    | 2 +-
 2 files changed, 3 insertions(+), 5 deletions(-)

diff --git a/Xcode-iOS/Demos/src/keyboard.c b/Xcode-iOS/Demos/src/keyboard.c
index 4b55c7be4..fd903ff86 100644
--- a/Xcode-iOS/Demos/src/keyboard.c
+++ b/Xcode-iOS/Demos/src/keyboard.c
@@ -168,8 +168,7 @@ void
 drawBlank(int x, int y)
 {
     SDL_Rect rect = { x, y, GLYPH_SIZE_SCREEN, GLYPH_SIZE_SCREEN };
-    SDL_SetRenderDrawColor(renderer, bg_color.r, bg_color.g, bg_color.b,
-                           bg_color.unused);
+    SDL_SetRenderDrawColor(renderer, bg_color.r, bg_color.g, bg_color.b, bg_color.a);
     SDL_RenderFillRect(renderer, &rect);
 }
 
@@ -248,8 +247,7 @@ main(int argc, char *argv[])
     loadFont();
 
     /* draw the background, we'll just paint over it */
-    SDL_SetRenderDrawColor(renderer, bg_color.r, bg_color.g, bg_color.b,
-                           bg_color.unused);
+    SDL_SetRenderDrawColor(renderer, bg_color.r, bg_color.g, bg_color.b, bg_color.a);
     SDL_RenderFillRect(renderer, NULL);
     SDL_RenderPresent(renderer);
 
diff --git a/Xcode-iOS/Demos/src/mixer.c b/Xcode-iOS/Demos/src/mixer.c
index 526abb07b..bd0cfb1df 100644
--- a/Xcode-iOS/Demos/src/mixer.c
+++ b/Xcode-iOS/Demos/src/mixer.c
@@ -171,7 +171,7 @@ render(SDL_Renderer *renderer)
     for (i = 0; i < NUM_DRUMS; i++) {
         SDL_Color color =
             buttons[i].isPressed ? buttons[i].downColor : buttons[i].upColor;
-        SDL_SetRenderDrawColor(renderer, color.r, color.g, color.b, color.unused);
+        SDL_SetRenderDrawColor(renderer, color.r, color.g, color.b, color.a);
         SDL_RenderFillRect(renderer, &buttons[i].rect);
     }
     /* update the screen */

From a8d039c4fe18112bfd47dd9512c64225fcb4029a Mon Sep 17 00:00:00 2001
From: Andreas Schiffler 
Date: Thu, 6 Jun 2013 07:25:41 -0700
Subject: [PATCH 208/542] Remove unnecessary debugger detection logic again
 from Win32 SDL_LogOutput

---
 src/SDL_log.c | 8 ++------
 1 file changed, 2 insertions(+), 6 deletions(-)

diff --git a/src/SDL_log.c b/src/SDL_log.c
index 272943035..5a51fcf34 100644
--- a/src/SDL_log.c
+++ b/src/SDL_log.c
@@ -309,7 +309,6 @@ SDL_LogOutput(void *userdata, int category, SDL_LogPriority priority,
         char *output;
         size_t length;
         LPTSTR tstr;
-        BOOL pbRemoteDebuggerPresent;        
         BOOL attachResult;
         DWORD attachError;
         unsigned long charsWritten; 
@@ -347,11 +346,8 @@ SDL_LogOutput(void *userdata, int category, SDL_LogPriority priority,
         SDL_snprintf(output, length, "%s: %s\n", SDL_priority_prefixes[priority], message);
         tstr = WIN_UTF8ToString(output);
         
-        /* Debugger output, if attached. Check each time since debugger can be attached at runtime. */
-        CheckRemoteDebuggerPresent(GetCurrentProcess(), &pbRemoteDebuggerPresent);
-        if (pbRemoteDebuggerPresent || IsDebuggerPresent()) {
-            OutputDebugString(tstr);
-        }
+        /* Output to debugger */
+        OutputDebugString(tstr);
        
         /* Screen output to stderr, if console was attached. */
         if (consoleAttached == 1) {

From 0e48e3563bc7a735fde52440633f8ee665f07ecf Mon Sep 17 00:00:00 2001
From: Sam Lantinga 
Date: Thu, 6 Jun 2013 17:59:01 -0700
Subject: [PATCH 209/542] The triggers should be expanded out to the full range
 to match DirectInput behavior. The game controller code will scale them back
 to 0 - 32767 when it converts the triggers axes.

---
 src/joystick/windows/SDL_dxjoystick.c | 4 ++--
 1 file changed, 2 insertions(+), 2 deletions(-)

diff --git a/src/joystick/windows/SDL_dxjoystick.c b/src/joystick/windows/SDL_dxjoystick.c
index 629cc3408..ef894fe57 100644
--- a/src/joystick/windows/SDL_dxjoystick.c
+++ b/src/joystick/windows/SDL_dxjoystick.c
@@ -1499,8 +1499,8 @@ SDL_SYS_JoystickUpdate_XInput(SDL_Joystick * joystick)
         SDL_PrivateJoystickAxis(joystick, 1, (Sint16)(-1*pXInputState->Gamepad.sThumbLY-1) );
         SDL_PrivateJoystickAxis(joystick, 2, (Sint16)pXInputState->Gamepad.sThumbRX );
         SDL_PrivateJoystickAxis(joystick, 3, (Sint16)(-1*pXInputState->Gamepad.sThumbRY-1) );
-        SDL_PrivateJoystickAxis(joystick, 4, (Sint16)((int)pXInputState->Gamepad.bLeftTrigger*32767/255) );
-        SDL_PrivateJoystickAxis(joystick, 5, (Sint16)((int)pXInputState->Gamepad.bRightTrigger*32767/255) );
+        SDL_PrivateJoystickAxis(joystick, 4, (Sint16)(((int)pXInputState->Gamepad.bLeftTrigger*65535/255) - 32768));
+        SDL_PrivateJoystickAxis(joystick, 5, (Sint16)(((int)pXInputState->Gamepad.bRightTrigger*65535/255) - 32768));
 
         if ( ButtonChanged( pXInputState->Gamepad.wButtons, pXInputStatePrev->Gamepad.wButtons, XINPUT_GAMEPAD_DPAD_UP ) )
             SDL_PrivateJoystickButton(joystick, 0, pXInputState->Gamepad.wButtons & XINPUT_GAMEPAD_DPAD_UP ? SDL_PRESSED :  SDL_RELEASED );

From 6879bf00c435f0200346d386d12615b87eb3c052 Mon Sep 17 00:00:00 2001
From: Sam Lantinga 
Date: Thu, 6 Jun 2013 18:20:06 -0700
Subject: [PATCH 210/542] Fixed crash trying to get the GUID of an invalid
 joystick index

---
 src/joystick/SDL_joystick.c | 6 ++++++
 1 file changed, 6 insertions(+)

diff --git a/src/joystick/SDL_joystick.c b/src/joystick/SDL_joystick.c
index 0342e6ba9..a4417c6cb 100644
--- a/src/joystick/SDL_joystick.c
+++ b/src/joystick/SDL_joystick.c
@@ -729,6 +729,12 @@ SDL_PrivateJoystickNeedsPolling()
 /* return the guid for this index */
 SDL_JoystickGUID SDL_JoystickGetDeviceGUID(int device_index)
 {
+    if ((device_index < 0) || (device_index >= SDL_NumJoysticks())) {
+        SDL_JoystickGUID emptyGUID;
+        SDL_SetError("There are %d joysticks available", SDL_NumJoysticks());
+        SDL_zero( emptyGUID );
+        return emptyGUID;
+    }
     return SDL_SYS_JoystickGetDeviceGUID( device_index );
 }
 

From f26e1bc17541b6afb090d94678af2ef0a23b052c Mon Sep 17 00:00:00 2001
From: Sam Lantinga 
Date: Thu, 6 Jun 2013 23:18:36 -0700
Subject: [PATCH 211/542] Fixed bug 1897 - CPU spike on Windows with WM_EVENT
 and OpenGL

buckyballreaction

On some Windows systems, when switching from fullscreen to windowed mode in my game, the CPU will spike and the application never shows the window again.

See the part of the e-mail thread here:

http://lists.libsdl.org/pipermail/sdl-libsdl.org/2013-June/088626.html

I change the window by calling:

SDL_SetWindowFullscreen(gScreenInfo.sdlWindow, SDL_FALSE);
SDL_SetWindowSize(gScreenInfo.sdlWindow, sdlWindowWidth, sdlWindowHeight);

which you can see in our source:

https://code.google.com/p/bitfighter/source/browse/zap/VideoSystem.cpp#377

Then all of a sudden the application gets stuck in WIN_PumpEvents() in SDL_windowsevents.c.  I turned on WMMSG_DEBUG and found that there was an endless stream of WM_EVENT messages.  I also found that where WM_PAINT is being handled in the callback WIN_WindowProc(), ValidateRect is somehow not clearing, or it is persisting, the WM_EVENT message like it's supposed to (according to the docs).

This may be a hardware issue.  The issue has appeared on three different systems, one of them sporadically:
 - Windows XP SP3 running in VMware 9.0 (without VMWare 3D acceleration, but with the tools and drivers installed), Host: openSUSE 12.3 x86_64, NVidia NVS 3100M
 - Windows XP SP3 64bit running in VirtualBox, Host: Debian Wheezy (stable), Mobility Radeon HD 4100 (this was the sporadic one)
 - Windows 7 64 bit, Radeon 6770
---
 src/video/windows/SDL_windowsevents.c | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/src/video/windows/SDL_windowsevents.c b/src/video/windows/SDL_windowsevents.c
index dcd183d6f..ca799ff80 100644
--- a/src/video/windows/SDL_windowsevents.c
+++ b/src/video/windows/SDL_windowsevents.c
@@ -644,7 +644,7 @@ WIN_WindowProc(HWND hwnd, UINT msg, WPARAM wParam, LPARAM lParam)
         {
             RECT rect;
             if (GetUpdateRect(hwnd, &rect, FALSE)) {
-                ValidateRect(hwnd, &rect);
+                ValidateRect(hwnd, NULL);
                 SDL_SendWindowEvent(data->window, SDL_WINDOWEVENT_EXPOSED,
                                     0, 0);
             }

From 7de1fa00ff5a307d70212e73489de10931b06188 Mon Sep 17 00:00:00 2001
From: Sam Lantinga 
Date: Fri, 7 Jun 2013 08:48:25 -0700
Subject: [PATCH 212/542] It's better not to have the full range of the axis
 (by 1 on the negative side) than turn 0 value into -1

---
 src/joystick/windows/SDL_dxjoystick.c | 12 ++++++------
 1 file changed, 6 insertions(+), 6 deletions(-)

diff --git a/src/joystick/windows/SDL_dxjoystick.c b/src/joystick/windows/SDL_dxjoystick.c
index ef894fe57..2c1fdbe2e 100644
--- a/src/joystick/windows/SDL_dxjoystick.c
+++ b/src/joystick/windows/SDL_dxjoystick.c
@@ -1495,12 +1495,12 @@ SDL_SYS_JoystickUpdate_XInput(SDL_Joystick * joystick)
         XINPUT_STATE_EX *pXInputState = &joystick->hwdata->XInputState[joystick->hwdata->currentXInputSlot];
         XINPUT_STATE_EX *pXInputStatePrev = &joystick->hwdata->XInputState[joystick->hwdata->currentXInputSlot ^ 1];
 
-        SDL_PrivateJoystickAxis(joystick, 0, (Sint16)pXInputState->Gamepad.sThumbLX );
-        SDL_PrivateJoystickAxis(joystick, 1, (Sint16)(-1*pXInputState->Gamepad.sThumbLY-1) );
-        SDL_PrivateJoystickAxis(joystick, 2, (Sint16)pXInputState->Gamepad.sThumbRX );
-        SDL_PrivateJoystickAxis(joystick, 3, (Sint16)(-1*pXInputState->Gamepad.sThumbRY-1) );
-        SDL_PrivateJoystickAxis(joystick, 4, (Sint16)(((int)pXInputState->Gamepad.bLeftTrigger*65535/255) - 32768));
-        SDL_PrivateJoystickAxis(joystick, 5, (Sint16)(((int)pXInputState->Gamepad.bRightTrigger*65535/255) - 32768));
+        SDL_PrivateJoystickAxis( joystick, 0, (Sint16)pXInputState->Gamepad.sThumbLX );
+        SDL_PrivateJoystickAxis( joystick, 1, (Sint16)(-pXInputState->Gamepad.sThumbLY) );
+        SDL_PrivateJoystickAxis( joystick, 2, (Sint16)pXInputState->Gamepad.sThumbRX );
+        SDL_PrivateJoystickAxis( joystick, 3, (Sint16)(-pXInputState->Gamepad.sThumbRY) );
+        SDL_PrivateJoystickAxis( joystick, 4, (Sint16)(((int)pXInputState->Gamepad.bLeftTrigger*65535/255) - 32768));
+        SDL_PrivateJoystickAxis( joystick, 5, (Sint16)(((int)pXInputState->Gamepad.bRightTrigger*65535/255) - 32768));
 
         if ( ButtonChanged( pXInputState->Gamepad.wButtons, pXInputStatePrev->Gamepad.wButtons, XINPUT_GAMEPAD_DPAD_UP ) )
             SDL_PrivateJoystickButton(joystick, 0, pXInputState->Gamepad.wButtons & XINPUT_GAMEPAD_DPAD_UP ? SDL_PRESSED :  SDL_RELEASED );

From 612ec5d29dbc5471638d0615e047a9d8136966a7 Mon Sep 17 00:00:00 2001
From: Sam Lantinga 
Date: Fri, 7 Jun 2013 09:39:10 -0700
Subject: [PATCH 213/542] Slightly more efficient to check the event type first

---
 src/joystick/SDL_joystick.c | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/src/joystick/SDL_joystick.c b/src/joystick/SDL_joystick.c
index a4417c6cb..0c28ca504 100644
--- a/src/joystick/SDL_joystick.c
+++ b/src/joystick/SDL_joystick.c
@@ -611,7 +611,7 @@ SDL_PrivateJoystickButton(SDL_Joystick * joystick, Uint8 button, Uint8 state)
 
     /* We ignore events if we don't have keyboard focus, except for button
      * release. */
-    if (SDL_PrivateJoystickShouldIgnoreEvent() && event.type == SDL_JOYBUTTONDOWN) {
+    if (event.type == SDL_JOYBUTTONDOWN && SDL_PrivateJoystickShouldIgnoreEvent()) {
         return 0;
     }
 

From 80917f15379a67fc279763559c3dd924761852e0 Mon Sep 17 00:00:00 2001
From: Sam Lantinga 
Date: Fri, 7 Jun 2013 09:40:07 -0700
Subject: [PATCH 214/542] Removed redundant "Controller" names from gamepads,
 added mapping for Logitech F710 in DirectInput mode

---
 src/joystick/SDL_gamecontroller.c | 13 +++++++------
 1 file changed, 7 insertions(+), 6 deletions(-)

diff --git a/src/joystick/SDL_gamecontroller.c b/src/joystick/SDL_gamecontroller.c
index e0d9bc74c..a9845c016 100644
--- a/src/joystick/SDL_gamecontroller.c
+++ b/src/joystick/SDL_gamecontroller.c
@@ -96,27 +96,28 @@ const char *s_ControllerMappings [] =
     "4c056802000000000000504944564944,PS3 Controller,a:b14,b:b13,y:b12,x:b15,start:b3,guide:b16,back:b0,leftstick:b1,rightstick:b2,leftshoulder:b10,rightshoulder:b11,dpup:b4,dpleft:b7,dpdown:b6,dpright:b5,leftx:a0,lefty:a1,rightx:a2,righty:a3,lefttrigger:b8,righttrigger:b9,",
     "25090500000000000000504944564944,PS3 DualShock,a:b2,b:b1,x:b0,y:b3,start:b8,guide:,back:b9,leftstick:b10,rightstick:b11,leftshoulder:b6,rightshoulder:b7,dpup:h0.1,dpleft:h0.4,dpdown:h0.8,dpright:h0.2,leftx:a0,lefty:a1,rightx:a2,righty:a3,lefttrigger:b4,righttrigger:b5",
     "ffff0000000000000000504944564944,GameStop Gamepad,a:b0,b:b1,y:b3,x:b2,start:b9,guide:,back:b8,leftstick:b10,rightstick:b11,leftshoulder:b4,rightshoulder:b5,dpup:h0.1,dpleft:h0.8,dpdown:h0.4,dpright:h0.2,leftx:a0,lefty:a1,rightx:a2,righty:a3,lefttrigger:b6,righttrigger:b7,",
+	"6d0419c2000000000000504944564944,Logitech F710 Gamepad,a:b1,b:b2,y:b3,x:b0,start:b9,back:b8,leftstick:b10,rightstick:b11,leftshoulder:b4,rightshoulder:b5,dpup:h0.1,dpleft:h0.8,dpdown:h0.4,dpright:h0.2,leftx:a0,lefty:a1,rightx:a2,righty:a3,lefttrigger:b6,righttrigger:b7,", /* Guide button doesn't seem to be sent in DInput mode. */
     "6d0416c2000000000000504944564944,Generic DirectInput Controller,a:b1,b:b2,y:b3,x:b0,start:b9,back:b8,leftstick:b10,rightstick:b11,leftshoulder:b4,rightshoulder:b5,dpup:h0.1,dpleft:h0.8,dpdown:h0.4,dpright:h0.2,leftx:a0,lefty:a1,rightx:a2,righty:a3,lefttrigger:b6,righttrigger:b7,",
 #elif defined(__MACOSX__)
     "5e040000000000008e02000000000000,X360 Controller,a:b0,b:b1,y:b3,x:b2,start:b8,guide:b10,back:b9,dpup:b11,dpleft:b13,dpdown:b12,dpright:b14,leftshoulder:b4,rightshoulder:b5,leftstick:b6,rightstick:b7,leftx:a0,lefty:a1,rightx:a3,righty:a4,lefttrigger:a2,righttrigger:a5",
     "4c050000000000006802000000000000,PS3 Controller,a:b14,b:b13,x:b15,y:b12,start:b3,guide:b16,back:b0,leftstick:b1,rightstick:b2,leftshoulder:b10,rightshoulder:b11,dpup:b4,dpleft:b7,dpdown:b6,dpright:b5,leftx:a0,lefty:a1,rightx:a2,righty:a3,lefttrigger:b8,righttrigger:b9",
     "0500000047532047616d657061640000,GameStop Gamepad,a:b0,b:b1,y:b3,x:b2,start:b9,guide:,back:b8,leftstick:b10,rightstick:b11,leftshoulder:b4,rightshoulder:b5,dpup:h0.1,dpleft:h0.8,dpdown:h0.4,dpright:h0.2,leftx:a0,lefty:a1,rightx:a2,righty:a3,lefttrigger:b6,righttrigger:b7,",
-    "6d040000000000001fc2000000000000,Logitech F710 Gamepad Controller (XInput),a:b0,b:b1,y:b3,x:b2,start:b8,guide:b10,back:b9,leftstick:b6,rightstick:b7,leftshoulder:b4,rightshoulder:b5,dpup:b11,dpleft:b13,dpdown:b12,dpright:b14,leftx:a0,lefty:a1,rightx:a3,righty:a4,lefttrigger:a2,righttrigger:a5,",
-    "6d0400000000000016c2000000000000,Logitech F310 Gamepad Controller (DInput),a:b1,b:b2,y:b3,x:b0,start:b9,back:b8,leftstick:b10,rightstick:b11,leftshoulder:b4,rightshoulder:b5,dpup:h0.1,dpleft:h0.8,dpdown:h0.4,dpright:h0.2,leftx:a0,lefty:a1,rightx:a2,righty:a3,lefttrigger:b6,righttrigger:b7,", /* Guide button doesn't seem to be sent in DInput mode. */
-    "6d0400000000000019c2000000000000,Logitech Wireless Gamepad Controller (DInput),a:b1,b:b2,y:b3,x:b0,start:b9,back:b8,leftstick:b10,rightstick:b11,leftshoulder:b4,rightshoulder:b5,dpup:h0.1,dpleft:h0.8,dpdown:h0.4,dpright:h0.2,leftx:a0,lefty:a1,rightx:a2,righty:a3,lefttrigger:b6,righttrigger:b7,", /* This includes F710 in DInput mode and the "Logitech Cordless RumblePad 2", at the very least. */
+    "6d040000000000001fc2000000000000,Logitech F710 Gamepad (XInput),a:b0,b:b1,y:b3,x:b2,start:b8,guide:b10,back:b9,leftstick:b6,rightstick:b7,leftshoulder:b4,rightshoulder:b5,dpup:b11,dpleft:b13,dpdown:b12,dpright:b14,leftx:a0,lefty:a1,rightx:a3,righty:a4,lefttrigger:a2,righttrigger:a5,",
+    "6d0400000000000016c2000000000000,Logitech F310 Gamepad (DInput),a:b1,b:b2,y:b3,x:b0,start:b9,back:b8,leftstick:b10,rightstick:b11,leftshoulder:b4,rightshoulder:b5,dpup:h0.1,dpleft:h0.8,dpdown:h0.4,dpright:h0.2,leftx:a0,lefty:a1,rightx:a2,righty:a3,lefttrigger:b6,righttrigger:b7,", /* Guide button doesn't seem to be sent in DInput mode. */
+    "6d0400000000000019c2000000000000,Logitech Wireless Gamepad (DInput),a:b1,b:b2,y:b3,x:b0,start:b9,back:b8,leftstick:b10,rightstick:b11,leftshoulder:b4,rightshoulder:b5,dpup:h0.1,dpleft:h0.8,dpdown:h0.4,dpright:h0.2,leftx:a0,lefty:a1,rightx:a2,righty:a3,lefttrigger:b6,righttrigger:b7,", /* This includes F710 in DInput mode and the "Logitech Cordless RumblePad 2", at the very least. */
     "6d0400000000000018c2000000000000,Logitech Rumble Gamepad F510(DInput),a:b1,b:b2,y:b3,x:b0,start:b9,back:b8,leftstick:b10,rightstick:b11,leftshoulder:b4,rightshoulder:b5,dpup:h0.1,dpleft:h0.8,dpdown:h0.4,dpright:h0.2,leftx:a0,rightx:a2,lefty:a1,righty:a3,lefttrigger:b6,righttrigger:b7,",
 #elif defined(__LINUX__)
     "030000005e0400008e02000014010000,X360 Controller,a:b0,b:b1,y:b3,x:b2,start:b7,guide:b8,back:b6,dpup:h0.1,dpleft:h0.8,dpdown:h0.4,dpright:h0.2,leftshoulder:b4,rightshoulder:b5,leftstick:b9,rightstick:b10,leftx:a0,lefty:a1,rightx:a3,righty:a4,lefttrigger:a2,righttrigger:a5",
     "030000005e0400008e02000010010000,X360 Controller,a:b0,b:b1,y:b3,x:b2,start:b7,guide:b8,back:b6,leftstick:b9,rightstick:b10,leftshoulder:b4,rightshoulder:b5,dpup:h0.1,dpleft:h0.8,dpdown:h0.4,dpright:h0.2,leftx:a0,lefty:a1,rightx:a3,righty:a4,lefttrigger:a2,righttrigger:a5,",
     "030000005e0400001907000000010000,X360 Wireless Controller,a:b0,b:b1,y:b3,x:b2,start:b7,guide:b8,back:b6,leftstick:b9,rightstick:b10,leftshoulder:b4,rightshoulder:b5,dpup:b13,dpleft:b11,dpdown:b14,dpright:b12,leftx:a0,lefty:a1,rightx:a3,righty:a4,lefttrigger:a2,righttrigger:a5,",
     "030000004c0500006802000011010000,PS3 Controller,a:b14,b:b13,x:b15,y:b12,start:b3,guide:b16,back:b0,leftstick:b1,rightstick:b2,leftshoulder:b10,rightshoulder:b11,dpup:b4,dpleft:b7,dpdown:b6,dpright:b5,leftx:a0,lefty:a1,rightx:a2,righty:a3,lefttrigger:b8,righttrigger:b9",
-    "030000006d0400001fc2000005030000,Logitech F710 Gamepad Controller (XInput),a:b0,b:b1,y:b3,x:b2,start:b7,guide:b8,back:b6,leftstick:b9,rightstick:b10,leftshoulder:b4,rightshoulder:b5,dpup:h0.1,dpleft:h0.8,dpdown:h0.4,dpright:h0.2,leftx:a0,lefty:a1,rightx:a3,righty:a4,lefttrigger:a2,righttrigger:a5,",
-    "030000006d04000019c2000011010000,Logitech F710 Gamepad Controller (DInput),a:b1,b:b2,y:b3,x:b0,start:b9,back:b8,leftstick:b10,rightstick:b11,leftshoulder:b4,rightshoulder:b5,dpup:h0.1,dpleft:h0.8,dpdown:h0.4,dpright:h0.2,leftx:a0,lefty:a1,rightx:a2,righty:a3,lefttrigger:b6,righttrigger:b7,", /* Guide button doesn't seem to be sent in DInput mode. */
+    "030000006d0400001fc2000005030000,Logitech F710 Gamepad (XInput),a:b0,b:b1,y:b3,x:b2,start:b7,guide:b8,back:b6,leftstick:b9,rightstick:b10,leftshoulder:b4,rightshoulder:b5,dpup:h0.1,dpleft:h0.8,dpdown:h0.4,dpright:h0.2,leftx:a0,lefty:a1,rightx:a3,righty:a4,lefttrigger:a2,righttrigger:a5,",
+    "030000006d04000019c2000011010000,Logitech F710 Gamepad (DInput),a:b1,b:b2,y:b3,x:b0,start:b9,back:b8,leftstick:b10,rightstick:b11,leftshoulder:b4,rightshoulder:b5,dpup:h0.1,dpleft:h0.8,dpdown:h0.4,dpright:h0.2,leftx:a0,lefty:a1,rightx:a2,righty:a3,lefttrigger:b6,righttrigger:b7,", /* Guide button doesn't seem to be sent in DInput mode. */
     "030000006d0400001dc2000014400000,Logitech F310 Gamepad (XInput),a:b0,b:b1,y:b3,x:b2,start:b7,guide:b8,back:b6,leftstick:b9,rightstick:b10,leftshoulder:b4,rightshoulder:b5,dpup:h0.1,dpleft:h0.8,dpdown:h0.4,dpright:h0.2,leftx:a0,lefty:a1,rightx:a3,righty:a4,lefttrigger:a2,righttrigger:a5,",
     "030000006d04000019c2000010010000,Logitech Cordless RumblePad 2,a:b1,b:b2,y:b3,x:b0,start:b9,guide:,back:b8,leftstick:b10,rightstick:b11,leftshoulder:b4,rightshoulder:b5,dpup:h0.1,dpleft:h0.8,dpdown:h0.4,dpright:h0.2,leftx:a0,lefty:a1,rightx:a2,righty:a3,lefttrigger:b6,righttrigger:b7,",
     "0500000047532047616d657061640000,GameStop Gamepad,a:b0,b:b1,y:b3,x:b2,start:b9,guide:,back:b8,leftstick:b10,rightstick:b11,leftshoulder:b4,rightshoulder:b5,dpup:h0.1,dpleft:h0.8,dpdown:h0.4,dpright:h0.2,leftx:a0,lefty:a1,rightx:a2,righty:a3,lefttrigger:b6,righttrigger:b7,",
     "03000000ba2200002010000001010000,Jess Technology USB Game Controller,start:b9,a:b2,b:b1,x:b3,y:b0,dpup:h0.1,dpleft:h0.8,dpdown:h0.4,dpright:h0.2,leftx:a0,lefty:a1,rightx:a3,righty:a2,lefttrigger:b6,righttrigger:b7,leftshoulder:b4,rightshoulder:b5,guide:,back:b8",
-    "030000006d0400001ec2000020200000,Logitech Rumble Gamepad F510(XInput),a:b0,b:b1,x:b2,y:b3,start:b7,back:b6,guide:b8,leftstick:b9,rightstick:b10,leftshoulder:b4,rightshoulder:b5,dpup:h0.1,dpleft:h0.8,dpdown:h0.4,dpright:h0.2,leftx:a0,lefty:a1,rightx:a3,righty:a4,lefttrigger:a2,righttrigger:a5,",
+    "030000006d0400001ec2000020200000,Logitech Rumble Gamepad F510 (XInput),a:b0,b:b1,x:b2,y:b3,start:b7,back:b6,guide:b8,leftstick:b9,rightstick:b10,leftshoulder:b4,rightshoulder:b5,dpup:h0.1,dpleft:h0.8,dpdown:h0.4,dpright:h0.2,leftx:a0,lefty:a1,rightx:a3,righty:a4,lefttrigger:a2,righttrigger:a5,",
 #endif
     NULL
 };

From 4c59063d54ba616a149d1f1a4364795d504d22eb Mon Sep 17 00:00:00 2001
From: Sam Lantinga 
Date: Fri, 7 Jun 2013 18:26:55 -0700
Subject: [PATCH 215/542] Check for well known XInput device GUIDs before
 enumerating the device list.

---
 src/joystick/windows/SDL_dxjoystick.c | 15 +++++++++++++--
 1 file changed, 13 insertions(+), 2 deletions(-)

diff --git a/src/joystick/windows/SDL_dxjoystick.c b/src/joystick/windows/SDL_dxjoystick.c
index 2c1fdbe2e..7a61947f2 100644
--- a/src/joystick/windows/SDL_dxjoystick.c
+++ b/src/joystick/windows/SDL_dxjoystick.c
@@ -396,11 +396,11 @@ SetDIerror(const char *function, HRESULT code)
     }                                               \
 }
 
-
 DEFINE_GUID(CLSID_WbemLocator,   0x4590f811,0x1d3a,0x11d0,0x89,0x1F,0x00,0xaa,0x00,0x4b,0x2e,0x24);
-/* The Windows SDK doesn't define this GUID */
 DEFINE_GUID(IID_IWbemLocator,    0xdc12a687,0x737f,0x11cf,0x88,0x4d,0x00,0xaa,0x00,0x4b,0x2e,0x24);
 
+DEFINE_GUID(IID_ValveStreamingGamepad,  MAKELONG( 0x28DE, 0x11FF ),0x0000,0x0000,0x00,0x00,0x50,0x49,0x44,0x56,0x49,0x44);
+
 /*-----------------------------------------------------------------------------
  *
  * code from MSDN: http://msdn.microsoft.com/en-us/library/windows/desktop/ee417014(v=vs.85).aspx
@@ -411,6 +411,9 @@ DEFINE_GUID(IID_IWbemLocator,    0xdc12a687,0x737f,0x11cf,0x88,0x4d,0x00,0xaa,0x
  *-----------------------------------------------------------------------------*/
 BOOL IsXInputDevice( const GUID* pGuidProductFromDirectInput )
 {
+    static const GUID *s_XInputProductGUID[] = {
+        &IID_ValveStreamingGamepad
+    };
     IWbemLocator*           pIWbemLocator  = NULL;
     IEnumWbemClassObject*   pEnumDevices   = NULL;
     IWbemClassObject*       pDevices[20];
@@ -430,6 +433,14 @@ BOOL IsXInputDevice( const GUID* pGuidProductFromDirectInput )
         return SDL_FALSE;
     }
 
+    // Check for well known XInput device GUIDs
+    // We need to do this for the Valve Streaming Gamepad because it's virtualized and doesn't show up in the device list.
+    for ( iDevice = 0; iDevice < SDL_arraysize(s_XInputProductGUID); ++iDevice ) {
+        if (SDL_memcmp(pGuidProductFromDirectInput, s_XInputProductGUID[iDevice], sizeof(GUID)) == 0) {
+            return SDL_TRUE;
+        }
+    }
+
     SDL_memset( pDevices, 0x0, sizeof(pDevices) );
 
     /* CoInit if needed */

From b7c62a83d9ebff230c7f1f6626a38cef245081cb Mon Sep 17 00:00:00 2001
From: Sam Lantinga 
Date: Fri, 7 Jun 2013 21:47:23 -0700
Subject: [PATCH 216/542] Improved find_lib, gets the latest version of libpng,
 etc.

---
 configure.in | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/configure.in b/configure.in
index e90ff7b6c..25668e3fd 100644
--- a/configure.in
+++ b/configure.in
@@ -119,7 +119,7 @@ find_lib()
         host_lib_path="/usr/$base_libdir /usr/local/$base_libdir"
     fi
     for path in $gcc_bin_path $gcc_lib_path $env_lib_path $host_lib_path; do
-        lib=[`ls -- $path/$1 2>/dev/null | sort | sed 's/.*\/\(.*\)/\1/; q'`]
+        lib=[`ls -- $path/$1 2>/dev/null | sed -e '/\.so\..*\./d' -e 's,.*/,,' | sort | tail -1`]
         if test x$lib != x; then
             echo $lib
             return

From d8de838dfe5cb2968cd5a62a30cc0051a8036a28 Mon Sep 17 00:00:00 2001
From: Sam Lantinga 
Date: Fri, 7 Jun 2013 21:50:29 -0700
Subject: [PATCH 217/542] Updated configure

---
 .../Demos/Demos.xcodeproj/project.pbxproj     | 15 ----
 Xcode-iOS/Demos/Info.plist                    |  2 +
 Xcode-iOS/Demos/src/rectangles.c              | 77 +++++++++----------
 configure                                     |  2 +-
 4 files changed, 39 insertions(+), 57 deletions(-)

diff --git a/Xcode-iOS/Demos/Demos.xcodeproj/project.pbxproj b/Xcode-iOS/Demos/Demos.xcodeproj/project.pbxproj
index 29ebd4dde..e3eaecdae 100755
--- a/Xcode-iOS/Demos/Demos.xcodeproj/project.pbxproj
+++ b/Xcode-iOS/Demos/Demos.xcodeproj/project.pbxproj
@@ -154,13 +154,6 @@
 			remoteGlobalIDString = FD6526620DE8FCCB002AD96B;
 			remoteInfo = libSDL;
 		};
-		04AB757011E563D200BE9753 /* PBXContainerItemProxy */ = {
-			isa = PBXContainerItemProxy;
-			containerPortal = FD1B48920E313154007AB34E /* SDL.xcodeproj */;
-			proxyType = 2;
-			remoteGlobalIDString = 006E982211955059001DE610;
-			remoteInfo = testsdl;
-		};
 		FD1B489D0E313154007AB34E /* PBXContainerItemProxy */ = {
 			isa = PBXContainerItemProxy;
 			containerPortal = FD1B48920E313154007AB34E /* SDL.xcodeproj */;
@@ -374,7 +367,6 @@
 			isa = PBXGroup;
 			children = (
 				FD1B489E0E313154007AB34E /* libSDL2.a */,
-				04AB757111E563D200BE9753 /* testsdl.app */,
 			);
 			name = Products;
 			sourceTree = "";
@@ -597,13 +589,6 @@
 /* End PBXProject section */
 
 /* Begin PBXReferenceProxy section */
-		04AB757111E563D200BE9753 /* testsdl.app */ = {
-			isa = PBXReferenceProxy;
-			fileType = wrapper.application;
-			path = testsdl.app;
-			remoteRef = 04AB757011E563D200BE9753 /* PBXContainerItemProxy */;
-			sourceTree = BUILT_PRODUCTS_DIR;
-		};
 		FD1B489E0E313154007AB34E /* libSDL2.a */ = {
 			isa = PBXReferenceProxy;
 			fileType = archive.ar;
diff --git a/Xcode-iOS/Demos/Info.plist b/Xcode-iOS/Demos/Info.plist
index c0f1179d3..0398f008b 100644
--- a/Xcode-iOS/Demos/Info.plist
+++ b/Xcode-iOS/Demos/Info.plist
@@ -24,5 +24,7 @@
 	1.0
 	NSMainNibFile
 	
+	UISupportedInterfaceOrientations
+	
 
 
diff --git a/Xcode-iOS/Demos/src/rectangles.c b/Xcode-iOS/Demos/src/rectangles.c
index 11e5f135c..391d9b093 100644
--- a/Xcode-iOS/Demos/src/rectangles.c
+++ b/Xcode-iOS/Demos/src/rectangles.c
@@ -37,50 +37,45 @@ render(SDL_Renderer *renderer)
 int
 main(int argc, char *argv[])
 {
-
-    SDL_Window *window;
-    SDL_Renderer *renderer;
-    int done;
-    SDL_Event event;
-
-    /* initialize SDL */
-    if (SDL_Init(SDL_INIT_VIDEO) < 0) {
-        fatalError("Could not initialize SDL");
+    if (SDL_Init(SDL_INIT_VIDEO/* | SDL_INIT_AUDIO*/) < 0)
+    {
+        printf("Unable to initialize SDL");
     }
-
-    /* seed random number generator */
-    srand(time(NULL));
-
-    /* create window and renderer */
-    window =
-        SDL_CreateWindow(NULL, 0, 0, SCREEN_WIDTH, SCREEN_HEIGHT,
-                         SDL_WINDOW_SHOWN);
-    if (window == 0) {
-        fatalError("Could not initialize Window");
-    }
-    renderer = SDL_CreateRenderer(window, -1, 0);
-    if (!renderer) {
-        fatalError("Could not create renderer");
-    }
-
-    /* Fill screen with black */
-    SDL_SetRenderDrawColor(renderer, 0, 0, 0, 255);
-    SDL_RenderClear(renderer);
-
-    /* Enter render loop, waiting for user to quit */
-    done = 0;
-    while (!done) {
-        while (SDL_PollEvent(&event)) {
-            if (event.type == SDL_QUIT) {
-                done = 1;
-            }
+    
+    SDL_LogSetAllPriority(SDL_LOG_PRIORITY_WARN);
+    SDL_GL_SetAttribute(SDL_GL_CONTEXT_MAJOR_VERSION, 2);
+    SDL_GL_SetAttribute(SDL_GL_DOUBLEBUFFER, 1);
+    
+    int landscape = 1;
+    int modes = SDL_GetNumDisplayModes(0);
+    int sx = 0, sy = 0;
+    for (int i = 0; i < modes; i++)
+    {
+        SDL_DisplayMode mode;
+        SDL_GetDisplayMode(0, i, &mode);
+        if (landscape ? mode.w > sx : mode.h > sy)
+        {
+            sx = mode.w;
+            sy = mode.h;
         }
-        render(renderer);
-        SDL_Delay(1);
     }
-
-    /* shutdown SDL */
-    SDL_Quit();
+    
+    printf("picked: %d %d\n", sx, sy);
+    
+    SDL_Window *_sdl_window = NULL;
+    SDL_GLContext _sdl_context = NULL;
+    
+    _sdl_window = SDL_CreateWindow("fred",
+                                   0, 0,
+                                   sx, sy,
+                                   SDL_WINDOW_OPENGL | SDL_WINDOW_SHOWN | SDL_WINDOW_BORDERLESS);
+    
+    SDL_SetHint("SDL_HINT_ORIENTATIONS", "LandscapeLeft LandscapeRight");
+    
+    int ax = 0, ay = 0;
+    SDL_GetWindowSize(_sdl_window, &ax, &ay);
+    
+    printf("given: %d %d\n", ax, ay);
 
     return 0;
 }
diff --git a/configure b/configure
index 789436acb..133c2a7ec 100755
--- a/configure
+++ b/configure
@@ -15846,7 +15846,7 @@ find_lib()
         host_lib_path="/usr/$base_libdir /usr/local/$base_libdir"
     fi
     for path in $gcc_bin_path $gcc_lib_path $env_lib_path $host_lib_path; do
-        lib=`ls -- $path/$1 2>/dev/null | sort | sed 's/.*\/\(.*\)/\1/; q'`
+        lib=`ls -- $path/$1 2>/dev/null | sed -e '/\.so\..*\./d' -e 's,.*/,,' | sort | tail -1`
         if test x$lib != x; then
             echo $lib
             return

From f54e7cdaa82c60948d087afcf5fc5a54ef99dc4c Mon Sep 17 00:00:00 2001
From: Philipp Wiesemann 
Date: Sun, 9 Jun 2013 11:51:59 +0200
Subject: [PATCH 218/542] Fixed Android Lint warning in AndroidManifest.xml. If
 targetSdkVersion not set it becomes same as minSdkVersion and causes warning.

---
 android-project/AndroidManifest.xml | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/android-project/AndroidManifest.xml b/android-project/AndroidManifest.xml
index d9460bf1f..1fd78b7b5 100644
--- a/android-project/AndroidManifest.xml
+++ b/android-project/AndroidManifest.xml
@@ -31,7 +31,7 @@
     
 
     
-     
+    
 
     
      

From ad82c94c55d9f95bf10782eb3b759040b92ab7aa Mon Sep 17 00:00:00 2001
From: Philipp Wiesemann 
Date: Sun, 9 Jun 2013 11:58:31 +0200
Subject: [PATCH 219/542] Updated names of README files in source comments.

---
 android-project/AndroidManifest.xml | 2 +-
 include/SDL_events.h                | 2 +-
 2 files changed, 2 insertions(+), 2 deletions(-)

diff --git a/android-project/AndroidManifest.xml b/android-project/AndroidManifest.xml
index 1fd78b7b5..27db41843 100644
--- a/android-project/AndroidManifest.xml
+++ b/android-project/AndroidManifest.xml
@@ -15,7 +15,7 @@
          then replace "SDLActivity" with the name of your class (e.g. "MyGame")
          in the XML below.
 
-         An example Java class can be found in README.android
+         An example Java class can be found in README-android.txt
     -->
     
Date: Mon, 10 Jun 2013 23:24:02 -0700
Subject: [PATCH 220/542] Made the SDL event queue dynamically allocated so we
 don't ever drop events.

---
 src/events/SDL_events.c | 245 ++++++++++++++++++++++++++--------------
 1 file changed, 161 insertions(+), 84 deletions(-)

diff --git a/src/events/SDL_events.c b/src/events/SDL_events.c
index 047a07d7a..3918580dd 100644
--- a/src/events/SDL_events.c
+++ b/src/events/SDL_events.c
@@ -53,17 +53,30 @@ static SDL_DisabledEventBlock *SDL_disabled_events[256];
 static Uint32 SDL_userevents = SDL_USEREVENT;
 
 /* Private data -- event queue */
-#define MAXEVENTS   128
+typedef struct _SDL_EventEntry
+{
+    SDL_Event event;
+    SDL_SysWMmsg msg;
+    struct _SDL_EventEntry *prev;
+    struct _SDL_EventEntry *next;
+} SDL_EventEntry;
+
+typedef struct _SDL_SysWMEntry
+{
+    SDL_SysWMmsg msg;
+    struct _SDL_SysWMEntry *next;
+} SDL_SysWMEntry;
+
 static struct
 {
     SDL_mutex *lock;
-    int active;
-    int head;
-    int tail;
-    SDL_Event event[MAXEVENTS];
-    int wmmsg_next;
-    struct SDL_SysWMmsg wmmsg[MAXEVENTS];
-} SDL_EventQ = { NULL, 1 };
+    volatile SDL_bool active;
+    SDL_EventEntry *head;
+    SDL_EventEntry *tail;
+    SDL_EventEntry *free;
+    SDL_SysWMEntry *wmmsg_used;
+    SDL_SysWMEntry *wmmsg_free;
+} SDL_EventQ = { NULL, SDL_TRUE };
 
 
 static __inline__ SDL_bool
@@ -85,18 +98,41 @@ void
 SDL_StopEventLoop(void)
 {
     int i;
-
-    SDL_EventQ.active = 0;
+    SDL_EventEntry *entry;
+    SDL_SysWMEntry *wmmsg;
 
     if (SDL_EventQ.lock) {
-        SDL_DestroyMutex(SDL_EventQ.lock);
-        SDL_EventQ.lock = NULL;
+        SDL_LockMutex(SDL_EventQ.lock);
     }
 
+    SDL_EventQ.active = SDL_FALSE;
+
     /* Clean out EventQ */
-    SDL_EventQ.head = 0;
-    SDL_EventQ.tail = 0;
-    SDL_EventQ.wmmsg_next = 0;
+    for (entry = SDL_EventQ.head; entry; ) {
+        SDL_EventEntry *next = entry->next;
+        SDL_free(entry);
+        entry = next;
+    }
+    for (entry = SDL_EventQ.free; entry; ) {
+        SDL_EventEntry *next = entry->next;
+        SDL_free(entry);
+        entry = next;
+    }
+    for (wmmsg = SDL_EventQ.wmmsg_used; wmmsg; ) {
+        SDL_SysWMEntry *next = wmmsg->next;
+        SDL_free(wmmsg);
+        wmmsg = next;
+    }
+    for (wmmsg = SDL_EventQ.wmmsg_free; wmmsg; ) {
+        SDL_SysWMEntry *next = wmmsg->next;
+        SDL_free(wmmsg);
+        wmmsg = next;
+    }
+    SDL_EventQ.head = NULL;
+    SDL_EventQ.tail = NULL;
+    SDL_EventQ.free = NULL;
+    SDL_EventQ.wmmsg_used = NULL;
+    SDL_EventQ.wmmsg_free = NULL;
 
     /* Clear disabled event state */
     for (i = 0; i < SDL_arraysize(SDL_disabled_events); ++i) {
@@ -112,6 +148,12 @@ SDL_StopEventLoop(void)
         SDL_free(tmp);
     }
     SDL_EventOK = NULL;
+
+    if (SDL_EventQ.lock) {
+        SDL_UnlockMutex(SDL_EventQ.lock);
+        SDL_DestroyMutex(SDL_EventQ.lock);
+        SDL_EventQ.lock = NULL;
+    }
 }
 
 /* This function (and associated calls) may be called more than once */
@@ -139,7 +181,7 @@ SDL_StartEventLoop(void)
     SDL_EventState(SDL_TEXTEDITING, SDL_DISABLE);
     SDL_EventState(SDL_SYSWMEVENT, SDL_DISABLE);
 
-    SDL_EventQ.active = 1;
+    SDL_EventQ.active = SDL_TRUE;
 
     return (0);
 }
@@ -149,55 +191,61 @@ SDL_StartEventLoop(void)
 static int
 SDL_AddEvent(SDL_Event * event)
 {
-    int tail, added;
+    SDL_EventEntry *entry;
 
-    tail = (SDL_EventQ.tail + 1) % MAXEVENTS;
-    if (tail == SDL_EventQ.head) {
-        /* Overflow, drop event */
-        added = 0;
-    } else {
-        SDL_EventQ.event[SDL_EventQ.tail] = *event;
-        if (event->type == SDL_SYSWMEVENT) {
-            /* Note that it's possible to lose an event */
-            int next = SDL_EventQ.wmmsg_next;
-            SDL_EventQ.wmmsg[next] = *event->syswm.msg;
-            SDL_EventQ.event[SDL_EventQ.tail].syswm.msg =
-                &SDL_EventQ.wmmsg[next];
-            SDL_EventQ.wmmsg_next = (next + 1) % MAXEVENTS;
+    if (SDL_EventQ.free == NULL) {
+        entry = (SDL_EventEntry *)SDL_malloc(sizeof(*entry));
+        if (!entry) {
+            return 0;
         }
-        SDL_EventQ.tail = tail;
-        added = 1;
+    } else {
+        entry = SDL_EventQ.free;
+        SDL_EventQ.free = entry->next;
     }
-    return (added);
+
+    entry->event = *event;
+    if (event->type == SDL_SYSWMEVENT) {
+        entry->msg = *event->syswm.msg;
+    }
+
+    if (SDL_EventQ.tail) {
+        SDL_EventQ.tail->next = entry;
+        entry->prev = SDL_EventQ.tail;
+        SDL_EventQ.tail = entry;
+        entry->next = NULL;
+    } else {
+        SDL_assert(!SDL_EventQ.head);
+        SDL_EventQ.head = entry;
+        SDL_EventQ.tail = entry;
+        entry->prev = NULL;
+        entry->next = NULL;
+    }
+
+    return 1;
 }
 
-/* Cut an event, and return the next valid spot, or the tail */
-/*                           -- called with the queue locked */
-static int
-SDL_CutEvent(int spot)
+/* Remove an event from the queue -- called with the queue locked */
+static void
+SDL_CutEvent(SDL_EventEntry *entry)
 {
-    if (spot == SDL_EventQ.head) {
-        SDL_EventQ.head = (SDL_EventQ.head + 1) % MAXEVENTS;
-        return (SDL_EventQ.head);
-    } else if ((spot + 1) % MAXEVENTS == SDL_EventQ.tail) {
-        SDL_EventQ.tail = spot;
-        return (SDL_EventQ.tail);
-    } else
-        /* We cut the middle -- shift everything over */
-    {
-        int here, next;
-
-        /* This can probably be optimized with SDL_memcpy() -- careful! */
-        if (--SDL_EventQ.tail < 0) {
-            SDL_EventQ.tail = MAXEVENTS - 1;
-        }
-        for (here = spot; here != SDL_EventQ.tail; here = next) {
-            next = (here + 1) % MAXEVENTS;
-            SDL_EventQ.event[here] = SDL_EventQ.event[next];
-        }
-        return (spot);
+    if (entry->prev) {
+        entry->prev->next = entry->next;
     }
-    /* NOTREACHED */
+    if (entry->next) {
+        entry->next->prev = entry->prev;
+    }
+
+    if (entry == SDL_EventQ.head) {
+        SDL_assert(entry->prev == NULL);
+        SDL_EventQ.head = entry->next;
+    }
+    if (entry == SDL_EventQ.tail) {
+        SDL_assert(entry->next == NULL);
+        SDL_EventQ.tail = entry->prev;
+    }
+
+    entry->next = SDL_EventQ.free;
+    SDL_EventQ.free = entry;
 }
 
 /* Lock the event queue, take a peep at it, and unlock it */
@@ -209,6 +257,10 @@ SDL_PeepEvents(SDL_Event * events, int numevents, SDL_eventaction action,
 
     /* Don't look after we've quit */
     if (!SDL_EventQ.active) {
+        /* We get a few spurious events at shutdown, so don't warn then */
+        if (action != SDL_ADDEVENT) {
+            SDL_SetError("The event system has been shut down");
+        }
         return (-1);
     }
     /* Lock the event queue */
@@ -219,8 +271,10 @@ SDL_PeepEvents(SDL_Event * events, int numevents, SDL_eventaction action,
                 used += SDL_AddEvent(&events[i]);
             }
         } else {
+            SDL_EventEntry *entry, *next;
+            SDL_SysWMEntry *wmmsg, *wmmsg_next;
             SDL_Event tmpevent;
-            int spot;
+            Uint32 type;
 
             /* If 'events' is NULL, just see if they exist */
             if (events == NULL) {
@@ -228,18 +282,44 @@ SDL_PeepEvents(SDL_Event * events, int numevents, SDL_eventaction action,
                 numevents = 1;
                 events = &tmpevent;
             }
-            spot = SDL_EventQ.head;
-            while ((used < numevents) && (spot != SDL_EventQ.tail)) {
-                Uint32 type = SDL_EventQ.event[spot].type;
+
+            /* Clean out any used wmmsg data
+               FIXME: Do we want to retain the data for some period of time?
+             */
+            for (wmmsg = SDL_EventQ.wmmsg_used; wmmsg; wmmsg = wmmsg_next) {
+                wmmsg_next = wmmsg->next;
+                wmmsg->next = SDL_EventQ.wmmsg_free;
+                SDL_EventQ.wmmsg_free = wmmsg;
+            }
+            SDL_EventQ.wmmsg_used = NULL;
+
+            for (entry = SDL_EventQ.head; entry && used < numevents; entry = next) {
+                next = entry->next;
+                type = entry->event.type;
                 if (minType <= type && type <= maxType) {
-                    events[used++] = SDL_EventQ.event[spot];
-                    if (action == SDL_GETEVENT) {
-                        spot = SDL_CutEvent(spot);
-                    } else {
-                        spot = (spot + 1) % MAXEVENTS;
+                    events[used] = entry->event;
+                    if (entry->event.type == SDL_SYSWMEVENT) {
+                        /* We need to copy the wmmsg somewhere safe.
+                           For now we'll guarantee it's valid at least until
+                           the next call to SDL_PeepEvents()
+                         */
+                        SDL_SysWMEntry *wmmsg;
+                        if (SDL_EventQ.wmmsg_free) {
+                            wmmsg = SDL_EventQ.wmmsg_free;
+                            SDL_EventQ.wmmsg_free = wmmsg->next;
+                        } else {
+                            wmmsg = (SDL_SysWMEntry *)SDL_malloc(sizeof(*wmmsg));
+                        }
+                        wmmsg->msg = *entry->event.syswm.msg;
+                        wmmsg->next = SDL_EventQ.wmmsg_used;
+                        SDL_EventQ.wmmsg_used = wmmsg;
+                        events[used].syswm.msg = &wmmsg->msg;
+                    }
+                    ++used;
+
+                    if (action == SDL_GETEVENT) {
+                        SDL_CutEvent(entry);
                     }
-                } else {
-                    spot = (spot + 1) % MAXEVENTS;
                 }
             }
         }
@@ -286,13 +366,13 @@ SDL_FlushEvents(Uint32 minType, Uint32 maxType)
 
     /* Lock the event queue */
     if (SDL_LockMutex(SDL_EventQ.lock) == 0) {
-        int spot = SDL_EventQ.head;
-        while (spot != SDL_EventQ.tail) {
-            Uint32 type = SDL_EventQ.event[spot].type;
+        SDL_EventEntry *entry, *next;
+        Uint32 type;
+        for (entry = SDL_EventQ.head; entry; entry = next) {
+            next = entry->next;
+            type = entry->event.type;
             if (minType <= type && type <= maxType) {
-                spot = SDL_CutEvent(spot);
-            } else {
-                spot = (spot + 1) % MAXEVENTS;
+                SDL_CutEvent(entry);
             }
         }
         SDL_UnlockMutex(SDL_EventQ.lock);
@@ -448,18 +528,15 @@ void
 SDL_FilterEvents(SDL_EventFilter filter, void *userdata)
 {
     if (SDL_LockMutex(SDL_EventQ.lock) == 0) {
-        int spot;
-
-        spot = SDL_EventQ.head;
-        while (spot != SDL_EventQ.tail) {
-            if (filter(userdata, &SDL_EventQ.event[spot])) {
-                spot = (spot + 1) % MAXEVENTS;
-            } else {
-                spot = SDL_CutEvent(spot);
+        SDL_EventEntry *entry, *next;
+        for (entry = SDL_EventQ.head; entry; entry = next) {
+            next = entry->next;
+            if (!filter(userdata, &entry->event)) {
+                SDL_CutEvent(entry);
             }
         }
+        SDL_UnlockMutex(SDL_EventQ.lock);
     }
-    SDL_UnlockMutex(SDL_EventQ.lock);
 }
 
 Uint8

From 4abe8a906b1d5cacfc86a63486e4a3b061740bac Mon Sep 17 00:00:00 2001
From: Sam Lantinga 
Date: Tue, 11 Jun 2013 08:32:55 -0700
Subject: [PATCH 221/542] Update the queued event wmmsg pointer to point to the
 queued event data.

---
 src/events/SDL_events.c | 1 +
 1 file changed, 1 insertion(+)

diff --git a/src/events/SDL_events.c b/src/events/SDL_events.c
index 3918580dd..12a851c6b 100644
--- a/src/events/SDL_events.c
+++ b/src/events/SDL_events.c
@@ -206,6 +206,7 @@ SDL_AddEvent(SDL_Event * event)
     entry->event = *event;
     if (event->type == SDL_SYSWMEVENT) {
         entry->msg = *event->syswm.msg;
+        entry->event.syswm.msg = &entry->msg;
     }
 
     if (SDL_EventQ.tail) {

From 5971051d9e51ca9ee94971fe9cf0bf991b603049 Mon Sep 17 00:00:00 2001
From: Sam Lantinga 
Date: Tue, 11 Jun 2013 08:37:03 -0700
Subject: [PATCH 222/542] Added an arbitrary limit to the number of queued
 events so it doesn't grow unbounded.

---
 src/events/SDL_events.c | 13 +++++++++++++
 1 file changed, 13 insertions(+)

diff --git a/src/events/SDL_events.c b/src/events/SDL_events.c
index 12a851c6b..9a067c232 100644
--- a/src/events/SDL_events.c
+++ b/src/events/SDL_events.c
@@ -33,6 +33,9 @@
 #endif
 #include "../video/SDL_sysvideo.h"
 
+/* An arbitrary limit so we don't have unbounded growth */
+#define SDL_MAX_QUEUED_EVENTS   65535
+
 /* Public data -- the event filter */
 SDL_EventFilter SDL_EventOK = NULL;
 void *SDL_EventOKParam;
@@ -71,6 +74,7 @@ static struct
 {
     SDL_mutex *lock;
     volatile SDL_bool active;
+    volatile int count;
     SDL_EventEntry *head;
     SDL_EventEntry *tail;
     SDL_EventEntry *free;
@@ -128,6 +132,7 @@ SDL_StopEventLoop(void)
         SDL_free(wmmsg);
         wmmsg = next;
     }
+    SDL_EventQ.count = 0;
     SDL_EventQ.head = NULL;
     SDL_EventQ.tail = NULL;
     SDL_EventQ.free = NULL;
@@ -193,6 +198,11 @@ SDL_AddEvent(SDL_Event * event)
 {
     SDL_EventEntry *entry;
 
+    if (SDL_EventQ.count >= SDL_MAX_QUEUED_EVENTS) {
+        SDL_SetError("Event queue is full (%d events)", SDL_EventQ.count);
+        return 0;
+    }
+
     if (SDL_EventQ.free == NULL) {
         entry = (SDL_EventEntry *)SDL_malloc(sizeof(*entry));
         if (!entry) {
@@ -221,6 +231,7 @@ SDL_AddEvent(SDL_Event * event)
         entry->prev = NULL;
         entry->next = NULL;
     }
+    ++SDL_EventQ.count;
 
     return 1;
 }
@@ -247,6 +258,8 @@ SDL_CutEvent(SDL_EventEntry *entry)
 
     entry->next = SDL_EventQ.free;
     SDL_EventQ.free = entry;
+    SDL_assert(SDL_EventQ.count > 0);
+    --SDL_EventQ.count;
 }
 
 /* Lock the event queue, take a peep at it, and unlock it */

From 5aa3492ef88f922d271ea9a080b0395dc1449baf Mon Sep 17 00:00:00 2001
From: Sam Lantinga 
Date: Thu, 13 Jun 2013 22:10:10 -0700
Subject: [PATCH 223/542] Fixed SDL building with the minimal configuration

---
 configure                       |  9 +++------
 configure.in                    |  9 +++------
 include/SDL_config.h.in         |  5 +++--
 include/SDL_config_minimal.h    | 12 ++++++++----
 include/SDL_stdinc.h            |  2 +-
 src/SDL_log.c                   |  4 +++-
 src/joystick/SDL_joystick.c     |  2 +-
 src/thread/generic/SDL_syssem.c | 10 +++++-----
 test/testpower.c                |  2 +-
 9 files changed, 28 insertions(+), 27 deletions(-)

diff --git a/configure b/configure
index 133c2a7ec..8258c396f 100755
--- a/configure
+++ b/configure
@@ -16936,7 +16936,10 @@ SOURCES="$SOURCES $srcdir/src/audio/*.c"
 SOURCES="$SOURCES $srcdir/src/cpuinfo/*.c"
 SOURCES="$SOURCES $srcdir/src/events/*.c"
 SOURCES="$SOURCES $srcdir/src/file/*.c"
+SOURCES="$SOURCES $srcdir/src/haptic/*.c"
+SOURCES="$SOURCES $srcdir/src/joystick/*.c"
 SOURCES="$SOURCES $srcdir/src/libm/*.c"
+SOURCES="$SOURCES $srcdir/src/power/*.c"
 SOURCES="$SOURCES $srcdir/src/render/*.c"
 SOURCES="$SOURCES $srcdir/src/render/*/*.c"
 SOURCES="$SOURCES $srcdir/src/stdlib/*.c"
@@ -17016,8 +17019,6 @@ if test x$enable_joystick != xyes; then
 
 $as_echo "#define SDL_JOYSTICK_DISABLED 1" >>confdefs.h
 
-else
-    SOURCES="$SOURCES $srcdir/src/joystick/*.c"
 fi
 # Check whether --enable-haptic was given.
 if test "${enable_haptic+set}" = set; then :
@@ -17030,8 +17031,6 @@ if test x$enable_haptic != xyes; then
 
 $as_echo "#define SDL_HAPTIC_DISABLED 1" >>confdefs.h
 
-else
-    SOURCES="$SOURCES $srcdir/src/haptic/*.c"
 fi
 # Check whether --enable-power was given.
 if test "${enable_power+set}" = set; then :
@@ -17044,8 +17043,6 @@ if test x$enable_power != xyes; then
 
 $as_echo "#define SDL_POWER_DISABLED 1" >>confdefs.h
 
-else
-    SOURCES="$SOURCES $srcdir/src/power/*.c"
 fi
 # Check whether --enable-threads was given.
 if test "${enable_threads+set}" = set; then :
diff --git a/configure.in b/configure.in
index 25668e3fd..2889c5106 100644
--- a/configure.in
+++ b/configure.in
@@ -297,7 +297,10 @@ SOURCES="$SOURCES $srcdir/src/audio/*.c"
 SOURCES="$SOURCES $srcdir/src/cpuinfo/*.c"
 SOURCES="$SOURCES $srcdir/src/events/*.c"
 SOURCES="$SOURCES $srcdir/src/file/*.c"
+SOURCES="$SOURCES $srcdir/src/haptic/*.c"
+SOURCES="$SOURCES $srcdir/src/joystick/*.c"
 SOURCES="$SOURCES $srcdir/src/libm/*.c"
+SOURCES="$SOURCES $srcdir/src/power/*.c"
 SOURCES="$SOURCES $srcdir/src/render/*.c"
 SOURCES="$SOURCES $srcdir/src/render/*/*.c"
 SOURCES="$SOURCES $srcdir/src/stdlib/*.c"
@@ -342,24 +345,18 @@ AC_HELP_STRING([--enable-joystick], [Enable the joystick subsystem [[default=yes
               , enable_joystick=yes)
 if test x$enable_joystick != xyes; then
     AC_DEFINE(SDL_JOYSTICK_DISABLED, 1, [ ])
-else
-    SOURCES="$SOURCES $srcdir/src/joystick/*.c"
 fi
 AC_ARG_ENABLE(haptic,
 AC_HELP_STRING([--enable-haptic], [Enable the haptic (force feedback) subsystem [[default=yes]]]),
               , enable_haptic=yes)
 if test x$enable_haptic != xyes; then
     AC_DEFINE(SDL_HAPTIC_DISABLED, 1, [ ])
-else
-    SOURCES="$SOURCES $srcdir/src/haptic/*.c"
 fi
 AC_ARG_ENABLE(power,
 AC_HELP_STRING([--enable-power], [Enable the power subsystem [[default=yes]]]),
               , enable_power=yes)
 if test x$enable_power != xyes; then
     AC_DEFINE(SDL_POWER_DISABLED, 1, [ ])
-else
-    SOURCES="$SOURCES $srcdir/src/power/*.c"
 fi
 AC_ARG_ENABLE(threads,
 AC_HELP_STRING([--enable-threads], [Enable the threading subsystem [[default=yes]]]),
diff --git a/include/SDL_config.h.in b/include/SDL_config.h.in
index b9ba3ffd4..5d5252fe6 100644
--- a/include/SDL_config.h.in
+++ b/include/SDL_config.h.in
@@ -158,8 +158,9 @@
 #undef HAVE_SEM_TIMEDWAIT
 
 #else
-/* We may need some replacement for stdarg.h here */
-#include 
+#define HAVE_STDARG_H   1
+#define HAVE_STDDEF_H   1
+#define HAVE_STDINT_H   1
 #endif /* HAVE_LIBC */
 
 /* SDL internal assertion support */
diff --git a/include/SDL_config_minimal.h b/include/SDL_config_minimal.h
index cadfcaa5e..fe3cebc7e 100644
--- a/include/SDL_config_minimal.h
+++ b/include/SDL_config_minimal.h
@@ -30,10 +30,12 @@
  *  This is the minimal configuration that can be used to build SDL.
  */
 
-#include 
-#include 
+#define HAVE_STDARG_H   1
+#define HAVE_STDDEF_H   1
 
-#if !defined(_STDINT_H_) && !defined(_STDINT_H) && (!defined(HAVE_STDINT_H) || !_HAVE_STDINT_H)
+/* Most everything except Visual Studio 2008 and earlier has stdint.h now */
+#if defined(_MSC_VER) && (_MSC_VER < 1600)
+/* Here are some reasonable defaults */
 typedef unsigned int size_t;
 typedef signed char int8_t;
 typedef unsigned char uint8_t;
@@ -44,7 +46,9 @@ typedef unsigned int uint32_t;
 typedef signed long long int64_t;
 typedef unsigned long long uint64_t;
 typedef unsigned long uintptr_t;
-#endif /* if (stdint.h isn't available) */
+#else
+#define HAVE_STDINT_H 1
+#endif /* Visual Studio 2008 */
 
 #ifdef __GNUC__
 #define HAVE_GCC_SYNC_LOCK_TEST_AND_SET 1
diff --git a/include/SDL_stdinc.h b/include/SDL_stdinc.h
index a53044517..3e36dcd2e 100644
--- a/include/SDL_stdinc.h
+++ b/include/SDL_stdinc.h
@@ -359,7 +359,7 @@ SDL_FORCE_INLINE void SDL_memset4(void *dst, int val, size_t len)
 
 
 extern DECLSPEC void *SDLCALL SDL_memcpy(void *dst, const void *src, size_t len);
-#if defined(__MACOSX__)
+#if defined(__MACOSX__) && defined(HAVE_MEMCPY)
 SDL_FORCE_INLINE void *SDL_memcpy_inline(void *dst, const void *src, size_t len)
 {
     /* We can count on memcpy existing on Mac OS X and being well-tuned. */
diff --git a/src/SDL_log.c b/src/SDL_log.c
index 5a51fcf34..6cbfaf0e9 100644
--- a/src/SDL_log.c
+++ b/src/SDL_log.c
@@ -369,7 +369,9 @@ SDL_LogOutput(void *userdata, int category, SDL_LogPriority priority,
         SDL_snprintf(tag, SDL_arraysize(tag), "SDL/%s", GetCategoryPrefix(category));
         __android_log_write(SDL_android_priority[priority], tag, message);
     }
-#elif defined(__APPLE__)
+#elif defined(__APPLE__) && defined(SDL_VIDEO_DRIVER_COCOA)
+    /* Technically we don't need SDL_VIDEO_DRIVER_COCOA, but that's where this function is defined for now.
+    */
     extern void SDL_NSLog(const char *text);
     {
         char *text;
diff --git a/src/joystick/SDL_joystick.c b/src/joystick/SDL_joystick.c
index 0c28ca504..375636c65 100644
--- a/src/joystick/SDL_joystick.c
+++ b/src/joystick/SDL_joystick.c
@@ -611,7 +611,7 @@ SDL_PrivateJoystickButton(SDL_Joystick * joystick, Uint8 button, Uint8 state)
 
     /* We ignore events if we don't have keyboard focus, except for button
      * release. */
-    if (event.type == SDL_JOYBUTTONDOWN && SDL_PrivateJoystickShouldIgnoreEvent()) {
+    if (state == SDL_PRESSED && SDL_PrivateJoystickShouldIgnoreEvent()) {
         return 0;
     }
 
diff --git a/src/thread/generic/SDL_syssem.c b/src/thread/generic/SDL_syssem.c
index fc4e1fcc7..bfb011dda 100644
--- a/src/thread/generic/SDL_syssem.c
+++ b/src/thread/generic/SDL_syssem.c
@@ -32,7 +32,7 @@
 SDL_sem *
 SDL_CreateSemaphore(Uint32 initial_value)
 {
-    SDL_SetError("SDL not configured with thread support");
+    SDL_SetError("SDL not built with thread support");
     return (SDL_sem *) 0;
 }
 
@@ -44,19 +44,19 @@ SDL_DestroySemaphore(SDL_sem * sem)
 int
 SDL_SemTryWait(SDL_sem * sem)
 {
-    return SDL_SetError("SDL not configured with thread support");
+    return SDL_SetError("SDL not built with thread support");
 }
 
 int
 SDL_SemWaitTimeout(SDL_sem * sem, Uint32 timeout)
 {
-    return SDL_SetError("SDL not configured with thread support");
+    return SDL_SetError("SDL not built with thread support");
 }
 
 int
 SDL_SemWait(SDL_sem * sem)
 {
-    return SDL_SetError("SDL not configured with thread support");
+    return SDL_SetError("SDL not built with thread support");
 }
 
 Uint32
@@ -68,7 +68,7 @@ SDL_SemValue(SDL_sem * sem)
 int
 SDL_SemPost(SDL_sem * sem)
 {
-    return SDL_SetError("SDL not configured with thread support");
+    return SDL_SetError("SDL not built with thread support");
 }
 
 #else
diff --git a/test/testpower.c b/test/testpower.c
index 031381219..6e6832a39 100644
--- a/test/testpower.c
+++ b/test/testpower.c
@@ -63,7 +63,7 @@ report_power(void)
 int
 main(int argc, char *argv[])
 {
-    if (SDL_Init(SDL_INIT_VIDEO) == -1) {
+    if (SDL_Init(0) == -1) {
         fprintf(stderr, "SDL_Init() failed: %s\n", SDL_GetError());
         return 1;
     }

From 6971a5dd1c41730677669201845ccbfe8a7584ea Mon Sep 17 00:00:00 2001
From: Sam Lantinga 
Date: Thu, 13 Jun 2013 22:30:02 -0700
Subject: [PATCH 224/542] Allow users to define SDL_STDINC_NO_INLINES if they
 don't want the inline functions defined. This is useful, for example, if the
 standard config defines HAVE_SETENV but you're building with C99 that doesn't
 include that feature.

---
 include/SDL_stdinc.h | 119 +++++++++++++++++++++++++++----------------
 1 file changed, 75 insertions(+), 44 deletions(-)

diff --git a/include/SDL_stdinc.h b/include/SDL_stdinc.h
index 3e36dcd2e..f52bd0310 100644
--- a/include/SDL_stdinc.h
+++ b/include/SDL_stdinc.h
@@ -241,57 +241,62 @@ char *alloca();
    couldn't if you had macros, you can link against a foreign build of SDL
    even if you configured differently, and you can drop the unconfigured SDL
    headers into a project without #defining HAVE_MALLOC (etc) and still link.
+
+   If you want to disable the inline functions and just use SDL's functions,
+   you can define SDL_STDINC_NO_INLINES before including this file.
 */
 
 extern DECLSPEC void *SDLCALL SDL_malloc(size_t size);
-#ifdef HAVE_MALLOC
+#if defined(HAVE_MALLOC) && !defined(SDL_STDINC_NO_INLINES)
 SDL_FORCE_INLINE void *SDL_malloc_inline(size_t size) { return malloc(size); }
 #define SDL_malloc SDL_malloc_inline
 #endif
 
 extern DECLSPEC void *SDLCALL SDL_calloc(size_t nmemb, size_t size);
-#ifdef HAVE_CALLOC
+#if defined(HAVE_CALLOC) && !defined(SDL_STDINC_NO_INLINES)
 SDL_FORCE_INLINE void *SDL_calloc_inline(size_t nmemb, size_t size) { return calloc(nmemb, size); }
 #define SDL_calloc SDL_calloc_inline
 #endif
 
 extern DECLSPEC void *SDLCALL SDL_realloc(void *mem, size_t size);
-#ifdef HAVE_REALLOC
+#if defined(HAVE_REALLOC) && !defined(SDL_STDINC_NO_INLINES)
 SDL_FORCE_INLINE void *SDL_realloc_inline(void *mem, size_t size) { return realloc(mem, size); }
 #define SDL_realloc SDL_realloc_inline
 #endif
 
 extern DECLSPEC void SDLCALL SDL_free(void *mem);
-#ifdef HAVE_FREE
+#if defined(HAVE_FREE) && !defined(SDL_STDINC_NO_INLINES)
 SDL_FORCE_INLINE void SDL_free_inline(void *mem) { free(mem); }
 #define SDL_free SDL_free_inline
 #endif
 
 extern DECLSPEC char *SDLCALL SDL_getenv(const char *name);
-#ifdef HAVE_GETENV
+#if defined(HAVE_GETENV) && !defined(SDL_STDINC_NO_INLINES)
 SDL_FORCE_INLINE char *SDL_getenv_inline(const char *name) { return getenv(name); }
 #define SDL_getenv SDL_getenv_inline
 #endif
 
 extern DECLSPEC int SDLCALL SDL_setenv(const char *name, const char *value, int overwrite);
-#ifdef HAVE_SETENV
+#if defined(HAVE_SETENV) && !defined(SDL_STDINC_NO_INLINES)
 SDL_FORCE_INLINE int SDL_setenv_inline(const char *name, const char *value, int overwrite) { return setenv(name, value, overwrite); }
 #define SDL_setenv SDL_setenv_inline
 #endif
 
 extern DECLSPEC void SDLCALL SDL_qsort(void *base, size_t nmemb, size_t size, int (*compare) (const void *, const void *));
-#ifdef HAVE_QSORT
+#if defined(HAVE_QSORT) && !defined(SDL_STDINC_NO_INLINES)
 SDL_FORCE_INLINE void SDL_qsort_inline(void *base, size_t nmemb, size_t size, int (*compare) (const void *, const void *)) { qsort(base, nmemb, size, compare); }
 #define SDL_qsort SDL_qsort_inline
 #endif
 
 extern DECLSPEC int SDLCALL SDL_abs(int x);
+#ifndef SDL_STDINC_NO_INLINES
 #ifdef HAVE_ABS
 SDL_FORCE_INLINE int SDL_abs_inline(int x) { return abs(x); }
 #else
 SDL_FORCE_INLINE int SDL_abs_inline(int x) { return ((x) < 0 ? -(x) : (x)); }
 #endif
 #define SDL_abs SDL_abs_inline
+#endif /* !SDL_STDINC_NO_INLINES */
 
 /* !!! FIXME: these have side effects. You probably shouldn't use them. */
 /* !!! FIXME: Maybe we do forceinline functions of SDL_mini, SDL_minf, etc? */
@@ -302,6 +307,7 @@ extern DECLSPEC int SDLCALL SDL_isdigit(int x);
 extern DECLSPEC int SDLCALL SDL_isspace(int x);
 extern DECLSPEC int SDLCALL SDL_toupper(int x);
 extern DECLSPEC int SDLCALL SDL_tolower(int x);
+#ifndef SDL_STDINC_NO_INLINES
 #ifdef HAVE_CTYPE_H
 SDL_FORCE_INLINE int SDL_isdigit_inline(int x) { return isdigit(x); }
 SDL_FORCE_INLINE int SDL_isspace_inline(int x) { return isspace(x); }
@@ -317,9 +323,10 @@ SDL_FORCE_INLINE int SDL_tolower_inline(int x) { return ((x) >= 'A') && ((x) <=
 #define SDL_isspace SDL_isspace_inline
 #define SDL_toupper SDL_toupper_inline
 #define SDL_tolower SDL_tolower_inline
+#endif /* !SDL_STDINC_NO_INLINES */
 
 extern DECLSPEC void *SDLCALL SDL_memset(void *dst, int c, size_t len);
-#ifdef HAVE_MEMSET
+#if defined(HAVE_MEMSET) && !defined(SDL_STDINC_NO_INLINES)
 SDL_FORCE_INLINE void *SDL_memset_inline(void *dst, int c, size_t len) { return memset(dst, c, len); }
 #define SDL_memset SDL_memset_inline
 #endif
@@ -359,6 +366,7 @@ SDL_FORCE_INLINE void SDL_memset4(void *dst, int val, size_t len)
 
 
 extern DECLSPEC void *SDLCALL SDL_memcpy(void *dst, const void *src, size_t len);
+#if !defined(SDL_STDINC_NO_INLINES)
 #if defined(__MACOSX__) && defined(HAVE_MEMCPY)
 SDL_FORCE_INLINE void *SDL_memcpy_inline(void *dst, const void *src, size_t len)
 {
@@ -404,6 +412,7 @@ SDL_FORCE_INLINE void *SDL_memcpy_inline(void *dst, const void *src, size_t len)
 }
 #define SDL_memcpy SDL_memcpy_inline
 #endif
+#endif /* !SDL_STDINC_NO_INLINES */
 
 
 SDL_FORCE_INLINE void *SDL_memcpy4(void *dst, const void *src, size_t dwords)
@@ -426,43 +435,43 @@ SDL_FORCE_INLINE void *SDL_memcpy4(void *dst, const void *src, size_t dwords)
 }
 
 extern DECLSPEC void *SDLCALL SDL_memmove(void *dst, const void *src, size_t len);
-#ifdef HAVE_MEMMOVE
+#if defined(HAVE_MEMMOVE) && !defined(SDL_STDINC_NO_INLINES)
 SDL_FORCE_INLINE void *SDL_memmove_inline(void *dst, const void *src, size_t len) { return memmove(dst, src, len); }
 #define SDL_memmove SDL_memmove_inline
 #endif
 
 extern DECLSPEC int SDLCALL SDL_memcmp(const void *s1, const void *s2, size_t len);
-#ifdef HAVE_MEMCMP
+#if defined(HAVE_MEMCMP) && !defined(SDL_STDINC_NO_INLINES)
 SDL_FORCE_INLINE int SDL_memcmp_inline(const void *s1, const void *s2, size_t len) { return memcmp(s1, s2, len); }
 #define SDL_memcmp SDL_memcmp_inline
 #endif
 
 extern DECLSPEC size_t SDLCALL SDL_strlen(const char *str);
-#ifdef HAVE_STRLEN
+#if defined(HAVE_STRLEN) && !defined(SDL_STDINC_NO_INLINES)
 SDL_FORCE_INLINE size_t SDL_strlen_inline(const char *str) { return strlen(str); }
 #define SDL_strlen SDL_strlen_inline
 #endif
 
 extern DECLSPEC size_t SDLCALL SDL_wcslen(const wchar_t *wstr);
-#ifdef HAVE_WCSLEN
+#if defined(HAVE_WCSLEN) && !defined(SDL_STDINC_NO_INLINES)
 SDL_FORCE_INLINE size_t SDL_wcslen_inline(const wchar_t *wstr) { return wcslen(wstr); }
 #define SDL_wcslen SDL_wcslen_inline
 #endif
 
 extern DECLSPEC size_t SDLCALL SDL_wcslcpy(wchar_t *dst, const wchar_t *src, size_t maxlen);
-#ifdef HAVE_WCSLCPY
+#if defined(HAVE_WCSLCPY) && !defined(SDL_STDINC_NO_INLINES)
 SDL_FORCE_INLINE size_t SDL_wcslcpy_inline(wchar_t *dst, const wchar_t *src, size_t maxlen) { return wcslcpy(dst, src, maxlen); }
 #define SDL_wcslcpy SDL_wcslcpy_inline
 #endif
 
 extern DECLSPEC size_t SDLCALL SDL_wcslcat(wchar_t *dst, const wchar_t *src, size_t maxlen);
-#ifdef HAVE_WCSLCAT
+#if defined(HAVE_WCSLCAT) && !defined(SDL_STDINC_NO_INLINES)
 SDL_FORCE_INLINE size_t SDL_wcslcat_inline(wchar_t *dst, const wchar_t *src, size_t maxlen) { return wcslcat(dst, src, maxlen); }
 #define SDL_wcslcat SDL_wcslcat_inline
 #endif
 
 extern DECLSPEC size_t SDLCALL SDL_strlcpy(char *dst, const char *src, size_t maxlen);
-#ifdef HAVE_STRLCPY
+#if defined(HAVE_STRLCPY) && !defined(SDL_STDINC_NO_INLINES)
 SDL_FORCE_INLINE size_t SDL_strlcpy_inline(char *dst, const char *src, size_t maxlen) { return strlcpy(dst, src, maxlen); }
 #define SDL_strlcpy SDL_strlcpy_inline
 #else
@@ -471,36 +480,37 @@ SDL_FORCE_INLINE size_t SDL_strlcpy_inline(char *dst, const char *src, size_t ma
 extern DECLSPEC size_t SDLCALL SDL_utf8strlcpy(char *dst, const char *src, size_t dst_bytes);
 
 extern DECLSPEC size_t SDLCALL SDL_strlcat(char *dst, const char *src, size_t maxlen);
-#ifdef HAVE_STRLCAT
+#if defined(HAVE_STRLCAT) && !defined(SDL_STDINC_NO_INLINES)
 SDL_FORCE_INLINE size_t SDL_strlcat_inline(char *dst, const char *src, size_t maxlen) { return strlcat(dst, src, maxlen); }
 #define SDL_strlcat SDL_strlcat_inline
 #endif
 
 extern DECLSPEC char *SDLCALL SDL_strdup(const char *str);
-#ifdef HAVE_STRDUP
+#if defined(HAVE_STRDUP) && !defined(SDL_STDINC_NO_INLINES)
 SDL_FORCE_INLINE char *SDL_strdup_inline(const char *str) { return strdup(str); }
 #define SDL_strdup SDL_strdup_inline
 #endif
 
 extern DECLSPEC char *SDLCALL SDL_strrev(char *str);
-#ifdef HAVE__STRREV
+#if defined(HAVE__STRREV) && !defined(SDL_STDINC_NO_INLINES)
 SDL_FORCE_INLINE char *SDL_strrev_inline(char *str) { return _strrev(str); }
 #define SDL_strrev SDL_strrev_inline
 #endif
 
 extern DECLSPEC char *SDLCALL SDL_strupr(char *str);
-#ifdef HAVE__STRUPR
+#if defined(HAVE__STRUPR) && !defined(SDL_STDINC_NO_INLINES)
 SDL_FORCE_INLINE char *SDL_strupr_inline(char *str) { return _strupr(str); }
 #define SDL_strupr SDL_strupr_inline
 #endif
 
 extern DECLSPEC char *SDLCALL SDL_strlwr(char *str);
-#ifdef HAVE__STRLWR
+#if defined(HAVE__STRLWR) && !defined(SDL_STDINC_NO_INLINES)
 SDL_FORCE_INLINE char *SDL_strlwr_inline(char *str) { return _strlwr(str); }
 #define SDL_strlwr SDL_strlwr_inline
 #endif
 
 extern DECLSPEC char *SDLCALL SDL_strchr(const char *str, int c);
+#ifndef SDL_STDINC_NO_INLINES
 #ifdef HAVE_STRCHR
 SDL_FORCE_INLINE char *SDL_strchr_inline(const char *str, int c) { return SDL_const_cast(char*,strchr(str, c)); }
 #define SDL_strchr SDL_strchr_inline
@@ -508,8 +518,10 @@ SDL_FORCE_INLINE char *SDL_strchr_inline(const char *str, int c) { return SDL_co
 SDL_FORCE_INLINE char *SDL_strchr_inline(const char *str, int c) { return SDL_const_cast(char*,index(str, c)); }
 #define SDL_strchr SDL_strchr_inline
 #endif
+#endif /* !SDL_STDINC_NO_INLINES */
 
 extern DECLSPEC char *SDLCALL SDL_strrchr(const char *str, int c);
+#ifndef SDL_STDINC_NO_INLINES
 #ifdef HAVE_STRRCHR
 SDL_FORCE_INLINE char *SDL_strrchr_inline(const char *str, int c) { return SDL_const_cast(char*,strrchr(str, c)); }
 #define SDL_strrchr SDL_strrchr_inline
@@ -517,114 +529,124 @@ SDL_FORCE_INLINE char *SDL_strrchr_inline(const char *str, int c) { return SDL_c
 SDL_FORCE_INLINE char *SDL_strrchr_inline(const char *str, int c) { return SDL_const_cast(char*,rindex(str, c)); }
 #define SDL_strrchr SDL_strrchr_inline
 #endif
+#endif /* !SDL_STDINC_NO_INLINES */
 
 extern DECLSPEC char *SDLCALL SDL_strstr(const char *haystack, const char *needle);
-#ifdef HAVE_STRSTR
+#if defined(HAVE_STRSTR) && !defined(SDL_STDINC_NO_INLINES)
 SDL_FORCE_INLINE char *SDL_strstr_inline(const char *haystack, const char *needle) { return SDL_const_cast(char*,strstr(haystack, needle)); }
 #define SDL_strstr SDL_strstr_inline
 #endif
 
 extern DECLSPEC char *SDLCALL SDL_ltoa(long value, char *str, int radix);
-#ifdef HAVE__LTOA
+#if defined(HAVE__LTOA) && !defined(SDL_STDINC_NO_INLINES)
 SDL_FORCE_INLINE char *SDL_ltoa_inline(long value, char *str, int radix) { return _ltoa(value, str, radix); }
 #define SDL_ltoa SDL_ltoa_inline
 #endif
 
 extern DECLSPEC char *SDLCALL SDL_itoa(int value, char *str, int radix);
+#ifndef SDL_STDINC_NO_INLINES
 #ifdef HAVE_ITOA
 SDL_FORCE_INLINE char *SDL_itoa_inline(int value, char *str, int radix) { return itoa(value, str, radix); }
 #else
 SDL_FORCE_INLINE char *SDL_itoa_inline(int value, char *str, int radix) { return SDL_ltoa((long)value, str, radix); }
 #endif
 #define SDL_itoa SDL_itoa_inline
+#endif /* !SDL_STDINC_NO_INLINES */
 
 extern DECLSPEC char *SDLCALL SDL_ultoa(unsigned long value, char *str, int radix);
-#ifdef HAVE__ULTOA
+#if defined(HAVE__ULTOA) && !defined(SDL_STDINC_NO_INLINES)
 SDL_FORCE_INLINE char *SDL_ultoa_inline(unsigned long value, char *str, int radix) { return _ultoa(value, str, radix); }
 #define SDL_ultoa SDL_ultoa_inline
 #endif
 
 extern DECLSPEC char *SDLCALL SDL_uitoa(unsigned int value, char *str, int radix);
+#ifndef SDL_STDINC_NO_INLINES
 #ifdef HAVE__UITOA
 SDL_FORCE_INLINE char *SDL_uitoa_inline(unsigned int value, char *str, int radix) { return _uitoa(value, str, radix); }
 #else
 SDL_FORCE_INLINE char *SDL_uitoa_inline(unsigned int value, char *str, int radix) { return SDL_ultoa((unsigned long)value, str, radix); }
 #endif
 #define SDL_uitoa SDL_uitoa_inline
+#endif /* !SDL_STDINC_NO_INLINES */
 
 
 extern DECLSPEC long SDLCALL SDL_strtol(const char *str, char **endp, int base);
-#ifdef HAVE_STRTOL
+#if defined(HAVE_STRTOL) && !defined(SDL_STDINC_NO_INLINES)
 SDL_FORCE_INLINE long SDL_strtol_inline(const char *str, char **endp, int base) { return strtol(str, endp, base); }
 #define SDL_strtol SDL_strtol_inline
 #endif
 
 extern DECLSPEC unsigned long SDLCALL SDL_strtoul(const char *str, char **endp, int base);
-#ifdef HAVE_STRTOUL
+#if defined(HAVE_STRTOUL) && !defined(SDL_STDINC_NO_INLINES)
 SDL_FORCE_INLINE unsigned long SDLCALL SDL_strtoul_inline(const char *str, char **endp, int base) { return strtoul(str, endp, base); }
 #define SDL_strtoul SDL_strtoul_inline
 #endif
 
 extern DECLSPEC char *SDLCALL SDL_lltoa(Sint64 value, char *str, int radix);
-#ifdef HAVE__I64TOA
+#if defined(HAVE__I64TOA) && !defined(SDL_STDINC_NO_INLINES)
 SDL_FORCE_INLINE char *SDL_lltoa_inline(Sint64 value, char *str, int radix) { return _i64toa(value, str, radix); }
 #define SDL_lltoa SDL_lltoa_inline
 #endif
 
 extern DECLSPEC char *SDLCALL SDL_ulltoa(Uint64 value, char *str, int radix);
-#ifdef HAVE__UI64TOA
+#if defined(HAVE__UI64TOA) && !defined(SDL_STDINC_NO_INLINES)
 SDL_FORCE_INLINE char *SDL_ulltoa_inline(Uint64 value, char *str, int radix) { return _ui64toa(value, str, radix); }
 #define SDL_ulltoa SDL_ulltoa_inline
 #endif
 
 extern DECLSPEC Sint64 SDLCALL SDL_strtoll(const char *str, char **endp, int base);
-#ifdef HAVE_STRTOLL
+#if defined(HAVE_STRTOLL) && !defined(SDL_STDINC_NO_INLINES)
 SDL_FORCE_INLINE Sint64 SDL_strtoll_inline(const char *str, char **endp, int base) { return strtoll(str, endp, base); }
 #define SDL_strtoll SDL_strtoll_inline
 #endif
 
 extern DECLSPEC Uint64 SDLCALL SDL_strtoull(const char *str, char **endp, int base);
-#ifdef HAVE_STRTOULL
+#if defined(HAVE_STRTOULL) && !defined(SDL_STDINC_NO_INLINES)
 SDL_FORCE_INLINE Uint64 SDL_strtoull_inline(const char *str, char **endp, int base) { return strtoull(str, endp, base); }
 #define SDL_strtoull SDL_strtoull_inline
 #endif
 
 extern DECLSPEC double SDLCALL SDL_strtod(const char *str, char **endp);
-#ifdef HAVE_STRTOD
+#if defined(HAVE_STRTOD) && !defined(SDL_STDINC_NO_INLINES)
 SDL_FORCE_INLINE double SDL_strtod_inline(const char *str, char **endp) { return strtod(str, endp); }
 #define SDL_strtod SDL_strtod_inline
 #endif
 
 extern DECLSPEC int SDLCALL SDL_atoi(const char *str);
+#ifndef SDL_STDINC_NO_INLINES
 #ifdef HAVE_ATOI
 SDL_FORCE_INLINE int SDL_atoi_inline(const char *str) { return atoi(str); }
 #else
 SDL_FORCE_INLINE int SDL_atoi_inline(const char *str) { return SDL_strtol(str, NULL, 0); }
 #endif
 #define SDL_atoi SDL_atoi_inline
+#endif /* !SDL_STDINC_NO_INLINES */
 
 extern DECLSPEC double SDLCALL SDL_atof(const char *str);
+#ifndef SDL_STDINC_NO_INLINES
 #ifdef HAVE_ATOF
 SDL_FORCE_INLINE double SDL_atof_inline(const char *str) { return (double) atof(str); }
 #else
 SDL_FORCE_INLINE double SDL_atof_inline(const char *str) { return SDL_strtod(str, NULL); }
 #endif
 #define SDL_atof SDL_atof_inline
+#endif /* !SDL_STDINC_NO_INLINES */
 
 
 extern DECLSPEC int SDLCALL SDL_strcmp(const char *str1, const char *str2);
-#ifdef HAVE_STRCMP
+#if defined(HAVE_STRCMP) && !defined(SDL_STDINC_NO_INLINES)
 SDL_FORCE_INLINE int SDL_strcmp_inline(const char *str1, const char *str2) { return strcmp(str1, str2); }
 #define SDL_strcmp SDL_strcmp_inline
 #endif
 
 extern DECLSPEC int SDLCALL SDL_strncmp(const char *str1, const char *str2, size_t maxlen);
-#ifdef HAVE_STRNCMP
+#if defined(HAVE_STRNCMP) && !defined(SDL_STDINC_NO_INLINES)
 SDL_FORCE_INLINE int SDL_strncmp_inline(const char *str1, const char *str2, size_t maxlen) { return strncmp(str1, str2, maxlen); }
 #define SDL_strncmp SDL_strncmp_inline
 #endif
 
 extern DECLSPEC int SDLCALL SDL_strcasecmp(const char *str1, const char *str2);
+#ifndef SDL_STDINC_NO_INLINES
 #ifdef HAVE_STRCASECMP
 SDL_FORCE_INLINE int SDL_strcasecmp_inline(const char *str1, const char *str2) { return strcasecmp(str1, str2); }
 #define SDL_strcasecmp SDL_strcasecmp_inline
@@ -632,8 +654,10 @@ SDL_FORCE_INLINE int SDL_strcasecmp_inline(const char *str1, const char *str2) {
 SDL_FORCE_INLINE int SDL_strcasecmp_inline(const char *str1, const char *str2) { return _stricmp(str1, str2); }
 #define SDL_strcasecmp SDL_strcasecmp_inline
 #endif
+#endif /* !SDL_STDINC_NO_INLINES */
 
 extern DECLSPEC int SDLCALL SDL_strncasecmp(const char *str1, const char *str2, size_t len);
+#ifndef SDL_STDINC_NO_INLINES
 #ifdef HAVE_STRNCASECMP
 SDL_FORCE_INLINE int SDL_strncasecmp_inline(const char *str1, const char *str2, size_t len) { return strncasecmp(str1, str2, len); }
 #define SDL_strncasecmp SDL_strncasecmp_inline
@@ -641,6 +665,7 @@ SDL_FORCE_INLINE int SDL_strncasecmp_inline(const char *str1, const char *str2,
 SDL_FORCE_INLINE int SDL_strncasecmp_inline(const char *str1, const char *str2, size_t len) { return _strnicmp(str1, str2, len); }
 #define SDL_strncasecmp SDL_strncasecmp_inline
 #endif
+#endif /* !SDL_STDINC_NO_INLINES */
 
 /* Not doing SDL_*_inline functions for these, because of the varargs. */
 extern DECLSPEC int SDLCALL SDL_sscanf(const char *text, const char *fmt, ...);
@@ -654,7 +679,7 @@ extern DECLSPEC int SDLCALL SDL_snprintf(char *text, size_t maxlen, const char *
 #endif
 
 extern DECLSPEC int SDLCALL SDL_vsnprintf(char *text, size_t maxlen, const char *fmt, va_list ap);
-#ifdef HAVE_VSNPRINTF
+#if defined(HAVE_VSNPRINTF) && !defined(SDL_STDINC_NO_INLINES)
 SDL_FORCE_INLINE int SDL_vsnprintf_inline(char *text, size_t maxlen, const char *fmt, va_list ap) { return vsnprintf(text, maxlen, fmt, ap); }
 #define SDL_vsnprintf SDL_vsnprintf_inline
 #endif
@@ -666,91 +691,97 @@ SDL_FORCE_INLINE int SDL_vsnprintf_inline(char *text, size_t maxlen, const char
 #endif
 
 extern DECLSPEC double SDLCALL SDL_atan(double x);
-#ifdef HAVE_ATAN
+#if defined(HAVE_ATAN) && !defined(SDL_STDINC_NO_INLINES)
 SDL_FORCE_INLINE double SDL_atan_inline(double x) { return atan(x); }
 #define SDL_atan SDL_atan_inline
 #endif
 
 extern DECLSPEC double SDLCALL SDL_atan2(double x, double y);
-#ifdef HAVE_ATAN2
+#if defined(HAVE_ATAN2) && !defined(SDL_STDINC_NO_INLINES)
 SDL_FORCE_INLINE double SDL_atan2_inline(double x, double y) { return atan2(x, y); }
 #define SDL_atan2 SDL_atan2_inline
 #endif
 
 extern DECLSPEC double SDLCALL SDL_ceil(double x);
+#ifndef SDL_STDINC_NO_INLINES
 #ifdef HAVE_CEIL
 SDL_FORCE_INLINE double SDL_ceil_inline(double x) { return ceil(x); }
 #else
 SDL_FORCE_INLINE double SDL_ceil_inline(double x) { return (double)(int)((x)+0.5); }
 #endif
 #define SDL_ceil SDL_ceil_inline
+#endif /* !SDL_STDINC_NO_INLINES */
 
 extern DECLSPEC double SDLCALL SDL_copysign(double x, double y);
-#ifdef HAVE_COPYSIGN
+#if defined(HAVE_COPYSIGN) && !defined(SDL_STDINC_NO_INLINES)
 SDL_FORCE_INLINE double SDL_copysign_inline(double x, double y) { return copysign(x, y); }
 #define SDL_copysign SDL_copysign_inline
 #endif
 
 extern DECLSPEC double SDLCALL SDL_cos(double x);
-#ifdef HAVE_COS
+#if defined(HAVE_COS) && !defined(SDL_STDINC_NO_INLINES)
 SDL_FORCE_INLINE double SDL_cos_inline(double x) { return cos(x); }
 #define SDL_cos SDL_cos_inline
 #endif
 
 extern DECLSPEC float SDLCALL SDL_cosf(float x);
+#ifndef SDL_STDINC_NO_INLINES
 #ifdef HAVE_COSF
 SDL_FORCE_INLINE float SDL_cosf_inline(float x) { return cosf(x); }
 #else
 SDL_FORCE_INLINE float SDL_cosf_inline(float x) { return (float)SDL_cos((double)x); }
 #endif
 #define SDL_cosf SDL_cosf_inline
+#endif /* !SDL_STDINC_NO_INLINES */
 
 extern DECLSPEC double SDLCALL SDL_fabs(double x);
-#ifdef HAVE_FABS
+#if defined(HAVE_FABS) && !defined(SDL_STDINC_NO_INLINES)
 SDL_FORCE_INLINE double SDL_fabs_inline(double x) { return fabs(x); }
 #define SDL_fabs SDL_fabs_inline
 #endif
 
 extern DECLSPEC double SDLCALL SDL_floor(double x);
-#ifdef HAVE_FLOOR
+#if defined(HAVE_FLOOR) && !defined(SDL_STDINC_NO_INLINES)
 SDL_FORCE_INLINE double SDL_floor_inline(double x) { return floor(x); }
 #define SDL_floor SDL_floor_inline
 #endif
 
 extern DECLSPEC double SDLCALL SDL_log(double x);
-#ifdef HAVE_LOG
+#if defined(HAVE_LOG) && !defined(SDL_STDINC_NO_INLINES)
 SDL_FORCE_INLINE double SDL_log_inline(double x) { return log(x); }
 #define SDL_log SDL_log_inline
 #endif
 
 extern DECLSPEC double SDLCALL SDL_pow(double x, double y);
-#ifdef HAVE_POW
+#if defined(HAVE_POW) && !defined(SDL_STDINC_NO_INLINES)
 SDL_FORCE_INLINE double SDL_pow_inline(double x, double y) { return pow(x, y); }
 #define SDL_pow SDL_pow_inline
 #endif
 
 extern DECLSPEC double SDLCALL SDL_scalbn(double x, int n);
-#ifdef HAVE_SCALBN
+#if defined(HAVE_SCALBN) && !defined(SDL_STDINC_NO_INLINES)
 SDL_FORCE_INLINE double SDL_scalbn_inline(double x, int n) { return scalbn(x, n); }
 #define SDL_scalbn SDL_scalbn_inline
 #endif
 
 extern DECLSPEC double SDLCALL SDL_sin(double x);
-#ifdef HAVE_SIN
+#if defined(HAVE_SIN) && !defined(SDL_STDINC_NO_INLINES)
 SDL_FORCE_INLINE double SDL_sin_inline(double x) { return sin(x); }
 #define SDL_sin SDL_sin_inline
 #endif
 
 extern DECLSPEC float SDLCALL SDL_sinf(float x);
+#ifndef SDL_STDINC_NO_INLINES
 #ifdef HAVE_SINF
 SDL_FORCE_INLINE float SDL_sinf_inline(float x) { return sinf(x); }
 #else
 SDL_FORCE_INLINE float SDL_sinf_inline(float x) { return (float)SDL_sin((double)x); }
 #endif
 #define SDL_sinf SDL_sinf_inline
+#endif /* !SDL_STDINC_NO_INLINES */
 
 extern DECLSPEC double SDLCALL SDL_sqrt(double x);
-#ifdef HAVE_SQRT
+#if defined(HAVE_SQRT) && !defined(SDL_STDINC_NO_INLINES)
 SDL_FORCE_INLINE double SDL_sqrt_inline(double x) { return sqrt(x); }
 #define SDL_sqrt SDL_sqrt_inline
 #endif

From de9566518f4bdeb2be09aa0908fcec9e2ebaf597 Mon Sep 17 00:00:00 2001
From: Sam Lantinga 
Date: Sat, 15 Jun 2013 02:46:32 -0700
Subject: [PATCH 225/542] Fixed some Visual Studio analyze warnings

---
 src/audio/winmm/SDL_winmm.c              | 20 ++++++++++----------
 src/render/SDL_yuv_sw.c                  |  6 +++++-
 src/video/windows/SDL_windowsclipboard.c | 16 +++++++++-------
 3 files changed, 24 insertions(+), 18 deletions(-)

diff --git a/src/audio/winmm/SDL_winmm.c b/src/audio/winmm/SDL_winmm.c
index f52a3afb1..00a6245ad 100644
--- a/src/audio/winmm/SDL_winmm.c
+++ b/src/audio/winmm/SDL_winmm.c
@@ -162,16 +162,6 @@ WINMM_CloseDevice(_THIS)
             this->hidden->audio_sem = 0;
         }
 
-        if (this->hidden->hin) {
-            waveInClose(this->hidden->hin);
-            this->hidden->hin = 0;
-        }
-
-        if (this->hidden->hout) {
-            waveOutClose(this->hidden->hout);
-            this->hidden->hout = 0;
-        }
-
         /* Clean up mixing buffers */
         for (i = 0; i < NUM_BUFFERS; ++i) {
             if (this->hidden->wavebuf[i].dwUser != 0xFFFF) {
@@ -188,6 +178,16 @@ WINMM_CloseDevice(_THIS)
             this->hidden->mixbuf = NULL;
         }
 
+        if (this->hidden->hin) {
+            waveInClose(this->hidden->hin);
+            this->hidden->hin = 0;
+        }
+
+        if (this->hidden->hout) {
+            waveOutClose(this->hidden->hout);
+            this->hidden->hout = 0;
+        }
+
         SDL_free(this->hidden);
         this->hidden = NULL;
     }
diff --git a/src/render/SDL_yuv_sw.c b/src/render/SDL_yuv_sw.c
index 1d7e024c2..3319fe4c2 100644
--- a/src/render/SDL_yuv_sw.c
+++ b/src/render/SDL_yuv_sw.c
@@ -1202,7 +1202,11 @@ SDL_SW_LockYUVTexture(SDL_SW_YUVTexture * swdata, const SDL_Rect * rect,
         break;
     }
 
-    *pixels = swdata->planes[0] + rect->y * swdata->pitches[0] + rect->x * 2;
+    if (rect) {
+        *pixels = swdata->planes[0] + rect->y * swdata->pitches[0] + rect->x * 2;
+    } else {
+        *pixels = swdata->planes[0];
+    }
     *pitch = swdata->pitches[0];
     return 0;
 }
diff --git a/src/video/windows/SDL_windowsclipboard.c b/src/video/windows/SDL_windowsclipboard.c
index 83bf0caa3..3d1db4a41 100644
--- a/src/video/windows/SDL_windowsclipboard.c
+++ b/src/video/windows/SDL_windowsclipboard.c
@@ -77,15 +77,17 @@ WIN_SetClipboardText(_THIS, const char *text)
         hMem = GlobalAlloc(GMEM_MOVEABLE, size);
         if (hMem) {
             LPTSTR dst = (LPTSTR)GlobalLock(hMem);
-            /* Copy the text over, adding carriage returns as necessary */
-            for (i = 0; tstr[i]; ++i) {
-                if (tstr[i] == '\n' && (i == 0 || tstr[i-1] != '\r')) {
-                    *dst++ = '\r';
+            if (dst) {
+                /* Copy the text over, adding carriage returns as necessary */
+                for (i = 0; tstr[i]; ++i) {
+                    if (tstr[i] == '\n' && (i == 0 || tstr[i-1] != '\r')) {
+                        *dst++ = '\r';
+                    }
+                    *dst++ = tstr[i];
                 }
-                *dst++ = tstr[i];
+                *dst = 0;
+                GlobalUnlock(hMem);
             }
-            *dst = 0;
-            GlobalUnlock(hMem);
 
             EmptyClipboard();
             if (!SetClipboardData(TEXT_FORMAT, hMem)) {

From 05c75b191f2a1b4724eb4561d95e5ca96bfbe32f Mon Sep 17 00:00:00 2001
From: Philipp Wiesemann 
Date: Sun, 16 Jun 2013 12:00:54 +0200
Subject: [PATCH 226/542] Changed comment to be used by doxygen.

---
 include/SDL_events.h | 4 +++-
 1 file changed, 3 insertions(+), 1 deletion(-)

diff --git a/include/SDL_events.h b/include/SDL_events.h
index 70d1eb178..b997b5ec8 100644
--- a/include/SDL_events.h
+++ b/include/SDL_events.h
@@ -412,7 +412,9 @@ typedef struct SDL_MultiGestureEvent
 } SDL_MultiGestureEvent;
 
 
-/* (event.dgesture.*) */
+/**
+ * \brief Dollar Gesture Event (event.dgesture.*)
+ */
 typedef struct SDL_DollarGestureEvent
 {
     Uint32 type;        /**< ::SDL_DOLLARGESTURE */

From cfd8d8141d17ca30ad614abbc0b0b07f0df37d07 Mon Sep 17 00:00:00 2001
From: Sam Lantinga 
Date: Mon, 17 Jun 2013 06:35:41 -0700
Subject: [PATCH 227/542] Removed obsolete Xcode templates and documentation

---
 Xcode/SDL/SDL.xcodeproj/project.pbxproj       |  122 +-
 .../SDL/pkg-support/Readme SDL Developer.txt  |  282 ---
 Xcode/SDL/pkg-support/SDL-devel.info          |   15 -
 .../pkg-support/devel-resources/ReadMe.txt    |    5 -
 .../pkg-support/devel-resources/Welcome.txt   |    5 -
 .../pkg-support/devel-resources/install.sh    |   76 -
 Xcode/SDL/pkg-support/resources/ReadMe.txt    |    6 -
 .../pkg-support/resources/ReadMeDevLite.txt   |   12 -
 .../English.lproj/InfoPlist.strings           |  Bin 644 -> 0 bytes
 .../SDL Application/Info.plist                |   37 -
 .../___PROJECTNAMEASIDENTIFIER____Prefix.pch  |    9 -
 .../TemplateIcon.icns                         |  Bin 111234 -> 0 bytes
 .../TemplateInfo.plist                        |   12 -
 .../project.pbxproj                           |  304 ---
 .../SDL Application/main.c                    |   65 -
 .../English.lproj/InfoPlist.strings           |  Bin 644 -> 0 bytes
 .../English.lproj/SDLMain.nib/classes.nib     |   19 -
 .../English.lproj/SDLMain.nib/info.nib        |   21 -
 .../English.lproj/SDLMain.nib/objects.nib     |  Bin 2590 -> 0 bytes
 .../SDL Cocoa Application/Info.plist          |   37 -
 .../___PROJECTNAMEASIDENTIFIER____Prefix.pch  |    9 -
 .../TemplateIcon.icns                         |  Bin 111234 -> 0 bytes
 .../TemplateInfo.plist                        |   12 -
 .../project.pbxproj                           |  316 ---
 .../SDL Cocoa Application/main.c              |   65 -
 .../English.lproj/InfoPlist.strings           |  Bin 644 -> 0 bytes
 .../SDL OpenGL Application/Info.plist         |   37 -
 .../___PROJECTNAMEASIDENTIFIER____Prefix.pch  |    9 -
 .../TemplateIcon.icns                         |  Bin 111234 -> 0 bytes
 .../TemplateInfo.plist                        |   12 -
 .../project.pbxproj                           |  346 ---
 .../atlantis/atlantis.c                       |  459 ----
 .../atlantis/atlantis.h                       |   65 -
 .../SDL OpenGL Application/atlantis/dolphin.c | 1934 -----------------
 .../SDL OpenGL Application/atlantis/shark.c   | 1308 -----------
 .../SDL OpenGL Application/atlantis/swim.c    |  188 --
 .../SDL OpenGL Application/atlantis/whale.c   | 1798 ---------------
 .../SDL OpenGL Application/main.c             |  179 --
 .../English.lproj/InfoPlist.strings           |  Bin 644 -> 0 bytes
 .../SDL Application/Info.plist                |   37 -
 .../___PROJECTNAMEASIDENTIFIER____Prefix.pch  |    9 -
 .../TemplateIcon.icns                         |  Bin 111234 -> 0 bytes
 .../TemplateInfo.plist                        |   12 -
 .../project.pbxproj                           |  306 ---
 .../SDL Application/main.c                    |   65 -
 .../English.lproj/InfoPlist.strings           |  Bin 644 -> 0 bytes
 .../English.lproj/SDLMain.nib/classes.nib     |   19 -
 .../English.lproj/SDLMain.nib/info.nib        |   21 -
 .../English.lproj/SDLMain.nib/objects.nib     |  Bin 2590 -> 0 bytes
 .../SDL Cocoa Application/Info.plist          |   37 -
 .../___PROJECTNAMEASIDENTIFIER____Prefix.pch  |    9 -
 .../TemplateIcon.icns                         |  Bin 111234 -> 0 bytes
 .../TemplateInfo.plist                        |   12 -
 .../project.pbxproj                           |  318 ---
 .../SDL Cocoa Application/main.c              |   65 -
 .../English.lproj/InfoPlist.strings           |  Bin 644 -> 0 bytes
 .../SDL OpenGL Application/Info.plist         |   37 -
 .../___PROJECTNAMEASIDENTIFIER____Prefix.pch  |    9 -
 .../TemplateIcon.icns                         |  Bin 111234 -> 0 bytes
 .../TemplateInfo.plist                        |   12 -
 .../project.pbxproj                           |  348 ---
 .../atlantis/atlantis.c                       |  459 ----
 .../atlantis/atlantis.h                       |   65 -
 .../SDL OpenGL Application/atlantis/dolphin.c | 1934 -----------------
 .../SDL OpenGL Application/atlantis/shark.c   | 1308 -----------
 .../SDL OpenGL Application/atlantis/swim.c    |  188 --
 .../SDL OpenGL Application/atlantis/whale.c   | 1798 ---------------
 .../SDL OpenGL Application/main.c             |  179 --
 .../English.lproj/InfoPlist.strings           |  Bin 588 -> 0 bytes
 .../SDL Application/Info.plist                |   28 -
 .../SDLApp.xcodeproj/TemplateInfo.plist       |   12 -
 .../SDLApp.xcodeproj/project.pbxproj          |  297 ---
 .../SDL Application/SDLApp_Prefix.pch         |    9 -
 .../SDL Application/main.c                    |   65 -
 .../English.lproj/InfoPlist.strings           |  Bin 588 -> 0 bytes
 .../English.lproj/SDLMain.nib/classes.nib     |   19 -
 .../English.lproj/SDLMain.nib/info.nib        |   21 -
 .../English.lproj/SDLMain.nib/objects.nib     |  Bin 2590 -> 0 bytes
 .../SDL Cocoa Application/Info.plist          |   28 -
 .../SDL Cocoa Application/SDLApp_Prefix.pch   |    9 -
 .../SDLCocoaApp.xcodeproj/TemplateInfo.plist  |   12 -
 .../SDLCocoaApp.xcodeproj/project.pbxproj     |  309 ---
 .../SDL Cocoa Application/main.c              |   65 -
 .../English.lproj/InfoPlist.strings           |  Bin 588 -> 0 bytes
 .../SDL OpenGL Application/Info.plist         |   28 -
 .../SDL OpenGL Application/SDLApp_Prefix.pch  |    9 -
 .../SDLOpenGLApp.xcodeproj/TemplateInfo.plist |   12 -
 .../SDLOpenGLApp.xcodeproj/project.pbxproj    |  335 ---
 .../atlantis/atlantis.c                       |  459 ----
 .../atlantis/atlantis.h                       |   65 -
 .../SDL OpenGL Application/atlantis/dolphin.c | 1934 -----------------
 .../SDL OpenGL Application/atlantis/shark.c   | 1308 -----------
 .../SDL OpenGL Application/atlantis/swim.c    |  188 --
 .../SDL OpenGL Application/atlantis/whale.c   | 1798 ---------------
 .../SDL OpenGL Application/main.c             |  179 --
 Xcode/package                                 |  272 ---
 Xcode/stationary.csh                          |   25 -
 Xcode/uninstall.csh                           |   32 -
 98 files changed, 1 insertion(+), 22528 deletions(-)
 delete mode 100755 Xcode/SDL/pkg-support/Readme SDL Developer.txt
 delete mode 100755 Xcode/SDL/pkg-support/SDL-devel.info
 delete mode 100755 Xcode/SDL/pkg-support/devel-resources/ReadMe.txt
 delete mode 100755 Xcode/SDL/pkg-support/devel-resources/Welcome.txt
 delete mode 100755 Xcode/SDL/pkg-support/devel-resources/install.sh
 delete mode 100644 Xcode/SDL/pkg-support/resources/ReadMeDevLite.txt
 delete mode 100644 Xcode/TemplatesForXcodeLeopard/SDL Application/English.lproj/InfoPlist.strings
 delete mode 100644 Xcode/TemplatesForXcodeLeopard/SDL Application/Info.plist
 delete mode 100644 Xcode/TemplatesForXcodeLeopard/SDL Application/___PROJECTNAMEASIDENTIFIER____Prefix.pch
 delete mode 100644 Xcode/TemplatesForXcodeLeopard/SDL Application/___PROJECTNAME___.xcodeproj/TemplateIcon.icns
 delete mode 100644 Xcode/TemplatesForXcodeLeopard/SDL Application/___PROJECTNAME___.xcodeproj/TemplateInfo.plist
 delete mode 100644 Xcode/TemplatesForXcodeLeopard/SDL Application/___PROJECTNAME___.xcodeproj/project.pbxproj
 delete mode 100644 Xcode/TemplatesForXcodeLeopard/SDL Application/main.c
 delete mode 100644 Xcode/TemplatesForXcodeLeopard/SDL Cocoa Application/English.lproj/InfoPlist.strings
 delete mode 100644 Xcode/TemplatesForXcodeLeopard/SDL Cocoa Application/English.lproj/SDLMain.nib/classes.nib
 delete mode 100644 Xcode/TemplatesForXcodeLeopard/SDL Cocoa Application/English.lproj/SDLMain.nib/info.nib
 delete mode 100644 Xcode/TemplatesForXcodeLeopard/SDL Cocoa Application/English.lproj/SDLMain.nib/objects.nib
 delete mode 100644 Xcode/TemplatesForXcodeLeopard/SDL Cocoa Application/Info.plist
 delete mode 100644 Xcode/TemplatesForXcodeLeopard/SDL Cocoa Application/___PROJECTNAMEASIDENTIFIER____Prefix.pch
 delete mode 100644 Xcode/TemplatesForXcodeLeopard/SDL Cocoa Application/___PROJECTNAME___.xcodeproj/TemplateIcon.icns
 delete mode 100644 Xcode/TemplatesForXcodeLeopard/SDL Cocoa Application/___PROJECTNAME___.xcodeproj/TemplateInfo.plist
 delete mode 100644 Xcode/TemplatesForXcodeLeopard/SDL Cocoa Application/___PROJECTNAME___.xcodeproj/project.pbxproj
 delete mode 100644 Xcode/TemplatesForXcodeLeopard/SDL Cocoa Application/main.c
 delete mode 100644 Xcode/TemplatesForXcodeLeopard/SDL OpenGL Application/English.lproj/InfoPlist.strings
 delete mode 100644 Xcode/TemplatesForXcodeLeopard/SDL OpenGL Application/Info.plist
 delete mode 100644 Xcode/TemplatesForXcodeLeopard/SDL OpenGL Application/___PROJECTNAMEASIDENTIFIER____Prefix.pch
 delete mode 100644 Xcode/TemplatesForXcodeLeopard/SDL OpenGL Application/___PROJECTNAME___.xcodeproj/TemplateIcon.icns
 delete mode 100644 Xcode/TemplatesForXcodeLeopard/SDL OpenGL Application/___PROJECTNAME___.xcodeproj/TemplateInfo.plist
 delete mode 100644 Xcode/TemplatesForXcodeLeopard/SDL OpenGL Application/___PROJECTNAME___.xcodeproj/project.pbxproj
 delete mode 100644 Xcode/TemplatesForXcodeLeopard/SDL OpenGL Application/atlantis/atlantis.c
 delete mode 100644 Xcode/TemplatesForXcodeLeopard/SDL OpenGL Application/atlantis/atlantis.h
 delete mode 100644 Xcode/TemplatesForXcodeLeopard/SDL OpenGL Application/atlantis/dolphin.c
 delete mode 100644 Xcode/TemplatesForXcodeLeopard/SDL OpenGL Application/atlantis/shark.c
 delete mode 100644 Xcode/TemplatesForXcodeLeopard/SDL OpenGL Application/atlantis/swim.c
 delete mode 100644 Xcode/TemplatesForXcodeLeopard/SDL OpenGL Application/atlantis/whale.c
 delete mode 100644 Xcode/TemplatesForXcodeLeopard/SDL OpenGL Application/main.c
 delete mode 100644 Xcode/TemplatesForXcodeSnowLeopard/SDL Application/English.lproj/InfoPlist.strings
 delete mode 100644 Xcode/TemplatesForXcodeSnowLeopard/SDL Application/Info.plist
 delete mode 100644 Xcode/TemplatesForXcodeSnowLeopard/SDL Application/___PROJECTNAMEASIDENTIFIER____Prefix.pch
 delete mode 100644 Xcode/TemplatesForXcodeSnowLeopard/SDL Application/___PROJECTNAME___.xcodeproj/TemplateIcon.icns
 delete mode 100644 Xcode/TemplatesForXcodeSnowLeopard/SDL Application/___PROJECTNAME___.xcodeproj/TemplateInfo.plist
 delete mode 100644 Xcode/TemplatesForXcodeSnowLeopard/SDL Application/___PROJECTNAME___.xcodeproj/project.pbxproj
 delete mode 100644 Xcode/TemplatesForXcodeSnowLeopard/SDL Application/main.c
 delete mode 100644 Xcode/TemplatesForXcodeSnowLeopard/SDL Cocoa Application/English.lproj/InfoPlist.strings
 delete mode 100644 Xcode/TemplatesForXcodeSnowLeopard/SDL Cocoa Application/English.lproj/SDLMain.nib/classes.nib
 delete mode 100644 Xcode/TemplatesForXcodeSnowLeopard/SDL Cocoa Application/English.lproj/SDLMain.nib/info.nib
 delete mode 100644 Xcode/TemplatesForXcodeSnowLeopard/SDL Cocoa Application/English.lproj/SDLMain.nib/objects.nib
 delete mode 100644 Xcode/TemplatesForXcodeSnowLeopard/SDL Cocoa Application/Info.plist
 delete mode 100644 Xcode/TemplatesForXcodeSnowLeopard/SDL Cocoa Application/___PROJECTNAMEASIDENTIFIER____Prefix.pch
 delete mode 100644 Xcode/TemplatesForXcodeSnowLeopard/SDL Cocoa Application/___PROJECTNAME___.xcodeproj/TemplateIcon.icns
 delete mode 100644 Xcode/TemplatesForXcodeSnowLeopard/SDL Cocoa Application/___PROJECTNAME___.xcodeproj/TemplateInfo.plist
 delete mode 100644 Xcode/TemplatesForXcodeSnowLeopard/SDL Cocoa Application/___PROJECTNAME___.xcodeproj/project.pbxproj
 delete mode 100644 Xcode/TemplatesForXcodeSnowLeopard/SDL Cocoa Application/main.c
 delete mode 100644 Xcode/TemplatesForXcodeSnowLeopard/SDL OpenGL Application/English.lproj/InfoPlist.strings
 delete mode 100644 Xcode/TemplatesForXcodeSnowLeopard/SDL OpenGL Application/Info.plist
 delete mode 100644 Xcode/TemplatesForXcodeSnowLeopard/SDL OpenGL Application/___PROJECTNAMEASIDENTIFIER____Prefix.pch
 delete mode 100644 Xcode/TemplatesForXcodeSnowLeopard/SDL OpenGL Application/___PROJECTNAME___.xcodeproj/TemplateIcon.icns
 delete mode 100644 Xcode/TemplatesForXcodeSnowLeopard/SDL OpenGL Application/___PROJECTNAME___.xcodeproj/TemplateInfo.plist
 delete mode 100644 Xcode/TemplatesForXcodeSnowLeopard/SDL OpenGL Application/___PROJECTNAME___.xcodeproj/project.pbxproj
 delete mode 100644 Xcode/TemplatesForXcodeSnowLeopard/SDL OpenGL Application/atlantis/atlantis.c
 delete mode 100644 Xcode/TemplatesForXcodeSnowLeopard/SDL OpenGL Application/atlantis/atlantis.h
 delete mode 100644 Xcode/TemplatesForXcodeSnowLeopard/SDL OpenGL Application/atlantis/dolphin.c
 delete mode 100644 Xcode/TemplatesForXcodeSnowLeopard/SDL OpenGL Application/atlantis/shark.c
 delete mode 100644 Xcode/TemplatesForXcodeSnowLeopard/SDL OpenGL Application/atlantis/swim.c
 delete mode 100644 Xcode/TemplatesForXcodeSnowLeopard/SDL OpenGL Application/atlantis/whale.c
 delete mode 100644 Xcode/TemplatesForXcodeSnowLeopard/SDL OpenGL Application/main.c
 delete mode 100755 Xcode/TemplatesForXcodeTiger/SDL Application/English.lproj/InfoPlist.strings
 delete mode 100644 Xcode/TemplatesForXcodeTiger/SDL Application/Info.plist
 delete mode 100644 Xcode/TemplatesForXcodeTiger/SDL Application/SDLApp.xcodeproj/TemplateInfo.plist
 delete mode 100644 Xcode/TemplatesForXcodeTiger/SDL Application/SDLApp.xcodeproj/project.pbxproj
 delete mode 100644 Xcode/TemplatesForXcodeTiger/SDL Application/SDLApp_Prefix.pch
 delete mode 100644 Xcode/TemplatesForXcodeTiger/SDL Application/main.c
 delete mode 100755 Xcode/TemplatesForXcodeTiger/SDL Cocoa Application/English.lproj/InfoPlist.strings
 delete mode 100644 Xcode/TemplatesForXcodeTiger/SDL Cocoa Application/English.lproj/SDLMain.nib/classes.nib
 delete mode 100644 Xcode/TemplatesForXcodeTiger/SDL Cocoa Application/English.lproj/SDLMain.nib/info.nib
 delete mode 100644 Xcode/TemplatesForXcodeTiger/SDL Cocoa Application/English.lproj/SDLMain.nib/objects.nib
 delete mode 100644 Xcode/TemplatesForXcodeTiger/SDL Cocoa Application/Info.plist
 delete mode 100644 Xcode/TemplatesForXcodeTiger/SDL Cocoa Application/SDLApp_Prefix.pch
 delete mode 100644 Xcode/TemplatesForXcodeTiger/SDL Cocoa Application/SDLCocoaApp.xcodeproj/TemplateInfo.plist
 delete mode 100644 Xcode/TemplatesForXcodeTiger/SDL Cocoa Application/SDLCocoaApp.xcodeproj/project.pbxproj
 delete mode 100644 Xcode/TemplatesForXcodeTiger/SDL Cocoa Application/main.c
 delete mode 100755 Xcode/TemplatesForXcodeTiger/SDL OpenGL Application/English.lproj/InfoPlist.strings
 delete mode 100644 Xcode/TemplatesForXcodeTiger/SDL OpenGL Application/Info.plist
 delete mode 100644 Xcode/TemplatesForXcodeTiger/SDL OpenGL Application/SDLApp_Prefix.pch
 delete mode 100644 Xcode/TemplatesForXcodeTiger/SDL OpenGL Application/SDLOpenGLApp.xcodeproj/TemplateInfo.plist
 delete mode 100644 Xcode/TemplatesForXcodeTiger/SDL OpenGL Application/SDLOpenGLApp.xcodeproj/project.pbxproj
 delete mode 100644 Xcode/TemplatesForXcodeTiger/SDL OpenGL Application/atlantis/atlantis.c
 delete mode 100644 Xcode/TemplatesForXcodeTiger/SDL OpenGL Application/atlantis/atlantis.h
 delete mode 100644 Xcode/TemplatesForXcodeTiger/SDL OpenGL Application/atlantis/dolphin.c
 delete mode 100644 Xcode/TemplatesForXcodeTiger/SDL OpenGL Application/atlantis/shark.c
 delete mode 100644 Xcode/TemplatesForXcodeTiger/SDL OpenGL Application/atlantis/swim.c
 delete mode 100644 Xcode/TemplatesForXcodeTiger/SDL OpenGL Application/atlantis/whale.c
 delete mode 100644 Xcode/TemplatesForXcodeTiger/SDL OpenGL Application/main.c
 delete mode 100755 Xcode/package
 delete mode 100755 Xcode/stationary.csh
 delete mode 100755 Xcode/uninstall.csh

diff --git a/Xcode/SDL/SDL.xcodeproj/project.pbxproj b/Xcode/SDL/SDL.xcodeproj/project.pbxproj
index 4755774d8..48c4c0edf 100755
--- a/Xcode/SDL/SDL.xcodeproj/project.pbxproj
+++ b/Xcode/SDL/SDL.xcodeproj/project.pbxproj
@@ -6,20 +6,6 @@
 	objectVersion = 46;
 	objects = {
 
-/* Begin PBXAggregateTarget section */
-		0083103F1072EA5700A531F1 /* Generate Doxygen DocSet */ = {
-			isa = PBXAggregateTarget;
-			buildConfigurationList = 008310471072EAAE00A531F1 /* Build configuration list for PBXAggregateTarget "Generate Doxygen DocSet" */;
-			buildPhases = (
-				0083103E1072EA5700A531F1 /* ShellScript */,
-			);
-			dependencies = (
-			);
-			name = "Generate Doxygen DocSet";
-			productName = "Generate Doxygen DocSet";
-		};
-/* End PBXAggregateTarget section */
-
 /* Begin PBXBuildFile section */
 		007317A20858DECD00B2BC32 /* AudioToolbox.framework in Frameworks */ = {isa = PBXBuildFile; fileRef = 0073179B0858DECD00B2BC32 /* AudioToolbox.framework */; };
 		007317A30858DECD00B2BC32 /* AudioUnit.framework in Frameworks */ = {isa = PBXBuildFile; fileRef = 0073179C0858DECD00B2BC32 /* AudioUnit.framework */; };
@@ -789,13 +775,6 @@
 /* End PBXBuildFile section */
 
 /* Begin PBXContainerItemProxy section */
-		008310451072EA9000A531F1 /* PBXContainerItemProxy */ = {
-			isa = PBXContainerItemProxy;
-			containerPortal = 0867D690FE84028FC02AAC07 /* Project object */;
-			proxyType = 1;
-			remoteGlobalIDString = 0083103F1072EA5700A531F1;
-			remoteInfo = "Generate Doxygen DocSet";
-		};
 		BECDF6C50761BA81005FE872 /* PBXContainerItemProxy */ = {
 			isa = PBXContainerItemProxy;
 			containerPortal = 0867D690FE84028FC02AAC07 /* Project object */;
@@ -1069,7 +1048,6 @@
 		BECDF66C0761BA81005FE872 /* SDL2.framework */ = {isa = PBXFileReference; explicitFileType = wrapper.framework; includeInIndex = 0; path = SDL2.framework; sourceTree = BUILT_PRODUCTS_DIR; };
 		BECDF6B30761BA81005FE872 /* libSDL2.a */ = {isa = PBXFileReference; explicitFileType = archive.ar; includeInIndex = 0; path = libSDL2.a; sourceTree = BUILT_PRODUCTS_DIR; };
 		BECDF6BE0761BA81005FE872 /* Standard DMG */ = {isa = PBXFileReference; explicitFileType = "compiled.mach-o.executable"; includeInIndex = 0; path = "Standard DMG"; sourceTree = BUILT_PRODUCTS_DIR; };
-		BECDF6C30761BA81005FE872 /* Developer Extras Package */ = {isa = PBXFileReference; explicitFileType = "compiled.mach-o.executable"; includeInIndex = 0; path = "Developer Extras Package"; sourceTree = BUILT_PRODUCTS_DIR; };
 		DB31407717554B71006C0E22 /* libSDL2.dylib */ = {isa = PBXFileReference; explicitFileType = "compiled.mach-o.dylib"; includeInIndex = 0; path = libSDL2.dylib; sourceTree = BUILT_PRODUCTS_DIR; };
 		F59C70FF00D5CB5801000001 /* ReadMe.txt */ = {isa = PBXFileReference; fileEncoding = 30; lastKnownFileType = text; path = ReadMe.txt; sourceTree = ""; };
 		F59C710000D5CB5801000001 /* Welcome.txt */ = {isa = PBXFileReference; fileEncoding = 30; lastKnownFileType = text; path = Welcome.txt; sourceTree = ""; };
@@ -1200,7 +1178,6 @@
 				BECDF66C0761BA81005FE872 /* SDL2.framework */,
 				BECDF6B30761BA81005FE872 /* libSDL2.a */,
 				BECDF6BE0761BA81005FE872 /* Standard DMG */,
-				BECDF6C30761BA81005FE872 /* Developer Extras Package */,
 				DB31407717554B71006C0E22 /* libSDL2.dylib */,
 			);
 			name = Products;
@@ -2222,23 +2199,6 @@
 			productReference = BECDF6BE0761BA81005FE872 /* Standard DMG */;
 			productType = "com.apple.product-type.tool";
 		};
-		BECDF6C00761BA81005FE872 /* Developer Extras Package */ = {
-			isa = PBXNativeTarget;
-			buildConfigurationList = 0073178A0858DB0500B2BC32 /* Build configuration list for PBXNativeTarget "Developer Extras Package" */;
-			buildPhases = (
-				BECDF6C20761BA81005FE872 /* ShellScript */,
-			);
-			buildRules = (
-			);
-			dependencies = (
-				008310461072EA9000A531F1 /* PBXTargetDependency */,
-			);
-			name = "Developer Extras Package";
-			productInstallPath = /usr/local/bin;
-			productName = "Devel Package";
-			productReference = BECDF6C30761BA81005FE872 /* Developer Extras Package */;
-			productType = "com.apple.product-type.tool";
-		};
 		DB313F7217554B71006C0E22 /* Shared Library */ = {
 			isa = PBXNativeTarget;
 			buildConfigurationList = DB31407417554B71006C0E22 /* Build configuration list for PBXNativeTarget "Shared Library" */;
@@ -2286,8 +2246,6 @@
 				BECDF66D0761BA81005FE872 /* Static Library */,
 				DB313F7217554B71006C0E22 /* Shared Library */,
 				BECDF6BB0761BA81005FE872 /* Standard DMG */,
-				BECDF6C00761BA81005FE872 /* Developer Extras Package */,
-				0083103F1072EA5700A531F1 /* Generate Doxygen DocSet */,
 			);
 		};
 /* End PBXProject section */
@@ -2320,19 +2278,6 @@
 /* End PBXRezBuildPhase section */
 
 /* Begin PBXShellScriptBuildPhase section */
-		0083103E1072EA5700A531F1 /* ShellScript */ = {
-			isa = PBXShellScriptBuildPhase;
-			buildActionMask = 2147483647;
-			files = (
-			);
-			inputPaths = (
-			);
-			outputPaths = (
-			);
-			runOnlyForDeploymentPostprocessing = 0;
-			shellPath = /bin/sh;
-			shellScript = "# DOXYGEN_EXE is defined in the Enclosing Target's Build Tab\n# DOXYGEN_EXE=/Applications/Doxygen.app/Contents/Resources/doxygen\n#echo DOXYGEN_EXE dir is $DOXYGEN_EXE\n\nDOC_DIR=$SRCROOT/../XcodeDocSet\n#echo Doc dir is $DOC_DIR\ncd $DOC_DIR\n$DOXYGEN_EXE $DOC_DIR/Doxyfile\ncd html\nmake\nif [ -d $SRCROOT/../XcodeDocSet/org.libsdl.sdl.docset ] ; then\n\t# remove previous docset\n\trm -rf $SRCROOT/../XcodeDocSet/org.libsdl.sdl.docset\nfi\nmv org.libsdl.sdl.docset ..\ncd ..\nrm -rf html\nexit 0";
-		};
 		BECDF6BD0761BA81005FE872 /* ShellScript */ = {
 			isa = PBXShellScriptBuildPhase;
 			buildActionMask = 12;
@@ -2340,17 +2285,7 @@
 			);
 			runOnlyForDeploymentPostprocessing = 0;
 			shellPath = /bin/sh;
-			shellScript = "# clean up the framework, remove headers, extra files\nmkdir -p build/dmg-tmp\nmkdir -p build/dmg-tmp/devel-lite\n`xcode-select -print-path`/Tools/CpMac -r $TARGET_BUILD_DIR/SDL2.framework build/dmg-tmp/\n\ncp pkg-support/resources/License.txt build/dmg-tmp\ncp pkg-support/resources/ReadMe.txt build/dmg-tmp\ncp pkg-support/resources/ReadMeDevLite.txt build/dmg-tmp/devel-lite\n\n# remove the .DS_Store files if any (we may want to provide one in the future for fancy .dmgs)\nfind build/dmg-tmp -name .DS_Store -exec rm -f \"{}\" \\;\n\n# for fancy .dmg\nmkdir -p build/dmg-tmp/.logo\ncp pkg-support/resources/SDL_DS_Store build/dmg-tmp/.DS_Store\ncp pkg-support/sdl_logo.pdf build/dmg-tmp/.logo\n\n# create the dmg\nhdiutil create -ov -fs HFS+ -volname SDL2 -srcfolder build/dmg-tmp build/SDL2.dmg\n\n# clean up\nrm -rf build/dmg-tmp";
-		};
-		BECDF6C20761BA81005FE872 /* ShellScript */ = {
-			isa = PBXShellScriptBuildPhase;
-			buildActionMask = 2147483647;
-			comments = "The old .pkg generator script:\n\n# make a copy of the framework to work with\nmkdir -p build/pkg-tmp\n\n## We're changing this to follow OS X conventions, where the headers and\n## framework are bundled together. Thus this development package won't \n## actually contain any direct framework elements.\n#/Developer/Tools/CpMac -r build/SDL.framework build/pkg-tmp/\n\n# copy in some files they might want around...\ncp ../../docs.html build/pkg-tmp\ncp -r ../../docs build/pkg-tmp\n#cp -r ../../src/main/macosx build/pkg-tmp/\n#rm -rf build/pkg-tmp/main/exports\ncp -r \"../Project Stationary\" build/pkg-tmp/\ncp \"pkg-support/Readme SDL Developer.txt\" build/pkg-tmp/\n#cp \"../uninstall.csh\" build/pkg-tmp/\n\n## We shouldn't have any framework stuff to deal with now\n# clean up the framework, remove extra files\n# rm -rf build/pkg-tmp/SDL.framework/Resources/pbdevelopment.plist\n\n# remove the .DS_Store file to keep tool from crapping out\nfind pkg-support -name \".DS_Store\" -exec rm -rf \"{}\" \";\" \n\n# create the .pkg\n../package build/pkg-tmp pkg-support/SDL-devel.info -d build -r pkg-support/devel-resources \n#\"/Developer/Applications/Utilities/PackageMaker.app/Contents/MacOS/PackageMaker\" -build -p build/ -f build/pkg-tmp -r pkg-support/devel-resources -i Info.plist -d Description.plist\n\n# create install scripts\nDIR=build/SDL-devel.pkg/\ncp $DIR/install.sh $DIR/SDL-devel.post_install\nmv $DIR/install.sh $DIR/SDL-devel.post_upgrade\n\n# add execute flag to scripts\nchmod 755 $DIR/SDL-devel.post_install $DIR/SDL-devel.post_upgrade\n\n# remove temporary files\n#rm -rf build/pkg-tmp\n\n# compress\n(cd build; gnutar -zcvf SDL-devel.pkg.tar.gz SDL-devel.pkg)";
-			files = (
-			);
-			runOnlyForDeploymentPostprocessing = 0;
-			shellPath = /bin/sh;
-			shellScript = "# make a directory to hold the stuff we're going to package up\nmkdir -p build/devel-extras-tmp\nmkdir -p build/devel-extras-tmp/Documentation\nmkdir -p build/devel-extras-tmp/Documentation/docs/XcodeDocSet\nmkdir -p build/devel-extras-tmp/XcodeTemplates\n#mkdir -p build/devel-extras-tmp/SDLMain\n#mkdir -p build/devel-extras-tmp/SDLMain/NIBless\n#mkdir -p build/devel-extras-tmp/SDLMain/CocoaMenus\n\n# copy the docs\ncp ../../docs.html build/devel-extras-tmp/Documentation\ncp -r ../../docs build/devel-extras-tmp/Documentation\n\n# Copy Doxyfile for DocSet\ncp $SRCROOT/../XcodeDocSet/Doxyfile build/devel-extras-tmp/Documentation/docs/XcodeDocSet\n\n# Copy DocSet (if it exists)\nif [ -d $SRCROOT/../XcodeDocSet/org.libsdl.sdl.docset ] ; then\n#\techo Found docset directory\n\tmv $SRCROOT/../XcodeDocSet/org.libsdl.sdl.docset build/devel-extras-tmp/Documentation/docs/XcodeDocSet/\nelse\n\techo Warning: Could not find DocSet and will be omitted from package\nfi\n\n# copy the Xcode Project user templates\ncp -r \"../TemplatesForXcodeTiger\" build/devel-extras-tmp/XcodeTemplates\ncp -r \"../TemplatesForXcodeLeopard\" build/devel-extras-tmp/XcodeTemplates\ncp -r \"../TemplatesForXcodeSnowLeopard\" build/devel-extras-tmp/XcodeTemplates\n\ncp \"pkg-support/Readme SDL Developer.txt\" build/devel-extras-tmp\n\n\n# readme file\n#cp pkg-support/resources/ReadMe.txt build/devel-extras-tmp\n\n#cp pkg-support/resources/UniversalBinaryNotes.rtf build/devel-extras-tmp\n\n# Copy the devel-lite stuff just in case the user didn't notice it in the main package\n# I should copy all the different SDLMain versions (and nibs) instead.\n# I'm assuming the default is the same as the SDL App and SDL/OpenGL templates\n\n#cp pkg-support/resources/ReadMeDevLite.txt build/devel-extras-tmp/SDLMain/NIBless\n#cp ../../src/main/macosx/SDLMain.h build/devel-extras-tmp/SDLMain/NIBless\n#cp ../../src/main/macosx/SDLMain.m build/devel-extras-tmp/SDLMain/NIBless\n\n# Nib stuff from SDL-Cocoa App\n#/Developer/Tools/CpMac -r \"../TemplatesForXcodeSnowLeopard/SDL Cocoa Application/#SDLMain.h\" build/devel-extras-tmp/SDLMain/CocoaMenus\n#/Developer/Tools/CpMac -r \"../TemplatesForXcodeSnowLeopard/SDL Cocoa Application/#SDLMain.m\" build/devel-extras-tmp/SDLMain/CocoaMenus\n#/Developer/Tools/CpMac -r \"../TemplatesForXcodeSnowLeopard/SDL Cocoa Application/#English.lproj/SDLMain.nib\" build/devel-extras-tmp/SDLMain/CocoaMenus\n\n# Copy precompiled libSDLmain.a's here??? We have potentially 3 different ones?\n# /Developer/Tools/CpMac -r $TARGET_BUILD_DIR/libSDLmain.a build/devel-extras-tmp/SDLMain/NIBless\n#\n#\n\n# Copy sdl-config's for those who've been wanting one? Will need to document that it may\n# require manual changes if you don't install the framework to /Library/Frameworks\n# <>\n\n# remove the .DS_Store files if any (we may want to provide one in the future for fancy .dmgs)\nfind build/devel-extras-tmp -name .DS_Store -exec rm -f \"{}\" \\;\n# remove CVS stuff\nfind build/devel-extras-tmp -name .cvsignore -exec rm -f \"{}\" \\;\n# depth first traversal, type=directory, remove recursively\nfind -d build/devel-extras-tmp -type d -name CVS -exec rm -rf \"{}\" \\;\nfind -d build/devel-extras-tmp -type d -name .svn -exec rm -rf \"{}\" \\;\n\n\n# create the dmg\nhdiutil create -ov -fs HFS+ -volname SDL-devel-extras -srcfolder build/devel-extras-tmp build/SDL-devel-extras.dmg\n\n# clean up\nrm -rf build/devel-extras-tmp\n\n# compress it???\n#(cd build; gnutar -zcvf SDL.dmg.tar.gz SDL.dmg)\n\n";
+			shellScript = "# clean up the framework, remove headers, extra files\nmkdir -p build/dmg-tmp\n`xcode-select -print-path`/Tools/CpMac -r $TARGET_BUILD_DIR/SDL2.framework build/dmg-tmp/\n\ncp pkg-support/resources/License.txt build/dmg-tmp\ncp pkg-support/resources/ReadMe.txt build/dmg-tmp\n\n# remove the .DS_Store files if any (we may want to provide one in the future for fancy .dmgs)\nfind build/dmg-tmp -name .DS_Store -exec rm -f \"{}\" \\;\n\n# for fancy .dmg\nmkdir -p build/dmg-tmp/.logo\ncp pkg-support/resources/SDL_DS_Store build/dmg-tmp/.DS_Store\ncp pkg-support/sdl_logo.pdf build/dmg-tmp/.logo\n\n# create the dmg\nhdiutil create -ov -fs HFS+ -volname SDL2 -srcfolder build/dmg-tmp build/SDL2.dmg\n\n# clean up\nrm -rf build/dmg-tmp";
 		};
 /* End PBXShellScriptBuildPhase section */
 
@@ -2706,11 +2641,6 @@
 /* End PBXSourcesBuildPhase section */
 
 /* Begin PBXTargetDependency section */
-		008310461072EA9000A531F1 /* PBXTargetDependency */ = {
-			isa = PBXTargetDependency;
-			target = 0083103F1072EA5700A531F1 /* Generate Doxygen DocSet */;
-			targetProxy = 008310451072EA9000A531F1 /* PBXContainerItemProxy */;
-		};
 		BECDF6C60761BA81005FE872 /* PBXTargetDependency */ = {
 			isa = PBXTargetDependency;
 			target = BECDF5FE0761BA81005FE872 /* Framework */;
@@ -2719,24 +2649,6 @@
 /* End PBXTargetDependency section */
 
 /* Begin XCBuildConfiguration section */
-		008310421072EA5700A531F1 /* Debug */ = {
-			isa = XCBuildConfiguration;
-			buildSettings = {
-				DOXYGEN_EXE = /Applications/Doxygen.app/Contents/Resources/doxygen;
-				GCC_VERSION = com.apple.compilers.llvm.clang.1_0;
-				PRODUCT_NAME = "Generate Doxygen DocSet";
-			};
-			name = Debug;
-		};
-		008310431072EA5700A531F1 /* Release */ = {
-			isa = XCBuildConfiguration;
-			buildSettings = {
-				DOXYGEN_EXE = /Applications/Doxygen.app/Contents/Resources/doxygen;
-				GCC_VERSION = com.apple.compilers.llvm.clang.1_0;
-				PRODUCT_NAME = "Generate Doxygen DocSet";
-			};
-			name = Release;
-		};
 		00CFA621106A567900758660 /* Release */ = {
 			isa = XCBuildConfiguration;
 			buildSettings = {
@@ -2793,13 +2705,6 @@
 			};
 			name = Release;
 		};
-		00CFA626106A567900758660 /* Release */ = {
-			isa = XCBuildConfiguration;
-			buildSettings = {
-				PRODUCT_NAME = "Developer Extras Package";
-			};
-			name = Release;
-		};
 		00CFA627106A568900758660 /* Debug */ = {
 			isa = XCBuildConfiguration;
 			buildSettings = {
@@ -2854,13 +2759,6 @@
 			};
 			name = Debug;
 		};
-		00CFA62C106A568900758660 /* Debug */ = {
-			isa = XCBuildConfiguration;
-			buildSettings = {
-				PRODUCT_NAME = "Developer Extras Package";
-			};
-			name = Debug;
-		};
 		DB31407517554B71006C0E22 /* Debug */ = {
 			isa = XCBuildConfiguration;
 			buildSettings = {
@@ -2929,15 +2827,6 @@
 			defaultConfigurationIsVisible = 0;
 			defaultConfigurationName = Debug;
 		};
-		0073178A0858DB0500B2BC32 /* Build configuration list for PBXNativeTarget "Developer Extras Package" */ = {
-			isa = XCConfigurationList;
-			buildConfigurations = (
-				00CFA62C106A568900758660 /* Debug */,
-				00CFA626106A567900758660 /* Release */,
-			);
-			defaultConfigurationIsVisible = 0;
-			defaultConfigurationName = Debug;
-		};
 		0073178E0858DB0500B2BC32 /* Build configuration list for PBXProject "SDL" */ = {
 			isa = XCConfigurationList;
 			buildConfigurations = (
@@ -2947,15 +2836,6 @@
 			defaultConfigurationIsVisible = 0;
 			defaultConfigurationName = Debug;
 		};
-		008310471072EAAE00A531F1 /* Build configuration list for PBXAggregateTarget "Generate Doxygen DocSet" */ = {
-			isa = XCConfigurationList;
-			buildConfigurations = (
-				008310421072EA5700A531F1 /* Debug */,
-				008310431072EA5700A531F1 /* Release */,
-			);
-			defaultConfigurationIsVisible = 0;
-			defaultConfigurationName = Debug;
-		};
 		DB31407417554B71006C0E22 /* Build configuration list for PBXNativeTarget "Shared Library" */ = {
 			isa = XCConfigurationList;
 			buildConfigurations = (
diff --git a/Xcode/SDL/pkg-support/Readme SDL Developer.txt b/Xcode/SDL/pkg-support/Readme SDL Developer.txt
deleted file mode 100755
index 348b80734..000000000
--- a/Xcode/SDL/pkg-support/Readme SDL Developer.txt	
+++ /dev/null
@@ -1,282 +0,0 @@
-SDL Mac OS X Developer Notes:
-	This is an optional developer package to provide extras that an 
-	SDL developer might benefit from.
-	
-	Make sure you have already installed the SDL.framework 
-	from the SDL.dmg. 
-	
-	For more complete documentation, please see READMEs included 
-	with the  SDL source code. Also, don't forget about the API 
-	documentation (also included with this package).
-
-
-This package contains:
-- SDL API Documentation
-- A variety of SDLMain and .Nib files to choose from
-- Xcode project templates
-
-
-SDL API Documentation:
-	We include both the HTML documentation and the man files. 
-	We also include an Xocde DocSet which 
-	is generated via Doxygen. These require Xcode 3.0 or greater.
-	
-	You will need to drill down into the XcodeDocSet directory 
-	from the  Documentation folder and find the 
-	org.libsdl.sdl.docset bundle. We recommend you copy this to:
-	
-	/Library/Developer/Shared/Documentation/DocSets
-
-	Again, this follows all the standard Xcode patterns 
-	described with the project templates (below). You may need 
-	to create the directories if they don't already exist. 
-	You may install it on a per-user basis. 
-	And you may target specific versions of Xcode 
-	in lieu of using the "Shared" directory.
-
-	To use, it is quite simple. Just bring up the Xcode 
-	Documentation Browser window (can be activated through 
-	the Xcode Help Menu) and start searching for something. 
-
-	If nothing is found on a legitimate search, verify that 
-	the SDL documentation is enabled by opening up the DocSet 
-	popup box below the toolbar in Snow Leopard. 
-	(In Leopard, the DocSets appear in the left-side panel.) 
-
-	Another handy trick is to use the mouse and Option-Double-Click 
-	on a function or keyword to bring up documentation on the 
-	selected item. Prior to Xcode 3.2 (Snow Leopard), this would 
-	jump you to the entry in the Xcode Documentation Browser.
-
-	However, in Xcode 3.2 (Snow Leopard), this behavior has been 
-	altered and you are now given a hovering connected popup box 
-	on the selected item (called Quick Help). Unfortunately, the 
-	Doxygen generated DocSet doesn't currently provide Quick Help 
-	information. You can either follow a link to the main 
-	Documentation Browser from the Quick Help, or alternatively, 
-	you can bypass Quick Help by using Command-Option-Double-Click 
-	instead of Option-Double-Click. (Please file feedback with both 
-	Doxygen and Apple to improve Quick Help integration.)
-
-
-	For those that want to tweak the documentation output, 
-	you can find my Doxyfile in the XcodeDocSet directory in 
-	the Xcode directory of the SDL source code base (and in this package). 
-
-	One of the most significant options is "Separate Member Pages" 
-	which I disable. When disabled, the documentation is about 6MB. 
-	When enabled, the documentation is closer to 1.6GB (yes gigabytes). 
-	Obviously, distribution will be really hard with sizes that huge 
-	so I disable the option.
-
-	I also disabled Dot because there didn't seem to be 
-	much benefit of generating graphs for public C functions.
-
-	One thing I would like to see is a CSS file that makes the 
-	Doxygen DocSet look more like the native Apple documentation 
-	style. Style sheets are outside my expertise so I am asking for 
-	contributions on this one. Meanwhile, I also request you send 
-	feedback to Doxygen and Apple about this issue too.
-
-
-	Finally for convenience, I have added a new shell script target 
-	to the Xcode project that builds SDL that refers to my Doxyfile 
-	and generate the DocSet we distribute.
-
-
-SDLMain:
-	We include several different variations of SDLMain and the 
-	.Nibs. (Each of these are demonstrated by the different PB/Xcode 
-	project templates.) You get to pick which one you want to use, 
-	or you can write your own to meet your own specific needs. We do 
-	not currently provide a libSDLMain.a. You can build it yourself
-	once you decide which one you want to use though it is easier and 
-	recommended in the SDL FAQ that you just copy the SDLMain.h and 
-	SDLMain.m directly into your project. If you are puzzled by this, 
-	we strongly recommend you look at the different PB/Xcode project 
-	templates to understand their uses and differences. (See Project 
-	Template info below.) Note that the "Nibless" version is the same 
-	version of SDLMain we include the the devel-lite section of the 
-	main SDL.dmg.
-	
-	
-Xocde Project Templates:
-	For convenience, we provide Project Templates for Xcode. 
-	Using Xcode is *not* a requirement for using 
-	the SDL.framework. However, for newbies, we do recommend trying 
-	out the Xcode templates first (and work your way back to raw gcc 
-	if you desire), as the Xcode templates try to setup everything
-	for you in a working state. This avoids the need to ask those 
-	many reoccuring questions that appear on the mailing list 
-	or the SDL FAQ.
-
-
-	We have provided 3 different kinds of SDL templates for Xcode and have 
-	a different set of templates for each version of Xcode (which generally 
-	correspond with a particular Mac OS X version). 
-	The installion directory depends on which version of Xcode you have.
-	(Note: These directories may not already exist on your system so you must create them yourself.)
-
-	For Leopard and Snow Leopard (Xcode 2.5, 3+), we recommend you install to:
-	/Library/Application Support/Developer/Shared/Xcode/Project Templates/Application
-
-	For Xcode 1.0 to 2.4,
-	/Library/Application Support/Apple/Developer Tools/Project Templates/Application 
-
-
-	Also note you may place it in per-user locations, e.g.
-	~/Library/Application Support/Developer/Shared/Xcode/Project Templates/Application
-
-	
-	And for advanced users who have multiple versions of Xcode installed on a single system,
-	you may put each set in a directory with the Xcode version number instead of using "Shared", e.g.
-	/Library/Application Support/Developer/2.5/Xcode/Project Templates/Application
-	/Library/Application Support/Developer/3.1/Xcode/Project Templates/Application
-	/Library/Application Support/Developer/3.2/Xcode/Project Templates/Application
-
-
-	Copy each of the SDL/Xcode template directories into the correct location (e.g. "SDL OpenGL Application").
-	Do not copy our enclosing folder into the location (e.g. TemplatesForXcodeSnowLeopard).
-	So for example, in:
-	/Library/Application Support/Developer/Shared/Xcode/Project Templates/Application
-	you should have the 3 folders:
-	SDL Application
-	SDL Cocoa Application
-	SDL OpenGL Application
-
-
-	After doing this, when doing a File->New Project, you will see the 
-	projects under the Application category.
-	(Newer versions of Xcode have a separate section for User Templates and it will 
-	appear in the Application category of the User Templates section.)
-
-
-
-	How to create a new SDL project:
-
-	1. Open Xcode
-	2. Select File->New Project
-	3. Select SDL Application
-	4. Name, Save, and Finish
-	5. Add your sources.
-	*6. That's it!
-
-	* If you installed the SDL.framework to $(HOME)/Library/Frameworks 
-	instead of /Library/Frameworks, you will need to update the 
-	location of the SDL.framework in the "Groups & Files" browser.
-	
-
-	The project templates we provide are:
-	- SDL Application
-		This is the barebones, most basic version. There is no 
-		customized .Nib file. While still utilizing Cocoa under 
-		the hood, this version may be best suited for fullscreen 
-		applications.
-
-	- SDL Cocoa Application
-		This demonstrates the integration of using native 
-		Cocoa Menus with an SDL Application. For applications
-		designed to run in Windowed mode, Mac users may appreciate 
-		having access to standard menus for things
-		like Preferences and Quiting (among other things).
-		
-	- SDL OpenGL Application
-		This reuses the same SDLMain from the "SDL Application" 
-		temmplate, but also demonstrates how to 
-		bring OpenGL into the mix.
-
-
-Special Notes:
-Only the 10.6 Snow Leopard templates (and later) will include 64-bit in the Universal Binary as 
-prior versions of OS X lacked the API support SDL requires for 64-bit to work correctly.
-To prevent 64-bit SDL executables from being launched on 10.5 Leopard, a special key has been set 
-in the Info.plist in our Snow Leopard SDL/Xcode templates.
-
-
-Xcode Tips and Tricks:
-
-- Building from command line
-	Use the command line tool: xcodebuild (see man page)
-		 
-- Running your app
-    You can send command line args to your app by either 
-	invoking it from the command line (in *.app/Contents/MacOS) 
-	or by entering them in the "Executables" panel of the target 
-	settings.
-	
-- Working directory
-    As defined in the SDLMain.m file, the working directory of 
-    your SDL app is by default set to its parent. You may wish to 
-    change this to better suit your needs.
-
-
-
-Additional References:
-
- - Screencast tutorials for getting started with OpenSceneGraph/Mac OS X are 
- 	available at:
-	http://www.openscenegraph.org/projects/osg/wiki/Support/Tutorials/MacOSXTips
-	Though these are OpenSceneGraph centric, the same exact concepts apply to 
-	SDL, thus the videos are recommended for everybody getting started with
-	developing on Mac OS X. (You can skim over the PlugIns stuff since SDL
-	doesn't have any PlugIns to worry about.)
-
-
-Partial History:
-2009-09-21 - CustomView template project was removed because it was broken by 
-	the removal of legacy Quicktime support while moving to 64-bit.
-	ProjectBuilder templates were removed.
-	Tiger, Leopard, and Snow Leopard Xcode templates were introduced instead of 
-	using a single common template due to the differences between the 3.
-	(Tiger used a chevron marker for substitution while Leopard/Snow Leopard use ___
-	and we need the 10.6 SDK for 64-bit.)
-
-2007-12-30 - Updated documentation to reflect new template paths in Leopard
-	Xcode. Added reference to OSG screencasts.
-
-2006-03-17 - Changed the package format from a .pkg based 
-	installer to a .dmg to avoid requiring administrator/root 
-	to access contents, for better transparency, and to allow 
-	users to more easily control which components 
-	they actually want to install. 
-	Introduced and updated documentation.
-	Created brand new Xcode project templates for Xcode 2.1 
-	based on the old Project Builder templates as they 
-	required Xcode users to "Upgrade to Native Target". The new 
-	templates try to leveage more default options and leverage 
-	more Xcode conventions. The major change that may introduce 
-	some breakage is that I now link to the SDL framework
-	via the "Group & Files" browser instead of using build 
-	options. The downside to this is that if the user 
-	installs the SDL.framework to a place other than 
-	/Library/Frameworks (e.g. $(HOME)/Library/Frameworks),
-	the framework will not be found to link to and the user 
-	has to manually fix this. But the upshot is (in addition to 
-	being visually displayed in the forefront) is that it is 
-	really easy to copy (embed) the framework automatically 
-	into the .app bundle on build. So I have added this 
-	feature, which makes the application potentially 
-	drag-and-droppable ready. The Project Builder templates 
-	are mostly unchanged due to the fact that I don't have 
-	Project Builder. I did rename a file extension to .pbxproj 
-	for the SDL Custom Cocoa Application template because 
-	the .pbx extension would not load in my version of Xcode.
-	For both Project Builder and Xcode templates, I resync'd
-	the SDLMain.* files for the SDL App and OpenGL App 
-	templates. I think people forget that we have 2 other 
-	SDLMain's (and .Nib's) and somebody needs to go 
-	through them and merge the new changes into those.
-	I also wrote a fix for the SDL Custom Cocoa App 
-	template in MyController.m. The sprite loading code 
-	needed to be able to find the icon.bmp in the .app
-	bundle's Resources folder. This change was needed to get 
-	the app to run out of the box. This might change is untested 
-	with Project Builder though and might break it.
-	There also seemed to be some corruption in the .nib itself.
-	Merely opening it and saving (allowing IB to correct the
-	.nib) seemed to correct things.
-	(Eric Wing)
-
-
-
-
diff --git a/Xcode/SDL/pkg-support/SDL-devel.info b/Xcode/SDL/pkg-support/SDL-devel.info
deleted file mode 100755
index 698f1d603..000000000
--- a/Xcode/SDL/pkg-support/SDL-devel.info
+++ /dev/null
@@ -1,15 +0,0 @@
-Title SDL 1.2.9
-Version 1
-Description SDL Library for Mac OS X (http://www.libsdl.org)
-DefaultLocation /Developer/Documentation/SDL
-Diskname (null)
-DeleteWarning 
-NeedsAuthorization YES
-DisableStop NO
-UseUserMask YES
-Application NO
-Relocatable NO
-Required NO
-InstallOnly NO
-RequiresReboot NO
-InstallFat NO
diff --git a/Xcode/SDL/pkg-support/devel-resources/ReadMe.txt b/Xcode/SDL/pkg-support/devel-resources/ReadMe.txt
deleted file mode 100755
index f4fe36164..000000000
--- a/Xcode/SDL/pkg-support/devel-resources/ReadMe.txt
+++ /dev/null
@@ -1,5 +0,0 @@
-The Simple DirectMedia Layer (SDL for short) is a cross-platform library designed to make it easy to write multi-media software, such as games and emulators.
-
-The Simple DirectMedia Layer library source code is available from: http://www.libsdl.org/
-
-This library is distributed under the terms of the GNU LGPL license: http://www.gnu.org/copyleft/lesser.html
\ No newline at end of file
diff --git a/Xcode/SDL/pkg-support/devel-resources/Welcome.txt b/Xcode/SDL/pkg-support/devel-resources/Welcome.txt
deleted file mode 100755
index 9b0d2862f..000000000
--- a/Xcode/SDL/pkg-support/devel-resources/Welcome.txt
+++ /dev/null
@@ -1,5 +0,0 @@
-This package installs documentation and Project Builder stationary for the SDL framework.
-
-The SDL documentation is installed into /Developer/Documentation/SDL.
-
-The SDL Mac OS X Readme is installed into your home directory.
diff --git a/Xcode/SDL/pkg-support/devel-resources/install.sh b/Xcode/SDL/pkg-support/devel-resources/install.sh
deleted file mode 100755
index e7a4dedff..000000000
--- a/Xcode/SDL/pkg-support/devel-resources/install.sh
+++ /dev/null
@@ -1,76 +0,0 @@
-#!/bin/sh
-# finish up the installation
-# this script should be executed using the sudo command
-# this file is copied to SDL-devel.post_install and SDL-devel.post_upgrade
-# inside the .pkg bundle
-echo "Running post-install script"
-umask 022
-
-USER=`basename ~`
-echo "User is \"$USER\""
-
-ROOT=/Developer/Documentation/SDL
-echo "Fixing framework permissions"
-find $ROOT -type d -exec chmod a+rx {} \;
-find $ROOT -type f -exec chmod a+r {} \;
-
-## We're not installing frameworks here anymore. The single
-## framework should be installed to /Library/Frameworks which 
-## is handled by the standard package (not developer package).
-## Using the home directory here is problematic for multi-user systems too.
-# echo "Moving SDL.framework to ~/Library/Frameworks"
-# move SDL to its proper home, so the target stationary works
-#sudo -u $USER mkdir -p ~/Library/Frameworks
-#sudo -u $USER /Developer/Tools/CpMac -r $ROOT/SDL.framework ~/Library/Frameworks
-
-## I'm not sure where this gets created and what's put in there.
-rm -rf $ROOT/SDL.framework
-
-## I think precompiled headers have changed through the revisions of Apple's gcc.
-## I don't know how useful this is anymore w.r.t. Apple's newest system for precompiled headers.
-## I'm removing this for now.
-# echo "Precompiling Header"
-# precompile header for speedier compiles
-#sudo -u $USER /usr/bin/cc -precomp ~/Library/Frameworks/SDL.framework/Headers/SDL.h -o ~/Library/Frameworks/SDL.framework/Headers/SDL.p
-
-# find the directory to store stationary in
-if [ -e "/Library/Application Support/Apple/Developer Tools" ] ; then
-    echo "Installing project stationary for XCode"
-    PBXDIR="/Library/Application Support/Apple/Developer Tools"
-else
-    echo "Installing project stationary for Project Builder"
-    PBXDIR="/Developer/ProjectBuilder Extras"
-fi
-
-# move stationary to its proper home
-mkdir -p "$PBXDIR/Project Templates/Application"
-mkdir -p "$PBXDIR/Target Templates/SDL"
-
-cp -r "$ROOT/Project Stationary/SDL Application"              "$PBXDIR/Project Templates/Application/"
-cp -r "$ROOT/Project Stationary/SDL Cocoa Application"        "$PBXDIR/Project Templates/Application/"
-cp -r "$ROOT/Project Stationary/SDL Custom Cocoa Application" "$PBXDIR/Project Templates/Application/"
-cp -r "$ROOT/Project Stationary/SDL OpenGL Application"       "$PBXDIR/Project Templates/Application/"
-cp "$ROOT/Project Stationary/Application.trgttmpl"            "$PBXDIR/Target Templates/SDL/"
-
-rm -rf "$ROOT/Project Stationary"
-
-# Actually, man doesn't check this directory by default, so this isn't
-# very helpful anymore.
-#echo "Installing Man Pages"
-## remove old man pages
-#rm -rf "/Developer/Documentation/ManPages/man3/SDL"*
-#
-## install man pages
-#mkdir -p "/Developer/Documentation/ManPages/man3"
-#cp "$ROOT/docs/man3/SDL"* "/Developer/Documentation/ManPages/man3/"
-#rm -rf "$ROOT/docs/man3"
-#
-#echo "Rebuilding Apropos Database"
-## rebuild apropos database
-#/usr/libexec/makewhatis
-
-# copy README file to your home directory
-sudo -u $USER cp "$ROOT/Readme SDL Developer.txt" ~/
-
-# open up the README file
-sudo -u $USER open ~/"Readme SDL Developer.txt"
diff --git a/Xcode/SDL/pkg-support/resources/ReadMe.txt b/Xcode/SDL/pkg-support/resources/ReadMe.txt
index f5c3b9ffc..40ac3a14c 100755
--- a/Xcode/SDL/pkg-support/resources/ReadMe.txt
+++ b/Xcode/SDL/pkg-support/resources/ReadMe.txt
@@ -19,12 +19,6 @@ Copy the SDL2.framework to /Library/Frameworks
 
 You may alternatively install it in /Library/Frameworks 
 if your access privileges are not high enough. 
-(Be aware that the Xcode templates we provide in the SDL Developer Extras 
-package may require some adjustment for your system if you do this.)
-
-
-Known Issues:
-???
 
 
 Additional References:
diff --git a/Xcode/SDL/pkg-support/resources/ReadMeDevLite.txt b/Xcode/SDL/pkg-support/resources/ReadMeDevLite.txt
deleted file mode 100644
index f1831a606..000000000
--- a/Xcode/SDL/pkg-support/resources/ReadMeDevLite.txt
+++ /dev/null
@@ -1,12 +0,0 @@
-This directory is for developers. This directory contains some basic essentials you will need for developing SDL based applications on OS X. The SDL-devel package contains all of this stuff plus more, so you can ignore this if you install the SDL-devel.pkg. The SDL-devel package contains Project Builder/Xcode templates, SDL documentation, and different variations of SDLmain and NIB files for SDL.
-
-To compile an SDL based application on OS X, SDLMain.m must be compiled into your program. (See the SDL FAQ). The SDL-devel.pkg includes Project Builder/Xcode templates which already do this for you. But for those who may not want to install the dev package, an SDLMain is provided here as a convenience. Be aware that there are different variations of SDLMain.m depending on what class of SDL application you make and they are intended to work with NIB files. Only one SDLMain variant is provided here and without any NIB files. You should look to the SDL-devel package for the others. We currently do not provide a SDLMain.a file, partly to call to attention that there are different variations of SDLmain.
-
-To build from the command line, your gcc line will look something like this:
-
-gcc -I/Library/Frameworks/SDL.framework/Headers MyProgram.c SDLmain.m -framework SDL -framework Cocoa
-
-An SDL/OpenGL based application might look like:
-
-gcc -I/Library/Frameworks/SDL.framework/Headers -I/System/Library/Frameworks/OpenGL.framework/Headers MyProgram.c SDLmain.m -framework SDL -framework Cocoa -framework OpenGL
-
diff --git a/Xcode/TemplatesForXcodeLeopard/SDL Application/English.lproj/InfoPlist.strings b/Xcode/TemplatesForXcodeLeopard/SDL Application/English.lproj/InfoPlist.strings
deleted file mode 100644
index 6e721b0ef0e7ef6d44f293955483ecf6ae72291a..0000000000000000000000000000000000000000
GIT binary patch
literal 0
HcmV?d00001

literal 644
zcmb`^O-lk{6b0aC?XP%oDWSEF7L%A6HO44GZDPvtgLFpx2<*pKFiMcvB9ObdT<+nX
zd(Qd#Y^Vut6<(#LCO%{af_IsPrHMjrDJTpD9l4=G-Mqvvtpsl}n-W#iP*Krz<HaO~?0PSu_L
z!QGZw{Wx%3#uGtPVQy3E7#Ww&Zhd;x5=nMb*!8YNTO`);B+}Q>74P|2->Hf9Tw9w-
W
-
-
-
-	CFBundleDevelopmentRegion
-	English
-	CFBundleExecutable
-	${EXECUTABLE_NAME}
-	CFBundleIconFile
-	
-	CFBundleIdentifier
-	com.yourcompany.___PROJECTNAMEASXML___
-	CFBundleInfoDictionaryVersion
-	6.0
-	CFBundleName
-	${PRODUCT_NAME}
-	CFBundlePackageType
-	APPL
-	CFBundleSignature
-	????
-	CFBundleVersion
-	1.0
-	NSMainNibFile
-	SDLMain
-	NSPrincipalClass
-	NSApplication
-	LSMinimumSystemVersionByArchitecture
-	
-		x86_64
-		10.6.0
-		i386
-		10.4.0
-		ppc
-		10.4.0
-	
-
-
diff --git a/Xcode/TemplatesForXcodeLeopard/SDL Application/___PROJECTNAMEASIDENTIFIER____Prefix.pch b/Xcode/TemplatesForXcodeLeopard/SDL Application/___PROJECTNAMEASIDENTIFIER____Prefix.pch
deleted file mode 100644
index 00095074a..000000000
--- a/Xcode/TemplatesForXcodeLeopard/SDL Application/___PROJECTNAMEASIDENTIFIER____Prefix.pch	
+++ /dev/null
@@ -1,9 +0,0 @@
-//
-// Prefix header for all source files of the 'PROJECTNAME' target in the 'PROJECTNAME' project
-//
-
-#include "SDL.h"
-
-#ifdef __OBJC__
-    #import 
-#endif
diff --git a/Xcode/TemplatesForXcodeLeopard/SDL Application/___PROJECTNAME___.xcodeproj/TemplateIcon.icns b/Xcode/TemplatesForXcodeLeopard/SDL Application/___PROJECTNAME___.xcodeproj/TemplateIcon.icns
deleted file mode 100644
index ae0b02b12ae19056f034a483be03dd053112545a..0000000000000000000000000000000000000000
GIT binary patch
literal 0
HcmV?d00001

literal 111234
zcmeFa2UJsAxAz^20@9TlL6EKp1VZmhO{n&I?7de+MNQ}+AfSj~?_IGs6i^Wq5l|43
zCLq1HkYtznjTP*k=R5a4?;ZCU@Aol>cm^lg|I9ttTyw4cTN7NhWc?P3(5>KATj*vK
zim>B;2qO=`2tKc$+uPsQ#p7^U{9!zdB!OguC_$10$s+s!J1~#Up0}}OcRpa8K7fZ3
zXI|;2uAb&}7W&{L2L|G7_d4Vik8^(ny--pNSw}*&jQ05L@mZ141P@+8-Oe3lF*Em;
zvSzQx8e<38ph~uNb(OdFw3nP|0>FFw2l)McSbO>FcU(5f0x6uw>FDARfZ>4SEKG<%
z?%)FifrS8z6e7qtppY#1?mmax%jxUpak#;JkwNEY3Y;fM0?@02wHt3qbB=6D-4y+{9bObcW746T69I=R4hBXOttSM|w|8|_xAnG{-$c&$
z4{)&o4%YSg-N*ko=efT)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C*T*yUeYceMBBXg7#lAZI*mLuYVinuQF=p7eH
zXPo|&?wm8HUbth`(VoYiesZY8AIaO-mS18cd?J>Z$24VCA2i+nYpc>KwYVAt)QG=n
zzykvQ1qxq#_&iB0lwLyv82|Tp^}=tT^Wqxa1+Zd7BX
H0f7GkLul&m

diff --git a/Xcode/TemplatesForXcodeLeopard/SDL Application/___PROJECTNAME___.xcodeproj/TemplateInfo.plist b/Xcode/TemplatesForXcodeLeopard/SDL Application/___PROJECTNAME___.xcodeproj/TemplateInfo.plist
deleted file mode 100644
index d9ca45493..000000000
--- a/Xcode/TemplatesForXcodeLeopard/SDL Application/___PROJECTNAME___.xcodeproj/TemplateInfo.plist	
+++ /dev/null
@@ -1,12 +0,0 @@
-{
-	FilesToRename = {
-		"SDLApp_Prefix.pch" = "PROJECTNAME_Prefix.pch";
-	};
-	FilesToMacroExpand = (
-		"PROJECTNAME_Prefix.pch",
-		"Info.plist",
-		"English.lproj/InfoPlist.strings",
-		"main.c",
-	);
-	Description = "This project builds an SDL-based application.";
-}
diff --git a/Xcode/TemplatesForXcodeLeopard/SDL Application/___PROJECTNAME___.xcodeproj/project.pbxproj b/Xcode/TemplatesForXcodeLeopard/SDL Application/___PROJECTNAME___.xcodeproj/project.pbxproj
deleted file mode 100644
index 7179f5254..000000000
--- a/Xcode/TemplatesForXcodeLeopard/SDL Application/___PROJECTNAME___.xcodeproj/project.pbxproj	
+++ /dev/null
@@ -1,304 +0,0 @@
-// !$*UTF8*$!
-{
-	archiveVersion = 1;
-	classes = {
-	};
-	objectVersion = 42;
-	objects = {
-
-/* Begin PBXBuildFile section */
-		002F39FA09D0881F00EBEB88 /* SDL.framework in Frameworks */ = {isa = PBXBuildFile; fileRef = 002F39F909D0881F00EBEB88 /* SDL.framework */; };
-		002F3A0009D0884600EBEB88 /* SDL.framework in Copy Frameworks into .app bundle */ = {isa = PBXBuildFile; fileRef = 002F39F909D0881F00EBEB88 /* SDL.framework */; };
-		002F3A3F09D088BA00EBEB88 /* main.c in Sources */ = {isa = PBXBuildFile; fileRef = 002F3A3E09D088BA00EBEB88 /* main.c */; };
-		8D11072B0486CEB800E47090 /* InfoPlist.strings in Resources */ = {isa = PBXBuildFile; fileRef = 089C165CFE840E0CC02AAC07 /* InfoPlist.strings */; };
-		8D11072F0486CEB800E47090 /* Cocoa.framework in Frameworks */ = {isa = PBXBuildFile; fileRef = 1058C7A1FEA54F0111CA2CBB /* Cocoa.framework */; };
-/* End PBXBuildFile section */
-
-/* Begin PBXCopyFilesBuildPhase section */
-		002F39FD09D0883400EBEB88 /* Copy Frameworks into .app bundle */ = {
-			isa = PBXCopyFilesBuildPhase;
-			buildActionMask = 2147483647;
-			dstPath = "";
-			dstSubfolderSpec = 10;
-			files = (
-				002F3A0009D0884600EBEB88 /* SDL.framework in Copy Frameworks into .app bundle */,
-			);
-			name = "Copy Frameworks into .app bundle";
-			runOnlyForDeploymentPostprocessing = 0;
-		};
-/* End PBXCopyFilesBuildPhase section */
-
-/* Begin PBXFileReference section */
-		002F39F909D0881F00EBEB88 /* SDL.framework */ = {isa = PBXFileReference; lastKnownFileType = wrapper.framework; name = SDL.framework; path = /Library/Frameworks/SDL.framework; sourceTree = ""; };
-		002F3A3E09D088BA00EBEB88 /* main.c */ = {isa = PBXFileReference; fileEncoding = 30; lastKnownFileType = sourcecode.c.c; path = main.c; sourceTree = SOURCE_ROOT; };
-		089C165DFE840E0CC02AAC07 /* English */ = {isa = PBXFileReference; fileEncoding = 10; lastKnownFileType = text.plist.strings; name = English; path = English.lproj/InfoPlist.strings; sourceTree = ""; };
-		1058C7A1FEA54F0111CA2CBB /* Cocoa.framework */ = {isa = PBXFileReference; lastKnownFileType = wrapper.framework; name = Cocoa.framework; path = /System/Library/Frameworks/Cocoa.framework; sourceTree = ""; };
-		29B97324FDCFA39411CA2CEA /* AppKit.framework */ = {isa = PBXFileReference; lastKnownFileType = wrapper.framework; name = AppKit.framework; path = /System/Library/Frameworks/AppKit.framework; sourceTree = ""; };
-		29B97325FDCFA39411CA2CEA /* Foundation.framework */ = {isa = PBXFileReference; lastKnownFileType = wrapper.framework; name = Foundation.framework; path = /System/Library/Frameworks/Foundation.framework; sourceTree = ""; };
-		32CA4F630368D1EE00C91783 /* ___PROJECTNAME____Prefix.pch */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = "___PROJECTNAME____Prefix.pch"; sourceTree = ""; };
-		8D1107310486CEB800E47090 /* Info.plist */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = text.plist; path = Info.plist; sourceTree = ""; };
-		8D1107320486CEB800E47090 /* ___PROJECTNAME___.app */ = {isa = PBXFileReference; explicitFileType = wrapper.application; includeInIndex = 0; path = "___PROJECTNAME___.app"; sourceTree = BUILT_PRODUCTS_DIR; };
-/* End PBXFileReference section */
-
-/* Begin PBXFrameworksBuildPhase section */
-		8D11072E0486CEB800E47090 /* Frameworks */ = {
-			isa = PBXFrameworksBuildPhase;
-			buildActionMask = 2147483647;
-			files = (
-				002F39FA09D0881F00EBEB88 /* SDL.framework in Frameworks */,
-				8D11072F0486CEB800E47090 /* Cocoa.framework in Frameworks */,
-			);
-			runOnlyForDeploymentPostprocessing = 0;
-		};
-/* End PBXFrameworksBuildPhase section */
-
-/* Begin PBXGroup section */
-		080E96DDFE201D6D7F000001 /* Classes */ = {
-			isa = PBXGroup;
-			children = (
-			);
-			name = Classes;
-			sourceTree = "";
-		};
-		1058C7A0FEA54F0111CA2CBB /* Linked Frameworks */ = {
-			isa = PBXGroup;
-			children = (
-				002F39F909D0881F00EBEB88 /* SDL.framework */,
-				1058C7A1FEA54F0111CA2CBB /* Cocoa.framework */,
-			);
-			name = "Linked Frameworks";
-			sourceTree = "";
-		};
-		1058C7A2FEA54F0111CA2CBB /* Other Frameworks */ = {
-			isa = PBXGroup;
-			children = (
-				29B97324FDCFA39411CA2CEA /* AppKit.framework */,
-				29B97325FDCFA39411CA2CEA /* Foundation.framework */,
-			);
-			name = "Other Frameworks";
-			sourceTree = "";
-		};
-		19C28FACFE9D520D11CA2CBB /* Products */ = {
-			isa = PBXGroup;
-			children = (
-				8D1107320486CEB800E47090 /* ___PROJECTNAME___.app */,
-			);
-			name = Products;
-			sourceTree = "";
-		};
-		29B97314FDCFA39411CA2CEA /* ___PROJECTNAMEASXML___ */ = {
-			isa = PBXGroup;
-			children = (
-				080E96DDFE201D6D7F000001 /* Classes */,
-				29B97315FDCFA39411CA2CEA /* Other Sources */,
-				29B97317FDCFA39411CA2CEA /* Resources */,
-				29B97323FDCFA39411CA2CEA /* Frameworks */,
-				19C28FACFE9D520D11CA2CBB /* Products */,
-			);
-			name = "___PROJECTNAMEASXML___";
-			sourceTree = "";
-		};
-		29B97315FDCFA39411CA2CEA /* Other Sources */ = {
-			isa = PBXGroup;
-			children = (
-				32CA4F630368D1EE00C91783 /* ___PROJECTNAME____Prefix.pch */,
-				002F3A3E09D088BA00EBEB88 /* main.c */,
-			);
-			name = "Other Sources";
-			sourceTree = "";
-		};
-		29B97317FDCFA39411CA2CEA /* Resources */ = {
-			isa = PBXGroup;
-			children = (
-				8D1107310486CEB800E47090 /* Info.plist */,
-				089C165CFE840E0CC02AAC07 /* InfoPlist.strings */,
-			);
-			name = Resources;
-			sourceTree = "";
-		};
-		29B97323FDCFA39411CA2CEA /* Frameworks */ = {
-			isa = PBXGroup;
-			children = (
-				1058C7A0FEA54F0111CA2CBB /* Linked Frameworks */,
-				1058C7A2FEA54F0111CA2CBB /* Other Frameworks */,
-			);
-			name = Frameworks;
-			sourceTree = "";
-		};
-/* End PBXGroup section */
-
-/* Begin PBXNativeTarget section */
-		8D1107260486CEB800E47090 /* ___PROJECTNAME___ */ = {
-			isa = PBXNativeTarget;
-			buildConfigurationList = C01FCF4A08A954540054247B /* Build configuration list for PBXNativeTarget "___PROJECTNAME___" */;
-			buildPhases = (
-				8D1107290486CEB800E47090 /* Resources */,
-				8D11072C0486CEB800E47090 /* Sources */,
-				8D11072E0486CEB800E47090 /* Frameworks */,
-				002F39FD09D0883400EBEB88 /* Copy Frameworks into .app bundle */,
-			);
-			buildRules = (
-			);
-			dependencies = (
-			);
-			name = "___PROJECTNAME___";
-			productInstallPath = "$(HOME)/Applications";
-			productName = "___PROJECTNAME___";
-			productReference = 8D1107320486CEB800E47090 /* ___PROJECTNAME___.app */;
-			productType = "com.apple.product-type.application";
-		};
-/* End PBXNativeTarget section */
-
-/* Begin PBXProject section */
-		29B97313FDCFA39411CA2CEA /* Project object */ = {
-			isa = PBXProject;
-			buildConfigurationList = C01FCF4E08A954540054247B /* Build configuration list for PBXProject "___PROJECTNAME___" */;
-			compatibilityVersion = "Xcode 2.4";
-			hasScannedForEncodings = 1;
-			mainGroup = 29B97314FDCFA39411CA2CEA /* ___PROJECTNAMEASXML___ */;
-			projectDirPath = "";
-			projectRoot = "";
-			targets = (
-				8D1107260486CEB800E47090 /* ___PROJECTNAME___ */,
-			);
-		};
-/* End PBXProject section */
-
-/* Begin PBXResourcesBuildPhase section */
-		8D1107290486CEB800E47090 /* Resources */ = {
-			isa = PBXResourcesBuildPhase;
-			buildActionMask = 2147483647;
-			files = (
-				8D11072B0486CEB800E47090 /* InfoPlist.strings in Resources */,
-			);
-			runOnlyForDeploymentPostprocessing = 0;
-		};
-/* End PBXResourcesBuildPhase section */
-
-/* Begin PBXSourcesBuildPhase section */
-		8D11072C0486CEB800E47090 /* Sources */ = {
-			isa = PBXSourcesBuildPhase;
-			buildActionMask = 2147483647;
-			files = (
-				002F3A3F09D088BA00EBEB88 /* main.c in Sources */,
-			);
-			runOnlyForDeploymentPostprocessing = 0;
-		};
-/* End PBXSourcesBuildPhase section */
-
-/* Begin PBXVariantGroup section */
-		089C165CFE840E0CC02AAC07 /* InfoPlist.strings */ = {
-			isa = PBXVariantGroup;
-			children = (
-				089C165DFE840E0CC02AAC07 /* English */,
-			);
-			name = InfoPlist.strings;
-			sourceTree = "";
-		};
-/* End PBXVariantGroup section */
-
-/* Begin XCBuildConfiguration section */
-		C01FCF4B08A954540054247B /* Debug */ = {
-			isa = XCBuildConfiguration;
-			buildSettings = {
-				COPY_PHASE_STRIP = NO;
-				GCC_DYNAMIC_NO_PIC = NO;
-				GCC_ENABLE_FIX_AND_CONTINUE = YES;
-				GCC_MODEL_TUNING = G5;
-				GCC_OPTIMIZATION_LEVEL = 0;
-				GCC_PRECOMPILE_PREFIX_HEADER = YES;
-				GCC_PREFIX_HEADER = "___PROJECTNAMEASIDENTIFIER____Prefix.pch";
-				INFOPLIST_FILE = Info.plist;
-				INSTALL_PATH = "$(HOME)/Applications";
-				PRODUCT_NAME = "___PROJECTNAME___";
-				WRAPPER_EXTENSION = app;
-			};
-			name = Debug;
-		};
-		C01FCF4C08A954540054247B /* Release */ = {
-			isa = XCBuildConfiguration;
-			buildSettings = {
-				GCC_GENERATE_DEBUGGING_SYMBOLS = NO;
-				GCC_MODEL_TUNING = G5;
-				GCC_PRECOMPILE_PREFIX_HEADER = YES;
-				GCC_PREFIX_HEADER = "___PROJECTNAMEASIDENTIFIER____Prefix.pch";
-				INFOPLIST_FILE = Info.plist;
-				INSTALL_PATH = "$(HOME)/Applications";
-				PRODUCT_NAME = "___PROJECTNAME___";
-				WRAPPER_EXTENSION = app;
-			};
-			name = Release;
-		};
-		C01FCF4F08A954540054247B /* Debug */ = {
-			isa = XCBuildConfiguration;
-			buildSettings = {
-				ARCHS = "$(ARCHS_STANDARD_32_BIT_PRE_XCODE_3_1)";
-				ARCHS_STANDARD_32_BIT_PRE_XCODE_3_1 = "ppc i386";
-				FRAMEWORK_SEARCH_PATHS = (
-					"$(HOME)/Library/Frameworks",
-					/Library/Frameworks,
-					"$(FRAMEWORK_SEARCH_PATHS)",
-				);
-				GCC_C_LANGUAGE_STANDARD = c99;
-				GCC_VERSION = 4.0;
-				GCC_WARN_ABOUT_RETURN_TYPE = YES;
-				GCC_WARN_UNUSED_VARIABLE = YES;
-				HEADER_SEARCH_PATHS = (
-					"$(HOME)/Library/Frameworks/SDL.framework/Headers",
-					/Library/Frameworks/SDL.framework/Headers,
-					"$(HEADER_SEARCH_PATHS)",
-				);
-				PREBINDING = NO;
-				SDKROOT = /Developer/SDKs/MacOSX10.4u.sdk;
-			};
-			name = Debug;
-		};
-		C01FCF5008A954540054247B /* Release */ = {
-			isa = XCBuildConfiguration;
-			buildSettings = {
-				ARCHS = "$(ARCHS_STANDARD_32_BIT_PRE_XCODE_3_1)";
-				ARCHS_STANDARD_32_BIT_PRE_XCODE_3_1 = "ppc i386";
-				FRAMEWORK_SEARCH_PATHS = (
-					"$(HOME)/Library/Frameworks",
-					/Library/Frameworks,
-					"$(FRAMEWORK_SEARCH_PATHS)",
-				);
-				GCC_C_LANGUAGE_STANDARD = c99;
-				GCC_VERSION = 4.0;
-				GCC_WARN_ABOUT_RETURN_TYPE = YES;
-				GCC_WARN_UNUSED_VARIABLE = YES;
-				HEADER_SEARCH_PATHS = (
-					"$(HOME)/Library/Frameworks/SDL.framework/Headers",
-					/Library/Frameworks/SDL.framework/Headers,
-					"$(HEADER_SEARCH_PATHS)",
-				);
-				PREBINDING = NO;
-				SDKROOT = /Developer/SDKs/MacOSX10.4u.sdk;
-			};
-			name = Release;
-		};
-/* End XCBuildConfiguration section */
-
-/* Begin XCConfigurationList section */
-		C01FCF4A08A954540054247B /* Build configuration list for PBXNativeTarget "___PROJECTNAME___" */ = {
-			isa = XCConfigurationList;
-			buildConfigurations = (
-				C01FCF4B08A954540054247B /* Debug */,
-				C01FCF4C08A954540054247B /* Release */,
-			);
-			defaultConfigurationIsVisible = 0;
-			defaultConfigurationName = Release;
-		};
-		C01FCF4E08A954540054247B /* Build configuration list for PBXProject "___PROJECTNAME___" */ = {
-			isa = XCConfigurationList;
-			buildConfigurations = (
-				C01FCF4F08A954540054247B /* Debug */,
-				C01FCF5008A954540054247B /* Release */,
-			);
-			defaultConfigurationIsVisible = 0;
-			defaultConfigurationName = Release;
-		};
-/* End XCConfigurationList section */
-	};
-	rootObject = 29B97313FDCFA39411CA2CEA /* Project object */;
-}
diff --git a/Xcode/TemplatesForXcodeLeopard/SDL Application/main.c b/Xcode/TemplatesForXcodeLeopard/SDL Application/main.c
deleted file mode 100644
index 47af3765d..000000000
--- a/Xcode/TemplatesForXcodeLeopard/SDL Application/main.c	
+++ /dev/null
@@ -1,65 +0,0 @@
-
-/* Simple program:  Create a blank window, wait for keypress, quit.
-
-   Please see the SDL documentation for details on using the SDL API:
-   /Developer/Documentation/SDL/docs.html
-*/
-
-#include 
-#include 
-#include 
-#include 
-
-#include "SDL.h"
-
-int main(int argc, char *argv[])
-{
-    Uint32 initflags = SDL_INIT_VIDEO;  /* See documentation for details */
-    SDL_Surface *screen;
-    Uint8  video_bpp = 0;
-    Uint32 videoflags = SDL_SWSURFACE;
-    int    done;
-        SDL_Event event;
-
-    /* Initialize the SDL library */
-    if ( SDL_Init(initflags) < 0 ) {
-        fprintf(stderr, "Couldn't initialize SDL: %s\n",
-            SDL_GetError());
-        exit(1);
-    }
-
-    /* Set 640x480 video mode */
-    screen=SDL_SetVideoMode(640,480, video_bpp, videoflags);
-        if (screen == NULL) {
-        fprintf(stderr, "Couldn't set 640x480x%d video mode: %s\n",
-                        video_bpp, SDL_GetError());
-        SDL_Quit();
-        exit(2);
-    }
-
-    done = 0;
-    while ( !done ) {
-
-        /* Check for events */
-        while ( SDL_PollEvent(&event) ) {
-            switch (event.type) {
-
-                case SDL_MOUSEMOTION:
-                    break;
-                case SDL_MOUSEBUTTONDOWN:
-                    break;
-                case SDL_KEYDOWN:
-                    /* Any keypress quits the app... */
-                case SDL_QUIT:
-                    done = 1;
-                    break;
-                default:
-                    break;
-            }
-        }
-    }
-
-    /* Clean up the SDL library */
-    SDL_Quit();
-    return(0);
-}
diff --git a/Xcode/TemplatesForXcodeLeopard/SDL Cocoa Application/English.lproj/InfoPlist.strings b/Xcode/TemplatesForXcodeLeopard/SDL Cocoa Application/English.lproj/InfoPlist.strings
deleted file mode 100644
index 6e721b0ef0e7ef6d44f293955483ecf6ae72291a..0000000000000000000000000000000000000000
GIT binary patch
literal 0
HcmV?d00001

literal 644
zcmb`^O-lk{6b0aC?XP%oDWSEF7L%A6HO44GZDPvtgLFpx2<*pKFiMcvB9ObdT<+nX
zd(Qd#Y^Vut6<(#LCO%{af_IsPrHMjrDJTpD9l4=G-Mqvvtpsl}n-W#iP*Krz<HaO~?0PSu_L
z!QGZw{Wx%3#uGtPVQy3E7#Ww&Zhd;x5=nMb*!8YNTO`);B+}Q>74P|2->Hf9Tw9w-
W
-
-
-
-	IBDocumentLocation
-	62 117 356 240 0 0 1152 848 
-	IBEditorPositions
-	
-		29
-		62 362 195 44 0 0 1152 848 
-	
-	IBFramework Version
-	291.0
-	IBOpenObjects
-	
-		29
-	
-	IBSystem Version
-	6L60
-
-
diff --git a/Xcode/TemplatesForXcodeLeopard/SDL Cocoa Application/English.lproj/SDLMain.nib/objects.nib b/Xcode/TemplatesForXcodeLeopard/SDL Cocoa Application/English.lproj/SDLMain.nib/objects.nib
deleted file mode 100644
index 637801528a03f85f28a290e5ffde3716217cd1e8..0000000000000000000000000000000000000000
GIT binary patch
literal 0
HcmV?d00001

literal 2590
zcmai0O=ufO6rM?xSg~ctZJL&nn5xhc(t^P$rKvAnS*{yFy-u@-9?e>s*qf|&)zxm?
z%>4}t`N+du*aWAMQk3{69SZl%W_O3KXYFEO%jt2ghP
z?|W~)nWxBrdpU&nYjxn?M~{hj=`^lL{%+}0KX8XB)zrS@QYrWMOS09p*N7|Ev0+VRM~Qsk?Yr6o|x7Ri;`L;
zBKYey@ZF30$WY#!%OcB5q=ogy<*`)dvD9U^B2$Kmc9gy(^CVHZnL=un1A?U?VNn$=
z#y`=s(iza|RbdD4@=Oj{aZSI3G7={&K!O0;yF>TxdZ_1+*tsJpzx%GDeTUnKctRRd
zsL^`is873^cJOn<%Gis$x2=^#Y85E@upTyU+OUkQaV2bAwkMysF|(=`66Hg4bSa3O
zL1u1u{xGG*z7?{I`!AuQ+K+m&`&629U{=+H#X|ZLyIW<1$#+4U487;m5?g7o#)Ia<
zpsG#TmOHIm`aE*v^6e^HtFzSxyHjQ4TEUk>BGNlAy0v4wKS-^zUv%xyP*Pm2IrEdsTL;%BuI-{W^QxV2>JXdy746u+2JK
zU+dI1Agz85rIF?CkkBcSl%LORozy?F;{K$GbSEx5->VF9h_BA7T1Yi%r@bt)+?H7y
z>_NQ}VyvMrHtin6ETffIg+w+zA7Nf0zg92Mg()|s8i1%w<>HStj-
zFa>CV)GC7_>!_-!#$3|2T*o$(wq>ETYdaXM$+;aag|U~4WWS;)OQP%%+sPnj%CRk1
zb9F1DI~h3z&*~O3$HjH(yLqQ1nz&$OkenD@V>;i=xGgdch>T|7u7r4&2qjE&2ZWGU
zq}&%T>jGcJ@B@Ae!?$?@!_)jt3_s>;
z7#`=3Fno_c#_)Z
-
-
-
-	CFBundleDevelopmentRegion
-	English
-	CFBundleExecutable
-	${EXECUTABLE_NAME}
-	CFBundleIconFile
-	
-	CFBundleIdentifier
-	com.yourcompany.___PROJECTNAMEASXML___
-	CFBundleInfoDictionaryVersion
-	6.0
-	CFBundleName
-	${PRODUCT_NAME}
-	CFBundlePackageType
-	APPL
-	CFBundleSignature
-	????
-	CFBundleVersion
-	1.0
-	NSMainNibFile
-	SDLMain
-	NSPrincipalClass
-	NSApplication
-	LSMinimumSystemVersionByArchitecture
-	
-		x86_64
-		10.6.0
-		i386
-		10.4.0
-		ppc
-		10.4.0
-		
-
-
diff --git a/Xcode/TemplatesForXcodeLeopard/SDL Cocoa Application/___PROJECTNAMEASIDENTIFIER____Prefix.pch b/Xcode/TemplatesForXcodeLeopard/SDL Cocoa Application/___PROJECTNAMEASIDENTIFIER____Prefix.pch
deleted file mode 100644
index 00095074a..000000000
--- a/Xcode/TemplatesForXcodeLeopard/SDL Cocoa Application/___PROJECTNAMEASIDENTIFIER____Prefix.pch	
+++ /dev/null
@@ -1,9 +0,0 @@
-//
-// Prefix header for all source files of the 'PROJECTNAME' target in the 'PROJECTNAME' project
-//
-
-#include "SDL.h"
-
-#ifdef __OBJC__
-    #import 
-#endif
diff --git a/Xcode/TemplatesForXcodeLeopard/SDL Cocoa Application/___PROJECTNAME___.xcodeproj/TemplateIcon.icns b/Xcode/TemplatesForXcodeLeopard/SDL Cocoa Application/___PROJECTNAME___.xcodeproj/TemplateIcon.icns
deleted file mode 100644
index ae0b02b12ae19056f034a483be03dd053112545a..0000000000000000000000000000000000000000
GIT binary patch
literal 0
HcmV?d00001

literal 111234
zcmeFa2UJsAxAz^20@9TlL6EKp1VZmhO{n&I?7de+MNQ}+AfSj~?_IGs6i^Wq5l|43
zCLq1HkYtznjTP*k=R5a4?;ZCU@Aol>cm^lg|I9ttTyw4cTN7NhWc?P3(5>KATj*vK
zim>B;2qO=`2tKc$+uPsQ#p7^U{9!zdB!OguC_$10$s+s!J1~#Up0}}OcRpa8K7fZ3
zXI|;2uAb&}7W&{L2L|G7_d4Vik8^(ny--pNSw}*&jQ05L@mZ141P@+8-Oe3lF*Em;
zvSzQx8e<38ph~uNb(OdFw3nP|0>FFw2l)McSbO>FcU(5f0x6uw>FDARfZ>4SEKG<%
z?%)FifrS8z6e7qtppY#1?mmax%jxUpak#;JkwNEY3Y;fM0?@02wHt3qbB=6D-4y+{9bObcW746T69I=R4hBXOttSM|w|8|_xAnG{-$c&$
z4{)&o4%YSg-N*ko=efT)zr}jp8VW^7obsEA{bs+tOkw_J@SE{|v)^6@@;CeMzW$s1
zANnr8+3)@j|IJpdMYCx5aRQE!$AHZh9pLh~1HoLOfq_`A9G}m_2p*S@V|+e_6F4uN
zFU;ffSbP=;5quViVI%;KV^}0mNH$24BtgJH8y83%XMre*kvPsKbpaay3{X--<0|!$
z8VhqAZ6;VON{4bQW+$Nk-O&gH3oLN(rpySPEq6jqeww4?u$ROqN(qUv@FuE(Ki
zUM=vU#3!EzGbpr6QZhb=Zfnx`Xpch1&rWF7d3d$t39k>{OD=8)_
zCFNkosrZj1T%Z0Na5ku6Tn>i^cyD`4&j6RlY3pch?1S_}lTcE;
zC$S5N5MYxE#6V|Pdw)0HL$k
zfG~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Q6oG!zP
zcYvU|)MqA{lcfic&E-1#I#acYXs;FEV!(l=Lqlc+K$k5(vFu24LPyCkCa?apVG2RI
zE8j4rS@KHo{kS+V4mHo2ej-Ya4Nh}ClLAzgE>&M5afg%=j^PN>TOzuh7HQ>nm?F3BehxbV(N)2uZZhIqO&OLnyC`(E#
z)9S6Vpjq6yQ`?9w>NmpPK$***M07N6Vzh{Z4Cr5`#j)e>wt
zV>i@Vk+Rl>-9XxUDQwU3ajm1GXL>qsydn)h6!I=LU>~1bG^`18EO$x-w(sEC4@PWP
z`{{HD=*+3o$bszF{BZxu^V2IX?m2V`oU+h&TQ+k5ks4!5-=c>R1jwuBm>x`?c%}Xb
zP<&U*z3J@VJ#<+sN{V$t68Rr$2+#1sCh|U7)hd7q3Ln^9@n&l%>&^5LIEg6}qN)E#
zxPyIvuu=%3Iyv*!_?mR4jYYPJ@1UGTsBoakCc_jk*8pXSWe#4KlpgHCEQ;DlvJ15%
z2KBRUUM^QA!cQEPI=dU6%1tcBo*7yzE|pxIzTvszD2>k*kkDc+$jPV)^)_nfG9K+K
zii(L_=^|7I!qS-saJ~x$c}aqe5jXl5wmD?4!=b)`hv*3tPkxju0vJdqHH1;oy&#v+
z;Q@ZU)1r_k4IW|uHjQ8Q<#5_=duoC*T*yUeYceMBBXg7#lAZI*mLuYVinuQF=p7eH
zXPo|&?wm8HUbth`(VoYiesZY8AIaO-mS18cd?J>Z$24VCA2i+nYpc>KwYVAt)QG=n
zzykvQ1qxq#_&iB0lwLyv82|Tp^}=tT^Wqxa1+Zd7BX
H0f7GkLul&m

diff --git a/Xcode/TemplatesForXcodeLeopard/SDL Cocoa Application/___PROJECTNAME___.xcodeproj/TemplateInfo.plist b/Xcode/TemplatesForXcodeLeopard/SDL Cocoa Application/___PROJECTNAME___.xcodeproj/TemplateInfo.plist
deleted file mode 100644
index 1dcbea207..000000000
--- a/Xcode/TemplatesForXcodeLeopard/SDL Cocoa Application/___PROJECTNAME___.xcodeproj/TemplateInfo.plist	
+++ /dev/null
@@ -1,12 +0,0 @@
-{
-	FilesToRename = {
-		"SDLApp_Prefix.pch" = "PROJECTNAME_Prefix.pch";
-	};
-	FilesToMacroExpand = (
-		"PROJECTNAME_Prefix.pch",
-		"Info.plist",
-		"English.lproj/InfoPlist.strings",
-		"main.c",
-	);
-	Description = "This project builds an SDL-based application with Cocoa menus.";
-}
diff --git a/Xcode/TemplatesForXcodeLeopard/SDL Cocoa Application/___PROJECTNAME___.xcodeproj/project.pbxproj b/Xcode/TemplatesForXcodeLeopard/SDL Cocoa Application/___PROJECTNAME___.xcodeproj/project.pbxproj
deleted file mode 100644
index e259c6102..000000000
--- a/Xcode/TemplatesForXcodeLeopard/SDL Cocoa Application/___PROJECTNAME___.xcodeproj/project.pbxproj	
+++ /dev/null
@@ -1,316 +0,0 @@
-// !$*UTF8*$!
-{
-	archiveVersion = 1;
-	classes = {
-	};
-	objectVersion = 42;
-	objects = {
-
-/* Begin PBXBuildFile section */
-		002F39FA09D0881F00EBEB88 /* SDL.framework in Frameworks */ = {isa = PBXBuildFile; fileRef = 002F39F909D0881F00EBEB88 /* SDL.framework */; };
-		002F3A0009D0884600EBEB88 /* SDL.framework in Copy Frameworks into .app bundle */ = {isa = PBXBuildFile; fileRef = 002F39F909D0881F00EBEB88 /* SDL.framework */; };
-		002F3A3F09D088BA00EBEB88 /* main.c in Sources */ = {isa = PBXBuildFile; fileRef = 002F3A3E09D088BA00EBEB88 /* main.c */; };
-		002F3AF109D08F1000EBEB88 /* SDLMain.nib in Resources */ = {isa = PBXBuildFile; fileRef = 002F3AEF09D08F1000EBEB88 /* SDLMain.nib */; };
-		8D11072B0486CEB800E47090 /* InfoPlist.strings in Resources */ = {isa = PBXBuildFile; fileRef = 089C165CFE840E0CC02AAC07 /* InfoPlist.strings */; };
-		8D11072F0486CEB800E47090 /* Cocoa.framework in Frameworks */ = {isa = PBXBuildFile; fileRef = 1058C7A1FEA54F0111CA2CBB /* Cocoa.framework */; };
-/* End PBXBuildFile section */
-
-/* Begin PBXCopyFilesBuildPhase section */
-		002F39FD09D0883400EBEB88 /* Copy Frameworks into .app bundle */ = {
-			isa = PBXCopyFilesBuildPhase;
-			buildActionMask = 2147483647;
-			dstPath = "";
-			dstSubfolderSpec = 10;
-			files = (
-				002F3A0009D0884600EBEB88 /* SDL.framework in Copy Frameworks into .app bundle */,
-			);
-			name = "Copy Frameworks into .app bundle";
-			runOnlyForDeploymentPostprocessing = 0;
-		};
-/* End PBXCopyFilesBuildPhase section */
-
-/* Begin PBXFileReference section */
-		002F39F909D0881F00EBEB88 /* SDL.framework */ = {isa = PBXFileReference; lastKnownFileType = wrapper.framework; name = SDL.framework; path = /Library/Frameworks/SDL.framework; sourceTree = ""; };
-		002F3A3E09D088BA00EBEB88 /* main.c */ = {isa = PBXFileReference; fileEncoding = 30; lastKnownFileType = sourcecode.c.c; path = main.c; sourceTree = SOURCE_ROOT; };
-		002F3AF009D08F1000EBEB88 /* English */ = {isa = PBXFileReference; lastKnownFileType = wrapper.nib; name = English; path = English.lproj/SDLMain.nib; sourceTree = ""; };
-		089C165DFE840E0CC02AAC07 /* English */ = {isa = PBXFileReference; fileEncoding = 10; lastKnownFileType = text.plist.strings; name = English; path = English.lproj/InfoPlist.strings; sourceTree = ""; };
-		1058C7A1FEA54F0111CA2CBB /* Cocoa.framework */ = {isa = PBXFileReference; lastKnownFileType = wrapper.framework; name = Cocoa.framework; path = /System/Library/Frameworks/Cocoa.framework; sourceTree = ""; };
-		29B97324FDCFA39411CA2CEA /* AppKit.framework */ = {isa = PBXFileReference; lastKnownFileType = wrapper.framework; name = AppKit.framework; path = /System/Library/Frameworks/AppKit.framework; sourceTree = ""; };
-		29B97325FDCFA39411CA2CEA /* Foundation.framework */ = {isa = PBXFileReference; lastKnownFileType = wrapper.framework; name = Foundation.framework; path = /System/Library/Frameworks/Foundation.framework; sourceTree = ""; };
-		32CA4F630368D1EE00C91783 /* ___PROJECTNAME____Prefix.pch */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = "___PROJECTNAME____Prefix.pch"; sourceTree = ""; };
-		8D1107310486CEB800E47090 /* Info.plist */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = text.plist; path = Info.plist; sourceTree = ""; };
-		8D1107320486CEB800E47090 /* ___PROJECTNAME___.app */ = {isa = PBXFileReference; explicitFileType = wrapper.application; includeInIndex = 0; path = "___PROJECTNAME___.app"; sourceTree = BUILT_PRODUCTS_DIR; };
-/* End PBXFileReference section */
-
-/* Begin PBXFrameworksBuildPhase section */
-		8D11072E0486CEB800E47090 /* Frameworks */ = {
-			isa = PBXFrameworksBuildPhase;
-			buildActionMask = 2147483647;
-			files = (
-				002F39FA09D0881F00EBEB88 /* SDL.framework in Frameworks */,
-				8D11072F0486CEB800E47090 /* Cocoa.framework in Frameworks */,
-			);
-			runOnlyForDeploymentPostprocessing = 0;
-		};
-/* End PBXFrameworksBuildPhase section */
-
-/* Begin PBXGroup section */
-		080E96DDFE201D6D7F000001 /* Classes */ = {
-			isa = PBXGroup;
-			children = (
-			);
-			name = Classes;
-			sourceTree = "";
-		};
-		1058C7A0FEA54F0111CA2CBB /* Linked Frameworks */ = {
-			isa = PBXGroup;
-			children = (
-				002F39F909D0881F00EBEB88 /* SDL.framework */,
-				1058C7A1FEA54F0111CA2CBB /* Cocoa.framework */,
-			);
-			name = "Linked Frameworks";
-			sourceTree = "";
-		};
-		1058C7A2FEA54F0111CA2CBB /* Other Frameworks */ = {
-			isa = PBXGroup;
-			children = (
-				29B97324FDCFA39411CA2CEA /* AppKit.framework */,
-				29B97325FDCFA39411CA2CEA /* Foundation.framework */,
-			);
-			name = "Other Frameworks";
-			sourceTree = "";
-		};
-		19C28FACFE9D520D11CA2CBB /* Products */ = {
-			isa = PBXGroup;
-			children = (
-				8D1107320486CEB800E47090 /* ___PROJECTNAME___.app */,
-			);
-			name = Products;
-			sourceTree = "";
-		};
-		29B97314FDCFA39411CA2CEA /* ___PROJECTNAMEASXML___ */ = {
-			isa = PBXGroup;
-			children = (
-				080E96DDFE201D6D7F000001 /* Classes */,
-				29B97315FDCFA39411CA2CEA /* Other Sources */,
-				29B97317FDCFA39411CA2CEA /* Resources */,
-				29B97323FDCFA39411CA2CEA /* Frameworks */,
-				19C28FACFE9D520D11CA2CBB /* Products */,
-			);
-			name = "___PROJECTNAMEASXML___";
-			sourceTree = "";
-		};
-		29B97315FDCFA39411CA2CEA /* Other Sources */ = {
-			isa = PBXGroup;
-			children = (
-				32CA4F630368D1EE00C91783 /* ___PROJECTNAME____Prefix.pch */,
-				002F3A3E09D088BA00EBEB88 /* main.c */,
-			);
-			name = "Other Sources";
-			sourceTree = "";
-		};
-		29B97317FDCFA39411CA2CEA /* Resources */ = {
-			isa = PBXGroup;
-			children = (
-				8D1107310486CEB800E47090 /* Info.plist */,
-				089C165CFE840E0CC02AAC07 /* InfoPlist.strings */,
-				002F3AEF09D08F1000EBEB88 /* SDLMain.nib */,
-			);
-			name = Resources;
-			sourceTree = "";
-		};
-		29B97323FDCFA39411CA2CEA /* Frameworks */ = {
-			isa = PBXGroup;
-			children = (
-				1058C7A0FEA54F0111CA2CBB /* Linked Frameworks */,
-				1058C7A2FEA54F0111CA2CBB /* Other Frameworks */,
-			);
-			name = Frameworks;
-			sourceTree = "";
-		};
-/* End PBXGroup section */
-
-/* Begin PBXNativeTarget section */
-		8D1107260486CEB800E47090 /* ___PROJECTNAME___ */ = {
-			isa = PBXNativeTarget;
-			buildConfigurationList = C01FCF4A08A954540054247B /* Build configuration list for PBXNativeTarget "___PROJECTNAME___" */;
-			buildPhases = (
-				8D1107290486CEB800E47090 /* Resources */,
-				8D11072C0486CEB800E47090 /* Sources */,
-				8D11072E0486CEB800E47090 /* Frameworks */,
-				002F39FD09D0883400EBEB88 /* Copy Frameworks into .app bundle */,
-			);
-			buildRules = (
-			);
-			dependencies = (
-			);
-			name = "___PROJECTNAME___";
-			productInstallPath = "$(HOME)/Applications";
-			productName = "___PROJECTNAME___";
-			productReference = 8D1107320486CEB800E47090 /* ___PROJECTNAME___.app */;
-			productType = "com.apple.product-type.application";
-		};
-/* End PBXNativeTarget section */
-
-/* Begin PBXProject section */
-		29B97313FDCFA39411CA2CEA /* Project object */ = {
-			isa = PBXProject;
-			buildConfigurationList = C01FCF4E08A954540054247B /* Build configuration list for PBXProject "___PROJECTNAME___" */;
-			compatibilityVersion = "Xcode 2.4";
-			hasScannedForEncodings = 1;
-			mainGroup = 29B97314FDCFA39411CA2CEA /* ___PROJECTNAMEASXML___ */;
-			projectDirPath = "";
-			projectRoot = "";
-			targets = (
-				8D1107260486CEB800E47090 /* ___PROJECTNAME___ */,
-			);
-		};
-/* End PBXProject section */
-
-/* Begin PBXResourcesBuildPhase section */
-		8D1107290486CEB800E47090 /* Resources */ = {
-			isa = PBXResourcesBuildPhase;
-			buildActionMask = 2147483647;
-			files = (
-				8D11072B0486CEB800E47090 /* InfoPlist.strings in Resources */,
-				002F3AF109D08F1000EBEB88 /* SDLMain.nib in Resources */,
-			);
-			runOnlyForDeploymentPostprocessing = 0;
-		};
-/* End PBXResourcesBuildPhase section */
-
-/* Begin PBXSourcesBuildPhase section */
-		8D11072C0486CEB800E47090 /* Sources */ = {
-			isa = PBXSourcesBuildPhase;
-			buildActionMask = 2147483647;
-			files = (
-				002F3A3F09D088BA00EBEB88 /* main.c in Sources */,
-			);
-			runOnlyForDeploymentPostprocessing = 0;
-		};
-/* End PBXSourcesBuildPhase section */
-
-/* Begin PBXVariantGroup section */
-		002F3AEF09D08F1000EBEB88 /* SDLMain.nib */ = {
-			isa = PBXVariantGroup;
-			children = (
-				002F3AF009D08F1000EBEB88 /* English */,
-			);
-			name = SDLMain.nib;
-			sourceTree = "";
-		};
-		089C165CFE840E0CC02AAC07 /* InfoPlist.strings */ = {
-			isa = PBXVariantGroup;
-			children = (
-				089C165DFE840E0CC02AAC07 /* English */,
-			);
-			name = InfoPlist.strings;
-			sourceTree = "";
-		};
-/* End PBXVariantGroup section */
-
-/* Begin XCBuildConfiguration section */
-		C01FCF4B08A954540054247B /* Debug */ = {
-			isa = XCBuildConfiguration;
-			buildSettings = {
-				COPY_PHASE_STRIP = NO;
-				GCC_DYNAMIC_NO_PIC = NO;
-				GCC_ENABLE_FIX_AND_CONTINUE = YES;
-				GCC_MODEL_TUNING = G5;
-				GCC_OPTIMIZATION_LEVEL = 0;
-				GCC_PRECOMPILE_PREFIX_HEADER = YES;
-				GCC_PREFIX_HEADER = "___PROJECTNAMEASIDENTIFIER____Prefix.pch";
-				INFOPLIST_FILE = Info.plist;
-				INSTALL_PATH = "$(HOME)/Applications";
-				PRODUCT_NAME = "___PROJECTNAME___";
-				WRAPPER_EXTENSION = app;
-			};
-			name = Debug;
-		};
-		C01FCF4C08A954540054247B /* Release */ = {
-			isa = XCBuildConfiguration;
-			buildSettings = {
-				GCC_GENERATE_DEBUGGING_SYMBOLS = NO;
-				GCC_MODEL_TUNING = G5;
-				GCC_PRECOMPILE_PREFIX_HEADER = YES;
-				GCC_PREFIX_HEADER = "___PROJECTNAMEASIDENTIFIER____Prefix.pch";
-				INFOPLIST_FILE = Info.plist;
-				INSTALL_PATH = "$(HOME)/Applications";
-				PRODUCT_NAME = "___PROJECTNAME___";
-				WRAPPER_EXTENSION = app;
-			};
-			name = Release;
-		};
-		C01FCF4F08A954540054247B /* Debug */ = {
-			isa = XCBuildConfiguration;
-			buildSettings = {
-				ARCHS = "$(ARCHS_STANDARD_32_BIT_PRE_XCODE_3_1)";
-				ARCHS_STANDARD_32_BIT_PRE_XCODE_3_1 = "ppc i386";
-				FRAMEWORK_SEARCH_PATHS = (
-					"$(HOME)/Library/Frameworks",
-					/Library/Frameworks,
-					"$(FRAMEWORK_SEARCH_PATHS)",
-				);
-				GCC_C_LANGUAGE_STANDARD = c99;
-				GCC_VERSION = 4.0;
-				GCC_WARN_ABOUT_RETURN_TYPE = YES;
-				GCC_WARN_UNUSED_VARIABLE = YES;
-				HEADER_SEARCH_PATHS = (
-					"$(HOME)/Library/Frameworks/SDL.framework/Headers",
-					/Library/Frameworks/SDL.framework/Headers,
-					"$(HEADER_SEARCH_PATHS)",
-				);
-				PREBINDING = NO;
-				SDKROOT = /Developer/SDKs/MacOSX10.4u.sdk;
-			};
-			name = Debug;
-		};
-		C01FCF5008A954540054247B /* Release */ = {
-			isa = XCBuildConfiguration;
-			buildSettings = {
-				ARCHS = "$(ARCHS_STANDARD_32_BIT_PRE_XCODE_3_1)";
-				ARCHS_STANDARD_32_BIT_PRE_XCODE_3_1 = "ppc i386";
-				FRAMEWORK_SEARCH_PATHS = (
-					"$(HOME)/Library/Frameworks",
-					/Library/Frameworks,
-					"$(FRAMEWORK_SEARCH_PATHS)",
-				);
-				GCC_C_LANGUAGE_STANDARD = c99;
-				GCC_VERSION = 4.0;
-				GCC_WARN_ABOUT_RETURN_TYPE = YES;
-				GCC_WARN_UNUSED_VARIABLE = YES;
-				HEADER_SEARCH_PATHS = (
-					"$(HOME)/Library/Frameworks/SDL.framework/Headers",
-					/Library/Frameworks/SDL.framework/Headers,
-					"$(HEADER_SEARCH_PATHS)",
-				);
-				PREBINDING = NO;
-				SDKROOT = /Developer/SDKs/MacOSX10.4u.sdk;
-			};
-			name = Release;
-		};
-/* End XCBuildConfiguration section */
-
-/* Begin XCConfigurationList section */
-		C01FCF4A08A954540054247B /* Build configuration list for PBXNativeTarget "___PROJECTNAME___" */ = {
-			isa = XCConfigurationList;
-			buildConfigurations = (
-				C01FCF4B08A954540054247B /* Debug */,
-				C01FCF4C08A954540054247B /* Release */,
-			);
-			defaultConfigurationIsVisible = 0;
-			defaultConfigurationName = Release;
-		};
-		C01FCF4E08A954540054247B /* Build configuration list for PBXProject "___PROJECTNAME___" */ = {
-			isa = XCConfigurationList;
-			buildConfigurations = (
-				C01FCF4F08A954540054247B /* Debug */,
-				C01FCF5008A954540054247B /* Release */,
-			);
-			defaultConfigurationIsVisible = 0;
-			defaultConfigurationName = Release;
-		};
-/* End XCConfigurationList section */
-	};
-	rootObject = 29B97313FDCFA39411CA2CEA /* Project object */;
-}
diff --git a/Xcode/TemplatesForXcodeLeopard/SDL Cocoa Application/main.c b/Xcode/TemplatesForXcodeLeopard/SDL Cocoa Application/main.c
deleted file mode 100644
index 47af3765d..000000000
--- a/Xcode/TemplatesForXcodeLeopard/SDL Cocoa Application/main.c	
+++ /dev/null
@@ -1,65 +0,0 @@
-
-/* Simple program:  Create a blank window, wait for keypress, quit.
-
-   Please see the SDL documentation for details on using the SDL API:
-   /Developer/Documentation/SDL/docs.html
-*/
-
-#include 
-#include 
-#include 
-#include 
-
-#include "SDL.h"
-
-int main(int argc, char *argv[])
-{
-    Uint32 initflags = SDL_INIT_VIDEO;  /* See documentation for details */
-    SDL_Surface *screen;
-    Uint8  video_bpp = 0;
-    Uint32 videoflags = SDL_SWSURFACE;
-    int    done;
-        SDL_Event event;
-
-    /* Initialize the SDL library */
-    if ( SDL_Init(initflags) < 0 ) {
-        fprintf(stderr, "Couldn't initialize SDL: %s\n",
-            SDL_GetError());
-        exit(1);
-    }
-
-    /* Set 640x480 video mode */
-    screen=SDL_SetVideoMode(640,480, video_bpp, videoflags);
-        if (screen == NULL) {
-        fprintf(stderr, "Couldn't set 640x480x%d video mode: %s\n",
-                        video_bpp, SDL_GetError());
-        SDL_Quit();
-        exit(2);
-    }
-
-    done = 0;
-    while ( !done ) {
-
-        /* Check for events */
-        while ( SDL_PollEvent(&event) ) {
-            switch (event.type) {
-
-                case SDL_MOUSEMOTION:
-                    break;
-                case SDL_MOUSEBUTTONDOWN:
-                    break;
-                case SDL_KEYDOWN:
-                    /* Any keypress quits the app... */
-                case SDL_QUIT:
-                    done = 1;
-                    break;
-                default:
-                    break;
-            }
-        }
-    }
-
-    /* Clean up the SDL library */
-    SDL_Quit();
-    return(0);
-}
diff --git a/Xcode/TemplatesForXcodeLeopard/SDL OpenGL Application/English.lproj/InfoPlist.strings b/Xcode/TemplatesForXcodeLeopard/SDL OpenGL Application/English.lproj/InfoPlist.strings
deleted file mode 100644
index 6e721b0ef0e7ef6d44f293955483ecf6ae72291a..0000000000000000000000000000000000000000
GIT binary patch
literal 0
HcmV?d00001

literal 644
zcmb`^O-lk{6b0aC?XP%oDWSEF7L%A6HO44GZDPvtgLFpx2<*pKFiMcvB9ObdT<+nX
zd(Qd#Y^Vut6<(#LCO%{af_IsPrHMjrDJTpD9l4=G-Mqvvtpsl}n-W#iP*Krz<HaO~?0PSu_L
z!QGZw{Wx%3#uGtPVQy3E7#Ww&Zhd;x5=nMb*!8YNTO`);B+}Q>74P|2->Hf9Tw9w-
W
-
-
-
-	CFBundleDevelopmentRegion
-	English
-	CFBundleExecutable
-	${EXECUTABLE_NAME}
-	CFBundleIconFile
-	
-	CFBundleIdentifier
-	com.yourcompany.___PROJECTNAMEASXML___
-	CFBundleInfoDictionaryVersion
-	6.0
-	CFBundleName
-	${PRODUCT_NAME}
-	CFBundlePackageType
-	APPL
-	CFBundleSignature
-	????
-	CFBundleVersion
-	1.0
-	NSMainNibFile
-	SDLMain
-	NSPrincipalClass
-	NSApplication
-	LSMinimumSystemVersionByArchitecture
-	
-		x86_64
-		10.6.0
-		i386
-		10.4.0
-		ppc
-		10.4.0
-	
-
-
diff --git a/Xcode/TemplatesForXcodeLeopard/SDL OpenGL Application/___PROJECTNAMEASIDENTIFIER____Prefix.pch b/Xcode/TemplatesForXcodeLeopard/SDL OpenGL Application/___PROJECTNAMEASIDENTIFIER____Prefix.pch
deleted file mode 100644
index 00095074a..000000000
--- a/Xcode/TemplatesForXcodeLeopard/SDL OpenGL Application/___PROJECTNAMEASIDENTIFIER____Prefix.pch	
+++ /dev/null
@@ -1,9 +0,0 @@
-//
-// Prefix header for all source files of the 'PROJECTNAME' target in the 'PROJECTNAME' project
-//
-
-#include "SDL.h"
-
-#ifdef __OBJC__
-    #import 
-#endif
diff --git a/Xcode/TemplatesForXcodeLeopard/SDL OpenGL Application/___PROJECTNAME___.xcodeproj/TemplateIcon.icns b/Xcode/TemplatesForXcodeLeopard/SDL OpenGL Application/___PROJECTNAME___.xcodeproj/TemplateIcon.icns
deleted file mode 100644
index ae0b02b12ae19056f034a483be03dd053112545a..0000000000000000000000000000000000000000
GIT binary patch
literal 0
HcmV?d00001

literal 111234
zcmeFa2UJsAxAz^20@9TlL6EKp1VZmhO{n&I?7de+MNQ}+AfSj~?_IGs6i^Wq5l|43
zCLq1HkYtznjTP*k=R5a4?;ZCU@Aol>cm^lg|I9ttTyw4cTN7NhWc?P3(5>KATj*vK
zim>B;2qO=`2tKc$+uPsQ#p7^U{9!zdB!OguC_$10$s+s!J1~#Up0}}OcRpa8K7fZ3
zXI|;2uAb&}7W&{L2L|G7_d4Vik8^(ny--pNSw}*&jQ05L@mZ141P@+8-Oe3lF*Em;
zvSzQx8e<38ph~uNb(OdFw3nP|0>FFw2l)McSbO>FcU(5f0x6uw>FDARfZ>4SEKG<%
z?%)FifrS8z6e7qtppY#1?mmax%jxUpak#;JkwNEY3Y;fM0?@02wHt3qbB=6D-4y+{9bObcW746T69I=R4hBXOttSM|w|8|_xAnG{-$c&$
z4{)&o4%YSg-N*ko=efT)zr}jp8VW^7obsEA{bs+tOkw_J@SE{|v)^6@@;CeMzW$s1
zANnr8+3)@j|IJpdMYCx5aRQE!$AHZh9pLh~1HoLOfq_`A9G}m_2p*S@V|+e_6F4uN
zFU;ffSbP=;5quViVI%;KV^}0mNH$24BtgJH8y83%XMre*kvPsKbpaay3{X--<0|!$
z8VhqAZ6;VON{4bQW+$Nk-O&gH3oLN(rpySPEq6jqeww4?u$ROqN(qUv@FuE(Ki
zUM=vU#3!EzGbpr6QZhb=Zfnx`Xpch1&rWF7d3d$t39k>{OD=8)_
zCFNkosrZj1T%Z0Na5ku6Tn>i^cyD`4&j6RlY3pch?1S_}lTcE;
zC$S5N5MYxE#6V|Pdw)0HL$k
zfG~!Up%8(|^7%X-pUdZR2l~<6;m2blIEG^^T!_F~{7~!|93v~?ZxcrxB@WKx@o^Sk
z6vOae69;2~7>-62$M9bgr-S!%;sldAKk}w&yTt^nE%{UYT)a1DLj`kT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5afg%=j^PN>TOzuh7HQ>nm?F3BehxbV(N)2uZZhIqO&OLnyC`(E#
z)9S6Vpjq6yQ`?9w>NmpPK$***M07N6Vzh{Z4Cr5`#j)e>wt
zV>i@Vk+Rl>-9XxUDQwU3ajm1GXL>qsydn)h6!I=LU>~1bG^`18EO$x-w(sEC4@PWP
z`{{HD=*+3o$bszF{BZxu^V2IX?m2V`oU+h&TQ+k5ks4!5-=c>R1jwuBm>x`?c%}Xb
zP<&U*z3J@VJ#<+sN{V$t68Rr$2+#1sCh|U7)hd7q3Ln^9@n&l%>&^5LIEg6}qN)E#
zxPyIvuu=%3Iyv*!_?mR4jYYPJ@1UGTsBoakCc_jk*8pXSWe#4KlpgHCEQ;DlvJ15%
z2KBRUUM^QA!cQEPI=dU6%1tcBo*7yzE|pxIzTvszD2>k*kkDc+$jPV)^)_nfG9K+K
zii(L_=^|7I!qS-saJ~x$c}aqe5jXl5wmD?4!=b)`hv*3tPkxju0vJdqHH1;oy&#v+
z;Q@ZU)1r_k4IW|uHjQ8Q<#5_=duoC*T*yUeYceMBBXg7#lAZI*mLuYVinuQF=p7eH
zXPo|&?wm8HUbth`(VoYiesZY8AIaO-mS18cd?J>Z$24VCA2i+nYpc>KwYVAt)QG=n
zzykvQ1qxq#_&iB0lwLyv82|Tp^}=tT^Wqxa1+Zd7BX
H0f7GkLul&m

diff --git a/Xcode/TemplatesForXcodeLeopard/SDL OpenGL Application/___PROJECTNAME___.xcodeproj/TemplateInfo.plist b/Xcode/TemplatesForXcodeLeopard/SDL OpenGL Application/___PROJECTNAME___.xcodeproj/TemplateInfo.plist
deleted file mode 100644
index ba87745fc..000000000
--- a/Xcode/TemplatesForXcodeLeopard/SDL OpenGL Application/___PROJECTNAME___.xcodeproj/TemplateInfo.plist	
+++ /dev/null
@@ -1,12 +0,0 @@
-{
-	FilesToRename = {
-		"SDLApp_Prefix.pch" = "PROJECTNAME_Prefix.pch";
-	};
-	FilesToMacroExpand = (
-		"PROJECTNAME_Prefix.pch",
-		"Info.plist",
-		"English.lproj/InfoPlist.strings",
-		"main.c",
-	);
-	Description = "This project builds an SDL-based application that uses OpenGL.";
-}
diff --git a/Xcode/TemplatesForXcodeLeopard/SDL OpenGL Application/___PROJECTNAME___.xcodeproj/project.pbxproj b/Xcode/TemplatesForXcodeLeopard/SDL OpenGL Application/___PROJECTNAME___.xcodeproj/project.pbxproj
deleted file mode 100644
index d81bb862e..000000000
--- a/Xcode/TemplatesForXcodeLeopard/SDL OpenGL Application/___PROJECTNAME___.xcodeproj/project.pbxproj	
+++ /dev/null
@@ -1,346 +0,0 @@
-// !$*UTF8*$!
-{
-	archiveVersion = 1;
-	classes = {
-	};
-	objectVersion = 42;
-	objects = {
-
-/* Begin PBXBuildFile section */
-		002F39FA09D0881F00EBEB88 /* SDL.framework in Frameworks */ = {isa = PBXBuildFile; fileRef = 002F39F909D0881F00EBEB88 /* SDL.framework */; };
-		002F3A0009D0884600EBEB88 /* SDL.framework in Copy Frameworks into .app bundle */ = {isa = PBXBuildFile; fileRef = 002F39F909D0881F00EBEB88 /* SDL.framework */; };
-		002F3A3F09D088BA00EBEB88 /* main.c in Sources */ = {isa = PBXBuildFile; fileRef = 002F3A3E09D088BA00EBEB88 /* main.c */; };
-		002F3BFA09D0938900EBEB88 /* atlantis.c in Sources */ = {isa = PBXBuildFile; fileRef = 002F3BF409D0938900EBEB88 /* atlantis.c */; };
-		002F3BFC09D0938900EBEB88 /* dolphin.c in Sources */ = {isa = PBXBuildFile; fileRef = 002F3BF609D0938900EBEB88 /* dolphin.c */; };
-		002F3BFD09D0938900EBEB88 /* shark.c in Sources */ = {isa = PBXBuildFile; fileRef = 002F3BF709D0938900EBEB88 /* shark.c */; };
-		002F3BFE09D0938900EBEB88 /* swim.c in Sources */ = {isa = PBXBuildFile; fileRef = 002F3BF809D0938900EBEB88 /* swim.c */; };
-		002F3BFF09D0938900EBEB88 /* whale.c in Sources */ = {isa = PBXBuildFile; fileRef = 002F3BF909D0938900EBEB88 /* whale.c */; };
-		002F3C0109D093BD00EBEB88 /* OpenGL.framework in Frameworks */ = {isa = PBXBuildFile; fileRef = 002F3C0009D093BD00EBEB88 /* OpenGL.framework */; };
-		002F3C6109D0951E00EBEB88 /* GLUT.framework in Frameworks */ = {isa = PBXBuildFile; fileRef = 002F3C6009D0951E00EBEB88 /* GLUT.framework */; };
-		8D11072B0486CEB800E47090 /* InfoPlist.strings in Resources */ = {isa = PBXBuildFile; fileRef = 089C165CFE840E0CC02AAC07 /* InfoPlist.strings */; };
-		8D11072F0486CEB800E47090 /* Cocoa.framework in Frameworks */ = {isa = PBXBuildFile; fileRef = 1058C7A1FEA54F0111CA2CBB /* Cocoa.framework */; };
-/* End PBXBuildFile section */
-
-/* Begin PBXCopyFilesBuildPhase section */
-		002F39FD09D0883400EBEB88 /* Copy Frameworks into .app bundle */ = {
-			isa = PBXCopyFilesBuildPhase;
-			buildActionMask = 2147483647;
-			dstPath = "";
-			dstSubfolderSpec = 10;
-			files = (
-				002F3A0009D0884600EBEB88 /* SDL.framework in Copy Frameworks into .app bundle */,
-			);
-			name = "Copy Frameworks into .app bundle";
-			runOnlyForDeploymentPostprocessing = 0;
-		};
-/* End PBXCopyFilesBuildPhase section */
-
-/* Begin PBXFileReference section */
-		002F39F909D0881F00EBEB88 /* SDL.framework */ = {isa = PBXFileReference; lastKnownFileType = wrapper.framework; name = SDL.framework; path = /Library/Frameworks/SDL.framework; sourceTree = ""; };
-		002F3A3E09D088BA00EBEB88 /* main.c */ = {isa = PBXFileReference; fileEncoding = 30; lastKnownFileType = sourcecode.c.c; path = main.c; sourceTree = SOURCE_ROOT; };
-		002F3BF409D0938900EBEB88 /* atlantis.c */ = {isa = PBXFileReference; fileEncoding = 30; lastKnownFileType = sourcecode.c.c; name = atlantis.c; path = atlantis/atlantis.c; sourceTree = SOURCE_ROOT; };
-		002F3BF509D0938900EBEB88 /* atlantis.h */ = {isa = PBXFileReference; fileEncoding = 30; lastKnownFileType = sourcecode.c.h; name = atlantis.h; path = atlantis/atlantis.h; sourceTree = SOURCE_ROOT; };
-		002F3BF609D0938900EBEB88 /* dolphin.c */ = {isa = PBXFileReference; fileEncoding = 30; lastKnownFileType = sourcecode.c.c; name = dolphin.c; path = atlantis/dolphin.c; sourceTree = SOURCE_ROOT; };
-		002F3BF709D0938900EBEB88 /* shark.c */ = {isa = PBXFileReference; fileEncoding = 30; lastKnownFileType = sourcecode.c.c; name = shark.c; path = atlantis/shark.c; sourceTree = SOURCE_ROOT; };
-		002F3BF809D0938900EBEB88 /* swim.c */ = {isa = PBXFileReference; fileEncoding = 30; lastKnownFileType = sourcecode.c.c; name = swim.c; path = atlantis/swim.c; sourceTree = SOURCE_ROOT; };
-		002F3BF909D0938900EBEB88 /* whale.c */ = {isa = PBXFileReference; fileEncoding = 30; lastKnownFileType = sourcecode.c.c; name = whale.c; path = atlantis/whale.c; sourceTree = SOURCE_ROOT; };
-		002F3C0009D093BD00EBEB88 /* OpenGL.framework */ = {isa = PBXFileReference; lastKnownFileType = wrapper.framework; name = OpenGL.framework; path = /System/Library/Frameworks/OpenGL.framework; sourceTree = ""; };
-		002F3C6009D0951E00EBEB88 /* GLUT.framework */ = {isa = PBXFileReference; lastKnownFileType = wrapper.framework; name = GLUT.framework; path = ../../../../../../../../../../System/Library/Frameworks/GLUT.framework; sourceTree = SOURCE_ROOT; };
-		089C165DFE840E0CC02AAC07 /* English */ = {isa = PBXFileReference; fileEncoding = 10; lastKnownFileType = text.plist.strings; name = English; path = English.lproj/InfoPlist.strings; sourceTree = ""; };
-		1058C7A1FEA54F0111CA2CBB /* Cocoa.framework */ = {isa = PBXFileReference; lastKnownFileType = wrapper.framework; name = Cocoa.framework; path = /System/Library/Frameworks/Cocoa.framework; sourceTree = ""; };
-		29B97324FDCFA39411CA2CEA /* AppKit.framework */ = {isa = PBXFileReference; lastKnownFileType = wrapper.framework; name = AppKit.framework; path = /System/Library/Frameworks/AppKit.framework; sourceTree = ""; };
-		29B97325FDCFA39411CA2CEA /* Foundation.framework */ = {isa = PBXFileReference; lastKnownFileType = wrapper.framework; name = Foundation.framework; path = /System/Library/Frameworks/Foundation.framework; sourceTree = ""; };
-		32CA4F630368D1EE00C91783 /* ___PROJECTNAME____Prefix.pch */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = "___PROJECTNAME____Prefix.pch"; sourceTree = ""; };
-		8D1107310486CEB800E47090 /* Info.plist */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = text.plist; path = Info.plist; sourceTree = ""; };
-		8D1107320486CEB800E47090 /* ___PROJECTNAME___.app */ = {isa = PBXFileReference; explicitFileType = wrapper.application; includeInIndex = 0; path = "___PROJECTNAME___.app"; sourceTree = BUILT_PRODUCTS_DIR; };
-/* End PBXFileReference section */
-
-/* Begin PBXFrameworksBuildPhase section */
-		8D11072E0486CEB800E47090 /* Frameworks */ = {
-			isa = PBXFrameworksBuildPhase;
-			buildActionMask = 2147483647;
-			files = (
-				002F39FA09D0881F00EBEB88 /* SDL.framework in Frameworks */,
-				002F3C6109D0951E00EBEB88 /* GLUT.framework in Frameworks */,
-				8D11072F0486CEB800E47090 /* Cocoa.framework in Frameworks */,
-				002F3C0109D093BD00EBEB88 /* OpenGL.framework in Frameworks */,
-			);
-			runOnlyForDeploymentPostprocessing = 0;
-		};
-/* End PBXFrameworksBuildPhase section */
-
-/* Begin PBXGroup section */
-		002F3BF309D0937800EBEB88 /* atlantis */ = {
-			isa = PBXGroup;
-			children = (
-				002F3BF409D0938900EBEB88 /* atlantis.c */,
-				002F3BF509D0938900EBEB88 /* atlantis.h */,
-				002F3BF609D0938900EBEB88 /* dolphin.c */,
-				002F3BF709D0938900EBEB88 /* shark.c */,
-				002F3BF809D0938900EBEB88 /* swim.c */,
-				002F3BF909D0938900EBEB88 /* whale.c */,
-			);
-			name = atlantis;
-			sourceTree = "";
-		};
-		080E96DDFE201D6D7F000001 /* Classes */ = {
-			isa = PBXGroup;
-			children = (
-			);
-			name = Classes;
-			sourceTree = "";
-		};
-		1058C7A0FEA54F0111CA2CBB /* Linked Frameworks */ = {
-			isa = PBXGroup;
-			children = (
-				002F39F909D0881F00EBEB88 /* SDL.framework */,
-				002F3C6009D0951E00EBEB88 /* GLUT.framework */,
-				1058C7A1FEA54F0111CA2CBB /* Cocoa.framework */,
-				002F3C0009D093BD00EBEB88 /* OpenGL.framework */,
-			);
-			name = "Linked Frameworks";
-			sourceTree = "";
-		};
-		1058C7A2FEA54F0111CA2CBB /* Other Frameworks */ = {
-			isa = PBXGroup;
-			children = (
-				29B97324FDCFA39411CA2CEA /* AppKit.framework */,
-				29B97325FDCFA39411CA2CEA /* Foundation.framework */,
-			);
-			name = "Other Frameworks";
-			sourceTree = "";
-		};
-		19C28FACFE9D520D11CA2CBB /* Products */ = {
-			isa = PBXGroup;
-			children = (
-				8D1107320486CEB800E47090 /* ___PROJECTNAME___.app */,
-			);
-			name = Products;
-			sourceTree = "";
-		};
-		29B97314FDCFA39411CA2CEA /* ___PROJECTNAMEASXML___ */ = {
-			isa = PBXGroup;
-			children = (
-				080E96DDFE201D6D7F000001 /* Classes */,
-				29B97315FDCFA39411CA2CEA /* Other Sources */,
-				29B97317FDCFA39411CA2CEA /* Resources */,
-				29B97323FDCFA39411CA2CEA /* Frameworks */,
-				19C28FACFE9D520D11CA2CBB /* Products */,
-			);
-			name = "___PROJECTNAMEASXML___";
-			sourceTree = "";
-		};
-		29B97315FDCFA39411CA2CEA /* Other Sources */ = {
-			isa = PBXGroup;
-			children = (
-				002F3BF309D0937800EBEB88 /* atlantis */,
-				32CA4F630368D1EE00C91783 /* ___PROJECTNAME____Prefix.pch */,
-				002F3A3E09D088BA00EBEB88 /* main.c */,
-			);
-			name = "Other Sources";
-			sourceTree = "";
-		};
-		29B97317FDCFA39411CA2CEA /* Resources */ = {
-			isa = PBXGroup;
-			children = (
-				8D1107310486CEB800E47090 /* Info.plist */,
-				089C165CFE840E0CC02AAC07 /* InfoPlist.strings */,
-			);
-			name = Resources;
-			sourceTree = "";
-		};
-		29B97323FDCFA39411CA2CEA /* Frameworks */ = {
-			isa = PBXGroup;
-			children = (
-				1058C7A0FEA54F0111CA2CBB /* Linked Frameworks */,
-				1058C7A2FEA54F0111CA2CBB /* Other Frameworks */,
-			);
-			name = Frameworks;
-			sourceTree = "";
-		};
-/* End PBXGroup section */
-
-/* Begin PBXNativeTarget section */
-		8D1107260486CEB800E47090 /* ___PROJECTNAME___ */ = {
-			isa = PBXNativeTarget;
-			buildConfigurationList = C01FCF4A08A954540054247B /* Build configuration list for PBXNativeTarget "___PROJECTNAME___" */;
-			buildPhases = (
-				8D1107290486CEB800E47090 /* Resources */,
-				8D11072C0486CEB800E47090 /* Sources */,
-				8D11072E0486CEB800E47090 /* Frameworks */,
-				002F39FD09D0883400EBEB88 /* Copy Frameworks into .app bundle */,
-			);
-			buildRules = (
-			);
-			dependencies = (
-			);
-			name = "___PROJECTNAME___";
-			productInstallPath = "$(HOME)/Applications";
-			productName = "___PROJECTNAME___";
-			productReference = 8D1107320486CEB800E47090 /* ___PROJECTNAME___.app */;
-			productType = "com.apple.product-type.application";
-		};
-/* End PBXNativeTarget section */
-
-/* Begin PBXProject section */
-		29B97313FDCFA39411CA2CEA /* Project object */ = {
-			isa = PBXProject;
-			buildConfigurationList = C01FCF4E08A954540054247B /* Build configuration list for PBXProject "___PROJECTNAME___" */;
-			compatibilityVersion = "Xcode 2.4";
-			hasScannedForEncodings = 1;
-			mainGroup = 29B97314FDCFA39411CA2CEA /* ___PROJECTNAMEASXML___ */;
-			projectDirPath = "";
-			projectRoot = "";
-			targets = (
-				8D1107260486CEB800E47090 /* ___PROJECTNAME___ */,
-			);
-		};
-/* End PBXProject section */
-
-/* Begin PBXResourcesBuildPhase section */
-		8D1107290486CEB800E47090 /* Resources */ = {
-			isa = PBXResourcesBuildPhase;
-			buildActionMask = 2147483647;
-			files = (
-				8D11072B0486CEB800E47090 /* InfoPlist.strings in Resources */,
-			);
-			runOnlyForDeploymentPostprocessing = 0;
-		};
-/* End PBXResourcesBuildPhase section */
-
-/* Begin PBXSourcesBuildPhase section */
-		8D11072C0486CEB800E47090 /* Sources */ = {
-			isa = PBXSourcesBuildPhase;
-			buildActionMask = 2147483647;
-			files = (
-				002F3A3F09D088BA00EBEB88 /* main.c in Sources */,
-				002F3BFA09D0938900EBEB88 /* atlantis.c in Sources */,
-				002F3BFC09D0938900EBEB88 /* dolphin.c in Sources */,
-				002F3BFD09D0938900EBEB88 /* shark.c in Sources */,
-				002F3BFE09D0938900EBEB88 /* swim.c in Sources */,
-				002F3BFF09D0938900EBEB88 /* whale.c in Sources */,
-			);
-			runOnlyForDeploymentPostprocessing = 0;
-		};
-/* End PBXSourcesBuildPhase section */
-
-/* Begin PBXVariantGroup section */
-		089C165CFE840E0CC02AAC07 /* InfoPlist.strings */ = {
-			isa = PBXVariantGroup;
-			children = (
-				089C165DFE840E0CC02AAC07 /* English */,
-			);
-			name = InfoPlist.strings;
-			sourceTree = "";
-		};
-/* End PBXVariantGroup section */
-
-/* Begin XCBuildConfiguration section */
-		C01FCF4B08A954540054247B /* Debug */ = {
-			isa = XCBuildConfiguration;
-			buildSettings = {
-				COPY_PHASE_STRIP = NO;
-				GCC_DYNAMIC_NO_PIC = NO;
-				GCC_ENABLE_FIX_AND_CONTINUE = YES;
-				GCC_MODEL_TUNING = G5;
-				GCC_OPTIMIZATION_LEVEL = 0;
-				GCC_PRECOMPILE_PREFIX_HEADER = YES;
-				GCC_PREFIX_HEADER = "___PROJECTNAMEASIDENTIFIER____Prefix.pch";
-				INFOPLIST_FILE = Info.plist;
-				INSTALL_PATH = "$(HOME)/Applications";
-				PRODUCT_NAME = "___PROJECTNAME___";
-				WRAPPER_EXTENSION = app;
-			};
-			name = Debug;
-		};
-		C01FCF4C08A954540054247B /* Release */ = {
-			isa = XCBuildConfiguration;
-			buildSettings = {
-				ARCHS = (
-					ppc,
-					i386,
-				);
-				GCC_GENERATE_DEBUGGING_SYMBOLS = NO;
-				GCC_MODEL_TUNING = G5;
-				GCC_PRECOMPILE_PREFIX_HEADER = YES;
-				GCC_PREFIX_HEADER = "___PROJECTNAMEASIDENTIFIER____Prefix.pch";
-				INFOPLIST_FILE = Info.plist;
-				INSTALL_PATH = "$(HOME)/Applications";
-				PRODUCT_NAME = "___PROJECTNAME___";
-				WRAPPER_EXTENSION = app;
-			};
-			name = Release;
-		};
-		C01FCF4F08A954540054247B /* Debug */ = {
-			isa = XCBuildConfiguration;
-			buildSettings = {
-				ARCHS = "$(ARCHS_STANDARD_32_BIT_PRE_XCODE_3_1)";
-				ARCHS_STANDARD_32_BIT_PRE_XCODE_3_1 = "ppc i386";
-				FRAMEWORK_SEARCH_PATHS = (
-					"$(HOME)/Library/Frameworks",
-					/Library/Frameworks,
-					"$(FRAMEWORK_SEARCH_PATHS)",
-				);
-				GCC_C_LANGUAGE_STANDARD = c99;
-				GCC_VERSION = 4.0;
-				GCC_WARN_ABOUT_RETURN_TYPE = YES;
-				GCC_WARN_UNUSED_VARIABLE = YES;
-				HEADER_SEARCH_PATHS = (
-					"$(HOME)/Library/Frameworks/SDL.framework/Headers",
-					/Library/Frameworks/SDL.framework/Headers,
-					"$(HEADER_SEARCH_PATHS)",
-				);
-				PREBINDING = NO;
-				SDKROOT = /Developer/SDKs/MacOSX10.4u.sdk;
-			};
-			name = Debug;
-		};
-		C01FCF5008A954540054247B /* Release */ = {
-			isa = XCBuildConfiguration;
-			buildSettings = {
-				ARCHS = "$(ARCHS_STANDARD_32_BIT_PRE_XCODE_3_1)";
-				ARCHS_STANDARD_32_BIT_PRE_XCODE_3_1 = "ppc i386";
-				FRAMEWORK_SEARCH_PATHS = (
-					"$(HOME)/Library/Frameworks",
-					/Library/Frameworks,
-					"$(FRAMEWORK_SEARCH_PATHS)",
-				);
-				GCC_C_LANGUAGE_STANDARD = c99;
-				GCC_VERSION = 4.0;
-				GCC_WARN_ABOUT_RETURN_TYPE = YES;
-				GCC_WARN_UNUSED_VARIABLE = YES;
-				HEADER_SEARCH_PATHS = (
-					"$(HOME)/Library/Frameworks/SDL.framework/Headers",
-					/Library/Frameworks/SDL.framework/Headers,
-					"$(HEADER_SEARCH_PATHS)",
-				);
-				PREBINDING = NO;
-				SDKROOT = /Developer/SDKs/MacOSX10.4u.sdk;
-			};
-			name = Release;
-		};
-/* End XCBuildConfiguration section */
-
-/* Begin XCConfigurationList section */
-		C01FCF4A08A954540054247B /* Build configuration list for PBXNativeTarget "___PROJECTNAME___" */ = {
-			isa = XCConfigurationList;
-			buildConfigurations = (
-				C01FCF4B08A954540054247B /* Debug */,
-				C01FCF4C08A954540054247B /* Release */,
-			);
-			defaultConfigurationIsVisible = 0;
-			defaultConfigurationName = Release;
-		};
-		C01FCF4E08A954540054247B /* Build configuration list for PBXProject "___PROJECTNAME___" */ = {
-			isa = XCConfigurationList;
-			buildConfigurations = (
-				C01FCF4F08A954540054247B /* Debug */,
-				C01FCF5008A954540054247B /* Release */,
-			);
-			defaultConfigurationIsVisible = 0;
-			defaultConfigurationName = Release;
-		};
-/* End XCConfigurationList section */
-	};
-	rootObject = 29B97313FDCFA39411CA2CEA /* Project object */;
-}
diff --git a/Xcode/TemplatesForXcodeLeopard/SDL OpenGL Application/atlantis/atlantis.c b/Xcode/TemplatesForXcodeLeopard/SDL OpenGL Application/atlantis/atlantis.c
deleted file mode 100644
index debed809d..000000000
--- a/Xcode/TemplatesForXcodeLeopard/SDL OpenGL Application/atlantis/atlantis.c	
+++ /dev/null
@@ -1,459 +0,0 @@
-
-/* Copyright (c) Mark J. Kilgard, 1994. */
-
-/**
- * (c) Copyright 1993, 1994, Silicon Graphics, Inc.
- * ALL RIGHTS RESERVED
- * Permission to use, copy, modify, and distribute this software for
- * any purpose and without fee is hereby granted, provided that the above
- * copyright notice appear in all copies and that both the copyright notice
- * and this permission notice appear in supporting documentation, and that
- * the name of Silicon Graphics, Inc. not be used in advertising
- * or publicity pertaining to distribution of the software without specific,
- * written prior permission.
- *
- * THE MATERIAL EMBODIED ON THIS SOFTWARE IS PROVIDED TO YOU "AS-IS"
- * AND WITHOUT WARRANTY OF ANY KIND, EXPRESS, IMPLIED OR OTHERWISE,
- * INCLUDING WITHOUT LIMITATION, ANY WARRANTY OF MERCHANTABILITY OR
- * FITNESS FOR A PARTICULAR PURPOSE.  IN NO EVENT SHALL SILICON
- * GRAPHICS, INC.  BE LIABLE TO YOU OR ANYONE ELSE FOR ANY DIRECT,
- * SPECIAL, INCIDENTAL, INDIRECT OR CONSEQUENTIAL DAMAGES OF ANY
- * KIND, OR ANY DAMAGES WHATSOEVER, INCLUDING WITHOUT LIMITATION,
- * LOSS OF PROFIT, LOSS OF USE, SAVINGS OR REVENUE, OR THE CLAIMS OF
- * THIRD PARTIES, WHETHER OR NOT SILICON GRAPHICS, INC.  HAS BEEN
- * ADVISED OF THE POSSIBILITY OF SUCH LOSS, HOWEVER CAUSED AND ON
- * ANY THEORY OF LIABILITY, ARISING OUT OF OR IN CONNECTION WITH THE
- * POSSESSION, USE OR PERFORMANCE OF THIS SOFTWARE.
- *
- * US Government Users Restricted Rights
- * Use, duplication, or disclosure by the Government is subject to
- * restrictions set forth in FAR 52.227.19(c)(2) or subparagraph
- * (c)(1)(ii) of the Rights in Technical Data and Computer Software
- * clause at DFARS 252.227-7013 and/or in similar or successor
- * clauses in the FAR or the DOD or NASA FAR Supplement.
- * Unpublished-- rights reserved under the copyright laws of the
- * United States.  Contractor/manufacturer is Silicon Graphics,
- * Inc., 2011 N.  Shoreline Blvd., Mountain View, CA 94039-7311.
- *
- * OpenGL(TM) is a trademark of Silicon Graphics, Inc.
- */
-#include 
-#include 
-#include 
-#include 
-#include 
-#include 
-#include "atlantis.h"
-
-fishRec sharks[NUM_SHARKS];
-fishRec momWhale;
-fishRec babyWhale;
-fishRec dolph;
-
-GLboolean Timing = GL_TRUE;
-
-int w_win = 640;
-int h_win = 480;
-GLint count  = 0;
-GLenum StrMode = GL_VENDOR;
-
-GLboolean moving;
-
-static double mtime(void)
-{
-   struct timeval tk_time;
-   struct timezone tz;
-
-   gettimeofday(&tk_time, &tz);
-
-   return 4294.967296 * tk_time.tv_sec + 0.000001 * tk_time.tv_usec;
-}
-
-static double filter(double in, double *save)
-{
-    static double k1 = 0.9;
-    static double k2 = 0.05;
-
-    save[3] = in;
-    save[1] = save[0]*k1 + k2*(save[3] + save[2]);
-
-    save[0]=save[1];
-    save[2]=save[3];
-
-    return(save[1]);
-}
-
-void DrawStr(const char *str)
-{
-    GLint i = 0;
-
-    if(!str) return;
-
-    while(str[i])
-    {
-        glutBitmapCharacter(GLUT_BITMAP_HELVETICA_12, str[i]);
-        i++;
-    }
-}
-
-void
-InitFishs(void)
-{
-    int i;
-
-    for (i = 0; i < NUM_SHARKS; i++) {
-        sharks[i].x = 70000.0 + rand() % 6000;
-        sharks[i].y = rand() % 6000;
-        sharks[i].z = rand() % 6000;
-        sharks[i].psi = rand() % 360 - 180.0;
-        sharks[i].v = 1.0;
-    }
-
-    dolph.x = 30000.0;
-    dolph.y = 0.0;
-    dolph.z = 6000.0;
-    dolph.psi = 90.0;
-    dolph.theta = 0.0;
-    dolph.v = 3.0;
-
-    momWhale.x = 70000.0;
-    momWhale.y = 0.0;
-    momWhale.z = 0.0;
-    momWhale.psi = 90.0;
-    momWhale.theta = 0.0;
-    momWhale.v = 3.0;
-
-    babyWhale.x = 60000.0;
-    babyWhale.y = -2000.0;
-    babyWhale.z = -2000.0;
-    babyWhale.psi = 90.0;
-    babyWhale.theta = 0.0;
-    babyWhale.v = 3.0;
-}
-
-void
-Atlantis_Init(void)
-{
-    static float ambient[] = {0.2, 0.2, 0.2, 1.0};
-    static float diffuse[] = {1.0, 1.0, 1.0, 1.0};
-    static float position[] = {0.0, 1.0, 0.0, 0.0};
-    static float mat_shininess[] = {90.0};
-    static float mat_specular[] = {0.8, 0.8, 0.8, 1.0};
-    static float mat_diffuse[] = {0.46, 0.66, 0.795, 1.0};
-    static float mat_ambient[] = {0.3, 0.4, 0.5, 1.0};
-    static float lmodel_ambient[] = {0.4, 0.4, 0.4, 1.0};
-    static float lmodel_localviewer[] = {0.0};
-    //GLfloat map1[4] = {0.0, 0.0, 0.0, 0.0};
-    //GLfloat map2[4] = {0.0, 0.0, 0.0, 0.0};
-    static float fog_color[] = {0.0, 0.5, 0.9, 1.0};
-
-    glFrontFace(GL_CCW);
-
-    glDepthFunc(GL_LESS);
-    glEnable(GL_DEPTH_TEST);
-
-    glLightfv(GL_LIGHT0, GL_AMBIENT, ambient);
-    glLightfv(GL_LIGHT0, GL_DIFFUSE, diffuse);
-    glLightfv(GL_LIGHT0, GL_POSITION, position);
-    glLightModelfv(GL_LIGHT_MODEL_AMBIENT, lmodel_ambient);
-    glLightModelfv(GL_LIGHT_MODEL_LOCAL_VIEWER, lmodel_localviewer);
-    glEnable(GL_LIGHTING);
-    glEnable(GL_LIGHT0);
-
-    glMaterialfv(GL_FRONT_AND_BACK, GL_SHININESS, mat_shininess);
-    glMaterialfv(GL_FRONT_AND_BACK, GL_SPECULAR, mat_specular);
-    glMaterialfv(GL_FRONT_AND_BACK, GL_DIFFUSE, mat_diffuse);
-    glMaterialfv(GL_FRONT_AND_BACK, GL_AMBIENT, mat_ambient);
-
-    InitFishs();
-
-    glEnable(GL_FOG);
-    glFogi(GL_FOG_MODE, GL_EXP);
-    glFogf(GL_FOG_DENSITY, 0.0000025);
-    glFogfv(GL_FOG_COLOR, fog_color);
-
-    glClearColor(0.0, 0.5, 0.9, 1.0);
-}
-
-void
-Atlantis_Reshape(int width, int height)
-{
-    w_win = width;
-    h_win = height;
-
-    glViewport(0, 0, width, height);
-
-    glMatrixMode(GL_PROJECTION);
-    glLoadIdentity();
-    gluPerspective(60.0, (GLfloat) width / (GLfloat) height, 20000.0, 300000.0);
-    glMatrixMode(GL_MODELVIEW);
-}
-
-void
-Atlantis_Animate(void)
-{
-    int i;
-
-    for (i = 0; i < NUM_SHARKS; i++) {
-        SharkPilot(&sharks[i]);
-        SharkMiss(i);
-    }
-    WhalePilot(&dolph);
-    dolph.phi++;
-    //glutPostRedisplay();
-    WhalePilot(&momWhale);
-    momWhale.phi++;
-    WhalePilot(&babyWhale);
-    babyWhale.phi++;
-}
-
-void
-Atlantis_Key(unsigned char key, int x, int y)
-{
-    switch (key) {
-    case 't':
-        Timing = !Timing;
-    break;
-    case ' ':
-        switch(StrMode)
-        {
-            case GL_EXTENSIONS:
-                StrMode = GL_VENDOR;
-            break;
-            case GL_VENDOR:
-                StrMode = GL_RENDERER;
-            break;
-            case GL_RENDERER:
-                StrMode = GL_VERSION;
-            break;
-            case GL_VERSION:
-                StrMode = GL_EXTENSIONS;
-            break;
-        }
-    break;
-    case 27:           /* Esc will quit */
-        exit(1);
-    break;
-    case 's':                   /* "s" start animation */
-        moving = GL_TRUE;
-        //glutIdleFunc(Animate);
-    break;
-    case 'a':                   /* "a" stop animation */
-        moving = GL_FALSE;
-        //glutIdleFunc(NULL);
-    break;
-    case '.':                   /* "." will advance frame */
-        if (!moving) {
-            Atlantis_Animate();
-        }
-    }
-}
-/*
-void Display(void)
-{
-    static float P123[3] = {-448.94, -203.14, 9499.60};
-    static float P124[3] = {-442.64, -185.20, 9528.07};
-    static float P125[3] = {-441.07, -148.05, 9528.07};
-    static float P126[3] = {-443.43, -128.84, 9499.60};
-    static float P127[3] = {-456.87, -146.78, 9466.67};
-    static float P128[3] = {-453.68, -183.93, 9466.67};
-
-    glClear(GL_COLOR_BUFFER_BIT | GL_DEPTH_BUFFER_BIT);
-
-    glPushMatrix();
-    FishTransform(&dolph);
-    DrawDolphin(&dolph);
-    glPopMatrix();
-
-    glutSwapBuffers();
-}
-*/
-
-void
-Atlantis_Display(void)
-{
-    int i;
-    static double th[4] = {0.0, 0.0, 0.0, 0.0};
-    static double t1 = 0.0, t2 = 0.0, t;
-    char num_str[128];
-
-    t1 = t2;
-
-    glClear(GL_COLOR_BUFFER_BIT | GL_DEPTH_BUFFER_BIT);
-
-    for (i = 0; i < NUM_SHARKS; i++) {
-        glPushMatrix();
-        FishTransform(&sharks[i]);
-        DrawShark(&sharks[i]);
-        glPopMatrix();
-    }
-
-    glPushMatrix();
-    FishTransform(&dolph);
-    DrawDolphin(&dolph);
-    glPopMatrix();
-
-    glPushMatrix();
-    FishTransform(&momWhale);
-    DrawWhale(&momWhale);
-    glPopMatrix();
-
-    glPushMatrix();
-    FishTransform(&babyWhale);
-    glScalef(0.45, 0.45, 0.3);
-    DrawWhale(&babyWhale);
-    glPopMatrix();
-
-    if(Timing)
-    {
-        t2 = mtime();
-        t = t2 - t1;
-        if(t > 0.0001) t = 1.0 / t;
-
-        glDisable(GL_LIGHTING);
-        //glDisable(GL_DEPTH_TEST);
-
-        glColor3f(1.0, 0.0, 0.0);
-
-        glMatrixMode (GL_PROJECTION);
-        glPushMatrix();
-        glLoadIdentity();
-        glOrtho(0, w_win, 0, h_win, -10.0, 10.0);
-
-        glRasterPos2f(5.0, 5.0);
-
-        switch(StrMode)
-        {
-            case GL_VENDOR:
-                sprintf(num_str, "%0.2f Hz, %dx%d, VENDOR: ", filter(t, th), w_win, h_win);
-                DrawStr(num_str);
-                DrawStr(glGetString(GL_VENDOR));
-            break;
-            case GL_RENDERER:
-                sprintf(num_str, "%0.2f Hz, %dx%d, RENDERER: ", filter(t, th), w_win, h_win);
-                DrawStr(num_str);
-                DrawStr(glGetString(GL_RENDERER));
-            break;
-            case GL_VERSION:
-                sprintf(num_str, "%0.2f Hz, %dx%d, VERSION: ", filter(t, th), w_win, h_win);
-                DrawStr(num_str);
-                DrawStr(glGetString(GL_VERSION));
-            break;
-            case GL_EXTENSIONS:
-                sprintf(num_str, "%0.2f Hz, %dx%d, EXTENSIONS: ", filter(t, th), w_win, h_win);
-                DrawStr(num_str);
-                DrawStr(glGetString(GL_EXTENSIONS));
-            break;
-        }
-
-        glPopMatrix();
-        glMatrixMode(GL_MODELVIEW);
-
-        glEnable(GL_LIGHTING);
-        //glEnable(GL_DEPTH_TEST);
-    }
-
-    count++;
-
-    glutSwapBuffers();
-}
-
-/*
-void
-Visible(int state)
-{
-    if (state == GLUT_VISIBLE) {
-        if (moving)
-            glutIdleFunc(Animate);
-    } else {
-        if (moving)
-            glutIdleFunc(NULL);
-    }
-}
-
-
-void
-timingSelect(int value)
-{
-    switch(value)
-    {
-        case 1:
-            StrMode = GL_VENDOR;
-        break;
-        case 2:
-            StrMode = GL_RENDERER;
-        break;
-        case 3:
-            StrMode = GL_VERSION;
-        break;
-        case 4:
-            StrMode = GL_EXTENSIONS;
-        break;
-    }
-}
-
-void
-menuSelect(int value)
-{
-    switch (value) {
-    case 1:
-        moving = GL_TRUE;
-        glutIdleFunc(Animate);
-        break;
-    case 2:
-        moving = GL_FALSE;
-        glutIdleFunc(NULL);
-        break;
-    case 4:
-        exit(0);
-        break;
-    }
-}
-
-int
-main(int argc, char **argv)
-{
-    GLboolean fullscreen = GL_FALSE;
-    GLint time_menu;
-
-    srand(0);
-
-        glutInit(&argc, argv);
-    if (argc > 1 && !strcmp(argv[1], "-w"))
-        fullscreen = GL_FALSE;
-
-    //glutInitDisplayMode(GLUT_RGBA | GLUT_DOUBLE | GLUT_DEPTH);
-    glutInitDisplayString("rgba double depth=24");
-    if (fullscreen) {
-      glutGameModeString("1024x768:32");
-      glutEnterGameMode();
-    } else {
-      glutInitWindowSize(320, 240);
-      glutCreateWindow("Atlantis Timing");
-    }
-    Init();
-    glutDisplayFunc(Display);
-    glutReshapeFunc(Reshape);
-    glutKeyboardFunc(Key);
-    moving = GL_TRUE;
-glutIdleFunc(Animate);
-    glutVisibilityFunc(Visible);
-
-    time_menu = glutCreateMenu(timingSelect);
-    glutAddMenuEntry("GL_VENDOR", 1);
-    glutAddMenuEntry("GL_RENDERER", 2);
-    glutAddMenuEntry("GL_VERSION", 3);
-    glutAddMenuEntry("GL_EXTENSIONS", 4);
-
-    glutCreateMenu(menuSelect);
-    glutAddMenuEntry("Start motion", 1);
-    glutAddMenuEntry("Stop motion", 2);
-    glutAddSubMenu("Timing Mode", time_menu);
-    glutAddMenuEntry("Quit", 4);
-
-    //glutAttachMenu(GLUT_RIGHT_BUTTON);
-    glutAttachMenu(GLUT_RIGHT_BUTTON);
-    glutMainLoop();
-    return 0;             // ANSI C requires main to return int.
-}
-*/
\ No newline at end of file
diff --git a/Xcode/TemplatesForXcodeLeopard/SDL OpenGL Application/atlantis/atlantis.h b/Xcode/TemplatesForXcodeLeopard/SDL OpenGL Application/atlantis/atlantis.h
deleted file mode 100644
index 6ccf2d5f0..000000000
--- a/Xcode/TemplatesForXcodeLeopard/SDL OpenGL Application/atlantis/atlantis.h	
+++ /dev/null
@@ -1,65 +0,0 @@
-/**
- * (c) Copyright 1993, 1994, Silicon Graphics, Inc.
- * ALL RIGHTS RESERVED
- * Permission to use, copy, modify, and distribute this software for
- * any purpose and without fee is hereby granted, provided that the above
- * copyright notice appear in all copies and that both the copyright notice
- * and this permission notice appear in supporting documentation, and that
- * the name of Silicon Graphics, Inc. not be used in advertising
- * or publicity pertaining to distribution of the software without specific,
- * written prior permission.
- *
- * THE MATERIAL EMBODIED ON THIS SOFTWARE IS PROVIDED TO YOU "AS-IS"
- * AND WITHOUT WARRANTY OF ANY KIND, EXPRESS, IMPLIED OR OTHERWISE,
- * INCLUDING WITHOUT LIMITATION, ANY WARRANTY OF MERCHANTABILITY OR
- * FITNESS FOR A PARTICULAR PURPOSE.  IN NO EVENT SHALL SILICON
- * GRAPHICS, INC.  BE LIABLE TO YOU OR ANYONE ELSE FOR ANY DIRECT,
- * SPECIAL, INCIDENTAL, INDIRECT OR CONSEQUENTIAL DAMAGES OF ANY
- * KIND, OR ANY DAMAGES WHATSOEVER, INCLUDING WITHOUT LIMITATION,
- * LOSS OF PROFIT, LOSS OF USE, SAVINGS OR REVENUE, OR THE CLAIMS OF
- * THIRD PARTIES, WHETHER OR NOT SILICON GRAPHICS, INC.  HAS BEEN
- * ADVISED OF THE POSSIBILITY OF SUCH LOSS, HOWEVER CAUSED AND ON
- * ANY THEORY OF LIABILITY, ARISING OUT OF OR IN CONNECTION WITH THE
- * POSSESSION, USE OR PERFORMANCE OF THIS SOFTWARE.
- *
- * US Government Users Restricted Rights
- * Use, duplication, or disclosure by the Government is subject to
- * restrictions set forth in FAR 52.227.19(c)(2) or subparagraph
- * (c)(1)(ii) of the Rights in Technical Data and Computer Software
- * clause at DFARS 252.227-7013 and/or in similar or successor
- * clauses in the FAR or the DOD or NASA FAR Supplement.
- * Unpublished-- rights reserved under the copyright laws of the
- * United States.  Contractor/manufacturer is Silicon Graphics,
- * Inc., 2011 N.  Shoreline Blvd., Mountain View, CA 94039-7311.
- *
- * OpenGL(TM) is a trademark of Silicon Graphics, Inc.
- */
-#define RAD 57.295
-#define RRAD 0.01745
-
-#define NUM_SHARKS 4
-#define SHARKSIZE 6000
-#define SHARKSPEED 100.0
-
-#define WHALESPEED 250.0
-
-typedef struct _fishRec {
-    float x, y, z, phi, theta, psi, v;
-    float xt, yt, zt;
-    float htail, vtail;
-    float dtheta;
-    int spurt, attack;
-} fishRec;
-
-extern fishRec sharks[NUM_SHARKS];
-extern fishRec momWhale;
-extern fishRec babyWhale;
-extern fishRec dolph;
-
-extern void FishTransform(fishRec *);
-extern void WhalePilot(fishRec *);
-extern void SharkPilot(fishRec *);
-extern void SharkMiss(int);
-extern void DrawWhale(fishRec *);
-extern void DrawShark(fishRec *);
-extern void DrawDolphin(fishRec *);
diff --git a/Xcode/TemplatesForXcodeLeopard/SDL OpenGL Application/atlantis/dolphin.c b/Xcode/TemplatesForXcodeLeopard/SDL OpenGL Application/atlantis/dolphin.c
deleted file mode 100644
index 9fba3ba98..000000000
--- a/Xcode/TemplatesForXcodeLeopard/SDL OpenGL Application/atlantis/dolphin.c	
+++ /dev/null
@@ -1,1934 +0,0 @@
-/**
- * (c) Copyright 1993, 1994, Silicon Graphics, Inc.
- * ALL RIGHTS RESERVED
- * Permission to use, copy, modify, and distribute this software for
- * any purpose and without fee is hereby granted, provided that the above
- * copyright notice appear in all copies and that both the copyright notice
- * and this permission notice appear in supporting documentation, and that
- * the name of Silicon Graphics, Inc. not be used in advertising
- * or publicity pertaining to distribution of the software without specific,
- * written prior permission.
- *
- * THE MATERIAL EMBODIED ON THIS SOFTWARE IS PROVIDED TO YOU "AS-IS"
- * AND WITHOUT WARRANTY OF ANY KIND, EXPRESS, IMPLIED OR OTHERWISE,
- * INCLUDING WITHOUT LIMITATION, ANY WARRANTY OF MERCHANTABILITY OR
- * FITNESS FOR A PARTICULAR PURPOSE.  IN NO EVENT SHALL SILICON
- * GRAPHICS, INC.  BE LIABLE TO YOU OR ANYONE ELSE FOR ANY DIRECT,
- * SPECIAL, INCIDENTAL, INDIRECT OR CONSEQUENTIAL DAMAGES OF ANY
- * KIND, OR ANY DAMAGES WHATSOEVER, INCLUDING WITHOUT LIMITATION,
- * LOSS OF PROFIT, LOSS OF USE, SAVINGS OR REVENUE, OR THE CLAIMS OF
- * THIRD PARTIES, WHETHER OR NOT SILICON GRAPHICS, INC.  HAS BEEN
- * ADVISED OF THE POSSIBILITY OF SUCH LOSS, HOWEVER CAUSED AND ON
- * ANY THEORY OF LIABILITY, ARISING OUT OF OR IN CONNECTION WITH THE
- * POSSESSION, USE OR PERFORMANCE OF THIS SOFTWARE.
- *
- * US Government Users Restricted Rights
- * Use, duplication, or disclosure by the Government is subject to
- * restrictions set forth in FAR 52.227.19(c)(2) or subparagraph
- * (c)(1)(ii) of the Rights in Technical Data and Computer Software
- * clause at DFARS 252.227-7013 and/or in similar or successor
- * clauses in the FAR or the DOD or NASA FAR Supplement.
- * Unpublished-- rights reserved under the copyright laws of the
- * United States.  Contractor/manufacturer is Silicon Graphics,
- * Inc., 2011 N.  Shoreline Blvd., Mountain View, CA 94039-7311.
- *
- * OpenGL(TM) is a trademark of Silicon Graphics, Inc.
- */
-#include 
-#include 
-#include "atlantis.h"
-/* *INDENT-OFF* */
-static float N001[3] = {-0.005937 ,-0.101998 ,-0.994767};
-static float N002[3] = {0.936780 ,-0.200803 ,0.286569};
-static float N003[3] = {-0.233062 ,0.972058 ,0.028007};
-static float N005[3] = {0.898117 ,0.360171 ,0.252315};
-static float N006[3] = {-0.915437 ,0.348456 ,0.201378};
-static float N007[3] = {0.602263 ,-0.777527 ,0.180920};
-static float N008[3] = {-0.906912 ,-0.412015 ,0.088061};
-static float N012[3] = {0.884408 ,-0.429417 ,-0.182821};
-static float N013[3] = {0.921121 ,0.311084 ,-0.234016};
-static float N014[3] = {0.382635 ,0.877882 ,-0.287948};
-static float N015[3] = {-0.380046 ,0.888166 ,-0.258316};
-static float N016[3] = {-0.891515 ,0.392238 ,-0.226607};
-static float N017[3] = {-0.901419 ,-0.382002 ,-0.203763};
-static float N018[3] = {-0.367225 ,-0.911091 ,-0.187243};
-static float N019[3] = {0.339539 ,-0.924846 ,-0.171388};
-static float N020[3] = {0.914706 ,-0.378617 ,-0.141290};
-static float N021[3] = {0.950662 ,0.262713 ,-0.164994};
-static float N022[3] = {0.546359 ,0.801460 ,-0.243218};
-static float N023[3] = {-0.315796 ,0.917068 ,-0.243431};
-static float N024[3] = {-0.825687 ,0.532277 ,-0.186875};
-static float N025[3] = {-0.974763 ,-0.155232 ,-0.160435};
-static float N026[3] = {-0.560596 ,-0.816658 ,-0.137119};
-static float N027[3] = {0.380210 ,-0.910817 ,-0.160786};
-static float N028[3] = {0.923772 ,-0.358322 ,-0.135093};
-static float N029[3] = {0.951202 ,0.275053 ,-0.139859};
-static float N030[3] = {0.686099 ,0.702548 ,-0.188932};
-static float N031[3] = {-0.521865 ,0.826719 ,-0.210220};
-static float N032[3] = {-0.923820 ,0.346739 ,-0.162258};
-static float N033[3] = {-0.902095 ,-0.409995 ,-0.134646};
-static float N034[3] = {-0.509115 ,-0.848498 ,-0.144404};
-static float N035[3] = {0.456469 ,-0.880293 ,-0.129305};
-static float N036[3] = {0.873401 ,-0.475489 ,-0.105266};
-static float N037[3] = {0.970825 ,0.179861 ,-0.158584};
-static float N038[3] = {0.675609 ,0.714187 ,-0.183004};
-static float N039[3] = {-0.523574 ,0.830212 ,-0.191360};
-static float N040[3] = {-0.958895 ,0.230808 ,-0.165071};
-static float N041[3] = {-0.918285 ,-0.376803 ,-0.121542};
-static float N042[3] = {-0.622467 ,-0.774167 ,-0.114888};
-static float N043[3] = {0.404497 ,-0.908807 ,-0.102231};
-static float N044[3] = {0.930538 ,-0.365155 ,-0.027588};
-static float N045[3] = {0.921920 ,0.374157 ,-0.100345};
-static float N046[3] = {0.507346 ,0.860739 ,0.041562};
-static float N047[3] = {-0.394646 ,0.918815 ,-0.005730};
-static float N048[3] = {-0.925411 ,0.373024 ,-0.066837};
-static float N049[3] = {-0.945337 ,-0.322309 ,-0.049551};
-static float N050[3] = {-0.660437 ,-0.750557 ,-0.022072};
-static float N051[3] = {0.488835 ,-0.871950 ,-0.027261};
-static float N052[3] = {0.902599 ,-0.421397 ,0.087969};
-static float N053[3] = {0.938636 ,0.322606 ,0.122020};
-static float N054[3] = {0.484605 ,0.871078 ,0.079878};
-static float N055[3] = {-0.353607 ,0.931559 ,0.084619};
-static float N056[3] = {-0.867759 ,0.478564 ,0.134054};
-static float N057[3] = {-0.951583 ,-0.296030 ,0.082794};
-static float N058[3] = {-0.672355 ,-0.730209 ,0.121384};
-static float N059[3] = {0.528336 ,-0.842452 ,0.105525};
-static float N060[3] = {0.786913 ,-0.564760 ,0.248627};
-static float N062[3] = {0.622098 ,0.765230 ,0.165584};
-static float N063[3] = {-0.631711 ,0.767816 ,0.106773};
-static float N064[3] = {-0.687886 ,0.606351 ,0.398938};
-static float N065[3] = {-0.946327 ,-0.281623 ,0.158598};
-static float N066[3] = {-0.509549 ,-0.860437 ,0.002776};
-static float N067[3] = {0.462594 ,-0.876692 ,0.131977};
-static float N071[3] = {0.000000 ,1.000000 ,0.000000};
-static float N077[3] = {-0.880770 ,0.461448 ,0.106351};
-static float N078[3] = {-0.880770 ,0.461448 ,0.106351};
-static float N079[3] = {-0.880770 ,0.461448 ,0.106351};
-static float N080[3] = {-0.880770 ,0.461448 ,0.106351};
-static float N081[3] = {-0.571197 ,0.816173 ,0.087152};
-static float N082[3] = {-0.880770 ,0.461448 ,0.106351};
-static float N083[3] = {-0.571197 ,0.816173 ,0.087152};
-static float N084[3] = {-0.571197 ,0.816173 ,0.087152};
-static float N085[3] = {-0.880770 ,0.461448 ,0.106351};
-static float N086[3] = {-0.571197 ,0.816173 ,0.087152};
-static float N087[3] = {-0.880770 ,0.461448 ,0.106351};
-static float N088[3] = {-0.880770 ,0.461448 ,0.106351};
-static float N089[3] = {-0.880770 ,0.461448 ,0.106351};
-static float N090[3] = {-0.880770 ,0.461448 ,0.106351};
-static float N091[3] = {0.000000 ,1.000000 ,0.000000};
-static float N092[3] = {0.000000 ,1.000000 ,0.000000};
-static float N093[3] = {0.000000 ,1.000000 ,0.000000};
-static float N094[3] = {1.000000 ,0.000000 ,0.000000};
-static float N095[3] = {-1.000000 ,0.000000 ,0.000000};
-static float N097[3] = {-0.697296 ,0.702881 ,0.140491};
-static float N098[3] = {0.918864 ,0.340821 ,0.198819};
-static float N099[3] = {-0.932737 ,0.201195 ,0.299202};
-static float N100[3] = {0.029517 ,0.981679 ,0.188244};
-static float N102[3] = {0.813521 ,-0.204936 ,0.544229};
-static float N110[3] = {-0.781480 ,-0.384779 ,0.491155};
-static float N111[3] = {-0.722243 ,0.384927 ,0.574627};
-static float N112[3] = {-0.752278 ,0.502679 ,0.425901};
-static float N113[3] = {0.547257 ,0.367910 ,0.751766};
-static float N114[3] = {0.725949 ,-0.232568 ,0.647233};
-static float N115[3] = {-0.747182 ,-0.660786 ,0.071280};
-static float N116[3] = {0.931519 ,0.200748 ,0.303270};
-static float N117[3] = {-0.828928 ,0.313757 ,0.463071};
-static float N118[3] = {0.902554 ,-0.370967 ,0.218587};
-static float N119[3] = {-0.879257 ,-0.441851 ,0.177973};
-static float N120[3] = {0.642327 ,0.611901 ,0.461512};
-static float N121[3] = {0.964817 ,-0.202322 ,0.167910};
-static float N122[3] = {0.000000 ,1.000000 ,0.000000};
-static float P001[3] = {5.68, -300.95, 1324.70};
-static float P002[3] = {338.69, -219.63, 9677.03};
-static float P003[3] = {12.18, 474.59, 9138.14};
-static float P005[3] = {487.51, 198.05, 9350.78};
-static float P006[3] = {-457.61, 68.74, 9427.85};
-static float P007[3] = {156.52, -266.72, 10311.68};
-static float P008[3] = {-185.56, -266.51, 10310.47};
-static float P009[3] = {124.39, -261.46, 1942.34};
-static float P010[3] = {-130.05, -261.46, 1946.03};
-static float P011[3] = {141.07, -320.11, 1239.38};
-static float P012[3] = {156.48, -360.12, 2073.41};
-static float P013[3] = {162.00, -175.88, 2064.44};
-static float P014[3] = {88.16, -87.72, 2064.02};
-static float P015[3] = {-65.21, -96.13, 2064.02};
-static float P016[3] = {-156.48, -180.96, 2064.44};
-static float P017[3] = {-162.00, -368.93, 2082.39};
-static float P018[3] = {-88.16, -439.22, 2082.39};
-static float P019[3] = {65.21, -440.32, 2083.39};
-static float P020[3] = {246.87, -356.02, 2576.95};
-static float P021[3] = {253.17, -111.15, 2567.15};
-static float P022[3] = {132.34, 51.41, 2559.84};
-static float P023[3] = {-97.88, 40.44, 2567.15};
-static float P024[3] = {-222.97, -117.49, 2567.15};
-static float P025[3] = {-252.22, -371.53, 2569.92};
-static float P026[3] = {-108.44, -518.19, 2586.75};
-static float P027[3] = {97.88, -524.79, 2586.75};
-static float P028[3] = {370.03, -421.19, 3419.70};
-static float P029[3] = {351.15, -16.98, 3423.17};
-static float P030[3] = {200.66, 248.46, 3430.37};
-static float P031[3] = {-148.42, 235.02, 3417.91};
-static float P032[3] = {-360.21, -30.27, 3416.84};
-static float P033[3] = {-357.90, -414.89, 3407.04};
-static float P034[3] = {-148.88, -631.35, 3409.90};
-static float P035[3] = {156.38, -632.59, 3419.70};
-static float P036[3] = {462.61, -469.21, 4431.51};
-static float P037[3] = {466.60, 102.25, 4434.98};
-static float P038[3] = {243.05, 474.34, 4562.02};
-static float P039[3] = {-191.23, 474.40, 4554.42};
-static float P040[3] = {-476.12, 111.05, 4451.11};
-static float P041[3] = {-473.36, -470.74, 4444.78};
-static float P042[3] = {-266.95, -748.41, 4447.78};
-static float P043[3] = {211.14, -749.91, 4429.73};
-static float P044[3] = {680.57, -370.27, 5943.46};
-static float P045[3] = {834.01, 363.09, 6360.63};
-static float P046[3] = {371.29, 804.51, 6486.26};
-static float P047[3] = {-291.43, 797.22, 6494.28};
-static float P048[3] = {-784.13, 370.75, 6378.01};
-static float P049[3] = {-743.29, -325.82, 5943.46};
-static float P050[3] = {-383.24, -804.77, 5943.46};
-static float P051[3] = {283.47, -846.09, 5943.46};
-static float iP001[3] = {5.68, -300.95, 1324.70};
-static float iP009[3] = {124.39, -261.46, 1942.34};
-static float iP010[3] = {-130.05, -261.46, 1946.03};
-static float iP011[3] = {141.07, -320.11, 1239.38};
-static float iP012[3] = {156.48, -360.12, 2073.41};
-static float iP013[3] = {162.00, -175.88, 2064.44};
-static float iP014[3] = {88.16, -87.72, 2064.02};
-static float iP015[3] = {-65.21, -96.13, 2064.02};
-static float iP016[3] = {-156.48, -180.96, 2064.44};
-static float iP017[3] = {-162.00, -368.93, 2082.39};
-static float iP018[3] = {-88.16, -439.22, 2082.39};
-static float iP019[3] = {65.21, -440.32, 2083.39};
-static float iP020[3] = {246.87, -356.02, 2576.95};
-static float iP021[3] = {253.17, -111.15, 2567.15};
-static float iP022[3] = {132.34, 51.41, 2559.84};
-static float iP023[3] = {-97.88, 40.44, 2567.15};
-static float iP024[3] = {-222.97, -117.49, 2567.15};
-static float iP025[3] = {-252.22, -371.53, 2569.92};
-static float iP026[3] = {-108.44, -518.19, 2586.75};
-static float iP027[3] = {97.88, -524.79, 2586.75};
-static float iP028[3] = {370.03, -421.19, 3419.70};
-static float iP029[3] = {351.15, -16.98, 3423.17};
-static float iP030[3] = {200.66, 248.46, 3430.37};
-static float iP031[3] = {-148.42, 235.02, 3417.91};
-static float iP032[3] = {-360.21, -30.27, 3416.84};
-static float iP033[3] = {-357.90, -414.89, 3407.04};
-static float iP034[3] = {-148.88, -631.35, 3409.90};
-static float iP035[3] = {156.38, -632.59, 3419.70};
-static float iP036[3] = {462.61, -469.21, 4431.51};
-static float iP037[3] = {466.60, 102.25, 4434.98};
-static float iP038[3] = {243.05, 474.34, 4562.02};
-static float iP039[3] = {-191.23, 474.40, 4554.42};
-static float iP040[3] = {-476.12, 111.05, 4451.11};
-static float iP041[3] = {-473.36, -470.74, 4444.78};
-static float iP042[3] = {-266.95, -748.41, 4447.78};
-static float iP043[3] = {211.14, -749.91, 4429.73};
-static float iP044[3] = {680.57, -370.27, 5943.46};
-static float iP045[3] = {834.01, 363.09, 6360.63};
-static float iP046[3] = {371.29, 804.51, 6486.26};
-static float iP047[3] = {-291.43, 797.22, 6494.28};
-static float iP048[3] = {-784.13, 370.75, 6378.01};
-static float iP049[3] = {-743.29, -325.82, 5943.46};
-static float iP050[3] = {-383.24, -804.77, 5943.46};
-static float iP051[3] = {283.47, -846.09, 5943.46};
-static float P052[3] = {599.09, -300.15, 7894.03};
-static float P053[3] = {735.48, 306.26, 7911.92};
-static float P054[3] = {246.22, 558.53, 8460.50};
-static float P055[3] = {-230.41, 559.84, 8473.23};
-static float P056[3] = {-698.66, 320.83, 7902.59};
-static float P057[3] = {-643.29, -299.16, 7902.59};
-static float P058[3] = {-341.47, -719.30, 7902.59};
-static float P059[3] = {252.57, -756.12, 7902.59};
-static float P060[3] = {458.39, -265.31, 9355.44};
-static float P062[3] = {224.04, 338.75, 9450.30};
-static float P063[3] = {-165.71, 341.04, 9462.35};
-static float P064[3] = {-298.11, 110.13, 10180.37};
-static float P065[3] = {-473.99, -219.71, 9355.44};
-static float P066[3] = {-211.97, -479.87, 9355.44};
-static float P067[3] = {192.86, -491.45, 9348.73};
-static float P068[3] = {-136.29, -319.84, 1228.73};
-static float P069[3] = {1111.17, -314.14, 1314.19};
-static float P070[3] = {-1167.34, -321.61, 1319.45};
-static float P071[3] = {1404.86, -306.66, 1235.45};
-static float P072[3] = {-1409.73, -314.14, 1247.66};
-static float P073[3] = {1254.01, -296.87, 1544.58};
-static float P074[3] = {-1262.09, -291.70, 1504.26};
-static float P075[3] = {965.71, -269.26, 1742.65};
-static float P076[3] = {-900.97, -276.74, 1726.07};
-static float iP068[3] = {-136.29, -319.84, 1228.73};
-static float iP069[3] = {1111.17, -314.14, 1314.19};
-static float iP070[3] = {-1167.34, -321.61, 1319.45};
-static float iP071[3] = {1404.86, -306.66, 1235.45};
-static float iP072[3] = {-1409.73, -314.14, 1247.66};
-static float iP073[3] = {1254.01, -296.87, 1544.58};
-static float iP074[3] = {-1262.09, -291.70, 1504.26};
-static float iP075[3] = {965.71, -269.26, 1742.65};
-static float iP076[3] = {-900.97, -276.74, 1726.07};
-static float P077[3] = {1058.00, -448.81, 8194.66};
-static float P078[3] = {-1016.51, -456.43, 8190.62};
-static float P079[3] = {-1515.96, -676.45, 7754.93};
-static float P080[3] = {1856.75, -830.34, 7296.56};
-static float P081[3] = {1472.16, -497.38, 7399.68};
-static float P082[3] = {-1775.26, -829.51, 7298.46};
-static float P083[3] = {911.09, -252.51, 7510.99};
-static float P084[3] = {-1451.94, -495.62, 7384.30};
-static float P085[3] = {1598.75, -669.26, 7769.90};
-static float P086[3] = {-836.53, -250.08, 7463.25};
-static float P087[3] = {722.87, -158.18, 8006.41};
-static float P088[3] = {-688.86, -162.28, 7993.89};
-static float P089[3] = {-626.92, -185.30, 8364.98};
-static float P090[3] = {647.72, -189.46, 8354.99};
-static float P091[3] = {0.00, 835.01, 5555.62};
-static float P092[3] = {0.00, 1350.18, 5220.86};
-static float P093[3] = {0.00, 1422.94, 5285.27};
-static float P094[3] = {0.00, 1296.75, 5650.19};
-static float P095[3] = {0.00, 795.63, 6493.88};
-static float iP091[3] = {0.00, 835.01, 5555.62};
-static float iP092[3] = {0.00, 1350.18, 5220.86};
-static float iP093[3] = {0.00, 1422.94, 5285.27};
-static float iP094[3] = {0.00, 1296.75, 5650.19};
-static float iP095[3] = {0.00, 795.63, 6493.88};
-static float P097[3] = {-194.91, -357.14, 10313.32};
-static float P098[3] = {135.35, -357.66, 10307.94};
-static float iP097[3] = {-194.91, -357.14, 10313.32};
-static float iP098[3] = {135.35, -357.66, 10307.94};
-static float P099[3] = {-380.53, -221.14, 9677.98};
-static float P100[3] = {0.00, 412.99, 9629.33};
-static float P102[3] = {59.51, -412.55, 10677.58};
-static float iP102[3] = {59.51, -412.55, 10677.58};
-static float P103[3] = {6.50, 484.74, 9009.94};
-static float P105[3] = {-41.86, 476.51, 9078.17};
-static float P108[3] = {49.20, 476.83, 9078.24};
-static float P110[3] = {-187.62, -410.04, 10674.12};
-static float iP110[3] = {-187.62, -410.04, 10674.12};
-static float P111[3] = {-184.25, -318.70, 10723.88};
-static float iP111[3] = {-184.25, -318.70, 10723.88};
-static float P112[3] = {-179.61, -142.81, 10670.26};
-static float P113[3] = {57.43, -147.94, 10675.26};
-static float P114[3] = {54.06, -218.90, 10712.44};
-static float P115[3] = {-186.35, -212.09, 10713.76};
-static float P116[3] = {205.90, -84.61, 10275.97};
-static float P117[3] = {-230.96, -83.26, 10280.09};
-static float iP118[3] = {216.78, -509.17, 10098.94};
-static float iP119[3] = {-313.21, -510.79, 10102.62};
-static float P118[3] = {216.78, -509.17, 10098.94};
-static float P119[3] = {-313.21, -510.79, 10102.62};
-static float P120[3] = {217.95, 96.34, 10161.62};
-static float P121[3] = {71.99, -319.74, 10717.70};
-static float iP121[3] = {71.99, -319.74, 10717.70};
-static float P122[3] = {0.00, 602.74, 5375.84};
-static float iP122[3] = {0.00, 602.74, 5375.84};
-static float P123[3] = {-448.94, -203.14, 9499.60};
-static float P124[3] = {-442.64, -185.20, 9528.07};
-static float P125[3] = {-441.07, -148.05, 9528.07};
-static float P126[3] = {-443.43, -128.84, 9499.60};
-static float P127[3] = {-456.87, -146.78, 9466.67};
-static float P128[3] = {-453.68, -183.93, 9466.67};
-static float P129[3] = {428.43, -124.08, 9503.03};
-static float P130[3] = {419.73, -142.14, 9534.56};
-static float P131[3] = {419.92, -179.96, 9534.56};
-static float P132[3] = {431.20, -199.73, 9505.26};
-static float P133[3] = {442.28, -181.67, 9475.96};
-static float P134[3] = {442.08, -143.84, 9475.96};
-/* *INDENT-ON* */
-
-void
-Dolphin001(void)
-{
-    glNormal3fv(N071);
-    glBegin(GL_POLYGON);
-    glVertex3fv(P001);
-    glVertex3fv(P068);
-    glVertex3fv(P010);
-    glEnd();
-    glBegin(GL_POLYGON);
-    glVertex3fv(P068);
-    glVertex3fv(P076);
-    glVertex3fv(P010);
-    glEnd();
-    glBegin(GL_POLYGON);
-    glVertex3fv(P068);
-    glVertex3fv(P070);
-    glVertex3fv(P076);
-    glEnd();
-    glBegin(GL_POLYGON);
-    glVertex3fv(P076);
-    glVertex3fv(P070);
-    glVertex3fv(P074);
-    glEnd();
-    glBegin(GL_POLYGON);
-    glVertex3fv(P070);
-    glVertex3fv(P072);
-    glVertex3fv(P074);
-    glEnd();
-    glNormal3fv(N119);
-    glBegin(GL_POLYGON);
-    glVertex3fv(P072);
-    glVertex3fv(P070);
-    glVertex3fv(P074);
-    glEnd();
-    glBegin(GL_POLYGON);
-    glVertex3fv(P074);
-    glVertex3fv(P070);
-    glVertex3fv(P076);
-    glEnd();
-    glBegin(GL_POLYGON);
-    glVertex3fv(P070);
-    glVertex3fv(P068);
-    glVertex3fv(P076);
-    glEnd();
-    glBegin(GL_POLYGON);
-    glVertex3fv(P076);
-    glVertex3fv(P068);
-    glVertex3fv(P010);
-    glEnd();
-    glBegin(GL_POLYGON);
-    glVertex3fv(P068);
-    glVertex3fv(P001);
-    glVertex3fv(P010);
-    glEnd();
-}
-
-void
-Dolphin002(void)
-{
-    glNormal3fv(N071);
-    glBegin(GL_POLYGON);
-    glVertex3fv(P011);
-    glVertex3fv(P001);
-    glVertex3fv(P009);
-    glEnd();
-    glBegin(GL_POLYGON);
-    glVertex3fv(P075);
-    glVertex3fv(P011);
-    glVertex3fv(P009);
-    glEnd();
-    glBegin(GL_POLYGON);
-    glVertex3fv(P069);
-    glVertex3fv(P011);
-    glVertex3fv(P075);
-    glEnd();
-    glBegin(GL_POLYGON);
-    glVertex3fv(P069);
-    glVertex3fv(P075);
-    glVertex3fv(P073);
-    glEnd();
-    glBegin(GL_POLYGON);
-    glVertex3fv(P071);
-    glVertex3fv(P069);
-    glVertex3fv(P073);
-    glEnd();
-    glNormal3fv(N119);
-    glBegin(GL_POLYGON);
-    glVertex3fv(P001);
-    glVertex3fv(P011);
-    glVertex3fv(P009);
-    glEnd();
-    glBegin(GL_POLYGON);
-    glVertex3fv(P009);
-    glVertex3fv(P011);
-    glVertex3fv(P075);
-    glEnd();
-    glBegin(GL_POLYGON);
-    glVertex3fv(P011);
-    glVertex3fv(P069);
-    glVertex3fv(P075);
-    glEnd();
-    glBegin(GL_POLYGON);
-    glVertex3fv(P069);
-    glVertex3fv(P073);
-    glVertex3fv(P075);
-    glEnd();
-    glBegin(GL_POLYGON);
-    glVertex3fv(P069);
-    glVertex3fv(P071);
-    glVertex3fv(P073);
-    glEnd();
-}
-
-void
-Dolphin003(void)
-{
-    glBegin(GL_POLYGON);
-    glNormal3fv(N018);
-    glVertex3fv(P018);
-    glNormal3fv(N001);
-    glVertex3fv(P001);
-    glNormal3fv(N019);
-    glVertex3fv(P019);
-    glEnd();
-    glBegin(GL_POLYGON);
-    glNormal3fv(N019);
-    glVertex3fv(P019);
-    glNormal3fv(N001);
-    glVertex3fv(P001);
-    glNormal3fv(N012);
-    glVertex3fv(P012);
-    glEnd();
-    glBegin(GL_POLYGON);
-    glNormal3fv(N017);
-    glVertex3fv(P017);
-    glNormal3fv(N001);
-    glVertex3fv(P001);
-    glNormal3fv(N018);
-    glVertex3fv(P018);
-    glEnd();
-    glBegin(GL_POLYGON);
-    glNormal3fv(N001);
-    glVertex3fv(P001);
-    glNormal3fv(N017);
-    glVertex3fv(P017);
-    glNormal3fv(N016);
-    glVertex3fv(P016);
-    glEnd();
-    glBegin(GL_POLYGON);
-    glNormal3fv(N001);
-    glVertex3fv(P001);
-    glNormal3fv(N013);
-    glVertex3fv(P013);
-    glNormal3fv(N012);
-    glVertex3fv(P012);
-    glEnd();
-    glBegin(GL_POLYGON);
-    glNormal3fv(N001);
-    glVertex3fv(P001);
-    glNormal3fv(N016);
-    glVertex3fv(P016);
-    glNormal3fv(N015);
-    glVertex3fv(P015);
-    glEnd();
-    glBegin(GL_POLYGON);
-    glNormal3fv(N001);
-    glVertex3fv(P001);
-    glNormal3fv(N014);
-    glVertex3fv(P014);
-    glNormal3fv(N013);
-    glVertex3fv(P013);
-    glEnd();
-    glBegin(GL_POLYGON);
-    glNormal3fv(N001);
-    glVertex3fv(P001);
-    glNormal3fv(N015);
-    glVertex3fv(P015);
-    glNormal3fv(N014);
-    glVertex3fv(P014);
-    glEnd();
-}
-
-void
-Dolphin004(void)
-{
-    glBegin(GL_POLYGON);
-    glNormal3fv(N014);
-    glVertex3fv(P014);
-    glNormal3fv(N015);
-    glVertex3fv(P015);
-    glNormal3fv(N023);
-    glVertex3fv(P023);
-    glNormal3fv(N022);
-    glVertex3fv(P022);
-    glEnd();
-    glBegin(GL_POLYGON);
-    glNormal3fv(N015);
-    glVertex3fv(P015);
-    glNormal3fv(N016);
-    glVertex3fv(P016);
-    glNormal3fv(N024);
-    glVertex3fv(P024);
-    glNormal3fv(N023);
-    glVertex3fv(P023);
-    glEnd();
-    glBegin(GL_POLYGON);
-    glNormal3fv(N016);
-    glVertex3fv(P016);
-    glNormal3fv(N017);
-    glVertex3fv(P017);
-    glNormal3fv(N025);
-    glVertex3fv(P025);
-    glNormal3fv(N024);
-    glVertex3fv(P024);
-    glEnd();
-    glBegin(GL_POLYGON);
-    glNormal3fv(N017);
-    glVertex3fv(P017);
-    glNormal3fv(N018);
-    glVertex3fv(P018);
-    glNormal3fv(N026);
-    glVertex3fv(P026);
-    glNormal3fv(N025);
-    glVertex3fv(P025);
-    glEnd();
-    glBegin(GL_POLYGON);
-    glNormal3fv(N013);
-    glVertex3fv(P013);
-    glNormal3fv(N014);
-    glVertex3fv(P014);
-    glNormal3fv(N022);
-    glVertex3fv(P022);
-    glNormal3fv(N021);
-    glVertex3fv(P021);
-    glEnd();
-    glBegin(GL_POLYGON);
-    glNormal3fv(N012);
-    glVertex3fv(P012);
-    glNormal3fv(N013);
-    glVertex3fv(P013);
-    glNormal3fv(N021);
-    glVertex3fv(P021);
-    glNormal3fv(N020);
-    glVertex3fv(P020);
-    glEnd();
-    glBegin(GL_POLYGON);
-    glNormal3fv(N018);
-    glVertex3fv(P018);
-    glNormal3fv(N019);
-    glVertex3fv(P019);
-    glNormal3fv(N027);
-    glVertex3fv(P027);
-    glNormal3fv(N026);
-    glVertex3fv(P026);
-    glEnd();
-    glBegin(GL_POLYGON);
-    glNormal3fv(N019);
-    glVertex3fv(P019);
-    glNormal3fv(N012);
-    glVertex3fv(P012);
-    glNormal3fv(N020);
-    glVertex3fv(P020);
-    glNormal3fv(N027);
-    glVertex3fv(P027);
-    glEnd();
-}
-
-void
-Dolphin005(void)
-{
-    glBegin(GL_POLYGON);
-    glNormal3fv(N022);
-    glVertex3fv(P022);
-    glNormal3fv(N023);
-    glVertex3fv(P023);
-    glNormal3fv(N031);
-    glVertex3fv(P031);
-    glNormal3fv(N030);
-    glVertex3fv(P030);
-    glEnd();
-    glBegin(GL_POLYGON);
-    glNormal3fv(N021);
-    glVertex3fv(P021);
-    glNormal3fv(N022);
-    glVertex3fv(P022);
-    glNormal3fv(N030);
-    glVertex3fv(P030);
-    glEnd();
-    glBegin(GL_POLYGON);
-    glNormal3fv(N021);
-    glVertex3fv(P021);
-    glNormal3fv(N030);
-    glVertex3fv(P030);
-    glNormal3fv(N029);
-    glVertex3fv(P029);
-    glEnd();
-    glBegin(GL_POLYGON);
-    glNormal3fv(N023);
-    glVertex3fv(P023);
-    glNormal3fv(N024);
-    glVertex3fv(P024);
-    glNormal3fv(N031);
-    glVertex3fv(P031);
-    glEnd();
-    glBegin(GL_POLYGON);
-    glNormal3fv(N024);
-    glVertex3fv(P024);
-    glNormal3fv(N032);
-    glVertex3fv(P032);
-    glNormal3fv(N031);
-    glVertex3fv(P031);
-    glEnd();
-    glBegin(GL_POLYGON);
-    glNormal3fv(N024);
-    glVertex3fv(P024);
-    glNormal3fv(N025);
-    glVertex3fv(P025);
-    glNormal3fv(N032);
-    glVertex3fv(P032);
-    glEnd();
-    glBegin(GL_POLYGON);
-    glNormal3fv(N025);
-    glVertex3fv(P025);
-    glNormal3fv(N033);
-    glVertex3fv(P033);
-    glNormal3fv(N032);
-    glVertex3fv(P032);
-    glEnd();
-    glBegin(GL_POLYGON);
-    glNormal3fv(N020);
-    glVertex3fv(P020);
-    glNormal3fv(N021);
-    glVertex3fv(P021);
-    glNormal3fv(N029);
-    glVertex3fv(P029);
-    glEnd();
-    glBegin(GL_POLYGON);
-    glNormal3fv(N020);
-    glVertex3fv(P020);
-    glNormal3fv(N029);
-    glVertex3fv(P029);
-    glNormal3fv(N028);
-    glVertex3fv(P028);
-    glEnd();
-    glBegin(GL_POLYGON);
-    glNormal3fv(N027);
-    glVertex3fv(P027);
-    glNormal3fv(N020);
-    glVertex3fv(P020);
-    glNormal3fv(N028);
-    glVertex3fv(P028);
-    glEnd();
-    glBegin(GL_POLYGON);
-    glNormal3fv(N027);
-    glVertex3fv(P027);
-    glNormal3fv(N028);
-    glVertex3fv(P028);
-    glNormal3fv(N035);
-    glVertex3fv(P035);
-    glEnd();
-    glBegin(GL_POLYGON);
-    glNormal3fv(N025);
-    glVertex3fv(P025);
-    glNormal3fv(N026);
-    glVertex3fv(P026);
-    glNormal3fv(N033);
-    glVertex3fv(P033);
-    glEnd();
-    glBegin(GL_POLYGON);
-    glNormal3fv(N033);
-    glVertex3fv(P033);
-    glNormal3fv(N026);
-    glVertex3fv(P026);
-    glNormal3fv(N034);
-    glVertex3fv(P034);
-    glEnd();
-    glBegin(GL_POLYGON);
-    glNormal3fv(N026);
-    glVertex3fv(P026);
-    glNormal3fv(N027);
-    glVertex3fv(P027);
-    glNormal3fv(N035);
-    glVertex3fv(P035);
-    glNormal3fv(N034);
-    glVertex3fv(P034);
-    glEnd();
-}
-
-void
-Dolphin006(void)
-{
-    glBegin(GL_POLYGON);
-    glNormal3fv(N092);
-    glVertex3fv(P092);
-    glNormal3fv(N093);
-    glVertex3fv(P093);
-    glNormal3fv(N094);
-    glVertex3fv(P094);
-    glEnd();
-    glBegin(GL_POLYGON);
-    glNormal3fv(N093);
-    glVertex3fv(P093);
-    glNormal3fv(N092);
-    glVertex3fv(P092);
-    glNormal3fv(N094);
-    glVertex3fv(P094);
-    glEnd();
-    glBegin(GL_POLYGON);
-    glNormal3fv(N092);
-    glVertex3fv(P092);
-    glNormal3fv(N091);
-    glVertex3fv(P091);
-    glNormal3fv(N095);
-    glVertex3fv(P095);
-    glNormal3fv(N094);
-    glVertex3fv(P094);
-    glEnd();
-    glBegin(GL_POLYGON);
-    glNormal3fv(N091);
-    glVertex3fv(P091);
-    glNormal3fv(N092);
-    glVertex3fv(P092);
-    glNormal3fv(N094);
-    glVertex3fv(P094);
-    glNormal3fv(N095);
-    glVertex3fv(P095);
-    glEnd();
-    glBegin(GL_POLYGON);
-    glNormal3fv(N122);
-    glVertex3fv(P122);
-    glNormal3fv(N095);
-    glVertex3fv(P095);
-    glNormal3fv(N091);
-    glVertex3fv(P091);
-    glEnd();
-    glBegin(GL_POLYGON);
-    glNormal3fv(N122);
-    glVertex3fv(P122);
-    glNormal3fv(N091);
-    glVertex3fv(P091);
-    glNormal3fv(N095);
-    glVertex3fv(P095);
-    glEnd();
-}
-
-void
-Dolphin007(void)
-{
-    glBegin(GL_POLYGON);
-    glNormal3fv(N030);
-    glVertex3fv(P030);
-    glNormal3fv(N031);
-    glVertex3fv(P031);
-    glNormal3fv(N039);
-    glVertex3fv(P039);
-    glNormal3fv(N038);
-    glVertex3fv(P038);
-    glEnd();
-    glBegin(GL_POLYGON);
-    glNormal3fv(N029);
-    glVertex3fv(P029);
-    glNormal3fv(N030);
-    glVertex3fv(P030);
-    glNormal3fv(N038);
-    glVertex3fv(P038);
-    glEnd();
-    glBegin(GL_POLYGON);
-    glNormal3fv(N029);
-    glVertex3fv(P029);
-    glNormal3fv(N038);
-    glVertex3fv(P038);
-    glNormal3fv(N037);
-    glVertex3fv(P037);
-    glEnd();
-    glBegin(GL_POLYGON);
-    glNormal3fv(N028);
-    glVertex3fv(P028);
-    glNormal3fv(N029);
-    glVertex3fv(P029);
-    glNormal3fv(N037);
-    glVertex3fv(P037);
-    glEnd();
-    glBegin(GL_POLYGON);
-    glNormal3fv(N028);
-    glVertex3fv(P028);
-    glNormal3fv(N037);
-    glVertex3fv(P037);
-    glNormal3fv(N036);
-    glVertex3fv(P036);
-    glEnd();
-    glBegin(GL_POLYGON);
-    glNormal3fv(N035);
-    glVertex3fv(P035);
-    glNormal3fv(N028);
-    glVertex3fv(P028);
-    glNormal3fv(N036);
-    glVertex3fv(P036);
-    glEnd();
-    glBegin(GL_POLYGON);
-    glNormal3fv(N035);
-    glVertex3fv(P035);
-    glNormal3fv(N036);
-    glVertex3fv(P036);
-    glNormal3fv(N043);
-    glVertex3fv(P043);
-    glEnd();
-    glBegin(GL_POLYGON);
-    glNormal3fv(N034);
-    glVertex3fv(P034);
-    glNormal3fv(N035);
-    glVertex3fv(P035);
-    glNormal3fv(N043);
-    glVertex3fv(P043);
-    glNormal3fv(N042);
-    glVertex3fv(P042);
-    glEnd();
-    glBegin(GL_POLYGON);
-    glNormal3fv(N033);
-    glVertex3fv(P033);
-    glNormal3fv(N034);
-    glVertex3fv(P034);
-    glNormal3fv(N042);
-    glVertex3fv(P042);
-    glEnd();
-    glBegin(GL_POLYGON);
-    glNormal3fv(N033);
-    glVertex3fv(P033);
-    glNormal3fv(N042);
-    glVertex3fv(P042);
-    glNormal3fv(N041);
-    glVertex3fv(P041);
-    glEnd();
-    glBegin(GL_POLYGON);
-    glNormal3fv(N031);
-    glVertex3fv(P031);
-    glNormal3fv(N032);
-    glVertex3fv(P032);
-    glNormal3fv(N039);
-    glVertex3fv(P039);
-    glEnd();
-    glBegin(GL_POLYGON);
-    glNormal3fv(N039);
-    glVertex3fv(P039);
-    glNormal3fv(N032);
-    glVertex3fv(P032);
-    glNormal3fv(N040);
-    glVertex3fv(P040);
-    glEnd();
-    glBegin(GL_POLYGON);
-    glNormal3fv(N032);
-    glVertex3fv(P032);
-    glNormal3fv(N033);
-    glVertex3fv(P033);
-    glNormal3fv(N040);
-    glVertex3fv(P040);
-    glEnd();
-    glBegin(GL_POLYGON);
-    glNormal3fv(N040);
-    glVertex3fv(P040);
-    glNormal3fv(N033);
-    glVertex3fv(P033);
-    glNormal3fv(N041);
-    glVertex3fv(P041);
-    glEnd();
-}
-
-void
-Dolphin008(void)
-{
-    glBegin(GL_POLYGON);
-    glNormal3fv(N042);
-    glVertex3fv(P042);
-    glNormal3fv(N043);
-    glVertex3fv(P043);
-    glNormal3fv(N051);
-    glVertex3fv(P051);
-    glNormal3fv(N050);
-    glVertex3fv(P050);
-    glEnd();
-    glBegin(GL_POLYGON);
-    glNormal3fv(N043);
-    glVertex3fv(P043);
-    glNormal3fv(N036);
-    glVertex3fv(P036);
-    glNormal3fv(N051);
-    glVertex3fv(P051);
-    glEnd();
-    glBegin(GL_POLYGON);
-    glNormal3fv(N051);
-    glVertex3fv(P051);
-    glNormal3fv(N036);
-    glVertex3fv(P036);
-    glNormal3fv(N044);
-    glVertex3fv(P044);
-    glEnd();
-    glBegin(GL_POLYGON);
-    glNormal3fv(N041);
-    glVertex3fv(P041);
-    glNormal3fv(N042);
-    glVertex3fv(P042);
-    glNormal3fv(N050);
-    glVertex3fv(P050);
-    glEnd();
-    glBegin(GL_POLYGON);
-    glNormal3fv(N041);
-    glVertex3fv(P041);
-    glNormal3fv(N050);
-    glVertex3fv(P050);
-    glNormal3fv(N049);
-    glVertex3fv(P049);
-    glEnd();
-    glBegin(GL_POLYGON);
-    glNormal3fv(N036);
-    glVertex3fv(P036);
-    glNormal3fv(N037);
-    glVertex3fv(P037);
-    glNormal3fv(N044);
-    glVertex3fv(P044);
-    glEnd();
-    glBegin(GL_POLYGON);
-    glNormal3fv(N044);
-    glVertex3fv(P044);
-    glNormal3fv(N037);
-    glVertex3fv(P037);
-    glNormal3fv(N045);
-    glVertex3fv(P045);
-    glEnd();
-    glBegin(GL_POLYGON);
-    glNormal3fv(N040);
-    glVertex3fv(P040);
-    glNormal3fv(N041);
-    glVertex3fv(P041);
-    glNormal3fv(N049);
-    glVertex3fv(P049);
-    glEnd();
-    glBegin(GL_POLYGON);
-    glNormal3fv(N040);
-    glVertex3fv(P040);
-    glNormal3fv(N049);
-    glVertex3fv(P049);
-    glNormal3fv(N048);
-    glVertex3fv(P048);
-    glEnd();
-    glBegin(GL_POLYGON);
-    glNormal3fv(N039);
-    glVertex3fv(P039);
-    glNormal3fv(N040);
-    glVertex3fv(P040);
-    glNormal3fv(N048);
-    glVertex3fv(P048);
-    glEnd();
-    glBegin(GL_POLYGON);
-    glNormal3fv(N039);
-    glVertex3fv(P039);
-    glNormal3fv(N048);
-    glVertex3fv(P048);
-    glNormal3fv(N047);
-    glVertex3fv(P047);
-    glEnd();
-    glBegin(GL_POLYGON);
-    glNormal3fv(N037);
-    glVertex3fv(P037);
-    glNormal3fv(N038);
-    glVertex3fv(P038);
-    glNormal3fv(N045);
-    glVertex3fv(P045);
-    glEnd();
-    glBegin(GL_POLYGON);
-    glNormal3fv(N038);
-    glVertex3fv(P038);
-    glNormal3fv(N046);
-    glVertex3fv(P046);
-    glNormal3fv(N045);
-    glVertex3fv(P045);
-    glEnd();
-    glBegin(GL_POLYGON);
-    glNormal3fv(N038);
-    glVertex3fv(P038);
-    glNormal3fv(N039);
-    glVertex3fv(P039);
-    glNormal3fv(N047);
-    glVertex3fv(P047);
-    glNormal3fv(N046);
-    glVertex3fv(P046);
-    glEnd();
-}
-
-void
-Dolphin009(void)
-{
-    glBegin(GL_POLYGON);
-    glNormal3fv(N050);
-    glVertex3fv(P050);
-    glNormal3fv(N051);
-    glVertex3fv(P051);
-    glNormal3fv(N059);
-    glVertex3fv(P059);
-    glNormal3fv(N058);
-    glVertex3fv(P058);
-    glEnd();
-    glBegin(GL_POLYGON);
-    glNormal3fv(N051);
-    glVertex3fv(P051);
-    glNormal3fv(N044);
-    glVertex3fv(P044);
-    glNormal3fv(N059);
-    glVertex3fv(P059);
-    glEnd();
-    glBegin(GL_POLYGON);
-    glNormal3fv(N059);
-    glVertex3fv(P059);
-    glNormal3fv(N044);
-    glVertex3fv(P044);
-    glNormal3fv(N052);
-    glVertex3fv(P052);
-    glEnd();
-    glBegin(GL_POLYGON);
-    glNormal3fv(N044);
-    glVertex3fv(P044);
-    glNormal3fv(N045);
-    glVertex3fv(P045);
-    glNormal3fv(N053);
-    glVertex3fv(P053);
-    glEnd();
-    glBegin(GL_POLYGON);
-    glNormal3fv(N044);
-    glVertex3fv(P044);
-    glNormal3fv(N053);
-    glVertex3fv(P053);
-    glNormal3fv(N052);
-    glVertex3fv(P052);
-    glEnd();
-    glBegin(GL_POLYGON);
-    glNormal3fv(N049);
-    glVertex3fv(P049);
-    glNormal3fv(N050);
-    glVertex3fv(P050);
-    glNormal3fv(N058);
-    glVertex3fv(P058);
-    glEnd();
-    glBegin(GL_POLYGON);
-    glNormal3fv(N049);
-    glVertex3fv(P049);
-    glNormal3fv(N058);
-    glVertex3fv(P058);
-    glNormal3fv(N057);
-    glVertex3fv(P057);
-    glEnd();
-    glBegin(GL_POLYGON);
-    glNormal3fv(N048);
-    glVertex3fv(P048);
-    glNormal3fv(N049);
-    glVertex3fv(P049);
-    glNormal3fv(N057);
-    glVertex3fv(P057);
-    glEnd();
-    glBegin(GL_POLYGON);
-    glNormal3fv(N048);
-    glVertex3fv(P048);
-    glNormal3fv(N057);
-    glVertex3fv(P057);
-    glNormal3fv(N056);
-    glVertex3fv(P056);
-    glEnd();
-    glBegin(GL_POLYGON);
-    glNormal3fv(N047);
-    glVertex3fv(P047);
-    glNormal3fv(N048);
-    glVertex3fv(P048);
-    glNormal3fv(N056);
-    glVertex3fv(P056);
-    glEnd();
-    glBegin(GL_POLYGON);
-    glNormal3fv(N047);
-    glVertex3fv(P047);
-    glNormal3fv(N056);
-    glVertex3fv(P056);
-    glNormal3fv(N055);
-    glVertex3fv(P055);
-    glEnd();
-    glBegin(GL_POLYGON);
-    glNormal3fv(N045);
-    glVertex3fv(P045);
-    glNormal3fv(N046);
-    glVertex3fv(P046);
-    glNormal3fv(N053);
-    glVertex3fv(P053);
-    glEnd();
-    glBegin(GL_POLYGON);
-    glNormal3fv(N046);
-    glVertex3fv(P046);
-    glNormal3fv(N054);
-    glVertex3fv(P054);
-    glNormal3fv(N053);
-    glVertex3fv(P053);
-    glEnd();
-    glBegin(GL_POLYGON);
-    glNormal3fv(N046);
-    glVertex3fv(P046);
-    glNormal3fv(N047);
-    glVertex3fv(P047);
-    glNormal3fv(N055);
-    glVertex3fv(P055);
-    glNormal3fv(N054);
-    glVertex3fv(P054);
-    glEnd();
-}
-
-void
-Dolphin010(void)
-{
-    glBegin(GL_POLYGON);
-    glNormal3fv(N080);
-    glVertex3fv(P080);
-    glNormal3fv(N081);
-    glVertex3fv(P081);
-    glNormal3fv(N085);
-    glVertex3fv(P085);
-    glEnd();
-    glBegin(GL_POLYGON);
-    glNormal3fv(N081);
-    glVertex3fv(P081);
-    glNormal3fv(N083);
-    glVertex3fv(P083);
-    glNormal3fv(N085);
-    glVertex3fv(P085);
-    glEnd();
-    glBegin(GL_POLYGON);
-    glNormal3fv(N085);
-    glVertex3fv(P085);
-    glNormal3fv(N083);
-    glVertex3fv(P083);
-    glNormal3fv(N077);
-    glVertex3fv(P077);
-    glEnd();
-    glBegin(GL_POLYGON);
-    glNormal3fv(N083);
-    glVertex3fv(P083);
-    glNormal3fv(N087);
-    glVertex3fv(P087);
-    glNormal3fv(N077);
-    glVertex3fv(P077);
-    glEnd();
-    glBegin(GL_POLYGON);
-    glNormal3fv(N077);
-    glVertex3fv(P077);
-    glNormal3fv(N087);
-    glVertex3fv(P087);
-    glNormal3fv(N090);
-    glVertex3fv(P090);
-    glEnd();
-    glBegin(GL_POLYGON);
-    glNormal3fv(N081);
-    glVertex3fv(P081);
-    glNormal3fv(N080);
-    glVertex3fv(P080);
-    glNormal3fv(N085);
-    glVertex3fv(P085);
-    glEnd();
-    glBegin(GL_POLYGON);
-    glNormal3fv(N083);
-    glVertex3fv(P083);
-    glNormal3fv(N081);
-    glVertex3fv(P081);
-    glNormal3fv(N085);
-    glVertex3fv(P085);
-    glEnd();
-    glBegin(GL_POLYGON);
-    glNormal3fv(N083);
-    glVertex3fv(P083);
-    glNormal3fv(N085);
-    glVertex3fv(P085);
-    glNormal3fv(N077);
-    glVertex3fv(P077);
-    glEnd();
-    glBegin(GL_POLYGON);
-    glNormal3fv(N087);
-    glVertex3fv(P087);
-    glNormal3fv(N083);
-    glVertex3fv(P083);
-    glNormal3fv(N077);
-    glVertex3fv(P077);
-    glEnd();
-    glBegin(GL_POLYGON);
-    glNormal3fv(N087);
-    glVertex3fv(P087);
-    glNormal3fv(N077);
-    glVertex3fv(P077);
-    glNormal3fv(N090);
-    glVertex3fv(P090);
-    glEnd();
-}
-
-void
-Dolphin011(void)
-{
-    glBegin(GL_POLYGON);
-    glNormal3fv(N082);
-    glVertex3fv(P082);
-    glNormal3fv(N084);
-    glVertex3fv(P084);
-    glNormal3fv(N079);
-    glVertex3fv(P079);
-    glEnd();
-    glBegin(GL_POLYGON);
-    glNormal3fv(N084);
-    glVertex3fv(P084);
-    glNormal3fv(N086);
-    glVertex3fv(P086);
-    glNormal3fv(N079);
-    glVertex3fv(P079);
-    glEnd();
-    glBegin(GL_POLYGON);
-    glNormal3fv(N079);
-    glVertex3fv(P079);
-    glNormal3fv(N086);
-    glVertex3fv(P086);
-    glNormal3fv(N078);
-    glVertex3fv(P078);
-    glEnd();
-    glBegin(GL_POLYGON);
-    glNormal3fv(N086);
-    glVertex3fv(P086);
-    glNormal3fv(N088);
-    glVertex3fv(P088);
-    glNormal3fv(N078);
-    glVertex3fv(P078);
-    glEnd();
-    glBegin(GL_POLYGON);
-    glNormal3fv(N078);
-    glVertex3fv(P078);
-    glNormal3fv(N088);
-    glVertex3fv(P088);
-    glNormal3fv(N089);
-    glVertex3fv(P089);
-    glEnd();
-    glBegin(GL_POLYGON);
-    glNormal3fv(N088);
-    glVertex3fv(P088);
-    glNormal3fv(N086);
-    glVertex3fv(P086);
-    glNormal3fv(N089);
-    glVertex3fv(P089);
-    glEnd();
-    glBegin(GL_POLYGON);
-    glNormal3fv(N089);
-    glVertex3fv(P089);
-    glNormal3fv(N086);
-    glVertex3fv(P086);
-    glNormal3fv(N078);
-    glVertex3fv(P078);
-    glEnd();
-    glBegin(GL_POLYGON);
-    glNormal3fv(N086);
-    glVertex3fv(P086);
-    glNormal3fv(N084);
-    glVertex3fv(P084);
-    glNormal3fv(N078);
-    glVertex3fv(P078);
-    glEnd();
-    glBegin(GL_POLYGON);
-    glNormal3fv(N078);
-    glVertex3fv(P078);
-    glNormal3fv(N084);
-    glVertex3fv(P084);
-    glNormal3fv(N079);
-    glVertex3fv(P079);
-    glEnd();
-    glBegin(GL_POLYGON);
-    glNormal3fv(N084);
-    glVertex3fv(P084);
-    glNormal3fv(N082);
-    glVertex3fv(P082);
-    glNormal3fv(N079);
-    glVertex3fv(P079);
-    glEnd();
-}
-
-void
-Dolphin012(void)
-{
-    glBegin(GL_POLYGON);
-    glNormal3fv(N058);
-    glVertex3fv(P058);
-    glNormal3fv(N059);
-    glVertex3fv(P059);
-    glNormal3fv(N067);
-    glVertex3fv(P067);
-    glNormal3fv(N066);
-    glVertex3fv(P066);
-    glEnd();
-    glBegin(GL_POLYGON);
-    glNormal3fv(N059);
-    glVertex3fv(P059);
-    glNormal3fv(N052);
-    glVertex3fv(P052);
-    glNormal3fv(N060);
-    glVertex3fv(P060);
-    glEnd();
-    glBegin(GL_POLYGON);
-    glNormal3fv(N059);
-    glVertex3fv(P059);
-    glNormal3fv(N060);
-    glVertex3fv(P060);
-    glNormal3fv(N067);
-    glVertex3fv(P067);
-    glEnd();
-    glBegin(GL_POLYGON);
-    glNormal3fv(N058);
-    glVertex3fv(P058);
-    glNormal3fv(N066);
-    glVertex3fv(P066);
-    glNormal3fv(N065);
-    glVertex3fv(P065);
-    glEnd();
-    glBegin(GL_POLYGON);
-    glNormal3fv(N058);
-    glVertex3fv(P058);
-    glNormal3fv(N065);
-    glVertex3fv(P065);
-    glNormal3fv(N057);
-    glVertex3fv(P057);
-    glEnd();
-    glBegin(GL_POLYGON);
-    glNormal3fv(N056);
-    glVertex3fv(P056);
-    glNormal3fv(N057);
-    glVertex3fv(P057);
-    glNormal3fv(N065);
-    glVertex3fv(P065);
-    glEnd();
-    glBegin(GL_POLYGON);
-    glNormal3fv(N056);
-    glVertex3fv(P056);
-    glNormal3fv(N065);
-    glVertex3fv(P065);
-    glNormal3fv(N006);
-    glVertex3fv(P006);
-    glEnd();
-    glBegin(GL_POLYGON);
-    glNormal3fv(N056);
-    glVertex3fv(P056);
-    glNormal3fv(N006);
-    glVertex3fv(P006);
-    glNormal3fv(N063);
-    glVertex3fv(P063);
-    glEnd();
-    glBegin(GL_POLYGON);
-    glNormal3fv(N056);
-    glVertex3fv(P056);
-    glNormal3fv(N063);
-    glVertex3fv(P063);
-    glNormal3fv(N055);
-    glVertex3fv(P055);
-    glEnd();
-    glBegin(GL_POLYGON);
-    glNormal3fv(N054);
-    glVertex3fv(P054);
-    glNormal3fv(N062);
-    glVertex3fv(P062);
-    glNormal3fv(N005);
-    glVertex3fv(P005);
-    glEnd();
-    glBegin(GL_POLYGON);
-    glNormal3fv(N054);
-    glVertex3fv(P054);
-    glNormal3fv(N005);
-    glVertex3fv(P005);
-    glNormal3fv(N053);
-    glVertex3fv(P053);
-    glEnd();
-    glBegin(GL_POLYGON);
-    glNormal3fv(N052);
-    glVertex3fv(P052);
-    glNormal3fv(N053);
-    glVertex3fv(P053);
-    glNormal3fv(N005);
-    glVertex3fv(P005);
-    glNormal3fv(N060);
-    glVertex3fv(P060);
-    glEnd();
-}
-
-void
-Dolphin013(void)
-{
-    glBegin(GL_POLYGON);
-    glNormal3fv(N116);
-    glVertex3fv(P116);
-    glNormal3fv(N117);
-    glVertex3fv(P117);
-    glNormal3fv(N112);
-    glVertex3fv(P112);
-    glNormal3fv(N113);
-    glVertex3fv(P113);
-    glEnd();
-    glBegin(GL_POLYGON);
-    glNormal3fv(N114);
-    glVertex3fv(P114);
-    glNormal3fv(N113);
-    glVertex3fv(P113);
-    glNormal3fv(N112);
-    glVertex3fv(P112);
-    glNormal3fv(N115);
-    glVertex3fv(P115);
-    glEnd();
-    glBegin(GL_POLYGON);
-    glNormal3fv(N114);
-    glVertex3fv(P114);
-    glNormal3fv(N116);
-    glVertex3fv(P116);
-    glNormal3fv(N113);
-    glVertex3fv(P113);
-    glEnd();
-    glBegin(GL_POLYGON);
-    glNormal3fv(N114);
-    glVertex3fv(P114);
-    glNormal3fv(N007);
-    glVertex3fv(P007);
-    glNormal3fv(N116);
-    glVertex3fv(P116);
-    glEnd();
-    glBegin(GL_POLYGON);
-    glNormal3fv(N007);
-    glVertex3fv(P007);
-    glNormal3fv(N002);
-    glVertex3fv(P002);
-    glNormal3fv(N116);
-    glVertex3fv(P116);
-    glEnd();
-    glBegin(GL_POLYGON);
-    glVertex3fv(P002);
-    glVertex3fv(P007);
-    glVertex3fv(P008);
-    glVertex3fv(P099);
-    glEnd();
-    glBegin(GL_POLYGON);
-    glVertex3fv(P007);
-    glVertex3fv(P114);
-    glVertex3fv(P115);
-    glVertex3fv(P008);
-    glEnd();
-    glBegin(GL_POLYGON);
-    glNormal3fv(N117);
-    glVertex3fv(P117);
-    glNormal3fv(N099);
-    glVertex3fv(P099);
-    glNormal3fv(N008);
-    glVertex3fv(P008);
-    glEnd();
-    glBegin(GL_POLYGON);
-    glNormal3fv(N117);
-    glVertex3fv(P117);
-    glNormal3fv(N008);
-    glVertex3fv(P008);
-    glNormal3fv(N112);
-    glVertex3fv(P112);
-    glEnd();
-    glBegin(GL_POLYGON);
-    glNormal3fv(N112);
-    glVertex3fv(P112);
-    glNormal3fv(N008);
-    glVertex3fv(P008);
-    glNormal3fv(N115);
-    glVertex3fv(P115);
-    glEnd();
-}
-
-void
-Dolphin014(void)
-{
-    glBegin(GL_POLYGON);
-    glNormal3fv(N111);
-    glVertex3fv(P111);
-    glNormal3fv(N110);
-    glVertex3fv(P110);
-    glNormal3fv(N102);
-    glVertex3fv(P102);
-    glNormal3fv(N121);
-    glVertex3fv(P121);
-    glEnd();
-    glBegin(GL_POLYGON);
-    glNormal3fv(N111);
-    glVertex3fv(P111);
-    glNormal3fv(N097);
-    glVertex3fv(P097);
-    glNormal3fv(N110);
-    glVertex3fv(P110);
-    glEnd();
-    glBegin(GL_POLYGON);
-    glNormal3fv(N097);
-    glVertex3fv(P097);
-    glNormal3fv(N119);
-    glVertex3fv(P119);
-    glNormal3fv(N110);
-    glVertex3fv(P110);
-    glEnd();
-    glBegin(GL_POLYGON);
-    glNormal3fv(N097);
-    glVertex3fv(P097);
-    glNormal3fv(N099);
-    glVertex3fv(P099);
-    glNormal3fv(N119);
-    glVertex3fv(P119);
-    glEnd();
-    glBegin(GL_POLYGON);
-    glNormal3fv(N099);
-    glVertex3fv(P099);
-    glNormal3fv(N065);
-    glVertex3fv(P065);
-    glNormal3fv(N119);
-    glVertex3fv(P119);
-    glEnd();
-    glBegin(GL_POLYGON);
-    glNormal3fv(N065);
-    glVertex3fv(P065);
-    glNormal3fv(N066);
-    glVertex3fv(P066);
-    glNormal3fv(N119);
-    glVertex3fv(P119);
-    glEnd();
-    glBegin(GL_POLYGON);
-    glVertex3fv(P098);
-    glVertex3fv(P097);
-    glVertex3fv(P111);
-    glVertex3fv(P121);
-    glEnd();
-    glBegin(GL_POLYGON);
-    glVertex3fv(P002);
-    glVertex3fv(P099);
-    glVertex3fv(P097);
-    glVertex3fv(P098);
-    glEnd();
-    glBegin(GL_POLYGON);
-    glNormal3fv(N110);
-    glVertex3fv(P110);
-    glNormal3fv(N119);
-    glVertex3fv(P119);
-    glNormal3fv(N118);
-    glVertex3fv(P118);
-    glNormal3fv(N102);
-    glVertex3fv(P102);
-    glEnd();
-    glBegin(GL_POLYGON);
-    glNormal3fv(N119);
-    glVertex3fv(P119);
-    glNormal3fv(N066);
-    glVertex3fv(P066);
-    glNormal3fv(N067);
-    glVertex3fv(P067);
-    glNormal3fv(N118);
-    glVertex3fv(P118);
-    glEnd();
-    glBegin(GL_POLYGON);
-    glNormal3fv(N067);
-    glVertex3fv(P067);
-    glNormal3fv(N060);
-    glVertex3fv(P060);
-    glNormal3fv(N002);
-    glVertex3fv(P002);
-    glEnd();
-    glBegin(GL_POLYGON);
-    glNormal3fv(N067);
-    glVertex3fv(P067);
-    glNormal3fv(N002);
-    glVertex3fv(P002);
-    glNormal3fv(N118);
-    glVertex3fv(P118);
-    glEnd();
-    glBegin(GL_POLYGON);
-    glNormal3fv(N118);
-    glVertex3fv(P118);
-    glNormal3fv(N002);
-    glVertex3fv(P002);
-    glNormal3fv(N098);
-    glVertex3fv(P098);
-    glEnd();
-    glBegin(GL_POLYGON);
-    glNormal3fv(N118);
-    glVertex3fv(P118);
-    glNormal3fv(N098);
-    glVertex3fv(P098);
-    glNormal3fv(N102);
-    glVertex3fv(P102);
-    glEnd();
-    glBegin(GL_POLYGON);
-    glNormal3fv(N102);
-    glVertex3fv(P102);
-    glNormal3fv(N098);
-    glVertex3fv(P098);
-    glNormal3fv(N121);
-    glVertex3fv(P121);
-    glEnd();
-}
-
-void
-Dolphin015(void)
-{
-    glBegin(GL_POLYGON);
-    glNormal3fv(N055);
-    glVertex3fv(P055);
-    glNormal3fv(N003);
-    glVertex3fv(P003);
-    glNormal3fv(N054);
-    glVertex3fv(P054);
-    glEnd();
-    glBegin(GL_POLYGON);
-    glNormal3fv(N003);
-    glVertex3fv(P003);
-    glNormal3fv(N055);
-    glVertex3fv(P055);
-    glNormal3fv(N063);
-    glVertex3fv(P063);
-    glEnd();
-    glBegin(GL_POLYGON);
-    glNormal3fv(N003);
-    glVertex3fv(P003);
-    glNormal3fv(N063);
-    glVertex3fv(P063);
-    glNormal3fv(N100);
-    glVertex3fv(P100);
-    glEnd();
-    glBegin(GL_POLYGON);
-    glNormal3fv(N003);
-    glVertex3fv(P003);
-    glNormal3fv(N100);
-    glVertex3fv(P100);
-    glNormal3fv(N054);
-    glVertex3fv(P054);
-    glEnd();
-    glBegin(GL_POLYGON);
-    glNormal3fv(N054);
-    glVertex3fv(P054);
-    glNormal3fv(N100);
-    glVertex3fv(P100);
-    glNormal3fv(N062);
-    glVertex3fv(P062);
-    glEnd();
-    glBegin(GL_POLYGON);
-    glNormal3fv(N100);
-    glVertex3fv(P100);
-    glNormal3fv(N064);
-    glVertex3fv(P064);
-    glNormal3fv(N120);
-    glVertex3fv(P120);
-    glEnd();
-    glBegin(GL_POLYGON);
-    glNormal3fv(N100);
-    glVertex3fv(P100);
-    glNormal3fv(N063);
-    glVertex3fv(P063);
-    glNormal3fv(N064);
-    glVertex3fv(P064);
-    glEnd();
-    glBegin(GL_POLYGON);
-    glNormal3fv(N063);
-    glVertex3fv(P063);
-    glNormal3fv(N006);
-    glVertex3fv(P006);
-    glNormal3fv(N064);
-    glVertex3fv(P064);
-    glEnd();
-    glBegin(GL_POLYGON);
-    glNormal3fv(N064);
-    glVertex3fv(P064);
-    glNormal3fv(N006);
-    glVertex3fv(P006);
-    glNormal3fv(N099);
-    glVertex3fv(P099);
-    glEnd();
-    glBegin(GL_POLYGON);
-    glNormal3fv(N064);
-    glVertex3fv(P064);
-    glNormal3fv(N099);
-    glVertex3fv(P099);
-    glNormal3fv(N117);
-    glVertex3fv(P117);
-    glEnd();
-    glBegin(GL_POLYGON);
-    glNormal3fv(N120);
-    glVertex3fv(P120);
-    glNormal3fv(N064);
-    glVertex3fv(P064);
-    glNormal3fv(N117);
-    glVertex3fv(P117);
-    glNormal3fv(N116);
-    glVertex3fv(P116);
-    glEnd();
-    glBegin(GL_POLYGON);
-    glNormal3fv(N006);
-    glVertex3fv(P006);
-    glNormal3fv(N065);
-    glVertex3fv(P065);
-    glNormal3fv(N099);
-    glVertex3fv(P099);
-    glEnd();
-    glBegin(GL_POLYGON);
-    glNormal3fv(N062);
-    glVertex3fv(P062);
-    glNormal3fv(N100);
-    glVertex3fv(P100);
-    glNormal3fv(N120);
-    glVertex3fv(P120);
-    glEnd();
-    glBegin(GL_POLYGON);
-    glNormal3fv(N005);
-    glVertex3fv(P005);
-    glNormal3fv(N062);
-    glVertex3fv(P062);
-    glNormal3fv(N120);
-    glVertex3fv(P120);
-    glEnd();
-    glBegin(GL_POLYGON);
-    glNormal3fv(N005);
-    glVertex3fv(P005);
-    glNormal3fv(N120);
-    glVertex3fv(P120);
-    glNormal3fv(N002);
-    glVertex3fv(P002);
-    glEnd();
-    glBegin(GL_POLYGON);
-    glNormal3fv(N002);
-    glVertex3fv(P002);
-    glNormal3fv(N120);
-    glVertex3fv(P120);
-    glNormal3fv(N116);
-    glVertex3fv(P116);
-    glEnd();
-    glBegin(GL_POLYGON);
-    glNormal3fv(N060);
-    glVertex3fv(P060);
-    glNormal3fv(N005);
-    glVertex3fv(P005);
-    glNormal3fv(N002);
-    glVertex3fv(P002);
-    glEnd();
-}
-
-void
-Dolphin016(void)
-{
-
-    glDisable(GL_DEPTH_TEST);
-    glBegin(GL_POLYGON);
-    glVertex3fv(P123);
-    glVertex3fv(P124);
-    glVertex3fv(P125);
-    glVertex3fv(P126);
-    glVertex3fv(P127);
-    glVertex3fv(P128);
-    glEnd();
-    glBegin(GL_POLYGON);
-    glVertex3fv(P129);
-    glVertex3fv(P130);
-    glVertex3fv(P131);
-    glVertex3fv(P132);
-    glVertex3fv(P133);
-    glVertex3fv(P134);
-    glEnd();
-    glBegin(GL_POLYGON);
-    glVertex3fv(P103);
-    glVertex3fv(P105);
-    glVertex3fv(P108);
-    glEnd();
-    glEnable(GL_DEPTH_TEST);
-}
-
-void
-DrawDolphin(fishRec * fish)
-{
-    float seg0, seg1, seg2, seg3, seg4, seg5, seg6, seg7;
-    float pitch, thrash, chomp;
-
-    fish->htail = (int) (fish->htail - (int) (10.0 * fish->v)) % 360;
-
-    thrash = 70.0 * fish->v;
-
-    seg0 = 1.0 * thrash * sin((fish->htail) * RRAD);
-    seg3 = 1.0 * thrash * sin((fish->htail) * RRAD);
-    seg1 = 2.0 * thrash * sin((fish->htail + 4.0) * RRAD);
-    seg2 = 3.0 * thrash * sin((fish->htail + 6.0) * RRAD);
-    seg4 = 4.0 * thrash * sin((fish->htail + 10.0) * RRAD);
-    seg5 = 4.5 * thrash * sin((fish->htail + 15.0) * RRAD);
-    seg6 = 5.0 * thrash * sin((fish->htail + 20.0) * RRAD);
-    seg7 = 6.0 * thrash * sin((fish->htail + 30.0) * RRAD);
-
-    pitch = fish->v * sin((fish->htail + 180.0) * RRAD);
-
-    if (fish->v > 2.0) {
-        chomp = -(fish->v - 2.0) * 200.0;
-    }
-    chomp = 100.0;
-
-    P012[1] = iP012[1] + seg5;
-    P013[1] = iP013[1] + seg5;
-    P014[1] = iP014[1] + seg5;
-    P015[1] = iP015[1] + seg5;
-    P016[1] = iP016[1] + seg5;
-    P017[1] = iP017[1] + seg5;
-    P018[1] = iP018[1] + seg5;
-    P019[1] = iP019[1] + seg5;
-
-    P020[1] = iP020[1] + seg4;
-    P021[1] = iP021[1] + seg4;
-    P022[1] = iP022[1] + seg4;
-    P023[1] = iP023[1] + seg4;
-    P024[1] = iP024[1] + seg4;
-    P025[1] = iP025[1] + seg4;
-    P026[1] = iP026[1] + seg4;
-    P027[1] = iP027[1] + seg4;
-
-    P028[1] = iP028[1] + seg2;
-    P029[1] = iP029[1] + seg2;
-    P030[1] = iP030[1] + seg2;
-    P031[1] = iP031[1] + seg2;
-    P032[1] = iP032[1] + seg2;
-    P033[1] = iP033[1] + seg2;
-    P034[1] = iP034[1] + seg2;
-    P035[1] = iP035[1] + seg2;
-
-    P036[1] = iP036[1] + seg1;
-    P037[1] = iP037[1] + seg1;
-    P038[1] = iP038[1] + seg1;
-    P039[1] = iP039[1] + seg1;
-    P040[1] = iP040[1] + seg1;
-    P041[1] = iP041[1] + seg1;
-    P042[1] = iP042[1] + seg1;
-    P043[1] = iP043[1] + seg1;
-
-    P044[1] = iP044[1] + seg0;
-    P045[1] = iP045[1] + seg0;
-    P046[1] = iP046[1] + seg0;
-    P047[1] = iP047[1] + seg0;
-    P048[1] = iP048[1] + seg0;
-    P049[1] = iP049[1] + seg0;
-    P050[1] = iP050[1] + seg0;
-    P051[1] = iP051[1] + seg0;
-
-    P009[1] = iP009[1] + seg6;
-    P010[1] = iP010[1] + seg6;
-    P075[1] = iP075[1] + seg6;
-    P076[1] = iP076[1] + seg6;
-
-    P001[1] = iP001[1] + seg7;
-    P011[1] = iP011[1] + seg7;
-    P068[1] = iP068[1] + seg7;
-    P069[1] = iP069[1] + seg7;
-    P070[1] = iP070[1] + seg7;
-    P071[1] = iP071[1] + seg7;
-    P072[1] = iP072[1] + seg7;
-    P073[1] = iP073[1] + seg7;
-    P074[1] = iP074[1] + seg7;
-
-    P091[1] = iP091[1] + seg3;
-    P092[1] = iP092[1] + seg3;
-    P093[1] = iP093[1] + seg3;
-    P094[1] = iP094[1] + seg3;
-    P095[1] = iP095[1] + seg3;
-    P122[1] = iP122[1] + seg3 * 1.5;
-
-    P097[1] = iP097[1] + chomp;
-    P098[1] = iP098[1] + chomp;
-    P102[1] = iP102[1] + chomp;
-    P110[1] = iP110[1] + chomp;
-    P111[1] = iP111[1] + chomp;
-    P121[1] = iP121[1] + chomp;
-    P118[1] = iP118[1] + chomp;
-    P119[1] = iP119[1] + chomp;
-
-    glPushMatrix();
-
-    glRotatef(pitch, 1.0, 0.0, 0.0);
-
-    glTranslatef(0.0, 0.0, 7000.0);
-
-    glRotatef(180.0, 0.0, 1.0, 0.0);
-
-    glEnable(GL_CULL_FACE);
-    Dolphin014();
-    Dolphin010();
-    Dolphin009();
-    Dolphin012();
-    Dolphin013();
-    Dolphin006();
-    Dolphin002();
-    Dolphin001();
-    Dolphin003();
-    Dolphin015();
-    Dolphin004();
-    Dolphin005();
-    Dolphin007();
-    Dolphin008();
-    Dolphin011();
-    Dolphin016();
-    glDisable(GL_CULL_FACE);
-
-    glPopMatrix();
-}
diff --git a/Xcode/TemplatesForXcodeLeopard/SDL OpenGL Application/atlantis/shark.c b/Xcode/TemplatesForXcodeLeopard/SDL OpenGL Application/atlantis/shark.c
deleted file mode 100644
index 9c847dbaf..000000000
--- a/Xcode/TemplatesForXcodeLeopard/SDL OpenGL Application/atlantis/shark.c	
+++ /dev/null
@@ -1,1308 +0,0 @@
-/**
- * (c) Copyright 1993, 1994, Silicon Graphics, Inc.
- * ALL RIGHTS RESERVED
- * Permission to use, copy, modify, and distribute this software for
- * any purpose and without fee is hereby granted, provided that the above
- * copyright notice appear in all copies and that both the copyright notice
- * and this permission notice appear in supporting documentation, and that
- * the name of Silicon Graphics, Inc. not be used in advertising
- * or publicity pertaining to distribution of the software without specific,
- * written prior permission.
- *
- * THE MATERIAL EMBODIED ON THIS SOFTWARE IS PROVIDED TO YOU "AS-IS"
- * AND WITHOUT WARRANTY OF ANY KIND, EXPRESS, IMPLIED OR OTHERWISE,
- * INCLUDING WITHOUT LIMITATION, ANY WARRANTY OF MERCHANTABILITY OR
- * FITNESS FOR A PARTICULAR PURPOSE.  IN NO EVENT SHALL SILICON
- * GRAPHICS, INC.  BE LIABLE TO YOU OR ANYONE ELSE FOR ANY DIRECT,
- * SPECIAL, INCIDENTAL, INDIRECT OR CONSEQUENTIAL DAMAGES OF ANY
- * KIND, OR ANY DAMAGES WHATSOEVER, INCLUDING WITHOUT LIMITATION,
- * LOSS OF PROFIT, LOSS OF USE, SAVINGS OR REVENUE, OR THE CLAIMS OF
- * THIRD PARTIES, WHETHER OR NOT SILICON GRAPHICS, INC.  HAS BEEN
- * ADVISED OF THE POSSIBILITY OF SUCH LOSS, HOWEVER CAUSED AND ON
- * ANY THEORY OF LIABILITY, ARISING OUT OF OR IN CONNECTION WITH THE
- * POSSESSION, USE OR PERFORMANCE OF THIS SOFTWARE.
- *
- * US Government Users Restricted Rights
- * Use, duplication, or disclosure by the Government is subject to
- * restrictions set forth in FAR 52.227.19(c)(2) or subparagraph
- * (c)(1)(ii) of the Rights in Technical Data and Computer Software
- * clause at DFARS 252.227-7013 and/or in similar or successor
- * clauses in the FAR or the DOD or NASA FAR Supplement.
- * Unpublished-- rights reserved under the copyright laws of the
- * United States.  Contractor/manufacturer is Silicon Graphics,
- * Inc., 2011 N.  Shoreline Blvd., Mountain View, CA 94039-7311.
- *
- * OpenGL(TM) is a trademark of Silicon Graphics, Inc.
- */
-#include 
-#include 
-#include "atlantis.h"
-/* *INDENT-OFF* */
-static float N002[3] = {0.000077 ,-0.020611 ,0.999788};
-static float N003[3] = {0.961425 ,0.258729 ,-0.093390};
-static float N004[3] = {0.510811 ,-0.769633 ,-0.383063};
-static float N005[3] = {0.400123 ,0.855734 ,-0.328055};
-static float N006[3] = {-0.770715 ,0.610204 ,-0.183440};
-static float N007[3] = {-0.915597 ,-0.373345 ,-0.149316};
-static float N008[3] = {-0.972788 ,0.208921 ,-0.100179};
-static float N009[3] = {-0.939713 ,-0.312268 ,-0.139383};
-static float N010[3] = {-0.624138 ,-0.741047 ,-0.247589};
-static float N011[3] = {0.591434 ,-0.768401 ,-0.244471};
-static float N012[3] = {0.935152 ,-0.328495 ,-0.132598};
-static float N013[3] = {0.997102 ,0.074243 ,-0.016593};
-static float N014[3] = {0.969995 ,0.241712 ,-0.026186};
-static float N015[3] = {0.844539 ,0.502628 ,-0.184714};
-static float N016[3] = {-0.906608 ,0.386308 ,-0.169787};
-static float N017[3] = {-0.970016 ,0.241698 ,-0.025516};
-static float N018[3] = {-0.998652 ,0.050493 ,-0.012045};
-static float N019[3] = {-0.942685 ,-0.333051 ,-0.020556};
-static float N020[3] = {-0.660944 ,-0.750276 ,0.015480};
-static float N021[3] = {0.503549 ,-0.862908 ,-0.042749};
-static float N022[3] = {0.953202 ,-0.302092 ,-0.012089};
-static float N023[3] = {0.998738 ,0.023574 ,0.044344};
-static float N024[3] = {0.979297 ,0.193272 ,0.060202};
-static float N025[3] = {0.798300 ,0.464885 ,0.382883};
-static float N026[3] = {-0.756590 ,0.452403 ,0.472126};
-static float N027[3] = {-0.953855 ,0.293003 ,0.065651};
-static float N028[3] = {-0.998033 ,0.040292 ,0.048028};
-static float N029[3] = {-0.977079 ,-0.204288 ,0.059858};
-static float N030[3] = {-0.729117 ,-0.675304 ,0.111140};
-static float N031[3] = {0.598361 ,-0.792753 ,0.116221};
-static float N032[3] = {0.965192 ,-0.252991 ,0.066332};
-static float N033[3] = {0.998201 ,-0.002790 ,0.059892};
-static float N034[3] = {0.978657 ,0.193135 ,0.070207};
-static float N035[3] = {0.718815 ,0.680392 ,0.142733};
-static float N036[3] = {-0.383096 ,0.906212 ,0.178936};
-static float N037[3] = {-0.952831 ,0.292590 ,0.080647};
-static float N038[3] = {-0.997680 ,0.032417 ,0.059861};
-static float N039[3] = {-0.982629 ,-0.169881 ,0.074700};
-static float N040[3] = {-0.695424 ,-0.703466 ,0.146700};
-static float N041[3] = {0.359323 ,-0.915531 ,0.180805};
-static float N042[3] = {0.943356 ,-0.319387 ,0.089842};
-static float N043[3] = {0.998272 ,-0.032435 ,0.048993};
-static float N044[3] = {0.978997 ,0.193205 ,0.065084};
-static float N045[3] = {0.872144 ,0.470094 ,-0.135565};
-static float N046[3] = {-0.664282 ,0.737945 ,-0.119027};
-static float N047[3] = {-0.954508 ,0.288570 ,0.075107};
-static float N048[3] = {-0.998273 ,0.032406 ,0.048993};
-static float N049[3] = {-0.979908 ,-0.193579 ,0.048038};
-static float N050[3] = {-0.858736 ,-0.507202 ,-0.072938};
-static float N051[3] = {0.643545 ,-0.763887 ,-0.048237};
-static float N052[3] = {0.955580 ,-0.288954 ,0.058068};
-static float N058[3] = {0.000050 ,0.793007 ,-0.609213};
-static float N059[3] = {0.913510 ,0.235418 ,-0.331779};
-static float N060[3] = {-0.807970 ,0.495000 ,-0.319625};
-static float N061[3] = {0.000000 ,0.784687 ,-0.619892};
-static float N062[3] = {0.000000 ,-1.000000 ,0.000000};
-static float N063[3] = {0.000000 ,1.000000 ,0.000000};
-static float N064[3] = {0.000000 ,1.000000 ,0.000000};
-static float N065[3] = {0.000000 ,1.000000 ,0.000000};
-static float N066[3] = {-0.055784 ,0.257059 ,0.964784};
-static float N069[3] = {-0.000505 ,-0.929775 ,-0.368127};
-static float N070[3] = {0.000000 ,1.000000 ,0.000000};
-static float P002[3] = {0.00, -36.59, 5687.72};
-static float P003[3] = {90.00, 114.73, 724.38};
-static float P004[3] = {58.24, -146.84, 262.35};
-static float P005[3] = {27.81, 231.52, 510.43};
-static float P006[3] = {-27.81, 230.43, 509.76};
-static float P007[3] = {-46.09, -146.83, 265.84};
-static float P008[3] = {-90.00, 103.84, 718.53};
-static float P009[3] = {-131.10, -165.92, 834.85};
-static float P010[3] = {-27.81, -285.31, 500.00};
-static float P011[3] = {27.81, -285.32, 500.00};
-static float P012[3] = {147.96, -170.89, 845.50};
-static float P013[3] = {180.00, 0.00, 2000.00};
-static float P014[3] = {145.62, 352.67, 2000.00};
-static float P015[3] = {55.62, 570.63, 2000.00};
-static float P016[3] = {-55.62, 570.64, 2000.00};
-static float P017[3] = {-145.62, 352.68, 2000.00};
-static float P018[3] = {-180.00, 0.01, 2000.00};
-static float P019[3] = {-178.20, -352.66, 2001.61};
-static float P020[3] = {-55.63, -570.63, 2000.00};
-static float P021[3] = {55.62, -570.64, 2000.00};
-static float P022[3] = {179.91, -352.69, 1998.39};
-static float P023[3] = {150.00, 0.00, 3000.00};
-static float P024[3] = {121.35, 293.89, 3000.00};
-static float P025[3] = {46.35, 502.93, 2883.09};
-static float P026[3] = {-46.35, 497.45, 2877.24};
-static float P027[3] = {-121.35, 293.90, 3000.00};
-static float P028[3] = {-150.00, 0.00, 3000.00};
-static float P029[3] = {-152.21, -304.84, 2858.68};
-static float P030[3] = {-46.36, -475.52, 3000.00};
-static float P031[3] = {46.35, -475.53, 3000.00};
-static float P032[3] = {155.64, -304.87, 2863.50};
-static float P033[3] = {90.00, 0.00, 4000.00};
-static float P034[3] = {72.81, 176.33, 4000.00};
-static float P035[3] = {27.81, 285.32, 4000.00};
-static float P036[3] = {-27.81, 285.32, 4000.00};
-static float P037[3] = {-72.81, 176.34, 4000.00};
-static float P038[3] = {-90.00, 0.00, 4000.00};
-static float P039[3] = {-72.81, -176.33, 4000.00};
-static float P040[3] = {-27.81, -285.31, 4000.00};
-static float P041[3] = {27.81, -285.32, 4000.00};
-static float P042[3] = {72.81, -176.34, 4000.00};
-static float P043[3] = {30.00, 0.00, 5000.00};
-static float P044[3] = {24.27, 58.78, 5000.00};
-static float P045[3] = {9.27, 95.11, 5000.00};
-static float P046[3] = {-9.27, 95.11, 5000.00};
-static float P047[3] = {-24.27, 58.78, 5000.00};
-static float P048[3] = {-30.00, 0.00, 5000.00};
-static float P049[3] = {-24.27, -58.78, 5000.00};
-static float P050[3] = {-9.27, -95.10, 5000.00};
-static float P051[3] = {9.27, -95.11, 5000.00};
-static float P052[3] = {24.27, -58.78, 5000.00};
-static float P058[3] = {0.00, 1212.72, 2703.08};
-static float P059[3] = {50.36, 0.00, 108.14};
-static float P060[3] = {-22.18, 0.00, 108.14};
-static float P061[3] = {0.00, 1181.61, 6344.65};
-static float P062[3] = {516.45, -887.08, 2535.45};
-static float P063[3] = {-545.69, -879.31, 2555.63};
-static float P064[3] = {618.89, -1005.64, 2988.32};
-static float P065[3] = {-635.37, -1014.79, 2938.68};
-static float P066[3] = {0.00, 1374.43, 3064.18};
-static float P069[3] = {0.00, -418.25, 5765.04};
-static float P070[3] = {0.00, 1266.91, 6629.60};
-static float P071[3] = {-139.12, -124.96, 997.98};
-static float P072[3] = {-139.24, -110.18, 1020.68};
-static float P073[3] = {-137.33, -94.52, 1022.63};
-static float P074[3] = {-137.03, -79.91, 996.89};
-static float P075[3] = {-135.21, -91.48, 969.14};
-static float P076[3] = {-135.39, -110.87, 968.76};
-static float P077[3] = {150.23, -78.44, 995.53};
-static float P078[3] = {152.79, -92.76, 1018.46};
-static float P079[3] = {154.19, -110.20, 1020.55};
-static float P080[3] = {151.33, -124.15, 993.77};
-static float P081[3] = {150.49, -111.19, 969.86};
-static float P082[3] = {150.79, -92.41, 969.70};
-static float iP002[3] = {0.00, -36.59, 5687.72};
-static float iP004[3] = {58.24, -146.84, 262.35};
-static float iP007[3] = {-46.09, -146.83, 265.84};
-static float iP010[3] = {-27.81, -285.31, 500.00};
-static float iP011[3] = {27.81, -285.32, 500.00};
-static float iP023[3] = {150.00, 0.00, 3000.00};
-static float iP024[3] = {121.35, 293.89, 3000.00};
-static float iP025[3] = {46.35, 502.93, 2883.09};
-static float iP026[3] = {-46.35, 497.45, 2877.24};
-static float iP027[3] = {-121.35, 293.90, 3000.00};
-static float iP028[3] = {-150.00, 0.00, 3000.00};
-static float iP029[3] = {-121.35, -304.84, 2853.86};
-static float iP030[3] = {-46.36, -475.52, 3000.00};
-static float iP031[3] = {46.35, -475.53, 3000.00};
-static float iP032[3] = {121.35, -304.87, 2853.86};
-static float iP033[3] = {90.00, 0.00, 4000.00};
-static float iP034[3] = {72.81, 176.33, 4000.00};
-static float iP035[3] = {27.81, 285.32, 4000.00};
-static float iP036[3] = {-27.81, 285.32, 4000.00};
-static float iP037[3] = {-72.81, 176.34, 4000.00};
-static float iP038[3] = {-90.00, 0.00, 4000.00};
-static float iP039[3] = {-72.81, -176.33, 4000.00};
-static float iP040[3] = {-27.81, -285.31, 4000.00};
-static float iP041[3] = {27.81, -285.32, 4000.00};
-static float iP042[3] = {72.81, -176.34, 4000.00};
-static float iP043[3] = {30.00, 0.00, 5000.00};
-static float iP044[3] = {24.27, 58.78, 5000.00};
-static float iP045[3] = {9.27, 95.11, 5000.00};
-static float iP046[3] = {-9.27, 95.11, 5000.00};
-static float iP047[3] = {-24.27, 58.78, 5000.00};
-static float iP048[3] = {-30.00, 0.00, 5000.00};
-static float iP049[3] = {-24.27, -58.78, 5000.00};
-static float iP050[3] = {-9.27, -95.10, 5000.00};
-static float iP051[3] = {9.27, -95.11, 5000.00};
-static float iP052[3] = {24.27, -58.78, 5000.00};
-static float iP061[3] = {0.00, 1181.61, 6344.65};
-static float iP069[3] = {0.00, -418.25, 5765.04};
-static float iP070[3] = {0.00, 1266.91, 6629.60};
-/* *INDENT-ON* */
-
-void
-Fish001(void)
-{
-    glBegin(GL_POLYGON);
-    glNormal3fv(N005);
-    glVertex3fv(P005);
-    glNormal3fv(N059);
-    glVertex3fv(P059);
-    glNormal3fv(N060);
-    glVertex3fv(P060);
-    glNormal3fv(N006);
-    glVertex3fv(P006);
-    glEnd();
-    glBegin(GL_POLYGON);
-    glNormal3fv(N015);
-    glVertex3fv(P015);
-    glNormal3fv(N005);
-    glVertex3fv(P005);
-    glNormal3fv(N006);
-    glVertex3fv(P006);
-    glNormal3fv(N016);
-    glVertex3fv(P016);
-    glEnd();
-    glBegin(GL_POLYGON);
-    glNormal3fv(N006);
-    glVertex3fv(P006);
-    glNormal3fv(N060);
-    glVertex3fv(P060);
-    glNormal3fv(N008);
-    glVertex3fv(P008);
-    glEnd();
-    glBegin(GL_POLYGON);
-    glNormal3fv(N016);
-    glVertex3fv(P016);
-    glNormal3fv(N006);
-    glVertex3fv(P006);
-    glNormal3fv(N008);
-    glVertex3fv(P008);
-    glEnd();
-    glBegin(GL_POLYGON);
-    glNormal3fv(N016);
-    glVertex3fv(P016);
-    glNormal3fv(N008);
-    glVertex3fv(P008);
-    glNormal3fv(N017);
-    glVertex3fv(P017);
-    glEnd();
-    glBegin(GL_POLYGON);
-    glNormal3fv(N017);
-    glVertex3fv(P017);
-    glNormal3fv(N008);
-    glVertex3fv(P008);
-    glNormal3fv(N018);
-    glVertex3fv(P018);
-    glEnd();
-    glBegin(GL_POLYGON);
-    glNormal3fv(N008);
-    glVertex3fv(P008);
-    glNormal3fv(N009);
-    glVertex3fv(P009);
-    glNormal3fv(N018);
-    glVertex3fv(P018);
-    glEnd();
-    glBegin(GL_POLYGON);
-    glNormal3fv(N008);
-    glVertex3fv(P008);
-    glNormal3fv(N060);
-    glVertex3fv(P060);
-    glNormal3fv(N009);
-    glVertex3fv(P009);
-    glEnd();
-    glBegin(GL_POLYGON);
-    glNormal3fv(N007);
-    glVertex3fv(P007);
-    glNormal3fv(N010);
-    glVertex3fv(P010);
-    glNormal3fv(N009);
-    glVertex3fv(P009);
-    glEnd();
-    glBegin(GL_POLYGON);
-    glNormal3fv(N009);
-    glVertex3fv(P009);
-    glNormal3fv(N019);
-    glVertex3fv(P019);
-    glNormal3fv(N018);
-    glVertex3fv(P018);
-    glEnd();
-    glBegin(GL_POLYGON);
-    glNormal3fv(N009);
-    glVertex3fv(P009);
-    glNormal3fv(N010);
-    glVertex3fv(P010);
-    glNormal3fv(N019);
-    glVertex3fv(P019);
-    glEnd();
-    glBegin(GL_POLYGON);
-    glNormal3fv(N010);
-    glVertex3fv(P010);
-    glNormal3fv(N020);
-    glVertex3fv(P020);
-    glNormal3fv(N019);
-    glVertex3fv(P019);
-    glEnd();
-    glBegin(GL_POLYGON);
-    glNormal3fv(N010);
-    glVertex3fv(P010);
-    glNormal3fv(N011);
-    glVertex3fv(P011);
-    glNormal3fv(N021);
-    glVertex3fv(P021);
-    glNormal3fv(N020);
-    glVertex3fv(P020);
-    glEnd();
-    glBegin(GL_POLYGON);
-    glNormal3fv(N004);
-    glVertex3fv(P004);
-    glNormal3fv(N011);
-    glVertex3fv(P011);
-    glNormal3fv(N010);
-    glVertex3fv(P010);
-    glNormal3fv(N007);
-    glVertex3fv(P007);
-    glEnd();
-    glBegin(GL_POLYGON);
-    glNormal3fv(N004);
-    glVertex3fv(P004);
-    glNormal3fv(N012);
-    glVertex3fv(P012);
-    glNormal3fv(N011);
-    glVertex3fv(P011);
-    glEnd();
-    glBegin(GL_POLYGON);
-    glNormal3fv(N012);
-    glVertex3fv(P012);
-    glNormal3fv(N022);
-    glVertex3fv(P022);
-    glNormal3fv(N011);
-    glVertex3fv(P011);
-    glEnd();
-    glBegin(GL_POLYGON);
-    glNormal3fv(N011);
-    glVertex3fv(P011);
-    glNormal3fv(N022);
-    glVertex3fv(P022);
-    glNormal3fv(N021);
-    glVertex3fv(P021);
-    glEnd();
-    glBegin(GL_POLYGON);
-    glNormal3fv(N059);
-    glVertex3fv(P059);
-    glNormal3fv(N005);
-    glVertex3fv(P005);
-    glNormal3fv(N015);
-    glVertex3fv(P015);
-    glEnd();
-    glBegin(GL_POLYGON);
-    glNormal3fv(N015);
-    glVertex3fv(P015);
-    glNormal3fv(N014);
-    glVertex3fv(P014);
-    glNormal3fv(N003);
-    glVertex3fv(P003);
-    glEnd();
-    glBegin(GL_POLYGON);
-    glNormal3fv(N015);
-    glVertex3fv(P015);
-    glNormal3fv(N003);
-    glVertex3fv(P003);
-    glNormal3fv(N059);
-    glVertex3fv(P059);
-    glEnd();
-    glBegin(GL_POLYGON);
-    glNormal3fv(N014);
-    glVertex3fv(P014);
-    glNormal3fv(N013);
-    glVertex3fv(P013);
-    glNormal3fv(N003);
-    glVertex3fv(P003);
-    glEnd();
-    glBegin(GL_POLYGON);
-    glNormal3fv(N003);
-    glVertex3fv(P003);
-    glNormal3fv(N012);
-    glVertex3fv(P012);
-    glNormal3fv(N059);
-    glVertex3fv(P059);
-    glEnd();
-    glBegin(GL_POLYGON);
-    glNormal3fv(N013);
-    glVertex3fv(P013);
-    glNormal3fv(N012);
-    glVertex3fv(P012);
-    glNormal3fv(N003);
-    glVertex3fv(P003);
-    glEnd();
-    glBegin(GL_POLYGON);
-    glNormal3fv(N013);
-    glVertex3fv(P013);
-    glNormal3fv(N022);
-    glVertex3fv(P022);
-    glNormal3fv(N012);
-    glVertex3fv(P012);
-    glEnd();
-    glBegin(GL_POLYGON);
-    glVertex3fv(P071);
-    glVertex3fv(P072);
-    glVertex3fv(P073);
-    glVertex3fv(P074);
-    glVertex3fv(P075);
-    glVertex3fv(P076);
-    glEnd();
-    glBegin(GL_POLYGON);
-    glVertex3fv(P077);
-    glVertex3fv(P078);
-    glVertex3fv(P079);
-    glVertex3fv(P080);
-    glVertex3fv(P081);
-    glVertex3fv(P082);
-    glEnd();
-}
-
-void
-Fish002(void)
-{
-    glBegin(GL_POLYGON);
-    glNormal3fv(N013);
-    glVertex3fv(P013);
-    glNormal3fv(N014);
-    glVertex3fv(P014);
-    glNormal3fv(N024);
-    glVertex3fv(P024);
-    glNormal3fv(N023);
-    glVertex3fv(P023);
-    glEnd();
-    glBegin(GL_POLYGON);
-    glNormal3fv(N014);
-    glVertex3fv(P014);
-    glNormal3fv(N015);
-    glVertex3fv(P015);
-    glNormal3fv(N025);
-    glVertex3fv(P025);
-    glNormal3fv(N024);
-    glVertex3fv(P024);
-    glEnd();
-    glBegin(GL_POLYGON);
-    glNormal3fv(N016);
-    glVertex3fv(P016);
-    glNormal3fv(N017);
-    glVertex3fv(P017);
-    glNormal3fv(N027);
-    glVertex3fv(P027);
-    glNormal3fv(N026);
-    glVertex3fv(P026);
-    glEnd();
-    glBegin(GL_POLYGON);
-    glNormal3fv(N017);
-    glVertex3fv(P017);
-    glNormal3fv(N018);
-    glVertex3fv(P018);
-    glNormal3fv(N028);
-    glVertex3fv(P028);
-    glNormal3fv(N027);
-    glVertex3fv(P027);
-    glEnd();
-    glBegin(GL_POLYGON);
-    glNormal3fv(N020);
-    glVertex3fv(P020);
-    glNormal3fv(N021);
-    glVertex3fv(P021);
-    glNormal3fv(N031);
-    glVertex3fv(P031);
-    glNormal3fv(N030);
-    glVertex3fv(P030);
-    glEnd();
-    glBegin(GL_POLYGON);
-    glNormal3fv(N013);
-    glVertex3fv(P013);
-    glNormal3fv(N023);
-    glVertex3fv(P023);
-    glNormal3fv(N022);
-    glVertex3fv(P022);
-    glEnd();
-    glBegin(GL_POLYGON);
-    glNormal3fv(N022);
-    glVertex3fv(P022);
-    glNormal3fv(N023);
-    glVertex3fv(P023);
-    glNormal3fv(N032);
-    glVertex3fv(P032);
-    glEnd();
-    glBegin(GL_POLYGON);
-    glNormal3fv(N022);
-    glVertex3fv(P022);
-    glNormal3fv(N032);
-    glVertex3fv(P032);
-    glNormal3fv(N031);
-    glVertex3fv(P031);
-    glEnd();
-    glBegin(GL_POLYGON);
-    glNormal3fv(N022);
-    glVertex3fv(P022);
-    glNormal3fv(N031);
-    glVertex3fv(P031);
-    glNormal3fv(N021);
-    glVertex3fv(P021);
-    glEnd();
-    glBegin(GL_POLYGON);
-    glNormal3fv(N018);
-    glVertex3fv(P018);
-    glNormal3fv(N019);
-    glVertex3fv(P019);
-    glNormal3fv(N029);
-    glVertex3fv(P029);
-    glEnd();
-    glBegin(GL_POLYGON);
-    glNormal3fv(N018);
-    glVertex3fv(P018);
-    glNormal3fv(N029);
-    glVertex3fv(P029);
-    glNormal3fv(N028);
-    glVertex3fv(P028);
-    glEnd();
-    glBegin(GL_POLYGON);
-    glNormal3fv(N019);
-    glVertex3fv(P019);
-    glNormal3fv(N020);
-    glVertex3fv(P020);
-    glNormal3fv(N030);
-    glVertex3fv(P030);
-    glEnd();
-    glBegin(GL_POLYGON);
-    glNormal3fv(N019);
-    glVertex3fv(P019);
-    glNormal3fv(N030);
-    glVertex3fv(P030);
-    glNormal3fv(N029);
-    glVertex3fv(P029);
-    glEnd();
-}
-
-void
-Fish003(void)
-{
-    glBegin(GL_POLYGON);
-    glNormal3fv(N032);
-    glVertex3fv(P032);
-    glNormal3fv(N023);
-    glVertex3fv(P023);
-    glNormal3fv(N033);
-    glVertex3fv(P033);
-    glNormal3fv(N042);
-    glVertex3fv(P042);
-    glEnd();
-    glBegin(GL_POLYGON);
-    glNormal3fv(N031);
-    glVertex3fv(P031);
-    glNormal3fv(N032);
-    glVertex3fv(P032);
-    glNormal3fv(N042);
-    glVertex3fv(P042);
-    glNormal3fv(N041);
-    glVertex3fv(P041);
-    glEnd();
-    glBegin(GL_POLYGON);
-    glNormal3fv(N023);
-    glVertex3fv(P023);
-    glNormal3fv(N024);
-    glVertex3fv(P024);
-    glNormal3fv(N034);
-    glVertex3fv(P034);
-    glNormal3fv(N033);
-    glVertex3fv(P033);
-    glEnd();
-    glBegin(GL_POLYGON);
-    glNormal3fv(N024);
-    glVertex3fv(P024);
-    glNormal3fv(N025);
-    glVertex3fv(P025);
-    glNormal3fv(N035);
-    glVertex3fv(P035);
-    glNormal3fv(N034);
-    glVertex3fv(P034);
-    glEnd();
-    glBegin(GL_POLYGON);
-    glNormal3fv(N030);
-    glVertex3fv(P030);
-    glNormal3fv(N031);
-    glVertex3fv(P031);
-    glNormal3fv(N041);
-    glVertex3fv(P041);
-    glNormal3fv(N040);
-    glVertex3fv(P040);
-    glEnd();
-    glBegin(GL_POLYGON);
-    glNormal3fv(N025);
-    glVertex3fv(P025);
-    glNormal3fv(N026);
-    glVertex3fv(P026);
-    glNormal3fv(N036);
-    glVertex3fv(P036);
-    glNormal3fv(N035);
-    glVertex3fv(P035);
-    glEnd();
-    glBegin(GL_POLYGON);
-    glNormal3fv(N026);
-    glVertex3fv(P026);
-    glNormal3fv(N027);
-    glVertex3fv(P027);
-    glNormal3fv(N037);
-    glVertex3fv(P037);
-    glNormal3fv(N036);
-    glVertex3fv(P036);
-    glEnd();
-    glBegin(GL_POLYGON);
-    glNormal3fv(N027);
-    glVertex3fv(P027);
-    glNormal3fv(N028);
-    glVertex3fv(P028);
-    glNormal3fv(N038);
-    glVertex3fv(P038);
-    glNormal3fv(N037);
-    glVertex3fv(P037);
-    glEnd();
-    glBegin(GL_POLYGON);
-    glNormal3fv(N028);
-    glVertex3fv(P028);
-    glNormal3fv(N029);
-    glVertex3fv(P029);
-    glNormal3fv(N039);
-    glVertex3fv(P039);
-    glNormal3fv(N038);
-    glVertex3fv(P038);
-    glEnd();
-    glBegin(GL_POLYGON);
-    glNormal3fv(N029);
-    glVertex3fv(P029);
-    glNormal3fv(N030);
-    glVertex3fv(P030);
-    glNormal3fv(N040);
-    glVertex3fv(P040);
-    glNormal3fv(N039);
-    glVertex3fv(P039);
-    glEnd();
-}
-
-void
-Fish004(void)
-{
-    glBegin(GL_POLYGON);
-    glNormal3fv(N040);
-    glVertex3fv(P040);
-    glNormal3fv(N041);
-    glVertex3fv(P041);
-    glNormal3fv(N051);
-    glVertex3fv(P051);
-    glNormal3fv(N050);
-    glVertex3fv(P050);
-    glEnd();
-    glBegin(GL_POLYGON);
-    glNormal3fv(N041);
-    glVertex3fv(P041);
-    glNormal3fv(N042);
-    glVertex3fv(P042);
-    glNormal3fv(N052);
-    glVertex3fv(P052);
-    glNormal3fv(N051);
-    glVertex3fv(P051);
-    glEnd();
-    glBegin(GL_POLYGON);
-    glNormal3fv(N042);
-    glVertex3fv(P042);
-    glNormal3fv(N033);
-    glVertex3fv(P033);
-    glNormal3fv(N043);
-    glVertex3fv(P043);
-    glNormal3fv(N052);
-    glVertex3fv(P052);
-    glEnd();
-    glBegin(GL_POLYGON);
-    glNormal3fv(N033);
-    glVertex3fv(P033);
-    glNormal3fv(N034);
-    glVertex3fv(P034);
-    glNormal3fv(N044);
-    glVertex3fv(P044);
-    glNormal3fv(N043);
-    glVertex3fv(P043);
-    glEnd();
-    glBegin(GL_POLYGON);
-    glNormal3fv(N034);
-    glVertex3fv(P034);
-    glNormal3fv(N035);
-    glVertex3fv(P035);
-    glNormal3fv(N045);
-    glVertex3fv(P045);
-    glNormal3fv(N044);
-    glVertex3fv(P044);
-    glEnd();
-    glBegin(GL_POLYGON);
-    glNormal3fv(N035);
-    glVertex3fv(P035);
-    glNormal3fv(N036);
-    glVertex3fv(P036);
-    glNormal3fv(N046);
-    glVertex3fv(P046);
-    glNormal3fv(N045);
-    glVertex3fv(P045);
-    glEnd();
-    glBegin(GL_POLYGON);
-    glNormal3fv(N036);
-    glVertex3fv(P036);
-    glNormal3fv(N037);
-    glVertex3fv(P037);
-    glNormal3fv(N047);
-    glVertex3fv(P047);
-    glNormal3fv(N046);
-    glVertex3fv(P046);
-    glEnd();
-    glBegin(GL_POLYGON);
-    glNormal3fv(N037);
-    glVertex3fv(P037);
-    glNormal3fv(N038);
-    glVertex3fv(P038);
-    glNormal3fv(N048);
-    glVertex3fv(P048);
-    glNormal3fv(N047);
-    glVertex3fv(P047);
-    glEnd();
-    glBegin(GL_POLYGON);
-    glNormal3fv(N038);
-    glVertex3fv(P038);
-    glNormal3fv(N039);
-    glVertex3fv(P039);
-    glNormal3fv(N049);
-    glVertex3fv(P049);
-    glNormal3fv(N048);
-    glVertex3fv(P048);
-    glEnd();
-    glBegin(GL_POLYGON);
-    glNormal3fv(N039);
-    glVertex3fv(P039);
-    glNormal3fv(N040);
-    glVertex3fv(P040);
-    glNormal3fv(N050);
-    glVertex3fv(P050);
-    glNormal3fv(N049);
-    glVertex3fv(P049);
-    glEnd();
-    glBegin(GL_POLYGON);
-    glNormal3fv(N070);
-    glVertex3fv(P070);
-    glNormal3fv(N061);
-    glVertex3fv(P061);
-    glNormal3fv(N002);
-    glVertex3fv(P002);
-    glEnd();
-    glBegin(GL_POLYGON);
-    glNormal3fv(N061);
-    glVertex3fv(P061);
-    glNormal3fv(N046);
-    glVertex3fv(P046);
-    glNormal3fv(N002);
-    glVertex3fv(P002);
-    glEnd();
-    glBegin(GL_POLYGON);
-    glNormal3fv(N045);
-    glVertex3fv(P045);
-    glNormal3fv(N046);
-    glVertex3fv(P046);
-    glNormal3fv(N061);
-    glVertex3fv(P061);
-    glEnd();
-    glBegin(GL_POLYGON);
-    glNormal3fv(N002);
-    glVertex3fv(P002);
-    glNormal3fv(N061);
-    glVertex3fv(P061);
-    glNormal3fv(N070);
-    glVertex3fv(P070);
-    glEnd();
-    glBegin(GL_POLYGON);
-    glNormal3fv(N002);
-    glVertex3fv(P002);
-    glNormal3fv(N045);
-    glVertex3fv(P045);
-    glNormal3fv(N061);
-    glVertex3fv(P061);
-    glEnd();
-}
-
-void
-Fish005(void)
-{
-    glBegin(GL_POLYGON);
-    glNormal3fv(N002);
-    glVertex3fv(P002);
-    glNormal3fv(N044);
-    glVertex3fv(P044);
-    glNormal3fv(N045);
-    glVertex3fv(P045);
-    glEnd();
-    glBegin(GL_POLYGON);
-    glNormal3fv(N002);
-    glVertex3fv(P002);
-    glNormal3fv(N043);
-    glVertex3fv(P043);
-    glNormal3fv(N044);
-    glVertex3fv(P044);
-    glEnd();
-    glBegin(GL_POLYGON);
-    glNormal3fv(N002);
-    glVertex3fv(P002);
-    glNormal3fv(N052);
-    glVertex3fv(P052);
-    glNormal3fv(N043);
-    glVertex3fv(P043);
-    glEnd();
-    glBegin(GL_POLYGON);
-    glNormal3fv(N002);
-    glVertex3fv(P002);
-    glNormal3fv(N051);
-    glVertex3fv(P051);
-    glNormal3fv(N052);
-    glVertex3fv(P052);
-    glEnd();
-    glBegin(GL_POLYGON);
-    glNormal3fv(N002);
-    glVertex3fv(P002);
-    glNormal3fv(N046);
-    glVertex3fv(P046);
-    glNormal3fv(N047);
-    glVertex3fv(P047);
-    glEnd();
-    glBegin(GL_POLYGON);
-    glNormal3fv(N002);
-    glVertex3fv(P002);
-    glNormal3fv(N047);
-    glVertex3fv(P047);
-    glNormal3fv(N048);
-    glVertex3fv(P048);
-    glEnd();
-    glBegin(GL_POLYGON);
-    glNormal3fv(N002);
-    glVertex3fv(P002);
-    glNormal3fv(N048);
-    glVertex3fv(P048);
-    glNormal3fv(N049);
-    glVertex3fv(P049);
-    glEnd();
-    glBegin(GL_POLYGON);
-    glNormal3fv(N002);
-    glVertex3fv(P002);
-    glNormal3fv(N049);
-    glVertex3fv(P049);
-    glNormal3fv(N050);
-    glVertex3fv(P050);
-    glEnd();
-    glBegin(GL_POLYGON);
-    glNormal3fv(N050);
-    glVertex3fv(P050);
-    glNormal3fv(N051);
-    glVertex3fv(P051);
-    glNormal3fv(N069);
-    glVertex3fv(P069);
-    glEnd();
-    glBegin(GL_POLYGON);
-    glNormal3fv(N051);
-    glVertex3fv(P051);
-    glNormal3fv(N002);
-    glVertex3fv(P002);
-    glNormal3fv(N069);
-    glVertex3fv(P069);
-    glEnd();
-    glBegin(GL_POLYGON);
-    glNormal3fv(N050);
-    glVertex3fv(P050);
-    glNormal3fv(N069);
-    glVertex3fv(P069);
-    glNormal3fv(N002);
-    glVertex3fv(P002);
-    glEnd();
-}
-
-void
-Fish006(void)
-{
-    glBegin(GL_POLYGON);
-    glNormal3fv(N066);
-    glVertex3fv(P066);
-    glNormal3fv(N016);
-    glVertex3fv(P016);
-    glNormal3fv(N026);
-    glVertex3fv(P026);
-    glEnd();
-    glBegin(GL_POLYGON);
-    glNormal3fv(N015);
-    glVertex3fv(P015);
-    glNormal3fv(N066);
-    glVertex3fv(P066);
-    glNormal3fv(N025);
-    glVertex3fv(P025);
-    glEnd();
-    glBegin(GL_POLYGON);
-    glNormal3fv(N025);
-    glVertex3fv(P025);
-    glNormal3fv(N066);
-    glVertex3fv(P066);
-    glNormal3fv(N026);
-    glVertex3fv(P026);
-    glEnd();
-    glBegin(GL_POLYGON);
-    glNormal3fv(N066);
-    glVertex3fv(P066);
-    glNormal3fv(N058);
-    glVertex3fv(P058);
-    glNormal3fv(N016);
-    glVertex3fv(P016);
-    glEnd();
-    glBegin(GL_POLYGON);
-    glNormal3fv(N015);
-    glVertex3fv(P015);
-    glNormal3fv(N058);
-    glVertex3fv(P058);
-    glNormal3fv(N066);
-    glVertex3fv(P066);
-    glEnd();
-    glBegin(GL_POLYGON);
-    glNormal3fv(N058);
-    glVertex3fv(P058);
-    glNormal3fv(N015);
-    glVertex3fv(P015);
-    glNormal3fv(N016);
-    glVertex3fv(P016);
-    glEnd();
-}
-
-void
-Fish007(void)
-{
-    glBegin(GL_POLYGON);
-    glNormal3fv(N062);
-    glVertex3fv(P062);
-    glNormal3fv(N022);
-    glVertex3fv(P022);
-    glNormal3fv(N032);
-    glVertex3fv(P032);
-    glEnd();
-    glBegin(GL_POLYGON);
-    glNormal3fv(N062);
-    glVertex3fv(P062);
-    glNormal3fv(N032);
-    glVertex3fv(P032);
-    glNormal3fv(N064);
-    glVertex3fv(P064);
-    glEnd();
-    glBegin(GL_POLYGON);
-    glNormal3fv(N022);
-    glVertex3fv(P022);
-    glNormal3fv(N062);
-    glVertex3fv(P062);
-    glNormal3fv(N032);
-    glVertex3fv(P032);
-    glEnd();
-    glBegin(GL_POLYGON);
-    glNormal3fv(N062);
-    glVertex3fv(P062);
-    glNormal3fv(N064);
-    glVertex3fv(P064);
-    glNormal3fv(N032);
-    glVertex3fv(P032);
-    glEnd();
-}
-
-void
-Fish008(void)
-{
-    glBegin(GL_POLYGON);
-    glNormal3fv(N063);
-    glVertex3fv(P063);
-    glNormal3fv(N019);
-    glVertex3fv(P019);
-    glNormal3fv(N029);
-    glVertex3fv(P029);
-    glEnd();
-    glBegin(GL_POLYGON);
-    glNormal3fv(N019);
-    glVertex3fv(P019);
-    glNormal3fv(N063);
-    glVertex3fv(P063);
-    glNormal3fv(N029);
-    glVertex3fv(P029);
-    glEnd();
-    glBegin(GL_POLYGON);
-    glNormal3fv(N063);
-    glVertex3fv(P063);
-    glNormal3fv(N029);
-    glVertex3fv(P029);
-    glNormal3fv(N065);
-    glVertex3fv(P065);
-    glEnd();
-    glBegin(GL_POLYGON);
-    glNormal3fv(N063);
-    glVertex3fv(P063);
-    glNormal3fv(N065);
-    glVertex3fv(P065);
-    glNormal3fv(N029);
-    glVertex3fv(P029);
-    glEnd();
-}
-
-void
-Fish009(void)
-{
-    glBegin(GL_POLYGON);
-    glVertex3fv(P059);
-    glVertex3fv(P012);
-    glVertex3fv(P009);
-    glVertex3fv(P060);
-    glEnd();
-    glBegin(GL_POLYGON);
-    glVertex3fv(P012);
-    glVertex3fv(P004);
-    glVertex3fv(P007);
-    glVertex3fv(P009);
-    glEnd();
-}
-
-void
-Fish_1(void)
-{
-    Fish004();
-    Fish005();
-    Fish003();
-    Fish007();
-    Fish006();
-    Fish002();
-    Fish008();
-    Fish009();
-    Fish001();
-}
-
-void
-Fish_2(void)
-{
-    Fish005();
-    Fish004();
-    Fish003();
-    Fish008();
-    Fish006();
-    Fish002();
-    Fish007();
-    Fish009();
-    Fish001();
-}
-
-void
-Fish_3(void)
-{
-    Fish005();
-    Fish004();
-    Fish007();
-    Fish003();
-    Fish002();
-    Fish008();
-    Fish009();
-    Fish001();
-    Fish006();
-}
-
-void
-Fish_4(void)
-{
-    Fish005();
-    Fish004();
-    Fish008();
-    Fish003();
-    Fish002();
-    Fish007();
-    Fish009();
-    Fish001();
-    Fish006();
-}
-
-void
-Fish_5(void)
-{
-    Fish009();
-    Fish006();
-    Fish007();
-    Fish001();
-    Fish002();
-    Fish003();
-    Fish008();
-    Fish004();
-    Fish005();
-}
-
-void
-Fish_6(void)
-{
-    Fish009();
-    Fish006();
-    Fish008();
-    Fish001();
-    Fish002();
-    Fish007();
-    Fish003();
-    Fish004();
-    Fish005();
-}
-
-void
-Fish_7(void)
-{
-    Fish009();
-    Fish001();
-    Fish007();
-    Fish005();
-    Fish002();
-    Fish008();
-    Fish003();
-    Fish004();
-    Fish006();
-}
-
-void
-Fish_8(void)
-{
-    Fish009();
-    Fish008();
-    Fish001();
-    Fish002();
-    Fish007();
-    Fish003();
-    Fish005();
-    Fish004();
-    Fish006();
-}
-
-void
-DrawShark(fishRec * fish)
-{
-    float mat[4][4];
-    int n;
-    float seg1, seg2, seg3, seg4, segup;
-    float thrash, chomp;
-
-    fish->htail = (int) (fish->htail - (int) (5.0 * fish->v)) % 360;
-
-    thrash = 50.0 * fish->v;
-
-    seg1 = 0.6 * thrash * sin(fish->htail * RRAD);
-    seg2 = 1.8 * thrash * sin((fish->htail + 45.0) * RRAD);
-    seg3 = 3.0 * thrash * sin((fish->htail + 90.0) * RRAD);
-    seg4 = 4.0 * thrash * sin((fish->htail + 110.0) * RRAD);
-
-    chomp = 0.0;
-    if (fish->v > 2.0) {
-        chomp = -(fish->v - 2.0) * 200.0;
-    }
-    P004[1] = iP004[1] + chomp;
-    P007[1] = iP007[1] + chomp;
-    P010[1] = iP010[1] + chomp;
-    P011[1] = iP011[1] + chomp;
-
-    P023[0] = iP023[0] + seg1;
-    P024[0] = iP024[0] + seg1;
-    P025[0] = iP025[0] + seg1;
-    P026[0] = iP026[0] + seg1;
-    P027[0] = iP027[0] + seg1;
-    P028[0] = iP028[0] + seg1;
-    P029[0] = iP029[0] + seg1;
-    P030[0] = iP030[0] + seg1;
-    P031[0] = iP031[0] + seg1;
-    P032[0] = iP032[0] + seg1;
-    P033[0] = iP033[0] + seg2;
-    P034[0] = iP034[0] + seg2;
-    P035[0] = iP035[0] + seg2;
-    P036[0] = iP036[0] + seg2;
-    P037[0] = iP037[0] + seg2;
-    P038[0] = iP038[0] + seg2;
-    P039[0] = iP039[0] + seg2;
-    P040[0] = iP040[0] + seg2;
-    P041[0] = iP041[0] + seg2;
-    P042[0] = iP042[0] + seg2;
-    P043[0] = iP043[0] + seg3;
-    P044[0] = iP044[0] + seg3;
-    P045[0] = iP045[0] + seg3;
-    P046[0] = iP046[0] + seg3;
-    P047[0] = iP047[0] + seg3;
-    P048[0] = iP048[0] + seg3;
-    P049[0] = iP049[0] + seg3;
-    P050[0] = iP050[0] + seg3;
-    P051[0] = iP051[0] + seg3;
-    P052[0] = iP052[0] + seg3;
-    P002[0] = iP002[0] + seg4;
-    P061[0] = iP061[0] + seg4;
-    P069[0] = iP069[0] + seg4;
-    P070[0] = iP070[0] + seg4;
-
-    fish->vtail += ((fish->dtheta - fish->vtail) * 0.1);
-
-    if (fish->vtail > 0.5) {
-        fish->vtail = 0.5;
-    } else if (fish->vtail < -0.5) {
-        fish->vtail = -0.5;
-    }
-    segup = thrash * fish->vtail;
-
-    P023[1] = iP023[1] + segup;
-    P024[1] = iP024[1] + segup;
-    P025[1] = iP025[1] + segup;
-    P026[1] = iP026[1] + segup;
-    P027[1] = iP027[1] + segup;
-    P028[1] = iP028[1] + segup;
-    P029[1] = iP029[1] + segup;
-    P030[1] = iP030[1] + segup;
-    P031[1] = iP031[1] + segup;
-    P032[1] = iP032[1] + segup;
-    P033[1] = iP033[1] + segup * 5.0;
-    P034[1] = iP034[1] + segup * 5.0;
-    P035[1] = iP035[1] + segup * 5.0;
-    P036[1] = iP036[1] + segup * 5.0;
-    P037[1] = iP037[1] + segup * 5.0;
-    P038[1] = iP038[1] + segup * 5.0;
-    P039[1] = iP039[1] + segup * 5.0;
-    P040[1] = iP040[1] + segup * 5.0;
-    P041[1] = iP041[1] + segup * 5.0;
-    P042[1] = iP042[1] + segup * 5.0;
-    P043[1] = iP043[1] + segup * 12.0;
-    P044[1] = iP044[1] + segup * 12.0;
-    P045[1] = iP045[1] + segup * 12.0;
-    P046[1] = iP046[1] + segup * 12.0;
-    P047[1] = iP047[1] + segup * 12.0;
-    P048[1] = iP048[1] + segup * 12.0;
-    P049[1] = iP049[1] + segup * 12.0;
-    P050[1] = iP050[1] + segup * 12.0;
-    P051[1] = iP051[1] + segup * 12.0;
-    P052[1] = iP052[1] + segup * 12.0;
-    P002[1] = iP002[1] + segup * 17.0;
-    P061[1] = iP061[1] + segup * 17.0;
-    P069[1] = iP069[1] + segup * 17.0;
-    P070[1] = iP070[1] + segup * 17.0;
-
-    glPushMatrix();
-
-    glTranslatef(0.0, 0.0, -3000.0);
-
-    glGetFloatv(GL_MODELVIEW_MATRIX, &mat[0][0]);
-    n = 0;
-    if (mat[0][2] >= 0.0) {
-        n += 1;
-    }
-    if (mat[1][2] >= 0.0) {
-        n += 2;
-    }
-    if (mat[2][2] >= 0.0) {
-        n += 4;
-    }
-    glScalef(2.0, 1.0, 1.0);
-
-    glEnable(GL_CULL_FACE);
-    switch (n) {
-    case 0:
-        Fish_1();
-        break;
-    case 1:
-        Fish_2();
-        break;
-    case 2:
-        Fish_3();
-        break;
-    case 3:
-        Fish_4();
-        break;
-    case 4:
-        Fish_5();
-        break;
-    case 5:
-        Fish_6();
-        break;
-    case 6:
-        Fish_7();
-        break;
-    case 7:
-        Fish_8();
-        break;
-    }
-    glDisable(GL_CULL_FACE);
-
-    glPopMatrix();
-}
diff --git a/Xcode/TemplatesForXcodeLeopard/SDL OpenGL Application/atlantis/swim.c b/Xcode/TemplatesForXcodeLeopard/SDL OpenGL Application/atlantis/swim.c
deleted file mode 100644
index cac7b6095..000000000
--- a/Xcode/TemplatesForXcodeLeopard/SDL OpenGL Application/atlantis/swim.c	
+++ /dev/null
@@ -1,188 +0,0 @@
-/**
- * (c) Copyright 1993, 1994, Silicon Graphics, Inc.
- * ALL RIGHTS RESERVED
- * Permission to use, copy, modify, and distribute this software for
- * any purpose and without fee is hereby granted, provided that the above
- * copyright notice appear in all copies and that both the copyright notice
- * and this permission notice appear in supporting documentation, and that
- * the name of Silicon Graphics, Inc. not be used in advertising
- * or publicity pertaining to distribution of the software without specific,
- * written prior permission.
- *
- * THE MATERIAL EMBODIED ON THIS SOFTWARE IS PROVIDED TO YOU "AS-IS"
- * AND WITHOUT WARRANTY OF ANY KIND, EXPRESS, IMPLIED OR OTHERWISE,
- * INCLUDING WITHOUT LIMITATION, ANY WARRANTY OF MERCHANTABILITY OR
- * FITNESS FOR A PARTICULAR PURPOSE.  IN NO EVENT SHALL SILICON
- * GRAPHICS, INC.  BE LIABLE TO YOU OR ANYONE ELSE FOR ANY DIRECT,
- * SPECIAL, INCIDENTAL, INDIRECT OR CONSEQUENTIAL DAMAGES OF ANY
- * KIND, OR ANY DAMAGES WHATSOEVER, INCLUDING WITHOUT LIMITATION,
- * LOSS OF PROFIT, LOSS OF USE, SAVINGS OR REVENUE, OR THE CLAIMS OF
- * THIRD PARTIES, WHETHER OR NOT SILICON GRAPHICS, INC.  HAS BEEN
- * ADVISED OF THE POSSIBILITY OF SUCH LOSS, HOWEVER CAUSED AND ON
- * ANY THEORY OF LIABILITY, ARISING OUT OF OR IN CONNECTION WITH THE
- * POSSESSION, USE OR PERFORMANCE OF THIS SOFTWARE.
- *
- * US Government Users Restricted Rights
- * Use, duplication, or disclosure by the Government is subject to
- * restrictions set forth in FAR 52.227.19(c)(2) or subparagraph
- * (c)(1)(ii) of the Rights in Technical Data and Computer Software
- * clause at DFARS 252.227-7013 and/or in similar or successor
- * clauses in the FAR or the DOD or NASA FAR Supplement.
- * Unpublished-- rights reserved under the copyright laws of the
- * United States.  Contractor/manufacturer is Silicon Graphics,
- * Inc., 2011 N.  Shoreline Blvd., Mountain View, CA 94039-7311.
- *
- * OpenGL(TM) is a trademark of Silicon Graphics, Inc.
- */
-#include 
-#include   /* For rand(). */
-#include 
-#include "atlantis.h"
-
-void
-FishTransform(fishRec * fish)
-{
-
-    glTranslatef(fish->y, fish->z, -fish->x);
-    glRotatef(-fish->psi, 0.0, 1.0, 0.0);
-    glRotatef(fish->theta, 1.0, 0.0, 0.0);
-    glRotatef(-fish->phi, 0.0, 0.0, 1.0);
-}
-
-void
-WhalePilot(fishRec * fish)
-{
-
-    fish->phi = -20.0;
-    fish->theta = 0.0;
-    fish->psi -= 0.5;
-
-    fish->x += WHALESPEED * fish->v * cos(fish->psi / RAD) * cos(fish->theta / RAD);
-    fish->y += WHALESPEED * fish->v * sin(fish->psi / RAD) * cos(fish->theta / RAD);
-    fish->z += WHALESPEED * fish->v * sin(fish->theta / RAD);
-}
-
-void
-SharkPilot(fishRec * fish)
-{
-    static int sign = 1;
-    float X, Y, Z, tpsi, ttheta, thetal;
-
-    fish->xt = 60000.0;
-    fish->yt = 0.0;
-    fish->zt = 0.0;
-
-    X = fish->xt - fish->x;
-    Y = fish->yt - fish->y;
-    Z = fish->zt - fish->z;
-
-    thetal = fish->theta;
-
-    ttheta = RAD * atan(Z / (sqrt(X * X + Y * Y)));
-
-    if (ttheta > fish->theta + 0.25) {
-        fish->theta += 0.5;
-    } else if (ttheta < fish->theta - 0.25) {
-        fish->theta -= 0.5;
-    }
-    if (fish->theta > 90.0) {
-        fish->theta = 90.0;
-    }
-    if (fish->theta < -90.0) {
-        fish->theta = -90.0;
-    }
-    fish->dtheta = fish->theta - thetal;
-
-    tpsi = RAD * atan2(Y, X);
-
-    fish->attack = 0;
-
-    if (fabs(tpsi - fish->psi) < 10.0) {
-        fish->attack = 1;
-    } else if (fabs(tpsi - fish->psi) < 45.0) {
-        if (fish->psi > tpsi) {
-            fish->psi -= 0.5;
-            if (fish->psi < -180.0) {
-                fish->psi += 360.0;
-            }
-        } else if (fish->psi < tpsi) {
-            fish->psi += 0.5;
-            if (fish->psi > 180.0) {
-                fish->psi -= 360.0;
-            }
-        }
-    } else {
-        if (rand() % 100 > 98) {
-            sign = 1 - sign;
-        }
-        fish->psi += sign;
-        if (fish->psi > 180.0) {
-            fish->psi -= 360.0;
-        }
-        if (fish->psi < -180.0) {
-            fish->psi += 360.0;
-        }
-    }
-
-    if (fish->attack) {
-        if (fish->v < 1.1) {
-            fish->spurt = 1;
-        }
-        if (fish->spurt) {
-            fish->v += 0.2;
-        }
-        if (fish->v > 5.0) {
-            fish->spurt = 0;
-        }
-        if ((fish->v > 1.0) && (!fish->spurt)) {
-            fish->v -= 0.2;
-        }
-    } else {
-        if (!(rand() % 400) && (!fish->spurt)) {
-            fish->spurt = 1;
-        }
-        if (fish->spurt) {
-            fish->v += 0.05;
-        }
-        if (fish->v > 3.0) {
-            fish->spurt = 0;
-        }
-        if ((fish->v > 1.0) && (!fish->spurt)) {
-            fish->v -= 0.05;
-        }
-    }
-
-    fish->x += SHARKSPEED * fish->v * cos(fish->psi / RAD) * cos(fish->theta / RAD);
-    fish->y += SHARKSPEED * fish->v * sin(fish->psi / RAD) * cos(fish->theta / RAD);
-    fish->z += SHARKSPEED * fish->v * sin(fish->theta / RAD);
-}
-
-void
-SharkMiss(int i)
-{
-    int j;
-    float avoid, thetal;
-    float X, Y, Z, R;
-
-    for (j = 0; j < NUM_SHARKS; j++) {
-        if (j != i) {
-            X = sharks[j].x - sharks[i].x;
-            Y = sharks[j].y - sharks[i].y;
-            Z = sharks[j].z - sharks[i].z;
-
-            R = sqrt(X * X + Y * Y + Z * Z);
-
-            avoid = 1.0;
-            thetal = sharks[i].theta;
-
-            if (R < SHARKSIZE) {
-                if (Z > 0.0) {
-                    sharks[i].theta -= avoid;
-                } else {
-                    sharks[i].theta += avoid;
-                }
-            }
-            sharks[i].dtheta += (sharks[i].theta - thetal);
-        }
-    }
-}
diff --git a/Xcode/TemplatesForXcodeLeopard/SDL OpenGL Application/atlantis/whale.c b/Xcode/TemplatesForXcodeLeopard/SDL OpenGL Application/atlantis/whale.c
deleted file mode 100644
index 828640ad0..000000000
--- a/Xcode/TemplatesForXcodeLeopard/SDL OpenGL Application/atlantis/whale.c	
+++ /dev/null
@@ -1,1798 +0,0 @@
-/**
- * (c) Copyright 1993, 1994, Silicon Graphics, Inc.
- * ALL RIGHTS RESERVED
- * Permission to use, copy, modify, and distribute this software for
- * any purpose and without fee is hereby granted, provided that the above
- * copyright notice appear in all copies and that both the copyright notice
- * and this permission notice appear in supporting documentation, and that
- * the name of Silicon Graphics, Inc. not be used in advertising
- * or publicity pertaining to distribution of the software without specific,
- * written prior permission.
- *
- * THE MATERIAL EMBODIED ON THIS SOFTWARE IS PROVIDED TO YOU "AS-IS"
- * AND WITHOUT WARRANTY OF ANY KIND, EXPRESS, IMPLIED OR OTHERWISE,
- * INCLUDING WITHOUT LIMITATION, ANY WARRANTY OF MERCHANTABILITY OR
- * FITNESS FOR A PARTICULAR PURPOSE.  IN NO EVENT SHALL SILICON
- * GRAPHICS, INC.  BE LIABLE TO YOU OR ANYONE ELSE FOR ANY DIRECT,
- * SPECIAL, INCIDENTAL, INDIRECT OR CONSEQUENTIAL DAMAGES OF ANY
- * KIND, OR ANY DAMAGES WHATSOEVER, INCLUDING WITHOUT LIMITATION,
- * LOSS OF PROFIT, LOSS OF USE, SAVINGS OR REVENUE, OR THE CLAIMS OF
- * THIRD PARTIES, WHETHER OR NOT SILICON GRAPHICS, INC.  HAS BEEN
- * ADVISED OF THE POSSIBILITY OF SUCH LOSS, HOWEVER CAUSED AND ON
- * ANY THEORY OF LIABILITY, ARISING OUT OF OR IN CONNECTION WITH THE
- * POSSESSION, USE OR PERFORMANCE OF THIS SOFTWARE.
- *
- * US Government Users Restricted Rights
- * Use, duplication, or disclosure by the Government is subject to
- * restrictions set forth in FAR 52.227.19(c)(2) or subparagraph
- * (c)(1)(ii) of the Rights in Technical Data and Computer Software
- * clause at DFARS 252.227-7013 and/or in similar or successor
- * clauses in the FAR or the DOD or NASA FAR Supplement.
- * Unpublished-- rights reserved under the copyright laws of the
- * United States.  Contractor/manufacturer is Silicon Graphics,
- * Inc., 2011 N.  Shoreline Blvd., Mountain View, CA 94039-7311.
- *
- * OpenGL(TM) is a trademark of Silicon Graphics, Inc.
- */
-#include 
-#include 
-#include "atlantis.h"
-/* *INDENT-OFF* */
-static float N001[3] = {0.019249 ,0.011340 ,-0.999750};
-static float N002[3] = {-0.132579 ,0.954547 ,0.266952};
-static float N003[3] = {-0.196061 ,0.980392 ,-0.019778};
-static float N004[3] = {0.695461 ,0.604704 ,0.388158};
-static float N005[3] = {0.870600 ,0.425754 ,0.246557};
-static float N006[3] = {-0.881191 ,0.392012 ,0.264251};
-static float N008[3] = {-0.341437 ,0.887477 ,0.309523};
-static float N009[3] = {0.124035 ,-0.992278 ,0.000000};
-static float N010[3] = {0.242536 ,0.000000 ,-0.970143};
-static float N011[3] = {0.588172 ,0.000000 ,0.808736};
-static float N012[3] = {0.929824 ,-0.340623 ,-0.139298};
-static float N013[3] = {0.954183 ,0.267108 ,-0.134865};
-static float N014[3] = {0.495127 ,0.855436 ,-0.151914};
-static float N015[3] = {-0.390199 ,0.906569 ,-0.160867};
-static float N016[3] = {-0.923605 ,0.354581 ,-0.145692};
-static float N017[3] = {-0.955796 ,-0.260667 ,-0.136036};
-static float N018[3] = {-0.501283 ,-0.853462 ,-0.142540};
-static float N019[3] = {0.405300 ,-0.901974 ,-0.148913};
-static float N020[3] = {0.909913 ,-0.392746 ,-0.133451};
-static float N021[3] = {0.936494 ,0.331147 ,-0.115414};
-static float N022[3] = {0.600131 ,0.793724 ,-0.099222};
-static float N023[3] = {-0.231556 ,0.968361 ,-0.093053};
-static float N024[3] = {-0.844369 ,0.525330 ,-0.105211};
-static float N025[3] = {-0.982725 ,-0.136329 ,-0.125164};
-static float N026[3] = {-0.560844 ,-0.822654 ,-0.093241};
-static float N027[3] = {0.263884 ,-0.959981 ,-0.093817};
-static float N028[3] = {0.842057 ,-0.525192 ,-0.122938};
-static float N029[3] = {0.921620 ,0.367565 ,-0.124546};
-static float N030[3] = {0.613927 ,0.784109 ,-0.090918};
-static float N031[3] = {-0.448754 ,0.888261 ,-0.098037};
-static float N032[3] = {-0.891865 ,0.434376 ,-0.126077};
-static float N033[3] = {-0.881447 ,-0.448017 ,-0.149437};
-static float N034[3] = {-0.345647 ,-0.922057 ,-0.174183};
-static float N035[3] = {0.307998 ,-0.941371 ,-0.137688};
-static float N036[3] = {0.806316 ,-0.574647 ,-0.140124};
-static float N037[3] = {0.961346 ,0.233646 ,-0.145681};
-static float N038[3] = {0.488451 ,0.865586 ,-0.110351};
-static float N039[3] = {-0.374290 ,0.921953 ,-0.099553};
-static float N040[3] = {-0.928504 ,0.344533 ,-0.138485};
-static float N041[3] = {-0.918419 ,-0.371792 ,-0.135189};
-static float N042[3] = {-0.520666 ,-0.833704 ,-0.183968};
-static float N043[3] = {0.339204 ,-0.920273 ,-0.195036};
-static float N044[3] = {0.921475 ,-0.387382 ,-0.028636};
-static float N045[3] = {0.842465 ,0.533335 ,-0.076204};
-static float N046[3] = {0.380110 ,0.924939 ,0.002073};
-static float N047[3] = {-0.276128 ,0.961073 ,-0.009579};
-static float N048[3] = {-0.879684 ,0.473001 ,-0.049250};
-static float N049[3] = {-0.947184 ,-0.317614 ,-0.044321};
-static float N050[3] = {-0.642059 ,-0.764933 ,-0.051363};
-static float N051[3] = {0.466794 ,-0.880921 ,-0.077990};
-static float N052[3] = {0.898509 ,-0.432277 ,0.076279};
-static float N053[3] = {0.938985 ,0.328141 ,0.103109};
-static float N054[3] = {0.442420 ,0.895745 ,0.043647};
-static float N055[3] = {-0.255163 ,0.966723 ,0.018407};
-static float N056[3] = {-0.833769 ,0.540650 ,0.111924};
-static float N057[3] = {-0.953653 ,-0.289939 ,0.080507};
-static float N058[3] = {-0.672357 ,-0.730524 ,0.119461};
-static float N059[3] = {0.522249 ,-0.846652 ,0.102157};
-static float N060[3] = {0.885868 ,-0.427631 ,0.179914};
-static float N062[3] = {0.648942 ,0.743116 ,0.163255};
-static float N063[3] = {-0.578967 ,0.807730 ,0.111219};
-static float N065[3] = {-0.909864 ,-0.352202 ,0.219321};
-static float N066[3] = {-0.502541 ,-0.818090 ,0.279610};
-static float N067[3] = {0.322919 ,-0.915358 ,0.240504};
-static float N068[3] = {0.242536 ,0.000000 ,-0.970143};
-static float N069[3] = {0.000000 ,1.000000 ,0.000000};
-static float N070[3] = {0.000000 ,1.000000 ,0.000000};
-static float N071[3] = {0.000000 ,1.000000 ,0.000000};
-static float N072[3] = {0.000000 ,1.000000 ,0.000000};
-static float N073[3] = {0.000000 ,1.000000 ,0.000000};
-static float N074[3] = {0.000000 ,1.000000 ,0.000000};
-static float N075[3] = {0.031220 ,0.999025 ,-0.031220};
-static float N076[3] = {0.000000 ,1.000000 ,0.000000};
-static float N077[3] = {0.446821 ,0.893642 ,0.041889};
-static float N078[3] = {0.863035 ,-0.100980 ,0.494949};
-static float N079[3] = {0.585597 ,-0.808215 ,0.062174};
-static float N080[3] = {0.000000 ,1.000000 ,0.000000};
-static float N081[3] = {1.000000 ,0.000000 ,0.000000};
-static float N082[3] = {0.000000 ,1.000000 ,0.000000};
-static float N083[3] = {-1.000000 ,0.000000 ,0.000000};
-static float N084[3] = {-0.478893 ,0.837129 ,-0.264343};
-static float N085[3] = {0.000000 ,1.000000 ,0.000000};
-static float N086[3] = {0.763909 ,0.539455 ,-0.354163};
-static float N087[3] = {0.446821 ,0.893642 ,0.041889};
-static float N088[3] = {0.385134 ,-0.908288 ,0.163352};
-static float N089[3] = {-0.605952 ,0.779253 ,-0.159961};
-static float N090[3] = {0.000000 ,1.000000 ,0.000000};
-static float N091[3] = {0.000000 ,1.000000 ,0.000000};
-static float N092[3] = {0.000000 ,1.000000 ,0.000000};
-static float N093[3] = {0.000000 ,1.000000 ,0.000000};
-static float N094[3] = {1.000000 ,0.000000 ,0.000000};
-static float N095[3] = {-1.000000 ,0.000000 ,0.000000};
-static float N096[3] = {0.644444 ,-0.621516 ,0.445433};
-static float N097[3] = {-0.760896 ,-0.474416 ,0.442681};
-static float N098[3] = {0.636888 ,-0.464314 ,0.615456};
-static float N099[3] = {-0.710295 ,0.647038 ,0.277168};
-static float N100[3] = {0.009604 ,0.993655 ,0.112063};
-static float iP001[3] = {18.74, 13.19, 3.76};
-static float P001[3] = {18.74, 13.19, 3.76};
-static float P002[3] = {0.00, 390.42, 10292.57};
-static float P003[3] = {55.80, 622.31, 8254.35};
-static float P004[3] = {20.80, 247.66, 10652.13};
-static float P005[3] = {487.51, 198.05, 9350.78};
-static float P006[3] = {-457.61, 199.04, 9353.01};
-static float P008[3] = {-34.67, 247.64, 10663.71};
-static float iP009[3] = {97.46, 67.63, 593.82};
-static float iP010[3] = {-84.33, 67.63, 588.18};
-static float iP011[3] = {118.69, 8.98, -66.91};
-static float P009[3] = {97.46, 67.63, 593.82};
-static float P010[3] = {-84.33, 67.63, 588.18};
-static float P011[3] = {118.69, 8.98, -66.91};
-static float iP012[3] = {156.48, -31.95, 924.54};
-static float iP013[3] = {162.00, 110.22, 924.54};
-static float iP014[3] = {88.16, 221.65, 924.54};
-static float iP015[3] = {-65.21, 231.16, 924.54};
-static float iP016[3] = {-156.48, 121.97, 924.54};
-static float iP017[3] = {-162.00, -23.93, 924.54};
-static float iP018[3] = {-88.16, -139.10, 924.54};
-static float iP019[3] = {65.21, -148.61, 924.54};
-static float iP020[3] = {246.87, -98.73, 1783.04};
-static float iP021[3] = {253.17, 127.76, 1783.04};
-static float iP022[3] = {132.34, 270.77, 1783.04};
-static float iP023[3] = {-97.88, 285.04, 1783.04};
-static float iP024[3] = {-222.97, 139.80, 1783.04};
-static float iP025[3] = {-225.29, -86.68, 1783.04};
-static float iP026[3] = {-108.44, -224.15, 1783.04};
-static float iP027[3] = {97.88, -221.56, 1783.04};
-static float iP028[3] = {410.55, -200.66, 3213.87};
-static float iP029[3] = {432.19, 148.42, 3213.87};
-static float iP030[3] = {200.66, 410.55, 3213.87};
-static float iP031[3] = {-148.42, 432.19, 3213.87};
-static float iP032[3] = {-407.48, 171.88, 3213.87};
-static float iP033[3] = {-432.19, -148.42, 3213.87};
-static float iP034[3] = {-148.88, -309.74, 3213.87};
-static float iP035[3] = {156.38, -320.17, 3213.87};
-static float iP036[3] = {523.39, -303.81, 4424.57};
-static float iP037[3] = {574.66, 276.84, 4424.57};
-static float iP038[3] = {243.05, 492.50, 4424.57};
-static float iP039[3] = {-191.23, 520.13, 4424.57};
-static float iP040[3] = {-523.39, 304.01, 4424.57};
-static float iP041[3] = {-574.66, -231.83, 4424.57};
-static float iP042[3] = {-266.95, -578.17, 4424.57};
-static float iP043[3] = {211.14, -579.67, 4424.57};
-static float iP044[3] = {680.57, -370.27, 5943.46};
-static float iP045[3] = {834.01, 363.09, 5943.46};
-static float iP046[3] = {371.29, 614.13, 5943.46};
-static float iP047[3] = {-291.43, 621.86, 5943.46};
-static float iP048[3] = {-784.13, 362.60, 5943.46};
-static float iP049[3] = {-743.29, -325.82, 5943.46};
-static float iP050[3] = {-383.24, -804.77, 5943.46};
-static float iP051[3] = {283.47, -846.09, 5943.46};
-static float P012[3] = {156.48, -31.95, 924.54};
-static float P013[3] = {162.00, 110.22, 924.54};
-static float P014[3] = {88.16, 221.65, 924.54};
-static float P015[3] = {-65.21, 231.16, 924.54};
-static float P016[3] = {-156.48, 121.97, 924.54};
-static float P017[3] = {-162.00, -23.93, 924.54};
-static float P018[3] = {-88.16, -139.10, 924.54};
-static float P019[3] = {65.21, -148.61, 924.54};
-static float P020[3] = {246.87, -98.73, 1783.04};
-static float P021[3] = {253.17, 127.76, 1783.04};
-static float P022[3] = {132.34, 270.77, 1783.04};
-static float P023[3] = {-97.88, 285.04, 1783.04};
-static float P024[3] = {-222.97, 139.80, 1783.04};
-static float P025[3] = {-225.29, -86.68, 1783.04};
-static float P026[3] = {-108.44, -224.15, 1783.04};
-static float P027[3] = {97.88, -221.56, 1783.04};
-static float P028[3] = {410.55, -200.66, 3213.87};
-static float P029[3] = {432.19, 148.42, 3213.87};
-static float P030[3] = {200.66, 410.55, 3213.87};
-static float P031[3] = {-148.42, 432.19, 3213.87};
-static float P032[3] = {-407.48, 171.88, 3213.87};
-static float P033[3] = {-432.19, -148.42, 3213.87};
-static float P034[3] = {-148.88, -309.74, 3213.87};
-static float P035[3] = {156.38, -320.17, 3213.87};
-static float P036[3] = {523.39, -303.81, 4424.57};
-static float P037[3] = {574.66, 276.84, 4424.57};
-static float P038[3] = {243.05, 492.50, 4424.57};
-static float P039[3] = {-191.23, 520.13, 4424.57};
-static float P040[3] = {-523.39, 304.01, 4424.57};
-static float P041[3] = {-574.66, -231.83, 4424.57};
-static float P042[3] = {-266.95, -578.17, 4424.57};
-static float P043[3] = {211.14, -579.67, 4424.57};
-static float P044[3] = {680.57, -370.27, 5943.46};
-static float P045[3] = {834.01, 363.09, 5943.46};
-static float P046[3] = {371.29, 614.13, 5943.46};
-static float P047[3] = {-291.43, 621.86, 5943.46};
-static float P048[3] = {-784.13, 362.60, 5943.46};
-static float P049[3] = {-743.29, -325.82, 5943.46};
-static float P050[3] = {-383.24, -804.77, 5943.46};
-static float P051[3] = {283.47, -846.09, 5943.46};
-static float P052[3] = {599.09, -332.24, 7902.59};
-static float P053[3] = {735.48, 306.26, 7911.92};
-static float P054[3] = {321.55, 558.53, 7902.59};
-static float P055[3] = {-260.54, 559.84, 7902.59};
-static float P056[3] = {-698.66, 320.83, 7902.59};
-static float P057[3] = {-643.29, -299.16, 7902.59};
-static float P058[3] = {-341.47, -719.30, 7902.59};
-static float P059[3] = {252.57, -756.12, 7902.59};
-static float P060[3] = {458.39, -265.31, 9355.44};
-static float P062[3] = {224.04, 438.98, 9364.77};
-static float P063[3] = {-165.71, 441.27, 9355.44};
-static float P065[3] = {-473.99, -219.71, 9355.44};
-static float P066[3] = {-211.97, -479.87, 9355.44};
-static float P067[3] = {192.86, -504.03, 9355.44};
-static float iP068[3] = {-112.44, 9.25, -64.42};
-static float iP069[3] = {1155.63, 0.00, -182.46};
-static float iP070[3] = {-1143.13, 0.00, -181.54};
-static float iP071[3] = {1424.23, 0.00, -322.09};
-static float iP072[3] = {-1368.01, 0.00, -310.38};
-static float iP073[3] = {1255.57, 2.31, 114.05};
-static float iP074[3] = {-1149.38, 0.00, 117.12};
-static float iP075[3] = {718.36, 0.00, 433.36};
-static float iP076[3] = {-655.90, 0.00, 433.36};
-static float P068[3] = {-112.44, 9.25, -64.42};
-static float P069[3] = {1155.63, 0.00, -182.46};
-static float P070[3] = {-1143.13, 0.00, -181.54};
-static float P071[3] = {1424.23, 0.00, -322.09};
-static float P072[3] = {-1368.01, 0.00, -310.38};
-static float P073[3] = {1255.57, 2.31, 114.05};
-static float P074[3] = {-1149.38, 0.00, 117.12};
-static float P075[3] = {718.36, 0.00, 433.36};
-static float P076[3] = {-655.90, 0.00, 433.36};
-static float P077[3] = {1058.00, -2.66, 7923.51};
-static float P078[3] = {-1016.51, -15.47, 7902.87};
-static float P079[3] = {-1363.99, -484.50, 7593.38};
-static float P080[3] = {1478.09, -861.47, 7098.12};
-static float P081[3] = {1338.06, -284.68, 7024.15};
-static float P082[3] = {-1545.51, -860.64, 7106.60};
-static float P083[3] = {1063.19, -70.46, 7466.60};
-static float P084[3] = {-1369.18, -288.11, 7015.34};
-static float P085[3] = {1348.44, -482.50, 7591.41};
-static float P086[3] = {-1015.45, -96.80, 7474.86};
-static float P087[3] = {731.04, 148.38, 7682.58};
-static float P088[3] = {-697.03, 151.82, 7668.81};
-static float P089[3] = {-686.82, 157.09, 7922.29};
-static float P090[3] = {724.73, 147.75, 7931.39};
-static float iP091[3] = {0.00, 327.10, 2346.55};
-static float iP092[3] = {0.00, 552.28, 2311.31};
-static float iP093[3] = {0.00, 721.16, 2166.41};
-static float iP094[3] = {0.00, 693.42, 2388.80};
-static float iP095[3] = {0.00, 389.44, 2859.97};
-static float P091[3] = {0.00, 327.10, 2346.55};
-static float P092[3] = {0.00, 552.28, 2311.31};
-static float P093[3] = {0.00, 721.16, 2166.41};
-static float P094[3] = {0.00, 693.42, 2388.80};
-static float P095[3] = {0.00, 389.44, 2859.97};
-static float iP096[3] = {222.02, -183.67, 10266.89};
-static float iP097[3] = {-128.90, -182.70, 10266.89};
-static float iP098[3] = {41.04, 88.31, 10659.36};
-static float iP099[3] = {-48.73, 88.30, 10659.36};
-static float P096[3] = {222.02, -183.67, 10266.89};
-static float P097[3] = {-128.90, -182.70, 10266.89};
-static float P098[3] = {41.04, 88.31, 10659.36};
-static float P099[3] = {-48.73, 88.30, 10659.36};
-static float P100[3] = {0.00, 603.42, 9340.68};
-static float P104[3] = {-9.86, 567.62, 7858.65};
-static float P105[3] = {31.96, 565.27, 7908.46};
-static float P106[3] = {22.75, 568.13, 7782.83};
-static float P107[3] = {58.93, 568.42, 7775.94};
-static float P108[3] = {55.91, 565.59, 7905.86};
-static float P109[3] = {99.21, 566.00, 7858.65};
-static float P110[3] = {-498.83, 148.14, 9135.10};
-static float P111[3] = {-495.46, 133.24, 9158.48};
-static float P112[3] = {-490.82, 146.23, 9182.76};
-static float P113[3] = {-489.55, 174.11, 9183.66};
-static float P114[3] = {-492.92, 189.00, 9160.28};
-static float P115[3] = {-497.56, 176.02, 9136.00};
-static float P116[3] = {526.54, 169.68, 9137.70};
-static float P117[3] = {523.49, 184.85, 9161.42};
-static float P118[3] = {518.56, 171.78, 9186.06};
-static float P119[3] = {516.68, 143.53, 9186.98};
-static float P120[3] = {519.73, 128.36, 9163.26};
-static float P121[3] = {524.66, 141.43, 9138.62};
-/* *INDENT-ON* */
-
-void
-Whale001(void)
-{
-
-    glBegin(GL_POLYGON);
-    glNormal3fv(N001);
-    glVertex3fv(P001);
-    glNormal3fv(N068);
-    glVertex3fv(P068);
-    glNormal3fv(N010);
-    glVertex3fv(P010);
-    glEnd();
-    glBegin(GL_POLYGON);
-    glNormal3fv(N068);
-    glVertex3fv(P068);
-    glNormal3fv(N076);
-    glVertex3fv(P076);
-    glNormal3fv(N010);
-    glVertex3fv(P010);
-    glEnd();
-    glBegin(GL_POLYGON);
-    glNormal3fv(N068);
-    glVertex3fv(P068);
-    glNormal3fv(N070);
-    glVertex3fv(P070);
-    glNormal3fv(N076);
-    glVertex3fv(P076);
-    glEnd();
-    glBegin(GL_POLYGON);
-    glNormal3fv(N076);
-    glVertex3fv(P076);
-    glNormal3fv(N070);
-    glVertex3fv(P070);
-    glNormal3fv(N074);
-    glVertex3fv(P074);
-    glEnd();
-    glBegin(GL_POLYGON);
-    glNormal3fv(N070);
-    glVertex3fv(P070);
-    glNormal3fv(N072);
-    glVertex3fv(P072);
-    glNormal3fv(N074);
-    glVertex3fv(P074);
-    glEnd();
-    glBegin(GL_POLYGON);
-    glNormal3fv(N072);
-    glVertex3fv(P072);
-    glNormal3fv(N070);
-    glVertex3fv(P070);
-    glNormal3fv(N074);
-    glVertex3fv(P074);
-    glEnd();
-    glBegin(GL_POLYGON);
-    glNormal3fv(N074);
-    glVertex3fv(P074);
-    glNormal3fv(N070);
-    glVertex3fv(P070);
-    glNormal3fv(N076);
-    glVertex3fv(P076);
-    glEnd();
-    glBegin(GL_POLYGON);
-    glNormal3fv(N070);
-    glVertex3fv(P070);
-    glNormal3fv(N068);
-    glVertex3fv(P068);
-    glNormal3fv(N076);
-    glVertex3fv(P076);
-    glEnd();
-    glBegin(GL_POLYGON);
-    glNormal3fv(N076);
-    glVertex3fv(P076);
-    glNormal3fv(N068);
-    glVertex3fv(P068);
-    glNormal3fv(N010);
-    glVertex3fv(P010);
-    glEnd();
-    glBegin(GL_POLYGON);
-    glNormal3fv(N068);
-    glVertex3fv(P068);
-    glNormal3fv(N001);
-    glVertex3fv(P001);
-    glNormal3fv(N010);
-    glVertex3fv(P010);
-    glEnd();
-}
-
-void
-Whale002(void)
-{
-    glBegin(GL_POLYGON);
-    glNormal3fv(N011);
-    glVertex3fv(P011);
-    glNormal3fv(N001);
-    glVertex3fv(P001);
-    glNormal3fv(N009);
-    glVertex3fv(P009);
-    glEnd();
-    glBegin(GL_POLYGON);
-    glNormal3fv(N075);
-    glVertex3fv(P075);
-    glNormal3fv(N011);
-    glVertex3fv(P011);
-    glNormal3fv(N009);
-    glVertex3fv(P009);
-    glEnd();
-    glBegin(GL_POLYGON);
-    glNormal3fv(N069);
-    glVertex3fv(P069);
-    glNormal3fv(N011);
-    glVertex3fv(P011);
-    glNormal3fv(N075);
-    glVertex3fv(P075);
-    glEnd();
-    glBegin(GL_POLYGON);
-    glNormal3fv(N069);
-    glVertex3fv(P069);
-    glNormal3fv(N075);
-    glVertex3fv(P075);
-    glNormal3fv(N073);
-    glVertex3fv(P073);
-    glEnd();
-    glBegin(GL_POLYGON);
-    glNormal3fv(N071);
-    glVertex3fv(P071);
-    glNormal3fv(N069);
-    glVertex3fv(P069);
-    glNormal3fv(N073);
-    glVertex3fv(P073);
-    glEnd();
-    glBegin(GL_POLYGON);
-    glNormal3fv(N001);
-    glVertex3fv(P001);
-    glNormal3fv(N011);
-    glVertex3fv(P011);
-    glNormal3fv(N009);
-    glVertex3fv(P009);
-    glEnd();
-    glBegin(GL_POLYGON);
-    glNormal3fv(N009);
-    glVertex3fv(P009);
-    glNormal3fv(N011);
-    glVertex3fv(P011);
-    glNormal3fv(N075);
-    glVertex3fv(P075);
-    glEnd();
-    glBegin(GL_POLYGON);
-    glNormal3fv(N011);
-    glVertex3fv(P011);
-    glNormal3fv(N069);
-    glVertex3fv(P069);
-    glNormal3fv(N075);
-    glVertex3fv(P075);
-    glEnd();
-    glBegin(GL_POLYGON);
-    glNormal3fv(N069);
-    glVertex3fv(P069);
-    glNormal3fv(N073);
-    glVertex3fv(P073);
-    glNormal3fv(N075);
-    glVertex3fv(P075);
-    glEnd();
-    glBegin(GL_POLYGON);
-    glNormal3fv(N069);
-    glVertex3fv(P069);
-    glNormal3fv(N071);
-    glVertex3fv(P071);
-    glNormal3fv(N073);
-    glVertex3fv(P073);
-    glEnd();
-}
-
-void
-Whale003(void)
-{
-    glBegin(GL_POLYGON);
-    glNormal3fv(N018);
-    glVertex3fv(P018);
-    glNormal3fv(N001);
-    glVertex3fv(P001);
-    glNormal3fv(N019);
-    glVertex3fv(P019);
-    glEnd();
-    glBegin(GL_POLYGON);
-    glNormal3fv(N019);
-    glVertex3fv(P019);
-    glNormal3fv(N001);
-    glVertex3fv(P001);
-    glNormal3fv(N012);
-    glVertex3fv(P012);
-    glEnd();
-    glBegin(GL_POLYGON);
-    glNormal3fv(N017);
-    glVertex3fv(P017);
-    glNormal3fv(N001);
-    glVertex3fv(P001);
-    glNormal3fv(N018);
-    glVertex3fv(P018);
-    glEnd();
-    glBegin(GL_POLYGON);
-    glNormal3fv(N001);
-    glVertex3fv(P001);
-    glNormal3fv(N017);
-    glVertex3fv(P017);
-    glNormal3fv(N016);
-    glVertex3fv(P016);
-    glEnd();
-    glBegin(GL_POLYGON);
-    glNormal3fv(N001);
-    glVertex3fv(P001);
-    glNormal3fv(N013);
-    glVertex3fv(P013);
-    glNormal3fv(N012);
-    glVertex3fv(P012);
-    glEnd();
-    glBegin(GL_POLYGON);
-    glNormal3fv(N001);
-    glVertex3fv(P001);
-    glNormal3fv(N016);
-    glVertex3fv(P016);
-    glNormal3fv(N015);
-    glVertex3fv(P015);
-    glEnd();
-    glBegin(GL_POLYGON);
-    glNormal3fv(N001);
-    glVertex3fv(P001);
-    glNormal3fv(N014);
-    glVertex3fv(P014);
-    glNormal3fv(N013);
-    glVertex3fv(P013);
-    glEnd();
-    glBegin(GL_POLYGON);
-    glNormal3fv(N001);
-    glVertex3fv(P001);
-    glNormal3fv(N015);
-    glVertex3fv(P015);
-    glNormal3fv(N014);
-    glVertex3fv(P014);
-    glEnd();
-}
-
-void
-Whale004(void)
-{
-    glBegin(GL_POLYGON);
-    glNormal3fv(N014);
-    glVertex3fv(P014);
-    glNormal3fv(N015);
-    glVertex3fv(P015);
-    glNormal3fv(N023);
-    glVertex3fv(P023);
-    glNormal3fv(N022);
-    glVertex3fv(P022);
-    glEnd();
-    glBegin(GL_POLYGON);
-    glNormal3fv(N015);
-    glVertex3fv(P015);
-    glNormal3fv(N016);
-    glVertex3fv(P016);
-    glNormal3fv(N024);
-    glVertex3fv(P024);
-    glNormal3fv(N023);
-    glVertex3fv(P023);
-    glEnd();
-    glBegin(GL_POLYGON);
-    glNormal3fv(N016);
-    glVertex3fv(P016);
-    glNormal3fv(N017);
-    glVertex3fv(P017);
-    glNormal3fv(N025);
-    glVertex3fv(P025);
-    glNormal3fv(N024);
-    glVertex3fv(P024);
-    glEnd();
-    glBegin(GL_POLYGON);
-    glNormal3fv(N017);
-    glVertex3fv(P017);
-    glNormal3fv(N018);
-    glVertex3fv(P018);
-    glNormal3fv(N026);
-    glVertex3fv(P026);
-    glNormal3fv(N025);
-    glVertex3fv(P025);
-    glEnd();
-    glBegin(GL_POLYGON);
-    glNormal3fv(N013);
-    glVertex3fv(P013);
-    glNormal3fv(N014);
-    glVertex3fv(P014);
-    glNormal3fv(N022);
-    glVertex3fv(P022);
-    glNormal3fv(N021);
-    glVertex3fv(P021);
-    glEnd();
-    glBegin(GL_POLYGON);
-    glNormal3fv(N012);
-    glVertex3fv(P012);
-    glNormal3fv(N013);
-    glVertex3fv(P013);
-    glNormal3fv(N021);
-    glVertex3fv(P021);
-    glNormal3fv(N020);
-    glVertex3fv(P020);
-    glEnd();
-    glBegin(GL_POLYGON);
-    glNormal3fv(N018);
-    glVertex3fv(P018);
-    glNormal3fv(N019);
-    glVertex3fv(P019);
-    glNormal3fv(N027);
-    glVertex3fv(P027);
-    glNormal3fv(N026);
-    glVertex3fv(P026);
-    glEnd();
-    glBegin(GL_POLYGON);
-    glNormal3fv(N019);
-    glVertex3fv(P019);
-    glNormal3fv(N012);
-    glVertex3fv(P012);
-    glNormal3fv(N020);
-    glVertex3fv(P020);
-    glNormal3fv(N027);
-    glVertex3fv(P027);
-    glEnd();
-}
-
-void
-Whale005(void)
-{
-    glBegin(GL_POLYGON);
-    glNormal3fv(N022);
-    glVertex3fv(P022);
-    glNormal3fv(N023);
-    glVertex3fv(P023);
-    glNormal3fv(N031);
-    glVertex3fv(P031);
-    glNormal3fv(N030);
-    glVertex3fv(P030);
-    glEnd();
-    glBegin(GL_POLYGON);
-    glNormal3fv(N021);
-    glVertex3fv(P021);
-    glNormal3fv(N022);
-    glVertex3fv(P022);
-    glNormal3fv(N030);
-    glVertex3fv(P030);
-    glEnd();
-    glBegin(GL_POLYGON);
-    glNormal3fv(N021);
-    glVertex3fv(P021);
-    glNormal3fv(N030);
-    glVertex3fv(P030);
-    glNormal3fv(N029);
-    glVertex3fv(P029);
-    glEnd();
-    glBegin(GL_POLYGON);
-    glNormal3fv(N023);
-    glVertex3fv(P023);
-    glNormal3fv(N024);
-    glVertex3fv(P024);
-    glNormal3fv(N031);
-    glVertex3fv(P031);
-    glEnd();
-    glBegin(GL_POLYGON);
-    glNormal3fv(N024);
-    glVertex3fv(P024);
-    glNormal3fv(N032);
-    glVertex3fv(P032);
-    glNormal3fv(N031);
-    glVertex3fv(P031);
-    glEnd();
-    glBegin(GL_POLYGON);
-    glNormal3fv(N024);
-    glVertex3fv(P024);
-    glNormal3fv(N025);
-    glVertex3fv(P025);
-    glNormal3fv(N032);
-    glVertex3fv(P032);
-    glEnd();
-    glBegin(GL_POLYGON);
-    glNormal3fv(N025);
-    glVertex3fv(P025);
-    glNormal3fv(N033);
-    glVertex3fv(P033);
-    glNormal3fv(N032);
-    glVertex3fv(P032);
-    glEnd();
-    glBegin(GL_POLYGON);
-    glNormal3fv(N020);
-    glVertex3fv(P020);
-    glNormal3fv(N021);
-    glVertex3fv(P021);
-    glNormal3fv(N029);
-    glVertex3fv(P029);
-    glEnd();
-    glBegin(GL_POLYGON);
-    glNormal3fv(N020);
-    glVertex3fv(P020);
-    glNormal3fv(N029);
-    glVertex3fv(P029);
-    glNormal3fv(N028);
-    glVertex3fv(P028);
-    glEnd();
-    glBegin(GL_POLYGON);
-    glNormal3fv(N027);
-    glVertex3fv(P027);
-    glNormal3fv(N020);
-    glVertex3fv(P020);
-    glNormal3fv(N028);
-    glVertex3fv(P028);
-    glEnd();
-    glBegin(GL_POLYGON);
-    glNormal3fv(N027);
-    glVertex3fv(P027);
-    glNormal3fv(N028);
-    glVertex3fv(P028);
-    glNormal3fv(N035);
-    glVertex3fv(P035);
-    glEnd();
-    glBegin(GL_POLYGON);
-    glNormal3fv(N025);
-    glVertex3fv(P025);
-    glNormal3fv(N026);
-    glVertex3fv(P026);
-    glNormal3fv(N033);
-    glVertex3fv(P033);
-    glEnd();
-    glBegin(GL_POLYGON);
-    glNormal3fv(N033);
-    glVertex3fv(P033);
-    glNormal3fv(N026);
-    glVertex3fv(P026);
-    glNormal3fv(N034);
-    glVertex3fv(P034);
-    glEnd();
-    glBegin(GL_POLYGON);
-    glNormal3fv(N026);
-    glVertex3fv(P026);
-    glNormal3fv(N027);
-    glVertex3fv(P027);
-    glNormal3fv(N035);
-    glVertex3fv(P035);
-    glNormal3fv(N034);
-    glVertex3fv(P034);
-    glEnd();
-}
-
-void
-Whale006(void)
-{
-    glBegin(GL_POLYGON);
-    glNormal3fv(N092);
-    glVertex3fv(P092);
-    glNormal3fv(N093);
-    glVertex3fv(P093);
-    glNormal3fv(N094);
-    glVertex3fv(P094);
-    glEnd();
-    glBegin(GL_POLYGON);
-    glNormal3fv(N093);
-    glVertex3fv(P093);
-    glNormal3fv(N092);
-    glVertex3fv(P092);
-    glNormal3fv(N094);
-    glVertex3fv(P094);
-    glEnd();
-    glBegin(GL_POLYGON);
-    glNormal3fv(N092);
-    glVertex3fv(P092);
-    glNormal3fv(N091);
-    glVertex3fv(P091);
-    glNormal3fv(N095);
-    glVertex3fv(P095);
-    glNormal3fv(N094);
-    glVertex3fv(P094);
-    glEnd();
-    glBegin(GL_POLYGON);
-    glNormal3fv(N091);
-    glVertex3fv(P091);
-    glNormal3fv(N092);
-    glVertex3fv(P092);
-    glNormal3fv(N094);
-    glVertex3fv(P094);
-    glNormal3fv(N095);
-    glVertex3fv(P095);
-    glEnd();
-}
-
-void
-Whale007(void)
-{
-    glBegin(GL_POLYGON);
-    glNormal3fv(N030);
-    glVertex3fv(P030);
-    glNormal3fv(N031);
-    glVertex3fv(P031);
-    glNormal3fv(N039);
-    glVertex3fv(P039);
-    glNormal3fv(N038);
-    glVertex3fv(P038);
-    glEnd();
-    glBegin(GL_POLYGON);
-    glNormal3fv(N029);
-    glVertex3fv(P029);
-    glNormal3fv(N030);
-    glVertex3fv(P030);
-    glNormal3fv(N038);
-    glVertex3fv(P038);
-    glEnd();
-    glBegin(GL_POLYGON);
-    glNormal3fv(N029);
-    glVertex3fv(P029);
-    glNormal3fv(N038);
-    glVertex3fv(P038);
-    glNormal3fv(N037);
-    glVertex3fv(P037);
-    glEnd();
-    glBegin(GL_POLYGON);
-    glNormal3fv(N028);
-    glVertex3fv(P028);
-    glNormal3fv(N029);
-    glVertex3fv(P029);
-    glNormal3fv(N037);
-    glVertex3fv(P037);
-    glEnd();
-    glBegin(GL_POLYGON);
-    glNormal3fv(N028);
-    glVertex3fv(P028);
-    glNormal3fv(N037);
-    glVertex3fv(P037);
-    glNormal3fv(N036);
-    glVertex3fv(P036);
-    glEnd();
-    glBegin(GL_POLYGON);
-    glNormal3fv(N035);
-    glVertex3fv(P035);
-    glNormal3fv(N028);
-    glVertex3fv(P028);
-    glNormal3fv(N036);
-    glVertex3fv(P036);
-    glEnd();
-    glBegin(GL_POLYGON);
-    glNormal3fv(N035);
-    glVertex3fv(P035);
-    glNormal3fv(N036);
-    glVertex3fv(P036);
-    glNormal3fv(N043);
-    glVertex3fv(P043);
-    glEnd();
-    glBegin(GL_POLYGON);
-    glNormal3fv(N034);
-    glVertex3fv(P034);
-    glNormal3fv(N035);
-    glVertex3fv(P035);
-    glNormal3fv(N043);
-    glVertex3fv(P043);
-    glNormal3fv(N042);
-    glVertex3fv(P042);
-    glEnd();
-    glBegin(GL_POLYGON);
-    glNormal3fv(N033);
-    glVertex3fv(P033);
-    glNormal3fv(N034);
-    glVertex3fv(P034);
-    glNormal3fv(N042);
-    glVertex3fv(P042);
-    glEnd();
-    glBegin(GL_POLYGON);
-    glNormal3fv(N033);
-    glVertex3fv(P033);
-    glNormal3fv(N042);
-    glVertex3fv(P042);
-    glNormal3fv(N041);
-    glVertex3fv(P041);
-    glEnd();
-    glBegin(GL_POLYGON);
-    glNormal3fv(N031);
-    glVertex3fv(P031);
-    glNormal3fv(N032);
-    glVertex3fv(P032);
-    glNormal3fv(N039);
-    glVertex3fv(P039);
-    glEnd();
-    glBegin(GL_POLYGON);
-    glNormal3fv(N039);
-    glVertex3fv(P039);
-    glNormal3fv(N032);
-    glVertex3fv(P032);
-    glNormal3fv(N040);
-    glVertex3fv(P040);
-    glEnd();
-    glBegin(GL_POLYGON);
-    glNormal3fv(N032);
-    glVertex3fv(P032);
-    glNormal3fv(N033);
-    glVertex3fv(P033);
-    glNormal3fv(N040);
-    glVertex3fv(P040);
-    glEnd();
-    glBegin(GL_POLYGON);
-    glNormal3fv(N040);
-    glVertex3fv(P040);
-    glNormal3fv(N033);
-    glVertex3fv(P033);
-    glNormal3fv(N041);
-    glVertex3fv(P041);
-    glEnd();
-}
-
-void
-Whale008(void)
-{
-    glBegin(GL_POLYGON);
-    glNormal3fv(N042);
-    glVertex3fv(P042);
-    glNormal3fv(N043);
-    glVertex3fv(P043);
-    glNormal3fv(N051);
-    glVertex3fv(P051);
-    glNormal3fv(N050);
-    glVertex3fv(P050);
-    glEnd();
-    glBegin(GL_POLYGON);
-    glNormal3fv(N043);
-    glVertex3fv(P043);
-    glNormal3fv(N036);
-    glVertex3fv(P036);
-    glNormal3fv(N051);
-    glVertex3fv(P051);
-    glEnd();
-    glBegin(GL_POLYGON);
-    glNormal3fv(N051);
-    glVertex3fv(P051);
-    glNormal3fv(N036);
-    glVertex3fv(P036);
-    glNormal3fv(N044);
-    glVertex3fv(P044);
-    glEnd();
-    glBegin(GL_POLYGON);
-    glNormal3fv(N041);
-    glVertex3fv(P041);
-    glNormal3fv(N042);
-    glVertex3fv(P042);
-    glNormal3fv(N050);
-    glVertex3fv(P050);
-    glEnd();
-    glBegin(GL_POLYGON);
-    glNormal3fv(N041);
-    glVertex3fv(P041);
-    glNormal3fv(N050);
-    glVertex3fv(P050);
-    glNormal3fv(N049);
-    glVertex3fv(P049);
-    glEnd();
-    glBegin(GL_POLYGON);
-    glNormal3fv(N036);
-    glVertex3fv(P036);
-    glNormal3fv(N037);
-    glVertex3fv(P037);
-    glNormal3fv(N044);
-    glVertex3fv(P044);
-    glEnd();
-    glBegin(GL_POLYGON);
-    glNormal3fv(N044);
-    glVertex3fv(P044);
-    glNormal3fv(N037);
-    glVertex3fv(P037);
-    glNormal3fv(N045);
-    glVertex3fv(P045);
-    glEnd();
-    glBegin(GL_POLYGON);
-    glNormal3fv(N040);
-    glVertex3fv(P040);
-    glNormal3fv(N041);
-    glVertex3fv(P041);
-    glNormal3fv(N049);
-    glVertex3fv(P049);
-    glEnd();
-    glBegin(GL_POLYGON);
-    glNormal3fv(N040);
-    glVertex3fv(P040);
-    glNormal3fv(N049);
-    glVertex3fv(P049);
-    glNormal3fv(N048);
-    glVertex3fv(P048);
-    glEnd();
-    glBegin(GL_POLYGON);
-    glNormal3fv(N039);
-    glVertex3fv(P039);
-    glNormal3fv(N040);
-    glVertex3fv(P040);
-    glNormal3fv(N048);
-    glVertex3fv(P048);
-    glEnd();
-    glBegin(GL_POLYGON);
-    glNormal3fv(N039);
-    glVertex3fv(P039);
-    glNormal3fv(N048);
-    glVertex3fv(P048);
-    glNormal3fv(N047);
-    glVertex3fv(P047);
-    glEnd();
-    glBegin(GL_POLYGON);
-    glNormal3fv(N037);
-    glVertex3fv(P037);
-    glNormal3fv(N038);
-    glVertex3fv(P038);
-    glNormal3fv(N045);
-    glVertex3fv(P045);
-    glEnd();
-    glBegin(GL_POLYGON);
-    glNormal3fv(N038);
-    glVertex3fv(P038);
-    glNormal3fv(N046);
-    glVertex3fv(P046);
-    glNormal3fv(N045);
-    glVertex3fv(P045);
-    glEnd();
-    glBegin(GL_POLYGON);
-    glNormal3fv(N038);
-    glVertex3fv(P038);
-    glNormal3fv(N039);
-    glVertex3fv(P039);
-    glNormal3fv(N047);
-    glVertex3fv(P047);
-    glNormal3fv(N046);
-    glVertex3fv(P046);
-    glEnd();
-}
-
-void
-Whale009(void)
-{
-    glBegin(GL_POLYGON);
-    glNormal3fv(N050);
-    glVertex3fv(P050);
-    glNormal3fv(N051);
-    glVertex3fv(P051);
-    glNormal3fv(N059);
-    glVertex3fv(P059);
-    glNormal3fv(N058);
-    glVertex3fv(P058);
-    glEnd();
-    glBegin(GL_POLYGON);
-    glNormal3fv(N051);
-    glVertex3fv(P051);
-    glNormal3fv(N044);
-    glVertex3fv(P044);
-    glNormal3fv(N059);
-    glVertex3fv(P059);
-    glEnd();
-    glBegin(GL_POLYGON);
-    glNormal3fv(N059);
-    glVertex3fv(P059);
-    glNormal3fv(N044);
-    glVertex3fv(P044);
-    glNormal3fv(N052);
-    glVertex3fv(P052);
-    glEnd();
-    glBegin(GL_POLYGON);
-    glNormal3fv(N044);
-    glVertex3fv(P044);
-    glNormal3fv(N045);
-    glVertex3fv(P045);
-    glNormal3fv(N053);
-    glVertex3fv(P053);
-    glEnd();
-    glBegin(GL_POLYGON);
-    glNormal3fv(N044);
-    glVertex3fv(P044);
-    glNormal3fv(N053);
-    glVertex3fv(P053);
-    glNormal3fv(N052);
-    glVertex3fv(P052);
-    glEnd();
-    glBegin(GL_POLYGON);
-    glNormal3fv(N049);
-    glVertex3fv(P049);
-    glNormal3fv(N050);
-    glVertex3fv(P050);
-    glNormal3fv(N058);
-    glVertex3fv(P058);
-    glEnd();
-    glBegin(GL_POLYGON);
-    glNormal3fv(N049);
-    glVertex3fv(P049);
-    glNormal3fv(N058);
-    glVertex3fv(P058);
-    glNormal3fv(N057);
-    glVertex3fv(P057);
-    glEnd();
-    glBegin(GL_POLYGON);
-    glNormal3fv(N048);
-    glVertex3fv(P048);
-    glNormal3fv(N049);
-    glVertex3fv(P049);
-    glNormal3fv(N057);
-    glVertex3fv(P057);
-    glEnd();
-    glBegin(GL_POLYGON);
-    glNormal3fv(N048);
-    glVertex3fv(P048);
-    glNormal3fv(N057);
-    glVertex3fv(P057);
-    glNormal3fv(N056);
-    glVertex3fv(P056);
-    glEnd();
-    glBegin(GL_POLYGON);
-    glNormal3fv(N047);
-    glVertex3fv(P047);
-    glNormal3fv(N048);
-    glVertex3fv(P048);
-    glNormal3fv(N056);
-    glVertex3fv(P056);
-    glEnd();
-    glBegin(GL_POLYGON);
-    glNormal3fv(N047);
-    glVertex3fv(P047);
-    glNormal3fv(N056);
-    glVertex3fv(P056);
-    glNormal3fv(N055);
-    glVertex3fv(P055);
-    glEnd();
-    glBegin(GL_POLYGON);
-    glNormal3fv(N045);
-    glVertex3fv(P045);
-    glNormal3fv(N046);
-    glVertex3fv(P046);
-    glNormal3fv(N053);
-    glVertex3fv(P053);
-    glEnd();
-    glBegin(GL_POLYGON);
-    glNormal3fv(N046);
-    glVertex3fv(P046);
-    glNormal3fv(N054);
-    glVertex3fv(P054);
-    glNormal3fv(N053);
-    glVertex3fv(P053);
-    glEnd();
-    glBegin(GL_POLYGON);
-    glNormal3fv(N046);
-    glVertex3fv(P046);
-    glNormal3fv(N047);
-    glVertex3fv(P047);
-    glNormal3fv(N055);
-    glVertex3fv(P055);
-    glNormal3fv(N054);
-    glVertex3fv(P054);
-    glEnd();
-}
-
-void
-Whale010(void)
-{
-    glBegin(GL_POLYGON);
-    glNormal3fv(N080);
-    glVertex3fv(P080);
-    glNormal3fv(N081);
-    glVertex3fv(P081);
-    glNormal3fv(N085);
-    glVertex3fv(P085);
-    glEnd();
-    glBegin(GL_POLYGON);
-    glNormal3fv(N081);
-    glVertex3fv(P081);
-    glNormal3fv(N083);
-    glVertex3fv(P083);
-    glNormal3fv(N085);
-    glVertex3fv(P085);
-    glEnd();
-    glBegin(GL_POLYGON);
-    glNormal3fv(N085);
-    glVertex3fv(P085);
-    glNormal3fv(N083);
-    glVertex3fv(P083);
-    glNormal3fv(N077);
-    glVertex3fv(P077);
-    glEnd();
-    glBegin(GL_POLYGON);
-    glNormal3fv(N083);
-    glVertex3fv(P083);
-    glNormal3fv(N087);
-    glVertex3fv(P087);
-    glNormal3fv(N077);
-    glVertex3fv(P077);
-    glEnd();
-    glBegin(GL_POLYGON);
-    glNormal3fv(N077);
-    glVertex3fv(P077);
-    glNormal3fv(N087);
-    glVertex3fv(P087);
-    glNormal3fv(N090);
-    glVertex3fv(P090);
-    glEnd();
-    glBegin(GL_POLYGON);
-    glNormal3fv(N081);
-    glVertex3fv(P081);
-    glNormal3fv(N080);
-    glVertex3fv(P080);
-    glNormal3fv(N085);
-    glVertex3fv(P085);
-    glEnd();
-    glBegin(GL_POLYGON);
-    glNormal3fv(N083);
-    glVertex3fv(P083);
-    glNormal3fv(N081);
-    glVertex3fv(P081);
-    glNormal3fv(N085);
-    glVertex3fv(P085);
-    glEnd();
-    glBegin(GL_POLYGON);
-    glNormal3fv(N083);
-    glVertex3fv(P083);
-    glNormal3fv(N085);
-    glVertex3fv(P085);
-    glNormal3fv(N077);
-    glVertex3fv(P077);
-    glEnd();
-    glBegin(GL_POLYGON);
-    glNormal3fv(N087);
-    glVertex3fv(P087);
-    glNormal3fv(N083);
-    glVertex3fv(P083);
-    glNormal3fv(N077);
-    glVertex3fv(P077);
-    glEnd();
-    glBegin(GL_POLYGON);
-    glNormal3fv(N087);
-    glVertex3fv(P087);
-    glNormal3fv(N077);
-    glVertex3fv(P077);
-    glNormal3fv(N090);
-    glVertex3fv(P090);
-    glEnd();
-}
-
-void
-Whale011(void)
-{
-    glBegin(GL_POLYGON);
-    glNormal3fv(N082);
-    glVertex3fv(P082);
-    glNormal3fv(N084);
-    glVertex3fv(P084);
-    glNormal3fv(N079);
-    glVertex3fv(P079);
-    glEnd();
-    glBegin(GL_POLYGON);
-    glNormal3fv(N084);
-    glVertex3fv(P084);
-    glNormal3fv(N086);
-    glVertex3fv(P086);
-    glNormal3fv(N079);
-    glVertex3fv(P079);
-    glEnd();
-    glBegin(GL_POLYGON);
-    glNormal3fv(N079);
-    glVertex3fv(P079);
-    glNormal3fv(N086);
-    glVertex3fv(P086);
-    glNormal3fv(N078);
-    glVertex3fv(P078);
-    glEnd();
-    glBegin(GL_POLYGON);
-    glNormal3fv(N086);
-    glVertex3fv(P086);
-    glNormal3fv(N088);
-    glVertex3fv(P088);
-    glNormal3fv(N078);
-    glVertex3fv(P078);
-    glEnd();
-    glBegin(GL_POLYGON);
-    glNormal3fv(N078);
-    glVertex3fv(P078);
-    glNormal3fv(N088);
-    glVertex3fv(P088);
-    glNormal3fv(N089);
-    glVertex3fv(P089);
-    glEnd();
-    glBegin(GL_POLYGON);
-    glNormal3fv(N088);
-    glVertex3fv(P088);
-    glNormal3fv(N086);
-    glVertex3fv(P086);
-    glNormal3fv(N089);
-    glVertex3fv(P089);
-    glEnd();
-    glBegin(GL_POLYGON);
-    glNormal3fv(N089);
-    glVertex3fv(P089);
-    glNormal3fv(N086);
-    glVertex3fv(P086);
-    glNormal3fv(N078);
-    glVertex3fv(P078);
-    glEnd();
-    glBegin(GL_POLYGON);
-    glNormal3fv(N086);
-    glVertex3fv(P086);
-    glNormal3fv(N084);
-    glVertex3fv(P084);
-    glNormal3fv(N078);
-    glVertex3fv(P078);
-    glEnd();
-    glBegin(GL_POLYGON);
-    glNormal3fv(N078);
-    glVertex3fv(P078);
-    glNormal3fv(N084);
-    glVertex3fv(P084);
-    glNormal3fv(N079);
-    glVertex3fv(P079);
-    glEnd();
-    glBegin(GL_POLYGON);
-    glNormal3fv(N084);
-    glVertex3fv(P084);
-    glNormal3fv(N082);
-    glVertex3fv(P082);
-    glNormal3fv(N079);
-    glVertex3fv(P079);
-    glEnd();
-}
-
-void
-Whale012(void)
-{
-    glBegin(GL_POLYGON);
-    glNormal3fv(N058);
-    glVertex3fv(P058);
-    glNormal3fv(N059);
-    glVertex3fv(P059);
-    glNormal3fv(N067);
-    glVertex3fv(P067);
-    glNormal3fv(N066);
-    glVertex3fv(P066);
-    glEnd();
-    glBegin(GL_POLYGON);
-    glNormal3fv(N059);
-    glVertex3fv(P059);
-    glNormal3fv(N052);
-    glVertex3fv(P052);
-    glNormal3fv(N060);
-    glVertex3fv(P060);
-    glEnd();
-    glBegin(GL_POLYGON);
-    glNormal3fv(N059);
-    glVertex3fv(P059);
-    glNormal3fv(N060);
-    glVertex3fv(P060);
-    glNormal3fv(N067);
-    glVertex3fv(P067);
-    glEnd();
-    glBegin(GL_POLYGON);
-    glNormal3fv(N058);
-    glVertex3fv(P058);
-    glNormal3fv(N066);
-    glVertex3fv(P066);
-    glNormal3fv(N065);
-    glVertex3fv(P065);
-    glEnd();
-    glBegin(GL_POLYGON);
-    glNormal3fv(N058);
-    glVertex3fv(P058);
-    glNormal3fv(N065);
-    glVertex3fv(P065);
-    glNormal3fv(N057);
-    glVertex3fv(P057);
-    glEnd();
-    glBegin(GL_POLYGON);
-    glNormal3fv(N056);
-    glVertex3fv(P056);
-    glNormal3fv(N057);
-    glVertex3fv(P057);
-    glNormal3fv(N065);
-    glVertex3fv(P065);
-    glEnd();
-    glBegin(GL_POLYGON);
-    glNormal3fv(N056);
-    glVertex3fv(P056);
-    glNormal3fv(N065);
-    glVertex3fv(P065);
-    glNormal3fv(N006);
-    glVertex3fv(P006);
-    glEnd();
-    glBegin(GL_POLYGON);
-    glNormal3fv(N056);
-    glVertex3fv(P056);
-    glNormal3fv(N006);
-    glVertex3fv(P006);
-    glNormal3fv(N063);
-    glVertex3fv(P063);
-    glEnd();
-    glBegin(GL_POLYGON);
-    glNormal3fv(N056);
-    glVertex3fv(P056);
-    glNormal3fv(N063);
-    glVertex3fv(P063);
-    glNormal3fv(N055);
-    glVertex3fv(P055);
-    glEnd();
-    glBegin(GL_POLYGON);
-    glNormal3fv(N054);
-    glVertex3fv(P054);
-    glNormal3fv(N062);
-    glVertex3fv(P062);
-    glNormal3fv(N005);
-    glVertex3fv(P005);
-    glEnd();
-    glBegin(GL_POLYGON);
-    glNormal3fv(N054);
-    glVertex3fv(P054);
-    glNormal3fv(N005);
-    glVertex3fv(P005);
-    glNormal3fv(N053);
-    glVertex3fv(P053);
-    glEnd();
-    glBegin(GL_POLYGON);
-    glNormal3fv(N053);
-    glVertex3fv(P053);
-    glNormal3fv(N005);
-    glVertex3fv(P005);
-    glNormal3fv(N060);
-    glVertex3fv(P060);
-    glEnd();
-    glBegin(GL_POLYGON);
-    glNormal3fv(N053);
-    glVertex3fv(P053);
-    glNormal3fv(N060);
-    glVertex3fv(P060);
-    glNormal3fv(N052);
-    glVertex3fv(P052);
-    glEnd();
-}
-
-void
-Whale013(void)
-{
-    glBegin(GL_POLYGON);
-    glNormal3fv(N066);
-    glVertex3fv(P066);
-    glNormal3fv(N067);
-    glVertex3fv(P067);
-    glNormal3fv(N096);
-    glVertex3fv(P096);
-    glNormal3fv(N097);
-    glVertex3fv(P097);
-    glEnd();
-    glBegin(GL_POLYGON);
-    glNormal3fv(N097);
-    glVertex3fv(P097);
-    glNormal3fv(N096);
-    glVertex3fv(P096);
-    glNormal3fv(N098);
-    glVertex3fv(P098);
-    glNormal3fv(N099);
-    glVertex3fv(P099);
-    glEnd();
-    glBegin(GL_POLYGON);
-    glNormal3fv(N065);
-    glVertex3fv(P065);
-    glNormal3fv(N066);
-    glVertex3fv(P066);
-    glNormal3fv(N097);
-    glVertex3fv(P097);
-    glEnd();
-    glBegin(GL_POLYGON);
-    glNormal3fv(N067);
-    glVertex3fv(P067);
-    glNormal3fv(N060);
-    glVertex3fv(P060);
-    glNormal3fv(N096);
-    glVertex3fv(P096);
-    glEnd();
-    glBegin(GL_POLYGON);
-    glNormal3fv(N060);
-    glVertex3fv(P060);
-    glNormal3fv(N005);
-    glVertex3fv(P005);
-    glNormal3fv(N096);
-    glVertex3fv(P096);
-    glEnd();
-    glBegin(GL_POLYGON);
-    glNormal3fv(N096);
-    glVertex3fv(P096);
-    glNormal3fv(N005);
-    glVertex3fv(P005);
-    glNormal3fv(N098);
-    glVertex3fv(P098);
-    glEnd();
-    glBegin(GL_POLYGON);
-    glNormal3fv(N006);
-    glVertex3fv(P006);
-    glNormal3fv(N065);
-    glVertex3fv(P065);
-    glNormal3fv(N097);
-    glVertex3fv(P097);
-    glEnd();
-    glBegin(GL_POLYGON);
-    glNormal3fv(N006);
-    glVertex3fv(P006);
-    glNormal3fv(N097);
-    glVertex3fv(P097);
-    glNormal3fv(N099);
-    glVertex3fv(P099);
-    glEnd();
-    glBegin(GL_POLYGON);
-    glVertex3fv(P005);
-    glVertex3fv(P006);
-    glVertex3fv(P099);
-    glVertex3fv(P098);
-    glEnd();
-}
-
-void
-Whale014(void)
-{
-    glBegin(GL_POLYGON);
-    glNormal3fv(N062);
-    glVertex3fv(P062);
-    glNormal3fv(N004);
-    glVertex3fv(P004);
-    glNormal3fv(N005);
-    glVertex3fv(P005);
-    glEnd();
-    glBegin(GL_POLYGON);
-    glVertex3fv(P006);
-    glVertex3fv(P005);
-    glVertex3fv(P004);
-    glVertex3fv(P008);
-    glEnd();
-    glBegin(GL_POLYGON);
-    glNormal3fv(N063);
-    glVertex3fv(P063);
-    glNormal3fv(N006);
-    glVertex3fv(P006);
-    glNormal3fv(N002);
-    glVertex3fv(P002);
-    glEnd();
-    glBegin(GL_POLYGON);
-    glNormal3fv(N002);
-    glVertex3fv(P002);
-    glNormal3fv(N006);
-    glVertex3fv(P006);
-    glNormal3fv(N008);
-    glVertex3fv(P008);
-    glEnd();
-    glBegin(GL_POLYGON);
-    glNormal3fv(N002);
-    glVertex3fv(P002);
-    glNormal3fv(N008);
-    glVertex3fv(P008);
-    glNormal3fv(N004);
-    glVertex3fv(P004);
-    glEnd();
-    glBegin(GL_POLYGON);
-    glNormal3fv(N062);
-    glVertex3fv(P062);
-    glNormal3fv(N002);
-    glVertex3fv(P002);
-    glNormal3fv(N004);
-    glVertex3fv(P004);
-    glEnd();
-}
-
-void
-Whale015(void)
-{
-    glBegin(GL_POLYGON);
-    glNormal3fv(N055);
-    glVertex3fv(P055);
-    glNormal3fv(N003);
-    glVertex3fv(P003);
-    glNormal3fv(N054);
-    glVertex3fv(P054);
-    glEnd();
-    glBegin(GL_POLYGON);
-    glNormal3fv(N003);
-    glVertex3fv(P003);
-    glNormal3fv(N055);
-    glVertex3fv(P055);
-    glNormal3fv(N063);
-    glVertex3fv(P063);
-    glEnd();
-    glBegin(GL_POLYGON);
-    glNormal3fv(N003);
-    glVertex3fv(P003);
-    glNormal3fv(N063);
-    glVertex3fv(P063);
-    glNormal3fv(N100);
-    glVertex3fv(P100);
-    glEnd();
-    glBegin(GL_POLYGON);
-    glNormal3fv(N003);
-    glVertex3fv(P003);
-    glNormal3fv(N100);
-    glVertex3fv(P100);
-    glNormal3fv(N054);
-    glVertex3fv(P054);
-    glEnd();
-    glBegin(GL_POLYGON);
-    glNormal3fv(N054);
-    glVertex3fv(P054);
-    glNormal3fv(N100);
-    glVertex3fv(P100);
-    glNormal3fv(N062);
-    glVertex3fv(P062);
-    glEnd();
-    glBegin(GL_POLYGON);
-    glNormal3fv(N100);
-    glVertex3fv(P100);
-    glNormal3fv(N063);
-    glVertex3fv(P063);
-    glNormal3fv(N002);
-    glVertex3fv(P002);
-    glEnd();
-    glBegin(GL_POLYGON);
-    glNormal3fv(N100);
-    glVertex3fv(P100);
-    glNormal3fv(N002);
-    glVertex3fv(P002);
-    glNormal3fv(N062);
-    glVertex3fv(P062);
-    glEnd();
-}
-
-void
-Whale016(void)
-{
-    glBegin(GL_POLYGON);
-    glVertex3fv(P104);
-    glVertex3fv(P105);
-    glVertex3fv(P106);
-    glEnd();
-    glBegin(GL_POLYGON);
-    glVertex3fv(P107);
-    glVertex3fv(P108);
-    glVertex3fv(P109);
-    glEnd();
-    glBegin(GL_POLYGON);
-    glVertex3fv(P110);
-    glVertex3fv(P111);
-    glVertex3fv(P112);
-    glVertex3fv(P113);
-    glVertex3fv(P114);
-    glVertex3fv(P115);
-    glEnd();
-    glBegin(GL_POLYGON);
-    glVertex3fv(P116);
-    glVertex3fv(P117);
-    glVertex3fv(P118);
-    glVertex3fv(P119);
-    glVertex3fv(P120);
-    glVertex3fv(P121);
-    glEnd();
-}
-
-void
-DrawWhale(fishRec * fish)
-{
-    float seg0, seg1, seg2, seg3, seg4, seg5, seg6, seg7;
-    float pitch, thrash, chomp;
-
-    fish->htail = (int) (fish->htail - (int) (5.0 * fish->v)) % 360;
-
-    thrash = 70.0 * fish->v;
-
-    seg0 = 1.5 * thrash * sin((fish->htail) * RRAD);
-    seg1 = 2.5 * thrash * sin((fish->htail + 10.0) * RRAD);
-    seg2 = 3.7 * thrash * sin((fish->htail + 15.0) * RRAD);
-    seg3 = 4.8 * thrash * sin((fish->htail + 23.0) * RRAD);
-    seg4 = 6.0 * thrash * sin((fish->htail + 28.0) * RRAD);
-    seg5 = 6.5 * thrash * sin((fish->htail + 35.0) * RRAD);
-    seg6 = 6.5 * thrash * sin((fish->htail + 40.0) * RRAD);
-    seg7 = 6.5 * thrash * sin((fish->htail + 55.0) * RRAD);
-
-    pitch = fish->v * sin((fish->htail - 160.0) * RRAD);
-
-    chomp = 0.0;
-    if (fish->v > 2.0) {
-        chomp = -(fish->v - 2.0) * 200.0;
-    }
-    P012[1] = iP012[1] + seg5;
-    P013[1] = iP013[1] + seg5;
-    P014[1] = iP014[1] + seg5;
-    P015[1] = iP015[1] + seg5;
-    P016[1] = iP016[1] + seg5;
-    P017[1] = iP017[1] + seg5;
-    P018[1] = iP018[1] + seg5;
-    P019[1] = iP019[1] + seg5;
-
-    P020[1] = iP020[1] + seg4;
-    P021[1] = iP021[1] + seg4;
-    P022[1] = iP022[1] + seg4;
-    P023[1] = iP023[1] + seg4;
-    P024[1] = iP024[1] + seg4;
-    P025[1] = iP025[1] + seg4;
-    P026[1] = iP026[1] + seg4;
-    P027[1] = iP027[1] + seg4;
-
-    P028[1] = iP028[1] + seg2;
-    P029[1] = iP029[1] + seg2;
-    P030[1] = iP030[1] + seg2;
-    P031[1] = iP031[1] + seg2;
-    P032[1] = iP032[1] + seg2;
-    P033[1] = iP033[1] + seg2;
-    P034[1] = iP034[1] + seg2;
-    P035[1] = iP035[1] + seg2;
-
-    P036[1] = iP036[1] + seg1;
-    P037[1] = iP037[1] + seg1;
-    P038[1] = iP038[1] + seg1;
-    P039[1] = iP039[1] + seg1;
-    P040[1] = iP040[1] + seg1;
-    P041[1] = iP041[1] + seg1;
-    P042[1] = iP042[1] + seg1;
-    P043[1] = iP043[1] + seg1;
-
-    P044[1] = iP044[1] + seg0;
-    P045[1] = iP045[1] + seg0;
-    P046[1] = iP046[1] + seg0;
-    P047[1] = iP047[1] + seg0;
-    P048[1] = iP048[1] + seg0;
-    P049[1] = iP049[1] + seg0;
-    P050[1] = iP050[1] + seg0;
-    P051[1] = iP051[1] + seg0;
-
-    P009[1] = iP009[1] + seg6;
-    P010[1] = iP010[1] + seg6;
-    P075[1] = iP075[1] + seg6;
-    P076[1] = iP076[1] + seg6;
-
-    P001[1] = iP001[1] + seg7;
-    P011[1] = iP011[1] + seg7;
-    P068[1] = iP068[1] + seg7;
-    P069[1] = iP069[1] + seg7;
-    P070[1] = iP070[1] + seg7;
-    P071[1] = iP071[1] + seg7;
-    P072[1] = iP072[1] + seg7;
-    P073[1] = iP073[1] + seg7;
-    P074[1] = iP074[1] + seg7;
-
-    P091[1] = iP091[1] + seg3 * 1.1;
-    P092[1] = iP092[1] + seg3;
-    P093[1] = iP093[1] + seg3;
-    P094[1] = iP094[1] + seg3;
-    P095[1] = iP095[1] + seg3 * 0.9;
-
-    P099[1] = iP099[1] + chomp;
-    P098[1] = iP098[1] + chomp;
-    P097[1] = iP097[1] + chomp;
-    P096[1] = iP096[1] + chomp;
-
-    glPushMatrix();
-
-    glRotatef(pitch, 1.0, 0.0, 0.0);
-
-    glTranslatef(0.0, 0.0, 8000.0);
-
-    glRotatef(180.0, 0.0, 1.0, 0.0);
-
-    glScalef(3.0, 3.0, 3.0);
-
-    glEnable(GL_CULL_FACE);
-
-    Whale001();
-    Whale002();
-    Whale003();
-    Whale004();
-    Whale005();
-    Whale006();
-    Whale007();
-    Whale008();
-    Whale009();
-    Whale010();
-    Whale011();
-    Whale012();
-    Whale013();
-    Whale014();
-    Whale015();
-    Whale016();
-
-    glDisable(GL_CULL_FACE);
-
-    glPopMatrix();
-}
diff --git a/Xcode/TemplatesForXcodeLeopard/SDL OpenGL Application/main.c b/Xcode/TemplatesForXcodeLeopard/SDL OpenGL Application/main.c
deleted file mode 100644
index 3bc4d33b1..000000000
--- a/Xcode/TemplatesForXcodeLeopard/SDL OpenGL Application/main.c	
+++ /dev/null
@@ -1,179 +0,0 @@
-
-/* Simple program:  Create a blank window, wait for keypress, quit.
-
-   Please see the SDL documentation for details on using the SDL API:
-   /Developer/Documentation/SDL/docs.html
-*/
-
-#include 
-#include 
-#include 
-#include 
-
-#include "SDL.h"
-
-extern void Atlantis_Init ();
-extern void Atlantis_Reshape (int w, int h);
-extern void Atlantis_Animate ();
-extern void Atlantis_Display ();
-
-static SDL_Surface *gScreen;
-
-static void initAttributes ()
-{
-    // Setup attributes we want for the OpenGL context
-
-    int value;
-
-    // Don't set color bit sizes (SDL_GL_RED_SIZE, etc)
-    //    Mac OS X will always use 8-8-8-8 ARGB for 32-bit screens and
-    //    5-5-5 RGB for 16-bit screens
-
-    // Request a 16-bit depth buffer (without this, there is no depth buffer)
-    value = 16;
-    SDL_GL_SetAttribute (SDL_GL_DEPTH_SIZE, value);
-
-
-    // Request double-buffered OpenGL
-    //     The fact that windows are double-buffered on Mac OS X has no effect
-    //     on OpenGL double buffering.
-    value = 1;
-    SDL_GL_SetAttribute (SDL_GL_DOUBLEBUFFER, value);
-}
-
-static void printAttributes ()
-{
-    // Print out attributes of the context we created
-    int nAttr;
-    int i;
-
-    int  attr[] = { SDL_GL_RED_SIZE, SDL_GL_BLUE_SIZE, SDL_GL_GREEN_SIZE,
-                    SDL_GL_ALPHA_SIZE, SDL_GL_BUFFER_SIZE, SDL_GL_DEPTH_SIZE };
-
-    char *desc[] = { "Red size: %d bits\n", "Blue size: %d bits\n", "Green size: %d bits\n",
-                     "Alpha size: %d bits\n", "Color buffer size: %d bits\n",
-                     "Depth bufer size: %d bits\n" };
-
-    nAttr = sizeof(attr) / sizeof(int);
-
-    for (i = 0; i < nAttr; i++) {
-
-        int value;
-        SDL_GL_GetAttribute (attr[i], &value);
-        printf (desc[i], value);
-    }
-}
-
-static void createSurface (int fullscreen)
-{
-    Uint32 flags = 0;
-
-    flags = SDL_OPENGL;
-    if (fullscreen)
-        flags |= SDL_FULLSCREEN;
-
-    // Create window
-    gScreen = SDL_SetVideoMode (640, 480, 0, flags);
-    if (gScreen == NULL) {
-
-        fprintf (stderr, "Couldn't set 640x480 OpenGL video mode: %s\n",
-                 SDL_GetError());
-        SDL_Quit();
-        exit(2);
-    }
-}
-
-static void initGL ()
-{
-    Atlantis_Init ();
-    Atlantis_Reshape (gScreen->w, gScreen->h);
-}
-
-static void drawGL ()
-{
-    Atlantis_Animate ();
-    Atlantis_Display ();
-}
-
-static void mainLoop ()
-{
-    SDL_Event event;
-    int done = 0;
-    int fps = 24;
-    int delay = 1000/fps;
-    int thenTicks = -1;
-    int nowTicks;
-
-    while ( !done ) {
-
-        /* Check for events */
-        while ( SDL_PollEvent (&event) ) {
-            switch (event.type) {
-
-                case SDL_MOUSEMOTION:
-                    break;
-                case SDL_MOUSEBUTTONDOWN:
-                    break;
-                case SDL_KEYDOWN:
-                    /* Any keypress quits the app... */
-                case SDL_QUIT:
-                    done = 1;
-                    break;
-                default:
-                    break;
-            }
-        }
-
-        // Draw at 24 hz
-        //     This approach is not normally recommended - it is better to
-        //     use time-based animation and run as fast as possible
-        drawGL ();
-        SDL_GL_SwapBuffers ();
-
-        // Time how long each draw-swap-delay cycle takes
-        // and adjust delay to get closer to target framerate
-        if (thenTicks > 0) {
-            nowTicks = SDL_GetTicks ();
-            delay += (1000/fps - (nowTicks-thenTicks));
-            thenTicks = nowTicks;
-            if (delay < 0)
-                delay = 1000/fps;
-        }
-        else {
-            thenTicks = SDL_GetTicks ();
-        }
-
-        SDL_Delay (delay);
-    }
-}
-
-int main(int argc, char *argv[])
-{
-    // Init SDL video subsystem
-    if ( SDL_Init (SDL_INIT_VIDEO) < 0 ) {
-
-        fprintf(stderr, "Couldn't initialize SDL: %s\n",
-            SDL_GetError());
-        exit(1);
-    }
-
-    // Set GL context attributes
-    initAttributes ();
-
-    // Create GL context
-    createSurface (0);
-
-    // Get GL context attributes
-    printAttributes ();
-
-    // Init GL state
-    initGL ();
-
-    // Draw, get events...
-    mainLoop ();
-
-    // Cleanup
-    SDL_Quit();
-
-    return 0;
-}
diff --git a/Xcode/TemplatesForXcodeSnowLeopard/SDL Application/English.lproj/InfoPlist.strings b/Xcode/TemplatesForXcodeSnowLeopard/SDL Application/English.lproj/InfoPlist.strings
deleted file mode 100644
index 6e721b0ef0e7ef6d44f293955483ecf6ae72291a..0000000000000000000000000000000000000000
GIT binary patch
literal 0
HcmV?d00001

literal 644
zcmb`^O-lk{6b0aC?XP%oDWSEF7L%A6HO44GZDPvtgLFpx2<*pKFiMcvB9ObdT<+nX
zd(Qd#Y^Vut6<(#LCO%{af_IsPrHMjrDJTpD9l4=G-Mqvvtpsl}n-W#iP*Krz<HaO~?0PSu_L
z!QGZw{Wx%3#uGtPVQy3E7#Ww&Zhd;x5=nMb*!8YNTO`);B+}Q>74P|2->Hf9Tw9w-
W
-
-
-
-	CFBundleDevelopmentRegion
-	English
-	CFBundleExecutable
-	${EXECUTABLE_NAME}
-	CFBundleIconFile
-	
-	CFBundleIdentifier
-	com.yourcompany.___PROJECTNAMEASXML___
-	CFBundleInfoDictionaryVersion
-	6.0
-	CFBundleName
-	${PRODUCT_NAME}
-	CFBundlePackageType
-	APPL
-	CFBundleSignature
-	????
-	CFBundleVersion
-	1.0
-	NSMainNibFile
-	SDLMain
-	NSPrincipalClass
-	NSApplication
-	LSMinimumSystemVersionByArchitecture
-	
-		x86_64
-		10.6.0
-		i386
-		10.4.0
-		ppc
-		10.4.0
-	
-
-
diff --git a/Xcode/TemplatesForXcodeSnowLeopard/SDL Application/___PROJECTNAMEASIDENTIFIER____Prefix.pch b/Xcode/TemplatesForXcodeSnowLeopard/SDL Application/___PROJECTNAMEASIDENTIFIER____Prefix.pch
deleted file mode 100644
index 00095074a..000000000
--- a/Xcode/TemplatesForXcodeSnowLeopard/SDL Application/___PROJECTNAMEASIDENTIFIER____Prefix.pch	
+++ /dev/null
@@ -1,9 +0,0 @@
-//
-// Prefix header for all source files of the 'PROJECTNAME' target in the 'PROJECTNAME' project
-//
-
-#include "SDL.h"
-
-#ifdef __OBJC__
-    #import 
-#endif
diff --git a/Xcode/TemplatesForXcodeSnowLeopard/SDL Application/___PROJECTNAME___.xcodeproj/TemplateIcon.icns b/Xcode/TemplatesForXcodeSnowLeopard/SDL Application/___PROJECTNAME___.xcodeproj/TemplateIcon.icns
deleted file mode 100644
index ae0b02b12ae19056f034a483be03dd053112545a..0000000000000000000000000000000000000000
GIT binary patch
literal 0
HcmV?d00001

literal 111234
zcmeFa2UJsAxAz^20@9TlL6EKp1VZmhO{n&I?7de+MNQ}+AfSj~?_IGs6i^Wq5l|43
zCLq1HkYtznjTP*k=R5a4?;ZCU@Aol>cm^lg|I9ttTyw4cTN7NhWc?P3(5>KATj*vK
zim>B;2qO=`2tKc$+uPsQ#p7^U{9!zdB!OguC_$10$s+s!J1~#Up0}}OcRpa8K7fZ3
zXI|;2uAb&}7W&{L2L|G7_d4Vik8^(ny--pNSw}*&jQ05L@mZ141P@+8-Oe3lF*Em;
zvSzQx8e<38ph~uNb(OdFw3nP|0>FFw2l)McSbO>FcU(5f0x6uw>FDARfZ>4SEKG<%
z?%)FifrS8z6e7qtppY#1?mmax%jxUpak#;JkwNEY3Y;fM0?@02wHt3qbB=6D-4y+{9bObcW746T69I=R4hBXOttSM|w|8|_xAnG{-$c&$
z4{)&o4%YSg-N*ko=efT)zr}jp8VW^7obsEA{bs+tOkw_J@SE{|v)^6@@;CeMzW$s1
zANnr8+3)@j|IJpdMYCx5aRQE!$AHZh9pLh~1HoLOfq_`A9G}m_2p*S@V|+e_6F4uN
zFU;ffSbP=;5quViVI%;KV^}0mNH$24BtgJH8y83%XMre*kvPsKbpaay3{X--<0|!$
z8VhqAZ6;VON{4bQW+$Nk-O&gH3oLN(rpySPEq6jqeww4?u$ROqN(qUv@FuE(Ki
zUM=vU#3!EzGbpr6QZhb=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NAME___.xcodeproj/TemplateInfo.plist
deleted file mode 100644
index d9ca45493..000000000
--- a/Xcode/TemplatesForXcodeSnowLeopard/SDL Application/___PROJECTNAME___.xcodeproj/TemplateInfo.plist	
+++ /dev/null
@@ -1,12 +0,0 @@
-{
-	FilesToRename = {
-		"SDLApp_Prefix.pch" = "PROJECTNAME_Prefix.pch";
-	};
-	FilesToMacroExpand = (
-		"PROJECTNAME_Prefix.pch",
-		"Info.plist",
-		"English.lproj/InfoPlist.strings",
-		"main.c",
-	);
-	Description = "This project builds an SDL-based application.";
-}
diff --git a/Xcode/TemplatesForXcodeSnowLeopard/SDL Application/___PROJECTNAME___.xcodeproj/project.pbxproj b/Xcode/TemplatesForXcodeSnowLeopard/SDL Application/___PROJECTNAME___.xcodeproj/project.pbxproj
deleted file mode 100644
index 0d84f2bca..000000000
--- a/Xcode/TemplatesForXcodeSnowLeopard/SDL Application/___PROJECTNAME___.xcodeproj/project.pbxproj	
+++ /dev/null
@@ -1,306 +0,0 @@
-// !$*UTF8*$!
-{
-	archiveVersion = 1;
-	classes = {
-	};
-	objectVersion = 46;
-	objects = {
-
-/* Begin PBXBuildFile section */
-		002F39FA09D0881F00EBEB88 /* SDL.framework in Frameworks */ = {isa = PBXBuildFile; fileRef = 002F39F909D0881F00EBEB88 /* SDL.framework */; };
-		002F3A0009D0884600EBEB88 /* SDL.framework in Copy Frameworks into .app bundle */ = {isa = PBXBuildFile; fileRef = 002F39F909D0881F00EBEB88 /* SDL.framework */; };
-		002F3A3F09D088BA00EBEB88 /* main.c in Sources */ = {isa = PBXBuildFile; fileRef = 002F3A3E09D088BA00EBEB88 /* main.c */; };
-		8D11072B0486CEB800E47090 /* InfoPlist.strings in Resources */ = {isa = PBXBuildFile; fileRef = 089C165CFE840E0CC02AAC07 /* InfoPlist.strings */; };
-		8D11072F0486CEB800E47090 /* Cocoa.framework in Frameworks */ = {isa = PBXBuildFile; fileRef = 1058C7A1FEA54F0111CA2CBB /* Cocoa.framework */; };
-/* End PBXBuildFile section */
-
-/* Begin PBXCopyFilesBuildPhase section */
-		002F39FD09D0883400EBEB88 /* Copy Frameworks into .app bundle */ = {
-			isa = PBXCopyFilesBuildPhase;
-			buildActionMask = 2147483647;
-			dstPath = "";
-			dstSubfolderSpec = 10;
-			files = (
-				002F3A0009D0884600EBEB88 /* SDL.framework in Copy Frameworks into .app bundle */,
-			);
-			name = "Copy Frameworks into .app bundle";
-			runOnlyForDeploymentPostprocessing = 0;
-		};
-/* End PBXCopyFilesBuildPhase section */
-
-/* Begin PBXFileReference section */
-		002F39F909D0881F00EBEB88 /* SDL.framework */ = {isa = PBXFileReference; lastKnownFileType = wrapper.framework; name = SDL.framework; path = /Library/Frameworks/SDL.framework; sourceTree = ""; };
-		002F3A3E09D088BA00EBEB88 /* main.c */ = {isa = PBXFileReference; fileEncoding = 30; lastKnownFileType = sourcecode.c.c; path = main.c; sourceTree = SOURCE_ROOT; };
-		089C165DFE840E0CC02AAC07 /* English */ = {isa = PBXFileReference; fileEncoding = 10; lastKnownFileType = text.plist.strings; name = English; path = English.lproj/InfoPlist.strings; sourceTree = ""; };
-		1058C7A1FEA54F0111CA2CBB /* Cocoa.framework */ = {isa = PBXFileReference; lastKnownFileType = wrapper.framework; name = Cocoa.framework; path = /System/Library/Frameworks/Cocoa.framework; sourceTree = ""; };
-		29B97324FDCFA39411CA2CEA /* AppKit.framework */ = {isa = PBXFileReference; lastKnownFileType = wrapper.framework; name = AppKit.framework; path = /System/Library/Frameworks/AppKit.framework; sourceTree = ""; };
-		29B97325FDCFA39411CA2CEA /* Foundation.framework */ = {isa = PBXFileReference; lastKnownFileType = wrapper.framework; name = Foundation.framework; path = /System/Library/Frameworks/Foundation.framework; sourceTree = ""; };
-		32CA4F630368D1EE00C91783 /* ___PROJECTNAME____Prefix.pch */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = "___PROJECTNAME____Prefix.pch"; sourceTree = ""; };
-		8D1107310486CEB800E47090 /* Info.plist */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = text.plist; path = Info.plist; sourceTree = ""; };
-		8D1107320486CEB800E47090 /* ___PROJECTNAME___.app */ = {isa = PBXFileReference; explicitFileType = wrapper.application; includeInIndex = 0; path = "___PROJECTNAME___.app"; sourceTree = BUILT_PRODUCTS_DIR; };
-/* End PBXFileReference section */
-
-/* Begin PBXFrameworksBuildPhase section */
-		8D11072E0486CEB800E47090 /* Frameworks */ = {
-			isa = PBXFrameworksBuildPhase;
-			buildActionMask = 2147483647;
-			files = (
-				002F39FA09D0881F00EBEB88 /* SDL.framework in Frameworks */,
-				8D11072F0486CEB800E47090 /* Cocoa.framework in Frameworks */,
-			);
-			runOnlyForDeploymentPostprocessing = 0;
-		};
-/* End PBXFrameworksBuildPhase section */
-
-/* Begin PBXGroup section */
-		080E96DDFE201D6D7F000001 /* Classes */ = {
-			isa = PBXGroup;
-			children = (
-			);
-			name = Classes;
-			sourceTree = "";
-		};
-		1058C7A0FEA54F0111CA2CBB /* Linked Frameworks */ = {
-			isa = PBXGroup;
-			children = (
-				002F39F909D0881F00EBEB88 /* SDL.framework */,
-				1058C7A1FEA54F0111CA2CBB /* Cocoa.framework */,
-			);
-			name = "Linked Frameworks";
-			sourceTree = "";
-		};
-		1058C7A2FEA54F0111CA2CBB /* Other Frameworks */ = {
-			isa = PBXGroup;
-			children = (
-				29B97324FDCFA39411CA2CEA /* AppKit.framework */,
-				29B97325FDCFA39411CA2CEA /* Foundation.framework */,
-			);
-			name = "Other Frameworks";
-			sourceTree = "";
-		};
-		19C28FACFE9D520D11CA2CBB /* Products */ = {
-			isa = PBXGroup;
-			children = (
-				8D1107320486CEB800E47090 /* ___PROJECTNAME___.app */,
-			);
-			name = Products;
-			sourceTree = "";
-		};
-		29B97314FDCFA39411CA2CEA /* ___PROJECTNAMEASXML___ */ = {
-			isa = PBXGroup;
-			children = (
-				080E96DDFE201D6D7F000001 /* Classes */,
-				29B97315FDCFA39411CA2CEA /* Other Sources */,
-				29B97317FDCFA39411CA2CEA /* Resources */,
-				29B97323FDCFA39411CA2CEA /* Frameworks */,
-				19C28FACFE9D520D11CA2CBB /* Products */,
-			);
-			name = "___PROJECTNAMEASXML___";
-			sourceTree = "";
-		};
-		29B97315FDCFA39411CA2CEA /* Other Sources */ = {
-			isa = PBXGroup;
-			children = (
-				32CA4F630368D1EE00C91783 /* ___PROJECTNAME____Prefix.pch */,
-				002F3A3E09D088BA00EBEB88 /* main.c */,
-			);
-			name = "Other Sources";
-			sourceTree = "";
-		};
-		29B97317FDCFA39411CA2CEA /* Resources */ = {
-			isa = PBXGroup;
-			children = (
-				8D1107310486CEB800E47090 /* Info.plist */,
-				089C165CFE840E0CC02AAC07 /* InfoPlist.strings */,
-			);
-			name = Resources;
-			sourceTree = "";
-		};
-		29B97323FDCFA39411CA2CEA /* Frameworks */ = {
-			isa = PBXGroup;
-			children = (
-				1058C7A0FEA54F0111CA2CBB /* Linked Frameworks */,
-				1058C7A2FEA54F0111CA2CBB /* Other Frameworks */,
-			);
-			name = Frameworks;
-			sourceTree = "";
-		};
-/* End PBXGroup section */
-
-/* Begin PBXNativeTarget section */
-		8D1107260486CEB800E47090 /* ___PROJECTNAME___ */ = {
-			isa = PBXNativeTarget;
-			buildConfigurationList = C01FCF4A08A954540054247B /* Build configuration list for PBXNativeTarget "___PROJECTNAME___" */;
-			buildPhases = (
-				8D1107290486CEB800E47090 /* Resources */,
-				8D11072C0486CEB800E47090 /* Sources */,
-				8D11072E0486CEB800E47090 /* Frameworks */,
-				002F39FD09D0883400EBEB88 /* Copy Frameworks into .app bundle */,
-			);
-			buildRules = (
-			);
-			dependencies = (
-			);
-			name = "___PROJECTNAME___";
-			productInstallPath = "$(HOME)/Applications";
-			productName = "___PROJECTNAME___";
-			productReference = 8D1107320486CEB800E47090 /* ___PROJECTNAME___.app */;
-			productType = "com.apple.product-type.application";
-		};
-/* End PBXNativeTarget section */
-
-/* Begin PBXProject section */
-		29B97313FDCFA39411CA2CEA /* Project object */ = {
-			isa = PBXProject;
-			buildConfigurationList = C01FCF4E08A954540054247B /* Build configuration list for PBXProject "___PROJECTNAME___" */;
-			compatibilityVersion = "Xcode 3.2";
-			hasScannedForEncodings = 1;
-			mainGroup = 29B97314FDCFA39411CA2CEA /* ___PROJECTNAMEASXML___ */;
-			projectDirPath = "";
-			projectRoot = "";
-			targets = (
-				8D1107260486CEB800E47090 /* ___PROJECTNAME___ */,
-			);
-		};
-/* End PBXProject section */
-
-/* Begin PBXResourcesBuildPhase section */
-		8D1107290486CEB800E47090 /* Resources */ = {
-			isa = PBXResourcesBuildPhase;
-			buildActionMask = 2147483647;
-			files = (
-				8D11072B0486CEB800E47090 /* InfoPlist.strings in Resources */,
-			);
-			runOnlyForDeploymentPostprocessing = 0;
-		};
-/* End PBXResourcesBuildPhase section */
-
-/* Begin PBXSourcesBuildPhase section */
-		8D11072C0486CEB800E47090 /* Sources */ = {
-			isa = PBXSourcesBuildPhase;
-			buildActionMask = 2147483647;
-			files = (
-				002F3A3F09D088BA00EBEB88 /* main.c in Sources */,
-			);
-			runOnlyForDeploymentPostprocessing = 0;
-		};
-/* End PBXSourcesBuildPhase section */
-
-/* Begin PBXVariantGroup section */
-		089C165CFE840E0CC02AAC07 /* InfoPlist.strings */ = {
-			isa = PBXVariantGroup;
-			children = (
-				089C165DFE840E0CC02AAC07 /* English */,
-			);
-			name = InfoPlist.strings;
-			sourceTree = "";
-		};
-/* End PBXVariantGroup section */
-
-/* Begin XCBuildConfiguration section */
-		C01FCF4B08A954540054247B /* Debug */ = {
-			isa = XCBuildConfiguration;
-			buildSettings = {
-				COPY_PHASE_STRIP = NO;
-				GCC_DYNAMIC_NO_PIC = NO;
-				GCC_ENABLE_FIX_AND_CONTINUE = YES;
-				GCC_MODEL_TUNING = G5;
-				GCC_OPTIMIZATION_LEVEL = 0;
-				GCC_PRECOMPILE_PREFIX_HEADER = YES;
-				GCC_PREFIX_HEADER = "___PROJECTNAMEASIDENTIFIER____Prefix.pch";
-				INFOPLIST_FILE = Info.plist;
-				INSTALL_PATH = "$(HOME)/Applications";
-				PRODUCT_NAME = "___PROJECTNAME___";
-				WRAPPER_EXTENSION = app;
-			};
-			name = Debug;
-		};
-		C01FCF4C08A954540054247B /* Release */ = {
-			isa = XCBuildConfiguration;
-			buildSettings = {
-				GCC_GENERATE_DEBUGGING_SYMBOLS = NO;
-				GCC_MODEL_TUNING = G5;
-				GCC_PRECOMPILE_PREFIX_HEADER = YES;
-				GCC_PREFIX_HEADER = "___PROJECTNAMEASIDENTIFIER____Prefix.pch";
-				INFOPLIST_FILE = Info.plist;
-				INSTALL_PATH = "$(HOME)/Applications";
-				PRODUCT_NAME = "___PROJECTNAME___";
-				WRAPPER_EXTENSION = app;
-			};
-			name = Release;
-		};
-		C01FCF4F08A954540054247B /* Debug */ = {
-			isa = XCBuildConfiguration;
-			buildSettings = {
-				ARCHS = "$(ARCHS_STANDARD_32_64_BIT)";
-				FRAMEWORK_SEARCH_PATHS = (
-					"$(HOME)/Library/Frameworks",
-					/Library/Frameworks,
-					"$(FRAMEWORK_SEARCH_PATHS)",
-				);
-				GCC_C_LANGUAGE_STANDARD = c99;
-				GCC_VERSION = 4.0;
-				"GCC_VERSION[arch=x86_64]" = 4.2;
-				GCC_WARN_ABOUT_RETURN_TYPE = YES;
-				GCC_WARN_UNUSED_VARIABLE = YES;
-				HEADER_SEARCH_PATHS = (
-					"$(HOME)/Library/Frameworks/SDL.framework/Headers",
-					/Library/Frameworks/SDL.framework/Headers,
-					"$(HEADER_SEARCH_PATHS)",
-				);
-				PREBINDING = NO;
-				SDKROOT = macosx10.4;
-				"SDKROOT[arch=x86_64]" = macosx10.6;
-			};
-			name = Debug;
-		};
-		C01FCF5008A954540054247B /* Release */ = {
-			isa = XCBuildConfiguration;
-			buildSettings = {
-				ARCHS = "$(ARCHS_STANDARD_32_64_BIT)";
-				FRAMEWORK_SEARCH_PATHS = (
-					"$(HOME)/Library/Frameworks",
-					/Library/Frameworks,
-					"$(FRAMEWORK_SEARCH_PATHS)",
-				);
-				GCC_C_LANGUAGE_STANDARD = c99;
-				GCC_VERSION = 4.0;
-				"GCC_VERSION[arch=x86_64]" = 4.2;
-				GCC_WARN_ABOUT_RETURN_TYPE = YES;
-				GCC_WARN_UNUSED_VARIABLE = YES;
-				HEADER_SEARCH_PATHS = (
-					"$(HOME)/Library/Frameworks/SDL.framework/Headers",
-					/Library/Frameworks/SDL.framework/Headers,
-					"$(HEADER_SEARCH_PATHS)",
-				);
-				PREBINDING = NO;
-				SDKROOT = macosx10.4;
-				"SDKROOT[arch=x86_64]" = macosx10.6;
-			};
-			name = Release;
-		};
-/* End XCBuildConfiguration section */
-
-/* Begin XCConfigurationList section */
-		C01FCF4A08A954540054247B /* Build configuration list for PBXNativeTarget "___PROJECTNAME___" */ = {
-			isa = XCConfigurationList;
-			buildConfigurations = (
-				C01FCF4B08A954540054247B /* Debug */,
-				C01FCF4C08A954540054247B /* Release */,
-			);
-			defaultConfigurationIsVisible = 0;
-			defaultConfigurationName = Release;
-		};
-		C01FCF4E08A954540054247B /* Build configuration list for PBXProject "___PROJECTNAME___" */ = {
-			isa = XCConfigurationList;
-			buildConfigurations = (
-				C01FCF4F08A954540054247B /* Debug */,
-				C01FCF5008A954540054247B /* Release */,
-			);
-			defaultConfigurationIsVisible = 0;
-			defaultConfigurationName = Release;
-		};
-/* End XCConfigurationList section */
-	};
-	rootObject = 29B97313FDCFA39411CA2CEA /* Project object */;
-}
diff --git a/Xcode/TemplatesForXcodeSnowLeopard/SDL Application/main.c b/Xcode/TemplatesForXcodeSnowLeopard/SDL Application/main.c
deleted file mode 100644
index 47af3765d..000000000
--- a/Xcode/TemplatesForXcodeSnowLeopard/SDL Application/main.c	
+++ /dev/null
@@ -1,65 +0,0 @@
-
-/* Simple program:  Create a blank window, wait for keypress, quit.
-
-   Please see the SDL documentation for details on using the SDL API:
-   /Developer/Documentation/SDL/docs.html
-*/
-
-#include 
-#include 
-#include 
-#include 
-
-#include "SDL.h"
-
-int main(int argc, char *argv[])
-{
-    Uint32 initflags = SDL_INIT_VIDEO;  /* See documentation for details */
-    SDL_Surface *screen;
-    Uint8  video_bpp = 0;
-    Uint32 videoflags = SDL_SWSURFACE;
-    int    done;
-        SDL_Event event;
-
-    /* Initialize the SDL library */
-    if ( SDL_Init(initflags) < 0 ) {
-        fprintf(stderr, "Couldn't initialize SDL: %s\n",
-            SDL_GetError());
-        exit(1);
-    }
-
-    /* Set 640x480 video mode */
-    screen=SDL_SetVideoMode(640,480, video_bpp, videoflags);
-        if (screen == NULL) {
-        fprintf(stderr, "Couldn't set 640x480x%d video mode: %s\n",
-                        video_bpp, SDL_GetError());
-        SDL_Quit();
-        exit(2);
-    }
-
-    done = 0;
-    while ( !done ) {
-
-        /* Check for events */
-        while ( SDL_PollEvent(&event) ) {
-            switch (event.type) {
-
-                case SDL_MOUSEMOTION:
-                    break;
-                case SDL_MOUSEBUTTONDOWN:
-                    break;
-                case SDL_KEYDOWN:
-                    /* Any keypress quits the app... */
-                case SDL_QUIT:
-                    done = 1;
-                    break;
-                default:
-                    break;
-            }
-        }
-    }
-
-    /* Clean up the SDL library */
-    SDL_Quit();
-    return(0);
-}
diff --git a/Xcode/TemplatesForXcodeSnowLeopard/SDL Cocoa Application/English.lproj/InfoPlist.strings b/Xcode/TemplatesForXcodeSnowLeopard/SDL Cocoa Application/English.lproj/InfoPlist.strings
deleted file mode 100644
index 6e721b0ef0e7ef6d44f293955483ecf6ae72291a..0000000000000000000000000000000000000000
GIT binary patch
literal 0
HcmV?d00001

literal 644
zcmb`^O-lk{6b0aC?XP%oDWSEF7L%A6HO44GZDPvtgLFpx2<*pKFiMcvB9ObdT<+nX
zd(Qd#Y^Vut6<(#LCO%{af_IsPrHMjrDJTpD9l4=G-Mqvvtpsl}n-W#iP*Krz<HaO~?0PSu_L
z!QGZw{Wx%3#uGtPVQy3E7#Ww&Zhd;x5=nMb*!8YNTO`);B+}Q>74P|2->Hf9Tw9w-
W
-
-
-
-	IBDocumentLocation
-	62 117 356 240 0 0 1152 848 
-	IBEditorPositions
-	
-		29
-		62 362 195 44 0 0 1152 848 
-	
-	IBFramework Version
-	291.0
-	IBOpenObjects
-	
-		29
-	
-	IBSystem Version
-	6L60
-
-
diff --git a/Xcode/TemplatesForXcodeSnowLeopard/SDL Cocoa Application/English.lproj/SDLMain.nib/objects.nib b/Xcode/TemplatesForXcodeSnowLeopard/SDL Cocoa Application/English.lproj/SDLMain.nib/objects.nib
deleted file mode 100644
index 637801528a03f85f28a290e5ffde3716217cd1e8..0000000000000000000000000000000000000000
GIT binary patch
literal 0
HcmV?d00001

literal 2590
zcmai0O=ufO6rM?xSg~ctZJL&nn5xhc(t^P$rKvAnS*{yFy-u@-9?e>s*qf|&)zxm?
z%>4}t`N+du*aWAMQk3{69SZl%W_O3KXYFEO%jt2ghP
z?|W~)nWxBrdpU&nYjxn?M~{hj=`^lL{%+}0KX8XB)zrS@QYrWMOS09p*N7|Ev0+VRM~Qsk?Yr6o|x7Ri;`L;
zBKYey@ZF30$WY#!%OcB5q=ogy<*`)dvD9U^B2$Kmc9gy(^CVHZnL=un1A?U?VNn$=
z#y`=s(iza|RbdD4@=Oj{aZSI3G7={&K!O0;yF>TxdZ_1+*tsJpzx%GDeTUnKctRRd
zsL^`is873^cJOn<%Gis$x2=^#Y85E@upTyU+OUkQaV2bAwkMysF|(=`66Hg4bSa3O
zL1u1u{xGG*z7?{I`!AuQ+K+m&`&629U{=+H#X|ZLyIW<1$#+4U487;m5?g7o#)Ia<
zpsG#TmOHIm`aE*v^6e^HtFzSxyHjQ4TEUk>BGNlAy0v4wKS-^zUv%xyP*Pm2IrEdsTL;%BuI-{W^QxV2>JXdy746u+2JK
zU+dI1Agz85rIF?CkkBcSl%LORozy?F;{K$GbSEx5->VF9h_BA7T1Yi%r@bt)+?H7y
z>_NQ}VyvMrHtin6ETffIg+w+zA7Nf0zg92Mg()|s8i1%w<>HStj-
zFa>CV)GC7_>!_-!#$3|2T*o$(wq>ETYdaXM$+;aag|U~4WWS;)OQP%%+sPnj%CRk1
zb9F1DI~h3z&*~O3$HjH(yLqQ1nz&$OkenD@V>;i=xGgdch>T|7u7r4&2qjE&2ZWGU
zq}&%T>jGcJ@B@Ae!?$?@!_)jt3_s>;
z7#`=3Fno_c#_)Z
-
-
-
-	CFBundleDevelopmentRegion
-	English
-	CFBundleExecutable
-	${EXECUTABLE_NAME}
-	CFBundleIconFile
-	
-	CFBundleIdentifier
-	com.yourcompany.___PROJECTNAMEASXML___
-	CFBundleInfoDictionaryVersion
-	6.0
-	CFBundleName
-	${PRODUCT_NAME}
-	CFBundlePackageType
-	APPL
-	CFBundleSignature
-	????
-	CFBundleVersion
-	1.0
-	NSMainNibFile
-	SDLMain
-	NSPrincipalClass
-	NSApplication
-	LSMinimumSystemVersionByArchitecture
-	
-		x86_64
-		10.6.0
-		i386
-		10.4.0
-		ppc
-		10.4.0
-		
-
-
diff --git a/Xcode/TemplatesForXcodeSnowLeopard/SDL Cocoa Application/___PROJECTNAMEASIDENTIFIER____Prefix.pch b/Xcode/TemplatesForXcodeSnowLeopard/SDL Cocoa Application/___PROJECTNAMEASIDENTIFIER____Prefix.pch
deleted file mode 100644
index 00095074a..000000000
--- a/Xcode/TemplatesForXcodeSnowLeopard/SDL Cocoa Application/___PROJECTNAMEASIDENTIFIER____Prefix.pch	
+++ /dev/null
@@ -1,9 +0,0 @@
-//
-// Prefix header for all source files of the 'PROJECTNAME' target in the 'PROJECTNAME' project
-//
-
-#include "SDL.h"
-
-#ifdef __OBJC__
-    #import 
-#endif
diff --git a/Xcode/TemplatesForXcodeSnowLeopard/SDL Cocoa Application/___PROJECTNAME___.xcodeproj/TemplateIcon.icns b/Xcode/TemplatesForXcodeSnowLeopard/SDL Cocoa Application/___PROJECTNAME___.xcodeproj/TemplateIcon.icns
deleted file mode 100644
index ae0b02b12ae19056f034a483be03dd053112545a..0000000000000000000000000000000000000000
GIT binary patch
literal 0
HcmV?d00001

literal 111234
zcmeFa2UJsAxAz^20@9TlL6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l>-9XxUDQwU3ajm1GXL>qsydn)h6!I=LU>~1bG^`18EO$x-w(sEC4@PWP
z`{{HD=*+3o$bszF{BZxu^V2IX?m2V`oU+h&TQ+k5ks4!5-=c>R1jwuBm>x`?c%}Xb
zP<&U*z3J@VJ#<+sN{V$t68Rr$2+#1sCh|U7)hd7q3Ln^9@n&l%>&^5LIEg6}qN)E#
zxPyIvuu=%3Iyv*!_?mR4jYYPJ@1UGTsBoakCc_jk*8pXSWe#4KlpgHCEQ;DlvJ15%
z2KBRUUM^QA!cQEPI=dU6%1tcBo*7yzE|pxIzTvszD2>k*kkDc+$jPV)^)_nfG9K+K
zii(L_=^|7I!qS-saJ~x$c}aqe5jXl5wmD?4!=b)`hv*3tPkxju0vJdqHH1;oy&#v+
z;Q@ZU)1r_k4IW|uHjQ8Q<#5_=duoC*T*yUeYceMBBXg7#lAZI*mLuYVinuQF=p7eH
zXPo|&?wm8HUbth`(VoYiesZY8AIaO-mS18cd?J>Z$24VCA2i+nYpc>KwYVAt)QG=n
zzykvQ1qxq#_&iB0lwLyv82|Tp^}=tT^Wqxa1+Zd7BX
H0f7GkLul&m

diff --git a/Xcode/TemplatesForXcodeSnowLeopard/SDL Cocoa Application/___PROJECTNAME___.xcodeproj/TemplateInfo.plist b/Xcode/TemplatesForXcodeSnowLeopard/SDL Cocoa Application/___PROJECTNAME___.xcodeproj/TemplateInfo.plist
deleted file mode 100644
index 1dcbea207..000000000
--- a/Xcode/TemplatesForXcodeSnowLeopard/SDL Cocoa Application/___PROJECTNAME___.xcodeproj/TemplateInfo.plist	
+++ /dev/null
@@ -1,12 +0,0 @@
-{
-	FilesToRename = {
-		"SDLApp_Prefix.pch" = "PROJECTNAME_Prefix.pch";
-	};
-	FilesToMacroExpand = (
-		"PROJECTNAME_Prefix.pch",
-		"Info.plist",
-		"English.lproj/InfoPlist.strings",
-		"main.c",
-	);
-	Description = "This project builds an SDL-based application with Cocoa menus.";
-}
diff --git a/Xcode/TemplatesForXcodeSnowLeopard/SDL Cocoa Application/___PROJECTNAME___.xcodeproj/project.pbxproj b/Xcode/TemplatesForXcodeSnowLeopard/SDL Cocoa Application/___PROJECTNAME___.xcodeproj/project.pbxproj
deleted file mode 100644
index 55ae3aef0..000000000
--- a/Xcode/TemplatesForXcodeSnowLeopard/SDL Cocoa Application/___PROJECTNAME___.xcodeproj/project.pbxproj	
+++ /dev/null
@@ -1,318 +0,0 @@
-// !$*UTF8*$!
-{
-	archiveVersion = 1;
-	classes = {
-	};
-	objectVersion = 46;
-	objects = {
-
-/* Begin PBXBuildFile section */
-		002F39FA09D0881F00EBEB88 /* SDL.framework in Frameworks */ = {isa = PBXBuildFile; fileRef = 002F39F909D0881F00EBEB88 /* SDL.framework */; };
-		002F3A0009D0884600EBEB88 /* SDL.framework in Copy Frameworks into .app bundle */ = {isa = PBXBuildFile; fileRef = 002F39F909D0881F00EBEB88 /* SDL.framework */; };
-		002F3A3F09D088BA00EBEB88 /* main.c in Sources */ = {isa = PBXBuildFile; fileRef = 002F3A3E09D088BA00EBEB88 /* main.c */; };
-		002F3AF109D08F1000EBEB88 /* SDLMain.nib in Resources */ = {isa = PBXBuildFile; fileRef = 002F3AEF09D08F1000EBEB88 /* SDLMain.nib */; };
-		8D11072B0486CEB800E47090 /* InfoPlist.strings in Resources */ = {isa = PBXBuildFile; fileRef = 089C165CFE840E0CC02AAC07 /* InfoPlist.strings */; };
-		8D11072F0486CEB800E47090 /* Cocoa.framework in Frameworks */ = {isa = PBXBuildFile; fileRef = 1058C7A1FEA54F0111CA2CBB /* Cocoa.framework */; };
-/* End PBXBuildFile section */
-
-/* Begin PBXCopyFilesBuildPhase section */
-		002F39FD09D0883400EBEB88 /* Copy Frameworks into .app bundle */ = {
-			isa = PBXCopyFilesBuildPhase;
-			buildActionMask = 2147483647;
-			dstPath = "";
-			dstSubfolderSpec = 10;
-			files = (
-				002F3A0009D0884600EBEB88 /* SDL.framework in Copy Frameworks into .app bundle */,
-			);
-			name = "Copy Frameworks into .app bundle";
-			runOnlyForDeploymentPostprocessing = 0;
-		};
-/* End PBXCopyFilesBuildPhase section */
-
-/* Begin PBXFileReference section */
-		002F39F909D0881F00EBEB88 /* SDL.framework */ = {isa = PBXFileReference; lastKnownFileType = wrapper.framework; name = SDL.framework; path = /Library/Frameworks/SDL.framework; sourceTree = ""; };
-		002F3A3E09D088BA00EBEB88 /* main.c */ = {isa = PBXFileReference; fileEncoding = 30; lastKnownFileType = sourcecode.c.c; path = main.c; sourceTree = SOURCE_ROOT; };
-		002F3AF009D08F1000EBEB88 /* English */ = {isa = PBXFileReference; lastKnownFileType = wrapper.nib; name = English; path = English.lproj/SDLMain.nib; sourceTree = ""; };
-		089C165DFE840E0CC02AAC07 /* English */ = {isa = PBXFileReference; fileEncoding = 10; lastKnownFileType = text.plist.strings; name = English; path = English.lproj/InfoPlist.strings; sourceTree = ""; };
-		1058C7A1FEA54F0111CA2CBB /* Cocoa.framework */ = {isa = PBXFileReference; lastKnownFileType = wrapper.framework; name = Cocoa.framework; path = /System/Library/Frameworks/Cocoa.framework; sourceTree = ""; };
-		29B97324FDCFA39411CA2CEA /* AppKit.framework */ = {isa = PBXFileReference; lastKnownFileType = wrapper.framework; name = AppKit.framework; path = /System/Library/Frameworks/AppKit.framework; sourceTree = ""; };
-		29B97325FDCFA39411CA2CEA /* Foundation.framework */ = {isa = PBXFileReference; lastKnownFileType = wrapper.framework; name = Foundation.framework; path = /System/Library/Frameworks/Foundation.framework; sourceTree = ""; };
-		32CA4F630368D1EE00C91783 /* ___PROJECTNAME____Prefix.pch */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = "___PROJECTNAME____Prefix.pch"; sourceTree = ""; };
-		8D1107310486CEB800E47090 /* Info.plist */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = text.plist; path = Info.plist; sourceTree = ""; };
-		8D1107320486CEB800E47090 /* ___PROJECTNAME___.app */ = {isa = PBXFileReference; explicitFileType = wrapper.application; includeInIndex = 0; path = "___PROJECTNAME___.app"; sourceTree = BUILT_PRODUCTS_DIR; };
-/* End PBXFileReference section */
-
-/* Begin PBXFrameworksBuildPhase section */
-		8D11072E0486CEB800E47090 /* Frameworks */ = {
-			isa = PBXFrameworksBuildPhase;
-			buildActionMask = 2147483647;
-			files = (
-				002F39FA09D0881F00EBEB88 /* SDL.framework in Frameworks */,
-				8D11072F0486CEB800E47090 /* Cocoa.framework in Frameworks */,
-			);
-			runOnlyForDeploymentPostprocessing = 0;
-		};
-/* End PBXFrameworksBuildPhase section */
-
-/* Begin PBXGroup section */
-		080E96DDFE201D6D7F000001 /* Classes */ = {
-			isa = PBXGroup;
-			children = (
-			);
-			name = Classes;
-			sourceTree = "";
-		};
-		1058C7A0FEA54F0111CA2CBB /* Linked Frameworks */ = {
-			isa = PBXGroup;
-			children = (
-				002F39F909D0881F00EBEB88 /* SDL.framework */,
-				1058C7A1FEA54F0111CA2CBB /* Cocoa.framework */,
-			);
-			name = "Linked Frameworks";
-			sourceTree = "";
-		};
-		1058C7A2FEA54F0111CA2CBB /* Other Frameworks */ = {
-			isa = PBXGroup;
-			children = (
-				29B97324FDCFA39411CA2CEA /* AppKit.framework */,
-				29B97325FDCFA39411CA2CEA /* Foundation.framework */,
-			);
-			name = "Other Frameworks";
-			sourceTree = "";
-		};
-		19C28FACFE9D520D11CA2CBB /* Products */ = {
-			isa = PBXGroup;
-			children = (
-				8D1107320486CEB800E47090 /* ___PROJECTNAME___.app */,
-			);
-			name = Products;
-			sourceTree = "";
-		};
-		29B97314FDCFA39411CA2CEA /* ___PROJECTNAMEASXML___ */ = {
-			isa = PBXGroup;
-			children = (
-				080E96DDFE201D6D7F000001 /* Classes */,
-				29B97315FDCFA39411CA2CEA /* Other Sources */,
-				29B97317FDCFA39411CA2CEA /* Resources */,
-				29B97323FDCFA39411CA2CEA /* Frameworks */,
-				19C28FACFE9D520D11CA2CBB /* Products */,
-			);
-			name = "___PROJECTNAMEASXML___";
-			sourceTree = "";
-		};
-		29B97315FDCFA39411CA2CEA /* Other Sources */ = {
-			isa = PBXGroup;
-			children = (
-				32CA4F630368D1EE00C91783 /* ___PROJECTNAME____Prefix.pch */,
-				002F3A3E09D088BA00EBEB88 /* main.c */,
-			);
-			name = "Other Sources";
-			sourceTree = "";
-		};
-		29B97317FDCFA39411CA2CEA /* Resources */ = {
-			isa = PBXGroup;
-			children = (
-				8D1107310486CEB800E47090 /* Info.plist */,
-				089C165CFE840E0CC02AAC07 /* InfoPlist.strings */,
-				002F3AEF09D08F1000EBEB88 /* SDLMain.nib */,
-			);
-			name = Resources;
-			sourceTree = "";
-		};
-		29B97323FDCFA39411CA2CEA /* Frameworks */ = {
-			isa = PBXGroup;
-			children = (
-				1058C7A0FEA54F0111CA2CBB /* Linked Frameworks */,
-				1058C7A2FEA54F0111CA2CBB /* Other Frameworks */,
-			);
-			name = Frameworks;
-			sourceTree = "";
-		};
-/* End PBXGroup section */
-
-/* Begin PBXNativeTarget section */
-		8D1107260486CEB800E47090 /* ___PROJECTNAME___ */ = {
-			isa = PBXNativeTarget;
-			buildConfigurationList = C01FCF4A08A954540054247B /* Build configuration list for PBXNativeTarget "___PROJECTNAME___" */;
-			buildPhases = (
-				8D1107290486CEB800E47090 /* Resources */,
-				8D11072C0486CEB800E47090 /* Sources */,
-				8D11072E0486CEB800E47090 /* Frameworks */,
-				002F39FD09D0883400EBEB88 /* Copy Frameworks into .app bundle */,
-			);
-			buildRules = (
-			);
-			dependencies = (
-			);
-			name = "___PROJECTNAME___";
-			productInstallPath = "$(HOME)/Applications";
-			productName = "___PROJECTNAME___";
-			productReference = 8D1107320486CEB800E47090 /* ___PROJECTNAME___.app */;
-			productType = "com.apple.product-type.application";
-		};
-/* End PBXNativeTarget section */
-
-/* Begin PBXProject section */
-		29B97313FDCFA39411CA2CEA /* Project object */ = {
-			isa = PBXProject;
-			buildConfigurationList = C01FCF4E08A954540054247B /* Build configuration list for PBXProject "___PROJECTNAME___" */;
-			compatibilityVersion = "Xcode 3.2";
-			hasScannedForEncodings = 1;
-			mainGroup = 29B97314FDCFA39411CA2CEA /* ___PROJECTNAMEASXML___ */;
-			projectDirPath = "";
-			projectRoot = "";
-			targets = (
-				8D1107260486CEB800E47090 /* ___PROJECTNAME___ */,
-			);
-		};
-/* End PBXProject section */
-
-/* Begin PBXResourcesBuildPhase section */
-		8D1107290486CEB800E47090 /* Resources */ = {
-			isa = PBXResourcesBuildPhase;
-			buildActionMask = 2147483647;
-			files = (
-				8D11072B0486CEB800E47090 /* InfoPlist.strings in Resources */,
-				002F3AF109D08F1000EBEB88 /* SDLMain.nib in Resources */,
-			);
-			runOnlyForDeploymentPostprocessing = 0;
-		};
-/* End PBXResourcesBuildPhase section */
-
-/* Begin PBXSourcesBuildPhase section */
-		8D11072C0486CEB800E47090 /* Sources */ = {
-			isa = PBXSourcesBuildPhase;
-			buildActionMask = 2147483647;
-			files = (
-				002F3A3F09D088BA00EBEB88 /* main.c in Sources */,
-			);
-			runOnlyForDeploymentPostprocessing = 0;
-		};
-/* End PBXSourcesBuildPhase section */
-
-/* Begin PBXVariantGroup section */
-		002F3AEF09D08F1000EBEB88 /* SDLMain.nib */ = {
-			isa = PBXVariantGroup;
-			children = (
-				002F3AF009D08F1000EBEB88 /* English */,
-			);
-			name = SDLMain.nib;
-			sourceTree = "";
-		};
-		089C165CFE840E0CC02AAC07 /* InfoPlist.strings */ = {
-			isa = PBXVariantGroup;
-			children = (
-				089C165DFE840E0CC02AAC07 /* English */,
-			);
-			name = InfoPlist.strings;
-			sourceTree = "";
-		};
-/* End PBXVariantGroup section */
-
-/* Begin XCBuildConfiguration section */
-		C01FCF4B08A954540054247B /* Debug */ = {
-			isa = XCBuildConfiguration;
-			buildSettings = {
-				COPY_PHASE_STRIP = NO;
-				GCC_DYNAMIC_NO_PIC = NO;
-				GCC_ENABLE_FIX_AND_CONTINUE = YES;
-				GCC_MODEL_TUNING = G5;
-				GCC_OPTIMIZATION_LEVEL = 0;
-				GCC_PRECOMPILE_PREFIX_HEADER = YES;
-				GCC_PREFIX_HEADER = "___PROJECTNAMEASIDENTIFIER____Prefix.pch";
-				INFOPLIST_FILE = Info.plist;
-				INSTALL_PATH = "$(HOME)/Applications";
-				PRODUCT_NAME = "___PROJECTNAME___";
-				WRAPPER_EXTENSION = app;
-			};
-			name = Debug;
-		};
-		C01FCF4C08A954540054247B /* Release */ = {
-			isa = XCBuildConfiguration;
-			buildSettings = {
-				GCC_GENERATE_DEBUGGING_SYMBOLS = NO;
-				GCC_MODEL_TUNING = G5;
-				GCC_PRECOMPILE_PREFIX_HEADER = YES;
-				GCC_PREFIX_HEADER = "___PROJECTNAMEASIDENTIFIER____Prefix.pch";
-				INFOPLIST_FILE = Info.plist;
-				INSTALL_PATH = "$(HOME)/Applications";
-				PRODUCT_NAME = "___PROJECTNAME___";
-				WRAPPER_EXTENSION = app;
-			};
-			name = Release;
-		};
-		C01FCF4F08A954540054247B /* Debug */ = {
-			isa = XCBuildConfiguration;
-			buildSettings = {
-				ARCHS = "$(ARCHS_STANDARD_32_64_BIT)";
-				FRAMEWORK_SEARCH_PATHS = (
-					"$(HOME)/Library/Frameworks",
-					/Library/Frameworks,
-					"$(FRAMEWORK_SEARCH_PATHS)",
-				);
-				GCC_C_LANGUAGE_STANDARD = c99;
-				GCC_VERSION = 4.0;
-				"GCC_VERSION[arch=x86_64]" = 4.2;
-				GCC_WARN_ABOUT_RETURN_TYPE = YES;
-				GCC_WARN_UNUSED_VARIABLE = YES;
-				HEADER_SEARCH_PATHS = (
-					"$(HOME)/Library/Frameworks/SDL.framework/Headers",
-					/Library/Frameworks/SDL.framework/Headers,
-					"$(HEADER_SEARCH_PATHS)",
-				);
-				PREBINDING = NO;
-				SDKROOT = macosx10.4;
-				"SDKROOT[arch=x86_64]" = macosx10.6;
-			};
-			name = Debug;
-		};
-		C01FCF5008A954540054247B /* Release */ = {
-			isa = XCBuildConfiguration;
-			buildSettings = {
-				ARCHS = "$(ARCHS_STANDARD_32_64_BIT)";
-				FRAMEWORK_SEARCH_PATHS = (
-					"$(HOME)/Library/Frameworks",
-					/Library/Frameworks,
-					"$(FRAMEWORK_SEARCH_PATHS)",
-				);
-				GCC_C_LANGUAGE_STANDARD = c99;
-				GCC_VERSION = 4.0;
-				"GCC_VERSION[arch=x86_64]" = 4.2;
-				GCC_WARN_ABOUT_RETURN_TYPE = YES;
-				GCC_WARN_UNUSED_VARIABLE = YES;
-				HEADER_SEARCH_PATHS = (
-					"$(HOME)/Library/Frameworks/SDL.framework/Headers",
-					/Library/Frameworks/SDL.framework/Headers,
-					"$(HEADER_SEARCH_PATHS)",
-				);
-				PREBINDING = NO;
-				SDKROOT = macosx10.4;
-				"SDKROOT[arch=x86_64]" = macosx10.6;
-			};
-			name = Release;
-		};
-/* End XCBuildConfiguration section */
-
-/* Begin XCConfigurationList section */
-		C01FCF4A08A954540054247B /* Build configuration list for PBXNativeTarget "___PROJECTNAME___" */ = {
-			isa = XCConfigurationList;
-			buildConfigurations = (
-				C01FCF4B08A954540054247B /* Debug */,
-				C01FCF4C08A954540054247B /* Release */,
-			);
-			defaultConfigurationIsVisible = 0;
-			defaultConfigurationName = Release;
-		};
-		C01FCF4E08A954540054247B /* Build configuration list for PBXProject "___PROJECTNAME___" */ = {
-			isa = XCConfigurationList;
-			buildConfigurations = (
-				C01FCF4F08A954540054247B /* Debug */,
-				C01FCF5008A954540054247B /* Release */,
-			);
-			defaultConfigurationIsVisible = 0;
-			defaultConfigurationName = Release;
-		};
-/* End XCConfigurationList section */
-	};
-	rootObject = 29B97313FDCFA39411CA2CEA /* Project object */;
-}
diff --git a/Xcode/TemplatesForXcodeSnowLeopard/SDL Cocoa Application/main.c b/Xcode/TemplatesForXcodeSnowLeopard/SDL Cocoa Application/main.c
deleted file mode 100644
index 47af3765d..000000000
--- a/Xcode/TemplatesForXcodeSnowLeopard/SDL Cocoa Application/main.c	
+++ /dev/null
@@ -1,65 +0,0 @@
-
-/* Simple program:  Create a blank window, wait for keypress, quit.
-
-   Please see the SDL documentation for details on using the SDL API:
-   /Developer/Documentation/SDL/docs.html
-*/
-
-#include 
-#include 
-#include 
-#include 
-
-#include "SDL.h"
-
-int main(int argc, char *argv[])
-{
-    Uint32 initflags = SDL_INIT_VIDEO;  /* See documentation for details */
-    SDL_Surface *screen;
-    Uint8  video_bpp = 0;
-    Uint32 videoflags = SDL_SWSURFACE;
-    int    done;
-        SDL_Event event;
-
-    /* Initialize the SDL library */
-    if ( SDL_Init(initflags) < 0 ) {
-        fprintf(stderr, "Couldn't initialize SDL: %s\n",
-            SDL_GetError());
-        exit(1);
-    }
-
-    /* Set 640x480 video mode */
-    screen=SDL_SetVideoMode(640,480, video_bpp, videoflags);
-        if (screen == NULL) {
-        fprintf(stderr, "Couldn't set 640x480x%d video mode: %s\n",
-                        video_bpp, SDL_GetError());
-        SDL_Quit();
-        exit(2);
-    }
-
-    done = 0;
-    while ( !done ) {
-
-        /* Check for events */
-        while ( SDL_PollEvent(&event) ) {
-            switch (event.type) {
-
-                case SDL_MOUSEMOTION:
-                    break;
-                case SDL_MOUSEBUTTONDOWN:
-                    break;
-                case SDL_KEYDOWN:
-                    /* Any keypress quits the app... */
-                case SDL_QUIT:
-                    done = 1;
-                    break;
-                default:
-                    break;
-            }
-        }
-    }
-
-    /* Clean up the SDL library */
-    SDL_Quit();
-    return(0);
-}
diff --git a/Xcode/TemplatesForXcodeSnowLeopard/SDL OpenGL Application/English.lproj/InfoPlist.strings b/Xcode/TemplatesForXcodeSnowLeopard/SDL OpenGL Application/English.lproj/InfoPlist.strings
deleted file mode 100644
index 6e721b0ef0e7ef6d44f293955483ecf6ae72291a..0000000000000000000000000000000000000000
GIT binary patch
literal 0
HcmV?d00001

literal 644
zcmb`^O-lk{6b0aC?XP%oDWSEF7L%A6HO44GZDPvtgLFpx2<*pKFiMcvB9ObdT<+nX
zd(Qd#Y^Vut6<(#LCO%{af_IsPrHMjrDJTpD9l4=G-Mqvvtpsl}n-W#iP*Krz<HaO~?0PSu_L
z!QGZw{Wx%3#uGtPVQy3E7#Ww&Zhd;x5=nMb*!8YNTO`);B+}Q>74P|2->Hf9Tw9w-
W
-
-
-
-	CFBundleDevelopmentRegion
-	English
-	CFBundleExecutable
-	${EXECUTABLE_NAME}
-	CFBundleIconFile
-	
-	CFBundleIdentifier
-	com.yourcompany.___PROJECTNAMEASXML___
-	CFBundleInfoDictionaryVersion
-	6.0
-	CFBundleName
-	${PRODUCT_NAME}
-	CFBundlePackageType
-	APPL
-	CFBundleSignature
-	????
-	CFBundleVersion
-	1.0
-	NSMainNibFile
-	SDLMain
-	NSPrincipalClass
-	NSApplication
-	LSMinimumSystemVersionByArchitecture
-	
-		x86_64
-		10.6.0
-		i386
-		10.4.0
-		ppc
-		10.4.0
-	
-
-
diff --git a/Xcode/TemplatesForXcodeSnowLeopard/SDL OpenGL Application/___PROJECTNAMEASIDENTIFIER____Prefix.pch b/Xcode/TemplatesForXcodeSnowLeopard/SDL OpenGL Application/___PROJECTNAMEASIDENTIFIER____Prefix.pch
deleted file mode 100644
index 00095074a..000000000
--- a/Xcode/TemplatesForXcodeSnowLeopard/SDL OpenGL Application/___PROJECTNAMEASIDENTIFIER____Prefix.pch	
+++ /dev/null
@@ -1,9 +0,0 @@
-//
-// Prefix header for all source files of the 'PROJECTNAME' target in the 'PROJECTNAME' project
-//
-
-#include "SDL.h"
-
-#ifdef __OBJC__
-    #import 
-#endif
diff --git a/Xcode/TemplatesForXcodeSnowLeopard/SDL OpenGL Application/___PROJECTNAME___.xcodeproj/TemplateIcon.icns b/Xcode/TemplatesForXcodeSnowLeopard/SDL OpenGL Application/___PROJECTNAME___.xcodeproj/TemplateIcon.icns
deleted file mode 100644
index ae0b02b12ae19056f034a483be03dd053112545a..0000000000000000000000000000000000000000
GIT binary patch
literal 0
HcmV?d00001

literal 111234
zcmeFa2UJsAxAz^20@9TlL6EKp1VZmhO{n&I?7de+MNQ}+AfSj~?_IGs6i^Wq5l|43
zCLq1HkYtznjTP*k=R5a4?;ZCU@Aol>cm^lg|I9ttTyw4cTN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Q+k5ks4!5-=c>R1jwuBm>x`?c%}Xb
zP<&U*z3J@VJ#<+sN{V$t68Rr$2+#1sCh|U7)hd7q3Ln^9@n&l%>&^5LIEg6}qN)E#
zxPyIvuu=%3Iyv*!_?mR4jYYPJ@1UGTsBoakCc_jk*8pXSWe#4KlpgHCEQ;DlvJ15%
z2KBRUUM^QA!cQEPI=dU6%1tcBo*7yzE|pxIzTvszD2>k*kkDc+$jPV)^)_nfG9K+K
zii(L_=^|7I!qS-saJ~x$c}aqe5jXl5wmD?4!=b)`hv*3tPkxju0vJdqHH1;oy&#v+
z;Q@ZU)1r_k4IW|uHjQ8Q<#5_=duoC*T*yUeYceMBBXg7#lAZI*mLuYVinuQF=p7eH
zXPo|&?wm8HUbth`(VoYiesZY8AIaO-mS18cd?J>Z$24VCA2i+nYpc>KwYVAt)QG=n
zzykvQ1qxq#_&iB0lwLyv82|Tp^}=tT^Wqxa1+Zd7BX
H0f7GkLul&m

diff --git a/Xcode/TemplatesForXcodeSnowLeopard/SDL OpenGL Application/___PROJECTNAME___.xcodeproj/TemplateInfo.plist b/Xcode/TemplatesForXcodeSnowLeopard/SDL OpenGL Application/___PROJECTNAME___.xcodeproj/TemplateInfo.plist
deleted file mode 100644
index ba87745fc..000000000
--- a/Xcode/TemplatesForXcodeSnowLeopard/SDL OpenGL Application/___PROJECTNAME___.xcodeproj/TemplateInfo.plist	
+++ /dev/null
@@ -1,12 +0,0 @@
-{
-	FilesToRename = {
-		"SDLApp_Prefix.pch" = "PROJECTNAME_Prefix.pch";
-	};
-	FilesToMacroExpand = (
-		"PROJECTNAME_Prefix.pch",
-		"Info.plist",
-		"English.lproj/InfoPlist.strings",
-		"main.c",
-	);
-	Description = "This project builds an SDL-based application that uses OpenGL.";
-}
diff --git a/Xcode/TemplatesForXcodeSnowLeopard/SDL OpenGL Application/___PROJECTNAME___.xcodeproj/project.pbxproj b/Xcode/TemplatesForXcodeSnowLeopard/SDL OpenGL Application/___PROJECTNAME___.xcodeproj/project.pbxproj
deleted file mode 100644
index 09373d1ae..000000000
--- a/Xcode/TemplatesForXcodeSnowLeopard/SDL OpenGL Application/___PROJECTNAME___.xcodeproj/project.pbxproj	
+++ /dev/null
@@ -1,348 +0,0 @@
-// !$*UTF8*$!
-{
-	archiveVersion = 1;
-	classes = {
-	};
-	objectVersion = 46;
-	objects = {
-
-/* Begin PBXBuildFile section */
-		002F39FA09D0881F00EBEB88 /* SDL.framework in Frameworks */ = {isa = PBXBuildFile; fileRef = 002F39F909D0881F00EBEB88 /* SDL.framework */; };
-		002F3A0009D0884600EBEB88 /* SDL.framework in Copy Frameworks into .app bundle */ = {isa = PBXBuildFile; fileRef = 002F39F909D0881F00EBEB88 /* SDL.framework */; };
-		002F3A3F09D088BA00EBEB88 /* main.c in Sources */ = {isa = PBXBuildFile; fileRef = 002F3A3E09D088BA00EBEB88 /* main.c */; };
-		002F3BFA09D0938900EBEB88 /* atlantis.c in Sources */ = {isa = PBXBuildFile; fileRef = 002F3BF409D0938900EBEB88 /* atlantis.c */; };
-		002F3BFC09D0938900EBEB88 /* dolphin.c in Sources */ = {isa = PBXBuildFile; fileRef = 002F3BF609D0938900EBEB88 /* dolphin.c */; };
-		002F3BFD09D0938900EBEB88 /* shark.c in Sources */ = {isa = PBXBuildFile; fileRef = 002F3BF709D0938900EBEB88 /* shark.c */; };
-		002F3BFE09D0938900EBEB88 /* swim.c in Sources */ = {isa = PBXBuildFile; fileRef = 002F3BF809D0938900EBEB88 /* swim.c */; };
-		002F3BFF09D0938900EBEB88 /* whale.c in Sources */ = {isa = PBXBuildFile; fileRef = 002F3BF909D0938900EBEB88 /* whale.c */; };
-		002F3C0109D093BD00EBEB88 /* OpenGL.framework in Frameworks */ = {isa = PBXBuildFile; fileRef = 002F3C0009D093BD00EBEB88 /* OpenGL.framework */; };
-		002F3C6109D0951E00EBEB88 /* GLUT.framework in Frameworks */ = {isa = PBXBuildFile; fileRef = 002F3C6009D0951E00EBEB88 /* GLUT.framework */; };
-		8D11072B0486CEB800E47090 /* InfoPlist.strings in Resources */ = {isa = PBXBuildFile; fileRef = 089C165CFE840E0CC02AAC07 /* InfoPlist.strings */; };
-		8D11072F0486CEB800E47090 /* Cocoa.framework in Frameworks */ = {isa = PBXBuildFile; fileRef = 1058C7A1FEA54F0111CA2CBB /* Cocoa.framework */; };
-/* End PBXBuildFile section */
-
-/* Begin PBXCopyFilesBuildPhase section */
-		002F39FD09D0883400EBEB88 /* Copy Frameworks into .app bundle */ = {
-			isa = PBXCopyFilesBuildPhase;
-			buildActionMask = 2147483647;
-			dstPath = "";
-			dstSubfolderSpec = 10;
-			files = (
-				002F3A0009D0884600EBEB88 /* SDL.framework in Copy Frameworks into .app bundle */,
-			);
-			name = "Copy Frameworks into .app bundle";
-			runOnlyForDeploymentPostprocessing = 0;
-		};
-/* End PBXCopyFilesBuildPhase section */
-
-/* Begin PBXFileReference section */
-		002F39F909D0881F00EBEB88 /* SDL.framework */ = {isa = PBXFileReference; lastKnownFileType = wrapper.framework; name = SDL.framework; path = /Library/Frameworks/SDL.framework; sourceTree = ""; };
-		002F3A3E09D088BA00EBEB88 /* main.c */ = {isa = PBXFileReference; fileEncoding = 30; lastKnownFileType = sourcecode.c.c; path = main.c; sourceTree = SOURCE_ROOT; };
-		002F3BF409D0938900EBEB88 /* atlantis.c */ = {isa = PBXFileReference; fileEncoding = 30; lastKnownFileType = sourcecode.c.c; name = atlantis.c; path = atlantis/atlantis.c; sourceTree = SOURCE_ROOT; };
-		002F3BF509D0938900EBEB88 /* atlantis.h */ = {isa = PBXFileReference; fileEncoding = 30; lastKnownFileType = sourcecode.c.h; name = atlantis.h; path = atlantis/atlantis.h; sourceTree = SOURCE_ROOT; };
-		002F3BF609D0938900EBEB88 /* dolphin.c */ = {isa = PBXFileReference; fileEncoding = 30; lastKnownFileType = sourcecode.c.c; name = dolphin.c; path = atlantis/dolphin.c; sourceTree = SOURCE_ROOT; };
-		002F3BF709D0938900EBEB88 /* shark.c */ = {isa = PBXFileReference; fileEncoding = 30; lastKnownFileType = sourcecode.c.c; name = shark.c; path = atlantis/shark.c; sourceTree = SOURCE_ROOT; };
-		002F3BF809D0938900EBEB88 /* swim.c */ = {isa = PBXFileReference; fileEncoding = 30; lastKnownFileType = sourcecode.c.c; name = swim.c; path = atlantis/swim.c; sourceTree = SOURCE_ROOT; };
-		002F3BF909D0938900EBEB88 /* whale.c */ = {isa = PBXFileReference; fileEncoding = 30; lastKnownFileType = sourcecode.c.c; name = whale.c; path = atlantis/whale.c; sourceTree = SOURCE_ROOT; };
-		002F3C0009D093BD00EBEB88 /* OpenGL.framework */ = {isa = PBXFileReference; lastKnownFileType = wrapper.framework; name = OpenGL.framework; path = /System/Library/Frameworks/OpenGL.framework; sourceTree = ""; };
-		002F3C6009D0951E00EBEB88 /* GLUT.framework */ = {isa = PBXFileReference; lastKnownFileType = wrapper.framework; name = GLUT.framework; path = ../../../../../../../../../../System/Library/Frameworks/GLUT.framework; sourceTree = SOURCE_ROOT; };
-		089C165DFE840E0CC02AAC07 /* English */ = {isa = PBXFileReference; fileEncoding = 10; lastKnownFileType = text.plist.strings; name = English; path = English.lproj/InfoPlist.strings; sourceTree = ""; };
-		1058C7A1FEA54F0111CA2CBB /* Cocoa.framework */ = {isa = PBXFileReference; lastKnownFileType = wrapper.framework; name = Cocoa.framework; path = /System/Library/Frameworks/Cocoa.framework; sourceTree = ""; };
-		29B97324FDCFA39411CA2CEA /* AppKit.framework */ = {isa = PBXFileReference; lastKnownFileType = wrapper.framework; name = AppKit.framework; path = /System/Library/Frameworks/AppKit.framework; sourceTree = ""; };
-		29B97325FDCFA39411CA2CEA /* Foundation.framework */ = {isa = PBXFileReference; lastKnownFileType = wrapper.framework; name = Foundation.framework; path = /System/Library/Frameworks/Foundation.framework; sourceTree = ""; };
-		32CA4F630368D1EE00C91783 /* ___PROJECTNAME____Prefix.pch */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = "___PROJECTNAME____Prefix.pch"; sourceTree = ""; };
-		8D1107310486CEB800E47090 /* Info.plist */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = text.plist; path = Info.plist; sourceTree = ""; };
-		8D1107320486CEB800E47090 /* ___PROJECTNAME___.app */ = {isa = PBXFileReference; explicitFileType = wrapper.application; includeInIndex = 0; path = "___PROJECTNAME___.app"; sourceTree = BUILT_PRODUCTS_DIR; };
-/* End PBXFileReference section */
-
-/* Begin PBXFrameworksBuildPhase section */
-		8D11072E0486CEB800E47090 /* Frameworks */ = {
-			isa = PBXFrameworksBuildPhase;
-			buildActionMask = 2147483647;
-			files = (
-				002F39FA09D0881F00EBEB88 /* SDL.framework in Frameworks */,
-				002F3C6109D0951E00EBEB88 /* GLUT.framework in Frameworks */,
-				8D11072F0486CEB800E47090 /* Cocoa.framework in Frameworks */,
-				002F3C0109D093BD00EBEB88 /* OpenGL.framework in Frameworks */,
-			);
-			runOnlyForDeploymentPostprocessing = 0;
-		};
-/* End PBXFrameworksBuildPhase section */
-
-/* Begin PBXGroup section */
-		002F3BF309D0937800EBEB88 /* atlantis */ = {
-			isa = PBXGroup;
-			children = (
-				002F3BF409D0938900EBEB88 /* atlantis.c */,
-				002F3BF509D0938900EBEB88 /* atlantis.h */,
-				002F3BF609D0938900EBEB88 /* dolphin.c */,
-				002F3BF709D0938900EBEB88 /* shark.c */,
-				002F3BF809D0938900EBEB88 /* swim.c */,
-				002F3BF909D0938900EBEB88 /* whale.c */,
-			);
-			name = atlantis;
-			sourceTree = "";
-		};
-		080E96DDFE201D6D7F000001 /* Classes */ = {
-			isa = PBXGroup;
-			children = (
-			);
-			name = Classes;
-			sourceTree = "";
-		};
-		1058C7A0FEA54F0111CA2CBB /* Linked Frameworks */ = {
-			isa = PBXGroup;
-			children = (
-				002F39F909D0881F00EBEB88 /* SDL.framework */,
-				002F3C6009D0951E00EBEB88 /* GLUT.framework */,
-				1058C7A1FEA54F0111CA2CBB /* Cocoa.framework */,
-				002F3C0009D093BD00EBEB88 /* OpenGL.framework */,
-			);
-			name = "Linked Frameworks";
-			sourceTree = "";
-		};
-		1058C7A2FEA54F0111CA2CBB /* Other Frameworks */ = {
-			isa = PBXGroup;
-			children = (
-				29B97324FDCFA39411CA2CEA /* AppKit.framework */,
-				29B97325FDCFA39411CA2CEA /* Foundation.framework */,
-			);
-			name = "Other Frameworks";
-			sourceTree = "";
-		};
-		19C28FACFE9D520D11CA2CBB /* Products */ = {
-			isa = PBXGroup;
-			children = (
-				8D1107320486CEB800E47090 /* ___PROJECTNAME___.app */,
-			);
-			name = Products;
-			sourceTree = "";
-		};
-		29B97314FDCFA39411CA2CEA /* ___PROJECTNAMEASXML___ */ = {
-			isa = PBXGroup;
-			children = (
-				080E96DDFE201D6D7F000001 /* Classes */,
-				29B97315FDCFA39411CA2CEA /* Other Sources */,
-				29B97317FDCFA39411CA2CEA /* Resources */,
-				29B97323FDCFA39411CA2CEA /* Frameworks */,
-				19C28FACFE9D520D11CA2CBB /* Products */,
-			);
-			name = "___PROJECTNAMEASXML___";
-			sourceTree = "";
-		};
-		29B97315FDCFA39411CA2CEA /* Other Sources */ = {
-			isa = PBXGroup;
-			children = (
-				002F3BF309D0937800EBEB88 /* atlantis */,
-				32CA4F630368D1EE00C91783 /* ___PROJECTNAME____Prefix.pch */,
-				002F3A3E09D088BA00EBEB88 /* main.c */,
-			);
-			name = "Other Sources";
-			sourceTree = "";
-		};
-		29B97317FDCFA39411CA2CEA /* Resources */ = {
-			isa = PBXGroup;
-			children = (
-				8D1107310486CEB800E47090 /* Info.plist */,
-				089C165CFE840E0CC02AAC07 /* InfoPlist.strings */,
-			);
-			name = Resources;
-			sourceTree = "";
-		};
-		29B97323FDCFA39411CA2CEA /* Frameworks */ = {
-			isa = PBXGroup;
-			children = (
-				1058C7A0FEA54F0111CA2CBB /* Linked Frameworks */,
-				1058C7A2FEA54F0111CA2CBB /* Other Frameworks */,
-			);
-			name = Frameworks;
-			sourceTree = "";
-		};
-/* End PBXGroup section */
-
-/* Begin PBXNativeTarget section */
-		8D1107260486CEB800E47090 /* ___PROJECTNAME___ */ = {
-			isa = PBXNativeTarget;
-			buildConfigurationList = C01FCF4A08A954540054247B /* Build configuration list for PBXNativeTarget "___PROJECTNAME___" */;
-			buildPhases = (
-				8D1107290486CEB800E47090 /* Resources */,
-				8D11072C0486CEB800E47090 /* Sources */,
-				8D11072E0486CEB800E47090 /* Frameworks */,
-				002F39FD09D0883400EBEB88 /* Copy Frameworks into .app bundle */,
-			);
-			buildRules = (
-			);
-			dependencies = (
-			);
-			name = "___PROJECTNAME___";
-			productInstallPath = "$(HOME)/Applications";
-			productName = "___PROJECTNAME___";
-			productReference = 8D1107320486CEB800E47090 /* ___PROJECTNAME___.app */;
-			productType = "com.apple.product-type.application";
-		};
-/* End PBXNativeTarget section */
-
-/* Begin PBXProject section */
-		29B97313FDCFA39411CA2CEA /* Project object */ = {
-			isa = PBXProject;
-			buildConfigurationList = C01FCF4E08A954540054247B /* Build configuration list for PBXProject "___PROJECTNAME___" */;
-			compatibilityVersion = "Xcode 3.2";
-			hasScannedForEncodings = 1;
-			mainGroup = 29B97314FDCFA39411CA2CEA /* ___PROJECTNAMEASXML___ */;
-			projectDirPath = "";
-			projectRoot = "";
-			targets = (
-				8D1107260486CEB800E47090 /* ___PROJECTNAME___ */,
-			);
-		};
-/* End PBXProject section */
-
-/* Begin PBXResourcesBuildPhase section */
-		8D1107290486CEB800E47090 /* Resources */ = {
-			isa = PBXResourcesBuildPhase;
-			buildActionMask = 2147483647;
-			files = (
-				8D11072B0486CEB800E47090 /* InfoPlist.strings in Resources */,
-			);
-			runOnlyForDeploymentPostprocessing = 0;
-		};
-/* End PBXResourcesBuildPhase section */
-
-/* Begin PBXSourcesBuildPhase section */
-		8D11072C0486CEB800E47090 /* Sources */ = {
-			isa = PBXSourcesBuildPhase;
-			buildActionMask = 2147483647;
-			files = (
-				002F3A3F09D088BA00EBEB88 /* main.c in Sources */,
-				002F3BFA09D0938900EBEB88 /* atlantis.c in Sources */,
-				002F3BFC09D0938900EBEB88 /* dolphin.c in Sources */,
-				002F3BFD09D0938900EBEB88 /* shark.c in Sources */,
-				002F3BFE09D0938900EBEB88 /* swim.c in Sources */,
-				002F3BFF09D0938900EBEB88 /* whale.c in Sources */,
-			);
-			runOnlyForDeploymentPostprocessing = 0;
-		};
-/* End PBXSourcesBuildPhase section */
-
-/* Begin PBXVariantGroup section */
-		089C165CFE840E0CC02AAC07 /* InfoPlist.strings */ = {
-			isa = PBXVariantGroup;
-			children = (
-				089C165DFE840E0CC02AAC07 /* English */,
-			);
-			name = InfoPlist.strings;
-			sourceTree = "";
-		};
-/* End PBXVariantGroup section */
-
-/* Begin XCBuildConfiguration section */
-		C01FCF4B08A954540054247B /* Debug */ = {
-			isa = XCBuildConfiguration;
-			buildSettings = {
-				COPY_PHASE_STRIP = NO;
-				GCC_DYNAMIC_NO_PIC = NO;
-				GCC_ENABLE_FIX_AND_CONTINUE = YES;
-				GCC_MODEL_TUNING = G5;
-				GCC_OPTIMIZATION_LEVEL = 0;
-				GCC_PRECOMPILE_PREFIX_HEADER = YES;
-				GCC_PREFIX_HEADER = "___PROJECTNAMEASIDENTIFIER____Prefix.pch";
-				INFOPLIST_FILE = Info.plist;
-				INSTALL_PATH = "$(HOME)/Applications";
-				PRODUCT_NAME = "___PROJECTNAME___";
-				WRAPPER_EXTENSION = app;
-			};
-			name = Debug;
-		};
-		C01FCF4C08A954540054247B /* Release */ = {
-			isa = XCBuildConfiguration;
-			buildSettings = {
-				ARCHS = (
-					ppc,
-					i386,
-				);
-				GCC_GENERATE_DEBUGGING_SYMBOLS = NO;
-				GCC_MODEL_TUNING = G5;
-				GCC_PRECOMPILE_PREFIX_HEADER = YES;
-				GCC_PREFIX_HEADER = "___PROJECTNAMEASIDENTIFIER____Prefix.pch";
-				INFOPLIST_FILE = Info.plist;
-				INSTALL_PATH = "$(HOME)/Applications";
-				PRODUCT_NAME = "___PROJECTNAME___";
-				WRAPPER_EXTENSION = app;
-			};
-			name = Release;
-		};
-		C01FCF4F08A954540054247B /* Debug */ = {
-			isa = XCBuildConfiguration;
-			buildSettings = {
-				ARCHS = "$(ARCHS_STANDARD_32_64_BIT)";
-				FRAMEWORK_SEARCH_PATHS = (
-					"$(HOME)/Library/Frameworks",
-					/Library/Frameworks,
-					"$(FRAMEWORK_SEARCH_PATHS)",
-				);
-				GCC_C_LANGUAGE_STANDARD = c99;
-				GCC_VERSION = 4.0;
-				"GCC_VERSION[arch=x86_64]" = 4.2;
-				GCC_WARN_ABOUT_RETURN_TYPE = YES;
-				GCC_WARN_UNUSED_VARIABLE = YES;
-				HEADER_SEARCH_PATHS = (
-					"$(HOME)/Library/Frameworks/SDL.framework/Headers",
-					/Library/Frameworks/SDL.framework/Headers,
-					"$(HEADER_SEARCH_PATHS)",
-				);
-				PREBINDING = NO;
-				SDKROOT = macosx10.4;
-				"SDKROOT[arch=x86_64]" = "$(DEVELOPER_SDK_DIR)/MacOSX10.6.sdk";
-			};
-			name = Debug;
-		};
-		C01FCF5008A954540054247B /* Release */ = {
-			isa = XCBuildConfiguration;
-			buildSettings = {
-				ARCHS = "$(ARCHS_STANDARD_32_64_BIT)";
-				FRAMEWORK_SEARCH_PATHS = (
-					"$(HOME)/Library/Frameworks",
-					/Library/Frameworks,
-					"$(FRAMEWORK_SEARCH_PATHS)",
-				);
-				GCC_C_LANGUAGE_STANDARD = c99;
-				GCC_VERSION = 4.0;
-				"GCC_VERSION[arch=x86_64]" = 4.2;
-				GCC_WARN_ABOUT_RETURN_TYPE = YES;
-				GCC_WARN_UNUSED_VARIABLE = YES;
-				HEADER_SEARCH_PATHS = (
-					"$(HOME)/Library/Frameworks/SDL.framework/Headers",
-					/Library/Frameworks/SDL.framework/Headers,
-					"$(HEADER_SEARCH_PATHS)",
-				);
-				PREBINDING = NO;
-				SDKROOT = macosx10.4;
-				"SDKROOT[arch=x86_64]" = "$(DEVELOPER_SDK_DIR)/MacOSX10.6.sdk";
-			};
-			name = Release;
-		};
-/* End XCBuildConfiguration section */
-
-/* Begin XCConfigurationList section */
-		C01FCF4A08A954540054247B /* Build configuration list for PBXNativeTarget "___PROJECTNAME___" */ = {
-			isa = XCConfigurationList;
-			buildConfigurations = (
-				C01FCF4B08A954540054247B /* Debug */,
-				C01FCF4C08A954540054247B /* Release */,
-			);
-			defaultConfigurationIsVisible = 0;
-			defaultConfigurationName = Release;
-		};
-		C01FCF4E08A954540054247B /* Build configuration list for PBXProject "___PROJECTNAME___" */ = {
-			isa = XCConfigurationList;
-			buildConfigurations = (
-				C01FCF4F08A954540054247B /* Debug */,
-				C01FCF5008A954540054247B /* Release */,
-			);
-			defaultConfigurationIsVisible = 0;
-			defaultConfigurationName = Release;
-		};
-/* End XCConfigurationList section */
-	};
-	rootObject = 29B97313FDCFA39411CA2CEA /* Project object */;
-}
diff --git a/Xcode/TemplatesForXcodeSnowLeopard/SDL OpenGL Application/atlantis/atlantis.c b/Xcode/TemplatesForXcodeSnowLeopard/SDL OpenGL Application/atlantis/atlantis.c
deleted file mode 100644
index debed809d..000000000
--- a/Xcode/TemplatesForXcodeSnowLeopard/SDL OpenGL Application/atlantis/atlantis.c	
+++ /dev/null
@@ -1,459 +0,0 @@
-
-/* Copyright (c) Mark J. Kilgard, 1994. */
-
-/**
- * (c) Copyright 1993, 1994, Silicon Graphics, Inc.
- * ALL RIGHTS RESERVED
- * Permission to use, copy, modify, and distribute this software for
- * any purpose and without fee is hereby granted, provided that the above
- * copyright notice appear in all copies and that both the copyright notice
- * and this permission notice appear in supporting documentation, and that
- * the name of Silicon Graphics, Inc. not be used in advertising
- * or publicity pertaining to distribution of the software without specific,
- * written prior permission.
- *
- * THE MATERIAL EMBODIED ON THIS SOFTWARE IS PROVIDED TO YOU "AS-IS"
- * AND WITHOUT WARRANTY OF ANY KIND, EXPRESS, IMPLIED OR OTHERWISE,
- * INCLUDING WITHOUT LIMITATION, ANY WARRANTY OF MERCHANTABILITY OR
- * FITNESS FOR A PARTICULAR PURPOSE.  IN NO EVENT SHALL SILICON
- * GRAPHICS, INC.  BE LIABLE TO YOU OR ANYONE ELSE FOR ANY DIRECT,
- * SPECIAL, INCIDENTAL, INDIRECT OR CONSEQUENTIAL DAMAGES OF ANY
- * KIND, OR ANY DAMAGES WHATSOEVER, INCLUDING WITHOUT LIMITATION,
- * LOSS OF PROFIT, LOSS OF USE, SAVINGS OR REVENUE, OR THE CLAIMS OF
- * THIRD PARTIES, WHETHER OR NOT SILICON GRAPHICS, INC.  HAS BEEN
- * ADVISED OF THE POSSIBILITY OF SUCH LOSS, HOWEVER CAUSED AND ON
- * ANY THEORY OF LIABILITY, ARISING OUT OF OR IN CONNECTION WITH THE
- * POSSESSION, USE OR PERFORMANCE OF THIS SOFTWARE.
- *
- * US Government Users Restricted Rights
- * Use, duplication, or disclosure by the Government is subject to
- * restrictions set forth in FAR 52.227.19(c)(2) or subparagraph
- * (c)(1)(ii) of the Rights in Technical Data and Computer Software
- * clause at DFARS 252.227-7013 and/or in similar or successor
- * clauses in the FAR or the DOD or NASA FAR Supplement.
- * Unpublished-- rights reserved under the copyright laws of the
- * United States.  Contractor/manufacturer is Silicon Graphics,
- * Inc., 2011 N.  Shoreline Blvd., Mountain View, CA 94039-7311.
- *
- * OpenGL(TM) is a trademark of Silicon Graphics, Inc.
- */
-#include 
-#include 
-#include 
-#include 
-#include 
-#include 
-#include "atlantis.h"
-
-fishRec sharks[NUM_SHARKS];
-fishRec momWhale;
-fishRec babyWhale;
-fishRec dolph;
-
-GLboolean Timing = GL_TRUE;
-
-int w_win = 640;
-int h_win = 480;
-GLint count  = 0;
-GLenum StrMode = GL_VENDOR;
-
-GLboolean moving;
-
-static double mtime(void)
-{
-   struct timeval tk_time;
-   struct timezone tz;
-
-   gettimeofday(&tk_time, &tz);
-
-   return 4294.967296 * tk_time.tv_sec + 0.000001 * tk_time.tv_usec;
-}
-
-static double filter(double in, double *save)
-{
-    static double k1 = 0.9;
-    static double k2 = 0.05;
-
-    save[3] = in;
-    save[1] = save[0]*k1 + k2*(save[3] + save[2]);
-
-    save[0]=save[1];
-    save[2]=save[3];
-
-    return(save[1]);
-}
-
-void DrawStr(const char *str)
-{
-    GLint i = 0;
-
-    if(!str) return;
-
-    while(str[i])
-    {
-        glutBitmapCharacter(GLUT_BITMAP_HELVETICA_12, str[i]);
-        i++;
-    }
-}
-
-void
-InitFishs(void)
-{
-    int i;
-
-    for (i = 0; i < NUM_SHARKS; i++) {
-        sharks[i].x = 70000.0 + rand() % 6000;
-        sharks[i].y = rand() % 6000;
-        sharks[i].z = rand() % 6000;
-        sharks[i].psi = rand() % 360 - 180.0;
-        sharks[i].v = 1.0;
-    }
-
-    dolph.x = 30000.0;
-    dolph.y = 0.0;
-    dolph.z = 6000.0;
-    dolph.psi = 90.0;
-    dolph.theta = 0.0;
-    dolph.v = 3.0;
-
-    momWhale.x = 70000.0;
-    momWhale.y = 0.0;
-    momWhale.z = 0.0;
-    momWhale.psi = 90.0;
-    momWhale.theta = 0.0;
-    momWhale.v = 3.0;
-
-    babyWhale.x = 60000.0;
-    babyWhale.y = -2000.0;
-    babyWhale.z = -2000.0;
-    babyWhale.psi = 90.0;
-    babyWhale.theta = 0.0;
-    babyWhale.v = 3.0;
-}
-
-void
-Atlantis_Init(void)
-{
-    static float ambient[] = {0.2, 0.2, 0.2, 1.0};
-    static float diffuse[] = {1.0, 1.0, 1.0, 1.0};
-    static float position[] = {0.0, 1.0, 0.0, 0.0};
-    static float mat_shininess[] = {90.0};
-    static float mat_specular[] = {0.8, 0.8, 0.8, 1.0};
-    static float mat_diffuse[] = {0.46, 0.66, 0.795, 1.0};
-    static float mat_ambient[] = {0.3, 0.4, 0.5, 1.0};
-    static float lmodel_ambient[] = {0.4, 0.4, 0.4, 1.0};
-    static float lmodel_localviewer[] = {0.0};
-    //GLfloat map1[4] = {0.0, 0.0, 0.0, 0.0};
-    //GLfloat map2[4] = {0.0, 0.0, 0.0, 0.0};
-    static float fog_color[] = {0.0, 0.5, 0.9, 1.0};
-
-    glFrontFace(GL_CCW);
-
-    glDepthFunc(GL_LESS);
-    glEnable(GL_DEPTH_TEST);
-
-    glLightfv(GL_LIGHT0, GL_AMBIENT, ambient);
-    glLightfv(GL_LIGHT0, GL_DIFFUSE, diffuse);
-    glLightfv(GL_LIGHT0, GL_POSITION, position);
-    glLightModelfv(GL_LIGHT_MODEL_AMBIENT, lmodel_ambient);
-    glLightModelfv(GL_LIGHT_MODEL_LOCAL_VIEWER, lmodel_localviewer);
-    glEnable(GL_LIGHTING);
-    glEnable(GL_LIGHT0);
-
-    glMaterialfv(GL_FRONT_AND_BACK, GL_SHININESS, mat_shininess);
-    glMaterialfv(GL_FRONT_AND_BACK, GL_SPECULAR, mat_specular);
-    glMaterialfv(GL_FRONT_AND_BACK, GL_DIFFUSE, mat_diffuse);
-    glMaterialfv(GL_FRONT_AND_BACK, GL_AMBIENT, mat_ambient);
-
-    InitFishs();
-
-    glEnable(GL_FOG);
-    glFogi(GL_FOG_MODE, GL_EXP);
-    glFogf(GL_FOG_DENSITY, 0.0000025);
-    glFogfv(GL_FOG_COLOR, fog_color);
-
-    glClearColor(0.0, 0.5, 0.9, 1.0);
-}
-
-void
-Atlantis_Reshape(int width, int height)
-{
-    w_win = width;
-    h_win = height;
-
-    glViewport(0, 0, width, height);
-
-    glMatrixMode(GL_PROJECTION);
-    glLoadIdentity();
-    gluPerspective(60.0, (GLfloat) width / (GLfloat) height, 20000.0, 300000.0);
-    glMatrixMode(GL_MODELVIEW);
-}
-
-void
-Atlantis_Animate(void)
-{
-    int i;
-
-    for (i = 0; i < NUM_SHARKS; i++) {
-        SharkPilot(&sharks[i]);
-        SharkMiss(i);
-    }
-    WhalePilot(&dolph);
-    dolph.phi++;
-    //glutPostRedisplay();
-    WhalePilot(&momWhale);
-    momWhale.phi++;
-    WhalePilot(&babyWhale);
-    babyWhale.phi++;
-}
-
-void
-Atlantis_Key(unsigned char key, int x, int y)
-{
-    switch (key) {
-    case 't':
-        Timing = !Timing;
-    break;
-    case ' ':
-        switch(StrMode)
-        {
-            case GL_EXTENSIONS:
-                StrMode = GL_VENDOR;
-            break;
-            case GL_VENDOR:
-                StrMode = GL_RENDERER;
-            break;
-            case GL_RENDERER:
-                StrMode = GL_VERSION;
-            break;
-            case GL_VERSION:
-                StrMode = GL_EXTENSIONS;
-            break;
-        }
-    break;
-    case 27:           /* Esc will quit */
-        exit(1);
-    break;
-    case 's':                   /* "s" start animation */
-        moving = GL_TRUE;
-        //glutIdleFunc(Animate);
-    break;
-    case 'a':                   /* "a" stop animation */
-        moving = GL_FALSE;
-        //glutIdleFunc(NULL);
-    break;
-    case '.':                   /* "." will advance frame */
-        if (!moving) {
-            Atlantis_Animate();
-        }
-    }
-}
-/*
-void Display(void)
-{
-    static float P123[3] = {-448.94, -203.14, 9499.60};
-    static float P124[3] = {-442.64, -185.20, 9528.07};
-    static float P125[3] = {-441.07, -148.05, 9528.07};
-    static float P126[3] = {-443.43, -128.84, 9499.60};
-    static float P127[3] = {-456.87, -146.78, 9466.67};
-    static float P128[3] = {-453.68, -183.93, 9466.67};
-
-    glClear(GL_COLOR_BUFFER_BIT | GL_DEPTH_BUFFER_BIT);
-
-    glPushMatrix();
-    FishTransform(&dolph);
-    DrawDolphin(&dolph);
-    glPopMatrix();
-
-    glutSwapBuffers();
-}
-*/
-
-void
-Atlantis_Display(void)
-{
-    int i;
-    static double th[4] = {0.0, 0.0, 0.0, 0.0};
-    static double t1 = 0.0, t2 = 0.0, t;
-    char num_str[128];
-
-    t1 = t2;
-
-    glClear(GL_COLOR_BUFFER_BIT | GL_DEPTH_BUFFER_BIT);
-
-    for (i = 0; i < NUM_SHARKS; i++) {
-        glPushMatrix();
-        FishTransform(&sharks[i]);
-        DrawShark(&sharks[i]);
-        glPopMatrix();
-    }
-
-    glPushMatrix();
-    FishTransform(&dolph);
-    DrawDolphin(&dolph);
-    glPopMatrix();
-
-    glPushMatrix();
-    FishTransform(&momWhale);
-    DrawWhale(&momWhale);
-    glPopMatrix();
-
-    glPushMatrix();
-    FishTransform(&babyWhale);
-    glScalef(0.45, 0.45, 0.3);
-    DrawWhale(&babyWhale);
-    glPopMatrix();
-
-    if(Timing)
-    {
-        t2 = mtime();
-        t = t2 - t1;
-        if(t > 0.0001) t = 1.0 / t;
-
-        glDisable(GL_LIGHTING);
-        //glDisable(GL_DEPTH_TEST);
-
-        glColor3f(1.0, 0.0, 0.0);
-
-        glMatrixMode (GL_PROJECTION);
-        glPushMatrix();
-        glLoadIdentity();
-        glOrtho(0, w_win, 0, h_win, -10.0, 10.0);
-
-        glRasterPos2f(5.0, 5.0);
-
-        switch(StrMode)
-        {
-            case GL_VENDOR:
-                sprintf(num_str, "%0.2f Hz, %dx%d, VENDOR: ", filter(t, th), w_win, h_win);
-                DrawStr(num_str);
-                DrawStr(glGetString(GL_VENDOR));
-            break;
-            case GL_RENDERER:
-                sprintf(num_str, "%0.2f Hz, %dx%d, RENDERER: ", filter(t, th), w_win, h_win);
-                DrawStr(num_str);
-                DrawStr(glGetString(GL_RENDERER));
-            break;
-            case GL_VERSION:
-                sprintf(num_str, "%0.2f Hz, %dx%d, VERSION: ", filter(t, th), w_win, h_win);
-                DrawStr(num_str);
-                DrawStr(glGetString(GL_VERSION));
-            break;
-            case GL_EXTENSIONS:
-                sprintf(num_str, "%0.2f Hz, %dx%d, EXTENSIONS: ", filter(t, th), w_win, h_win);
-                DrawStr(num_str);
-                DrawStr(glGetString(GL_EXTENSIONS));
-            break;
-        }
-
-        glPopMatrix();
-        glMatrixMode(GL_MODELVIEW);
-
-        glEnable(GL_LIGHTING);
-        //glEnable(GL_DEPTH_TEST);
-    }
-
-    count++;
-
-    glutSwapBuffers();
-}
-
-/*
-void
-Visible(int state)
-{
-    if (state == GLUT_VISIBLE) {
-        if (moving)
-            glutIdleFunc(Animate);
-    } else {
-        if (moving)
-            glutIdleFunc(NULL);
-    }
-}
-
-
-void
-timingSelect(int value)
-{
-    switch(value)
-    {
-        case 1:
-            StrMode = GL_VENDOR;
-        break;
-        case 2:
-            StrMode = GL_RENDERER;
-        break;
-        case 3:
-            StrMode = GL_VERSION;
-        break;
-        case 4:
-            StrMode = GL_EXTENSIONS;
-        break;
-    }
-}
-
-void
-menuSelect(int value)
-{
-    switch (value) {
-    case 1:
-        moving = GL_TRUE;
-        glutIdleFunc(Animate);
-        break;
-    case 2:
-        moving = GL_FALSE;
-        glutIdleFunc(NULL);
-        break;
-    case 4:
-        exit(0);
-        break;
-    }
-}
-
-int
-main(int argc, char **argv)
-{
-    GLboolean fullscreen = GL_FALSE;
-    GLint time_menu;
-
-    srand(0);
-
-        glutInit(&argc, argv);
-    if (argc > 1 && !strcmp(argv[1], "-w"))
-        fullscreen = GL_FALSE;
-
-    //glutInitDisplayMode(GLUT_RGBA | GLUT_DOUBLE | GLUT_DEPTH);
-    glutInitDisplayString("rgba double depth=24");
-    if (fullscreen) {
-      glutGameModeString("1024x768:32");
-      glutEnterGameMode();
-    } else {
-      glutInitWindowSize(320, 240);
-      glutCreateWindow("Atlantis Timing");
-    }
-    Init();
-    glutDisplayFunc(Display);
-    glutReshapeFunc(Reshape);
-    glutKeyboardFunc(Key);
-    moving = GL_TRUE;
-glutIdleFunc(Animate);
-    glutVisibilityFunc(Visible);
-
-    time_menu = glutCreateMenu(timingSelect);
-    glutAddMenuEntry("GL_VENDOR", 1);
-    glutAddMenuEntry("GL_RENDERER", 2);
-    glutAddMenuEntry("GL_VERSION", 3);
-    glutAddMenuEntry("GL_EXTENSIONS", 4);
-
-    glutCreateMenu(menuSelect);
-    glutAddMenuEntry("Start motion", 1);
-    glutAddMenuEntry("Stop motion", 2);
-    glutAddSubMenu("Timing Mode", time_menu);
-    glutAddMenuEntry("Quit", 4);
-
-    //glutAttachMenu(GLUT_RIGHT_BUTTON);
-    glutAttachMenu(GLUT_RIGHT_BUTTON);
-    glutMainLoop();
-    return 0;             // ANSI C requires main to return int.
-}
-*/
\ No newline at end of file
diff --git a/Xcode/TemplatesForXcodeSnowLeopard/SDL OpenGL Application/atlantis/atlantis.h b/Xcode/TemplatesForXcodeSnowLeopard/SDL OpenGL Application/atlantis/atlantis.h
deleted file mode 100644
index 6ccf2d5f0..000000000
--- a/Xcode/TemplatesForXcodeSnowLeopard/SDL OpenGL Application/atlantis/atlantis.h	
+++ /dev/null
@@ -1,65 +0,0 @@
-/**
- * (c) Copyright 1993, 1994, Silicon Graphics, Inc.
- * ALL RIGHTS RESERVED
- * Permission to use, copy, modify, and distribute this software for
- * any purpose and without fee is hereby granted, provided that the above
- * copyright notice appear in all copies and that both the copyright notice
- * and this permission notice appear in supporting documentation, and that
- * the name of Silicon Graphics, Inc. not be used in advertising
- * or publicity pertaining to distribution of the software without specific,
- * written prior permission.
- *
- * THE MATERIAL EMBODIED ON THIS SOFTWARE IS PROVIDED TO YOU "AS-IS"
- * AND WITHOUT WARRANTY OF ANY KIND, EXPRESS, IMPLIED OR OTHERWISE,
- * INCLUDING WITHOUT LIMITATION, ANY WARRANTY OF MERCHANTABILITY OR
- * FITNESS FOR A PARTICULAR PURPOSE.  IN NO EVENT SHALL SILICON
- * GRAPHICS, INC.  BE LIABLE TO YOU OR ANYONE ELSE FOR ANY DIRECT,
- * SPECIAL, INCIDENTAL, INDIRECT OR CONSEQUENTIAL DAMAGES OF ANY
- * KIND, OR ANY DAMAGES WHATSOEVER, INCLUDING WITHOUT LIMITATION,
- * LOSS OF PROFIT, LOSS OF USE, SAVINGS OR REVENUE, OR THE CLAIMS OF
- * THIRD PARTIES, WHETHER OR NOT SILICON GRAPHICS, INC.  HAS BEEN
- * ADVISED OF THE POSSIBILITY OF SUCH LOSS, HOWEVER CAUSED AND ON
- * ANY THEORY OF LIABILITY, ARISING OUT OF OR IN CONNECTION WITH THE
- * POSSESSION, USE OR PERFORMANCE OF THIS SOFTWARE.
- *
- * US Government Users Restricted Rights
- * Use, duplication, or disclosure by the Government is subject to
- * restrictions set forth in FAR 52.227.19(c)(2) or subparagraph
- * (c)(1)(ii) of the Rights in Technical Data and Computer Software
- * clause at DFARS 252.227-7013 and/or in similar or successor
- * clauses in the FAR or the DOD or NASA FAR Supplement.
- * Unpublished-- rights reserved under the copyright laws of the
- * United States.  Contractor/manufacturer is Silicon Graphics,
- * Inc., 2011 N.  Shoreline Blvd., Mountain View, CA 94039-7311.
- *
- * OpenGL(TM) is a trademark of Silicon Graphics, Inc.
- */
-#define RAD 57.295
-#define RRAD 0.01745
-
-#define NUM_SHARKS 4
-#define SHARKSIZE 6000
-#define SHARKSPEED 100.0
-
-#define WHALESPEED 250.0
-
-typedef struct _fishRec {
-    float x, y, z, phi, theta, psi, v;
-    float xt, yt, zt;
-    float htail, vtail;
-    float dtheta;
-    int spurt, attack;
-} fishRec;
-
-extern fishRec sharks[NUM_SHARKS];
-extern fishRec momWhale;
-extern fishRec babyWhale;
-extern fishRec dolph;
-
-extern void FishTransform(fishRec *);
-extern void WhalePilot(fishRec *);
-extern void SharkPilot(fishRec *);
-extern void SharkMiss(int);
-extern void DrawWhale(fishRec *);
-extern void DrawShark(fishRec *);
-extern void DrawDolphin(fishRec *);
diff --git a/Xcode/TemplatesForXcodeSnowLeopard/SDL OpenGL Application/atlantis/dolphin.c b/Xcode/TemplatesForXcodeSnowLeopard/SDL OpenGL Application/atlantis/dolphin.c
deleted file mode 100644
index 9fba3ba98..000000000
--- a/Xcode/TemplatesForXcodeSnowLeopard/SDL OpenGL Application/atlantis/dolphin.c	
+++ /dev/null
@@ -1,1934 +0,0 @@
-/**
- * (c) Copyright 1993, 1994, Silicon Graphics, Inc.
- * ALL RIGHTS RESERVED
- * Permission to use, copy, modify, and distribute this software for
- * any purpose and without fee is hereby granted, provided that the above
- * copyright notice appear in all copies and that both the copyright notice
- * and this permission notice appear in supporting documentation, and that
- * the name of Silicon Graphics, Inc. not be used in advertising
- * or publicity pertaining to distribution of the software without specific,
- * written prior permission.
- *
- * THE MATERIAL EMBODIED ON THIS SOFTWARE IS PROVIDED TO YOU "AS-IS"
- * AND WITHOUT WARRANTY OF ANY KIND, EXPRESS, IMPLIED OR OTHERWISE,
- * INCLUDING WITHOUT LIMITATION, ANY WARRANTY OF MERCHANTABILITY OR
- * FITNESS FOR A PARTICULAR PURPOSE.  IN NO EVENT SHALL SILICON
- * GRAPHICS, INC.  BE LIABLE TO YOU OR ANYONE ELSE FOR ANY DIRECT,
- * SPECIAL, INCIDENTAL, INDIRECT OR CONSEQUENTIAL DAMAGES OF ANY
- * KIND, OR ANY DAMAGES WHATSOEVER, INCLUDING WITHOUT LIMITATION,
- * LOSS OF PROFIT, LOSS OF USE, SAVINGS OR REVENUE, OR THE CLAIMS OF
- * THIRD PARTIES, WHETHER OR NOT SILICON GRAPHICS, INC.  HAS BEEN
- * ADVISED OF THE POSSIBILITY OF SUCH LOSS, HOWEVER CAUSED AND ON
- * ANY THEORY OF LIABILITY, ARISING OUT OF OR IN CONNECTION WITH THE
- * POSSESSION, USE OR PERFORMANCE OF THIS SOFTWARE.
- *
- * US Government Users Restricted Rights
- * Use, duplication, or disclosure by the Government is subject to
- * restrictions set forth in FAR 52.227.19(c)(2) or subparagraph
- * (c)(1)(ii) of the Rights in Technical Data and Computer Software
- * clause at DFARS 252.227-7013 and/or in similar or successor
- * clauses in the FAR or the DOD or NASA FAR Supplement.
- * Unpublished-- rights reserved under the copyright laws of the
- * United States.  Contractor/manufacturer is Silicon Graphics,
- * Inc., 2011 N.  Shoreline Blvd., Mountain View, CA 94039-7311.
- *
- * OpenGL(TM) is a trademark of Silicon Graphics, Inc.
- */
-#include 
-#include 
-#include "atlantis.h"
-/* *INDENT-OFF* */
-static float N001[3] = {-0.005937 ,-0.101998 ,-0.994767};
-static float N002[3] = {0.936780 ,-0.200803 ,0.286569};
-static float N003[3] = {-0.233062 ,0.972058 ,0.028007};
-static float N005[3] = {0.898117 ,0.360171 ,0.252315};
-static float N006[3] = {-0.915437 ,0.348456 ,0.201378};
-static float N007[3] = {0.602263 ,-0.777527 ,0.180920};
-static float N008[3] = {-0.906912 ,-0.412015 ,0.088061};
-static float N012[3] = {0.884408 ,-0.429417 ,-0.182821};
-static float N013[3] = {0.921121 ,0.311084 ,-0.234016};
-static float N014[3] = {0.382635 ,0.877882 ,-0.287948};
-static float N015[3] = {-0.380046 ,0.888166 ,-0.258316};
-static float N016[3] = {-0.891515 ,0.392238 ,-0.226607};
-static float N017[3] = {-0.901419 ,-0.382002 ,-0.203763};
-static float N018[3] = {-0.367225 ,-0.911091 ,-0.187243};
-static float N019[3] = {0.339539 ,-0.924846 ,-0.171388};
-static float N020[3] = {0.914706 ,-0.378617 ,-0.141290};
-static float N021[3] = {0.950662 ,0.262713 ,-0.164994};
-static float N022[3] = {0.546359 ,0.801460 ,-0.243218};
-static float N023[3] = {-0.315796 ,0.917068 ,-0.243431};
-static float N024[3] = {-0.825687 ,0.532277 ,-0.186875};
-static float N025[3] = {-0.974763 ,-0.155232 ,-0.160435};
-static float N026[3] = {-0.560596 ,-0.816658 ,-0.137119};
-static float N027[3] = {0.380210 ,-0.910817 ,-0.160786};
-static float N028[3] = {0.923772 ,-0.358322 ,-0.135093};
-static float N029[3] = {0.951202 ,0.275053 ,-0.139859};
-static float N030[3] = {0.686099 ,0.702548 ,-0.188932};
-static float N031[3] = {-0.521865 ,0.826719 ,-0.210220};
-static float N032[3] = {-0.923820 ,0.346739 ,-0.162258};
-static float N033[3] = {-0.902095 ,-0.409995 ,-0.134646};
-static float N034[3] = {-0.509115 ,-0.848498 ,-0.144404};
-static float N035[3] = {0.456469 ,-0.880293 ,-0.129305};
-static float N036[3] = {0.873401 ,-0.475489 ,-0.105266};
-static float N037[3] = {0.970825 ,0.179861 ,-0.158584};
-static float N038[3] = {0.675609 ,0.714187 ,-0.183004};
-static float N039[3] = {-0.523574 ,0.830212 ,-0.191360};
-static float N040[3] = {-0.958895 ,0.230808 ,-0.165071};
-static float N041[3] = {-0.918285 ,-0.376803 ,-0.121542};
-static float N042[3] = {-0.622467 ,-0.774167 ,-0.114888};
-static float N043[3] = {0.404497 ,-0.908807 ,-0.102231};
-static float N044[3] = {0.930538 ,-0.365155 ,-0.027588};
-static float N045[3] = {0.921920 ,0.374157 ,-0.100345};
-static float N046[3] = {0.507346 ,0.860739 ,0.041562};
-static float N047[3] = {-0.394646 ,0.918815 ,-0.005730};
-static float N048[3] = {-0.925411 ,0.373024 ,-0.066837};
-static float N049[3] = {-0.945337 ,-0.322309 ,-0.049551};
-static float N050[3] = {-0.660437 ,-0.750557 ,-0.022072};
-static float N051[3] = {0.488835 ,-0.871950 ,-0.027261};
-static float N052[3] = {0.902599 ,-0.421397 ,0.087969};
-static float N053[3] = {0.938636 ,0.322606 ,0.122020};
-static float N054[3] = {0.484605 ,0.871078 ,0.079878};
-static float N055[3] = {-0.353607 ,0.931559 ,0.084619};
-static float N056[3] = {-0.867759 ,0.478564 ,0.134054};
-static float N057[3] = {-0.951583 ,-0.296030 ,0.082794};
-static float N058[3] = {-0.672355 ,-0.730209 ,0.121384};
-static float N059[3] = {0.528336 ,-0.842452 ,0.105525};
-static float N060[3] = {0.786913 ,-0.564760 ,0.248627};
-static float N062[3] = {0.622098 ,0.765230 ,0.165584};
-static float N063[3] = {-0.631711 ,0.767816 ,0.106773};
-static float N064[3] = {-0.687886 ,0.606351 ,0.398938};
-static float N065[3] = {-0.946327 ,-0.281623 ,0.158598};
-static float N066[3] = {-0.509549 ,-0.860437 ,0.002776};
-static float N067[3] = {0.462594 ,-0.876692 ,0.131977};
-static float N071[3] = {0.000000 ,1.000000 ,0.000000};
-static float N077[3] = {-0.880770 ,0.461448 ,0.106351};
-static float N078[3] = {-0.880770 ,0.461448 ,0.106351};
-static float N079[3] = {-0.880770 ,0.461448 ,0.106351};
-static float N080[3] = {-0.880770 ,0.461448 ,0.106351};
-static float N081[3] = {-0.571197 ,0.816173 ,0.087152};
-static float N082[3] = {-0.880770 ,0.461448 ,0.106351};
-static float N083[3] = {-0.571197 ,0.816173 ,0.087152};
-static float N084[3] = {-0.571197 ,0.816173 ,0.087152};
-static float N085[3] = {-0.880770 ,0.461448 ,0.106351};
-static float N086[3] = {-0.571197 ,0.816173 ,0.087152};
-static float N087[3] = {-0.880770 ,0.461448 ,0.106351};
-static float N088[3] = {-0.880770 ,0.461448 ,0.106351};
-static float N089[3] = {-0.880770 ,0.461448 ,0.106351};
-static float N090[3] = {-0.880770 ,0.461448 ,0.106351};
-static float N091[3] = {0.000000 ,1.000000 ,0.000000};
-static float N092[3] = {0.000000 ,1.000000 ,0.000000};
-static float N093[3] = {0.000000 ,1.000000 ,0.000000};
-static float N094[3] = {1.000000 ,0.000000 ,0.000000};
-static float N095[3] = {-1.000000 ,0.000000 ,0.000000};
-static float N097[3] = {-0.697296 ,0.702881 ,0.140491};
-static float N098[3] = {0.918864 ,0.340821 ,0.198819};
-static float N099[3] = {-0.932737 ,0.201195 ,0.299202};
-static float N100[3] = {0.029517 ,0.981679 ,0.188244};
-static float N102[3] = {0.813521 ,-0.204936 ,0.544229};
-static float N110[3] = {-0.781480 ,-0.384779 ,0.491155};
-static float N111[3] = {-0.722243 ,0.384927 ,0.574627};
-static float N112[3] = {-0.752278 ,0.502679 ,0.425901};
-static float N113[3] = {0.547257 ,0.367910 ,0.751766};
-static float N114[3] = {0.725949 ,-0.232568 ,0.647233};
-static float N115[3] = {-0.747182 ,-0.660786 ,0.071280};
-static float N116[3] = {0.931519 ,0.200748 ,0.303270};
-static float N117[3] = {-0.828928 ,0.313757 ,0.463071};
-static float N118[3] = {0.902554 ,-0.370967 ,0.218587};
-static float N119[3] = {-0.879257 ,-0.441851 ,0.177973};
-static float N120[3] = {0.642327 ,0.611901 ,0.461512};
-static float N121[3] = {0.964817 ,-0.202322 ,0.167910};
-static float N122[3] = {0.000000 ,1.000000 ,0.000000};
-static float P001[3] = {5.68, -300.95, 1324.70};
-static float P002[3] = {338.69, -219.63, 9677.03};
-static float P003[3] = {12.18, 474.59, 9138.14};
-static float P005[3] = {487.51, 198.05, 9350.78};
-static float P006[3] = {-457.61, 68.74, 9427.85};
-static float P007[3] = {156.52, -266.72, 10311.68};
-static float P008[3] = {-185.56, -266.51, 10310.47};
-static float P009[3] = {124.39, -261.46, 1942.34};
-static float P010[3] = {-130.05, -261.46, 1946.03};
-static float P011[3] = {141.07, -320.11, 1239.38};
-static float P012[3] = {156.48, -360.12, 2073.41};
-static float P013[3] = {162.00, -175.88, 2064.44};
-static float P014[3] = {88.16, -87.72, 2064.02};
-static float P015[3] = {-65.21, -96.13, 2064.02};
-static float P016[3] = {-156.48, -180.96, 2064.44};
-static float P017[3] = {-162.00, -368.93, 2082.39};
-static float P018[3] = {-88.16, -439.22, 2082.39};
-static float P019[3] = {65.21, -440.32, 2083.39};
-static float P020[3] = {246.87, -356.02, 2576.95};
-static float P021[3] = {253.17, -111.15, 2567.15};
-static float P022[3] = {132.34, 51.41, 2559.84};
-static float P023[3] = {-97.88, 40.44, 2567.15};
-static float P024[3] = {-222.97, -117.49, 2567.15};
-static float P025[3] = {-252.22, -371.53, 2569.92};
-static float P026[3] = {-108.44, -518.19, 2586.75};
-static float P027[3] = {97.88, -524.79, 2586.75};
-static float P028[3] = {370.03, -421.19, 3419.70};
-static float P029[3] = {351.15, -16.98, 3423.17};
-static float P030[3] = {200.66, 248.46, 3430.37};
-static float P031[3] = {-148.42, 235.02, 3417.91};
-static float P032[3] = {-360.21, -30.27, 3416.84};
-static float P033[3] = {-357.90, -414.89, 3407.04};
-static float P034[3] = {-148.88, -631.35, 3409.90};
-static float P035[3] = {156.38, -632.59, 3419.70};
-static float P036[3] = {462.61, -469.21, 4431.51};
-static float P037[3] = {466.60, 102.25, 4434.98};
-static float P038[3] = {243.05, 474.34, 4562.02};
-static float P039[3] = {-191.23, 474.40, 4554.42};
-static float P040[3] = {-476.12, 111.05, 4451.11};
-static float P041[3] = {-473.36, -470.74, 4444.78};
-static float P042[3] = {-266.95, -748.41, 4447.78};
-static float P043[3] = {211.14, -749.91, 4429.73};
-static float P044[3] = {680.57, -370.27, 5943.46};
-static float P045[3] = {834.01, 363.09, 6360.63};
-static float P046[3] = {371.29, 804.51, 6486.26};
-static float P047[3] = {-291.43, 797.22, 6494.28};
-static float P048[3] = {-784.13, 370.75, 6378.01};
-static float P049[3] = {-743.29, -325.82, 5943.46};
-static float P050[3] = {-383.24, -804.77, 5943.46};
-static float P051[3] = {283.47, -846.09, 5943.46};
-static float iP001[3] = {5.68, -300.95, 1324.70};
-static float iP009[3] = {124.39, -261.46, 1942.34};
-static float iP010[3] = {-130.05, -261.46, 1946.03};
-static float iP011[3] = {141.07, -320.11, 1239.38};
-static float iP012[3] = {156.48, -360.12, 2073.41};
-static float iP013[3] = {162.00, -175.88, 2064.44};
-static float iP014[3] = {88.16, -87.72, 2064.02};
-static float iP015[3] = {-65.21, -96.13, 2064.02};
-static float iP016[3] = {-156.48, -180.96, 2064.44};
-static float iP017[3] = {-162.00, -368.93, 2082.39};
-static float iP018[3] = {-88.16, -439.22, 2082.39};
-static float iP019[3] = {65.21, -440.32, 2083.39};
-static float iP020[3] = {246.87, -356.02, 2576.95};
-static float iP021[3] = {253.17, -111.15, 2567.15};
-static float iP022[3] = {132.34, 51.41, 2559.84};
-static float iP023[3] = {-97.88, 40.44, 2567.15};
-static float iP024[3] = {-222.97, -117.49, 2567.15};
-static float iP025[3] = {-252.22, -371.53, 2569.92};
-static float iP026[3] = {-108.44, -518.19, 2586.75};
-static float iP027[3] = {97.88, -524.79, 2586.75};
-static float iP028[3] = {370.03, -421.19, 3419.70};
-static float iP029[3] = {351.15, -16.98, 3423.17};
-static float iP030[3] = {200.66, 248.46, 3430.37};
-static float iP031[3] = {-148.42, 235.02, 3417.91};
-static float iP032[3] = {-360.21, -30.27, 3416.84};
-static float iP033[3] = {-357.90, -414.89, 3407.04};
-static float iP034[3] = {-148.88, -631.35, 3409.90};
-static float iP035[3] = {156.38, -632.59, 3419.70};
-static float iP036[3] = {462.61, -469.21, 4431.51};
-static float iP037[3] = {466.60, 102.25, 4434.98};
-static float iP038[3] = {243.05, 474.34, 4562.02};
-static float iP039[3] = {-191.23, 474.40, 4554.42};
-static float iP040[3] = {-476.12, 111.05, 4451.11};
-static float iP041[3] = {-473.36, -470.74, 4444.78};
-static float iP042[3] = {-266.95, -748.41, 4447.78};
-static float iP043[3] = {211.14, -749.91, 4429.73};
-static float iP044[3] = {680.57, -370.27, 5943.46};
-static float iP045[3] = {834.01, 363.09, 6360.63};
-static float iP046[3] = {371.29, 804.51, 6486.26};
-static float iP047[3] = {-291.43, 797.22, 6494.28};
-static float iP048[3] = {-784.13, 370.75, 6378.01};
-static float iP049[3] = {-743.29, -325.82, 5943.46};
-static float iP050[3] = {-383.24, -804.77, 5943.46};
-static float iP051[3] = {283.47, -846.09, 5943.46};
-static float P052[3] = {599.09, -300.15, 7894.03};
-static float P053[3] = {735.48, 306.26, 7911.92};
-static float P054[3] = {246.22, 558.53, 8460.50};
-static float P055[3] = {-230.41, 559.84, 8473.23};
-static float P056[3] = {-698.66, 320.83, 7902.59};
-static float P057[3] = {-643.29, -299.16, 7902.59};
-static float P058[3] = {-341.47, -719.30, 7902.59};
-static float P059[3] = {252.57, -756.12, 7902.59};
-static float P060[3] = {458.39, -265.31, 9355.44};
-static float P062[3] = {224.04, 338.75, 9450.30};
-static float P063[3] = {-165.71, 341.04, 9462.35};
-static float P064[3] = {-298.11, 110.13, 10180.37};
-static float P065[3] = {-473.99, -219.71, 9355.44};
-static float P066[3] = {-211.97, -479.87, 9355.44};
-static float P067[3] = {192.86, -491.45, 9348.73};
-static float P068[3] = {-136.29, -319.84, 1228.73};
-static float P069[3] = {1111.17, -314.14, 1314.19};
-static float P070[3] = {-1167.34, -321.61, 1319.45};
-static float P071[3] = {1404.86, -306.66, 1235.45};
-static float P072[3] = {-1409.73, -314.14, 1247.66};
-static float P073[3] = {1254.01, -296.87, 1544.58};
-static float P074[3] = {-1262.09, -291.70, 1504.26};
-static float P075[3] = {965.71, -269.26, 1742.65};
-static float P076[3] = {-900.97, -276.74, 1726.07};
-static float iP068[3] = {-136.29, -319.84, 1228.73};
-static float iP069[3] = {1111.17, -314.14, 1314.19};
-static float iP070[3] = {-1167.34, -321.61, 1319.45};
-static float iP071[3] = {1404.86, -306.66, 1235.45};
-static float iP072[3] = {-1409.73, -314.14, 1247.66};
-static float iP073[3] = {1254.01, -296.87, 1544.58};
-static float iP074[3] = {-1262.09, -291.70, 1504.26};
-static float iP075[3] = {965.71, -269.26, 1742.65};
-static float iP076[3] = {-900.97, -276.74, 1726.07};
-static float P077[3] = {1058.00, -448.81, 8194.66};
-static float P078[3] = {-1016.51, -456.43, 8190.62};
-static float P079[3] = {-1515.96, -676.45, 7754.93};
-static float P080[3] = {1856.75, -830.34, 7296.56};
-static float P081[3] = {1472.16, -497.38, 7399.68};
-static float P082[3] = {-1775.26, -829.51, 7298.46};
-static float P083[3] = {911.09, -252.51, 7510.99};
-static float P084[3] = {-1451.94, -495.62, 7384.30};
-static float P085[3] = {1598.75, -669.26, 7769.90};
-static float P086[3] = {-836.53, -250.08, 7463.25};
-static float P087[3] = {722.87, -158.18, 8006.41};
-static float P088[3] = {-688.86, -162.28, 7993.89};
-static float P089[3] = {-626.92, -185.30, 8364.98};
-static float P090[3] = {647.72, -189.46, 8354.99};
-static float P091[3] = {0.00, 835.01, 5555.62};
-static float P092[3] = {0.00, 1350.18, 5220.86};
-static float P093[3] = {0.00, 1422.94, 5285.27};
-static float P094[3] = {0.00, 1296.75, 5650.19};
-static float P095[3] = {0.00, 795.63, 6493.88};
-static float iP091[3] = {0.00, 835.01, 5555.62};
-static float iP092[3] = {0.00, 1350.18, 5220.86};
-static float iP093[3] = {0.00, 1422.94, 5285.27};
-static float iP094[3] = {0.00, 1296.75, 5650.19};
-static float iP095[3] = {0.00, 795.63, 6493.88};
-static float P097[3] = {-194.91, -357.14, 10313.32};
-static float P098[3] = {135.35, -357.66, 10307.94};
-static float iP097[3] = {-194.91, -357.14, 10313.32};
-static float iP098[3] = {135.35, -357.66, 10307.94};
-static float P099[3] = {-380.53, -221.14, 9677.98};
-static float P100[3] = {0.00, 412.99, 9629.33};
-static float P102[3] = {59.51, -412.55, 10677.58};
-static float iP102[3] = {59.51, -412.55, 10677.58};
-static float P103[3] = {6.50, 484.74, 9009.94};
-static float P105[3] = {-41.86, 476.51, 9078.17};
-static float P108[3] = {49.20, 476.83, 9078.24};
-static float P110[3] = {-187.62, -410.04, 10674.12};
-static float iP110[3] = {-187.62, -410.04, 10674.12};
-static float P111[3] = {-184.25, -318.70, 10723.88};
-static float iP111[3] = {-184.25, -318.70, 10723.88};
-static float P112[3] = {-179.61, -142.81, 10670.26};
-static float P113[3] = {57.43, -147.94, 10675.26};
-static float P114[3] = {54.06, -218.90, 10712.44};
-static float P115[3] = {-186.35, -212.09, 10713.76};
-static float P116[3] = {205.90, -84.61, 10275.97};
-static float P117[3] = {-230.96, -83.26, 10280.09};
-static float iP118[3] = {216.78, -509.17, 10098.94};
-static float iP119[3] = {-313.21, -510.79, 10102.62};
-static float P118[3] = {216.78, -509.17, 10098.94};
-static float P119[3] = {-313.21, -510.79, 10102.62};
-static float P120[3] = {217.95, 96.34, 10161.62};
-static float P121[3] = {71.99, -319.74, 10717.70};
-static float iP121[3] = {71.99, -319.74, 10717.70};
-static float P122[3] = {0.00, 602.74, 5375.84};
-static float iP122[3] = {0.00, 602.74, 5375.84};
-static float P123[3] = {-448.94, -203.14, 9499.60};
-static float P124[3] = {-442.64, -185.20, 9528.07};
-static float P125[3] = {-441.07, -148.05, 9528.07};
-static float P126[3] = {-443.43, -128.84, 9499.60};
-static float P127[3] = {-456.87, -146.78, 9466.67};
-static float P128[3] = {-453.68, -183.93, 9466.67};
-static float P129[3] = {428.43, -124.08, 9503.03};
-static float P130[3] = {419.73, -142.14, 9534.56};
-static float P131[3] = {419.92, -179.96, 9534.56};
-static float P132[3] = {431.20, -199.73, 9505.26};
-static float P133[3] = {442.28, -181.67, 9475.96};
-static float P134[3] = {442.08, -143.84, 9475.96};
-/* *INDENT-ON* */
-
-void
-Dolphin001(void)
-{
-    glNormal3fv(N071);
-    glBegin(GL_POLYGON);
-    glVertex3fv(P001);
-    glVertex3fv(P068);
-    glVertex3fv(P010);
-    glEnd();
-    glBegin(GL_POLYGON);
-    glVertex3fv(P068);
-    glVertex3fv(P076);
-    glVertex3fv(P010);
-    glEnd();
-    glBegin(GL_POLYGON);
-    glVertex3fv(P068);
-    glVertex3fv(P070);
-    glVertex3fv(P076);
-    glEnd();
-    glBegin(GL_POLYGON);
-    glVertex3fv(P076);
-    glVertex3fv(P070);
-    glVertex3fv(P074);
-    glEnd();
-    glBegin(GL_POLYGON);
-    glVertex3fv(P070);
-    glVertex3fv(P072);
-    glVertex3fv(P074);
-    glEnd();
-    glNormal3fv(N119);
-    glBegin(GL_POLYGON);
-    glVertex3fv(P072);
-    glVertex3fv(P070);
-    glVertex3fv(P074);
-    glEnd();
-    glBegin(GL_POLYGON);
-    glVertex3fv(P074);
-    glVertex3fv(P070);
-    glVertex3fv(P076);
-    glEnd();
-    glBegin(GL_POLYGON);
-    glVertex3fv(P070);
-    glVertex3fv(P068);
-    glVertex3fv(P076);
-    glEnd();
-    glBegin(GL_POLYGON);
-    glVertex3fv(P076);
-    glVertex3fv(P068);
-    glVertex3fv(P010);
-    glEnd();
-    glBegin(GL_POLYGON);
-    glVertex3fv(P068);
-    glVertex3fv(P001);
-    glVertex3fv(P010);
-    glEnd();
-}
-
-void
-Dolphin002(void)
-{
-    glNormal3fv(N071);
-    glBegin(GL_POLYGON);
-    glVertex3fv(P011);
-    glVertex3fv(P001);
-    glVertex3fv(P009);
-    glEnd();
-    glBegin(GL_POLYGON);
-    glVertex3fv(P075);
-    glVertex3fv(P011);
-    glVertex3fv(P009);
-    glEnd();
-    glBegin(GL_POLYGON);
-    glVertex3fv(P069);
-    glVertex3fv(P011);
-    glVertex3fv(P075);
-    glEnd();
-    glBegin(GL_POLYGON);
-    glVertex3fv(P069);
-    glVertex3fv(P075);
-    glVertex3fv(P073);
-    glEnd();
-    glBegin(GL_POLYGON);
-    glVertex3fv(P071);
-    glVertex3fv(P069);
-    glVertex3fv(P073);
-    glEnd();
-    glNormal3fv(N119);
-    glBegin(GL_POLYGON);
-    glVertex3fv(P001);
-    glVertex3fv(P011);
-    glVertex3fv(P009);
-    glEnd();
-    glBegin(GL_POLYGON);
-    glVertex3fv(P009);
-    glVertex3fv(P011);
-    glVertex3fv(P075);
-    glEnd();
-    glBegin(GL_POLYGON);
-    glVertex3fv(P011);
-    glVertex3fv(P069);
-    glVertex3fv(P075);
-    glEnd();
-    glBegin(GL_POLYGON);
-    glVertex3fv(P069);
-    glVertex3fv(P073);
-    glVertex3fv(P075);
-    glEnd();
-    glBegin(GL_POLYGON);
-    glVertex3fv(P069);
-    glVertex3fv(P071);
-    glVertex3fv(P073);
-    glEnd();
-}
-
-void
-Dolphin003(void)
-{
-    glBegin(GL_POLYGON);
-    glNormal3fv(N018);
-    glVertex3fv(P018);
-    glNormal3fv(N001);
-    glVertex3fv(P001);
-    glNormal3fv(N019);
-    glVertex3fv(P019);
-    glEnd();
-    glBegin(GL_POLYGON);
-    glNormal3fv(N019);
-    glVertex3fv(P019);
-    glNormal3fv(N001);
-    glVertex3fv(P001);
-    glNormal3fv(N012);
-    glVertex3fv(P012);
-    glEnd();
-    glBegin(GL_POLYGON);
-    glNormal3fv(N017);
-    glVertex3fv(P017);
-    glNormal3fv(N001);
-    glVertex3fv(P001);
-    glNormal3fv(N018);
-    glVertex3fv(P018);
-    glEnd();
-    glBegin(GL_POLYGON);
-    glNormal3fv(N001);
-    glVertex3fv(P001);
-    glNormal3fv(N017);
-    glVertex3fv(P017);
-    glNormal3fv(N016);
-    glVertex3fv(P016);
-    glEnd();
-    glBegin(GL_POLYGON);
-    glNormal3fv(N001);
-    glVertex3fv(P001);
-    glNormal3fv(N013);
-    glVertex3fv(P013);
-    glNormal3fv(N012);
-    glVertex3fv(P012);
-    glEnd();
-    glBegin(GL_POLYGON);
-    glNormal3fv(N001);
-    glVertex3fv(P001);
-    glNormal3fv(N016);
-    glVertex3fv(P016);
-    glNormal3fv(N015);
-    glVertex3fv(P015);
-    glEnd();
-    glBegin(GL_POLYGON);
-    glNormal3fv(N001);
-    glVertex3fv(P001);
-    glNormal3fv(N014);
-    glVertex3fv(P014);
-    glNormal3fv(N013);
-    glVertex3fv(P013);
-    glEnd();
-    glBegin(GL_POLYGON);
-    glNormal3fv(N001);
-    glVertex3fv(P001);
-    glNormal3fv(N015);
-    glVertex3fv(P015);
-    glNormal3fv(N014);
-    glVertex3fv(P014);
-    glEnd();
-}
-
-void
-Dolphin004(void)
-{
-    glBegin(GL_POLYGON);
-    glNormal3fv(N014);
-    glVertex3fv(P014);
-    glNormal3fv(N015);
-    glVertex3fv(P015);
-    glNormal3fv(N023);
-    glVertex3fv(P023);
-    glNormal3fv(N022);
-    glVertex3fv(P022);
-    glEnd();
-    glBegin(GL_POLYGON);
-    glNormal3fv(N015);
-    glVertex3fv(P015);
-    glNormal3fv(N016);
-    glVertex3fv(P016);
-    glNormal3fv(N024);
-    glVertex3fv(P024);
-    glNormal3fv(N023);
-    glVertex3fv(P023);
-    glEnd();
-    glBegin(GL_POLYGON);
-    glNormal3fv(N016);
-    glVertex3fv(P016);
-    glNormal3fv(N017);
-    glVertex3fv(P017);
-    glNormal3fv(N025);
-    glVertex3fv(P025);
-    glNormal3fv(N024);
-    glVertex3fv(P024);
-    glEnd();
-    glBegin(GL_POLYGON);
-    glNormal3fv(N017);
-    glVertex3fv(P017);
-    glNormal3fv(N018);
-    glVertex3fv(P018);
-    glNormal3fv(N026);
-    glVertex3fv(P026);
-    glNormal3fv(N025);
-    glVertex3fv(P025);
-    glEnd();
-    glBegin(GL_POLYGON);
-    glNormal3fv(N013);
-    glVertex3fv(P013);
-    glNormal3fv(N014);
-    glVertex3fv(P014);
-    glNormal3fv(N022);
-    glVertex3fv(P022);
-    glNormal3fv(N021);
-    glVertex3fv(P021);
-    glEnd();
-    glBegin(GL_POLYGON);
-    glNormal3fv(N012);
-    glVertex3fv(P012);
-    glNormal3fv(N013);
-    glVertex3fv(P013);
-    glNormal3fv(N021);
-    glVertex3fv(P021);
-    glNormal3fv(N020);
-    glVertex3fv(P020);
-    glEnd();
-    glBegin(GL_POLYGON);
-    glNormal3fv(N018);
-    glVertex3fv(P018);
-    glNormal3fv(N019);
-    glVertex3fv(P019);
-    glNormal3fv(N027);
-    glVertex3fv(P027);
-    glNormal3fv(N026);
-    glVertex3fv(P026);
-    glEnd();
-    glBegin(GL_POLYGON);
-    glNormal3fv(N019);
-    glVertex3fv(P019);
-    glNormal3fv(N012);
-    glVertex3fv(P012);
-    glNormal3fv(N020);
-    glVertex3fv(P020);
-    glNormal3fv(N027);
-    glVertex3fv(P027);
-    glEnd();
-}
-
-void
-Dolphin005(void)
-{
-    glBegin(GL_POLYGON);
-    glNormal3fv(N022);
-    glVertex3fv(P022);
-    glNormal3fv(N023);
-    glVertex3fv(P023);
-    glNormal3fv(N031);
-    glVertex3fv(P031);
-    glNormal3fv(N030);
-    glVertex3fv(P030);
-    glEnd();
-    glBegin(GL_POLYGON);
-    glNormal3fv(N021);
-    glVertex3fv(P021);
-    glNormal3fv(N022);
-    glVertex3fv(P022);
-    glNormal3fv(N030);
-    glVertex3fv(P030);
-    glEnd();
-    glBegin(GL_POLYGON);
-    glNormal3fv(N021);
-    glVertex3fv(P021);
-    glNormal3fv(N030);
-    glVertex3fv(P030);
-    glNormal3fv(N029);
-    glVertex3fv(P029);
-    glEnd();
-    glBegin(GL_POLYGON);
-    glNormal3fv(N023);
-    glVertex3fv(P023);
-    glNormal3fv(N024);
-    glVertex3fv(P024);
-    glNormal3fv(N031);
-    glVertex3fv(P031);
-    glEnd();
-    glBegin(GL_POLYGON);
-    glNormal3fv(N024);
-    glVertex3fv(P024);
-    glNormal3fv(N032);
-    glVertex3fv(P032);
-    glNormal3fv(N031);
-    glVertex3fv(P031);
-    glEnd();
-    glBegin(GL_POLYGON);
-    glNormal3fv(N024);
-    glVertex3fv(P024);
-    glNormal3fv(N025);
-    glVertex3fv(P025);
-    glNormal3fv(N032);
-    glVertex3fv(P032);
-    glEnd();
-    glBegin(GL_POLYGON);
-    glNormal3fv(N025);
-    glVertex3fv(P025);
-    glNormal3fv(N033);
-    glVertex3fv(P033);
-    glNormal3fv(N032);
-    glVertex3fv(P032);
-    glEnd();
-    glBegin(GL_POLYGON);
-    glNormal3fv(N020);
-    glVertex3fv(P020);
-    glNormal3fv(N021);
-    glVertex3fv(P021);
-    glNormal3fv(N029);
-    glVertex3fv(P029);
-    glEnd();
-    glBegin(GL_POLYGON);
-    glNormal3fv(N020);
-    glVertex3fv(P020);
-    glNormal3fv(N029);
-    glVertex3fv(P029);
-    glNormal3fv(N028);
-    glVertex3fv(P028);
-    glEnd();
-    glBegin(GL_POLYGON);
-    glNormal3fv(N027);
-    glVertex3fv(P027);
-    glNormal3fv(N020);
-    glVertex3fv(P020);
-    glNormal3fv(N028);
-    glVertex3fv(P028);
-    glEnd();
-    glBegin(GL_POLYGON);
-    glNormal3fv(N027);
-    glVertex3fv(P027);
-    glNormal3fv(N028);
-    glVertex3fv(P028);
-    glNormal3fv(N035);
-    glVertex3fv(P035);
-    glEnd();
-    glBegin(GL_POLYGON);
-    glNormal3fv(N025);
-    glVertex3fv(P025);
-    glNormal3fv(N026);
-    glVertex3fv(P026);
-    glNormal3fv(N033);
-    glVertex3fv(P033);
-    glEnd();
-    glBegin(GL_POLYGON);
-    glNormal3fv(N033);
-    glVertex3fv(P033);
-    glNormal3fv(N026);
-    glVertex3fv(P026);
-    glNormal3fv(N034);
-    glVertex3fv(P034);
-    glEnd();
-    glBegin(GL_POLYGON);
-    glNormal3fv(N026);
-    glVertex3fv(P026);
-    glNormal3fv(N027);
-    glVertex3fv(P027);
-    glNormal3fv(N035);
-    glVertex3fv(P035);
-    glNormal3fv(N034);
-    glVertex3fv(P034);
-    glEnd();
-}
-
-void
-Dolphin006(void)
-{
-    glBegin(GL_POLYGON);
-    glNormal3fv(N092);
-    glVertex3fv(P092);
-    glNormal3fv(N093);
-    glVertex3fv(P093);
-    glNormal3fv(N094);
-    glVertex3fv(P094);
-    glEnd();
-    glBegin(GL_POLYGON);
-    glNormal3fv(N093);
-    glVertex3fv(P093);
-    glNormal3fv(N092);
-    glVertex3fv(P092);
-    glNormal3fv(N094);
-    glVertex3fv(P094);
-    glEnd();
-    glBegin(GL_POLYGON);
-    glNormal3fv(N092);
-    glVertex3fv(P092);
-    glNormal3fv(N091);
-    glVertex3fv(P091);
-    glNormal3fv(N095);
-    glVertex3fv(P095);
-    glNormal3fv(N094);
-    glVertex3fv(P094);
-    glEnd();
-    glBegin(GL_POLYGON);
-    glNormal3fv(N091);
-    glVertex3fv(P091);
-    glNormal3fv(N092);
-    glVertex3fv(P092);
-    glNormal3fv(N094);
-    glVertex3fv(P094);
-    glNormal3fv(N095);
-    glVertex3fv(P095);
-    glEnd();
-    glBegin(GL_POLYGON);
-    glNormal3fv(N122);
-    glVertex3fv(P122);
-    glNormal3fv(N095);
-    glVertex3fv(P095);
-    glNormal3fv(N091);
-    glVertex3fv(P091);
-    glEnd();
-    glBegin(GL_POLYGON);
-    glNormal3fv(N122);
-    glVertex3fv(P122);
-    glNormal3fv(N091);
-    glVertex3fv(P091);
-    glNormal3fv(N095);
-    glVertex3fv(P095);
-    glEnd();
-}
-
-void
-Dolphin007(void)
-{
-    glBegin(GL_POLYGON);
-    glNormal3fv(N030);
-    glVertex3fv(P030);
-    glNormal3fv(N031);
-    glVertex3fv(P031);
-    glNormal3fv(N039);
-    glVertex3fv(P039);
-    glNormal3fv(N038);
-    glVertex3fv(P038);
-    glEnd();
-    glBegin(GL_POLYGON);
-    glNormal3fv(N029);
-    glVertex3fv(P029);
-    glNormal3fv(N030);
-    glVertex3fv(P030);
-    glNormal3fv(N038);
-    glVertex3fv(P038);
-    glEnd();
-    glBegin(GL_POLYGON);
-    glNormal3fv(N029);
-    glVertex3fv(P029);
-    glNormal3fv(N038);
-    glVertex3fv(P038);
-    glNormal3fv(N037);
-    glVertex3fv(P037);
-    glEnd();
-    glBegin(GL_POLYGON);
-    glNormal3fv(N028);
-    glVertex3fv(P028);
-    glNormal3fv(N029);
-    glVertex3fv(P029);
-    glNormal3fv(N037);
-    glVertex3fv(P037);
-    glEnd();
-    glBegin(GL_POLYGON);
-    glNormal3fv(N028);
-    glVertex3fv(P028);
-    glNormal3fv(N037);
-    glVertex3fv(P037);
-    glNormal3fv(N036);
-    glVertex3fv(P036);
-    glEnd();
-    glBegin(GL_POLYGON);
-    glNormal3fv(N035);
-    glVertex3fv(P035);
-    glNormal3fv(N028);
-    glVertex3fv(P028);
-    glNormal3fv(N036);
-    glVertex3fv(P036);
-    glEnd();
-    glBegin(GL_POLYGON);
-    glNormal3fv(N035);
-    glVertex3fv(P035);
-    glNormal3fv(N036);
-    glVertex3fv(P036);
-    glNormal3fv(N043);
-    glVertex3fv(P043);
-    glEnd();
-    glBegin(GL_POLYGON);
-    glNormal3fv(N034);
-    glVertex3fv(P034);
-    glNormal3fv(N035);
-    glVertex3fv(P035);
-    glNormal3fv(N043);
-    glVertex3fv(P043);
-    glNormal3fv(N042);
-    glVertex3fv(P042);
-    glEnd();
-    glBegin(GL_POLYGON);
-    glNormal3fv(N033);
-    glVertex3fv(P033);
-    glNormal3fv(N034);
-    glVertex3fv(P034);
-    glNormal3fv(N042);
-    glVertex3fv(P042);
-    glEnd();
-    glBegin(GL_POLYGON);
-    glNormal3fv(N033);
-    glVertex3fv(P033);
-    glNormal3fv(N042);
-    glVertex3fv(P042);
-    glNormal3fv(N041);
-    glVertex3fv(P041);
-    glEnd();
-    glBegin(GL_POLYGON);
-    glNormal3fv(N031);
-    glVertex3fv(P031);
-    glNormal3fv(N032);
-    glVertex3fv(P032);
-    glNormal3fv(N039);
-    glVertex3fv(P039);
-    glEnd();
-    glBegin(GL_POLYGON);
-    glNormal3fv(N039);
-    glVertex3fv(P039);
-    glNormal3fv(N032);
-    glVertex3fv(P032);
-    glNormal3fv(N040);
-    glVertex3fv(P040);
-    glEnd();
-    glBegin(GL_POLYGON);
-    glNormal3fv(N032);
-    glVertex3fv(P032);
-    glNormal3fv(N033);
-    glVertex3fv(P033);
-    glNormal3fv(N040);
-    glVertex3fv(P040);
-    glEnd();
-    glBegin(GL_POLYGON);
-    glNormal3fv(N040);
-    glVertex3fv(P040);
-    glNormal3fv(N033);
-    glVertex3fv(P033);
-    glNormal3fv(N041);
-    glVertex3fv(P041);
-    glEnd();
-}
-
-void
-Dolphin008(void)
-{
-    glBegin(GL_POLYGON);
-    glNormal3fv(N042);
-    glVertex3fv(P042);
-    glNormal3fv(N043);
-    glVertex3fv(P043);
-    glNormal3fv(N051);
-    glVertex3fv(P051);
-    glNormal3fv(N050);
-    glVertex3fv(P050);
-    glEnd();
-    glBegin(GL_POLYGON);
-    glNormal3fv(N043);
-    glVertex3fv(P043);
-    glNormal3fv(N036);
-    glVertex3fv(P036);
-    glNormal3fv(N051);
-    glVertex3fv(P051);
-    glEnd();
-    glBegin(GL_POLYGON);
-    glNormal3fv(N051);
-    glVertex3fv(P051);
-    glNormal3fv(N036);
-    glVertex3fv(P036);
-    glNormal3fv(N044);
-    glVertex3fv(P044);
-    glEnd();
-    glBegin(GL_POLYGON);
-    glNormal3fv(N041);
-    glVertex3fv(P041);
-    glNormal3fv(N042);
-    glVertex3fv(P042);
-    glNormal3fv(N050);
-    glVertex3fv(P050);
-    glEnd();
-    glBegin(GL_POLYGON);
-    glNormal3fv(N041);
-    glVertex3fv(P041);
-    glNormal3fv(N050);
-    glVertex3fv(P050);
-    glNormal3fv(N049);
-    glVertex3fv(P049);
-    glEnd();
-    glBegin(GL_POLYGON);
-    glNormal3fv(N036);
-    glVertex3fv(P036);
-    glNormal3fv(N037);
-    glVertex3fv(P037);
-    glNormal3fv(N044);
-    glVertex3fv(P044);
-    glEnd();
-    glBegin(GL_POLYGON);
-    glNormal3fv(N044);
-    glVertex3fv(P044);
-    glNormal3fv(N037);
-    glVertex3fv(P037);
-    glNormal3fv(N045);
-    glVertex3fv(P045);
-    glEnd();
-    glBegin(GL_POLYGON);
-    glNormal3fv(N040);
-    glVertex3fv(P040);
-    glNormal3fv(N041);
-    glVertex3fv(P041);
-    glNormal3fv(N049);
-    glVertex3fv(P049);
-    glEnd();
-    glBegin(GL_POLYGON);
-    glNormal3fv(N040);
-    glVertex3fv(P040);
-    glNormal3fv(N049);
-    glVertex3fv(P049);
-    glNormal3fv(N048);
-    glVertex3fv(P048);
-    glEnd();
-    glBegin(GL_POLYGON);
-    glNormal3fv(N039);
-    glVertex3fv(P039);
-    glNormal3fv(N040);
-    glVertex3fv(P040);
-    glNormal3fv(N048);
-    glVertex3fv(P048);
-    glEnd();
-    glBegin(GL_POLYGON);
-    glNormal3fv(N039);
-    glVertex3fv(P039);
-    glNormal3fv(N048);
-    glVertex3fv(P048);
-    glNormal3fv(N047);
-    glVertex3fv(P047);
-    glEnd();
-    glBegin(GL_POLYGON);
-    glNormal3fv(N037);
-    glVertex3fv(P037);
-    glNormal3fv(N038);
-    glVertex3fv(P038);
-    glNormal3fv(N045);
-    glVertex3fv(P045);
-    glEnd();
-    glBegin(GL_POLYGON);
-    glNormal3fv(N038);
-    glVertex3fv(P038);
-    glNormal3fv(N046);
-    glVertex3fv(P046);
-    glNormal3fv(N045);
-    glVertex3fv(P045);
-    glEnd();
-    glBegin(GL_POLYGON);
-    glNormal3fv(N038);
-    glVertex3fv(P038);
-    glNormal3fv(N039);
-    glVertex3fv(P039);
-    glNormal3fv(N047);
-    glVertex3fv(P047);
-    glNormal3fv(N046);
-    glVertex3fv(P046);
-    glEnd();
-}
-
-void
-Dolphin009(void)
-{
-    glBegin(GL_POLYGON);
-    glNormal3fv(N050);
-    glVertex3fv(P050);
-    glNormal3fv(N051);
-    glVertex3fv(P051);
-    glNormal3fv(N059);
-    glVertex3fv(P059);
-    glNormal3fv(N058);
-    glVertex3fv(P058);
-    glEnd();
-    glBegin(GL_POLYGON);
-    glNormal3fv(N051);
-    glVertex3fv(P051);
-    glNormal3fv(N044);
-    glVertex3fv(P044);
-    glNormal3fv(N059);
-    glVertex3fv(P059);
-    glEnd();
-    glBegin(GL_POLYGON);
-    glNormal3fv(N059);
-    glVertex3fv(P059);
-    glNormal3fv(N044);
-    glVertex3fv(P044);
-    glNormal3fv(N052);
-    glVertex3fv(P052);
-    glEnd();
-    glBegin(GL_POLYGON);
-    glNormal3fv(N044);
-    glVertex3fv(P044);
-    glNormal3fv(N045);
-    glVertex3fv(P045);
-    glNormal3fv(N053);
-    glVertex3fv(P053);
-    glEnd();
-    glBegin(GL_POLYGON);
-    glNormal3fv(N044);
-    glVertex3fv(P044);
-    glNormal3fv(N053);
-    glVertex3fv(P053);
-    glNormal3fv(N052);
-    glVertex3fv(P052);
-    glEnd();
-    glBegin(GL_POLYGON);
-    glNormal3fv(N049);
-    glVertex3fv(P049);
-    glNormal3fv(N050);
-    glVertex3fv(P050);
-    glNormal3fv(N058);
-    glVertex3fv(P058);
-    glEnd();
-    glBegin(GL_POLYGON);
-    glNormal3fv(N049);
-    glVertex3fv(P049);
-    glNormal3fv(N058);
-    glVertex3fv(P058);
-    glNormal3fv(N057);
-    glVertex3fv(P057);
-    glEnd();
-    glBegin(GL_POLYGON);
-    glNormal3fv(N048);
-    glVertex3fv(P048);
-    glNormal3fv(N049);
-    glVertex3fv(P049);
-    glNormal3fv(N057);
-    glVertex3fv(P057);
-    glEnd();
-    glBegin(GL_POLYGON);
-    glNormal3fv(N048);
-    glVertex3fv(P048);
-    glNormal3fv(N057);
-    glVertex3fv(P057);
-    glNormal3fv(N056);
-    glVertex3fv(P056);
-    glEnd();
-    glBegin(GL_POLYGON);
-    glNormal3fv(N047);
-    glVertex3fv(P047);
-    glNormal3fv(N048);
-    glVertex3fv(P048);
-    glNormal3fv(N056);
-    glVertex3fv(P056);
-    glEnd();
-    glBegin(GL_POLYGON);
-    glNormal3fv(N047);
-    glVertex3fv(P047);
-    glNormal3fv(N056);
-    glVertex3fv(P056);
-    glNormal3fv(N055);
-    glVertex3fv(P055);
-    glEnd();
-    glBegin(GL_POLYGON);
-    glNormal3fv(N045);
-    glVertex3fv(P045);
-    glNormal3fv(N046);
-    glVertex3fv(P046);
-    glNormal3fv(N053);
-    glVertex3fv(P053);
-    glEnd();
-    glBegin(GL_POLYGON);
-    glNormal3fv(N046);
-    glVertex3fv(P046);
-    glNormal3fv(N054);
-    glVertex3fv(P054);
-    glNormal3fv(N053);
-    glVertex3fv(P053);
-    glEnd();
-    glBegin(GL_POLYGON);
-    glNormal3fv(N046);
-    glVertex3fv(P046);
-    glNormal3fv(N047);
-    glVertex3fv(P047);
-    glNormal3fv(N055);
-    glVertex3fv(P055);
-    glNormal3fv(N054);
-    glVertex3fv(P054);
-    glEnd();
-}
-
-void
-Dolphin010(void)
-{
-    glBegin(GL_POLYGON);
-    glNormal3fv(N080);
-    glVertex3fv(P080);
-    glNormal3fv(N081);
-    glVertex3fv(P081);
-    glNormal3fv(N085);
-    glVertex3fv(P085);
-    glEnd();
-    glBegin(GL_POLYGON);
-    glNormal3fv(N081);
-    glVertex3fv(P081);
-    glNormal3fv(N083);
-    glVertex3fv(P083);
-    glNormal3fv(N085);
-    glVertex3fv(P085);
-    glEnd();
-    glBegin(GL_POLYGON);
-    glNormal3fv(N085);
-    glVertex3fv(P085);
-    glNormal3fv(N083);
-    glVertex3fv(P083);
-    glNormal3fv(N077);
-    glVertex3fv(P077);
-    glEnd();
-    glBegin(GL_POLYGON);
-    glNormal3fv(N083);
-    glVertex3fv(P083);
-    glNormal3fv(N087);
-    glVertex3fv(P087);
-    glNormal3fv(N077);
-    glVertex3fv(P077);
-    glEnd();
-    glBegin(GL_POLYGON);
-    glNormal3fv(N077);
-    glVertex3fv(P077);
-    glNormal3fv(N087);
-    glVertex3fv(P087);
-    glNormal3fv(N090);
-    glVertex3fv(P090);
-    glEnd();
-    glBegin(GL_POLYGON);
-    glNormal3fv(N081);
-    glVertex3fv(P081);
-    glNormal3fv(N080);
-    glVertex3fv(P080);
-    glNormal3fv(N085);
-    glVertex3fv(P085);
-    glEnd();
-    glBegin(GL_POLYGON);
-    glNormal3fv(N083);
-    glVertex3fv(P083);
-    glNormal3fv(N081);
-    glVertex3fv(P081);
-    glNormal3fv(N085);
-    glVertex3fv(P085);
-    glEnd();
-    glBegin(GL_POLYGON);
-    glNormal3fv(N083);
-    glVertex3fv(P083);
-    glNormal3fv(N085);
-    glVertex3fv(P085);
-    glNormal3fv(N077);
-    glVertex3fv(P077);
-    glEnd();
-    glBegin(GL_POLYGON);
-    glNormal3fv(N087);
-    glVertex3fv(P087);
-    glNormal3fv(N083);
-    glVertex3fv(P083);
-    glNormal3fv(N077);
-    glVertex3fv(P077);
-    glEnd();
-    glBegin(GL_POLYGON);
-    glNormal3fv(N087);
-    glVertex3fv(P087);
-    glNormal3fv(N077);
-    glVertex3fv(P077);
-    glNormal3fv(N090);
-    glVertex3fv(P090);
-    glEnd();
-}
-
-void
-Dolphin011(void)
-{
-    glBegin(GL_POLYGON);
-    glNormal3fv(N082);
-    glVertex3fv(P082);
-    glNormal3fv(N084);
-    glVertex3fv(P084);
-    glNormal3fv(N079);
-    glVertex3fv(P079);
-    glEnd();
-    glBegin(GL_POLYGON);
-    glNormal3fv(N084);
-    glVertex3fv(P084);
-    glNormal3fv(N086);
-    glVertex3fv(P086);
-    glNormal3fv(N079);
-    glVertex3fv(P079);
-    glEnd();
-    glBegin(GL_POLYGON);
-    glNormal3fv(N079);
-    glVertex3fv(P079);
-    glNormal3fv(N086);
-    glVertex3fv(P086);
-    glNormal3fv(N078);
-    glVertex3fv(P078);
-    glEnd();
-    glBegin(GL_POLYGON);
-    glNormal3fv(N086);
-    glVertex3fv(P086);
-    glNormal3fv(N088);
-    glVertex3fv(P088);
-    glNormal3fv(N078);
-    glVertex3fv(P078);
-    glEnd();
-    glBegin(GL_POLYGON);
-    glNormal3fv(N078);
-    glVertex3fv(P078);
-    glNormal3fv(N088);
-    glVertex3fv(P088);
-    glNormal3fv(N089);
-    glVertex3fv(P089);
-    glEnd();
-    glBegin(GL_POLYGON);
-    glNormal3fv(N088);
-    glVertex3fv(P088);
-    glNormal3fv(N086);
-    glVertex3fv(P086);
-    glNormal3fv(N089);
-    glVertex3fv(P089);
-    glEnd();
-    glBegin(GL_POLYGON);
-    glNormal3fv(N089);
-    glVertex3fv(P089);
-    glNormal3fv(N086);
-    glVertex3fv(P086);
-    glNormal3fv(N078);
-    glVertex3fv(P078);
-    glEnd();
-    glBegin(GL_POLYGON);
-    glNormal3fv(N086);
-    glVertex3fv(P086);
-    glNormal3fv(N084);
-    glVertex3fv(P084);
-    glNormal3fv(N078);
-    glVertex3fv(P078);
-    glEnd();
-    glBegin(GL_POLYGON);
-    glNormal3fv(N078);
-    glVertex3fv(P078);
-    glNormal3fv(N084);
-    glVertex3fv(P084);
-    glNormal3fv(N079);
-    glVertex3fv(P079);
-    glEnd();
-    glBegin(GL_POLYGON);
-    glNormal3fv(N084);
-    glVertex3fv(P084);
-    glNormal3fv(N082);
-    glVertex3fv(P082);
-    glNormal3fv(N079);
-    glVertex3fv(P079);
-    glEnd();
-}
-
-void
-Dolphin012(void)
-{
-    glBegin(GL_POLYGON);
-    glNormal3fv(N058);
-    glVertex3fv(P058);
-    glNormal3fv(N059);
-    glVertex3fv(P059);
-    glNormal3fv(N067);
-    glVertex3fv(P067);
-    glNormal3fv(N066);
-    glVertex3fv(P066);
-    glEnd();
-    glBegin(GL_POLYGON);
-    glNormal3fv(N059);
-    glVertex3fv(P059);
-    glNormal3fv(N052);
-    glVertex3fv(P052);
-    glNormal3fv(N060);
-    glVertex3fv(P060);
-    glEnd();
-    glBegin(GL_POLYGON);
-    glNormal3fv(N059);
-    glVertex3fv(P059);
-    glNormal3fv(N060);
-    glVertex3fv(P060);
-    glNormal3fv(N067);
-    glVertex3fv(P067);
-    glEnd();
-    glBegin(GL_POLYGON);
-    glNormal3fv(N058);
-    glVertex3fv(P058);
-    glNormal3fv(N066);
-    glVertex3fv(P066);
-    glNormal3fv(N065);
-    glVertex3fv(P065);
-    glEnd();
-    glBegin(GL_POLYGON);
-    glNormal3fv(N058);
-    glVertex3fv(P058);
-    glNormal3fv(N065);
-    glVertex3fv(P065);
-    glNormal3fv(N057);
-    glVertex3fv(P057);
-    glEnd();
-    glBegin(GL_POLYGON);
-    glNormal3fv(N056);
-    glVertex3fv(P056);
-    glNormal3fv(N057);
-    glVertex3fv(P057);
-    glNormal3fv(N065);
-    glVertex3fv(P065);
-    glEnd();
-    glBegin(GL_POLYGON);
-    glNormal3fv(N056);
-    glVertex3fv(P056);
-    glNormal3fv(N065);
-    glVertex3fv(P065);
-    glNormal3fv(N006);
-    glVertex3fv(P006);
-    glEnd();
-    glBegin(GL_POLYGON);
-    glNormal3fv(N056);
-    glVertex3fv(P056);
-    glNormal3fv(N006);
-    glVertex3fv(P006);
-    glNormal3fv(N063);
-    glVertex3fv(P063);
-    glEnd();
-    glBegin(GL_POLYGON);
-    glNormal3fv(N056);
-    glVertex3fv(P056);
-    glNormal3fv(N063);
-    glVertex3fv(P063);
-    glNormal3fv(N055);
-    glVertex3fv(P055);
-    glEnd();
-    glBegin(GL_POLYGON);
-    glNormal3fv(N054);
-    glVertex3fv(P054);
-    glNormal3fv(N062);
-    glVertex3fv(P062);
-    glNormal3fv(N005);
-    glVertex3fv(P005);
-    glEnd();
-    glBegin(GL_POLYGON);
-    glNormal3fv(N054);
-    glVertex3fv(P054);
-    glNormal3fv(N005);
-    glVertex3fv(P005);
-    glNormal3fv(N053);
-    glVertex3fv(P053);
-    glEnd();
-    glBegin(GL_POLYGON);
-    glNormal3fv(N052);
-    glVertex3fv(P052);
-    glNormal3fv(N053);
-    glVertex3fv(P053);
-    glNormal3fv(N005);
-    glVertex3fv(P005);
-    glNormal3fv(N060);
-    glVertex3fv(P060);
-    glEnd();
-}
-
-void
-Dolphin013(void)
-{
-    glBegin(GL_POLYGON);
-    glNormal3fv(N116);
-    glVertex3fv(P116);
-    glNormal3fv(N117);
-    glVertex3fv(P117);
-    glNormal3fv(N112);
-    glVertex3fv(P112);
-    glNormal3fv(N113);
-    glVertex3fv(P113);
-    glEnd();
-    glBegin(GL_POLYGON);
-    glNormal3fv(N114);
-    glVertex3fv(P114);
-    glNormal3fv(N113);
-    glVertex3fv(P113);
-    glNormal3fv(N112);
-    glVertex3fv(P112);
-    glNormal3fv(N115);
-    glVertex3fv(P115);
-    glEnd();
-    glBegin(GL_POLYGON);
-    glNormal3fv(N114);
-    glVertex3fv(P114);
-    glNormal3fv(N116);
-    glVertex3fv(P116);
-    glNormal3fv(N113);
-    glVertex3fv(P113);
-    glEnd();
-    glBegin(GL_POLYGON);
-    glNormal3fv(N114);
-    glVertex3fv(P114);
-    glNormal3fv(N007);
-    glVertex3fv(P007);
-    glNormal3fv(N116);
-    glVertex3fv(P116);
-    glEnd();
-    glBegin(GL_POLYGON);
-    glNormal3fv(N007);
-    glVertex3fv(P007);
-    glNormal3fv(N002);
-    glVertex3fv(P002);
-    glNormal3fv(N116);
-    glVertex3fv(P116);
-    glEnd();
-    glBegin(GL_POLYGON);
-    glVertex3fv(P002);
-    glVertex3fv(P007);
-    glVertex3fv(P008);
-    glVertex3fv(P099);
-    glEnd();
-    glBegin(GL_POLYGON);
-    glVertex3fv(P007);
-    glVertex3fv(P114);
-    glVertex3fv(P115);
-    glVertex3fv(P008);
-    glEnd();
-    glBegin(GL_POLYGON);
-    glNormal3fv(N117);
-    glVertex3fv(P117);
-    glNormal3fv(N099);
-    glVertex3fv(P099);
-    glNormal3fv(N008);
-    glVertex3fv(P008);
-    glEnd();
-    glBegin(GL_POLYGON);
-    glNormal3fv(N117);
-    glVertex3fv(P117);
-    glNormal3fv(N008);
-    glVertex3fv(P008);
-    glNormal3fv(N112);
-    glVertex3fv(P112);
-    glEnd();
-    glBegin(GL_POLYGON);
-    glNormal3fv(N112);
-    glVertex3fv(P112);
-    glNormal3fv(N008);
-    glVertex3fv(P008);
-    glNormal3fv(N115);
-    glVertex3fv(P115);
-    glEnd();
-}
-
-void
-Dolphin014(void)
-{
-    glBegin(GL_POLYGON);
-    glNormal3fv(N111);
-    glVertex3fv(P111);
-    glNormal3fv(N110);
-    glVertex3fv(P110);
-    glNormal3fv(N102);
-    glVertex3fv(P102);
-    glNormal3fv(N121);
-    glVertex3fv(P121);
-    glEnd();
-    glBegin(GL_POLYGON);
-    glNormal3fv(N111);
-    glVertex3fv(P111);
-    glNormal3fv(N097);
-    glVertex3fv(P097);
-    glNormal3fv(N110);
-    glVertex3fv(P110);
-    glEnd();
-    glBegin(GL_POLYGON);
-    glNormal3fv(N097);
-    glVertex3fv(P097);
-    glNormal3fv(N119);
-    glVertex3fv(P119);
-    glNormal3fv(N110);
-    glVertex3fv(P110);
-    glEnd();
-    glBegin(GL_POLYGON);
-    glNormal3fv(N097);
-    glVertex3fv(P097);
-    glNormal3fv(N099);
-    glVertex3fv(P099);
-    glNormal3fv(N119);
-    glVertex3fv(P119);
-    glEnd();
-    glBegin(GL_POLYGON);
-    glNormal3fv(N099);
-    glVertex3fv(P099);
-    glNormal3fv(N065);
-    glVertex3fv(P065);
-    glNormal3fv(N119);
-    glVertex3fv(P119);
-    glEnd();
-    glBegin(GL_POLYGON);
-    glNormal3fv(N065);
-    glVertex3fv(P065);
-    glNormal3fv(N066);
-    glVertex3fv(P066);
-    glNormal3fv(N119);
-    glVertex3fv(P119);
-    glEnd();
-    glBegin(GL_POLYGON);
-    glVertex3fv(P098);
-    glVertex3fv(P097);
-    glVertex3fv(P111);
-    glVertex3fv(P121);
-    glEnd();
-    glBegin(GL_POLYGON);
-    glVertex3fv(P002);
-    glVertex3fv(P099);
-    glVertex3fv(P097);
-    glVertex3fv(P098);
-    glEnd();
-    glBegin(GL_POLYGON);
-    glNormal3fv(N110);
-    glVertex3fv(P110);
-    glNormal3fv(N119);
-    glVertex3fv(P119);
-    glNormal3fv(N118);
-    glVertex3fv(P118);
-    glNormal3fv(N102);
-    glVertex3fv(P102);
-    glEnd();
-    glBegin(GL_POLYGON);
-    glNormal3fv(N119);
-    glVertex3fv(P119);
-    glNormal3fv(N066);
-    glVertex3fv(P066);
-    glNormal3fv(N067);
-    glVertex3fv(P067);
-    glNormal3fv(N118);
-    glVertex3fv(P118);
-    glEnd();
-    glBegin(GL_POLYGON);
-    glNormal3fv(N067);
-    glVertex3fv(P067);
-    glNormal3fv(N060);
-    glVertex3fv(P060);
-    glNormal3fv(N002);
-    glVertex3fv(P002);
-    glEnd();
-    glBegin(GL_POLYGON);
-    glNormal3fv(N067);
-    glVertex3fv(P067);
-    glNormal3fv(N002);
-    glVertex3fv(P002);
-    glNormal3fv(N118);
-    glVertex3fv(P118);
-    glEnd();
-    glBegin(GL_POLYGON);
-    glNormal3fv(N118);
-    glVertex3fv(P118);
-    glNormal3fv(N002);
-    glVertex3fv(P002);
-    glNormal3fv(N098);
-    glVertex3fv(P098);
-    glEnd();
-    glBegin(GL_POLYGON);
-    glNormal3fv(N118);
-    glVertex3fv(P118);
-    glNormal3fv(N098);
-    glVertex3fv(P098);
-    glNormal3fv(N102);
-    glVertex3fv(P102);
-    glEnd();
-    glBegin(GL_POLYGON);
-    glNormal3fv(N102);
-    glVertex3fv(P102);
-    glNormal3fv(N098);
-    glVertex3fv(P098);
-    glNormal3fv(N121);
-    glVertex3fv(P121);
-    glEnd();
-}
-
-void
-Dolphin015(void)
-{
-    glBegin(GL_POLYGON);
-    glNormal3fv(N055);
-    glVertex3fv(P055);
-    glNormal3fv(N003);
-    glVertex3fv(P003);
-    glNormal3fv(N054);
-    glVertex3fv(P054);
-    glEnd();
-    glBegin(GL_POLYGON);
-    glNormal3fv(N003);
-    glVertex3fv(P003);
-    glNormal3fv(N055);
-    glVertex3fv(P055);
-    glNormal3fv(N063);
-    glVertex3fv(P063);
-    glEnd();
-    glBegin(GL_POLYGON);
-    glNormal3fv(N003);
-    glVertex3fv(P003);
-    glNormal3fv(N063);
-    glVertex3fv(P063);
-    glNormal3fv(N100);
-    glVertex3fv(P100);
-    glEnd();
-    glBegin(GL_POLYGON);
-    glNormal3fv(N003);
-    glVertex3fv(P003);
-    glNormal3fv(N100);
-    glVertex3fv(P100);
-    glNormal3fv(N054);
-    glVertex3fv(P054);
-    glEnd();
-    glBegin(GL_POLYGON);
-    glNormal3fv(N054);
-    glVertex3fv(P054);
-    glNormal3fv(N100);
-    glVertex3fv(P100);
-    glNormal3fv(N062);
-    glVertex3fv(P062);
-    glEnd();
-    glBegin(GL_POLYGON);
-    glNormal3fv(N100);
-    glVertex3fv(P100);
-    glNormal3fv(N064);
-    glVertex3fv(P064);
-    glNormal3fv(N120);
-    glVertex3fv(P120);
-    glEnd();
-    glBegin(GL_POLYGON);
-    glNormal3fv(N100);
-    glVertex3fv(P100);
-    glNormal3fv(N063);
-    glVertex3fv(P063);
-    glNormal3fv(N064);
-    glVertex3fv(P064);
-    glEnd();
-    glBegin(GL_POLYGON);
-    glNormal3fv(N063);
-    glVertex3fv(P063);
-    glNormal3fv(N006);
-    glVertex3fv(P006);
-    glNormal3fv(N064);
-    glVertex3fv(P064);
-    glEnd();
-    glBegin(GL_POLYGON);
-    glNormal3fv(N064);
-    glVertex3fv(P064);
-    glNormal3fv(N006);
-    glVertex3fv(P006);
-    glNormal3fv(N099);
-    glVertex3fv(P099);
-    glEnd();
-    glBegin(GL_POLYGON);
-    glNormal3fv(N064);
-    glVertex3fv(P064);
-    glNormal3fv(N099);
-    glVertex3fv(P099);
-    glNormal3fv(N117);
-    glVertex3fv(P117);
-    glEnd();
-    glBegin(GL_POLYGON);
-    glNormal3fv(N120);
-    glVertex3fv(P120);
-    glNormal3fv(N064);
-    glVertex3fv(P064);
-    glNormal3fv(N117);
-    glVertex3fv(P117);
-    glNormal3fv(N116);
-    glVertex3fv(P116);
-    glEnd();
-    glBegin(GL_POLYGON);
-    glNormal3fv(N006);
-    glVertex3fv(P006);
-    glNormal3fv(N065);
-    glVertex3fv(P065);
-    glNormal3fv(N099);
-    glVertex3fv(P099);
-    glEnd();
-    glBegin(GL_POLYGON);
-    glNormal3fv(N062);
-    glVertex3fv(P062);
-    glNormal3fv(N100);
-    glVertex3fv(P100);
-    glNormal3fv(N120);
-    glVertex3fv(P120);
-    glEnd();
-    glBegin(GL_POLYGON);
-    glNormal3fv(N005);
-    glVertex3fv(P005);
-    glNormal3fv(N062);
-    glVertex3fv(P062);
-    glNormal3fv(N120);
-    glVertex3fv(P120);
-    glEnd();
-    glBegin(GL_POLYGON);
-    glNormal3fv(N005);
-    glVertex3fv(P005);
-    glNormal3fv(N120);
-    glVertex3fv(P120);
-    glNormal3fv(N002);
-    glVertex3fv(P002);
-    glEnd();
-    glBegin(GL_POLYGON);
-    glNormal3fv(N002);
-    glVertex3fv(P002);
-    glNormal3fv(N120);
-    glVertex3fv(P120);
-    glNormal3fv(N116);
-    glVertex3fv(P116);
-    glEnd();
-    glBegin(GL_POLYGON);
-    glNormal3fv(N060);
-    glVertex3fv(P060);
-    glNormal3fv(N005);
-    glVertex3fv(P005);
-    glNormal3fv(N002);
-    glVertex3fv(P002);
-    glEnd();
-}
-
-void
-Dolphin016(void)
-{
-
-    glDisable(GL_DEPTH_TEST);
-    glBegin(GL_POLYGON);
-    glVertex3fv(P123);
-    glVertex3fv(P124);
-    glVertex3fv(P125);
-    glVertex3fv(P126);
-    glVertex3fv(P127);
-    glVertex3fv(P128);
-    glEnd();
-    glBegin(GL_POLYGON);
-    glVertex3fv(P129);
-    glVertex3fv(P130);
-    glVertex3fv(P131);
-    glVertex3fv(P132);
-    glVertex3fv(P133);
-    glVertex3fv(P134);
-    glEnd();
-    glBegin(GL_POLYGON);
-    glVertex3fv(P103);
-    glVertex3fv(P105);
-    glVertex3fv(P108);
-    glEnd();
-    glEnable(GL_DEPTH_TEST);
-}
-
-void
-DrawDolphin(fishRec * fish)
-{
-    float seg0, seg1, seg2, seg3, seg4, seg5, seg6, seg7;
-    float pitch, thrash, chomp;
-
-    fish->htail = (int) (fish->htail - (int) (10.0 * fish->v)) % 360;
-
-    thrash = 70.0 * fish->v;
-
-    seg0 = 1.0 * thrash * sin((fish->htail) * RRAD);
-    seg3 = 1.0 * thrash * sin((fish->htail) * RRAD);
-    seg1 = 2.0 * thrash * sin((fish->htail + 4.0) * RRAD);
-    seg2 = 3.0 * thrash * sin((fish->htail + 6.0) * RRAD);
-    seg4 = 4.0 * thrash * sin((fish->htail + 10.0) * RRAD);
-    seg5 = 4.5 * thrash * sin((fish->htail + 15.0) * RRAD);
-    seg6 = 5.0 * thrash * sin((fish->htail + 20.0) * RRAD);
-    seg7 = 6.0 * thrash * sin((fish->htail + 30.0) * RRAD);
-
-    pitch = fish->v * sin((fish->htail + 180.0) * RRAD);
-
-    if (fish->v > 2.0) {
-        chomp = -(fish->v - 2.0) * 200.0;
-    }
-    chomp = 100.0;
-
-    P012[1] = iP012[1] + seg5;
-    P013[1] = iP013[1] + seg5;
-    P014[1] = iP014[1] + seg5;
-    P015[1] = iP015[1] + seg5;
-    P016[1] = iP016[1] + seg5;
-    P017[1] = iP017[1] + seg5;
-    P018[1] = iP018[1] + seg5;
-    P019[1] = iP019[1] + seg5;
-
-    P020[1] = iP020[1] + seg4;
-    P021[1] = iP021[1] + seg4;
-    P022[1] = iP022[1] + seg4;
-    P023[1] = iP023[1] + seg4;
-    P024[1] = iP024[1] + seg4;
-    P025[1] = iP025[1] + seg4;
-    P026[1] = iP026[1] + seg4;
-    P027[1] = iP027[1] + seg4;
-
-    P028[1] = iP028[1] + seg2;
-    P029[1] = iP029[1] + seg2;
-    P030[1] = iP030[1] + seg2;
-    P031[1] = iP031[1] + seg2;
-    P032[1] = iP032[1] + seg2;
-    P033[1] = iP033[1] + seg2;
-    P034[1] = iP034[1] + seg2;
-    P035[1] = iP035[1] + seg2;
-
-    P036[1] = iP036[1] + seg1;
-    P037[1] = iP037[1] + seg1;
-    P038[1] = iP038[1] + seg1;
-    P039[1] = iP039[1] + seg1;
-    P040[1] = iP040[1] + seg1;
-    P041[1] = iP041[1] + seg1;
-    P042[1] = iP042[1] + seg1;
-    P043[1] = iP043[1] + seg1;
-
-    P044[1] = iP044[1] + seg0;
-    P045[1] = iP045[1] + seg0;
-    P046[1] = iP046[1] + seg0;
-    P047[1] = iP047[1] + seg0;
-    P048[1] = iP048[1] + seg0;
-    P049[1] = iP049[1] + seg0;
-    P050[1] = iP050[1] + seg0;
-    P051[1] = iP051[1] + seg0;
-
-    P009[1] = iP009[1] + seg6;
-    P010[1] = iP010[1] + seg6;
-    P075[1] = iP075[1] + seg6;
-    P076[1] = iP076[1] + seg6;
-
-    P001[1] = iP001[1] + seg7;
-    P011[1] = iP011[1] + seg7;
-    P068[1] = iP068[1] + seg7;
-    P069[1] = iP069[1] + seg7;
-    P070[1] = iP070[1] + seg7;
-    P071[1] = iP071[1] + seg7;
-    P072[1] = iP072[1] + seg7;
-    P073[1] = iP073[1] + seg7;
-    P074[1] = iP074[1] + seg7;
-
-    P091[1] = iP091[1] + seg3;
-    P092[1] = iP092[1] + seg3;
-    P093[1] = iP093[1] + seg3;
-    P094[1] = iP094[1] + seg3;
-    P095[1] = iP095[1] + seg3;
-    P122[1] = iP122[1] + seg3 * 1.5;
-
-    P097[1] = iP097[1] + chomp;
-    P098[1] = iP098[1] + chomp;
-    P102[1] = iP102[1] + chomp;
-    P110[1] = iP110[1] + chomp;
-    P111[1] = iP111[1] + chomp;
-    P121[1] = iP121[1] + chomp;
-    P118[1] = iP118[1] + chomp;
-    P119[1] = iP119[1] + chomp;
-
-    glPushMatrix();
-
-    glRotatef(pitch, 1.0, 0.0, 0.0);
-
-    glTranslatef(0.0, 0.0, 7000.0);
-
-    glRotatef(180.0, 0.0, 1.0, 0.0);
-
-    glEnable(GL_CULL_FACE);
-    Dolphin014();
-    Dolphin010();
-    Dolphin009();
-    Dolphin012();
-    Dolphin013();
-    Dolphin006();
-    Dolphin002();
-    Dolphin001();
-    Dolphin003();
-    Dolphin015();
-    Dolphin004();
-    Dolphin005();
-    Dolphin007();
-    Dolphin008();
-    Dolphin011();
-    Dolphin016();
-    glDisable(GL_CULL_FACE);
-
-    glPopMatrix();
-}
diff --git a/Xcode/TemplatesForXcodeSnowLeopard/SDL OpenGL Application/atlantis/shark.c b/Xcode/TemplatesForXcodeSnowLeopard/SDL OpenGL Application/atlantis/shark.c
deleted file mode 100644
index 9c847dbaf..000000000
--- a/Xcode/TemplatesForXcodeSnowLeopard/SDL OpenGL Application/atlantis/shark.c	
+++ /dev/null
@@ -1,1308 +0,0 @@
-/**
- * (c) Copyright 1993, 1994, Silicon Graphics, Inc.
- * ALL RIGHTS RESERVED
- * Permission to use, copy, modify, and distribute this software for
- * any purpose and without fee is hereby granted, provided that the above
- * copyright notice appear in all copies and that both the copyright notice
- * and this permission notice appear in supporting documentation, and that
- * the name of Silicon Graphics, Inc. not be used in advertising
- * or publicity pertaining to distribution of the software without specific,
- * written prior permission.
- *
- * THE MATERIAL EMBODIED ON THIS SOFTWARE IS PROVIDED TO YOU "AS-IS"
- * AND WITHOUT WARRANTY OF ANY KIND, EXPRESS, IMPLIED OR OTHERWISE,
- * INCLUDING WITHOUT LIMITATION, ANY WARRANTY OF MERCHANTABILITY OR
- * FITNESS FOR A PARTICULAR PURPOSE.  IN NO EVENT SHALL SILICON
- * GRAPHICS, INC.  BE LIABLE TO YOU OR ANYONE ELSE FOR ANY DIRECT,
- * SPECIAL, INCIDENTAL, INDIRECT OR CONSEQUENTIAL DAMAGES OF ANY
- * KIND, OR ANY DAMAGES WHATSOEVER, INCLUDING WITHOUT LIMITATION,
- * LOSS OF PROFIT, LOSS OF USE, SAVINGS OR REVENUE, OR THE CLAIMS OF
- * THIRD PARTIES, WHETHER OR NOT SILICON GRAPHICS, INC.  HAS BEEN
- * ADVISED OF THE POSSIBILITY OF SUCH LOSS, HOWEVER CAUSED AND ON
- * ANY THEORY OF LIABILITY, ARISING OUT OF OR IN CONNECTION WITH THE
- * POSSESSION, USE OR PERFORMANCE OF THIS SOFTWARE.
- *
- * US Government Users Restricted Rights
- * Use, duplication, or disclosure by the Government is subject to
- * restrictions set forth in FAR 52.227.19(c)(2) or subparagraph
- * (c)(1)(ii) of the Rights in Technical Data and Computer Software
- * clause at DFARS 252.227-7013 and/or in similar or successor
- * clauses in the FAR or the DOD or NASA FAR Supplement.
- * Unpublished-- rights reserved under the copyright laws of the
- * United States.  Contractor/manufacturer is Silicon Graphics,
- * Inc., 2011 N.  Shoreline Blvd., Mountain View, CA 94039-7311.
- *
- * OpenGL(TM) is a trademark of Silicon Graphics, Inc.
- */
-#include 
-#include 
-#include "atlantis.h"
-/* *INDENT-OFF* */
-static float N002[3] = {0.000077 ,-0.020611 ,0.999788};
-static float N003[3] = {0.961425 ,0.258729 ,-0.093390};
-static float N004[3] = {0.510811 ,-0.769633 ,-0.383063};
-static float N005[3] = {0.400123 ,0.855734 ,-0.328055};
-static float N006[3] = {-0.770715 ,0.610204 ,-0.183440};
-static float N007[3] = {-0.915597 ,-0.373345 ,-0.149316};
-static float N008[3] = {-0.972788 ,0.208921 ,-0.100179};
-static float N009[3] = {-0.939713 ,-0.312268 ,-0.139383};
-static float N010[3] = {-0.624138 ,-0.741047 ,-0.247589};
-static float N011[3] = {0.591434 ,-0.768401 ,-0.244471};
-static float N012[3] = {0.935152 ,-0.328495 ,-0.132598};
-static float N013[3] = {0.997102 ,0.074243 ,-0.016593};
-static float N014[3] = {0.969995 ,0.241712 ,-0.026186};
-static float N015[3] = {0.844539 ,0.502628 ,-0.184714};
-static float N016[3] = {-0.906608 ,0.386308 ,-0.169787};
-static float N017[3] = {-0.970016 ,0.241698 ,-0.025516};
-static float N018[3] = {-0.998652 ,0.050493 ,-0.012045};
-static float N019[3] = {-0.942685 ,-0.333051 ,-0.020556};
-static float N020[3] = {-0.660944 ,-0.750276 ,0.015480};
-static float N021[3] = {0.503549 ,-0.862908 ,-0.042749};
-static float N022[3] = {0.953202 ,-0.302092 ,-0.012089};
-static float N023[3] = {0.998738 ,0.023574 ,0.044344};
-static float N024[3] = {0.979297 ,0.193272 ,0.060202};
-static float N025[3] = {0.798300 ,0.464885 ,0.382883};
-static float N026[3] = {-0.756590 ,0.452403 ,0.472126};
-static float N027[3] = {-0.953855 ,0.293003 ,0.065651};
-static float N028[3] = {-0.998033 ,0.040292 ,0.048028};
-static float N029[3] = {-0.977079 ,-0.204288 ,0.059858};
-static float N030[3] = {-0.729117 ,-0.675304 ,0.111140};
-static float N031[3] = {0.598361 ,-0.792753 ,0.116221};
-static float N032[3] = {0.965192 ,-0.252991 ,0.066332};
-static float N033[3] = {0.998201 ,-0.002790 ,0.059892};
-static float N034[3] = {0.978657 ,0.193135 ,0.070207};
-static float N035[3] = {0.718815 ,0.680392 ,0.142733};
-static float N036[3] = {-0.383096 ,0.906212 ,0.178936};
-static float N037[3] = {-0.952831 ,0.292590 ,0.080647};
-static float N038[3] = {-0.997680 ,0.032417 ,0.059861};
-static float N039[3] = {-0.982629 ,-0.169881 ,0.074700};
-static float N040[3] = {-0.695424 ,-0.703466 ,0.146700};
-static float N041[3] = {0.359323 ,-0.915531 ,0.180805};
-static float N042[3] = {0.943356 ,-0.319387 ,0.089842};
-static float N043[3] = {0.998272 ,-0.032435 ,0.048993};
-static float N044[3] = {0.978997 ,0.193205 ,0.065084};
-static float N045[3] = {0.872144 ,0.470094 ,-0.135565};
-static float N046[3] = {-0.664282 ,0.737945 ,-0.119027};
-static float N047[3] = {-0.954508 ,0.288570 ,0.075107};
-static float N048[3] = {-0.998273 ,0.032406 ,0.048993};
-static float N049[3] = {-0.979908 ,-0.193579 ,0.048038};
-static float N050[3] = {-0.858736 ,-0.507202 ,-0.072938};
-static float N051[3] = {0.643545 ,-0.763887 ,-0.048237};
-static float N052[3] = {0.955580 ,-0.288954 ,0.058068};
-static float N058[3] = {0.000050 ,0.793007 ,-0.609213};
-static float N059[3] = {0.913510 ,0.235418 ,-0.331779};
-static float N060[3] = {-0.807970 ,0.495000 ,-0.319625};
-static float N061[3] = {0.000000 ,0.784687 ,-0.619892};
-static float N062[3] = {0.000000 ,-1.000000 ,0.000000};
-static float N063[3] = {0.000000 ,1.000000 ,0.000000};
-static float N064[3] = {0.000000 ,1.000000 ,0.000000};
-static float N065[3] = {0.000000 ,1.000000 ,0.000000};
-static float N066[3] = {-0.055784 ,0.257059 ,0.964784};
-static float N069[3] = {-0.000505 ,-0.929775 ,-0.368127};
-static float N070[3] = {0.000000 ,1.000000 ,0.000000};
-static float P002[3] = {0.00, -36.59, 5687.72};
-static float P003[3] = {90.00, 114.73, 724.38};
-static float P004[3] = {58.24, -146.84, 262.35};
-static float P005[3] = {27.81, 231.52, 510.43};
-static float P006[3] = {-27.81, 230.43, 509.76};
-static float P007[3] = {-46.09, -146.83, 265.84};
-static float P008[3] = {-90.00, 103.84, 718.53};
-static float P009[3] = {-131.10, -165.92, 834.85};
-static float P010[3] = {-27.81, -285.31, 500.00};
-static float P011[3] = {27.81, -285.32, 500.00};
-static float P012[3] = {147.96, -170.89, 845.50};
-static float P013[3] = {180.00, 0.00, 2000.00};
-static float P014[3] = {145.62, 352.67, 2000.00};
-static float P015[3] = {55.62, 570.63, 2000.00};
-static float P016[3] = {-55.62, 570.64, 2000.00};
-static float P017[3] = {-145.62, 352.68, 2000.00};
-static float P018[3] = {-180.00, 0.01, 2000.00};
-static float P019[3] = {-178.20, -352.66, 2001.61};
-static float P020[3] = {-55.63, -570.63, 2000.00};
-static float P021[3] = {55.62, -570.64, 2000.00};
-static float P022[3] = {179.91, -352.69, 1998.39};
-static float P023[3] = {150.00, 0.00, 3000.00};
-static float P024[3] = {121.35, 293.89, 3000.00};
-static float P025[3] = {46.35, 502.93, 2883.09};
-static float P026[3] = {-46.35, 497.45, 2877.24};
-static float P027[3] = {-121.35, 293.90, 3000.00};
-static float P028[3] = {-150.00, 0.00, 3000.00};
-static float P029[3] = {-152.21, -304.84, 2858.68};
-static float P030[3] = {-46.36, -475.52, 3000.00};
-static float P031[3] = {46.35, -475.53, 3000.00};
-static float P032[3] = {155.64, -304.87, 2863.50};
-static float P033[3] = {90.00, 0.00, 4000.00};
-static float P034[3] = {72.81, 176.33, 4000.00};
-static float P035[3] = {27.81, 285.32, 4000.00};
-static float P036[3] = {-27.81, 285.32, 4000.00};
-static float P037[3] = {-72.81, 176.34, 4000.00};
-static float P038[3] = {-90.00, 0.00, 4000.00};
-static float P039[3] = {-72.81, -176.33, 4000.00};
-static float P040[3] = {-27.81, -285.31, 4000.00};
-static float P041[3] = {27.81, -285.32, 4000.00};
-static float P042[3] = {72.81, -176.34, 4000.00};
-static float P043[3] = {30.00, 0.00, 5000.00};
-static float P044[3] = {24.27, 58.78, 5000.00};
-static float P045[3] = {9.27, 95.11, 5000.00};
-static float P046[3] = {-9.27, 95.11, 5000.00};
-static float P047[3] = {-24.27, 58.78, 5000.00};
-static float P048[3] = {-30.00, 0.00, 5000.00};
-static float P049[3] = {-24.27, -58.78, 5000.00};
-static float P050[3] = {-9.27, -95.10, 5000.00};
-static float P051[3] = {9.27, -95.11, 5000.00};
-static float P052[3] = {24.27, -58.78, 5000.00};
-static float P058[3] = {0.00, 1212.72, 2703.08};
-static float P059[3] = {50.36, 0.00, 108.14};
-static float P060[3] = {-22.18, 0.00, 108.14};
-static float P061[3] = {0.00, 1181.61, 6344.65};
-static float P062[3] = {516.45, -887.08, 2535.45};
-static float P063[3] = {-545.69, -879.31, 2555.63};
-static float P064[3] = {618.89, -1005.64, 2988.32};
-static float P065[3] = {-635.37, -1014.79, 2938.68};
-static float P066[3] = {0.00, 1374.43, 3064.18};
-static float P069[3] = {0.00, -418.25, 5765.04};
-static float P070[3] = {0.00, 1266.91, 6629.60};
-static float P071[3] = {-139.12, -124.96, 997.98};
-static float P072[3] = {-139.24, -110.18, 1020.68};
-static float P073[3] = {-137.33, -94.52, 1022.63};
-static float P074[3] = {-137.03, -79.91, 996.89};
-static float P075[3] = {-135.21, -91.48, 969.14};
-static float P076[3] = {-135.39, -110.87, 968.76};
-static float P077[3] = {150.23, -78.44, 995.53};
-static float P078[3] = {152.79, -92.76, 1018.46};
-static float P079[3] = {154.19, -110.20, 1020.55};
-static float P080[3] = {151.33, -124.15, 993.77};
-static float P081[3] = {150.49, -111.19, 969.86};
-static float P082[3] = {150.79, -92.41, 969.70};
-static float iP002[3] = {0.00, -36.59, 5687.72};
-static float iP004[3] = {58.24, -146.84, 262.35};
-static float iP007[3] = {-46.09, -146.83, 265.84};
-static float iP010[3] = {-27.81, -285.31, 500.00};
-static float iP011[3] = {27.81, -285.32, 500.00};
-static float iP023[3] = {150.00, 0.00, 3000.00};
-static float iP024[3] = {121.35, 293.89, 3000.00};
-static float iP025[3] = {46.35, 502.93, 2883.09};
-static float iP026[3] = {-46.35, 497.45, 2877.24};
-static float iP027[3] = {-121.35, 293.90, 3000.00};
-static float iP028[3] = {-150.00, 0.00, 3000.00};
-static float iP029[3] = {-121.35, -304.84, 2853.86};
-static float iP030[3] = {-46.36, -475.52, 3000.00};
-static float iP031[3] = {46.35, -475.53, 3000.00};
-static float iP032[3] = {121.35, -304.87, 2853.86};
-static float iP033[3] = {90.00, 0.00, 4000.00};
-static float iP034[3] = {72.81, 176.33, 4000.00};
-static float iP035[3] = {27.81, 285.32, 4000.00};
-static float iP036[3] = {-27.81, 285.32, 4000.00};
-static float iP037[3] = {-72.81, 176.34, 4000.00};
-static float iP038[3] = {-90.00, 0.00, 4000.00};
-static float iP039[3] = {-72.81, -176.33, 4000.00};
-static float iP040[3] = {-27.81, -285.31, 4000.00};
-static float iP041[3] = {27.81, -285.32, 4000.00};
-static float iP042[3] = {72.81, -176.34, 4000.00};
-static float iP043[3] = {30.00, 0.00, 5000.00};
-static float iP044[3] = {24.27, 58.78, 5000.00};
-static float iP045[3] = {9.27, 95.11, 5000.00};
-static float iP046[3] = {-9.27, 95.11, 5000.00};
-static float iP047[3] = {-24.27, 58.78, 5000.00};
-static float iP048[3] = {-30.00, 0.00, 5000.00};
-static float iP049[3] = {-24.27, -58.78, 5000.00};
-static float iP050[3] = {-9.27, -95.10, 5000.00};
-static float iP051[3] = {9.27, -95.11, 5000.00};
-static float iP052[3] = {24.27, -58.78, 5000.00};
-static float iP061[3] = {0.00, 1181.61, 6344.65};
-static float iP069[3] = {0.00, -418.25, 5765.04};
-static float iP070[3] = {0.00, 1266.91, 6629.60};
-/* *INDENT-ON* */
-
-void
-Fish001(void)
-{
-    glBegin(GL_POLYGON);
-    glNormal3fv(N005);
-    glVertex3fv(P005);
-    glNormal3fv(N059);
-    glVertex3fv(P059);
-    glNormal3fv(N060);
-    glVertex3fv(P060);
-    glNormal3fv(N006);
-    glVertex3fv(P006);
-    glEnd();
-    glBegin(GL_POLYGON);
-    glNormal3fv(N015);
-    glVertex3fv(P015);
-    glNormal3fv(N005);
-    glVertex3fv(P005);
-    glNormal3fv(N006);
-    glVertex3fv(P006);
-    glNormal3fv(N016);
-    glVertex3fv(P016);
-    glEnd();
-    glBegin(GL_POLYGON);
-    glNormal3fv(N006);
-    glVertex3fv(P006);
-    glNormal3fv(N060);
-    glVertex3fv(P060);
-    glNormal3fv(N008);
-    glVertex3fv(P008);
-    glEnd();
-    glBegin(GL_POLYGON);
-    glNormal3fv(N016);
-    glVertex3fv(P016);
-    glNormal3fv(N006);
-    glVertex3fv(P006);
-    glNormal3fv(N008);
-    glVertex3fv(P008);
-    glEnd();
-    glBegin(GL_POLYGON);
-    glNormal3fv(N016);
-    glVertex3fv(P016);
-    glNormal3fv(N008);
-    glVertex3fv(P008);
-    glNormal3fv(N017);
-    glVertex3fv(P017);
-    glEnd();
-    glBegin(GL_POLYGON);
-    glNormal3fv(N017);
-    glVertex3fv(P017);
-    glNormal3fv(N008);
-    glVertex3fv(P008);
-    glNormal3fv(N018);
-    glVertex3fv(P018);
-    glEnd();
-    glBegin(GL_POLYGON);
-    glNormal3fv(N008);
-    glVertex3fv(P008);
-    glNormal3fv(N009);
-    glVertex3fv(P009);
-    glNormal3fv(N018);
-    glVertex3fv(P018);
-    glEnd();
-    glBegin(GL_POLYGON);
-    glNormal3fv(N008);
-    glVertex3fv(P008);
-    glNormal3fv(N060);
-    glVertex3fv(P060);
-    glNormal3fv(N009);
-    glVertex3fv(P009);
-    glEnd();
-    glBegin(GL_POLYGON);
-    glNormal3fv(N007);
-    glVertex3fv(P007);
-    glNormal3fv(N010);
-    glVertex3fv(P010);
-    glNormal3fv(N009);
-    glVertex3fv(P009);
-    glEnd();
-    glBegin(GL_POLYGON);
-    glNormal3fv(N009);
-    glVertex3fv(P009);
-    glNormal3fv(N019);
-    glVertex3fv(P019);
-    glNormal3fv(N018);
-    glVertex3fv(P018);
-    glEnd();
-    glBegin(GL_POLYGON);
-    glNormal3fv(N009);
-    glVertex3fv(P009);
-    glNormal3fv(N010);
-    glVertex3fv(P010);
-    glNormal3fv(N019);
-    glVertex3fv(P019);
-    glEnd();
-    glBegin(GL_POLYGON);
-    glNormal3fv(N010);
-    glVertex3fv(P010);
-    glNormal3fv(N020);
-    glVertex3fv(P020);
-    glNormal3fv(N019);
-    glVertex3fv(P019);
-    glEnd();
-    glBegin(GL_POLYGON);
-    glNormal3fv(N010);
-    glVertex3fv(P010);
-    glNormal3fv(N011);
-    glVertex3fv(P011);
-    glNormal3fv(N021);
-    glVertex3fv(P021);
-    glNormal3fv(N020);
-    glVertex3fv(P020);
-    glEnd();
-    glBegin(GL_POLYGON);
-    glNormal3fv(N004);
-    glVertex3fv(P004);
-    glNormal3fv(N011);
-    glVertex3fv(P011);
-    glNormal3fv(N010);
-    glVertex3fv(P010);
-    glNormal3fv(N007);
-    glVertex3fv(P007);
-    glEnd();
-    glBegin(GL_POLYGON);
-    glNormal3fv(N004);
-    glVertex3fv(P004);
-    glNormal3fv(N012);
-    glVertex3fv(P012);
-    glNormal3fv(N011);
-    glVertex3fv(P011);
-    glEnd();
-    glBegin(GL_POLYGON);
-    glNormal3fv(N012);
-    glVertex3fv(P012);
-    glNormal3fv(N022);
-    glVertex3fv(P022);
-    glNormal3fv(N011);
-    glVertex3fv(P011);
-    glEnd();
-    glBegin(GL_POLYGON);
-    glNormal3fv(N011);
-    glVertex3fv(P011);
-    glNormal3fv(N022);
-    glVertex3fv(P022);
-    glNormal3fv(N021);
-    glVertex3fv(P021);
-    glEnd();
-    glBegin(GL_POLYGON);
-    glNormal3fv(N059);
-    glVertex3fv(P059);
-    glNormal3fv(N005);
-    glVertex3fv(P005);
-    glNormal3fv(N015);
-    glVertex3fv(P015);
-    glEnd();
-    glBegin(GL_POLYGON);
-    glNormal3fv(N015);
-    glVertex3fv(P015);
-    glNormal3fv(N014);
-    glVertex3fv(P014);
-    glNormal3fv(N003);
-    glVertex3fv(P003);
-    glEnd();
-    glBegin(GL_POLYGON);
-    glNormal3fv(N015);
-    glVertex3fv(P015);
-    glNormal3fv(N003);
-    glVertex3fv(P003);
-    glNormal3fv(N059);
-    glVertex3fv(P059);
-    glEnd();
-    glBegin(GL_POLYGON);
-    glNormal3fv(N014);
-    glVertex3fv(P014);
-    glNormal3fv(N013);
-    glVertex3fv(P013);
-    glNormal3fv(N003);
-    glVertex3fv(P003);
-    glEnd();
-    glBegin(GL_POLYGON);
-    glNormal3fv(N003);
-    glVertex3fv(P003);
-    glNormal3fv(N012);
-    glVertex3fv(P012);
-    glNormal3fv(N059);
-    glVertex3fv(P059);
-    glEnd();
-    glBegin(GL_POLYGON);
-    glNormal3fv(N013);
-    glVertex3fv(P013);
-    glNormal3fv(N012);
-    glVertex3fv(P012);
-    glNormal3fv(N003);
-    glVertex3fv(P003);
-    glEnd();
-    glBegin(GL_POLYGON);
-    glNormal3fv(N013);
-    glVertex3fv(P013);
-    glNormal3fv(N022);
-    glVertex3fv(P022);
-    glNormal3fv(N012);
-    glVertex3fv(P012);
-    glEnd();
-    glBegin(GL_POLYGON);
-    glVertex3fv(P071);
-    glVertex3fv(P072);
-    glVertex3fv(P073);
-    glVertex3fv(P074);
-    glVertex3fv(P075);
-    glVertex3fv(P076);
-    glEnd();
-    glBegin(GL_POLYGON);
-    glVertex3fv(P077);
-    glVertex3fv(P078);
-    glVertex3fv(P079);
-    glVertex3fv(P080);
-    glVertex3fv(P081);
-    glVertex3fv(P082);
-    glEnd();
-}
-
-void
-Fish002(void)
-{
-    glBegin(GL_POLYGON);
-    glNormal3fv(N013);
-    glVertex3fv(P013);
-    glNormal3fv(N014);
-    glVertex3fv(P014);
-    glNormal3fv(N024);
-    glVertex3fv(P024);
-    glNormal3fv(N023);
-    glVertex3fv(P023);
-    glEnd();
-    glBegin(GL_POLYGON);
-    glNormal3fv(N014);
-    glVertex3fv(P014);
-    glNormal3fv(N015);
-    glVertex3fv(P015);
-    glNormal3fv(N025);
-    glVertex3fv(P025);
-    glNormal3fv(N024);
-    glVertex3fv(P024);
-    glEnd();
-    glBegin(GL_POLYGON);
-    glNormal3fv(N016);
-    glVertex3fv(P016);
-    glNormal3fv(N017);
-    glVertex3fv(P017);
-    glNormal3fv(N027);
-    glVertex3fv(P027);
-    glNormal3fv(N026);
-    glVertex3fv(P026);
-    glEnd();
-    glBegin(GL_POLYGON);
-    glNormal3fv(N017);
-    glVertex3fv(P017);
-    glNormal3fv(N018);
-    glVertex3fv(P018);
-    glNormal3fv(N028);
-    glVertex3fv(P028);
-    glNormal3fv(N027);
-    glVertex3fv(P027);
-    glEnd();
-    glBegin(GL_POLYGON);
-    glNormal3fv(N020);
-    glVertex3fv(P020);
-    glNormal3fv(N021);
-    glVertex3fv(P021);
-    glNormal3fv(N031);
-    glVertex3fv(P031);
-    glNormal3fv(N030);
-    glVertex3fv(P030);
-    glEnd();
-    glBegin(GL_POLYGON);
-    glNormal3fv(N013);
-    glVertex3fv(P013);
-    glNormal3fv(N023);
-    glVertex3fv(P023);
-    glNormal3fv(N022);
-    glVertex3fv(P022);
-    glEnd();
-    glBegin(GL_POLYGON);
-    glNormal3fv(N022);
-    glVertex3fv(P022);
-    glNormal3fv(N023);
-    glVertex3fv(P023);
-    glNormal3fv(N032);
-    glVertex3fv(P032);
-    glEnd();
-    glBegin(GL_POLYGON);
-    glNormal3fv(N022);
-    glVertex3fv(P022);
-    glNormal3fv(N032);
-    glVertex3fv(P032);
-    glNormal3fv(N031);
-    glVertex3fv(P031);
-    glEnd();
-    glBegin(GL_POLYGON);
-    glNormal3fv(N022);
-    glVertex3fv(P022);
-    glNormal3fv(N031);
-    glVertex3fv(P031);
-    glNormal3fv(N021);
-    glVertex3fv(P021);
-    glEnd();
-    glBegin(GL_POLYGON);
-    glNormal3fv(N018);
-    glVertex3fv(P018);
-    glNormal3fv(N019);
-    glVertex3fv(P019);
-    glNormal3fv(N029);
-    glVertex3fv(P029);
-    glEnd();
-    glBegin(GL_POLYGON);
-    glNormal3fv(N018);
-    glVertex3fv(P018);
-    glNormal3fv(N029);
-    glVertex3fv(P029);
-    glNormal3fv(N028);
-    glVertex3fv(P028);
-    glEnd();
-    glBegin(GL_POLYGON);
-    glNormal3fv(N019);
-    glVertex3fv(P019);
-    glNormal3fv(N020);
-    glVertex3fv(P020);
-    glNormal3fv(N030);
-    glVertex3fv(P030);
-    glEnd();
-    glBegin(GL_POLYGON);
-    glNormal3fv(N019);
-    glVertex3fv(P019);
-    glNormal3fv(N030);
-    glVertex3fv(P030);
-    glNormal3fv(N029);
-    glVertex3fv(P029);
-    glEnd();
-}
-
-void
-Fish003(void)
-{
-    glBegin(GL_POLYGON);
-    glNormal3fv(N032);
-    glVertex3fv(P032);
-    glNormal3fv(N023);
-    glVertex3fv(P023);
-    glNormal3fv(N033);
-    glVertex3fv(P033);
-    glNormal3fv(N042);
-    glVertex3fv(P042);
-    glEnd();
-    glBegin(GL_POLYGON);
-    glNormal3fv(N031);
-    glVertex3fv(P031);
-    glNormal3fv(N032);
-    glVertex3fv(P032);
-    glNormal3fv(N042);
-    glVertex3fv(P042);
-    glNormal3fv(N041);
-    glVertex3fv(P041);
-    glEnd();
-    glBegin(GL_POLYGON);
-    glNormal3fv(N023);
-    glVertex3fv(P023);
-    glNormal3fv(N024);
-    glVertex3fv(P024);
-    glNormal3fv(N034);
-    glVertex3fv(P034);
-    glNormal3fv(N033);
-    glVertex3fv(P033);
-    glEnd();
-    glBegin(GL_POLYGON);
-    glNormal3fv(N024);
-    glVertex3fv(P024);
-    glNormal3fv(N025);
-    glVertex3fv(P025);
-    glNormal3fv(N035);
-    glVertex3fv(P035);
-    glNormal3fv(N034);
-    glVertex3fv(P034);
-    glEnd();
-    glBegin(GL_POLYGON);
-    glNormal3fv(N030);
-    glVertex3fv(P030);
-    glNormal3fv(N031);
-    glVertex3fv(P031);
-    glNormal3fv(N041);
-    glVertex3fv(P041);
-    glNormal3fv(N040);
-    glVertex3fv(P040);
-    glEnd();
-    glBegin(GL_POLYGON);
-    glNormal3fv(N025);
-    glVertex3fv(P025);
-    glNormal3fv(N026);
-    glVertex3fv(P026);
-    glNormal3fv(N036);
-    glVertex3fv(P036);
-    glNormal3fv(N035);
-    glVertex3fv(P035);
-    glEnd();
-    glBegin(GL_POLYGON);
-    glNormal3fv(N026);
-    glVertex3fv(P026);
-    glNormal3fv(N027);
-    glVertex3fv(P027);
-    glNormal3fv(N037);
-    glVertex3fv(P037);
-    glNormal3fv(N036);
-    glVertex3fv(P036);
-    glEnd();
-    glBegin(GL_POLYGON);
-    glNormal3fv(N027);
-    glVertex3fv(P027);
-    glNormal3fv(N028);
-    glVertex3fv(P028);
-    glNormal3fv(N038);
-    glVertex3fv(P038);
-    glNormal3fv(N037);
-    glVertex3fv(P037);
-    glEnd();
-    glBegin(GL_POLYGON);
-    glNormal3fv(N028);
-    glVertex3fv(P028);
-    glNormal3fv(N029);
-    glVertex3fv(P029);
-    glNormal3fv(N039);
-    glVertex3fv(P039);
-    glNormal3fv(N038);
-    glVertex3fv(P038);
-    glEnd();
-    glBegin(GL_POLYGON);
-    glNormal3fv(N029);
-    glVertex3fv(P029);
-    glNormal3fv(N030);
-    glVertex3fv(P030);
-    glNormal3fv(N040);
-    glVertex3fv(P040);
-    glNormal3fv(N039);
-    glVertex3fv(P039);
-    glEnd();
-}
-
-void
-Fish004(void)
-{
-    glBegin(GL_POLYGON);
-    glNormal3fv(N040);
-    glVertex3fv(P040);
-    glNormal3fv(N041);
-    glVertex3fv(P041);
-    glNormal3fv(N051);
-    glVertex3fv(P051);
-    glNormal3fv(N050);
-    glVertex3fv(P050);
-    glEnd();
-    glBegin(GL_POLYGON);
-    glNormal3fv(N041);
-    glVertex3fv(P041);
-    glNormal3fv(N042);
-    glVertex3fv(P042);
-    glNormal3fv(N052);
-    glVertex3fv(P052);
-    glNormal3fv(N051);
-    glVertex3fv(P051);
-    glEnd();
-    glBegin(GL_POLYGON);
-    glNormal3fv(N042);
-    glVertex3fv(P042);
-    glNormal3fv(N033);
-    glVertex3fv(P033);
-    glNormal3fv(N043);
-    glVertex3fv(P043);
-    glNormal3fv(N052);
-    glVertex3fv(P052);
-    glEnd();
-    glBegin(GL_POLYGON);
-    glNormal3fv(N033);
-    glVertex3fv(P033);
-    glNormal3fv(N034);
-    glVertex3fv(P034);
-    glNormal3fv(N044);
-    glVertex3fv(P044);
-    glNormal3fv(N043);
-    glVertex3fv(P043);
-    glEnd();
-    glBegin(GL_POLYGON);
-    glNormal3fv(N034);
-    glVertex3fv(P034);
-    glNormal3fv(N035);
-    glVertex3fv(P035);
-    glNormal3fv(N045);
-    glVertex3fv(P045);
-    glNormal3fv(N044);
-    glVertex3fv(P044);
-    glEnd();
-    glBegin(GL_POLYGON);
-    glNormal3fv(N035);
-    glVertex3fv(P035);
-    glNormal3fv(N036);
-    glVertex3fv(P036);
-    glNormal3fv(N046);
-    glVertex3fv(P046);
-    glNormal3fv(N045);
-    glVertex3fv(P045);
-    glEnd();
-    glBegin(GL_POLYGON);
-    glNormal3fv(N036);
-    glVertex3fv(P036);
-    glNormal3fv(N037);
-    glVertex3fv(P037);
-    glNormal3fv(N047);
-    glVertex3fv(P047);
-    glNormal3fv(N046);
-    glVertex3fv(P046);
-    glEnd();
-    glBegin(GL_POLYGON);
-    glNormal3fv(N037);
-    glVertex3fv(P037);
-    glNormal3fv(N038);
-    glVertex3fv(P038);
-    glNormal3fv(N048);
-    glVertex3fv(P048);
-    glNormal3fv(N047);
-    glVertex3fv(P047);
-    glEnd();
-    glBegin(GL_POLYGON);
-    glNormal3fv(N038);
-    glVertex3fv(P038);
-    glNormal3fv(N039);
-    glVertex3fv(P039);
-    glNormal3fv(N049);
-    glVertex3fv(P049);
-    glNormal3fv(N048);
-    glVertex3fv(P048);
-    glEnd();
-    glBegin(GL_POLYGON);
-    glNormal3fv(N039);
-    glVertex3fv(P039);
-    glNormal3fv(N040);
-    glVertex3fv(P040);
-    glNormal3fv(N050);
-    glVertex3fv(P050);
-    glNormal3fv(N049);
-    glVertex3fv(P049);
-    glEnd();
-    glBegin(GL_POLYGON);
-    glNormal3fv(N070);
-    glVertex3fv(P070);
-    glNormal3fv(N061);
-    glVertex3fv(P061);
-    glNormal3fv(N002);
-    glVertex3fv(P002);
-    glEnd();
-    glBegin(GL_POLYGON);
-    glNormal3fv(N061);
-    glVertex3fv(P061);
-    glNormal3fv(N046);
-    glVertex3fv(P046);
-    glNormal3fv(N002);
-    glVertex3fv(P002);
-    glEnd();
-    glBegin(GL_POLYGON);
-    glNormal3fv(N045);
-    glVertex3fv(P045);
-    glNormal3fv(N046);
-    glVertex3fv(P046);
-    glNormal3fv(N061);
-    glVertex3fv(P061);
-    glEnd();
-    glBegin(GL_POLYGON);
-    glNormal3fv(N002);
-    glVertex3fv(P002);
-    glNormal3fv(N061);
-    glVertex3fv(P061);
-    glNormal3fv(N070);
-    glVertex3fv(P070);
-    glEnd();
-    glBegin(GL_POLYGON);
-    glNormal3fv(N002);
-    glVertex3fv(P002);
-    glNormal3fv(N045);
-    glVertex3fv(P045);
-    glNormal3fv(N061);
-    glVertex3fv(P061);
-    glEnd();
-}
-
-void
-Fish005(void)
-{
-    glBegin(GL_POLYGON);
-    glNormal3fv(N002);
-    glVertex3fv(P002);
-    glNormal3fv(N044);
-    glVertex3fv(P044);
-    glNormal3fv(N045);
-    glVertex3fv(P045);
-    glEnd();
-    glBegin(GL_POLYGON);
-    glNormal3fv(N002);
-    glVertex3fv(P002);
-    glNormal3fv(N043);
-    glVertex3fv(P043);
-    glNormal3fv(N044);
-    glVertex3fv(P044);
-    glEnd();
-    glBegin(GL_POLYGON);
-    glNormal3fv(N002);
-    glVertex3fv(P002);
-    glNormal3fv(N052);
-    glVertex3fv(P052);
-    glNormal3fv(N043);
-    glVertex3fv(P043);
-    glEnd();
-    glBegin(GL_POLYGON);
-    glNormal3fv(N002);
-    glVertex3fv(P002);
-    glNormal3fv(N051);
-    glVertex3fv(P051);
-    glNormal3fv(N052);
-    glVertex3fv(P052);
-    glEnd();
-    glBegin(GL_POLYGON);
-    glNormal3fv(N002);
-    glVertex3fv(P002);
-    glNormal3fv(N046);
-    glVertex3fv(P046);
-    glNormal3fv(N047);
-    glVertex3fv(P047);
-    glEnd();
-    glBegin(GL_POLYGON);
-    glNormal3fv(N002);
-    glVertex3fv(P002);
-    glNormal3fv(N047);
-    glVertex3fv(P047);
-    glNormal3fv(N048);
-    glVertex3fv(P048);
-    glEnd();
-    glBegin(GL_POLYGON);
-    glNormal3fv(N002);
-    glVertex3fv(P002);
-    glNormal3fv(N048);
-    glVertex3fv(P048);
-    glNormal3fv(N049);
-    glVertex3fv(P049);
-    glEnd();
-    glBegin(GL_POLYGON);
-    glNormal3fv(N002);
-    glVertex3fv(P002);
-    glNormal3fv(N049);
-    glVertex3fv(P049);
-    glNormal3fv(N050);
-    glVertex3fv(P050);
-    glEnd();
-    glBegin(GL_POLYGON);
-    glNormal3fv(N050);
-    glVertex3fv(P050);
-    glNormal3fv(N051);
-    glVertex3fv(P051);
-    glNormal3fv(N069);
-    glVertex3fv(P069);
-    glEnd();
-    glBegin(GL_POLYGON);
-    glNormal3fv(N051);
-    glVertex3fv(P051);
-    glNormal3fv(N002);
-    glVertex3fv(P002);
-    glNormal3fv(N069);
-    glVertex3fv(P069);
-    glEnd();
-    glBegin(GL_POLYGON);
-    glNormal3fv(N050);
-    glVertex3fv(P050);
-    glNormal3fv(N069);
-    glVertex3fv(P069);
-    glNormal3fv(N002);
-    glVertex3fv(P002);
-    glEnd();
-}
-
-void
-Fish006(void)
-{
-    glBegin(GL_POLYGON);
-    glNormal3fv(N066);
-    glVertex3fv(P066);
-    glNormal3fv(N016);
-    glVertex3fv(P016);
-    glNormal3fv(N026);
-    glVertex3fv(P026);
-    glEnd();
-    glBegin(GL_POLYGON);
-    glNormal3fv(N015);
-    glVertex3fv(P015);
-    glNormal3fv(N066);
-    glVertex3fv(P066);
-    glNormal3fv(N025);
-    glVertex3fv(P025);
-    glEnd();
-    glBegin(GL_POLYGON);
-    glNormal3fv(N025);
-    glVertex3fv(P025);
-    glNormal3fv(N066);
-    glVertex3fv(P066);
-    glNormal3fv(N026);
-    glVertex3fv(P026);
-    glEnd();
-    glBegin(GL_POLYGON);
-    glNormal3fv(N066);
-    glVertex3fv(P066);
-    glNormal3fv(N058);
-    glVertex3fv(P058);
-    glNormal3fv(N016);
-    glVertex3fv(P016);
-    glEnd();
-    glBegin(GL_POLYGON);
-    glNormal3fv(N015);
-    glVertex3fv(P015);
-    glNormal3fv(N058);
-    glVertex3fv(P058);
-    glNormal3fv(N066);
-    glVertex3fv(P066);
-    glEnd();
-    glBegin(GL_POLYGON);
-    glNormal3fv(N058);
-    glVertex3fv(P058);
-    glNormal3fv(N015);
-    glVertex3fv(P015);
-    glNormal3fv(N016);
-    glVertex3fv(P016);
-    glEnd();
-}
-
-void
-Fish007(void)
-{
-    glBegin(GL_POLYGON);
-    glNormal3fv(N062);
-    glVertex3fv(P062);
-    glNormal3fv(N022);
-    glVertex3fv(P022);
-    glNormal3fv(N032);
-    glVertex3fv(P032);
-    glEnd();
-    glBegin(GL_POLYGON);
-    glNormal3fv(N062);
-    glVertex3fv(P062);
-    glNormal3fv(N032);
-    glVertex3fv(P032);
-    glNormal3fv(N064);
-    glVertex3fv(P064);
-    glEnd();
-    glBegin(GL_POLYGON);
-    glNormal3fv(N022);
-    glVertex3fv(P022);
-    glNormal3fv(N062);
-    glVertex3fv(P062);
-    glNormal3fv(N032);
-    glVertex3fv(P032);
-    glEnd();
-    glBegin(GL_POLYGON);
-    glNormal3fv(N062);
-    glVertex3fv(P062);
-    glNormal3fv(N064);
-    glVertex3fv(P064);
-    glNormal3fv(N032);
-    glVertex3fv(P032);
-    glEnd();
-}
-
-void
-Fish008(void)
-{
-    glBegin(GL_POLYGON);
-    glNormal3fv(N063);
-    glVertex3fv(P063);
-    glNormal3fv(N019);
-    glVertex3fv(P019);
-    glNormal3fv(N029);
-    glVertex3fv(P029);
-    glEnd();
-    glBegin(GL_POLYGON);
-    glNormal3fv(N019);
-    glVertex3fv(P019);
-    glNormal3fv(N063);
-    glVertex3fv(P063);
-    glNormal3fv(N029);
-    glVertex3fv(P029);
-    glEnd();
-    glBegin(GL_POLYGON);
-    glNormal3fv(N063);
-    glVertex3fv(P063);
-    glNormal3fv(N029);
-    glVertex3fv(P029);
-    glNormal3fv(N065);
-    glVertex3fv(P065);
-    glEnd();
-    glBegin(GL_POLYGON);
-    glNormal3fv(N063);
-    glVertex3fv(P063);
-    glNormal3fv(N065);
-    glVertex3fv(P065);
-    glNormal3fv(N029);
-    glVertex3fv(P029);
-    glEnd();
-}
-
-void
-Fish009(void)
-{
-    glBegin(GL_POLYGON);
-    glVertex3fv(P059);
-    glVertex3fv(P012);
-    glVertex3fv(P009);
-    glVertex3fv(P060);
-    glEnd();
-    glBegin(GL_POLYGON);
-    glVertex3fv(P012);
-    glVertex3fv(P004);
-    glVertex3fv(P007);
-    glVertex3fv(P009);
-    glEnd();
-}
-
-void
-Fish_1(void)
-{
-    Fish004();
-    Fish005();
-    Fish003();
-    Fish007();
-    Fish006();
-    Fish002();
-    Fish008();
-    Fish009();
-    Fish001();
-}
-
-void
-Fish_2(void)
-{
-    Fish005();
-    Fish004();
-    Fish003();
-    Fish008();
-    Fish006();
-    Fish002();
-    Fish007();
-    Fish009();
-    Fish001();
-}
-
-void
-Fish_3(void)
-{
-    Fish005();
-    Fish004();
-    Fish007();
-    Fish003();
-    Fish002();
-    Fish008();
-    Fish009();
-    Fish001();
-    Fish006();
-}
-
-void
-Fish_4(void)
-{
-    Fish005();
-    Fish004();
-    Fish008();
-    Fish003();
-    Fish002();
-    Fish007();
-    Fish009();
-    Fish001();
-    Fish006();
-}
-
-void
-Fish_5(void)
-{
-    Fish009();
-    Fish006();
-    Fish007();
-    Fish001();
-    Fish002();
-    Fish003();
-    Fish008();
-    Fish004();
-    Fish005();
-}
-
-void
-Fish_6(void)
-{
-    Fish009();
-    Fish006();
-    Fish008();
-    Fish001();
-    Fish002();
-    Fish007();
-    Fish003();
-    Fish004();
-    Fish005();
-}
-
-void
-Fish_7(void)
-{
-    Fish009();
-    Fish001();
-    Fish007();
-    Fish005();
-    Fish002();
-    Fish008();
-    Fish003();
-    Fish004();
-    Fish006();
-}
-
-void
-Fish_8(void)
-{
-    Fish009();
-    Fish008();
-    Fish001();
-    Fish002();
-    Fish007();
-    Fish003();
-    Fish005();
-    Fish004();
-    Fish006();
-}
-
-void
-DrawShark(fishRec * fish)
-{
-    float mat[4][4];
-    int n;
-    float seg1, seg2, seg3, seg4, segup;
-    float thrash, chomp;
-
-    fish->htail = (int) (fish->htail - (int) (5.0 * fish->v)) % 360;
-
-    thrash = 50.0 * fish->v;
-
-    seg1 = 0.6 * thrash * sin(fish->htail * RRAD);
-    seg2 = 1.8 * thrash * sin((fish->htail + 45.0) * RRAD);
-    seg3 = 3.0 * thrash * sin((fish->htail + 90.0) * RRAD);
-    seg4 = 4.0 * thrash * sin((fish->htail + 110.0) * RRAD);
-
-    chomp = 0.0;
-    if (fish->v > 2.0) {
-        chomp = -(fish->v - 2.0) * 200.0;
-    }
-    P004[1] = iP004[1] + chomp;
-    P007[1] = iP007[1] + chomp;
-    P010[1] = iP010[1] + chomp;
-    P011[1] = iP011[1] + chomp;
-
-    P023[0] = iP023[0] + seg1;
-    P024[0] = iP024[0] + seg1;
-    P025[0] = iP025[0] + seg1;
-    P026[0] = iP026[0] + seg1;
-    P027[0] = iP027[0] + seg1;
-    P028[0] = iP028[0] + seg1;
-    P029[0] = iP029[0] + seg1;
-    P030[0] = iP030[0] + seg1;
-    P031[0] = iP031[0] + seg1;
-    P032[0] = iP032[0] + seg1;
-    P033[0] = iP033[0] + seg2;
-    P034[0] = iP034[0] + seg2;
-    P035[0] = iP035[0] + seg2;
-    P036[0] = iP036[0] + seg2;
-    P037[0] = iP037[0] + seg2;
-    P038[0] = iP038[0] + seg2;
-    P039[0] = iP039[0] + seg2;
-    P040[0] = iP040[0] + seg2;
-    P041[0] = iP041[0] + seg2;
-    P042[0] = iP042[0] + seg2;
-    P043[0] = iP043[0] + seg3;
-    P044[0] = iP044[0] + seg3;
-    P045[0] = iP045[0] + seg3;
-    P046[0] = iP046[0] + seg3;
-    P047[0] = iP047[0] + seg3;
-    P048[0] = iP048[0] + seg3;
-    P049[0] = iP049[0] + seg3;
-    P050[0] = iP050[0] + seg3;
-    P051[0] = iP051[0] + seg3;
-    P052[0] = iP052[0] + seg3;
-    P002[0] = iP002[0] + seg4;
-    P061[0] = iP061[0] + seg4;
-    P069[0] = iP069[0] + seg4;
-    P070[0] = iP070[0] + seg4;
-
-    fish->vtail += ((fish->dtheta - fish->vtail) * 0.1);
-
-    if (fish->vtail > 0.5) {
-        fish->vtail = 0.5;
-    } else if (fish->vtail < -0.5) {
-        fish->vtail = -0.5;
-    }
-    segup = thrash * fish->vtail;
-
-    P023[1] = iP023[1] + segup;
-    P024[1] = iP024[1] + segup;
-    P025[1] = iP025[1] + segup;
-    P026[1] = iP026[1] + segup;
-    P027[1] = iP027[1] + segup;
-    P028[1] = iP028[1] + segup;
-    P029[1] = iP029[1] + segup;
-    P030[1] = iP030[1] + segup;
-    P031[1] = iP031[1] + segup;
-    P032[1] = iP032[1] + segup;
-    P033[1] = iP033[1] + segup * 5.0;
-    P034[1] = iP034[1] + segup * 5.0;
-    P035[1] = iP035[1] + segup * 5.0;
-    P036[1] = iP036[1] + segup * 5.0;
-    P037[1] = iP037[1] + segup * 5.0;
-    P038[1] = iP038[1] + segup * 5.0;
-    P039[1] = iP039[1] + segup * 5.0;
-    P040[1] = iP040[1] + segup * 5.0;
-    P041[1] = iP041[1] + segup * 5.0;
-    P042[1] = iP042[1] + segup * 5.0;
-    P043[1] = iP043[1] + segup * 12.0;
-    P044[1] = iP044[1] + segup * 12.0;
-    P045[1] = iP045[1] + segup * 12.0;
-    P046[1] = iP046[1] + segup * 12.0;
-    P047[1] = iP047[1] + segup * 12.0;
-    P048[1] = iP048[1] + segup * 12.0;
-    P049[1] = iP049[1] + segup * 12.0;
-    P050[1] = iP050[1] + segup * 12.0;
-    P051[1] = iP051[1] + segup * 12.0;
-    P052[1] = iP052[1] + segup * 12.0;
-    P002[1] = iP002[1] + segup * 17.0;
-    P061[1] = iP061[1] + segup * 17.0;
-    P069[1] = iP069[1] + segup * 17.0;
-    P070[1] = iP070[1] + segup * 17.0;
-
-    glPushMatrix();
-
-    glTranslatef(0.0, 0.0, -3000.0);
-
-    glGetFloatv(GL_MODELVIEW_MATRIX, &mat[0][0]);
-    n = 0;
-    if (mat[0][2] >= 0.0) {
-        n += 1;
-    }
-    if (mat[1][2] >= 0.0) {
-        n += 2;
-    }
-    if (mat[2][2] >= 0.0) {
-        n += 4;
-    }
-    glScalef(2.0, 1.0, 1.0);
-
-    glEnable(GL_CULL_FACE);
-    switch (n) {
-    case 0:
-        Fish_1();
-        break;
-    case 1:
-        Fish_2();
-        break;
-    case 2:
-        Fish_3();
-        break;
-    case 3:
-        Fish_4();
-        break;
-    case 4:
-        Fish_5();
-        break;
-    case 5:
-        Fish_6();
-        break;
-    case 6:
-        Fish_7();
-        break;
-    case 7:
-        Fish_8();
-        break;
-    }
-    glDisable(GL_CULL_FACE);
-
-    glPopMatrix();
-}
diff --git a/Xcode/TemplatesForXcodeSnowLeopard/SDL OpenGL Application/atlantis/swim.c b/Xcode/TemplatesForXcodeSnowLeopard/SDL OpenGL Application/atlantis/swim.c
deleted file mode 100644
index cac7b6095..000000000
--- a/Xcode/TemplatesForXcodeSnowLeopard/SDL OpenGL Application/atlantis/swim.c	
+++ /dev/null
@@ -1,188 +0,0 @@
-/**
- * (c) Copyright 1993, 1994, Silicon Graphics, Inc.
- * ALL RIGHTS RESERVED
- * Permission to use, copy, modify, and distribute this software for
- * any purpose and without fee is hereby granted, provided that the above
- * copyright notice appear in all copies and that both the copyright notice
- * and this permission notice appear in supporting documentation, and that
- * the name of Silicon Graphics, Inc. not be used in advertising
- * or publicity pertaining to distribution of the software without specific,
- * written prior permission.
- *
- * THE MATERIAL EMBODIED ON THIS SOFTWARE IS PROVIDED TO YOU "AS-IS"
- * AND WITHOUT WARRANTY OF ANY KIND, EXPRESS, IMPLIED OR OTHERWISE,
- * INCLUDING WITHOUT LIMITATION, ANY WARRANTY OF MERCHANTABILITY OR
- * FITNESS FOR A PARTICULAR PURPOSE.  IN NO EVENT SHALL SILICON
- * GRAPHICS, INC.  BE LIABLE TO YOU OR ANYONE ELSE FOR ANY DIRECT,
- * SPECIAL, INCIDENTAL, INDIRECT OR CONSEQUENTIAL DAMAGES OF ANY
- * KIND, OR ANY DAMAGES WHATSOEVER, INCLUDING WITHOUT LIMITATION,
- * LOSS OF PROFIT, LOSS OF USE, SAVINGS OR REVENUE, OR THE CLAIMS OF
- * THIRD PARTIES, WHETHER OR NOT SILICON GRAPHICS, INC.  HAS BEEN
- * ADVISED OF THE POSSIBILITY OF SUCH LOSS, HOWEVER CAUSED AND ON
- * ANY THEORY OF LIABILITY, ARISING OUT OF OR IN CONNECTION WITH THE
- * POSSESSION, USE OR PERFORMANCE OF THIS SOFTWARE.
- *
- * US Government Users Restricted Rights
- * Use, duplication, or disclosure by the Government is subject to
- * restrictions set forth in FAR 52.227.19(c)(2) or subparagraph
- * (c)(1)(ii) of the Rights in Technical Data and Computer Software
- * clause at DFARS 252.227-7013 and/or in similar or successor
- * clauses in the FAR or the DOD or NASA FAR Supplement.
- * Unpublished-- rights reserved under the copyright laws of the
- * United States.  Contractor/manufacturer is Silicon Graphics,
- * Inc., 2011 N.  Shoreline Blvd., Mountain View, CA 94039-7311.
- *
- * OpenGL(TM) is a trademark of Silicon Graphics, Inc.
- */
-#include 
-#include   /* For rand(). */
-#include 
-#include "atlantis.h"
-
-void
-FishTransform(fishRec * fish)
-{
-
-    glTranslatef(fish->y, fish->z, -fish->x);
-    glRotatef(-fish->psi, 0.0, 1.0, 0.0);
-    glRotatef(fish->theta, 1.0, 0.0, 0.0);
-    glRotatef(-fish->phi, 0.0, 0.0, 1.0);
-}
-
-void
-WhalePilot(fishRec * fish)
-{
-
-    fish->phi = -20.0;
-    fish->theta = 0.0;
-    fish->psi -= 0.5;
-
-    fish->x += WHALESPEED * fish->v * cos(fish->psi / RAD) * cos(fish->theta / RAD);
-    fish->y += WHALESPEED * fish->v * sin(fish->psi / RAD) * cos(fish->theta / RAD);
-    fish->z += WHALESPEED * fish->v * sin(fish->theta / RAD);
-}
-
-void
-SharkPilot(fishRec * fish)
-{
-    static int sign = 1;
-    float X, Y, Z, tpsi, ttheta, thetal;
-
-    fish->xt = 60000.0;
-    fish->yt = 0.0;
-    fish->zt = 0.0;
-
-    X = fish->xt - fish->x;
-    Y = fish->yt - fish->y;
-    Z = fish->zt - fish->z;
-
-    thetal = fish->theta;
-
-    ttheta = RAD * atan(Z / (sqrt(X * X + Y * Y)));
-
-    if (ttheta > fish->theta + 0.25) {
-        fish->theta += 0.5;
-    } else if (ttheta < fish->theta - 0.25) {
-        fish->theta -= 0.5;
-    }
-    if (fish->theta > 90.0) {
-        fish->theta = 90.0;
-    }
-    if (fish->theta < -90.0) {
-        fish->theta = -90.0;
-    }
-    fish->dtheta = fish->theta - thetal;
-
-    tpsi = RAD * atan2(Y, X);
-
-    fish->attack = 0;
-
-    if (fabs(tpsi - fish->psi) < 10.0) {
-        fish->attack = 1;
-    } else if (fabs(tpsi - fish->psi) < 45.0) {
-        if (fish->psi > tpsi) {
-            fish->psi -= 0.5;
-            if (fish->psi < -180.0) {
-                fish->psi += 360.0;
-            }
-        } else if (fish->psi < tpsi) {
-            fish->psi += 0.5;
-            if (fish->psi > 180.0) {
-                fish->psi -= 360.0;
-            }
-        }
-    } else {
-        if (rand() % 100 > 98) {
-            sign = 1 - sign;
-        }
-        fish->psi += sign;
-        if (fish->psi > 180.0) {
-            fish->psi -= 360.0;
-        }
-        if (fish->psi < -180.0) {
-            fish->psi += 360.0;
-        }
-    }
-
-    if (fish->attack) {
-        if (fish->v < 1.1) {
-            fish->spurt = 1;
-        }
-        if (fish->spurt) {
-            fish->v += 0.2;
-        }
-        if (fish->v > 5.0) {
-            fish->spurt = 0;
-        }
-        if ((fish->v > 1.0) && (!fish->spurt)) {
-            fish->v -= 0.2;
-        }
-    } else {
-        if (!(rand() % 400) && (!fish->spurt)) {
-            fish->spurt = 1;
-        }
-        if (fish->spurt) {
-            fish->v += 0.05;
-        }
-        if (fish->v > 3.0) {
-            fish->spurt = 0;
-        }
-        if ((fish->v > 1.0) && (!fish->spurt)) {
-            fish->v -= 0.05;
-        }
-    }
-
-    fish->x += SHARKSPEED * fish->v * cos(fish->psi / RAD) * cos(fish->theta / RAD);
-    fish->y += SHARKSPEED * fish->v * sin(fish->psi / RAD) * cos(fish->theta / RAD);
-    fish->z += SHARKSPEED * fish->v * sin(fish->theta / RAD);
-}
-
-void
-SharkMiss(int i)
-{
-    int j;
-    float avoid, thetal;
-    float X, Y, Z, R;
-
-    for (j = 0; j < NUM_SHARKS; j++) {
-        if (j != i) {
-            X = sharks[j].x - sharks[i].x;
-            Y = sharks[j].y - sharks[i].y;
-            Z = sharks[j].z - sharks[i].z;
-
-            R = sqrt(X * X + Y * Y + Z * Z);
-
-            avoid = 1.0;
-            thetal = sharks[i].theta;
-
-            if (R < SHARKSIZE) {
-                if (Z > 0.0) {
-                    sharks[i].theta -= avoid;
-                } else {
-                    sharks[i].theta += avoid;
-                }
-            }
-            sharks[i].dtheta += (sharks[i].theta - thetal);
-        }
-    }
-}
diff --git a/Xcode/TemplatesForXcodeSnowLeopard/SDL OpenGL Application/atlantis/whale.c b/Xcode/TemplatesForXcodeSnowLeopard/SDL OpenGL Application/atlantis/whale.c
deleted file mode 100644
index 828640ad0..000000000
--- a/Xcode/TemplatesForXcodeSnowLeopard/SDL OpenGL Application/atlantis/whale.c	
+++ /dev/null
@@ -1,1798 +0,0 @@
-/**
- * (c) Copyright 1993, 1994, Silicon Graphics, Inc.
- * ALL RIGHTS RESERVED
- * Permission to use, copy, modify, and distribute this software for
- * any purpose and without fee is hereby granted, provided that the above
- * copyright notice appear in all copies and that both the copyright notice
- * and this permission notice appear in supporting documentation, and that
- * the name of Silicon Graphics, Inc. not be used in advertising
- * or publicity pertaining to distribution of the software without specific,
- * written prior permission.
- *
- * THE MATERIAL EMBODIED ON THIS SOFTWARE IS PROVIDED TO YOU "AS-IS"
- * AND WITHOUT WARRANTY OF ANY KIND, EXPRESS, IMPLIED OR OTHERWISE,
- * INCLUDING WITHOUT LIMITATION, ANY WARRANTY OF MERCHANTABILITY OR
- * FITNESS FOR A PARTICULAR PURPOSE.  IN NO EVENT SHALL SILICON
- * GRAPHICS, INC.  BE LIABLE TO YOU OR ANYONE ELSE FOR ANY DIRECT,
- * SPECIAL, INCIDENTAL, INDIRECT OR CONSEQUENTIAL DAMAGES OF ANY
- * KIND, OR ANY DAMAGES WHATSOEVER, INCLUDING WITHOUT LIMITATION,
- * LOSS OF PROFIT, LOSS OF USE, SAVINGS OR REVENUE, OR THE CLAIMS OF
- * THIRD PARTIES, WHETHER OR NOT SILICON GRAPHICS, INC.  HAS BEEN
- * ADVISED OF THE POSSIBILITY OF SUCH LOSS, HOWEVER CAUSED AND ON
- * ANY THEORY OF LIABILITY, ARISING OUT OF OR IN CONNECTION WITH THE
- * POSSESSION, USE OR PERFORMANCE OF THIS SOFTWARE.
- *
- * US Government Users Restricted Rights
- * Use, duplication, or disclosure by the Government is subject to
- * restrictions set forth in FAR 52.227.19(c)(2) or subparagraph
- * (c)(1)(ii) of the Rights in Technical Data and Computer Software
- * clause at DFARS 252.227-7013 and/or in similar or successor
- * clauses in the FAR or the DOD or NASA FAR Supplement.
- * Unpublished-- rights reserved under the copyright laws of the
- * United States.  Contractor/manufacturer is Silicon Graphics,
- * Inc., 2011 N.  Shoreline Blvd., Mountain View, CA 94039-7311.
- *
- * OpenGL(TM) is a trademark of Silicon Graphics, Inc.
- */
-#include 
-#include 
-#include "atlantis.h"
-/* *INDENT-OFF* */
-static float N001[3] = {0.019249 ,0.011340 ,-0.999750};
-static float N002[3] = {-0.132579 ,0.954547 ,0.266952};
-static float N003[3] = {-0.196061 ,0.980392 ,-0.019778};
-static float N004[3] = {0.695461 ,0.604704 ,0.388158};
-static float N005[3] = {0.870600 ,0.425754 ,0.246557};
-static float N006[3] = {-0.881191 ,0.392012 ,0.264251};
-static float N008[3] = {-0.341437 ,0.887477 ,0.309523};
-static float N009[3] = {0.124035 ,-0.992278 ,0.000000};
-static float N010[3] = {0.242536 ,0.000000 ,-0.970143};
-static float N011[3] = {0.588172 ,0.000000 ,0.808736};
-static float N012[3] = {0.929824 ,-0.340623 ,-0.139298};
-static float N013[3] = {0.954183 ,0.267108 ,-0.134865};
-static float N014[3] = {0.495127 ,0.855436 ,-0.151914};
-static float N015[3] = {-0.390199 ,0.906569 ,-0.160867};
-static float N016[3] = {-0.923605 ,0.354581 ,-0.145692};
-static float N017[3] = {-0.955796 ,-0.260667 ,-0.136036};
-static float N018[3] = {-0.501283 ,-0.853462 ,-0.142540};
-static float N019[3] = {0.405300 ,-0.901974 ,-0.148913};
-static float N020[3] = {0.909913 ,-0.392746 ,-0.133451};
-static float N021[3] = {0.936494 ,0.331147 ,-0.115414};
-static float N022[3] = {0.600131 ,0.793724 ,-0.099222};
-static float N023[3] = {-0.231556 ,0.968361 ,-0.093053};
-static float N024[3] = {-0.844369 ,0.525330 ,-0.105211};
-static float N025[3] = {-0.982725 ,-0.136329 ,-0.125164};
-static float N026[3] = {-0.560844 ,-0.822654 ,-0.093241};
-static float N027[3] = {0.263884 ,-0.959981 ,-0.093817};
-static float N028[3] = {0.842057 ,-0.525192 ,-0.122938};
-static float N029[3] = {0.921620 ,0.367565 ,-0.124546};
-static float N030[3] = {0.613927 ,0.784109 ,-0.090918};
-static float N031[3] = {-0.448754 ,0.888261 ,-0.098037};
-static float N032[3] = {-0.891865 ,0.434376 ,-0.126077};
-static float N033[3] = {-0.881447 ,-0.448017 ,-0.149437};
-static float N034[3] = {-0.345647 ,-0.922057 ,-0.174183};
-static float N035[3] = {0.307998 ,-0.941371 ,-0.137688};
-static float N036[3] = {0.806316 ,-0.574647 ,-0.140124};
-static float N037[3] = {0.961346 ,0.233646 ,-0.145681};
-static float N038[3] = {0.488451 ,0.865586 ,-0.110351};
-static float N039[3] = {-0.374290 ,0.921953 ,-0.099553};
-static float N040[3] = {-0.928504 ,0.344533 ,-0.138485};
-static float N041[3] = {-0.918419 ,-0.371792 ,-0.135189};
-static float N042[3] = {-0.520666 ,-0.833704 ,-0.183968};
-static float N043[3] = {0.339204 ,-0.920273 ,-0.195036};
-static float N044[3] = {0.921475 ,-0.387382 ,-0.028636};
-static float N045[3] = {0.842465 ,0.533335 ,-0.076204};
-static float N046[3] = {0.380110 ,0.924939 ,0.002073};
-static float N047[3] = {-0.276128 ,0.961073 ,-0.009579};
-static float N048[3] = {-0.879684 ,0.473001 ,-0.049250};
-static float N049[3] = {-0.947184 ,-0.317614 ,-0.044321};
-static float N050[3] = {-0.642059 ,-0.764933 ,-0.051363};
-static float N051[3] = {0.466794 ,-0.880921 ,-0.077990};
-static float N052[3] = {0.898509 ,-0.432277 ,0.076279};
-static float N053[3] = {0.938985 ,0.328141 ,0.103109};
-static float N054[3] = {0.442420 ,0.895745 ,0.043647};
-static float N055[3] = {-0.255163 ,0.966723 ,0.018407};
-static float N056[3] = {-0.833769 ,0.540650 ,0.111924};
-static float N057[3] = {-0.953653 ,-0.289939 ,0.080507};
-static float N058[3] = {-0.672357 ,-0.730524 ,0.119461};
-static float N059[3] = {0.522249 ,-0.846652 ,0.102157};
-static float N060[3] = {0.885868 ,-0.427631 ,0.179914};
-static float N062[3] = {0.648942 ,0.743116 ,0.163255};
-static float N063[3] = {-0.578967 ,0.807730 ,0.111219};
-static float N065[3] = {-0.909864 ,-0.352202 ,0.219321};
-static float N066[3] = {-0.502541 ,-0.818090 ,0.279610};
-static float N067[3] = {0.322919 ,-0.915358 ,0.240504};
-static float N068[3] = {0.242536 ,0.000000 ,-0.970143};
-static float N069[3] = {0.000000 ,1.000000 ,0.000000};
-static float N070[3] = {0.000000 ,1.000000 ,0.000000};
-static float N071[3] = {0.000000 ,1.000000 ,0.000000};
-static float N072[3] = {0.000000 ,1.000000 ,0.000000};
-static float N073[3] = {0.000000 ,1.000000 ,0.000000};
-static float N074[3] = {0.000000 ,1.000000 ,0.000000};
-static float N075[3] = {0.031220 ,0.999025 ,-0.031220};
-static float N076[3] = {0.000000 ,1.000000 ,0.000000};
-static float N077[3] = {0.446821 ,0.893642 ,0.041889};
-static float N078[3] = {0.863035 ,-0.100980 ,0.494949};
-static float N079[3] = {0.585597 ,-0.808215 ,0.062174};
-static float N080[3] = {0.000000 ,1.000000 ,0.000000};
-static float N081[3] = {1.000000 ,0.000000 ,0.000000};
-static float N082[3] = {0.000000 ,1.000000 ,0.000000};
-static float N083[3] = {-1.000000 ,0.000000 ,0.000000};
-static float N084[3] = {-0.478893 ,0.837129 ,-0.264343};
-static float N085[3] = {0.000000 ,1.000000 ,0.000000};
-static float N086[3] = {0.763909 ,0.539455 ,-0.354163};
-static float N087[3] = {0.446821 ,0.893642 ,0.041889};
-static float N088[3] = {0.385134 ,-0.908288 ,0.163352};
-static float N089[3] = {-0.605952 ,0.779253 ,-0.159961};
-static float N090[3] = {0.000000 ,1.000000 ,0.000000};
-static float N091[3] = {0.000000 ,1.000000 ,0.000000};
-static float N092[3] = {0.000000 ,1.000000 ,0.000000};
-static float N093[3] = {0.000000 ,1.000000 ,0.000000};
-static float N094[3] = {1.000000 ,0.000000 ,0.000000};
-static float N095[3] = {-1.000000 ,0.000000 ,0.000000};
-static float N096[3] = {0.644444 ,-0.621516 ,0.445433};
-static float N097[3] = {-0.760896 ,-0.474416 ,0.442681};
-static float N098[3] = {0.636888 ,-0.464314 ,0.615456};
-static float N099[3] = {-0.710295 ,0.647038 ,0.277168};
-static float N100[3] = {0.009604 ,0.993655 ,0.112063};
-static float iP001[3] = {18.74, 13.19, 3.76};
-static float P001[3] = {18.74, 13.19, 3.76};
-static float P002[3] = {0.00, 390.42, 10292.57};
-static float P003[3] = {55.80, 622.31, 8254.35};
-static float P004[3] = {20.80, 247.66, 10652.13};
-static float P005[3] = {487.51, 198.05, 9350.78};
-static float P006[3] = {-457.61, 199.04, 9353.01};
-static float P008[3] = {-34.67, 247.64, 10663.71};
-static float iP009[3] = {97.46, 67.63, 593.82};
-static float iP010[3] = {-84.33, 67.63, 588.18};
-static float iP011[3] = {118.69, 8.98, -66.91};
-static float P009[3] = {97.46, 67.63, 593.82};
-static float P010[3] = {-84.33, 67.63, 588.18};
-static float P011[3] = {118.69, 8.98, -66.91};
-static float iP012[3] = {156.48, -31.95, 924.54};
-static float iP013[3] = {162.00, 110.22, 924.54};
-static float iP014[3] = {88.16, 221.65, 924.54};
-static float iP015[3] = {-65.21, 231.16, 924.54};
-static float iP016[3] = {-156.48, 121.97, 924.54};
-static float iP017[3] = {-162.00, -23.93, 924.54};
-static float iP018[3] = {-88.16, -139.10, 924.54};
-static float iP019[3] = {65.21, -148.61, 924.54};
-static float iP020[3] = {246.87, -98.73, 1783.04};
-static float iP021[3] = {253.17, 127.76, 1783.04};
-static float iP022[3] = {132.34, 270.77, 1783.04};
-static float iP023[3] = {-97.88, 285.04, 1783.04};
-static float iP024[3] = {-222.97, 139.80, 1783.04};
-static float iP025[3] = {-225.29, -86.68, 1783.04};
-static float iP026[3] = {-108.44, -224.15, 1783.04};
-static float iP027[3] = {97.88, -221.56, 1783.04};
-static float iP028[3] = {410.55, -200.66, 3213.87};
-static float iP029[3] = {432.19, 148.42, 3213.87};
-static float iP030[3] = {200.66, 410.55, 3213.87};
-static float iP031[3] = {-148.42, 432.19, 3213.87};
-static float iP032[3] = {-407.48, 171.88, 3213.87};
-static float iP033[3] = {-432.19, -148.42, 3213.87};
-static float iP034[3] = {-148.88, -309.74, 3213.87};
-static float iP035[3] = {156.38, -320.17, 3213.87};
-static float iP036[3] = {523.39, -303.81, 4424.57};
-static float iP037[3] = {574.66, 276.84, 4424.57};
-static float iP038[3] = {243.05, 492.50, 4424.57};
-static float iP039[3] = {-191.23, 520.13, 4424.57};
-static float iP040[3] = {-523.39, 304.01, 4424.57};
-static float iP041[3] = {-574.66, -231.83, 4424.57};
-static float iP042[3] = {-266.95, -578.17, 4424.57};
-static float iP043[3] = {211.14, -579.67, 4424.57};
-static float iP044[3] = {680.57, -370.27, 5943.46};
-static float iP045[3] = {834.01, 363.09, 5943.46};
-static float iP046[3] = {371.29, 614.13, 5943.46};
-static float iP047[3] = {-291.43, 621.86, 5943.46};
-static float iP048[3] = {-784.13, 362.60, 5943.46};
-static float iP049[3] = {-743.29, -325.82, 5943.46};
-static float iP050[3] = {-383.24, -804.77, 5943.46};
-static float iP051[3] = {283.47, -846.09, 5943.46};
-static float P012[3] = {156.48, -31.95, 924.54};
-static float P013[3] = {162.00, 110.22, 924.54};
-static float P014[3] = {88.16, 221.65, 924.54};
-static float P015[3] = {-65.21, 231.16, 924.54};
-static float P016[3] = {-156.48, 121.97, 924.54};
-static float P017[3] = {-162.00, -23.93, 924.54};
-static float P018[3] = {-88.16, -139.10, 924.54};
-static float P019[3] = {65.21, -148.61, 924.54};
-static float P020[3] = {246.87, -98.73, 1783.04};
-static float P021[3] = {253.17, 127.76, 1783.04};
-static float P022[3] = {132.34, 270.77, 1783.04};
-static float P023[3] = {-97.88, 285.04, 1783.04};
-static float P024[3] = {-222.97, 139.80, 1783.04};
-static float P025[3] = {-225.29, -86.68, 1783.04};
-static float P026[3] = {-108.44, -224.15, 1783.04};
-static float P027[3] = {97.88, -221.56, 1783.04};
-static float P028[3] = {410.55, -200.66, 3213.87};
-static float P029[3] = {432.19, 148.42, 3213.87};
-static float P030[3] = {200.66, 410.55, 3213.87};
-static float P031[3] = {-148.42, 432.19, 3213.87};
-static float P032[3] = {-407.48, 171.88, 3213.87};
-static float P033[3] = {-432.19, -148.42, 3213.87};
-static float P034[3] = {-148.88, -309.74, 3213.87};
-static float P035[3] = {156.38, -320.17, 3213.87};
-static float P036[3] = {523.39, -303.81, 4424.57};
-static float P037[3] = {574.66, 276.84, 4424.57};
-static float P038[3] = {243.05, 492.50, 4424.57};
-static float P039[3] = {-191.23, 520.13, 4424.57};
-static float P040[3] = {-523.39, 304.01, 4424.57};
-static float P041[3] = {-574.66, -231.83, 4424.57};
-static float P042[3] = {-266.95, -578.17, 4424.57};
-static float P043[3] = {211.14, -579.67, 4424.57};
-static float P044[3] = {680.57, -370.27, 5943.46};
-static float P045[3] = {834.01, 363.09, 5943.46};
-static float P046[3] = {371.29, 614.13, 5943.46};
-static float P047[3] = {-291.43, 621.86, 5943.46};
-static float P048[3] = {-784.13, 362.60, 5943.46};
-static float P049[3] = {-743.29, -325.82, 5943.46};
-static float P050[3] = {-383.24, -804.77, 5943.46};
-static float P051[3] = {283.47, -846.09, 5943.46};
-static float P052[3] = {599.09, -332.24, 7902.59};
-static float P053[3] = {735.48, 306.26, 7911.92};
-static float P054[3] = {321.55, 558.53, 7902.59};
-static float P055[3] = {-260.54, 559.84, 7902.59};
-static float P056[3] = {-698.66, 320.83, 7902.59};
-static float P057[3] = {-643.29, -299.16, 7902.59};
-static float P058[3] = {-341.47, -719.30, 7902.59};
-static float P059[3] = {252.57, -756.12, 7902.59};
-static float P060[3] = {458.39, -265.31, 9355.44};
-static float P062[3] = {224.04, 438.98, 9364.77};
-static float P063[3] = {-165.71, 441.27, 9355.44};
-static float P065[3] = {-473.99, -219.71, 9355.44};
-static float P066[3] = {-211.97, -479.87, 9355.44};
-static float P067[3] = {192.86, -504.03, 9355.44};
-static float iP068[3] = {-112.44, 9.25, -64.42};
-static float iP069[3] = {1155.63, 0.00, -182.46};
-static float iP070[3] = {-1143.13, 0.00, -181.54};
-static float iP071[3] = {1424.23, 0.00, -322.09};
-static float iP072[3] = {-1368.01, 0.00, -310.38};
-static float iP073[3] = {1255.57, 2.31, 114.05};
-static float iP074[3] = {-1149.38, 0.00, 117.12};
-static float iP075[3] = {718.36, 0.00, 433.36};
-static float iP076[3] = {-655.90, 0.00, 433.36};
-static float P068[3] = {-112.44, 9.25, -64.42};
-static float P069[3] = {1155.63, 0.00, -182.46};
-static float P070[3] = {-1143.13, 0.00, -181.54};
-static float P071[3] = {1424.23, 0.00, -322.09};
-static float P072[3] = {-1368.01, 0.00, -310.38};
-static float P073[3] = {1255.57, 2.31, 114.05};
-static float P074[3] = {-1149.38, 0.00, 117.12};
-static float P075[3] = {718.36, 0.00, 433.36};
-static float P076[3] = {-655.90, 0.00, 433.36};
-static float P077[3] = {1058.00, -2.66, 7923.51};
-static float P078[3] = {-1016.51, -15.47, 7902.87};
-static float P079[3] = {-1363.99, -484.50, 7593.38};
-static float P080[3] = {1478.09, -861.47, 7098.12};
-static float P081[3] = {1338.06, -284.68, 7024.15};
-static float P082[3] = {-1545.51, -860.64, 7106.60};
-static float P083[3] = {1063.19, -70.46, 7466.60};
-static float P084[3] = {-1369.18, -288.11, 7015.34};
-static float P085[3] = {1348.44, -482.50, 7591.41};
-static float P086[3] = {-1015.45, -96.80, 7474.86};
-static float P087[3] = {731.04, 148.38, 7682.58};
-static float P088[3] = {-697.03, 151.82, 7668.81};
-static float P089[3] = {-686.82, 157.09, 7922.29};
-static float P090[3] = {724.73, 147.75, 7931.39};
-static float iP091[3] = {0.00, 327.10, 2346.55};
-static float iP092[3] = {0.00, 552.28, 2311.31};
-static float iP093[3] = {0.00, 721.16, 2166.41};
-static float iP094[3] = {0.00, 693.42, 2388.80};
-static float iP095[3] = {0.00, 389.44, 2859.97};
-static float P091[3] = {0.00, 327.10, 2346.55};
-static float P092[3] = {0.00, 552.28, 2311.31};
-static float P093[3] = {0.00, 721.16, 2166.41};
-static float P094[3] = {0.00, 693.42, 2388.80};
-static float P095[3] = {0.00, 389.44, 2859.97};
-static float iP096[3] = {222.02, -183.67, 10266.89};
-static float iP097[3] = {-128.90, -182.70, 10266.89};
-static float iP098[3] = {41.04, 88.31, 10659.36};
-static float iP099[3] = {-48.73, 88.30, 10659.36};
-static float P096[3] = {222.02, -183.67, 10266.89};
-static float P097[3] = {-128.90, -182.70, 10266.89};
-static float P098[3] = {41.04, 88.31, 10659.36};
-static float P099[3] = {-48.73, 88.30, 10659.36};
-static float P100[3] = {0.00, 603.42, 9340.68};
-static float P104[3] = {-9.86, 567.62, 7858.65};
-static float P105[3] = {31.96, 565.27, 7908.46};
-static float P106[3] = {22.75, 568.13, 7782.83};
-static float P107[3] = {58.93, 568.42, 7775.94};
-static float P108[3] = {55.91, 565.59, 7905.86};
-static float P109[3] = {99.21, 566.00, 7858.65};
-static float P110[3] = {-498.83, 148.14, 9135.10};
-static float P111[3] = {-495.46, 133.24, 9158.48};
-static float P112[3] = {-490.82, 146.23, 9182.76};
-static float P113[3] = {-489.55, 174.11, 9183.66};
-static float P114[3] = {-492.92, 189.00, 9160.28};
-static float P115[3] = {-497.56, 176.02, 9136.00};
-static float P116[3] = {526.54, 169.68, 9137.70};
-static float P117[3] = {523.49, 184.85, 9161.42};
-static float P118[3] = {518.56, 171.78, 9186.06};
-static float P119[3] = {516.68, 143.53, 9186.98};
-static float P120[3] = {519.73, 128.36, 9163.26};
-static float P121[3] = {524.66, 141.43, 9138.62};
-/* *INDENT-ON* */
-
-void
-Whale001(void)
-{
-
-    glBegin(GL_POLYGON);
-    glNormal3fv(N001);
-    glVertex3fv(P001);
-    glNormal3fv(N068);
-    glVertex3fv(P068);
-    glNormal3fv(N010);
-    glVertex3fv(P010);
-    glEnd();
-    glBegin(GL_POLYGON);
-    glNormal3fv(N068);
-    glVertex3fv(P068);
-    glNormal3fv(N076);
-    glVertex3fv(P076);
-    glNormal3fv(N010);
-    glVertex3fv(P010);
-    glEnd();
-    glBegin(GL_POLYGON);
-    glNormal3fv(N068);
-    glVertex3fv(P068);
-    glNormal3fv(N070);
-    glVertex3fv(P070);
-    glNormal3fv(N076);
-    glVertex3fv(P076);
-    glEnd();
-    glBegin(GL_POLYGON);
-    glNormal3fv(N076);
-    glVertex3fv(P076);
-    glNormal3fv(N070);
-    glVertex3fv(P070);
-    glNormal3fv(N074);
-    glVertex3fv(P074);
-    glEnd();
-    glBegin(GL_POLYGON);
-    glNormal3fv(N070);
-    glVertex3fv(P070);
-    glNormal3fv(N072);
-    glVertex3fv(P072);
-    glNormal3fv(N074);
-    glVertex3fv(P074);
-    glEnd();
-    glBegin(GL_POLYGON);
-    glNormal3fv(N072);
-    glVertex3fv(P072);
-    glNormal3fv(N070);
-    glVertex3fv(P070);
-    glNormal3fv(N074);
-    glVertex3fv(P074);
-    glEnd();
-    glBegin(GL_POLYGON);
-    glNormal3fv(N074);
-    glVertex3fv(P074);
-    glNormal3fv(N070);
-    glVertex3fv(P070);
-    glNormal3fv(N076);
-    glVertex3fv(P076);
-    glEnd();
-    glBegin(GL_POLYGON);
-    glNormal3fv(N070);
-    glVertex3fv(P070);
-    glNormal3fv(N068);
-    glVertex3fv(P068);
-    glNormal3fv(N076);
-    glVertex3fv(P076);
-    glEnd();
-    glBegin(GL_POLYGON);
-    glNormal3fv(N076);
-    glVertex3fv(P076);
-    glNormal3fv(N068);
-    glVertex3fv(P068);
-    glNormal3fv(N010);
-    glVertex3fv(P010);
-    glEnd();
-    glBegin(GL_POLYGON);
-    glNormal3fv(N068);
-    glVertex3fv(P068);
-    glNormal3fv(N001);
-    glVertex3fv(P001);
-    glNormal3fv(N010);
-    glVertex3fv(P010);
-    glEnd();
-}
-
-void
-Whale002(void)
-{
-    glBegin(GL_POLYGON);
-    glNormal3fv(N011);
-    glVertex3fv(P011);
-    glNormal3fv(N001);
-    glVertex3fv(P001);
-    glNormal3fv(N009);
-    glVertex3fv(P009);
-    glEnd();
-    glBegin(GL_POLYGON);
-    glNormal3fv(N075);
-    glVertex3fv(P075);
-    glNormal3fv(N011);
-    glVertex3fv(P011);
-    glNormal3fv(N009);
-    glVertex3fv(P009);
-    glEnd();
-    glBegin(GL_POLYGON);
-    glNormal3fv(N069);
-    glVertex3fv(P069);
-    glNormal3fv(N011);
-    glVertex3fv(P011);
-    glNormal3fv(N075);
-    glVertex3fv(P075);
-    glEnd();
-    glBegin(GL_POLYGON);
-    glNormal3fv(N069);
-    glVertex3fv(P069);
-    glNormal3fv(N075);
-    glVertex3fv(P075);
-    glNormal3fv(N073);
-    glVertex3fv(P073);
-    glEnd();
-    glBegin(GL_POLYGON);
-    glNormal3fv(N071);
-    glVertex3fv(P071);
-    glNormal3fv(N069);
-    glVertex3fv(P069);
-    glNormal3fv(N073);
-    glVertex3fv(P073);
-    glEnd();
-    glBegin(GL_POLYGON);
-    glNormal3fv(N001);
-    glVertex3fv(P001);
-    glNormal3fv(N011);
-    glVertex3fv(P011);
-    glNormal3fv(N009);
-    glVertex3fv(P009);
-    glEnd();
-    glBegin(GL_POLYGON);
-    glNormal3fv(N009);
-    glVertex3fv(P009);
-    glNormal3fv(N011);
-    glVertex3fv(P011);
-    glNormal3fv(N075);
-    glVertex3fv(P075);
-    glEnd();
-    glBegin(GL_POLYGON);
-    glNormal3fv(N011);
-    glVertex3fv(P011);
-    glNormal3fv(N069);
-    glVertex3fv(P069);
-    glNormal3fv(N075);
-    glVertex3fv(P075);
-    glEnd();
-    glBegin(GL_POLYGON);
-    glNormal3fv(N069);
-    glVertex3fv(P069);
-    glNormal3fv(N073);
-    glVertex3fv(P073);
-    glNormal3fv(N075);
-    glVertex3fv(P075);
-    glEnd();
-    glBegin(GL_POLYGON);
-    glNormal3fv(N069);
-    glVertex3fv(P069);
-    glNormal3fv(N071);
-    glVertex3fv(P071);
-    glNormal3fv(N073);
-    glVertex3fv(P073);
-    glEnd();
-}
-
-void
-Whale003(void)
-{
-    glBegin(GL_POLYGON);
-    glNormal3fv(N018);
-    glVertex3fv(P018);
-    glNormal3fv(N001);
-    glVertex3fv(P001);
-    glNormal3fv(N019);
-    glVertex3fv(P019);
-    glEnd();
-    glBegin(GL_POLYGON);
-    glNormal3fv(N019);
-    glVertex3fv(P019);
-    glNormal3fv(N001);
-    glVertex3fv(P001);
-    glNormal3fv(N012);
-    glVertex3fv(P012);
-    glEnd();
-    glBegin(GL_POLYGON);
-    glNormal3fv(N017);
-    glVertex3fv(P017);
-    glNormal3fv(N001);
-    glVertex3fv(P001);
-    glNormal3fv(N018);
-    glVertex3fv(P018);
-    glEnd();
-    glBegin(GL_POLYGON);
-    glNormal3fv(N001);
-    glVertex3fv(P001);
-    glNormal3fv(N017);
-    glVertex3fv(P017);
-    glNormal3fv(N016);
-    glVertex3fv(P016);
-    glEnd();
-    glBegin(GL_POLYGON);
-    glNormal3fv(N001);
-    glVertex3fv(P001);
-    glNormal3fv(N013);
-    glVertex3fv(P013);
-    glNormal3fv(N012);
-    glVertex3fv(P012);
-    glEnd();
-    glBegin(GL_POLYGON);
-    glNormal3fv(N001);
-    glVertex3fv(P001);
-    glNormal3fv(N016);
-    glVertex3fv(P016);
-    glNormal3fv(N015);
-    glVertex3fv(P015);
-    glEnd();
-    glBegin(GL_POLYGON);
-    glNormal3fv(N001);
-    glVertex3fv(P001);
-    glNormal3fv(N014);
-    glVertex3fv(P014);
-    glNormal3fv(N013);
-    glVertex3fv(P013);
-    glEnd();
-    glBegin(GL_POLYGON);
-    glNormal3fv(N001);
-    glVertex3fv(P001);
-    glNormal3fv(N015);
-    glVertex3fv(P015);
-    glNormal3fv(N014);
-    glVertex3fv(P014);
-    glEnd();
-}
-
-void
-Whale004(void)
-{
-    glBegin(GL_POLYGON);
-    glNormal3fv(N014);
-    glVertex3fv(P014);
-    glNormal3fv(N015);
-    glVertex3fv(P015);
-    glNormal3fv(N023);
-    glVertex3fv(P023);
-    glNormal3fv(N022);
-    glVertex3fv(P022);
-    glEnd();
-    glBegin(GL_POLYGON);
-    glNormal3fv(N015);
-    glVertex3fv(P015);
-    glNormal3fv(N016);
-    glVertex3fv(P016);
-    glNormal3fv(N024);
-    glVertex3fv(P024);
-    glNormal3fv(N023);
-    glVertex3fv(P023);
-    glEnd();
-    glBegin(GL_POLYGON);
-    glNormal3fv(N016);
-    glVertex3fv(P016);
-    glNormal3fv(N017);
-    glVertex3fv(P017);
-    glNormal3fv(N025);
-    glVertex3fv(P025);
-    glNormal3fv(N024);
-    glVertex3fv(P024);
-    glEnd();
-    glBegin(GL_POLYGON);
-    glNormal3fv(N017);
-    glVertex3fv(P017);
-    glNormal3fv(N018);
-    glVertex3fv(P018);
-    glNormal3fv(N026);
-    glVertex3fv(P026);
-    glNormal3fv(N025);
-    glVertex3fv(P025);
-    glEnd();
-    glBegin(GL_POLYGON);
-    glNormal3fv(N013);
-    glVertex3fv(P013);
-    glNormal3fv(N014);
-    glVertex3fv(P014);
-    glNormal3fv(N022);
-    glVertex3fv(P022);
-    glNormal3fv(N021);
-    glVertex3fv(P021);
-    glEnd();
-    glBegin(GL_POLYGON);
-    glNormal3fv(N012);
-    glVertex3fv(P012);
-    glNormal3fv(N013);
-    glVertex3fv(P013);
-    glNormal3fv(N021);
-    glVertex3fv(P021);
-    glNormal3fv(N020);
-    glVertex3fv(P020);
-    glEnd();
-    glBegin(GL_POLYGON);
-    glNormal3fv(N018);
-    glVertex3fv(P018);
-    glNormal3fv(N019);
-    glVertex3fv(P019);
-    glNormal3fv(N027);
-    glVertex3fv(P027);
-    glNormal3fv(N026);
-    glVertex3fv(P026);
-    glEnd();
-    glBegin(GL_POLYGON);
-    glNormal3fv(N019);
-    glVertex3fv(P019);
-    glNormal3fv(N012);
-    glVertex3fv(P012);
-    glNormal3fv(N020);
-    glVertex3fv(P020);
-    glNormal3fv(N027);
-    glVertex3fv(P027);
-    glEnd();
-}
-
-void
-Whale005(void)
-{
-    glBegin(GL_POLYGON);
-    glNormal3fv(N022);
-    glVertex3fv(P022);
-    glNormal3fv(N023);
-    glVertex3fv(P023);
-    glNormal3fv(N031);
-    glVertex3fv(P031);
-    glNormal3fv(N030);
-    glVertex3fv(P030);
-    glEnd();
-    glBegin(GL_POLYGON);
-    glNormal3fv(N021);
-    glVertex3fv(P021);
-    glNormal3fv(N022);
-    glVertex3fv(P022);
-    glNormal3fv(N030);
-    glVertex3fv(P030);
-    glEnd();
-    glBegin(GL_POLYGON);
-    glNormal3fv(N021);
-    glVertex3fv(P021);
-    glNormal3fv(N030);
-    glVertex3fv(P030);
-    glNormal3fv(N029);
-    glVertex3fv(P029);
-    glEnd();
-    glBegin(GL_POLYGON);
-    glNormal3fv(N023);
-    glVertex3fv(P023);
-    glNormal3fv(N024);
-    glVertex3fv(P024);
-    glNormal3fv(N031);
-    glVertex3fv(P031);
-    glEnd();
-    glBegin(GL_POLYGON);
-    glNormal3fv(N024);
-    glVertex3fv(P024);
-    glNormal3fv(N032);
-    glVertex3fv(P032);
-    glNormal3fv(N031);
-    glVertex3fv(P031);
-    glEnd();
-    glBegin(GL_POLYGON);
-    glNormal3fv(N024);
-    glVertex3fv(P024);
-    glNormal3fv(N025);
-    glVertex3fv(P025);
-    glNormal3fv(N032);
-    glVertex3fv(P032);
-    glEnd();
-    glBegin(GL_POLYGON);
-    glNormal3fv(N025);
-    glVertex3fv(P025);
-    glNormal3fv(N033);
-    glVertex3fv(P033);
-    glNormal3fv(N032);
-    glVertex3fv(P032);
-    glEnd();
-    glBegin(GL_POLYGON);
-    glNormal3fv(N020);
-    glVertex3fv(P020);
-    glNormal3fv(N021);
-    glVertex3fv(P021);
-    glNormal3fv(N029);
-    glVertex3fv(P029);
-    glEnd();
-    glBegin(GL_POLYGON);
-    glNormal3fv(N020);
-    glVertex3fv(P020);
-    glNormal3fv(N029);
-    glVertex3fv(P029);
-    glNormal3fv(N028);
-    glVertex3fv(P028);
-    glEnd();
-    glBegin(GL_POLYGON);
-    glNormal3fv(N027);
-    glVertex3fv(P027);
-    glNormal3fv(N020);
-    glVertex3fv(P020);
-    glNormal3fv(N028);
-    glVertex3fv(P028);
-    glEnd();
-    glBegin(GL_POLYGON);
-    glNormal3fv(N027);
-    glVertex3fv(P027);
-    glNormal3fv(N028);
-    glVertex3fv(P028);
-    glNormal3fv(N035);
-    glVertex3fv(P035);
-    glEnd();
-    glBegin(GL_POLYGON);
-    glNormal3fv(N025);
-    glVertex3fv(P025);
-    glNormal3fv(N026);
-    glVertex3fv(P026);
-    glNormal3fv(N033);
-    glVertex3fv(P033);
-    glEnd();
-    glBegin(GL_POLYGON);
-    glNormal3fv(N033);
-    glVertex3fv(P033);
-    glNormal3fv(N026);
-    glVertex3fv(P026);
-    glNormal3fv(N034);
-    glVertex3fv(P034);
-    glEnd();
-    glBegin(GL_POLYGON);
-    glNormal3fv(N026);
-    glVertex3fv(P026);
-    glNormal3fv(N027);
-    glVertex3fv(P027);
-    glNormal3fv(N035);
-    glVertex3fv(P035);
-    glNormal3fv(N034);
-    glVertex3fv(P034);
-    glEnd();
-}
-
-void
-Whale006(void)
-{
-    glBegin(GL_POLYGON);
-    glNormal3fv(N092);
-    glVertex3fv(P092);
-    glNormal3fv(N093);
-    glVertex3fv(P093);
-    glNormal3fv(N094);
-    glVertex3fv(P094);
-    glEnd();
-    glBegin(GL_POLYGON);
-    glNormal3fv(N093);
-    glVertex3fv(P093);
-    glNormal3fv(N092);
-    glVertex3fv(P092);
-    glNormal3fv(N094);
-    glVertex3fv(P094);
-    glEnd();
-    glBegin(GL_POLYGON);
-    glNormal3fv(N092);
-    glVertex3fv(P092);
-    glNormal3fv(N091);
-    glVertex3fv(P091);
-    glNormal3fv(N095);
-    glVertex3fv(P095);
-    glNormal3fv(N094);
-    glVertex3fv(P094);
-    glEnd();
-    glBegin(GL_POLYGON);
-    glNormal3fv(N091);
-    glVertex3fv(P091);
-    glNormal3fv(N092);
-    glVertex3fv(P092);
-    glNormal3fv(N094);
-    glVertex3fv(P094);
-    glNormal3fv(N095);
-    glVertex3fv(P095);
-    glEnd();
-}
-
-void
-Whale007(void)
-{
-    glBegin(GL_POLYGON);
-    glNormal3fv(N030);
-    glVertex3fv(P030);
-    glNormal3fv(N031);
-    glVertex3fv(P031);
-    glNormal3fv(N039);
-    glVertex3fv(P039);
-    glNormal3fv(N038);
-    glVertex3fv(P038);
-    glEnd();
-    glBegin(GL_POLYGON);
-    glNormal3fv(N029);
-    glVertex3fv(P029);
-    glNormal3fv(N030);
-    glVertex3fv(P030);
-    glNormal3fv(N038);
-    glVertex3fv(P038);
-    glEnd();
-    glBegin(GL_POLYGON);
-    glNormal3fv(N029);
-    glVertex3fv(P029);
-    glNormal3fv(N038);
-    glVertex3fv(P038);
-    glNormal3fv(N037);
-    glVertex3fv(P037);
-    glEnd();
-    glBegin(GL_POLYGON);
-    glNormal3fv(N028);
-    glVertex3fv(P028);
-    glNormal3fv(N029);
-    glVertex3fv(P029);
-    glNormal3fv(N037);
-    glVertex3fv(P037);
-    glEnd();
-    glBegin(GL_POLYGON);
-    glNormal3fv(N028);
-    glVertex3fv(P028);
-    glNormal3fv(N037);
-    glVertex3fv(P037);
-    glNormal3fv(N036);
-    glVertex3fv(P036);
-    glEnd();
-    glBegin(GL_POLYGON);
-    glNormal3fv(N035);
-    glVertex3fv(P035);
-    glNormal3fv(N028);
-    glVertex3fv(P028);
-    glNormal3fv(N036);
-    glVertex3fv(P036);
-    glEnd();
-    glBegin(GL_POLYGON);
-    glNormal3fv(N035);
-    glVertex3fv(P035);
-    glNormal3fv(N036);
-    glVertex3fv(P036);
-    glNormal3fv(N043);
-    glVertex3fv(P043);
-    glEnd();
-    glBegin(GL_POLYGON);
-    glNormal3fv(N034);
-    glVertex3fv(P034);
-    glNormal3fv(N035);
-    glVertex3fv(P035);
-    glNormal3fv(N043);
-    glVertex3fv(P043);
-    glNormal3fv(N042);
-    glVertex3fv(P042);
-    glEnd();
-    glBegin(GL_POLYGON);
-    glNormal3fv(N033);
-    glVertex3fv(P033);
-    glNormal3fv(N034);
-    glVertex3fv(P034);
-    glNormal3fv(N042);
-    glVertex3fv(P042);
-    glEnd();
-    glBegin(GL_POLYGON);
-    glNormal3fv(N033);
-    glVertex3fv(P033);
-    glNormal3fv(N042);
-    glVertex3fv(P042);
-    glNormal3fv(N041);
-    glVertex3fv(P041);
-    glEnd();
-    glBegin(GL_POLYGON);
-    glNormal3fv(N031);
-    glVertex3fv(P031);
-    glNormal3fv(N032);
-    glVertex3fv(P032);
-    glNormal3fv(N039);
-    glVertex3fv(P039);
-    glEnd();
-    glBegin(GL_POLYGON);
-    glNormal3fv(N039);
-    glVertex3fv(P039);
-    glNormal3fv(N032);
-    glVertex3fv(P032);
-    glNormal3fv(N040);
-    glVertex3fv(P040);
-    glEnd();
-    glBegin(GL_POLYGON);
-    glNormal3fv(N032);
-    glVertex3fv(P032);
-    glNormal3fv(N033);
-    glVertex3fv(P033);
-    glNormal3fv(N040);
-    glVertex3fv(P040);
-    glEnd();
-    glBegin(GL_POLYGON);
-    glNormal3fv(N040);
-    glVertex3fv(P040);
-    glNormal3fv(N033);
-    glVertex3fv(P033);
-    glNormal3fv(N041);
-    glVertex3fv(P041);
-    glEnd();
-}
-
-void
-Whale008(void)
-{
-    glBegin(GL_POLYGON);
-    glNormal3fv(N042);
-    glVertex3fv(P042);
-    glNormal3fv(N043);
-    glVertex3fv(P043);
-    glNormal3fv(N051);
-    glVertex3fv(P051);
-    glNormal3fv(N050);
-    glVertex3fv(P050);
-    glEnd();
-    glBegin(GL_POLYGON);
-    glNormal3fv(N043);
-    glVertex3fv(P043);
-    glNormal3fv(N036);
-    glVertex3fv(P036);
-    glNormal3fv(N051);
-    glVertex3fv(P051);
-    glEnd();
-    glBegin(GL_POLYGON);
-    glNormal3fv(N051);
-    glVertex3fv(P051);
-    glNormal3fv(N036);
-    glVertex3fv(P036);
-    glNormal3fv(N044);
-    glVertex3fv(P044);
-    glEnd();
-    glBegin(GL_POLYGON);
-    glNormal3fv(N041);
-    glVertex3fv(P041);
-    glNormal3fv(N042);
-    glVertex3fv(P042);
-    glNormal3fv(N050);
-    glVertex3fv(P050);
-    glEnd();
-    glBegin(GL_POLYGON);
-    glNormal3fv(N041);
-    glVertex3fv(P041);
-    glNormal3fv(N050);
-    glVertex3fv(P050);
-    glNormal3fv(N049);
-    glVertex3fv(P049);
-    glEnd();
-    glBegin(GL_POLYGON);
-    glNormal3fv(N036);
-    glVertex3fv(P036);
-    glNormal3fv(N037);
-    glVertex3fv(P037);
-    glNormal3fv(N044);
-    glVertex3fv(P044);
-    glEnd();
-    glBegin(GL_POLYGON);
-    glNormal3fv(N044);
-    glVertex3fv(P044);
-    glNormal3fv(N037);
-    glVertex3fv(P037);
-    glNormal3fv(N045);
-    glVertex3fv(P045);
-    glEnd();
-    glBegin(GL_POLYGON);
-    glNormal3fv(N040);
-    glVertex3fv(P040);
-    glNormal3fv(N041);
-    glVertex3fv(P041);
-    glNormal3fv(N049);
-    glVertex3fv(P049);
-    glEnd();
-    glBegin(GL_POLYGON);
-    glNormal3fv(N040);
-    glVertex3fv(P040);
-    glNormal3fv(N049);
-    glVertex3fv(P049);
-    glNormal3fv(N048);
-    glVertex3fv(P048);
-    glEnd();
-    glBegin(GL_POLYGON);
-    glNormal3fv(N039);
-    glVertex3fv(P039);
-    glNormal3fv(N040);
-    glVertex3fv(P040);
-    glNormal3fv(N048);
-    glVertex3fv(P048);
-    glEnd();
-    glBegin(GL_POLYGON);
-    glNormal3fv(N039);
-    glVertex3fv(P039);
-    glNormal3fv(N048);
-    glVertex3fv(P048);
-    glNormal3fv(N047);
-    glVertex3fv(P047);
-    glEnd();
-    glBegin(GL_POLYGON);
-    glNormal3fv(N037);
-    glVertex3fv(P037);
-    glNormal3fv(N038);
-    glVertex3fv(P038);
-    glNormal3fv(N045);
-    glVertex3fv(P045);
-    glEnd();
-    glBegin(GL_POLYGON);
-    glNormal3fv(N038);
-    glVertex3fv(P038);
-    glNormal3fv(N046);
-    glVertex3fv(P046);
-    glNormal3fv(N045);
-    glVertex3fv(P045);
-    glEnd();
-    glBegin(GL_POLYGON);
-    glNormal3fv(N038);
-    glVertex3fv(P038);
-    glNormal3fv(N039);
-    glVertex3fv(P039);
-    glNormal3fv(N047);
-    glVertex3fv(P047);
-    glNormal3fv(N046);
-    glVertex3fv(P046);
-    glEnd();
-}
-
-void
-Whale009(void)
-{
-    glBegin(GL_POLYGON);
-    glNormal3fv(N050);
-    glVertex3fv(P050);
-    glNormal3fv(N051);
-    glVertex3fv(P051);
-    glNormal3fv(N059);
-    glVertex3fv(P059);
-    glNormal3fv(N058);
-    glVertex3fv(P058);
-    glEnd();
-    glBegin(GL_POLYGON);
-    glNormal3fv(N051);
-    glVertex3fv(P051);
-    glNormal3fv(N044);
-    glVertex3fv(P044);
-    glNormal3fv(N059);
-    glVertex3fv(P059);
-    glEnd();
-    glBegin(GL_POLYGON);
-    glNormal3fv(N059);
-    glVertex3fv(P059);
-    glNormal3fv(N044);
-    glVertex3fv(P044);
-    glNormal3fv(N052);
-    glVertex3fv(P052);
-    glEnd();
-    glBegin(GL_POLYGON);
-    glNormal3fv(N044);
-    glVertex3fv(P044);
-    glNormal3fv(N045);
-    glVertex3fv(P045);
-    glNormal3fv(N053);
-    glVertex3fv(P053);
-    glEnd();
-    glBegin(GL_POLYGON);
-    glNormal3fv(N044);
-    glVertex3fv(P044);
-    glNormal3fv(N053);
-    glVertex3fv(P053);
-    glNormal3fv(N052);
-    glVertex3fv(P052);
-    glEnd();
-    glBegin(GL_POLYGON);
-    glNormal3fv(N049);
-    glVertex3fv(P049);
-    glNormal3fv(N050);
-    glVertex3fv(P050);
-    glNormal3fv(N058);
-    glVertex3fv(P058);
-    glEnd();
-    glBegin(GL_POLYGON);
-    glNormal3fv(N049);
-    glVertex3fv(P049);
-    glNormal3fv(N058);
-    glVertex3fv(P058);
-    glNormal3fv(N057);
-    glVertex3fv(P057);
-    glEnd();
-    glBegin(GL_POLYGON);
-    glNormal3fv(N048);
-    glVertex3fv(P048);
-    glNormal3fv(N049);
-    glVertex3fv(P049);
-    glNormal3fv(N057);
-    glVertex3fv(P057);
-    glEnd();
-    glBegin(GL_POLYGON);
-    glNormal3fv(N048);
-    glVertex3fv(P048);
-    glNormal3fv(N057);
-    glVertex3fv(P057);
-    glNormal3fv(N056);
-    glVertex3fv(P056);
-    glEnd();
-    glBegin(GL_POLYGON);
-    glNormal3fv(N047);
-    glVertex3fv(P047);
-    glNormal3fv(N048);
-    glVertex3fv(P048);
-    glNormal3fv(N056);
-    glVertex3fv(P056);
-    glEnd();
-    glBegin(GL_POLYGON);
-    glNormal3fv(N047);
-    glVertex3fv(P047);
-    glNormal3fv(N056);
-    glVertex3fv(P056);
-    glNormal3fv(N055);
-    glVertex3fv(P055);
-    glEnd();
-    glBegin(GL_POLYGON);
-    glNormal3fv(N045);
-    glVertex3fv(P045);
-    glNormal3fv(N046);
-    glVertex3fv(P046);
-    glNormal3fv(N053);
-    glVertex3fv(P053);
-    glEnd();
-    glBegin(GL_POLYGON);
-    glNormal3fv(N046);
-    glVertex3fv(P046);
-    glNormal3fv(N054);
-    glVertex3fv(P054);
-    glNormal3fv(N053);
-    glVertex3fv(P053);
-    glEnd();
-    glBegin(GL_POLYGON);
-    glNormal3fv(N046);
-    glVertex3fv(P046);
-    glNormal3fv(N047);
-    glVertex3fv(P047);
-    glNormal3fv(N055);
-    glVertex3fv(P055);
-    glNormal3fv(N054);
-    glVertex3fv(P054);
-    glEnd();
-}
-
-void
-Whale010(void)
-{
-    glBegin(GL_POLYGON);
-    glNormal3fv(N080);
-    glVertex3fv(P080);
-    glNormal3fv(N081);
-    glVertex3fv(P081);
-    glNormal3fv(N085);
-    glVertex3fv(P085);
-    glEnd();
-    glBegin(GL_POLYGON);
-    glNormal3fv(N081);
-    glVertex3fv(P081);
-    glNormal3fv(N083);
-    glVertex3fv(P083);
-    glNormal3fv(N085);
-    glVertex3fv(P085);
-    glEnd();
-    glBegin(GL_POLYGON);
-    glNormal3fv(N085);
-    glVertex3fv(P085);
-    glNormal3fv(N083);
-    glVertex3fv(P083);
-    glNormal3fv(N077);
-    glVertex3fv(P077);
-    glEnd();
-    glBegin(GL_POLYGON);
-    glNormal3fv(N083);
-    glVertex3fv(P083);
-    glNormal3fv(N087);
-    glVertex3fv(P087);
-    glNormal3fv(N077);
-    glVertex3fv(P077);
-    glEnd();
-    glBegin(GL_POLYGON);
-    glNormal3fv(N077);
-    glVertex3fv(P077);
-    glNormal3fv(N087);
-    glVertex3fv(P087);
-    glNormal3fv(N090);
-    glVertex3fv(P090);
-    glEnd();
-    glBegin(GL_POLYGON);
-    glNormal3fv(N081);
-    glVertex3fv(P081);
-    glNormal3fv(N080);
-    glVertex3fv(P080);
-    glNormal3fv(N085);
-    glVertex3fv(P085);
-    glEnd();
-    glBegin(GL_POLYGON);
-    glNormal3fv(N083);
-    glVertex3fv(P083);
-    glNormal3fv(N081);
-    glVertex3fv(P081);
-    glNormal3fv(N085);
-    glVertex3fv(P085);
-    glEnd();
-    glBegin(GL_POLYGON);
-    glNormal3fv(N083);
-    glVertex3fv(P083);
-    glNormal3fv(N085);
-    glVertex3fv(P085);
-    glNormal3fv(N077);
-    glVertex3fv(P077);
-    glEnd();
-    glBegin(GL_POLYGON);
-    glNormal3fv(N087);
-    glVertex3fv(P087);
-    glNormal3fv(N083);
-    glVertex3fv(P083);
-    glNormal3fv(N077);
-    glVertex3fv(P077);
-    glEnd();
-    glBegin(GL_POLYGON);
-    glNormal3fv(N087);
-    glVertex3fv(P087);
-    glNormal3fv(N077);
-    glVertex3fv(P077);
-    glNormal3fv(N090);
-    glVertex3fv(P090);
-    glEnd();
-}
-
-void
-Whale011(void)
-{
-    glBegin(GL_POLYGON);
-    glNormal3fv(N082);
-    glVertex3fv(P082);
-    glNormal3fv(N084);
-    glVertex3fv(P084);
-    glNormal3fv(N079);
-    glVertex3fv(P079);
-    glEnd();
-    glBegin(GL_POLYGON);
-    glNormal3fv(N084);
-    glVertex3fv(P084);
-    glNormal3fv(N086);
-    glVertex3fv(P086);
-    glNormal3fv(N079);
-    glVertex3fv(P079);
-    glEnd();
-    glBegin(GL_POLYGON);
-    glNormal3fv(N079);
-    glVertex3fv(P079);
-    glNormal3fv(N086);
-    glVertex3fv(P086);
-    glNormal3fv(N078);
-    glVertex3fv(P078);
-    glEnd();
-    glBegin(GL_POLYGON);
-    glNormal3fv(N086);
-    glVertex3fv(P086);
-    glNormal3fv(N088);
-    glVertex3fv(P088);
-    glNormal3fv(N078);
-    glVertex3fv(P078);
-    glEnd();
-    glBegin(GL_POLYGON);
-    glNormal3fv(N078);
-    glVertex3fv(P078);
-    glNormal3fv(N088);
-    glVertex3fv(P088);
-    glNormal3fv(N089);
-    glVertex3fv(P089);
-    glEnd();
-    glBegin(GL_POLYGON);
-    glNormal3fv(N088);
-    glVertex3fv(P088);
-    glNormal3fv(N086);
-    glVertex3fv(P086);
-    glNormal3fv(N089);
-    glVertex3fv(P089);
-    glEnd();
-    glBegin(GL_POLYGON);
-    glNormal3fv(N089);
-    glVertex3fv(P089);
-    glNormal3fv(N086);
-    glVertex3fv(P086);
-    glNormal3fv(N078);
-    glVertex3fv(P078);
-    glEnd();
-    glBegin(GL_POLYGON);
-    glNormal3fv(N086);
-    glVertex3fv(P086);
-    glNormal3fv(N084);
-    glVertex3fv(P084);
-    glNormal3fv(N078);
-    glVertex3fv(P078);
-    glEnd();
-    glBegin(GL_POLYGON);
-    glNormal3fv(N078);
-    glVertex3fv(P078);
-    glNormal3fv(N084);
-    glVertex3fv(P084);
-    glNormal3fv(N079);
-    glVertex3fv(P079);
-    glEnd();
-    glBegin(GL_POLYGON);
-    glNormal3fv(N084);
-    glVertex3fv(P084);
-    glNormal3fv(N082);
-    glVertex3fv(P082);
-    glNormal3fv(N079);
-    glVertex3fv(P079);
-    glEnd();
-}
-
-void
-Whale012(void)
-{
-    glBegin(GL_POLYGON);
-    glNormal3fv(N058);
-    glVertex3fv(P058);
-    glNormal3fv(N059);
-    glVertex3fv(P059);
-    glNormal3fv(N067);
-    glVertex3fv(P067);
-    glNormal3fv(N066);
-    glVertex3fv(P066);
-    glEnd();
-    glBegin(GL_POLYGON);
-    glNormal3fv(N059);
-    glVertex3fv(P059);
-    glNormal3fv(N052);
-    glVertex3fv(P052);
-    glNormal3fv(N060);
-    glVertex3fv(P060);
-    glEnd();
-    glBegin(GL_POLYGON);
-    glNormal3fv(N059);
-    glVertex3fv(P059);
-    glNormal3fv(N060);
-    glVertex3fv(P060);
-    glNormal3fv(N067);
-    glVertex3fv(P067);
-    glEnd();
-    glBegin(GL_POLYGON);
-    glNormal3fv(N058);
-    glVertex3fv(P058);
-    glNormal3fv(N066);
-    glVertex3fv(P066);
-    glNormal3fv(N065);
-    glVertex3fv(P065);
-    glEnd();
-    glBegin(GL_POLYGON);
-    glNormal3fv(N058);
-    glVertex3fv(P058);
-    glNormal3fv(N065);
-    glVertex3fv(P065);
-    glNormal3fv(N057);
-    glVertex3fv(P057);
-    glEnd();
-    glBegin(GL_POLYGON);
-    glNormal3fv(N056);
-    glVertex3fv(P056);
-    glNormal3fv(N057);
-    glVertex3fv(P057);
-    glNormal3fv(N065);
-    glVertex3fv(P065);
-    glEnd();
-    glBegin(GL_POLYGON);
-    glNormal3fv(N056);
-    glVertex3fv(P056);
-    glNormal3fv(N065);
-    glVertex3fv(P065);
-    glNormal3fv(N006);
-    glVertex3fv(P006);
-    glEnd();
-    glBegin(GL_POLYGON);
-    glNormal3fv(N056);
-    glVertex3fv(P056);
-    glNormal3fv(N006);
-    glVertex3fv(P006);
-    glNormal3fv(N063);
-    glVertex3fv(P063);
-    glEnd();
-    glBegin(GL_POLYGON);
-    glNormal3fv(N056);
-    glVertex3fv(P056);
-    glNormal3fv(N063);
-    glVertex3fv(P063);
-    glNormal3fv(N055);
-    glVertex3fv(P055);
-    glEnd();
-    glBegin(GL_POLYGON);
-    glNormal3fv(N054);
-    glVertex3fv(P054);
-    glNormal3fv(N062);
-    glVertex3fv(P062);
-    glNormal3fv(N005);
-    glVertex3fv(P005);
-    glEnd();
-    glBegin(GL_POLYGON);
-    glNormal3fv(N054);
-    glVertex3fv(P054);
-    glNormal3fv(N005);
-    glVertex3fv(P005);
-    glNormal3fv(N053);
-    glVertex3fv(P053);
-    glEnd();
-    glBegin(GL_POLYGON);
-    glNormal3fv(N053);
-    glVertex3fv(P053);
-    glNormal3fv(N005);
-    glVertex3fv(P005);
-    glNormal3fv(N060);
-    glVertex3fv(P060);
-    glEnd();
-    glBegin(GL_POLYGON);
-    glNormal3fv(N053);
-    glVertex3fv(P053);
-    glNormal3fv(N060);
-    glVertex3fv(P060);
-    glNormal3fv(N052);
-    glVertex3fv(P052);
-    glEnd();
-}
-
-void
-Whale013(void)
-{
-    glBegin(GL_POLYGON);
-    glNormal3fv(N066);
-    glVertex3fv(P066);
-    glNormal3fv(N067);
-    glVertex3fv(P067);
-    glNormal3fv(N096);
-    glVertex3fv(P096);
-    glNormal3fv(N097);
-    glVertex3fv(P097);
-    glEnd();
-    glBegin(GL_POLYGON);
-    glNormal3fv(N097);
-    glVertex3fv(P097);
-    glNormal3fv(N096);
-    glVertex3fv(P096);
-    glNormal3fv(N098);
-    glVertex3fv(P098);
-    glNormal3fv(N099);
-    glVertex3fv(P099);
-    glEnd();
-    glBegin(GL_POLYGON);
-    glNormal3fv(N065);
-    glVertex3fv(P065);
-    glNormal3fv(N066);
-    glVertex3fv(P066);
-    glNormal3fv(N097);
-    glVertex3fv(P097);
-    glEnd();
-    glBegin(GL_POLYGON);
-    glNormal3fv(N067);
-    glVertex3fv(P067);
-    glNormal3fv(N060);
-    glVertex3fv(P060);
-    glNormal3fv(N096);
-    glVertex3fv(P096);
-    glEnd();
-    glBegin(GL_POLYGON);
-    glNormal3fv(N060);
-    glVertex3fv(P060);
-    glNormal3fv(N005);
-    glVertex3fv(P005);
-    glNormal3fv(N096);
-    glVertex3fv(P096);
-    glEnd();
-    glBegin(GL_POLYGON);
-    glNormal3fv(N096);
-    glVertex3fv(P096);
-    glNormal3fv(N005);
-    glVertex3fv(P005);
-    glNormal3fv(N098);
-    glVertex3fv(P098);
-    glEnd();
-    glBegin(GL_POLYGON);
-    glNormal3fv(N006);
-    glVertex3fv(P006);
-    glNormal3fv(N065);
-    glVertex3fv(P065);
-    glNormal3fv(N097);
-    glVertex3fv(P097);
-    glEnd();
-    glBegin(GL_POLYGON);
-    glNormal3fv(N006);
-    glVertex3fv(P006);
-    glNormal3fv(N097);
-    glVertex3fv(P097);
-    glNormal3fv(N099);
-    glVertex3fv(P099);
-    glEnd();
-    glBegin(GL_POLYGON);
-    glVertex3fv(P005);
-    glVertex3fv(P006);
-    glVertex3fv(P099);
-    glVertex3fv(P098);
-    glEnd();
-}
-
-void
-Whale014(void)
-{
-    glBegin(GL_POLYGON);
-    glNormal3fv(N062);
-    glVertex3fv(P062);
-    glNormal3fv(N004);
-    glVertex3fv(P004);
-    glNormal3fv(N005);
-    glVertex3fv(P005);
-    glEnd();
-    glBegin(GL_POLYGON);
-    glVertex3fv(P006);
-    glVertex3fv(P005);
-    glVertex3fv(P004);
-    glVertex3fv(P008);
-    glEnd();
-    glBegin(GL_POLYGON);
-    glNormal3fv(N063);
-    glVertex3fv(P063);
-    glNormal3fv(N006);
-    glVertex3fv(P006);
-    glNormal3fv(N002);
-    glVertex3fv(P002);
-    glEnd();
-    glBegin(GL_POLYGON);
-    glNormal3fv(N002);
-    glVertex3fv(P002);
-    glNormal3fv(N006);
-    glVertex3fv(P006);
-    glNormal3fv(N008);
-    glVertex3fv(P008);
-    glEnd();
-    glBegin(GL_POLYGON);
-    glNormal3fv(N002);
-    glVertex3fv(P002);
-    glNormal3fv(N008);
-    glVertex3fv(P008);
-    glNormal3fv(N004);
-    glVertex3fv(P004);
-    glEnd();
-    glBegin(GL_POLYGON);
-    glNormal3fv(N062);
-    glVertex3fv(P062);
-    glNormal3fv(N002);
-    glVertex3fv(P002);
-    glNormal3fv(N004);
-    glVertex3fv(P004);
-    glEnd();
-}
-
-void
-Whale015(void)
-{
-    glBegin(GL_POLYGON);
-    glNormal3fv(N055);
-    glVertex3fv(P055);
-    glNormal3fv(N003);
-    glVertex3fv(P003);
-    glNormal3fv(N054);
-    glVertex3fv(P054);
-    glEnd();
-    glBegin(GL_POLYGON);
-    glNormal3fv(N003);
-    glVertex3fv(P003);
-    glNormal3fv(N055);
-    glVertex3fv(P055);
-    glNormal3fv(N063);
-    glVertex3fv(P063);
-    glEnd();
-    glBegin(GL_POLYGON);
-    glNormal3fv(N003);
-    glVertex3fv(P003);
-    glNormal3fv(N063);
-    glVertex3fv(P063);
-    glNormal3fv(N100);
-    glVertex3fv(P100);
-    glEnd();
-    glBegin(GL_POLYGON);
-    glNormal3fv(N003);
-    glVertex3fv(P003);
-    glNormal3fv(N100);
-    glVertex3fv(P100);
-    glNormal3fv(N054);
-    glVertex3fv(P054);
-    glEnd();
-    glBegin(GL_POLYGON);
-    glNormal3fv(N054);
-    glVertex3fv(P054);
-    glNormal3fv(N100);
-    glVertex3fv(P100);
-    glNormal3fv(N062);
-    glVertex3fv(P062);
-    glEnd();
-    glBegin(GL_POLYGON);
-    glNormal3fv(N100);
-    glVertex3fv(P100);
-    glNormal3fv(N063);
-    glVertex3fv(P063);
-    glNormal3fv(N002);
-    glVertex3fv(P002);
-    glEnd();
-    glBegin(GL_POLYGON);
-    glNormal3fv(N100);
-    glVertex3fv(P100);
-    glNormal3fv(N002);
-    glVertex3fv(P002);
-    glNormal3fv(N062);
-    glVertex3fv(P062);
-    glEnd();
-}
-
-void
-Whale016(void)
-{
-    glBegin(GL_POLYGON);
-    glVertex3fv(P104);
-    glVertex3fv(P105);
-    glVertex3fv(P106);
-    glEnd();
-    glBegin(GL_POLYGON);
-    glVertex3fv(P107);
-    glVertex3fv(P108);
-    glVertex3fv(P109);
-    glEnd();
-    glBegin(GL_POLYGON);
-    glVertex3fv(P110);
-    glVertex3fv(P111);
-    glVertex3fv(P112);
-    glVertex3fv(P113);
-    glVertex3fv(P114);
-    glVertex3fv(P115);
-    glEnd();
-    glBegin(GL_POLYGON);
-    glVertex3fv(P116);
-    glVertex3fv(P117);
-    glVertex3fv(P118);
-    glVertex3fv(P119);
-    glVertex3fv(P120);
-    glVertex3fv(P121);
-    glEnd();
-}
-
-void
-DrawWhale(fishRec * fish)
-{
-    float seg0, seg1, seg2, seg3, seg4, seg5, seg6, seg7;
-    float pitch, thrash, chomp;
-
-    fish->htail = (int) (fish->htail - (int) (5.0 * fish->v)) % 360;
-
-    thrash = 70.0 * fish->v;
-
-    seg0 = 1.5 * thrash * sin((fish->htail) * RRAD);
-    seg1 = 2.5 * thrash * sin((fish->htail + 10.0) * RRAD);
-    seg2 = 3.7 * thrash * sin((fish->htail + 15.0) * RRAD);
-    seg3 = 4.8 * thrash * sin((fish->htail + 23.0) * RRAD);
-    seg4 = 6.0 * thrash * sin((fish->htail + 28.0) * RRAD);
-    seg5 = 6.5 * thrash * sin((fish->htail + 35.0) * RRAD);
-    seg6 = 6.5 * thrash * sin((fish->htail + 40.0) * RRAD);
-    seg7 = 6.5 * thrash * sin((fish->htail + 55.0) * RRAD);
-
-    pitch = fish->v * sin((fish->htail - 160.0) * RRAD);
-
-    chomp = 0.0;
-    if (fish->v > 2.0) {
-        chomp = -(fish->v - 2.0) * 200.0;
-    }
-    P012[1] = iP012[1] + seg5;
-    P013[1] = iP013[1] + seg5;
-    P014[1] = iP014[1] + seg5;
-    P015[1] = iP015[1] + seg5;
-    P016[1] = iP016[1] + seg5;
-    P017[1] = iP017[1] + seg5;
-    P018[1] = iP018[1] + seg5;
-    P019[1] = iP019[1] + seg5;
-
-    P020[1] = iP020[1] + seg4;
-    P021[1] = iP021[1] + seg4;
-    P022[1] = iP022[1] + seg4;
-    P023[1] = iP023[1] + seg4;
-    P024[1] = iP024[1] + seg4;
-    P025[1] = iP025[1] + seg4;
-    P026[1] = iP026[1] + seg4;
-    P027[1] = iP027[1] + seg4;
-
-    P028[1] = iP028[1] + seg2;
-    P029[1] = iP029[1] + seg2;
-    P030[1] = iP030[1] + seg2;
-    P031[1] = iP031[1] + seg2;
-    P032[1] = iP032[1] + seg2;
-    P033[1] = iP033[1] + seg2;
-    P034[1] = iP034[1] + seg2;
-    P035[1] = iP035[1] + seg2;
-
-    P036[1] = iP036[1] + seg1;
-    P037[1] = iP037[1] + seg1;
-    P038[1] = iP038[1] + seg1;
-    P039[1] = iP039[1] + seg1;
-    P040[1] = iP040[1] + seg1;
-    P041[1] = iP041[1] + seg1;
-    P042[1] = iP042[1] + seg1;
-    P043[1] = iP043[1] + seg1;
-
-    P044[1] = iP044[1] + seg0;
-    P045[1] = iP045[1] + seg0;
-    P046[1] = iP046[1] + seg0;
-    P047[1] = iP047[1] + seg0;
-    P048[1] = iP048[1] + seg0;
-    P049[1] = iP049[1] + seg0;
-    P050[1] = iP050[1] + seg0;
-    P051[1] = iP051[1] + seg0;
-
-    P009[1] = iP009[1] + seg6;
-    P010[1] = iP010[1] + seg6;
-    P075[1] = iP075[1] + seg6;
-    P076[1] = iP076[1] + seg6;
-
-    P001[1] = iP001[1] + seg7;
-    P011[1] = iP011[1] + seg7;
-    P068[1] = iP068[1] + seg7;
-    P069[1] = iP069[1] + seg7;
-    P070[1] = iP070[1] + seg7;
-    P071[1] = iP071[1] + seg7;
-    P072[1] = iP072[1] + seg7;
-    P073[1] = iP073[1] + seg7;
-    P074[1] = iP074[1] + seg7;
-
-    P091[1] = iP091[1] + seg3 * 1.1;
-    P092[1] = iP092[1] + seg3;
-    P093[1] = iP093[1] + seg3;
-    P094[1] = iP094[1] + seg3;
-    P095[1] = iP095[1] + seg3 * 0.9;
-
-    P099[1] = iP099[1] + chomp;
-    P098[1] = iP098[1] + chomp;
-    P097[1] = iP097[1] + chomp;
-    P096[1] = iP096[1] + chomp;
-
-    glPushMatrix();
-
-    glRotatef(pitch, 1.0, 0.0, 0.0);
-
-    glTranslatef(0.0, 0.0, 8000.0);
-
-    glRotatef(180.0, 0.0, 1.0, 0.0);
-
-    glScalef(3.0, 3.0, 3.0);
-
-    glEnable(GL_CULL_FACE);
-
-    Whale001();
-    Whale002();
-    Whale003();
-    Whale004();
-    Whale005();
-    Whale006();
-    Whale007();
-    Whale008();
-    Whale009();
-    Whale010();
-    Whale011();
-    Whale012();
-    Whale013();
-    Whale014();
-    Whale015();
-    Whale016();
-
-    glDisable(GL_CULL_FACE);
-
-    glPopMatrix();
-}
diff --git a/Xcode/TemplatesForXcodeSnowLeopard/SDL OpenGL Application/main.c b/Xcode/TemplatesForXcodeSnowLeopard/SDL OpenGL Application/main.c
deleted file mode 100644
index 3bc4d33b1..000000000
--- a/Xcode/TemplatesForXcodeSnowLeopard/SDL OpenGL Application/main.c	
+++ /dev/null
@@ -1,179 +0,0 @@
-
-/* Simple program:  Create a blank window, wait for keypress, quit.
-
-   Please see the SDL documentation for details on using the SDL API:
-   /Developer/Documentation/SDL/docs.html
-*/
-
-#include 
-#include 
-#include 
-#include 
-
-#include "SDL.h"
-
-extern void Atlantis_Init ();
-extern void Atlantis_Reshape (int w, int h);
-extern void Atlantis_Animate ();
-extern void Atlantis_Display ();
-
-static SDL_Surface *gScreen;
-
-static void initAttributes ()
-{
-    // Setup attributes we want for the OpenGL context
-
-    int value;
-
-    // Don't set color bit sizes (SDL_GL_RED_SIZE, etc)
-    //    Mac OS X will always use 8-8-8-8 ARGB for 32-bit screens and
-    //    5-5-5 RGB for 16-bit screens
-
-    // Request a 16-bit depth buffer (without this, there is no depth buffer)
-    value = 16;
-    SDL_GL_SetAttribute (SDL_GL_DEPTH_SIZE, value);
-
-
-    // Request double-buffered OpenGL
-    //     The fact that windows are double-buffered on Mac OS X has no effect
-    //     on OpenGL double buffering.
-    value = 1;
-    SDL_GL_SetAttribute (SDL_GL_DOUBLEBUFFER, value);
-}
-
-static void printAttributes ()
-{
-    // Print out attributes of the context we created
-    int nAttr;
-    int i;
-
-    int  attr[] = { SDL_GL_RED_SIZE, SDL_GL_BLUE_SIZE, SDL_GL_GREEN_SIZE,
-                    SDL_GL_ALPHA_SIZE, SDL_GL_BUFFER_SIZE, SDL_GL_DEPTH_SIZE };
-
-    char *desc[] = { "Red size: %d bits\n", "Blue size: %d bits\n", "Green size: %d bits\n",
-                     "Alpha size: %d bits\n", "Color buffer size: %d bits\n",
-                     "Depth bufer size: %d bits\n" };
-
-    nAttr = sizeof(attr) / sizeof(int);
-
-    for (i = 0; i < nAttr; i++) {
-
-        int value;
-        SDL_GL_GetAttribute (attr[i], &value);
-        printf (desc[i], value);
-    }
-}
-
-static void createSurface (int fullscreen)
-{
-    Uint32 flags = 0;
-
-    flags = SDL_OPENGL;
-    if (fullscreen)
-        flags |= SDL_FULLSCREEN;
-
-    // Create window
-    gScreen = SDL_SetVideoMode (640, 480, 0, flags);
-    if (gScreen == NULL) {
-
-        fprintf (stderr, "Couldn't set 640x480 OpenGL video mode: %s\n",
-                 SDL_GetError());
-        SDL_Quit();
-        exit(2);
-    }
-}
-
-static void initGL ()
-{
-    Atlantis_Init ();
-    Atlantis_Reshape (gScreen->w, gScreen->h);
-}
-
-static void drawGL ()
-{
-    Atlantis_Animate ();
-    Atlantis_Display ();
-}
-
-static void mainLoop ()
-{
-    SDL_Event event;
-    int done = 0;
-    int fps = 24;
-    int delay = 1000/fps;
-    int thenTicks = -1;
-    int nowTicks;
-
-    while ( !done ) {
-
-        /* Check for events */
-        while ( SDL_PollEvent (&event) ) {
-            switch (event.type) {
-
-                case SDL_MOUSEMOTION:
-                    break;
-                case SDL_MOUSEBUTTONDOWN:
-                    break;
-                case SDL_KEYDOWN:
-                    /* Any keypress quits the app... */
-                case SDL_QUIT:
-                    done = 1;
-                    break;
-                default:
-                    break;
-            }
-        }
-
-        // Draw at 24 hz
-        //     This approach is not normally recommended - it is better to
-        //     use time-based animation and run as fast as possible
-        drawGL ();
-        SDL_GL_SwapBuffers ();
-
-        // Time how long each draw-swap-delay cycle takes
-        // and adjust delay to get closer to target framerate
-        if (thenTicks > 0) {
-            nowTicks = SDL_GetTicks ();
-            delay += (1000/fps - (nowTicks-thenTicks));
-            thenTicks = nowTicks;
-            if (delay < 0)
-                delay = 1000/fps;
-        }
-        else {
-            thenTicks = SDL_GetTicks ();
-        }
-
-        SDL_Delay (delay);
-    }
-}
-
-int main(int argc, char *argv[])
-{
-    // Init SDL video subsystem
-    if ( SDL_Init (SDL_INIT_VIDEO) < 0 ) {
-
-        fprintf(stderr, "Couldn't initialize SDL: %s\n",
-            SDL_GetError());
-        exit(1);
-    }
-
-    // Set GL context attributes
-    initAttributes ();
-
-    // Create GL context
-    createSurface (0);
-
-    // Get GL context attributes
-    printAttributes ();
-
-    // Init GL state
-    initGL ();
-
-    // Draw, get events...
-    mainLoop ();
-
-    // Cleanup
-    SDL_Quit();
-
-    return 0;
-}
diff --git a/Xcode/TemplatesForXcodeTiger/SDL Application/English.lproj/InfoPlist.strings b/Xcode/TemplatesForXcodeTiger/SDL Application/English.lproj/InfoPlist.strings
deleted file mode 100755
index 38224b5a6dc9494230bdffbcad9c8bd915f478d9..0000000000000000000000000000000000000000
GIT binary patch
literal 0
HcmV?d00001

literal 588
zcmb`^&q@Mu6vgq++Nb#8Qo?E-ElkXe8e^28c2kajNM}UHz+TBm@ZBnyA}S0bTHkZ;
z`JQuMp7+%R7jpL!Qxi{81Hq%z!qP-8vlQfpf{x5ku5MoHmkPmy)VfsF?5n6~I(1?t
zGcc8kBxX{O04T#OH*H@;Zn<1)zOaqp0V6Q;ra_%PhnvqGy28t@412lb%#HA
zwxx=X#Q)>8CuqvetxN8aaoOO;jh2SkR
-
-
-
-	CFBundleDevelopmentRegion
-	English
-	CFBundleExecutable
-	${EXECUTABLE_NAME}
-	CFBundleIconFile
-	
-	CFBundleIdentifier
-	com.yourcompany.«PROJECTNAMEASXML»
-	CFBundleInfoDictionaryVersion
-	6.0
-	CFBundleName
-	${PRODUCT_NAME}
-	CFBundlePackageType
-	APPL
-	CFBundleSignature
-	????
-	CFBundleVersion
-	1.0
-	NSMainNibFile
-	SDLMain
-	NSPrincipalClass
-	NSApplication
-
-
diff --git a/Xcode/TemplatesForXcodeTiger/SDL Application/SDLApp.xcodeproj/TemplateInfo.plist b/Xcode/TemplatesForXcodeTiger/SDL Application/SDLApp.xcodeproj/TemplateInfo.plist
deleted file mode 100644
index d9ca45493..000000000
--- a/Xcode/TemplatesForXcodeTiger/SDL Application/SDLApp.xcodeproj/TemplateInfo.plist	
+++ /dev/null
@@ -1,12 +0,0 @@
-{
-	FilesToRename = {
-		"SDLApp_Prefix.pch" = "PROJECTNAME_Prefix.pch";
-	};
-	FilesToMacroExpand = (
-		"PROJECTNAME_Prefix.pch",
-		"Info.plist",
-		"English.lproj/InfoPlist.strings",
-		"main.c",
-	);
-	Description = "This project builds an SDL-based application.";
-}
diff --git a/Xcode/TemplatesForXcodeTiger/SDL Application/SDLApp.xcodeproj/project.pbxproj b/Xcode/TemplatesForXcodeTiger/SDL Application/SDLApp.xcodeproj/project.pbxproj
deleted file mode 100644
index 2bb59b5de..000000000
--- a/Xcode/TemplatesForXcodeTiger/SDL Application/SDLApp.xcodeproj/project.pbxproj	
+++ /dev/null
@@ -1,297 +0,0 @@
-// !$*UTF8*$!
-{
-	archiveVersion = 1;
-	classes = {
-	};
-	objectVersion = 42;
-	objects = {
-
-/* Begin PBXBuildFile section */
-		002F39FA09D0881F00EBEB88 /* SDL.framework in Frameworks */ = {isa = PBXBuildFile; fileRef = 002F39F909D0881F00EBEB88 /* SDL.framework */; };
-		002F3A0009D0884600EBEB88 /* SDL.framework in Copy Frameworks into .app bundle */ = {isa = PBXBuildFile; fileRef = 002F39F909D0881F00EBEB88 /* SDL.framework */; };
-		002F3A3F09D088BA00EBEB88 /* main.c in Sources */ = {isa = PBXBuildFile; fileRef = 002F3A3E09D088BA00EBEB88 /* main.c */; };
-		8D11072B0486CEB800E47090 /* InfoPlist.strings in Resources */ = {isa = PBXBuildFile; fileRef = 089C165CFE840E0CC02AAC07 /* InfoPlist.strings */; };
-		8D11072F0486CEB800E47090 /* Cocoa.framework in Frameworks */ = {isa = PBXBuildFile; fileRef = 1058C7A1FEA54F0111CA2CBB /* Cocoa.framework */; };
-/* End PBXBuildFile section */
-
-/* Begin PBXCopyFilesBuildPhase section */
-		002F39FD09D0883400EBEB88 /* Copy Frameworks into .app bundle */ = {
-			isa = PBXCopyFilesBuildPhase;
-			buildActionMask = 2147483647;
-			dstPath = "";
-			dstSubfolderSpec = 10;
-			files = (
-				002F3A0009D0884600EBEB88 /* SDL.framework in Copy Frameworks into .app bundle */,
-			);
-			name = "Copy Frameworks into .app bundle";
-			runOnlyForDeploymentPostprocessing = 0;
-		};
-/* End PBXCopyFilesBuildPhase section */
-
-/* Begin PBXFileReference section */
-		002F39F909D0881F00EBEB88 /* SDL.framework */ = {isa = PBXFileReference; lastKnownFileType = wrapper.framework; name = SDL.framework; path = /Library/Frameworks/SDL.framework; sourceTree = ""; };
-		002F3A3E09D088BA00EBEB88 /* main.c */ = {isa = PBXFileReference; fileEncoding = 30; lastKnownFileType = sourcecode.c.c; path = main.c; sourceTree = SOURCE_ROOT; };
-		089C165DFE840E0CC02AAC07 /* English */ = {isa = PBXFileReference; fileEncoding = 10; lastKnownFileType = text.plist.strings; name = English; path = English.lproj/InfoPlist.strings; sourceTree = ""; };
-		1058C7A1FEA54F0111CA2CBB /* Cocoa.framework */ = {isa = PBXFileReference; lastKnownFileType = wrapper.framework; name = Cocoa.framework; path = /System/Library/Frameworks/Cocoa.framework; sourceTree = ""; };
-		29B97324FDCFA39411CA2CEA /* AppKit.framework */ = {isa = PBXFileReference; lastKnownFileType = wrapper.framework; name = AppKit.framework; path = /System/Library/Frameworks/AppKit.framework; sourceTree = ""; };
-		29B97325FDCFA39411CA2CEA /* Foundation.framework */ = {isa = PBXFileReference; lastKnownFileType = wrapper.framework; name = Foundation.framework; path = /System/Library/Frameworks/Foundation.framework; sourceTree = ""; };
-		32CA4F630368D1EE00C91783 /* «PROJECTNAME»_Prefix.pch */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = "«PROJECTNAME»_Prefix.pch"; sourceTree = ""; };
-		8D1107310486CEB800E47090 /* Info.plist */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = text.plist; path = Info.plist; sourceTree = ""; };
-		8D1107320486CEB800E47090 /* «PROJECTNAME».app */ = {isa = PBXFileReference; explicitFileType = wrapper.application; includeInIndex = 0; path = "«PROJECTNAME».app"; sourceTree = BUILT_PRODUCTS_DIR; };
-/* End PBXFileReference section */
-
-/* Begin PBXFrameworksBuildPhase section */
-		8D11072E0486CEB800E47090 /* Frameworks */ = {
-			isa = PBXFrameworksBuildPhase;
-			buildActionMask = 2147483647;
-			files = (
-				002F39FA09D0881F00EBEB88 /* SDL.framework in Frameworks */,
-				8D11072F0486CEB800E47090 /* Cocoa.framework in Frameworks */,
-			);
-			runOnlyForDeploymentPostprocessing = 0;
-		};
-/* End PBXFrameworksBuildPhase section */
-
-/* Begin PBXGroup section */
-		080E96DDFE201D6D7F000001 /* Classes */ = {
-			isa = PBXGroup;
-			children = (
-			);
-			name = Classes;
-			sourceTree = "";
-		};
-		1058C7A0FEA54F0111CA2CBB /* Linked Frameworks */ = {
-			isa = PBXGroup;
-			children = (
-				002F39F909D0881F00EBEB88 /* SDL.framework */,
-				1058C7A1FEA54F0111CA2CBB /* Cocoa.framework */,
-			);
-			name = "Linked Frameworks";
-			sourceTree = "";
-		};
-		1058C7A2FEA54F0111CA2CBB /* Other Frameworks */ = {
-			isa = PBXGroup;
-			children = (
-				29B97324FDCFA39411CA2CEA /* AppKit.framework */,
-				29B97325FDCFA39411CA2CEA /* Foundation.framework */,
-			);
-			name = "Other Frameworks";
-			sourceTree = "";
-		};
-		19C28FACFE9D520D11CA2CBB /* Products */ = {
-			isa = PBXGroup;
-			children = (
-				8D1107320486CEB800E47090 /* «PROJECTNAME».app */,
-			);
-			name = Products;
-			sourceTree = "";
-		};
-		29B97314FDCFA39411CA2CEA /* «PROJECTNAMEASXML» */ = {
-			isa = PBXGroup;
-			children = (
-				080E96DDFE201D6D7F000001 /* Classes */,
-				29B97315FDCFA39411CA2CEA /* Other Sources */,
-				29B97317FDCFA39411CA2CEA /* Resources */,
-				29B97323FDCFA39411CA2CEA /* Frameworks */,
-				19C28FACFE9D520D11CA2CBB /* Products */,
-			);
-			name = "«PROJECTNAMEASXML»";
-			sourceTree = "";
-		};
-		29B97315FDCFA39411CA2CEA /* Other Sources */ = {
-			isa = PBXGroup;
-			children = (
-				32CA4F630368D1EE00C91783 /* «PROJECTNAME»_Prefix.pch */,
-				002F3A3E09D088BA00EBEB88 /* main.c */,
-			);
-			name = "Other Sources";
-			sourceTree = "";
-		};
-		29B97317FDCFA39411CA2CEA /* Resources */ = {
-			isa = PBXGroup;
-			children = (
-				8D1107310486CEB800E47090 /* Info.plist */,
-				089C165CFE840E0CC02AAC07 /* InfoPlist.strings */,
-			);
-			name = Resources;
-			sourceTree = "";
-		};
-		29B97323FDCFA39411CA2CEA /* Frameworks */ = {
-			isa = PBXGroup;
-			children = (
-				1058C7A0FEA54F0111CA2CBB /* Linked Frameworks */,
-				1058C7A2FEA54F0111CA2CBB /* Other Frameworks */,
-			);
-			name = Frameworks;
-			sourceTree = "";
-		};
-/* End PBXGroup section */
-
-/* Begin PBXNativeTarget section */
-		8D1107260486CEB800E47090 /* «PROJECTNAME» */ = {
-			isa = PBXNativeTarget;
-			buildConfigurationList = C01FCF4A08A954540054247B /* Build configuration list for PBXNativeTarget "«PROJECTNAME»" */;
-			buildPhases = (
-				8D1107290486CEB800E47090 /* Resources */,
-				8D11072C0486CEB800E47090 /* Sources */,
-				8D11072E0486CEB800E47090 /* Frameworks */,
-				002F39FD09D0883400EBEB88 /* Copy Frameworks into .app bundle */,
-			);
-			buildRules = (
-			);
-			dependencies = (
-			);
-			name = "«PROJECTNAME»";
-			productInstallPath = "$(HOME)/Applications";
-			productName = "«PROJECTNAME»";
-			productReference = 8D1107320486CEB800E47090 /* «PROJECTNAME».app */;
-			productType = "com.apple.product-type.application";
-		};
-/* End PBXNativeTarget section */
-
-/* Begin PBXProject section */
-		29B97313FDCFA39411CA2CEA /* Project object */ = {
-			isa = PBXProject;
-			buildConfigurationList = C01FCF4E08A954540054247B /* Build configuration list for PBXProject "SDLApp" */;
-			compatibilityVersion = "Xcode 2.4";
-			hasScannedForEncodings = 1;
-			mainGroup = 29B97314FDCFA39411CA2CEA /* «PROJECTNAMEASXML» */;
-			projectDirPath = "";
-			projectRoot = "";
-			targets = (
-				8D1107260486CEB800E47090 /* «PROJECTNAME» */,
-			);
-		};
-/* End PBXProject section */
-
-/* Begin PBXResourcesBuildPhase section */
-		8D1107290486CEB800E47090 /* Resources */ = {
-			isa = PBXResourcesBuildPhase;
-			buildActionMask = 2147483647;
-			files = (
-				8D11072B0486CEB800E47090 /* InfoPlist.strings in Resources */,
-			);
-			runOnlyForDeploymentPostprocessing = 0;
-		};
-/* End PBXResourcesBuildPhase section */
-
-/* Begin PBXSourcesBuildPhase section */
-		8D11072C0486CEB800E47090 /* Sources */ = {
-			isa = PBXSourcesBuildPhase;
-			buildActionMask = 2147483647;
-			files = (
-				002F3A3F09D088BA00EBEB88 /* main.c in Sources */,
-			);
-			runOnlyForDeploymentPostprocessing = 0;
-		};
-/* End PBXSourcesBuildPhase section */
-
-/* Begin PBXVariantGroup section */
-		089C165CFE840E0CC02AAC07 /* InfoPlist.strings */ = {
-			isa = PBXVariantGroup;
-			children = (
-				089C165DFE840E0CC02AAC07 /* English */,
-			);
-			name = InfoPlist.strings;
-			sourceTree = "";
-		};
-/* End PBXVariantGroup section */
-
-/* Begin XCBuildConfiguration section */
-		C01FCF4B08A954540054247B /* Debug */ = {
-			isa = XCBuildConfiguration;
-			buildSettings = {
-				COPY_PHASE_STRIP = NO;
-				GCC_DYNAMIC_NO_PIC = NO;
-				GCC_ENABLE_FIX_AND_CONTINUE = YES;
-				GCC_MODEL_TUNING = G5;
-				GCC_OPTIMIZATION_LEVEL = 0;
-				INFOPLIST_FILE = Info.plist;
-				INSTALL_PATH = "$(HOME)/Applications";
-				PRODUCT_NAME = "«PROJECTNAME»";
-				WRAPPER_EXTENSION = app;
-				ZERO_LINK = YES;
-			};
-			name = Debug;
-		};
-		C01FCF4C08A954540054247B /* Release */ = {
-			isa = XCBuildConfiguration;
-			buildSettings = {
-				ARCHS = (
-					ppc,
-					i386,
-				);
-				GCC_GENERATE_DEBUGGING_SYMBOLS = NO;
-				GCC_MODEL_TUNING = G5;
-				INFOPLIST_FILE = Info.plist;
-				INSTALL_PATH = "$(HOME)/Applications";
-				PRODUCT_NAME = "«PROJECTNAME»";
-				WRAPPER_EXTENSION = app;
-			};
-			name = Release;
-		};
-		C01FCF4F08A954540054247B /* Debug */ = {
-			isa = XCBuildConfiguration;
-			buildSettings = {
-				FRAMEWORK_SEARCH_PATHS = (
-					"$(HOME)/Library/Frameworks",
-					/Library/Frameworks,
-					"$(FRAMEWORK_SEARCH_PATHS)",
-				);
-				GCC_WARN_ABOUT_RETURN_TYPE = YES;
-				GCC_WARN_UNUSED_VARIABLE = YES;
-				HEADER_SEARCH_PATHS = (
-					"$(HOME)/Library/Frameworks/SDL.framework/Headers",
-					/Library/Frameworks/SDL.framework/Headers,
-					"$(HEADER_SEARCH_PATHS)",
-				);
-				PREBINDING = NO;
-				SDKROOT = /Developer/SDKs/MacOSX10.4u.sdk;
-			};
-			name = Debug;
-		};
-		C01FCF5008A954540054247B /* Release */ = {
-			isa = XCBuildConfiguration;
-			buildSettings = {
-				FRAMEWORK_SEARCH_PATHS = (
-					"$(HOME)/Library/Frameworks",
-					/Library/Frameworks,
-					"$(FRAMEWORK_SEARCH_PATHS)",
-				);
-				GCC_WARN_ABOUT_RETURN_TYPE = YES;
-				GCC_WARN_UNUSED_VARIABLE = YES;
-				HEADER_SEARCH_PATHS = (
-					"$(HOME)/Library/Frameworks/SDL.framework/Headers",
-					/Library/Frameworks/SDL.framework/Headers,
-					"$(HEADER_SEARCH_PATHS)",
-				);
-				PREBINDING = NO;
-				SDKROOT = /Developer/SDKs/MacOSX10.4u.sdk;
-			};
-			name = Release;
-		};
-/* End XCBuildConfiguration section */
-
-/* Begin XCConfigurationList section */
-		C01FCF4A08A954540054247B /* Build configuration list for PBXNativeTarget "«PROJECTNAME»" */ = {
-			isa = XCConfigurationList;
-			buildConfigurations = (
-				C01FCF4B08A954540054247B /* Debug */,
-				C01FCF4C08A954540054247B /* Release */,
-			);
-			defaultConfigurationIsVisible = 0;
-			defaultConfigurationName = Release;
-		};
-		C01FCF4E08A954540054247B /* Build configuration list for PBXProject "SDLApp" */ = {
-			isa = XCConfigurationList;
-			buildConfigurations = (
-				C01FCF4F08A954540054247B /* Debug */,
-				C01FCF5008A954540054247B /* Release */,
-			);
-			defaultConfigurationIsVisible = 0;
-			defaultConfigurationName = Release;
-		};
-/* End XCConfigurationList section */
-	};
-	rootObject = 29B97313FDCFA39411CA2CEA /* Project object */;
-}
diff --git a/Xcode/TemplatesForXcodeTiger/SDL Application/SDLApp_Prefix.pch b/Xcode/TemplatesForXcodeTiger/SDL Application/SDLApp_Prefix.pch
deleted file mode 100644
index 00095074a..000000000
--- a/Xcode/TemplatesForXcodeTiger/SDL Application/SDLApp_Prefix.pch	
+++ /dev/null
@@ -1,9 +0,0 @@
-//
-// Prefix header for all source files of the 'PROJECTNAME' target in the 'PROJECTNAME' project
-//
-
-#include "SDL.h"
-
-#ifdef __OBJC__
-    #import 
-#endif
diff --git a/Xcode/TemplatesForXcodeTiger/SDL Application/main.c b/Xcode/TemplatesForXcodeTiger/SDL Application/main.c
deleted file mode 100644
index 47af3765d..000000000
--- a/Xcode/TemplatesForXcodeTiger/SDL Application/main.c	
+++ /dev/null
@@ -1,65 +0,0 @@
-
-/* Simple program:  Create a blank window, wait for keypress, quit.
-
-   Please see the SDL documentation for details on using the SDL API:
-   /Developer/Documentation/SDL/docs.html
-*/
-
-#include 
-#include 
-#include 
-#include 
-
-#include "SDL.h"
-
-int main(int argc, char *argv[])
-{
-    Uint32 initflags = SDL_INIT_VIDEO;  /* See documentation for details */
-    SDL_Surface *screen;
-    Uint8  video_bpp = 0;
-    Uint32 videoflags = SDL_SWSURFACE;
-    int    done;
-        SDL_Event event;
-
-    /* Initialize the SDL library */
-    if ( SDL_Init(initflags) < 0 ) {
-        fprintf(stderr, "Couldn't initialize SDL: %s\n",
-            SDL_GetError());
-        exit(1);
-    }
-
-    /* Set 640x480 video mode */
-    screen=SDL_SetVideoMode(640,480, video_bpp, videoflags);
-        if (screen == NULL) {
-        fprintf(stderr, "Couldn't set 640x480x%d video mode: %s\n",
-                        video_bpp, SDL_GetError());
-        SDL_Quit();
-        exit(2);
-    }
-
-    done = 0;
-    while ( !done ) {
-
-        /* Check for events */
-        while ( SDL_PollEvent(&event) ) {
-            switch (event.type) {
-
-                case SDL_MOUSEMOTION:
-                    break;
-                case SDL_MOUSEBUTTONDOWN:
-                    break;
-                case SDL_KEYDOWN:
-                    /* Any keypress quits the app... */
-                case SDL_QUIT:
-                    done = 1;
-                    break;
-                default:
-                    break;
-            }
-        }
-    }
-
-    /* Clean up the SDL library */
-    SDL_Quit();
-    return(0);
-}
diff --git a/Xcode/TemplatesForXcodeTiger/SDL Cocoa Application/English.lproj/InfoPlist.strings b/Xcode/TemplatesForXcodeTiger/SDL Cocoa Application/English.lproj/InfoPlist.strings
deleted file mode 100755
index 38224b5a6dc9494230bdffbcad9c8bd915f478d9..0000000000000000000000000000000000000000
GIT binary patch
literal 0
HcmV?d00001

literal 588
zcmb`^&q@Mu6vgq++Nb#8Qo?E-ElkXe8e^28c2kajNM}UHz+TBm@ZBnyA}S0bTHkZ;
z`JQuMp7+%R7jpL!Qxi{81Hq%z!qP-8vlQfpf{x5ku5MoHmkPmy)VfsF?5n6~I(1?t
zGcc8kBxX{O04T#OH*H@;Zn<1)zOaqp0V6Q;ra_%PhnvqGy28t@412lb%#HA
zwxx=X#Q)>8CuqvetxN8aaoOO;jh2SkR
-
-
-
-	IBDocumentLocation
-	62 117 356 240 0 0 1152 848 
-	IBEditorPositions
-	
-		29
-		62 362 195 44 0 0 1152 848 
-	
-	IBFramework Version
-	291.0
-	IBOpenObjects
-	
-		29
-	
-	IBSystem Version
-	6L60
-
-
diff --git a/Xcode/TemplatesForXcodeTiger/SDL Cocoa Application/English.lproj/SDLMain.nib/objects.nib b/Xcode/TemplatesForXcodeTiger/SDL Cocoa Application/English.lproj/SDLMain.nib/objects.nib
deleted file mode 100644
index 637801528a03f85f28a290e5ffde3716217cd1e8..0000000000000000000000000000000000000000
GIT binary patch
literal 0
HcmV?d00001

literal 2590
zcmai0O=ufO6rM?xSg~ctZJL&nn5xhc(t^P$rKvAnS*{yFy-u@-9?e>s*qf|&)zxm?
z%>4}t`N+du*aWAMQk3{69SZl%W_O3KXYFEO%jt2ghP
z?|W~)nWxBrdpU&nYjxn?M~{hj=`^lL{%+}0KX8XB)zrS@QYrWMOS09p*N7|Ev0+VRM~Qsk?Yr6o|x7Ri;`L;
zBKYey@ZF30$WY#!%OcB5q=ogy<*`)dvD9U^B2$Kmc9gy(^CVHZnL=un1A?U?VNn$=
z#y`=s(iza|RbdD4@=Oj{aZSI3G7={&K!O0;yF>TxdZ_1+*tsJpzx%GDeTUnKctRRd
zsL^`is873^cJOn<%Gis$x2=^#Y85E@upTyU+OUkQaV2bAwkMysF|(=`66Hg4bSa3O
zL1u1u{xGG*z7?{I`!AuQ+K+m&`&629U{=+H#X|ZLyIW<1$#+4U487;m5?g7o#)Ia<
zpsG#TmOHIm`aE*v^6e^HtFzSxyHjQ4TEUk>BGNlAy0v4wKS-^zUv%xyP*Pm2IrEdsTL;%BuI-{W^QxV2>JXdy746u+2JK
zU+dI1Agz85rIF?CkkBcSl%LORozy?F;{K$GbSEx5->VF9h_BA7T1Yi%r@bt)+?H7y
z>_NQ}VyvMrHtin6ETffIg+w+zA7Nf0zg92Mg()|s8i1%w<>HStj-
zFa>CV)GC7_>!_-!#$3|2T*o$(wq>ETYdaXM$+;aag|U~4WWS;)OQP%%+sPnj%CRk1
zb9F1DI~h3z&*~O3$HjH(yLqQ1nz&$OkenD@V>;i=xGgdch>T|7u7r4&2qjE&2ZWGU
zq}&%T>jGcJ@B@Ae!?$?@!_)jt3_s>;
z7#`=3Fno_c#_)Z
-
-
-
-	CFBundleDevelopmentRegion
-	English
-	CFBundleExecutable
-	${EXECUTABLE_NAME}
-	CFBundleIconFile
-	
-	CFBundleIdentifier
-	com.yourcompany.«PROJECTNAMEASXML»
-	CFBundleInfoDictionaryVersion
-	6.0
-	CFBundleName
-	${PRODUCT_NAME}
-	CFBundlePackageType
-	APPL
-	CFBundleSignature
-	????
-	CFBundleVersion
-	1.0
-	NSMainNibFile
-	SDLMain
-	NSPrincipalClass
-	NSApplication
-
-
diff --git a/Xcode/TemplatesForXcodeTiger/SDL Cocoa Application/SDLApp_Prefix.pch b/Xcode/TemplatesForXcodeTiger/SDL Cocoa Application/SDLApp_Prefix.pch
deleted file mode 100644
index 00095074a..000000000
--- a/Xcode/TemplatesForXcodeTiger/SDL Cocoa Application/SDLApp_Prefix.pch	
+++ /dev/null
@@ -1,9 +0,0 @@
-//
-// Prefix header for all source files of the 'PROJECTNAME' target in the 'PROJECTNAME' project
-//
-
-#include "SDL.h"
-
-#ifdef __OBJC__
-    #import 
-#endif
diff --git a/Xcode/TemplatesForXcodeTiger/SDL Cocoa Application/SDLCocoaApp.xcodeproj/TemplateInfo.plist b/Xcode/TemplatesForXcodeTiger/SDL Cocoa Application/SDLCocoaApp.xcodeproj/TemplateInfo.plist
deleted file mode 100644
index 1dcbea207..000000000
--- a/Xcode/TemplatesForXcodeTiger/SDL Cocoa Application/SDLCocoaApp.xcodeproj/TemplateInfo.plist	
+++ /dev/null
@@ -1,12 +0,0 @@
-{
-	FilesToRename = {
-		"SDLApp_Prefix.pch" = "PROJECTNAME_Prefix.pch";
-	};
-	FilesToMacroExpand = (
-		"PROJECTNAME_Prefix.pch",
-		"Info.plist",
-		"English.lproj/InfoPlist.strings",
-		"main.c",
-	);
-	Description = "This project builds an SDL-based application with Cocoa menus.";
-}
diff --git a/Xcode/TemplatesForXcodeTiger/SDL Cocoa Application/SDLCocoaApp.xcodeproj/project.pbxproj b/Xcode/TemplatesForXcodeTiger/SDL Cocoa Application/SDLCocoaApp.xcodeproj/project.pbxproj
deleted file mode 100644
index d4bc28197..000000000
--- a/Xcode/TemplatesForXcodeTiger/SDL Cocoa Application/SDLCocoaApp.xcodeproj/project.pbxproj	
+++ /dev/null
@@ -1,309 +0,0 @@
-// !$*UTF8*$!
-{
-	archiveVersion = 1;
-	classes = {
-	};
-	objectVersion = 42;
-	objects = {
-
-/* Begin PBXBuildFile section */
-		002F39FA09D0881F00EBEB88 /* SDL.framework in Frameworks */ = {isa = PBXBuildFile; fileRef = 002F39F909D0881F00EBEB88 /* SDL.framework */; };
-		002F3A0009D0884600EBEB88 /* SDL.framework in Copy Frameworks into .app bundle */ = {isa = PBXBuildFile; fileRef = 002F39F909D0881F00EBEB88 /* SDL.framework */; };
-		002F3A3F09D088BA00EBEB88 /* main.c in Sources */ = {isa = PBXBuildFile; fileRef = 002F3A3E09D088BA00EBEB88 /* main.c */; };
-		002F3AF109D08F1000EBEB88 /* SDLMain.nib in Resources */ = {isa = PBXBuildFile; fileRef = 002F3AEF09D08F1000EBEB88 /* SDLMain.nib */; };
-		8D11072B0486CEB800E47090 /* InfoPlist.strings in Resources */ = {isa = PBXBuildFile; fileRef = 089C165CFE840E0CC02AAC07 /* InfoPlist.strings */; };
-		8D11072F0486CEB800E47090 /* Cocoa.framework in Frameworks */ = {isa = PBXBuildFile; fileRef = 1058C7A1FEA54F0111CA2CBB /* Cocoa.framework */; };
-/* End PBXBuildFile section */
-
-/* Begin PBXCopyFilesBuildPhase section */
-		002F39FD09D0883400EBEB88 /* Copy Frameworks into .app bundle */ = {
-			isa = PBXCopyFilesBuildPhase;
-			buildActionMask = 2147483647;
-			dstPath = "";
-			dstSubfolderSpec = 10;
-			files = (
-				002F3A0009D0884600EBEB88 /* SDL.framework in Copy Frameworks into .app bundle */,
-			);
-			name = "Copy Frameworks into .app bundle";
-			runOnlyForDeploymentPostprocessing = 0;
-		};
-/* End PBXCopyFilesBuildPhase section */
-
-/* Begin PBXFileReference section */
-		002F39F909D0881F00EBEB88 /* SDL.framework */ = {isa = PBXFileReference; lastKnownFileType = wrapper.framework; name = SDL.framework; path = /Library/Frameworks/SDL.framework; sourceTree = ""; };
-		002F3A3E09D088BA00EBEB88 /* main.c */ = {isa = PBXFileReference; fileEncoding = 30; lastKnownFileType = sourcecode.c.c; path = main.c; sourceTree = SOURCE_ROOT; };
-		002F3AF009D08F1000EBEB88 /* English */ = {isa = PBXFileReference; lastKnownFileType = wrapper.nib; name = English; path = English.lproj/SDLMain.nib; sourceTree = ""; };
-		089C165DFE840E0CC02AAC07 /* English */ = {isa = PBXFileReference; fileEncoding = 10; lastKnownFileType = text.plist.strings; name = English; path = English.lproj/InfoPlist.strings; sourceTree = ""; };
-		1058C7A1FEA54F0111CA2CBB /* Cocoa.framework */ = {isa = PBXFileReference; lastKnownFileType = wrapper.framework; name = Cocoa.framework; path = /System/Library/Frameworks/Cocoa.framework; sourceTree = ""; };
-		29B97324FDCFA39411CA2CEA /* AppKit.framework */ = {isa = PBXFileReference; lastKnownFileType = wrapper.framework; name = AppKit.framework; path = /System/Library/Frameworks/AppKit.framework; sourceTree = ""; };
-		29B97325FDCFA39411CA2CEA /* Foundation.framework */ = {isa = PBXFileReference; lastKnownFileType = wrapper.framework; name = Foundation.framework; path = /System/Library/Frameworks/Foundation.framework; sourceTree = ""; };
-		32CA4F630368D1EE00C91783 /* «PROJECTNAME»_Prefix.pch */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = "«PROJECTNAME»_Prefix.pch"; sourceTree = ""; };
-		8D1107310486CEB800E47090 /* Info.plist */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = text.plist; path = Info.plist; sourceTree = ""; };
-		8D1107320486CEB800E47090 /* «PROJECTNAME».app */ = {isa = PBXFileReference; explicitFileType = wrapper.application; includeInIndex = 0; path = "«PROJECTNAME».app"; sourceTree = BUILT_PRODUCTS_DIR; };
-/* End PBXFileReference section */
-
-/* Begin PBXFrameworksBuildPhase section */
-		8D11072E0486CEB800E47090 /* Frameworks */ = {
-			isa = PBXFrameworksBuildPhase;
-			buildActionMask = 2147483647;
-			files = (
-				002F39FA09D0881F00EBEB88 /* SDL.framework in Frameworks */,
-				8D11072F0486CEB800E47090 /* Cocoa.framework in Frameworks */,
-			);
-			runOnlyForDeploymentPostprocessing = 0;
-		};
-/* End PBXFrameworksBuildPhase section */
-
-/* Begin PBXGroup section */
-		080E96DDFE201D6D7F000001 /* Classes */ = {
-			isa = PBXGroup;
-			children = (
-			);
-			name = Classes;
-			sourceTree = "";
-		};
-		1058C7A0FEA54F0111CA2CBB /* Linked Frameworks */ = {
-			isa = PBXGroup;
-			children = (
-				002F39F909D0881F00EBEB88 /* SDL.framework */,
-				1058C7A1FEA54F0111CA2CBB /* Cocoa.framework */,
-			);
-			name = "Linked Frameworks";
-			sourceTree = "";
-		};
-		1058C7A2FEA54F0111CA2CBB /* Other Frameworks */ = {
-			isa = PBXGroup;
-			children = (
-				29B97324FDCFA39411CA2CEA /* AppKit.framework */,
-				29B97325FDCFA39411CA2CEA /* Foundation.framework */,
-			);
-			name = "Other Frameworks";
-			sourceTree = "";
-		};
-		19C28FACFE9D520D11CA2CBB /* Products */ = {
-			isa = PBXGroup;
-			children = (
-				8D1107320486CEB800E47090 /* «PROJECTNAME».app */,
-			);
-			name = Products;
-			sourceTree = "";
-		};
-		29B97314FDCFA39411CA2CEA /* «PROJECTNAMEASXML» */ = {
-			isa = PBXGroup;
-			children = (
-				080E96DDFE201D6D7F000001 /* Classes */,
-				29B97315FDCFA39411CA2CEA /* Other Sources */,
-				29B97317FDCFA39411CA2CEA /* Resources */,
-				29B97323FDCFA39411CA2CEA /* Frameworks */,
-				19C28FACFE9D520D11CA2CBB /* Products */,
-			);
-			name = "«PROJECTNAMEASXML»";
-			sourceTree = "";
-		};
-		29B97315FDCFA39411CA2CEA /* Other Sources */ = {
-			isa = PBXGroup;
-			children = (
-				32CA4F630368D1EE00C91783 /* «PROJECTNAME»_Prefix.pch */,
-				002F3A3E09D088BA00EBEB88 /* main.c */,
-			);
-			name = "Other Sources";
-			sourceTree = "";
-		};
-		29B97317FDCFA39411CA2CEA /* Resources */ = {
-			isa = PBXGroup;
-			children = (
-				8D1107310486CEB800E47090 /* Info.plist */,
-				089C165CFE840E0CC02AAC07 /* InfoPlist.strings */,
-				002F3AEF09D08F1000EBEB88 /* SDLMain.nib */,
-			);
-			name = Resources;
-			sourceTree = "";
-		};
-		29B97323FDCFA39411CA2CEA /* Frameworks */ = {
-			isa = PBXGroup;
-			children = (
-				1058C7A0FEA54F0111CA2CBB /* Linked Frameworks */,
-				1058C7A2FEA54F0111CA2CBB /* Other Frameworks */,
-			);
-			name = Frameworks;
-			sourceTree = "";
-		};
-/* End PBXGroup section */
-
-/* Begin PBXNativeTarget section */
-		8D1107260486CEB800E47090 /* «PROJECTNAME» */ = {
-			isa = PBXNativeTarget;
-			buildConfigurationList = C01FCF4A08A954540054247B /* Build configuration list for PBXNativeTarget "«PROJECTNAME»" */;
-			buildPhases = (
-				8D1107290486CEB800E47090 /* Resources */,
-				8D11072C0486CEB800E47090 /* Sources */,
-				8D11072E0486CEB800E47090 /* Frameworks */,
-				002F39FD09D0883400EBEB88 /* Copy Frameworks into .app bundle */,
-			);
-			buildRules = (
-			);
-			dependencies = (
-			);
-			name = "«PROJECTNAME»";
-			productInstallPath = "$(HOME)/Applications";
-			productName = "«PROJECTNAME»";
-			productReference = 8D1107320486CEB800E47090 /* «PROJECTNAME».app */;
-			productType = "com.apple.product-type.application";
-		};
-/* End PBXNativeTarget section */
-
-/* Begin PBXProject section */
-		29B97313FDCFA39411CA2CEA /* Project object */ = {
-			isa = PBXProject;
-			buildConfigurationList = C01FCF4E08A954540054247B /* Build configuration list for PBXProject "SDLCocoaApp" */;
-			compatibilityVersion = "Xcode 2.4";
-			hasScannedForEncodings = 1;
-			mainGroup = 29B97314FDCFA39411CA2CEA /* «PROJECTNAMEASXML» */;
-			projectDirPath = "";
-			projectRoot = "";
-			targets = (
-				8D1107260486CEB800E47090 /* «PROJECTNAME» */,
-			);
-		};
-/* End PBXProject section */
-
-/* Begin PBXResourcesBuildPhase section */
-		8D1107290486CEB800E47090 /* Resources */ = {
-			isa = PBXResourcesBuildPhase;
-			buildActionMask = 2147483647;
-			files = (
-				8D11072B0486CEB800E47090 /* InfoPlist.strings in Resources */,
-				002F3AF109D08F1000EBEB88 /* SDLMain.nib in Resources */,
-			);
-			runOnlyForDeploymentPostprocessing = 0;
-		};
-/* End PBXResourcesBuildPhase section */
-
-/* Begin PBXSourcesBuildPhase section */
-		8D11072C0486CEB800E47090 /* Sources */ = {
-			isa = PBXSourcesBuildPhase;
-			buildActionMask = 2147483647;
-			files = (
-				002F3A3F09D088BA00EBEB88 /* main.c in Sources */,
-			);
-			runOnlyForDeploymentPostprocessing = 0;
-		};
-/* End PBXSourcesBuildPhase section */
-
-/* Begin PBXVariantGroup section */
-		002F3AEF09D08F1000EBEB88 /* SDLMain.nib */ = {
-			isa = PBXVariantGroup;
-			children = (
-				002F3AF009D08F1000EBEB88 /* English */,
-			);
-			name = SDLMain.nib;
-			sourceTree = "";
-		};
-		089C165CFE840E0CC02AAC07 /* InfoPlist.strings */ = {
-			isa = PBXVariantGroup;
-			children = (
-				089C165DFE840E0CC02AAC07 /* English */,
-			);
-			name = InfoPlist.strings;
-			sourceTree = "";
-		};
-/* End PBXVariantGroup section */
-
-/* Begin XCBuildConfiguration section */
-		C01FCF4B08A954540054247B /* Debug */ = {
-			isa = XCBuildConfiguration;
-			buildSettings = {
-				COPY_PHASE_STRIP = NO;
-				GCC_DYNAMIC_NO_PIC = NO;
-				GCC_ENABLE_FIX_AND_CONTINUE = YES;
-				GCC_MODEL_TUNING = G5;
-				GCC_OPTIMIZATION_LEVEL = 0;
-				INFOPLIST_FILE = Info.plist;
-				INSTALL_PATH = "$(HOME)/Applications";
-				PRODUCT_NAME = "«PROJECTNAME»";
-				WRAPPER_EXTENSION = app;
-				ZERO_LINK = YES;
-			};
-			name = Debug;
-		};
-		C01FCF4C08A954540054247B /* Release */ = {
-			isa = XCBuildConfiguration;
-			buildSettings = {
-				ARCHS = (
-					ppc,
-					i386,
-				);
-				GCC_GENERATE_DEBUGGING_SYMBOLS = NO;
-				GCC_MODEL_TUNING = G5;
-				INFOPLIST_FILE = Info.plist;
-				INSTALL_PATH = "$(HOME)/Applications";
-				PRODUCT_NAME = "«PROJECTNAME»";
-				WRAPPER_EXTENSION = app;
-			};
-			name = Release;
-		};
-		C01FCF4F08A954540054247B /* Debug */ = {
-			isa = XCBuildConfiguration;
-			buildSettings = {
-				FRAMEWORK_SEARCH_PATHS = (
-					"$(HOME)/Library/Frameworks",
-					/Library/Frameworks,
-					"$(FRAMEWORK_SEARCH_PATHS)",
-				);
-				GCC_WARN_ABOUT_RETURN_TYPE = YES;
-				GCC_WARN_UNUSED_VARIABLE = YES;
-				HEADER_SEARCH_PATHS = (
-					"$(HOME)/Library/Frameworks/SDL.framework/Headers",
-					/Library/Frameworks/SDL.framework/Headers,
-					"$(HEADER_SEARCH_PATHS)",
-				);
-				PREBINDING = NO;
-				SDKROOT = /Developer/SDKs/MacOSX10.4u.sdk;
-			};
-			name = Debug;
-		};
-		C01FCF5008A954540054247B /* Release */ = {
-			isa = XCBuildConfiguration;
-			buildSettings = {
-				FRAMEWORK_SEARCH_PATHS = (
-					"$(HOME)/Library/Frameworks",
-					/Library/Frameworks,
-					"$(FRAMEWORK_SEARCH_PATHS)",
-				);
-				GCC_WARN_ABOUT_RETURN_TYPE = YES;
-				GCC_WARN_UNUSED_VARIABLE = YES;
-				HEADER_SEARCH_PATHS = (
-					"$(HOME)/Library/Frameworks/SDL.framework/Headers",
-					/Library/Frameworks/SDL.framework/Headers,
-					"$(HEADER_SEARCH_PATHS)",
-				);
-				PREBINDING = NO;
-				SDKROOT = /Developer/SDKs/MacOSX10.4u.sdk;
-			};
-			name = Release;
-		};
-/* End XCBuildConfiguration section */
-
-/* Begin XCConfigurationList section */
-		C01FCF4A08A954540054247B /* Build configuration list for PBXNativeTarget "«PROJECTNAME»" */ = {
-			isa = XCConfigurationList;
-			buildConfigurations = (
-				C01FCF4B08A954540054247B /* Debug */,
-				C01FCF4C08A954540054247B /* Release */,
-			);
-			defaultConfigurationIsVisible = 0;
-			defaultConfigurationName = Release;
-		};
-		C01FCF4E08A954540054247B /* Build configuration list for PBXProject "SDLCocoaApp" */ = {
-			isa = XCConfigurationList;
-			buildConfigurations = (
-				C01FCF4F08A954540054247B /* Debug */,
-				C01FCF5008A954540054247B /* Release */,
-			);
-			defaultConfigurationIsVisible = 0;
-			defaultConfigurationName = Release;
-		};
-/* End XCConfigurationList section */
-	};
-	rootObject = 29B97313FDCFA39411CA2CEA /* Project object */;
-}
diff --git a/Xcode/TemplatesForXcodeTiger/SDL Cocoa Application/main.c b/Xcode/TemplatesForXcodeTiger/SDL Cocoa Application/main.c
deleted file mode 100644
index 47af3765d..000000000
--- a/Xcode/TemplatesForXcodeTiger/SDL Cocoa Application/main.c	
+++ /dev/null
@@ -1,65 +0,0 @@
-
-/* Simple program:  Create a blank window, wait for keypress, quit.
-
-   Please see the SDL documentation for details on using the SDL API:
-   /Developer/Documentation/SDL/docs.html
-*/
-
-#include 
-#include 
-#include 
-#include 
-
-#include "SDL.h"
-
-int main(int argc, char *argv[])
-{
-    Uint32 initflags = SDL_INIT_VIDEO;  /* See documentation for details */
-    SDL_Surface *screen;
-    Uint8  video_bpp = 0;
-    Uint32 videoflags = SDL_SWSURFACE;
-    int    done;
-        SDL_Event event;
-
-    /* Initialize the SDL library */
-    if ( SDL_Init(initflags) < 0 ) {
-        fprintf(stderr, "Couldn't initialize SDL: %s\n",
-            SDL_GetError());
-        exit(1);
-    }
-
-    /* Set 640x480 video mode */
-    screen=SDL_SetVideoMode(640,480, video_bpp, videoflags);
-        if (screen == NULL) {
-        fprintf(stderr, "Couldn't set 640x480x%d video mode: %s\n",
-                        video_bpp, SDL_GetError());
-        SDL_Quit();
-        exit(2);
-    }
-
-    done = 0;
-    while ( !done ) {
-
-        /* Check for events */
-        while ( SDL_PollEvent(&event) ) {
-            switch (event.type) {
-
-                case SDL_MOUSEMOTION:
-                    break;
-                case SDL_MOUSEBUTTONDOWN:
-                    break;
-                case SDL_KEYDOWN:
-                    /* Any keypress quits the app... */
-                case SDL_QUIT:
-                    done = 1;
-                    break;
-                default:
-                    break;
-            }
-        }
-    }
-
-    /* Clean up the SDL library */
-    SDL_Quit();
-    return(0);
-}
diff --git a/Xcode/TemplatesForXcodeTiger/SDL OpenGL Application/English.lproj/InfoPlist.strings b/Xcode/TemplatesForXcodeTiger/SDL OpenGL Application/English.lproj/InfoPlist.strings
deleted file mode 100755
index 38224b5a6dc9494230bdffbcad9c8bd915f478d9..0000000000000000000000000000000000000000
GIT binary patch
literal 0
HcmV?d00001

literal 588
zcmb`^&q@Mu6vgq++Nb#8Qo?E-ElkXe8e^28c2kajNM}UHz+TBm@ZBnyA}S0bTHkZ;
z`JQuMp7+%R7jpL!Qxi{81Hq%z!qP-8vlQfpf{x5ku5MoHmkPmy)VfsF?5n6~I(1?t
zGcc8kBxX{O04T#OH*H@;Zn<1)zOaqp0V6Q;ra_%PhnvqGy28t@412lb%#HA
zwxx=X#Q)>8CuqvetxN8aaoOO;jh2SkR
-
-
-
-	CFBundleDevelopmentRegion
-	English
-	CFBundleExecutable
-	${EXECUTABLE_NAME}
-	CFBundleIconFile
-	
-	CFBundleIdentifier
-	com.yourcompany.«PROJECTNAMEASXML»
-	CFBundleInfoDictionaryVersion
-	6.0
-	CFBundleName
-	${PRODUCT_NAME}
-	CFBundlePackageType
-	APPL
-	CFBundleSignature
-	????
-	CFBundleVersion
-	1.0
-	NSMainNibFile
-	SDLMain
-	NSPrincipalClass
-	NSApplication
-
-
diff --git a/Xcode/TemplatesForXcodeTiger/SDL OpenGL Application/SDLApp_Prefix.pch b/Xcode/TemplatesForXcodeTiger/SDL OpenGL Application/SDLApp_Prefix.pch
deleted file mode 100644
index 00095074a..000000000
--- a/Xcode/TemplatesForXcodeTiger/SDL OpenGL Application/SDLApp_Prefix.pch	
+++ /dev/null
@@ -1,9 +0,0 @@
-//
-// Prefix header for all source files of the 'PROJECTNAME' target in the 'PROJECTNAME' project
-//
-
-#include "SDL.h"
-
-#ifdef __OBJC__
-    #import 
-#endif
diff --git a/Xcode/TemplatesForXcodeTiger/SDL OpenGL Application/SDLOpenGLApp.xcodeproj/TemplateInfo.plist b/Xcode/TemplatesForXcodeTiger/SDL OpenGL Application/SDLOpenGLApp.xcodeproj/TemplateInfo.plist
deleted file mode 100644
index ba87745fc..000000000
--- a/Xcode/TemplatesForXcodeTiger/SDL OpenGL Application/SDLOpenGLApp.xcodeproj/TemplateInfo.plist	
+++ /dev/null
@@ -1,12 +0,0 @@
-{
-	FilesToRename = {
-		"SDLApp_Prefix.pch" = "PROJECTNAME_Prefix.pch";
-	};
-	FilesToMacroExpand = (
-		"PROJECTNAME_Prefix.pch",
-		"Info.plist",
-		"English.lproj/InfoPlist.strings",
-		"main.c",
-	);
-	Description = "This project builds an SDL-based application that uses OpenGL.";
-}
diff --git a/Xcode/TemplatesForXcodeTiger/SDL OpenGL Application/SDLOpenGLApp.xcodeproj/project.pbxproj b/Xcode/TemplatesForXcodeTiger/SDL OpenGL Application/SDLOpenGLApp.xcodeproj/project.pbxproj
deleted file mode 100644
index 0c03c9a35..000000000
--- a/Xcode/TemplatesForXcodeTiger/SDL OpenGL Application/SDLOpenGLApp.xcodeproj/project.pbxproj	
+++ /dev/null
@@ -1,335 +0,0 @@
-// !$*UTF8*$!
-{
-	archiveVersion = 1;
-	classes = {
-	};
-	objectVersion = 42;
-	objects = {
-
-/* Begin PBXBuildFile section */
-		002F39FA09D0881F00EBEB88 /* SDL.framework in Frameworks */ = {isa = PBXBuildFile; fileRef = 002F39F909D0881F00EBEB88 /* SDL.framework */; };
-		002F3A0009D0884600EBEB88 /* SDL.framework in Copy Frameworks into .app bundle */ = {isa = PBXBuildFile; fileRef = 002F39F909D0881F00EBEB88 /* SDL.framework */; };
-		002F3A3F09D088BA00EBEB88 /* main.c in Sources */ = {isa = PBXBuildFile; fileRef = 002F3A3E09D088BA00EBEB88 /* main.c */; };
-		002F3BFA09D0938900EBEB88 /* atlantis.c in Sources */ = {isa = PBXBuildFile; fileRef = 002F3BF409D0938900EBEB88 /* atlantis.c */; };
-		002F3BFC09D0938900EBEB88 /* dolphin.c in Sources */ = {isa = PBXBuildFile; fileRef = 002F3BF609D0938900EBEB88 /* dolphin.c */; };
-		002F3BFD09D0938900EBEB88 /* shark.c in Sources */ = {isa = PBXBuildFile; fileRef = 002F3BF709D0938900EBEB88 /* shark.c */; };
-		002F3BFE09D0938900EBEB88 /* swim.c in Sources */ = {isa = PBXBuildFile; fileRef = 002F3BF809D0938900EBEB88 /* swim.c */; };
-		002F3BFF09D0938900EBEB88 /* whale.c in Sources */ = {isa = PBXBuildFile; fileRef = 002F3BF909D0938900EBEB88 /* whale.c */; };
-		002F3C0109D093BD00EBEB88 /* OpenGL.framework in Frameworks */ = {isa = PBXBuildFile; fileRef = 002F3C0009D093BD00EBEB88 /* OpenGL.framework */; };
-		002F3C6109D0951E00EBEB88 /* GLUT.framework in Frameworks */ = {isa = PBXBuildFile; fileRef = 002F3C6009D0951E00EBEB88 /* GLUT.framework */; };
-		8D11072B0486CEB800E47090 /* InfoPlist.strings in Resources */ = {isa = PBXBuildFile; fileRef = 089C165CFE840E0CC02AAC07 /* InfoPlist.strings */; };
-		8D11072F0486CEB800E47090 /* Cocoa.framework in Frameworks */ = {isa = PBXBuildFile; fileRef = 1058C7A1FEA54F0111CA2CBB /* Cocoa.framework */; };
-/* End PBXBuildFile section */
-
-/* Begin PBXCopyFilesBuildPhase section */
-		002F39FD09D0883400EBEB88 /* Copy Frameworks into .app bundle */ = {
-			isa = PBXCopyFilesBuildPhase;
-			buildActionMask = 2147483647;
-			dstPath = "";
-			dstSubfolderSpec = 10;
-			files = (
-				002F3A0009D0884600EBEB88 /* SDL.framework in Copy Frameworks into .app bundle */,
-			);
-			name = "Copy Frameworks into .app bundle";
-			runOnlyForDeploymentPostprocessing = 0;
-		};
-/* End PBXCopyFilesBuildPhase section */
-
-/* Begin PBXFileReference section */
-		002F39F909D0881F00EBEB88 /* SDL.framework */ = {isa = PBXFileReference; lastKnownFileType = wrapper.framework; name = SDL.framework; path = /Library/Frameworks/SDL.framework; sourceTree = ""; };
-		002F3A3E09D088BA00EBEB88 /* main.c */ = {isa = PBXFileReference; fileEncoding = 30; lastKnownFileType = sourcecode.c.c; path = main.c; sourceTree = SOURCE_ROOT; };
-		002F3BF409D0938900EBEB88 /* atlantis.c */ = {isa = PBXFileReference; fileEncoding = 30; lastKnownFileType = sourcecode.c.c; name = atlantis.c; path = atlantis/atlantis.c; sourceTree = SOURCE_ROOT; };
-		002F3BF509D0938900EBEB88 /* atlantis.h */ = {isa = PBXFileReference; fileEncoding = 30; lastKnownFileType = sourcecode.c.h; name = atlantis.h; path = atlantis/atlantis.h; sourceTree = SOURCE_ROOT; };
-		002F3BF609D0938900EBEB88 /* dolphin.c */ = {isa = PBXFileReference; fileEncoding = 30; lastKnownFileType = sourcecode.c.c; name = dolphin.c; path = atlantis/dolphin.c; sourceTree = SOURCE_ROOT; };
-		002F3BF709D0938900EBEB88 /* shark.c */ = {isa = PBXFileReference; fileEncoding = 30; lastKnownFileType = sourcecode.c.c; name = shark.c; path = atlantis/shark.c; sourceTree = SOURCE_ROOT; };
-		002F3BF809D0938900EBEB88 /* swim.c */ = {isa = PBXFileReference; fileEncoding = 30; lastKnownFileType = sourcecode.c.c; name = swim.c; path = atlantis/swim.c; sourceTree = SOURCE_ROOT; };
-		002F3BF909D0938900EBEB88 /* whale.c */ = {isa = PBXFileReference; fileEncoding = 30; lastKnownFileType = sourcecode.c.c; name = whale.c; path = atlantis/whale.c; sourceTree = SOURCE_ROOT; };
-		002F3C0009D093BD00EBEB88 /* OpenGL.framework */ = {isa = PBXFileReference; lastKnownFileType = wrapper.framework; name = OpenGL.framework; path = /System/Library/Frameworks/OpenGL.framework; sourceTree = ""; };
-		002F3C6009D0951E00EBEB88 /* GLUT.framework */ = {isa = PBXFileReference; lastKnownFileType = wrapper.framework; name = GLUT.framework; path = ../../../../../../../../../../System/Library/Frameworks/GLUT.framework; sourceTree = SOURCE_ROOT; };
-		089C165DFE840E0CC02AAC07 /* English */ = {isa = PBXFileReference; fileEncoding = 10; lastKnownFileType = text.plist.strings; name = English; path = English.lproj/InfoPlist.strings; sourceTree = ""; };
-		1058C7A1FEA54F0111CA2CBB /* Cocoa.framework */ = {isa = PBXFileReference; lastKnownFileType = wrapper.framework; name = Cocoa.framework; path = /System/Library/Frameworks/Cocoa.framework; sourceTree = ""; };
-		29B97324FDCFA39411CA2CEA /* AppKit.framework */ = {isa = PBXFileReference; lastKnownFileType = wrapper.framework; name = AppKit.framework; path = /System/Library/Frameworks/AppKit.framework; sourceTree = ""; };
-		29B97325FDCFA39411CA2CEA /* Foundation.framework */ = {isa = PBXFileReference; lastKnownFileType = wrapper.framework; name = Foundation.framework; path = /System/Library/Frameworks/Foundation.framework; sourceTree = ""; };
-		32CA4F630368D1EE00C91783 /* «PROJECTNAME»_Prefix.pch */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = "«PROJECTNAME»_Prefix.pch"; sourceTree = ""; };
-		8D1107310486CEB800E47090 /* Info.plist */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = text.plist; path = Info.plist; sourceTree = ""; };
-		8D1107320486CEB800E47090 /* «PROJECTNAME».app */ = {isa = PBXFileReference; explicitFileType = wrapper.application; includeInIndex = 0; path = "«PROJECTNAME».app"; sourceTree = BUILT_PRODUCTS_DIR; };
-/* End PBXFileReference section */
-
-/* Begin PBXFrameworksBuildPhase section */
-		8D11072E0486CEB800E47090 /* Frameworks */ = {
-			isa = PBXFrameworksBuildPhase;
-			buildActionMask = 2147483647;
-			files = (
-				002F39FA09D0881F00EBEB88 /* SDL.framework in Frameworks */,
-				002F3C6109D0951E00EBEB88 /* GLUT.framework in Frameworks */,
-				8D11072F0486CEB800E47090 /* Cocoa.framework in Frameworks */,
-				002F3C0109D093BD00EBEB88 /* OpenGL.framework in Frameworks */,
-			);
-			runOnlyForDeploymentPostprocessing = 0;
-		};
-/* End PBXFrameworksBuildPhase section */
-
-/* Begin PBXGroup section */
-		002F3BF309D0937800EBEB88 /* atlantis */ = {
-			isa = PBXGroup;
-			children = (
-				002F3BF409D0938900EBEB88 /* atlantis.c */,
-				002F3BF509D0938900EBEB88 /* atlantis.h */,
-				002F3BF609D0938900EBEB88 /* dolphin.c */,
-				002F3BF709D0938900EBEB88 /* shark.c */,
-				002F3BF809D0938900EBEB88 /* swim.c */,
-				002F3BF909D0938900EBEB88 /* whale.c */,
-			);
-			name = atlantis;
-			sourceTree = "";
-		};
-		080E96DDFE201D6D7F000001 /* Classes */ = {
-			isa = PBXGroup;
-			children = (
-			);
-			name = Classes;
-			sourceTree = "";
-		};
-		1058C7A0FEA54F0111CA2CBB /* Linked Frameworks */ = {
-			isa = PBXGroup;
-			children = (
-				002F39F909D0881F00EBEB88 /* SDL.framework */,
-				002F3C6009D0951E00EBEB88 /* GLUT.framework */,
-				1058C7A1FEA54F0111CA2CBB /* Cocoa.framework */,
-				002F3C0009D093BD00EBEB88 /* OpenGL.framework */,
-			);
-			name = "Linked Frameworks";
-			sourceTree = "";
-		};
-		1058C7A2FEA54F0111CA2CBB /* Other Frameworks */ = {
-			isa = PBXGroup;
-			children = (
-				29B97324FDCFA39411CA2CEA /* AppKit.framework */,
-				29B97325FDCFA39411CA2CEA /* Foundation.framework */,
-			);
-			name = "Other Frameworks";
-			sourceTree = "";
-		};
-		19C28FACFE9D520D11CA2CBB /* Products */ = {
-			isa = PBXGroup;
-			children = (
-				8D1107320486CEB800E47090 /* «PROJECTNAME».app */,
-			);
-			name = Products;
-			sourceTree = "";
-		};
-		29B97314FDCFA39411CA2CEA /* «PROJECTNAMEASXML» */ = {
-			isa = PBXGroup;
-			children = (
-				080E96DDFE201D6D7F000001 /* Classes */,
-				29B97315FDCFA39411CA2CEA /* Other Sources */,
-				29B97317FDCFA39411CA2CEA /* Resources */,
-				29B97323FDCFA39411CA2CEA /* Frameworks */,
-				19C28FACFE9D520D11CA2CBB /* Products */,
-			);
-			name = "«PROJECTNAMEASXML»";
-			sourceTree = "";
-		};
-		29B97315FDCFA39411CA2CEA /* Other Sources */ = {
-			isa = PBXGroup;
-			children = (
-				002F3BF309D0937800EBEB88 /* atlantis */,
-				32CA4F630368D1EE00C91783 /* «PROJECTNAME»_Prefix.pch */,
-				002F3A3E09D088BA00EBEB88 /* main.c */,
-			);
-			name = "Other Sources";
-			sourceTree = "";
-		};
-		29B97317FDCFA39411CA2CEA /* Resources */ = {
-			isa = PBXGroup;
-			children = (
-				8D1107310486CEB800E47090 /* Info.plist */,
-				089C165CFE840E0CC02AAC07 /* InfoPlist.strings */,
-			);
-			name = Resources;
-			sourceTree = "";
-		};
-		29B97323FDCFA39411CA2CEA /* Frameworks */ = {
-			isa = PBXGroup;
-			children = (
-				1058C7A0FEA54F0111CA2CBB /* Linked Frameworks */,
-				1058C7A2FEA54F0111CA2CBB /* Other Frameworks */,
-			);
-			name = Frameworks;
-			sourceTree = "";
-		};
-/* End PBXGroup section */
-
-/* Begin PBXNativeTarget section */
-		8D1107260486CEB800E47090 /* «PROJECTNAME» */ = {
-			isa = PBXNativeTarget;
-			buildConfigurationList = C01FCF4A08A954540054247B /* Build configuration list for PBXNativeTarget "«PROJECTNAME»" */;
-			buildPhases = (
-				8D1107290486CEB800E47090 /* Resources */,
-				8D11072C0486CEB800E47090 /* Sources */,
-				8D11072E0486CEB800E47090 /* Frameworks */,
-				002F39FD09D0883400EBEB88 /* Copy Frameworks into .app bundle */,
-			);
-			buildRules = (
-			);
-			dependencies = (
-			);
-			name = "«PROJECTNAME»";
-			productInstallPath = "$(HOME)/Applications";
-			productName = "«PROJECTNAME»";
-			productReference = 8D1107320486CEB800E47090 /* «PROJECTNAME».app */;
-			productType = "com.apple.product-type.application";
-		};
-/* End PBXNativeTarget section */
-
-/* Begin PBXProject section */
-		29B97313FDCFA39411CA2CEA /* Project object */ = {
-			isa = PBXProject;
-			buildConfigurationList = C01FCF4E08A954540054247B /* Build configuration list for PBXProject "SDLOpenGLApp" */;
-			compatibilityVersion = "Xcode 2.4";
-			hasScannedForEncodings = 1;
-			mainGroup = 29B97314FDCFA39411CA2CEA /* «PROJECTNAMEASXML» */;
-			projectDirPath = "";
-			projectRoot = "";
-			targets = (
-				8D1107260486CEB800E47090 /* «PROJECTNAME» */,
-			);
-		};
-/* End PBXProject section */
-
-/* Begin PBXResourcesBuildPhase section */
-		8D1107290486CEB800E47090 /* Resources */ = {
-			isa = PBXResourcesBuildPhase;
-			buildActionMask = 2147483647;
-			files = (
-				8D11072B0486CEB800E47090 /* InfoPlist.strings in Resources */,
-			);
-			runOnlyForDeploymentPostprocessing = 0;
-		};
-/* End PBXResourcesBuildPhase section */
-
-/* Begin PBXSourcesBuildPhase section */
-		8D11072C0486CEB800E47090 /* Sources */ = {
-			isa = PBXSourcesBuildPhase;
-			buildActionMask = 2147483647;
-			files = (
-				002F3A3F09D088BA00EBEB88 /* main.c in Sources */,
-				002F3BFA09D0938900EBEB88 /* atlantis.c in Sources */,
-				002F3BFC09D0938900EBEB88 /* dolphin.c in Sources */,
-				002F3BFD09D0938900EBEB88 /* shark.c in Sources */,
-				002F3BFE09D0938900EBEB88 /* swim.c in Sources */,
-				002F3BFF09D0938900EBEB88 /* whale.c in Sources */,
-			);
-			runOnlyForDeploymentPostprocessing = 0;
-		};
-/* End PBXSourcesBuildPhase section */
-
-/* Begin PBXVariantGroup section */
-		089C165CFE840E0CC02AAC07 /* InfoPlist.strings */ = {
-			isa = PBXVariantGroup;
-			children = (
-				089C165DFE840E0CC02AAC07 /* English */,
-			);
-			name = InfoPlist.strings;
-			sourceTree = "";
-		};
-/* End PBXVariantGroup section */
-
-/* Begin XCBuildConfiguration section */
-		C01FCF4B08A954540054247B /* Debug */ = {
-			isa = XCBuildConfiguration;
-			buildSettings = {
-				COPY_PHASE_STRIP = NO;
-				GCC_DYNAMIC_NO_PIC = NO;
-				GCC_ENABLE_FIX_AND_CONTINUE = YES;
-				GCC_MODEL_TUNING = G5;
-				GCC_OPTIMIZATION_LEVEL = 0;
-				INFOPLIST_FILE = Info.plist;
-				INSTALL_PATH = "$(HOME)/Applications";
-				PRODUCT_NAME = "«PROJECTNAME»";
-				WRAPPER_EXTENSION = app;
-				ZERO_LINK = YES;
-			};
-			name = Debug;
-		};
-		C01FCF4C08A954540054247B /* Release */ = {
-			isa = XCBuildConfiguration;
-			buildSettings = {
-				ARCHS = (
-					ppc,
-					i386,
-				);
-				GCC_GENERATE_DEBUGGING_SYMBOLS = NO;
-				GCC_MODEL_TUNING = G5;
-				INFOPLIST_FILE = Info.plist;
-				INSTALL_PATH = "$(HOME)/Applications";
-				PRODUCT_NAME = "«PROJECTNAME»";
-				WRAPPER_EXTENSION = app;
-			};
-			name = Release;
-		};
-		C01FCF4F08A954540054247B /* Debug */ = {
-			isa = XCBuildConfiguration;
-			buildSettings = {
-				FRAMEWORK_SEARCH_PATHS = (
-					"$(HOME)/Library/Frameworks",
-					/Library/Frameworks,
-					"$(FRAMEWORK_SEARCH_PATHS)",
-				);
-				GCC_WARN_ABOUT_RETURN_TYPE = YES;
-				GCC_WARN_UNUSED_VARIABLE = YES;
-				HEADER_SEARCH_PATHS = (
-					"$(HOME)/Library/Frameworks/SDL.framework/Headers",
-					/Library/Frameworks/SDL.framework/Headers,
-					"$(HEADER_SEARCH_PATHS)",
-				);
-				PREBINDING = NO;
-				SDKROOT = /Developer/SDKs/MacOSX10.4u.sdk;
-			};
-			name = Debug;
-		};
-		C01FCF5008A954540054247B /* Release */ = {
-			isa = XCBuildConfiguration;
-			buildSettings = {
-				FRAMEWORK_SEARCH_PATHS = (
-					"$(HOME)/Library/Frameworks",
-					/Library/Frameworks,
-					"$(FRAMEWORK_SEARCH_PATHS)",
-				);
-				GCC_WARN_ABOUT_RETURN_TYPE = YES;
-				GCC_WARN_UNUSED_VARIABLE = YES;
-				HEADER_SEARCH_PATHS = (
-					"$(HOME)/Library/Frameworks/SDL.framework/Headers",
-					/Library/Frameworks/SDL.framework/Headers,
-					"$(HEADER_SEARCH_PATHS)",
-				);
-				PREBINDING = NO;
-				SDKROOT = /Developer/SDKs/MacOSX10.4u.sdk;
-			};
-			name = Release;
-		};
-/* End XCBuildConfiguration section */
-
-/* Begin XCConfigurationList section */
-		C01FCF4A08A954540054247B /* Build configuration list for PBXNativeTarget "«PROJECTNAME»" */ = {
-			isa = XCConfigurationList;
-			buildConfigurations = (
-				C01FCF4B08A954540054247B /* Debug */,
-				C01FCF4C08A954540054247B /* Release */,
-			);
-			defaultConfigurationIsVisible = 0;
-			defaultConfigurationName = Release;
-		};
-		C01FCF4E08A954540054247B /* Build configuration list for PBXProject "SDLOpenGLApp" */ = {
-			isa = XCConfigurationList;
-			buildConfigurations = (
-				C01FCF4F08A954540054247B /* Debug */,
-				C01FCF5008A954540054247B /* Release */,
-			);
-			defaultConfigurationIsVisible = 0;
-			defaultConfigurationName = Release;
-		};
-/* End XCConfigurationList section */
-	};
-	rootObject = 29B97313FDCFA39411CA2CEA /* Project object */;
-}
diff --git a/Xcode/TemplatesForXcodeTiger/SDL OpenGL Application/atlantis/atlantis.c b/Xcode/TemplatesForXcodeTiger/SDL OpenGL Application/atlantis/atlantis.c
deleted file mode 100644
index debed809d..000000000
--- a/Xcode/TemplatesForXcodeTiger/SDL OpenGL Application/atlantis/atlantis.c	
+++ /dev/null
@@ -1,459 +0,0 @@
-
-/* Copyright (c) Mark J. Kilgard, 1994. */
-
-/**
- * (c) Copyright 1993, 1994, Silicon Graphics, Inc.
- * ALL RIGHTS RESERVED
- * Permission to use, copy, modify, and distribute this software for
- * any purpose and without fee is hereby granted, provided that the above
- * copyright notice appear in all copies and that both the copyright notice
- * and this permission notice appear in supporting documentation, and that
- * the name of Silicon Graphics, Inc. not be used in advertising
- * or publicity pertaining to distribution of the software without specific,
- * written prior permission.
- *
- * THE MATERIAL EMBODIED ON THIS SOFTWARE IS PROVIDED TO YOU "AS-IS"
- * AND WITHOUT WARRANTY OF ANY KIND, EXPRESS, IMPLIED OR OTHERWISE,
- * INCLUDING WITHOUT LIMITATION, ANY WARRANTY OF MERCHANTABILITY OR
- * FITNESS FOR A PARTICULAR PURPOSE.  IN NO EVENT SHALL SILICON
- * GRAPHICS, INC.  BE LIABLE TO YOU OR ANYONE ELSE FOR ANY DIRECT,
- * SPECIAL, INCIDENTAL, INDIRECT OR CONSEQUENTIAL DAMAGES OF ANY
- * KIND, OR ANY DAMAGES WHATSOEVER, INCLUDING WITHOUT LIMITATION,
- * LOSS OF PROFIT, LOSS OF USE, SAVINGS OR REVENUE, OR THE CLAIMS OF
- * THIRD PARTIES, WHETHER OR NOT SILICON GRAPHICS, INC.  HAS BEEN
- * ADVISED OF THE POSSIBILITY OF SUCH LOSS, HOWEVER CAUSED AND ON
- * ANY THEORY OF LIABILITY, ARISING OUT OF OR IN CONNECTION WITH THE
- * POSSESSION, USE OR PERFORMANCE OF THIS SOFTWARE.
- *
- * US Government Users Restricted Rights
- * Use, duplication, or disclosure by the Government is subject to
- * restrictions set forth in FAR 52.227.19(c)(2) or subparagraph
- * (c)(1)(ii) of the Rights in Technical Data and Computer Software
- * clause at DFARS 252.227-7013 and/or in similar or successor
- * clauses in the FAR or the DOD or NASA FAR Supplement.
- * Unpublished-- rights reserved under the copyright laws of the
- * United States.  Contractor/manufacturer is Silicon Graphics,
- * Inc., 2011 N.  Shoreline Blvd., Mountain View, CA 94039-7311.
- *
- * OpenGL(TM) is a trademark of Silicon Graphics, Inc.
- */
-#include 
-#include 
-#include 
-#include 
-#include 
-#include 
-#include "atlantis.h"
-
-fishRec sharks[NUM_SHARKS];
-fishRec momWhale;
-fishRec babyWhale;
-fishRec dolph;
-
-GLboolean Timing = GL_TRUE;
-
-int w_win = 640;
-int h_win = 480;
-GLint count  = 0;
-GLenum StrMode = GL_VENDOR;
-
-GLboolean moving;
-
-static double mtime(void)
-{
-   struct timeval tk_time;
-   struct timezone tz;
-
-   gettimeofday(&tk_time, &tz);
-
-   return 4294.967296 * tk_time.tv_sec + 0.000001 * tk_time.tv_usec;
-}
-
-static double filter(double in, double *save)
-{
-    static double k1 = 0.9;
-    static double k2 = 0.05;
-
-    save[3] = in;
-    save[1] = save[0]*k1 + k2*(save[3] + save[2]);
-
-    save[0]=save[1];
-    save[2]=save[3];
-
-    return(save[1]);
-}
-
-void DrawStr(const char *str)
-{
-    GLint i = 0;
-
-    if(!str) return;
-
-    while(str[i])
-    {
-        glutBitmapCharacter(GLUT_BITMAP_HELVETICA_12, str[i]);
-        i++;
-    }
-}
-
-void
-InitFishs(void)
-{
-    int i;
-
-    for (i = 0; i < NUM_SHARKS; i++) {
-        sharks[i].x = 70000.0 + rand() % 6000;
-        sharks[i].y = rand() % 6000;
-        sharks[i].z = rand() % 6000;
-        sharks[i].psi = rand() % 360 - 180.0;
-        sharks[i].v = 1.0;
-    }
-
-    dolph.x = 30000.0;
-    dolph.y = 0.0;
-    dolph.z = 6000.0;
-    dolph.psi = 90.0;
-    dolph.theta = 0.0;
-    dolph.v = 3.0;
-
-    momWhale.x = 70000.0;
-    momWhale.y = 0.0;
-    momWhale.z = 0.0;
-    momWhale.psi = 90.0;
-    momWhale.theta = 0.0;
-    momWhale.v = 3.0;
-
-    babyWhale.x = 60000.0;
-    babyWhale.y = -2000.0;
-    babyWhale.z = -2000.0;
-    babyWhale.psi = 90.0;
-    babyWhale.theta = 0.0;
-    babyWhale.v = 3.0;
-}
-
-void
-Atlantis_Init(void)
-{
-    static float ambient[] = {0.2, 0.2, 0.2, 1.0};
-    static float diffuse[] = {1.0, 1.0, 1.0, 1.0};
-    static float position[] = {0.0, 1.0, 0.0, 0.0};
-    static float mat_shininess[] = {90.0};
-    static float mat_specular[] = {0.8, 0.8, 0.8, 1.0};
-    static float mat_diffuse[] = {0.46, 0.66, 0.795, 1.0};
-    static float mat_ambient[] = {0.3, 0.4, 0.5, 1.0};
-    static float lmodel_ambient[] = {0.4, 0.4, 0.4, 1.0};
-    static float lmodel_localviewer[] = {0.0};
-    //GLfloat map1[4] = {0.0, 0.0, 0.0, 0.0};
-    //GLfloat map2[4] = {0.0, 0.0, 0.0, 0.0};
-    static float fog_color[] = {0.0, 0.5, 0.9, 1.0};
-
-    glFrontFace(GL_CCW);
-
-    glDepthFunc(GL_LESS);
-    glEnable(GL_DEPTH_TEST);
-
-    glLightfv(GL_LIGHT0, GL_AMBIENT, ambient);
-    glLightfv(GL_LIGHT0, GL_DIFFUSE, diffuse);
-    glLightfv(GL_LIGHT0, GL_POSITION, position);
-    glLightModelfv(GL_LIGHT_MODEL_AMBIENT, lmodel_ambient);
-    glLightModelfv(GL_LIGHT_MODEL_LOCAL_VIEWER, lmodel_localviewer);
-    glEnable(GL_LIGHTING);
-    glEnable(GL_LIGHT0);
-
-    glMaterialfv(GL_FRONT_AND_BACK, GL_SHININESS, mat_shininess);
-    glMaterialfv(GL_FRONT_AND_BACK, GL_SPECULAR, mat_specular);
-    glMaterialfv(GL_FRONT_AND_BACK, GL_DIFFUSE, mat_diffuse);
-    glMaterialfv(GL_FRONT_AND_BACK, GL_AMBIENT, mat_ambient);
-
-    InitFishs();
-
-    glEnable(GL_FOG);
-    glFogi(GL_FOG_MODE, GL_EXP);
-    glFogf(GL_FOG_DENSITY, 0.0000025);
-    glFogfv(GL_FOG_COLOR, fog_color);
-
-    glClearColor(0.0, 0.5, 0.9, 1.0);
-}
-
-void
-Atlantis_Reshape(int width, int height)
-{
-    w_win = width;
-    h_win = height;
-
-    glViewport(0, 0, width, height);
-
-    glMatrixMode(GL_PROJECTION);
-    glLoadIdentity();
-    gluPerspective(60.0, (GLfloat) width / (GLfloat) height, 20000.0, 300000.0);
-    glMatrixMode(GL_MODELVIEW);
-}
-
-void
-Atlantis_Animate(void)
-{
-    int i;
-
-    for (i = 0; i < NUM_SHARKS; i++) {
-        SharkPilot(&sharks[i]);
-        SharkMiss(i);
-    }
-    WhalePilot(&dolph);
-    dolph.phi++;
-    //glutPostRedisplay();
-    WhalePilot(&momWhale);
-    momWhale.phi++;
-    WhalePilot(&babyWhale);
-    babyWhale.phi++;
-}
-
-void
-Atlantis_Key(unsigned char key, int x, int y)
-{
-    switch (key) {
-    case 't':
-        Timing = !Timing;
-    break;
-    case ' ':
-        switch(StrMode)
-        {
-            case GL_EXTENSIONS:
-                StrMode = GL_VENDOR;
-            break;
-            case GL_VENDOR:
-                StrMode = GL_RENDERER;
-            break;
-            case GL_RENDERER:
-                StrMode = GL_VERSION;
-            break;
-            case GL_VERSION:
-                StrMode = GL_EXTENSIONS;
-            break;
-        }
-    break;
-    case 27:           /* Esc will quit */
-        exit(1);
-    break;
-    case 's':                   /* "s" start animation */
-        moving = GL_TRUE;
-        //glutIdleFunc(Animate);
-    break;
-    case 'a':                   /* "a" stop animation */
-        moving = GL_FALSE;
-        //glutIdleFunc(NULL);
-    break;
-    case '.':                   /* "." will advance frame */
-        if (!moving) {
-            Atlantis_Animate();
-        }
-    }
-}
-/*
-void Display(void)
-{
-    static float P123[3] = {-448.94, -203.14, 9499.60};
-    static float P124[3] = {-442.64, -185.20, 9528.07};
-    static float P125[3] = {-441.07, -148.05, 9528.07};
-    static float P126[3] = {-443.43, -128.84, 9499.60};
-    static float P127[3] = {-456.87, -146.78, 9466.67};
-    static float P128[3] = {-453.68, -183.93, 9466.67};
-
-    glClear(GL_COLOR_BUFFER_BIT | GL_DEPTH_BUFFER_BIT);
-
-    glPushMatrix();
-    FishTransform(&dolph);
-    DrawDolphin(&dolph);
-    glPopMatrix();
-
-    glutSwapBuffers();
-}
-*/
-
-void
-Atlantis_Display(void)
-{
-    int i;
-    static double th[4] = {0.0, 0.0, 0.0, 0.0};
-    static double t1 = 0.0, t2 = 0.0, t;
-    char num_str[128];
-
-    t1 = t2;
-
-    glClear(GL_COLOR_BUFFER_BIT | GL_DEPTH_BUFFER_BIT);
-
-    for (i = 0; i < NUM_SHARKS; i++) {
-        glPushMatrix();
-        FishTransform(&sharks[i]);
-        DrawShark(&sharks[i]);
-        glPopMatrix();
-    }
-
-    glPushMatrix();
-    FishTransform(&dolph);
-    DrawDolphin(&dolph);
-    glPopMatrix();
-
-    glPushMatrix();
-    FishTransform(&momWhale);
-    DrawWhale(&momWhale);
-    glPopMatrix();
-
-    glPushMatrix();
-    FishTransform(&babyWhale);
-    glScalef(0.45, 0.45, 0.3);
-    DrawWhale(&babyWhale);
-    glPopMatrix();
-
-    if(Timing)
-    {
-        t2 = mtime();
-        t = t2 - t1;
-        if(t > 0.0001) t = 1.0 / t;
-
-        glDisable(GL_LIGHTING);
-        //glDisable(GL_DEPTH_TEST);
-
-        glColor3f(1.0, 0.0, 0.0);
-
-        glMatrixMode (GL_PROJECTION);
-        glPushMatrix();
-        glLoadIdentity();
-        glOrtho(0, w_win, 0, h_win, -10.0, 10.0);
-
-        glRasterPos2f(5.0, 5.0);
-
-        switch(StrMode)
-        {
-            case GL_VENDOR:
-                sprintf(num_str, "%0.2f Hz, %dx%d, VENDOR: ", filter(t, th), w_win, h_win);
-                DrawStr(num_str);
-                DrawStr(glGetString(GL_VENDOR));
-            break;
-            case GL_RENDERER:
-                sprintf(num_str, "%0.2f Hz, %dx%d, RENDERER: ", filter(t, th), w_win, h_win);
-                DrawStr(num_str);
-                DrawStr(glGetString(GL_RENDERER));
-            break;
-            case GL_VERSION:
-                sprintf(num_str, "%0.2f Hz, %dx%d, VERSION: ", filter(t, th), w_win, h_win);
-                DrawStr(num_str);
-                DrawStr(glGetString(GL_VERSION));
-            break;
-            case GL_EXTENSIONS:
-                sprintf(num_str, "%0.2f Hz, %dx%d, EXTENSIONS: ", filter(t, th), w_win, h_win);
-                DrawStr(num_str);
-                DrawStr(glGetString(GL_EXTENSIONS));
-            break;
-        }
-
-        glPopMatrix();
-        glMatrixMode(GL_MODELVIEW);
-
-        glEnable(GL_LIGHTING);
-        //glEnable(GL_DEPTH_TEST);
-    }
-
-    count++;
-
-    glutSwapBuffers();
-}
-
-/*
-void
-Visible(int state)
-{
-    if (state == GLUT_VISIBLE) {
-        if (moving)
-            glutIdleFunc(Animate);
-    } else {
-        if (moving)
-            glutIdleFunc(NULL);
-    }
-}
-
-
-void
-timingSelect(int value)
-{
-    switch(value)
-    {
-        case 1:
-            StrMode = GL_VENDOR;
-        break;
-        case 2:
-            StrMode = GL_RENDERER;
-        break;
-        case 3:
-            StrMode = GL_VERSION;
-        break;
-        case 4:
-            StrMode = GL_EXTENSIONS;
-        break;
-    }
-}
-
-void
-menuSelect(int value)
-{
-    switch (value) {
-    case 1:
-        moving = GL_TRUE;
-        glutIdleFunc(Animate);
-        break;
-    case 2:
-        moving = GL_FALSE;
-        glutIdleFunc(NULL);
-        break;
-    case 4:
-        exit(0);
-        break;
-    }
-}
-
-int
-main(int argc, char **argv)
-{
-    GLboolean fullscreen = GL_FALSE;
-    GLint time_menu;
-
-    srand(0);
-
-        glutInit(&argc, argv);
-    if (argc > 1 && !strcmp(argv[1], "-w"))
-        fullscreen = GL_FALSE;
-
-    //glutInitDisplayMode(GLUT_RGBA | GLUT_DOUBLE | GLUT_DEPTH);
-    glutInitDisplayString("rgba double depth=24");
-    if (fullscreen) {
-      glutGameModeString("1024x768:32");
-      glutEnterGameMode();
-    } else {
-      glutInitWindowSize(320, 240);
-      glutCreateWindow("Atlantis Timing");
-    }
-    Init();
-    glutDisplayFunc(Display);
-    glutReshapeFunc(Reshape);
-    glutKeyboardFunc(Key);
-    moving = GL_TRUE;
-glutIdleFunc(Animate);
-    glutVisibilityFunc(Visible);
-
-    time_menu = glutCreateMenu(timingSelect);
-    glutAddMenuEntry("GL_VENDOR", 1);
-    glutAddMenuEntry("GL_RENDERER", 2);
-    glutAddMenuEntry("GL_VERSION", 3);
-    glutAddMenuEntry("GL_EXTENSIONS", 4);
-
-    glutCreateMenu(menuSelect);
-    glutAddMenuEntry("Start motion", 1);
-    glutAddMenuEntry("Stop motion", 2);
-    glutAddSubMenu("Timing Mode", time_menu);
-    glutAddMenuEntry("Quit", 4);
-
-    //glutAttachMenu(GLUT_RIGHT_BUTTON);
-    glutAttachMenu(GLUT_RIGHT_BUTTON);
-    glutMainLoop();
-    return 0;             // ANSI C requires main to return int.
-}
-*/
\ No newline at end of file
diff --git a/Xcode/TemplatesForXcodeTiger/SDL OpenGL Application/atlantis/atlantis.h b/Xcode/TemplatesForXcodeTiger/SDL OpenGL Application/atlantis/atlantis.h
deleted file mode 100644
index 6ccf2d5f0..000000000
--- a/Xcode/TemplatesForXcodeTiger/SDL OpenGL Application/atlantis/atlantis.h	
+++ /dev/null
@@ -1,65 +0,0 @@
-/**
- * (c) Copyright 1993, 1994, Silicon Graphics, Inc.
- * ALL RIGHTS RESERVED
- * Permission to use, copy, modify, and distribute this software for
- * any purpose and without fee is hereby granted, provided that the above
- * copyright notice appear in all copies and that both the copyright notice
- * and this permission notice appear in supporting documentation, and that
- * the name of Silicon Graphics, Inc. not be used in advertising
- * or publicity pertaining to distribution of the software without specific,
- * written prior permission.
- *
- * THE MATERIAL EMBODIED ON THIS SOFTWARE IS PROVIDED TO YOU "AS-IS"
- * AND WITHOUT WARRANTY OF ANY KIND, EXPRESS, IMPLIED OR OTHERWISE,
- * INCLUDING WITHOUT LIMITATION, ANY WARRANTY OF MERCHANTABILITY OR
- * FITNESS FOR A PARTICULAR PURPOSE.  IN NO EVENT SHALL SILICON
- * GRAPHICS, INC.  BE LIABLE TO YOU OR ANYONE ELSE FOR ANY DIRECT,
- * SPECIAL, INCIDENTAL, INDIRECT OR CONSEQUENTIAL DAMAGES OF ANY
- * KIND, OR ANY DAMAGES WHATSOEVER, INCLUDING WITHOUT LIMITATION,
- * LOSS OF PROFIT, LOSS OF USE, SAVINGS OR REVENUE, OR THE CLAIMS OF
- * THIRD PARTIES, WHETHER OR NOT SILICON GRAPHICS, INC.  HAS BEEN
- * ADVISED OF THE POSSIBILITY OF SUCH LOSS, HOWEVER CAUSED AND ON
- * ANY THEORY OF LIABILITY, ARISING OUT OF OR IN CONNECTION WITH THE
- * POSSESSION, USE OR PERFORMANCE OF THIS SOFTWARE.
- *
- * US Government Users Restricted Rights
- * Use, duplication, or disclosure by the Government is subject to
- * restrictions set forth in FAR 52.227.19(c)(2) or subparagraph
- * (c)(1)(ii) of the Rights in Technical Data and Computer Software
- * clause at DFARS 252.227-7013 and/or in similar or successor
- * clauses in the FAR or the DOD or NASA FAR Supplement.
- * Unpublished-- rights reserved under the copyright laws of the
- * United States.  Contractor/manufacturer is Silicon Graphics,
- * Inc., 2011 N.  Shoreline Blvd., Mountain View, CA 94039-7311.
- *
- * OpenGL(TM) is a trademark of Silicon Graphics, Inc.
- */
-#define RAD 57.295
-#define RRAD 0.01745
-
-#define NUM_SHARKS 4
-#define SHARKSIZE 6000
-#define SHARKSPEED 100.0
-
-#define WHALESPEED 250.0
-
-typedef struct _fishRec {
-    float x, y, z, phi, theta, psi, v;
-    float xt, yt, zt;
-    float htail, vtail;
-    float dtheta;
-    int spurt, attack;
-} fishRec;
-
-extern fishRec sharks[NUM_SHARKS];
-extern fishRec momWhale;
-extern fishRec babyWhale;
-extern fishRec dolph;
-
-extern void FishTransform(fishRec *);
-extern void WhalePilot(fishRec *);
-extern void SharkPilot(fishRec *);
-extern void SharkMiss(int);
-extern void DrawWhale(fishRec *);
-extern void DrawShark(fishRec *);
-extern void DrawDolphin(fishRec *);
diff --git a/Xcode/TemplatesForXcodeTiger/SDL OpenGL Application/atlantis/dolphin.c b/Xcode/TemplatesForXcodeTiger/SDL OpenGL Application/atlantis/dolphin.c
deleted file mode 100644
index 9fba3ba98..000000000
--- a/Xcode/TemplatesForXcodeTiger/SDL OpenGL Application/atlantis/dolphin.c	
+++ /dev/null
@@ -1,1934 +0,0 @@
-/**
- * (c) Copyright 1993, 1994, Silicon Graphics, Inc.
- * ALL RIGHTS RESERVED
- * Permission to use, copy, modify, and distribute this software for
- * any purpose and without fee is hereby granted, provided that the above
- * copyright notice appear in all copies and that both the copyright notice
- * and this permission notice appear in supporting documentation, and that
- * the name of Silicon Graphics, Inc. not be used in advertising
- * or publicity pertaining to distribution of the software without specific,
- * written prior permission.
- *
- * THE MATERIAL EMBODIED ON THIS SOFTWARE IS PROVIDED TO YOU "AS-IS"
- * AND WITHOUT WARRANTY OF ANY KIND, EXPRESS, IMPLIED OR OTHERWISE,
- * INCLUDING WITHOUT LIMITATION, ANY WARRANTY OF MERCHANTABILITY OR
- * FITNESS FOR A PARTICULAR PURPOSE.  IN NO EVENT SHALL SILICON
- * GRAPHICS, INC.  BE LIABLE TO YOU OR ANYONE ELSE FOR ANY DIRECT,
- * SPECIAL, INCIDENTAL, INDIRECT OR CONSEQUENTIAL DAMAGES OF ANY
- * KIND, OR ANY DAMAGES WHATSOEVER, INCLUDING WITHOUT LIMITATION,
- * LOSS OF PROFIT, LOSS OF USE, SAVINGS OR REVENUE, OR THE CLAIMS OF
- * THIRD PARTIES, WHETHER OR NOT SILICON GRAPHICS, INC.  HAS BEEN
- * ADVISED OF THE POSSIBILITY OF SUCH LOSS, HOWEVER CAUSED AND ON
- * ANY THEORY OF LIABILITY, ARISING OUT OF OR IN CONNECTION WITH THE
- * POSSESSION, USE OR PERFORMANCE OF THIS SOFTWARE.
- *
- * US Government Users Restricted Rights
- * Use, duplication, or disclosure by the Government is subject to
- * restrictions set forth in FAR 52.227.19(c)(2) or subparagraph
- * (c)(1)(ii) of the Rights in Technical Data and Computer Software
- * clause at DFARS 252.227-7013 and/or in similar or successor
- * clauses in the FAR or the DOD or NASA FAR Supplement.
- * Unpublished-- rights reserved under the copyright laws of the
- * United States.  Contractor/manufacturer is Silicon Graphics,
- * Inc., 2011 N.  Shoreline Blvd., Mountain View, CA 94039-7311.
- *
- * OpenGL(TM) is a trademark of Silicon Graphics, Inc.
- */
-#include 
-#include 
-#include "atlantis.h"
-/* *INDENT-OFF* */
-static float N001[3] = {-0.005937 ,-0.101998 ,-0.994767};
-static float N002[3] = {0.936780 ,-0.200803 ,0.286569};
-static float N003[3] = {-0.233062 ,0.972058 ,0.028007};
-static float N005[3] = {0.898117 ,0.360171 ,0.252315};
-static float N006[3] = {-0.915437 ,0.348456 ,0.201378};
-static float N007[3] = {0.602263 ,-0.777527 ,0.180920};
-static float N008[3] = {-0.906912 ,-0.412015 ,0.088061};
-static float N012[3] = {0.884408 ,-0.429417 ,-0.182821};
-static float N013[3] = {0.921121 ,0.311084 ,-0.234016};
-static float N014[3] = {0.382635 ,0.877882 ,-0.287948};
-static float N015[3] = {-0.380046 ,0.888166 ,-0.258316};
-static float N016[3] = {-0.891515 ,0.392238 ,-0.226607};
-static float N017[3] = {-0.901419 ,-0.382002 ,-0.203763};
-static float N018[3] = {-0.367225 ,-0.911091 ,-0.187243};
-static float N019[3] = {0.339539 ,-0.924846 ,-0.171388};
-static float N020[3] = {0.914706 ,-0.378617 ,-0.141290};
-static float N021[3] = {0.950662 ,0.262713 ,-0.164994};
-static float N022[3] = {0.546359 ,0.801460 ,-0.243218};
-static float N023[3] = {-0.315796 ,0.917068 ,-0.243431};
-static float N024[3] = {-0.825687 ,0.532277 ,-0.186875};
-static float N025[3] = {-0.974763 ,-0.155232 ,-0.160435};
-static float N026[3] = {-0.560596 ,-0.816658 ,-0.137119};
-static float N027[3] = {0.380210 ,-0.910817 ,-0.160786};
-static float N028[3] = {0.923772 ,-0.358322 ,-0.135093};
-static float N029[3] = {0.951202 ,0.275053 ,-0.139859};
-static float N030[3] = {0.686099 ,0.702548 ,-0.188932};
-static float N031[3] = {-0.521865 ,0.826719 ,-0.210220};
-static float N032[3] = {-0.923820 ,0.346739 ,-0.162258};
-static float N033[3] = {-0.902095 ,-0.409995 ,-0.134646};
-static float N034[3] = {-0.509115 ,-0.848498 ,-0.144404};
-static float N035[3] = {0.456469 ,-0.880293 ,-0.129305};
-static float N036[3] = {0.873401 ,-0.475489 ,-0.105266};
-static float N037[3] = {0.970825 ,0.179861 ,-0.158584};
-static float N038[3] = {0.675609 ,0.714187 ,-0.183004};
-static float N039[3] = {-0.523574 ,0.830212 ,-0.191360};
-static float N040[3] = {-0.958895 ,0.230808 ,-0.165071};
-static float N041[3] = {-0.918285 ,-0.376803 ,-0.121542};
-static float N042[3] = {-0.622467 ,-0.774167 ,-0.114888};
-static float N043[3] = {0.404497 ,-0.908807 ,-0.102231};
-static float N044[3] = {0.930538 ,-0.365155 ,-0.027588};
-static float N045[3] = {0.921920 ,0.374157 ,-0.100345};
-static float N046[3] = {0.507346 ,0.860739 ,0.041562};
-static float N047[3] = {-0.394646 ,0.918815 ,-0.005730};
-static float N048[3] = {-0.925411 ,0.373024 ,-0.066837};
-static float N049[3] = {-0.945337 ,-0.322309 ,-0.049551};
-static float N050[3] = {-0.660437 ,-0.750557 ,-0.022072};
-static float N051[3] = {0.488835 ,-0.871950 ,-0.027261};
-static float N052[3] = {0.902599 ,-0.421397 ,0.087969};
-static float N053[3] = {0.938636 ,0.322606 ,0.122020};
-static float N054[3] = {0.484605 ,0.871078 ,0.079878};
-static float N055[3] = {-0.353607 ,0.931559 ,0.084619};
-static float N056[3] = {-0.867759 ,0.478564 ,0.134054};
-static float N057[3] = {-0.951583 ,-0.296030 ,0.082794};
-static float N058[3] = {-0.672355 ,-0.730209 ,0.121384};
-static float N059[3] = {0.528336 ,-0.842452 ,0.105525};
-static float N060[3] = {0.786913 ,-0.564760 ,0.248627};
-static float N062[3] = {0.622098 ,0.765230 ,0.165584};
-static float N063[3] = {-0.631711 ,0.767816 ,0.106773};
-static float N064[3] = {-0.687886 ,0.606351 ,0.398938};
-static float N065[3] = {-0.946327 ,-0.281623 ,0.158598};
-static float N066[3] = {-0.509549 ,-0.860437 ,0.002776};
-static float N067[3] = {0.462594 ,-0.876692 ,0.131977};
-static float N071[3] = {0.000000 ,1.000000 ,0.000000};
-static float N077[3] = {-0.880770 ,0.461448 ,0.106351};
-static float N078[3] = {-0.880770 ,0.461448 ,0.106351};
-static float N079[3] = {-0.880770 ,0.461448 ,0.106351};
-static float N080[3] = {-0.880770 ,0.461448 ,0.106351};
-static float N081[3] = {-0.571197 ,0.816173 ,0.087152};
-static float N082[3] = {-0.880770 ,0.461448 ,0.106351};
-static float N083[3] = {-0.571197 ,0.816173 ,0.087152};
-static float N084[3] = {-0.571197 ,0.816173 ,0.087152};
-static float N085[3] = {-0.880770 ,0.461448 ,0.106351};
-static float N086[3] = {-0.571197 ,0.816173 ,0.087152};
-static float N087[3] = {-0.880770 ,0.461448 ,0.106351};
-static float N088[3] = {-0.880770 ,0.461448 ,0.106351};
-static float N089[3] = {-0.880770 ,0.461448 ,0.106351};
-static float N090[3] = {-0.880770 ,0.461448 ,0.106351};
-static float N091[3] = {0.000000 ,1.000000 ,0.000000};
-static float N092[3] = {0.000000 ,1.000000 ,0.000000};
-static float N093[3] = {0.000000 ,1.000000 ,0.000000};
-static float N094[3] = {1.000000 ,0.000000 ,0.000000};
-static float N095[3] = {-1.000000 ,0.000000 ,0.000000};
-static float N097[3] = {-0.697296 ,0.702881 ,0.140491};
-static float N098[3] = {0.918864 ,0.340821 ,0.198819};
-static float N099[3] = {-0.932737 ,0.201195 ,0.299202};
-static float N100[3] = {0.029517 ,0.981679 ,0.188244};
-static float N102[3] = {0.813521 ,-0.204936 ,0.544229};
-static float N110[3] = {-0.781480 ,-0.384779 ,0.491155};
-static float N111[3] = {-0.722243 ,0.384927 ,0.574627};
-static float N112[3] = {-0.752278 ,0.502679 ,0.425901};
-static float N113[3] = {0.547257 ,0.367910 ,0.751766};
-static float N114[3] = {0.725949 ,-0.232568 ,0.647233};
-static float N115[3] = {-0.747182 ,-0.660786 ,0.071280};
-static float N116[3] = {0.931519 ,0.200748 ,0.303270};
-static float N117[3] = {-0.828928 ,0.313757 ,0.463071};
-static float N118[3] = {0.902554 ,-0.370967 ,0.218587};
-static float N119[3] = {-0.879257 ,-0.441851 ,0.177973};
-static float N120[3] = {0.642327 ,0.611901 ,0.461512};
-static float N121[3] = {0.964817 ,-0.202322 ,0.167910};
-static float N122[3] = {0.000000 ,1.000000 ,0.000000};
-static float P001[3] = {5.68, -300.95, 1324.70};
-static float P002[3] = {338.69, -219.63, 9677.03};
-static float P003[3] = {12.18, 474.59, 9138.14};
-static float P005[3] = {487.51, 198.05, 9350.78};
-static float P006[3] = {-457.61, 68.74, 9427.85};
-static float P007[3] = {156.52, -266.72, 10311.68};
-static float P008[3] = {-185.56, -266.51, 10310.47};
-static float P009[3] = {124.39, -261.46, 1942.34};
-static float P010[3] = {-130.05, -261.46, 1946.03};
-static float P011[3] = {141.07, -320.11, 1239.38};
-static float P012[3] = {156.48, -360.12, 2073.41};
-static float P013[3] = {162.00, -175.88, 2064.44};
-static float P014[3] = {88.16, -87.72, 2064.02};
-static float P015[3] = {-65.21, -96.13, 2064.02};
-static float P016[3] = {-156.48, -180.96, 2064.44};
-static float P017[3] = {-162.00, -368.93, 2082.39};
-static float P018[3] = {-88.16, -439.22, 2082.39};
-static float P019[3] = {65.21, -440.32, 2083.39};
-static float P020[3] = {246.87, -356.02, 2576.95};
-static float P021[3] = {253.17, -111.15, 2567.15};
-static float P022[3] = {132.34, 51.41, 2559.84};
-static float P023[3] = {-97.88, 40.44, 2567.15};
-static float P024[3] = {-222.97, -117.49, 2567.15};
-static float P025[3] = {-252.22, -371.53, 2569.92};
-static float P026[3] = {-108.44, -518.19, 2586.75};
-static float P027[3] = {97.88, -524.79, 2586.75};
-static float P028[3] = {370.03, -421.19, 3419.70};
-static float P029[3] = {351.15, -16.98, 3423.17};
-static float P030[3] = {200.66, 248.46, 3430.37};
-static float P031[3] = {-148.42, 235.02, 3417.91};
-static float P032[3] = {-360.21, -30.27, 3416.84};
-static float P033[3] = {-357.90, -414.89, 3407.04};
-static float P034[3] = {-148.88, -631.35, 3409.90};
-static float P035[3] = {156.38, -632.59, 3419.70};
-static float P036[3] = {462.61, -469.21, 4431.51};
-static float P037[3] = {466.60, 102.25, 4434.98};
-static float P038[3] = {243.05, 474.34, 4562.02};
-static float P039[3] = {-191.23, 474.40, 4554.42};
-static float P040[3] = {-476.12, 111.05, 4451.11};
-static float P041[3] = {-473.36, -470.74, 4444.78};
-static float P042[3] = {-266.95, -748.41, 4447.78};
-static float P043[3] = {211.14, -749.91, 4429.73};
-static float P044[3] = {680.57, -370.27, 5943.46};
-static float P045[3] = {834.01, 363.09, 6360.63};
-static float P046[3] = {371.29, 804.51, 6486.26};
-static float P047[3] = {-291.43, 797.22, 6494.28};
-static float P048[3] = {-784.13, 370.75, 6378.01};
-static float P049[3] = {-743.29, -325.82, 5943.46};
-static float P050[3] = {-383.24, -804.77, 5943.46};
-static float P051[3] = {283.47, -846.09, 5943.46};
-static float iP001[3] = {5.68, -300.95, 1324.70};
-static float iP009[3] = {124.39, -261.46, 1942.34};
-static float iP010[3] = {-130.05, -261.46, 1946.03};
-static float iP011[3] = {141.07, -320.11, 1239.38};
-static float iP012[3] = {156.48, -360.12, 2073.41};
-static float iP013[3] = {162.00, -175.88, 2064.44};
-static float iP014[3] = {88.16, -87.72, 2064.02};
-static float iP015[3] = {-65.21, -96.13, 2064.02};
-static float iP016[3] = {-156.48, -180.96, 2064.44};
-static float iP017[3] = {-162.00, -368.93, 2082.39};
-static float iP018[3] = {-88.16, -439.22, 2082.39};
-static float iP019[3] = {65.21, -440.32, 2083.39};
-static float iP020[3] = {246.87, -356.02, 2576.95};
-static float iP021[3] = {253.17, -111.15, 2567.15};
-static float iP022[3] = {132.34, 51.41, 2559.84};
-static float iP023[3] = {-97.88, 40.44, 2567.15};
-static float iP024[3] = {-222.97, -117.49, 2567.15};
-static float iP025[3] = {-252.22, -371.53, 2569.92};
-static float iP026[3] = {-108.44, -518.19, 2586.75};
-static float iP027[3] = {97.88, -524.79, 2586.75};
-static float iP028[3] = {370.03, -421.19, 3419.70};
-static float iP029[3] = {351.15, -16.98, 3423.17};
-static float iP030[3] = {200.66, 248.46, 3430.37};
-static float iP031[3] = {-148.42, 235.02, 3417.91};
-static float iP032[3] = {-360.21, -30.27, 3416.84};
-static float iP033[3] = {-357.90, -414.89, 3407.04};
-static float iP034[3] = {-148.88, -631.35, 3409.90};
-static float iP035[3] = {156.38, -632.59, 3419.70};
-static float iP036[3] = {462.61, -469.21, 4431.51};
-static float iP037[3] = {466.60, 102.25, 4434.98};
-static float iP038[3] = {243.05, 474.34, 4562.02};
-static float iP039[3] = {-191.23, 474.40, 4554.42};
-static float iP040[3] = {-476.12, 111.05, 4451.11};
-static float iP041[3] = {-473.36, -470.74, 4444.78};
-static float iP042[3] = {-266.95, -748.41, 4447.78};
-static float iP043[3] = {211.14, -749.91, 4429.73};
-static float iP044[3] = {680.57, -370.27, 5943.46};
-static float iP045[3] = {834.01, 363.09, 6360.63};
-static float iP046[3] = {371.29, 804.51, 6486.26};
-static float iP047[3] = {-291.43, 797.22, 6494.28};
-static float iP048[3] = {-784.13, 370.75, 6378.01};
-static float iP049[3] = {-743.29, -325.82, 5943.46};
-static float iP050[3] = {-383.24, -804.77, 5943.46};
-static float iP051[3] = {283.47, -846.09, 5943.46};
-static float P052[3] = {599.09, -300.15, 7894.03};
-static float P053[3] = {735.48, 306.26, 7911.92};
-static float P054[3] = {246.22, 558.53, 8460.50};
-static float P055[3] = {-230.41, 559.84, 8473.23};
-static float P056[3] = {-698.66, 320.83, 7902.59};
-static float P057[3] = {-643.29, -299.16, 7902.59};
-static float P058[3] = {-341.47, -719.30, 7902.59};
-static float P059[3] = {252.57, -756.12, 7902.59};
-static float P060[3] = {458.39, -265.31, 9355.44};
-static float P062[3] = {224.04, 338.75, 9450.30};
-static float P063[3] = {-165.71, 341.04, 9462.35};
-static float P064[3] = {-298.11, 110.13, 10180.37};
-static float P065[3] = {-473.99, -219.71, 9355.44};
-static float P066[3] = {-211.97, -479.87, 9355.44};
-static float P067[3] = {192.86, -491.45, 9348.73};
-static float P068[3] = {-136.29, -319.84, 1228.73};
-static float P069[3] = {1111.17, -314.14, 1314.19};
-static float P070[3] = {-1167.34, -321.61, 1319.45};
-static float P071[3] = {1404.86, -306.66, 1235.45};
-static float P072[3] = {-1409.73, -314.14, 1247.66};
-static float P073[3] = {1254.01, -296.87, 1544.58};
-static float P074[3] = {-1262.09, -291.70, 1504.26};
-static float P075[3] = {965.71, -269.26, 1742.65};
-static float P076[3] = {-900.97, -276.74, 1726.07};
-static float iP068[3] = {-136.29, -319.84, 1228.73};
-static float iP069[3] = {1111.17, -314.14, 1314.19};
-static float iP070[3] = {-1167.34, -321.61, 1319.45};
-static float iP071[3] = {1404.86, -306.66, 1235.45};
-static float iP072[3] = {-1409.73, -314.14, 1247.66};
-static float iP073[3] = {1254.01, -296.87, 1544.58};
-static float iP074[3] = {-1262.09, -291.70, 1504.26};
-static float iP075[3] = {965.71, -269.26, 1742.65};
-static float iP076[3] = {-900.97, -276.74, 1726.07};
-static float P077[3] = {1058.00, -448.81, 8194.66};
-static float P078[3] = {-1016.51, -456.43, 8190.62};
-static float P079[3] = {-1515.96, -676.45, 7754.93};
-static float P080[3] = {1856.75, -830.34, 7296.56};
-static float P081[3] = {1472.16, -497.38, 7399.68};
-static float P082[3] = {-1775.26, -829.51, 7298.46};
-static float P083[3] = {911.09, -252.51, 7510.99};
-static float P084[3] = {-1451.94, -495.62, 7384.30};
-static float P085[3] = {1598.75, -669.26, 7769.90};
-static float P086[3] = {-836.53, -250.08, 7463.25};
-static float P087[3] = {722.87, -158.18, 8006.41};
-static float P088[3] = {-688.86, -162.28, 7993.89};
-static float P089[3] = {-626.92, -185.30, 8364.98};
-static float P090[3] = {647.72, -189.46, 8354.99};
-static float P091[3] = {0.00, 835.01, 5555.62};
-static float P092[3] = {0.00, 1350.18, 5220.86};
-static float P093[3] = {0.00, 1422.94, 5285.27};
-static float P094[3] = {0.00, 1296.75, 5650.19};
-static float P095[3] = {0.00, 795.63, 6493.88};
-static float iP091[3] = {0.00, 835.01, 5555.62};
-static float iP092[3] = {0.00, 1350.18, 5220.86};
-static float iP093[3] = {0.00, 1422.94, 5285.27};
-static float iP094[3] = {0.00, 1296.75, 5650.19};
-static float iP095[3] = {0.00, 795.63, 6493.88};
-static float P097[3] = {-194.91, -357.14, 10313.32};
-static float P098[3] = {135.35, -357.66, 10307.94};
-static float iP097[3] = {-194.91, -357.14, 10313.32};
-static float iP098[3] = {135.35, -357.66, 10307.94};
-static float P099[3] = {-380.53, -221.14, 9677.98};
-static float P100[3] = {0.00, 412.99, 9629.33};
-static float P102[3] = {59.51, -412.55, 10677.58};
-static float iP102[3] = {59.51, -412.55, 10677.58};
-static float P103[3] = {6.50, 484.74, 9009.94};
-static float P105[3] = {-41.86, 476.51, 9078.17};
-static float P108[3] = {49.20, 476.83, 9078.24};
-static float P110[3] = {-187.62, -410.04, 10674.12};
-static float iP110[3] = {-187.62, -410.04, 10674.12};
-static float P111[3] = {-184.25, -318.70, 10723.88};
-static float iP111[3] = {-184.25, -318.70, 10723.88};
-static float P112[3] = {-179.61, -142.81, 10670.26};
-static float P113[3] = {57.43, -147.94, 10675.26};
-static float P114[3] = {54.06, -218.90, 10712.44};
-static float P115[3] = {-186.35, -212.09, 10713.76};
-static float P116[3] = {205.90, -84.61, 10275.97};
-static float P117[3] = {-230.96, -83.26, 10280.09};
-static float iP118[3] = {216.78, -509.17, 10098.94};
-static float iP119[3] = {-313.21, -510.79, 10102.62};
-static float P118[3] = {216.78, -509.17, 10098.94};
-static float P119[3] = {-313.21, -510.79, 10102.62};
-static float P120[3] = {217.95, 96.34, 10161.62};
-static float P121[3] = {71.99, -319.74, 10717.70};
-static float iP121[3] = {71.99, -319.74, 10717.70};
-static float P122[3] = {0.00, 602.74, 5375.84};
-static float iP122[3] = {0.00, 602.74, 5375.84};
-static float P123[3] = {-448.94, -203.14, 9499.60};
-static float P124[3] = {-442.64, -185.20, 9528.07};
-static float P125[3] = {-441.07, -148.05, 9528.07};
-static float P126[3] = {-443.43, -128.84, 9499.60};
-static float P127[3] = {-456.87, -146.78, 9466.67};
-static float P128[3] = {-453.68, -183.93, 9466.67};
-static float P129[3] = {428.43, -124.08, 9503.03};
-static float P130[3] = {419.73, -142.14, 9534.56};
-static float P131[3] = {419.92, -179.96, 9534.56};
-static float P132[3] = {431.20, -199.73, 9505.26};
-static float P133[3] = {442.28, -181.67, 9475.96};
-static float P134[3] = {442.08, -143.84, 9475.96};
-/* *INDENT-ON* */
-
-void
-Dolphin001(void)
-{
-    glNormal3fv(N071);
-    glBegin(GL_POLYGON);
-    glVertex3fv(P001);
-    glVertex3fv(P068);
-    glVertex3fv(P010);
-    glEnd();
-    glBegin(GL_POLYGON);
-    glVertex3fv(P068);
-    glVertex3fv(P076);
-    glVertex3fv(P010);
-    glEnd();
-    glBegin(GL_POLYGON);
-    glVertex3fv(P068);
-    glVertex3fv(P070);
-    glVertex3fv(P076);
-    glEnd();
-    glBegin(GL_POLYGON);
-    glVertex3fv(P076);
-    glVertex3fv(P070);
-    glVertex3fv(P074);
-    glEnd();
-    glBegin(GL_POLYGON);
-    glVertex3fv(P070);
-    glVertex3fv(P072);
-    glVertex3fv(P074);
-    glEnd();
-    glNormal3fv(N119);
-    glBegin(GL_POLYGON);
-    glVertex3fv(P072);
-    glVertex3fv(P070);
-    glVertex3fv(P074);
-    glEnd();
-    glBegin(GL_POLYGON);
-    glVertex3fv(P074);
-    glVertex3fv(P070);
-    glVertex3fv(P076);
-    glEnd();
-    glBegin(GL_POLYGON);
-    glVertex3fv(P070);
-    glVertex3fv(P068);
-    glVertex3fv(P076);
-    glEnd();
-    glBegin(GL_POLYGON);
-    glVertex3fv(P076);
-    glVertex3fv(P068);
-    glVertex3fv(P010);
-    glEnd();
-    glBegin(GL_POLYGON);
-    glVertex3fv(P068);
-    glVertex3fv(P001);
-    glVertex3fv(P010);
-    glEnd();
-}
-
-void
-Dolphin002(void)
-{
-    glNormal3fv(N071);
-    glBegin(GL_POLYGON);
-    glVertex3fv(P011);
-    glVertex3fv(P001);
-    glVertex3fv(P009);
-    glEnd();
-    glBegin(GL_POLYGON);
-    glVertex3fv(P075);
-    glVertex3fv(P011);
-    glVertex3fv(P009);
-    glEnd();
-    glBegin(GL_POLYGON);
-    glVertex3fv(P069);
-    glVertex3fv(P011);
-    glVertex3fv(P075);
-    glEnd();
-    glBegin(GL_POLYGON);
-    glVertex3fv(P069);
-    glVertex3fv(P075);
-    glVertex3fv(P073);
-    glEnd();
-    glBegin(GL_POLYGON);
-    glVertex3fv(P071);
-    glVertex3fv(P069);
-    glVertex3fv(P073);
-    glEnd();
-    glNormal3fv(N119);
-    glBegin(GL_POLYGON);
-    glVertex3fv(P001);
-    glVertex3fv(P011);
-    glVertex3fv(P009);
-    glEnd();
-    glBegin(GL_POLYGON);
-    glVertex3fv(P009);
-    glVertex3fv(P011);
-    glVertex3fv(P075);
-    glEnd();
-    glBegin(GL_POLYGON);
-    glVertex3fv(P011);
-    glVertex3fv(P069);
-    glVertex3fv(P075);
-    glEnd();
-    glBegin(GL_POLYGON);
-    glVertex3fv(P069);
-    glVertex3fv(P073);
-    glVertex3fv(P075);
-    glEnd();
-    glBegin(GL_POLYGON);
-    glVertex3fv(P069);
-    glVertex3fv(P071);
-    glVertex3fv(P073);
-    glEnd();
-}
-
-void
-Dolphin003(void)
-{
-    glBegin(GL_POLYGON);
-    glNormal3fv(N018);
-    glVertex3fv(P018);
-    glNormal3fv(N001);
-    glVertex3fv(P001);
-    glNormal3fv(N019);
-    glVertex3fv(P019);
-    glEnd();
-    glBegin(GL_POLYGON);
-    glNormal3fv(N019);
-    glVertex3fv(P019);
-    glNormal3fv(N001);
-    glVertex3fv(P001);
-    glNormal3fv(N012);
-    glVertex3fv(P012);
-    glEnd();
-    glBegin(GL_POLYGON);
-    glNormal3fv(N017);
-    glVertex3fv(P017);
-    glNormal3fv(N001);
-    glVertex3fv(P001);
-    glNormal3fv(N018);
-    glVertex3fv(P018);
-    glEnd();
-    glBegin(GL_POLYGON);
-    glNormal3fv(N001);
-    glVertex3fv(P001);
-    glNormal3fv(N017);
-    glVertex3fv(P017);
-    glNormal3fv(N016);
-    glVertex3fv(P016);
-    glEnd();
-    glBegin(GL_POLYGON);
-    glNormal3fv(N001);
-    glVertex3fv(P001);
-    glNormal3fv(N013);
-    glVertex3fv(P013);
-    glNormal3fv(N012);
-    glVertex3fv(P012);
-    glEnd();
-    glBegin(GL_POLYGON);
-    glNormal3fv(N001);
-    glVertex3fv(P001);
-    glNormal3fv(N016);
-    glVertex3fv(P016);
-    glNormal3fv(N015);
-    glVertex3fv(P015);
-    glEnd();
-    glBegin(GL_POLYGON);
-    glNormal3fv(N001);
-    glVertex3fv(P001);
-    glNormal3fv(N014);
-    glVertex3fv(P014);
-    glNormal3fv(N013);
-    glVertex3fv(P013);
-    glEnd();
-    glBegin(GL_POLYGON);
-    glNormal3fv(N001);
-    glVertex3fv(P001);
-    glNormal3fv(N015);
-    glVertex3fv(P015);
-    glNormal3fv(N014);
-    glVertex3fv(P014);
-    glEnd();
-}
-
-void
-Dolphin004(void)
-{
-    glBegin(GL_POLYGON);
-    glNormal3fv(N014);
-    glVertex3fv(P014);
-    glNormal3fv(N015);
-    glVertex3fv(P015);
-    glNormal3fv(N023);
-    glVertex3fv(P023);
-    glNormal3fv(N022);
-    glVertex3fv(P022);
-    glEnd();
-    glBegin(GL_POLYGON);
-    glNormal3fv(N015);
-    glVertex3fv(P015);
-    glNormal3fv(N016);
-    glVertex3fv(P016);
-    glNormal3fv(N024);
-    glVertex3fv(P024);
-    glNormal3fv(N023);
-    glVertex3fv(P023);
-    glEnd();
-    glBegin(GL_POLYGON);
-    glNormal3fv(N016);
-    glVertex3fv(P016);
-    glNormal3fv(N017);
-    glVertex3fv(P017);
-    glNormal3fv(N025);
-    glVertex3fv(P025);
-    glNormal3fv(N024);
-    glVertex3fv(P024);
-    glEnd();
-    glBegin(GL_POLYGON);
-    glNormal3fv(N017);
-    glVertex3fv(P017);
-    glNormal3fv(N018);
-    glVertex3fv(P018);
-    glNormal3fv(N026);
-    glVertex3fv(P026);
-    glNormal3fv(N025);
-    glVertex3fv(P025);
-    glEnd();
-    glBegin(GL_POLYGON);
-    glNormal3fv(N013);
-    glVertex3fv(P013);
-    glNormal3fv(N014);
-    glVertex3fv(P014);
-    glNormal3fv(N022);
-    glVertex3fv(P022);
-    glNormal3fv(N021);
-    glVertex3fv(P021);
-    glEnd();
-    glBegin(GL_POLYGON);
-    glNormal3fv(N012);
-    glVertex3fv(P012);
-    glNormal3fv(N013);
-    glVertex3fv(P013);
-    glNormal3fv(N021);
-    glVertex3fv(P021);
-    glNormal3fv(N020);
-    glVertex3fv(P020);
-    glEnd();
-    glBegin(GL_POLYGON);
-    glNormal3fv(N018);
-    glVertex3fv(P018);
-    glNormal3fv(N019);
-    glVertex3fv(P019);
-    glNormal3fv(N027);
-    glVertex3fv(P027);
-    glNormal3fv(N026);
-    glVertex3fv(P026);
-    glEnd();
-    glBegin(GL_POLYGON);
-    glNormal3fv(N019);
-    glVertex3fv(P019);
-    glNormal3fv(N012);
-    glVertex3fv(P012);
-    glNormal3fv(N020);
-    glVertex3fv(P020);
-    glNormal3fv(N027);
-    glVertex3fv(P027);
-    glEnd();
-}
-
-void
-Dolphin005(void)
-{
-    glBegin(GL_POLYGON);
-    glNormal3fv(N022);
-    glVertex3fv(P022);
-    glNormal3fv(N023);
-    glVertex3fv(P023);
-    glNormal3fv(N031);
-    glVertex3fv(P031);
-    glNormal3fv(N030);
-    glVertex3fv(P030);
-    glEnd();
-    glBegin(GL_POLYGON);
-    glNormal3fv(N021);
-    glVertex3fv(P021);
-    glNormal3fv(N022);
-    glVertex3fv(P022);
-    glNormal3fv(N030);
-    glVertex3fv(P030);
-    glEnd();
-    glBegin(GL_POLYGON);
-    glNormal3fv(N021);
-    glVertex3fv(P021);
-    glNormal3fv(N030);
-    glVertex3fv(P030);
-    glNormal3fv(N029);
-    glVertex3fv(P029);
-    glEnd();
-    glBegin(GL_POLYGON);
-    glNormal3fv(N023);
-    glVertex3fv(P023);
-    glNormal3fv(N024);
-    glVertex3fv(P024);
-    glNormal3fv(N031);
-    glVertex3fv(P031);
-    glEnd();
-    glBegin(GL_POLYGON);
-    glNormal3fv(N024);
-    glVertex3fv(P024);
-    glNormal3fv(N032);
-    glVertex3fv(P032);
-    glNormal3fv(N031);
-    glVertex3fv(P031);
-    glEnd();
-    glBegin(GL_POLYGON);
-    glNormal3fv(N024);
-    glVertex3fv(P024);
-    glNormal3fv(N025);
-    glVertex3fv(P025);
-    glNormal3fv(N032);
-    glVertex3fv(P032);
-    glEnd();
-    glBegin(GL_POLYGON);
-    glNormal3fv(N025);
-    glVertex3fv(P025);
-    glNormal3fv(N033);
-    glVertex3fv(P033);
-    glNormal3fv(N032);
-    glVertex3fv(P032);
-    glEnd();
-    glBegin(GL_POLYGON);
-    glNormal3fv(N020);
-    glVertex3fv(P020);
-    glNormal3fv(N021);
-    glVertex3fv(P021);
-    glNormal3fv(N029);
-    glVertex3fv(P029);
-    glEnd();
-    glBegin(GL_POLYGON);
-    glNormal3fv(N020);
-    glVertex3fv(P020);
-    glNormal3fv(N029);
-    glVertex3fv(P029);
-    glNormal3fv(N028);
-    glVertex3fv(P028);
-    glEnd();
-    glBegin(GL_POLYGON);
-    glNormal3fv(N027);
-    glVertex3fv(P027);
-    glNormal3fv(N020);
-    glVertex3fv(P020);
-    glNormal3fv(N028);
-    glVertex3fv(P028);
-    glEnd();
-    glBegin(GL_POLYGON);
-    glNormal3fv(N027);
-    glVertex3fv(P027);
-    glNormal3fv(N028);
-    glVertex3fv(P028);
-    glNormal3fv(N035);
-    glVertex3fv(P035);
-    glEnd();
-    glBegin(GL_POLYGON);
-    glNormal3fv(N025);
-    glVertex3fv(P025);
-    glNormal3fv(N026);
-    glVertex3fv(P026);
-    glNormal3fv(N033);
-    glVertex3fv(P033);
-    glEnd();
-    glBegin(GL_POLYGON);
-    glNormal3fv(N033);
-    glVertex3fv(P033);
-    glNormal3fv(N026);
-    glVertex3fv(P026);
-    glNormal3fv(N034);
-    glVertex3fv(P034);
-    glEnd();
-    glBegin(GL_POLYGON);
-    glNormal3fv(N026);
-    glVertex3fv(P026);
-    glNormal3fv(N027);
-    glVertex3fv(P027);
-    glNormal3fv(N035);
-    glVertex3fv(P035);
-    glNormal3fv(N034);
-    glVertex3fv(P034);
-    glEnd();
-}
-
-void
-Dolphin006(void)
-{
-    glBegin(GL_POLYGON);
-    glNormal3fv(N092);
-    glVertex3fv(P092);
-    glNormal3fv(N093);
-    glVertex3fv(P093);
-    glNormal3fv(N094);
-    glVertex3fv(P094);
-    glEnd();
-    glBegin(GL_POLYGON);
-    glNormal3fv(N093);
-    glVertex3fv(P093);
-    glNormal3fv(N092);
-    glVertex3fv(P092);
-    glNormal3fv(N094);
-    glVertex3fv(P094);
-    glEnd();
-    glBegin(GL_POLYGON);
-    glNormal3fv(N092);
-    glVertex3fv(P092);
-    glNormal3fv(N091);
-    glVertex3fv(P091);
-    glNormal3fv(N095);
-    glVertex3fv(P095);
-    glNormal3fv(N094);
-    glVertex3fv(P094);
-    glEnd();
-    glBegin(GL_POLYGON);
-    glNormal3fv(N091);
-    glVertex3fv(P091);
-    glNormal3fv(N092);
-    glVertex3fv(P092);
-    glNormal3fv(N094);
-    glVertex3fv(P094);
-    glNormal3fv(N095);
-    glVertex3fv(P095);
-    glEnd();
-    glBegin(GL_POLYGON);
-    glNormal3fv(N122);
-    glVertex3fv(P122);
-    glNormal3fv(N095);
-    glVertex3fv(P095);
-    glNormal3fv(N091);
-    glVertex3fv(P091);
-    glEnd();
-    glBegin(GL_POLYGON);
-    glNormal3fv(N122);
-    glVertex3fv(P122);
-    glNormal3fv(N091);
-    glVertex3fv(P091);
-    glNormal3fv(N095);
-    glVertex3fv(P095);
-    glEnd();
-}
-
-void
-Dolphin007(void)
-{
-    glBegin(GL_POLYGON);
-    glNormal3fv(N030);
-    glVertex3fv(P030);
-    glNormal3fv(N031);
-    glVertex3fv(P031);
-    glNormal3fv(N039);
-    glVertex3fv(P039);
-    glNormal3fv(N038);
-    glVertex3fv(P038);
-    glEnd();
-    glBegin(GL_POLYGON);
-    glNormal3fv(N029);
-    glVertex3fv(P029);
-    glNormal3fv(N030);
-    glVertex3fv(P030);
-    glNormal3fv(N038);
-    glVertex3fv(P038);
-    glEnd();
-    glBegin(GL_POLYGON);
-    glNormal3fv(N029);
-    glVertex3fv(P029);
-    glNormal3fv(N038);
-    glVertex3fv(P038);
-    glNormal3fv(N037);
-    glVertex3fv(P037);
-    glEnd();
-    glBegin(GL_POLYGON);
-    glNormal3fv(N028);
-    glVertex3fv(P028);
-    glNormal3fv(N029);
-    glVertex3fv(P029);
-    glNormal3fv(N037);
-    glVertex3fv(P037);
-    glEnd();
-    glBegin(GL_POLYGON);
-    glNormal3fv(N028);
-    glVertex3fv(P028);
-    glNormal3fv(N037);
-    glVertex3fv(P037);
-    glNormal3fv(N036);
-    glVertex3fv(P036);
-    glEnd();
-    glBegin(GL_POLYGON);
-    glNormal3fv(N035);
-    glVertex3fv(P035);
-    glNormal3fv(N028);
-    glVertex3fv(P028);
-    glNormal3fv(N036);
-    glVertex3fv(P036);
-    glEnd();
-    glBegin(GL_POLYGON);
-    glNormal3fv(N035);
-    glVertex3fv(P035);
-    glNormal3fv(N036);
-    glVertex3fv(P036);
-    glNormal3fv(N043);
-    glVertex3fv(P043);
-    glEnd();
-    glBegin(GL_POLYGON);
-    glNormal3fv(N034);
-    glVertex3fv(P034);
-    glNormal3fv(N035);
-    glVertex3fv(P035);
-    glNormal3fv(N043);
-    glVertex3fv(P043);
-    glNormal3fv(N042);
-    glVertex3fv(P042);
-    glEnd();
-    glBegin(GL_POLYGON);
-    glNormal3fv(N033);
-    glVertex3fv(P033);
-    glNormal3fv(N034);
-    glVertex3fv(P034);
-    glNormal3fv(N042);
-    glVertex3fv(P042);
-    glEnd();
-    glBegin(GL_POLYGON);
-    glNormal3fv(N033);
-    glVertex3fv(P033);
-    glNormal3fv(N042);
-    glVertex3fv(P042);
-    glNormal3fv(N041);
-    glVertex3fv(P041);
-    glEnd();
-    glBegin(GL_POLYGON);
-    glNormal3fv(N031);
-    glVertex3fv(P031);
-    glNormal3fv(N032);
-    glVertex3fv(P032);
-    glNormal3fv(N039);
-    glVertex3fv(P039);
-    glEnd();
-    glBegin(GL_POLYGON);
-    glNormal3fv(N039);
-    glVertex3fv(P039);
-    glNormal3fv(N032);
-    glVertex3fv(P032);
-    glNormal3fv(N040);
-    glVertex3fv(P040);
-    glEnd();
-    glBegin(GL_POLYGON);
-    glNormal3fv(N032);
-    glVertex3fv(P032);
-    glNormal3fv(N033);
-    glVertex3fv(P033);
-    glNormal3fv(N040);
-    glVertex3fv(P040);
-    glEnd();
-    glBegin(GL_POLYGON);
-    glNormal3fv(N040);
-    glVertex3fv(P040);
-    glNormal3fv(N033);
-    glVertex3fv(P033);
-    glNormal3fv(N041);
-    glVertex3fv(P041);
-    glEnd();
-}
-
-void
-Dolphin008(void)
-{
-    glBegin(GL_POLYGON);
-    glNormal3fv(N042);
-    glVertex3fv(P042);
-    glNormal3fv(N043);
-    glVertex3fv(P043);
-    glNormal3fv(N051);
-    glVertex3fv(P051);
-    glNormal3fv(N050);
-    glVertex3fv(P050);
-    glEnd();
-    glBegin(GL_POLYGON);
-    glNormal3fv(N043);
-    glVertex3fv(P043);
-    glNormal3fv(N036);
-    glVertex3fv(P036);
-    glNormal3fv(N051);
-    glVertex3fv(P051);
-    glEnd();
-    glBegin(GL_POLYGON);
-    glNormal3fv(N051);
-    glVertex3fv(P051);
-    glNormal3fv(N036);
-    glVertex3fv(P036);
-    glNormal3fv(N044);
-    glVertex3fv(P044);
-    glEnd();
-    glBegin(GL_POLYGON);
-    glNormal3fv(N041);
-    glVertex3fv(P041);
-    glNormal3fv(N042);
-    glVertex3fv(P042);
-    glNormal3fv(N050);
-    glVertex3fv(P050);
-    glEnd();
-    glBegin(GL_POLYGON);
-    glNormal3fv(N041);
-    glVertex3fv(P041);
-    glNormal3fv(N050);
-    glVertex3fv(P050);
-    glNormal3fv(N049);
-    glVertex3fv(P049);
-    glEnd();
-    glBegin(GL_POLYGON);
-    glNormal3fv(N036);
-    glVertex3fv(P036);
-    glNormal3fv(N037);
-    glVertex3fv(P037);
-    glNormal3fv(N044);
-    glVertex3fv(P044);
-    glEnd();
-    glBegin(GL_POLYGON);
-    glNormal3fv(N044);
-    glVertex3fv(P044);
-    glNormal3fv(N037);
-    glVertex3fv(P037);
-    glNormal3fv(N045);
-    glVertex3fv(P045);
-    glEnd();
-    glBegin(GL_POLYGON);
-    glNormal3fv(N040);
-    glVertex3fv(P040);
-    glNormal3fv(N041);
-    glVertex3fv(P041);
-    glNormal3fv(N049);
-    glVertex3fv(P049);
-    glEnd();
-    glBegin(GL_POLYGON);
-    glNormal3fv(N040);
-    glVertex3fv(P040);
-    glNormal3fv(N049);
-    glVertex3fv(P049);
-    glNormal3fv(N048);
-    glVertex3fv(P048);
-    glEnd();
-    glBegin(GL_POLYGON);
-    glNormal3fv(N039);
-    glVertex3fv(P039);
-    glNormal3fv(N040);
-    glVertex3fv(P040);
-    glNormal3fv(N048);
-    glVertex3fv(P048);
-    glEnd();
-    glBegin(GL_POLYGON);
-    glNormal3fv(N039);
-    glVertex3fv(P039);
-    glNormal3fv(N048);
-    glVertex3fv(P048);
-    glNormal3fv(N047);
-    glVertex3fv(P047);
-    glEnd();
-    glBegin(GL_POLYGON);
-    glNormal3fv(N037);
-    glVertex3fv(P037);
-    glNormal3fv(N038);
-    glVertex3fv(P038);
-    glNormal3fv(N045);
-    glVertex3fv(P045);
-    glEnd();
-    glBegin(GL_POLYGON);
-    glNormal3fv(N038);
-    glVertex3fv(P038);
-    glNormal3fv(N046);
-    glVertex3fv(P046);
-    glNormal3fv(N045);
-    glVertex3fv(P045);
-    glEnd();
-    glBegin(GL_POLYGON);
-    glNormal3fv(N038);
-    glVertex3fv(P038);
-    glNormal3fv(N039);
-    glVertex3fv(P039);
-    glNormal3fv(N047);
-    glVertex3fv(P047);
-    glNormal3fv(N046);
-    glVertex3fv(P046);
-    glEnd();
-}
-
-void
-Dolphin009(void)
-{
-    glBegin(GL_POLYGON);
-    glNormal3fv(N050);
-    glVertex3fv(P050);
-    glNormal3fv(N051);
-    glVertex3fv(P051);
-    glNormal3fv(N059);
-    glVertex3fv(P059);
-    glNormal3fv(N058);
-    glVertex3fv(P058);
-    glEnd();
-    glBegin(GL_POLYGON);
-    glNormal3fv(N051);
-    glVertex3fv(P051);
-    glNormal3fv(N044);
-    glVertex3fv(P044);
-    glNormal3fv(N059);
-    glVertex3fv(P059);
-    glEnd();
-    glBegin(GL_POLYGON);
-    glNormal3fv(N059);
-    glVertex3fv(P059);
-    glNormal3fv(N044);
-    glVertex3fv(P044);
-    glNormal3fv(N052);
-    glVertex3fv(P052);
-    glEnd();
-    glBegin(GL_POLYGON);
-    glNormal3fv(N044);
-    glVertex3fv(P044);
-    glNormal3fv(N045);
-    glVertex3fv(P045);
-    glNormal3fv(N053);
-    glVertex3fv(P053);
-    glEnd();
-    glBegin(GL_POLYGON);
-    glNormal3fv(N044);
-    glVertex3fv(P044);
-    glNormal3fv(N053);
-    glVertex3fv(P053);
-    glNormal3fv(N052);
-    glVertex3fv(P052);
-    glEnd();
-    glBegin(GL_POLYGON);
-    glNormal3fv(N049);
-    glVertex3fv(P049);
-    glNormal3fv(N050);
-    glVertex3fv(P050);
-    glNormal3fv(N058);
-    glVertex3fv(P058);
-    glEnd();
-    glBegin(GL_POLYGON);
-    glNormal3fv(N049);
-    glVertex3fv(P049);
-    glNormal3fv(N058);
-    glVertex3fv(P058);
-    glNormal3fv(N057);
-    glVertex3fv(P057);
-    glEnd();
-    glBegin(GL_POLYGON);
-    glNormal3fv(N048);
-    glVertex3fv(P048);
-    glNormal3fv(N049);
-    glVertex3fv(P049);
-    glNormal3fv(N057);
-    glVertex3fv(P057);
-    glEnd();
-    glBegin(GL_POLYGON);
-    glNormal3fv(N048);
-    glVertex3fv(P048);
-    glNormal3fv(N057);
-    glVertex3fv(P057);
-    glNormal3fv(N056);
-    glVertex3fv(P056);
-    glEnd();
-    glBegin(GL_POLYGON);
-    glNormal3fv(N047);
-    glVertex3fv(P047);
-    glNormal3fv(N048);
-    glVertex3fv(P048);
-    glNormal3fv(N056);
-    glVertex3fv(P056);
-    glEnd();
-    glBegin(GL_POLYGON);
-    glNormal3fv(N047);
-    glVertex3fv(P047);
-    glNormal3fv(N056);
-    glVertex3fv(P056);
-    glNormal3fv(N055);
-    glVertex3fv(P055);
-    glEnd();
-    glBegin(GL_POLYGON);
-    glNormal3fv(N045);
-    glVertex3fv(P045);
-    glNormal3fv(N046);
-    glVertex3fv(P046);
-    glNormal3fv(N053);
-    glVertex3fv(P053);
-    glEnd();
-    glBegin(GL_POLYGON);
-    glNormal3fv(N046);
-    glVertex3fv(P046);
-    glNormal3fv(N054);
-    glVertex3fv(P054);
-    glNormal3fv(N053);
-    glVertex3fv(P053);
-    glEnd();
-    glBegin(GL_POLYGON);
-    glNormal3fv(N046);
-    glVertex3fv(P046);
-    glNormal3fv(N047);
-    glVertex3fv(P047);
-    glNormal3fv(N055);
-    glVertex3fv(P055);
-    glNormal3fv(N054);
-    glVertex3fv(P054);
-    glEnd();
-}
-
-void
-Dolphin010(void)
-{
-    glBegin(GL_POLYGON);
-    glNormal3fv(N080);
-    glVertex3fv(P080);
-    glNormal3fv(N081);
-    glVertex3fv(P081);
-    glNormal3fv(N085);
-    glVertex3fv(P085);
-    glEnd();
-    glBegin(GL_POLYGON);
-    glNormal3fv(N081);
-    glVertex3fv(P081);
-    glNormal3fv(N083);
-    glVertex3fv(P083);
-    glNormal3fv(N085);
-    glVertex3fv(P085);
-    glEnd();
-    glBegin(GL_POLYGON);
-    glNormal3fv(N085);
-    glVertex3fv(P085);
-    glNormal3fv(N083);
-    glVertex3fv(P083);
-    glNormal3fv(N077);
-    glVertex3fv(P077);
-    glEnd();
-    glBegin(GL_POLYGON);
-    glNormal3fv(N083);
-    glVertex3fv(P083);
-    glNormal3fv(N087);
-    glVertex3fv(P087);
-    glNormal3fv(N077);
-    glVertex3fv(P077);
-    glEnd();
-    glBegin(GL_POLYGON);
-    glNormal3fv(N077);
-    glVertex3fv(P077);
-    glNormal3fv(N087);
-    glVertex3fv(P087);
-    glNormal3fv(N090);
-    glVertex3fv(P090);
-    glEnd();
-    glBegin(GL_POLYGON);
-    glNormal3fv(N081);
-    glVertex3fv(P081);
-    glNormal3fv(N080);
-    glVertex3fv(P080);
-    glNormal3fv(N085);
-    glVertex3fv(P085);
-    glEnd();
-    glBegin(GL_POLYGON);
-    glNormal3fv(N083);
-    glVertex3fv(P083);
-    glNormal3fv(N081);
-    glVertex3fv(P081);
-    glNormal3fv(N085);
-    glVertex3fv(P085);
-    glEnd();
-    glBegin(GL_POLYGON);
-    glNormal3fv(N083);
-    glVertex3fv(P083);
-    glNormal3fv(N085);
-    glVertex3fv(P085);
-    glNormal3fv(N077);
-    glVertex3fv(P077);
-    glEnd();
-    glBegin(GL_POLYGON);
-    glNormal3fv(N087);
-    glVertex3fv(P087);
-    glNormal3fv(N083);
-    glVertex3fv(P083);
-    glNormal3fv(N077);
-    glVertex3fv(P077);
-    glEnd();
-    glBegin(GL_POLYGON);
-    glNormal3fv(N087);
-    glVertex3fv(P087);
-    glNormal3fv(N077);
-    glVertex3fv(P077);
-    glNormal3fv(N090);
-    glVertex3fv(P090);
-    glEnd();
-}
-
-void
-Dolphin011(void)
-{
-    glBegin(GL_POLYGON);
-    glNormal3fv(N082);
-    glVertex3fv(P082);
-    glNormal3fv(N084);
-    glVertex3fv(P084);
-    glNormal3fv(N079);
-    glVertex3fv(P079);
-    glEnd();
-    glBegin(GL_POLYGON);
-    glNormal3fv(N084);
-    glVertex3fv(P084);
-    glNormal3fv(N086);
-    glVertex3fv(P086);
-    glNormal3fv(N079);
-    glVertex3fv(P079);
-    glEnd();
-    glBegin(GL_POLYGON);
-    glNormal3fv(N079);
-    glVertex3fv(P079);
-    glNormal3fv(N086);
-    glVertex3fv(P086);
-    glNormal3fv(N078);
-    glVertex3fv(P078);
-    glEnd();
-    glBegin(GL_POLYGON);
-    glNormal3fv(N086);
-    glVertex3fv(P086);
-    glNormal3fv(N088);
-    glVertex3fv(P088);
-    glNormal3fv(N078);
-    glVertex3fv(P078);
-    glEnd();
-    glBegin(GL_POLYGON);
-    glNormal3fv(N078);
-    glVertex3fv(P078);
-    glNormal3fv(N088);
-    glVertex3fv(P088);
-    glNormal3fv(N089);
-    glVertex3fv(P089);
-    glEnd();
-    glBegin(GL_POLYGON);
-    glNormal3fv(N088);
-    glVertex3fv(P088);
-    glNormal3fv(N086);
-    glVertex3fv(P086);
-    glNormal3fv(N089);
-    glVertex3fv(P089);
-    glEnd();
-    glBegin(GL_POLYGON);
-    glNormal3fv(N089);
-    glVertex3fv(P089);
-    glNormal3fv(N086);
-    glVertex3fv(P086);
-    glNormal3fv(N078);
-    glVertex3fv(P078);
-    glEnd();
-    glBegin(GL_POLYGON);
-    glNormal3fv(N086);
-    glVertex3fv(P086);
-    glNormal3fv(N084);
-    glVertex3fv(P084);
-    glNormal3fv(N078);
-    glVertex3fv(P078);
-    glEnd();
-    glBegin(GL_POLYGON);
-    glNormal3fv(N078);
-    glVertex3fv(P078);
-    glNormal3fv(N084);
-    glVertex3fv(P084);
-    glNormal3fv(N079);
-    glVertex3fv(P079);
-    glEnd();
-    glBegin(GL_POLYGON);
-    glNormal3fv(N084);
-    glVertex3fv(P084);
-    glNormal3fv(N082);
-    glVertex3fv(P082);
-    glNormal3fv(N079);
-    glVertex3fv(P079);
-    glEnd();
-}
-
-void
-Dolphin012(void)
-{
-    glBegin(GL_POLYGON);
-    glNormal3fv(N058);
-    glVertex3fv(P058);
-    glNormal3fv(N059);
-    glVertex3fv(P059);
-    glNormal3fv(N067);
-    glVertex3fv(P067);
-    glNormal3fv(N066);
-    glVertex3fv(P066);
-    glEnd();
-    glBegin(GL_POLYGON);
-    glNormal3fv(N059);
-    glVertex3fv(P059);
-    glNormal3fv(N052);
-    glVertex3fv(P052);
-    glNormal3fv(N060);
-    glVertex3fv(P060);
-    glEnd();
-    glBegin(GL_POLYGON);
-    glNormal3fv(N059);
-    glVertex3fv(P059);
-    glNormal3fv(N060);
-    glVertex3fv(P060);
-    glNormal3fv(N067);
-    glVertex3fv(P067);
-    glEnd();
-    glBegin(GL_POLYGON);
-    glNormal3fv(N058);
-    glVertex3fv(P058);
-    glNormal3fv(N066);
-    glVertex3fv(P066);
-    glNormal3fv(N065);
-    glVertex3fv(P065);
-    glEnd();
-    glBegin(GL_POLYGON);
-    glNormal3fv(N058);
-    glVertex3fv(P058);
-    glNormal3fv(N065);
-    glVertex3fv(P065);
-    glNormal3fv(N057);
-    glVertex3fv(P057);
-    glEnd();
-    glBegin(GL_POLYGON);
-    glNormal3fv(N056);
-    glVertex3fv(P056);
-    glNormal3fv(N057);
-    glVertex3fv(P057);
-    glNormal3fv(N065);
-    glVertex3fv(P065);
-    glEnd();
-    glBegin(GL_POLYGON);
-    glNormal3fv(N056);
-    glVertex3fv(P056);
-    glNormal3fv(N065);
-    glVertex3fv(P065);
-    glNormal3fv(N006);
-    glVertex3fv(P006);
-    glEnd();
-    glBegin(GL_POLYGON);
-    glNormal3fv(N056);
-    glVertex3fv(P056);
-    glNormal3fv(N006);
-    glVertex3fv(P006);
-    glNormal3fv(N063);
-    glVertex3fv(P063);
-    glEnd();
-    glBegin(GL_POLYGON);
-    glNormal3fv(N056);
-    glVertex3fv(P056);
-    glNormal3fv(N063);
-    glVertex3fv(P063);
-    glNormal3fv(N055);
-    glVertex3fv(P055);
-    glEnd();
-    glBegin(GL_POLYGON);
-    glNormal3fv(N054);
-    glVertex3fv(P054);
-    glNormal3fv(N062);
-    glVertex3fv(P062);
-    glNormal3fv(N005);
-    glVertex3fv(P005);
-    glEnd();
-    glBegin(GL_POLYGON);
-    glNormal3fv(N054);
-    glVertex3fv(P054);
-    glNormal3fv(N005);
-    glVertex3fv(P005);
-    glNormal3fv(N053);
-    glVertex3fv(P053);
-    glEnd();
-    glBegin(GL_POLYGON);
-    glNormal3fv(N052);
-    glVertex3fv(P052);
-    glNormal3fv(N053);
-    glVertex3fv(P053);
-    glNormal3fv(N005);
-    glVertex3fv(P005);
-    glNormal3fv(N060);
-    glVertex3fv(P060);
-    glEnd();
-}
-
-void
-Dolphin013(void)
-{
-    glBegin(GL_POLYGON);
-    glNormal3fv(N116);
-    glVertex3fv(P116);
-    glNormal3fv(N117);
-    glVertex3fv(P117);
-    glNormal3fv(N112);
-    glVertex3fv(P112);
-    glNormal3fv(N113);
-    glVertex3fv(P113);
-    glEnd();
-    glBegin(GL_POLYGON);
-    glNormal3fv(N114);
-    glVertex3fv(P114);
-    glNormal3fv(N113);
-    glVertex3fv(P113);
-    glNormal3fv(N112);
-    glVertex3fv(P112);
-    glNormal3fv(N115);
-    glVertex3fv(P115);
-    glEnd();
-    glBegin(GL_POLYGON);
-    glNormal3fv(N114);
-    glVertex3fv(P114);
-    glNormal3fv(N116);
-    glVertex3fv(P116);
-    glNormal3fv(N113);
-    glVertex3fv(P113);
-    glEnd();
-    glBegin(GL_POLYGON);
-    glNormal3fv(N114);
-    glVertex3fv(P114);
-    glNormal3fv(N007);
-    glVertex3fv(P007);
-    glNormal3fv(N116);
-    glVertex3fv(P116);
-    glEnd();
-    glBegin(GL_POLYGON);
-    glNormal3fv(N007);
-    glVertex3fv(P007);
-    glNormal3fv(N002);
-    glVertex3fv(P002);
-    glNormal3fv(N116);
-    glVertex3fv(P116);
-    glEnd();
-    glBegin(GL_POLYGON);
-    glVertex3fv(P002);
-    glVertex3fv(P007);
-    glVertex3fv(P008);
-    glVertex3fv(P099);
-    glEnd();
-    glBegin(GL_POLYGON);
-    glVertex3fv(P007);
-    glVertex3fv(P114);
-    glVertex3fv(P115);
-    glVertex3fv(P008);
-    glEnd();
-    glBegin(GL_POLYGON);
-    glNormal3fv(N117);
-    glVertex3fv(P117);
-    glNormal3fv(N099);
-    glVertex3fv(P099);
-    glNormal3fv(N008);
-    glVertex3fv(P008);
-    glEnd();
-    glBegin(GL_POLYGON);
-    glNormal3fv(N117);
-    glVertex3fv(P117);
-    glNormal3fv(N008);
-    glVertex3fv(P008);
-    glNormal3fv(N112);
-    glVertex3fv(P112);
-    glEnd();
-    glBegin(GL_POLYGON);
-    glNormal3fv(N112);
-    glVertex3fv(P112);
-    glNormal3fv(N008);
-    glVertex3fv(P008);
-    glNormal3fv(N115);
-    glVertex3fv(P115);
-    glEnd();
-}
-
-void
-Dolphin014(void)
-{
-    glBegin(GL_POLYGON);
-    glNormal3fv(N111);
-    glVertex3fv(P111);
-    glNormal3fv(N110);
-    glVertex3fv(P110);
-    glNormal3fv(N102);
-    glVertex3fv(P102);
-    glNormal3fv(N121);
-    glVertex3fv(P121);
-    glEnd();
-    glBegin(GL_POLYGON);
-    glNormal3fv(N111);
-    glVertex3fv(P111);
-    glNormal3fv(N097);
-    glVertex3fv(P097);
-    glNormal3fv(N110);
-    glVertex3fv(P110);
-    glEnd();
-    glBegin(GL_POLYGON);
-    glNormal3fv(N097);
-    glVertex3fv(P097);
-    glNormal3fv(N119);
-    glVertex3fv(P119);
-    glNormal3fv(N110);
-    glVertex3fv(P110);
-    glEnd();
-    glBegin(GL_POLYGON);
-    glNormal3fv(N097);
-    glVertex3fv(P097);
-    glNormal3fv(N099);
-    glVertex3fv(P099);
-    glNormal3fv(N119);
-    glVertex3fv(P119);
-    glEnd();
-    glBegin(GL_POLYGON);
-    glNormal3fv(N099);
-    glVertex3fv(P099);
-    glNormal3fv(N065);
-    glVertex3fv(P065);
-    glNormal3fv(N119);
-    glVertex3fv(P119);
-    glEnd();
-    glBegin(GL_POLYGON);
-    glNormal3fv(N065);
-    glVertex3fv(P065);
-    glNormal3fv(N066);
-    glVertex3fv(P066);
-    glNormal3fv(N119);
-    glVertex3fv(P119);
-    glEnd();
-    glBegin(GL_POLYGON);
-    glVertex3fv(P098);
-    glVertex3fv(P097);
-    glVertex3fv(P111);
-    glVertex3fv(P121);
-    glEnd();
-    glBegin(GL_POLYGON);
-    glVertex3fv(P002);
-    glVertex3fv(P099);
-    glVertex3fv(P097);
-    glVertex3fv(P098);
-    glEnd();
-    glBegin(GL_POLYGON);
-    glNormal3fv(N110);
-    glVertex3fv(P110);
-    glNormal3fv(N119);
-    glVertex3fv(P119);
-    glNormal3fv(N118);
-    glVertex3fv(P118);
-    glNormal3fv(N102);
-    glVertex3fv(P102);
-    glEnd();
-    glBegin(GL_POLYGON);
-    glNormal3fv(N119);
-    glVertex3fv(P119);
-    glNormal3fv(N066);
-    glVertex3fv(P066);
-    glNormal3fv(N067);
-    glVertex3fv(P067);
-    glNormal3fv(N118);
-    glVertex3fv(P118);
-    glEnd();
-    glBegin(GL_POLYGON);
-    glNormal3fv(N067);
-    glVertex3fv(P067);
-    glNormal3fv(N060);
-    glVertex3fv(P060);
-    glNormal3fv(N002);
-    glVertex3fv(P002);
-    glEnd();
-    glBegin(GL_POLYGON);
-    glNormal3fv(N067);
-    glVertex3fv(P067);
-    glNormal3fv(N002);
-    glVertex3fv(P002);
-    glNormal3fv(N118);
-    glVertex3fv(P118);
-    glEnd();
-    glBegin(GL_POLYGON);
-    glNormal3fv(N118);
-    glVertex3fv(P118);
-    glNormal3fv(N002);
-    glVertex3fv(P002);
-    glNormal3fv(N098);
-    glVertex3fv(P098);
-    glEnd();
-    glBegin(GL_POLYGON);
-    glNormal3fv(N118);
-    glVertex3fv(P118);
-    glNormal3fv(N098);
-    glVertex3fv(P098);
-    glNormal3fv(N102);
-    glVertex3fv(P102);
-    glEnd();
-    glBegin(GL_POLYGON);
-    glNormal3fv(N102);
-    glVertex3fv(P102);
-    glNormal3fv(N098);
-    glVertex3fv(P098);
-    glNormal3fv(N121);
-    glVertex3fv(P121);
-    glEnd();
-}
-
-void
-Dolphin015(void)
-{
-    glBegin(GL_POLYGON);
-    glNormal3fv(N055);
-    glVertex3fv(P055);
-    glNormal3fv(N003);
-    glVertex3fv(P003);
-    glNormal3fv(N054);
-    glVertex3fv(P054);
-    glEnd();
-    glBegin(GL_POLYGON);
-    glNormal3fv(N003);
-    glVertex3fv(P003);
-    glNormal3fv(N055);
-    glVertex3fv(P055);
-    glNormal3fv(N063);
-    glVertex3fv(P063);
-    glEnd();
-    glBegin(GL_POLYGON);
-    glNormal3fv(N003);
-    glVertex3fv(P003);
-    glNormal3fv(N063);
-    glVertex3fv(P063);
-    glNormal3fv(N100);
-    glVertex3fv(P100);
-    glEnd();
-    glBegin(GL_POLYGON);
-    glNormal3fv(N003);
-    glVertex3fv(P003);
-    glNormal3fv(N100);
-    glVertex3fv(P100);
-    glNormal3fv(N054);
-    glVertex3fv(P054);
-    glEnd();
-    glBegin(GL_POLYGON);
-    glNormal3fv(N054);
-    glVertex3fv(P054);
-    glNormal3fv(N100);
-    glVertex3fv(P100);
-    glNormal3fv(N062);
-    glVertex3fv(P062);
-    glEnd();
-    glBegin(GL_POLYGON);
-    glNormal3fv(N100);
-    glVertex3fv(P100);
-    glNormal3fv(N064);
-    glVertex3fv(P064);
-    glNormal3fv(N120);
-    glVertex3fv(P120);
-    glEnd();
-    glBegin(GL_POLYGON);
-    glNormal3fv(N100);
-    glVertex3fv(P100);
-    glNormal3fv(N063);
-    glVertex3fv(P063);
-    glNormal3fv(N064);
-    glVertex3fv(P064);
-    glEnd();
-    glBegin(GL_POLYGON);
-    glNormal3fv(N063);
-    glVertex3fv(P063);
-    glNormal3fv(N006);
-    glVertex3fv(P006);
-    glNormal3fv(N064);
-    glVertex3fv(P064);
-    glEnd();
-    glBegin(GL_POLYGON);
-    glNormal3fv(N064);
-    glVertex3fv(P064);
-    glNormal3fv(N006);
-    glVertex3fv(P006);
-    glNormal3fv(N099);
-    glVertex3fv(P099);
-    glEnd();
-    glBegin(GL_POLYGON);
-    glNormal3fv(N064);
-    glVertex3fv(P064);
-    glNormal3fv(N099);
-    glVertex3fv(P099);
-    glNormal3fv(N117);
-    glVertex3fv(P117);
-    glEnd();
-    glBegin(GL_POLYGON);
-    glNormal3fv(N120);
-    glVertex3fv(P120);
-    glNormal3fv(N064);
-    glVertex3fv(P064);
-    glNormal3fv(N117);
-    glVertex3fv(P117);
-    glNormal3fv(N116);
-    glVertex3fv(P116);
-    glEnd();
-    glBegin(GL_POLYGON);
-    glNormal3fv(N006);
-    glVertex3fv(P006);
-    glNormal3fv(N065);
-    glVertex3fv(P065);
-    glNormal3fv(N099);
-    glVertex3fv(P099);
-    glEnd();
-    glBegin(GL_POLYGON);
-    glNormal3fv(N062);
-    glVertex3fv(P062);
-    glNormal3fv(N100);
-    glVertex3fv(P100);
-    glNormal3fv(N120);
-    glVertex3fv(P120);
-    glEnd();
-    glBegin(GL_POLYGON);
-    glNormal3fv(N005);
-    glVertex3fv(P005);
-    glNormal3fv(N062);
-    glVertex3fv(P062);
-    glNormal3fv(N120);
-    glVertex3fv(P120);
-    glEnd();
-    glBegin(GL_POLYGON);
-    glNormal3fv(N005);
-    glVertex3fv(P005);
-    glNormal3fv(N120);
-    glVertex3fv(P120);
-    glNormal3fv(N002);
-    glVertex3fv(P002);
-    glEnd();
-    glBegin(GL_POLYGON);
-    glNormal3fv(N002);
-    glVertex3fv(P002);
-    glNormal3fv(N120);
-    glVertex3fv(P120);
-    glNormal3fv(N116);
-    glVertex3fv(P116);
-    glEnd();
-    glBegin(GL_POLYGON);
-    glNormal3fv(N060);
-    glVertex3fv(P060);
-    glNormal3fv(N005);
-    glVertex3fv(P005);
-    glNormal3fv(N002);
-    glVertex3fv(P002);
-    glEnd();
-}
-
-void
-Dolphin016(void)
-{
-
-    glDisable(GL_DEPTH_TEST);
-    glBegin(GL_POLYGON);
-    glVertex3fv(P123);
-    glVertex3fv(P124);
-    glVertex3fv(P125);
-    glVertex3fv(P126);
-    glVertex3fv(P127);
-    glVertex3fv(P128);
-    glEnd();
-    glBegin(GL_POLYGON);
-    glVertex3fv(P129);
-    glVertex3fv(P130);
-    glVertex3fv(P131);
-    glVertex3fv(P132);
-    glVertex3fv(P133);
-    glVertex3fv(P134);
-    glEnd();
-    glBegin(GL_POLYGON);
-    glVertex3fv(P103);
-    glVertex3fv(P105);
-    glVertex3fv(P108);
-    glEnd();
-    glEnable(GL_DEPTH_TEST);
-}
-
-void
-DrawDolphin(fishRec * fish)
-{
-    float seg0, seg1, seg2, seg3, seg4, seg5, seg6, seg7;
-    float pitch, thrash, chomp;
-
-    fish->htail = (int) (fish->htail - (int) (10.0 * fish->v)) % 360;
-
-    thrash = 70.0 * fish->v;
-
-    seg0 = 1.0 * thrash * sin((fish->htail) * RRAD);
-    seg3 = 1.0 * thrash * sin((fish->htail) * RRAD);
-    seg1 = 2.0 * thrash * sin((fish->htail + 4.0) * RRAD);
-    seg2 = 3.0 * thrash * sin((fish->htail + 6.0) * RRAD);
-    seg4 = 4.0 * thrash * sin((fish->htail + 10.0) * RRAD);
-    seg5 = 4.5 * thrash * sin((fish->htail + 15.0) * RRAD);
-    seg6 = 5.0 * thrash * sin((fish->htail + 20.0) * RRAD);
-    seg7 = 6.0 * thrash * sin((fish->htail + 30.0) * RRAD);
-
-    pitch = fish->v * sin((fish->htail + 180.0) * RRAD);
-
-    if (fish->v > 2.0) {
-        chomp = -(fish->v - 2.0) * 200.0;
-    }
-    chomp = 100.0;
-
-    P012[1] = iP012[1] + seg5;
-    P013[1] = iP013[1] + seg5;
-    P014[1] = iP014[1] + seg5;
-    P015[1] = iP015[1] + seg5;
-    P016[1] = iP016[1] + seg5;
-    P017[1] = iP017[1] + seg5;
-    P018[1] = iP018[1] + seg5;
-    P019[1] = iP019[1] + seg5;
-
-    P020[1] = iP020[1] + seg4;
-    P021[1] = iP021[1] + seg4;
-    P022[1] = iP022[1] + seg4;
-    P023[1] = iP023[1] + seg4;
-    P024[1] = iP024[1] + seg4;
-    P025[1] = iP025[1] + seg4;
-    P026[1] = iP026[1] + seg4;
-    P027[1] = iP027[1] + seg4;
-
-    P028[1] = iP028[1] + seg2;
-    P029[1] = iP029[1] + seg2;
-    P030[1] = iP030[1] + seg2;
-    P031[1] = iP031[1] + seg2;
-    P032[1] = iP032[1] + seg2;
-    P033[1] = iP033[1] + seg2;
-    P034[1] = iP034[1] + seg2;
-    P035[1] = iP035[1] + seg2;
-
-    P036[1] = iP036[1] + seg1;
-    P037[1] = iP037[1] + seg1;
-    P038[1] = iP038[1] + seg1;
-    P039[1] = iP039[1] + seg1;
-    P040[1] = iP040[1] + seg1;
-    P041[1] = iP041[1] + seg1;
-    P042[1] = iP042[1] + seg1;
-    P043[1] = iP043[1] + seg1;
-
-    P044[1] = iP044[1] + seg0;
-    P045[1] = iP045[1] + seg0;
-    P046[1] = iP046[1] + seg0;
-    P047[1] = iP047[1] + seg0;
-    P048[1] = iP048[1] + seg0;
-    P049[1] = iP049[1] + seg0;
-    P050[1] = iP050[1] + seg0;
-    P051[1] = iP051[1] + seg0;
-
-    P009[1] = iP009[1] + seg6;
-    P010[1] = iP010[1] + seg6;
-    P075[1] = iP075[1] + seg6;
-    P076[1] = iP076[1] + seg6;
-
-    P001[1] = iP001[1] + seg7;
-    P011[1] = iP011[1] + seg7;
-    P068[1] = iP068[1] + seg7;
-    P069[1] = iP069[1] + seg7;
-    P070[1] = iP070[1] + seg7;
-    P071[1] = iP071[1] + seg7;
-    P072[1] = iP072[1] + seg7;
-    P073[1] = iP073[1] + seg7;
-    P074[1] = iP074[1] + seg7;
-
-    P091[1] = iP091[1] + seg3;
-    P092[1] = iP092[1] + seg3;
-    P093[1] = iP093[1] + seg3;
-    P094[1] = iP094[1] + seg3;
-    P095[1] = iP095[1] + seg3;
-    P122[1] = iP122[1] + seg3 * 1.5;
-
-    P097[1] = iP097[1] + chomp;
-    P098[1] = iP098[1] + chomp;
-    P102[1] = iP102[1] + chomp;
-    P110[1] = iP110[1] + chomp;
-    P111[1] = iP111[1] + chomp;
-    P121[1] = iP121[1] + chomp;
-    P118[1] = iP118[1] + chomp;
-    P119[1] = iP119[1] + chomp;
-
-    glPushMatrix();
-
-    glRotatef(pitch, 1.0, 0.0, 0.0);
-
-    glTranslatef(0.0, 0.0, 7000.0);
-
-    glRotatef(180.0, 0.0, 1.0, 0.0);
-
-    glEnable(GL_CULL_FACE);
-    Dolphin014();
-    Dolphin010();
-    Dolphin009();
-    Dolphin012();
-    Dolphin013();
-    Dolphin006();
-    Dolphin002();
-    Dolphin001();
-    Dolphin003();
-    Dolphin015();
-    Dolphin004();
-    Dolphin005();
-    Dolphin007();
-    Dolphin008();
-    Dolphin011();
-    Dolphin016();
-    glDisable(GL_CULL_FACE);
-
-    glPopMatrix();
-}
diff --git a/Xcode/TemplatesForXcodeTiger/SDL OpenGL Application/atlantis/shark.c b/Xcode/TemplatesForXcodeTiger/SDL OpenGL Application/atlantis/shark.c
deleted file mode 100644
index 9c847dbaf..000000000
--- a/Xcode/TemplatesForXcodeTiger/SDL OpenGL Application/atlantis/shark.c	
+++ /dev/null
@@ -1,1308 +0,0 @@
-/**
- * (c) Copyright 1993, 1994, Silicon Graphics, Inc.
- * ALL RIGHTS RESERVED
- * Permission to use, copy, modify, and distribute this software for
- * any purpose and without fee is hereby granted, provided that the above
- * copyright notice appear in all copies and that both the copyright notice
- * and this permission notice appear in supporting documentation, and that
- * the name of Silicon Graphics, Inc. not be used in advertising
- * or publicity pertaining to distribution of the software without specific,
- * written prior permission.
- *
- * THE MATERIAL EMBODIED ON THIS SOFTWARE IS PROVIDED TO YOU "AS-IS"
- * AND WITHOUT WARRANTY OF ANY KIND, EXPRESS, IMPLIED OR OTHERWISE,
- * INCLUDING WITHOUT LIMITATION, ANY WARRANTY OF MERCHANTABILITY OR
- * FITNESS FOR A PARTICULAR PURPOSE.  IN NO EVENT SHALL SILICON
- * GRAPHICS, INC.  BE LIABLE TO YOU OR ANYONE ELSE FOR ANY DIRECT,
- * SPECIAL, INCIDENTAL, INDIRECT OR CONSEQUENTIAL DAMAGES OF ANY
- * KIND, OR ANY DAMAGES WHATSOEVER, INCLUDING WITHOUT LIMITATION,
- * LOSS OF PROFIT, LOSS OF USE, SAVINGS OR REVENUE, OR THE CLAIMS OF
- * THIRD PARTIES, WHETHER OR NOT SILICON GRAPHICS, INC.  HAS BEEN
- * ADVISED OF THE POSSIBILITY OF SUCH LOSS, HOWEVER CAUSED AND ON
- * ANY THEORY OF LIABILITY, ARISING OUT OF OR IN CONNECTION WITH THE
- * POSSESSION, USE OR PERFORMANCE OF THIS SOFTWARE.
- *
- * US Government Users Restricted Rights
- * Use, duplication, or disclosure by the Government is subject to
- * restrictions set forth in FAR 52.227.19(c)(2) or subparagraph
- * (c)(1)(ii) of the Rights in Technical Data and Computer Software
- * clause at DFARS 252.227-7013 and/or in similar or successor
- * clauses in the FAR or the DOD or NASA FAR Supplement.
- * Unpublished-- rights reserved under the copyright laws of the
- * United States.  Contractor/manufacturer is Silicon Graphics,
- * Inc., 2011 N.  Shoreline Blvd., Mountain View, CA 94039-7311.
- *
- * OpenGL(TM) is a trademark of Silicon Graphics, Inc.
- */
-#include 
-#include 
-#include "atlantis.h"
-/* *INDENT-OFF* */
-static float N002[3] = {0.000077 ,-0.020611 ,0.999788};
-static float N003[3] = {0.961425 ,0.258729 ,-0.093390};
-static float N004[3] = {0.510811 ,-0.769633 ,-0.383063};
-static float N005[3] = {0.400123 ,0.855734 ,-0.328055};
-static float N006[3] = {-0.770715 ,0.610204 ,-0.183440};
-static float N007[3] = {-0.915597 ,-0.373345 ,-0.149316};
-static float N008[3] = {-0.972788 ,0.208921 ,-0.100179};
-static float N009[3] = {-0.939713 ,-0.312268 ,-0.139383};
-static float N010[3] = {-0.624138 ,-0.741047 ,-0.247589};
-static float N011[3] = {0.591434 ,-0.768401 ,-0.244471};
-static float N012[3] = {0.935152 ,-0.328495 ,-0.132598};
-static float N013[3] = {0.997102 ,0.074243 ,-0.016593};
-static float N014[3] = {0.969995 ,0.241712 ,-0.026186};
-static float N015[3] = {0.844539 ,0.502628 ,-0.184714};
-static float N016[3] = {-0.906608 ,0.386308 ,-0.169787};
-static float N017[3] = {-0.970016 ,0.241698 ,-0.025516};
-static float N018[3] = {-0.998652 ,0.050493 ,-0.012045};
-static float N019[3] = {-0.942685 ,-0.333051 ,-0.020556};
-static float N020[3] = {-0.660944 ,-0.750276 ,0.015480};
-static float N021[3] = {0.503549 ,-0.862908 ,-0.042749};
-static float N022[3] = {0.953202 ,-0.302092 ,-0.012089};
-static float N023[3] = {0.998738 ,0.023574 ,0.044344};
-static float N024[3] = {0.979297 ,0.193272 ,0.060202};
-static float N025[3] = {0.798300 ,0.464885 ,0.382883};
-static float N026[3] = {-0.756590 ,0.452403 ,0.472126};
-static float N027[3] = {-0.953855 ,0.293003 ,0.065651};
-static float N028[3] = {-0.998033 ,0.040292 ,0.048028};
-static float N029[3] = {-0.977079 ,-0.204288 ,0.059858};
-static float N030[3] = {-0.729117 ,-0.675304 ,0.111140};
-static float N031[3] = {0.598361 ,-0.792753 ,0.116221};
-static float N032[3] = {0.965192 ,-0.252991 ,0.066332};
-static float N033[3] = {0.998201 ,-0.002790 ,0.059892};
-static float N034[3] = {0.978657 ,0.193135 ,0.070207};
-static float N035[3] = {0.718815 ,0.680392 ,0.142733};
-static float N036[3] = {-0.383096 ,0.906212 ,0.178936};
-static float N037[3] = {-0.952831 ,0.292590 ,0.080647};
-static float N038[3] = {-0.997680 ,0.032417 ,0.059861};
-static float N039[3] = {-0.982629 ,-0.169881 ,0.074700};
-static float N040[3] = {-0.695424 ,-0.703466 ,0.146700};
-static float N041[3] = {0.359323 ,-0.915531 ,0.180805};
-static float N042[3] = {0.943356 ,-0.319387 ,0.089842};
-static float N043[3] = {0.998272 ,-0.032435 ,0.048993};
-static float N044[3] = {0.978997 ,0.193205 ,0.065084};
-static float N045[3] = {0.872144 ,0.470094 ,-0.135565};
-static float N046[3] = {-0.664282 ,0.737945 ,-0.119027};
-static float N047[3] = {-0.954508 ,0.288570 ,0.075107};
-static float N048[3] = {-0.998273 ,0.032406 ,0.048993};
-static float N049[3] = {-0.979908 ,-0.193579 ,0.048038};
-static float N050[3] = {-0.858736 ,-0.507202 ,-0.072938};
-static float N051[3] = {0.643545 ,-0.763887 ,-0.048237};
-static float N052[3] = {0.955580 ,-0.288954 ,0.058068};
-static float N058[3] = {0.000050 ,0.793007 ,-0.609213};
-static float N059[3] = {0.913510 ,0.235418 ,-0.331779};
-static float N060[3] = {-0.807970 ,0.495000 ,-0.319625};
-static float N061[3] = {0.000000 ,0.784687 ,-0.619892};
-static float N062[3] = {0.000000 ,-1.000000 ,0.000000};
-static float N063[3] = {0.000000 ,1.000000 ,0.000000};
-static float N064[3] = {0.000000 ,1.000000 ,0.000000};
-static float N065[3] = {0.000000 ,1.000000 ,0.000000};
-static float N066[3] = {-0.055784 ,0.257059 ,0.964784};
-static float N069[3] = {-0.000505 ,-0.929775 ,-0.368127};
-static float N070[3] = {0.000000 ,1.000000 ,0.000000};
-static float P002[3] = {0.00, -36.59, 5687.72};
-static float P003[3] = {90.00, 114.73, 724.38};
-static float P004[3] = {58.24, -146.84, 262.35};
-static float P005[3] = {27.81, 231.52, 510.43};
-static float P006[3] = {-27.81, 230.43, 509.76};
-static float P007[3] = {-46.09, -146.83, 265.84};
-static float P008[3] = {-90.00, 103.84, 718.53};
-static float P009[3] = {-131.10, -165.92, 834.85};
-static float P010[3] = {-27.81, -285.31, 500.00};
-static float P011[3] = {27.81, -285.32, 500.00};
-static float P012[3] = {147.96, -170.89, 845.50};
-static float P013[3] = {180.00, 0.00, 2000.00};
-static float P014[3] = {145.62, 352.67, 2000.00};
-static float P015[3] = {55.62, 570.63, 2000.00};
-static float P016[3] = {-55.62, 570.64, 2000.00};
-static float P017[3] = {-145.62, 352.68, 2000.00};
-static float P018[3] = {-180.00, 0.01, 2000.00};
-static float P019[3] = {-178.20, -352.66, 2001.61};
-static float P020[3] = {-55.63, -570.63, 2000.00};
-static float P021[3] = {55.62, -570.64, 2000.00};
-static float P022[3] = {179.91, -352.69, 1998.39};
-static float P023[3] = {150.00, 0.00, 3000.00};
-static float P024[3] = {121.35, 293.89, 3000.00};
-static float P025[3] = {46.35, 502.93, 2883.09};
-static float P026[3] = {-46.35, 497.45, 2877.24};
-static float P027[3] = {-121.35, 293.90, 3000.00};
-static float P028[3] = {-150.00, 0.00, 3000.00};
-static float P029[3] = {-152.21, -304.84, 2858.68};
-static float P030[3] = {-46.36, -475.52, 3000.00};
-static float P031[3] = {46.35, -475.53, 3000.00};
-static float P032[3] = {155.64, -304.87, 2863.50};
-static float P033[3] = {90.00, 0.00, 4000.00};
-static float P034[3] = {72.81, 176.33, 4000.00};
-static float P035[3] = {27.81, 285.32, 4000.00};
-static float P036[3] = {-27.81, 285.32, 4000.00};
-static float P037[3] = {-72.81, 176.34, 4000.00};
-static float P038[3] = {-90.00, 0.00, 4000.00};
-static float P039[3] = {-72.81, -176.33, 4000.00};
-static float P040[3] = {-27.81, -285.31, 4000.00};
-static float P041[3] = {27.81, -285.32, 4000.00};
-static float P042[3] = {72.81, -176.34, 4000.00};
-static float P043[3] = {30.00, 0.00, 5000.00};
-static float P044[3] = {24.27, 58.78, 5000.00};
-static float P045[3] = {9.27, 95.11, 5000.00};
-static float P046[3] = {-9.27, 95.11, 5000.00};
-static float P047[3] = {-24.27, 58.78, 5000.00};
-static float P048[3] = {-30.00, 0.00, 5000.00};
-static float P049[3] = {-24.27, -58.78, 5000.00};
-static float P050[3] = {-9.27, -95.10, 5000.00};
-static float P051[3] = {9.27, -95.11, 5000.00};
-static float P052[3] = {24.27, -58.78, 5000.00};
-static float P058[3] = {0.00, 1212.72, 2703.08};
-static float P059[3] = {50.36, 0.00, 108.14};
-static float P060[3] = {-22.18, 0.00, 108.14};
-static float P061[3] = {0.00, 1181.61, 6344.65};
-static float P062[3] = {516.45, -887.08, 2535.45};
-static float P063[3] = {-545.69, -879.31, 2555.63};
-static float P064[3] = {618.89, -1005.64, 2988.32};
-static float P065[3] = {-635.37, -1014.79, 2938.68};
-static float P066[3] = {0.00, 1374.43, 3064.18};
-static float P069[3] = {0.00, -418.25, 5765.04};
-static float P070[3] = {0.00, 1266.91, 6629.60};
-static float P071[3] = {-139.12, -124.96, 997.98};
-static float P072[3] = {-139.24, -110.18, 1020.68};
-static float P073[3] = {-137.33, -94.52, 1022.63};
-static float P074[3] = {-137.03, -79.91, 996.89};
-static float P075[3] = {-135.21, -91.48, 969.14};
-static float P076[3] = {-135.39, -110.87, 968.76};
-static float P077[3] = {150.23, -78.44, 995.53};
-static float P078[3] = {152.79, -92.76, 1018.46};
-static float P079[3] = {154.19, -110.20, 1020.55};
-static float P080[3] = {151.33, -124.15, 993.77};
-static float P081[3] = {150.49, -111.19, 969.86};
-static float P082[3] = {150.79, -92.41, 969.70};
-static float iP002[3] = {0.00, -36.59, 5687.72};
-static float iP004[3] = {58.24, -146.84, 262.35};
-static float iP007[3] = {-46.09, -146.83, 265.84};
-static float iP010[3] = {-27.81, -285.31, 500.00};
-static float iP011[3] = {27.81, -285.32, 500.00};
-static float iP023[3] = {150.00, 0.00, 3000.00};
-static float iP024[3] = {121.35, 293.89, 3000.00};
-static float iP025[3] = {46.35, 502.93, 2883.09};
-static float iP026[3] = {-46.35, 497.45, 2877.24};
-static float iP027[3] = {-121.35, 293.90, 3000.00};
-static float iP028[3] = {-150.00, 0.00, 3000.00};
-static float iP029[3] = {-121.35, -304.84, 2853.86};
-static float iP030[3] = {-46.36, -475.52, 3000.00};
-static float iP031[3] = {46.35, -475.53, 3000.00};
-static float iP032[3] = {121.35, -304.87, 2853.86};
-static float iP033[3] = {90.00, 0.00, 4000.00};
-static float iP034[3] = {72.81, 176.33, 4000.00};
-static float iP035[3] = {27.81, 285.32, 4000.00};
-static float iP036[3] = {-27.81, 285.32, 4000.00};
-static float iP037[3] = {-72.81, 176.34, 4000.00};
-static float iP038[3] = {-90.00, 0.00, 4000.00};
-static float iP039[3] = {-72.81, -176.33, 4000.00};
-static float iP040[3] = {-27.81, -285.31, 4000.00};
-static float iP041[3] = {27.81, -285.32, 4000.00};
-static float iP042[3] = {72.81, -176.34, 4000.00};
-static float iP043[3] = {30.00, 0.00, 5000.00};
-static float iP044[3] = {24.27, 58.78, 5000.00};
-static float iP045[3] = {9.27, 95.11, 5000.00};
-static float iP046[3] = {-9.27, 95.11, 5000.00};
-static float iP047[3] = {-24.27, 58.78, 5000.00};
-static float iP048[3] = {-30.00, 0.00, 5000.00};
-static float iP049[3] = {-24.27, -58.78, 5000.00};
-static float iP050[3] = {-9.27, -95.10, 5000.00};
-static float iP051[3] = {9.27, -95.11, 5000.00};
-static float iP052[3] = {24.27, -58.78, 5000.00};
-static float iP061[3] = {0.00, 1181.61, 6344.65};
-static float iP069[3] = {0.00, -418.25, 5765.04};
-static float iP070[3] = {0.00, 1266.91, 6629.60};
-/* *INDENT-ON* */
-
-void
-Fish001(void)
-{
-    glBegin(GL_POLYGON);
-    glNormal3fv(N005);
-    glVertex3fv(P005);
-    glNormal3fv(N059);
-    glVertex3fv(P059);
-    glNormal3fv(N060);
-    glVertex3fv(P060);
-    glNormal3fv(N006);
-    glVertex3fv(P006);
-    glEnd();
-    glBegin(GL_POLYGON);
-    glNormal3fv(N015);
-    glVertex3fv(P015);
-    glNormal3fv(N005);
-    glVertex3fv(P005);
-    glNormal3fv(N006);
-    glVertex3fv(P006);
-    glNormal3fv(N016);
-    glVertex3fv(P016);
-    glEnd();
-    glBegin(GL_POLYGON);
-    glNormal3fv(N006);
-    glVertex3fv(P006);
-    glNormal3fv(N060);
-    glVertex3fv(P060);
-    glNormal3fv(N008);
-    glVertex3fv(P008);
-    glEnd();
-    glBegin(GL_POLYGON);
-    glNormal3fv(N016);
-    glVertex3fv(P016);
-    glNormal3fv(N006);
-    glVertex3fv(P006);
-    glNormal3fv(N008);
-    glVertex3fv(P008);
-    glEnd();
-    glBegin(GL_POLYGON);
-    glNormal3fv(N016);
-    glVertex3fv(P016);
-    glNormal3fv(N008);
-    glVertex3fv(P008);
-    glNormal3fv(N017);
-    glVertex3fv(P017);
-    glEnd();
-    glBegin(GL_POLYGON);
-    glNormal3fv(N017);
-    glVertex3fv(P017);
-    glNormal3fv(N008);
-    glVertex3fv(P008);
-    glNormal3fv(N018);
-    glVertex3fv(P018);
-    glEnd();
-    glBegin(GL_POLYGON);
-    glNormal3fv(N008);
-    glVertex3fv(P008);
-    glNormal3fv(N009);
-    glVertex3fv(P009);
-    glNormal3fv(N018);
-    glVertex3fv(P018);
-    glEnd();
-    glBegin(GL_POLYGON);
-    glNormal3fv(N008);
-    glVertex3fv(P008);
-    glNormal3fv(N060);
-    glVertex3fv(P060);
-    glNormal3fv(N009);
-    glVertex3fv(P009);
-    glEnd();
-    glBegin(GL_POLYGON);
-    glNormal3fv(N007);
-    glVertex3fv(P007);
-    glNormal3fv(N010);
-    glVertex3fv(P010);
-    glNormal3fv(N009);
-    glVertex3fv(P009);
-    glEnd();
-    glBegin(GL_POLYGON);
-    glNormal3fv(N009);
-    glVertex3fv(P009);
-    glNormal3fv(N019);
-    glVertex3fv(P019);
-    glNormal3fv(N018);
-    glVertex3fv(P018);
-    glEnd();
-    glBegin(GL_POLYGON);
-    glNormal3fv(N009);
-    glVertex3fv(P009);
-    glNormal3fv(N010);
-    glVertex3fv(P010);
-    glNormal3fv(N019);
-    glVertex3fv(P019);
-    glEnd();
-    glBegin(GL_POLYGON);
-    glNormal3fv(N010);
-    glVertex3fv(P010);
-    glNormal3fv(N020);
-    glVertex3fv(P020);
-    glNormal3fv(N019);
-    glVertex3fv(P019);
-    glEnd();
-    glBegin(GL_POLYGON);
-    glNormal3fv(N010);
-    glVertex3fv(P010);
-    glNormal3fv(N011);
-    glVertex3fv(P011);
-    glNormal3fv(N021);
-    glVertex3fv(P021);
-    glNormal3fv(N020);
-    glVertex3fv(P020);
-    glEnd();
-    glBegin(GL_POLYGON);
-    glNormal3fv(N004);
-    glVertex3fv(P004);
-    glNormal3fv(N011);
-    glVertex3fv(P011);
-    glNormal3fv(N010);
-    glVertex3fv(P010);
-    glNormal3fv(N007);
-    glVertex3fv(P007);
-    glEnd();
-    glBegin(GL_POLYGON);
-    glNormal3fv(N004);
-    glVertex3fv(P004);
-    glNormal3fv(N012);
-    glVertex3fv(P012);
-    glNormal3fv(N011);
-    glVertex3fv(P011);
-    glEnd();
-    glBegin(GL_POLYGON);
-    glNormal3fv(N012);
-    glVertex3fv(P012);
-    glNormal3fv(N022);
-    glVertex3fv(P022);
-    glNormal3fv(N011);
-    glVertex3fv(P011);
-    glEnd();
-    glBegin(GL_POLYGON);
-    glNormal3fv(N011);
-    glVertex3fv(P011);
-    glNormal3fv(N022);
-    glVertex3fv(P022);
-    glNormal3fv(N021);
-    glVertex3fv(P021);
-    glEnd();
-    glBegin(GL_POLYGON);
-    glNormal3fv(N059);
-    glVertex3fv(P059);
-    glNormal3fv(N005);
-    glVertex3fv(P005);
-    glNormal3fv(N015);
-    glVertex3fv(P015);
-    glEnd();
-    glBegin(GL_POLYGON);
-    glNormal3fv(N015);
-    glVertex3fv(P015);
-    glNormal3fv(N014);
-    glVertex3fv(P014);
-    glNormal3fv(N003);
-    glVertex3fv(P003);
-    glEnd();
-    glBegin(GL_POLYGON);
-    glNormal3fv(N015);
-    glVertex3fv(P015);
-    glNormal3fv(N003);
-    glVertex3fv(P003);
-    glNormal3fv(N059);
-    glVertex3fv(P059);
-    glEnd();
-    glBegin(GL_POLYGON);
-    glNormal3fv(N014);
-    glVertex3fv(P014);
-    glNormal3fv(N013);
-    glVertex3fv(P013);
-    glNormal3fv(N003);
-    glVertex3fv(P003);
-    glEnd();
-    glBegin(GL_POLYGON);
-    glNormal3fv(N003);
-    glVertex3fv(P003);
-    glNormal3fv(N012);
-    glVertex3fv(P012);
-    glNormal3fv(N059);
-    glVertex3fv(P059);
-    glEnd();
-    glBegin(GL_POLYGON);
-    glNormal3fv(N013);
-    glVertex3fv(P013);
-    glNormal3fv(N012);
-    glVertex3fv(P012);
-    glNormal3fv(N003);
-    glVertex3fv(P003);
-    glEnd();
-    glBegin(GL_POLYGON);
-    glNormal3fv(N013);
-    glVertex3fv(P013);
-    glNormal3fv(N022);
-    glVertex3fv(P022);
-    glNormal3fv(N012);
-    glVertex3fv(P012);
-    glEnd();
-    glBegin(GL_POLYGON);
-    glVertex3fv(P071);
-    glVertex3fv(P072);
-    glVertex3fv(P073);
-    glVertex3fv(P074);
-    glVertex3fv(P075);
-    glVertex3fv(P076);
-    glEnd();
-    glBegin(GL_POLYGON);
-    glVertex3fv(P077);
-    glVertex3fv(P078);
-    glVertex3fv(P079);
-    glVertex3fv(P080);
-    glVertex3fv(P081);
-    glVertex3fv(P082);
-    glEnd();
-}
-
-void
-Fish002(void)
-{
-    glBegin(GL_POLYGON);
-    glNormal3fv(N013);
-    glVertex3fv(P013);
-    glNormal3fv(N014);
-    glVertex3fv(P014);
-    glNormal3fv(N024);
-    glVertex3fv(P024);
-    glNormal3fv(N023);
-    glVertex3fv(P023);
-    glEnd();
-    glBegin(GL_POLYGON);
-    glNormal3fv(N014);
-    glVertex3fv(P014);
-    glNormal3fv(N015);
-    glVertex3fv(P015);
-    glNormal3fv(N025);
-    glVertex3fv(P025);
-    glNormal3fv(N024);
-    glVertex3fv(P024);
-    glEnd();
-    glBegin(GL_POLYGON);
-    glNormal3fv(N016);
-    glVertex3fv(P016);
-    glNormal3fv(N017);
-    glVertex3fv(P017);
-    glNormal3fv(N027);
-    glVertex3fv(P027);
-    glNormal3fv(N026);
-    glVertex3fv(P026);
-    glEnd();
-    glBegin(GL_POLYGON);
-    glNormal3fv(N017);
-    glVertex3fv(P017);
-    glNormal3fv(N018);
-    glVertex3fv(P018);
-    glNormal3fv(N028);
-    glVertex3fv(P028);
-    glNormal3fv(N027);
-    glVertex3fv(P027);
-    glEnd();
-    glBegin(GL_POLYGON);
-    glNormal3fv(N020);
-    glVertex3fv(P020);
-    glNormal3fv(N021);
-    glVertex3fv(P021);
-    glNormal3fv(N031);
-    glVertex3fv(P031);
-    glNormal3fv(N030);
-    glVertex3fv(P030);
-    glEnd();
-    glBegin(GL_POLYGON);
-    glNormal3fv(N013);
-    glVertex3fv(P013);
-    glNormal3fv(N023);
-    glVertex3fv(P023);
-    glNormal3fv(N022);
-    glVertex3fv(P022);
-    glEnd();
-    glBegin(GL_POLYGON);
-    glNormal3fv(N022);
-    glVertex3fv(P022);
-    glNormal3fv(N023);
-    glVertex3fv(P023);
-    glNormal3fv(N032);
-    glVertex3fv(P032);
-    glEnd();
-    glBegin(GL_POLYGON);
-    glNormal3fv(N022);
-    glVertex3fv(P022);
-    glNormal3fv(N032);
-    glVertex3fv(P032);
-    glNormal3fv(N031);
-    glVertex3fv(P031);
-    glEnd();
-    glBegin(GL_POLYGON);
-    glNormal3fv(N022);
-    glVertex3fv(P022);
-    glNormal3fv(N031);
-    glVertex3fv(P031);
-    glNormal3fv(N021);
-    glVertex3fv(P021);
-    glEnd();
-    glBegin(GL_POLYGON);
-    glNormal3fv(N018);
-    glVertex3fv(P018);
-    glNormal3fv(N019);
-    glVertex3fv(P019);
-    glNormal3fv(N029);
-    glVertex3fv(P029);
-    glEnd();
-    glBegin(GL_POLYGON);
-    glNormal3fv(N018);
-    glVertex3fv(P018);
-    glNormal3fv(N029);
-    glVertex3fv(P029);
-    glNormal3fv(N028);
-    glVertex3fv(P028);
-    glEnd();
-    glBegin(GL_POLYGON);
-    glNormal3fv(N019);
-    glVertex3fv(P019);
-    glNormal3fv(N020);
-    glVertex3fv(P020);
-    glNormal3fv(N030);
-    glVertex3fv(P030);
-    glEnd();
-    glBegin(GL_POLYGON);
-    glNormal3fv(N019);
-    glVertex3fv(P019);
-    glNormal3fv(N030);
-    glVertex3fv(P030);
-    glNormal3fv(N029);
-    glVertex3fv(P029);
-    glEnd();
-}
-
-void
-Fish003(void)
-{
-    glBegin(GL_POLYGON);
-    glNormal3fv(N032);
-    glVertex3fv(P032);
-    glNormal3fv(N023);
-    glVertex3fv(P023);
-    glNormal3fv(N033);
-    glVertex3fv(P033);
-    glNormal3fv(N042);
-    glVertex3fv(P042);
-    glEnd();
-    glBegin(GL_POLYGON);
-    glNormal3fv(N031);
-    glVertex3fv(P031);
-    glNormal3fv(N032);
-    glVertex3fv(P032);
-    glNormal3fv(N042);
-    glVertex3fv(P042);
-    glNormal3fv(N041);
-    glVertex3fv(P041);
-    glEnd();
-    glBegin(GL_POLYGON);
-    glNormal3fv(N023);
-    glVertex3fv(P023);
-    glNormal3fv(N024);
-    glVertex3fv(P024);
-    glNormal3fv(N034);
-    glVertex3fv(P034);
-    glNormal3fv(N033);
-    glVertex3fv(P033);
-    glEnd();
-    glBegin(GL_POLYGON);
-    glNormal3fv(N024);
-    glVertex3fv(P024);
-    glNormal3fv(N025);
-    glVertex3fv(P025);
-    glNormal3fv(N035);
-    glVertex3fv(P035);
-    glNormal3fv(N034);
-    glVertex3fv(P034);
-    glEnd();
-    glBegin(GL_POLYGON);
-    glNormal3fv(N030);
-    glVertex3fv(P030);
-    glNormal3fv(N031);
-    glVertex3fv(P031);
-    glNormal3fv(N041);
-    glVertex3fv(P041);
-    glNormal3fv(N040);
-    glVertex3fv(P040);
-    glEnd();
-    glBegin(GL_POLYGON);
-    glNormal3fv(N025);
-    glVertex3fv(P025);
-    glNormal3fv(N026);
-    glVertex3fv(P026);
-    glNormal3fv(N036);
-    glVertex3fv(P036);
-    glNormal3fv(N035);
-    glVertex3fv(P035);
-    glEnd();
-    glBegin(GL_POLYGON);
-    glNormal3fv(N026);
-    glVertex3fv(P026);
-    glNormal3fv(N027);
-    glVertex3fv(P027);
-    glNormal3fv(N037);
-    glVertex3fv(P037);
-    glNormal3fv(N036);
-    glVertex3fv(P036);
-    glEnd();
-    glBegin(GL_POLYGON);
-    glNormal3fv(N027);
-    glVertex3fv(P027);
-    glNormal3fv(N028);
-    glVertex3fv(P028);
-    glNormal3fv(N038);
-    glVertex3fv(P038);
-    glNormal3fv(N037);
-    glVertex3fv(P037);
-    glEnd();
-    glBegin(GL_POLYGON);
-    glNormal3fv(N028);
-    glVertex3fv(P028);
-    glNormal3fv(N029);
-    glVertex3fv(P029);
-    glNormal3fv(N039);
-    glVertex3fv(P039);
-    glNormal3fv(N038);
-    glVertex3fv(P038);
-    glEnd();
-    glBegin(GL_POLYGON);
-    glNormal3fv(N029);
-    glVertex3fv(P029);
-    glNormal3fv(N030);
-    glVertex3fv(P030);
-    glNormal3fv(N040);
-    glVertex3fv(P040);
-    glNormal3fv(N039);
-    glVertex3fv(P039);
-    glEnd();
-}
-
-void
-Fish004(void)
-{
-    glBegin(GL_POLYGON);
-    glNormal3fv(N040);
-    glVertex3fv(P040);
-    glNormal3fv(N041);
-    glVertex3fv(P041);
-    glNormal3fv(N051);
-    glVertex3fv(P051);
-    glNormal3fv(N050);
-    glVertex3fv(P050);
-    glEnd();
-    glBegin(GL_POLYGON);
-    glNormal3fv(N041);
-    glVertex3fv(P041);
-    glNormal3fv(N042);
-    glVertex3fv(P042);
-    glNormal3fv(N052);
-    glVertex3fv(P052);
-    glNormal3fv(N051);
-    glVertex3fv(P051);
-    glEnd();
-    glBegin(GL_POLYGON);
-    glNormal3fv(N042);
-    glVertex3fv(P042);
-    glNormal3fv(N033);
-    glVertex3fv(P033);
-    glNormal3fv(N043);
-    glVertex3fv(P043);
-    glNormal3fv(N052);
-    glVertex3fv(P052);
-    glEnd();
-    glBegin(GL_POLYGON);
-    glNormal3fv(N033);
-    glVertex3fv(P033);
-    glNormal3fv(N034);
-    glVertex3fv(P034);
-    glNormal3fv(N044);
-    glVertex3fv(P044);
-    glNormal3fv(N043);
-    glVertex3fv(P043);
-    glEnd();
-    glBegin(GL_POLYGON);
-    glNormal3fv(N034);
-    glVertex3fv(P034);
-    glNormal3fv(N035);
-    glVertex3fv(P035);
-    glNormal3fv(N045);
-    glVertex3fv(P045);
-    glNormal3fv(N044);
-    glVertex3fv(P044);
-    glEnd();
-    glBegin(GL_POLYGON);
-    glNormal3fv(N035);
-    glVertex3fv(P035);
-    glNormal3fv(N036);
-    glVertex3fv(P036);
-    glNormal3fv(N046);
-    glVertex3fv(P046);
-    glNormal3fv(N045);
-    glVertex3fv(P045);
-    glEnd();
-    glBegin(GL_POLYGON);
-    glNormal3fv(N036);
-    glVertex3fv(P036);
-    glNormal3fv(N037);
-    glVertex3fv(P037);
-    glNormal3fv(N047);
-    glVertex3fv(P047);
-    glNormal3fv(N046);
-    glVertex3fv(P046);
-    glEnd();
-    glBegin(GL_POLYGON);
-    glNormal3fv(N037);
-    glVertex3fv(P037);
-    glNormal3fv(N038);
-    glVertex3fv(P038);
-    glNormal3fv(N048);
-    glVertex3fv(P048);
-    glNormal3fv(N047);
-    glVertex3fv(P047);
-    glEnd();
-    glBegin(GL_POLYGON);
-    glNormal3fv(N038);
-    glVertex3fv(P038);
-    glNormal3fv(N039);
-    glVertex3fv(P039);
-    glNormal3fv(N049);
-    glVertex3fv(P049);
-    glNormal3fv(N048);
-    glVertex3fv(P048);
-    glEnd();
-    glBegin(GL_POLYGON);
-    glNormal3fv(N039);
-    glVertex3fv(P039);
-    glNormal3fv(N040);
-    glVertex3fv(P040);
-    glNormal3fv(N050);
-    glVertex3fv(P050);
-    glNormal3fv(N049);
-    glVertex3fv(P049);
-    glEnd();
-    glBegin(GL_POLYGON);
-    glNormal3fv(N070);
-    glVertex3fv(P070);
-    glNormal3fv(N061);
-    glVertex3fv(P061);
-    glNormal3fv(N002);
-    glVertex3fv(P002);
-    glEnd();
-    glBegin(GL_POLYGON);
-    glNormal3fv(N061);
-    glVertex3fv(P061);
-    glNormal3fv(N046);
-    glVertex3fv(P046);
-    glNormal3fv(N002);
-    glVertex3fv(P002);
-    glEnd();
-    glBegin(GL_POLYGON);
-    glNormal3fv(N045);
-    glVertex3fv(P045);
-    glNormal3fv(N046);
-    glVertex3fv(P046);
-    glNormal3fv(N061);
-    glVertex3fv(P061);
-    glEnd();
-    glBegin(GL_POLYGON);
-    glNormal3fv(N002);
-    glVertex3fv(P002);
-    glNormal3fv(N061);
-    glVertex3fv(P061);
-    glNormal3fv(N070);
-    glVertex3fv(P070);
-    glEnd();
-    glBegin(GL_POLYGON);
-    glNormal3fv(N002);
-    glVertex3fv(P002);
-    glNormal3fv(N045);
-    glVertex3fv(P045);
-    glNormal3fv(N061);
-    glVertex3fv(P061);
-    glEnd();
-}
-
-void
-Fish005(void)
-{
-    glBegin(GL_POLYGON);
-    glNormal3fv(N002);
-    glVertex3fv(P002);
-    glNormal3fv(N044);
-    glVertex3fv(P044);
-    glNormal3fv(N045);
-    glVertex3fv(P045);
-    glEnd();
-    glBegin(GL_POLYGON);
-    glNormal3fv(N002);
-    glVertex3fv(P002);
-    glNormal3fv(N043);
-    glVertex3fv(P043);
-    glNormal3fv(N044);
-    glVertex3fv(P044);
-    glEnd();
-    glBegin(GL_POLYGON);
-    glNormal3fv(N002);
-    glVertex3fv(P002);
-    glNormal3fv(N052);
-    glVertex3fv(P052);
-    glNormal3fv(N043);
-    glVertex3fv(P043);
-    glEnd();
-    glBegin(GL_POLYGON);
-    glNormal3fv(N002);
-    glVertex3fv(P002);
-    glNormal3fv(N051);
-    glVertex3fv(P051);
-    glNormal3fv(N052);
-    glVertex3fv(P052);
-    glEnd();
-    glBegin(GL_POLYGON);
-    glNormal3fv(N002);
-    glVertex3fv(P002);
-    glNormal3fv(N046);
-    glVertex3fv(P046);
-    glNormal3fv(N047);
-    glVertex3fv(P047);
-    glEnd();
-    glBegin(GL_POLYGON);
-    glNormal3fv(N002);
-    glVertex3fv(P002);
-    glNormal3fv(N047);
-    glVertex3fv(P047);
-    glNormal3fv(N048);
-    glVertex3fv(P048);
-    glEnd();
-    glBegin(GL_POLYGON);
-    glNormal3fv(N002);
-    glVertex3fv(P002);
-    glNormal3fv(N048);
-    glVertex3fv(P048);
-    glNormal3fv(N049);
-    glVertex3fv(P049);
-    glEnd();
-    glBegin(GL_POLYGON);
-    glNormal3fv(N002);
-    glVertex3fv(P002);
-    glNormal3fv(N049);
-    glVertex3fv(P049);
-    glNormal3fv(N050);
-    glVertex3fv(P050);
-    glEnd();
-    glBegin(GL_POLYGON);
-    glNormal3fv(N050);
-    glVertex3fv(P050);
-    glNormal3fv(N051);
-    glVertex3fv(P051);
-    glNormal3fv(N069);
-    glVertex3fv(P069);
-    glEnd();
-    glBegin(GL_POLYGON);
-    glNormal3fv(N051);
-    glVertex3fv(P051);
-    glNormal3fv(N002);
-    glVertex3fv(P002);
-    glNormal3fv(N069);
-    glVertex3fv(P069);
-    glEnd();
-    glBegin(GL_POLYGON);
-    glNormal3fv(N050);
-    glVertex3fv(P050);
-    glNormal3fv(N069);
-    glVertex3fv(P069);
-    glNormal3fv(N002);
-    glVertex3fv(P002);
-    glEnd();
-}
-
-void
-Fish006(void)
-{
-    glBegin(GL_POLYGON);
-    glNormal3fv(N066);
-    glVertex3fv(P066);
-    glNormal3fv(N016);
-    glVertex3fv(P016);
-    glNormal3fv(N026);
-    glVertex3fv(P026);
-    glEnd();
-    glBegin(GL_POLYGON);
-    glNormal3fv(N015);
-    glVertex3fv(P015);
-    glNormal3fv(N066);
-    glVertex3fv(P066);
-    glNormal3fv(N025);
-    glVertex3fv(P025);
-    glEnd();
-    glBegin(GL_POLYGON);
-    glNormal3fv(N025);
-    glVertex3fv(P025);
-    glNormal3fv(N066);
-    glVertex3fv(P066);
-    glNormal3fv(N026);
-    glVertex3fv(P026);
-    glEnd();
-    glBegin(GL_POLYGON);
-    glNormal3fv(N066);
-    glVertex3fv(P066);
-    glNormal3fv(N058);
-    glVertex3fv(P058);
-    glNormal3fv(N016);
-    glVertex3fv(P016);
-    glEnd();
-    glBegin(GL_POLYGON);
-    glNormal3fv(N015);
-    glVertex3fv(P015);
-    glNormal3fv(N058);
-    glVertex3fv(P058);
-    glNormal3fv(N066);
-    glVertex3fv(P066);
-    glEnd();
-    glBegin(GL_POLYGON);
-    glNormal3fv(N058);
-    glVertex3fv(P058);
-    glNormal3fv(N015);
-    glVertex3fv(P015);
-    glNormal3fv(N016);
-    glVertex3fv(P016);
-    glEnd();
-}
-
-void
-Fish007(void)
-{
-    glBegin(GL_POLYGON);
-    glNormal3fv(N062);
-    glVertex3fv(P062);
-    glNormal3fv(N022);
-    glVertex3fv(P022);
-    glNormal3fv(N032);
-    glVertex3fv(P032);
-    glEnd();
-    glBegin(GL_POLYGON);
-    glNormal3fv(N062);
-    glVertex3fv(P062);
-    glNormal3fv(N032);
-    glVertex3fv(P032);
-    glNormal3fv(N064);
-    glVertex3fv(P064);
-    glEnd();
-    glBegin(GL_POLYGON);
-    glNormal3fv(N022);
-    glVertex3fv(P022);
-    glNormal3fv(N062);
-    glVertex3fv(P062);
-    glNormal3fv(N032);
-    glVertex3fv(P032);
-    glEnd();
-    glBegin(GL_POLYGON);
-    glNormal3fv(N062);
-    glVertex3fv(P062);
-    glNormal3fv(N064);
-    glVertex3fv(P064);
-    glNormal3fv(N032);
-    glVertex3fv(P032);
-    glEnd();
-}
-
-void
-Fish008(void)
-{
-    glBegin(GL_POLYGON);
-    glNormal3fv(N063);
-    glVertex3fv(P063);
-    glNormal3fv(N019);
-    glVertex3fv(P019);
-    glNormal3fv(N029);
-    glVertex3fv(P029);
-    glEnd();
-    glBegin(GL_POLYGON);
-    glNormal3fv(N019);
-    glVertex3fv(P019);
-    glNormal3fv(N063);
-    glVertex3fv(P063);
-    glNormal3fv(N029);
-    glVertex3fv(P029);
-    glEnd();
-    glBegin(GL_POLYGON);
-    glNormal3fv(N063);
-    glVertex3fv(P063);
-    glNormal3fv(N029);
-    glVertex3fv(P029);
-    glNormal3fv(N065);
-    glVertex3fv(P065);
-    glEnd();
-    glBegin(GL_POLYGON);
-    glNormal3fv(N063);
-    glVertex3fv(P063);
-    glNormal3fv(N065);
-    glVertex3fv(P065);
-    glNormal3fv(N029);
-    glVertex3fv(P029);
-    glEnd();
-}
-
-void
-Fish009(void)
-{
-    glBegin(GL_POLYGON);
-    glVertex3fv(P059);
-    glVertex3fv(P012);
-    glVertex3fv(P009);
-    glVertex3fv(P060);
-    glEnd();
-    glBegin(GL_POLYGON);
-    glVertex3fv(P012);
-    glVertex3fv(P004);
-    glVertex3fv(P007);
-    glVertex3fv(P009);
-    glEnd();
-}
-
-void
-Fish_1(void)
-{
-    Fish004();
-    Fish005();
-    Fish003();
-    Fish007();
-    Fish006();
-    Fish002();
-    Fish008();
-    Fish009();
-    Fish001();
-}
-
-void
-Fish_2(void)
-{
-    Fish005();
-    Fish004();
-    Fish003();
-    Fish008();
-    Fish006();
-    Fish002();
-    Fish007();
-    Fish009();
-    Fish001();
-}
-
-void
-Fish_3(void)
-{
-    Fish005();
-    Fish004();
-    Fish007();
-    Fish003();
-    Fish002();
-    Fish008();
-    Fish009();
-    Fish001();
-    Fish006();
-}
-
-void
-Fish_4(void)
-{
-    Fish005();
-    Fish004();
-    Fish008();
-    Fish003();
-    Fish002();
-    Fish007();
-    Fish009();
-    Fish001();
-    Fish006();
-}
-
-void
-Fish_5(void)
-{
-    Fish009();
-    Fish006();
-    Fish007();
-    Fish001();
-    Fish002();
-    Fish003();
-    Fish008();
-    Fish004();
-    Fish005();
-}
-
-void
-Fish_6(void)
-{
-    Fish009();
-    Fish006();
-    Fish008();
-    Fish001();
-    Fish002();
-    Fish007();
-    Fish003();
-    Fish004();
-    Fish005();
-}
-
-void
-Fish_7(void)
-{
-    Fish009();
-    Fish001();
-    Fish007();
-    Fish005();
-    Fish002();
-    Fish008();
-    Fish003();
-    Fish004();
-    Fish006();
-}
-
-void
-Fish_8(void)
-{
-    Fish009();
-    Fish008();
-    Fish001();
-    Fish002();
-    Fish007();
-    Fish003();
-    Fish005();
-    Fish004();
-    Fish006();
-}
-
-void
-DrawShark(fishRec * fish)
-{
-    float mat[4][4];
-    int n;
-    float seg1, seg2, seg3, seg4, segup;
-    float thrash, chomp;
-
-    fish->htail = (int) (fish->htail - (int) (5.0 * fish->v)) % 360;
-
-    thrash = 50.0 * fish->v;
-
-    seg1 = 0.6 * thrash * sin(fish->htail * RRAD);
-    seg2 = 1.8 * thrash * sin((fish->htail + 45.0) * RRAD);
-    seg3 = 3.0 * thrash * sin((fish->htail + 90.0) * RRAD);
-    seg4 = 4.0 * thrash * sin((fish->htail + 110.0) * RRAD);
-
-    chomp = 0.0;
-    if (fish->v > 2.0) {
-        chomp = -(fish->v - 2.0) * 200.0;
-    }
-    P004[1] = iP004[1] + chomp;
-    P007[1] = iP007[1] + chomp;
-    P010[1] = iP010[1] + chomp;
-    P011[1] = iP011[1] + chomp;
-
-    P023[0] = iP023[0] + seg1;
-    P024[0] = iP024[0] + seg1;
-    P025[0] = iP025[0] + seg1;
-    P026[0] = iP026[0] + seg1;
-    P027[0] = iP027[0] + seg1;
-    P028[0] = iP028[0] + seg1;
-    P029[0] = iP029[0] + seg1;
-    P030[0] = iP030[0] + seg1;
-    P031[0] = iP031[0] + seg1;
-    P032[0] = iP032[0] + seg1;
-    P033[0] = iP033[0] + seg2;
-    P034[0] = iP034[0] + seg2;
-    P035[0] = iP035[0] + seg2;
-    P036[0] = iP036[0] + seg2;
-    P037[0] = iP037[0] + seg2;
-    P038[0] = iP038[0] + seg2;
-    P039[0] = iP039[0] + seg2;
-    P040[0] = iP040[0] + seg2;
-    P041[0] = iP041[0] + seg2;
-    P042[0] = iP042[0] + seg2;
-    P043[0] = iP043[0] + seg3;
-    P044[0] = iP044[0] + seg3;
-    P045[0] = iP045[0] + seg3;
-    P046[0] = iP046[0] + seg3;
-    P047[0] = iP047[0] + seg3;
-    P048[0] = iP048[0] + seg3;
-    P049[0] = iP049[0] + seg3;
-    P050[0] = iP050[0] + seg3;
-    P051[0] = iP051[0] + seg3;
-    P052[0] = iP052[0] + seg3;
-    P002[0] = iP002[0] + seg4;
-    P061[0] = iP061[0] + seg4;
-    P069[0] = iP069[0] + seg4;
-    P070[0] = iP070[0] + seg4;
-
-    fish->vtail += ((fish->dtheta - fish->vtail) * 0.1);
-
-    if (fish->vtail > 0.5) {
-        fish->vtail = 0.5;
-    } else if (fish->vtail < -0.5) {
-        fish->vtail = -0.5;
-    }
-    segup = thrash * fish->vtail;
-
-    P023[1] = iP023[1] + segup;
-    P024[1] = iP024[1] + segup;
-    P025[1] = iP025[1] + segup;
-    P026[1] = iP026[1] + segup;
-    P027[1] = iP027[1] + segup;
-    P028[1] = iP028[1] + segup;
-    P029[1] = iP029[1] + segup;
-    P030[1] = iP030[1] + segup;
-    P031[1] = iP031[1] + segup;
-    P032[1] = iP032[1] + segup;
-    P033[1] = iP033[1] + segup * 5.0;
-    P034[1] = iP034[1] + segup * 5.0;
-    P035[1] = iP035[1] + segup * 5.0;
-    P036[1] = iP036[1] + segup * 5.0;
-    P037[1] = iP037[1] + segup * 5.0;
-    P038[1] = iP038[1] + segup * 5.0;
-    P039[1] = iP039[1] + segup * 5.0;
-    P040[1] = iP040[1] + segup * 5.0;
-    P041[1] = iP041[1] + segup * 5.0;
-    P042[1] = iP042[1] + segup * 5.0;
-    P043[1] = iP043[1] + segup * 12.0;
-    P044[1] = iP044[1] + segup * 12.0;
-    P045[1] = iP045[1] + segup * 12.0;
-    P046[1] = iP046[1] + segup * 12.0;
-    P047[1] = iP047[1] + segup * 12.0;
-    P048[1] = iP048[1] + segup * 12.0;
-    P049[1] = iP049[1] + segup * 12.0;
-    P050[1] = iP050[1] + segup * 12.0;
-    P051[1] = iP051[1] + segup * 12.0;
-    P052[1] = iP052[1] + segup * 12.0;
-    P002[1] = iP002[1] + segup * 17.0;
-    P061[1] = iP061[1] + segup * 17.0;
-    P069[1] = iP069[1] + segup * 17.0;
-    P070[1] = iP070[1] + segup * 17.0;
-
-    glPushMatrix();
-
-    glTranslatef(0.0, 0.0, -3000.0);
-
-    glGetFloatv(GL_MODELVIEW_MATRIX, &mat[0][0]);
-    n = 0;
-    if (mat[0][2] >= 0.0) {
-        n += 1;
-    }
-    if (mat[1][2] >= 0.0) {
-        n += 2;
-    }
-    if (mat[2][2] >= 0.0) {
-        n += 4;
-    }
-    glScalef(2.0, 1.0, 1.0);
-
-    glEnable(GL_CULL_FACE);
-    switch (n) {
-    case 0:
-        Fish_1();
-        break;
-    case 1:
-        Fish_2();
-        break;
-    case 2:
-        Fish_3();
-        break;
-    case 3:
-        Fish_4();
-        break;
-    case 4:
-        Fish_5();
-        break;
-    case 5:
-        Fish_6();
-        break;
-    case 6:
-        Fish_7();
-        break;
-    case 7:
-        Fish_8();
-        break;
-    }
-    glDisable(GL_CULL_FACE);
-
-    glPopMatrix();
-}
diff --git a/Xcode/TemplatesForXcodeTiger/SDL OpenGL Application/atlantis/swim.c b/Xcode/TemplatesForXcodeTiger/SDL OpenGL Application/atlantis/swim.c
deleted file mode 100644
index cac7b6095..000000000
--- a/Xcode/TemplatesForXcodeTiger/SDL OpenGL Application/atlantis/swim.c	
+++ /dev/null
@@ -1,188 +0,0 @@
-/**
- * (c) Copyright 1993, 1994, Silicon Graphics, Inc.
- * ALL RIGHTS RESERVED
- * Permission to use, copy, modify, and distribute this software for
- * any purpose and without fee is hereby granted, provided that the above
- * copyright notice appear in all copies and that both the copyright notice
- * and this permission notice appear in supporting documentation, and that
- * the name of Silicon Graphics, Inc. not be used in advertising
- * or publicity pertaining to distribution of the software without specific,
- * written prior permission.
- *
- * THE MATERIAL EMBODIED ON THIS SOFTWARE IS PROVIDED TO YOU "AS-IS"
- * AND WITHOUT WARRANTY OF ANY KIND, EXPRESS, IMPLIED OR OTHERWISE,
- * INCLUDING WITHOUT LIMITATION, ANY WARRANTY OF MERCHANTABILITY OR
- * FITNESS FOR A PARTICULAR PURPOSE.  IN NO EVENT SHALL SILICON
- * GRAPHICS, INC.  BE LIABLE TO YOU OR ANYONE ELSE FOR ANY DIRECT,
- * SPECIAL, INCIDENTAL, INDIRECT OR CONSEQUENTIAL DAMAGES OF ANY
- * KIND, OR ANY DAMAGES WHATSOEVER, INCLUDING WITHOUT LIMITATION,
- * LOSS OF PROFIT, LOSS OF USE, SAVINGS OR REVENUE, OR THE CLAIMS OF
- * THIRD PARTIES, WHETHER OR NOT SILICON GRAPHICS, INC.  HAS BEEN
- * ADVISED OF THE POSSIBILITY OF SUCH LOSS, HOWEVER CAUSED AND ON
- * ANY THEORY OF LIABILITY, ARISING OUT OF OR IN CONNECTION WITH THE
- * POSSESSION, USE OR PERFORMANCE OF THIS SOFTWARE.
- *
- * US Government Users Restricted Rights
- * Use, duplication, or disclosure by the Government is subject to
- * restrictions set forth in FAR 52.227.19(c)(2) or subparagraph
- * (c)(1)(ii) of the Rights in Technical Data and Computer Software
- * clause at DFARS 252.227-7013 and/or in similar or successor
- * clauses in the FAR or the DOD or NASA FAR Supplement.
- * Unpublished-- rights reserved under the copyright laws of the
- * United States.  Contractor/manufacturer is Silicon Graphics,
- * Inc., 2011 N.  Shoreline Blvd., Mountain View, CA 94039-7311.
- *
- * OpenGL(TM) is a trademark of Silicon Graphics, Inc.
- */
-#include 
-#include   /* For rand(). */
-#include 
-#include "atlantis.h"
-
-void
-FishTransform(fishRec * fish)
-{
-
-    glTranslatef(fish->y, fish->z, -fish->x);
-    glRotatef(-fish->psi, 0.0, 1.0, 0.0);
-    glRotatef(fish->theta, 1.0, 0.0, 0.0);
-    glRotatef(-fish->phi, 0.0, 0.0, 1.0);
-}
-
-void
-WhalePilot(fishRec * fish)
-{
-
-    fish->phi = -20.0;
-    fish->theta = 0.0;
-    fish->psi -= 0.5;
-
-    fish->x += WHALESPEED * fish->v * cos(fish->psi / RAD) * cos(fish->theta / RAD);
-    fish->y += WHALESPEED * fish->v * sin(fish->psi / RAD) * cos(fish->theta / RAD);
-    fish->z += WHALESPEED * fish->v * sin(fish->theta / RAD);
-}
-
-void
-SharkPilot(fishRec * fish)
-{
-    static int sign = 1;
-    float X, Y, Z, tpsi, ttheta, thetal;
-
-    fish->xt = 60000.0;
-    fish->yt = 0.0;
-    fish->zt = 0.0;
-
-    X = fish->xt - fish->x;
-    Y = fish->yt - fish->y;
-    Z = fish->zt - fish->z;
-
-    thetal = fish->theta;
-
-    ttheta = RAD * atan(Z / (sqrt(X * X + Y * Y)));
-
-    if (ttheta > fish->theta + 0.25) {
-        fish->theta += 0.5;
-    } else if (ttheta < fish->theta - 0.25) {
-        fish->theta -= 0.5;
-    }
-    if (fish->theta > 90.0) {
-        fish->theta = 90.0;
-    }
-    if (fish->theta < -90.0) {
-        fish->theta = -90.0;
-    }
-    fish->dtheta = fish->theta - thetal;
-
-    tpsi = RAD * atan2(Y, X);
-
-    fish->attack = 0;
-
-    if (fabs(tpsi - fish->psi) < 10.0) {
-        fish->attack = 1;
-    } else if (fabs(tpsi - fish->psi) < 45.0) {
-        if (fish->psi > tpsi) {
-            fish->psi -= 0.5;
-            if (fish->psi < -180.0) {
-                fish->psi += 360.0;
-            }
-        } else if (fish->psi < tpsi) {
-            fish->psi += 0.5;
-            if (fish->psi > 180.0) {
-                fish->psi -= 360.0;
-            }
-        }
-    } else {
-        if (rand() % 100 > 98) {
-            sign = 1 - sign;
-        }
-        fish->psi += sign;
-        if (fish->psi > 180.0) {
-            fish->psi -= 360.0;
-        }
-        if (fish->psi < -180.0) {
-            fish->psi += 360.0;
-        }
-    }
-
-    if (fish->attack) {
-        if (fish->v < 1.1) {
-            fish->spurt = 1;
-        }
-        if (fish->spurt) {
-            fish->v += 0.2;
-        }
-        if (fish->v > 5.0) {
-            fish->spurt = 0;
-        }
-        if ((fish->v > 1.0) && (!fish->spurt)) {
-            fish->v -= 0.2;
-        }
-    } else {
-        if (!(rand() % 400) && (!fish->spurt)) {
-            fish->spurt = 1;
-        }
-        if (fish->spurt) {
-            fish->v += 0.05;
-        }
-        if (fish->v > 3.0) {
-            fish->spurt = 0;
-        }
-        if ((fish->v > 1.0) && (!fish->spurt)) {
-            fish->v -= 0.05;
-        }
-    }
-
-    fish->x += SHARKSPEED * fish->v * cos(fish->psi / RAD) * cos(fish->theta / RAD);
-    fish->y += SHARKSPEED * fish->v * sin(fish->psi / RAD) * cos(fish->theta / RAD);
-    fish->z += SHARKSPEED * fish->v * sin(fish->theta / RAD);
-}
-
-void
-SharkMiss(int i)
-{
-    int j;
-    float avoid, thetal;
-    float X, Y, Z, R;
-
-    for (j = 0; j < NUM_SHARKS; j++) {
-        if (j != i) {
-            X = sharks[j].x - sharks[i].x;
-            Y = sharks[j].y - sharks[i].y;
-            Z = sharks[j].z - sharks[i].z;
-
-            R = sqrt(X * X + Y * Y + Z * Z);
-
-            avoid = 1.0;
-            thetal = sharks[i].theta;
-
-            if (R < SHARKSIZE) {
-                if (Z > 0.0) {
-                    sharks[i].theta -= avoid;
-                } else {
-                    sharks[i].theta += avoid;
-                }
-            }
-            sharks[i].dtheta += (sharks[i].theta - thetal);
-        }
-    }
-}
diff --git a/Xcode/TemplatesForXcodeTiger/SDL OpenGL Application/atlantis/whale.c b/Xcode/TemplatesForXcodeTiger/SDL OpenGL Application/atlantis/whale.c
deleted file mode 100644
index 828640ad0..000000000
--- a/Xcode/TemplatesForXcodeTiger/SDL OpenGL Application/atlantis/whale.c	
+++ /dev/null
@@ -1,1798 +0,0 @@
-/**
- * (c) Copyright 1993, 1994, Silicon Graphics, Inc.
- * ALL RIGHTS RESERVED
- * Permission to use, copy, modify, and distribute this software for
- * any purpose and without fee is hereby granted, provided that the above
- * copyright notice appear in all copies and that both the copyright notice
- * and this permission notice appear in supporting documentation, and that
- * the name of Silicon Graphics, Inc. not be used in advertising
- * or publicity pertaining to distribution of the software without specific,
- * written prior permission.
- *
- * THE MATERIAL EMBODIED ON THIS SOFTWARE IS PROVIDED TO YOU "AS-IS"
- * AND WITHOUT WARRANTY OF ANY KIND, EXPRESS, IMPLIED OR OTHERWISE,
- * INCLUDING WITHOUT LIMITATION, ANY WARRANTY OF MERCHANTABILITY OR
- * FITNESS FOR A PARTICULAR PURPOSE.  IN NO EVENT SHALL SILICON
- * GRAPHICS, INC.  BE LIABLE TO YOU OR ANYONE ELSE FOR ANY DIRECT,
- * SPECIAL, INCIDENTAL, INDIRECT OR CONSEQUENTIAL DAMAGES OF ANY
- * KIND, OR ANY DAMAGES WHATSOEVER, INCLUDING WITHOUT LIMITATION,
- * LOSS OF PROFIT, LOSS OF USE, SAVINGS OR REVENUE, OR THE CLAIMS OF
- * THIRD PARTIES, WHETHER OR NOT SILICON GRAPHICS, INC.  HAS BEEN
- * ADVISED OF THE POSSIBILITY OF SUCH LOSS, HOWEVER CAUSED AND ON
- * ANY THEORY OF LIABILITY, ARISING OUT OF OR IN CONNECTION WITH THE
- * POSSESSION, USE OR PERFORMANCE OF THIS SOFTWARE.
- *
- * US Government Users Restricted Rights
- * Use, duplication, or disclosure by the Government is subject to
- * restrictions set forth in FAR 52.227.19(c)(2) or subparagraph
- * (c)(1)(ii) of the Rights in Technical Data and Computer Software
- * clause at DFARS 252.227-7013 and/or in similar or successor
- * clauses in the FAR or the DOD or NASA FAR Supplement.
- * Unpublished-- rights reserved under the copyright laws of the
- * United States.  Contractor/manufacturer is Silicon Graphics,
- * Inc., 2011 N.  Shoreline Blvd., Mountain View, CA 94039-7311.
- *
- * OpenGL(TM) is a trademark of Silicon Graphics, Inc.
- */
-#include 
-#include 
-#include "atlantis.h"
-/* *INDENT-OFF* */
-static float N001[3] = {0.019249 ,0.011340 ,-0.999750};
-static float N002[3] = {-0.132579 ,0.954547 ,0.266952};
-static float N003[3] = {-0.196061 ,0.980392 ,-0.019778};
-static float N004[3] = {0.695461 ,0.604704 ,0.388158};
-static float N005[3] = {0.870600 ,0.425754 ,0.246557};
-static float N006[3] = {-0.881191 ,0.392012 ,0.264251};
-static float N008[3] = {-0.341437 ,0.887477 ,0.309523};
-static float N009[3] = {0.124035 ,-0.992278 ,0.000000};
-static float N010[3] = {0.242536 ,0.000000 ,-0.970143};
-static float N011[3] = {0.588172 ,0.000000 ,0.808736};
-static float N012[3] = {0.929824 ,-0.340623 ,-0.139298};
-static float N013[3] = {0.954183 ,0.267108 ,-0.134865};
-static float N014[3] = {0.495127 ,0.855436 ,-0.151914};
-static float N015[3] = {-0.390199 ,0.906569 ,-0.160867};
-static float N016[3] = {-0.923605 ,0.354581 ,-0.145692};
-static float N017[3] = {-0.955796 ,-0.260667 ,-0.136036};
-static float N018[3] = {-0.501283 ,-0.853462 ,-0.142540};
-static float N019[3] = {0.405300 ,-0.901974 ,-0.148913};
-static float N020[3] = {0.909913 ,-0.392746 ,-0.133451};
-static float N021[3] = {0.936494 ,0.331147 ,-0.115414};
-static float N022[3] = {0.600131 ,0.793724 ,-0.099222};
-static float N023[3] = {-0.231556 ,0.968361 ,-0.093053};
-static float N024[3] = {-0.844369 ,0.525330 ,-0.105211};
-static float N025[3] = {-0.982725 ,-0.136329 ,-0.125164};
-static float N026[3] = {-0.560844 ,-0.822654 ,-0.093241};
-static float N027[3] = {0.263884 ,-0.959981 ,-0.093817};
-static float N028[3] = {0.842057 ,-0.525192 ,-0.122938};
-static float N029[3] = {0.921620 ,0.367565 ,-0.124546};
-static float N030[3] = {0.613927 ,0.784109 ,-0.090918};
-static float N031[3] = {-0.448754 ,0.888261 ,-0.098037};
-static float N032[3] = {-0.891865 ,0.434376 ,-0.126077};
-static float N033[3] = {-0.881447 ,-0.448017 ,-0.149437};
-static float N034[3] = {-0.345647 ,-0.922057 ,-0.174183};
-static float N035[3] = {0.307998 ,-0.941371 ,-0.137688};
-static float N036[3] = {0.806316 ,-0.574647 ,-0.140124};
-static float N037[3] = {0.961346 ,0.233646 ,-0.145681};
-static float N038[3] = {0.488451 ,0.865586 ,-0.110351};
-static float N039[3] = {-0.374290 ,0.921953 ,-0.099553};
-static float N040[3] = {-0.928504 ,0.344533 ,-0.138485};
-static float N041[3] = {-0.918419 ,-0.371792 ,-0.135189};
-static float N042[3] = {-0.520666 ,-0.833704 ,-0.183968};
-static float N043[3] = {0.339204 ,-0.920273 ,-0.195036};
-static float N044[3] = {0.921475 ,-0.387382 ,-0.028636};
-static float N045[3] = {0.842465 ,0.533335 ,-0.076204};
-static float N046[3] = {0.380110 ,0.924939 ,0.002073};
-static float N047[3] = {-0.276128 ,0.961073 ,-0.009579};
-static float N048[3] = {-0.879684 ,0.473001 ,-0.049250};
-static float N049[3] = {-0.947184 ,-0.317614 ,-0.044321};
-static float N050[3] = {-0.642059 ,-0.764933 ,-0.051363};
-static float N051[3] = {0.466794 ,-0.880921 ,-0.077990};
-static float N052[3] = {0.898509 ,-0.432277 ,0.076279};
-static float N053[3] = {0.938985 ,0.328141 ,0.103109};
-static float N054[3] = {0.442420 ,0.895745 ,0.043647};
-static float N055[3] = {-0.255163 ,0.966723 ,0.018407};
-static float N056[3] = {-0.833769 ,0.540650 ,0.111924};
-static float N057[3] = {-0.953653 ,-0.289939 ,0.080507};
-static float N058[3] = {-0.672357 ,-0.730524 ,0.119461};
-static float N059[3] = {0.522249 ,-0.846652 ,0.102157};
-static float N060[3] = {0.885868 ,-0.427631 ,0.179914};
-static float N062[3] = {0.648942 ,0.743116 ,0.163255};
-static float N063[3] = {-0.578967 ,0.807730 ,0.111219};
-static float N065[3] = {-0.909864 ,-0.352202 ,0.219321};
-static float N066[3] = {-0.502541 ,-0.818090 ,0.279610};
-static float N067[3] = {0.322919 ,-0.915358 ,0.240504};
-static float N068[3] = {0.242536 ,0.000000 ,-0.970143};
-static float N069[3] = {0.000000 ,1.000000 ,0.000000};
-static float N070[3] = {0.000000 ,1.000000 ,0.000000};
-static float N071[3] = {0.000000 ,1.000000 ,0.000000};
-static float N072[3] = {0.000000 ,1.000000 ,0.000000};
-static float N073[3] = {0.000000 ,1.000000 ,0.000000};
-static float N074[3] = {0.000000 ,1.000000 ,0.000000};
-static float N075[3] = {0.031220 ,0.999025 ,-0.031220};
-static float N076[3] = {0.000000 ,1.000000 ,0.000000};
-static float N077[3] = {0.446821 ,0.893642 ,0.041889};
-static float N078[3] = {0.863035 ,-0.100980 ,0.494949};
-static float N079[3] = {0.585597 ,-0.808215 ,0.062174};
-static float N080[3] = {0.000000 ,1.000000 ,0.000000};
-static float N081[3] = {1.000000 ,0.000000 ,0.000000};
-static float N082[3] = {0.000000 ,1.000000 ,0.000000};
-static float N083[3] = {-1.000000 ,0.000000 ,0.000000};
-static float N084[3] = {-0.478893 ,0.837129 ,-0.264343};
-static float N085[3] = {0.000000 ,1.000000 ,0.000000};
-static float N086[3] = {0.763909 ,0.539455 ,-0.354163};
-static float N087[3] = {0.446821 ,0.893642 ,0.041889};
-static float N088[3] = {0.385134 ,-0.908288 ,0.163352};
-static float N089[3] = {-0.605952 ,0.779253 ,-0.159961};
-static float N090[3] = {0.000000 ,1.000000 ,0.000000};
-static float N091[3] = {0.000000 ,1.000000 ,0.000000};
-static float N092[3] = {0.000000 ,1.000000 ,0.000000};
-static float N093[3] = {0.000000 ,1.000000 ,0.000000};
-static float N094[3] = {1.000000 ,0.000000 ,0.000000};
-static float N095[3] = {-1.000000 ,0.000000 ,0.000000};
-static float N096[3] = {0.644444 ,-0.621516 ,0.445433};
-static float N097[3] = {-0.760896 ,-0.474416 ,0.442681};
-static float N098[3] = {0.636888 ,-0.464314 ,0.615456};
-static float N099[3] = {-0.710295 ,0.647038 ,0.277168};
-static float N100[3] = {0.009604 ,0.993655 ,0.112063};
-static float iP001[3] = {18.74, 13.19, 3.76};
-static float P001[3] = {18.74, 13.19, 3.76};
-static float P002[3] = {0.00, 390.42, 10292.57};
-static float P003[3] = {55.80, 622.31, 8254.35};
-static float P004[3] = {20.80, 247.66, 10652.13};
-static float P005[3] = {487.51, 198.05, 9350.78};
-static float P006[3] = {-457.61, 199.04, 9353.01};
-static float P008[3] = {-34.67, 247.64, 10663.71};
-static float iP009[3] = {97.46, 67.63, 593.82};
-static float iP010[3] = {-84.33, 67.63, 588.18};
-static float iP011[3] = {118.69, 8.98, -66.91};
-static float P009[3] = {97.46, 67.63, 593.82};
-static float P010[3] = {-84.33, 67.63, 588.18};
-static float P011[3] = {118.69, 8.98, -66.91};
-static float iP012[3] = {156.48, -31.95, 924.54};
-static float iP013[3] = {162.00, 110.22, 924.54};
-static float iP014[3] = {88.16, 221.65, 924.54};
-static float iP015[3] = {-65.21, 231.16, 924.54};
-static float iP016[3] = {-156.48, 121.97, 924.54};
-static float iP017[3] = {-162.00, -23.93, 924.54};
-static float iP018[3] = {-88.16, -139.10, 924.54};
-static float iP019[3] = {65.21, -148.61, 924.54};
-static float iP020[3] = {246.87, -98.73, 1783.04};
-static float iP021[3] = {253.17, 127.76, 1783.04};
-static float iP022[3] = {132.34, 270.77, 1783.04};
-static float iP023[3] = {-97.88, 285.04, 1783.04};
-static float iP024[3] = {-222.97, 139.80, 1783.04};
-static float iP025[3] = {-225.29, -86.68, 1783.04};
-static float iP026[3] = {-108.44, -224.15, 1783.04};
-static float iP027[3] = {97.88, -221.56, 1783.04};
-static float iP028[3] = {410.55, -200.66, 3213.87};
-static float iP029[3] = {432.19, 148.42, 3213.87};
-static float iP030[3] = {200.66, 410.55, 3213.87};
-static float iP031[3] = {-148.42, 432.19, 3213.87};
-static float iP032[3] = {-407.48, 171.88, 3213.87};
-static float iP033[3] = {-432.19, -148.42, 3213.87};
-static float iP034[3] = {-148.88, -309.74, 3213.87};
-static float iP035[3] = {156.38, -320.17, 3213.87};
-static float iP036[3] = {523.39, -303.81, 4424.57};
-static float iP037[3] = {574.66, 276.84, 4424.57};
-static float iP038[3] = {243.05, 492.50, 4424.57};
-static float iP039[3] = {-191.23, 520.13, 4424.57};
-static float iP040[3] = {-523.39, 304.01, 4424.57};
-static float iP041[3] = {-574.66, -231.83, 4424.57};
-static float iP042[3] = {-266.95, -578.17, 4424.57};
-static float iP043[3] = {211.14, -579.67, 4424.57};
-static float iP044[3] = {680.57, -370.27, 5943.46};
-static float iP045[3] = {834.01, 363.09, 5943.46};
-static float iP046[3] = {371.29, 614.13, 5943.46};
-static float iP047[3] = {-291.43, 621.86, 5943.46};
-static float iP048[3] = {-784.13, 362.60, 5943.46};
-static float iP049[3] = {-743.29, -325.82, 5943.46};
-static float iP050[3] = {-383.24, -804.77, 5943.46};
-static float iP051[3] = {283.47, -846.09, 5943.46};
-static float P012[3] = {156.48, -31.95, 924.54};
-static float P013[3] = {162.00, 110.22, 924.54};
-static float P014[3] = {88.16, 221.65, 924.54};
-static float P015[3] = {-65.21, 231.16, 924.54};
-static float P016[3] = {-156.48, 121.97, 924.54};
-static float P017[3] = {-162.00, -23.93, 924.54};
-static float P018[3] = {-88.16, -139.10, 924.54};
-static float P019[3] = {65.21, -148.61, 924.54};
-static float P020[3] = {246.87, -98.73, 1783.04};
-static float P021[3] = {253.17, 127.76, 1783.04};
-static float P022[3] = {132.34, 270.77, 1783.04};
-static float P023[3] = {-97.88, 285.04, 1783.04};
-static float P024[3] = {-222.97, 139.80, 1783.04};
-static float P025[3] = {-225.29, -86.68, 1783.04};
-static float P026[3] = {-108.44, -224.15, 1783.04};
-static float P027[3] = {97.88, -221.56, 1783.04};
-static float P028[3] = {410.55, -200.66, 3213.87};
-static float P029[3] = {432.19, 148.42, 3213.87};
-static float P030[3] = {200.66, 410.55, 3213.87};
-static float P031[3] = {-148.42, 432.19, 3213.87};
-static float P032[3] = {-407.48, 171.88, 3213.87};
-static float P033[3] = {-432.19, -148.42, 3213.87};
-static float P034[3] = {-148.88, -309.74, 3213.87};
-static float P035[3] = {156.38, -320.17, 3213.87};
-static float P036[3] = {523.39, -303.81, 4424.57};
-static float P037[3] = {574.66, 276.84, 4424.57};
-static float P038[3] = {243.05, 492.50, 4424.57};
-static float P039[3] = {-191.23, 520.13, 4424.57};
-static float P040[3] = {-523.39, 304.01, 4424.57};
-static float P041[3] = {-574.66, -231.83, 4424.57};
-static float P042[3] = {-266.95, -578.17, 4424.57};
-static float P043[3] = {211.14, -579.67, 4424.57};
-static float P044[3] = {680.57, -370.27, 5943.46};
-static float P045[3] = {834.01, 363.09, 5943.46};
-static float P046[3] = {371.29, 614.13, 5943.46};
-static float P047[3] = {-291.43, 621.86, 5943.46};
-static float P048[3] = {-784.13, 362.60, 5943.46};
-static float P049[3] = {-743.29, -325.82, 5943.46};
-static float P050[3] = {-383.24, -804.77, 5943.46};
-static float P051[3] = {283.47, -846.09, 5943.46};
-static float P052[3] = {599.09, -332.24, 7902.59};
-static float P053[3] = {735.48, 306.26, 7911.92};
-static float P054[3] = {321.55, 558.53, 7902.59};
-static float P055[3] = {-260.54, 559.84, 7902.59};
-static float P056[3] = {-698.66, 320.83, 7902.59};
-static float P057[3] = {-643.29, -299.16, 7902.59};
-static float P058[3] = {-341.47, -719.30, 7902.59};
-static float P059[3] = {252.57, -756.12, 7902.59};
-static float P060[3] = {458.39, -265.31, 9355.44};
-static float P062[3] = {224.04, 438.98, 9364.77};
-static float P063[3] = {-165.71, 441.27, 9355.44};
-static float P065[3] = {-473.99, -219.71, 9355.44};
-static float P066[3] = {-211.97, -479.87, 9355.44};
-static float P067[3] = {192.86, -504.03, 9355.44};
-static float iP068[3] = {-112.44, 9.25, -64.42};
-static float iP069[3] = {1155.63, 0.00, -182.46};
-static float iP070[3] = {-1143.13, 0.00, -181.54};
-static float iP071[3] = {1424.23, 0.00, -322.09};
-static float iP072[3] = {-1368.01, 0.00, -310.38};
-static float iP073[3] = {1255.57, 2.31, 114.05};
-static float iP074[3] = {-1149.38, 0.00, 117.12};
-static float iP075[3] = {718.36, 0.00, 433.36};
-static float iP076[3] = {-655.90, 0.00, 433.36};
-static float P068[3] = {-112.44, 9.25, -64.42};
-static float P069[3] = {1155.63, 0.00, -182.46};
-static float P070[3] = {-1143.13, 0.00, -181.54};
-static float P071[3] = {1424.23, 0.00, -322.09};
-static float P072[3] = {-1368.01, 0.00, -310.38};
-static float P073[3] = {1255.57, 2.31, 114.05};
-static float P074[3] = {-1149.38, 0.00, 117.12};
-static float P075[3] = {718.36, 0.00, 433.36};
-static float P076[3] = {-655.90, 0.00, 433.36};
-static float P077[3] = {1058.00, -2.66, 7923.51};
-static float P078[3] = {-1016.51, -15.47, 7902.87};
-static float P079[3] = {-1363.99, -484.50, 7593.38};
-static float P080[3] = {1478.09, -861.47, 7098.12};
-static float P081[3] = {1338.06, -284.68, 7024.15};
-static float P082[3] = {-1545.51, -860.64, 7106.60};
-static float P083[3] = {1063.19, -70.46, 7466.60};
-static float P084[3] = {-1369.18, -288.11, 7015.34};
-static float P085[3] = {1348.44, -482.50, 7591.41};
-static float P086[3] = {-1015.45, -96.80, 7474.86};
-static float P087[3] = {731.04, 148.38, 7682.58};
-static float P088[3] = {-697.03, 151.82, 7668.81};
-static float P089[3] = {-686.82, 157.09, 7922.29};
-static float P090[3] = {724.73, 147.75, 7931.39};
-static float iP091[3] = {0.00, 327.10, 2346.55};
-static float iP092[3] = {0.00, 552.28, 2311.31};
-static float iP093[3] = {0.00, 721.16, 2166.41};
-static float iP094[3] = {0.00, 693.42, 2388.80};
-static float iP095[3] = {0.00, 389.44, 2859.97};
-static float P091[3] = {0.00, 327.10, 2346.55};
-static float P092[3] = {0.00, 552.28, 2311.31};
-static float P093[3] = {0.00, 721.16, 2166.41};
-static float P094[3] = {0.00, 693.42, 2388.80};
-static float P095[3] = {0.00, 389.44, 2859.97};
-static float iP096[3] = {222.02, -183.67, 10266.89};
-static float iP097[3] = {-128.90, -182.70, 10266.89};
-static float iP098[3] = {41.04, 88.31, 10659.36};
-static float iP099[3] = {-48.73, 88.30, 10659.36};
-static float P096[3] = {222.02, -183.67, 10266.89};
-static float P097[3] = {-128.90, -182.70, 10266.89};
-static float P098[3] = {41.04, 88.31, 10659.36};
-static float P099[3] = {-48.73, 88.30, 10659.36};
-static float P100[3] = {0.00, 603.42, 9340.68};
-static float P104[3] = {-9.86, 567.62, 7858.65};
-static float P105[3] = {31.96, 565.27, 7908.46};
-static float P106[3] = {22.75, 568.13, 7782.83};
-static float P107[3] = {58.93, 568.42, 7775.94};
-static float P108[3] = {55.91, 565.59, 7905.86};
-static float P109[3] = {99.21, 566.00, 7858.65};
-static float P110[3] = {-498.83, 148.14, 9135.10};
-static float P111[3] = {-495.46, 133.24, 9158.48};
-static float P112[3] = {-490.82, 146.23, 9182.76};
-static float P113[3] = {-489.55, 174.11, 9183.66};
-static float P114[3] = {-492.92, 189.00, 9160.28};
-static float P115[3] = {-497.56, 176.02, 9136.00};
-static float P116[3] = {526.54, 169.68, 9137.70};
-static float P117[3] = {523.49, 184.85, 9161.42};
-static float P118[3] = {518.56, 171.78, 9186.06};
-static float P119[3] = {516.68, 143.53, 9186.98};
-static float P120[3] = {519.73, 128.36, 9163.26};
-static float P121[3] = {524.66, 141.43, 9138.62};
-/* *INDENT-ON* */
-
-void
-Whale001(void)
-{
-
-    glBegin(GL_POLYGON);
-    glNormal3fv(N001);
-    glVertex3fv(P001);
-    glNormal3fv(N068);
-    glVertex3fv(P068);
-    glNormal3fv(N010);
-    glVertex3fv(P010);
-    glEnd();
-    glBegin(GL_POLYGON);
-    glNormal3fv(N068);
-    glVertex3fv(P068);
-    glNormal3fv(N076);
-    glVertex3fv(P076);
-    glNormal3fv(N010);
-    glVertex3fv(P010);
-    glEnd();
-    glBegin(GL_POLYGON);
-    glNormal3fv(N068);
-    glVertex3fv(P068);
-    glNormal3fv(N070);
-    glVertex3fv(P070);
-    glNormal3fv(N076);
-    glVertex3fv(P076);
-    glEnd();
-    glBegin(GL_POLYGON);
-    glNormal3fv(N076);
-    glVertex3fv(P076);
-    glNormal3fv(N070);
-    glVertex3fv(P070);
-    glNormal3fv(N074);
-    glVertex3fv(P074);
-    glEnd();
-    glBegin(GL_POLYGON);
-    glNormal3fv(N070);
-    glVertex3fv(P070);
-    glNormal3fv(N072);
-    glVertex3fv(P072);
-    glNormal3fv(N074);
-    glVertex3fv(P074);
-    glEnd();
-    glBegin(GL_POLYGON);
-    glNormal3fv(N072);
-    glVertex3fv(P072);
-    glNormal3fv(N070);
-    glVertex3fv(P070);
-    glNormal3fv(N074);
-    glVertex3fv(P074);
-    glEnd();
-    glBegin(GL_POLYGON);
-    glNormal3fv(N074);
-    glVertex3fv(P074);
-    glNormal3fv(N070);
-    glVertex3fv(P070);
-    glNormal3fv(N076);
-    glVertex3fv(P076);
-    glEnd();
-    glBegin(GL_POLYGON);
-    glNormal3fv(N070);
-    glVertex3fv(P070);
-    glNormal3fv(N068);
-    glVertex3fv(P068);
-    glNormal3fv(N076);
-    glVertex3fv(P076);
-    glEnd();
-    glBegin(GL_POLYGON);
-    glNormal3fv(N076);
-    glVertex3fv(P076);
-    glNormal3fv(N068);
-    glVertex3fv(P068);
-    glNormal3fv(N010);
-    glVertex3fv(P010);
-    glEnd();
-    glBegin(GL_POLYGON);
-    glNormal3fv(N068);
-    glVertex3fv(P068);
-    glNormal3fv(N001);
-    glVertex3fv(P001);
-    glNormal3fv(N010);
-    glVertex3fv(P010);
-    glEnd();
-}
-
-void
-Whale002(void)
-{
-    glBegin(GL_POLYGON);
-    glNormal3fv(N011);
-    glVertex3fv(P011);
-    glNormal3fv(N001);
-    glVertex3fv(P001);
-    glNormal3fv(N009);
-    glVertex3fv(P009);
-    glEnd();
-    glBegin(GL_POLYGON);
-    glNormal3fv(N075);
-    glVertex3fv(P075);
-    glNormal3fv(N011);
-    glVertex3fv(P011);
-    glNormal3fv(N009);
-    glVertex3fv(P009);
-    glEnd();
-    glBegin(GL_POLYGON);
-    glNormal3fv(N069);
-    glVertex3fv(P069);
-    glNormal3fv(N011);
-    glVertex3fv(P011);
-    glNormal3fv(N075);
-    glVertex3fv(P075);
-    glEnd();
-    glBegin(GL_POLYGON);
-    glNormal3fv(N069);
-    glVertex3fv(P069);
-    glNormal3fv(N075);
-    glVertex3fv(P075);
-    glNormal3fv(N073);
-    glVertex3fv(P073);
-    glEnd();
-    glBegin(GL_POLYGON);
-    glNormal3fv(N071);
-    glVertex3fv(P071);
-    glNormal3fv(N069);
-    glVertex3fv(P069);
-    glNormal3fv(N073);
-    glVertex3fv(P073);
-    glEnd();
-    glBegin(GL_POLYGON);
-    glNormal3fv(N001);
-    glVertex3fv(P001);
-    glNormal3fv(N011);
-    glVertex3fv(P011);
-    glNormal3fv(N009);
-    glVertex3fv(P009);
-    glEnd();
-    glBegin(GL_POLYGON);
-    glNormal3fv(N009);
-    glVertex3fv(P009);
-    glNormal3fv(N011);
-    glVertex3fv(P011);
-    glNormal3fv(N075);
-    glVertex3fv(P075);
-    glEnd();
-    glBegin(GL_POLYGON);
-    glNormal3fv(N011);
-    glVertex3fv(P011);
-    glNormal3fv(N069);
-    glVertex3fv(P069);
-    glNormal3fv(N075);
-    glVertex3fv(P075);
-    glEnd();
-    glBegin(GL_POLYGON);
-    glNormal3fv(N069);
-    glVertex3fv(P069);
-    glNormal3fv(N073);
-    glVertex3fv(P073);
-    glNormal3fv(N075);
-    glVertex3fv(P075);
-    glEnd();
-    glBegin(GL_POLYGON);
-    glNormal3fv(N069);
-    glVertex3fv(P069);
-    glNormal3fv(N071);
-    glVertex3fv(P071);
-    glNormal3fv(N073);
-    glVertex3fv(P073);
-    glEnd();
-}
-
-void
-Whale003(void)
-{
-    glBegin(GL_POLYGON);
-    glNormal3fv(N018);
-    glVertex3fv(P018);
-    glNormal3fv(N001);
-    glVertex3fv(P001);
-    glNormal3fv(N019);
-    glVertex3fv(P019);
-    glEnd();
-    glBegin(GL_POLYGON);
-    glNormal3fv(N019);
-    glVertex3fv(P019);
-    glNormal3fv(N001);
-    glVertex3fv(P001);
-    glNormal3fv(N012);
-    glVertex3fv(P012);
-    glEnd();
-    glBegin(GL_POLYGON);
-    glNormal3fv(N017);
-    glVertex3fv(P017);
-    glNormal3fv(N001);
-    glVertex3fv(P001);
-    glNormal3fv(N018);
-    glVertex3fv(P018);
-    glEnd();
-    glBegin(GL_POLYGON);
-    glNormal3fv(N001);
-    glVertex3fv(P001);
-    glNormal3fv(N017);
-    glVertex3fv(P017);
-    glNormal3fv(N016);
-    glVertex3fv(P016);
-    glEnd();
-    glBegin(GL_POLYGON);
-    glNormal3fv(N001);
-    glVertex3fv(P001);
-    glNormal3fv(N013);
-    glVertex3fv(P013);
-    glNormal3fv(N012);
-    glVertex3fv(P012);
-    glEnd();
-    glBegin(GL_POLYGON);
-    glNormal3fv(N001);
-    glVertex3fv(P001);
-    glNormal3fv(N016);
-    glVertex3fv(P016);
-    glNormal3fv(N015);
-    glVertex3fv(P015);
-    glEnd();
-    glBegin(GL_POLYGON);
-    glNormal3fv(N001);
-    glVertex3fv(P001);
-    glNormal3fv(N014);
-    glVertex3fv(P014);
-    glNormal3fv(N013);
-    glVertex3fv(P013);
-    glEnd();
-    glBegin(GL_POLYGON);
-    glNormal3fv(N001);
-    glVertex3fv(P001);
-    glNormal3fv(N015);
-    glVertex3fv(P015);
-    glNormal3fv(N014);
-    glVertex3fv(P014);
-    glEnd();
-}
-
-void
-Whale004(void)
-{
-    glBegin(GL_POLYGON);
-    glNormal3fv(N014);
-    glVertex3fv(P014);
-    glNormal3fv(N015);
-    glVertex3fv(P015);
-    glNormal3fv(N023);
-    glVertex3fv(P023);
-    glNormal3fv(N022);
-    glVertex3fv(P022);
-    glEnd();
-    glBegin(GL_POLYGON);
-    glNormal3fv(N015);
-    glVertex3fv(P015);
-    glNormal3fv(N016);
-    glVertex3fv(P016);
-    glNormal3fv(N024);
-    glVertex3fv(P024);
-    glNormal3fv(N023);
-    glVertex3fv(P023);
-    glEnd();
-    glBegin(GL_POLYGON);
-    glNormal3fv(N016);
-    glVertex3fv(P016);
-    glNormal3fv(N017);
-    glVertex3fv(P017);
-    glNormal3fv(N025);
-    glVertex3fv(P025);
-    glNormal3fv(N024);
-    glVertex3fv(P024);
-    glEnd();
-    glBegin(GL_POLYGON);
-    glNormal3fv(N017);
-    glVertex3fv(P017);
-    glNormal3fv(N018);
-    glVertex3fv(P018);
-    glNormal3fv(N026);
-    glVertex3fv(P026);
-    glNormal3fv(N025);
-    glVertex3fv(P025);
-    glEnd();
-    glBegin(GL_POLYGON);
-    glNormal3fv(N013);
-    glVertex3fv(P013);
-    glNormal3fv(N014);
-    glVertex3fv(P014);
-    glNormal3fv(N022);
-    glVertex3fv(P022);
-    glNormal3fv(N021);
-    glVertex3fv(P021);
-    glEnd();
-    glBegin(GL_POLYGON);
-    glNormal3fv(N012);
-    glVertex3fv(P012);
-    glNormal3fv(N013);
-    glVertex3fv(P013);
-    glNormal3fv(N021);
-    glVertex3fv(P021);
-    glNormal3fv(N020);
-    glVertex3fv(P020);
-    glEnd();
-    glBegin(GL_POLYGON);
-    glNormal3fv(N018);
-    glVertex3fv(P018);
-    glNormal3fv(N019);
-    glVertex3fv(P019);
-    glNormal3fv(N027);
-    glVertex3fv(P027);
-    glNormal3fv(N026);
-    glVertex3fv(P026);
-    glEnd();
-    glBegin(GL_POLYGON);
-    glNormal3fv(N019);
-    glVertex3fv(P019);
-    glNormal3fv(N012);
-    glVertex3fv(P012);
-    glNormal3fv(N020);
-    glVertex3fv(P020);
-    glNormal3fv(N027);
-    glVertex3fv(P027);
-    glEnd();
-}
-
-void
-Whale005(void)
-{
-    glBegin(GL_POLYGON);
-    glNormal3fv(N022);
-    glVertex3fv(P022);
-    glNormal3fv(N023);
-    glVertex3fv(P023);
-    glNormal3fv(N031);
-    glVertex3fv(P031);
-    glNormal3fv(N030);
-    glVertex3fv(P030);
-    glEnd();
-    glBegin(GL_POLYGON);
-    glNormal3fv(N021);
-    glVertex3fv(P021);
-    glNormal3fv(N022);
-    glVertex3fv(P022);
-    glNormal3fv(N030);
-    glVertex3fv(P030);
-    glEnd();
-    glBegin(GL_POLYGON);
-    glNormal3fv(N021);
-    glVertex3fv(P021);
-    glNormal3fv(N030);
-    glVertex3fv(P030);
-    glNormal3fv(N029);
-    glVertex3fv(P029);
-    glEnd();
-    glBegin(GL_POLYGON);
-    glNormal3fv(N023);
-    glVertex3fv(P023);
-    glNormal3fv(N024);
-    glVertex3fv(P024);
-    glNormal3fv(N031);
-    glVertex3fv(P031);
-    glEnd();
-    glBegin(GL_POLYGON);
-    glNormal3fv(N024);
-    glVertex3fv(P024);
-    glNormal3fv(N032);
-    glVertex3fv(P032);
-    glNormal3fv(N031);
-    glVertex3fv(P031);
-    glEnd();
-    glBegin(GL_POLYGON);
-    glNormal3fv(N024);
-    glVertex3fv(P024);
-    glNormal3fv(N025);
-    glVertex3fv(P025);
-    glNormal3fv(N032);
-    glVertex3fv(P032);
-    glEnd();
-    glBegin(GL_POLYGON);
-    glNormal3fv(N025);
-    glVertex3fv(P025);
-    glNormal3fv(N033);
-    glVertex3fv(P033);
-    glNormal3fv(N032);
-    glVertex3fv(P032);
-    glEnd();
-    glBegin(GL_POLYGON);
-    glNormal3fv(N020);
-    glVertex3fv(P020);
-    glNormal3fv(N021);
-    glVertex3fv(P021);
-    glNormal3fv(N029);
-    glVertex3fv(P029);
-    glEnd();
-    glBegin(GL_POLYGON);
-    glNormal3fv(N020);
-    glVertex3fv(P020);
-    glNormal3fv(N029);
-    glVertex3fv(P029);
-    glNormal3fv(N028);
-    glVertex3fv(P028);
-    glEnd();
-    glBegin(GL_POLYGON);
-    glNormal3fv(N027);
-    glVertex3fv(P027);
-    glNormal3fv(N020);
-    glVertex3fv(P020);
-    glNormal3fv(N028);
-    glVertex3fv(P028);
-    glEnd();
-    glBegin(GL_POLYGON);
-    glNormal3fv(N027);
-    glVertex3fv(P027);
-    glNormal3fv(N028);
-    glVertex3fv(P028);
-    glNormal3fv(N035);
-    glVertex3fv(P035);
-    glEnd();
-    glBegin(GL_POLYGON);
-    glNormal3fv(N025);
-    glVertex3fv(P025);
-    glNormal3fv(N026);
-    glVertex3fv(P026);
-    glNormal3fv(N033);
-    glVertex3fv(P033);
-    glEnd();
-    glBegin(GL_POLYGON);
-    glNormal3fv(N033);
-    glVertex3fv(P033);
-    glNormal3fv(N026);
-    glVertex3fv(P026);
-    glNormal3fv(N034);
-    glVertex3fv(P034);
-    glEnd();
-    glBegin(GL_POLYGON);
-    glNormal3fv(N026);
-    glVertex3fv(P026);
-    glNormal3fv(N027);
-    glVertex3fv(P027);
-    glNormal3fv(N035);
-    glVertex3fv(P035);
-    glNormal3fv(N034);
-    glVertex3fv(P034);
-    glEnd();
-}
-
-void
-Whale006(void)
-{
-    glBegin(GL_POLYGON);
-    glNormal3fv(N092);
-    glVertex3fv(P092);
-    glNormal3fv(N093);
-    glVertex3fv(P093);
-    glNormal3fv(N094);
-    glVertex3fv(P094);
-    glEnd();
-    glBegin(GL_POLYGON);
-    glNormal3fv(N093);
-    glVertex3fv(P093);
-    glNormal3fv(N092);
-    glVertex3fv(P092);
-    glNormal3fv(N094);
-    glVertex3fv(P094);
-    glEnd();
-    glBegin(GL_POLYGON);
-    glNormal3fv(N092);
-    glVertex3fv(P092);
-    glNormal3fv(N091);
-    glVertex3fv(P091);
-    glNormal3fv(N095);
-    glVertex3fv(P095);
-    glNormal3fv(N094);
-    glVertex3fv(P094);
-    glEnd();
-    glBegin(GL_POLYGON);
-    glNormal3fv(N091);
-    glVertex3fv(P091);
-    glNormal3fv(N092);
-    glVertex3fv(P092);
-    glNormal3fv(N094);
-    glVertex3fv(P094);
-    glNormal3fv(N095);
-    glVertex3fv(P095);
-    glEnd();
-}
-
-void
-Whale007(void)
-{
-    glBegin(GL_POLYGON);
-    glNormal3fv(N030);
-    glVertex3fv(P030);
-    glNormal3fv(N031);
-    glVertex3fv(P031);
-    glNormal3fv(N039);
-    glVertex3fv(P039);
-    glNormal3fv(N038);
-    glVertex3fv(P038);
-    glEnd();
-    glBegin(GL_POLYGON);
-    glNormal3fv(N029);
-    glVertex3fv(P029);
-    glNormal3fv(N030);
-    glVertex3fv(P030);
-    glNormal3fv(N038);
-    glVertex3fv(P038);
-    glEnd();
-    glBegin(GL_POLYGON);
-    glNormal3fv(N029);
-    glVertex3fv(P029);
-    glNormal3fv(N038);
-    glVertex3fv(P038);
-    glNormal3fv(N037);
-    glVertex3fv(P037);
-    glEnd();
-    glBegin(GL_POLYGON);
-    glNormal3fv(N028);
-    glVertex3fv(P028);
-    glNormal3fv(N029);
-    glVertex3fv(P029);
-    glNormal3fv(N037);
-    glVertex3fv(P037);
-    glEnd();
-    glBegin(GL_POLYGON);
-    glNormal3fv(N028);
-    glVertex3fv(P028);
-    glNormal3fv(N037);
-    glVertex3fv(P037);
-    glNormal3fv(N036);
-    glVertex3fv(P036);
-    glEnd();
-    glBegin(GL_POLYGON);
-    glNormal3fv(N035);
-    glVertex3fv(P035);
-    glNormal3fv(N028);
-    glVertex3fv(P028);
-    glNormal3fv(N036);
-    glVertex3fv(P036);
-    glEnd();
-    glBegin(GL_POLYGON);
-    glNormal3fv(N035);
-    glVertex3fv(P035);
-    glNormal3fv(N036);
-    glVertex3fv(P036);
-    glNormal3fv(N043);
-    glVertex3fv(P043);
-    glEnd();
-    glBegin(GL_POLYGON);
-    glNormal3fv(N034);
-    glVertex3fv(P034);
-    glNormal3fv(N035);
-    glVertex3fv(P035);
-    glNormal3fv(N043);
-    glVertex3fv(P043);
-    glNormal3fv(N042);
-    glVertex3fv(P042);
-    glEnd();
-    glBegin(GL_POLYGON);
-    glNormal3fv(N033);
-    glVertex3fv(P033);
-    glNormal3fv(N034);
-    glVertex3fv(P034);
-    glNormal3fv(N042);
-    glVertex3fv(P042);
-    glEnd();
-    glBegin(GL_POLYGON);
-    glNormal3fv(N033);
-    glVertex3fv(P033);
-    glNormal3fv(N042);
-    glVertex3fv(P042);
-    glNormal3fv(N041);
-    glVertex3fv(P041);
-    glEnd();
-    glBegin(GL_POLYGON);
-    glNormal3fv(N031);
-    glVertex3fv(P031);
-    glNormal3fv(N032);
-    glVertex3fv(P032);
-    glNormal3fv(N039);
-    glVertex3fv(P039);
-    glEnd();
-    glBegin(GL_POLYGON);
-    glNormal3fv(N039);
-    glVertex3fv(P039);
-    glNormal3fv(N032);
-    glVertex3fv(P032);
-    glNormal3fv(N040);
-    glVertex3fv(P040);
-    glEnd();
-    glBegin(GL_POLYGON);
-    glNormal3fv(N032);
-    glVertex3fv(P032);
-    glNormal3fv(N033);
-    glVertex3fv(P033);
-    glNormal3fv(N040);
-    glVertex3fv(P040);
-    glEnd();
-    glBegin(GL_POLYGON);
-    glNormal3fv(N040);
-    glVertex3fv(P040);
-    glNormal3fv(N033);
-    glVertex3fv(P033);
-    glNormal3fv(N041);
-    glVertex3fv(P041);
-    glEnd();
-}
-
-void
-Whale008(void)
-{
-    glBegin(GL_POLYGON);
-    glNormal3fv(N042);
-    glVertex3fv(P042);
-    glNormal3fv(N043);
-    glVertex3fv(P043);
-    glNormal3fv(N051);
-    glVertex3fv(P051);
-    glNormal3fv(N050);
-    glVertex3fv(P050);
-    glEnd();
-    glBegin(GL_POLYGON);
-    glNormal3fv(N043);
-    glVertex3fv(P043);
-    glNormal3fv(N036);
-    glVertex3fv(P036);
-    glNormal3fv(N051);
-    glVertex3fv(P051);
-    glEnd();
-    glBegin(GL_POLYGON);
-    glNormal3fv(N051);
-    glVertex3fv(P051);
-    glNormal3fv(N036);
-    glVertex3fv(P036);
-    glNormal3fv(N044);
-    glVertex3fv(P044);
-    glEnd();
-    glBegin(GL_POLYGON);
-    glNormal3fv(N041);
-    glVertex3fv(P041);
-    glNormal3fv(N042);
-    glVertex3fv(P042);
-    glNormal3fv(N050);
-    glVertex3fv(P050);
-    glEnd();
-    glBegin(GL_POLYGON);
-    glNormal3fv(N041);
-    glVertex3fv(P041);
-    glNormal3fv(N050);
-    glVertex3fv(P050);
-    glNormal3fv(N049);
-    glVertex3fv(P049);
-    glEnd();
-    glBegin(GL_POLYGON);
-    glNormal3fv(N036);
-    glVertex3fv(P036);
-    glNormal3fv(N037);
-    glVertex3fv(P037);
-    glNormal3fv(N044);
-    glVertex3fv(P044);
-    glEnd();
-    glBegin(GL_POLYGON);
-    glNormal3fv(N044);
-    glVertex3fv(P044);
-    glNormal3fv(N037);
-    glVertex3fv(P037);
-    glNormal3fv(N045);
-    glVertex3fv(P045);
-    glEnd();
-    glBegin(GL_POLYGON);
-    glNormal3fv(N040);
-    glVertex3fv(P040);
-    glNormal3fv(N041);
-    glVertex3fv(P041);
-    glNormal3fv(N049);
-    glVertex3fv(P049);
-    glEnd();
-    glBegin(GL_POLYGON);
-    glNormal3fv(N040);
-    glVertex3fv(P040);
-    glNormal3fv(N049);
-    glVertex3fv(P049);
-    glNormal3fv(N048);
-    glVertex3fv(P048);
-    glEnd();
-    glBegin(GL_POLYGON);
-    glNormal3fv(N039);
-    glVertex3fv(P039);
-    glNormal3fv(N040);
-    glVertex3fv(P040);
-    glNormal3fv(N048);
-    glVertex3fv(P048);
-    glEnd();
-    glBegin(GL_POLYGON);
-    glNormal3fv(N039);
-    glVertex3fv(P039);
-    glNormal3fv(N048);
-    glVertex3fv(P048);
-    glNormal3fv(N047);
-    glVertex3fv(P047);
-    glEnd();
-    glBegin(GL_POLYGON);
-    glNormal3fv(N037);
-    glVertex3fv(P037);
-    glNormal3fv(N038);
-    glVertex3fv(P038);
-    glNormal3fv(N045);
-    glVertex3fv(P045);
-    glEnd();
-    glBegin(GL_POLYGON);
-    glNormal3fv(N038);
-    glVertex3fv(P038);
-    glNormal3fv(N046);
-    glVertex3fv(P046);
-    glNormal3fv(N045);
-    glVertex3fv(P045);
-    glEnd();
-    glBegin(GL_POLYGON);
-    glNormal3fv(N038);
-    glVertex3fv(P038);
-    glNormal3fv(N039);
-    glVertex3fv(P039);
-    glNormal3fv(N047);
-    glVertex3fv(P047);
-    glNormal3fv(N046);
-    glVertex3fv(P046);
-    glEnd();
-}
-
-void
-Whale009(void)
-{
-    glBegin(GL_POLYGON);
-    glNormal3fv(N050);
-    glVertex3fv(P050);
-    glNormal3fv(N051);
-    glVertex3fv(P051);
-    glNormal3fv(N059);
-    glVertex3fv(P059);
-    glNormal3fv(N058);
-    glVertex3fv(P058);
-    glEnd();
-    glBegin(GL_POLYGON);
-    glNormal3fv(N051);
-    glVertex3fv(P051);
-    glNormal3fv(N044);
-    glVertex3fv(P044);
-    glNormal3fv(N059);
-    glVertex3fv(P059);
-    glEnd();
-    glBegin(GL_POLYGON);
-    glNormal3fv(N059);
-    glVertex3fv(P059);
-    glNormal3fv(N044);
-    glVertex3fv(P044);
-    glNormal3fv(N052);
-    glVertex3fv(P052);
-    glEnd();
-    glBegin(GL_POLYGON);
-    glNormal3fv(N044);
-    glVertex3fv(P044);
-    glNormal3fv(N045);
-    glVertex3fv(P045);
-    glNormal3fv(N053);
-    glVertex3fv(P053);
-    glEnd();
-    glBegin(GL_POLYGON);
-    glNormal3fv(N044);
-    glVertex3fv(P044);
-    glNormal3fv(N053);
-    glVertex3fv(P053);
-    glNormal3fv(N052);
-    glVertex3fv(P052);
-    glEnd();
-    glBegin(GL_POLYGON);
-    glNormal3fv(N049);
-    glVertex3fv(P049);
-    glNormal3fv(N050);
-    glVertex3fv(P050);
-    glNormal3fv(N058);
-    glVertex3fv(P058);
-    glEnd();
-    glBegin(GL_POLYGON);
-    glNormal3fv(N049);
-    glVertex3fv(P049);
-    glNormal3fv(N058);
-    glVertex3fv(P058);
-    glNormal3fv(N057);
-    glVertex3fv(P057);
-    glEnd();
-    glBegin(GL_POLYGON);
-    glNormal3fv(N048);
-    glVertex3fv(P048);
-    glNormal3fv(N049);
-    glVertex3fv(P049);
-    glNormal3fv(N057);
-    glVertex3fv(P057);
-    glEnd();
-    glBegin(GL_POLYGON);
-    glNormal3fv(N048);
-    glVertex3fv(P048);
-    glNormal3fv(N057);
-    glVertex3fv(P057);
-    glNormal3fv(N056);
-    glVertex3fv(P056);
-    glEnd();
-    glBegin(GL_POLYGON);
-    glNormal3fv(N047);
-    glVertex3fv(P047);
-    glNormal3fv(N048);
-    glVertex3fv(P048);
-    glNormal3fv(N056);
-    glVertex3fv(P056);
-    glEnd();
-    glBegin(GL_POLYGON);
-    glNormal3fv(N047);
-    glVertex3fv(P047);
-    glNormal3fv(N056);
-    glVertex3fv(P056);
-    glNormal3fv(N055);
-    glVertex3fv(P055);
-    glEnd();
-    glBegin(GL_POLYGON);
-    glNormal3fv(N045);
-    glVertex3fv(P045);
-    glNormal3fv(N046);
-    glVertex3fv(P046);
-    glNormal3fv(N053);
-    glVertex3fv(P053);
-    glEnd();
-    glBegin(GL_POLYGON);
-    glNormal3fv(N046);
-    glVertex3fv(P046);
-    glNormal3fv(N054);
-    glVertex3fv(P054);
-    glNormal3fv(N053);
-    glVertex3fv(P053);
-    glEnd();
-    glBegin(GL_POLYGON);
-    glNormal3fv(N046);
-    glVertex3fv(P046);
-    glNormal3fv(N047);
-    glVertex3fv(P047);
-    glNormal3fv(N055);
-    glVertex3fv(P055);
-    glNormal3fv(N054);
-    glVertex3fv(P054);
-    glEnd();
-}
-
-void
-Whale010(void)
-{
-    glBegin(GL_POLYGON);
-    glNormal3fv(N080);
-    glVertex3fv(P080);
-    glNormal3fv(N081);
-    glVertex3fv(P081);
-    glNormal3fv(N085);
-    glVertex3fv(P085);
-    glEnd();
-    glBegin(GL_POLYGON);
-    glNormal3fv(N081);
-    glVertex3fv(P081);
-    glNormal3fv(N083);
-    glVertex3fv(P083);
-    glNormal3fv(N085);
-    glVertex3fv(P085);
-    glEnd();
-    glBegin(GL_POLYGON);
-    glNormal3fv(N085);
-    glVertex3fv(P085);
-    glNormal3fv(N083);
-    glVertex3fv(P083);
-    glNormal3fv(N077);
-    glVertex3fv(P077);
-    glEnd();
-    glBegin(GL_POLYGON);
-    glNormal3fv(N083);
-    glVertex3fv(P083);
-    glNormal3fv(N087);
-    glVertex3fv(P087);
-    glNormal3fv(N077);
-    glVertex3fv(P077);
-    glEnd();
-    glBegin(GL_POLYGON);
-    glNormal3fv(N077);
-    glVertex3fv(P077);
-    glNormal3fv(N087);
-    glVertex3fv(P087);
-    glNormal3fv(N090);
-    glVertex3fv(P090);
-    glEnd();
-    glBegin(GL_POLYGON);
-    glNormal3fv(N081);
-    glVertex3fv(P081);
-    glNormal3fv(N080);
-    glVertex3fv(P080);
-    glNormal3fv(N085);
-    glVertex3fv(P085);
-    glEnd();
-    glBegin(GL_POLYGON);
-    glNormal3fv(N083);
-    glVertex3fv(P083);
-    glNormal3fv(N081);
-    glVertex3fv(P081);
-    glNormal3fv(N085);
-    glVertex3fv(P085);
-    glEnd();
-    glBegin(GL_POLYGON);
-    glNormal3fv(N083);
-    glVertex3fv(P083);
-    glNormal3fv(N085);
-    glVertex3fv(P085);
-    glNormal3fv(N077);
-    glVertex3fv(P077);
-    glEnd();
-    glBegin(GL_POLYGON);
-    glNormal3fv(N087);
-    glVertex3fv(P087);
-    glNormal3fv(N083);
-    glVertex3fv(P083);
-    glNormal3fv(N077);
-    glVertex3fv(P077);
-    glEnd();
-    glBegin(GL_POLYGON);
-    glNormal3fv(N087);
-    glVertex3fv(P087);
-    glNormal3fv(N077);
-    glVertex3fv(P077);
-    glNormal3fv(N090);
-    glVertex3fv(P090);
-    glEnd();
-}
-
-void
-Whale011(void)
-{
-    glBegin(GL_POLYGON);
-    glNormal3fv(N082);
-    glVertex3fv(P082);
-    glNormal3fv(N084);
-    glVertex3fv(P084);
-    glNormal3fv(N079);
-    glVertex3fv(P079);
-    glEnd();
-    glBegin(GL_POLYGON);
-    glNormal3fv(N084);
-    glVertex3fv(P084);
-    glNormal3fv(N086);
-    glVertex3fv(P086);
-    glNormal3fv(N079);
-    glVertex3fv(P079);
-    glEnd();
-    glBegin(GL_POLYGON);
-    glNormal3fv(N079);
-    glVertex3fv(P079);
-    glNormal3fv(N086);
-    glVertex3fv(P086);
-    glNormal3fv(N078);
-    glVertex3fv(P078);
-    glEnd();
-    glBegin(GL_POLYGON);
-    glNormal3fv(N086);
-    glVertex3fv(P086);
-    glNormal3fv(N088);
-    glVertex3fv(P088);
-    glNormal3fv(N078);
-    glVertex3fv(P078);
-    glEnd();
-    glBegin(GL_POLYGON);
-    glNormal3fv(N078);
-    glVertex3fv(P078);
-    glNormal3fv(N088);
-    glVertex3fv(P088);
-    glNormal3fv(N089);
-    glVertex3fv(P089);
-    glEnd();
-    glBegin(GL_POLYGON);
-    glNormal3fv(N088);
-    glVertex3fv(P088);
-    glNormal3fv(N086);
-    glVertex3fv(P086);
-    glNormal3fv(N089);
-    glVertex3fv(P089);
-    glEnd();
-    glBegin(GL_POLYGON);
-    glNormal3fv(N089);
-    glVertex3fv(P089);
-    glNormal3fv(N086);
-    glVertex3fv(P086);
-    glNormal3fv(N078);
-    glVertex3fv(P078);
-    glEnd();
-    glBegin(GL_POLYGON);
-    glNormal3fv(N086);
-    glVertex3fv(P086);
-    glNormal3fv(N084);
-    glVertex3fv(P084);
-    glNormal3fv(N078);
-    glVertex3fv(P078);
-    glEnd();
-    glBegin(GL_POLYGON);
-    glNormal3fv(N078);
-    glVertex3fv(P078);
-    glNormal3fv(N084);
-    glVertex3fv(P084);
-    glNormal3fv(N079);
-    glVertex3fv(P079);
-    glEnd();
-    glBegin(GL_POLYGON);
-    glNormal3fv(N084);
-    glVertex3fv(P084);
-    glNormal3fv(N082);
-    glVertex3fv(P082);
-    glNormal3fv(N079);
-    glVertex3fv(P079);
-    glEnd();
-}
-
-void
-Whale012(void)
-{
-    glBegin(GL_POLYGON);
-    glNormal3fv(N058);
-    glVertex3fv(P058);
-    glNormal3fv(N059);
-    glVertex3fv(P059);
-    glNormal3fv(N067);
-    glVertex3fv(P067);
-    glNormal3fv(N066);
-    glVertex3fv(P066);
-    glEnd();
-    glBegin(GL_POLYGON);
-    glNormal3fv(N059);
-    glVertex3fv(P059);
-    glNormal3fv(N052);
-    glVertex3fv(P052);
-    glNormal3fv(N060);
-    glVertex3fv(P060);
-    glEnd();
-    glBegin(GL_POLYGON);
-    glNormal3fv(N059);
-    glVertex3fv(P059);
-    glNormal3fv(N060);
-    glVertex3fv(P060);
-    glNormal3fv(N067);
-    glVertex3fv(P067);
-    glEnd();
-    glBegin(GL_POLYGON);
-    glNormal3fv(N058);
-    glVertex3fv(P058);
-    glNormal3fv(N066);
-    glVertex3fv(P066);
-    glNormal3fv(N065);
-    glVertex3fv(P065);
-    glEnd();
-    glBegin(GL_POLYGON);
-    glNormal3fv(N058);
-    glVertex3fv(P058);
-    glNormal3fv(N065);
-    glVertex3fv(P065);
-    glNormal3fv(N057);
-    glVertex3fv(P057);
-    glEnd();
-    glBegin(GL_POLYGON);
-    glNormal3fv(N056);
-    glVertex3fv(P056);
-    glNormal3fv(N057);
-    glVertex3fv(P057);
-    glNormal3fv(N065);
-    glVertex3fv(P065);
-    glEnd();
-    glBegin(GL_POLYGON);
-    glNormal3fv(N056);
-    glVertex3fv(P056);
-    glNormal3fv(N065);
-    glVertex3fv(P065);
-    glNormal3fv(N006);
-    glVertex3fv(P006);
-    glEnd();
-    glBegin(GL_POLYGON);
-    glNormal3fv(N056);
-    glVertex3fv(P056);
-    glNormal3fv(N006);
-    glVertex3fv(P006);
-    glNormal3fv(N063);
-    glVertex3fv(P063);
-    glEnd();
-    glBegin(GL_POLYGON);
-    glNormal3fv(N056);
-    glVertex3fv(P056);
-    glNormal3fv(N063);
-    glVertex3fv(P063);
-    glNormal3fv(N055);
-    glVertex3fv(P055);
-    glEnd();
-    glBegin(GL_POLYGON);
-    glNormal3fv(N054);
-    glVertex3fv(P054);
-    glNormal3fv(N062);
-    glVertex3fv(P062);
-    glNormal3fv(N005);
-    glVertex3fv(P005);
-    glEnd();
-    glBegin(GL_POLYGON);
-    glNormal3fv(N054);
-    glVertex3fv(P054);
-    glNormal3fv(N005);
-    glVertex3fv(P005);
-    glNormal3fv(N053);
-    glVertex3fv(P053);
-    glEnd();
-    glBegin(GL_POLYGON);
-    glNormal3fv(N053);
-    glVertex3fv(P053);
-    glNormal3fv(N005);
-    glVertex3fv(P005);
-    glNormal3fv(N060);
-    glVertex3fv(P060);
-    glEnd();
-    glBegin(GL_POLYGON);
-    glNormal3fv(N053);
-    glVertex3fv(P053);
-    glNormal3fv(N060);
-    glVertex3fv(P060);
-    glNormal3fv(N052);
-    glVertex3fv(P052);
-    glEnd();
-}
-
-void
-Whale013(void)
-{
-    glBegin(GL_POLYGON);
-    glNormal3fv(N066);
-    glVertex3fv(P066);
-    glNormal3fv(N067);
-    glVertex3fv(P067);
-    glNormal3fv(N096);
-    glVertex3fv(P096);
-    glNormal3fv(N097);
-    glVertex3fv(P097);
-    glEnd();
-    glBegin(GL_POLYGON);
-    glNormal3fv(N097);
-    glVertex3fv(P097);
-    glNormal3fv(N096);
-    glVertex3fv(P096);
-    glNormal3fv(N098);
-    glVertex3fv(P098);
-    glNormal3fv(N099);
-    glVertex3fv(P099);
-    glEnd();
-    glBegin(GL_POLYGON);
-    glNormal3fv(N065);
-    glVertex3fv(P065);
-    glNormal3fv(N066);
-    glVertex3fv(P066);
-    glNormal3fv(N097);
-    glVertex3fv(P097);
-    glEnd();
-    glBegin(GL_POLYGON);
-    glNormal3fv(N067);
-    glVertex3fv(P067);
-    glNormal3fv(N060);
-    glVertex3fv(P060);
-    glNormal3fv(N096);
-    glVertex3fv(P096);
-    glEnd();
-    glBegin(GL_POLYGON);
-    glNormal3fv(N060);
-    glVertex3fv(P060);
-    glNormal3fv(N005);
-    glVertex3fv(P005);
-    glNormal3fv(N096);
-    glVertex3fv(P096);
-    glEnd();
-    glBegin(GL_POLYGON);
-    glNormal3fv(N096);
-    glVertex3fv(P096);
-    glNormal3fv(N005);
-    glVertex3fv(P005);
-    glNormal3fv(N098);
-    glVertex3fv(P098);
-    glEnd();
-    glBegin(GL_POLYGON);
-    glNormal3fv(N006);
-    glVertex3fv(P006);
-    glNormal3fv(N065);
-    glVertex3fv(P065);
-    glNormal3fv(N097);
-    glVertex3fv(P097);
-    glEnd();
-    glBegin(GL_POLYGON);
-    glNormal3fv(N006);
-    glVertex3fv(P006);
-    glNormal3fv(N097);
-    glVertex3fv(P097);
-    glNormal3fv(N099);
-    glVertex3fv(P099);
-    glEnd();
-    glBegin(GL_POLYGON);
-    glVertex3fv(P005);
-    glVertex3fv(P006);
-    glVertex3fv(P099);
-    glVertex3fv(P098);
-    glEnd();
-}
-
-void
-Whale014(void)
-{
-    glBegin(GL_POLYGON);
-    glNormal3fv(N062);
-    glVertex3fv(P062);
-    glNormal3fv(N004);
-    glVertex3fv(P004);
-    glNormal3fv(N005);
-    glVertex3fv(P005);
-    glEnd();
-    glBegin(GL_POLYGON);
-    glVertex3fv(P006);
-    glVertex3fv(P005);
-    glVertex3fv(P004);
-    glVertex3fv(P008);
-    glEnd();
-    glBegin(GL_POLYGON);
-    glNormal3fv(N063);
-    glVertex3fv(P063);
-    glNormal3fv(N006);
-    glVertex3fv(P006);
-    glNormal3fv(N002);
-    glVertex3fv(P002);
-    glEnd();
-    glBegin(GL_POLYGON);
-    glNormal3fv(N002);
-    glVertex3fv(P002);
-    glNormal3fv(N006);
-    glVertex3fv(P006);
-    glNormal3fv(N008);
-    glVertex3fv(P008);
-    glEnd();
-    glBegin(GL_POLYGON);
-    glNormal3fv(N002);
-    glVertex3fv(P002);
-    glNormal3fv(N008);
-    glVertex3fv(P008);
-    glNormal3fv(N004);
-    glVertex3fv(P004);
-    glEnd();
-    glBegin(GL_POLYGON);
-    glNormal3fv(N062);
-    glVertex3fv(P062);
-    glNormal3fv(N002);
-    glVertex3fv(P002);
-    glNormal3fv(N004);
-    glVertex3fv(P004);
-    glEnd();
-}
-
-void
-Whale015(void)
-{
-    glBegin(GL_POLYGON);
-    glNormal3fv(N055);
-    glVertex3fv(P055);
-    glNormal3fv(N003);
-    glVertex3fv(P003);
-    glNormal3fv(N054);
-    glVertex3fv(P054);
-    glEnd();
-    glBegin(GL_POLYGON);
-    glNormal3fv(N003);
-    glVertex3fv(P003);
-    glNormal3fv(N055);
-    glVertex3fv(P055);
-    glNormal3fv(N063);
-    glVertex3fv(P063);
-    glEnd();
-    glBegin(GL_POLYGON);
-    glNormal3fv(N003);
-    glVertex3fv(P003);
-    glNormal3fv(N063);
-    glVertex3fv(P063);
-    glNormal3fv(N100);
-    glVertex3fv(P100);
-    glEnd();
-    glBegin(GL_POLYGON);
-    glNormal3fv(N003);
-    glVertex3fv(P003);
-    glNormal3fv(N100);
-    glVertex3fv(P100);
-    glNormal3fv(N054);
-    glVertex3fv(P054);
-    glEnd();
-    glBegin(GL_POLYGON);
-    glNormal3fv(N054);
-    glVertex3fv(P054);
-    glNormal3fv(N100);
-    glVertex3fv(P100);
-    glNormal3fv(N062);
-    glVertex3fv(P062);
-    glEnd();
-    glBegin(GL_POLYGON);
-    glNormal3fv(N100);
-    glVertex3fv(P100);
-    glNormal3fv(N063);
-    glVertex3fv(P063);
-    glNormal3fv(N002);
-    glVertex3fv(P002);
-    glEnd();
-    glBegin(GL_POLYGON);
-    glNormal3fv(N100);
-    glVertex3fv(P100);
-    glNormal3fv(N002);
-    glVertex3fv(P002);
-    glNormal3fv(N062);
-    glVertex3fv(P062);
-    glEnd();
-}
-
-void
-Whale016(void)
-{
-    glBegin(GL_POLYGON);
-    glVertex3fv(P104);
-    glVertex3fv(P105);
-    glVertex3fv(P106);
-    glEnd();
-    glBegin(GL_POLYGON);
-    glVertex3fv(P107);
-    glVertex3fv(P108);
-    glVertex3fv(P109);
-    glEnd();
-    glBegin(GL_POLYGON);
-    glVertex3fv(P110);
-    glVertex3fv(P111);
-    glVertex3fv(P112);
-    glVertex3fv(P113);
-    glVertex3fv(P114);
-    glVertex3fv(P115);
-    glEnd();
-    glBegin(GL_POLYGON);
-    glVertex3fv(P116);
-    glVertex3fv(P117);
-    glVertex3fv(P118);
-    glVertex3fv(P119);
-    glVertex3fv(P120);
-    glVertex3fv(P121);
-    glEnd();
-}
-
-void
-DrawWhale(fishRec * fish)
-{
-    float seg0, seg1, seg2, seg3, seg4, seg5, seg6, seg7;
-    float pitch, thrash, chomp;
-
-    fish->htail = (int) (fish->htail - (int) (5.0 * fish->v)) % 360;
-
-    thrash = 70.0 * fish->v;
-
-    seg0 = 1.5 * thrash * sin((fish->htail) * RRAD);
-    seg1 = 2.5 * thrash * sin((fish->htail + 10.0) * RRAD);
-    seg2 = 3.7 * thrash * sin((fish->htail + 15.0) * RRAD);
-    seg3 = 4.8 * thrash * sin((fish->htail + 23.0) * RRAD);
-    seg4 = 6.0 * thrash * sin((fish->htail + 28.0) * RRAD);
-    seg5 = 6.5 * thrash * sin((fish->htail + 35.0) * RRAD);
-    seg6 = 6.5 * thrash * sin((fish->htail + 40.0) * RRAD);
-    seg7 = 6.5 * thrash * sin((fish->htail + 55.0) * RRAD);
-
-    pitch = fish->v * sin((fish->htail - 160.0) * RRAD);
-
-    chomp = 0.0;
-    if (fish->v > 2.0) {
-        chomp = -(fish->v - 2.0) * 200.0;
-    }
-    P012[1] = iP012[1] + seg5;
-    P013[1] = iP013[1] + seg5;
-    P014[1] = iP014[1] + seg5;
-    P015[1] = iP015[1] + seg5;
-    P016[1] = iP016[1] + seg5;
-    P017[1] = iP017[1] + seg5;
-    P018[1] = iP018[1] + seg5;
-    P019[1] = iP019[1] + seg5;
-
-    P020[1] = iP020[1] + seg4;
-    P021[1] = iP021[1] + seg4;
-    P022[1] = iP022[1] + seg4;
-    P023[1] = iP023[1] + seg4;
-    P024[1] = iP024[1] + seg4;
-    P025[1] = iP025[1] + seg4;
-    P026[1] = iP026[1] + seg4;
-    P027[1] = iP027[1] + seg4;
-
-    P028[1] = iP028[1] + seg2;
-    P029[1] = iP029[1] + seg2;
-    P030[1] = iP030[1] + seg2;
-    P031[1] = iP031[1] + seg2;
-    P032[1] = iP032[1] + seg2;
-    P033[1] = iP033[1] + seg2;
-    P034[1] = iP034[1] + seg2;
-    P035[1] = iP035[1] + seg2;
-
-    P036[1] = iP036[1] + seg1;
-    P037[1] = iP037[1] + seg1;
-    P038[1] = iP038[1] + seg1;
-    P039[1] = iP039[1] + seg1;
-    P040[1] = iP040[1] + seg1;
-    P041[1] = iP041[1] + seg1;
-    P042[1] = iP042[1] + seg1;
-    P043[1] = iP043[1] + seg1;
-
-    P044[1] = iP044[1] + seg0;
-    P045[1] = iP045[1] + seg0;
-    P046[1] = iP046[1] + seg0;
-    P047[1] = iP047[1] + seg0;
-    P048[1] = iP048[1] + seg0;
-    P049[1] = iP049[1] + seg0;
-    P050[1] = iP050[1] + seg0;
-    P051[1] = iP051[1] + seg0;
-
-    P009[1] = iP009[1] + seg6;
-    P010[1] = iP010[1] + seg6;
-    P075[1] = iP075[1] + seg6;
-    P076[1] = iP076[1] + seg6;
-
-    P001[1] = iP001[1] + seg7;
-    P011[1] = iP011[1] + seg7;
-    P068[1] = iP068[1] + seg7;
-    P069[1] = iP069[1] + seg7;
-    P070[1] = iP070[1] + seg7;
-    P071[1] = iP071[1] + seg7;
-    P072[1] = iP072[1] + seg7;
-    P073[1] = iP073[1] + seg7;
-    P074[1] = iP074[1] + seg7;
-
-    P091[1] = iP091[1] + seg3 * 1.1;
-    P092[1] = iP092[1] + seg3;
-    P093[1] = iP093[1] + seg3;
-    P094[1] = iP094[1] + seg3;
-    P095[1] = iP095[1] + seg3 * 0.9;
-
-    P099[1] = iP099[1] + chomp;
-    P098[1] = iP098[1] + chomp;
-    P097[1] = iP097[1] + chomp;
-    P096[1] = iP096[1] + chomp;
-
-    glPushMatrix();
-
-    glRotatef(pitch, 1.0, 0.0, 0.0);
-
-    glTranslatef(0.0, 0.0, 8000.0);
-
-    glRotatef(180.0, 0.0, 1.0, 0.0);
-
-    glScalef(3.0, 3.0, 3.0);
-
-    glEnable(GL_CULL_FACE);
-
-    Whale001();
-    Whale002();
-    Whale003();
-    Whale004();
-    Whale005();
-    Whale006();
-    Whale007();
-    Whale008();
-    Whale009();
-    Whale010();
-    Whale011();
-    Whale012();
-    Whale013();
-    Whale014();
-    Whale015();
-    Whale016();
-
-    glDisable(GL_CULL_FACE);
-
-    glPopMatrix();
-}
diff --git a/Xcode/TemplatesForXcodeTiger/SDL OpenGL Application/main.c b/Xcode/TemplatesForXcodeTiger/SDL OpenGL Application/main.c
deleted file mode 100644
index 3bc4d33b1..000000000
--- a/Xcode/TemplatesForXcodeTiger/SDL OpenGL Application/main.c	
+++ /dev/null
@@ -1,179 +0,0 @@
-
-/* Simple program:  Create a blank window, wait for keypress, quit.
-
-   Please see the SDL documentation for details on using the SDL API:
-   /Developer/Documentation/SDL/docs.html
-*/
-
-#include 
-#include 
-#include 
-#include 
-
-#include "SDL.h"
-
-extern void Atlantis_Init ();
-extern void Atlantis_Reshape (int w, int h);
-extern void Atlantis_Animate ();
-extern void Atlantis_Display ();
-
-static SDL_Surface *gScreen;
-
-static void initAttributes ()
-{
-    // Setup attributes we want for the OpenGL context
-
-    int value;
-
-    // Don't set color bit sizes (SDL_GL_RED_SIZE, etc)
-    //    Mac OS X will always use 8-8-8-8 ARGB for 32-bit screens and
-    //    5-5-5 RGB for 16-bit screens
-
-    // Request a 16-bit depth buffer (without this, there is no depth buffer)
-    value = 16;
-    SDL_GL_SetAttribute (SDL_GL_DEPTH_SIZE, value);
-
-
-    // Request double-buffered OpenGL
-    //     The fact that windows are double-buffered on Mac OS X has no effect
-    //     on OpenGL double buffering.
-    value = 1;
-    SDL_GL_SetAttribute (SDL_GL_DOUBLEBUFFER, value);
-}
-
-static void printAttributes ()
-{
-    // Print out attributes of the context we created
-    int nAttr;
-    int i;
-
-    int  attr[] = { SDL_GL_RED_SIZE, SDL_GL_BLUE_SIZE, SDL_GL_GREEN_SIZE,
-                    SDL_GL_ALPHA_SIZE, SDL_GL_BUFFER_SIZE, SDL_GL_DEPTH_SIZE };
-
-    char *desc[] = { "Red size: %d bits\n", "Blue size: %d bits\n", "Green size: %d bits\n",
-                     "Alpha size: %d bits\n", "Color buffer size: %d bits\n",
-                     "Depth bufer size: %d bits\n" };
-
-    nAttr = sizeof(attr) / sizeof(int);
-
-    for (i = 0; i < nAttr; i++) {
-
-        int value;
-        SDL_GL_GetAttribute (attr[i], &value);
-        printf (desc[i], value);
-    }
-}
-
-static void createSurface (int fullscreen)
-{
-    Uint32 flags = 0;
-
-    flags = SDL_OPENGL;
-    if (fullscreen)
-        flags |= SDL_FULLSCREEN;
-
-    // Create window
-    gScreen = SDL_SetVideoMode (640, 480, 0, flags);
-    if (gScreen == NULL) {
-
-        fprintf (stderr, "Couldn't set 640x480 OpenGL video mode: %s\n",
-                 SDL_GetError());
-        SDL_Quit();
-        exit(2);
-    }
-}
-
-static void initGL ()
-{
-    Atlantis_Init ();
-    Atlantis_Reshape (gScreen->w, gScreen->h);
-}
-
-static void drawGL ()
-{
-    Atlantis_Animate ();
-    Atlantis_Display ();
-}
-
-static void mainLoop ()
-{
-    SDL_Event event;
-    int done = 0;
-    int fps = 24;
-    int delay = 1000/fps;
-    int thenTicks = -1;
-    int nowTicks;
-
-    while ( !done ) {
-
-        /* Check for events */
-        while ( SDL_PollEvent (&event) ) {
-            switch (event.type) {
-
-                case SDL_MOUSEMOTION:
-                    break;
-                case SDL_MOUSEBUTTONDOWN:
-                    break;
-                case SDL_KEYDOWN:
-                    /* Any keypress quits the app... */
-                case SDL_QUIT:
-                    done = 1;
-                    break;
-                default:
-                    break;
-            }
-        }
-
-        // Draw at 24 hz
-        //     This approach is not normally recommended - it is better to
-        //     use time-based animation and run as fast as possible
-        drawGL ();
-        SDL_GL_SwapBuffers ();
-
-        // Time how long each draw-swap-delay cycle takes
-        // and adjust delay to get closer to target framerate
-        if (thenTicks > 0) {
-            nowTicks = SDL_GetTicks ();
-            delay += (1000/fps - (nowTicks-thenTicks));
-            thenTicks = nowTicks;
-            if (delay < 0)
-                delay = 1000/fps;
-        }
-        else {
-            thenTicks = SDL_GetTicks ();
-        }
-
-        SDL_Delay (delay);
-    }
-}
-
-int main(int argc, char *argv[])
-{
-    // Init SDL video subsystem
-    if ( SDL_Init (SDL_INIT_VIDEO) < 0 ) {
-
-        fprintf(stderr, "Couldn't initialize SDL: %s\n",
-            SDL_GetError());
-        exit(1);
-    }
-
-    // Set GL context attributes
-    initAttributes ();
-
-    // Create GL context
-    createSurface (0);
-
-    // Get GL context attributes
-    printAttributes ();
-
-    // Init GL state
-    initGL ();
-
-    // Draw, get events...
-    mainLoop ();
-
-    // Cleanup
-    SDL_Quit();
-
-    return 0;
-}
diff --git a/Xcode/package b/Xcode/package
deleted file mode 100755
index 6e6b5707c..000000000
--- a/Xcode/package
+++ /dev/null
@@ -1,272 +0,0 @@
-#! /bin/csh -ef
-
-set prog = `/usr/bin/basename $0`
-set usage = "Usage: $prog [-f] root-dir info-file [tiff-file] [-d dest-dir] [-r resource-dir] [-traditional | -gnutar]"
-set noglob
-
-if (-x /usr/bin/mkbom) then
-    set mkbom=/usr/bin/mkbom
-    set lsbom=/usr/bin/lsbom
-else
-    set mkbom=/usr/etc/mkbom
-    set lsbom=/usr/etc/lsbom
-endif
-
-if (-x /usr/bin/awk) then
-    set awk=/usr/bin/awk
-else
-    set awk=/bin/awk
-endif
-
-set gnutar=/usr/bin/gnutar
-set tar=/usr/bin/tar
-set pax=/bin/pax
-
-# gather parameters
-if ($#argv == 0) then
-    echo $usage
-    exit(1)
-endif
-
-while ( $#argv > 0 )
-    switch ( $argv[1] )
-	case -d:
-	    if ( $?destDir ) then
-		echo ${prog}: dest-dir parameter already set to ${destDir}.
-		echo $usage
-		exit(1)
-	    else if ( $#argv < 2 ) then
-		echo ${prog}: -d option requires destination directory.
-		echo $usage
-		exit(1)
-	    else
-		set destDir = $argv[2]
-		shift; shift
-		breaksw
-	    endif
-	case -f:
-	    if ( $?rootDir ) then
-		echo ${prog}: root-dir parameter already set to ${rootDir}.
-		echo $usage
-		exit(1)
-	    else if ( $#argv < 2 ) then
-		echo ${prog}: -f option requires package root directory.
-		echo $usage
-		exit(1)
-	    else
-		set rootDir = $argv[2]
-		set fflag
-		shift; shift
-		breaksw
-	    endif
-	case -r:
-	    if ( $?resDir ) then
-		echo ${prog}: resource-dir parameter already set to ${resDir}.
-		echo $usage
-		exit(1)
-	    else if ( $#argv < 2 ) then
-		echo ${prog}: -r option requires package resource directory.
-		echo $usage
-		exit(1)
-	    else
-		set resDir = $argv[2]
-		shift; shift
-		breaksw
-	    endif
-	case -traditional:
-	    set usetar
-            unset usegnutar
-	    unset usepax
-	    breaksw
-        case -gnutar:
-	    set usegnutar
-            unset usepax
-	    unset usetar
-	case -B:
-	    # We got long file names, better use bigtar instead
-	    #set archiver = /NextAdmin/Installer.app/Resources/installer_bigtar
-	    echo 2>&1 ${prog}: -B flag is no longer relevant.
-	    shift
-	    breaksw
-	case -*:
-	    echo ${prog}: Unknown option: $argv[1]
-	    echo $usage
-	    exit(1)
-	case *.info:
-	    if ( $?info ) then
-		echo ${prog}: info-file parameter already set to ${info}.
-		echo $usage
-		exit(1)
-	    else
-		set info = "$argv[1]"
-		shift
-		breaksw
-	    endif
-	case *.tiff:
-	    if ( $?tiff ) then
-		echo ${prog}: tiff-file parameter already set to ${tiff}.
-		echo $usage
-		exit(1)
-	    else
-		set tiff = "$argv[1]"
-		shift
-		breaksw
-	    endif
-	default:
-	    if ( $?rootDir ) then
-		echo ${prog}: unrecognized parameter: $argv[1]
-		echo $usage
-		exit(1)
-	    else
-		set rootDir = "$argv[1]"
-		shift
-		breaksw
-	    endif
-    endsw
-end
-
-# check for mandatory parameters
-if ( ! $?rootDir ) then
-    echo ${prog}: missing root-dir parameter.
-    echo $usage
-    exit(1)
-else if ( ! $?info) then
-    echo ${prog}: missing info-file parameter.
-    echo $usage
-    exit(1)
-endif
-
-# destDir gets default value if unset on command line
-if ( $?destDir ) then
-    /bin/mkdir -p $destDir
-else
-    set destDir = .
-endif
-
-# derive the root name for the package from the root name of the info file
-set root = `/usr/bin/basename $info .info`
-
-# create package directory
-set pkg = ${destDir}/${root}.pkg
-echo Generating Installer package $pkg ...
-if ( -e $pkg ) /bin/rm -rf $pkg
-/bin/mkdir -p -m 755 $pkg
-
-# (gnu)tar/pax and compress root directory to package archive
-echo -n "	creating package archive ... "
-if ( $?fflag ) then
-    set pkgTop = ${rootDir:t}
-    set parent = ${rootDir:h}
-    if ( "$parent" == "$pkgTop" ) set parent = "."
-else
-    set parent = $rootDir
-    set pkgTop = .    
-endif
-if ( $?usetar ) then
-    set pkgArchive = $pkg/$root.tar.Z
-    (cd $parent; $tar -w $pkgTop) | /usr/bin/compress -f -c > $pkgArchive
-else if ( $?usegnutar ) then
-    set pkgArchive = $pkg/$root.tar.gz
-    (cd $parent; $gnutar zcf $pkgArchive $pkgTop)
-else
-    set pkgArchive = $pkg/$root.pax.gz
-    (cd $parent; $pax -w -z -x cpio $pkgTop) > $pkgArchive
-endif
-/bin/chmod 444 $pkgArchive
-echo done.
-
-# copy info file to package
-set pkgInfo = $pkg/$root.info
-echo -n "	copying ${info:t} ... "
-/bin/cp $info $pkgInfo
-/bin/chmod 444 $pkgInfo
-echo done.
-
-# copy tiff file to package
-if ( $?tiff ) then
-    set pkgTiff = $pkg/$root.tiff
-    echo -n "	copying ${tiff:t} ... "
-    /bin/cp $tiff $pkgTiff
-    /bin/chmod 444 $pkgTiff
-    echo done.
-endif
-
-# copy resources to package
-if ( $?resDir ) then
-    echo -n "	copying ${resDir:t} ... "
-
-    # don't want to see push/pop output
-    pushd $resDir > /dev/null
-	# get lists of resources. We'll want to change
-	# permissions on just these things later.
-        set directoriesInResDir = `find . -type d`
-        set filesInResDir = `find . -type f`
-    popd > /dev/null
-
-    # copy the resource directory contents into the package directory
-    foreach resFile (`ls $resDir`)
-	cp -r $resDir/$resFile $pkg
-    end
-
-    pushd $pkg > /dev/null
-	# Change all directories to +r+x, except the package
-	# directory itself
-        foreach resFileItem ($directoriesInResDir)
-            if ( $resFileItem != "." ) then
-                chmod 555 $resFileItem
-            endif
-        end
-	# change all flat files to read only
-        foreach resFileItem ($filesInResDir)
-            chmod 444 $resFileItem
-        end
-    popd > /dev/null
-
-    echo done.
-endif
-
-# generate bom file
-set pkgBom = $pkg/$root.bom
-echo -n "	generating bom file ... "
-/bin/rm -f $pkgBom
-if ( $?fflag ) then
-    $mkbom $parent $pkgBom >& /dev/null
-else
-    $mkbom $rootDir $pkgBom >& /dev/null
-endif
-/bin/chmod 444 $pkgArchive
-echo done.
-	
-# generate sizes file
-set pkgSizes = $pkg/$root.sizes
-echo -n "	generating sizes file ... "
-
-# compute number of files in package
-set numFiles = `$lsbom -s $pkgBom | /usr/bin/wc -l`
-
-# compute package size when compressed
-@ compressedSize = `/usr/bin/du -k -s $pkg | $awk '{print $1}'`
-@ compressedSize += 3		# add 1KB each for sizes, location, status files
-
-@ infoSize = `/bin/ls -s $pkgInfo | $awk '{print $1}'`
-@ bomSize = `/bin/ls -s $pkgBom | $awk '{print $1}'`
-if ( $?tiff ) then
-    @ tiffSize = `/bin/ls -s $pkgTiff | $awk '{print $1}'`
-else
-    @ tiffSize = 0
-endif 
-
-@ installedSize = `/usr/bin/du -k -s $rootDir | $awk '{print $1}'`
-@ installedSize += $infoSize + $bomSize + $tiffSize + 3
-
-# echo size parameters to sizes file
-echo NumFiles $numFiles             >  $pkgSizes
-echo InstalledSize $installedSize   >> $pkgSizes
-echo CompressedSize $compressedSize >> $pkgSizes
-echo done.
-echo " ... finished generating $pkg."
-
-exit(0)
-
-# end package
-	
diff --git a/Xcode/stationary.csh b/Xcode/stationary.csh
deleted file mode 100755
index ba5a38551..000000000
--- a/Xcode/stationary.csh
+++ /dev/null
@@ -1,25 +0,0 @@
-#!/bin/csh
-
-###
-## This script installs the stationary
-###
-
-sudo -v -p "Please enter the administrator password: "
-
-# project templates
-sudo /Developer/Tools/CpMac -r "Project Stationary/SDL Application" "/Developer/ProjectBuilder Extras/Project Templates/Application/"
-
-sudo /Developer/Tools/CpMac -r "Project Stationary/SDL Cocoa Application" "/Developer/ProjectBuilder Extras/Project Templates/Application/"
-
-sudo /Developer/Tools/CpMac -r "Project Stationary/SDL Custom Cocoa Application" "/Developer/ProjectBuilder Extras/Project Templates/Application/"
-
-sudo /Developer/Tools/CpMac -r "Project Stationary/SDL OpenGL Application" "/Developer/ProjectBuilder Extras/Project Templates/Application/"
-
-
-# target templates
-sudo mkdir -p "/Developer/ProjectBuilder Extras/Target Templates/SDL"
-
-sudo /Developer/Tools/CpMac -r "Project Stationary/Application.trgttmpl" "/Developer/ProjectBuilder Extras/Target Templates/SDL"
-
-
-
diff --git a/Xcode/uninstall.csh b/Xcode/uninstall.csh
deleted file mode 100755
index aab8d790f..000000000
--- a/Xcode/uninstall.csh
+++ /dev/null
@@ -1,32 +0,0 @@
-#!/bin/csh
-
-###
-## This script removes the Developer SDL package
-###
-
-setenv HOME_DIR ~
-
-sudo -v -p "Enter administrator password to remove SDL: "
-
-sudo rm -rf "$HOME_DIR/Library/Frameworks/SDL.framework"
-
-# will only remove the Frameworks dir if empty (since we put it there)
-sudo rmdir "$HOME_DIR/Library/Frameworks"
-
-sudo rm -r "$HOME_DIR/Readme SDL Developer.txt"
-sudo rm -r "/Developer/Documentation/SDL"
-sudo rm -r "/Developer/Documentation/ManPages/man3/SDL"*
-sudo rm -r "/Developer/ProjectBuilder Extras/Project Templates/Application/SDL Application"
-sudo rm -r "/Developer/ProjectBuilder Extras/Project Templates/Application/SDL Cocoa Application"
-sudo rm -r "/Developer/ProjectBuilder Extras/Project Templates/Application/SDL Custom Cocoa Application"
-sudo rm -r "/Developer/ProjectBuilder Extras/Project Templates/Application/SDL OpenGL Application"
-sudo rm -r "/Developer/ProjectBuilder Extras/Target Templates/SDL"
-sudo rm -r "/Library/Receipts/SDL-devel.pkg"
-
-# rebuild apropos database
-sudo /usr/libexec/makewhatis
-
-unsetenv HOME_DIR
-
-
-

From 46487bd122631eafe0f569376fa3fa58de8d4baf Mon Sep 17 00:00:00 2001
From: Sam Lantinga 
Date: Mon, 17 Jun 2013 07:14:20 -0700
Subject: [PATCH 228/542] Improved include paths for projects using SDL on
 Android

Isaac Burns

I wanted to suggest a few changes I've found that help the Android build.  By adding LOCAL_EXPORT_C_INCLUDES to the Android.mk file, anything that references the SDL Android project will inherit the include paths.
---
 Android.mk | 2 ++
 1 file changed, 2 insertions(+)

diff --git a/Android.mk b/Android.mk
index a344a5294..8fb4cfc7d 100755
--- a/Android.mk
+++ b/Android.mk
@@ -12,6 +12,8 @@ LOCAL_MODULE := SDL2
 
 LOCAL_C_INCLUDES := $(LOCAL_PATH)/include
 
+LOCAL_EXPORT_C_INCLUDES := $(LOCAL_C_INCLUDES)
+
 LOCAL_SRC_FILES := \
 	$(subst $(LOCAL_PATH)/,, \
 	$(wildcard $(LOCAL_PATH)/src/*.c) \

From 92936784090c3e2c6df7a1bb43dc79ca0ea1770f Mon Sep 17 00:00:00 2001
From: Sam Lantinga 
Date: Tue, 18 Jun 2013 00:39:47 -0700
Subject: [PATCH 229/542] Fixed bug 1916 - SDL_Keysym contains a deprecated
 field for unicode which may be removed.

Philipp Wiesemann

SDL_Keysym contains a deprecated field for unicode which may be removed for SDL 2.0 release.

As far as I can tell the field is not set on all "major" platforms and therefore will not be useful for most users. Its existence in a public header therefore becomes (in my opinion) only confusing.
---
 include/SDL_keyboard.h                   |  4 ++-
 src/events/SDL_keyboard.c                |  1 -
 src/video/directfb/SDL_DirectFB_events.c | 34 +++++++++++++-----------
 test/checkkeys.c                         | 18 -------------
 4 files changed, 21 insertions(+), 36 deletions(-)

diff --git a/include/SDL_keyboard.h b/include/SDL_keyboard.h
index ece05b9bf..e10f9fd15 100644
--- a/include/SDL_keyboard.h
+++ b/include/SDL_keyboard.h
@@ -41,13 +41,15 @@ extern "C" {
 
 /**
  *  \brief The SDL keysym structure, used in key events.
+ *
+ *  \note  If you are looking for translated character input, see the ::SDL_TEXTINPUT event.
  */
 typedef struct SDL_Keysym
 {
     SDL_Scancode scancode;      /**< SDL physical key code - see ::SDL_Scancode for details */
     SDL_Keycode sym;            /**< SDL virtual key code - see ::SDL_Keycode for details */
     Uint16 mod;                 /**< current key modifiers */
-    Uint32 unicode;             /**< \deprecated use SDL_TextInputEvent instead */
+    Uint32 unused;
 } SDL_Keysym;
 
 /* Function prototypes */
diff --git a/src/events/SDL_keyboard.c b/src/events/SDL_keyboard.c
index 468c3d109..a3ed16869 100644
--- a/src/events/SDL_keyboard.c
+++ b/src/events/SDL_keyboard.c
@@ -774,7 +774,6 @@ SDL_SendKeyboardKey(Uint8 state, SDL_Scancode scancode)
         event.key.keysym.scancode = scancode;
         event.key.keysym.sym = keyboard->keymap[scancode];
         event.key.keysym.mod = modstate;
-        event.key.keysym.unicode = 0;
         event.key.windowID = keyboard->focus ? keyboard->focus->id : 0;
         posted = (SDL_PushEvent(&event) > 0);
     }
diff --git a/src/video/directfb/SDL_DirectFB_events.c b/src/video/directfb/SDL_DirectFB_events.c
index ffb15c362..483ba9cb1 100644
--- a/src/video/directfb/SDL_DirectFB_events.c
+++ b/src/video/directfb/SDL_DirectFB_events.c
@@ -64,9 +64,9 @@ static SDL_Scancode oskeymap[256];
 
 
 static SDL_Keysym *DirectFB_TranslateKey(_THIS, DFBWindowEvent * evt,
-                                         SDL_Keysym * keysym);
+                                         SDL_Keysym * keysym, Uint32 *unicode);
 static SDL_Keysym *DirectFB_TranslateKeyInputEvent(_THIS, DFBInputEvent * evt,
-                                                   SDL_Keysym * keysym);
+                                                   SDL_Keysym * keysym, Uint32 *unicode);
 
 static void DirectFB_InitOSKeymap(_THIS, SDL_Scancode * keypmap, int numkeys);
 static int DirectFB_TranslateButton(DFBInputDeviceButtonIdentifier button);
@@ -176,6 +176,7 @@ ProcessWindowEvent(_THIS, SDL_Window *sdlwin, DFBWindowEvent * evt)
     SDL_DFB_DEVICEDATA(_this);
     SDL_DFB_WINDOWDATA(sdlwin);
     SDL_Keysym keysym;
+    Uint32 unicode;
     char text[SDL_TEXTINPUTEVENT_TEXT_SIZE];
 
     if (evt->clazz == DFEC_WINDOW) {
@@ -231,12 +232,12 @@ ProcessWindowEvent(_THIS, SDL_Window *sdlwin, DFBWindowEvent * evt)
             break;
         case DWET_KEYDOWN:
             if (!devdata->use_linux_input) {
-                DirectFB_TranslateKey(_this, evt, &keysym);
+                DirectFB_TranslateKey(_this, evt, &keysym, &unicode);
                 /*printf("Scancode %d  %d %d\n", keysym.scancode, evt->key_code, evt->key_id);*/
                 SDL_SendKeyboardKey_ex(0, SDL_PRESSED, keysym.scancode);
                 if (SDL_EventState(SDL_TEXTINPUT, SDL_QUERY)) {
                     SDL_zero(text);
-                    UnicodeToUtf8(keysym.unicode, text);
+                    UnicodeToUtf8(unicode, text);
                     if (*text) {
                         SDL_SendKeyboardText_ex(0, text);
                     }
@@ -245,7 +246,7 @@ ProcessWindowEvent(_THIS, SDL_Window *sdlwin, DFBWindowEvent * evt)
             break;
         case DWET_KEYUP:
             if (!devdata->use_linux_input) {
-                DirectFB_TranslateKey(_this, evt, &keysym);
+                DirectFB_TranslateKey(_this, evt, &keysym, &unicode);
                 SDL_SendKeyboardKey_ex(0, SDL_RELEASED, keysym.scancode);
             }
             break;
@@ -309,6 +310,7 @@ ProcessInputEvent(_THIS, DFBInputEvent * ievt)
     SDL_DFB_DEVICEDATA(_this);
     SDL_Keysym keysym;
     int kbd_idx;
+    Uint32 unicode;
     char text[SDL_TEXTINPUTEVENT_TEXT_SIZE];
 
     if (!devdata->use_linux_input) {
@@ -366,12 +368,12 @@ ProcessInputEvent(_THIS, DFBInputEvent * ievt)
             break;
         case DIET_KEYPRESS:
             kbd_idx = KbdIndex(_this, ievt->device_id);
-            DirectFB_TranslateKeyInputEvent(_this, ievt, &keysym);
+            DirectFB_TranslateKeyInputEvent(_this, ievt, &keysym, &unicode);
             /*printf("Scancode %d  %d %d\n", keysym.scancode, evt->key_code, evt->key_id); */
             SDL_SendKeyboardKey_ex(kbd_idx, SDL_PRESSED, keysym.scancode);
             if (SDL_EventState(SDL_TEXTINPUT, SDL_QUERY)) {
                 SDL_zero(text);
-                UnicodeToUtf8(keysym.unicode, text);
+                UnicodeToUtf8(unicode, text);
                 if (*text) {
                     SDL_SendKeyboardText_ex(kbd_idx, text);
                 }
@@ -379,7 +381,7 @@ ProcessInputEvent(_THIS, DFBInputEvent * ievt)
             break;
         case DIET_KEYRELEASE:
             kbd_idx = KbdIndex(_this, ievt->device_id);
-            DirectFB_TranslateKeyInputEvent(_this, ievt, &keysym);
+            DirectFB_TranslateKeyInputEvent(_this, ievt, &keysym, &unicode);
             SDL_SendKeyboardKey_ex(kbd_idx, SDL_RELEASED, keysym.scancode);
             break;
         case DIET_BUTTONPRESS:
@@ -575,7 +577,7 @@ DirectFB_InitOSKeymap(_THIS, SDL_Scancode * keymap, int numkeys)
 }
 
 static SDL_Keysym *
-DirectFB_TranslateKey(_THIS, DFBWindowEvent * evt, SDL_Keysym * keysym)
+DirectFB_TranslateKey(_THIS, DFBWindowEvent * evt, SDL_Keysym * keysym, Uint32 *unicode)
 {
     SDL_DFB_DEVICEDATA(_this);
     int kbd_idx = 0; /* Window events lag the device source KbdIndex(_this, evt->device_id); */
@@ -595,18 +597,18 @@ DirectFB_TranslateKey(_THIS, DFBWindowEvent * evt, SDL_Keysym * keysym)
             keysym->scancode = SDL_SCANCODE_UNKNOWN;
     }
 
-    keysym->unicode =
+    *unicode =
         (DFB_KEY_TYPE(evt->key_symbol) == DIKT_UNICODE) ? evt->key_symbol : 0;
-    if (keysym->unicode == 0 &&
+    if (*unicode == 0 &&
         (evt->key_symbol > 0 && evt->key_symbol < 255))
-        keysym->unicode = evt->key_symbol;
+        *unicode = evt->key_symbol;
 
     return keysym;
 }
 
 static SDL_Keysym *
 DirectFB_TranslateKeyInputEvent(_THIS, DFBInputEvent * evt,
-                                SDL_Keysym * keysym)
+                                SDL_Keysym * keysym, Uint32 *unicode)
 {
     SDL_DFB_DEVICEDATA(_this);
     int kbd_idx = KbdIndex(_this, evt->device_id);
@@ -625,11 +627,11 @@ DirectFB_TranslateKeyInputEvent(_THIS, DFBInputEvent * evt,
             keysym->scancode = SDL_SCANCODE_UNKNOWN;
     }
 
-    keysym->unicode =
+    *unicode =
         (DFB_KEY_TYPE(evt->key_symbol) == DIKT_UNICODE) ? evt->key_symbol : 0;
-    if (keysym->unicode == 0 &&
+    if (*unicode == 0 &&
         (evt->key_symbol > 0 && evt->key_symbol < 255))
-        keysym->unicode = evt->key_symbol;
+        *unicode = evt->key_symbol;
 
     return keysym;
 }
diff --git a/test/checkkeys.c b/test/checkkeys.c
index aa94f9f50..ff7558d9b 100644
--- a/test/checkkeys.c
+++ b/test/checkkeys.c
@@ -107,24 +107,6 @@ PrintKey(SDL_Keysym * sym, SDL_bool pressed, SDL_bool repeat)
                 SDL_GetScancodeName(sym->scancode),
                 pressed ? "pressed " : "released");
     }
-
-    /* Print the translated character, if one exists */
-    if (sym->unicode) {
-        /* Is it a control-character? */
-        if (sym->unicode < ' ') {
-            print_string(&spot, &left, " (^%c)", sym->unicode + '@');
-        } else {
-#ifdef UNICODE
-            print_string(&spot, &left, " (%c)", sym->unicode);
-#else
-            /* This is a Latin-1 program, so only show 8-bits */
-            if (!(sym->unicode & 0xFF00))
-                print_string(&spot, &left, " (%c)", sym->unicode);
-            else
-                print_string(&spot, &left, " (0x%X)", sym->unicode);
-#endif
-        }
-    }
     print_modifiers(&spot, &left);
     if (repeat) {
         print_string(&spot, &left, " (repeat)");

From 3fb130cb394efc2612fb80a8039cb84892a70bf0 Mon Sep 17 00:00:00 2001
From: Sam Lantinga 
Date: Tue, 18 Jun 2013 00:50:35 -0700
Subject: [PATCH 230/542] Fixed bug 1913 - state->index may get negative in
 SDL_wave.c file.

Nitz

In function:
static Sint32
IMA_ADPCM_nibble(struct IMA_ADPCM_decodestate *state, Uint8 nybble)
{
 const Sint32 max_audioval = ((1 << (16 - 1)) - 1);
    const Sint32 min_audioval = -(1 << (16 - 1));
    const int index_table[16] = {
        -1, -1, -1, -1,
        2, 4, 6, 8,
        -1, -1, -1, -1,
        2, 4, 6, 8
    };
    const Sint32 step_table[89] = {
        7, 8, 9, 10, 11, 12, 13, 14, 16, 17, 19, 21, 23, 25, 28, 31,
        34, 37, 41, 45, 50, 55, 60, 66, 73, 80, 88, 97, 107, 118, 130,
        143, 157, 173, 190, 209, 230, 253, 279, 307, 337, 371, 408,
        449, 494, 544, 598, 658, 724, 796, 876, 963, 1060, 1166, 1282,
        1411, 1552, 1707, 1878, 2066, 2272, 2499, 2749, 3024, 3327,
        3660, 4026, 4428, 4871, 5358, 5894, 6484, 7132, 7845, 8630,
        9493, 10442, 11487, 12635, 13899, 15289, 16818, 18500, 20350,
        22385, 24623, 27086, 29794, 32767
    };
    Sint32 delta, step;

    /* Compute difference and new sample value */
    step = step_table[state->index];
    // Some Code
}

Here step_table array have the state->index, which might be negative, so it is unsafe to assign this index to step_table array directly.
There would be a check before that to confirm its value.
---
 src/audio/SDL_wave.c | 10 +++++-----
 1 file changed, 5 insertions(+), 5 deletions(-)

diff --git a/src/audio/SDL_wave.c b/src/audio/SDL_wave.c
index b1bd0538c..18fdcacd3 100644
--- a/src/audio/SDL_wave.c
+++ b/src/audio/SDL_wave.c
@@ -273,6 +273,11 @@ IMA_ADPCM_nibble(struct IMA_ADPCM_decodestate *state, Uint8 nybble)
     Sint32 delta, step;
 
     /* Compute difference and new sample value */
+    if (state->index > 88) {
+        state->index = 88;
+    } else if (state->index < 0) {
+        state->index = 0;
+    }
     step = step_table[state->index];
     delta = step >> 3;
     if (nybble & 0x04)
@@ -287,11 +292,6 @@ IMA_ADPCM_nibble(struct IMA_ADPCM_decodestate *state, Uint8 nybble)
 
     /* Update index value */
     state->index += index_table[nybble];
-    if (state->index > 88) {
-        state->index = 88;
-    } else if (state->index < 0) {
-        state->index = 0;
-    }
 
     /* Clamp output sample */
     if (state->sample > max_audioval) {

From 319984251f0e4ced38ce44df712ba4ea9003fdb3 Mon Sep 17 00:00:00 2001
From: Andreas Schiffler 
Date: Sun, 23 Jun 2013 14:05:27 -0700
Subject: [PATCH 231/542] Add VS Express Edition sln files (drop the
 unsupported solution folders for tests); update VisualC documentation

---
 VisualC.html             |   6 ++
 VisualC/SDL_VS2010EE.sln | 174 ++++++++++++++++++++++++++++++++
 VisualC/SDL_VS2012EE.sln | 213 +++++++++++++++++++++++++++++++++++++++
 3 files changed, 393 insertions(+)
 create mode 100644 VisualC/SDL_VS2010EE.sln
 create mode 100644 VisualC/SDL_VS2012EE.sln

diff --git a/VisualC.html b/VisualC.html
index a481936a3..e22f06f1c 100644
--- a/VisualC.html
+++ b/VisualC.html
@@ -19,6 +19,12 @@
 		

Go into the VisualC directory and double-click on the Visual Studio solution for your version of Visual Studio, e.g. SDL_VS2008.sln This should open up the IDE.

+

+ There are different solution files for the various + versions of the IDE. Please use the appropiate version + 2008, 2010 or 2012; the 2010EE and 2012EE files + should be used with the "Express Edition" releases. +

Build the .dll and .lib files.

diff --git a/VisualC/SDL_VS2010EE.sln b/VisualC/SDL_VS2010EE.sln new file mode 100644 index 000000000..d9915f253 --- /dev/null +++ b/VisualC/SDL_VS2010EE.sln @@ -0,0 +1,174 @@ + +Microsoft Visual Studio Solution File, Format Version 11.00 +# Visual Studio 2010 +Project("{8BC9CEB8-8B4A-11D0-8D11-00A0C91BC942}") = "SDL2", "SDL\SDL_VS2010.vcxproj", "{81CE8DAF-EBB2-4761-8E45-B71ABCCA8C68}" +EndProject +Project("{8BC9CEB8-8B4A-11D0-8D11-00A0C91BC942}") = "SDL2main", "SDLmain\SDLmain_VS2010.vcxproj", "{DA956FD3-E142-46F2-9DD5-C78BEBB56B7A}" +EndProject +Project("{8BC9CEB8-8B4A-11D0-8D11-00A0C91BC942}") = "loopwave", "tests\loopwave\loopwave_VS2010.vcxproj", "{AAAD1CB5-7ADA-47AE-85A0-08A6EC48FAFB}" +EndProject +Project("{8BC9CEB8-8B4A-11D0-8D11-00A0C91BC942}") = "testplatform", "tests\testplatform\testplatform_VS2010.vcxproj", "{26932B24-EFC6-4E3A-B277-ED653DA37968}" +EndProject +Project("{8BC9CEB8-8B4A-11D0-8D11-00A0C91BC942}") = "testfile", "tests\testfile\testfile_VS2010.vcxproj", "{CAE4F1D0-314F-4B10-805B-0EFD670133A0}" +EndProject +Project("{8BC9CEB8-8B4A-11D0-8D11-00A0C91BC942}") = "testgl2", "tests\testgl2\testgl2_VS2010.vcxproj", "{8B5CFB38-CCBA-40A8-AD7A-89C57B070884}" +EndProject +Project("{8BC9CEB8-8B4A-11D0-8D11-00A0C91BC942}") = "checkkeys", "tests\checkkeys\checkkeys_VS2010.vcxproj", "{26828762-C95D-4637-9CB1-7F0979523813}" +EndProject +Project("{8BC9CEB8-8B4A-11D0-8D11-00A0C91BC942}") = "testsprite2", "tests\testsprite2\testsprite2_VS2010.vcxproj", "{40FB7794-D3C3-4CFE-BCF4-A80C96635682}" +EndProject +Project("{8BC9CEB8-8B4A-11D0-8D11-00A0C91BC942}") = "testshape", "tests\testshape\testshape_VS2010.vcxproj", "{EDEA9D00-AF64-45DE-8F60-5957048F2F0F}" +EndProject +Project("{8BC9CEB8-8B4A-11D0-8D11-00A0C91BC942}") = "testdraw2", "tests\testdraw2\testdraw2_VS2010.vcxproj", "{8682FE1E-0CF6-4EDD-9BB5-1733D8C8B4DF}" +EndProject +Project("{8BC9CEB8-8B4A-11D0-8D11-00A0C91BC942}") = "testpower", "tests\testpower\testpower_VS2010.vcxproj", "{C4E04D18-EF76-4B42-B4C2-16A1BACDC0A3}" +EndProject +Project("{8BC9CEB8-8B4A-11D0-8D11-00A0C91BC942}") = "SDL2test", "SDLtest\SDLtest_VS2010.vcxproj", "{DA956FD3-E143-46F2-9FE5-C77BEBC56B1A}" +EndProject +Project("{8BC9CEB8-8B4A-11D0-8D11-00A0C91BC942}") = "testautomation", "tests\testautomation\testautomation_vs2010.vcxproj", "{FEE710DB-EC7B-4CCB-BD75-535D401A2FE0}" +EndProject +Project("{8BC9CEB8-8B4A-11D0-8D11-00A0C91BC942}") = "testatomic", "tests\testatomic\testatomic_VS2010.vcxproj", "{2271060E-98B4-4596-8172-A041E4B2EC7A}" +EndProject +Project("{8BC9CEB8-8B4A-11D0-8D11-00A0C91BC942}") = "testscale", "tests\testscale\testscale_VS2010.vcxproj", "{E7A6C41C-E059-4C9C-8CCC-73586A540B62}" +EndProject +Project("{8BC9CEB8-8B4A-11D0-8D11-00A0C91BC942}") = "testrendertarget", "tests\testrendertarget\testrendertarget_VS2010.vcxproj", "{43A06713-A52D-4008-AD7E-A69DF3FCFFA8}" +EndProject +Global + GlobalSection(SolutionConfigurationPlatforms) = preSolution + Debug|Win32 = Debug|Win32 + Debug|x64 = Debug|x64 + Release|Win32 = Release|Win32 + Release|x64 = Release|x64 + EndGlobalSection + GlobalSection(ProjectConfigurationPlatforms) = postSolution + {81CE8DAF-EBB2-4761-8E45-B71ABCCA8C68}.Debug|Win32.ActiveCfg = Debug|Win32 + {81CE8DAF-EBB2-4761-8E45-B71ABCCA8C68}.Debug|Win32.Build.0 = Debug|Win32 + {81CE8DAF-EBB2-4761-8E45-B71ABCCA8C68}.Debug|x64.ActiveCfg = Debug|x64 + {81CE8DAF-EBB2-4761-8E45-B71ABCCA8C68}.Debug|x64.Build.0 = Debug|x64 + {81CE8DAF-EBB2-4761-8E45-B71ABCCA8C68}.Release|Win32.ActiveCfg = Release|Win32 + {81CE8DAF-EBB2-4761-8E45-B71ABCCA8C68}.Release|Win32.Build.0 = Release|Win32 + {81CE8DAF-EBB2-4761-8E45-B71ABCCA8C68}.Release|x64.ActiveCfg = Release|x64 + {81CE8DAF-EBB2-4761-8E45-B71ABCCA8C68}.Release|x64.Build.0 = Release|x64 + {DA956FD3-E142-46F2-9DD5-C78BEBB56B7A}.Debug|Win32.ActiveCfg = Debug|Win32 + {DA956FD3-E142-46F2-9DD5-C78BEBB56B7A}.Debug|Win32.Build.0 = Debug|Win32 + {DA956FD3-E142-46F2-9DD5-C78BEBB56B7A}.Debug|x64.ActiveCfg = Debug|x64 + {DA956FD3-E142-46F2-9DD5-C78BEBB56B7A}.Debug|x64.Build.0 = Debug|x64 + {DA956FD3-E142-46F2-9DD5-C78BEBB56B7A}.Release|Win32.ActiveCfg = Release|Win32 + {DA956FD3-E142-46F2-9DD5-C78BEBB56B7A}.Release|Win32.Build.0 = Release|Win32 + {DA956FD3-E142-46F2-9DD5-C78BEBB56B7A}.Release|x64.ActiveCfg = Release|x64 + {DA956FD3-E142-46F2-9DD5-C78BEBB56B7A}.Release|x64.Build.0 = Release|x64 + {AAAD1CB5-7ADA-47AE-85A0-08A6EC48FAFB}.Debug|Win32.ActiveCfg = Debug|Win32 + {AAAD1CB5-7ADA-47AE-85A0-08A6EC48FAFB}.Debug|Win32.Build.0 = Debug|Win32 + {AAAD1CB5-7ADA-47AE-85A0-08A6EC48FAFB}.Debug|x64.ActiveCfg = Debug|x64 + {AAAD1CB5-7ADA-47AE-85A0-08A6EC48FAFB}.Debug|x64.Build.0 = Debug|x64 + {AAAD1CB5-7ADA-47AE-85A0-08A6EC48FAFB}.Release|Win32.ActiveCfg = Release|Win32 + {AAAD1CB5-7ADA-47AE-85A0-08A6EC48FAFB}.Release|Win32.Build.0 = Release|Win32 + {AAAD1CB5-7ADA-47AE-85A0-08A6EC48FAFB}.Release|x64.ActiveCfg = Release|x64 + {AAAD1CB5-7ADA-47AE-85A0-08A6EC48FAFB}.Release|x64.Build.0 = Release|x64 + {26932B24-EFC6-4E3A-B277-ED653DA37968}.Debug|Win32.ActiveCfg = Debug|Win32 + {26932B24-EFC6-4E3A-B277-ED653DA37968}.Debug|Win32.Build.0 = Debug|Win32 + {26932B24-EFC6-4E3A-B277-ED653DA37968}.Debug|x64.ActiveCfg = Debug|x64 + {26932B24-EFC6-4E3A-B277-ED653DA37968}.Debug|x64.Build.0 = Debug|x64 + {26932B24-EFC6-4E3A-B277-ED653DA37968}.Release|Win32.ActiveCfg = Release|Win32 + {26932B24-EFC6-4E3A-B277-ED653DA37968}.Release|Win32.Build.0 = Release|Win32 + {26932B24-EFC6-4E3A-B277-ED653DA37968}.Release|x64.ActiveCfg = Release|x64 + {26932B24-EFC6-4E3A-B277-ED653DA37968}.Release|x64.Build.0 = Release|x64 + {CAE4F1D0-314F-4B10-805B-0EFD670133A0}.Debug|Win32.ActiveCfg = Debug|Win32 + {CAE4F1D0-314F-4B10-805B-0EFD670133A0}.Debug|Win32.Build.0 = Debug|Win32 + {CAE4F1D0-314F-4B10-805B-0EFD670133A0}.Debug|x64.ActiveCfg = Debug|x64 + {CAE4F1D0-314F-4B10-805B-0EFD670133A0}.Debug|x64.Build.0 = Debug|x64 + {CAE4F1D0-314F-4B10-805B-0EFD670133A0}.Release|Win32.ActiveCfg = Release|Win32 + {CAE4F1D0-314F-4B10-805B-0EFD670133A0}.Release|Win32.Build.0 = Release|Win32 + {CAE4F1D0-314F-4B10-805B-0EFD670133A0}.Release|x64.ActiveCfg = Release|x64 + {CAE4F1D0-314F-4B10-805B-0EFD670133A0}.Release|x64.Build.0 = Release|x64 + {8B5CFB38-CCBA-40A8-AD7A-89C57B070884}.Debug|Win32.ActiveCfg = Debug|Win32 + {8B5CFB38-CCBA-40A8-AD7A-89C57B070884}.Debug|Win32.Build.0 = Debug|Win32 + {8B5CFB38-CCBA-40A8-AD7A-89C57B070884}.Debug|x64.ActiveCfg = Debug|x64 + {8B5CFB38-CCBA-40A8-AD7A-89C57B070884}.Debug|x64.Build.0 = Debug|x64 + {8B5CFB38-CCBA-40A8-AD7A-89C57B070884}.Release|Win32.ActiveCfg = Release|Win32 + {8B5CFB38-CCBA-40A8-AD7A-89C57B070884}.Release|Win32.Build.0 = Release|Win32 + {8B5CFB38-CCBA-40A8-AD7A-89C57B070884}.Release|x64.ActiveCfg = Release|x64 + {8B5CFB38-CCBA-40A8-AD7A-89C57B070884}.Release|x64.Build.0 = Release|x64 + {26828762-C95D-4637-9CB1-7F0979523813}.Debug|Win32.ActiveCfg = Debug|Win32 + {26828762-C95D-4637-9CB1-7F0979523813}.Debug|Win32.Build.0 = Debug|Win32 + {26828762-C95D-4637-9CB1-7F0979523813}.Debug|x64.ActiveCfg = Debug|x64 + {26828762-C95D-4637-9CB1-7F0979523813}.Debug|x64.Build.0 = Debug|x64 + {26828762-C95D-4637-9CB1-7F0979523813}.Release|Win32.ActiveCfg = Release|Win32 + {26828762-C95D-4637-9CB1-7F0979523813}.Release|Win32.Build.0 = Release|Win32 + {26828762-C95D-4637-9CB1-7F0979523813}.Release|x64.ActiveCfg = Release|x64 + {26828762-C95D-4637-9CB1-7F0979523813}.Release|x64.Build.0 = Release|x64 + {40FB7794-D3C3-4CFE-BCF4-A80C96635682}.Debug|Win32.ActiveCfg = Debug|Win32 + {40FB7794-D3C3-4CFE-BCF4-A80C96635682}.Debug|Win32.Build.0 = Debug|Win32 + {40FB7794-D3C3-4CFE-BCF4-A80C96635682}.Debug|x64.ActiveCfg = Debug|x64 + {40FB7794-D3C3-4CFE-BCF4-A80C96635682}.Debug|x64.Build.0 = Debug|x64 + {40FB7794-D3C3-4CFE-BCF4-A80C96635682}.Release|Win32.ActiveCfg = Release|Win32 + {40FB7794-D3C3-4CFE-BCF4-A80C96635682}.Release|Win32.Build.0 = Release|Win32 + {40FB7794-D3C3-4CFE-BCF4-A80C96635682}.Release|x64.ActiveCfg = Release|x64 + {40FB7794-D3C3-4CFE-BCF4-A80C96635682}.Release|x64.Build.0 = Release|x64 + {EDEA9D00-AF64-45DE-8F60-5957048F2F0F}.Debug|Win32.ActiveCfg = Debug|Win32 + {EDEA9D00-AF64-45DE-8F60-5957048F2F0F}.Debug|Win32.Build.0 = Debug|Win32 + {EDEA9D00-AF64-45DE-8F60-5957048F2F0F}.Debug|x64.ActiveCfg = Debug|x64 + {EDEA9D00-AF64-45DE-8F60-5957048F2F0F}.Debug|x64.Build.0 = Debug|x64 + {EDEA9D00-AF64-45DE-8F60-5957048F2F0F}.Release|Win32.ActiveCfg = Release|Win32 + {EDEA9D00-AF64-45DE-8F60-5957048F2F0F}.Release|Win32.Build.0 = Release|Win32 + {EDEA9D00-AF64-45DE-8F60-5957048F2F0F}.Release|x64.ActiveCfg = Release|x64 + {EDEA9D00-AF64-45DE-8F60-5957048F2F0F}.Release|x64.Build.0 = Release|x64 + {8682FE1E-0CF6-4EDD-9BB5-1733D8C8B4DF}.Debug|Win32.ActiveCfg = Debug|Win32 + {8682FE1E-0CF6-4EDD-9BB5-1733D8C8B4DF}.Debug|Win32.Build.0 = Debug|Win32 + {8682FE1E-0CF6-4EDD-9BB5-1733D8C8B4DF}.Debug|x64.ActiveCfg = Debug|x64 + {8682FE1E-0CF6-4EDD-9BB5-1733D8C8B4DF}.Debug|x64.Build.0 = Debug|x64 + {8682FE1E-0CF6-4EDD-9BB5-1733D8C8B4DF}.Release|Win32.ActiveCfg = Release|Win32 + {8682FE1E-0CF6-4EDD-9BB5-1733D8C8B4DF}.Release|Win32.Build.0 = Release|Win32 + {8682FE1E-0CF6-4EDD-9BB5-1733D8C8B4DF}.Release|x64.ActiveCfg = Release|x64 + {8682FE1E-0CF6-4EDD-9BB5-1733D8C8B4DF}.Release|x64.Build.0 = Release|x64 + {C4E04D18-EF76-4B42-B4C2-16A1BACDC0A3}.Debug|Win32.ActiveCfg = Debug|Win32 + {C4E04D18-EF76-4B42-B4C2-16A1BACDC0A3}.Debug|Win32.Build.0 = Debug|Win32 + {C4E04D18-EF76-4B42-B4C2-16A1BACDC0A3}.Debug|x64.ActiveCfg = Debug|x64 + {C4E04D18-EF76-4B42-B4C2-16A1BACDC0A3}.Debug|x64.Build.0 = Debug|x64 + {C4E04D18-EF76-4B42-B4C2-16A1BACDC0A3}.Release|Win32.ActiveCfg = Release|Win32 + {C4E04D18-EF76-4B42-B4C2-16A1BACDC0A3}.Release|Win32.Build.0 = Release|Win32 + {C4E04D18-EF76-4B42-B4C2-16A1BACDC0A3}.Release|x64.ActiveCfg = Release|x64 + {C4E04D18-EF76-4B42-B4C2-16A1BACDC0A3}.Release|x64.Build.0 = Release|x64 + {DA956FD3-E143-46F2-9FE5-C77BEBC56B1A}.Debug|Win32.ActiveCfg = Debug|Win32 + {DA956FD3-E143-46F2-9FE5-C77BEBC56B1A}.Debug|Win32.Build.0 = Debug|Win32 + {DA956FD3-E143-46F2-9FE5-C77BEBC56B1A}.Debug|x64.ActiveCfg = Debug|x64 + {DA956FD3-E143-46F2-9FE5-C77BEBC56B1A}.Debug|x64.Build.0 = Debug|x64 + {DA956FD3-E143-46F2-9FE5-C77BEBC56B1A}.Release|Win32.ActiveCfg = Release|Win32 + {DA956FD3-E143-46F2-9FE5-C77BEBC56B1A}.Release|Win32.Build.0 = Release|Win32 + {DA956FD3-E143-46F2-9FE5-C77BEBC56B1A}.Release|x64.ActiveCfg = Release|x64 + {DA956FD3-E143-46F2-9FE5-C77BEBC56B1A}.Release|x64.Build.0 = Release|x64 + {FEE710DB-EC7B-4CCB-BD75-535D401A2FE0}.Debug|Win32.ActiveCfg = Debug|Win32 + {FEE710DB-EC7B-4CCB-BD75-535D401A2FE0}.Debug|Win32.Build.0 = Debug|Win32 + {FEE710DB-EC7B-4CCB-BD75-535D401A2FE0}.Debug|x64.ActiveCfg = Debug|x64 + {FEE710DB-EC7B-4CCB-BD75-535D401A2FE0}.Debug|x64.Build.0 = Debug|x64 + {FEE710DB-EC7B-4CCB-BD75-535D401A2FE0}.Release|Win32.ActiveCfg = Release|Win32 + {FEE710DB-EC7B-4CCB-BD75-535D401A2FE0}.Release|Win32.Build.0 = Release|Win32 + {FEE710DB-EC7B-4CCB-BD75-535D401A2FE0}.Release|x64.ActiveCfg = Release|x64 + {FEE710DB-EC7B-4CCB-BD75-535D401A2FE0}.Release|x64.Build.0 = Release|x64 + {2271060E-98B4-4596-8172-A041E4B2EC7A}.Debug|Win32.ActiveCfg = Debug|Win32 + {2271060E-98B4-4596-8172-A041E4B2EC7A}.Debug|Win32.Build.0 = Debug|Win32 + {2271060E-98B4-4596-8172-A041E4B2EC7A}.Debug|x64.ActiveCfg = Debug|Win32 + {2271060E-98B4-4596-8172-A041E4B2EC7A}.Release|Win32.ActiveCfg = Release|Win32 + {2271060E-98B4-4596-8172-A041E4B2EC7A}.Release|Win32.Build.0 = Release|Win32 + {2271060E-98B4-4596-8172-A041E4B2EC7A}.Release|x64.ActiveCfg = Release|Win32 + {E7A6C41C-E059-4C9C-8CCC-73586A540B62}.Debug|Win32.ActiveCfg = Debug|Win32 + {E7A6C41C-E059-4C9C-8CCC-73586A540B62}.Debug|Win32.Build.0 = Debug|Win32 + {E7A6C41C-E059-4C9C-8CCC-73586A540B62}.Debug|x64.ActiveCfg = Debug|x64 + {E7A6C41C-E059-4C9C-8CCC-73586A540B62}.Debug|x64.Build.0 = Debug|x64 + {E7A6C41C-E059-4C9C-8CCC-73586A540B62}.Release|Win32.ActiveCfg = Release|Win32 + {E7A6C41C-E059-4C9C-8CCC-73586A540B62}.Release|Win32.Build.0 = Release|Win32 + {E7A6C41C-E059-4C9C-8CCC-73586A540B62}.Release|x64.ActiveCfg = Release|x64 + {E7A6C41C-E059-4C9C-8CCC-73586A540B62}.Release|x64.Build.0 = Release|x64 + {43A06713-A52D-4008-AD7E-A69DF3FCFFA8}.Debug|Win32.ActiveCfg = Debug|Win32 + {43A06713-A52D-4008-AD7E-A69DF3FCFFA8}.Debug|Win32.Build.0 = Debug|Win32 + {43A06713-A52D-4008-AD7E-A69DF3FCFFA8}.Debug|x64.ActiveCfg = Debug|x64 + {43A06713-A52D-4008-AD7E-A69DF3FCFFA8}.Debug|x64.Build.0 = Debug|x64 + {43A06713-A52D-4008-AD7E-A69DF3FCFFA8}.Release|Win32.ActiveCfg = Release|Win32 + {43A06713-A52D-4008-AD7E-A69DF3FCFFA8}.Release|Win32.Build.0 = Release|Win32 + {43A06713-A52D-4008-AD7E-A69DF3FCFFA8}.Release|x64.ActiveCfg = Release|x64 + {43A06713-A52D-4008-AD7E-A69DF3FCFFA8}.Release|x64.Build.0 = Release|x64 + EndGlobalSection + GlobalSection(SolutionProperties) = preSolution + HideSolutionNode = FALSE + EndGlobalSection +EndGlobal diff --git a/VisualC/SDL_VS2012EE.sln b/VisualC/SDL_VS2012EE.sln new file mode 100644 index 000000000..816fdcd4f --- /dev/null +++ b/VisualC/SDL_VS2012EE.sln @@ -0,0 +1,213 @@ + +Microsoft Visual Studio Solution File, Format Version 12.00 +# Visual Studio 2012 +Project("{8BC9CEB8-8B4A-11D0-8D11-00A0C91BC942}") = "SDL2", "SDL\SDL_VS2012.vcxproj", "{81CE8DAF-EBB2-4761-8E45-B71ABCCA8C68}" +EndProject +Project("{8BC9CEB8-8B4A-11D0-8D11-00A0C91BC942}") = "SDL2main", "SDLmain\SDLmain_VS2012.vcxproj", "{DA956FD3-E142-46F2-9DD5-C78BEBB56B7A}" +EndProject +Project("{8BC9CEB8-8B4A-11D0-8D11-00A0C91BC942}") = "loopwave", "tests\loopwave\loopwave_VS2012.vcxproj", "{AAAD1CB5-7ADA-47AE-85A0-08A6EC48FAFB}" + ProjectSection(ProjectDependencies) = postProject + {81CE8DAF-EBB2-4761-8E45-B71ABCCA8C68} = {81CE8DAF-EBB2-4761-8E45-B71ABCCA8C68} + {DA956FD3-E142-46F2-9DD5-C78BEBB56B7A} = {DA956FD3-E142-46F2-9DD5-C78BEBB56B7A} + EndProjectSection +EndProject +Project("{8BC9CEB8-8B4A-11D0-8D11-00A0C91BC942}") = "testplatform", "tests\testplatform\testplatform_VS2012.vcxproj", "{26932B24-EFC6-4E3A-B277-ED653DA37968}" + ProjectSection(ProjectDependencies) = postProject + {81CE8DAF-EBB2-4761-8E45-B71ABCCA8C68} = {81CE8DAF-EBB2-4761-8E45-B71ABCCA8C68} + {DA956FD3-E142-46F2-9DD5-C78BEBB56B7A} = {DA956FD3-E142-46F2-9DD5-C78BEBB56B7A} + EndProjectSection +EndProject +Project("{8BC9CEB8-8B4A-11D0-8D11-00A0C91BC942}") = "testfile", "tests\testfile\testfile_VS2012.vcxproj", "{CAE4F1D0-314F-4B10-805B-0EFD670133A0}" + ProjectSection(ProjectDependencies) = postProject + {81CE8DAF-EBB2-4761-8E45-B71ABCCA8C68} = {81CE8DAF-EBB2-4761-8E45-B71ABCCA8C68} + {DA956FD3-E142-46F2-9DD5-C78BEBB56B7A} = {DA956FD3-E142-46F2-9DD5-C78BEBB56B7A} + EndProjectSection +EndProject +Project("{8BC9CEB8-8B4A-11D0-8D11-00A0C91BC942}") = "testgl2", "tests\testgl2\testgl2_VS2012.vcxproj", "{8B5CFB38-CCBA-40A8-AD7A-89C57B070884}" + ProjectSection(ProjectDependencies) = postProject + {81CE8DAF-EBB2-4761-8E45-B71ABCCA8C68} = {81CE8DAF-EBB2-4761-8E45-B71ABCCA8C68} + {DA956FD3-E142-46F2-9DD5-C78BEBB56B7A} = {DA956FD3-E142-46F2-9DD5-C78BEBB56B7A} + {DA956FD3-E143-46F2-9FE5-C77BEBC56B1A} = {DA956FD3-E143-46F2-9FE5-C77BEBC56B1A} + EndProjectSection +EndProject +Project("{8BC9CEB8-8B4A-11D0-8D11-00A0C91BC942}") = "checkkeys", "tests\checkkeys\checkkeys_VS2012.vcxproj", "{26828762-C95D-4637-9CB1-7F0979523813}" + ProjectSection(ProjectDependencies) = postProject + {81CE8DAF-EBB2-4761-8E45-B71ABCCA8C68} = {81CE8DAF-EBB2-4761-8E45-B71ABCCA8C68} + {DA956FD3-E142-46F2-9DD5-C78BEBB56B7A} = {DA956FD3-E142-46F2-9DD5-C78BEBB56B7A} + EndProjectSection +EndProject +Project("{8BC9CEB8-8B4A-11D0-8D11-00A0C91BC942}") = "testsprite2", "tests\testsprite2\testsprite2_VS2012.vcxproj", "{40FB7794-D3C3-4CFE-BCF4-A80C96635682}" + ProjectSection(ProjectDependencies) = postProject + {81CE8DAF-EBB2-4761-8E45-B71ABCCA8C68} = {81CE8DAF-EBB2-4761-8E45-B71ABCCA8C68} + {DA956FD3-E142-46F2-9DD5-C78BEBB56B7A} = {DA956FD3-E142-46F2-9DD5-C78BEBB56B7A} + {DA956FD3-E143-46F2-9FE5-C77BEBC56B1A} = {DA956FD3-E143-46F2-9FE5-C77BEBC56B1A} + EndProjectSection +EndProject +Project("{8BC9CEB8-8B4A-11D0-8D11-00A0C91BC942}") = "testshape", "tests\testshape\testshape_VS2012.vcxproj", "{EDEA9D00-AF64-45DE-8F60-5957048F2F0F}" + ProjectSection(ProjectDependencies) = postProject + {81CE8DAF-EBB2-4761-8E45-B71ABCCA8C68} = {81CE8DAF-EBB2-4761-8E45-B71ABCCA8C68} + {DA956FD3-E142-46F2-9DD5-C78BEBB56B7A} = {DA956FD3-E142-46F2-9DD5-C78BEBB56B7A} + EndProjectSection +EndProject +Project("{8BC9CEB8-8B4A-11D0-8D11-00A0C91BC942}") = "testdraw2", "tests\testdraw2\testdraw2_VS2012.vcxproj", "{8682FE1E-0CF6-4EDD-9BB5-1733D8C8B4DF}" + ProjectSection(ProjectDependencies) = postProject + {81CE8DAF-EBB2-4761-8E45-B71ABCCA8C68} = {81CE8DAF-EBB2-4761-8E45-B71ABCCA8C68} + {DA956FD3-E142-46F2-9DD5-C78BEBB56B7A} = {DA956FD3-E142-46F2-9DD5-C78BEBB56B7A} + {DA956FD3-E143-46F2-9FE5-C77BEBC56B1A} = {DA956FD3-E143-46F2-9FE5-C77BEBC56B1A} + EndProjectSection +EndProject +Project("{8BC9CEB8-8B4A-11D0-8D11-00A0C91BC942}") = "testpower", "tests\testpower\testpower_VS2012.vcxproj", "{C4E04D18-EF76-4B42-B4C2-16A1BACDC0A3}" + ProjectSection(ProjectDependencies) = postProject + {81CE8DAF-EBB2-4761-8E45-B71ABCCA8C68} = {81CE8DAF-EBB2-4761-8E45-B71ABCCA8C68} + {DA956FD3-E142-46F2-9DD5-C78BEBB56B7A} = {DA956FD3-E142-46F2-9DD5-C78BEBB56B7A} + EndProjectSection +EndProject +Project("{8BC9CEB8-8B4A-11D0-8D11-00A0C91BC942}") = "SDL2test", "SDLtest\SDLtest_VS2012.vcxproj", "{DA956FD3-E143-46F2-9FE5-C77BEBC56B1A}" + ProjectSection(ProjectDependencies) = postProject + {81CE8DAF-EBB2-4761-8E45-B71ABCCA8C68} = {81CE8DAF-EBB2-4761-8E45-B71ABCCA8C68} + EndProjectSection +EndProject +Project("{8BC9CEB8-8B4A-11D0-8D11-00A0C91BC942}") = "testautomation", "tests\testautomation\testautomation_vs2012.vcxproj", "{FEE710DB-EC7B-4CCB-BD75-535D401A2FE0}" + ProjectSection(ProjectDependencies) = postProject + {81CE8DAF-EBB2-4761-8E45-B71ABCCA8C68} = {81CE8DAF-EBB2-4761-8E45-B71ABCCA8C68} + {DA956FD3-E142-46F2-9DD5-C78BEBB56B7A} = {DA956FD3-E142-46F2-9DD5-C78BEBB56B7A} + {DA956FD3-E143-46F2-9FE5-C77BEBC56B1A} = {DA956FD3-E143-46F2-9FE5-C77BEBC56B1A} + EndProjectSection +EndProject +Project("{8BC9CEB8-8B4A-11D0-8D11-00A0C91BC942}") = "testatomic", "tests\testatomic\testatomic_VS2012.vcxproj", "{2271060E-98B4-4596-8172-A041E4B2EC7A}" +EndProject +Project("{8BC9CEB8-8B4A-11D0-8D11-00A0C91BC942}") = "testscale", "tests\testscale\testscale_VS2012.vcxproj", "{E7A6C41C-E059-4C9C-8CCC-73586A540B62}" +EndProject +Project("{8BC9CEB8-8B4A-11D0-8D11-00A0C91BC942}") = "testrendertarget", "tests\testrendertarget\testrendertarget_VS2012.vcxproj", "{43A06713-A52D-4008-AD7E-A69DF3FCFFA8}" +EndProject +Global + GlobalSection(SolutionConfigurationPlatforms) = preSolution + Debug|Win32 = Debug|Win32 + Debug|x64 = Debug|x64 + Release|Win32 = Release|Win32 + Release|x64 = Release|x64 + EndGlobalSection + GlobalSection(ProjectConfigurationPlatforms) = postSolution + {81CE8DAF-EBB2-4761-8E45-B71ABCCA8C68}.Debug|Win32.ActiveCfg = Debug|Win32 + {81CE8DAF-EBB2-4761-8E45-B71ABCCA8C68}.Debug|Win32.Build.0 = Debug|Win32 + {81CE8DAF-EBB2-4761-8E45-B71ABCCA8C68}.Debug|x64.ActiveCfg = Debug|x64 + {81CE8DAF-EBB2-4761-8E45-B71ABCCA8C68}.Debug|x64.Build.0 = Debug|x64 + {81CE8DAF-EBB2-4761-8E45-B71ABCCA8C68}.Release|Win32.ActiveCfg = Release|Win32 + {81CE8DAF-EBB2-4761-8E45-B71ABCCA8C68}.Release|Win32.Build.0 = Release|Win32 + {81CE8DAF-EBB2-4761-8E45-B71ABCCA8C68}.Release|x64.ActiveCfg = Release|x64 + {81CE8DAF-EBB2-4761-8E45-B71ABCCA8C68}.Release|x64.Build.0 = Release|x64 + {DA956FD3-E142-46F2-9DD5-C78BEBB56B7A}.Debug|Win32.ActiveCfg = Debug|Win32 + {DA956FD3-E142-46F2-9DD5-C78BEBB56B7A}.Debug|Win32.Build.0 = Debug|Win32 + {DA956FD3-E142-46F2-9DD5-C78BEBB56B7A}.Debug|x64.ActiveCfg = Debug|x64 + {DA956FD3-E142-46F2-9DD5-C78BEBB56B7A}.Debug|x64.Build.0 = Debug|x64 + {DA956FD3-E142-46F2-9DD5-C78BEBB56B7A}.Release|Win32.ActiveCfg = Release|Win32 + {DA956FD3-E142-46F2-9DD5-C78BEBB56B7A}.Release|Win32.Build.0 = Release|Win32 + {DA956FD3-E142-46F2-9DD5-C78BEBB56B7A}.Release|x64.ActiveCfg = Release|x64 + {DA956FD3-E142-46F2-9DD5-C78BEBB56B7A}.Release|x64.Build.0 = Release|x64 + {AAAD1CB5-7ADA-47AE-85A0-08A6EC48FAFB}.Debug|Win32.ActiveCfg = Debug|Win32 + {AAAD1CB5-7ADA-47AE-85A0-08A6EC48FAFB}.Debug|Win32.Build.0 = Debug|Win32 + {AAAD1CB5-7ADA-47AE-85A0-08A6EC48FAFB}.Debug|x64.ActiveCfg = Debug|x64 + {AAAD1CB5-7ADA-47AE-85A0-08A6EC48FAFB}.Debug|x64.Build.0 = Debug|x64 + {AAAD1CB5-7ADA-47AE-85A0-08A6EC48FAFB}.Release|Win32.ActiveCfg = Release|Win32 + {AAAD1CB5-7ADA-47AE-85A0-08A6EC48FAFB}.Release|Win32.Build.0 = Release|Win32 + {AAAD1CB5-7ADA-47AE-85A0-08A6EC48FAFB}.Release|x64.ActiveCfg = Release|Win32 + {26932B24-EFC6-4E3A-B277-ED653DA37968}.Debug|Win32.ActiveCfg = Debug|Win32 + {26932B24-EFC6-4E3A-B277-ED653DA37968}.Debug|Win32.Build.0 = Debug|Win32 + {26932B24-EFC6-4E3A-B277-ED653DA37968}.Debug|x64.ActiveCfg = Debug|x64 + {26932B24-EFC6-4E3A-B277-ED653DA37968}.Debug|x64.Build.0 = Debug|x64 + {26932B24-EFC6-4E3A-B277-ED653DA37968}.Release|Win32.ActiveCfg = Release|Win32 + {26932B24-EFC6-4E3A-B277-ED653DA37968}.Release|Win32.Build.0 = Release|Win32 + {26932B24-EFC6-4E3A-B277-ED653DA37968}.Release|x64.ActiveCfg = Release|Win32 + {CAE4F1D0-314F-4B10-805B-0EFD670133A0}.Debug|Win32.ActiveCfg = Debug|Win32 + {CAE4F1D0-314F-4B10-805B-0EFD670133A0}.Debug|Win32.Build.0 = Debug|Win32 + {CAE4F1D0-314F-4B10-805B-0EFD670133A0}.Debug|x64.ActiveCfg = Debug|x64 + {CAE4F1D0-314F-4B10-805B-0EFD670133A0}.Debug|x64.Build.0 = Debug|x64 + {CAE4F1D0-314F-4B10-805B-0EFD670133A0}.Release|Win32.ActiveCfg = Release|Win32 + {CAE4F1D0-314F-4B10-805B-0EFD670133A0}.Release|Win32.Build.0 = Release|Win32 + {CAE4F1D0-314F-4B10-805B-0EFD670133A0}.Release|x64.ActiveCfg = Release|Win32 + {8B5CFB38-CCBA-40A8-AD7A-89C57B070884}.Debug|Win32.ActiveCfg = Debug|Win32 + {8B5CFB38-CCBA-40A8-AD7A-89C57B070884}.Debug|Win32.Build.0 = Debug|Win32 + {8B5CFB38-CCBA-40A8-AD7A-89C57B070884}.Debug|x64.ActiveCfg = Debug|x64 + {8B5CFB38-CCBA-40A8-AD7A-89C57B070884}.Debug|x64.Build.0 = Debug|x64 + {8B5CFB38-CCBA-40A8-AD7A-89C57B070884}.Release|Win32.ActiveCfg = Release|Win32 + {8B5CFB38-CCBA-40A8-AD7A-89C57B070884}.Release|Win32.Build.0 = Release|Win32 + {8B5CFB38-CCBA-40A8-AD7A-89C57B070884}.Release|x64.ActiveCfg = Release|Win32 + {26828762-C95D-4637-9CB1-7F0979523813}.Debug|Win32.ActiveCfg = Debug|Win32 + {26828762-C95D-4637-9CB1-7F0979523813}.Debug|Win32.Build.0 = Debug|Win32 + {26828762-C95D-4637-9CB1-7F0979523813}.Debug|x64.ActiveCfg = Debug|x64 + {26828762-C95D-4637-9CB1-7F0979523813}.Debug|x64.Build.0 = Debug|x64 + {26828762-C95D-4637-9CB1-7F0979523813}.Release|Win32.ActiveCfg = Release|Win32 + {26828762-C95D-4637-9CB1-7F0979523813}.Release|Win32.Build.0 = Release|Win32 + {26828762-C95D-4637-9CB1-7F0979523813}.Release|x64.ActiveCfg = Release|Win32 + {40FB7794-D3C3-4CFE-BCF4-A80C96635682}.Debug|Win32.ActiveCfg = Debug|Win32 + {40FB7794-D3C3-4CFE-BCF4-A80C96635682}.Debug|Win32.Build.0 = Debug|Win32 + {40FB7794-D3C3-4CFE-BCF4-A80C96635682}.Debug|x64.ActiveCfg = Debug|x64 + {40FB7794-D3C3-4CFE-BCF4-A80C96635682}.Debug|x64.Build.0 = Debug|x64 + {40FB7794-D3C3-4CFE-BCF4-A80C96635682}.Release|Win32.ActiveCfg = Release|Win32 + {40FB7794-D3C3-4CFE-BCF4-A80C96635682}.Release|Win32.Build.0 = Release|Win32 + {40FB7794-D3C3-4CFE-BCF4-A80C96635682}.Release|x64.ActiveCfg = Release|Win32 + {EDEA9D00-AF64-45DE-8F60-5957048F2F0F}.Debug|Win32.ActiveCfg = Debug|Win32 + {EDEA9D00-AF64-45DE-8F60-5957048F2F0F}.Debug|Win32.Build.0 = Debug|Win32 + {EDEA9D00-AF64-45DE-8F60-5957048F2F0F}.Debug|x64.ActiveCfg = Debug|x64 + {EDEA9D00-AF64-45DE-8F60-5957048F2F0F}.Debug|x64.Build.0 = Debug|x64 + {EDEA9D00-AF64-45DE-8F60-5957048F2F0F}.Release|Win32.ActiveCfg = Release|Win32 + {EDEA9D00-AF64-45DE-8F60-5957048F2F0F}.Release|x64.ActiveCfg = Release|Win32 + {8682FE1E-0CF6-4EDD-9BB5-1733D8C8B4DF}.Debug|Win32.ActiveCfg = Debug|Win32 + {8682FE1E-0CF6-4EDD-9BB5-1733D8C8B4DF}.Debug|Win32.Build.0 = Debug|Win32 + {8682FE1E-0CF6-4EDD-9BB5-1733D8C8B4DF}.Debug|x64.ActiveCfg = Debug|x64 + {8682FE1E-0CF6-4EDD-9BB5-1733D8C8B4DF}.Debug|x64.Build.0 = Debug|x64 + {8682FE1E-0CF6-4EDD-9BB5-1733D8C8B4DF}.Release|Win32.ActiveCfg = Release|Win32 + {8682FE1E-0CF6-4EDD-9BB5-1733D8C8B4DF}.Release|Win32.Build.0 = Release|Win32 + {8682FE1E-0CF6-4EDD-9BB5-1733D8C8B4DF}.Release|x64.ActiveCfg = Release|Win32 + {C4E04D18-EF76-4B42-B4C2-16A1BACDC0A3}.Debug|Win32.ActiveCfg = Debug|Win32 + {C4E04D18-EF76-4B42-B4C2-16A1BACDC0A3}.Debug|Win32.Build.0 = Debug|Win32 + {C4E04D18-EF76-4B42-B4C2-16A1BACDC0A3}.Debug|x64.ActiveCfg = Debug|x64 + {C4E04D18-EF76-4B42-B4C2-16A1BACDC0A3}.Debug|x64.Build.0 = Debug|x64 + {C4E04D18-EF76-4B42-B4C2-16A1BACDC0A3}.Release|Win32.ActiveCfg = Release|Win32 + {C4E04D18-EF76-4B42-B4C2-16A1BACDC0A3}.Release|Win32.Build.0 = Release|Win32 + {C4E04D18-EF76-4B42-B4C2-16A1BACDC0A3}.Release|x64.ActiveCfg = Release|Win32 + {DA956FD3-E143-46F2-9FE5-C77BEBC56B1A}.Debug|Win32.ActiveCfg = Debug|Win32 + {DA956FD3-E143-46F2-9FE5-C77BEBC56B1A}.Debug|Win32.Build.0 = Debug|Win32 + {DA956FD3-E143-46F2-9FE5-C77BEBC56B1A}.Debug|x64.ActiveCfg = Debug|x64 + {DA956FD3-E143-46F2-9FE5-C77BEBC56B1A}.Debug|x64.Build.0 = Debug|x64 + {DA956FD3-E143-46F2-9FE5-C77BEBC56B1A}.Release|Win32.ActiveCfg = Release|Win32 + {DA956FD3-E143-46F2-9FE5-C77BEBC56B1A}.Release|Win32.Build.0 = Release|Win32 + {DA956FD3-E143-46F2-9FE5-C77BEBC56B1A}.Release|x64.ActiveCfg = Release|x64 + {DA956FD3-E143-46F2-9FE5-C77BEBC56B1A}.Release|x64.Build.0 = Release|x64 + {FEE710DB-EC7B-4CCB-BD75-535D401A2FE0}.Debug|Win32.ActiveCfg = Debug|Win32 + {FEE710DB-EC7B-4CCB-BD75-535D401A2FE0}.Debug|Win32.Build.0 = Debug|Win32 + {FEE710DB-EC7B-4CCB-BD75-535D401A2FE0}.Debug|x64.ActiveCfg = Debug|x64 + {FEE710DB-EC7B-4CCB-BD75-535D401A2FE0}.Debug|x64.Build.0 = Debug|x64 + {FEE710DB-EC7B-4CCB-BD75-535D401A2FE0}.Release|Win32.ActiveCfg = Release|Win32 + {FEE710DB-EC7B-4CCB-BD75-535D401A2FE0}.Release|Win32.Build.0 = Release|Win32 + {FEE710DB-EC7B-4CCB-BD75-535D401A2FE0}.Release|x64.ActiveCfg = Release|x64 + {FEE710DB-EC7B-4CCB-BD75-535D401A2FE0}.Release|x64.Build.0 = Release|x64 + {2271060E-98B4-4596-8172-A041E4B2EC7A}.Debug|Win32.ActiveCfg = Debug|Win32 + {2271060E-98B4-4596-8172-A041E4B2EC7A}.Debug|Win32.Build.0 = Debug|Win32 + {2271060E-98B4-4596-8172-A041E4B2EC7A}.Debug|x64.ActiveCfg = Debug|x64 + {2271060E-98B4-4596-8172-A041E4B2EC7A}.Debug|x64.Build.0 = Debug|x64 + {2271060E-98B4-4596-8172-A041E4B2EC7A}.Release|Win32.ActiveCfg = Release|Win32 + {2271060E-98B4-4596-8172-A041E4B2EC7A}.Release|Win32.Build.0 = Release|Win32 + {2271060E-98B4-4596-8172-A041E4B2EC7A}.Release|x64.ActiveCfg = Release|x64 + {2271060E-98B4-4596-8172-A041E4B2EC7A}.Release|x64.Build.0 = Release|x64 + {E7A6C41C-E059-4C9C-8CCC-73586A540B62}.Debug|Win32.ActiveCfg = Debug|Win32 + {E7A6C41C-E059-4C9C-8CCC-73586A540B62}.Debug|Win32.Build.0 = Debug|Win32 + {E7A6C41C-E059-4C9C-8CCC-73586A540B62}.Debug|x64.ActiveCfg = Debug|x64 + {E7A6C41C-E059-4C9C-8CCC-73586A540B62}.Debug|x64.Build.0 = Debug|x64 + {E7A6C41C-E059-4C9C-8CCC-73586A540B62}.Release|Win32.ActiveCfg = Release|Win32 + {E7A6C41C-E059-4C9C-8CCC-73586A540B62}.Release|Win32.Build.0 = Release|Win32 + {E7A6C41C-E059-4C9C-8CCC-73586A540B62}.Release|x64.ActiveCfg = Release|x64 + {E7A6C41C-E059-4C9C-8CCC-73586A540B62}.Release|x64.Build.0 = Release|x64 + {43A06713-A52D-4008-AD7E-A69DF3FCFFA8}.Debug|Win32.ActiveCfg = Debug|Win32 + {43A06713-A52D-4008-AD7E-A69DF3FCFFA8}.Debug|Win32.Build.0 = Debug|Win32 + {43A06713-A52D-4008-AD7E-A69DF3FCFFA8}.Debug|x64.ActiveCfg = Debug|x64 + {43A06713-A52D-4008-AD7E-A69DF3FCFFA8}.Debug|x64.Build.0 = Debug|x64 + {43A06713-A52D-4008-AD7E-A69DF3FCFFA8}.Release|Win32.ActiveCfg = Release|Win32 + {43A06713-A52D-4008-AD7E-A69DF3FCFFA8}.Release|Win32.Build.0 = Release|Win32 + {43A06713-A52D-4008-AD7E-A69DF3FCFFA8}.Release|x64.ActiveCfg = Release|x64 + {43A06713-A52D-4008-AD7E-A69DF3FCFFA8}.Release|x64.Build.0 = Release|x64 + EndGlobalSection + GlobalSection(SolutionProperties) = preSolution + HideSolutionNode = FALSE + EndGlobalSection +EndGlobal From 7827720b8bf7ebe5fdc3230a9c66240674d139fd Mon Sep 17 00:00:00 2001 From: Andreas Schiffler Date: Sun, 23 Jun 2013 15:00:23 -0700 Subject: [PATCH 232/542] Update testsprite2 for visual testing: user fuzzer and add --iteration parameter to enable deterministic screen end-state --- test/testsprite2.c | 79 ++++++++++++++++++++++++++++++++++------------ 1 file changed, 58 insertions(+), 21 deletions(-) diff --git a/test/testsprite2.c b/test/testsprite2.c index 251a493ee..a4d8aa0d5 100644 --- a/test/testsprite2.c +++ b/test/testsprite2.c @@ -15,6 +15,7 @@ #include #include +#include "SDL_test.h" #include "SDL_test_common.h" #define NUM_SPRITES 100 @@ -33,6 +34,10 @@ static SDL_Rect *velocities; static int sprite_w, sprite_h; static SDL_BlendMode blendMode = SDL_BLENDMODE_BLEND; +/* Number of iterations to move sprites - used for visual tests. */ +/* -1: infinite random moves (default); >=0: enables N deterministic moves */ +static int iterations = -1; + /* Call this instead of exit(), so we can clean up SDL: atexit() is evil. */ static void quit(int rc) @@ -105,7 +110,7 @@ LoadSprite(char *file) void MoveSprites(SDL_Renderer * renderer, SDL_Texture * sprite) { - int i, n; + int i; SDL_Rect viewport, temp; SDL_Rect *position, *velocity; @@ -191,22 +196,38 @@ MoveSprites(SDL_Renderer * renderer, SDL_Texture * sprite) SDL_RenderDrawLine(renderer, viewport.w-sprite_w-2, sprite_h, sprite_w, viewport.h-sprite_h-2); - /* Move the sprite, bounce at the wall, and draw */ - n = 0; + /* Conditionally move the sprites, bounce at the wall */ + if (iterations == -1 || iterations > 0) { + for (i = 0; i < num_sprites; ++i) { + position = &positions[i]; + velocity = &velocities[i]; + position->x += velocity->x; + if ((position->x < 0) || (position->x >= (viewport.w - sprite_w))) { + velocity->x = -velocity->x; + position->x += velocity->x; + } + position->y += velocity->y; + if ((position->y < 0) || (position->y >= (viewport.h - sprite_h))) { + velocity->y = -velocity->y; + position->y += velocity->y; + } + + } + + /* Countdown sprite-move iterations and disable color changes at iteration end - used for visual tests. */ + if (iterations > 0) { + iterations--; + if (iterations == 0) { + cycle_alpha = SDL_FALSE; + cycle_color = SDL_FALSE; + } + } + } + + /* Draw sprites */ for (i = 0; i < num_sprites; ++i) { position = &positions[i]; - velocity = &velocities[i]; - position->x += velocity->x; - if ((position->x < 0) || (position->x >= (viewport.w - sprite_w))) { - velocity->x = -velocity->x; - position->x += velocity->x; - } - position->y += velocity->y; - if ((position->y < 0) || (position->y >= (viewport.h - sprite_h))) { - velocity->y = -velocity->y; - position->y += velocity->y; - } - + /* Blit the sprite onto the screen */ SDL_RenderCopy(renderer, sprite, NULL, position); } @@ -221,6 +242,7 @@ main(int argc, char *argv[]) int i, done; SDL_Event event; Uint32 then, now, frames; + Uint64 seed; /* Initialize parameters */ num_sprites = NUM_SPRITES; @@ -255,6 +277,12 @@ main(int argc, char *argv[]) consumed = 2; } } + } else if (SDL_strcasecmp(argv[i], "--iterations") == 0) { + if (argv[i + 1]) { + iterations = SDL_atoi(argv[i + 1]); + if (iterations < -1) iterations = -1; + consumed = 2; + } } else if (SDL_strcasecmp(argv[i], "--cyclecolor") == 0) { cycle_color = SDL_TRUE; consumed = 1; @@ -268,7 +296,7 @@ main(int argc, char *argv[]) } if (consumed < 0) { fprintf(stderr, - "Usage: %s %s [--blend none|blend|add|mod] [--cyclecolor] [--cyclealpha]\n", + "Usage: %s %s [--blend none|blend|add|mod] [--cyclecolor] [--cyclealpha] [--iterations N]\n", argv[0], SDLTest_CommonUsage(state)); quit(1); } @@ -301,17 +329,26 @@ main(int argc, char *argv[]) fprintf(stderr, "Out of memory!\n"); quit(2); } - srand((unsigned int)time(NULL)); + + /* Position sprites and set their velocities using the fuzzer */ + if (iterations >= 0) { + /* Deterministic seed - used for visual tests */ + seed = (Uint64)iterations; + } else { + /* Pseudo-random seed generated from the time */ + seed = (Uint64)time(NULL); + } + SDLTest_FuzzerInit(seed); for (i = 0; i < num_sprites; ++i) { - positions[i].x = rand() % (state->window_w - sprite_w); - positions[i].y = rand() % (state->window_h - sprite_h); + positions[i].x = SDLTest_RandomIntegerInRange(0, state->window_w - sprite_w); + positions[i].y = SDLTest_RandomIntegerInRange(0, state->window_h - sprite_h); positions[i].w = sprite_w; positions[i].h = sprite_h; velocities[i].x = 0; velocities[i].y = 0; while (!velocities[i].x && !velocities[i].y) { - velocities[i].x = (rand() % (MAX_SPEED * 2 + 1)) - MAX_SPEED; - velocities[i].y = (rand() % (MAX_SPEED * 2 + 1)) - MAX_SPEED; + velocities[i].x = SDLTest_RandomIntegerInRange(-MAX_SPEED, MAX_SPEED); + velocities[i].y = SDLTest_RandomIntegerInRange(-MAX_SPEED, MAX_SPEED); } } From 75894c0d8b3386d28fa9c6f0722317df028d7e86 Mon Sep 17 00:00:00 2001 From: Sam Lantinga Date: Sun, 23 Jun 2013 22:19:38 -0700 Subject: [PATCH 233/542] Updated timer test and fixed performance counter on Mac OS X --- src/timer/unix/SDL_systimer.c | 12 +++++++----- test/testtimer.c | 28 +++++++++++++--------------- 2 files changed, 20 insertions(+), 20 deletions(-) diff --git a/src/timer/unix/SDL_systimer.c b/src/timer/unix/SDL_systimer.c index 514ac2267..7918cde41 100644 --- a/src/timer/unix/SDL_systimer.c +++ b/src/timer/unix/SDL_systimer.c @@ -66,10 +66,10 @@ SDL_StartTicks(void) has_monotonic_time = SDL_TRUE; } else #elif defined(__APPLE__) - start_mach = mach_absolute_time(); kern_return_t ret = mach_timebase_info(&mach_base_info); if (ret == 0) { has_monotonic_time = SDL_TRUE; + start_mach = mach_absolute_time(); } else #endif { @@ -85,12 +85,11 @@ SDL_GetTicks(void) #if HAVE_CLOCK_GETTIME struct timespec now; clock_gettime(CLOCK_MONOTONIC, &now); - ticks = - (now.tv_sec - start_ts.tv_sec) * 1000 + (now.tv_nsec - + ticks = (now.tv_sec - start_ts.tv_sec) * 1000 + (now.tv_nsec - start_ts.tv_nsec) / 1000000; #elif defined(__APPLE__) uint64_t now = mach_absolute_time(); - ticks = (now - start_mach) * mach_base_info.numer / mach_base_info.denom / 1000000; + ticks = (((now - start_mach) * mach_base_info.numer) / mach_base_info.denom) / 1000000; #endif } else { struct timeval now; @@ -136,7 +135,10 @@ SDL_GetPerformanceFrequency(void) #if HAVE_CLOCK_GETTIME return 1000000000; #elif defined(__APPLE__) - return mach_base_info.denom / mach_base_info.numer * 1000000; + Uint64 freq = mach_base_info.numer; + freq *= 1000000000; + freq /= mach_base_info.denom; + return freq; #endif } else { return 1000000; diff --git a/test/testtimer.c b/test/testtimer.c index a98ad6348..87264b19d 100644 --- a/test/testtimer.c +++ b/test/testtimer.c @@ -14,16 +14,6 @@ platform */ -#if 1 /* FIXME: Rework this using the 2.0 API */ -#include -#include "SDL.h" - -int main(int argc, char *argv[]) -{ - printf("FIXME\n"); - return 0; -} -#else #include #include @@ -34,7 +24,7 @@ int main(int argc, char *argv[]) static int ticks = 0; static Uint32 SDLCALL -ticktock(Uint32 interval) +ticktock(Uint32 interval, void *param) { ++ticks; return (interval); @@ -52,6 +42,7 @@ main(int argc, char *argv[]) { int i, desired; SDL_TimerID t1, t2, t3; + Uint32 start32, now32; Uint64 start, now; if (SDL_Init(SDL_INIT_TIMER) < 0) { @@ -67,14 +58,14 @@ main(int argc, char *argv[]) if (desired == 0) { desired = DEFAULT_RESOLUTION; } - SDL_SetTimer(desired, ticktock); + t1 = SDL_AddTimer(desired, ticktock, NULL); /* Wait 10 seconds */ printf("Waiting 10 seconds\n"); SDL_Delay(10 * 1000); /* Stop the timer */ - SDL_SetTimer(0, NULL); + SDL_RemoveTimer(t1); /* Print the results */ if (ticks) { @@ -109,14 +100,21 @@ main(int argc, char *argv[]) start = SDL_GetPerformanceCounter(); for (i = 0; i < 1000000; ++i) { - ticktock(0); + ticktock(0, NULL); } now = SDL_GetPerformanceCounter(); printf("1 million iterations of ticktock took %f ms\n", (double)((now - start)*1000) / SDL_GetPerformanceFrequency()); + printf("Performance counter frequency: %lld\n", SDL_GetPerformanceFrequency()); + start32 = SDL_GetTicks(); + start = SDL_GetPerformanceCounter(); + SDL_Delay(1000); + now = SDL_GetPerformanceCounter(); + now32 = SDL_GetTicks(); + printf("Delay 1 second = %d ms in ticks, %f ms according to performance counter\n", (now32-start32), (double)((now - start)*1000) / SDL_GetPerformanceFrequency()); + SDL_Quit(); return (0); } -#endif /* vi: set ts=4 sw=4 expandtab: */ From eb00bbd7f9d3ea505adfe9ee4cb59ae2a18f427a Mon Sep 17 00:00:00 2001 From: Sam Lantinga Date: Mon, 24 Jun 2013 22:06:50 -0700 Subject: [PATCH 234/542] Better text printing for UTF-8 characters --- test/checkkeys.c | 10 +++++++++- 1 file changed, 9 insertions(+), 1 deletion(-) diff --git a/test/checkkeys.c b/test/checkkeys.c index ff7558d9b..99a7bfce3 100644 --- a/test/checkkeys.c +++ b/test/checkkeys.c @@ -117,7 +117,15 @@ PrintKey(SDL_Keysym * sym, SDL_bool pressed, SDL_bool repeat) static void PrintText(char *text) { - SDL_Log("Text: %s\n", text); + unsigned char *spot, expanded[1024]; + + expanded[0] = '\0'; + for ( spot = text; *spot; ++spot ) + { + size_t length = SDL_strlen(expanded); + SDL_snprintf(expanded + length, sizeof(expanded) - length, "\\x%.2x", *spot); + } + SDL_Log("Text (%s): \"%s%s\"\n", expanded, *text == '"' ? "\\" : "", text); } int From 86e40a29d3e44c2bb4f0c67d8b187a3c7d6fbd8a Mon Sep 17 00:00:00 2001 From: Sam Lantinga Date: Tue, 25 Jun 2013 20:21:31 -0700 Subject: [PATCH 235/542] Fixed bug 1929 - SDL_Texture* from SDL_CreateTexture() causes GL_BindTexture() to segfault Charles Huber If SDL_CreateTexture() takes the !IsSupportedFormat() path it will return a SDL_Texture* with a NULL driverdata member. If you then SDL_GL_BindTexture() this will cause a segfault in GL_BindTexture() when it unconditionally dereferences driverdata. --- src/render/SDL_render.c | 8 +++++--- 1 file changed, 5 insertions(+), 3 deletions(-) diff --git a/src/render/SDL_render.c b/src/render/SDL_render.c index 5167f029d..733760fcc 100644 --- a/src/render/SDL_render.c +++ b/src/render/SDL_render.c @@ -1739,11 +1739,13 @@ int SDL_GL_BindTexture(SDL_Texture *texture, float *texw, float *texh) CHECK_TEXTURE_MAGIC(texture, -1); renderer = texture->renderer; - if (renderer && renderer->GL_BindTexture) { + if (texture->native) { + return SDL_GL_BindTexture(texture->native, texw, texh); + } else if (renderer && renderer->GL_BindTexture) { return renderer->GL_BindTexture(renderer, texture, texw, texh); + } else { + return SDL_Unsupported(); } - - return SDL_Unsupported(); } int SDL_GL_UnbindTexture(SDL_Texture *texture) From bc51b6f62858a2d942f82fea99dae4cb6aed7945 Mon Sep 17 00:00:00 2001 From: Sam Lantinga Date: Thu, 27 Jun 2013 10:59:30 -0700 Subject: [PATCH 236/542] Fixed initializing the haptic system from an XInput joystick Thanks to Franz Schrober for the fix inspiration. --- src/haptic/windows/SDL_syshaptic.c | 81 +++++++++--------------------- 1 file changed, 24 insertions(+), 57 deletions(-) diff --git a/src/haptic/windows/SDL_syshaptic.c b/src/haptic/windows/SDL_syshaptic.c index b567ed7d7..ff2bacb5b 100644 --- a/src/haptic/windows/SDL_syshaptic.c +++ b/src/haptic/windows/SDL_syshaptic.c @@ -53,7 +53,7 @@ struct haptic_hwdata { LPDIRECTINPUTDEVICE8 device; DWORD axes[3]; /* Axes to use. */ - int is_joystick; /* Device is loaded as joystick. */ + SDL_bool is_joystick; /* Device is loaded as joystick. */ Uint8 bXInputHaptic; /* Supports force feedback via XInput. */ Uint8 userid; /* XInput userid index for this joystick */ }; @@ -92,7 +92,8 @@ static int DI_GUIDIsSame(const GUID * a, const GUID * b); static int SDL_SYS_HapticOpenFromInstance(SDL_Haptic * haptic, DIDEVICEINSTANCE instance); static int SDL_SYS_HapticOpenFromDevice8(SDL_Haptic * haptic, - LPDIRECTINPUTDEVICE8 device8); + LPDIRECTINPUTDEVICE8 device8, + SDL_bool is_joystick); static int SDL_SYS_HapticOpenFromXInput(SDL_Haptic * haptic, Uint8 userid); static DWORD DIGetTriggerButton(Uint16 button); static int SDL_SYS_SetDirection(DIEFFECT * effect, SDL_HapticDirection * dir, @@ -342,51 +343,34 @@ SDL_SYS_HapticOpenFromInstance(SDL_Haptic * haptic, DIDEVICEINSTANCE instance) HRESULT ret; int ret2; LPDIRECTINPUTDEVICE8 device; - - /* Allocate the hwdata */ - haptic->hwdata = (struct haptic_hwdata *) - SDL_malloc(sizeof(*haptic->hwdata)); - if (haptic->hwdata == NULL) { - SDL_OutOfMemory(); - goto creat_err; - } - SDL_memset(haptic->hwdata, 0, sizeof(*haptic->hwdata)); + LPDIRECTINPUTDEVICE8 device8; /* Open the device */ ret = IDirectInput8_CreateDevice(dinput, &instance.guidInstance, &device, NULL); if (FAILED(ret)) { DI_SetError("Creating DirectInput device", ret); - goto creat_err; + return -1; } /* Now get the IDirectInputDevice8 interface, instead. */ ret = IDirectInputDevice8_QueryInterface(device, &IID_IDirectInputDevice8, - (LPVOID *) & haptic->hwdata-> - device); + (LPVOID *) &device8); /* Done with the temporary one now. */ IDirectInputDevice8_Release(device); if (FAILED(ret)) { DI_SetError("Querying DirectInput interface", ret); - goto creat_err; + return -1; } - ret2 = SDL_SYS_HapticOpenFromDevice8(haptic, haptic->hwdata->device); + ret2 = SDL_SYS_HapticOpenFromDevice8(haptic, device8, SDL_FALSE); if (ret2 < 0) { - goto query_err; + IDirectInputDevice8_Release(device8); + return -1; } return 0; - - query_err: - IDirectInputDevice8_Release(haptic->hwdata->device); - creat_err: - if (haptic->hwdata != NULL) { - SDL_free(haptic->hwdata); - haptic->hwdata = NULL; - } - return -1; } static int @@ -437,13 +421,21 @@ SDL_SYS_HapticOpenFromXInput(SDL_Haptic * haptic, Uint8 userid) */ static int SDL_SYS_HapticOpenFromDevice8(SDL_Haptic * haptic, - LPDIRECTINPUTDEVICE8 device8) + LPDIRECTINPUTDEVICE8 device8, SDL_bool is_joystick) { HRESULT ret; DIPROPDWORD dipdw; + /* Allocate the hwdata */ + haptic->hwdata = (struct haptic_hwdata *)SDL_malloc(sizeof(*haptic->hwdata)); + if (haptic->hwdata == NULL) { + return SDL_OutOfMemory(); + } + SDL_memset(haptic->hwdata, 0, sizeof(*haptic->hwdata)); + /* We'll use the device8 from now on. */ haptic->hwdata->device = device8; + haptic->hwdata->is_joystick = is_joystick; /* Grab it exclusively to use force feedback stuff. */ ret = IDirectInputDevice8_SetCooperativeLevel(haptic->hwdata->device, @@ -657,49 +649,24 @@ SDL_SYS_HapticOpenFromJoystick(SDL_Haptic * haptic, SDL_Joystick * joystick) if ((SDL_hapticlist[i].bXInputHaptic) && (SDL_hapticlist[i].userid == userid)) { SDL_assert(joystick->hwdata->bXInputHaptic); haptic->index = i; - break; + return SDL_SYS_HapticOpenFromXInput(haptic, SDL_hapticlist[haptic->index].userid); } } } else { for (i=0; ihwdata->InputDevice, - &joy_instance); + idret = IDirectInputDevice8_GetDeviceInfo(joystick->hwdata->InputDevice, &joy_instance); if (FAILED(idret)) { return -1; } if (DI_GUIDIsSame(&SDL_hapticlist[i].instance.guidInstance, &joy_instance.guidInstance)) { haptic->index = i; - break; + return SDL_SYS_HapticOpenFromDevice8(haptic, joystick->hwdata->InputDevice, SDL_TRUE); } } } - if (i >= SDL_numhaptics) { - return -1; - } - - /* Allocate the hwdata */ - haptic->hwdata = (struct haptic_hwdata *) - SDL_malloc(sizeof(*haptic->hwdata)); - if (haptic->hwdata == NULL) { - return SDL_OutOfMemory(); - } - SDL_memset(haptic->hwdata, 0, sizeof(*haptic->hwdata)); - - /* Now open the device. */ - if (!joystick->hwdata->bXInputHaptic) { - ret = SDL_SYS_HapticOpenFromDevice8(haptic, joystick->hwdata->InputDevice); - if (ret < 0) { - return -1; - } - } - - /* It's using the joystick device. */ - haptic->hwdata->is_joystick = 1; - haptic->hwdata->bXInputHaptic = joystick->hwdata->bXInputHaptic; - haptic->hwdata->userid = joystick->hwdata->userid; - - return 0; + /* No match to our haptic list */ + return -1; } From 98cdee1ebcf67cfdbcf34da141f5c634cd4f56ed Mon Sep 17 00:00:00 2001 From: Sam Lantinga Date: Thu, 27 Jun 2013 11:17:48 -0700 Subject: [PATCH 237/542] Fixed warning about unused variable. --- src/haptic/windows/SDL_syshaptic.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/haptic/windows/SDL_syshaptic.c b/src/haptic/windows/SDL_syshaptic.c index ff2bacb5b..ed20841dc 100644 --- a/src/haptic/windows/SDL_syshaptic.c +++ b/src/haptic/windows/SDL_syshaptic.c @@ -637,7 +637,7 @@ SDL_SYS_JoystickSameHaptic(SDL_Haptic * haptic, SDL_Joystick * joystick) int SDL_SYS_HapticOpenFromJoystick(SDL_Haptic * haptic, SDL_Joystick * joystick) { - int i, ret; + int i; HRESULT idret; DIDEVICEINSTANCE joy_instance; joy_instance.dwSize = sizeof(DIDEVICEINSTANCE); From a8055a9808f7d0fbdc79672b5839f57a2f38d140 Mon Sep 17 00:00:00 2001 From: Sam Lantinga Date: Thu, 27 Jun 2013 11:21:37 -0700 Subject: [PATCH 238/542] Fixed bug: SDL2 Xinput joystick axis jumps from positive to negative Franz Schrober Attached is my patch. It ensures that the values are correctly limitted between -32767 and 32767 (otherwise the negator - and the conversion to sint16 would corrupt the result) I am using Motioninjoy (Dualshock 3 Sixaxxis controller on Windows 7) together with a recent SDL2 (post rc1) and noticed with the testjoystick binary that the axis 3 (left analog up/down) jumps when going in down direction from 32257 to -32768. This seems obviously wrong and I have never seen this before. In my games the people are now going backwards before they start to sprint forward when the player actually wants to run as fast as possible backwards. This also happens on the axis 2 (right analog stick up/down) This problem doesn't happen in DX mode --- src/joystick/windows/SDL_dxjoystick.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/src/joystick/windows/SDL_dxjoystick.c b/src/joystick/windows/SDL_dxjoystick.c index 7a61947f2..5a832abd8 100644 --- a/src/joystick/windows/SDL_dxjoystick.c +++ b/src/joystick/windows/SDL_dxjoystick.c @@ -1507,9 +1507,9 @@ SDL_SYS_JoystickUpdate_XInput(SDL_Joystick * joystick) XINPUT_STATE_EX *pXInputStatePrev = &joystick->hwdata->XInputState[joystick->hwdata->currentXInputSlot ^ 1]; SDL_PrivateJoystickAxis( joystick, 0, (Sint16)pXInputState->Gamepad.sThumbLX ); - SDL_PrivateJoystickAxis( joystick, 1, (Sint16)(-pXInputState->Gamepad.sThumbLY) ); + SDL_PrivateJoystickAxis( joystick, 1, (Sint16)(-SDL_max(-32767, pXInputState->Gamepad.sThumbLY)) ); SDL_PrivateJoystickAxis( joystick, 2, (Sint16)pXInputState->Gamepad.sThumbRX ); - SDL_PrivateJoystickAxis( joystick, 3, (Sint16)(-pXInputState->Gamepad.sThumbRY) ); + SDL_PrivateJoystickAxis( joystick, 3, (Sint16)(-SDL_max(-32767, pXInputState->Gamepad.sThumbRY)) ); SDL_PrivateJoystickAxis( joystick, 4, (Sint16)(((int)pXInputState->Gamepad.bLeftTrigger*65535/255) - 32768)); SDL_PrivateJoystickAxis( joystick, 5, (Sint16)(((int)pXInputState->Gamepad.bRightTrigger*65535/255) - 32768)); From 54060becd30ac2a87b69bd0a825b6d88bb05dee8 Mon Sep 17 00:00:00 2001 From: Sam Lantinga Date: Thu, 27 Jun 2013 11:27:19 -0700 Subject: [PATCH 239/542] Fixed bug updating the clip rect for the software renderer --- src/render/software/SDL_render_sw.c | 14 +++++++++----- 1 file changed, 9 insertions(+), 5 deletions(-) diff --git a/src/render/software/SDL_render_sw.c b/src/render/software/SDL_render_sw.c index b7f2b1798..f1feee307 100644 --- a/src/render/software/SDL_render_sw.c +++ b/src/render/software/SDL_render_sw.c @@ -118,6 +118,7 @@ SW_ActivateRenderer(SDL_Renderer * renderer) renderer->viewport.h = surface->h; SW_UpdateViewport(renderer); + SW_UpdateClipRect(renderer); } } return data->surface; @@ -346,13 +347,16 @@ SW_UpdateViewport(SDL_Renderer * renderer) static int SW_UpdateClipRect(SDL_Renderer * renderer) { + SW_RenderData *data = (SW_RenderData *) renderer->driverdata; + SDL_Surface *surface = data->surface; const SDL_Rect *rect = &renderer->clip_rect; - SDL_Surface* framebuffer = (SDL_Surface *) renderer->driverdata; - if (!SDL_RectEmpty(rect)) { - SDL_SetClipRect(framebuffer, rect); - } else { - SDL_SetClipRect(framebuffer, NULL); + if (surface) { + if (!SDL_RectEmpty(rect)) { + SDL_SetClipRect(surface, rect); + } else { + SDL_SetClipRect(surface, NULL); + } } return 0; } From a61d6e4500182ddbedeae738a076f51bbc51e319 Mon Sep 17 00:00:00 2001 From: Sam Lantinga Date: Thu, 27 Jun 2013 11:44:07 -0700 Subject: [PATCH 240/542] Updated testshader for the SDL 2.0 API --- test/testshader.c | 38 ++++++++++++++------------------------ 1 file changed, 14 insertions(+), 24 deletions(-) diff --git a/test/testshader.c b/test/testshader.c index c555335d2..2418dbe3f 100644 --- a/test/testshader.c +++ b/test/testshader.c @@ -11,15 +11,6 @@ */ /* This is a simple example of using GLSL shaders with SDL */ -#if 1 /* FIXME: Rework this using the 2.0 API */ -#include - -int main(int argc, char *argv[]) -{ - printf("FIXME\n"); - return 0; -} -#else #include "SDL.h" #ifdef HAVE_OPENGL @@ -315,11 +306,8 @@ SDL_GL_LoadTexture(SDL_Surface * surface, GLfloat * texcoord) } /* Save the alpha blending attributes */ - saved_flags = surface->flags & (SDL_SRCALPHA | SDL_RLEACCELOK); SDL_GetSurfaceAlphaMod(surface, &saved_alpha); - if ((saved_flags & SDL_SRCALPHA) == SDL_SRCALPHA) { - SDL_SetAlpha(surface, 0, 0); - } + SDL_SetSurfaceAlphaMod(surface, SDL_ALPHA_OPAQUE); /* Copy the surface into the GL texture image */ area.x = 0; @@ -329,9 +317,7 @@ SDL_GL_LoadTexture(SDL_Surface * surface, GLfloat * texcoord) SDL_BlitSurface(surface, &area, image, &area); /* Restore the alpha blending attributes */ - if ((saved_flags & SDL_SRCALPHA) == SDL_SRCALPHA) { - SDL_SetAlpha(surface, saved_flags, saved_alpha); - } + SDL_SetSurfaceAlphaMod(surface, saved_alpha); /* Create an OpenGL texture for the image */ glGenTextures(1, &texture); @@ -368,7 +354,7 @@ void InitGL(int Width, int Height) // We call this right afte } /* The main drawing function. */ -void DrawGLScene(GLuint texture, GLfloat * texcoord) +void DrawGLScene(SDL_Window *window, GLuint texture, GLfloat * texcoord) { /* Texture coordinate lookup, to make it simple */ enum { @@ -425,12 +411,13 @@ void DrawGLScene(GLuint texture, GLfloat * texcoord) glDisable(GL_TEXTURE_2D); // swap buffers to display, since we're double buffered. - SDL_GL_SwapBuffers(); + SDL_GL_SwapWindow(window); } int main(int argc, char **argv) { int done; + SDL_Window *window; SDL_Surface *surface; GLuint texture; GLfloat texcoords[4]; @@ -442,14 +429,18 @@ int main(int argc, char **argv) } /* Create a 640x480 OpenGL screen */ - if ( SDL_SetVideoMode(640, 480, 0, SDL_OPENGL) == NULL ) { - fprintf(stderr, "Unable to create OpenGL screen: %s\n", SDL_GetError()); + window = SDL_CreateWindow( "Shader Demo", SDL_WINDOWPOS_CENTERED, SDL_WINDOWPOS_CENTERED, 640, 480, SDL_WINDOW_OPENGL ); + if ( !window ) { + fprintf(stderr, "Unable to create OpenGL window: %s\n", SDL_GetError()); SDL_Quit(); exit(2); } - /* Set the title bar in environments that support it */ - SDL_WM_SetCaption("Shader Demo", NULL); + if ( !SDL_GL_CreateContext(window)) { + fprintf(stderr, "Unable to create OpenGL context: %s\n", SDL_GetError()); + SDL_Quit(); + exit(2); + } surface = SDL_LoadBMP("icon.bmp"); if ( ! surface ) { @@ -469,7 +460,7 @@ int main(int argc, char **argv) } done = 0; while ( ! done ) { - DrawGLScene(texture, texcoords); + DrawGLScene(window, texture, texcoords); /* This could go in a separate function */ { SDL_Event event; @@ -503,6 +494,5 @@ main(int argc, char *argv[]) } #endif /* HAVE_OPENGL */ -#endif /* vi: set ts=4 sw=4 expandtab: */ From 1b4d1f20c183b2a58284fb6eb639bcea295f0988 Mon Sep 17 00:00:00 2001 From: Sam Lantinga Date: Thu, 27 Jun 2013 11:49:19 -0700 Subject: [PATCH 241/542] We don't want to save the alpha modulation, we want to save the blend mode. --- test/testshader.c | 9 ++++----- 1 file changed, 4 insertions(+), 5 deletions(-) diff --git a/test/testshader.c b/test/testshader.c index 2418dbe3f..4aabd5d65 100644 --- a/test/testshader.c +++ b/test/testshader.c @@ -281,8 +281,7 @@ SDL_GL_LoadTexture(SDL_Surface * surface, GLfloat * texcoord) int w, h; SDL_Surface *image; SDL_Rect area; - Uint32 saved_flags; - Uint8 saved_alpha; + SDL_BlendMode saved_mode; /* Use the surface width and height expanded to powers of 2 */ w = power_of_two(surface->w); @@ -306,8 +305,8 @@ SDL_GL_LoadTexture(SDL_Surface * surface, GLfloat * texcoord) } /* Save the alpha blending attributes */ - SDL_GetSurfaceAlphaMod(surface, &saved_alpha); - SDL_SetSurfaceAlphaMod(surface, SDL_ALPHA_OPAQUE); + SDL_GetSurfaceBlendMode(surface, &saved_mode); + SDL_SetSurfaceBlendMode(surface, SDL_BLENDMODE_NONE); /* Copy the surface into the GL texture image */ area.x = 0; @@ -317,7 +316,7 @@ SDL_GL_LoadTexture(SDL_Surface * surface, GLfloat * texcoord) SDL_BlitSurface(surface, &area, image, &area); /* Restore the alpha blending attributes */ - SDL_SetSurfaceAlphaMod(surface, saved_alpha); + SDL_SetSurfaceBlendMode(surface, saved_mode); /* Create an OpenGL texture for the image */ glGenTextures(1, &texture); From a7879829ef256b962b7dcb8b2925f501dbfdb901 Mon Sep 17 00:00:00 2001 From: Sam Lantinga Date: Thu, 27 Jun 2013 16:32:45 -0700 Subject: [PATCH 242/542] Added game controller support for an older XBox Controller --- src/joystick/SDL_gamecontroller.c | 1 + 1 file changed, 1 insertion(+) diff --git a/src/joystick/SDL_gamecontroller.c b/src/joystick/SDL_gamecontroller.c index a9845c016..0826c530e 100644 --- a/src/joystick/SDL_gamecontroller.c +++ b/src/joystick/SDL_gamecontroller.c @@ -108,6 +108,7 @@ const char *s_ControllerMappings [] = "6d0400000000000018c2000000000000,Logitech Rumble Gamepad F510(DInput),a:b1,b:b2,y:b3,x:b0,start:b9,back:b8,leftstick:b10,rightstick:b11,leftshoulder:b4,rightshoulder:b5,dpup:h0.1,dpleft:h0.8,dpdown:h0.4,dpright:h0.2,leftx:a0,rightx:a2,lefty:a1,righty:a3,lefttrigger:b6,righttrigger:b7,", #elif defined(__LINUX__) "030000005e0400008e02000014010000,X360 Controller,a:b0,b:b1,y:b3,x:b2,start:b7,guide:b8,back:b6,dpup:h0.1,dpleft:h0.8,dpdown:h0.4,dpright:h0.2,leftshoulder:b4,rightshoulder:b5,leftstick:b9,rightstick:b10,leftx:a0,lefty:a1,rightx:a3,righty:a4,lefttrigger:a2,righttrigger:a5", + "030000005e0400008e02000010010000,X360 Controller,a:b0,b:b1,y:b3,x:b2,start:b7,guide:b8,back:b6,dpup:h0.1,dpleft:h0.8,dpdown:h0.4,dpright:h0.2,leftshoulder:b4,rightshoulder:b5,leftstick:b9,rightstick:b10,leftx:a0,lefty:a1,rightx:a3,righty:a4,lefttrigger:a2,righttrigger:a5", "030000005e0400008e02000010010000,X360 Controller,a:b0,b:b1,y:b3,x:b2,start:b7,guide:b8,back:b6,leftstick:b9,rightstick:b10,leftshoulder:b4,rightshoulder:b5,dpup:h0.1,dpleft:h0.8,dpdown:h0.4,dpright:h0.2,leftx:a0,lefty:a1,rightx:a3,righty:a4,lefttrigger:a2,righttrigger:a5,", "030000005e0400001907000000010000,X360 Wireless Controller,a:b0,b:b1,y:b3,x:b2,start:b7,guide:b8,back:b6,leftstick:b9,rightstick:b10,leftshoulder:b4,rightshoulder:b5,dpup:b13,dpleft:b11,dpdown:b14,dpright:b12,leftx:a0,lefty:a1,rightx:a3,righty:a4,lefttrigger:a2,righttrigger:a5,", "030000004c0500006802000011010000,PS3 Controller,a:b14,b:b13,x:b15,y:b12,start:b3,guide:b16,back:b0,leftstick:b1,rightstick:b2,leftshoulder:b10,rightshoulder:b11,dpup:b4,dpleft:b7,dpdown:b6,dpright:b5,leftx:a0,lefty:a1,rightx:a2,righty:a3,lefttrigger:b8,righttrigger:b9", From f72a821566bfefab7e79a22d792f4697b1404259 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?J=C3=B8rgen=20P=2E=20Tjern=C3=B8?= Date: Thu, 27 Jun 2013 17:07:18 -0700 Subject: [PATCH 243/542] sdl - added comment with URL to windows scancode definition document --HG-- extra : histedit_source : f915f6603661ea4190976914f4e6cdbe9bb66c01 --- src/events/scancodes_windows.h | 2 ++ 1 file changed, 2 insertions(+) diff --git a/src/events/scancodes_windows.h b/src/events/scancodes_windows.h index 7bf69b0ad..221d1cfcf 100644 --- a/src/events/scancodes_windows.h +++ b/src/events/scancodes_windows.h @@ -21,6 +21,8 @@ #include "../../include/SDL_scancode.h" /* Windows scancode to SDL scancode mapping table */ +/* derived from Microsoft scan code document, http://download.microsoft.com/download/1/6/1/161ba512-40e2-4cc9-843a-923143f3456c/scancode.doc */ + /* *INDENT-OFF* */ static const SDL_Scancode windows_scancode_table[] = { From b066315e36765a8272998103faa0165f02766fba Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?J=C3=B8rgen=20P=2E=20Tjern=C3=B8?= Date: Thu, 27 Jun 2013 17:07:24 -0700 Subject: [PATCH 244/542] Remove / update references to 1.2. --HG-- extra : histedit_source : 374adabd4332afcb1a85517ef8b82fe997f830c1 --- Xcode/SDL/pkg-support/SDL.info | 2 +- include/SDL_hints.h | 6 +++--- include/doxyfile | 6 +++--- 3 files changed, 7 insertions(+), 7 deletions(-) diff --git a/Xcode/SDL/pkg-support/SDL.info b/Xcode/SDL/pkg-support/SDL.info index ca37a7f16..f08facd23 100755 --- a/Xcode/SDL/pkg-support/SDL.info +++ b/Xcode/SDL/pkg-support/SDL.info @@ -1,4 +1,4 @@ -Title SDL 1.2.8 +Title SDL 2.0.0 Version 1 Description SDL Library for Mac OS X (http://www.libsdl.org) DefaultLocation /Library/Frameworks diff --git a/include/SDL_hints.h b/include/SDL_hints.h index e38a577bd..ac6bf4cff 100644 --- a/include/SDL_hints.h +++ b/include/SDL_hints.h @@ -48,9 +48,9 @@ extern "C" { #endif /** - * \brief A variable controlling how 3D acceleration is used to accelerate the SDL 1.2 screen surface. + * \brief A variable controlling how 3D acceleration is used to accelerate the SDL screen surface. * - * SDL can try to accelerate the SDL 1.2 screen surface by using streaming + * SDL can try to accelerate the SDL screen surface by using streaming * textures with a 3D rendering engine. This variable controls whether and * how this is done. * @@ -107,7 +107,7 @@ extern "C" { #define SDL_HINT_RENDER_SCALE_QUALITY "SDL_RENDER_SCALE_QUALITY" /** - * \brief A variable controlling whether updates to the SDL 1.2 screen surface should be synchronized with the vertical refresh, to avoid tearing. + * \brief A variable controlling whether updates to the SDL screen surface should be synchronized with the vertical refresh, to avoid tearing. * * This variable can be set to the following values: * "0" - Disable vsync diff --git a/include/doxyfile b/include/doxyfile index 3da0d56e8..495dbc19b 100644 --- a/include/doxyfile +++ b/include/doxyfile @@ -862,14 +862,14 @@ GENERATE_DOCSET = NO # documentation sets from a single provider (such as a company or product suite) # can be grouped. -DOCSET_FEEDNAME = "SDL 1.2 Doxygen" +DOCSET_FEEDNAME = "SDL 2.0 Doxygen" # When GENERATE_DOCSET tag is set to YES, this tag specifies a string that # should uniquely identify the documentation set bundle. This should be a # reverse domain-name style string, e.g. com.mycompany.MyDocSet. Doxygen # will append .docset to the name. -DOCSET_BUNDLE_ID = org.libsdl.sdl12 +DOCSET_BUNDLE_ID = org.libsdl.sdl20 # If the GENERATE_HTMLHELP tag is set to YES, additional index files # will be generated that can be used as input for tools like the @@ -883,7 +883,7 @@ GENERATE_HTMLHELP = NO # can add a path in front of the file if the result should not be # written to the html output directory. -CHM_FILE = ./sdl12.chm +CHM_FILE = ./sdl20.chm # If the GENERATE_HTMLHELP tag is set to YES, the HHC_LOCATION tag can # be used to specify the location (absolute path including file name) of From 9fe349d2135bb382b6f7ee384246c9e8b7dccdf0 Mon Sep 17 00:00:00 2001 From: Sam Lantinga Date: Thu, 27 Jun 2013 17:49:22 -0700 Subject: [PATCH 245/542] Whoops, this controller had already been added. --- src/joystick/SDL_gamecontroller.c | 1 - 1 file changed, 1 deletion(-) diff --git a/src/joystick/SDL_gamecontroller.c b/src/joystick/SDL_gamecontroller.c index 0826c530e..a9845c016 100644 --- a/src/joystick/SDL_gamecontroller.c +++ b/src/joystick/SDL_gamecontroller.c @@ -108,7 +108,6 @@ const char *s_ControllerMappings [] = "6d0400000000000018c2000000000000,Logitech Rumble Gamepad F510(DInput),a:b1,b:b2,y:b3,x:b0,start:b9,back:b8,leftstick:b10,rightstick:b11,leftshoulder:b4,rightshoulder:b5,dpup:h0.1,dpleft:h0.8,dpdown:h0.4,dpright:h0.2,leftx:a0,rightx:a2,lefty:a1,righty:a3,lefttrigger:b6,righttrigger:b7,", #elif defined(__LINUX__) "030000005e0400008e02000014010000,X360 Controller,a:b0,b:b1,y:b3,x:b2,start:b7,guide:b8,back:b6,dpup:h0.1,dpleft:h0.8,dpdown:h0.4,dpright:h0.2,leftshoulder:b4,rightshoulder:b5,leftstick:b9,rightstick:b10,leftx:a0,lefty:a1,rightx:a3,righty:a4,lefttrigger:a2,righttrigger:a5", - "030000005e0400008e02000010010000,X360 Controller,a:b0,b:b1,y:b3,x:b2,start:b7,guide:b8,back:b6,dpup:h0.1,dpleft:h0.8,dpdown:h0.4,dpright:h0.2,leftshoulder:b4,rightshoulder:b5,leftstick:b9,rightstick:b10,leftx:a0,lefty:a1,rightx:a3,righty:a4,lefttrigger:a2,righttrigger:a5", "030000005e0400008e02000010010000,X360 Controller,a:b0,b:b1,y:b3,x:b2,start:b7,guide:b8,back:b6,leftstick:b9,rightstick:b10,leftshoulder:b4,rightshoulder:b5,dpup:h0.1,dpleft:h0.8,dpdown:h0.4,dpright:h0.2,leftx:a0,lefty:a1,rightx:a3,righty:a4,lefttrigger:a2,righttrigger:a5,", "030000005e0400001907000000010000,X360 Wireless Controller,a:b0,b:b1,y:b3,x:b2,start:b7,guide:b8,back:b6,leftstick:b9,rightstick:b10,leftshoulder:b4,rightshoulder:b5,dpup:b13,dpleft:b11,dpdown:b14,dpright:b12,leftx:a0,lefty:a1,rightx:a3,righty:a4,lefttrigger:a2,righttrigger:a5,", "030000004c0500006802000011010000,PS3 Controller,a:b14,b:b13,x:b15,y:b12,start:b3,guide:b16,back:b0,leftstick:b1,rightstick:b2,leftshoulder:b10,rightshoulder:b11,dpup:b4,dpleft:b7,dpdown:b6,dpright:b5,leftx:a0,lefty:a1,rightx:a2,righty:a3,lefttrigger:b8,righttrigger:b9", From d049796b230c1647bde8ef328f47bfa3adf05838 Mon Sep 17 00:00:00 2001 From: Sam Lantinga Date: Fri, 28 Jun 2013 09:52:36 -0700 Subject: [PATCH 246/542] Updated the name of the copyright file --- README.txt | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/README.txt b/README.txt index 5cf8da280..3b86fc198 100644 --- a/README.txt +++ b/README.txt @@ -22,7 +22,7 @@ Go, Guile, Haskell, Java, Lisp, Lua, ML, Objective C, Pascal, Perl, PHP, Pike, Pliant, Python, Ruby, and Smalltalk. This library is distributed under the zlib license, which can be found -in the file "COPYING". +in the file "COPYING.txt". The best way to learn how to use SDL is to check out the header files in the "include" subdirectory and the programs in the "test" subdirectory. From 324a14d847e3229e43d2224d3a0484b5b487028a Mon Sep 17 00:00:00 2001 From: Sam Lantinga Date: Fri, 28 Jun 2013 22:42:10 -0700 Subject: [PATCH 247/542] Added testgamecontroller to the Visual Studio 2012 solution. --- VisualC/SDL_VS2012.sln | 16 ++ .../testgamecontroller_VS2012.vcxproj | 231 ++++++++++++++++++ 2 files changed, 247 insertions(+) create mode 100644 VisualC/tests/testgamecontroller/testgamecontroller_VS2012.vcxproj diff --git a/VisualC/SDL_VS2012.sln b/VisualC/SDL_VS2012.sln index 430b3147c..cd15c6095 100644 --- a/VisualC/SDL_VS2012.sln +++ b/VisualC/SDL_VS2012.sln @@ -82,6 +82,13 @@ Project("{8BC9CEB8-8B4A-11D0-8D11-00A0C91BC942}") = "testscale", "tests\testscal EndProject Project("{8BC9CEB8-8B4A-11D0-8D11-00A0C91BC942}") = "testrendertarget", "tests\testrendertarget\testrendertarget_VS2012.vcxproj", "{43A06713-A52D-4008-AD7E-A69DF3FCFFA8}" EndProject +Project("{8BC9CEB8-8B4A-11D0-8D11-00A0C91BC942}") = "testgamecontroller", "tests\testgamecontroller\testgamecontroller_VS2012.vcxproj", "{55812185-D13C-4022-9C81-32E0F4A08336}" + ProjectSection(ProjectDependencies) = postProject + {81CE8DAF-EBB2-4761-8E45-B71ABCCA8C68} = {81CE8DAF-EBB2-4761-8E45-B71ABCCA8C68} + {DA956FD3-E142-46F2-9DD5-C78BEBB56B7A} = {DA956FD3-E142-46F2-9DD5-C78BEBB56B7A} + {DA956FD3-E143-46F2-9FE5-C77BEBC56B1A} = {DA956FD3-E143-46F2-9FE5-C77BEBC56B1A} + EndProjectSection +EndProject Global GlobalSection(SolutionConfigurationPlatforms) = preSolution Debug|Win32 = Debug|Win32 @@ -208,6 +215,14 @@ Global {43A06713-A52D-4008-AD7E-A69DF3FCFFA8}.Release|Win32.Build.0 = Release|Win32 {43A06713-A52D-4008-AD7E-A69DF3FCFFA8}.Release|x64.ActiveCfg = Release|x64 {43A06713-A52D-4008-AD7E-A69DF3FCFFA8}.Release|x64.Build.0 = Release|x64 + {55812185-D13C-4022-9C81-32E0F4A08336}.Debug|Win32.ActiveCfg = Debug|Win32 + {55812185-D13C-4022-9C81-32E0F4A08336}.Debug|Win32.Build.0 = Debug|Win32 + {55812185-D13C-4022-9C81-32E0F4A08336}.Debug|x64.ActiveCfg = Debug|x64 + {55812185-D13C-4022-9C81-32E0F4A08336}.Debug|x64.Build.0 = Debug|x64 + {55812185-D13C-4022-9C81-32E0F4A08336}.Release|Win32.ActiveCfg = Release|Win32 + {55812185-D13C-4022-9C81-32E0F4A08336}.Release|Win32.Build.0 = Release|Win32 + {55812185-D13C-4022-9C81-32E0F4A08336}.Release|x64.ActiveCfg = Release|x64 + {55812185-D13C-4022-9C81-32E0F4A08336}.Release|x64.Build.0 = Release|x64 EndGlobalSection GlobalSection(SolutionProperties) = preSolution HideSolutionNode = FALSE @@ -226,5 +241,6 @@ Global {2271060E-98B4-4596-8172-A041E4B2EC7A} = {CE748C1F-3C21-4825-AA6A-F895A023F7E7} {E7A6C41C-E059-4C9C-8CCC-73586A540B62} = {CE748C1F-3C21-4825-AA6A-F895A023F7E7} {43A06713-A52D-4008-AD7E-A69DF3FCFFA8} = {CE748C1F-3C21-4825-AA6A-F895A023F7E7} + {55812185-D13C-4022-9C81-32E0F4A08336} = {CE748C1F-3C21-4825-AA6A-F895A023F7E7} EndGlobalSection EndGlobal diff --git a/VisualC/tests/testgamecontroller/testgamecontroller_VS2012.vcxproj b/VisualC/tests/testgamecontroller/testgamecontroller_VS2012.vcxproj new file mode 100644 index 000000000..c832c5937 --- /dev/null +++ b/VisualC/tests/testgamecontroller/testgamecontroller_VS2012.vcxproj @@ -0,0 +1,231 @@ + + + + + Debug + Win32 + + + Debug + x64 + + + Release + Win32 + + + Release + x64 + + + + testgamecontroller + testgamecontroller + {55812185-D13C-4022-9C81-32E0F4A08336} + + + + Application + false + v110 + + + Application + false + MultiByte + v110 + + + Application + false + v110 + + + Application + false + v110 + + + + + + + + + + + + + + + + + + + + + + + <_ProjectFileVersion>10.0.30319.1 + $(Platform)\$(Configuration)\ + $(Platform)\$(Configuration)\ + $(Platform)\$(Configuration)\ + $(Platform)\$(Configuration)\ + false + false + $(Platform)\$(Configuration)\ + $(Platform)\$(Configuration)\ + $(Platform)\$(Configuration)\ + $(Platform)\$(Configuration)\ + true + true + + + + NDEBUG;%(PreprocessorDefinitions) + true + true + Win32 + + + OnlyExplicitInline + ..\..\..\include;%(AdditionalIncludeDirectories) + WIN32;NDEBUG;_WINDOWS;%(PreprocessorDefinitions) + true + MultiThreadedDLL + true + + + Level3 + true + Default + + + NDEBUG;%(PreprocessorDefinitions) + 0x0409 + + + true + Windows + + + copy "$(SolutionDir)\SDL\$(Platform)\$(Configuration)\SDL2.dll" "$(TargetDir)\SDL2.dll" + + + Copy SDL + + + + + NDEBUG;%(PreprocessorDefinitions) + true + true + + + OnlyExplicitInline + ..\..\..\include;%(AdditionalIncludeDirectories) + WIN32;NDEBUG;_WINDOWS;%(PreprocessorDefinitions) + true + MultiThreadedDLL + true + + + Level3 + true + Default + + + NDEBUG;%(PreprocessorDefinitions) + 0x0409 + + + true + Windows + + + copy "$(SolutionDir)\SDL\$(Platform)\$(Configuration)\SDL2.dll" "$(TargetDir)\SDL2.dll" + + + Copy SDL + + + + + _DEBUG;%(PreprocessorDefinitions) + true + true + Win32 + + + Disabled + ..\..\..\include;%(AdditionalIncludeDirectories) + WIN32;_DEBUG;_WINDOWS;%(PreprocessorDefinitions) + MultiThreadedDebugDLL + + + Level3 + true + EditAndContinue + Default + + + _DEBUG;%(PreprocessorDefinitions) + 0x0409 + + + true + true + Windows + + + copy "$(SolutionDir)\SDL\$(Platform)\$(Configuration)\SDL2.dll" "$(TargetDir)\SDL2.dll" + + + Copy SDL + + + + + _DEBUG;%(PreprocessorDefinitions) + true + true + + + Disabled + ..\..\..\include;%(AdditionalIncludeDirectories) + WIN32;_DEBUG;_WINDOWS;%(PreprocessorDefinitions) + MultiThreadedDebugDLL + + + Level3 + true + ProgramDatabase + Default + + + _DEBUG;%(PreprocessorDefinitions) + 0x0409 + + + true + true + Windows + + + copy "$(SolutionDir)\SDL\$(Platform)\$(Configuration)\SDL2.dll" "$(TargetDir)\SDL2.dll" + + + Copy SDL + + + + + + + + + + + + + \ No newline at end of file From 78a7a1b54e1cd9bcdf5e0255d8b805268e21336c Mon Sep 17 00:00:00 2001 From: Sam Lantinga Date: Fri, 28 Jun 2013 22:44:49 -0700 Subject: [PATCH 248/542] Not using SDLmain on Windows is just fine, don't fail the initialization if the program implements WinMain() and then doesn't call SDL_SetMainReady(). This broke Steam's Big Picture game controller support. I also added some more documentation so people know why main() is overridden on various platforms. --- include/SDL_main.h | 28 +++++++++++++++++++++++++--- 1 file changed, 25 insertions(+), 3 deletions(-) diff --git a/include/SDL_main.h b/include/SDL_main.h index 7a766d24c..bbb7e859b 100644 --- a/include/SDL_main.h +++ b/include/SDL_main.h @@ -30,11 +30,33 @@ * Redefine main() on some platforms so that it is called by SDL. */ -#if defined(__WIN32__) || defined(__IPHONEOS__) || defined(__ANDROID__) #ifndef SDL_MAIN_HANDLED +#if defined(__WIN32__) +/* On Windows SDL provides WinMain(), which parses the command line and passes + the arguments to your main function. + + If you provide your own WinMain(), you may define SDL_MAIN_HANDLED + */ +#define SDL_MAIN_AVAILABLE + +#elif defined(__IPHONEOS__) +/* On iOS SDL provides a main function that creates an application delegate + and starts the iOS application run loop. + + See src/video/uikit/SDL_uikitappdelegate.m for more details. + */ #define SDL_MAIN_NEEDED + +#elif defined(__ANDROID__) +/* On Android SDL provides a Java class in SDLActivity.java that is the + main activity entry point. + + See README-android.txt for more details on extending that class. + */ +#define SDL_MAIN_NEEDED + #endif -#endif +#endif /* SDL_MAIN_HANDLED */ #ifdef __cplusplus #define C_LINKAGE "C" @@ -57,7 +79,7 @@ * \endcode */ -#ifdef SDL_MAIN_NEEDED +#if defined(SDL_MAIN_NEEDED) || defined(SDL_MAIN_AVAILABLE) #define main SDL_main #endif From 66328f31b9b927574bdec3f3e45971707074678b Mon Sep 17 00:00:00 2001 From: Sam Lantinga Date: Fri, 28 Jun 2013 22:49:03 -0700 Subject: [PATCH 249/542] Removing old dangerous signal catching code. * None of the supported platforms are hosed if the program crashes without cleaning up the graphics display connection. * It's very likely to be unsafe to call SDL_Quit() at an arbitrary point from an arbitrary thread. * Catching signals can prevent applications from getting correct stack traces from crashes. --- src/SDL_fatal.c | 103 ------------------------------------------------ 1 file changed, 103 deletions(-) diff --git a/src/SDL_fatal.c b/src/SDL_fatal.c index cf19e57e0..6600df506 100644 --- a/src/SDL_fatal.c +++ b/src/SDL_fatal.c @@ -20,108 +20,6 @@ */ #include "SDL_config.h" -/* General fatal signal handling code for SDL */ - -#ifdef HAVE_SIGNAL_H - -#include - -#include "SDL.h" -#include "SDL_fatal.h" - -/* This installs some signal handlers for the more common fatal signals, - so that if the programmer is lazy, the app doesn't die so horribly if - the program crashes. -*/ - -static void -SDL_Parachute(int sig) -{ - signal(sig, SIG_DFL); - SDL_Quit(); - raise(sig); -} - -static const int SDL_fatal_signals[] = { - SIGSEGV, -#ifdef SIGBUS - SIGBUS, -#endif -#ifdef SIGFPE - SIGFPE, -#endif -#ifdef SIGQUIT - SIGQUIT, -#endif - 0 -}; - -void -SDL_InstallParachute(void) -{ - /* Set a handler for any fatal signal not already handled */ - int i; -#ifdef HAVE_SIGACTION - struct sigaction action; - - for (i = 0; SDL_fatal_signals[i]; ++i) { - sigaction(SDL_fatal_signals[i], NULL, &action); - if (action.sa_handler == SIG_DFL) { - action.sa_handler = SDL_Parachute; - sigaction(SDL_fatal_signals[i], &action, NULL); - } - } -#ifdef SIGALRM - /* Set SIGALRM to be ignored -- necessary on Solaris */ - sigaction(SIGALRM, NULL, &action); - if (action.sa_handler == SIG_DFL) { - action.sa_handler = SIG_IGN; - sigaction(SIGALRM, &action, NULL); - } -#endif -#else - void (*ohandler) (int); - - for (i = 0; SDL_fatal_signals[i]; ++i) { - ohandler = signal(SDL_fatal_signals[i], SDL_Parachute); - if (ohandler != SIG_DFL) { - signal(SDL_fatal_signals[i], ohandler); - } - } -#endif /* HAVE_SIGACTION */ - return; -} - -void -SDL_UninstallParachute(void) -{ - /* Remove a handler for any fatal signal handled */ - int i; -#ifdef HAVE_SIGACTION - struct sigaction action; - - for (i = 0; SDL_fatal_signals[i]; ++i) { - sigaction(SDL_fatal_signals[i], NULL, &action); - if (action.sa_handler == SDL_Parachute) { - action.sa_handler = SIG_DFL; - sigaction(SDL_fatal_signals[i], &action, NULL); - } - } -#else - void (*ohandler) (int); - - for (i = 0; SDL_fatal_signals[i]; ++i) { - ohandler = signal(SDL_fatal_signals[i], SIG_DFL); - if (ohandler != SDL_Parachute) { - signal(SDL_fatal_signals[i], ohandler); - } - } -#endif /* HAVE_SIGACTION */ -} - -#else - -/* No signals on this platform, nothing to do.. */ void SDL_InstallParachute(void) @@ -135,5 +33,4 @@ SDL_UninstallParachute(void) return; } -#endif /* HAVE_SIGNAL_H */ /* vi: set ts=4 sw=4 expandtab: */ From 563185f19c92a64028d9375d20dc16303edda4a8 Mon Sep 17 00:00:00 2001 From: Sam Lantinga Date: Fri, 28 Jun 2013 23:29:13 -0700 Subject: [PATCH 250/542] Only check for keyboard focus if the video subsystem was initialized. Check the hint at initialization time, as an optimization. This isn't something we expect the application to change at runtime, and if it is we should add an API for it. --- src/joystick/SDL_joystick.c | 28 +++++++++++++++++++++------- 1 file changed, 21 insertions(+), 7 deletions(-) diff --git a/src/joystick/SDL_joystick.c b/src/joystick/SDL_joystick.c index 375636c65..1f624fd0b 100644 --- a/src/joystick/SDL_joystick.c +++ b/src/joystick/SDL_joystick.c @@ -22,6 +22,7 @@ /* This is the joystick API for Simple DirectMedia Layer */ +#include "SDL.h" #include "SDL_events.h" #include "SDL_sysjoystick.h" #include "SDL_assert.h" @@ -31,17 +32,25 @@ #include "../events/SDL_events_c.h" #endif +static SDL_bool SDL_joystick_allows_background_events = SDL_FALSE; static SDL_Joystick *SDL_joysticks = NULL; static SDL_Joystick *SDL_updating_joystick = NULL; int SDL_JoystickInit(void) { + const char *hint; int status; + + /* Check to see if we should allow joystick events while in the background */ + hint = SDL_GetHint(SDL_HINT_JOYSTICK_ALLOW_BACKGROUND_EVENTS); + if (hint && *hint == '1') { + SDL_joystick_allows_background_events = SDL_TRUE; + } status = SDL_SYS_JoystickInit(); if (status >= 0) { - status = 0; + status = 0; } return (status); } @@ -455,17 +464,22 @@ SDL_JoystickQuit(void) static SDL_bool SDL_PrivateJoystickShouldIgnoreEvent() { - const char *hint; - if (SDL_GetKeyboardFocus() != NULL) { + if (SDL_joystick_allows_background_events) + { return SDL_FALSE; } - hint = SDL_GetHint(SDL_HINT_JOYSTICK_ALLOW_BACKGROUND_EVENTS); - if (hint && *hint == '1') { - return SDL_FALSE; + if (SDL_WasInit(SDL_INIT_VIDEO)) { + if (SDL_GetKeyboardFocus() == NULL) { + // Video is initialized and we don't have focus, ignore the event. + return SDL_TRUE; + } else { + return SDL_FALSE; + } } - return SDL_TRUE; + // Video subsystem wasn't initialized, always allow the event + return SDL_FALSE; } /* These are global for SDL_sysjoystick.c and SDL_events.c */ From fd6dde1327bbc767634406a0a5ed5717f6c1932b Mon Sep 17 00:00:00 2001 From: Philipp Wiesemann Date: Sat, 29 Jun 2013 22:08:38 +0200 Subject: [PATCH 251/542] Changed paths and name of header file in text of VisualC.html. --- VisualC.html | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/VisualC.html b/VisualC.html index e22f06f1c..a25907bd9 100644 --- a/VisualC.html +++ b/VisualC.html @@ -71,8 +71,8 @@ add the include and library directories to the list that VC7 keeps. Do this by selecting Tools|Options|Projects|VC++ Directories and under the "Show Directories For:" dropbox select "Include Files", and click the "New Directory - Icon" and add the [SDLROOT]\include directory (ex. If you installed to - c:\SDL-1.2.5\ add c:\SDL-1.2.5\include). Proceed to change the + Icon" and add the [SDLROOT]\include directory (e.g. If you installed to + c:\SDL\ add c:\SDL\include). Proceed to change the dropbox selection to "Library Files" and add [SDLROOT]\lib.

@@ -105,7 +105,7 @@ desireable to add them to the linker options: Project|Properties|Linker|Command Line and type the names of the libraries to link with in the "Additional Options:" box.  Note: This must be done for each build - configuration (eg. Release,Debug).

+ configuration (e.g. Release,Debug).

SDL 101, First Day of Class

@@ -113,7 +113,7 @@ Now create the basic body of your project. The body of your program should take the following form:
-#include "SDL2.h"
+#include "SDL.h"
 
 int main( int argc, char* argv[] )
 {

From 7ff764a482c6806be0fec2653521419e3517e46f Mon Sep 17 00:00:00 2001
From: Sam Lantinga 
Date: Sat, 29 Jun 2013 14:40:55 -0700
Subject: [PATCH 252/542] Fixed the logical size for rendering to texture,
 thanks to Mason Wheeler.

Mason Wheeler

The SDL_RenderGetLogicalSize function should always return the amount of pixels that are currently available for rendering to.  But after updating to the latest SDL2, I started getting crashes because it was returning (0,0) as the logical size!  After a bit of debugging, I tracked it down to the following code in SDL_SetRenderTarget:

    if (texture) {
        renderer->viewport.x = 0;
        renderer->viewport.y = 0;
        renderer->viewport.w = texture->w;
        renderer->viewport.h = texture->h;
        renderer->scale.x = 1.0f;
        renderer->scale.y = 1.0f;
        renderer->logical_w = 0;
        renderer->logical_h = 0;
    }

This is obviously wrong; 0 is never the correct value for a valid renderer.  Those last two lines should read:

        renderer->logical_w = texture->w;
        renderer->logical_h = texture->h;
---
 src/render/SDL_render.c | 4 ++--
 1 file changed, 2 insertions(+), 2 deletions(-)

diff --git a/src/render/SDL_render.c b/src/render/SDL_render.c
index 733760fcc..274645ab2 100644
--- a/src/render/SDL_render.c
+++ b/src/render/SDL_render.c
@@ -950,8 +950,8 @@ SDL_SetRenderTarget(SDL_Renderer *renderer, SDL_Texture *texture)
         renderer->viewport.h = texture->h;
         renderer->scale.x = 1.0f;
         renderer->scale.y = 1.0f;
-        renderer->logical_w = 0;
-        renderer->logical_h = 0;
+        renderer->logical_w = texture->w;
+        renderer->logical_h = texture->h;
     } else {
         renderer->viewport = renderer->viewport_backup;
         renderer->clip_rect = renderer->clip_rect_backup;

From 60315067e32ce7fca3a56b0235fa86589fc88dd2 Mon Sep 17 00:00:00 2001
From: Edward Rudd 
Date: Tue, 4 Jun 2013 12:02:18 -0400
Subject: [PATCH 253/542] add in alt+enter keyboard shortcut to test common to
 toggle fullscreen desktop

---
 src/test/SDL_test_common.c | 11 +++++++++++
 1 file changed, 11 insertions(+)

diff --git a/src/test/SDL_test_common.c b/src/test/SDL_test_common.c
index dd7c233ae..35d177e0e 100644
--- a/src/test/SDL_test_common.c
+++ b/src/test/SDL_test_common.c
@@ -1307,6 +1307,17 @@ SDLTest_CommonEvent(SDLTest_CommonState * state, SDL_Event * event, int *done)
                         SDL_SetWindowFullscreen(window, SDL_TRUE);
                     }
                 }
+            } else if (event->key.keysym.mod & KMOD_ALT) {
+                /* Ctrl-Enter toggle fullscreen desktop */
+                SDL_Window *window = SDL_GetWindowFromID(event->key.windowID);
+                if (window) {
+                    Uint32 flags = SDL_GetWindowFlags(window);
+                    if (flags & SDL_WINDOW_FULLSCREEN) {
+                        SDL_SetWindowFullscreen(window, SDL_FALSE);
+                    } else {
+                        SDL_SetWindowFullscreen(window, SDL_WINDOW_FULLSCREEN_DESKTOP);
+                    }
+                }
             }
             break;
         case SDLK_b:

From 197f525783538f9a61c2c92c7713f12e9398ca7a Mon Sep 17 00:00:00 2001
From: Sam Lantinga 
Date: Wed, 3 Jul 2013 12:31:40 -0700
Subject: [PATCH 254/542] Added SDL_HINT_JOYSTICK_ALLOW_BACKGROUND_EVENTS to
 the documentation for the joystick and game controller APIs

---
 include/SDL_gamecontroller.h | 4 ++++
 include/SDL_joystick.h       | 4 ++++
 2 files changed, 8 insertions(+)

diff --git a/include/SDL_gamecontroller.h b/include/SDL_gamecontroller.h
index b2e35fb89..e55749ce3 100644
--- a/include/SDL_gamecontroller.h
+++ b/include/SDL_gamecontroller.h
@@ -44,6 +44,10 @@ extern "C" {
  *  In order to use these functions, SDL_Init() must have been called
  *  with the ::SDL_INIT_JOYSTICK flag.  This causes SDL to scan the system
  *  for game controllers, and load appropriate drivers.
+ *
+ *  If you would like to receive controller updates while the application
+ *  is in the background, you should set the following hint before calling
+ *  SDL_Init(): SDL_HINT_JOYSTICK_ALLOW_BACKGROUND_EVENTS
  */
 
 /* The gamecontroller structure used to identify an SDL game controller */
diff --git a/include/SDL_joystick.h b/include/SDL_joystick.h
index f568f9bd8..266740348 100644
--- a/include/SDL_joystick.h
+++ b/include/SDL_joystick.h
@@ -54,6 +54,10 @@ extern "C" {
  *  In order to use these functions, SDL_Init() must have been called
  *  with the ::SDL_INIT_JOYSTICK flag.  This causes SDL to scan the system
  *  for joysticks, and load appropriate drivers.
+ *
+ *  If you would like to receive joystick updates while the application
+ *  is in the background, you should set the following hint before calling
+ *  SDL_Init(): SDL_HINT_JOYSTICK_ALLOW_BACKGROUND_EVENTS
  */
 
 /* The joystick structure used to identify an SDL joystick */

From 0ea9cabb50735b62c8a4aacfd45dffdcebd3ebb6 Mon Sep 17 00:00:00 2001
From: "Ryan C. Gordon" 
Date: Fri, 5 Jul 2013 00:30:23 -0400
Subject: [PATCH 255/542] Don't close already-closed audio devices during
 SDL_Quit().

Otherwise, we spam a bunch of unnecessary SDL_SetError() calls.

Fixes Bugzilla #1791.
---
 src/audio/SDL_audio.c | 4 +++-
 1 file changed, 3 insertions(+), 1 deletion(-)

diff --git a/src/audio/SDL_audio.c b/src/audio/SDL_audio.c
index f6763f9b6..059b75d29 100644
--- a/src/audio/SDL_audio.c
+++ b/src/audio/SDL_audio.c
@@ -1174,7 +1174,9 @@ SDL_AudioQuit(void)
 {
     SDL_AudioDeviceID i;
     for (i = 0; i < SDL_arraysize(open_devices); i++) {
-        SDL_CloseAudioDevice(i);
+        if (open_devices[i] != NULL) {
+            SDL_CloseAudioDevice(i);
+        }
     }
 
     /* Free the driver data */

From 47a2869b0d3dfa5887fc98f111f6ff6bbac9bc76 Mon Sep 17 00:00:00 2001
From: "Ryan C. Gordon" 
Date: Fri, 5 Jul 2013 00:41:01 -0400
Subject: [PATCH 256/542] Added a FIXME.

---
 src/SDL_log.c | 1 +
 1 file changed, 1 insertion(+)

diff --git a/src/SDL_log.c b/src/SDL_log.c
index 6cbfaf0e9..8bb5cd974 100644
--- a/src/SDL_log.c
+++ b/src/SDL_log.c
@@ -389,6 +389,7 @@ SDL_LogOutput(void *userdata, int category, SDL_LogPriority priority,
         unsigned int length;
         char*        output;
         FILE*        pFile;
+        /* !!! FIXME: is there any reason we didn't just use fprintf() here? */
         length = SDL_strlen(SDL_priority_prefixes[priority]) + 2 + SDL_strlen(message) + 1;
         output = SDL_stack_alloc(char, length);
         SDL_snprintf(output, length, "%s: %s", SDL_priority_prefixes[priority], message);

From 292c6c09eee95e09ed8af27fe55ffb713d3910e1 Mon Sep 17 00:00:00 2001
From: "Ryan C. Gordon" 
Date: Fri, 5 Jul 2013 00:41:34 -0400
Subject: [PATCH 257/542] Strip newlines from messages in SDL_Log*() before
 calling logging function.

---
 src/SDL_log.c | 16 ++++++++++++++--
 1 file changed, 14 insertions(+), 2 deletions(-)

diff --git a/src/SDL_log.c b/src/SDL_log.c
index 8bb5cd974..80c157966 100644
--- a/src/SDL_log.c
+++ b/src/SDL_log.c
@@ -266,6 +266,7 @@ void
 SDL_LogMessageV(int category, SDL_LogPriority priority, const char *fmt, va_list ap)
 {
     char *message;
+    size_t len;
 
     /* Nothing to do if we don't have an output function */
     if (!SDL_log_function) {
@@ -286,7 +287,18 @@ SDL_LogMessageV(int category, SDL_LogPriority priority, const char *fmt, va_list
     if (!message) {
         return;
     }
+
     SDL_vsnprintf(message, SDL_MAX_LOG_MESSAGE, fmt, ap);
+
+    /* Chop off final endline. */
+    len = SDL_strlen(message);
+    if ((len > 0) && (message[len-1] == '\n')) {
+        message[--len] = '\0';
+        if ((len > 0) && (message[len-1] == '\r')) {  /* catch "\r\n", too. */
+            message[--len] = '\0';
+        }
+    }
+
     SDL_log_function(SDL_log_userdata, category, priority, message);
     SDL_stack_free(message);
 }
@@ -390,9 +402,9 @@ SDL_LogOutput(void *userdata, int category, SDL_LogPriority priority,
         char*        output;
         FILE*        pFile;
         /* !!! FIXME: is there any reason we didn't just use fprintf() here? */
-        length = SDL_strlen(SDL_priority_prefixes[priority]) + 2 + SDL_strlen(message) + 1;
+        length = SDL_strlen(SDL_priority_prefixes[priority]) + 2 + SDL_strlen(message) + 2;
         output = SDL_stack_alloc(char, length);
-        SDL_snprintf(output, length, "%s: %s", SDL_priority_prefixes[priority], message);
+        SDL_snprintf(output, length, "%s: %s\n", SDL_priority_prefixes[priority], message);
         pFile = fopen ("SDL_Log.txt", "a");
         fwrite (output, strlen (output), 1, pFile);
         SDL_stack_free(output);

From 522eeaf81478faeae777925b4cb2a961eff47b1a Mon Sep 17 00:00:00 2001
From: "Ryan C. Gordon" 
Date: Fri, 5 Jul 2013 00:54:00 -0400
Subject: [PATCH 258/542] Don't crash if SDL_AudioQuit() is called twice in a
 row.

Fixes Bugzilla #1396.
---
 src/audio/SDL_audio.c | 4 ++++
 1 file changed, 4 insertions(+)

diff --git a/src/audio/SDL_audio.c b/src/audio/SDL_audio.c
index 059b75d29..5e30ad094 100644
--- a/src/audio/SDL_audio.c
+++ b/src/audio/SDL_audio.c
@@ -1172,6 +1172,10 @@ SDL_CloseAudio(void)
 void
 SDL_AudioQuit(void)
 {
+    if (!current_audio.name) {  /* not initialized?! */
+        return;
+    }
+
     SDL_AudioDeviceID i;
     for (i = 0; i < SDL_arraysize(open_devices); i++) {
         if (open_devices[i] != NULL) {

From 32e16f45fae1442cefbc598077fe9176d4617064 Mon Sep 17 00:00:00 2001
From: "Ryan C. Gordon" 
Date: Fri, 5 Jul 2013 01:09:27 -0400
Subject: [PATCH 259/542] Fixed some __BEOS__ vs __HAIKU__ preprocessor tests
 (thanks, Axel!).

Fixes Bugzilla #1773.
---
 src/SDL.c                  | 5 ++---
 src/events/SDL_sysevents.h | 3 ++-
 2 files changed, 4 insertions(+), 4 deletions(-)

diff --git a/src/SDL.c b/src/SDL.c
index f6f3dec69..bc3fe1079 100644
--- a/src/SDL.c
+++ b/src/SDL.c
@@ -371,9 +371,6 @@ SDL_GetPlatform()
     return "AIX";
 #elif __ANDROID__
     return "Android";
-#elif __HAIKU__
-/* Haiku must appear here before BeOS, since it also defines __BEOS__ */
-    return "Haiku";
 #elif __BEOS__
     return "BeOS";
 #elif __BSDI__
@@ -382,6 +379,8 @@ SDL_GetPlatform()
     return "Dreamcast";
 #elif __FREEBSD__
     return "FreeBSD";
+#elif __HAIKU__
+    return "Haiku";
 #elif __HPUX__
     return "HP-UX";
 #elif __IRIX__
diff --git a/src/events/SDL_sysevents.h b/src/events/SDL_sysevents.h
index 88df0ea09..c2f1e097b 100644
--- a/src/events/SDL_sysevents.h
+++ b/src/events/SDL_sysevents.h
@@ -24,7 +24,8 @@
 
 /* Useful functions and variables from SDL_sysevents.c */
 
-#ifdef __BEOS__                 /* The Be event loop runs in a separate thread */
+#if defined(__BEOS__) || defined(__HAIKU__) 
+/* The Be and Haiku event loops run in a separate thread */
 #define MUST_THREAD_EVENTS
 #endif
 

From 65a277c3223d1e482943f138ac6b2c4899b637d0 Mon Sep 17 00:00:00 2001
From: "Ryan C. Gordon" 
Date: Fri, 5 Jul 2013 01:18:18 -0400
Subject: [PATCH 260/542] Don't set the same GL context twice on Mac OS X
 (thanks, Alex!).

Fixes Bugzilla #1939.
---
 src/video/cocoa/SDL_cocoaopengl.m | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/src/video/cocoa/SDL_cocoaopengl.m b/src/video/cocoa/SDL_cocoaopengl.m
index f52e3e91e..589fb1dd7 100644
--- a/src/video/cocoa/SDL_cocoaopengl.m
+++ b/src/video/cocoa/SDL_cocoaopengl.m
@@ -223,7 +223,7 @@ Cocoa_GL_MakeCurrent(_THIS, SDL_Window * window, SDL_GLContext context)
             [nscontext setFullScreen];
         } else
 #endif
-        {
+        if ([nscontext view] != [windowdata->nswindow contentView]) {
             [nscontext setView:[windowdata->nswindow contentView]];
             [nscontext update];
         }

From 0634073030aa8109ed6d0b4f7cfb91eb73806b7d Mon Sep 17 00:00:00 2001
From: "Ryan C. Gordon" 
Date: Fri, 5 Jul 2013 01:31:02 -0400
Subject: [PATCH 261/542] Patched to compile on pre-C99 compilers.

---
 src/audio/SDL_audio.c | 3 ++-
 1 file changed, 2 insertions(+), 1 deletion(-)

diff --git a/src/audio/SDL_audio.c b/src/audio/SDL_audio.c
index 5e30ad094..08467f43a 100644
--- a/src/audio/SDL_audio.c
+++ b/src/audio/SDL_audio.c
@@ -1172,11 +1172,12 @@ SDL_CloseAudio(void)
 void
 SDL_AudioQuit(void)
 {
+    SDL_AudioDeviceID i;
+
     if (!current_audio.name) {  /* not initialized?! */
         return;
     }
 
-    SDL_AudioDeviceID i;
     for (i = 0; i < SDL_arraysize(open_devices); i++) {
         if (open_devices[i] != NULL) {
             SDL_CloseAudioDevice(i);

From f004771cf2aeea2ad26b0c856a09947a0feaaf47 Mon Sep 17 00:00:00 2001
From: Sam Lantinga 
Date: Fri, 5 Jul 2013 21:25:32 -0700
Subject: [PATCH 262/542] Fixed detection of overlong sequences (thanks Tommy!)

---
 src/stdlib/SDL_iconv.c | 8 ++++----
 1 file changed, 4 insertions(+), 4 deletions(-)

diff --git a/src/stdlib/SDL_iconv.c b/src/stdlib/SDL_iconv.c
index 4e5e51d87..109e03ed6 100644
--- a/src/stdlib/SDL_iconv.c
+++ b/src/stdlib/SDL_iconv.c
@@ -364,7 +364,7 @@ SDL_iconv(SDL_iconv_t cd,
                          */
                         ch = UNKNOWN_UNICODE;
                     } else {
-                        if (p[0] == 0xFC) {
+                        if (p[0] == 0xFC && srclen > 1 && (p[1] & 0xFC) == 0x80) {
                             overlong = SDL_TRUE;
                         }
                         ch = (Uint32) (p[0] & 0x01);
@@ -377,7 +377,7 @@ SDL_iconv(SDL_iconv_t cd,
                          */
                         ch = UNKNOWN_UNICODE;
                     } else {
-                        if (p[0] == 0xF8) {
+                        if (p[0] == 0xF8 && srclen > 1 && (p[1] & 0xF8) == 0x80) {
                             overlong = SDL_TRUE;
                         }
                         ch = (Uint32) (p[0] & 0x03);
@@ -390,7 +390,7 @@ SDL_iconv(SDL_iconv_t cd,
                          */
                         ch = UNKNOWN_UNICODE;
                     } else {
-                        if (p[0] == 0xF0) {
+                        if (p[0] == 0xF0 && srclen > 1 && (p[1] & 0xF0) == 0x80) {
                             overlong = SDL_TRUE;
                         }
                         ch = (Uint32) (p[0] & 0x07);
@@ -403,7 +403,7 @@ SDL_iconv(SDL_iconv_t cd,
                          */
                         ch = UNKNOWN_UNICODE;
                     } else {
-                        if (p[0] == 0xE0) {
+                        if (p[0] == 0xE0 && srclen > 1 && (p[1] & 0xE0) == 0x80) {
                             overlong = SDL_TRUE;
                         }
                         ch = (Uint32) (p[0] & 0x0F);

From 3a78485f2d270e7525204168f2360ca4f5ac28a2 Mon Sep 17 00:00:00 2001
From: Sam Lantinga 
Date: Fri, 5 Jul 2013 21:37:27 -0700
Subject: [PATCH 263/542] No, there's no reason not to use fprintf

---
 src/SDL_log.c | 9 +--------
 1 file changed, 1 insertion(+), 8 deletions(-)

diff --git a/src/SDL_log.c b/src/SDL_log.c
index 80c157966..c48f9ab8f 100644
--- a/src/SDL_log.c
+++ b/src/SDL_log.c
@@ -398,16 +398,9 @@ SDL_LogOutput(void *userdata, int category, SDL_LogPriority priority,
     }
 #elif defined(__PSP__)
     {
-        unsigned int length;
-        char*        output;
         FILE*        pFile;
-        /* !!! FIXME: is there any reason we didn't just use fprintf() here? */
-        length = SDL_strlen(SDL_priority_prefixes[priority]) + 2 + SDL_strlen(message) + 2;
-        output = SDL_stack_alloc(char, length);
-        SDL_snprintf(output, length, "%s: %s\n", SDL_priority_prefixes[priority], message);
         pFile = fopen ("SDL_Log.txt", "a");
-        fwrite (output, strlen (output), 1, pFile);
-        SDL_stack_free(output);
+        fprintf(pFile, "%s: %s\n", SDL_priority_prefixes[priority], message);
         fclose (pFile);
     }
 #endif

From cfd541e89c30447d6b117cf713c96f41e180829d Mon Sep 17 00:00:00 2001
From: Sam Lantinga 
Date: Fri, 5 Jul 2013 23:57:19 -0700
Subject: [PATCH 264/542] Removed the inline functions from SDL_stdinc.h Having
 the SDL functions inline is causing build issues, and in the case of
 malloc(), etc. causing malloc/free mismatches, if the application build
 environment differs from the SDL build environment.

In the interest of safety and consistency, the functions will always be in the SDL library and will only be redirected to the C library there, if they are available.

See the following threads on the SDL mailing list for the gruesome details:
* SDL_stdinc.h inlines problematic when application not compiled in exact same feature environment
* Error compiling program against SDL2 with -std=c++11 g++ flag
---
 include/SDL_stdinc.h     | 459 ++------------------------------------
 src/libm/math_libm.h     |  77 +------
 src/libm/math_private.h  |  12 +
 src/stdlib/SDL_getenv.c  |  18 +-
 src/stdlib/SDL_malloc.c  |  31 ++-
 src/stdlib/SDL_qsort.c   |   5 +-
 src/stdlib/SDL_stdlib.c  | 179 +++++++++++++--
 src/stdlib/SDL_string.c  | 468 +++++++++++++++++++--------------------
 src/video/SDL_RLEaccel.c |   8 +-
 9 files changed, 469 insertions(+), 788 deletions(-)

diff --git a/include/SDL_stdinc.h b/include/SDL_stdinc.h
index f52bd0310..f8b6bd417 100644
--- a/include/SDL_stdinc.h
+++ b/include/SDL_stdinc.h
@@ -227,76 +227,17 @@ char *alloca();
 #define SDL_stack_free(data)            SDL_free(data)
 #endif
 
-
-/* SDL stdinc inline functions:
-
-   The theory here is that by default we forcibly inline what we can, and your
-   app will use the inline version by default. However we expose a non-inline
-   version too, so the symbol is always available in the library even if your app
-   bypassed the inline version. The SDL_*_inline versions aren't guaranteed to
-   exist, so never call them directly; use SDL_* instead, and trust the system
-   to give you the right thing.
-
-   The benefit here is that you can dlsym() these functions, which you
-   couldn't if you had macros, you can link against a foreign build of SDL
-   even if you configured differently, and you can drop the unconfigured SDL
-   headers into a project without #defining HAVE_MALLOC (etc) and still link.
-
-   If you want to disable the inline functions and just use SDL's functions,
-   you can define SDL_STDINC_NO_INLINES before including this file.
-*/
-
 extern DECLSPEC void *SDLCALL SDL_malloc(size_t size);
-#if defined(HAVE_MALLOC) && !defined(SDL_STDINC_NO_INLINES)
-SDL_FORCE_INLINE void *SDL_malloc_inline(size_t size) { return malloc(size); }
-#define SDL_malloc SDL_malloc_inline
-#endif
-
 extern DECLSPEC void *SDLCALL SDL_calloc(size_t nmemb, size_t size);
-#if defined(HAVE_CALLOC) && !defined(SDL_STDINC_NO_INLINES)
-SDL_FORCE_INLINE void *SDL_calloc_inline(size_t nmemb, size_t size) { return calloc(nmemb, size); }
-#define SDL_calloc SDL_calloc_inline
-#endif
-
 extern DECLSPEC void *SDLCALL SDL_realloc(void *mem, size_t size);
-#if defined(HAVE_REALLOC) && !defined(SDL_STDINC_NO_INLINES)
-SDL_FORCE_INLINE void *SDL_realloc_inline(void *mem, size_t size) { return realloc(mem, size); }
-#define SDL_realloc SDL_realloc_inline
-#endif
-
 extern DECLSPEC void SDLCALL SDL_free(void *mem);
-#if defined(HAVE_FREE) && !defined(SDL_STDINC_NO_INLINES)
-SDL_FORCE_INLINE void SDL_free_inline(void *mem) { free(mem); }
-#define SDL_free SDL_free_inline
-#endif
 
 extern DECLSPEC char *SDLCALL SDL_getenv(const char *name);
-#if defined(HAVE_GETENV) && !defined(SDL_STDINC_NO_INLINES)
-SDL_FORCE_INLINE char *SDL_getenv_inline(const char *name) { return getenv(name); }
-#define SDL_getenv SDL_getenv_inline
-#endif
-
 extern DECLSPEC int SDLCALL SDL_setenv(const char *name, const char *value, int overwrite);
-#if defined(HAVE_SETENV) && !defined(SDL_STDINC_NO_INLINES)
-SDL_FORCE_INLINE int SDL_setenv_inline(const char *name, const char *value, int overwrite) { return setenv(name, value, overwrite); }
-#define SDL_setenv SDL_setenv_inline
-#endif
 
 extern DECLSPEC void SDLCALL SDL_qsort(void *base, size_t nmemb, size_t size, int (*compare) (const void *, const void *));
-#if defined(HAVE_QSORT) && !defined(SDL_STDINC_NO_INLINES)
-SDL_FORCE_INLINE void SDL_qsort_inline(void *base, size_t nmemb, size_t size, int (*compare) (const void *, const void *)) { qsort(base, nmemb, size, compare); }
-#define SDL_qsort SDL_qsort_inline
-#endif
 
 extern DECLSPEC int SDLCALL SDL_abs(int x);
-#ifndef SDL_STDINC_NO_INLINES
-#ifdef HAVE_ABS
-SDL_FORCE_INLINE int SDL_abs_inline(int x) { return abs(x); }
-#else
-SDL_FORCE_INLINE int SDL_abs_inline(int x) { return ((x) < 0 ? -(x) : (x)); }
-#endif
-#define SDL_abs SDL_abs_inline
-#endif /* !SDL_STDINC_NO_INLINES */
 
 /* !!! FIXME: these have side effects. You probably shouldn't use them. */
 /* !!! FIXME: Maybe we do forceinline functions of SDL_mini, SDL_minf, etc? */
@@ -307,35 +248,14 @@ extern DECLSPEC int SDLCALL SDL_isdigit(int x);
 extern DECLSPEC int SDLCALL SDL_isspace(int x);
 extern DECLSPEC int SDLCALL SDL_toupper(int x);
 extern DECLSPEC int SDLCALL SDL_tolower(int x);
-#ifndef SDL_STDINC_NO_INLINES
-#ifdef HAVE_CTYPE_H
-SDL_FORCE_INLINE int SDL_isdigit_inline(int x) { return isdigit(x); }
-SDL_FORCE_INLINE int SDL_isspace_inline(int x) { return isspace(x); }
-SDL_FORCE_INLINE int SDL_toupper_inline(int x) { return toupper(x); }
-SDL_FORCE_INLINE int SDL_tolower_inline(int x) { return tolower(x); }
-#else
-SDL_FORCE_INLINE int SDL_isdigit_inline(int x) { return ((x) >= '0') && ((x) <= '9'); }
-SDL_FORCE_INLINE int SDL_isspace_inline(int x) { return ((x) == ' ') || ((x) == '\t') || ((x) == '\r') || ((x) == '\n'); }
-SDL_FORCE_INLINE int SDL_toupper_inline(int x) { return ((x) >= 'a') && ((x) <= 'z') ? ('A'+((x)-'a')) : (x); }
-SDL_FORCE_INLINE int SDL_tolower_inline(int x) { return ((x) >= 'A') && ((x) <= 'Z') ? ('a'+((x)-'A')) : (x); }
-#endif
-#define SDL_isdigit SDL_isdigit_inline
-#define SDL_isspace SDL_isspace_inline
-#define SDL_toupper SDL_toupper_inline
-#define SDL_tolower SDL_tolower_inline
-#endif /* !SDL_STDINC_NO_INLINES */
 
 extern DECLSPEC void *SDLCALL SDL_memset(void *dst, int c, size_t len);
-#if defined(HAVE_MEMSET) && !defined(SDL_STDINC_NO_INLINES)
-SDL_FORCE_INLINE void *SDL_memset_inline(void *dst, int c, size_t len) { return memset(dst, c, len); }
-#define SDL_memset SDL_memset_inline
-#endif
 
 #define SDL_zero(x) SDL_memset(&(x), 0, sizeof((x)))
 #define SDL_zerop(x) SDL_memset((x), 0, sizeof(*(x)))
 
-/* !!! FIXME: does this _really_ beat memset() on any modern platform? */
-SDL_FORCE_INLINE void SDL_memset4(void *dst, int val, size_t len)
+/* Note that the semantics are different from memset() in that this is a 32-bit assignment */
+SDL_FORCE_INLINE void SDL_memset4(void *dst, int val, size_t dwords)
 {
 #if defined(__GNUC__) && defined(i386)
     int u0, u1, u2;
@@ -343,17 +263,16 @@ SDL_FORCE_INLINE void SDL_memset4(void *dst, int val, size_t len)
         "cld \n\t"
         "rep ; stosl \n\t"
         : "=&D" (u0), "=&a" (u1), "=&c" (u2)
-        : "0" (dst), "1" (val), "2" (SDL_static_cast(Uint32, len))
+        : "0" (dst), "1" (val), "2" (SDL_static_cast(Uint32, dwords))
         : "memory"
     );
-/* !!! FIXME: amd64? */
 #else
-    size_t _n = (len + 3) / 4;
+    size_t _n = (dwords + 3) / 4;
     Uint32 *_p = SDL_static_cast(Uint32 *, dst);
     Uint32 _val = (val);
-    if (len == 0)
+    if (dwords == 0)
         return;
-    switch (len % 4)
+    switch (dwords % 4)
     {
         case 0: do {    *_p++ = _val;
         case 3:         *_p++ = _val;
@@ -366,323 +285,54 @@ SDL_FORCE_INLINE void SDL_memset4(void *dst, int val, size_t len)
 
 
 extern DECLSPEC void *SDLCALL SDL_memcpy(void *dst, const void *src, size_t len);
-#if !defined(SDL_STDINC_NO_INLINES)
-#if defined(__MACOSX__) && defined(HAVE_MEMCPY)
-SDL_FORCE_INLINE void *SDL_memcpy_inline(void *dst, const void *src, size_t len)
-{
-    /* We can count on memcpy existing on Mac OS X and being well-tuned. */
-    return memcpy(dst, src, len);
-}
-#define SDL_memcpy SDL_memcpy_inline
-#elif defined(__GNUC__) && defined(i386) && !defined(__WIN32__)
-SDL_FORCE_INLINE void *SDL_memcpy_inline(void *dst, const void *src, size_t len)
-{
-    /* !!! FIXME: does this _really_ beat memcpy() on any modern platform? */
-    /* !!! FIXME: shouldn't we just force the inputs to ecx/edi/esi instead of this tapdance with outputs? */
-    /* !!! FIXME: amd64? */
-    int u0, u1, u2;
-    __asm__ __volatile__ (
-        "cld \n\t"
-        "rep ; movsl \n\t"
-        "testb $2,%b4 \n\t"
-        "je 1f \n\t"
-        "movsw \n"
-        "1:\ttestb $1,%b4 \n\t"
-        "je 2f \n\t"
-        "movsb \n"
-        "2:"
-        : "=&c" (u0), "=&D" (u1), "=&S" (u2)
-        : "0" (SDL_static_cast(unsigned, len)/4), "q" (len), "1" (dst), "2" (src)
-        : "memory"
-    );
-    return dst;
-}
-#define SDL_memcpy SDL_memcpy_inline
-#elif defined(HAVE_MEMCPY)
-SDL_FORCE_INLINE void *SDL_memcpy_inline(void *dst, const void *src, size_t len)
-{
-    return memcpy(dst, src, len);
-}
-#define SDL_memcpy SDL_memcpy_inline
-#elif defined(HAVE_BCOPY)  /* !!! FIXME: is there _really_ ever a time where you have bcopy and not memcpy? */
-SDL_FORCE_INLINE void *SDL_memcpy_inline(void *dst, const void *src, size_t len)
-{
-    bcopy(src, dst, len);
-    return dst;
-}
-#define SDL_memcpy SDL_memcpy_inline
-#endif
-#endif /* !SDL_STDINC_NO_INLINES */
-
 
 SDL_FORCE_INLINE void *SDL_memcpy4(void *dst, const void *src, size_t dwords)
 {
-#if defined(__GNUC__) && defined(i386)
-    /* !!! FIXME: does this _really_ beat memcpy() on any modern platform? */
-    /* !!! FIXME: shouldn't we just force the inputs to ecx/edi/esi instead of this tapdance with outputs? */
-    int ecx, edi, esi;
-    __asm__ __volatile__ (
-        "cld \n\t"
-        "rep ; movsl \n\t"
-        : "=&c" (ecx), "=&D" (edi), "=&S" (esi)
-        : "0" (SDL_static_cast(unsigned, dwords)), "1" (dst), "2" (src)
-        : "memory"
-    );
-    return dst;
-#else
     return SDL_memcpy(dst, src, dwords * 4);
-#endif
 }
 
 extern DECLSPEC void *SDLCALL SDL_memmove(void *dst, const void *src, size_t len);
-#if defined(HAVE_MEMMOVE) && !defined(SDL_STDINC_NO_INLINES)
-SDL_FORCE_INLINE void *SDL_memmove_inline(void *dst, const void *src, size_t len) { return memmove(dst, src, len); }
-#define SDL_memmove SDL_memmove_inline
-#endif
-
 extern DECLSPEC int SDLCALL SDL_memcmp(const void *s1, const void *s2, size_t len);
-#if defined(HAVE_MEMCMP) && !defined(SDL_STDINC_NO_INLINES)
-SDL_FORCE_INLINE int SDL_memcmp_inline(const void *s1, const void *s2, size_t len) { return memcmp(s1, s2, len); }
-#define SDL_memcmp SDL_memcmp_inline
-#endif
-
-extern DECLSPEC size_t SDLCALL SDL_strlen(const char *str);
-#if defined(HAVE_STRLEN) && !defined(SDL_STDINC_NO_INLINES)
-SDL_FORCE_INLINE size_t SDL_strlen_inline(const char *str) { return strlen(str); }
-#define SDL_strlen SDL_strlen_inline
-#endif
 
 extern DECLSPEC size_t SDLCALL SDL_wcslen(const wchar_t *wstr);
-#if defined(HAVE_WCSLEN) && !defined(SDL_STDINC_NO_INLINES)
-SDL_FORCE_INLINE size_t SDL_wcslen_inline(const wchar_t *wstr) { return wcslen(wstr); }
-#define SDL_wcslen SDL_wcslen_inline
-#endif
-
 extern DECLSPEC size_t SDLCALL SDL_wcslcpy(wchar_t *dst, const wchar_t *src, size_t maxlen);
-#if defined(HAVE_WCSLCPY) && !defined(SDL_STDINC_NO_INLINES)
-SDL_FORCE_INLINE size_t SDL_wcslcpy_inline(wchar_t *dst, const wchar_t *src, size_t maxlen) { return wcslcpy(dst, src, maxlen); }
-#define SDL_wcslcpy SDL_wcslcpy_inline
-#endif
-
 extern DECLSPEC size_t SDLCALL SDL_wcslcat(wchar_t *dst, const wchar_t *src, size_t maxlen);
-#if defined(HAVE_WCSLCAT) && !defined(SDL_STDINC_NO_INLINES)
-SDL_FORCE_INLINE size_t SDL_wcslcat_inline(wchar_t *dst, const wchar_t *src, size_t maxlen) { return wcslcat(dst, src, maxlen); }
-#define SDL_wcslcat SDL_wcslcat_inline
-#endif
 
+extern DECLSPEC size_t SDLCALL SDL_strlen(const char *str);
 extern DECLSPEC size_t SDLCALL SDL_strlcpy(char *dst, const char *src, size_t maxlen);
-#if defined(HAVE_STRLCPY) && !defined(SDL_STDINC_NO_INLINES)
-SDL_FORCE_INLINE size_t SDL_strlcpy_inline(char *dst, const char *src, size_t maxlen) { return strlcpy(dst, src, maxlen); }
-#define SDL_strlcpy SDL_strlcpy_inline
-#else
-#endif
-
 extern DECLSPEC size_t SDLCALL SDL_utf8strlcpy(char *dst, const char *src, size_t dst_bytes);
-
 extern DECLSPEC size_t SDLCALL SDL_strlcat(char *dst, const char *src, size_t maxlen);
-#if defined(HAVE_STRLCAT) && !defined(SDL_STDINC_NO_INLINES)
-SDL_FORCE_INLINE size_t SDL_strlcat_inline(char *dst, const char *src, size_t maxlen) { return strlcat(dst, src, maxlen); }
-#define SDL_strlcat SDL_strlcat_inline
-#endif
-
 extern DECLSPEC char *SDLCALL SDL_strdup(const char *str);
-#if defined(HAVE_STRDUP) && !defined(SDL_STDINC_NO_INLINES)
-SDL_FORCE_INLINE char *SDL_strdup_inline(const char *str) { return strdup(str); }
-#define SDL_strdup SDL_strdup_inline
-#endif
-
 extern DECLSPEC char *SDLCALL SDL_strrev(char *str);
-#if defined(HAVE__STRREV) && !defined(SDL_STDINC_NO_INLINES)
-SDL_FORCE_INLINE char *SDL_strrev_inline(char *str) { return _strrev(str); }
-#define SDL_strrev SDL_strrev_inline
-#endif
-
 extern DECLSPEC char *SDLCALL SDL_strupr(char *str);
-#if defined(HAVE__STRUPR) && !defined(SDL_STDINC_NO_INLINES)
-SDL_FORCE_INLINE char *SDL_strupr_inline(char *str) { return _strupr(str); }
-#define SDL_strupr SDL_strupr_inline
-#endif
-
 extern DECLSPEC char *SDLCALL SDL_strlwr(char *str);
-#if defined(HAVE__STRLWR) && !defined(SDL_STDINC_NO_INLINES)
-SDL_FORCE_INLINE char *SDL_strlwr_inline(char *str) { return _strlwr(str); }
-#define SDL_strlwr SDL_strlwr_inline
-#endif
-
 extern DECLSPEC char *SDLCALL SDL_strchr(const char *str, int c);
-#ifndef SDL_STDINC_NO_INLINES
-#ifdef HAVE_STRCHR
-SDL_FORCE_INLINE char *SDL_strchr_inline(const char *str, int c) { return SDL_const_cast(char*,strchr(str, c)); }
-#define SDL_strchr SDL_strchr_inline
-#elif defined(HAVE_INDEX)  /* !!! FIXME: is there anywhere that has this but not strchr? */
-SDL_FORCE_INLINE char *SDL_strchr_inline(const char *str, int c) { return SDL_const_cast(char*,index(str, c)); }
-#define SDL_strchr SDL_strchr_inline
-#endif
-#endif /* !SDL_STDINC_NO_INLINES */
-
 extern DECLSPEC char *SDLCALL SDL_strrchr(const char *str, int c);
-#ifndef SDL_STDINC_NO_INLINES
-#ifdef HAVE_STRRCHR
-SDL_FORCE_INLINE char *SDL_strrchr_inline(const char *str, int c) { return SDL_const_cast(char*,strrchr(str, c)); }
-#define SDL_strrchr SDL_strrchr_inline
-#elif defined(HAVE_RINDEX)  /* !!! FIXME: is there anywhere that has this but not strrchr? */
-SDL_FORCE_INLINE char *SDL_strrchr_inline(const char *str, int c) { return SDL_const_cast(char*,rindex(str, c)); }
-#define SDL_strrchr SDL_strrchr_inline
-#endif
-#endif /* !SDL_STDINC_NO_INLINES */
-
 extern DECLSPEC char *SDLCALL SDL_strstr(const char *haystack, const char *needle);
-#if defined(HAVE_STRSTR) && !defined(SDL_STDINC_NO_INLINES)
-SDL_FORCE_INLINE char *SDL_strstr_inline(const char *haystack, const char *needle) { return SDL_const_cast(char*,strstr(haystack, needle)); }
-#define SDL_strstr SDL_strstr_inline
-#endif
-
-extern DECLSPEC char *SDLCALL SDL_ltoa(long value, char *str, int radix);
-#if defined(HAVE__LTOA) && !defined(SDL_STDINC_NO_INLINES)
-SDL_FORCE_INLINE char *SDL_ltoa_inline(long value, char *str, int radix) { return _ltoa(value, str, radix); }
-#define SDL_ltoa SDL_ltoa_inline
-#endif
 
 extern DECLSPEC char *SDLCALL SDL_itoa(int value, char *str, int radix);
-#ifndef SDL_STDINC_NO_INLINES
-#ifdef HAVE_ITOA
-SDL_FORCE_INLINE char *SDL_itoa_inline(int value, char *str, int radix) { return itoa(value, str, radix); }
-#else
-SDL_FORCE_INLINE char *SDL_itoa_inline(int value, char *str, int radix) { return SDL_ltoa((long)value, str, radix); }
-#endif
-#define SDL_itoa SDL_itoa_inline
-#endif /* !SDL_STDINC_NO_INLINES */
-
-extern DECLSPEC char *SDLCALL SDL_ultoa(unsigned long value, char *str, int radix);
-#if defined(HAVE__ULTOA) && !defined(SDL_STDINC_NO_INLINES)
-SDL_FORCE_INLINE char *SDL_ultoa_inline(unsigned long value, char *str, int radix) { return _ultoa(value, str, radix); }
-#define SDL_ultoa SDL_ultoa_inline
-#endif
-
 extern DECLSPEC char *SDLCALL SDL_uitoa(unsigned int value, char *str, int radix);
-#ifndef SDL_STDINC_NO_INLINES
-#ifdef HAVE__UITOA
-SDL_FORCE_INLINE char *SDL_uitoa_inline(unsigned int value, char *str, int radix) { return _uitoa(value, str, radix); }
-#else
-SDL_FORCE_INLINE char *SDL_uitoa_inline(unsigned int value, char *str, int radix) { return SDL_ultoa((unsigned long)value, str, radix); }
-#endif
-#define SDL_uitoa SDL_uitoa_inline
-#endif /* !SDL_STDINC_NO_INLINES */
-
-
-extern DECLSPEC long SDLCALL SDL_strtol(const char *str, char **endp, int base);
-#if defined(HAVE_STRTOL) && !defined(SDL_STDINC_NO_INLINES)
-SDL_FORCE_INLINE long SDL_strtol_inline(const char *str, char **endp, int base) { return strtol(str, endp, base); }
-#define SDL_strtol SDL_strtol_inline
-#endif
-
-extern DECLSPEC unsigned long SDLCALL SDL_strtoul(const char *str, char **endp, int base);
-#if defined(HAVE_STRTOUL) && !defined(SDL_STDINC_NO_INLINES)
-SDL_FORCE_INLINE unsigned long SDLCALL SDL_strtoul_inline(const char *str, char **endp, int base) { return strtoul(str, endp, base); }
-#define SDL_strtoul SDL_strtoul_inline
-#endif
-
+extern DECLSPEC char *SDLCALL SDL_ltoa(long value, char *str, int radix);
+extern DECLSPEC char *SDLCALL SDL_ultoa(unsigned long value, char *str, int radix);
 extern DECLSPEC char *SDLCALL SDL_lltoa(Sint64 value, char *str, int radix);
-#if defined(HAVE__I64TOA) && !defined(SDL_STDINC_NO_INLINES)
-SDL_FORCE_INLINE char *SDL_lltoa_inline(Sint64 value, char *str, int radix) { return _i64toa(value, str, radix); }
-#define SDL_lltoa SDL_lltoa_inline
-#endif
-
 extern DECLSPEC char *SDLCALL SDL_ulltoa(Uint64 value, char *str, int radix);
-#if defined(HAVE__UI64TOA) && !defined(SDL_STDINC_NO_INLINES)
-SDL_FORCE_INLINE char *SDL_ulltoa_inline(Uint64 value, char *str, int radix) { return _ui64toa(value, str, radix); }
-#define SDL_ulltoa SDL_ulltoa_inline
-#endif
-
-extern DECLSPEC Sint64 SDLCALL SDL_strtoll(const char *str, char **endp, int base);
-#if defined(HAVE_STRTOLL) && !defined(SDL_STDINC_NO_INLINES)
-SDL_FORCE_INLINE Sint64 SDL_strtoll_inline(const char *str, char **endp, int base) { return strtoll(str, endp, base); }
-#define SDL_strtoll SDL_strtoll_inline
-#endif
-
-extern DECLSPEC Uint64 SDLCALL SDL_strtoull(const char *str, char **endp, int base);
-#if defined(HAVE_STRTOULL) && !defined(SDL_STDINC_NO_INLINES)
-SDL_FORCE_INLINE Uint64 SDL_strtoull_inline(const char *str, char **endp, int base) { return strtoull(str, endp, base); }
-#define SDL_strtoull SDL_strtoull_inline
-#endif
-
-extern DECLSPEC double SDLCALL SDL_strtod(const char *str, char **endp);
-#if defined(HAVE_STRTOD) && !defined(SDL_STDINC_NO_INLINES)
-SDL_FORCE_INLINE double SDL_strtod_inline(const char *str, char **endp) { return strtod(str, endp); }
-#define SDL_strtod SDL_strtod_inline
-#endif
 
 extern DECLSPEC int SDLCALL SDL_atoi(const char *str);
-#ifndef SDL_STDINC_NO_INLINES
-#ifdef HAVE_ATOI
-SDL_FORCE_INLINE int SDL_atoi_inline(const char *str) { return atoi(str); }
-#else
-SDL_FORCE_INLINE int SDL_atoi_inline(const char *str) { return SDL_strtol(str, NULL, 0); }
-#endif
-#define SDL_atoi SDL_atoi_inline
-#endif /* !SDL_STDINC_NO_INLINES */
-
 extern DECLSPEC double SDLCALL SDL_atof(const char *str);
-#ifndef SDL_STDINC_NO_INLINES
-#ifdef HAVE_ATOF
-SDL_FORCE_INLINE double SDL_atof_inline(const char *str) { return (double) atof(str); }
-#else
-SDL_FORCE_INLINE double SDL_atof_inline(const char *str) { return SDL_strtod(str, NULL); }
-#endif
-#define SDL_atof SDL_atof_inline
-#endif /* !SDL_STDINC_NO_INLINES */
-
+extern DECLSPEC long SDLCALL SDL_strtol(const char *str, char **endp, int base);
+extern DECLSPEC unsigned long SDLCALL SDL_strtoul(const char *str, char **endp, int base);
+extern DECLSPEC Sint64 SDLCALL SDL_strtoll(const char *str, char **endp, int base);
+extern DECLSPEC Uint64 SDLCALL SDL_strtoull(const char *str, char **endp, int base);
+extern DECLSPEC double SDLCALL SDL_strtod(const char *str, char **endp);
 
 extern DECLSPEC int SDLCALL SDL_strcmp(const char *str1, const char *str2);
-#if defined(HAVE_STRCMP) && !defined(SDL_STDINC_NO_INLINES)
-SDL_FORCE_INLINE int SDL_strcmp_inline(const char *str1, const char *str2) { return strcmp(str1, str2); }
-#define SDL_strcmp SDL_strcmp_inline
-#endif
-
 extern DECLSPEC int SDLCALL SDL_strncmp(const char *str1, const char *str2, size_t maxlen);
-#if defined(HAVE_STRNCMP) && !defined(SDL_STDINC_NO_INLINES)
-SDL_FORCE_INLINE int SDL_strncmp_inline(const char *str1, const char *str2, size_t maxlen) { return strncmp(str1, str2, maxlen); }
-#define SDL_strncmp SDL_strncmp_inline
-#endif
-
 extern DECLSPEC int SDLCALL SDL_strcasecmp(const char *str1, const char *str2);
-#ifndef SDL_STDINC_NO_INLINES
-#ifdef HAVE_STRCASECMP
-SDL_FORCE_INLINE int SDL_strcasecmp_inline(const char *str1, const char *str2) { return strcasecmp(str1, str2); }
-#define SDL_strcasecmp SDL_strcasecmp_inline
-#elif defined(HAVE__STRICMP)
-SDL_FORCE_INLINE int SDL_strcasecmp_inline(const char *str1, const char *str2) { return _stricmp(str1, str2); }
-#define SDL_strcasecmp SDL_strcasecmp_inline
-#endif
-#endif /* !SDL_STDINC_NO_INLINES */
-
 extern DECLSPEC int SDLCALL SDL_strncasecmp(const char *str1, const char *str2, size_t len);
-#ifndef SDL_STDINC_NO_INLINES
-#ifdef HAVE_STRNCASECMP
-SDL_FORCE_INLINE int SDL_strncasecmp_inline(const char *str1, const char *str2, size_t len) { return strncasecmp(str1, str2, len); }
-#define SDL_strncasecmp SDL_strncasecmp_inline
-#elif defined(HAVE__STRNICMP)
-SDL_FORCE_INLINE int SDL_strncasecmp_inline(const char *str1, const char *str2, size_t len) { return _strnicmp(str1, str2, len); }
-#define SDL_strncasecmp SDL_strncasecmp_inline
-#endif
-#endif /* !SDL_STDINC_NO_INLINES */
 
-/* Not doing SDL_*_inline functions for these, because of the varargs. */
 extern DECLSPEC int SDLCALL SDL_sscanf(const char *text, const char *fmt, ...);
-#ifdef HAVE_SSCANF
-#define SDL_sscanf sscanf
-#endif
-
 extern DECLSPEC int SDLCALL SDL_snprintf(char *text, size_t maxlen, const char *fmt, ...);
-#ifdef HAVE_SNPRINTF
-#define SDL_snprintf snprintf
-#endif
-
 extern DECLSPEC int SDLCALL SDL_vsnprintf(char *text, size_t maxlen, const char *fmt, va_list ap);
-#if defined(HAVE_VSNPRINTF) && !defined(SDL_STDINC_NO_INLINES)
-SDL_FORCE_INLINE int SDL_vsnprintf_inline(char *text, size_t maxlen, const char *fmt, va_list ap) { return vsnprintf(text, maxlen, fmt, ap); }
-#define SDL_vsnprintf SDL_vsnprintf_inline
-#endif
 
 #ifndef HAVE_M_PI
 #ifndef M_PI
@@ -691,100 +341,19 @@ SDL_FORCE_INLINE int SDL_vsnprintf_inline(char *text, size_t maxlen, const char
 #endif
 
 extern DECLSPEC double SDLCALL SDL_atan(double x);
-#if defined(HAVE_ATAN) && !defined(SDL_STDINC_NO_INLINES)
-SDL_FORCE_INLINE double SDL_atan_inline(double x) { return atan(x); }
-#define SDL_atan SDL_atan_inline
-#endif
-
 extern DECLSPEC double SDLCALL SDL_atan2(double x, double y);
-#if defined(HAVE_ATAN2) && !defined(SDL_STDINC_NO_INLINES)
-SDL_FORCE_INLINE double SDL_atan2_inline(double x, double y) { return atan2(x, y); }
-#define SDL_atan2 SDL_atan2_inline
-#endif
-
 extern DECLSPEC double SDLCALL SDL_ceil(double x);
-#ifndef SDL_STDINC_NO_INLINES
-#ifdef HAVE_CEIL
-SDL_FORCE_INLINE double SDL_ceil_inline(double x) { return ceil(x); }
-#else
-SDL_FORCE_INLINE double SDL_ceil_inline(double x) { return (double)(int)((x)+0.5); }
-#endif
-#define SDL_ceil SDL_ceil_inline
-#endif /* !SDL_STDINC_NO_INLINES */
-
 extern DECLSPEC double SDLCALL SDL_copysign(double x, double y);
-#if defined(HAVE_COPYSIGN) && !defined(SDL_STDINC_NO_INLINES)
-SDL_FORCE_INLINE double SDL_copysign_inline(double x, double y) { return copysign(x, y); }
-#define SDL_copysign SDL_copysign_inline
-#endif
-
 extern DECLSPEC double SDLCALL SDL_cos(double x);
-#if defined(HAVE_COS) && !defined(SDL_STDINC_NO_INLINES)
-SDL_FORCE_INLINE double SDL_cos_inline(double x) { return cos(x); }
-#define SDL_cos SDL_cos_inline
-#endif
-
 extern DECLSPEC float SDLCALL SDL_cosf(float x);
-#ifndef SDL_STDINC_NO_INLINES
-#ifdef HAVE_COSF
-SDL_FORCE_INLINE float SDL_cosf_inline(float x) { return cosf(x); }
-#else
-SDL_FORCE_INLINE float SDL_cosf_inline(float x) { return (float)SDL_cos((double)x); }
-#endif
-#define SDL_cosf SDL_cosf_inline
-#endif /* !SDL_STDINC_NO_INLINES */
-
 extern DECLSPEC double SDLCALL SDL_fabs(double x);
-#if defined(HAVE_FABS) && !defined(SDL_STDINC_NO_INLINES)
-SDL_FORCE_INLINE double SDL_fabs_inline(double x) { return fabs(x); }
-#define SDL_fabs SDL_fabs_inline
-#endif
-
 extern DECLSPEC double SDLCALL SDL_floor(double x);
-#if defined(HAVE_FLOOR) && !defined(SDL_STDINC_NO_INLINES)
-SDL_FORCE_INLINE double SDL_floor_inline(double x) { return floor(x); }
-#define SDL_floor SDL_floor_inline
-#endif
-
 extern DECLSPEC double SDLCALL SDL_log(double x);
-#if defined(HAVE_LOG) && !defined(SDL_STDINC_NO_INLINES)
-SDL_FORCE_INLINE double SDL_log_inline(double x) { return log(x); }
-#define SDL_log SDL_log_inline
-#endif
-
 extern DECLSPEC double SDLCALL SDL_pow(double x, double y);
-#if defined(HAVE_POW) && !defined(SDL_STDINC_NO_INLINES)
-SDL_FORCE_INLINE double SDL_pow_inline(double x, double y) { return pow(x, y); }
-#define SDL_pow SDL_pow_inline
-#endif
-
 extern DECLSPEC double SDLCALL SDL_scalbn(double x, int n);
-#if defined(HAVE_SCALBN) && !defined(SDL_STDINC_NO_INLINES)
-SDL_FORCE_INLINE double SDL_scalbn_inline(double x, int n) { return scalbn(x, n); }
-#define SDL_scalbn SDL_scalbn_inline
-#endif
-
 extern DECLSPEC double SDLCALL SDL_sin(double x);
-#if defined(HAVE_SIN) && !defined(SDL_STDINC_NO_INLINES)
-SDL_FORCE_INLINE double SDL_sin_inline(double x) { return sin(x); }
-#define SDL_sin SDL_sin_inline
-#endif
-
 extern DECLSPEC float SDLCALL SDL_sinf(float x);
-#ifndef SDL_STDINC_NO_INLINES
-#ifdef HAVE_SINF
-SDL_FORCE_INLINE float SDL_sinf_inline(float x) { return sinf(x); }
-#else
-SDL_FORCE_INLINE float SDL_sinf_inline(float x) { return (float)SDL_sin((double)x); }
-#endif
-#define SDL_sinf SDL_sinf_inline
-#endif /* !SDL_STDINC_NO_INLINES */
-
 extern DECLSPEC double SDLCALL SDL_sqrt(double x);
-#if defined(HAVE_SQRT) && !defined(SDL_STDINC_NO_INLINES)
-SDL_FORCE_INLINE double SDL_sqrt_inline(double x) { return sqrt(x); }
-#define SDL_sqrt SDL_sqrt_inline
-#endif
 
 /* The SDL implementation of iconv() returns these error codes */
 #define SDL_ICONV_ERROR     (size_t)-1
diff --git a/src/libm/math_libm.h b/src/libm/math_libm.h
index 6a6788255..8d7ac30c2 100644
--- a/src/libm/math_libm.h
+++ b/src/libm/math_libm.h
@@ -18,74 +18,19 @@
      misrepresented as being the original software.
   3. This notice may not be removed or altered from any source distribution.
 */
-#include "SDL_config.h"
-#include "SDL_stdinc.h"
 
 /* Math routines from uClibc: http://www.uclibc.org */
 
-#ifdef HAVE_ATAN
-#define atan            SDL_uclibc_atan
-#else
-#define atan            SDL_atan
-#endif
-double atan(double x);
-
-#ifndef HAVE_ATAN2
-#define __ieee754_atan2 SDL_atan2
-#endif
-
-#ifdef HAVE_COPYSIGN
-#define copysign        SDL_uclibc_copysign
-#else
-#define copysign        SDL_copysign
-#endif
-double copysign(double x, double y);
-
-#ifdef HAVE_COS
-#define cos             SDL_uclibc_cos
-#else
-#define cos             SDL_cos
-#endif
-double cos(double x);
-
-#ifdef HAVE_FABS
-#define fabs            SDL_uclibc_fabs
-#else
-#define fabs            SDL_fabs
-#endif
-double fabs(double x);
-
-#ifdef HAVE_FLOOR
-#define floor           SDL_uclibc_floor
-#else
-#define floor           SDL_floor
-#endif
-double floor(double x);
-
-#ifndef HAVE_LOG
-#define __ieee754_log   SDL_log
-#endif
-
-#ifndef HAVE_POW
-#define __ieee754_pow   SDL_pow
-#endif
-
-#ifdef HAVE_SCALBN
-#define scalbn          SDL_uclibc_scalbn
-#else
-#define scalbn          SDL_scalbn
-#endif
-double scalbn(double x, int n);
-
-#ifdef HAVE_SIN
-#define sin             SDL_uclibc_sin
-#else
-#define sin             SDL_sin
-#endif
-double sin(double x);
-
-#ifndef HAVE_SQRT
-#define __ieee754_sqrt  SDL_sqrt
-#endif
+double SDL_uclibc_atan(double x);
+double SDL_uclibc_atan2(double y, double x);    
+double SDL_uclibc_copysign(double x, double y);       
+double SDL_uclibc_cos(double x);         
+double SDL_uclibc_fabs(double x);        
+double SDL_uclibc_floor(double x);
+double SDL_uclibc_log(double x);
+double SDL_uclibc_pow(double x, double y);    
+double SDL_uclibc_scalbn(double x, int n);
+double SDL_uclibc_sin(double x);
+double SDL_uclibc_sqrt(double x);
 
 /* vi: set ts=4 sw=4 expandtab: */
diff --git a/src/libm/math_private.h b/src/libm/math_private.h
index 500e7da96..d61dc2e07 100644
--- a/src/libm/math_private.h
+++ b/src/libm/math_private.h
@@ -27,6 +27,18 @@
 
 typedef unsigned int u_int32_t;
 
+#define atan            SDL_uclibc_atan
+#define __ieee754_atan2 SDL_uclibc_atan2
+#define copysign        SDL_uclibc_copysign
+#define cos             SDL_uclibc_cos
+#define fabs            SDL_uclibc_fabs
+#define floor           SDL_uclibc_floor
+#define __ieee754_log   SDL_uclibc_log
+#define __ieee754_pow   SDL_uclibc_pow
+#define scalbn          SDL_uclibc_scalbn
+#define sin             SDL_uclibc_sin
+#define __ieee754_sqrt  SDL_uclibc_sqrt
+
 /* The original fdlibm code used statements like:
 	n0 = ((*(int*)&one)>>29)^1;		* index of high word *
 	ix0 = *(n0+(int*)&x);			* high word of x *
diff --git a/src/stdlib/SDL_getenv.c b/src/stdlib/SDL_getenv.c
index 9079387cd..0cd440549 100644
--- a/src/stdlib/SDL_getenv.c
+++ b/src/stdlib/SDL_getenv.c
@@ -31,9 +31,12 @@ static size_t SDL_envmemlen = 0;
 
 
 /* Put a variable into the environment */
-#ifdef SDL_setenv
-#undef SDL_setenv
-int SDL_setenv(const char *name, const char *value, int overwrite) { return SDL_setenv_inline(name, value, overwrite); }
+#if defined(HAVE_SETENV)
+int
+SDL_setenv(const char *name, const char *value, int overwrite)
+{
+    return setenv(name, value, overwrite);
+}
 #elif defined(__WIN32__)
 int
 SDL_setenv(const char *name, const char *value, int overwrite)
@@ -143,9 +146,12 @@ SDL_setenv(const char *name, const char *value, int overwrite)
 #endif
 
 /* Retrieve a variable named "name" from the environment */
-#ifdef SDL_getenv
-#undef SDL_getenv
-char *SDL_getenv(const char *name) { return SDL_getenv_inline(name); }
+#if defined(HAVE_GETENV)
+char *
+SDL_getenv(const char *name)
+{
+    return getenv(name);
+}
 #elif defined(__WIN32__)
 char *
 SDL_getenv(const char *name)
diff --git a/src/stdlib/SDL_malloc.c b/src/stdlib/SDL_malloc.c
index 5f7882139..7a85a3b49 100644
--- a/src/stdlib/SDL_malloc.c
+++ b/src/stdlib/SDL_malloc.c
@@ -24,16 +24,27 @@
 
 #include "SDL_stdinc.h"
 
-#ifdef SDL_malloc
-/* expose the symbol, but use what we figured out elsewhere. */
-#undef SDL_malloc
-#undef SDL_calloc
-#undef SDL_realloc
-#undef SDL_free
-void *SDL_malloc(size_t size) { return SDL_malloc_inline(size); }
-void *SDL_calloc(size_t nmemb, size_t size) { return SDL_calloc_inline(nmemb, size); }
-void *SDL_realloc(void *ptr, size_t size) { return SDL_realloc_inline(ptr, size); }
-void SDL_free(void *ptr) { SDL_free_inline(ptr); }
+#if defined(HAVE_MALLOC)
+
+void *SDL_malloc(size_t size)
+{
+    return malloc(size);
+}
+
+void *SDL_calloc(size_t nmemb, size_t size)
+{
+    return calloc(nmemb, size);
+}
+
+void *SDL_realloc(void *ptr, size_t size)
+{
+    return realloc(ptr, size);
+}
+
+void SDL_free(void *ptr)
+{
+    free(ptr);
+}
 
 #else  /* the rest of this is a LOT of tapdancing to implement malloc. :) */
 
diff --git a/src/stdlib/SDL_qsort.c b/src/stdlib/SDL_qsort.c
index 8c73419c9..0130d5a3b 100644
--- a/src/stdlib/SDL_qsort.c
+++ b/src/stdlib/SDL_qsort.c
@@ -51,12 +51,11 @@
 #include "SDL_stdinc.h"
 #include "SDL_assert.h"
 
-#ifdef SDL_qsort
-#undef SDL_qsort
+#if defined(HAVE_QSORT)
 void
 SDL_qsort(void *base, size_t nmemb, size_t size, int (*compare) (const void *, const void *))
 {
-    SDL_qsort_inline(base, nmemb, size, compare);
+    qsort(base, nmemb, size, compare);
 }
 #else
 
diff --git a/src/stdlib/SDL_stdlib.c b/src/stdlib/SDL_stdlib.c
index 176aa240c..bff34ef63 100644
--- a/src/stdlib/SDL_stdlib.c
+++ b/src/stdlib/SDL_stdlib.c
@@ -23,24 +23,169 @@
 /* This file contains portable stdlib functions for SDL */
 
 #include "SDL_stdinc.h"
+#include "../libm/math_libm.h"
 
-/* these are always #defined, make them real symbol in the library, too... */
-#undef SDL_ceil
-#undef SDL_abs
-#undef SDL_sinf
-#undef SDL_cosf
-#undef SDL_isdigit
-#undef SDL_isspace
-#undef SDL_toupper
-#undef SDL_tolower
-double SDL_ceil(double x) { return SDL_ceil_inline(x); }
-float SDL_cosf(float x) { return SDL_cosf_inline(x); }
-float SDL_sinf(float x) { return SDL_sinf_inline(x); }
-int SDL_abs(int x) { return SDL_abs_inline(x); }
-int SDL_isdigit(int x) { return SDL_isdigit_inline(x); }
-int SDL_isspace(int x) { return SDL_isspace_inline(x); }
-int SDL_toupper(int x) { return SDL_toupper_inline(x); }
-int SDL_tolower(int x) { return SDL_tolower_inline(x); }
+
+double
+SDL_atan(double x)
+{
+#ifdef HAVE_ATAN
+    return atan(x);
+#else
+    return SDL_uclibc_atan(x);
+#endif /* HAVE_ATAN */
+}
+
+double
+SDL_atan2(double x, double y)
+{
+#if defined(HAVE_ATAN2)
+    return atan2(x, y);
+#else
+    return SDL_uclibc_atan2(x, y);
+#endif /* HAVE_ATAN2 */
+}
+
+double
+SDL_ceil(double x)
+{
+#ifdef HAVE_CEIL
+    return ceil(x);
+#else
+    return (double)(int)((x)+0.5);
+#endif /* HAVE_CEIL */
+}
+
+double
+SDL_copysign(double x, double y)
+{
+#if defined(HAVE_COPYSIGN)
+    return copysign(x, y);
+#else
+    return SDL_uclibc_copysign(x, y);
+#endif /* HAVE_COPYSIGN */
+}
+
+double
+SDL_cos(double x)
+{
+#if defined(HAVE_COS)
+    return cos(x);
+#else
+    return SDL_uclibc_cos(x);
+#endif /* HAVE_COS */
+}
+
+float
+SDL_cosf(float x)
+{
+#ifdef HAVE_COSF
+    return cosf(x);
+#else
+    return (float)SDL_cos((double)x);
+#endif
+}
+
+double
+SDL_fabs(double x)
+{
+#if defined(HAVE_FABS)
+    return fabs(x); 
+#else
+    return SDL_uclibc_fabs(x);
+#endif /* HAVE_FABS */
+}
+
+double
+SDL_floor(double x)
+{
+#if defined(HAVE_FLOOR)
+    return floor(x);
+#else
+    return SDL_uclibc_floor(x);
+#endif /* HAVE_FLOOR */
+}
+
+double
+SDL_log(double x)
+{
+#if defined(HAVE_LOG)
+    return log(x);
+#else
+    return SDL_uclibc_log(x);
+#endif /* HAVE_LOG */
+}
+
+double
+SDL_pow(double x, double y)
+{
+#if defined(HAVE_POW)
+    return pow(x, y);
+#else
+    return SDL_uclibc_pow(x, y);
+#endif /* HAVE_POW */
+}
+
+double
+SDL_scalbn(double x, int n)
+{
+#if defined(HAVE_SCALBN)
+    return scalbn(x, n);
+#else
+    return SDL_uclibc_scalbn(x, n);
+#endif /* HAVE_SCALBN */
+}
+
+double
+SDL_sin(double x)
+{
+#if defined(HAVE_SIN)
+    return sin(x);
+#else
+    return SDL_uclibc_sin(x);
+#endif /* HAVE_SIN */
+}
+
+float 
+SDL_sinf(float x)
+{
+#ifdef HAVE_SINF
+    return sinf(x);
+#else
+    return (float)SDL_sin((double)x);
+#endif /* HAVE_SINF */
+}
+
+double
+SDL_sqrt(double x)
+{
+#if defined(HAVE_SQRT)
+    return sqrt(x);
+#else
+    return SDL_uclibc_sqrt(x);
+#endif
+}
+
+int SDL_abs(int x)
+{
+#ifdef HAVE_ABS
+    return abs(x);
+#else
+    return ((x) < 0 ? -(x) : (x));
+#endif
+}
+
+#ifdef HAVE_CTYPE_H
+int SDL_isdigit(int x) { return isdigit(x); }
+int SDL_isspace(int x) { return isspace(x); }
+int SDL_toupper(int x) { return toupper(x); }
+int SDL_tolower(int x) { return tolower(x); }
+#else
+int SDL_isdigit(int x) { return ((x) >= '0') && ((x) <= '9'); }
+int SDL_isspace(int x) { return ((x) == ' ') || ((x) == '\t') || ((x) == '\r') || ((x) == '\n'); }
+int SDL_toupper(int x) { return ((x) >= 'a') && ((x) <= 'z') ? ('A'+((x)-'a')) : (x); }
+int SDL_tolower(int x) { return ((x) >= 'A') && ((x) <= 'Z') ? ('a'+((x)-'A')) : (x); }
+#endif
 
 
 #ifndef HAVE_LIBC
diff --git a/src/stdlib/SDL_string.c b/src/stdlib/SDL_string.c
index f2b2f31f8..7d117169b 100644
--- a/src/stdlib/SDL_string.c
+++ b/src/stdlib/SDL_string.c
@@ -24,17 +24,6 @@
 
 #include "SDL_stdinc.h"
 
-/* these are always #defined, make them real symbol in the library, too... */
-#undef SDL_itoa
-#undef SDL_uitoa
-#undef SDL_atoi
-#undef SDL_atof
-char *SDL_itoa(int value, char *str, int radix) { return SDL_itoa_inline(value, str, radix); }
-char *SDL_uitoa(unsigned int value, char *str, int radix) { return SDL_uitoa_inline(value, str, radix); }
-int SDL_atoi(const char *str) { return SDL_atoi_inline(str); }
-double SDL_atof(const char *str) { return SDL_atof_inline(str); }
-
-
 
 #define SDL_isupperhex(X)   (((X) >= 'A') && ((X) <= 'F'))
 #define SDL_islowerhex(X)   (((X) >= 'a') && ((X) <= 'f'))
@@ -54,7 +43,7 @@ static int UTF8_TrailingBytes(unsigned char c)
         return 0;
 }
 
-#if !defined(SDL_sscanf) || !defined(SDL_strtol)
+#if !defined(HAVE_SSCANF) || !defined(HAVE_STRTOL)
 static size_t
 SDL_ScanLong(const char *text, int radix, long *valuep)
 {
@@ -95,7 +84,7 @@ SDL_ScanLong(const char *text, int radix, long *valuep)
 }
 #endif
 
-#if !defined(SDL_sscanf) || !defined(SDL_strtoul) || !defined(SDL_strtod)
+#if !defined(HAVE_SSCANF) || !defined(HAVE_STRTOUL) || !defined(HAVE_STRTOD)
 static size_t
 SDL_ScanUnsignedLong(const char *text, int radix, unsigned long *valuep)
 {
@@ -127,7 +116,7 @@ SDL_ScanUnsignedLong(const char *text, int radix, unsigned long *valuep)
 }
 #endif
 
-#ifndef SDL_sscanf
+#ifndef HAVE_SSCANF
 static size_t
 SDL_ScanUintPtrT(const char *text, int radix, uintptr_t * valuep)
 {
@@ -159,7 +148,7 @@ SDL_ScanUintPtrT(const char *text, int radix, uintptr_t * valuep)
 }
 #endif
 
-#if !defined(SDL_sscanf) || !defined(SDL_strtoll)
+#if !defined(HAVE_SSCANF) || !defined(HAVE_STRTOLL)
 static size_t
 SDL_ScanLongLong(const char *text, int radix, Sint64 * valuep)
 {
@@ -200,7 +189,7 @@ SDL_ScanLongLong(const char *text, int radix, Sint64 * valuep)
 }
 #endif
 
-#if !defined(SDL_sscanf) || !defined(SDL_strtoull)
+#if !defined(HAVE_SSCANF) || !defined(HAVE_STRTOULL)
 static size_t
 SDL_ScanUnsignedLongLong(const char *text, int radix, Uint64 * valuep)
 {
@@ -232,7 +221,7 @@ SDL_ScanUnsignedLongLong(const char *text, int radix, Uint64 * valuep)
 }
 #endif
 
-#if !defined(SDL_sscanf) || !defined(SDL_strtod)
+#if !defined(HAVE_SSCANF) || !defined(HAVE_STRTOD)
 static size_t
 SDL_ScanFloat(const char *text, double *valuep)
 {
@@ -268,14 +257,12 @@ SDL_ScanFloat(const char *text, double *valuep)
 }
 #endif
 
-
-#ifdef SDL_memset
-#undef SDL_memset
-void *SDL_memset(void *dst, int c, size_t len) { return SDL_memset_inline(dst, c, len); }
-#else
 void *
 SDL_memset(void *dst, int c, size_t len)
 {
+#if defined(HAVE_MEMSET)
+    return memset(dst, c, len);
+#else
     size_t left = (len % 4);
     Uint32 *dstp4;
     Uint8 *dstp1;
@@ -299,14 +286,9 @@ SDL_memset(void *dst, int c, size_t len)
     }
 
     return dst;
+#endif /* HAVE_MEMSET */
 }
-#endif
 
-
-#ifdef SDL_memcpy
-#undef SDL_memcpy
-void *SDL_memcpy(void *dst, const void *src, size_t len) { return SDL_memcpy_inline(dst, src, len); }
-#else
 void *
 SDL_memcpy(void *dst, const void *src, size_t len)
 {
@@ -315,6 +297,11 @@ SDL_memcpy(void *dst, const void *src, size_t len)
        On my machine this is twice as fast as the C code below.
      */
     return __builtin_memcpy(dst, src, len);
+#elif defined(HAVE_MEMCPY)
+    return memcpy(dst, src, len);
+#elif defined(HAVE_BCOPY)
+    bcopy(src, dst, len);
+    return dst;
 #else
     /* GCC 4.9.0 with -O3 will generate movaps instructions with the loop
        using Uint32* pointers, so we need to make sure the pointers are
@@ -354,16 +341,13 @@ SDL_memcpy(void *dst, const void *src, size_t len)
     return dst;
 #endif /* __GNUC__ */
 }
-#endif
 
-
-#ifdef SDL_memmove
-#undef SDL_memmove
-void *SDL_memmove(void *dst, const void *src, size_t len) { return SDL_memmove_inline(dst, src, len); }
-#else
 void *
 SDL_memmove(void *dst, const void *src, size_t len)
 {
+#if defined(HAVE_MEMMOVE)
+    return memmove(dst, src, len);
+#else
     char *srcp = (char *) src;
     char *dstp = (char *) dst;
 
@@ -379,16 +363,15 @@ SDL_memmove(void *dst, const void *src, size_t len)
         }
     }
     return dst;
+#endif /* HAVE_MEMMOVE */
 }
-#endif
 
-#ifdef SDL_memcmp
-#undef SDL_memcmp
-int SDL_memcmp(const void *s1, const void *s2, size_t len) { return SDL_memcmp_inline(s1, s2, len); }
-#else
 int
 SDL_memcmp(const void *s1, const void *s2, size_t len)
 {
+#if defined(HAVE_MEMCMP)
+    return memcmp(s1, s2, len);
+#else
     char *s1p = (char *) s1;
     char *s2p = (char *) s2;
     while (len--) {
@@ -399,46 +382,43 @@ SDL_memcmp(const void *s1, const void *s2, size_t len)
         ++s2p;
     }
     return 0;
+#endif /* HAVE_MEMCMP */
 }
-#endif
 
-#ifdef SDL_strlen
-#undef SDL_strlen
-size_t SDL_strlen(const char *string) { return SDL_strlen_inline(string); }
-#else
 size_t
 SDL_strlen(const char *string)
 {
+#if defined(HAVE_STRLEN)
+    return strlen(str);
+#else
     size_t len = 0;
     while (*string++) {
         ++len;
     }
     return len;
+#endif /* HAVE_STRLEN */
 }
-#endif
 
-#ifdef SDL_wcslen
-#undef SDL_wcslen
-size_t SDL_wcslen(const wchar_t * string) { return SDL_wcslen_inline(string); }
-#else
 size_t
 SDL_wcslen(const wchar_t * string)
 {
+#if defined(HAVE_WCSLEN)
+    return wcslen(wstr);
+#else
     size_t len = 0;
     while (*string++) {
         ++len;
     }
     return len;
+#endif /* HAVE_WCSLEN */
 }
-#endif
 
-#ifdef SDL_wcslcpy
-#undef SDL_wcslcpy
-size_t SDL_wcslcpy(wchar_t *dst, const wchar_t *src, size_t maxlen) { return SDL_wcslcpy_inline(dst, src, maxlen); }
-#else
 size_t
 SDL_wcslcpy(wchar_t *dst, const wchar_t *src, size_t maxlen)
 {
+#if defined(HAVE_WCSLCPY)
+    return wcslcpy(dst, src, maxlen);
+#else
     size_t srclen = SDL_wcslen(src);
     if (maxlen > 0) {
         size_t len = SDL_min(srclen, maxlen - 1);
@@ -446,32 +426,30 @@ SDL_wcslcpy(wchar_t *dst, const wchar_t *src, size_t maxlen)
         dst[len] = '\0';
     }
     return srclen;
+#endif /* HAVE_WCSLCPY */
 }
-#endif
 
-#ifdef SDL_wcslcat
-#undef SDL_wcslcat
-size_t SDL_wcslcat(wchar_t *dst, const wchar_t *src, size_t maxlen) { return SDL_wcslcat_inline(dst, src, maxlen); }
-#else
 size_t
 SDL_wcslcat(wchar_t *dst, const wchar_t *src, size_t maxlen)
 {
+#if defined(HAVE_WCSLCAT)
+    return wcslcat(dst, src, maxlen);
+#else
     size_t dstlen = SDL_wcslen(dst);
     size_t srclen = SDL_wcslen(src);
     if (dstlen < maxlen) {
         SDL_wcslcpy(dst + dstlen, src, maxlen - dstlen);
     }
     return dstlen + srclen;
+#endif /* HAVE_WCSLCAT */
 }
-#endif
 
-#ifdef SDL_strlcpy
-#undef SDL_strlcpy
-size_t SDL_strlcpy(char *dst, const char *src, size_t maxlen) { return SDL_strlcpy_inline(dst, src, maxlen); }
-#else
 size_t
 SDL_strlcpy(char *dst, const char *src, size_t maxlen)
 {
+#if defined(HAVE_STRLCPY)
+    return strlcpy(dst, src, maxlen);
+#else
     size_t srclen = SDL_strlen(src);
     if (maxlen > 0) {
         size_t len = SDL_min(srclen, maxlen - 1);
@@ -479,8 +457,8 @@ SDL_strlcpy(char *dst, const char *src, size_t maxlen)
         dst[len] = '\0';
     }
     return srclen;
+#endif /* HAVE_STRLCPY */
 }
-#endif
 
 size_t SDL_utf8strlcpy(char *dst, const char *src, size_t dst_bytes)
 {
@@ -514,45 +492,42 @@ size_t SDL_utf8strlcpy(char *dst, const char *src, size_t dst_bytes)
     return bytes;
 }
 
-#ifdef SDL_strlcat
-#undef SDL_strlcat
-size_t SDL_strlcat(char *dst, const char *src, size_t maxlen) { return SDL_strlcat_inline(dst, src, maxlen); }
-#else
 size_t
 SDL_strlcat(char *dst, const char *src, size_t maxlen)
 {
+#if defined(HAVE_STRLCAT)
+    return strlcat(dst, src, maxlen);
+#else
     size_t dstlen = SDL_strlen(dst);
     size_t srclen = SDL_strlen(src);
     if (dstlen < maxlen) {
         SDL_strlcpy(dst + dstlen, src, maxlen - dstlen);
     }
     return dstlen + srclen;
+#endif /* HAVE_STRLCAT */
 }
-#endif
 
-#ifdef SDL_strdup
-#undef SDL_strdup
-char *SDL_strdup(const char *string) { return SDL_strdup_inline(string); }
-#else
 char *
 SDL_strdup(const char *string)
 {
+#if defined(HAVE_STRDUP)
+    return strdup(str);
+#else
     size_t len = SDL_strlen(string) + 1;
     char *newstr = SDL_malloc(len);
     if (newstr) {
         SDL_strlcpy(newstr, string, len);
     }
     return newstr;
+#endif /* HAVE_STRDUP */
 }
-#endif
 
-#ifdef SDL_strrev
-#undef SDL_strrev
-char *SDL_strrev(char *string) { return SDL_strrev_inline(string); }
-#else
 char *
 SDL_strrev(char *string)
 {
+#if defined(HAVE__STRREV)
+    return _strrev(str);
+#else
     size_t len = SDL_strlen(string);
     char *a = &string[0];
     char *b = &string[len - 1];
@@ -563,48 +538,47 @@ SDL_strrev(char *string)
         *b-- = c;
     }
     return string;
+#endif /* HAVE__STRREV */
 }
-#endif
 
-#ifdef SDL_strupr
-#undef SDL_strupr
-char *SDL_strupr(char *string) { return SDL_strupr_inline(string); }
-#else
 char *
 SDL_strupr(char *string)
 {
+#if defined(HAVE__STRUPR)
+    return _strupr(str);
+#else
     char *bufp = string;
     while (*bufp) {
         *bufp = SDL_toupper((unsigned char) *bufp);
         ++bufp;
     }
     return string;
+#endif /* HAVE__STRUPR */
 }
-#endif
 
-#ifdef SDL_strlwr
-#undef SDL_strlwr
-char *SDL_strlwr(char *string) { return SDL_strlwr_inline(string); }
-#else
 char *
 SDL_strlwr(char *string)
 {
+#if defined(HAVE__STRLWR)
+    return _strlwr(str);
+#else
     char *bufp = string;
     while (*bufp) {
         *bufp = SDL_tolower((unsigned char) *bufp);
         ++bufp;
     }
     return string;
+#endif /* HAVE__STRLWR */
 }
-#endif
 
-#ifdef SDL_strchr
-#undef SDL_strchr
-char *SDL_strchr(const char *string, int c) { return SDL_strchr_inline(string, c); }
-#else
 char *
 SDL_strchr(const char *string, int c)
 {
+#ifdef HAVE_STRCHR
+    return SDL_const_cast(char*,strchr(str, c));
+#elif defined(HAVE_INDEX)
+    return SDL_const_cast(char*,index(str, c));
+#else
     while (*string) {
         if (*string == c) {
             return (char *) string;
@@ -612,16 +586,17 @@ SDL_strchr(const char *string, int c)
         ++string;
     }
     return NULL;
+#endif /* HAVE_STRCHR */
 }
-#endif
 
-#ifdef SDL_strrchr
-#undef SDL_strrchr
-char *SDL_strrchr(const char *string, int c) { return SDL_strrchr_inline(string, c); }
-#else
 char *
 SDL_strrchr(const char *string, int c)
 {
+#ifdef HAVE_STRRCHR
+    return SDL_const_cast(char*,strrchr(str, c));
+#elif defined(HAVE_RINDEX)
+    return SDL_const_cast(char*,rindex(str, c));
+#else
     const char *bufp = string + SDL_strlen(string) - 1;
     while (bufp >= string) {
         if (*bufp == c) {
@@ -630,16 +605,15 @@ SDL_strrchr(const char *string, int c)
         --bufp;
     }
     return NULL;
+#endif /* HAVE_STRRCHR */
 }
-#endif
 
-#ifdef SDL_strstr
-#undef SDL_strstr
-char *SDL_strstr(const char *haystack, const char *needle) { return SDL_strstr_inline(haystack, needle); }
-#else
 char *
 SDL_strstr(const char *haystack, const char *needle)
 {
+#if defined(HAVE_STRSTR)
+    return SDL_const_cast(char*,strstr(haystack, needle));
+#else
     size_t length = SDL_strlen(needle);
     while (*haystack) {
         if (SDL_strncmp(haystack, needle, length) == 0) {
@@ -648,10 +622,10 @@ SDL_strstr(const char *haystack, const char *needle)
         ++haystack;
     }
     return NULL;
+#endif /* HAVE_STRSTR */
 }
-#endif
 
-#if !defined(SDL_ltoa) || !defined(SDL_lltoa) || \
+#if !defined(HAVE__LTOA) || !defined(SDL_lltoa) || \
     !defined(SDL_ultoa) || !defined(SDL_ulltoa)
 static const char ntoa_table[] = {
     '0', '1', '2', '3', '4', '5', '6', '7', '8', '9',
@@ -661,13 +635,32 @@ static const char ntoa_table[] = {
 };
 #endif /* ntoa() conversion table */
 
-#ifdef SDL_ltoa
-#undef SDL_ltoa
-char *SDL_ltoa(long value, char *string, int radix) { return SDL_ltoa_inline(value, string, radix); }
+char *
+SDL_itoa(int value, char *str, int radix)
+{
+#ifdef HAVE_ITOA
+    return itoa(value, str, radix);
 #else
+    return SDL_ltoa((long)value, str, radix);
+#endif /* HAVE_ITOA */
+}
+
+char *
+SDL_uitoa(unsigned int value, char *str, int radix)
+{
+#ifdef HAVE__UITOA
+    return _uitoa(value, str, radix);
+#else
+    return SDL_ultoa((unsigned long)value, str, radix);
+#endif /* HAVE__UITOA */
+}
+
 char *
 SDL_ltoa(long value, char *string, int radix)
 {
+#if defined(HAVE__LTOA)
+    return _ltoa(value, str, radix);
+#else
     char *bufp = string;
 
     if (value < 0) {
@@ -692,16 +685,15 @@ SDL_ltoa(long value, char *string, int radix)
     }
 
     return string;
+#endif /* HAVE__LTOA */
 }
-#endif
 
-#ifdef SDL_ultoa
-#undef SDL_ultoa
-char *SDL_ultoa(unsigned long value, char *string, int radix) { return SDL_ultoa_inline(value, string, radix); }
-#else
 char *
 SDL_ultoa(unsigned long value, char *string, int radix)
 {
+#if defined(HAVE__ULTOA)
+    return _ultoa(value, str, radix);
+#else
     char *bufp = string;
 
     if (value) {
@@ -718,16 +710,91 @@ SDL_ultoa(unsigned long value, char *string, int radix)
     SDL_strrev(string);
 
     return string;
+#endif /* HAVE__ULTOA */
 }
-#endif
 
-#ifdef SDL_strtol
-#undef SDL_strtol
-long SDL_strtol(const char *string, char **endp, int base) { return SDL_strtol_inline(string, endp, base); }
+char *
+SDL_lltoa(Sint64 value, char *string, int radix)
+{
+#if defined(HAVE__I64TOA)
+    return _i64toa(value, str, radix);
 #else
+    char *bufp = string;
+
+    if (value < 0) {
+        *bufp++ = '-';
+        value = -value;
+    }
+    if (value) {
+        while (value > 0) {
+            *bufp++ = ntoa_table[value % radix];
+            value /= radix;
+        }
+    } else {
+        *bufp++ = '0';
+    }
+    *bufp = '\0';
+
+    /* The numbers went into the string backwards. :) */
+    if (*string == '-') {
+        SDL_strrev(string + 1);
+    } else {
+        SDL_strrev(string);
+    }
+
+    return string;
+#endif /* HAVE__I64TOA */
+}
+
+char *
+SDL_ulltoa(Uint64 value, char *string, int radix)
+{
+#if defined(HAVE__UI64TOA)
+    return _ui64toa(value, str, radix);
+#else
+    char *bufp = string;
+
+    if (value) {
+        while (value > 0) {
+            *bufp++ = ntoa_table[value % radix];
+            value /= radix;
+        }
+    } else {
+        *bufp++ = '0';
+    }
+    *bufp = '\0';
+
+    /* The numbers went into the string backwards. :) */
+    SDL_strrev(string);
+
+    return string;
+#endif /* HAVE__UI64TOA */
+}
+
+int SDL_atoi(const char *str)
+{
+#ifdef HAVE_ATOI
+    return atoi(str);
+#else
+    return SDL_strtol(str, NULL, 0);
+#endif /* HAVE_ATOI */
+}
+
+double SDL_atof(const char *str)
+{
+#ifdef HAVE_ATOF
+    return (double) atof(str);
+#else
+    return SDL_strtod(str, NULL);
+#endif /* HAVE_ATOF */
+}
+
 long
 SDL_strtol(const char *string, char **endp, int base)
 {
+#if defined(HAVE_STRTOL)
+    return strtol(str, endp, base);
+#else
     size_t len;
     long value;
 
@@ -744,16 +811,15 @@ SDL_strtol(const char *string, char **endp, int base)
         *endp = (char *) string + len;
     }
     return value;
+#endif /* HAVE_STRTOL */
 }
-#endif
 
-#ifdef SDL_strtoul
-#undef SDL_strtoul
-unsigned long SDL_strtoul(const char *string, char **endp, int base) { return SDL_strtoul_inline(string, endp, base); }
-#else
 unsigned long
 SDL_strtoul(const char *string, char **endp, int base)
 {
+#if defined(HAVE_STRTOUL)
+    return strtoul(str, endp, base);
+#else
     size_t len;
     unsigned long value;
 
@@ -770,76 +836,15 @@ SDL_strtoul(const char *string, char **endp, int base)
         *endp = (char *) string + len;
     }
     return value;
+#endif /* HAVE_STRTOUL */
 }
-#endif
 
-#ifdef SDL_lltoa
-#undef SDL_lltoa
-char *SDL_lltoa(Sint64 value, char *string, int radix) { return SDL_lltoa_inline(value, string, radix); }
-#else
-char *
-SDL_lltoa(Sint64 value, char *string, int radix)
-{
-    char *bufp = string;
-
-    if (value < 0) {
-        *bufp++ = '-';
-        value = -value;
-    }
-    if (value) {
-        while (value > 0) {
-            *bufp++ = ntoa_table[value % radix];
-            value /= radix;
-        }
-    } else {
-        *bufp++ = '0';
-    }
-    *bufp = '\0';
-
-    /* The numbers went into the string backwards. :) */
-    if (*string == '-') {
-        SDL_strrev(string + 1);
-    } else {
-        SDL_strrev(string);
-    }
-
-    return string;
-}
-#endif
-
-#ifdef SDL_ulltoa
-#undef SDL_ulltoa
-char *SDL_ulltoa(Uint64 value, char *string, int radix) { return SDL_ulltoa_inline(value, string, radix); }
-#else
-char *
-SDL_ulltoa(Uint64 value, char *string, int radix)
-{
-    char *bufp = string;
-
-    if (value) {
-        while (value > 0) {
-            *bufp++ = ntoa_table[value % radix];
-            value /= radix;
-        }
-    } else {
-        *bufp++ = '0';
-    }
-    *bufp = '\0';
-
-    /* The numbers went into the string backwards. :) */
-    SDL_strrev(string);
-
-    return string;
-}
-#endif
-
-#ifdef SDL_strtoll
-#undef SDL_strtoll
-Sint64 SDL_strtoll(const char *string, char **endp, int base) { return SDL_strtoll_inline(string, endp, base); }
-#else
 Sint64
 SDL_strtoll(const char *string, char **endp, int base)
 {
+#if defined(HAVE_STRTOLL)
+    return strtoll(str, endp, base);
+#else
     size_t len;
     Sint64 value;
 
@@ -856,16 +861,15 @@ SDL_strtoll(const char *string, char **endp, int base)
         *endp = (char *) string + len;
     }
     return value;
+#endif /* HAVE_STRTOLL */
 }
-#endif
 
-#ifdef SDL_strtoull
-#undef SDL_strtoull
-Uint64 SDL_strtoull(const char *string, char **endp, int base) { return SDL_strtoull_inline(string, endp, base); }
-#else
 Uint64
 SDL_strtoull(const char *string, char **endp, int base)
 {
+#if defined(HAVE_STRTOULL)
+    return strtoull(str, endp, base);
+#else
     size_t len;
     Uint64 value;
 
@@ -882,16 +886,15 @@ SDL_strtoull(const char *string, char **endp, int base)
         *endp = (char *) string + len;
     }
     return value;
+#endif /* HAVE_STRTOULL */
 }
-#endif
 
-#ifdef SDL_strtod
-#undef SDL_strtod
-double SDL_strtod(const char *string, char **endp) { return SDL_strtod_inline(string, endp); }
-#else
 double
 SDL_strtod(const char *string, char **endp)
 {
+#if defined(HAVE_STRTOD)
+    return strtod(str, endp);
+#else
     size_t len;
     double value;
 
@@ -900,16 +903,15 @@ SDL_strtod(const char *string, char **endp)
         *endp = (char *) string + len;
     }
     return value;
+#endif /* HAVE_STRTOD */
 }
-#endif
 
-#ifdef SDL_strcmp
-#undef SDL_strcmp
-int SDL_strcmp(const char *str1, const char *str2) { return SDL_strcmp_inline(str1, str2); }
-#else
 int
 SDL_strcmp(const char *str1, const char *str2)
 {
+#if defined(HAVE_STRCMP)
+    return strcmp(str1, str2);
+#else
     while (*str1 && *str2) {
         if (*str1 != *str2)
             break;
@@ -917,16 +919,15 @@ SDL_strcmp(const char *str1, const char *str2)
         ++str2;
     }
     return (int) ((unsigned char) *str1 - (unsigned char) *str2);
+#endif /* HAVE_STRCMP */
 }
-#endif
 
-#ifdef SDL_strncmp
-#undef SDL_strncmp
-int SDL_strncmp(const char *str1, const char *str2, size_t maxlen) { return SDL_strncmp_inline(str1, str2, maxlen); }
-#else
 int
 SDL_strncmp(const char *str1, const char *str2, size_t maxlen)
 {
+#if defined(HAVE_STRNCMP)
+    return strncmp(str1, str2, maxlen);
+#else
     while (*str1 && *str2 && maxlen) {
         if (*str1 != *str2)
             break;
@@ -938,39 +939,41 @@ SDL_strncmp(const char *str1, const char *str2, size_t maxlen)
         return 0;
     }
     return (int) ((unsigned char) *str1 - (unsigned char) *str2);
+#endif /* HAVE_STRNCMP */
 }
-#endif
 
-#ifdef SDL_strcasecmp
-#undef SDL_strcasecmp
-int SDL_strcasecmp(const char *str1, const char *str2) { return SDL_strcasecmp_inline(str1, str2); }
-#else
 int
 SDL_strcasecmp(const char *str1, const char *str2)
 {
+#ifdef HAVE_STRCASECMP
+    return strcasecmp(str1, str2);
+#elif defined(HAVE__STRICMP)
+    return _stricmp(str1, str2);
+#else
     char a = 0;
     char b = 0;
     while (*str1 && *str2) {
-        a = SDL_tolower((unsigned char) *str1);
-        b = SDL_tolower((unsigned char) *str2);
+        a = SDL_toupper((unsigned char) *str1);
+        b = SDL_toupper((unsigned char) *str2);
         if (a != b)
             break;
         ++str1;
         ++str2;
     }
-    a = SDL_tolower(*str1);
-    b = SDL_tolower(*str2);
+    a = SDL_toupper(*str1);
+    b = SDL_toupper(*str2);
     return (int) ((unsigned char) a - (unsigned char) b);
+#endif /* HAVE_STRCASECMP */
 }
-#endif
 
-#ifdef SDL_strncasecmp
-#undef SDL_strncasecmp
-int SDL_strncasecmp(const char *str1, const char *str2, size_t maxlen) { return SDL_strncasecmp_inline(str1, str2, maxlen); }
-#else
 int
 SDL_strncasecmp(const char *str1, const char *str2, size_t maxlen)
 {
+#ifdef HAVE_STRNCASECMP
+    return strncasecmp(str1, str2, len);
+#elif defined(HAVE__STRNICMP)
+    return _strnicmp(str1, str2, len);
+#else
     char a = 0;
     char b = 0;
     while (*str1 && *str2 && maxlen) {
@@ -989,11 +992,10 @@ SDL_strncasecmp(const char *str1, const char *str2, size_t maxlen)
         b = SDL_tolower((unsigned char) *str2);
         return (int) ((unsigned char) a - (unsigned char) b);
     }
+#endif /* HAVE_STRNCASECMP */
 }
-#endif
 
-#ifdef SDL_sscanf
-#undef SDL_sscanf
+#ifdef HAVE_SSCANF
 int
 SDL_sscanf(const char *text, const char *fmt, ...)
 {
@@ -1269,12 +1271,8 @@ SDL_sscanf(const char *text, const char *fmt, ...)
 
     return retval;
 }
-#endif
+#endif /* HAVE_SSCANF */
 
-/* just undef; the headers only define this to snprintf because of varargs. */
-#ifdef SDL_snprintf
-#undef SDL_snprintf
-#endif
 int
 SDL_snprintf(char *text, size_t maxlen, const char *fmt, ...)
 {
@@ -1288,9 +1286,11 @@ SDL_snprintf(char *text, size_t maxlen, const char *fmt, ...)
     return retval;
 }
 
-#ifdef SDL_vsnprintf
-#undef SDL_vsnprintf
-int SDL_vsnprintf(char *text, size_t maxlen, const char *fmt, va_list ap) { return SDL_vsnprintf_inline(text, maxlen, fmt, ap); }
+#ifdef HAVE_VSNPRINTF
+int SDL_vsnprintf(char *text, size_t maxlen, const char *fmt, va_list ap)
+{
+    return vsnprintf(text, maxlen, fmt, ap);
+}
 #else
  /* FIXME: implement more of the format specifiers */
 typedef struct
@@ -1633,6 +1633,6 @@ SDL_vsnprintf(char *text, size_t maxlen, const char *fmt, va_list ap)
     }
     return (int)(text - textstart);
 }
-#endif
+#endif /* HAVE_VSNPRINTF */
 
 /* vi: set ts=4 sw=4 expandtab: */
diff --git a/src/video/SDL_RLEaccel.c b/src/video/SDL_RLEaccel.c
index e1f12d13b..25ecd4556 100644
--- a/src/video/SDL_RLEaccel.c
+++ b/src/video/SDL_RLEaccel.c
@@ -98,13 +98,7 @@
 #endif
 
 #define PIXEL_COPY(to, from, len, bpp)          \
-do {                            \
-    if(bpp == 4) {                  \
-    SDL_memcpy4(to, from, (size_t)(len));       \
-    } else {                        \
-    SDL_memcpy(to, from, (size_t)(len) * (bpp));    \
-    }                           \
-} while(0)
+    SDL_memcpy(to, from, (size_t)(len) * (bpp))
 
 /*
  * Various colorkey blit methods, for opaque and per-surface alpha

From ed07a40c6213a437140872f067384c7209d25c04 Mon Sep 17 00:00:00 2001
From: Sam Lantinga 
Date: Sat, 6 Jul 2013 00:06:44 -0700
Subject: [PATCH 265/542] Fixed build errors on Mac OS X

---
 src/libm/math_libm.h    |  1 +
 src/stdlib/SDL_string.c | 28 ++++++++++++++--------------
 2 files changed, 15 insertions(+), 14 deletions(-)

diff --git a/src/libm/math_libm.h b/src/libm/math_libm.h
index 8d7ac30c2..45a34d8ae 100644
--- a/src/libm/math_libm.h
+++ b/src/libm/math_libm.h
@@ -18,6 +18,7 @@
      misrepresented as being the original software.
   3. This notice may not be removed or altered from any source distribution.
 */
+#include "SDL_config.h"
 
 /* Math routines from uClibc: http://www.uclibc.org */
 
diff --git a/src/stdlib/SDL_string.c b/src/stdlib/SDL_string.c
index 7d117169b..8eacb61bd 100644
--- a/src/stdlib/SDL_string.c
+++ b/src/stdlib/SDL_string.c
@@ -389,7 +389,7 @@ size_t
 SDL_strlen(const char *string)
 {
 #if defined(HAVE_STRLEN)
-    return strlen(str);
+    return strlen(string);
 #else
     size_t len = 0;
     while (*string++) {
@@ -403,7 +403,7 @@ size_t
 SDL_wcslen(const wchar_t * string)
 {
 #if defined(HAVE_WCSLEN)
-    return wcslen(wstr);
+    return wcslen(string);
 #else
     size_t len = 0;
     while (*string++) {
@@ -511,7 +511,7 @@ char *
 SDL_strdup(const char *string)
 {
 #if defined(HAVE_STRDUP)
-    return strdup(str);
+    return strdup(string);
 #else
     size_t len = SDL_strlen(string) + 1;
     char *newstr = SDL_malloc(len);
@@ -575,9 +575,9 @@ char *
 SDL_strchr(const char *string, int c)
 {
 #ifdef HAVE_STRCHR
-    return SDL_const_cast(char*,strchr(str, c));
+    return SDL_const_cast(char*,strchr(string, c));
 #elif defined(HAVE_INDEX)
-    return SDL_const_cast(char*,index(str, c));
+    return SDL_const_cast(char*,index(string, c));
 #else
     while (*string) {
         if (*string == c) {
@@ -593,9 +593,9 @@ char *
 SDL_strrchr(const char *string, int c)
 {
 #ifdef HAVE_STRRCHR
-    return SDL_const_cast(char*,strrchr(str, c));
+    return SDL_const_cast(char*,strrchr(string, c));
 #elif defined(HAVE_RINDEX)
-    return SDL_const_cast(char*,rindex(str, c));
+    return SDL_const_cast(char*,rindex(string, c));
 #else
     const char *bufp = string + SDL_strlen(string) - 1;
     while (bufp >= string) {
@@ -793,7 +793,7 @@ long
 SDL_strtol(const char *string, char **endp, int base)
 {
 #if defined(HAVE_STRTOL)
-    return strtol(str, endp, base);
+    return strtol(string, endp, base);
 #else
     size_t len;
     long value;
@@ -818,7 +818,7 @@ unsigned long
 SDL_strtoul(const char *string, char **endp, int base)
 {
 #if defined(HAVE_STRTOUL)
-    return strtoul(str, endp, base);
+    return strtoul(string, endp, base);
 #else
     size_t len;
     unsigned long value;
@@ -843,7 +843,7 @@ Sint64
 SDL_strtoll(const char *string, char **endp, int base)
 {
 #if defined(HAVE_STRTOLL)
-    return strtoll(str, endp, base);
+    return strtoll(string, endp, base);
 #else
     size_t len;
     Sint64 value;
@@ -868,7 +868,7 @@ Uint64
 SDL_strtoull(const char *string, char **endp, int base)
 {
 #if defined(HAVE_STRTOULL)
-    return strtoull(str, endp, base);
+    return strtoull(string, endp, base);
 #else
     size_t len;
     Uint64 value;
@@ -893,7 +893,7 @@ double
 SDL_strtod(const char *string, char **endp)
 {
 #if defined(HAVE_STRTOD)
-    return strtod(str, endp);
+    return strtod(string, endp);
 #else
     size_t len;
     double value;
@@ -970,9 +970,9 @@ int
 SDL_strncasecmp(const char *str1, const char *str2, size_t maxlen)
 {
 #ifdef HAVE_STRNCASECMP
-    return strncasecmp(str1, str2, len);
+    return strncasecmp(str1, str2, maxlen);
 #elif defined(HAVE__STRNICMP)
-    return _strnicmp(str1, str2, len);
+    return _strnicmp(str1, str2, maxlen);
 #else
     char a = 0;
     char b = 0;

From 8ad9316ca371614719693d432d6d2ccdd9561737 Mon Sep 17 00:00:00 2001
From: Sam Lantinga 
Date: Sat, 6 Jul 2013 00:15:01 -0700
Subject: [PATCH 266/542] Fixed mingw32 build

---
 src/stdlib/SDL_string.c | 42 ++++++++++++++++++++---------------------
 1 file changed, 21 insertions(+), 21 deletions(-)

diff --git a/src/stdlib/SDL_string.c b/src/stdlib/SDL_string.c
index 8eacb61bd..82d5232fc 100644
--- a/src/stdlib/SDL_string.c
+++ b/src/stdlib/SDL_string.c
@@ -526,7 +526,7 @@ char *
 SDL_strrev(char *string)
 {
 #if defined(HAVE__STRREV)
-    return _strrev(str);
+    return _strrev(string);
 #else
     size_t len = SDL_strlen(string);
     char *a = &string[0];
@@ -545,7 +545,7 @@ char *
 SDL_strupr(char *string)
 {
 #if defined(HAVE__STRUPR)
-    return _strupr(str);
+    return _strupr(string);
 #else
     char *bufp = string;
     while (*bufp) {
@@ -560,7 +560,7 @@ char *
 SDL_strlwr(char *string)
 {
 #if defined(HAVE__STRLWR)
-    return _strlwr(str);
+    return _strlwr(string);
 #else
     char *bufp = string;
     while (*bufp) {
@@ -625,8 +625,8 @@ SDL_strstr(const char *haystack, const char *needle)
 #endif /* HAVE_STRSTR */
 }
 
-#if !defined(HAVE__LTOA) || !defined(SDL_lltoa) || \
-    !defined(SDL_ultoa) || !defined(SDL_ulltoa)
+#if !defined(HAVE__LTOA) || !defined(HAVE__I64TOA) || \
+    !defined(HAVE__ULTOA) || !defined(HAVE__UI64TOA)
 static const char ntoa_table[] = {
     '0', '1', '2', '3', '4', '5', '6', '7', '8', '9',
     'A', 'B', 'C', 'D', 'E', 'F', 'G', 'H', 'I', 'J',
@@ -636,22 +636,22 @@ static const char ntoa_table[] = {
 #endif /* ntoa() conversion table */
 
 char *
-SDL_itoa(int value, char *str, int radix)
+SDL_itoa(int value, char *string, int radix)
 {
 #ifdef HAVE_ITOA
-    return itoa(value, str, radix);
+    return itoa(value, string, radix);
 #else
-    return SDL_ltoa((long)value, str, radix);
+    return SDL_ltoa((long)value, string, radix);
 #endif /* HAVE_ITOA */
 }
 
 char *
-SDL_uitoa(unsigned int value, char *str, int radix)
+SDL_uitoa(unsigned int value, char *string, int radix)
 {
 #ifdef HAVE__UITOA
-    return _uitoa(value, str, radix);
+    return _uitoa(value, string, radix);
 #else
-    return SDL_ultoa((unsigned long)value, str, radix);
+    return SDL_ultoa((unsigned long)value, string, radix);
 #endif /* HAVE__UITOA */
 }
 
@@ -659,7 +659,7 @@ char *
 SDL_ltoa(long value, char *string, int radix)
 {
 #if defined(HAVE__LTOA)
-    return _ltoa(value, str, radix);
+    return _ltoa(value, string, radix);
 #else
     char *bufp = string;
 
@@ -692,7 +692,7 @@ char *
 SDL_ultoa(unsigned long value, char *string, int radix)
 {
 #if defined(HAVE__ULTOA)
-    return _ultoa(value, str, radix);
+    return _ultoa(value, string, radix);
 #else
     char *bufp = string;
 
@@ -717,7 +717,7 @@ char *
 SDL_lltoa(Sint64 value, char *string, int radix)
 {
 #if defined(HAVE__I64TOA)
-    return _i64toa(value, str, radix);
+    return _i64toa(value, string, radix);
 #else
     char *bufp = string;
 
@@ -750,7 +750,7 @@ char *
 SDL_ulltoa(Uint64 value, char *string, int radix)
 {
 #if defined(HAVE__UI64TOA)
-    return _ui64toa(value, str, radix);
+    return _ui64toa(value, string, radix);
 #else
     char *bufp = string;
 
@@ -771,21 +771,21 @@ SDL_ulltoa(Uint64 value, char *string, int radix)
 #endif /* HAVE__UI64TOA */
 }
 
-int SDL_atoi(const char *str)
+int SDL_atoi(const char *string)
 {
 #ifdef HAVE_ATOI
-    return atoi(str);
+    return atoi(string);
 #else
-    return SDL_strtol(str, NULL, 0);
+    return SDL_strtol(string, NULL, 0);
 #endif /* HAVE_ATOI */
 }
 
-double SDL_atof(const char *str)
+double SDL_atof(const char *string)
 {
 #ifdef HAVE_ATOF
-    return (double) atof(str);
+    return (double) atof(string);
 #else
-    return SDL_strtod(str, NULL);
+    return SDL_strtod(string, NULL);
 #endif /* HAVE_ATOF */
 }
 

From cbc0db6e72bea108c20b0ba0b192e99e495b2a82 Mon Sep 17 00:00:00 2001
From: Sam Lantinga 
Date: Sat, 6 Jul 2013 00:28:54 -0700
Subject: [PATCH 267/542] Fixed bug 1936 - Broken URL in generic SDL_syscond.c

cp.ml.x.dev

A comment in 'src/thread/generic/SDL_syscond.c' references the URL 'http://www-classic.be.com/aboutbe/benewsletter/volume_III/Issue40.html', which cannot be resolved anymore. An alternative would be 'http://web.archive.org/web/20010914175514/http://www-classic.be.com/aboutbe/benewsletter/volume_III/Issue40.html#Workshop'.
---
 src/thread/generic/SDL_syscond.c | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/src/thread/generic/SDL_syscond.c b/src/thread/generic/SDL_syscond.c
index f540cddb6..5c8fe8bd6 100644
--- a/src/thread/generic/SDL_syscond.c
+++ b/src/thread/generic/SDL_syscond.c
@@ -187,7 +187,7 @@ SDL_CondWaitTimeout(SDL_cond * cond, SDL_mutex * mutex, Uint32 ms)
        the signaler can race ahead and get the condition semaphore
        if we are stopped between the mutex unlock and semaphore wait,
        giving a deadlock.  See the following URL for details:
-       http://www-classic.be.com/aboutbe/benewsletter/volume_III/Issue40.html
+       http://web.archive.org/web/20010914175514/http://www-classic.be.com/aboutbe/benewsletter/volume_III/Issue40.html#Workshop
      */
     SDL_LockMutex(cond->lock);
     if (cond->signals > 0) {

From 2015d5faa66c22c8202e36cc1b7d730ff31dd397 Mon Sep 17 00:00:00 2001
From: Sam Lantinga 
Date: Sat, 6 Jul 2013 00:32:20 -0700
Subject: [PATCH 268/542] Fixed potential problem with postFinishLaunch being
 overridden by the application.

Vittorio Giovara

I find that the calling point in SDL_uikitappdelegate.m is dangerous as the -(void) postFinishLaunch method can be overridden when subclassing.
Could this be moved in inside the init or in the didFinishLaunchingWithOptions method which are always called even when subclassed?
---
 src/video/uikit/SDL_uikitappdelegate.m | 3 +--
 1 file changed, 1 insertion(+), 2 deletions(-)

diff --git a/src/video/uikit/SDL_uikitappdelegate.m b/src/video/uikit/SDL_uikitappdelegate.m
index 3b544db2c..d37a09124 100644
--- a/src/video/uikit/SDL_uikitappdelegate.m
+++ b/src/video/uikit/SDL_uikitappdelegate.m
@@ -186,8 +186,6 @@ static void SDL_IdleTimerDisabledChanged(const char *name, const char *oldValue,
 
 - (void)postFinishLaunch
 {
-    SDL_SetMainReady();
-
     /* run the user's application, passing argc and argv */
     SDL_iPhoneSetEventPump(SDL_TRUE);
     exit_status = SDL_main(forward_argc, forward_argv);
@@ -223,6 +221,7 @@ static void SDL_IdleTimerDisabledChanged(const char *name, const char *oldValue,
     SDL_SetHint(SDL_HINT_IDLE_TIMER_DISABLED, "0");
     SDL_RegisterHintChangedCb(SDL_HINT_IDLE_TIMER_DISABLED, &SDL_IdleTimerDisabledChanged);
 
+    SDL_SetMainReady();
     [self performSelector:@selector(postFinishLaunch) withObject:nil afterDelay:0.0];
 
     return YES;

From a9558933a9e31081f7bb3d2ec5fd95c166013c23 Mon Sep 17 00:00:00 2001
From: Philipp Wiesemann 
Date: Sat, 6 Jul 2013 15:56:06 +0200
Subject: [PATCH 269/542] Added missing call to SDL_stack_free().

---
 src/main/windows/SDL_windows_main.c | 2 ++
 1 file changed, 2 insertions(+)

diff --git a/src/main/windows/SDL_windows_main.c b/src/main/windows/SDL_windows_main.c
index bea208224..5e7af35ec 100644
--- a/src/main/windows/SDL_windows_main.c
+++ b/src/main/windows/SDL_windows_main.c
@@ -176,6 +176,8 @@ WinMain(HINSTANCE hInst, HINSTANCE hPrev, LPSTR szCmdLine, int sw)
     /* Run the main program */
     console_main(argc, argv);
 
+    SDL_stack_free(argv);
+
     SDL_free(cmdline);
 
     /* Hush little compiler, don't you cry... */

From 6aa8bc33bd87eeaf6ae8e318ca8563cb3bd367d5 Mon Sep 17 00:00:00 2001
From: Philipp Wiesemann 
Date: Sat, 6 Jul 2013 16:05:09 +0200
Subject: [PATCH 270/542] Fixed SDL's implementation of isspace() to check form
 feed and vertical tab.

---
 src/stdlib/SDL_stdlib.c | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/src/stdlib/SDL_stdlib.c b/src/stdlib/SDL_stdlib.c
index bff34ef63..2ee62beee 100644
--- a/src/stdlib/SDL_stdlib.c
+++ b/src/stdlib/SDL_stdlib.c
@@ -182,7 +182,7 @@ int SDL_toupper(int x) { return toupper(x); }
 int SDL_tolower(int x) { return tolower(x); }
 #else
 int SDL_isdigit(int x) { return ((x) >= '0') && ((x) <= '9'); }
-int SDL_isspace(int x) { return ((x) == ' ') || ((x) == '\t') || ((x) == '\r') || ((x) == '\n'); }
+int SDL_isspace(int x) { return ((x) == ' ') || ((x) == '\t') || ((x) == '\r') || ((x) == '\n') || ((x) == '\f') || ((x) == '\v'); }
 int SDL_toupper(int x) { return ((x) >= 'a') && ((x) <= 'z') ? ('A'+((x)-'a')) : (x); }
 int SDL_tolower(int x) { return ((x) >= 'A') && ((x) <= 'Z') ? ('a'+((x)-'A')) : (x); }
 #endif

From 4dbe83c72a4c33e7f5607fa60c7b799e222675a6 Mon Sep 17 00:00:00 2001
From: Gabriel Jacobo 
Date: Sat, 6 Jul 2013 15:22:49 -0300
Subject: [PATCH 271/542] Fixes Bug 1896 - Android app is running while the
 screen is locked Original patch by ny00@outlook.com

---
 .../src/org/libsdl/app/SDLActivity.java       | 110 ++++++++++++------
 1 file changed, 74 insertions(+), 36 deletions(-)

diff --git a/android-project/src/org/libsdl/app/SDLActivity.java b/android-project/src/org/libsdl/app/SDLActivity.java
index 3d4011597..6aa1d7089 100644
--- a/android-project/src/org/libsdl/app/SDLActivity.java
+++ b/android-project/src/org/libsdl/app/SDLActivity.java
@@ -28,7 +28,7 @@ public class SDLActivity extends Activity {
     private static final String TAG = "SDL";
 
     // Keep track of the paused state
-    public static boolean mIsPaused = false;
+    public static boolean mIsPaused = false, mIsSurfaceReady = false;
 
     // Main components
     protected static SDLActivity mSingleton;
@@ -70,6 +70,7 @@ public class SDLActivity extends Activity {
         mSingleton = this;
 
         // Set up the surface
+        mEGLSurface = EGL10.EGL_NO_SURFACE;
         mSurface = new SDLSurface(getApplication());
 
         mLayout = new AbsoluteLayout(this);
@@ -83,14 +84,14 @@ public class SDLActivity extends Activity {
     protected void onPause() {
         Log.v("SDL", "onPause()");
         super.onPause();
-        // Don't call SDLActivity.nativePause(); here, it will be called by SDLSurface::surfaceDestroyed
+        SDLActivity.handlePause();
     }
 
     @Override
     protected void onResume() {
         Log.v("SDL", "onResume()");
         super.onResume();
-        // Don't call SDLActivity.nativeResume(); here, it will be called via SDLSurface::surfaceChanged->SDLActivity::startApp
+        SDLActivity.handleResume();
     }
 
     @Override
@@ -120,6 +121,32 @@ public class SDLActivity extends Activity {
         }
     }
 
+
+    /** Called by onPause or surfaceDestroyed. Even if surfaceDestroyed
+     *  is the first to be called, mIsSurfaceReady should still be set
+     *  to 'true' during the call to onPause (in a usual scenario).
+     */
+    public static void handlePause() {
+        if (!SDLActivity.mIsPaused && SDLActivity.mIsSurfaceReady) {
+            SDLActivity.mIsPaused = true;
+            SDLActivity.nativePause();
+            mSurface.enableSensor(Sensor.TYPE_ACCELEROMETER, false);
+        }
+    }
+
+    /** Called by onResume or surfaceCreated. An actual resume should be done only when the surface is ready.
+     * Note: Some Android variants may send multiple surfaceChanged events, so we don't need to resume
+     * every time we get one of those events, only if it comes after surfaceDestroyed
+     */
+    public static void handleResume() {
+        if (SDLActivity.mIsPaused && SDLActivity.mIsSurfaceReady) {
+            SDLActivity.mIsPaused = false;
+            SDLActivity.nativeResume();
+            mSurface.enableSensor(Sensor.TYPE_ACCELEROMETER, true);
+        }
+    }
+
+
     // Messages from the SDLMain thread
     static final int COMMAND_CHANGE_TITLE = 1;
     static final int COMMAND_UNUSED = 2;
@@ -227,24 +254,6 @@ public class SDLActivity extends Activity {
         return mSingleton;
     }
 
-    public static void startApp() {
-        // Start up the C app thread
-        if (mSDLThread == null) {
-            mSDLThread = new Thread(new SDLMain(), "SDLThread");
-            mSDLThread.start();
-        }
-        else {
-            /*
-             * Some Android variants may send multiple surfaceChanged events, so we don't need to resume every time
-             * every time we get one of those events, only if it comes after surfaceDestroyed
-             */
-            if (mIsPaused) {
-                SDLActivity.nativeResume();
-                SDLActivity.mIsPaused = false;
-            }
-        }
-    }
-    
     static class ShowTextInputTask implements Runnable {
         /*
          * This is used to regulate the pan&scan method to have some offset from
@@ -343,25 +352,30 @@ public class SDLActivity extends Activity {
             EGL10 egl = (EGL10)EGLContext.getEGL();
             if (SDLActivity.mEGLContext == null) createEGLContext();
 
-            Log.v("SDL", "Creating new EGL Surface");
-            EGLSurface surface = egl.eglCreateWindowSurface(SDLActivity.mEGLDisplay, SDLActivity.mEGLConfig, SDLActivity.mSurface, null);
-            if (surface == EGL10.EGL_NO_SURFACE) {
-                Log.e("SDL", "Couldn't create surface");
-                return false;
+            if (SDLActivity.mEGLSurface == EGL10.EGL_NO_SURFACE) {
+                Log.v("SDL", "Creating new EGL Surface");
+                SDLActivity.mEGLSurface = egl.eglCreateWindowSurface(SDLActivity.mEGLDisplay, SDLActivity.mEGLConfig, SDLActivity.mSurface, null);
+                if (SDLActivity.mEGLSurface == EGL10.EGL_NO_SURFACE) {
+                    Log.e("SDL", "Couldn't create surface");
+                    return false;
+                }
             }
+            else Log.v("SDL", "EGL Surface remains valid");
 
             if (egl.eglGetCurrentContext() != SDLActivity.mEGLContext) {
-                if (!egl.eglMakeCurrent(SDLActivity.mEGLDisplay, surface, surface, SDLActivity.mEGLContext)) {
+                if (!egl.eglMakeCurrent(SDLActivity.mEGLDisplay, SDLActivity.mEGLSurface, SDLActivity.mEGLSurface, SDLActivity.mEGLContext)) {
                     Log.e("SDL", "Old EGL Context doesnt work, trying with a new one");
                     // TODO: Notify the user via a message that the old context could not be restored, and that textures need to be manually restored.
                     createEGLContext();
-                    if (!egl.eglMakeCurrent(SDLActivity.mEGLDisplay, surface, surface, SDLActivity.mEGLContext)) {
+                    if (!egl.eglMakeCurrent(SDLActivity.mEGLDisplay, SDLActivity.mEGLSurface, SDLActivity.mEGLSurface, SDLActivity.mEGLContext)) {
                         Log.e("SDL", "Failed making EGL Context current");
                         return false;
                     }
                 }
+                else Log.v("SDL", "EGL Context made current");
             }
-            SDLActivity.mEGLSurface = surface;
+            else Log.v("SDL", "EGL Context remains current");
+
             return true;
         } else {
             Log.e("SDL", "Surface creation failed, display = " + SDLActivity.mEGLDisplay + ", config = " + SDLActivity.mEGLConfig);
@@ -533,18 +547,27 @@ class SDLSurface extends SurfaceView implements SurfaceHolder.Callback,
     public void surfaceCreated(SurfaceHolder holder) {
         Log.v("SDL", "surfaceCreated()");
         holder.setType(SurfaceHolder.SURFACE_TYPE_GPU);
-        enableSensor(Sensor.TYPE_ACCELEROMETER, true);
+        // Set mIsSurfaceReady to 'true' *before* any call to handleResume
+        SDLActivity.mIsSurfaceReady = true;
     }
 
     // Called when we lose the surface
     @Override
     public void surfaceDestroyed(SurfaceHolder holder) {
         Log.v("SDL", "surfaceDestroyed()");
-        if (!SDLActivity.mIsPaused) {
-            SDLActivity.mIsPaused = true;
-            SDLActivity.nativePause();
-        }
-        enableSensor(Sensor.TYPE_ACCELEROMETER, false);
+        // Call this *before* setting mIsSurfaceReady to 'false'
+        SDLActivity.handlePause();
+        SDLActivity.mIsSurfaceReady = false;
+
+        /* We have to clear the current context and destroy the egl surface here
+         * Otherwise there's BAD_NATIVE_WINDOW errors coming from eglCreateWindowSurface on resume
+         * Ref: http://stackoverflow.com/questions/8762589/eglcreatewindowsurface-on-ics-and-switching-from-2d-to-3d
+         */
+        
+        EGL10 egl = (EGL10)EGLContext.getEGL();
+        egl.eglMakeCurrent(SDLActivity.mEGLDisplay, EGL10.EGL_NO_SURFACE, EGL10.EGL_NO_SURFACE, EGL10.EGL_NO_CONTEXT);
+        egl.eglDestroySurface(SDLActivity.mEGLDisplay, SDLActivity.mEGLSurface);
+        SDLActivity.mEGLSurface = EGL10.EGL_NO_SURFACE;
     }
 
     // Called when the surface is resized
@@ -603,7 +626,22 @@ class SDLSurface extends SurfaceView implements SurfaceHolder.Callback,
         SDLActivity.onNativeResize(width, height, sdlFormat);
         Log.v("SDL", "Window size:" + width + "x"+height);
 
-        SDLActivity.startApp();
+        // Set mIsSurfaceReady to 'true' *before* making a call to handleResume
+        SDLActivity.mIsSurfaceReady = true;
+
+        if (SDLActivity.mSDLThread == null) {
+            // This is the entry point to the C app.
+            // Start up the C app thread and enable sensor input for the first time
+
+            SDLActivity.mSDLThread = new Thread(new SDLMain(), "SDLThread");
+            enableSensor(Sensor.TYPE_ACCELEROMETER, true);
+            SDLActivity.mSDLThread.start();
+        } else {
+            // The app already exists, we resume via handleResume
+            // Multiple sequential calls to surfaceChanged are handled internally by handleResume
+
+            SDLActivity.handleResume();
+        }
     }
 
     // unused

From 4b0d90ff155f531fcaed624a1ed62e2d8c0ac31b Mon Sep 17 00:00:00 2001
From: Sam Lantinga 
Date: Sat, 6 Jul 2013 11:56:04 -0700
Subject: [PATCH 272/542] Updated the README to match the new website text

---
 README.txt | 18 +++++++++---------
 1 file changed, 9 insertions(+), 9 deletions(-)

diff --git a/README.txt b/README.txt
index 3b86fc198..95f026d02 100644
--- a/README.txt
+++ b/README.txt
@@ -8,18 +8,18 @@
 ---
 http://www.libsdl.org/
 
-This is the Simple DirectMedia Layer, a general API that provides low
-level access to audio, keyboard, mouse, joystick, 3D hardware via OpenGL,
-and 2D framebuffer across multiple platforms.
+Simple DirectMedia Layer is a cross-platform development library designed
+to provide low level access to audio, keyboard, mouse, joystick, and graphics
+hardware via OpenGL and DirectX. It is used by video playback software,
+emulators, and popular games including Valve's award winning catalog
+and many Humble Bundle games.
 
-The current version supports Windows, Mac OS X, Linux, FreeBSD,
-NetBSD, OpenBSD, BSD/OS, Solaris, iOS, and Android. The code contains
-support for other operating systems but those are not officially supported.
+The current version supports Windows, Mac OS X, Linux, iOS, and Android.
+The code contains support for other operating systems but those are not
+officially supported.
 
 SDL is written in C, but works with C++ natively, and has bindings to
-several other languages, including Ada, C#, Eiffel, Erlang, Euphoria,
-Go, Guile, Haskell, Java, Lisp, Lua, ML, Objective C, Pascal, Perl, PHP,
-Pike, Pliant, Python, Ruby, and Smalltalk.
+several other languages, including C#, Python and more in progress.
 
 This library is distributed under the zlib license, which can be found
 in the file "COPYING.txt".

From 156a8638f0507c22ab5a77e3616ae3886a7f9a21 Mon Sep 17 00:00:00 2001
From: Sam Lantinga 
Date: Sat, 6 Jul 2013 12:28:57 -0700
Subject: [PATCH 273/542] Make it possible to use SDL events separately from
 the video subsystem.

---
 include/SDL.h               | 11 ++++---
 src/SDL.c                   | 63 +++++++++++++++++++++++++++++--------
 src/joystick/SDL_joystick.c | 10 ++++++
 src/video/SDL_video.c       |  9 +++---
 4 files changed, 70 insertions(+), 23 deletions(-)

diff --git a/include/SDL.h b/include/SDL.h
index 878ab1d3c..aecc9874a 100644
--- a/include/SDL.h
+++ b/include/SDL.h
@@ -106,13 +106,14 @@ extern "C" {
 /*@{*/
 #define SDL_INIT_TIMER          0x00000001
 #define SDL_INIT_AUDIO          0x00000010
-#define SDL_INIT_VIDEO          0x00000020
-#define SDL_INIT_JOYSTICK       0x00000200
+#define SDL_INIT_VIDEO          0x00000020  /**< SDL_INIT_VIDEO implies SDL_INIT_EVENTS */
+#define SDL_INIT_JOYSTICK       0x00000200  /**< SDL_INIT_JOYSTICK implies SDL_INIT_EVENTS */
 #define SDL_INIT_HAPTIC         0x00001000
-#define SDL_INIT_GAMECONTROLLER 0x00002000      /**< turn on game controller also implicitly does JOYSTICK */
-#define SDL_INIT_NOPARACHUTE    0x00100000      /**< Don't catch fatal signals */
+#define SDL_INIT_GAMECONTROLLER 0x00002000  /**< SDL_INIT_GAMECONTROLLE implies SDL_INIT_JOYSTICK */
+#define SDL_INIT_EVENTS         0x00004000
+#define SDL_INIT_NOPARACHUTE    0x00100000  /**< Don't catch fatal signals */
 #define SDL_INIT_EVERYTHING ( \
-                SDL_INIT_TIMER | SDL_INIT_AUDIO | SDL_INIT_VIDEO | \
+                SDL_INIT_TIMER | SDL_INIT_AUDIO | SDL_INIT_VIDEO | SDL_INIT_EVENTS | \
                 SDL_INIT_JOYSTICK | SDL_INIT_HAPTIC | SDL_INIT_GAMECONTROLLER \
             )
 /*@}*/
diff --git a/src/SDL.c b/src/SDL.c
index bc3fe1079..567cc0785 100644
--- a/src/SDL.c
+++ b/src/SDL.c
@@ -27,6 +27,7 @@
 #include "SDL_revision.h"
 #include "SDL_fatal.h"
 #include "SDL_assert_c.h"
+#include "events/SDL_events_c.h"
 #include "haptic/SDL_haptic_c.h"
 #include "joystick/SDL_joystick_c.h"
 
@@ -111,8 +112,33 @@ SDL_InitSubSystem(Uint32 flags)
     SDL_InitTicks();
 #endif
 
+    if ((flags & SDL_INIT_GAMECONTROLLER)) {
+        /* game controller implies joystick */
+        flags |= SDL_INIT_JOYSTICK;
+    }
+
+    if ((flags & (SDL_INIT_VIDEO|SDL_INIT_JOYSTICK))) {
+        /* video or joystick implies events */
+        flags |= SDL_INIT_EVENTS;
+    }
+
+    /* Initialize the event subsystem */
+    if ((flags & SDL_INIT_EVENTS)) {
+#if !SDL_EVENTS_DISABLED
+        if (SDL_PrivateShouldInitSubsystem(SDL_INIT_EVENTS)) {
+            if (SDL_StartEventLoop() < 0) {
+                return (-1);
+            }
+            SDL_QuitInit();
+        }
+        SDL_PrivateSubsystemRefCountIncr(SDL_INIT_EVENTS);
+#else
+        return SDL_SetError("SDL not built with events support");
+#endif
+    }
+
     /* Initialize the timer subsystem */
-    if ((flags & SDL_INIT_TIMER) ){
+    if ((flags & SDL_INIT_TIMER)){
 #if !SDL_TIMERS_DISABLED
         if (SDL_PrivateShouldInitSubsystem(SDL_INIT_TIMER)) {
             if (SDL_TimerInit() < 0) {
@@ -125,8 +151,8 @@ SDL_InitSubSystem(Uint32 flags)
 #endif
     }
 
-    /* Initialize the video/event subsystem */
-    if ((flags & SDL_INIT_VIDEO) ){
+    /* Initialize the video subsystem */
+    if ((flags & SDL_INIT_VIDEO)){
 #if !SDL_VIDEO_DISABLED
         if (SDL_PrivateShouldInitSubsystem(SDL_INIT_VIDEO)) {
             if (SDL_VideoInit(NULL) < 0) {
@@ -140,7 +166,7 @@ SDL_InitSubSystem(Uint32 flags)
     }
 
     /* Initialize the audio subsystem */
-    if ((flags & SDL_INIT_AUDIO) ){
+    if ((flags & SDL_INIT_AUDIO)){
 #if !SDL_AUDIO_DISABLED
         if (SDL_PrivateShouldInitSubsystem(SDL_INIT_AUDIO)) {
             if (SDL_AudioInit(NULL) < 0) {
@@ -153,13 +179,8 @@ SDL_InitSubSystem(Uint32 flags)
 #endif
     }
 
-    if ((flags & SDL_INIT_GAMECONTROLLER)) {
-        /* Game controller implies Joystick. */
-        flags |= SDL_INIT_JOYSTICK;
-    }
-
     /* Initialize the joystick subsystem */
-    if ((flags & SDL_INIT_JOYSTICK) ){
+    if ((flags & SDL_INIT_JOYSTICK)){
 #if !SDL_JOYSTICK_DISABLED
         if (SDL_PrivateShouldInitSubsystem(SDL_INIT_JOYSTICK)) {
            if (SDL_JoystickInit() < 0) {
@@ -172,7 +193,7 @@ SDL_InitSubSystem(Uint32 flags)
 #endif
     }
 
-    if ((flags & SDL_INIT_GAMECONTROLLER) ){
+    if ((flags & SDL_INIT_GAMECONTROLLER)){
 #if !SDL_JOYSTICK_DISABLED
         if (SDL_PrivateShouldInitSubsystem(SDL_INIT_GAMECONTROLLER)) {
             if (SDL_GameControllerInit() < 0) {
@@ -186,7 +207,7 @@ SDL_InitSubSystem(Uint32 flags)
     }
 
     /* Initialize the haptic subsystem */
-    if ((flags & SDL_INIT_HAPTIC) ){
+    if ((flags & SDL_INIT_HAPTIC)){
 #if !SDL_HAPTIC_DISABLED
         if (SDL_PrivateShouldInitSubsystem(SDL_INIT_HAPTIC)) {
             if (SDL_HapticInit() < 0) {
@@ -237,7 +258,7 @@ SDL_QuitSubSystem(Uint32 flags)
     /* Shut down requested initialized subsystems */
 #if !SDL_JOYSTICK_DISABLED
     if ((flags & SDL_INIT_GAMECONTROLLER)) {
-        /* Game controller implies Joystick. */
+        /* game controller implies joystick */
         flags |= SDL_INIT_JOYSTICK;
 
         if (SDL_PrivateShouldQuitSubsystem(SDL_INIT_GAMECONTROLLER)) {
@@ -247,6 +268,9 @@ SDL_QuitSubSystem(Uint32 flags)
     }
 
     if ((flags & SDL_INIT_JOYSTICK)) {
+        /* joystick implies events */
+        flags |= SDL_INIT_EVENTS;
+
         if (SDL_PrivateShouldQuitSubsystem(SDL_INIT_JOYSTICK)) {
             SDL_JoystickQuit();
         }
@@ -274,6 +298,9 @@ SDL_QuitSubSystem(Uint32 flags)
 
 #if !SDL_VIDEO_DISABLED
     if ((flags & SDL_INIT_VIDEO)) {
+        /* video implies events */
+        flags |= SDL_INIT_EVENTS;
+
         if (SDL_PrivateShouldQuitSubsystem(SDL_INIT_VIDEO)) {
             SDL_VideoQuit();
         }
@@ -289,6 +316,16 @@ SDL_QuitSubSystem(Uint32 flags)
         SDL_PrivateSubsystemRefCountDecr(SDL_INIT_TIMER);
     }
 #endif
+
+#if !SDL_EVENTS_DISABLED
+    if ((flags & SDL_INIT_EVENTS)) {
+        if (SDL_PrivateShouldQuitSubsystem(SDL_INIT_EVENTS)) {
+            SDL_QuitQuit();
+            SDL_StopEventLoop();
+        }
+        SDL_PrivateSubsystemRefCountDecr(SDL_INIT_EVENTS);
+    }
+#endif
 }
 
 Uint32
diff --git a/src/joystick/SDL_joystick.c b/src/joystick/SDL_joystick.c
index 1f624fd0b..5380acf80 100644
--- a/src/joystick/SDL_joystick.c
+++ b/src/joystick/SDL_joystick.c
@@ -48,6 +48,12 @@ SDL_JoystickInit(void)
         SDL_joystick_allows_background_events = SDL_TRUE;
     }
 
+#if !SDL_EVENTS_DISABLED
+    if (SDL_InitSubSystem(SDL_INIT_EVENTS) < 0) {
+        return -1;
+    }
+#endif /* !SDL_EVENTS_DISABLED */
+
     status = SDL_SYS_JoystickInit();
     if (status >= 0) {
         status = 0;
@@ -458,6 +464,10 @@ SDL_JoystickQuit(void)
 
     /* Quit the joystick setup */
     SDL_SYS_JoystickQuit();
+
+#if !SDL_EVENTS_DISABLED
+    SDL_QuitSubSystem(SDL_INIT_EVENTS);
+#endif
 }
 
 
diff --git a/src/video/SDL_video.c b/src/video/SDL_video.c
index 721f3c2e5..d5d0a7556 100644
--- a/src/video/SDL_video.c
+++ b/src/video/SDL_video.c
@@ -422,11 +422,10 @@ SDL_VideoInit(const char *driver_name)
 #endif
 
     /* Start the event loop */
-    if (SDL_StartEventLoop() < 0 ||
+    if (SDL_InitSubSystem(SDL_INIT_EVENTS) < 0 ||
         SDL_KeyboardInit() < 0 ||
         SDL_MouseInit() < 0 ||
-        SDL_TouchInit() < 0 ||
-        SDL_QuitInit() < 0) {
+        SDL_TouchInit() < 0) {
         return -1;
     }
 
@@ -2233,10 +2232,10 @@ SDL_VideoQuit(void)
     }
 
     /* Halt event processing before doing anything else */
-    SDL_QuitQuit();
+    SDL_TouchQuit();
     SDL_MouseQuit();
     SDL_KeyboardQuit();
-    SDL_StopEventLoop();
+    SDL_QuitSubSystem(SDL_INIT_EVENTS);
 
     SDL_EnableScreenSaver();
 

From 4921d1b526c5d5034d8a42d8a4b60d16d7194dae Mon Sep 17 00:00:00 2001
From: David Gow 
Date: Tue, 25 Jun 2013 21:36:36 +0800
Subject: [PATCH 274/542] Remove full-desktop Xinerama mode when using XRandR

---
 src/video/x11/SDL_x11modes.c | 20 ++++++++++++++++++--
 1 file changed, 18 insertions(+), 2 deletions(-)

diff --git a/src/video/x11/SDL_x11modes.c b/src/video/x11/SDL_x11modes.c
index b1da7370f..ea2cb46ad 100644
--- a/src/video/x11/SDL_x11modes.c
+++ b/src/video/x11/SDL_x11modes.c
@@ -689,9 +689,11 @@ X11_GetDisplayModes(_THIS, SDL_VideoDisplay * sdl_display)
 
 #if SDL_VIDEO_DRIVER_X11_XINERAMA
     if (data->use_xinerama) {
-        /* Add the full (both screens combined) xinerama mode only on the display that starts at 0,0 */
-        if (!data->xinerama_info.x_org && !data->xinerama_info.y_org &&
+        if (data->use_vidmode && !data->xinerama_info.x_org && !data->xinerama_info.y_org &&
            (screen_w > data->xinerama_info.width || screen_h > data->xinerama_info.height)) {
+            /* Add the full (both screens combined) xinerama mode only on the display that starts at 0,0
+             * if we're using vidmode.
+             */
             mode.w = screen_w;
             mode.h = screen_h;
             mode.refresh_rate = 0;
@@ -702,6 +704,20 @@ X11_GetDisplayModes(_THIS, SDL_VideoDisplay * sdl_display)
             mode.driverdata = modedata;
             SDL_AddDisplayMode(sdl_display, &mode);
         }
+        else
+        {
+            /* Add the current mode of each monitor otherwise */
+            mode.w = data->xinerama_info.width;
+            mode.h = data->xinerama_info.height;
+            mode.refresh_rate = 0;
+            modedata = (SDL_DisplayModeData *) SDL_calloc(1, sizeof(SDL_DisplayModeData));
+            if (modedata) {
+                *modedata = *(SDL_DisplayModeData *)sdl_display->desktop_mode.driverdata;
+            }
+            mode.driverdata = modedata;
+            SDL_AddDisplayMode(sdl_display, &mode);
+        }
+
     }
 #endif /* SDL_VIDEO_DRIVER_X11_XINERAMA */
 

From 91452f63558382cbddb829ab48482d20f56c4322 Mon Sep 17 00:00:00 2001
From: Sam Lantinga 
Date: Sat, 6 Jul 2013 12:39:56 -0700
Subject: [PATCH 275/542] Fixed bug 1911 - enable HAVE_GCC_ATOMICS for android
 platform

---
 include/SDL_config_android.h | 2 ++
 1 file changed, 2 insertions(+)

diff --git a/include/SDL_config_android.h b/include/SDL_config_android.h
index 2541a73dc..e0c019f24 100644
--- a/include/SDL_config_android.h
+++ b/include/SDL_config_android.h
@@ -32,6 +32,8 @@
 
 #include 
 
+#define HAVE_GCC_ATOMICS    1
+
 #define HAVE_ALLOCA_H       1
 #define HAVE_SYS_TYPES_H    1
 #define HAVE_STDIO_H    1

From 185f93a7a900e4c973899939217a97eaeb5be5b4 Mon Sep 17 00:00:00 2001
From: Sam Lantinga 
Date: Sat, 6 Jul 2013 20:29:40 -0700
Subject: [PATCH 276/542] Fixed bug 1923 - Crash with SDL_SetColorKey

Sylvain

1/ Load an Image XPM with IMG_ReadXPMFromArray()
2/ Try to set a ColorKey on it.

I notice that :
- the SDL_Surface that is created from XPM has a palette !
- the colorkey is a RBG.

it crashes (SIGSEGV) inside the SDL_SetColorKey function:
"surface->format->palette->colors[surface->map->info.colorkey].a"
---
 src/video/SDL_surface.c | 6 +++++-
 1 file changed, 5 insertions(+), 1 deletion(-)

diff --git a/src/video/SDL_surface.c b/src/video/SDL_surface.c
index d1c57119c..2544462ba 100644
--- a/src/video/SDL_surface.c
+++ b/src/video/SDL_surface.c
@@ -175,7 +175,11 @@ SDL_SetColorKey(SDL_Surface * surface, int flag, Uint32 key)
     int flags;
 
     if (!surface) {
-        return -1;
+        return SDL_InvalidParamError("surface");
+    }
+
+    if (surface->format->palette && key >= surface->format->palette->ncolors) {
+        return SDL_InvalidParamError("key");
     }
 
     if (flag & SDL_RLEACCEL) {

From c9acdd87a7d6d02bc419a41e55e926587f0b42c9 Mon Sep 17 00:00:00 2001
From: Sam Lantinga 
Date: Sat, 6 Jul 2013 21:17:09 -0700
Subject: [PATCH 277/542] Added 8-bit RGB source surface support to NtoN
 blitters

---
 src/video/SDL_blit.h   | 618 +++++++++++++++++++++--------------------
 src/video/SDL_blit_N.c |   4 +-
 2 files changed, 326 insertions(+), 296 deletions(-)

diff --git a/src/video/SDL_blit.h b/src/video/SDL_blit.h
index 7243e6193..17615576e 100644
--- a/src/video/SDL_blit.h
+++ b/src/video/SDL_blit.h
@@ -118,289 +118,319 @@ extern SDL_BlitFunc SDL_CalculateBlitA(SDL_Surface * surface);
 #endif
 
 /* Load pixel of the specified format from a buffer and get its R-G-B values */
-#define RGB_FROM_PIXEL(Pixel, fmt, r, g, b)             \
-{                                   \
+#define RGB_FROM_PIXEL(Pixel, fmt, r, g, b)                             \
+{                                                                       \
     r = SDL_expand_byte[fmt->Rloss][((Pixel&fmt->Rmask)>>fmt->Rshift)]; \
     g = SDL_expand_byte[fmt->Gloss][((Pixel&fmt->Gmask)>>fmt->Gshift)]; \
     b = SDL_expand_byte[fmt->Bloss][((Pixel&fmt->Bmask)>>fmt->Bshift)]; \
 }
-#define RGB_FROM_RGB565(Pixel, r, g, b)                 \
-{                                   \
-    r = SDL_expand_byte[3][((Pixel&0xF800)>>11)];                   \
-    g = SDL_expand_byte[2][((Pixel&0x07E0)>>5)];                    \
-    b = SDL_expand_byte[3][(Pixel&0x001F)];                     \
+#define RGB_FROM_RGB565(Pixel, r, g, b)                                 \
+    {                                                                   \
+    r = SDL_expand_byte[3][((Pixel&0xF800)>>11)];                       \
+    g = SDL_expand_byte[2][((Pixel&0x07E0)>>5)];                        \
+    b = SDL_expand_byte[3][(Pixel&0x001F)];                             \
 }
-#define RGB_FROM_RGB555(Pixel, r, g, b)                 \
-{                                   \
-    r = SDL_expand_byte[3][((Pixel&0x7C00)>>10)];                   \
-    g = SDL_expand_byte[3][((Pixel&0x03E0)>>5)];                    \
-    b = SDL_expand_byte[3][(Pixel&0x001F)];                     \
+#define RGB_FROM_RGB555(Pixel, r, g, b)                                 \
+{                                                                       \
+    r = SDL_expand_byte[3][((Pixel&0x7C00)>>10)];                       \
+    g = SDL_expand_byte[3][((Pixel&0x03E0)>>5)];                        \
+    b = SDL_expand_byte[3][(Pixel&0x001F)];                             \
 }
-#define RGB_FROM_RGB888(Pixel, r, g, b)                 \
-{                                   \
-    r = ((Pixel&0xFF0000)>>16);                 \
-    g = ((Pixel&0xFF00)>>8);                    \
-    b = (Pixel&0xFF);                       \
+#define RGB_FROM_RGB888(Pixel, r, g, b)                                 \
+{                                                                       \
+    r = ((Pixel&0xFF0000)>>16);                                         \
+    g = ((Pixel&0xFF00)>>8);                                            \
+    b = (Pixel&0xFF);                                                   \
 }
-#define RETRIEVE_RGB_PIXEL(buf, bpp, Pixel)                \
-do {                                       \
-    switch (bpp) {                             \
-        case 2:                            \
-            Pixel = *((Uint16 *)(buf));            \
-        break;                             \
-                                       \
-        case 3: {                          \
-                Uint8 *B = (Uint8 *)(buf);             \
-            if (SDL_BYTEORDER == SDL_LIL_ENDIAN) {         \
-                    Pixel = B[0] + (B[1] << 8) + (B[2] << 16); \
-            } else {                       \
-                    Pixel = (B[0] << 16) + (B[1] << 8) + B[2]; \
-            }                          \
-        }                              \
-        break;                             \
-                                       \
-        case 4:                            \
-            Pixel = *((Uint32 *)(buf));            \
-        break;                             \
-                                       \
-        default:                           \
-                Pixel = 0; /* stop gcc complaints */           \
-        break;                             \
-    }                                  \
+#define RETRIEVE_RGB_PIXEL(buf, bpp, Pixel)                             \
+do {                                                                    \
+    switch (bpp) {                                                      \
+        case 1:                                                         \
+            Pixel = *((Uint8 *)(buf));                                  \
+        break;                                                          \
+                                                                        \
+        case 2:                                                         \
+            Pixel = *((Uint16 *)(buf));                                 \
+        break;                                                          \
+                                                                        \
+        case 3: {                                                       \
+            Uint8 *B = (Uint8 *)(buf);                                  \
+            if (SDL_BYTEORDER == SDL_LIL_ENDIAN) {                      \
+                Pixel = B[0] + (B[1] << 8) + (B[2] << 16);              \
+            } else {                                                    \
+                Pixel = (B[0] << 16) + (B[1] << 8) + B[2];              \
+            }                                                           \
+        }                                                               \
+        break;                                                          \
+                                                                        \
+        case 4:                                                         \
+            Pixel = *((Uint32 *)(buf));                                 \
+        break;                                                          \
+                                                                        \
+        default:                                                        \
+                Pixel = 0; /* stop gcc complaints */                    \
+        break;                                                          \
+    }                                                                   \
 } while (0)
 
-#define DISEMBLE_RGB(buf, bpp, fmt, Pixel, r, g, b)            \
-do {                                       \
-    switch (bpp) {                             \
-        case 2:                            \
-            Pixel = *((Uint16 *)(buf));            \
-            RGB_FROM_PIXEL(Pixel, fmt, r, g, b);           \
-        break;                             \
-                                       \
-        case 3: {                          \
-            Pixel = 0;                  \
-                        if (SDL_BYTEORDER == SDL_LIL_ENDIAN) {         \
-                    r = *((buf)+fmt->Rshift/8);        \
-                g = *((buf)+fmt->Gshift/8);        \
-                b = *((buf)+fmt->Bshift/8);        \
-            } else {                       \
-                    r = *((buf)+2-fmt->Rshift/8);          \
-                g = *((buf)+2-fmt->Gshift/8);          \
-                b = *((buf)+2-fmt->Bshift/8);          \
-            }                          \
-        }                              \
-        break;                             \
-                                       \
-        case 4:                            \
-            Pixel = *((Uint32 *)(buf));            \
-            RGB_FROM_PIXEL(Pixel, fmt, r, g, b);           \
-        break;                             \
-                                       \
-        default:                           \
-                /* stop gcc complaints */          \
-                Pixel = 0;              \
-                r = g = b = 0;          \
-        break;                             \
-    }                                  \
+#define DISEMBLE_RGB(buf, bpp, fmt, Pixel, r, g, b)                     \
+do {                                                                    \
+    switch (bpp) {                                                      \
+        case 1:                                                         \
+            Pixel = *((Uint8 *)(buf));                                  \
+            RGB_FROM_PIXEL(Pixel, fmt, r, g, b);                        \
+        break;                                                          \
+                                                                        \
+        case 2:                                                         \
+            Pixel = *((Uint16 *)(buf));                                 \
+            RGB_FROM_PIXEL(Pixel, fmt, r, g, b);                        \
+        break;                                                          \
+                                                                        \
+        case 3: {                                                       \
+            Pixel = 0;                                                  \
+            if (SDL_BYTEORDER == SDL_LIL_ENDIAN) {                      \
+                r = *((buf)+fmt->Rshift/8);                             \
+                g = *((buf)+fmt->Gshift/8);                             \
+                b = *((buf)+fmt->Bshift/8);                             \
+            } else {                                                    \
+                r = *((buf)+2-fmt->Rshift/8);                           \
+                g = *((buf)+2-fmt->Gshift/8);                           \
+                b = *((buf)+2-fmt->Bshift/8);                           \
+            }                                                           \
+        }                                                               \
+        break;                                                          \
+                                                                        \
+        case 4:                                                         \
+            Pixel = *((Uint32 *)(buf));                                 \
+            RGB_FROM_PIXEL(Pixel, fmt, r, g, b);                        \
+        break;                                                          \
+                                                                        \
+        default:                                                        \
+                /* stop gcc complaints */                               \
+                Pixel = 0;                                              \
+                r = g = b = 0;                                          \
+        break;                                                          \
+    }                                                                   \
 } while (0)
 
 /* Assemble R-G-B values into a specified pixel format and store them */
-#define PIXEL_FROM_RGB(Pixel, fmt, r, g, b)             \
-{                                   \
-    Pixel = ((r>>fmt->Rloss)<Rshift)|             \
-        ((g>>fmt->Gloss)<Gshift)|             \
-        ((b>>fmt->Bloss)<Bshift)| \
-        fmt->Amask;             \
+#define PIXEL_FROM_RGB(Pixel, fmt, r, g, b)                             \
+{                                                                       \
+    Pixel = ((r>>fmt->Rloss)<Rshift)|                             \
+        ((g>>fmt->Gloss)<Gshift)|                                 \
+        ((b>>fmt->Bloss)<Bshift)|                                 \
+        fmt->Amask;                                                     \
 }
-#define RGB565_FROM_RGB(Pixel, r, g, b)                 \
-{                                   \
-    Pixel = ((r>>3)<<11)|((g>>2)<<5)|(b>>3);            \
+#define RGB565_FROM_RGB(Pixel, r, g, b)                                 \
+{                                                                       \
+    Pixel = ((r>>3)<<11)|((g>>2)<<5)|(b>>3);                            \
 }
-#define RGB555_FROM_RGB(Pixel, r, g, b)                 \
-{                                   \
-    Pixel = ((r>>3)<<10)|((g>>3)<<5)|(b>>3);            \
+#define RGB555_FROM_RGB(Pixel, r, g, b)                                 \
+{                                                                       \
+    Pixel = ((r>>3)<<10)|((g>>3)<<5)|(b>>3);                            \
 }
-#define RGB888_FROM_RGB(Pixel, r, g, b)                 \
-{                                   \
-    Pixel = (r<<16)|(g<<8)|b;                   \
+#define RGB888_FROM_RGB(Pixel, r, g, b)                                 \
+{                                                                       \
+    Pixel = (r<<16)|(g<<8)|b;                                           \
 }
-#define ARGB8888_FROM_RGBA(Pixel, r, g, b, a)               \
-{                                   \
-    Pixel = (a<<24)|(r<<16)|(g<<8)|b;               \
+#define ARGB8888_FROM_RGBA(Pixel, r, g, b, a)                           \
+{                                                                       \
+    Pixel = (a<<24)|(r<<16)|(g<<8)|b;                                   \
 }
-#define RGBA8888_FROM_RGBA(Pixel, r, g, b, a)               \
-{                                   \
-    Pixel = (r<<24)|(g<<16)|(b<<8)|a;               \
+#define RGBA8888_FROM_RGBA(Pixel, r, g, b, a)                           \
+{                                                                       \
+    Pixel = (r<<24)|(g<<16)|(b<<8)|a;                                   \
 }
-#define ABGR8888_FROM_RGBA(Pixel, r, g, b, a)               \
-{                                   \
-    Pixel = (a<<24)|(b<<16)|(g<<8)|r;               \
+#define ABGR8888_FROM_RGBA(Pixel, r, g, b, a)                           \
+{                                                                       \
+    Pixel = (a<<24)|(b<<16)|(g<<8)|r;                                   \
 }
-#define BGRA8888_FROM_RGBA(Pixel, r, g, b, a)               \
-{                                   \
-    Pixel = (b<<24)|(g<<16)|(r<<8)|a;               \
+#define BGRA8888_FROM_RGBA(Pixel, r, g, b, a)                           \
+{                                                                       \
+    Pixel = (b<<24)|(g<<16)|(r<<8)|a;                                   \
 }
-#define ASSEMBLE_RGB(buf, bpp, fmt, r, g, b)                \
-{                                   \
-    switch (bpp) {                          \
-        case 2: {                       \
-            Uint16 Pixel;                   \
-                                    \
-            PIXEL_FROM_RGB(Pixel, fmt, r, g, b);        \
-            *((Uint16 *)(buf)) = Pixel;     \
-        }                           \
-        break;                          \
-                                    \
-        case 3: {                       \
-                        if (SDL_BYTEORDER == SDL_LIL_ENDIAN) {      \
-                    *((buf)+fmt->Rshift/8) = r;     \
-                *((buf)+fmt->Gshift/8) = g;     \
-                *((buf)+fmt->Bshift/8) = b;     \
-            } else {                    \
-                    *((buf)+2-fmt->Rshift/8) = r;       \
-                *((buf)+2-fmt->Gshift/8) = g;       \
-                *((buf)+2-fmt->Bshift/8) = b;       \
-            }                       \
-        }                           \
-        break;                          \
-                                    \
-        case 4: {                       \
-            Uint32 Pixel;                   \
-                                    \
-            PIXEL_FROM_RGB(Pixel, fmt, r, g, b);        \
-            *((Uint32 *)(buf)) = Pixel;         \
-        }                           \
-        break;                          \
-    }                               \
+#define ASSEMBLE_RGB(buf, bpp, fmt, r, g, b)                            \
+{                                                                       \
+    switch (bpp) {                                                      \
+        case 1: {                                                       \
+            Uint8 Pixel;                                                \
+                                                                        \
+            PIXEL_FROM_RGB(Pixel, fmt, r, g, b);                        \
+            *((Uint8 *)(buf)) = Pixel;                                  \
+        }                                                               \
+        break;                                                          \
+                                                                        \
+        case 2: {                                                       \
+            Uint16 Pixel;                                               \
+                                                                        \
+            PIXEL_FROM_RGB(Pixel, fmt, r, g, b);                        \
+            *((Uint16 *)(buf)) = Pixel;                                 \
+        }                                                               \
+        break;                                                          \
+                                                                        \
+        case 3: {                                                       \
+            if (SDL_BYTEORDER == SDL_LIL_ENDIAN) {                      \
+                *((buf)+fmt->Rshift/8) = r;                             \
+                *((buf)+fmt->Gshift/8) = g;                             \
+                *((buf)+fmt->Bshift/8) = b;                             \
+            } else {                                                    \
+                *((buf)+2-fmt->Rshift/8) = r;                           \
+                *((buf)+2-fmt->Gshift/8) = g;                           \
+                *((buf)+2-fmt->Bshift/8) = b;                           \
+            }                                                           \
+        }                                                               \
+        break;                                                          \
+                                                                        \
+        case 4: {                                                       \
+            Uint32 Pixel;                                               \
+                                                                        \
+            PIXEL_FROM_RGB(Pixel, fmt, r, g, b);                        \
+            *((Uint32 *)(buf)) = Pixel;                                 \
+        }                                                               \
+        break;                                                          \
+    }                                                                   \
 }
 
 /* FIXME: Should we rescale alpha into 0..255 here? */
-#define RGBA_FROM_PIXEL(Pixel, fmt, r, g, b, a)             \
-{                                   \
+#define RGBA_FROM_PIXEL(Pixel, fmt, r, g, b, a)                         \
+{                                                                       \
     r = SDL_expand_byte[fmt->Rloss][((Pixel&fmt->Rmask)>>fmt->Rshift)]; \
     g = SDL_expand_byte[fmt->Gloss][((Pixel&fmt->Gmask)>>fmt->Gshift)]; \
     b = SDL_expand_byte[fmt->Bloss][((Pixel&fmt->Bmask)>>fmt->Bshift)]; \
     a = SDL_expand_byte[fmt->Aloss][((Pixel&fmt->Amask)>>fmt->Ashift)]; \
 }
-#define RGBA_FROM_8888(Pixel, fmt, r, g, b, a)  \
-{                       \
-    r = (Pixel&fmt->Rmask)>>fmt->Rshift;    \
-    g = (Pixel&fmt->Gmask)>>fmt->Gshift;    \
-    b = (Pixel&fmt->Bmask)>>fmt->Bshift;    \
-    a = (Pixel&fmt->Amask)>>fmt->Ashift;    \
+#define RGBA_FROM_8888(Pixel, fmt, r, g, b, a)                          \
+{                                                                       \
+    r = (Pixel&fmt->Rmask)>>fmt->Rshift;                                \
+    g = (Pixel&fmt->Gmask)>>fmt->Gshift;                                \
+    b = (Pixel&fmt->Bmask)>>fmt->Bshift;                                \
+    a = (Pixel&fmt->Amask)>>fmt->Ashift;                                \
 }
-#define RGBA_FROM_RGBA8888(Pixel, r, g, b, a)               \
-{                                   \
-    r = (Pixel>>24);                        \
-    g = ((Pixel>>16)&0xFF);                     \
-    b = ((Pixel>>8)&0xFF);                      \
-    a = (Pixel&0xFF);                       \
+#define RGBA_FROM_RGBA8888(Pixel, r, g, b, a)                           \
+{                                                                       \
+    r = (Pixel>>24);                                                    \
+    g = ((Pixel>>16)&0xFF);                                             \
+    b = ((Pixel>>8)&0xFF);                                              \
+    a = (Pixel&0xFF);                                                   \
 }
-#define RGBA_FROM_ARGB8888(Pixel, r, g, b, a)               \
-{                                   \
-    r = ((Pixel>>16)&0xFF);                     \
-    g = ((Pixel>>8)&0xFF);                      \
-    b = (Pixel&0xFF);                       \
-    a = (Pixel>>24);                        \
+#define RGBA_FROM_ARGB8888(Pixel, r, g, b, a)                           \
+{                                                                       \
+    r = ((Pixel>>16)&0xFF);                                             \
+    g = ((Pixel>>8)&0xFF);                                              \
+    b = (Pixel&0xFF);                                                   \
+    a = (Pixel>>24);                                                    \
 }
-#define RGBA_FROM_ABGR8888(Pixel, r, g, b, a)               \
-{                                   \
-    r = (Pixel&0xFF);                       \
-    g = ((Pixel>>8)&0xFF);                      \
-    b = ((Pixel>>16)&0xFF);                     \
-    a = (Pixel>>24);                        \
+#define RGBA_FROM_ABGR8888(Pixel, r, g, b, a)                           \
+{                                                                       \
+    r = (Pixel&0xFF);                                                   \
+    g = ((Pixel>>8)&0xFF);                                              \
+    b = ((Pixel>>16)&0xFF);                                             \
+    a = (Pixel>>24);                                                    \
 }
-#define RGBA_FROM_BGRA8888(Pixel, r, g, b, a)               \
-{                                   \
-    r = ((Pixel>>8)&0xFF);                      \
-    g = ((Pixel>>16)&0xFF);                     \
-    b = (Pixel>>24);                        \
-    a = (Pixel&0xFF);                       \
+#define RGBA_FROM_BGRA8888(Pixel, r, g, b, a)                           \
+{                                                                       \
+    r = ((Pixel>>8)&0xFF);                                              \
+    g = ((Pixel>>16)&0xFF);                                             \
+    b = (Pixel>>24);                                                    \
+    a = (Pixel&0xFF);                                                   \
 }
-#define DISEMBLE_RGBA(buf, bpp, fmt, Pixel, r, g, b, a)            \
-do {                                       \
-    switch (bpp) {                             \
-        case 2:                            \
-            Pixel = *((Uint16 *)(buf));            \
-            RGBA_FROM_PIXEL(Pixel, fmt, r, g, b, a);       \
-        break;                             \
-                                       \
-        case 3: {                          \
-            Pixel = 0; \
-                        if (SDL_BYTEORDER == SDL_LIL_ENDIAN) {         \
-                    r = *((buf)+fmt->Rshift/8);        \
-                g = *((buf)+fmt->Gshift/8);        \
-                b = *((buf)+fmt->Bshift/8);        \
-            } else {                       \
-                    r = *((buf)+2-fmt->Rshift/8);          \
-                g = *((buf)+2-fmt->Gshift/8);          \
-                b = *((buf)+2-fmt->Bshift/8);          \
-            }                          \
-            a = 0xFF;                      \
-        }                              \
-        break;                             \
-                                       \
-        case 4:                            \
-            Pixel = *((Uint32 *)(buf));            \
-            RGBA_FROM_PIXEL(Pixel, fmt, r, g, b, a);       \
-        break;                             \
-                                       \
-        default:                           \
-                /* stop gcc complaints */          \
-                Pixel = 0;              \
-                r = g = b = a = 0;      \
-        break;                             \
-    }                                  \
+#define DISEMBLE_RGBA(buf, bpp, fmt, Pixel, r, g, b, a)                 \
+do {                                                                    \
+    switch (bpp) {                                                      \
+        case 1:                                                         \
+            Pixel = *((Uint8 *)(buf));                                  \
+            RGBA_FROM_PIXEL(Pixel, fmt, r, g, b, a);                    \
+        break;                                                          \
+                                                                        \
+        case 2:                                                         \
+            Pixel = *((Uint16 *)(buf));                                 \
+            RGBA_FROM_PIXEL(Pixel, fmt, r, g, b, a);                    \
+        break;                                                          \
+                                                                        \
+        case 3: {                                                       \
+            Pixel = 0;                                                  \
+            if (SDL_BYTEORDER == SDL_LIL_ENDIAN) {                      \
+                r = *((buf)+fmt->Rshift/8);                             \
+                g = *((buf)+fmt->Gshift/8);                             \
+                b = *((buf)+fmt->Bshift/8);                             \
+            } else {                                                    \
+                r = *((buf)+2-fmt->Rshift/8);                           \
+                g = *((buf)+2-fmt->Gshift/8);                           \
+                b = *((buf)+2-fmt->Bshift/8);                           \
+            }                                                           \
+            a = 0xFF;                                                   \
+        }                                                               \
+        break;                                                          \
+                                                                        \
+        case 4:                                                         \
+            Pixel = *((Uint32 *)(buf));                                 \
+            RGBA_FROM_PIXEL(Pixel, fmt, r, g, b, a);                    \
+        break;                                                          \
+                                                                        \
+        default:                                                        \
+            /* stop gcc complaints */                                   \
+            Pixel = 0;                                                  \
+            r = g = b = a = 0;                                          \
+        break;                                                          \
+    }                                                                   \
 } while (0)
 
 /* FIXME: this isn't correct, especially for Alpha (maximum != 255) */
-#define PIXEL_FROM_RGBA(Pixel, fmt, r, g, b, a)             \
-{                                   \
-    Pixel = ((r>>fmt->Rloss)<Rshift)|             \
-        ((g>>fmt->Gloss)<Gshift)|             \
-        ((b>>fmt->Bloss)<Bshift)|             \
-        ((a>>fmt->Aloss)<Ashift);             \
+#define PIXEL_FROM_RGBA(Pixel, fmt, r, g, b, a)                         \
+{                                                                       \
+    Pixel = ((r>>fmt->Rloss)<Rshift)|                             \
+        ((g>>fmt->Gloss)<Gshift)|                                 \
+        ((b>>fmt->Bloss)<Bshift)|                                 \
+        ((a>>fmt->Aloss)<Ashift);                                 \
 }
-#define ASSEMBLE_RGBA(buf, bpp, fmt, r, g, b, a)            \
-{                                   \
-    switch (bpp) {                          \
-        case 2: {                       \
-            Uint16 Pixel;                   \
-                                    \
-            PIXEL_FROM_RGBA(Pixel, fmt, r, g, b, a);    \
-            *((Uint16 *)(buf)) = Pixel;     \
-        }                           \
-        break;                          \
-                                    \
-        case 3: {                       \
-                        if (SDL_BYTEORDER == SDL_LIL_ENDIAN) {      \
-                    *((buf)+fmt->Rshift/8) = r;     \
-                *((buf)+fmt->Gshift/8) = g;     \
-                *((buf)+fmt->Bshift/8) = b;     \
-            } else {                    \
-                    *((buf)+2-fmt->Rshift/8) = r;       \
-                *((buf)+2-fmt->Gshift/8) = g;       \
-                *((buf)+2-fmt->Bshift/8) = b;       \
-            }                       \
-        }                           \
-        break;                          \
-                                    \
-        case 4: {                       \
-            Uint32 Pixel;                   \
-                                    \
-            PIXEL_FROM_RGBA(Pixel, fmt, r, g, b, a);    \
-            *((Uint32 *)(buf)) = Pixel;         \
-        }                           \
-        break;                          \
-    }                               \
+#define ASSEMBLE_RGBA(buf, bpp, fmt, r, g, b, a)                        \
+{                                                                       \
+    switch (bpp) {                                                      \
+        case 1: {                                                       \
+            Uint8 Pixel;                                                \
+                                                                        \
+            PIXEL_FROM_RGBA(Pixel, fmt, r, g, b, a);                    \
+            *((Uint8 *)(buf)) = Pixel;                                  \
+        }                                                               \
+        break;                                                          \
+                                                                        \
+        case 2: {                                                       \
+            Uint16 Pixel;                                               \
+                                                                        \
+            PIXEL_FROM_RGBA(Pixel, fmt, r, g, b, a);                    \
+            *((Uint16 *)(buf)) = Pixel;                                 \
+        }                                                               \
+        break;                                                          \
+                                                                        \
+        case 3: {                                                       \
+            if (SDL_BYTEORDER == SDL_LIL_ENDIAN) {                      \
+                *((buf)+fmt->Rshift/8) = r;                             \
+                *((buf)+fmt->Gshift/8) = g;                             \
+                *((buf)+fmt->Bshift/8) = b;                             \
+            } else {                                                    \
+                *((buf)+2-fmt->Rshift/8) = r;                           \
+                *((buf)+2-fmt->Gshift/8) = g;                           \
+                *((buf)+2-fmt->Bshift/8) = b;                           \
+            }                                                           \
+        }                                                               \
+        break;                                                          \
+                                                                        \
+        case 4: {                                                       \
+            Uint32 Pixel;                                               \
+                                                                        \
+            PIXEL_FROM_RGBA(Pixel, fmt, r, g, b, a);                    \
+            *((Uint32 *)(buf)) = Pixel;                                 \
+        }                                                               \
+        break;                                                          \
+    }                                                                   \
 }
 
 /* Blend the RGB values of two Pixels based on a source alpha value */
-#define ALPHA_BLEND(sR, sG, sB, A, dR, dG, dB)  \
-do {                        \
-    dR = ((((int)(sR-dR)*(int)A)/255)+dR);  \
-    dG = ((((int)(sG-dG)*(int)A)/255)+dG);  \
-    dB = ((((int)(sB-dB)*(int)A)/255)+dB);  \
+#define ALPHA_BLEND(sR, sG, sB, A, dR, dG, dB)                          \
+do {                                                                    \
+    dR = ((((int)(sR-dR)*(int)A)/255)+dR);                              \
+    dG = ((((int)(sG-dG)*(int)A)/255)+dG);                              \
+    dB = ((((int)(sB-dB)*(int)A)/255)+dB);                              \
 } while(0)
 
 
@@ -413,74 +443,74 @@ do {                        \
 #ifdef USE_DUFFS_LOOP
 
 /* 8-times unrolled loop */
-#define DUFFS_LOOP8(pixel_copy_increment, width)            \
-{ int n = (width+7)/8;                          \
-    switch (width & 7) {                        \
-    case 0: do {    pixel_copy_increment;               \
-    case 7:     pixel_copy_increment;               \
-    case 6:     pixel_copy_increment;               \
-    case 5:     pixel_copy_increment;               \
-    case 4:     pixel_copy_increment;               \
-    case 3:     pixel_copy_increment;               \
-    case 2:     pixel_copy_increment;               \
-    case 1:     pixel_copy_increment;               \
-        } while ( --n > 0 );                    \
-    }                               \
+#define DUFFS_LOOP8(pixel_copy_increment, width)                        \
+{ int n = (width+7)/8;                                                  \
+    switch (width & 7) {                                                \
+    case 0: do {    pixel_copy_increment;                               \
+    case 7:     pixel_copy_increment;                                   \
+    case 6:     pixel_copy_increment;                                   \
+    case 5:     pixel_copy_increment;                                   \
+    case 4:     pixel_copy_increment;                                   \
+    case 3:     pixel_copy_increment;                                   \
+    case 2:     pixel_copy_increment;                                   \
+    case 1:     pixel_copy_increment;                                   \
+        } while ( --n > 0 );                                            \
+    }                                                                   \
 }
 
 /* 4-times unrolled loop */
-#define DUFFS_LOOP4(pixel_copy_increment, width)            \
-{ int n = (width+3)/4;                          \
-    switch (width & 3) {                        \
-    case 0: do {    pixel_copy_increment;               \
-    case 3:     pixel_copy_increment;               \
-    case 2:     pixel_copy_increment;               \
-    case 1:     pixel_copy_increment;               \
-        } while (--n > 0);                  \
-    }                               \
+#define DUFFS_LOOP4(pixel_copy_increment, width)                        \
+{ int n = (width+3)/4;                                                  \
+    switch (width & 3) {                                                \
+    case 0: do {    pixel_copy_increment;                               \
+    case 3:     pixel_copy_increment;                                   \
+    case 2:     pixel_copy_increment;                                   \
+    case 1:     pixel_copy_increment;                                   \
+        } while (--n > 0);                                              \
+    }                                                                   \
 }
 
 /* Use the 8-times version of the loop by default */
-#define DUFFS_LOOP(pixel_copy_increment, width)             \
+#define DUFFS_LOOP(pixel_copy_increment, width)                         \
     DUFFS_LOOP8(pixel_copy_increment, width)
 
 /* Special version of Duff's device for even more optimization */
-#define DUFFS_LOOP_124(pixel_copy_increment1,               \
-                       pixel_copy_increment2,               \
-                       pixel_copy_increment4, width)            \
-{ int n = width;                            \
-    if (n & 1) {                            \
-        pixel_copy_increment1; n -= 1;              \
-    }                               \
-    if (n & 2) {                            \
-        pixel_copy_increment2; n -= 2;              \
-    }                               \
-    if (n) {                            \
-        n = (n+7)/ 8;                       \
-        switch (n & 4) {                    \
-        case 0: do {    pixel_copy_increment4;          \
-        case 4:     pixel_copy_increment4;          \
-            } while (--n > 0);              \
-        }                           \
-    }                               \
+#define DUFFS_LOOP_124(pixel_copy_increment1,                           \
+                       pixel_copy_increment2,                           \
+                       pixel_copy_increment4, width)                    \
+{ int n = width;                                                        \
+    if (n & 1) {                                                        \
+        pixel_copy_increment1; n -= 1;                                  \
+    }                                                                   \
+    if (n & 2) {                                                        \
+        pixel_copy_increment2; n -= 2;                                  \
+    }                                                                   \
+    if (n) {                                                            \
+        n = (n+7)/ 8;                                                   \
+        switch (n & 4) {                                                \
+        case 0: do {    pixel_copy_increment4;                          \
+        case 4:     pixel_copy_increment4;                              \
+            } while (--n > 0);                                          \
+        }                                                               \
+    }                                                                   \
 }
 
 #else
 
 /* Don't use Duff's device to unroll loops */
-#define DUFFS_LOOP(pixel_copy_increment, width)             \
-{ int n;                                \
-    for ( n=width; n > 0; --n ) {                   \
-        pixel_copy_increment;                   \
-    }                               \
+#define DUFFS_LOOP(pixel_copy_increment, width)                         \
+{ int n;                                                                \
+    for ( n=width; n > 0; --n ) {                                       \
+        pixel_copy_increment;                                           \
+    }                                                                   \
 }
-#define DUFFS_LOOP8(pixel_copy_increment, width)            \
+#define DUFFS_LOOP8(pixel_copy_increment, width)                        \
     DUFFS_LOOP(pixel_copy_increment, width)
-#define DUFFS_LOOP4(pixel_copy_increment, width)            \
+#define DUFFS_LOOP4(pixel_copy_increment, width)                        \
     DUFFS_LOOP(pixel_copy_increment, width)
-#define DUFFS_LOOP_124(pixel_copy_increment1,               \
-                       pixel_copy_increment2,               \
-                       pixel_copy_increment4, width)            \
+#define DUFFS_LOOP_124(pixel_copy_increment1,                           \
+                       pixel_copy_increment2,                           \
+                       pixel_copy_increment4, width)                    \
     DUFFS_LOOP(pixel_copy_increment1, width)
 
 #endif /* USE_DUFFS_LOOP */
diff --git a/src/video/SDL_blit_N.c b/src/video/SDL_blit_N.c
index cd127c9db..a640ec1f9 100644
--- a/src/video/SDL_blit_N.c
+++ b/src/video/SDL_blit_N.c
@@ -2344,8 +2344,8 @@ struct blit_table
     { NO_ALPHA = 1, SET_ALPHA = 2, COPY_ALPHA = 4 } alpha;
 };
 static const struct blit_table normal_blit_1[] = {
-    /* Default for 8-bit RGB source, an invalid combination */
-    {0, 0, 0, 0, 0, 0, 0, 0, NULL},
+    /* Default for 8-bit RGB source, never optimized */
+    {0, 0, 0, 0, 0, 0, 0, 0, BlitNtoN, 0}
 };
 
 static const struct blit_table normal_blit_2[] = {

From 13b57b17fd9fdf1601bba81c5f4b387fce88fc06 Mon Sep 17 00:00:00 2001
From: "Ryan C. Gordon" 
Date: Sun, 7 Jul 2013 02:03:50 -0400
Subject: [PATCH 278/542] Minor ALSA tweaks (include-once macro name, len for
 memset() more clear).

--HG--
extra : rebase_source : 44c8b456ce5867d127b8e307c7854d1bab882a50
---
 src/audio/alsa/SDL_alsa_audio.c | 2 +-
 src/audio/alsa/SDL_alsa_audio.h | 6 +++---
 2 files changed, 4 insertions(+), 4 deletions(-)

diff --git a/src/audio/alsa/SDL_alsa_audio.c b/src/audio/alsa/SDL_alsa_audio.c
index 180064f31..13cc77bf6 100644
--- a/src/audio/alsa/SDL_alsa_audio.c
+++ b/src/audio/alsa/SDL_alsa_audio.c
@@ -643,7 +643,7 @@ ALSA_OpenDevice(_THIS, const char *devname, int iscapture)
         ALSA_CloseDevice(this);
         return SDL_OutOfMemory();
     }
-    SDL_memset(this->hidden->mixbuf, this->spec.silence, this->spec.size);
+    SDL_memset(this->hidden->mixbuf, this->spec.silence, this->hidden->mixlen);
 
     /* Switch to blocking mode for playback */
     ALSA_snd_pcm_nonblock(pcm_handle, 0);
diff --git a/src/audio/alsa/SDL_alsa_audio.h b/src/audio/alsa/SDL_alsa_audio.h
index 5a4bf7fcf..31c653403 100644
--- a/src/audio/alsa/SDL_alsa_audio.h
+++ b/src/audio/alsa/SDL_alsa_audio.h
@@ -20,8 +20,8 @@
 */
 #include "SDL_config.h"
 
-#ifndef _ALSA_PCM_audio_h
-#define _ALSA_PCM_audio_h
+#ifndef _SDL_ALSA_audio_h
+#define _SDL_ALSA_audio_h
 
 #include 
 
@@ -40,6 +40,6 @@ struct SDL_PrivateAudioData
     int mixlen;
 };
 
-#endif /* _ALSA_PCM_audio_h */
+#endif /* _SDL_ALSA_audio_h */
 
 /* vi: set ts=4 sw=4 expandtab: */

From fdca15860f459821a9ae84cb83d8d51f826cb537 Mon Sep 17 00:00:00 2001
From: "Ryan C. Gordon" 
Date: Sun, 7 Jul 2013 02:04:19 -0400
Subject: [PATCH 279/542] Disk audio target was using this->hidden->mixlen
 before we set it.

--HG--
extra : rebase_source : 0ca3a2c97a59010e12df6a144757b6cadb4232c5
---
 src/audio/disk/SDL_diskaudio.c | 8 ++++----
 1 file changed, 4 insertions(+), 4 deletions(-)

diff --git a/src/audio/disk/SDL_diskaudio.c b/src/audio/disk/SDL_diskaudio.c
index 89687ed18..2286ba095 100644
--- a/src/audio/disk/SDL_diskaudio.c
+++ b/src/audio/disk/SDL_diskaudio.c
@@ -114,6 +114,10 @@ DISKAUD_OpenDevice(_THIS, const char *devname, int iscapture)
     }
     SDL_memset(this->hidden, 0, sizeof(*this->hidden));
 
+    this->hidden->mixlen = this->spec.size;
+    this->hidden->write_delay =
+        (envr) ? SDL_atoi(envr) : DISKDEFAULT_WRITEDELAY;
+
     /* Open the audio device */
     this->hidden->output = SDL_RWFromFile(fname, "wb");
     if (this->hidden->output == NULL) {
@@ -129,10 +133,6 @@ DISKAUD_OpenDevice(_THIS, const char *devname, int iscapture)
     }
     SDL_memset(this->hidden->mixbuf, this->spec.silence, this->spec.size);
 
-    this->hidden->mixlen = this->spec.size;
-    this->hidden->write_delay =
-        (envr) ? SDL_atoi(envr) : DISKDEFAULT_WRITEDELAY;
-
 #if HAVE_STDIO_H
     fprintf(stderr,
             "WARNING: You are using the SDL disk writer audio driver!\n"

From bbe065f50f8ca38ff5dc0508346f533b5e365ea1 Mon Sep 17 00:00:00 2001
From: "Ryan C. Gordon" 
Date: Sun, 7 Jul 2013 02:03:07 -0400
Subject: [PATCH 280/542] Added an SDL2 OpenBSD sndio(7) audio target.

--HG--
extra : rebase_source : 5ad387265cff73c1635ca4f2c3635848ba722614
---
 CMakeLists.txt                   |   2 +
 cmake/sdlchecks.cmake            |  31 +++
 configure.in                     |  47 +++++
 include/SDL_config.h.cmake       |   2 +
 include/SDL_config.h.in          |   2 +
 src/audio/SDL_audio.c            |   4 +
 src/audio/sndio/SDL_sndioaudio.c | 327 +++++++++++++++++++++++++++++++
 src/audio/sndio/SDL_sndioaudio.h |  45 +++++
 8 files changed, 460 insertions(+)
 create mode 100644 src/audio/sndio/SDL_sndioaudio.c
 create mode 100644 src/audio/sndio/SDL_sndioaudio.h

diff --git a/CMakeLists.txt b/CMakeLists.txt
index bf3f34a4c..a649fb7a0 100644
--- a/CMakeLists.txt
+++ b/CMakeLists.txt
@@ -203,6 +203,7 @@ dep_option(PULSEAUDIO_SHARED   "Dynamically load PulseAudio support" ON "PULSEAU
 set_option(ARTS                "Support the Analog Real Time Synthesizer" ${UNIX_SYS})
 dep_option(ARTS_SHARED         "Dynamically load aRts audio support" ON "ARTS" OFF)
 set_option(NAS                 "Support the NAS audio API" ${UNIX_SYS})
+set_option(SNDIO               "Support the sndio audio API" ${UNIX_SYS})
 set_option(RPATH               "Use an rpath when linking SDL" ${UNIX_SYS})
 set_option(CLOCK_GETTIME       "Use clock_gettime() instead of gettimeofday()" OFF)
 set_option(INPUT_TSLIB         "Use the Touchscreen library for input" ${UNIX_SYS})
@@ -621,6 +622,7 @@ if(UNIX AND NOT APPLE)
     CheckESD()
     CheckARTS()
     CheckNAS()
+    CheckSNDIO()
     CheckFusionSound()
   endif(SDL_AUDIO)
 
diff --git a/cmake/sdlchecks.cmake b/cmake/sdlchecks.cmake
index 40936b996..b2a2ffb2a 100644
--- a/cmake/sdlchecks.cmake
+++ b/cmake/sdlchecks.cmake
@@ -225,6 +225,37 @@ macro(CheckNAS)
   endif(NAS)
 endmacro(CheckNAS)
 
+# Requires:
+# - n/a
+# Optional:
+# - SNDIO_SHARED opt
+# - HAVE_DLOPEN opt
+macro(CheckSNDIO)
+  if(SNDIO)
+    # TODO: set include paths properly, so the sndio headers are found
+    check_include_file(sndio.h HAVE_SNDIO_H)
+    find_library(D_SNDIO_LIB audio)
+    if(HAVE_SNDIO_H AND D_SNDIO_LIB)
+      set(HAVE_SNDIO TRUE)
+      file(GLOB SNDIO_SOURCES ${SDL2_SOURCE_DIR}/src/audio/sndio/*.c)
+      set(SOURCE_FILES ${SOURCE_FILES} ${SNDIO_SOURCES})
+      set(SDL_AUDIO_DRIVER_SNDIO 1)
+      if(SNDIO_SHARED)
+        if(NOT HAVE_DLOPEN)
+          message_warn("You must have SDL_LoadObject() support for dynamic sndio loading")
+        else()
+          get_filename_component(F_SNDIO_LIB ${D_SNDIO_LIB} NAME)
+          set(SDL_AUDIO_DRIVER_SNDIO_DYNAMIC "\"${F_SNDIO_LIB}\"")
+          set(HAVE_SNDIO_SHARED TRUE)
+        endif(NOT HAVE_DLOPEN)
+      else(SNDIO_SHARED)
+        list(APPEND EXTRA_LIBS ${D_SNDIO_LIB})
+      endif(SNDIO_SHARED)
+      set(HAVE_SDL_AUDIO TRUE)
+    endif(HAVE_SNDIO_H AND D_SNDIO_LIB)
+  endif(SNDIO)
+endmacro(CheckSNDIO)
+
 # Requires:
 # - PkgCheckModules
 # Optional:
diff --git a/configure.in b/configure.in
index 2889c5106..f7a002440 100644
--- a/configure.in
+++ b/configure.in
@@ -910,6 +910,52 @@ AC_HELP_STRING([--enable-nas-shared], [dynamically load NAS audio support [[defa
     fi
 }
 
+dnl See if the sndio audio interface is supported
+CheckSNDIO()
+{
+    AC_ARG_ENABLE(sndio,
+AC_HELP_STRING([--enable-sndio], [support the sndio audio API [[default=yes]]]),
+                  , enable_sndio=yes)
+    if test x$enable_audio = xyes -a x$enable_sndio = xyes; then
+        AC_CHECK_HEADER(sndio.h, have_sndio_hdr=yes)
+        AC_CHECK_LIB(sndio, sio_open, have_sndio_lib=yes)
+
+        AC_MSG_CHECKING(for sndio audio support)
+        have_sndio=no
+
+        if test x$have_sndio_hdr = xyes -a x$have_sndio_lib = xyes; then
+            have_sndio=yes
+            SNDIO_LIBS="-lsndio"
+        fi
+
+        AC_MSG_RESULT($have_sndio)
+
+        if test x$have_sndio = xyes; then
+            AC_ARG_ENABLE(sndio-shared,
+AC_HELP_STRING([--enable-sndio-shared], [dynamically load sndio audio support [[default=yes]]]),
+                          , enable_sndio_shared=yes)
+            sndio_lib=[`find_lib "libsndio.so.*" "$SNDIO_LIBS" | sed 's/.*\/\(.*\)/\1/; q'`]
+
+            if test x$have_loadso != xyes && \
+               test x$enable_sndio_shared = xyes; then
+                AC_MSG_WARN([You must have SDL_LoadObject() support for dynamic sndio loading])
+            fi
+            if test x$have_loadso = xyes && \
+               test x$enable_sndio_shared = xyes && test x$sndio_lib != x; then
+                echo "-- dynamic libsndio -> $sndio_lib"
+                AC_DEFINE_UNQUOTED(SDL_AUDIO_DRIVER_SNDIO_DYNAMIC, "$sndio_lib", [ ])
+            else
+                EXTRA_LDFLAGS="$EXTRA_LDFLAGS $SNDIO_LIBS"
+            fi
+
+            AC_DEFINE(SDL_AUDIO_DRIVER_SNDIO, 1, [ ])
+            SOURCES="$SOURCES $srcdir/src/audio/sndio/*.c"
+            EXTRA_CFLAGS="$EXTRA_CFLAGS $SNDIO_CFLAGS"
+            have_audio=yes
+        fi
+    fi
+}
+
 dnl rcg07142001 See if the user wants the disk writer audio driver...
 CheckDiskAudio()
 {
@@ -2262,6 +2308,7 @@ case "$host" in
         CheckARTSC
         CheckESD
         CheckNAS
+        CheckSNDIO
         CheckX11
         CheckDirectFB
         CheckFusionSound
diff --git a/include/SDL_config.h.cmake b/include/SDL_config.h.cmake
index c212bae9e..8423be702 100644
--- a/include/SDL_config.h.cmake
+++ b/include/SDL_config.h.cmake
@@ -195,6 +195,8 @@
 #cmakedefine SDL_AUDIO_DRIVER_ESD_DYNAMIC @SDL_AUDIO_DRIVER_ESD_DYNAMIC@
 #cmakedefine SDL_AUDIO_DRIVER_NAS @SDL_AUDIO_DRIVER_NAS@
 #cmakedefine SDL_AUDIO_DRIVER_NAS_DYNAMIC @SDL_AUDIO_DRIVER_NAS_DYNAMIC@
+#cmakedefine SDL_AUDIO_DRIVER_SNDIO @SDL_AUDIO_DRIVER_SNDIO@
+#cmakedefine SDL_AUDIO_DRIVER_SNDIO_DYNAMIC @SDL_AUDIO_DRIVER_SNDIO_DYNAMIC@
 #cmakedefine SDL_AUDIO_DRIVER_OSS @SDL_AUDIO_DRIVER_OSS@
 #cmakedefine SDL_AUDIO_DRIVER_OSS_SOUNDCARD_H @SDL_AUDIO_DRIVER_OSS_SOUNDCARD_H@
 #cmakedefine SDL_AUDIO_DRIVER_PAUDIO @SDL_AUDIO_DRIVER_PAUDIO@
diff --git a/include/SDL_config.h.in b/include/SDL_config.h.in
index 5d5252fe6..7c5d9bf97 100644
--- a/include/SDL_config.h.in
+++ b/include/SDL_config.h.in
@@ -199,6 +199,8 @@
 #undef SDL_AUDIO_DRIVER_ESD_DYNAMIC
 #undef SDL_AUDIO_DRIVER_NAS
 #undef SDL_AUDIO_DRIVER_NAS_DYNAMIC
+#undef SDL_AUDIO_DRIVER_SNDIO
+#undef SDL_AUDIO_DRIVER_SNDIO_DYNAMIC
 #undef SDL_AUDIO_DRIVER_OSS
 #undef SDL_AUDIO_DRIVER_OSS_SOUNDCARD_H
 #undef SDL_AUDIO_DRIVER_PAUDIO
diff --git a/src/audio/SDL_audio.c b/src/audio/SDL_audio.c
index 08467f43a..9f22d09c1 100644
--- a/src/audio/SDL_audio.c
+++ b/src/audio/SDL_audio.c
@@ -67,6 +67,7 @@ extern AudioBootStrap NDSAUD_bootstrap;
 extern AudioBootStrap FUSIONSOUND_bootstrap;
 extern AudioBootStrap ANDROIDAUD_bootstrap;
 extern AudioBootStrap PSPAUD_bootstrap;
+extern AudioBootStrap SNDIO_bootstrap;
 
 /* Available audio drivers */
 static const AudioBootStrap *const bootstrap[] = {
@@ -76,6 +77,9 @@ static const AudioBootStrap *const bootstrap[] = {
 #if SDL_AUDIO_DRIVER_ALSA
     &ALSA_bootstrap,
 #endif
+#if SDL_AUDIO_DRIVER_SNDIO
+    &SNDIO_bootstrap,
+#endif
 #if SDL_AUDIO_DRIVER_BSD
     &BSD_AUDIO_bootstrap,
 #endif
diff --git a/src/audio/sndio/SDL_sndioaudio.c b/src/audio/sndio/SDL_sndioaudio.c
new file mode 100644
index 000000000..ce0b61b7c
--- /dev/null
+++ b/src/audio/sndio/SDL_sndioaudio.c
@@ -0,0 +1,327 @@
+/*
+  Simple DirectMedia Layer
+  Copyright (C) 1997-2013 Sam Lantinga 
+
+  This software is provided 'as-is', without any express or implied
+  warranty.  In no event will the authors be held liable for any damages
+  arising from the use of this software.
+
+  Permission is granted to anyone to use this software for any purpose,
+  including commercial applications, and to alter it and redistribute it
+  freely, subject to the following restrictions:
+
+  1. The origin of this software must not be misrepresented; you must not
+     claim that you wrote the original software. If you use this software
+     in a product, an acknowledgment in the product documentation would be
+     appreciated but is not required.
+  2. Altered source versions must be plainly marked as such, and must not be
+     misrepresented as being the original software.
+  3. This notice may not be removed or altered from any source distribution.
+*/
+
+#include "SDL_config.h"
+
+#if SDL_AUDIO_DRIVER_SNDIO
+
+/* OpenBSD sndio target */
+
+#if HAVE_STDIO_H
+#include 
+#endif
+
+#ifdef HAVE_SIGNAL_H
+#include 
+#endif
+
+#include 
+
+#include "SDL_audio.h"
+#include "../SDL_audiomem.h"
+#include "../SDL_audio_c.h"
+#include "SDL_sndioaudio.h"
+
+#ifdef SDL_AUDIO_DRIVER_SNDIO_DYNAMIC
+#include "SDL_loadso.h"
+#endif
+
+static struct sio_hdl * (*SNDIO_sio_open)(const char *, unsigned int, int);
+static void (*SNDIO_sio_close)(struct sio_hdl *);
+static int (*SNDIO_sio_setpar)(struct sio_hdl *, struct sio_par *);
+static int (*SNDIO_sio_getpar)(struct sio_hdl *, struct sio_par *);
+static int (*SNDIO_sio_start)(struct sio_hdl *);
+static int (*SNDIO_sio_stop)(struct sio_hdl *);
+static size_t (*SNDIO_sio_read)(struct sio_hdl *, void *, size_t);
+static size_t (*SNDIO_sio_write)(struct sio_hdl *, const void *, size_t);
+static void (*SNDIO_sio_initpar)(struct sio_par *);
+
+#ifdef SDL_AUDIO_DRIVER_SNDIO_DYNAMIC
+static const char *sndio_library = SDL_AUDIO_DRIVER_SNDIO_DYNAMIC;
+static void *sndio_handle = NULL;
+
+static int
+load_sndio_sym(const char *fn, void **addr)
+{
+    *addr = SDL_LoadFunction(sndio_handle, fn);
+    if (*addr == NULL) {
+        /* Don't call SDL_SetError(): SDL_LoadFunction already did. */
+        return 0;
+    }
+
+    return 1;
+}
+
+/* cast funcs to char* first, to please GCC's strict aliasing rules. */
+#define SDL_SNDIO_SYM(x) \
+    if (!load_sndio_sym(#x, (void **) (char *) &SNDIO_##x)) return -1
+#else
+#define SDL_SNDIO_SYM(x) SNDIO_##x = x
+#endif
+
+static int
+load_sndio_syms(void)
+{
+    SDL_SNDIO_SYM(sio_open);
+    SDL_SNDIO_SYM(sio_close);
+    SDL_SNDIO_SYM(sio_setpar);
+    SDL_SNDIO_SYM(sio_getpar);
+    SDL_SNDIO_SYM(sio_start);
+    SDL_SNDIO_SYM(sio_stop);
+    SDL_SNDIO_SYM(sio_read);
+    SDL_SNDIO_SYM(sio_write);
+    SDL_SNDIO_SYM(sio_initpar);
+    return 0;
+}
+
+#undef SDL_SNDIO_SYM
+
+#ifdef SDL_AUDIO_DRIVER_SNDIO_DYNAMIC
+
+static void
+UnloadSNDIOLibrary(void)
+{
+    if (sndio_handle != NULL) {
+        SDL_UnloadObject(sndio_handle);
+        sndio_handle = NULL;
+    }
+}
+
+static int
+LoadSNDIOLibrary(void)
+{
+    int retval = 0;
+    if (sndio_handle == NULL) {
+        sndio_handle = SDL_LoadObject(sndio_library);
+        if (sndio_handle == NULL) {
+            retval = -1;
+            /* Don't call SDL_SetError(): SDL_LoadObject already did. */
+        } else {
+            retval = load_sndio_syms();
+            if (retval < 0) {
+                UnloadSNDIOLibrary();
+            }
+        }
+    }
+    return retval;
+}
+
+#else
+
+static void
+UnloadSNDIOLibrary(void)
+{
+}
+
+static int
+LoadSNDIOLibrary(void)
+{
+    load_sndio_syms();
+    return 0;
+}
+
+#endif /* SDL_AUDIO_DRIVER_SNDIO_DYNAMIC */
+
+
+
+
+static void
+SNDIO_WaitDevice(_THIS)
+{
+    /* no-op; sio_write() blocks if necessary. */
+}
+
+static void
+SNDIO_PlayDevice(_THIS)
+{
+    const int written = sio_write(this->hidden->dev, this->hidden->mixbuf, this->hidden->mixlen);
+
+    /* If we couldn't write, assume fatal error for now */
+    if ( written == 0 ) {
+        this->enabled = 0;
+    }
+#ifdef DEBUG_AUDIO
+    fprintf(stderr, "Wrote %d bytes of audio data\n", written);
+#endif
+}
+
+static Uint8 *
+SNDIO_GetDeviceBuf(_THIS)
+{
+    return this->hidden->mixbuf;
+}
+
+static void
+SNDIO_WaitDone(_THIS)
+{
+    sio_stop(this->hidden->dev);
+}
+
+static void
+SNDIO_CloseDevice(_THIS)
+{
+    if (this->hidden != NULL) {
+        if (this->hidden->mixbuf != NULL) {
+            SDL_FreeAudioMem(this->hidden->mixbuf);
+            this->hidden->mixbuf = NULL;
+        }
+        if ( this->hidden->dev != NULL ) {
+            sio_close(this->hidden->dev);
+            this->hidden->dev = NULL;
+        }
+        SDL_free(this->hidden);
+        this->hidden = NULL;
+    }
+}
+
+static int
+SNDIO_OpenDevice(_THIS, const char *devname, int iscapture)
+{
+    SDL_AudioFormat test_format = SDL_FirstAudioFormat(this->spec.format);
+    struct sio_par par;
+    int status;
+
+    this->hidden = (struct SDL_PrivateAudioData *)
+        SDL_malloc(sizeof(*this->hidden));
+    if (this->hidden == NULL) {
+        return SDL_OutOfMemory();
+    }
+    SDL_memset(this->hidden, 0, sizeof(*this->hidden));
+
+    this->hidden->mixlen = this->spec.size;
+
+    /* !!! FIXME: SIO_DEVANY can be a specific device... */
+    if ((this->hidden->dev = sio_open(0 /*SIO_DEVANY*/, SIO_PLAY, 0)) == NULL) {
+        SNDIO_CloseDevice(this);
+        return SDL_SetError("sio_open() failed");
+    }
+
+    sio_initpar(&par);
+
+    par.rate = this->spec.freq;
+    par.pchan = this->spec.channels;
+    par.round = this->spec.samples;
+    par.appbufsz = par.round * 2;
+
+    /* Try for a closest match on audio format */
+    status = -1;
+    while (test_format && (status < 0)) {
+        if (!SDL_AUDIO_ISFLOAT(test_format)) {
+            par.le = SDL_AUDIO_ISLITTLEENDIAN(test_format) ? 1 : 0;
+            par.sig = SDL_AUDIO_ISSIGNED(test_format) ? 1 : 0;
+            par.bits = SDL_AUDIO_BITSIZE(test_format);
+
+            if (sio_setpar(this->hidden->dev, &par) == 1) {
+                status = 0;
+                break;
+            }
+        }
+        test_format = SDL_NextAudioFormat();
+    }
+
+    if (status < 0) {
+        SNDIO_CloseDevice(this);
+        return SDL_SetError("sndio: Couldn't find any hardware audio formats");
+    }
+
+    if (sio_getpar(this->hidden->dev, &par) == 0) {
+        SNDIO_CloseDevice(this);
+        return SDL_SetError("sio_getpar() failed");
+    }
+
+    if ((par.bits == 32) && (par.sig) && (par.le))
+        this->spec.format = AUDIO_S32LSB;
+    else if ((par.bits == 32) && (par.sig) && (!par.le))
+        this->spec.format = AUDIO_S32MSB;
+    else if ((par.bits == 16) && (par.sig) && (par.le))
+        this->spec.format = AUDIO_S16LSB;
+    else if ((par.bits == 16) && (par.sig) && (!par.le))
+        this->spec.format = AUDIO_S16MSB;
+    else if ((par.bits == 16) && (!par.sig) && (par.le))
+        this->spec.format = AUDIO_U16LSB;
+    else if ((par.bits == 16) && (!par.sig) && (!par.le))
+        this->spec.format = AUDIO_U16MSB;
+    else if ((par.bits == 8) && (par.sig))
+        this->spec.format = AUDIO_S8;
+    else if ((par.bits == 8) && (!par.sig))
+        this->spec.format = AUDIO_U8;
+    else {
+        SNDIO_CloseDevice(this);
+        return SDL_SetError("sndio: Got unsupported hardware audio format.");
+    }
+
+    this->spec.freq = par.rate;
+    this->spec.channels = par.pchan;
+    this->spec.samples = par.round;
+
+    /* Calculate the final parameters for this audio specification */
+    SDL_CalculateAudioSpec(&this->spec);
+
+    /* Allocate mixing buffer */
+    this->hidden->mixlen = this->spec.size;
+    this->hidden->mixbuf = (Uint8 *) SDL_AllocAudioMem(this->hidden->mixlen);
+    if (this->hidden->mixbuf == NULL) {
+        SNDIO_CloseDevice(this);
+        return SDL_OutOfMemory();
+    }
+    SDL_memset(this->hidden->mixbuf, this->spec.silence, this->hidden->mixlen);
+
+    if (!sio_start(this->hidden->dev)) {
+        return SDL_SetError("sio_start() failed");
+    }
+
+    /* We're ready to rock and roll. :-) */
+    return 0;
+}
+
+static void
+SNDIO_Deinitialize(void)
+{
+    UnloadSNDIOLibrary();
+}
+
+static int
+SNDIO_Init(SDL_AudioDriverImpl * impl)
+{
+    if (LoadSNDIOLibrary() < 0) {
+        return 0;
+    }
+
+    /* Set the function pointers */
+    impl->OpenDevice = SNDIO_OpenDevice;
+    impl->WaitDevice = SNDIO_WaitDevice;
+    impl->PlayDevice = SNDIO_PlayDevice;
+    impl->GetDeviceBuf = SNDIO_GetDeviceBuf;
+    impl->WaitDone = SNDIO_WaitDone;
+    impl->CloseDevice = SNDIO_CloseDevice;
+    impl->Deinitialize = SNDIO_Deinitialize;
+    impl->OnlyHasDefaultOutputDevice = 1;  /* !!! FIXME: sndio can handle multiple devices. */
+
+    return 1;   /* this audio target is available. */
+}
+
+AudioBootStrap SNDIO_bootstrap = {
+    "sndio", "OpenBSD sndio", SNDIO_Init, 0
+};
+
+#endif /* SDL_AUDIO_DRIVER_SNDIO */
+
+/* vi: set ts=4 sw=4 expandtab: */
diff --git a/src/audio/sndio/SDL_sndioaudio.h b/src/audio/sndio/SDL_sndioaudio.h
new file mode 100644
index 000000000..94e1542e4
--- /dev/null
+++ b/src/audio/sndio/SDL_sndioaudio.h
@@ -0,0 +1,45 @@
+/*
+  Simple DirectMedia Layer
+  Copyright (C) 1997-2013 Sam Lantinga 
+
+  This software is provided 'as-is', without any express or implied
+  warranty.  In no event will the authors be held liable for any damages
+  arising from the use of this software.
+
+  Permission is granted to anyone to use this software for any purpose,
+  including commercial applications, and to alter it and redistribute it
+  freely, subject to the following restrictions:
+
+  1. The origin of this software must not be misrepresented; you must not
+     claim that you wrote the original software. If you use this software
+     in a product, an acknowledgment in the product documentation would be
+     appreciated but is not required.
+  2. Altered source versions must be plainly marked as such, and must not be
+     misrepresented as being the original software.
+  3. This notice may not be removed or altered from any source distribution.
+*/
+#include "SDL_config.h"
+
+#ifndef _SDL_sndioaudio_h
+#define _SDL_sndioaudio_h
+
+#include 
+
+#include "../SDL_sysaudio.h"
+
+/* Hidden "this" pointer for the audio functions */
+#define _THIS   SDL_AudioDevice *this
+
+struct SDL_PrivateAudioData
+{
+    /* The audio device handle */
+    struct sio_hdl *dev;
+
+    /* Raw mixing buffer */
+    Uint8 *mixbuf;
+    int mixlen;
+};
+
+#endif /* _SDL_sndioaudio_h */
+
+/* vi: set ts=4 sw=4 expandtab: */

From 0586d55560581b24a65030b2e48d1d69af644faa Mon Sep 17 00:00:00 2001
From: Philipp Wiesemann 
Date: Sun, 7 Jul 2013 16:11:29 +0200
Subject: [PATCH 281/542] Fixed SDL_RWread() returning -1 as unsigned instead
 of 0 if error on Android. Found by Cppcheck (pointed out check of unsigned <
 0 which was left in place).

---
 src/core/android/SDL_android.cpp | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/src/core/android/SDL_android.cpp b/src/core/android/SDL_android.cpp
index 5b0197fdd..9023df51a 100644
--- a/src/core/android/SDL_android.cpp
+++ b/src/core/android/SDL_android.cpp
@@ -757,7 +757,7 @@ extern "C" size_t Android_JNI_FileRead(SDL_RWops* ctx, void* buffer,
 
         JNIEnv *mEnv = Android_JNI_GetEnv();
         if (!refs.init(mEnv)) {
-            return -1;
+            return 0;
         }
 
         jobject readableByteChannel = (jobject)ctx->hidden.androidio.readableByteChannelRef;

From c8c3817b1246d494c05e3c01bce6c99471a254c0 Mon Sep 17 00:00:00 2001
From: Philipp Wiesemann 
Date: Sun, 7 Jul 2013 16:13:17 +0200
Subject: [PATCH 282/542] Changed include directive to standard header.

---
 src/render/direct3d/SDL_render_d3d.c | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/src/render/direct3d/SDL_render_d3d.c b/src/render/direct3d/SDL_render_d3d.c
index e59f6d419..a16c111eb 100644
--- a/src/render/direct3d/SDL_render_d3d.c
+++ b/src/render/direct3d/SDL_render_d3d.c
@@ -29,7 +29,7 @@
 #include "SDL_loadso.h"
 #include "SDL_syswm.h"
 #include "../SDL_sysrender.h"
-#include "stdio.h"
+#include 
 
 #if SDL_VIDEO_RENDER_D3D
 #define D3D_DEBUG_INFO

From 764d957232e60eb6e299f3eb51979a7a479fab27 Mon Sep 17 00:00:00 2001
From: Philipp Wiesemann 
Date: Sun, 7 Jul 2013 16:15:21 +0200
Subject: [PATCH 283/542] Corrected name of constant in header file comment.

---
 include/SDL.h | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/include/SDL.h b/include/SDL.h
index aecc9874a..f2d760c2e 100644
--- a/include/SDL.h
+++ b/include/SDL.h
@@ -109,7 +109,7 @@ extern "C" {
 #define SDL_INIT_VIDEO          0x00000020  /**< SDL_INIT_VIDEO implies SDL_INIT_EVENTS */
 #define SDL_INIT_JOYSTICK       0x00000200  /**< SDL_INIT_JOYSTICK implies SDL_INIT_EVENTS */
 #define SDL_INIT_HAPTIC         0x00001000
-#define SDL_INIT_GAMECONTROLLER 0x00002000  /**< SDL_INIT_GAMECONTROLLE implies SDL_INIT_JOYSTICK */
+#define SDL_INIT_GAMECONTROLLER 0x00002000  /**< SDL_INIT_GAMECONTROLLER implies SDL_INIT_JOYSTICK */
 #define SDL_INIT_EVENTS         0x00004000
 #define SDL_INIT_NOPARACHUTE    0x00100000  /**< Don't catch fatal signals */
 #define SDL_INIT_EVERYTHING ( \

From 4fed764ac67ee6d5b80772b07576e713548d521e Mon Sep 17 00:00:00 2001
From: Sam Lantinga 
Date: Sun, 7 Jul 2013 10:15:10 -0700
Subject: [PATCH 284/542] Updated configure with the sndio audio backend

---
 configure | 111 ++++++++++++++++++++++++++++++++++++++++++++++++++++++
 1 file changed, 111 insertions(+)

diff --git a/configure b/configure
index 8258c396f..7e9637c81 100755
--- a/configure
+++ b/configure
@@ -812,6 +812,8 @@ enable_arts
 enable_arts_shared
 enable_nas
 enable_nas_shared
+enable_sndio
+enable_sndio_shared
 enable_diskaudio
 enable_dummyaudio
 enable_video_x11
@@ -1524,6 +1526,8 @@ Optional Features:
   --enable-arts-shared    dynamically load aRts audio support [[default=yes]]
   --enable-nas            support the NAS audio API [[default=yes]]
   --enable-nas-shared     dynamically load NAS audio support [[default=yes]]
+  --enable-sndio          support the sndio audio API [[default=yes]]
+  --enable-sndio-shared   dynamically load sndio audio support [[default=yes]]
   --enable-diskaudio      support the disk writer audio driver [[default=yes]]
   --enable-dummyaudio     support the dummy audio driver [[default=yes]]
   --enable-video-x11      use X11 video driver [[default=yes]]
@@ -18487,6 +18491,112 @@ $as_echo "#define SDL_AUDIO_DRIVER_NAS 1" >>confdefs.h
     fi
 }
 
+CheckSNDIO()
+{
+    # Check whether --enable-sndio was given.
+if test "${enable_sndio+set}" = set; then :
+  enableval=$enable_sndio;
+else
+  enable_sndio=yes
+fi
+
+    if test x$enable_audio = xyes -a x$enable_sndio = xyes; then
+        ac_fn_c_check_header_mongrel "$LINENO" "sndio.h" "ac_cv_header_sndio_h" "$ac_includes_default"
+if test "x$ac_cv_header_sndio_h" = xyes; then :
+  have_sndio_hdr=yes
+fi
+
+
+        { $as_echo "$as_me:${as_lineno-$LINENO}: checking for sio_open in -lsndio" >&5
+$as_echo_n "checking for sio_open in -lsndio... " >&6; }
+if ${ac_cv_lib_sndio_sio_open+:} false; then :
+  $as_echo_n "(cached) " >&6
+else
+  ac_check_lib_save_LIBS=$LIBS
+LIBS="-lsndio  $LIBS"
+cat confdefs.h - <<_ACEOF >conftest.$ac_ext
+/* end confdefs.h.  */
+
+/* Override any GCC internal prototype to avoid an error.
+   Use char because int might match the return type of a GCC
+   builtin and then its argument prototype would still apply.  */
+#ifdef __cplusplus
+extern "C"
+#endif
+char sio_open ();
+int
+main ()
+{
+return sio_open ();
+  ;
+  return 0;
+}
+_ACEOF
+if ac_fn_c_try_link "$LINENO"; then :
+  ac_cv_lib_sndio_sio_open=yes
+else
+  ac_cv_lib_sndio_sio_open=no
+fi
+rm -f core conftest.err conftest.$ac_objext \
+    conftest$ac_exeext conftest.$ac_ext
+LIBS=$ac_check_lib_save_LIBS
+fi
+{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_sndio_sio_open" >&5
+$as_echo "$ac_cv_lib_sndio_sio_open" >&6; }
+if test "x$ac_cv_lib_sndio_sio_open" = xyes; then :
+  have_sndio_lib=yes
+fi
+
+
+        { $as_echo "$as_me:${as_lineno-$LINENO}: checking for sndio audio support" >&5
+$as_echo_n "checking for sndio audio support... " >&6; }
+        have_sndio=no
+
+        if test x$have_sndio_hdr = xyes -a x$have_sndio_lib = xyes; then
+            have_sndio=yes
+            SNDIO_LIBS="-lsndio"
+        fi
+
+        { $as_echo "$as_me:${as_lineno-$LINENO}: result: $have_sndio" >&5
+$as_echo "$have_sndio" >&6; }
+
+        if test x$have_sndio = xyes; then
+            # Check whether --enable-sndio-shared was given.
+if test "${enable_sndio_shared+set}" = set; then :
+  enableval=$enable_sndio_shared;
+else
+  enable_sndio_shared=yes
+fi
+
+            sndio_lib=`find_lib "libsndio.so.*" "$SNDIO_LIBS" | sed 's/.*\/\(.*\)/\1/; q'`
+
+            if test x$have_loadso != xyes && \
+               test x$enable_sndio_shared = xyes; then
+                { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: You must have SDL_LoadObject() support for dynamic sndio loading" >&5
+$as_echo "$as_me: WARNING: You must have SDL_LoadObject() support for dynamic sndio loading" >&2;}
+            fi
+            if test x$have_loadso = xyes && \
+               test x$enable_sndio_shared = xyes && test x$sndio_lib != x; then
+                echo "-- dynamic libsndio -> $sndio_lib"
+
+cat >>confdefs.h <<_ACEOF
+#define SDL_AUDIO_DRIVER_SNDIO_DYNAMIC "$sndio_lib"
+_ACEOF
+
+            else
+                EXTRA_LDFLAGS="$EXTRA_LDFLAGS $SNDIO_LIBS"
+            fi
+
+
+$as_echo "#define SDL_AUDIO_DRIVER_SNDIO 1" >>confdefs.h
+
+            SOURCES="$SOURCES $srcdir/src/audio/sndio/*.c"
+            EXTRA_CFLAGS="$EXTRA_CFLAGS $SNDIO_CFLAGS"
+            have_audio=yes
+        fi
+    fi
+}
+
 CheckDiskAudio()
 {
     # Check whether --enable-diskaudio was given.
@@ -22069,6 +22179,7 @@ case "$host" in
         CheckARTSC
         CheckESD
         CheckNAS
+        CheckSNDIO
         CheckX11
         CheckDirectFB
         CheckFusionSound

From becaf62d10cf962708bec78bdc742428fb935c27 Mon Sep 17 00:00:00 2001
From: Sam Lantinga 
Date: Sun, 7 Jul 2013 10:31:01 -0700
Subject: [PATCH 285/542] Fixed converting ARGB2101010 surfaces to 8-bit
 surfaces It's not like this is very useful, but it fixes a crash in this
 case.

---
 src/video/SDL_blit_N.c | 200 ++++++++++++++++++++++++-----------------
 1 file changed, 116 insertions(+), 84 deletions(-)

diff --git a/src/video/SDL_blit_N.c b/src/video/SDL_blit_N.c
index a640ec1f9..ac7fe7153 100644
--- a/src/video/SDL_blit_N.c
+++ b/src/video/SDL_blit_N.c
@@ -993,6 +993,116 @@ Blit_RGB888_index8(SDL_BlitInfo * info)
     }
 }
 
+/* Special optimized blit for RGB 10-10-10 --> RGB 3-3-2 */
+#define RGB101010_RGB332(dst, src) { \
+    dst = (Uint8)((((src)&0x38000000)>>22)| \
+                  (((src)&0x000E0000)>>15)| \
+                  (((src)&0x00000300)>>8)); \
+}
+static void
+Blit_RGB101010_index8(SDL_BlitInfo * info)
+{
+#ifndef USE_DUFFS_LOOP
+    int c;
+#endif
+    int width, height;
+    Uint32 *src;
+    const Uint8 *map;
+    Uint8 *dst;
+    int srcskip, dstskip;
+
+    /* Set up some basic variables */
+    width = info->dst_w;
+    height = info->dst_h;
+    src = (Uint32 *) info->src;
+    srcskip = info->src_skip / 4;
+    dst = info->dst;
+    dstskip = info->dst_skip;
+    map = info->table;
+
+    if (map == NULL) {
+        while (height--) {
+#ifdef USE_DUFFS_LOOP
+            /* *INDENT-OFF* */
+            DUFFS_LOOP(
+                RGB101010_RGB332(*dst++, *src);
+            , width);
+            /* *INDENT-ON* */
+#else
+            for (c = width / 4; c; --c) {
+                /* Pack RGB into 8bit pixel */
+                ++src;
+                RGB101010_RGB332(*dst++, *src);
+                ++src;
+                RGB101010_RGB332(*dst++, *src);
+                ++src;
+                RGB101010_RGB332(*dst++, *src);
+                ++src;
+            }
+            switch (width & 3) {
+            case 3:
+                RGB101010_RGB332(*dst++, *src);
+                ++src;
+            case 2:
+                RGB101010_RGB332(*dst++, *src);
+                ++src;
+            case 1:
+                RGB101010_RGB332(*dst++, *src);
+                ++src;
+            }
+#endif /* USE_DUFFS_LOOP */
+            src += srcskip;
+            dst += dstskip;
+        }
+    } else {
+        int Pixel;
+
+        while (height--) {
+#ifdef USE_DUFFS_LOOP
+            /* *INDENT-OFF* */
+            DUFFS_LOOP(
+                RGB101010_RGB332(Pixel, *src);
+                *dst++ = map[Pixel];
+                ++src;
+            , width);
+            /* *INDENT-ON* */
+#else
+            for (c = width / 4; c; --c) {
+                /* Pack RGB into 8bit pixel */
+                RGB101010_RGB332(Pixel, *src);
+                *dst++ = map[Pixel];
+                ++src;
+                RGB101010_RGB332(Pixel, *src);
+                *dst++ = map[Pixel];
+                ++src;
+                RGB101010_RGB332(Pixel, *src);
+                *dst++ = map[Pixel];
+                ++src;
+                RGB101010_RGB332(Pixel, *src);
+                *dst++ = map[Pixel];
+                ++src;
+            }
+            switch (width & 3) {
+            case 3:
+                RGB101010_RGB332(Pixel, *src);
+                *dst++ = map[Pixel];
+                ++src;
+            case 2:
+                RGB101010_RGB332(Pixel, *src);
+                *dst++ = map[Pixel];
+                ++src;
+            case 1:
+                RGB101010_RGB332(Pixel, *src);
+                *dst++ = map[Pixel];
+                ++src;
+            }
+#endif /* USE_DUFFS_LOOP */
+            src += srcskip;
+            dst += dstskip;
+        }
+    }
+}
+
 /* Special optimized blit for RGB 8-8-8 --> RGB 5-5-5 */
 #define RGB888_RGB555(dst, src) { \
     *(Uint16 *)(dst) = (Uint16)((((*src)&0x00F80000)>>9)| \
@@ -1860,85 +1970,6 @@ Blit_RGB565_BGRA8888(SDL_BlitInfo * info)
     Blit_RGB565_32(info, RGB565_BGRA8888_LUT);
 }
 
-/* Special optimized blit for RGB 8-8-8 --> RGB 3-3-2 */
-#ifndef RGB888_RGB332
-#define RGB888_RGB332(dst, src) { \
-    dst = (((src)&0x00E00000)>>16)| \
-          (((src)&0x0000E000)>>11)| \
-          (((src)&0x000000C0)>>6); \
-}
-#endif
-static void
-Blit_RGB888_index8_map(SDL_BlitInfo * info)
-{
-#ifndef USE_DUFFS_LOOP
-    int c;
-#endif
-    int Pixel;
-    int width, height;
-    Uint32 *src;
-    const Uint8 *map;
-    Uint8 *dst;
-    int srcskip, dstskip;
-
-    /* Set up some basic variables */
-    width = info->dst_w;
-    height = info->dst_h;
-    src = (Uint32 *) info->src;
-    srcskip = info->src_skip / 4;
-    dst = info->dst;
-    dstskip = info->dst_skip;
-    map = info->table;
-
-#ifdef USE_DUFFS_LOOP
-    while (height--) {
-        /* *INDENT-OFF* */
-        DUFFS_LOOP(
-            RGB888_RGB332(Pixel, *src);
-            *dst++ = map[Pixel];
-            ++src;
-        , width);
-        /* *INDENT-ON* */
-        src += srcskip;
-        dst += dstskip;
-    }
-#else
-    while (height--) {
-        for (c = width / 4; c; --c) {
-            /* Pack RGB into 8bit pixel */
-            RGB888_RGB332(Pixel, *src);
-            *dst++ = map[Pixel];
-            ++src;
-            RGB888_RGB332(Pixel, *src);
-            *dst++ = map[Pixel];
-            ++src;
-            RGB888_RGB332(Pixel, *src);
-            *dst++ = map[Pixel];
-            ++src;
-            RGB888_RGB332(Pixel, *src);
-            *dst++ = map[Pixel];
-            ++src;
-        }
-        switch (width & 3) {
-        case 3:
-            RGB888_RGB332(Pixel, *src);
-            *dst++ = map[Pixel];
-            ++src;
-        case 2:
-            RGB888_RGB332(Pixel, *src);
-            *dst++ = map[Pixel];
-            ++src;
-        case 1:
-            RGB888_RGB332(Pixel, *src);
-            *dst++ = map[Pixel];
-            ++src;
-        }
-        src += srcskip;
-        dst += dstskip;
-    }
-#endif /* USE_DUFFS_LOOP */
-}
-
 static void
 BlitNto1(SDL_BlitInfo * info)
 {
@@ -2440,11 +2471,12 @@ SDL_CalculateBlitN(SDL_Surface * surface)
                 (srcfmt->Rmask == 0x00FF0000) &&
                 (srcfmt->Gmask == 0x0000FF00) &&
                 (srcfmt->Bmask == 0x000000FF)) {
-                if (surface->map->info.table) {
-                    blitfun = Blit_RGB888_index8_map;
-                } else {
-                    blitfun = Blit_RGB888_index8;
-                }
+                blitfun = Blit_RGB888_index8;
+            } else if ((srcfmt->BytesPerPixel == 4) &&
+                (srcfmt->Rmask == 0x3FF00000) &&
+                (srcfmt->Gmask == 0x000FFC00) &&
+                (srcfmt->Bmask == 0x000003FF)) {
+                blitfun = Blit_RGB101010_index8;
             } else {
                 blitfun = BlitNto1;
             }

From 235df7949e43b98d5bd37ee32bd2d41b7fd8d121 Mon Sep 17 00:00:00 2001
From: Sam Lantinga 
Date: Sun, 7 Jul 2013 12:34:21 -0700
Subject: [PATCH 286/542] Added surface conversion support for ARGB2101010
 formats

---
 src/video/SDL_blit.h   |  15 ++++++
 src/video/SDL_blit_N.c | 118 ++++++++++++++++++++++++++++++-----------
 2 files changed, 102 insertions(+), 31 deletions(-)

diff --git a/src/video/SDL_blit.h b/src/video/SDL_blit.h
index 17615576e..413483496 100644
--- a/src/video/SDL_blit.h
+++ b/src/video/SDL_blit.h
@@ -249,6 +249,14 @@ do {                                                                    \
 {                                                                       \
     Pixel = (b<<24)|(g<<16)|(r<<8)|a;                                   \
 }
+#define ARGB2101010_FROM_RGBA(Pixel, r, g, b, a)                        \
+{                                                                       \
+    r = r ? ((r << 2) | 0x3) : 0;                                       \
+    g = g ? ((g << 2) | 0x3) : 0;                                       \
+    b = b ? ((b << 2) | 0x3) : 0;                                       \
+    a = (a * 3) / 255;                                                  \
+    Pixel = (a<<30)|(r<<20)|(g<<10)|b;                                  \
+}
 #define ASSEMBLE_RGB(buf, bpp, fmt, r, g, b)                            \
 {                                                                       \
     switch (bpp) {                                                      \
@@ -334,6 +342,13 @@ do {                                                                    \
     b = (Pixel>>24);                                                    \
     a = (Pixel&0xFF);                                                   \
 }
+#define RGBA_FROM_ARGB2101010(Pixel, r, g, b, a)                        \
+{                                                                       \
+    r = ((Pixel>>22)&0xFF);                                             \
+    g = ((Pixel>>12)&0xFF);                                             \
+    b = ((Pixel>>2)&0xFF);                                              \
+    a = SDL_expand_byte[6][(Pixel>>30)];                                \
+}
 #define DISEMBLE_RGBA(buf, bpp, fmt, Pixel, r, g, b, a)                 \
 do {                                                                    \
     switch (bpp) {                                                      \
diff --git a/src/video/SDL_blit_N.c b/src/video/SDL_blit_N.c
index ac7fe7153..84c96e2dc 100644
--- a/src/video/SDL_blit_N.c
+++ b/src/video/SDL_blit_N.c
@@ -2363,6 +2363,70 @@ BlitNtoNKeyCopyAlpha(SDL_BlitInfo * info)
     }
 }
 
+/* Special optimized blit for ARGB 2-10-10-10 --> RGBA */
+static void
+Blit2101010toN(SDL_BlitInfo * info)
+{
+    int width = info->dst_w;
+    int height = info->dst_h;
+    Uint8 *src = info->src;
+    int srcskip = info->src_skip;
+    Uint8 *dst = info->dst;
+    int dstskip = info->dst_skip;
+    SDL_PixelFormat *dstfmt = info->dst_fmt;
+    int dstbpp = dstfmt->BytesPerPixel;
+    Uint32 Pixel;
+    unsigned sR, sG, sB, sA;
+
+    while (height--) {
+        /* *INDENT-OFF* */
+        DUFFS_LOOP(
+        {
+            Pixel = *(Uint32 *)src;
+            RGBA_FROM_ARGB2101010(Pixel, sR, sG, sB, sA);
+            ASSEMBLE_RGBA(dst, dstbpp, dstfmt, sR, sG, sB, sA);
+            dst += dstbpp;
+            src += 4;
+        },
+        width);
+        /* *INDENT-ON* */
+        src += srcskip;
+        dst += dstskip;
+    }
+}
+
+/* Special optimized blit for RGBA --> ARGB 2-10-10-10 */
+static void
+BlitNto2101010(SDL_BlitInfo * info)
+{
+    int width = info->dst_w;
+    int height = info->dst_h;
+    Uint8 *src = info->src;
+    int srcskip = info->src_skip;
+    Uint8 *dst = info->dst;
+    int dstskip = info->dst_skip;
+    SDL_PixelFormat *srcfmt = info->src_fmt;
+    int srcbpp = srcfmt->BytesPerPixel;
+    Uint32 Pixel;
+    unsigned sR, sG, sB, sA;
+
+    while (height--) {
+        /* *INDENT-OFF* */
+        DUFFS_LOOP(
+        {
+            DISEMBLE_RGBA(src, srcbpp, srcfmt, Pixel, sR, sG, sB, sA);
+            ARGB2101010_FROM_RGBA(Pixel, sR, sG, sB, sA);
+            *(Uint32 *)dst = Pixel;
+            dst += 4;
+            src += srcbpp;
+        },
+        width);
+        /* *INDENT-ON* */
+        src += srcskip;
+        dst += dstskip;
+    }
+}
+
 /* Normal N to N optimized blitters */
 struct blit_table
 {
@@ -2382,24 +2446,18 @@ static const struct blit_table normal_blit_1[] = {
 static const struct blit_table normal_blit_2[] = {
 #if SDL_ALTIVEC_BLITTERS
     /* has-altivec */
-    {0x0000F800, 0x000007E0, 0x0000001F, 4, 0x00000000, 0x00000000,
-     0x00000000,
+    {0x0000F800, 0x000007E0, 0x0000001F, 4, 0x00000000, 0x00000000, 0x00000000,
      2, Blit_RGB565_32Altivec, NO_ALPHA | COPY_ALPHA | SET_ALPHA},
-    {0x00007C00, 0x000003E0, 0x0000001F, 4, 0x00000000, 0x00000000,
-     0x00000000,
+    {0x00007C00, 0x000003E0, 0x0000001F, 4, 0x00000000, 0x00000000, 0x00000000,
      2, Blit_RGB555_32Altivec, NO_ALPHA | COPY_ALPHA | SET_ALPHA},
 #endif
-    {0x0000F800, 0x000007E0, 0x0000001F, 4, 0x00FF0000, 0x0000FF00,
-     0x000000FF,
+    {0x0000F800, 0x000007E0, 0x0000001F, 4, 0x00FF0000, 0x0000FF00, 0x000000FF,
      0, Blit_RGB565_ARGB8888, NO_ALPHA | COPY_ALPHA | SET_ALPHA},
-    {0x0000F800, 0x000007E0, 0x0000001F, 4, 0x000000FF, 0x0000FF00,
-     0x00FF0000,
+    {0x0000F800, 0x000007E0, 0x0000001F, 4, 0x000000FF, 0x0000FF00, 0x00FF0000,
      0, Blit_RGB565_ABGR8888, NO_ALPHA | COPY_ALPHA | SET_ALPHA},
-    {0x0000F800, 0x000007E0, 0x0000001F, 4, 0xFF000000, 0x00FF0000,
-     0x0000FF00,
+    {0x0000F800, 0x000007E0, 0x0000001F, 4, 0xFF000000, 0x00FF0000, 0x0000FF00,
      0, Blit_RGB565_RGBA8888, NO_ALPHA | COPY_ALPHA | SET_ALPHA},
-    {0x0000F800, 0x000007E0, 0x0000001F, 4, 0x0000FF00, 0x00FF0000,
-     0xFF000000,
+    {0x0000F800, 0x000007E0, 0x0000001F, 4, 0x0000FF00, 0x00FF0000, 0xFF000000,
      0, Blit_RGB565_BGRA8888, NO_ALPHA | COPY_ALPHA | SET_ALPHA},
 
     /* Default for 16-bit RGB source, used if no other blitter matches */
@@ -2414,25 +2472,18 @@ static const struct blit_table normal_blit_3[] = {
 static const struct blit_table normal_blit_4[] = {
 #if SDL_ALTIVEC_BLITTERS
     /* has-altivec | dont-use-prefetch */
-    {0x00000000, 0x00000000, 0x00000000, 4, 0x00000000, 0x00000000,
-     0x00000000,
-     6, ConvertAltivec32to32_noprefetch,
-     NO_ALPHA | COPY_ALPHA | SET_ALPHA},
+    {0x00000000, 0x00000000, 0x00000000, 4, 0x00000000, 0x00000000, 0x00000000,
+     6, ConvertAltivec32to32_noprefetch, NO_ALPHA | COPY_ALPHA | SET_ALPHA},
     /* has-altivec */
-    {0x00000000, 0x00000000, 0x00000000, 4, 0x00000000, 0x00000000,
-     0x00000000,
-     2, ConvertAltivec32to32_prefetch,
-     NO_ALPHA | COPY_ALPHA | SET_ALPHA},
+    {0x00000000, 0x00000000, 0x00000000, 4, 0x00000000, 0x00000000, 0x00000000,
+     2, ConvertAltivec32to32_prefetch, NO_ALPHA | COPY_ALPHA | SET_ALPHA},
     /* has-altivec */
-    {0x00000000, 0x00000000, 0x00000000, 2, 0x0000F800, 0x000007E0,
-     0x0000001F,
+    {0x00000000, 0x00000000, 0x00000000, 2, 0x0000F800, 0x000007E0, 0x0000001F,
      2, Blit_RGB888_RGB565Altivec, NO_ALPHA},
 #endif
-    {0x00FF0000, 0x0000FF00, 0x000000FF, 2, 0x0000F800, 0x000007E0,
-     0x0000001F,
+    {0x00FF0000, 0x0000FF00, 0x000000FF, 2, 0x0000F800, 0x000007E0, 0x0000001F,
      0, Blit_RGB888_RGB565, NO_ALPHA},
-    {0x00FF0000, 0x0000FF00, 0x000000FF, 2, 0x00007C00, 0x000003E0,
-     0x0000001F,
+    {0x00FF0000, 0x0000FF00, 0x000000FF, 2, 0x00007C00, 0x000003E0, 0x0000001F,
      0, Blit_RGB888_RGB555, NO_ALPHA},
     /* Default for 32-bit RGB source, used if no other blitter matches */
     {0, 0, 0, 0, 0, 0, 0, 0, BlitNtoN, 0}
@@ -2502,11 +2553,16 @@ SDL_CalculateBlitN(SDL_Surface * surface)
             blitfun = table[which].blitfunc;
 
             if (blitfun == BlitNtoN) {  /* default C fallback catch-all. Slow! */
-                /* Fastpath C fallback: 32bit RGB<->RGBA blit with matching RGB */
-                if (srcfmt->BytesPerPixel == 4 && dstfmt->BytesPerPixel == 4
-                    && srcfmt->Rmask == dstfmt->Rmask
-                    && srcfmt->Gmask == dstfmt->Gmask
-                    && srcfmt->Bmask == dstfmt->Bmask) {
+                if (srcfmt->format == SDL_PIXELFORMAT_ARGB2101010) {
+                    blitfun = Blit2101010toN;
+                } else if (dstfmt->format == SDL_PIXELFORMAT_ARGB2101010) {
+                    blitfun = BlitNto2101010;
+                } else if (srcfmt->BytesPerPixel == 4 &&
+                            dstfmt->BytesPerPixel == 4 &&
+                            srcfmt->Rmask == dstfmt->Rmask &&
+                            srcfmt->Gmask == dstfmt->Gmask &&
+                            srcfmt->Bmask == dstfmt->Bmask) {
+                    /* Fastpath C fallback: 32bit RGB<->RGBA blit with matching RGB */
                     blitfun = Blit4to4MaskAlpha;
                 } else if (a_need == COPY_ALPHA) {
                     blitfun = BlitNtoNCopyAlpha;

From 30553ceb5b6b98198b67baa158acdaf0cd3d64af Mon Sep 17 00:00:00 2001
From: Sam Lantinga 
Date: Sun, 7 Jul 2013 12:34:26 -0700
Subject: [PATCH 287/542] Added automated test to validate conversion between
 all supported formats.

---
 test/testautomation_surface.c | 109 ++++++++++++++++++++++++++++++++--
 1 file changed, 103 insertions(+), 6 deletions(-)

diff --git a/test/testautomation_surface.c b/test/testautomation_surface.c
index 159dd1a89..947c6f25b 100644
--- a/test/testautomation_surface.c
+++ b/test/testautomation_surface.c
@@ -307,6 +307,99 @@ surface_testSurfaceConversion(void *arg)
 }
 
 
+/*!
+ *  Tests surface conversion across all pixel formats.
+ */
+int
+surface_testCompleteSurfaceConversion(void *arg)
+{
+    Uint32 pixel_formats[] = {
+        SDL_PIXELFORMAT_INDEX8,
+        SDL_PIXELFORMAT_RGB332,
+        SDL_PIXELFORMAT_RGB444,
+        SDL_PIXELFORMAT_RGB555,
+        SDL_PIXELFORMAT_BGR555,
+        SDL_PIXELFORMAT_ARGB4444,
+        SDL_PIXELFORMAT_RGBA4444,
+        SDL_PIXELFORMAT_ABGR4444,
+        SDL_PIXELFORMAT_BGRA4444,
+        SDL_PIXELFORMAT_ARGB1555,
+        SDL_PIXELFORMAT_RGBA5551,
+        SDL_PIXELFORMAT_ABGR1555,
+        SDL_PIXELFORMAT_BGRA5551,
+        SDL_PIXELFORMAT_RGB565,
+        SDL_PIXELFORMAT_BGR565,
+        SDL_PIXELFORMAT_RGB24,
+        SDL_PIXELFORMAT_BGR24,
+        SDL_PIXELFORMAT_RGB888,
+        SDL_PIXELFORMAT_RGBX8888,
+        SDL_PIXELFORMAT_BGR888,
+        SDL_PIXELFORMAT_BGRX8888,
+        SDL_PIXELFORMAT_ARGB8888,
+        SDL_PIXELFORMAT_RGBA8888,
+        SDL_PIXELFORMAT_ABGR8888,
+        SDL_PIXELFORMAT_BGRA8888,
+        SDL_PIXELFORMAT_ARGB2101010,
+    };
+    SDL_Surface *face = NULL, *cvt1, *cvt2, *final;
+    SDL_PixelFormat *fmt1, *fmt2;
+    Uint32 rgba[4];
+    int bpp, i, j, ret = 0;
+
+    /* Create sample surface */
+    face = SDLTest_ImageFace();
+    SDLTest_AssertCheck(face != NULL, "Verify face surface is not NULL");
+    if (face == NULL)
+        return TEST_ABORTED;
+
+    /* Set transparent pixel as the pixel at (0,0) */
+    if (face->format->palette) {
+       ret = SDL_SetColorKey(face, SDL_RLEACCEL, *(Uint8 *) face->pixels);
+       SDLTest_AssertPass("Call to SDL_SetColorKey()");
+       SDLTest_AssertCheck(ret == 0, "Verify result from SDL_SetColorKey, expected: 0, got: %i", ret);
+    }
+
+    for ( i = 0; i < SDL_arraysize(pixel_formats); ++i ) {
+        for ( j = 0; j < SDL_arraysize(pixel_formats); ++j ) {
+            /*printf("Converting %s -> %s\n", SDL_GetPixelFormatName(pixel_formats[i]), SDL_GetPixelFormatName(pixel_formats[j]));*/
+
+            fmt1 = SDL_AllocFormat(pixel_formats[i]);
+            SDL_assert(fmt1 != NULL);
+            cvt1 = SDL_ConvertSurface(face, fmt1, 0);
+            SDL_assert(cvt1 != NULL);
+
+            fmt2 = SDL_AllocFormat(pixel_formats[j]);
+            SDL_assert(fmt1 != NULL);
+            cvt2 = SDL_ConvertSurface(cvt1, fmt2, 0);
+            SDL_assert(cvt2 != NULL);
+
+            if ( fmt1->BytesPerPixel == face->format->BytesPerPixel &&
+                 fmt2->BytesPerPixel == face->format->BytesPerPixel &&
+                 (fmt1->Amask != 0) == (face->format->Amask != 0) &&
+                 (fmt2->Amask != 0) == (face->format->Amask != 0) ) {
+                final = SDL_ConvertSurface( cvt2, face->format, 0 );
+                SDL_assert(final != NULL);
+
+                /* Compare surface. */
+                ret = SDLTest_CompareSurfaces( face, final, 0 );
+                SDLTest_AssertCheck(ret == 0, "Validate result from SDLTest_CompareSurfaces, expected: 0, got: %i", ret);
+                SDL_FreeSurface(final);
+            }
+
+            SDL_FreeSurface(cvt1);
+            SDL_FreeFormat(fmt1);
+            SDL_FreeSurface(cvt2);
+            SDL_FreeFormat(fmt2);
+        }
+    }
+
+    /* Clean up. */
+    SDL_FreeSurface( face );
+
+    return TEST_COMPLETED;
+}
+
+
 /**
  * @brief Tests sprite loading. A failure case.
  */
@@ -540,30 +633,34 @@ static const SDLTest_TestCaseReference surfaceTest5 =
         { (SDLTest_TestCaseFp)surface_testSurfaceConversion, "surface_testSurfaceConversion", "Tests surface conversion.", TEST_ENABLED};
 
 static const SDLTest_TestCaseReference surfaceTest6 =
-        { (SDLTest_TestCaseFp)surface_testBlitColorMod, "surface_testBlitColorMod", "Tests some blitting routines with color mod.", TEST_ENABLED};
+        { (SDLTest_TestCaseFp)surface_testCompleteSurfaceConversion, "surface_testCompleteSurfaceConversion", "Tests surface conversion across all pixel formats", TEST_ENABLED};
 
 static const SDLTest_TestCaseReference surfaceTest7 =
+        { (SDLTest_TestCaseFp)surface_testBlitColorMod, "surface_testBlitColorMod", "Tests some blitting routines with color mod.", TEST_ENABLED};
+
+static const SDLTest_TestCaseReference surfaceTest8 =
         { (SDLTest_TestCaseFp)surface_testBlitAlphaMod, "surface_testBlitAlphaMod", "Tests some blitting routines with alpha mod.", TEST_ENABLED};
 
 /* TODO: rewrite test case, define new test data and re-enable; current implementation fails */
-static const SDLTest_TestCaseReference surfaceTest8 =
+static const SDLTest_TestCaseReference surfaceTest9 =
         { (SDLTest_TestCaseFp)surface_testBlitBlendLoop, "surface_testBlitBlendLoop", "Test blittin routines with verious blending modes", TEST_DISABLED};
 
 /* TODO: rewrite test case, define new test data and re-enable; current implementation fails */
-static const SDLTest_TestCaseReference surfaceTest9 =
+static const SDLTest_TestCaseReference surfaceTest10 =
         { (SDLTest_TestCaseFp)surface_testBlitBlendBlend, "surface_testBlitBlendBlend", "Tests blitting routines with blend blending mode.", TEST_DISABLED};
 
 /* TODO: rewrite test case, define new test data and re-enable; current implementation fails */
-static const SDLTest_TestCaseReference surfaceTest10 =
+static const SDLTest_TestCaseReference surfaceTest11 =
         { (SDLTest_TestCaseFp)surface_testBlitBlendAdd, "surface_testBlitBlendAdd", "Tests blitting routines with add blending mode.", TEST_DISABLED};
 
-static const SDLTest_TestCaseReference surfaceTest11 =
+static const SDLTest_TestCaseReference surfaceTest12 =
         { (SDLTest_TestCaseFp)surface_testBlitBlendMod, "surface_testBlitBlendMod", "Tests blitting routines with mod blending mode.", TEST_ENABLED};
 
 /* Sequence of Surface test cases */
 static const SDLTest_TestCaseReference *surfaceTests[] =  {
     &surfaceTest1, &surfaceTest2, &surfaceTest3, &surfaceTest4, &surfaceTest5,
-    &surfaceTest6, &surfaceTest7, &surfaceTest8, &surfaceTest9, &surfaceTest10, &surfaceTest11, NULL
+    &surfaceTest6, &surfaceTest7, &surfaceTest8, &surfaceTest9, &surfaceTest10,
+    &surfaceTest11, &surfaceTest12, NULL
 };
 
 /* Surface test suite (global) */

From 274d4eeec2160fe189136451166ef565a579453c Mon Sep 17 00:00:00 2001
From: Sam Lantinga 
Date: Sun, 7 Jul 2013 12:53:21 -0700
Subject: [PATCH 288/542] Fixed bug 1943 - Wrong handling of legacy 32bpp BMP
 files

Kang Seonghoon

While BMP format supports alpha channel, it is enabled only when the header is at least 56 bytes long (BITMAPV3INFOHEADER and later). For very common 40-byte-long header (BITMAPINFOHEADER) 32bpp format should be interpreted as BGRX format, but currently SDL interprets them as BGRA format and causes a significant compatibility problem as many 32bpp files use a padding byte of 0 ("transparent" in BGRA interpretation).
---
 src/video/SDL_bmp.c | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/src/video/SDL_bmp.c b/src/video/SDL_bmp.c
index 7ee65d85d..2ec66014c 100644
--- a/src/video/SDL_bmp.c
+++ b/src/video/SDL_bmp.c
@@ -182,7 +182,7 @@ SDL_LoadBMP_RW(SDL_RWops * src, int freesrc)
 #endif
                 break;
             case 32:
-                Amask = 0xFF000000;
+                Amask = (biSize < 56 ? 0 : 0xFF000000); /* no alpha before BITMAPV3INFOHEADER */
                 Rmask = 0x00FF0000;
                 Gmask = 0x0000FF00;
                 Bmask = 0x000000FF;

From 6255f7f9a8488dc3270ef23d1714f05ee626a60c Mon Sep 17 00:00:00 2001
From: Sam Lantinga 
Date: Sun, 7 Jul 2013 14:08:07 -0700
Subject: [PATCH 289/542] Backed out changeset c8b16b3a3c9b

---
 src/video/SDL_bmp.c | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/src/video/SDL_bmp.c b/src/video/SDL_bmp.c
index 2ec66014c..7ee65d85d 100644
--- a/src/video/SDL_bmp.c
+++ b/src/video/SDL_bmp.c
@@ -182,7 +182,7 @@ SDL_LoadBMP_RW(SDL_RWops * src, int freesrc)
 #endif
                 break;
             case 32:
-                Amask = (biSize < 56 ? 0 : 0xFF000000); /* no alpha before BITMAPV3INFOHEADER */
+                Amask = 0xFF000000;
                 Rmask = 0x00FF0000;
                 Gmask = 0x0000FF00;
                 Bmask = 0x000000FF;

From 0ed61eba4b85c59a24ac6aa58d5dd8235c6aecf8 Mon Sep 17 00:00:00 2001
From: "Ryan C. Gordon" 
Date: Sun, 7 Jul 2013 20:06:08 -0400
Subject: [PATCH 290/542] sndio dynamic loading fix.

---
 src/audio/sndio/SDL_sndioaudio.c | 20 +++++++++++---------
 1 file changed, 11 insertions(+), 9 deletions(-)

diff --git a/src/audio/sndio/SDL_sndioaudio.c b/src/audio/sndio/SDL_sndioaudio.c
index ce0b61b7c..16d0ec356 100644
--- a/src/audio/sndio/SDL_sndioaudio.c
+++ b/src/audio/sndio/SDL_sndioaudio.c
@@ -146,13 +146,15 @@ LoadSNDIOLibrary(void)
 static void
 SNDIO_WaitDevice(_THIS)
 {
-    /* no-op; sio_write() blocks if necessary. */
+    /* no-op; SNDIO_sio_write() blocks if necessary. */
 }
 
 static void
 SNDIO_PlayDevice(_THIS)
 {
-    const int written = sio_write(this->hidden->dev, this->hidden->mixbuf, this->hidden->mixlen);
+    const int written = SNDIO_sio_write(this->hidden->dev,
+                                        this->hidden->mixbuf,
+                                        this->hidden->mixlen);
 
     /* If we couldn't write, assume fatal error for now */
     if ( written == 0 ) {
@@ -172,7 +174,7 @@ SNDIO_GetDeviceBuf(_THIS)
 static void
 SNDIO_WaitDone(_THIS)
 {
-    sio_stop(this->hidden->dev);
+    SNDIO_sio_stop(this->hidden->dev);
 }
 
 static void
@@ -184,7 +186,7 @@ SNDIO_CloseDevice(_THIS)
             this->hidden->mixbuf = NULL;
         }
         if ( this->hidden->dev != NULL ) {
-            sio_close(this->hidden->dev);
+            SNDIO_sio_close(this->hidden->dev);
             this->hidden->dev = NULL;
         }
         SDL_free(this->hidden);
@@ -209,12 +211,12 @@ SNDIO_OpenDevice(_THIS, const char *devname, int iscapture)
     this->hidden->mixlen = this->spec.size;
 
     /* !!! FIXME: SIO_DEVANY can be a specific device... */
-    if ((this->hidden->dev = sio_open(0 /*SIO_DEVANY*/, SIO_PLAY, 0)) == NULL) {
+    if ((this->hidden->dev = SNDIO_sio_open(NULL, SIO_PLAY, 0)) == NULL) {
         SNDIO_CloseDevice(this);
         return SDL_SetError("sio_open() failed");
     }
 
-    sio_initpar(&par);
+    SNDIO_sio_initpar(&par);
 
     par.rate = this->spec.freq;
     par.pchan = this->spec.channels;
@@ -229,7 +231,7 @@ SNDIO_OpenDevice(_THIS, const char *devname, int iscapture)
             par.sig = SDL_AUDIO_ISSIGNED(test_format) ? 1 : 0;
             par.bits = SDL_AUDIO_BITSIZE(test_format);
 
-            if (sio_setpar(this->hidden->dev, &par) == 1) {
+            if (SNDIO_sio_setpar(this->hidden->dev, &par) == 1) {
                 status = 0;
                 break;
             }
@@ -242,7 +244,7 @@ SNDIO_OpenDevice(_THIS, const char *devname, int iscapture)
         return SDL_SetError("sndio: Couldn't find any hardware audio formats");
     }
 
-    if (sio_getpar(this->hidden->dev, &par) == 0) {
+    if (SNDIO_sio_getpar(this->hidden->dev, &par) == 0) {
         SNDIO_CloseDevice(this);
         return SDL_SetError("sio_getpar() failed");
     }
@@ -284,7 +286,7 @@ SNDIO_OpenDevice(_THIS, const char *devname, int iscapture)
     }
     SDL_memset(this->hidden->mixbuf, this->spec.silence, this->hidden->mixlen);
 
-    if (!sio_start(this->hidden->dev)) {
+    if (!SNDIO_sio_start(this->hidden->dev)) {
         return SDL_SetError("sio_start() failed");
     }
 

From 435103b3d9d3711ac7720e046ee0f3851386454d Mon Sep 17 00:00:00 2001
From: Sam Lantinga 
Date: Sun, 7 Jul 2013 18:23:04 -0700
Subject: [PATCH 291/542] Fixed bug 1943 - Wrong handling of legacy 32bpp BMP
 files

Kang Seonghoon

While BMP format supports alpha channel, it is enabled only when the header is at least 56 bytes long (BITMAPV3INFOHEADER and later). For very common 40-byte-long header (BITMAPINFOHEADER) 32bpp format should be interpreted as BGRX format, but currently SDL interprets them as BGRA format and causes a significant compatibility problem as many 32bpp files use a padding byte of 0 ("transparent" in BGRA interpretation).

---

I fixed this by checking to see if the alpha channel is all 0, and if so, setting it opaque.
---
 src/video/SDL_bmp.c | 35 +++++++++++++++++++++++++++++++++++
 1 file changed, 35 insertions(+)

diff --git a/src/video/SDL_bmp.c b/src/video/SDL_bmp.c
index 7ee65d85d..df43ed0ce 100644
--- a/src/video/SDL_bmp.c
+++ b/src/video/SDL_bmp.c
@@ -47,6 +47,35 @@
 #endif
 
 
+static void CorrectAlphaChannel(SDL_Surface *surface)
+{
+    /* Check to see if there is any alpha channel data */
+    SDL_bool hasAlpha = SDL_FALSE;
+#if SDL_BYTEORDER == SDL_BIG_ENDIAN
+    int alphaChannelOffset = 0;
+#else
+    int alphaChannelOffset = 3;
+#endif
+    Uint8 *alpha = ((Uint8*)surface->pixels) + alphaChannelOffset;
+    Uint8 *end = alpha + surface->h * surface->pitch;
+
+    while (alpha < end) {
+        if (*alpha != 0) {
+            hasAlpha = SDL_TRUE;
+            break;
+        }
+        alpha += 4;
+    }
+
+    if (!hasAlpha) {
+        alpha = ((Uint8*)surface->pixels) + alphaChannelOffset;
+        while (alpha < end) {
+            *alpha = SDL_ALPHA_OPAQUE;
+            alpha += 4;
+        }
+    }
+}
+
 SDL_Surface *
 SDL_LoadBMP_RW(SDL_RWops * src, int freesrc)
 {
@@ -64,6 +93,7 @@ SDL_LoadBMP_RW(SDL_RWops * src, int freesrc)
     Uint8 *top, *end;
     SDL_bool topDown;
     int ExpandBMP;
+    SDL_bool correctAlpha = SDL_FALSE;
 
     /* The Win32 BMP file header (14 bytes) */
     char magic[2];
@@ -182,6 +212,8 @@ SDL_LoadBMP_RW(SDL_RWops * src, int freesrc)
 #endif
                 break;
             case 32:
+                /* We don't know if this has alpha channel or not */
+                correctAlpha = SDL_TRUE;
                 Amask = 0xFF000000;
                 Rmask = 0x00FF0000;
                 Gmask = 0x0000FF00;
@@ -358,6 +390,9 @@ SDL_LoadBMP_RW(SDL_RWops * src, int freesrc)
             bits -= surface->pitch;
         }
     }
+    if (correctAlpha) {
+        CorrectAlphaChannel(surface);
+    }
   done:
     if (was_error) {
         if (src) {

From c6348f33e7de0c9c65f5ecf8196798831348401b Mon Sep 17 00:00:00 2001
From: Sam Lantinga 
Date: Mon, 8 Jul 2013 09:21:54 -0700
Subject: [PATCH 292/542] Make sure that srcdir has a full pathname so source
 indexing works.

---
 configure    | 2 ++
 configure.in | 3 +++
 2 files changed, 5 insertions(+)

diff --git a/configure b/configure
index 7e9637c81..e60b62f5c 100755
--- a/configure
+++ b/configure
@@ -15791,6 +15791,8 @@ else
 fi
 
 
+srcdir=`cd $srcdir && pwd`
+
 INCLUDE="-I$srcdir/include"
 if test x$srcdir != x.; then
     INCLUDE="-Iinclude $INCLUDE"
diff --git a/configure.in b/configure.in
index f7a002440..9446838b9 100644
--- a/configure.in
+++ b/configure.in
@@ -57,6 +57,9 @@ AC_PROG_INSTALL
 AC_PROG_MAKE_SET
 AC_CHECK_TOOL(WINDRES, [windres], [:])
 
+dnl Make sure that srcdir is a full pathname
+srcdir=`cd $srcdir && pwd`
+
 dnl Set up the compiler and linker flags
 INCLUDE="-I$srcdir/include"
 if test x$srcdir != x.; then

From 40e8b24572b66e998b8cdc36d90bfa9fded215cc Mon Sep 17 00:00:00 2001
From: "Ryan C. Gordon" 
Date: Mon, 8 Jul 2013 13:26:59 -0400
Subject: [PATCH 293/542] Disable OSS and BSD audio targets on OpenBSD.

--HG--
extra : rebase_source : f724ffb3927c2331c888eba6f55b71d114269bf4
---
 configure.in | 17 ++++++++++++++---
 1 file changed, 14 insertions(+), 3 deletions(-)

diff --git a/configure.in b/configure.in
index 9446838b9..23194b488 100644
--- a/configure.in
+++ b/configure.in
@@ -646,8 +646,19 @@ dnl See if the OSS audio interface is supported
 CheckOSS()
 {
     AC_ARG_ENABLE(oss,
-AC_HELP_STRING([--enable-oss], [support the OSS audio API [[default=yes]]]),
-                  , enable_oss=yes)
+AC_HELP_STRING([--enable-oss], [support the OSS audio API [[default=maybe]]]),
+                  , enable_oss=maybe)
+
+    # OpenBSD "has" OSS, but it's not really for app use. They want you to
+    #  use sndio instead. So on there, we default to disabled. You can force
+    #  it on if you really want, though.
+    if test x$enable_oss = xmaybe; then
+        enable_oss=yes
+        case "$host" in
+            *-*-openbsd*)
+                enable_oss=no;;
+    fi
+
     if test x$enable_audio = xyes -a x$enable_oss = xyes; then
         AC_MSG_CHECKING(for OSS audio support)
         have_oss=no
@@ -2334,7 +2345,7 @@ case "$host" in
                 SOURCES="$SOURCES $srcdir/src/audio/sun/*.c"
                 have_audio=yes
             ;;
-            netbsd|openbsd)
+            netbsd)  # Don't use this on OpenBSD, it's busted.
                 AC_DEFINE(SDL_AUDIO_DRIVER_BSD, 1, [ ])
                 SOURCES="$SOURCES $srcdir/src/audio/bsd/*.c"
                 have_audio=yes

From 6f3b5c36410240eef220fd30a6fb663b460c126a Mon Sep 17 00:00:00 2001
From: Edward Rudd 
Date: Mon, 8 Jul 2013 17:51:17 -0400
Subject: [PATCH 294/542] change fsaa argument for testgl to accept a # of
 samples for FSAA

---
 test/testgl2.c | 8 ++++----
 1 file changed, 4 insertions(+), 4 deletions(-)

diff --git a/test/testgl2.c b/test/testgl2.c
index 7eea0f599..f01bbd806 100644
--- a/test/testgl2.c
+++ b/test/testgl2.c
@@ -195,9 +195,9 @@ main(int argc, char *argv[])
 
         consumed = SDLTest_CommonArg(state, i);
         if (consumed == 0) {
-            if (SDL_strcasecmp(argv[i], "--fsaa") == 0) {
-                ++fsaa;
-                consumed = 1;
+            if (SDL_strcasecmp(argv[i], "--fsaa") == 0 && i+1 < argc) {
+                fsaa = atoi(argv[i+1]);
+                consumed = 2;
             } else if (SDL_strcasecmp(argv[i], "--accel") == 0 && i+1 < argc) {
                 accel = atoi(argv[i+1]);
                 consumed = 2;
@@ -206,7 +206,7 @@ main(int argc, char *argv[])
             }
         }
         if (consumed < 0) {
-            fprintf(stderr, "Usage: %s %s [--fsaa] [--accel n]\n", argv[0],
+            fprintf(stderr, "Usage: %s %s [--fsaa n] [--accel n]\n", argv[0],
                     SDLTest_CommonUsage(state));
             quit(1);
         }

From 287d2529bd8d5f270e61b80fcf665bc0e6ffe8e2 Mon Sep 17 00:00:00 2001
From: "Ryan C. Gordon" 
Date: Mon, 8 Jul 2013 23:22:36 -0400
Subject: [PATCH 295/542] Replaced SDL_memset4() implementation with a call to
 SDL_memset().

The implementation was slower than the C runtime on Mac OS X, Linux, and
 Windows...quite a bit slower when using the C fallback instead of the inline
 asm, too.

Fixes Bugzilla #1755.
---
 include/SDL_stdinc.h | 26 +-------------------------
 1 file changed, 1 insertion(+), 25 deletions(-)

diff --git a/include/SDL_stdinc.h b/include/SDL_stdinc.h
index f8b6bd417..a8f2f55cb 100644
--- a/include/SDL_stdinc.h
+++ b/include/SDL_stdinc.h
@@ -257,33 +257,9 @@ extern DECLSPEC void *SDLCALL SDL_memset(void *dst, int c, size_t len);
 /* Note that the semantics are different from memset() in that this is a 32-bit assignment */
 SDL_FORCE_INLINE void SDL_memset4(void *dst, int val, size_t dwords)
 {
-#if defined(__GNUC__) && defined(i386)
-    int u0, u1, u2;
-    __asm__ __volatile__ (
-        "cld \n\t"
-        "rep ; stosl \n\t"
-        : "=&D" (u0), "=&a" (u1), "=&c" (u2)
-        : "0" (dst), "1" (val), "2" (SDL_static_cast(Uint32, dwords))
-        : "memory"
-    );
-#else
-    size_t _n = (dwords + 3) / 4;
-    Uint32 *_p = SDL_static_cast(Uint32 *, dst);
-    Uint32 _val = (val);
-    if (dwords == 0)
-        return;
-    switch (dwords % 4)
-    {
-        case 0: do {    *_p++ = _val;
-        case 3:         *_p++ = _val;
-        case 2:         *_p++ = _val;
-        case 1:         *_p++ = _val;
-        } while ( --_n );
-    }
-#endif
+    SDL_memset(dst, val, dwords * 4);
 }
 
-
 extern DECLSPEC void *SDLCALL SDL_memcpy(void *dst, const void *src, size_t len);
 
 SDL_FORCE_INLINE void *SDL_memcpy4(void *dst, const void *src, size_t dwords)

From 7afed3e5ae3161c440e5062c09bdc0f32c669cd1 Mon Sep 17 00:00:00 2001
From: "Ryan C. Gordon" 
Date: Mon, 8 Jul 2013 23:37:00 -0400
Subject: [PATCH 296/542] Removed deprecated SDL_types.h header.

Fixes Bugzilla #1945.
---
 Makefile.in                                   |  1 -
 VisualC/SDL/SDL_VS2008.vcproj                 |  4 ---
 VisualC/SDL/SDL_VS2010.vcxproj                |  1 -
 VisualC/SDL/SDL_VS2012.vcxproj                |  1 -
 Xcode-iOS/SDL/SDL.xcodeproj/project.pbxproj   |  4 ---
 .../project.pbxproj                           |  2 --
 Xcode/SDL/SDL.xcodeproj/project.pbxproj       |  8 -----
 include/SDL_types.h                           | 29 -------------------
 .../iphoneos/SDLUIAccelerationDelegate.h      |  2 +-
 9 files changed, 1 insertion(+), 51 deletions(-)
 delete mode 100644 include/SDL_types.h

diff --git a/Makefile.in b/Makefile.in
index ae6293e7d..f898172ae 100644
--- a/Makefile.in
+++ b/Makefile.in
@@ -87,7 +87,6 @@ HDRS = \
 	SDL_thread.h \
 	SDL_timer.h \
 	SDL_touch.h \
-	SDL_types.h \
 	SDL_version.h \
 	SDL_video.h \
 	begin_code.h \
diff --git a/VisualC/SDL/SDL_VS2008.vcproj b/VisualC/SDL/SDL_VS2008.vcproj
index 968fee2cb..6842c4c6c 100644
--- a/VisualC/SDL/SDL_VS2008.vcproj
+++ b/VisualC/SDL/SDL_VS2008.vcproj
@@ -559,10 +559,6 @@
 				RelativePath="..\..\include\SDL_touch.h"
 				>
 			
-			
-			
 			
diff --git a/VisualC/SDL/SDL_VS2010.vcxproj b/VisualC/SDL/SDL_VS2010.vcxproj
index b6e995c54..920285b2f 100644
--- a/VisualC/SDL/SDL_VS2010.vcxproj
+++ b/VisualC/SDL/SDL_VS2010.vcxproj
@@ -261,7 +261,6 @@
     
     
     
-    
     
     
     
diff --git a/VisualC/SDL/SDL_VS2012.vcxproj b/VisualC/SDL/SDL_VS2012.vcxproj
index efe911951..748a77c68 100644
--- a/VisualC/SDL/SDL_VS2012.vcxproj
+++ b/VisualC/SDL/SDL_VS2012.vcxproj
@@ -264,7 +264,6 @@
     
     
     
-    
     
     
     
diff --git a/Xcode-iOS/SDL/SDL.xcodeproj/project.pbxproj b/Xcode-iOS/SDL/SDL.xcodeproj/project.pbxproj
index 64f7d6d3b..bd4a26124 100755
--- a/Xcode-iOS/SDL/SDL.xcodeproj/project.pbxproj
+++ b/Xcode-iOS/SDL/SDL.xcodeproj/project.pbxproj
@@ -128,7 +128,6 @@
 		AA7558C41595D55500BBD41B /* SDL_thread.h in Headers */ = {isa = PBXBuildFile; fileRef = AA7558911595D55500BBD41B /* SDL_thread.h */; };
 		AA7558C51595D55500BBD41B /* SDL_timer.h in Headers */ = {isa = PBXBuildFile; fileRef = AA7558921595D55500BBD41B /* SDL_timer.h */; };
 		AA7558C61595D55500BBD41B /* SDL_touch.h in Headers */ = {isa = PBXBuildFile; fileRef = AA7558931595D55500BBD41B /* SDL_touch.h */; };
-		AA7558C71595D55500BBD41B /* SDL_types.h in Headers */ = {isa = PBXBuildFile; fileRef = AA7558941595D55500BBD41B /* SDL_types.h */; };
 		AA7558C81595D55500BBD41B /* SDL_version.h in Headers */ = {isa = PBXBuildFile; fileRef = AA7558951595D55500BBD41B /* SDL_version.h */; };
 		AA7558C91595D55500BBD41B /* SDL_video.h in Headers */ = {isa = PBXBuildFile; fileRef = AA7558961595D55500BBD41B /* SDL_video.h */; };
 		AA7558CA1595D55500BBD41B /* SDL.h in Headers */ = {isa = PBXBuildFile; fileRef = AA7558971595D55500BBD41B /* SDL.h */; };
@@ -320,7 +319,6 @@
 		AA7558911595D55500BBD41B /* SDL_thread.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = SDL_thread.h; sourceTree = ""; };
 		AA7558921595D55500BBD41B /* SDL_timer.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = SDL_timer.h; sourceTree = ""; };
 		AA7558931595D55500BBD41B /* SDL_touch.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = SDL_touch.h; sourceTree = ""; };
-		AA7558941595D55500BBD41B /* SDL_types.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = SDL_types.h; sourceTree = ""; };
 		AA7558951595D55500BBD41B /* SDL_version.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = SDL_version.h; sourceTree = ""; };
 		AA7558961595D55500BBD41B /* SDL_video.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = SDL_video.h; sourceTree = ""; };
 		AA7558971595D55500BBD41B /* SDL.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = SDL.h; sourceTree = ""; };
@@ -713,7 +711,6 @@
 				AA7558911595D55500BBD41B /* SDL_thread.h */,
 				AA7558921595D55500BBD41B /* SDL_timer.h */,
 				AA7558931595D55500BBD41B /* SDL_touch.h */,
-				AA7558941595D55500BBD41B /* SDL_types.h */,
 				AA7558951595D55500BBD41B /* SDL_version.h */,
 				AA7558961595D55500BBD41B /* SDL_video.h */,
 			);
@@ -1014,7 +1011,6 @@
 				AA7558C41595D55500BBD41B /* SDL_thread.h in Headers */,
 				AA7558C51595D55500BBD41B /* SDL_timer.h in Headers */,
 				AA7558C61595D55500BBD41B /* SDL_touch.h in Headers */,
-				AA7558C71595D55500BBD41B /* SDL_types.h in Headers */,
 				AA7558C81595D55500BBD41B /* SDL_version.h in Headers */,
 				AA7558C91595D55500BBD41B /* SDL_video.h in Headers */,
 				AA7558CA1595D55500BBD41B /* SDL.h in Headers */,
diff --git a/Xcode-iOS/Template/SDL iOS Application/___PROJECTNAME___.xcodeproj/project.pbxproj b/Xcode-iOS/Template/SDL iOS Application/___PROJECTNAME___.xcodeproj/project.pbxproj
index 3e0eb0c80..8de6d370e 100755
--- a/Xcode-iOS/Template/SDL iOS Application/___PROJECTNAME___.xcodeproj/project.pbxproj	
+++ b/Xcode-iOS/Template/SDL iOS Application/___PROJECTNAME___.xcodeproj/project.pbxproj	
@@ -75,7 +75,6 @@
 		0097E2CE12F70C4D00724AC5 /* SDL_thread.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = SDL_thread.h; sourceTree = ""; };
 		0097E2CF12F70C4D00724AC5 /* SDL_timer.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = SDL_timer.h; sourceTree = ""; };
 		0097E2D012F70C4D00724AC5 /* SDL_touch.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = SDL_touch.h; sourceTree = ""; };
-		0097E2D112F70C4D00724AC5 /* SDL_types.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = SDL_types.h; sourceTree = ""; };
 		0097E2D212F70C4D00724AC5 /* SDL_version.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = SDL_version.h; sourceTree = ""; };
 		0097E2D312F70C4D00724AC5 /* SDL_video.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = SDL_video.h; sourceTree = ""; };
 		0097E2D512F70C4D00724AC5 /* libSDL.a */ = {isa = PBXFileReference; lastKnownFileType = archive.ar; path = libSDL.a; sourceTree = ""; };
@@ -178,7 +177,6 @@
 				0097E2CE12F70C4D00724AC5 /* SDL_thread.h */,
 				0097E2CF12F70C4D00724AC5 /* SDL_timer.h */,
 				0097E2D012F70C4D00724AC5 /* SDL_touch.h */,
-				0097E2D112F70C4D00724AC5 /* SDL_types.h */,
 				0097E2D212F70C4D00724AC5 /* SDL_version.h */,
 				0097E2D312F70C4D00724AC5 /* SDL_video.h */,
 			);
diff --git a/Xcode/SDL/SDL.xcodeproj/project.pbxproj b/Xcode/SDL/SDL.xcodeproj/project.pbxproj
index 48c4c0edf..7542a4399 100755
--- a/Xcode/SDL/SDL.xcodeproj/project.pbxproj
+++ b/Xcode/SDL/SDL.xcodeproj/project.pbxproj
@@ -499,8 +499,6 @@
 		AA7558551595D4D800BBD41B /* SDL_timer.h in Headers */ = {isa = PBXBuildFile; fileRef = AA7557F41595D4D800BBD41B /* SDL_timer.h */; };
 		AA7558561595D4D800BBD41B /* SDL_touch.h in Headers */ = {isa = PBXBuildFile; fileRef = AA7557F51595D4D800BBD41B /* SDL_touch.h */; settings = {ATTRIBUTES = (Public, ); }; };
 		AA7558571595D4D800BBD41B /* SDL_touch.h in Headers */ = {isa = PBXBuildFile; fileRef = AA7557F51595D4D800BBD41B /* SDL_touch.h */; };
-		AA7558581595D4D800BBD41B /* SDL_types.h in Headers */ = {isa = PBXBuildFile; fileRef = AA7557F61595D4D800BBD41B /* SDL_types.h */; settings = {ATTRIBUTES = (Public, ); }; };
-		AA7558591595D4D800BBD41B /* SDL_types.h in Headers */ = {isa = PBXBuildFile; fileRef = AA7557F61595D4D800BBD41B /* SDL_types.h */; };
 		AA75585A1595D4D800BBD41B /* SDL_version.h in Headers */ = {isa = PBXBuildFile; fileRef = AA7557F71595D4D800BBD41B /* SDL_version.h */; settings = {ATTRIBUTES = (Public, ); }; };
 		AA75585B1595D4D800BBD41B /* SDL_version.h in Headers */ = {isa = PBXBuildFile; fileRef = AA7557F71595D4D800BBD41B /* SDL_version.h */; };
 		AA75585C1595D4D800BBD41B /* SDL_video.h in Headers */ = {isa = PBXBuildFile; fileRef = AA7557F81595D4D800BBD41B /* SDL_video.h */; settings = {ATTRIBUTES = (Public, ); }; };
@@ -647,7 +645,6 @@
 		DB313FF317554B71006C0E22 /* SDL_thread.h in Headers */ = {isa = PBXBuildFile; fileRef = AA7557F31595D4D800BBD41B /* SDL_thread.h */; };
 		DB313FF417554B71006C0E22 /* SDL_timer.h in Headers */ = {isa = PBXBuildFile; fileRef = AA7557F41595D4D800BBD41B /* SDL_timer.h */; };
 		DB313FF517554B71006C0E22 /* SDL_touch.h in Headers */ = {isa = PBXBuildFile; fileRef = AA7557F51595D4D800BBD41B /* SDL_touch.h */; };
-		DB313FF617554B71006C0E22 /* SDL_types.h in Headers */ = {isa = PBXBuildFile; fileRef = AA7557F61595D4D800BBD41B /* SDL_types.h */; };
 		DB313FF717554B71006C0E22 /* SDL_version.h in Headers */ = {isa = PBXBuildFile; fileRef = AA7557F71595D4D800BBD41B /* SDL_version.h */; };
 		DB313FF817554B71006C0E22 /* SDL_video.h in Headers */ = {isa = PBXBuildFile; fileRef = AA7557F81595D4D800BBD41B /* SDL_video.h */; };
 		DB313FF917554B71006C0E22 /* SDL.h in Headers */ = {isa = PBXBuildFile; fileRef = AA7557F91595D4D800BBD41B /* SDL.h */; };
@@ -1034,7 +1031,6 @@
 		AA7557F31595D4D800BBD41B /* SDL_thread.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = SDL_thread.h; sourceTree = ""; };
 		AA7557F41595D4D800BBD41B /* SDL_timer.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = SDL_timer.h; sourceTree = ""; };
 		AA7557F51595D4D800BBD41B /* SDL_touch.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = SDL_touch.h; sourceTree = ""; };
-		AA7557F61595D4D800BBD41B /* SDL_types.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = SDL_types.h; sourceTree = ""; };
 		AA7557F71595D4D800BBD41B /* SDL_version.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = SDL_version.h; sourceTree = ""; };
 		AA7557F81595D4D800BBD41B /* SDL_video.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = SDL_video.h; sourceTree = ""; };
 		AA7557F91595D4D800BBD41B /* SDL.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = SDL.h; sourceTree = ""; };
@@ -1163,7 +1159,6 @@
 				AA7557F31595D4D800BBD41B /* SDL_thread.h */,
 				AA7557F41595D4D800BBD41B /* SDL_timer.h */,
 				AA7557F51595D4D800BBD41B /* SDL_touch.h */,
-				AA7557F61595D4D800BBD41B /* SDL_types.h */,
 				AA7557F71595D4D800BBD41B /* SDL_version.h */,
 				AA7557F81595D4D800BBD41B /* SDL_video.h */,
 			);
@@ -1757,7 +1752,6 @@
 				AA7558521595D4D800BBD41B /* SDL_thread.h in Headers */,
 				AA7558541595D4D800BBD41B /* SDL_timer.h in Headers */,
 				AA7558561595D4D800BBD41B /* SDL_touch.h in Headers */,
-				AA7558581595D4D800BBD41B /* SDL_types.h in Headers */,
 				AA75585A1595D4D800BBD41B /* SDL_version.h in Headers */,
 				AA75585C1595D4D800BBD41B /* SDL_video.h in Headers */,
 				AA75585E1595D4D800BBD41B /* SDL.h in Headers */,
@@ -1985,7 +1979,6 @@
 				AA7558531595D4D800BBD41B /* SDL_thread.h in Headers */,
 				AA7558551595D4D800BBD41B /* SDL_timer.h in Headers */,
 				AA7558571595D4D800BBD41B /* SDL_touch.h in Headers */,
-				AA7558591595D4D800BBD41B /* SDL_types.h in Headers */,
 				AA75585B1595D4D800BBD41B /* SDL_version.h in Headers */,
 				AA75585D1595D4D800BBD41B /* SDL_video.h in Headers */,
 				AA75585F1595D4D800BBD41B /* SDL.h in Headers */,
@@ -2129,7 +2122,6 @@
 				DB313FF317554B71006C0E22 /* SDL_thread.h in Headers */,
 				DB313FF417554B71006C0E22 /* SDL_timer.h in Headers */,
 				DB313FF517554B71006C0E22 /* SDL_touch.h in Headers */,
-				DB313FF617554B71006C0E22 /* SDL_types.h in Headers */,
 				DB313FF717554B71006C0E22 /* SDL_version.h in Headers */,
 				DB313FF817554B71006C0E22 /* SDL_video.h in Headers */,
 				DB313FF917554B71006C0E22 /* SDL.h in Headers */,
diff --git a/include/SDL_types.h b/include/SDL_types.h
deleted file mode 100644
index bb485cdb0..000000000
--- a/include/SDL_types.h
+++ /dev/null
@@ -1,29 +0,0 @@
-/*
-  Simple DirectMedia Layer
-  Copyright (C) 1997-2013 Sam Lantinga 
-
-  This software is provided 'as-is', without any express or implied
-  warranty.  In no event will the authors be held liable for any damages
-  arising from the use of this software.
-
-  Permission is granted to anyone to use this software for any purpose,
-  including commercial applications, and to alter it and redistribute it
-  freely, subject to the following restrictions:
-
-  1. The origin of this software must not be misrepresented; you must not
-     claim that you wrote the original software. If you use this software
-     in a product, an acknowledgment in the product documentation would be
-     appreciated but is not required.
-  2. Altered source versions must be plainly marked as such, and must not be
-     misrepresented as being the original software.
-  3. This notice may not be removed or altered from any source distribution.
-*/
-
-/**
- *  \file SDL_types.h
- *
- *  \deprecated
- */
-
-/* DEPRECATED */
-#include "SDL_stdinc.h"
diff --git a/src/joystick/iphoneos/SDLUIAccelerationDelegate.h b/src/joystick/iphoneos/SDLUIAccelerationDelegate.h
index 733357b49..21cb6b134 100644
--- a/src/joystick/iphoneos/SDLUIAccelerationDelegate.h
+++ b/src/joystick/iphoneos/SDLUIAccelerationDelegate.h
@@ -20,7 +20,7 @@
 */
 
 #import 
-#import 
+#include "SDL_stdinc.h"
 
 /* *INDENT-OFF* */
 @interface SDLUIAccelerationDelegate: NSObject  {

From b2d7f9277374c5f98d5818f324c3b268f38d6fb4 Mon Sep 17 00:00:00 2001
From: Gabriel Jacobo 
Date: Tue, 9 Jul 2013 10:25:16 -0300
Subject: [PATCH 297/542] Adds Input Focus handling on Android to improve
 pausing/resuming behavior Ref:
 http://android-developers.blogspot.com/2011/11/making-android-games-that-play-nice.html

---
 .../src/org/libsdl/app/SDLActivity.java          | 16 ++++++++++++++--
 1 file changed, 14 insertions(+), 2 deletions(-)

diff --git a/android-project/src/org/libsdl/app/SDLActivity.java b/android-project/src/org/libsdl/app/SDLActivity.java
index 6aa1d7089..e67bff68a 100644
--- a/android-project/src/org/libsdl/app/SDLActivity.java
+++ b/android-project/src/org/libsdl/app/SDLActivity.java
@@ -28,7 +28,7 @@ public class SDLActivity extends Activity {
     private static final String TAG = "SDL";
 
     // Keep track of the paused state
-    public static boolean mIsPaused = false, mIsSurfaceReady = false;
+    public static boolean mIsPaused = false, mIsSurfaceReady = false, mHasFocus = true;
 
     // Main components
     protected static SDLActivity mSingleton;
@@ -94,6 +94,18 @@ public class SDLActivity extends Activity {
         SDLActivity.handleResume();
     }
 
+
+    @Override
+    public void onWindowFocusChanged(boolean hasFocus) {
+        super.onWindowFocusChanged(hasFocus);
+        Log.v("SDL", "onWindowFocusChanged(): " + hasFocus);
+
+        SDLActivity.mHasFocus = hasFocus;
+        if (hasFocus) {
+            SDLActivity.handleResume();
+        }
+    }
+
     @Override
     public void onLowMemory() {
         Log.v("SDL", "onLowMemory()");
@@ -139,7 +151,7 @@ public class SDLActivity extends Activity {
      * every time we get one of those events, only if it comes after surfaceDestroyed
      */
     public static void handleResume() {
-        if (SDLActivity.mIsPaused && SDLActivity.mIsSurfaceReady) {
+        if (SDLActivity.mIsPaused && SDLActivity.mIsSurfaceReady && SDLActivity.mHasFocus) {
             SDLActivity.mIsPaused = false;
             SDLActivity.nativeResume();
             mSurface.enableSensor(Sensor.TYPE_ACCELEROMETER, true);

From 98053e8a854a53def7c1eb12e2abcff7ada38182 Mon Sep 17 00:00:00 2001
From: Sam Lantinga 
Date: Tue, 9 Jul 2013 07:13:58 -0700
Subject: [PATCH 298/542] Backed out commit 898992405fa7 because memset() does
 a byte fill and SDL_memset4() does a uint32 fill and this change breaks
 SDL_FillRect()

---
 include/SDL_stdinc.h | 26 +++++++++++++++++++++++++-
 1 file changed, 25 insertions(+), 1 deletion(-)

diff --git a/include/SDL_stdinc.h b/include/SDL_stdinc.h
index a8f2f55cb..f8b6bd417 100644
--- a/include/SDL_stdinc.h
+++ b/include/SDL_stdinc.h
@@ -257,9 +257,33 @@ extern DECLSPEC void *SDLCALL SDL_memset(void *dst, int c, size_t len);
 /* Note that the semantics are different from memset() in that this is a 32-bit assignment */
 SDL_FORCE_INLINE void SDL_memset4(void *dst, int val, size_t dwords)
 {
-    SDL_memset(dst, val, dwords * 4);
+#if defined(__GNUC__) && defined(i386)
+    int u0, u1, u2;
+    __asm__ __volatile__ (
+        "cld \n\t"
+        "rep ; stosl \n\t"
+        : "=&D" (u0), "=&a" (u1), "=&c" (u2)
+        : "0" (dst), "1" (val), "2" (SDL_static_cast(Uint32, dwords))
+        : "memory"
+    );
+#else
+    size_t _n = (dwords + 3) / 4;
+    Uint32 *_p = SDL_static_cast(Uint32 *, dst);
+    Uint32 _val = (val);
+    if (dwords == 0)
+        return;
+    switch (dwords % 4)
+    {
+        case 0: do {    *_p++ = _val;
+        case 3:         *_p++ = _val;
+        case 2:         *_p++ = _val;
+        case 1:         *_p++ = _val;
+        } while ( --_n );
+    }
+#endif
 }
 
+
 extern DECLSPEC void *SDLCALL SDL_memcpy(void *dst, const void *src, size_t len);
 
 SDL_FORCE_INLINE void *SDL_memcpy4(void *dst, const void *src, size_t dwords)

From 9c43b29ef9b8aef78b8b6bc96fcdac4c41ae8de3 Mon Sep 17 00:00:00 2001
From: Sam Lantinga 
Date: Tue, 9 Jul 2013 08:01:40 -0700
Subject: [PATCH 299/542] Made the SDL_memset4() comment even clearer so we
 don't accidentally replace it with memset() in the future.

---
 include/SDL_stdinc.h | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/include/SDL_stdinc.h b/include/SDL_stdinc.h
index f8b6bd417..7fa9c1049 100644
--- a/include/SDL_stdinc.h
+++ b/include/SDL_stdinc.h
@@ -254,7 +254,7 @@ extern DECLSPEC void *SDLCALL SDL_memset(void *dst, int c, size_t len);
 #define SDL_zero(x) SDL_memset(&(x), 0, sizeof((x)))
 #define SDL_zerop(x) SDL_memset((x), 0, sizeof(*(x)))
 
-/* Note that the semantics are different from memset() in that this is a 32-bit assignment */
+/* Note that memset() is a byte assignment and this is a 32-bit assignment, so they're not directly equivalent. */
 SDL_FORCE_INLINE void SDL_memset4(void *dst, int val, size_t dwords)
 {
 #if defined(__GNUC__) && defined(i386)

From 2740a12ae3cfc56c8f0fa705c565b29e14b4bb97 Mon Sep 17 00:00:00 2001
From: "Ryan C. Gordon" 
Date: Tue, 9 Jul 2013 11:57:32 -0400
Subject: [PATCH 300/542] Backout hg changset 898992405fa7; lots of things
 still use SDL_types.h.  :/

Will remove this again at some point in the future, though.
---
 Makefile.in                                   |  1 +
 VisualC/SDL/SDL_VS2008.vcproj                 |  4 +++
 VisualC/SDL/SDL_VS2010.vcxproj                |  1 +
 VisualC/SDL/SDL_VS2012.vcxproj                |  1 +
 Xcode-iOS/SDL/SDL.xcodeproj/project.pbxproj   |  4 +++
 .../project.pbxproj                           |  2 ++
 Xcode/SDL/SDL.xcodeproj/project.pbxproj       |  8 +++++
 include/SDL_types.h                           | 29 +++++++++++++++++++
 .../iphoneos/SDLUIAccelerationDelegate.h      |  2 +-
 9 files changed, 51 insertions(+), 1 deletion(-)
 create mode 100644 include/SDL_types.h

diff --git a/Makefile.in b/Makefile.in
index f898172ae..ae6293e7d 100644
--- a/Makefile.in
+++ b/Makefile.in
@@ -87,6 +87,7 @@ HDRS = \
 	SDL_thread.h \
 	SDL_timer.h \
 	SDL_touch.h \
+	SDL_types.h \
 	SDL_version.h \
 	SDL_video.h \
 	begin_code.h \
diff --git a/VisualC/SDL/SDL_VS2008.vcproj b/VisualC/SDL/SDL_VS2008.vcproj
index 6842c4c6c..968fee2cb 100644
--- a/VisualC/SDL/SDL_VS2008.vcproj
+++ b/VisualC/SDL/SDL_VS2008.vcproj
@@ -559,6 +559,10 @@
 				RelativePath="..\..\include\SDL_touch.h"
 				>
 			
+			
+			
 			
diff --git a/VisualC/SDL/SDL_VS2010.vcxproj b/VisualC/SDL/SDL_VS2010.vcxproj
index 920285b2f..b6e995c54 100644
--- a/VisualC/SDL/SDL_VS2010.vcxproj
+++ b/VisualC/SDL/SDL_VS2010.vcxproj
@@ -261,6 +261,7 @@
     
     
     
+    
     
     
     
diff --git a/VisualC/SDL/SDL_VS2012.vcxproj b/VisualC/SDL/SDL_VS2012.vcxproj
index 748a77c68..efe911951 100644
--- a/VisualC/SDL/SDL_VS2012.vcxproj
+++ b/VisualC/SDL/SDL_VS2012.vcxproj
@@ -264,6 +264,7 @@
     
     
     
+    
     
     
     
diff --git a/Xcode-iOS/SDL/SDL.xcodeproj/project.pbxproj b/Xcode-iOS/SDL/SDL.xcodeproj/project.pbxproj
index bd4a26124..64f7d6d3b 100755
--- a/Xcode-iOS/SDL/SDL.xcodeproj/project.pbxproj
+++ b/Xcode-iOS/SDL/SDL.xcodeproj/project.pbxproj
@@ -128,6 +128,7 @@
 		AA7558C41595D55500BBD41B /* SDL_thread.h in Headers */ = {isa = PBXBuildFile; fileRef = AA7558911595D55500BBD41B /* SDL_thread.h */; };
 		AA7558C51595D55500BBD41B /* SDL_timer.h in Headers */ = {isa = PBXBuildFile; fileRef = AA7558921595D55500BBD41B /* SDL_timer.h */; };
 		AA7558C61595D55500BBD41B /* SDL_touch.h in Headers */ = {isa = PBXBuildFile; fileRef = AA7558931595D55500BBD41B /* SDL_touch.h */; };
+		AA7558C71595D55500BBD41B /* SDL_types.h in Headers */ = {isa = PBXBuildFile; fileRef = AA7558941595D55500BBD41B /* SDL_types.h */; };
 		AA7558C81595D55500BBD41B /* SDL_version.h in Headers */ = {isa = PBXBuildFile; fileRef = AA7558951595D55500BBD41B /* SDL_version.h */; };
 		AA7558C91595D55500BBD41B /* SDL_video.h in Headers */ = {isa = PBXBuildFile; fileRef = AA7558961595D55500BBD41B /* SDL_video.h */; };
 		AA7558CA1595D55500BBD41B /* SDL.h in Headers */ = {isa = PBXBuildFile; fileRef = AA7558971595D55500BBD41B /* SDL.h */; };
@@ -319,6 +320,7 @@
 		AA7558911595D55500BBD41B /* SDL_thread.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = SDL_thread.h; sourceTree = ""; };
 		AA7558921595D55500BBD41B /* SDL_timer.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = SDL_timer.h; sourceTree = ""; };
 		AA7558931595D55500BBD41B /* SDL_touch.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = SDL_touch.h; sourceTree = ""; };
+		AA7558941595D55500BBD41B /* SDL_types.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = SDL_types.h; sourceTree = ""; };
 		AA7558951595D55500BBD41B /* SDL_version.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = SDL_version.h; sourceTree = ""; };
 		AA7558961595D55500BBD41B /* SDL_video.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = SDL_video.h; sourceTree = ""; };
 		AA7558971595D55500BBD41B /* SDL.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = SDL.h; sourceTree = ""; };
@@ -711,6 +713,7 @@
 				AA7558911595D55500BBD41B /* SDL_thread.h */,
 				AA7558921595D55500BBD41B /* SDL_timer.h */,
 				AA7558931595D55500BBD41B /* SDL_touch.h */,
+				AA7558941595D55500BBD41B /* SDL_types.h */,
 				AA7558951595D55500BBD41B /* SDL_version.h */,
 				AA7558961595D55500BBD41B /* SDL_video.h */,
 			);
@@ -1011,6 +1014,7 @@
 				AA7558C41595D55500BBD41B /* SDL_thread.h in Headers */,
 				AA7558C51595D55500BBD41B /* SDL_timer.h in Headers */,
 				AA7558C61595D55500BBD41B /* SDL_touch.h in Headers */,
+				AA7558C71595D55500BBD41B /* SDL_types.h in Headers */,
 				AA7558C81595D55500BBD41B /* SDL_version.h in Headers */,
 				AA7558C91595D55500BBD41B /* SDL_video.h in Headers */,
 				AA7558CA1595D55500BBD41B /* SDL.h in Headers */,
diff --git a/Xcode-iOS/Template/SDL iOS Application/___PROJECTNAME___.xcodeproj/project.pbxproj b/Xcode-iOS/Template/SDL iOS Application/___PROJECTNAME___.xcodeproj/project.pbxproj
index 8de6d370e..3e0eb0c80 100755
--- a/Xcode-iOS/Template/SDL iOS Application/___PROJECTNAME___.xcodeproj/project.pbxproj	
+++ b/Xcode-iOS/Template/SDL iOS Application/___PROJECTNAME___.xcodeproj/project.pbxproj	
@@ -75,6 +75,7 @@
 		0097E2CE12F70C4D00724AC5 /* SDL_thread.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = SDL_thread.h; sourceTree = ""; };
 		0097E2CF12F70C4D00724AC5 /* SDL_timer.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = SDL_timer.h; sourceTree = ""; };
 		0097E2D012F70C4D00724AC5 /* SDL_touch.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = SDL_touch.h; sourceTree = ""; };
+		0097E2D112F70C4D00724AC5 /* SDL_types.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = SDL_types.h; sourceTree = ""; };
 		0097E2D212F70C4D00724AC5 /* SDL_version.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = SDL_version.h; sourceTree = ""; };
 		0097E2D312F70C4D00724AC5 /* SDL_video.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = SDL_video.h; sourceTree = ""; };
 		0097E2D512F70C4D00724AC5 /* libSDL.a */ = {isa = PBXFileReference; lastKnownFileType = archive.ar; path = libSDL.a; sourceTree = ""; };
@@ -177,6 +178,7 @@
 				0097E2CE12F70C4D00724AC5 /* SDL_thread.h */,
 				0097E2CF12F70C4D00724AC5 /* SDL_timer.h */,
 				0097E2D012F70C4D00724AC5 /* SDL_touch.h */,
+				0097E2D112F70C4D00724AC5 /* SDL_types.h */,
 				0097E2D212F70C4D00724AC5 /* SDL_version.h */,
 				0097E2D312F70C4D00724AC5 /* SDL_video.h */,
 			);
diff --git a/Xcode/SDL/SDL.xcodeproj/project.pbxproj b/Xcode/SDL/SDL.xcodeproj/project.pbxproj
index 7542a4399..48c4c0edf 100755
--- a/Xcode/SDL/SDL.xcodeproj/project.pbxproj
+++ b/Xcode/SDL/SDL.xcodeproj/project.pbxproj
@@ -499,6 +499,8 @@
 		AA7558551595D4D800BBD41B /* SDL_timer.h in Headers */ = {isa = PBXBuildFile; fileRef = AA7557F41595D4D800BBD41B /* SDL_timer.h */; };
 		AA7558561595D4D800BBD41B /* SDL_touch.h in Headers */ = {isa = PBXBuildFile; fileRef = AA7557F51595D4D800BBD41B /* SDL_touch.h */; settings = {ATTRIBUTES = (Public, ); }; };
 		AA7558571595D4D800BBD41B /* SDL_touch.h in Headers */ = {isa = PBXBuildFile; fileRef = AA7557F51595D4D800BBD41B /* SDL_touch.h */; };
+		AA7558581595D4D800BBD41B /* SDL_types.h in Headers */ = {isa = PBXBuildFile; fileRef = AA7557F61595D4D800BBD41B /* SDL_types.h */; settings = {ATTRIBUTES = (Public, ); }; };
+		AA7558591595D4D800BBD41B /* SDL_types.h in Headers */ = {isa = PBXBuildFile; fileRef = AA7557F61595D4D800BBD41B /* SDL_types.h */; };
 		AA75585A1595D4D800BBD41B /* SDL_version.h in Headers */ = {isa = PBXBuildFile; fileRef = AA7557F71595D4D800BBD41B /* SDL_version.h */; settings = {ATTRIBUTES = (Public, ); }; };
 		AA75585B1595D4D800BBD41B /* SDL_version.h in Headers */ = {isa = PBXBuildFile; fileRef = AA7557F71595D4D800BBD41B /* SDL_version.h */; };
 		AA75585C1595D4D800BBD41B /* SDL_video.h in Headers */ = {isa = PBXBuildFile; fileRef = AA7557F81595D4D800BBD41B /* SDL_video.h */; settings = {ATTRIBUTES = (Public, ); }; };
@@ -645,6 +647,7 @@
 		DB313FF317554B71006C0E22 /* SDL_thread.h in Headers */ = {isa = PBXBuildFile; fileRef = AA7557F31595D4D800BBD41B /* SDL_thread.h */; };
 		DB313FF417554B71006C0E22 /* SDL_timer.h in Headers */ = {isa = PBXBuildFile; fileRef = AA7557F41595D4D800BBD41B /* SDL_timer.h */; };
 		DB313FF517554B71006C0E22 /* SDL_touch.h in Headers */ = {isa = PBXBuildFile; fileRef = AA7557F51595D4D800BBD41B /* SDL_touch.h */; };
+		DB313FF617554B71006C0E22 /* SDL_types.h in Headers */ = {isa = PBXBuildFile; fileRef = AA7557F61595D4D800BBD41B /* SDL_types.h */; };
 		DB313FF717554B71006C0E22 /* SDL_version.h in Headers */ = {isa = PBXBuildFile; fileRef = AA7557F71595D4D800BBD41B /* SDL_version.h */; };
 		DB313FF817554B71006C0E22 /* SDL_video.h in Headers */ = {isa = PBXBuildFile; fileRef = AA7557F81595D4D800BBD41B /* SDL_video.h */; };
 		DB313FF917554B71006C0E22 /* SDL.h in Headers */ = {isa = PBXBuildFile; fileRef = AA7557F91595D4D800BBD41B /* SDL.h */; };
@@ -1031,6 +1034,7 @@
 		AA7557F31595D4D800BBD41B /* SDL_thread.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = SDL_thread.h; sourceTree = ""; };
 		AA7557F41595D4D800BBD41B /* SDL_timer.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = SDL_timer.h; sourceTree = ""; };
 		AA7557F51595D4D800BBD41B /* SDL_touch.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = SDL_touch.h; sourceTree = ""; };
+		AA7557F61595D4D800BBD41B /* SDL_types.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = SDL_types.h; sourceTree = ""; };
 		AA7557F71595D4D800BBD41B /* SDL_version.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = SDL_version.h; sourceTree = ""; };
 		AA7557F81595D4D800BBD41B /* SDL_video.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = SDL_video.h; sourceTree = ""; };
 		AA7557F91595D4D800BBD41B /* SDL.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = SDL.h; sourceTree = ""; };
@@ -1159,6 +1163,7 @@
 				AA7557F31595D4D800BBD41B /* SDL_thread.h */,
 				AA7557F41595D4D800BBD41B /* SDL_timer.h */,
 				AA7557F51595D4D800BBD41B /* SDL_touch.h */,
+				AA7557F61595D4D800BBD41B /* SDL_types.h */,
 				AA7557F71595D4D800BBD41B /* SDL_version.h */,
 				AA7557F81595D4D800BBD41B /* SDL_video.h */,
 			);
@@ -1752,6 +1757,7 @@
 				AA7558521595D4D800BBD41B /* SDL_thread.h in Headers */,
 				AA7558541595D4D800BBD41B /* SDL_timer.h in Headers */,
 				AA7558561595D4D800BBD41B /* SDL_touch.h in Headers */,
+				AA7558581595D4D800BBD41B /* SDL_types.h in Headers */,
 				AA75585A1595D4D800BBD41B /* SDL_version.h in Headers */,
 				AA75585C1595D4D800BBD41B /* SDL_video.h in Headers */,
 				AA75585E1595D4D800BBD41B /* SDL.h in Headers */,
@@ -1979,6 +1985,7 @@
 				AA7558531595D4D800BBD41B /* SDL_thread.h in Headers */,
 				AA7558551595D4D800BBD41B /* SDL_timer.h in Headers */,
 				AA7558571595D4D800BBD41B /* SDL_touch.h in Headers */,
+				AA7558591595D4D800BBD41B /* SDL_types.h in Headers */,
 				AA75585B1595D4D800BBD41B /* SDL_version.h in Headers */,
 				AA75585D1595D4D800BBD41B /* SDL_video.h in Headers */,
 				AA75585F1595D4D800BBD41B /* SDL.h in Headers */,
@@ -2122,6 +2129,7 @@
 				DB313FF317554B71006C0E22 /* SDL_thread.h in Headers */,
 				DB313FF417554B71006C0E22 /* SDL_timer.h in Headers */,
 				DB313FF517554B71006C0E22 /* SDL_touch.h in Headers */,
+				DB313FF617554B71006C0E22 /* SDL_types.h in Headers */,
 				DB313FF717554B71006C0E22 /* SDL_version.h in Headers */,
 				DB313FF817554B71006C0E22 /* SDL_video.h in Headers */,
 				DB313FF917554B71006C0E22 /* SDL.h in Headers */,
diff --git a/include/SDL_types.h b/include/SDL_types.h
new file mode 100644
index 000000000..bb485cdb0
--- /dev/null
+++ b/include/SDL_types.h
@@ -0,0 +1,29 @@
+/*
+  Simple DirectMedia Layer
+  Copyright (C) 1997-2013 Sam Lantinga 
+
+  This software is provided 'as-is', without any express or implied
+  warranty.  In no event will the authors be held liable for any damages
+  arising from the use of this software.
+
+  Permission is granted to anyone to use this software for any purpose,
+  including commercial applications, and to alter it and redistribute it
+  freely, subject to the following restrictions:
+
+  1. The origin of this software must not be misrepresented; you must not
+     claim that you wrote the original software. If you use this software
+     in a product, an acknowledgment in the product documentation would be
+     appreciated but is not required.
+  2. Altered source versions must be plainly marked as such, and must not be
+     misrepresented as being the original software.
+  3. This notice may not be removed or altered from any source distribution.
+*/
+
+/**
+ *  \file SDL_types.h
+ *
+ *  \deprecated
+ */
+
+/* DEPRECATED */
+#include "SDL_stdinc.h"
diff --git a/src/joystick/iphoneos/SDLUIAccelerationDelegate.h b/src/joystick/iphoneos/SDLUIAccelerationDelegate.h
index 21cb6b134..733357b49 100644
--- a/src/joystick/iphoneos/SDLUIAccelerationDelegate.h
+++ b/src/joystick/iphoneos/SDLUIAccelerationDelegate.h
@@ -20,7 +20,7 @@
 */
 
 #import 
-#include "SDL_stdinc.h"
+#import 
 
 /* *INDENT-OFF* */
 @interface SDLUIAccelerationDelegate: NSObject  {

From 4601ab68947be0bc8dbe5d22413f3cf3b93f130e Mon Sep 17 00:00:00 2001
From: Gabriel Jacobo 
Date: Tue, 9 Jul 2013 13:54:29 -0300
Subject: [PATCH 301/542] Removing video/uikit/*.c from configure's iOS sources
 Unexplicable computer sciences phenomenon: Instead of returning an empty set,
 *.c in an folder with no .c files produces the "*.c" string to be added as a
 source. I'm sorry future generations, we are doing the best we can :)

---
 configure    | 1 -
 configure.in | 1 -
 2 files changed, 2 deletions(-)

diff --git a/configure b/configure
index e60b62f5c..97ab2a3fe 100755
--- a/configure
+++ b/configure
@@ -22505,7 +22505,6 @@ $as_echo "#define SDL_POWER_BEOS 1" >>confdefs.h
         fi
         # The iOS platform requires special setup.
         SOURCES="$SOURCES $srcdir/src/video/uikit/*.m"
-        SOURCES="$SOURCES $srcdir/src/video/uikit/*.c"
         EXTRA_CFLAGS="$EXTRA_CFLAGS -fpascal-strings"
         EXTRA_LDFLAGS="$EXTRA_LDFLAGS -lm -liconv -lobjc"
         EXTRA_LDFLAGS="$EXTRA_LDFLAGS -Wl,-framework,Foundation"
diff --git a/configure.in b/configure.in
index 23194b488..825f5ba16 100644
--- a/configure.in
+++ b/configure.in
@@ -2592,7 +2592,6 @@ AC_HELP_STRING([--enable-render-d3d], [enable the Direct3D render driver [[defau
         fi
         # The iOS platform requires special setup.
         SOURCES="$SOURCES $srcdir/src/video/uikit/*.m"
-        SOURCES="$SOURCES $srcdir/src/video/uikit/*.c"
         EXTRA_CFLAGS="$EXTRA_CFLAGS -fpascal-strings"
         EXTRA_LDFLAGS="$EXTRA_LDFLAGS -lm -liconv -lobjc"
         EXTRA_LDFLAGS="$EXTRA_LDFLAGS -Wl,-framework,Foundation"

From ea36ba4f4e48814bee7b62f807e8c57da1cd2398 Mon Sep 17 00:00:00 2001
From: =?UTF-8?q?J=C3=B8rgen=20P=2E=20Tjern=C3=B8?=
 
Date: Tue, 9 Jul 2013 12:57:12 -0700
Subject: [PATCH 302/542] Mac: Remove dead FULLSCREEN_TOGGLEABLE code.

This code was written almost 2 years ago, and the flag hasn't been
changed since. Cleaning up the code by removing the conditional blocks,
so that they behave the same way they have for the past two years.

FULLSCREEN_TOGGLEABLE used to cause us to use
-[NSOpenGLContext setFullScreen] and a pixel format with
NSOpenGLPFAFullScreen.
---
 src/video/cocoa/SDL_cocoaopengl.h |  3 ---
 src/video/cocoa/SDL_cocoaopengl.m | 11 -----------
 src/video/cocoa/SDL_cocoawindow.m |  2 --
 3 files changed, 16 deletions(-)

diff --git a/src/video/cocoa/SDL_cocoaopengl.h b/src/video/cocoa/SDL_cocoaopengl.h
index 4c4005be7..77bdf4449 100644
--- a/src/video/cocoa/SDL_cocoaopengl.h
+++ b/src/video/cocoa/SDL_cocoaopengl.h
@@ -25,9 +25,6 @@
 
 #if SDL_VIDEO_OPENGL_CGL
 
-/* Define this if you want to be able to toggle fullscreen mode seamlessly */
-#define FULLSCREEN_TOGGLEABLE
-
 struct SDL_GLDriverData
 {
     int initialized;
diff --git a/src/video/cocoa/SDL_cocoaopengl.m b/src/video/cocoa/SDL_cocoaopengl.m
index 589fb1dd7..84f89639d 100644
--- a/src/video/cocoa/SDL_cocoaopengl.m
+++ b/src/video/cocoa/SDL_cocoaopengl.m
@@ -119,12 +119,6 @@ Cocoa_GL_CreateContext(_THIS, SDL_Window * window)
         attr[i++] = profile;
     }
 
-#ifndef FULLSCREEN_TOGGLEABLE
-    if (window->flags & SDL_WINDOW_FULLSCREEN) {
-        attr[i++] = NSOpenGLPFAFullScreen;
-    }
-#endif
-
     attr[i++] = NSOpenGLPFAColorSize;
     attr[i++] = SDL_BYTESPERPIXEL(display->current_mode.format)*8;
 
@@ -218,11 +212,6 @@ Cocoa_GL_MakeCurrent(_THIS, SDL_Window * window, SDL_GLContext context)
         SDL_WindowData *windowdata = (SDL_WindowData *)window->driverdata;
         NSOpenGLContext *nscontext = (NSOpenGLContext *)context;
 
-#ifndef FULLSCREEN_TOGGLEABLE
-        if (window->flags & SDL_WINDOW_FULLSCREEN) {
-            [nscontext setFullScreen];
-        } else
-#endif
         if ([nscontext view] != [windowdata->nswindow contentView]) {
             [nscontext setView:[windowdata->nswindow contentView]];
             [nscontext update];
diff --git a/src/video/cocoa/SDL_cocoawindow.m b/src/video/cocoa/SDL_cocoawindow.m
index bb30391fa..df3881407 100644
--- a/src/video/cocoa/SDL_cocoawindow.m
+++ b/src/video/cocoa/SDL_cocoawindow.m
@@ -1012,14 +1012,12 @@ Cocoa_SetWindowFullscreen(_THIS, SDL_Window * window, SDL_VideoDisplay * display
         Cocoa_SetWindowTitle(_this, window);
     }
 
-#ifdef FULLSCREEN_TOGGLEABLE
     if (SDL_ShouldAllowTopmost() && fullscreen) {
         /* OpenGL is rendering to the window, so make it visible! */
         [nswindow setLevel:CGShieldingWindowLevel()];
     } else {
         [nswindow setLevel:kCGNormalWindowLevel];
     }
-#endif
 
     [data->listener pauseVisibleObservation];
     [nswindow makeKeyAndOrderFront:nil];

From ab91b4ce1493e39e0604e71eb5204a337b6c6919 Mon Sep 17 00:00:00 2001
From: =?UTF-8?q?J=C3=B8rgen=20P=2E=20Tjern=C3=B8?=
 
Date: Tue, 9 Jul 2013 12:58:54 -0700
Subject: [PATCH 303/542] SDL_GL_MakeCurrent: Only no-op redundant calls on
 *same* thread.

This ensures that we only no-op redundant calls if they're made on the
same thread as the last MakeCurrent with those arguments. This should
maek SDL behave better with multithreaded environments.
---
 src/video/SDL_sysvideo.h | 2 ++
 src/video/SDL_video.c    | 5 ++++-
 2 files changed, 6 insertions(+), 1 deletion(-)

diff --git a/src/video/SDL_sysvideo.h b/src/video/SDL_sysvideo.h
index 45ca74507..cd3fa2717 100644
--- a/src/video/SDL_sysvideo.h
+++ b/src/video/SDL_sysvideo.h
@@ -25,6 +25,7 @@
 
 #include "SDL_messagebox.h"
 #include "SDL_shape.h"
+#include "SDL_thread.h"
 
 /* The SDL video driver */
 
@@ -301,6 +302,7 @@ struct SDL_VideoDevice
     /* Cache current GL context; don't call the OS when it hasn't changed. */
     SDL_Window *current_glwin;
     SDL_GLContext current_glctx;
+    SDL_threadID current_glthread;
 
     /* * * */
     /* Data private to this driver */
diff --git a/src/video/SDL_video.c b/src/video/SDL_video.c
index d5d0a7556..801fa5e3e 100644
--- a/src/video/SDL_video.c
+++ b/src/video/SDL_video.c
@@ -2730,6 +2730,7 @@ SDL_GL_CreateContext(SDL_Window * window)
     /* Creating a context is assumed to make it current in the SDL driver. */
     _this->current_glwin = window;
     _this->current_glctx = ctx;
+    _this->current_glthread = SDL_ThreadID();
 
     return ctx;
 }
@@ -2738,6 +2739,7 @@ int
 SDL_GL_MakeCurrent(SDL_Window * window, SDL_GLContext ctx)
 {
     int retval;
+    SDL_threadID thread = SDL_ThreadID();
 
     if (!ctx) {
         window = NULL;
@@ -2749,13 +2751,14 @@ SDL_GL_MakeCurrent(SDL_Window * window, SDL_GLContext ctx)
         }
     }
 
-    if ((window == _this->current_glwin) && (ctx == _this->current_glctx)) {
+    if ((window == _this->current_glwin) && (ctx == _this->current_glctx) && (thread == _this->current_glthread)) {
         retval = 0;  /* we're already current. */
     } else {
         retval = _this->GL_MakeCurrent(_this, window, ctx);
         if (retval == 0) {
             _this->current_glwin = window;
             _this->current_glctx = ctx;
+            _this->current_glthread = thread;
         }
     }
 

From bfcb08d5694d3ba128f653ef6a2a3728b159f15c Mon Sep 17 00:00:00 2001
From: Sam Lantinga 
Date: Wed, 10 Jul 2013 02:32:04 -0700
Subject: [PATCH 304/542] Implemented an API for thread-local storage:
 SDL_TLSCreate(), SDL_TLSSet(), SDL_TLSGet()

---
 VisualC/SDL/SDL_VS2008.vcproj               |   4 +
 VisualC/SDL/SDL_VS2010.vcxproj              |   3 +-
 VisualC/SDL/SDL_VS2012.vcxproj              |   3 +-
 Xcode-iOS/SDL/SDL.xcodeproj/project.pbxproj |   4 +
 Xcode/SDL/SDL.xcodeproj/project.pbxproj     |   8 +
 configure                                   |  25 ++-
 configure.in                                |   8 +-
 include/SDL_thread.h                        |  61 +++++++
 src/thread/SDL_thread.c                     | 169 +++-----------------
 src/thread/beos/SDL_systls.c                | 106 ++++++++++++
 src/thread/generic/SDL_systls.c             | 163 +++++++++++++++++++
 src/thread/pthread/SDL_systls.c             | 101 ++++++++++++
 src/thread/windows/SDL_systls.c             | 106 ++++++++++++
 test/testthread.c                           |  13 +-
 14 files changed, 618 insertions(+), 156 deletions(-)
 create mode 100644 src/thread/beos/SDL_systls.c
 create mode 100644 src/thread/generic/SDL_systls.c
 create mode 100644 src/thread/pthread/SDL_systls.c
 create mode 100644 src/thread/windows/SDL_systls.c

diff --git a/VisualC/SDL/SDL_VS2008.vcproj b/VisualC/SDL/SDL_VS2008.vcproj
index 968fee2cb..9481c6380 100644
--- a/VisualC/SDL/SDL_VS2008.vcproj
+++ b/VisualC/SDL/SDL_VS2008.vcproj
@@ -1132,6 +1132,10 @@
 			RelativePath="..\..\src\thread\windows\SDL_systhread.c"
 			>
 		
+		
+		
 		
diff --git a/VisualC/SDL/SDL_VS2010.vcxproj b/VisualC/SDL/SDL_VS2010.vcxproj
index b6e995c54..72b111c71 100644
--- a/VisualC/SDL/SDL_VS2010.vcxproj
+++ b/VisualC/SDL/SDL_VS2010.vcxproj
@@ -438,6 +438,7 @@
     
     
     
+    
     
     
     
@@ -462,4 +463,4 @@
   
   
   
-
\ No newline at end of file
+
diff --git a/VisualC/SDL/SDL_VS2012.vcxproj b/VisualC/SDL/SDL_VS2012.vcxproj
index efe911951..74e470051 100644
--- a/VisualC/SDL/SDL_VS2012.vcxproj
+++ b/VisualC/SDL/SDL_VS2012.vcxproj
@@ -441,6 +441,7 @@
     
     
     
+    
     
     
     
@@ -466,4 +467,4 @@
   
   
   
-
\ No newline at end of file
+
diff --git a/Xcode-iOS/SDL/SDL.xcodeproj/project.pbxproj b/Xcode-iOS/SDL/SDL.xcodeproj/project.pbxproj
index 64f7d6d3b..bdad57c6a 100755
--- a/Xcode-iOS/SDL/SDL.xcodeproj/project.pbxproj
+++ b/Xcode-iOS/SDL/SDL.xcodeproj/project.pbxproj
@@ -76,6 +76,7 @@
 		93CB792613FC5F5300BD3E05 /* SDL_uikitviewcontroller.m in Sources */ = {isa = PBXBuildFile; fileRef = 93CB792513FC5F5300BD3E05 /* SDL_uikitviewcontroller.m */; };
 		AA0AD06216647BBB00CE5896 /* SDL_gamecontroller.c in Sources */ = {isa = PBXBuildFile; fileRef = AA0AD06116647BBB00CE5896 /* SDL_gamecontroller.c */; };
 		AA0AD06516647BD400CE5896 /* SDL_gamecontroller.h in Headers */ = {isa = PBXBuildFile; fileRef = AA0AD06416647BD400CE5896 /* SDL_gamecontroller.h */; };
+		AA0F8495178D5F1A00823F9D /* SDL_systls.c in Sources */ = {isa = PBXBuildFile; fileRef = AA0F8494178D5F1A00823F9D /* SDL_systls.c */; };
 		AA126AD41617C5E7005ABC8F /* SDL_uikitmodes.h in Headers */ = {isa = PBXBuildFile; fileRef = AA126AD21617C5E6005ABC8F /* SDL_uikitmodes.h */; };
 		AA126AD51617C5E7005ABC8F /* SDL_uikitmodes.m in Sources */ = {isa = PBXBuildFile; fileRef = AA126AD31617C5E6005ABC8F /* SDL_uikitmodes.m */; };
 		AA628ADB159369E3005138DD /* SDL_rotate.c in Sources */ = {isa = PBXBuildFile; fileRef = AA628AD9159369E3005138DD /* SDL_rotate.c */; };
@@ -268,6 +269,7 @@
 		93CB792513FC5F5300BD3E05 /* SDL_uikitviewcontroller.m */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.objc; path = SDL_uikitviewcontroller.m; sourceTree = ""; };
 		AA0AD06116647BBB00CE5896 /* SDL_gamecontroller.c */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.c; path = SDL_gamecontroller.c; sourceTree = ""; };
 		AA0AD06416647BD400CE5896 /* SDL_gamecontroller.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = SDL_gamecontroller.h; sourceTree = ""; };
+		AA0F8494178D5F1A00823F9D /* SDL_systls.c */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.c; path = SDL_systls.c; sourceTree = ""; };
 		AA126AD21617C5E6005ABC8F /* SDL_uikitmodes.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = SDL_uikitmodes.h; sourceTree = ""; };
 		AA126AD31617C5E6005ABC8F /* SDL_uikitmodes.m */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.objc; path = SDL_uikitmodes.m; sourceTree = ""; };
 		AA628AD9159369E3005138DD /* SDL_rotate.c */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.c; path = SDL_rotate.c; sourceTree = ""; };
@@ -851,6 +853,7 @@
 				FD99BA0A0DD52EDC00FB1D6B /* SDL_syssem.c */,
 				FD99BA0B0DD52EDC00FB1D6B /* SDL_systhread.c */,
 				FD99BA0C0DD52EDC00FB1D6B /* SDL_systhread_c.h */,
+				AA0F8494178D5F1A00823F9D /* SDL_systls.c */,
 			);
 			path = pthread;
 			sourceTree = "";
@@ -1189,6 +1192,7 @@
 				AA704DD7162AA90A0076D1C1 /* SDL_dropevents.c in Sources */,
 				AABCC3951640643D00AB8930 /* SDL_uikitmessagebox.m in Sources */,
 				AA0AD06216647BBB00CE5896 /* SDL_gamecontroller.c in Sources */,
+				AA0F8495178D5F1A00823F9D /* SDL_systls.c in Sources */,
 			);
 			runOnlyForDeploymentPostprocessing = 0;
 		};
diff --git a/Xcode/SDL/SDL.xcodeproj/project.pbxproj b/Xcode/SDL/SDL.xcodeproj/project.pbxproj
index 48c4c0edf..c2552eff4 100755
--- a/Xcode/SDL/SDL.xcodeproj/project.pbxproj
+++ b/Xcode/SDL/SDL.xcodeproj/project.pbxproj
@@ -398,6 +398,9 @@
 		A77E6EB4167AB0A90010E40B /* SDL_gamecontroller.h in Headers */ = {isa = PBXBuildFile; fileRef = A77E6EB3167AB0A90010E40B /* SDL_gamecontroller.h */; settings = {ATTRIBUTES = (Public, ); }; };
 		A77E6EB5167AB0A90010E40B /* SDL_gamecontroller.h in Headers */ = {isa = PBXBuildFile; fileRef = A77E6EB3167AB0A90010E40B /* SDL_gamecontroller.h */; };
 		AA0AD09D16648D1700CE5896 /* SDL_gamecontroller.c in Sources */ = {isa = PBXBuildFile; fileRef = BBFC088A164C6514003E6A99 /* SDL_gamecontroller.c */; };
+		AA0F8491178D5ECC00823F9D /* SDL_systls.c in Sources */ = {isa = PBXBuildFile; fileRef = AA0F8490178D5ECC00823F9D /* SDL_systls.c */; };
+		AA0F8492178D5ECC00823F9D /* SDL_systls.c in Sources */ = {isa = PBXBuildFile; fileRef = AA0F8490178D5ECC00823F9D /* SDL_systls.c */; };
+		AA0F8493178D5ECC00823F9D /* SDL_systls.c in Sources */ = {isa = PBXBuildFile; fileRef = AA0F8490178D5ECC00823F9D /* SDL_systls.c */; };
 		AA41F88014B8F1F500993C4F /* SDL_dropevents.c in Sources */ = {isa = PBXBuildFile; fileRef = 566CDE8E148F0AC200C5A9BB /* SDL_dropevents.c */; };
 		AA628ACA159367B7005138DD /* SDL_rotate.c in Sources */ = {isa = PBXBuildFile; fileRef = AA628AC8159367B7005138DD /* SDL_rotate.c */; };
 		AA628ACB159367B7005138DD /* SDL_rotate.c in Sources */ = {isa = PBXBuildFile; fileRef = AA628AC8159367B7005138DD /* SDL_rotate.c */; };
@@ -984,6 +987,7 @@
 		566CDE8D148F0AC200C5A9BB /* SDL_dropevents_c.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = SDL_dropevents_c.h; sourceTree = ""; };
 		566CDE8E148F0AC200C5A9BB /* SDL_dropevents.c */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.c; path = SDL_dropevents.c; sourceTree = ""; };
 		A77E6EB3167AB0A90010E40B /* SDL_gamecontroller.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = SDL_gamecontroller.h; sourceTree = ""; };
+		AA0F8490178D5ECC00823F9D /* SDL_systls.c */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.c; path = SDL_systls.c; sourceTree = ""; };
 		AA628AC8159367B7005138DD /* SDL_rotate.c */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.c; path = SDL_rotate.c; sourceTree = ""; };
 		AA628AC9159367B7005138DD /* SDL_rotate.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = SDL_rotate.h; sourceTree = ""; };
 		AA628ACF159367F2005138DD /* SDL_x11xinput2.c */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.c; path = SDL_x11xinput2.c; sourceTree = ""; };
@@ -1462,6 +1466,7 @@
 				04BDFE8112E6671800899322 /* SDL_syssem.c */,
 				04BDFE8212E6671800899322 /* SDL_systhread.c */,
 				04BDFE8312E6671800899322 /* SDL_systhread_c.h */,
+				AA0F8490178D5ECC00823F9D /* SDL_systls.c */,
 			);
 			path = pthread;
 			sourceTree = "";
@@ -2403,6 +2408,7 @@
 				AA9E4093163BE51E007A2AD0 /* SDL_x11messagebox.c in Sources */,
 				AABCC38F164063D200AB8930 /* SDL_cocoamessagebox.m in Sources */,
 				AA0AD09D16648D1700CE5896 /* SDL_gamecontroller.c in Sources */,
+				AA0F8491178D5ECC00823F9D /* SDL_systls.c in Sources */,
 			);
 			runOnlyForDeploymentPostprocessing = 0;
 		};
@@ -2519,6 +2525,7 @@
 				AA628AD2159367F2005138DD /* SDL_x11xinput2.c in Sources */,
 				AA9E4094163BE51E007A2AD0 /* SDL_x11messagebox.c in Sources */,
 				AABCC390164063D200AB8930 /* SDL_cocoamessagebox.m in Sources */,
+				AA0F8492178D5ECC00823F9D /* SDL_systls.c in Sources */,
 			);
 			runOnlyForDeploymentPostprocessing = 0;
 		};
@@ -2635,6 +2642,7 @@
 				DB31406817554B71006C0E22 /* SDL_x11xinput2.c in Sources */,
 				DB31406917554B71006C0E22 /* SDL_x11messagebox.c in Sources */,
 				DB31406A17554B71006C0E22 /* SDL_cocoamessagebox.m in Sources */,
+				AA0F8493178D5ECC00823F9D /* SDL_systls.c in Sources */,
 			);
 			runOnlyForDeploymentPostprocessing = 0;
 		};
diff --git a/configure b/configure
index 97ab2a3fe..8d824ecca 100755
--- a/configure
+++ b/configure
@@ -1511,7 +1511,7 @@ Optional Features:
   --enable-sse            use SSE assembly routines [[default=yes]]
   --enable-sse2           use SSE2 assembly routines [[default=no]]
   --enable-altivec        use Altivec assembly routines [[default=yes]]
-  --enable-oss            support the OSS audio API [[default=yes]]
+  --enable-oss            support the OSS audio API [[default=maybe]]
   --enable-alsa           support the ALSA audio API [[default=yes]]
   --disable-alsatest      Do not try to compile and run a test Alsa program
   --enable-alsa-shared    dynamically load ALSA audio support [[default=yes]]
@@ -17535,9 +17535,21 @@ CheckOSS()
 if test "${enable_oss+set}" = set; then :
   enableval=$enable_oss;
 else
-  enable_oss=yes
+  enable_oss=maybe
 fi
 
+
+    # OpenBSD "has" OSS, but it's not really for app use. They want you to
+    #  use sndio instead. So on there, we default to disabled. You can force
+    #  it on if you really want, though.
+    if test x$enable_oss = xmaybe; then
+        enable_oss=yes
+        case "$host" in
+            *-*-openbsd*)
+                enable_oss=no;;
+        esac
+    fi
+
     if test x$enable_audio = xyes -a x$enable_oss = xyes; then
         { $as_echo "$as_me:${as_lineno-$LINENO}: checking for OSS audio support" >&5
 $as_echo_n "checking for OSS audio support... " >&6; }
@@ -21423,6 +21435,9 @@ $as_echo "$has_pthread_set_name_np" >&6; }
             # We can fake these with semaphores and mutexes if necessary
             SOURCES="$SOURCES $srcdir/src/thread/pthread/SDL_syscond.c"
 
+            # Thread local storage
+            SOURCES="$SOURCES $srcdir/src/thread/pthread/SDL_systls.c"
+
             have_threads=yes
         fi
     fi
@@ -22206,7 +22221,7 @@ $as_echo "#define SDL_AUDIO_DRIVER_SUNAUDIO 1" >>confdefs.h
                 SOURCES="$SOURCES $srcdir/src/audio/sun/*.c"
                 have_audio=yes
             ;;
-            netbsd|openbsd)
+            netbsd)  # Don't use this on OpenBSD, it's busted.
 
 $as_echo "#define SDL_AUDIO_DRIVER_BSD 1" >>confdefs.h
 
@@ -22367,9 +22382,7 @@ $as_echo "#define SDL_POWER_WINDOWS 1" >>confdefs.h
 
 $as_echo "#define SDL_THREAD_WINDOWS 1" >>confdefs.h
 
-            SOURCES="$SOURCES $srcdir/src/thread/windows/SDL_sysmutex.c"
-            SOURCES="$SOURCES $srcdir/src/thread/windows/SDL_syssem.c"
-            SOURCES="$SOURCES $srcdir/src/thread/windows/SDL_systhread.c"
+            SOURCES="$SOURCES $srcdir/src/thread/windows/*.c"
             SOURCES="$SOURCES $srcdir/src/thread/generic/SDL_syscond.c"
             have_threads=yes
         fi
diff --git a/configure.in b/configure.in
index 825f5ba16..b795bcda5 100644
--- a/configure.in
+++ b/configure.in
@@ -657,6 +657,7 @@ AC_HELP_STRING([--enable-oss], [support the OSS audio API [[default=maybe]]]),
         case "$host" in
             *-*-openbsd*)
                 enable_oss=no;;
+        esac
     fi
 
     if test x$enable_audio = xyes -a x$enable_oss = xyes; then
@@ -2019,6 +2020,9 @@ AC_HELP_STRING([--enable-pthread-sem], [use pthread semaphores [[default=yes]]])
             # We can fake these with semaphores and mutexes if necessary
             SOURCES="$SOURCES $srcdir/src/thread/pthread/SDL_syscond.c"
 
+            # Thread local storage
+            SOURCES="$SOURCES $srcdir/src/thread/pthread/SDL_systls.c"
+
             have_threads=yes
         fi
     fi
@@ -2470,9 +2474,7 @@ AC_HELP_STRING([--enable-render-d3d], [enable the Direct3D render driver [[defau
         # Set up files for the thread library
         if test x$enable_threads = xyes; then
             AC_DEFINE(SDL_THREAD_WINDOWS, 1, [ ])
-            SOURCES="$SOURCES $srcdir/src/thread/windows/SDL_sysmutex.c"
-            SOURCES="$SOURCES $srcdir/src/thread/windows/SDL_syssem.c"
-            SOURCES="$SOURCES $srcdir/src/thread/windows/SDL_systhread.c"
+            SOURCES="$SOURCES $srcdir/src/thread/windows/*.c"
             SOURCES="$SOURCES $srcdir/src/thread/generic/SDL_syscond.c"
             have_threads=yes
         fi
diff --git a/include/SDL_thread.h b/include/SDL_thread.h
index 6015a071e..b1ebe22da 100644
--- a/include/SDL_thread.h
+++ b/include/SDL_thread.h
@@ -32,6 +32,7 @@
 #include "SDL_error.h"
 
 /* Thread synchronization primitives */
+#include "SDL_atomic.h"
 #include "SDL_mutex.h"
 
 #include "begin_code.h"
@@ -47,6 +48,9 @@ typedef struct SDL_Thread SDL_Thread;
 /* The SDL thread ID */
 typedef unsigned long SDL_threadID;
 
+/* Thread local storage ID */
+typedef int SDL_TLSID;
+
 /* The SDL thread priority
  *
  * Note: On many systems you require special privileges to set high priority.
@@ -166,6 +170,63 @@ extern DECLSPEC int SDLCALL SDL_SetThreadPriority(SDL_ThreadPriority priority);
  */
 extern DECLSPEC void SDLCALL SDL_WaitThread(SDL_Thread * thread, int *status);
 
+/**
+ *  \brief Create an identifier that is globally visible to all threads but refers to data that is thread-specific.
+ *
+ *  \return The newly created thread local storage identifier, or 0 on error
+ *
+ *  \code
+ *  static SDL_SpinLock tls_lock;
+ *  static SDL_TLSID thread_local_storage;
+ * 
+ *  void SetMyThreadData(void *value)
+ *  {
+ *      if (!thread_local_storage) {
+ *          SDL_AtomicLock(&tls_lock);
+ *          if (!thread_local_storage) {
+ *              thread_local_storage = SDL_TLSCreate();
+ *          }
+ *          SDL_AtomicUnLock(&tls_lock);
+ *      }
+ *      SDL_TLSSet(thread_local_storage, value);
+ *  }
+ *  
+ *  void *GetMyThreadData(void)
+ *  {
+ *      return SDL_TLSGet(thread_local_storage);
+ *  }
+ *  \endcode
+ *
+ *  \sa SDL_TLSGet()
+ *  \sa SDL_TLSSet()
+ */
+extern DECLSPEC SDL_TLSID SDLCALL SDL_TLSCreate();
+
+/**
+ *  \brief Get the value associated with a thread local storage ID for the current thread.
+ *
+ *  \param id The thread local storage ID
+ *
+ *  \return The value associated with the ID for the current thread, or NULL if no value has been set.
+ *
+ *  \sa SDL_TLSCreate()
+ *  \sa SDL_TLSSet()
+ */
+extern DECLSPEC void * SDLCALL SDL_TLSGet(SDL_TLSID id);
+
+/**
+ *  \brief Set the value associated with a thread local storage ID for the current thread.
+ *
+ *  \param id The thread local storage ID
+ *  \param value The value to associate with the ID for the current thread
+ *
+ *  \return 0 on success, -1 on error
+ *
+ *  \sa SDL_TLSCreate()
+ *  \sa SDL_TLSGet()
+ */
+extern DECLSPEC int SDLCALL SDL_TLSSet(SDL_TLSID id, const void *value);
+
 
 /* Ends C function definitions when using C++ */
 #ifdef __cplusplus
diff --git a/src/thread/SDL_thread.c b/src/thread/SDL_thread.c
index 61e252c17..0cfd90f31 100644
--- a/src/thread/SDL_thread.c
+++ b/src/thread/SDL_thread.c
@@ -22,158 +22,46 @@
 
 /* System independent thread management routines for SDL */
 
-#include "SDL_mutex.h"
 #include "SDL_thread.h"
 #include "SDL_thread_c.h"
 #include "SDL_systhread.h"
 #include "../SDL_error_c.h"
 
-#define ARRAY_CHUNKSIZE 32
-/* The array of threads currently active in the application
-   (except the main thread)
-   The manipulation of an array here is safer than using a linked list.
-*/
-static int SDL_maxthreads = 0;
-static int SDL_numthreads = 0;
-static SDL_Thread **SDL_Threads = NULL;
-static SDL_mutex *thread_lock = NULL;
-
-static int
-SDL_ThreadsInit(void)
-{
-    int retval;
-
-    retval = 0;
-    thread_lock = SDL_CreateMutex();
-    if (thread_lock == NULL) {
-        retval = -1;
-    }
-    return (retval);
-}
-
-/* This should never be called...
-   If this is called by SDL_Quit(), we don't know whether or not we should
-   clean up threads here.  If any threads are still running after this call,
-   they will no longer have access to any per-thread data.
- */
-#if 0
-static void
-SDL_ThreadsQuit(void)
-{
-    SDL_mutex *mutex;
-
-    mutex = thread_lock;
-    thread_lock = NULL;
-    if (mutex != NULL) {
-        SDL_DestroyMutex(mutex);
-    }
-}
-#endif
-
-/* Routines for manipulating the thread list */
-static void
-SDL_AddThread(SDL_Thread * thread)
-{
-    /* WARNING:
-       If the very first threads are created simultaneously, then
-       there could be a race condition causing memory corruption.
-       In practice, this isn't a problem because by definition there
-       is only one thread running the first time this is called.
-     */
-    if (!thread_lock) {
-        if (SDL_ThreadsInit() < 0) {
-            return;
-        }
-    }
-    SDL_LockMutex(thread_lock);
-
-    /* Expand the list of threads, if necessary */
-#ifdef DEBUG_THREADS
-    printf("Adding thread (%d already - %d max)\n",
-           SDL_numthreads, SDL_maxthreads);
-#endif
-    if (SDL_numthreads == SDL_maxthreads) {
-        SDL_Thread **threads;
-        threads = (SDL_Thread **) SDL_realloc(SDL_Threads,
-                                              (SDL_maxthreads +
-                                               ARRAY_CHUNKSIZE) *
-                                              (sizeof *threads));
-        if (threads == NULL) {
-            SDL_OutOfMemory();
-            goto done;
-        }
-        SDL_maxthreads += ARRAY_CHUNKSIZE;
-        SDL_Threads = threads;
-    }
-    SDL_Threads[SDL_numthreads++] = thread;
-  done:
-    SDL_mutexV(thread_lock);
-}
-
-static void
-SDL_DelThread(SDL_Thread * thread)
-{
-    int i;
-
-    if (!thread_lock) {
-        return;
-    }
-    SDL_LockMutex(thread_lock);
-    for (i = 0; i < SDL_numthreads; ++i) {
-        if (thread == SDL_Threads[i]) {
-            break;
-        }
-    }
-    if (i < SDL_numthreads) {
-        if (--SDL_numthreads > 0) {
-            while (i < SDL_numthreads) {
-                SDL_Threads[i] = SDL_Threads[i + 1];
-                ++i;
-            }
-        } else {
-            SDL_maxthreads = 0;
-            SDL_free(SDL_Threads);
-            SDL_Threads = NULL;
-        }
-#ifdef DEBUG_THREADS
-        printf("Deleting thread (%d left - %d max)\n",
-               SDL_numthreads, SDL_maxthreads);
-#endif
-    }
-    SDL_mutexV(thread_lock);
-
-#if 0   /* There could be memory corruption if another thread is starting */
-    if (SDL_Threads == NULL) {
-        SDL_ThreadsQuit();
-    }
-#endif
-}
-
-/* The default (non-thread-safe) global error variable */
-static SDL_error SDL_global_error;
 
 /* Routine to get the thread-specific error variable */
 SDL_error *
 SDL_GetErrBuf(void)
 {
+    static SDL_SpinLock spinlock;
+    static SDL_bool tls_being_created;
+    static SDL_TLSID tls_errbuf;
+    static SDL_error SDL_global_errbuf;
     SDL_error *errbuf;
 
-    errbuf = &SDL_global_error;
-    if (SDL_Threads) {
-        int i;
-        SDL_threadID this_thread;
-
-        this_thread = SDL_ThreadID();
-        SDL_LockMutex(thread_lock);
-        for (i = 0; i < SDL_numthreads; ++i) {
-            if (this_thread == SDL_Threads[i]->threadid) {
-                errbuf = &SDL_Threads[i]->errbuf;
-                break;
-            }
+    if (!tls_errbuf && !tls_being_created) {
+        SDL_AtomicLock(&spinlock);
+        if (!tls_errbuf) {
+            /* SDL_TLSCreate() could fail and call SDL_SetError() */
+            tls_being_created = SDL_TRUE;
+            tls_errbuf = SDL_TLSCreate();
+            tls_being_created = SDL_FALSE;
         }
-        SDL_mutexV(thread_lock);
+        SDL_AtomicUnlock(&spinlock);
     }
-    return (errbuf);
+    if (!tls_errbuf) {
+        return &SDL_global_errbuf;
+    }
+
+    errbuf = SDL_TLSGet(tls_errbuf);
+    if (!errbuf) {
+        errbuf = (SDL_error *)SDL_malloc(sizeof(*errbuf));
+        if (!errbuf) {
+            return &SDL_global_errbuf;
+        }
+        SDL_zerop(errbuf);
+        SDL_TLSSet(tls_errbuf, errbuf);
+    }
+    return errbuf;
 }
 
 
@@ -264,9 +152,6 @@ SDL_CreateThread(int (SDLCALL * fn) (void *),
         return (NULL);
     }
 
-    /* Add the thread to the list of available threads */
-    SDL_AddThread(thread);
-
     /* Create the thread and go! */
 #ifdef SDL_PASSED_BEGINTHREAD_ENDTHREAD
     ret = SDL_SYS_CreateThread(thread, args, pfnBeginThread, pfnEndThread);
@@ -278,7 +163,6 @@ SDL_CreateThread(int (SDLCALL * fn) (void *),
         SDL_SemWait(args->wait);
     } else {
         /* Oops, failed.  Gotta free everything */
-        SDL_DelThread(thread);
         SDL_free(thread->name);
         SDL_free(thread);
         thread = NULL;
@@ -323,7 +207,6 @@ SDL_WaitThread(SDL_Thread * thread, int *status)
         if (status) {
             *status = thread->status;
         }
-        SDL_DelThread(thread);
         SDL_free(thread->name);
         SDL_free(thread);
     }
diff --git a/src/thread/beos/SDL_systls.c b/src/thread/beos/SDL_systls.c
new file mode 100644
index 000000000..fb7130f40
--- /dev/null
+++ b/src/thread/beos/SDL_systls.c
@@ -0,0 +1,106 @@
+/*
+  Simple DirectMedia Layer
+  Copyright (C) 1997-2013 Sam Lantinga 
+
+  This software is provided 'as-is', without any express or implied
+  warranty.  In no event will the authors be held liable for any damages
+  arising from the use of this software.
+
+  Permission is granted to anyone to use this software for any purpose,
+  including commercial applications, and to alter it and redistribute it
+  freely, subject to the following restrictions:
+
+  1. The origin of this software must not be misrepresented; you must not
+     claim that you wrote the original software. If you use this software
+     in a product, an acknowledgment in the product documentation would be
+     appreciated but is not required.
+  2. Altered source versions must be plainly marked as such, and must not be
+     misrepresented as being the original software.
+  3. This notice may not be removed or altered from any source distribution.
+*/
+
+#include "SDL_config.h"
+#include "SDL_thread.h"
+
+#if SDL_THREAD_BEOS
+
+#include 
+
+
+#define TLS_ALLOC_CHUNKSIZE 8
+
+typedef struct {
+    int limit;
+    void *data[1];
+} SDL_TLSData;
+
+static SDL_SpinLock tls_lock;
+static int32 thread_local_storage = B_NO_MEMORY;
+static SDL_atomic_t tls_id;
+
+
+SDL_TLSID
+SDL_TLSCreate()
+{
+    if (thread_local_storage == B_NO_MEMORY) {
+        SDL_AtomicLock(&tls_lock);
+        if (thread_local_storage == B_NO_MEMORY) {
+            thread_local_storage = tls_allocate();
+            if (thread_local_storage == B_NO_MEMORY) {
+                SDL_SetError("tls_allocate() failed");
+                SDL_AtomicUnlock(&tls_lock);
+                return 0;
+            }
+        }
+        SDL_AtomicUnlock(&tls_lock);
+    }
+    return SDL_AtomicIncRef(&tls_id)+1;
+}
+
+void *
+SDL_TLSGet(SDL_TLSID id)
+{
+    SDL_TLSData *data;
+
+    data = (SDL_TLSData *)tls_get(thread_local_storage);
+    if (!data || id <= 0 || id > data->limit) {
+        return NULL;
+    }
+    return data->data[id-1];
+}
+
+int
+SDL_TLSSet(SDL_TLSID id, const void *value)
+{
+    SDL_TLSData *data;
+
+    if (thread_local_storage == B_NO_MEMORY || id <= 0) {
+        return SDL_InvalidParamError(id);
+    }
+
+    data = (SDL_TLSData *)tls_get(thread_local_storage);
+    if (!data || id > data->limit) {
+        int i, oldlimit, newlimit;
+
+        oldlimit = data ? data->limit : 0;
+        newlimit = (id + TLS_ALLOC_CHUNKSIZE);
+        data = (SDL_TLSData *)SDL_realloc(data, sizeof(*data)+(newlimit-1)*sizeof(void*));
+        if (!data) {
+            return SDL_OutOfMemory();
+        }
+        data->limit = newlimit;
+        for (i = oldlimit; i < newlimit; ++i) {
+            data->data[i] = NULL;
+        }
+        if (!tls_set(thread_local_storage, data)) {
+            return SDL_SetError("TlsSetValue() failed");
+        }
+    }
+
+    data->data[id-1] = SDL_const_cast(void*, value);
+    return 0;
+}
+
+#endif /* SDL_THREAD_BEOS */
+
+/* vi: set ts=4 sw=4 expandtab: */
diff --git a/src/thread/generic/SDL_systls.c b/src/thread/generic/SDL_systls.c
new file mode 100644
index 000000000..febc63e45
--- /dev/null
+++ b/src/thread/generic/SDL_systls.c
@@ -0,0 +1,163 @@
+/*
+  Simple DirectMedia Layer
+  Copyright (C) 1997-2013 Sam Lantinga 
+
+  This software is provided 'as-is', without any express or implied
+  warranty.  In no event will the authors be held liable for any damages
+  arising from the use of this software.
+
+  Permission is granted to anyone to use this software for any purpose,
+  including commercial applications, and to alter it and redistribute it
+  freely, subject to the following restrictions:
+
+  1. The origin of this software must not be misrepresented; you must not
+     claim that you wrote the original software. If you use this software
+     in a product, an acknowledgment in the product documentation would be
+     appreciated but is not required.
+  2. Altered source versions must be plainly marked as such, and must not be
+     misrepresented as being the original software.
+  3. This notice may not be removed or altered from any source distribution.
+*/
+
+#include "SDL_config.h"
+#include "SDL_thread.h"
+
+/* This is a generic implementation of thread-local storage which doesn't
+   require additional OS support.
+
+   It is not especially efficient and doesn't clean up thread-local storage
+   as threads exit.  If there is a real OS that doesn't support thread-local
+   storage this implementation should be improved to be production quality.
+*/
+
+#define TLS_ALLOC_CHUNKSIZE 8
+
+typedef struct {
+    int limit;
+    void *data[1];
+} SDL_TLSData;
+
+typedef struct SDL_TLSEntry {
+    SDL_threadID thread;
+    SDL_TLSData *data;
+    struct SDL_TLSEntry *next;
+} SDL_TLSEntry;
+
+static SDL_SpinLock tls_lock;
+static SDL_mutex *tls_mutex;
+static SDL_TLSEntry *thread_local_storage;
+static SDL_atomic_t tls_id;
+
+
+static SDL_TLSData *GetTLSData()
+{
+    SDL_threadID thread = SDL_ThreadID();
+    SDL_TLSEntry *entry;
+    SDL_TLSData *data = NULL;
+
+    if (!tls_mutex) {
+        SDL_AtomicLock(&tls_lock);
+        if (!tls_mutex) {
+            tls_mutex = SDL_CreateMutex();
+            if (!tls_mutex) {
+                SDL_AtomicUnlock(&tls_lock);
+                return NULL;
+            }
+        }
+        SDL_AtomicUnlock(&tls_lock);
+    }
+
+    SDL_LockMutex(tls_mutex);
+    for (entry = thread_local_storage; entry; entry = entry->next) {
+        if (entry->thread == thread) {
+            data = entry->data;
+            break;
+        }
+    }
+    SDL_UnlockMutex(tls_mutex);
+
+    return data;
+}
+
+static int SetTLSData(SDL_TLSData *data)
+{
+    SDL_threadID thread = SDL_ThreadID();
+    SDL_TLSEntry *entry;
+
+    /* GetTLSData() is always called first, so we can assume tls_mutex */
+    SDL_LockMutex(tls_mutex);
+    for (entry = thread_local_storage; entry; entry = entry->next) {
+        if (entry->thread == thread) {
+            entry->data = data;
+            break;
+        }
+    }
+    if (!entry) {
+        entry = (SDL_TLSEntry *)SDL_malloc(sizeof(*entry));
+        if (entry) {
+            entry->thread = thread;
+            entry->data = data;
+            entry->next = thread_local_storage;
+            thread_local_storage = entry;
+        }
+    }
+    SDL_UnlockMutex(tls_mutex);
+
+    if (!entry) {
+        return SDL_OutOfMemory();
+    }
+    return 0;
+}
+
+
+SDL_TLSID
+SDL_TLSCreate()
+{
+    return SDL_AtomicIncRef(&tls_id)+1;
+}
+
+void *
+SDL_TLSGet(SDL_TLSID id)
+{
+    SDL_TLSData *data;
+
+    data = GetTLSData();
+    if (!data || id <= 0 || id > data->limit) {
+        return NULL;
+    }
+    return data->data[id-1];
+}
+
+int
+SDL_TLSSet(SDL_TLSID id, const void *value)
+{
+    SDL_TLSData *data;
+
+    if (id <= 0) {
+        return SDL_InvalidParamError(id);
+    }
+
+    data = GetTLSData();
+    if (!data || id > data->limit) {
+        int i, oldlimit, newlimit;
+
+        oldlimit = data ? data->limit : 0;
+        newlimit = (id + TLS_ALLOC_CHUNKSIZE);
+        data = (SDL_TLSData *)SDL_realloc(data, sizeof(*data)+(newlimit-1)*sizeof(void*));
+        if (!data) {
+            return SDL_OutOfMemory();
+        }
+        data->limit = newlimit;
+        for (i = oldlimit; i < newlimit; ++i) {
+            data->data[i] = NULL;
+        }
+        if (SetTLSData(data) != 0) {
+            return -1;
+        }
+    }
+
+    data->data[id-1] = SDL_const_cast(void*, value);
+    return 0;
+}
+
+/* vi: set ts=4 sw=4 expandtab: */
diff --git a/src/thread/pthread/SDL_systls.c b/src/thread/pthread/SDL_systls.c
new file mode 100644
index 000000000..5cbaa1b77
--- /dev/null
+++ b/src/thread/pthread/SDL_systls.c
@@ -0,0 +1,101 @@
+/*
+  Simple DirectMedia Layer
+  Copyright (C) 1997-2013 Sam Lantinga 
+
+  This software is provided 'as-is', without any express or implied
+  warranty.  In no event will the authors be held liable for any damages
+  arising from the use of this software.
+
+  Permission is granted to anyone to use this software for any purpose,
+  including commercial applications, and to alter it and redistribute it
+  freely, subject to the following restrictions:
+
+  1. The origin of this software must not be misrepresented; you must not
+     claim that you wrote the original software. If you use this software
+     in a product, an acknowledgment in the product documentation would be
+     appreciated but is not required.
+  2. Altered source versions must be plainly marked as such, and must not be
+     misrepresented as being the original software.
+  3. This notice may not be removed or altered from any source distribution.
+*/
+
+#include "SDL_config.h"
+#include "SDL_thread.h"
+
+#include 
+
+
+#define TLS_ALLOC_CHUNKSIZE 8
+
+typedef struct {
+    int limit;
+    void *data[1];
+} SDL_TLSData;
+
+static SDL_SpinLock tls_lock;
+static pthread_key_t thread_local_storage;
+static SDL_atomic_t tls_id;
+
+
+SDL_TLSID
+SDL_TLSCreate()
+{
+    if (!thread_local_storage) {
+        SDL_AtomicLock(&tls_lock);
+        if (!thread_local_storage) {
+            if (pthread_key_create(&thread_local_storage, NULL) != 0) {
+                SDL_SetError("pthread_key_create() failed");
+                SDL_AtomicUnlock(&tls_lock);
+                return 0;
+            }
+        }
+        SDL_AtomicUnlock(&tls_lock);
+    }
+    return SDL_AtomicIncRef(&tls_id)+1;
+}
+
+void *
+SDL_TLSGet(SDL_TLSID id)
+{
+    SDL_TLSData *data;
+
+    data = (SDL_TLSData *)pthread_getspecific(thread_local_storage);
+    if (!data || id <= 0 || id > data->limit) {
+        return NULL;
+    }
+    return data->data[id-1];
+}
+
+int
+SDL_TLSSet(SDL_TLSID id, const void *value)
+{
+    SDL_TLSData *data;
+
+    if (!thread_local_storage || id <= 0) {
+        return SDL_InvalidParamError(id);
+    }
+
+    data = (SDL_TLSData *)pthread_getspecific(thread_local_storage);
+    if (!data || id > data->limit) {
+        int i, oldlimit, newlimit;
+
+        oldlimit = data ? data->limit : 0;
+        newlimit = (id + TLS_ALLOC_CHUNKSIZE);
+        data = (SDL_TLSData *)SDL_realloc(data, sizeof(*data)+(newlimit-1)*sizeof(void*));
+        if (!data) {
+            return SDL_OutOfMemory();
+        }
+        data->limit = newlimit;
+        for (i = oldlimit; i < newlimit; ++i) {
+            data->data[i] = NULL;
+        }
+        if (pthread_setspecific(thread_local_storage, data) != 0) {
+            return SDL_SetError("pthread_setspecific() failed");
+        }
+    }
+
+    data->data[id-1] = SDL_const_cast(void*, value);
+    return 0;
+}
+
+/* vi: set ts=4 sw=4 expandtab: */
diff --git a/src/thread/windows/SDL_systls.c b/src/thread/windows/SDL_systls.c
new file mode 100644
index 000000000..2b7b39488
--- /dev/null
+++ b/src/thread/windows/SDL_systls.c
@@ -0,0 +1,106 @@
+/*
+  Simple DirectMedia Layer
+  Copyright (C) 1997-2013 Sam Lantinga 
+
+  This software is provided 'as-is', without any express or implied
+  warranty.  In no event will the authors be held liable for any damages
+  arising from the use of this software.
+
+  Permission is granted to anyone to use this software for any purpose,
+  including commercial applications, and to alter it and redistribute it
+  freely, subject to the following restrictions:
+
+  1. The origin of this software must not be misrepresented; you must not
+     claim that you wrote the original software. If you use this software
+     in a product, an acknowledgment in the product documentation would be
+     appreciated but is not required.
+  2. Altered source versions must be plainly marked as such, and must not be
+     misrepresented as being the original software.
+  3. This notice may not be removed or altered from any source distribution.
+*/
+
+#include "SDL_config.h"
+#include "SDL_thread.h"
+
+#if SDL_THREAD_WINDOWS
+
+#include "../../core/windows/SDL_windows.h"
+
+
+#define TLS_ALLOC_CHUNKSIZE 8
+
+typedef struct {
+    int limit;
+    void *data[1];
+} SDL_TLSData;
+
+static SDL_SpinLock tls_lock;
+static DWORD thread_local_storage = TLS_OUT_OF_INDEXES;
+static SDL_atomic_t tls_id;
+
+
+SDL_TLSID
+SDL_TLSCreate()
+{
+    if (thread_local_storage == TLS_OUT_OF_INDEXES) {
+        SDL_AtomicLock(&tls_lock);
+        if (thread_local_storage == TLS_OUT_OF_INDEXES) {
+            thread_local_storage = TlsAlloc();
+            if (thread_local_storage == TLS_OUT_OF_INDEXES) {
+                SDL_SetError("TlsAlloc() failed");
+                SDL_AtomicUnlock(&tls_lock);
+                return 0;
+            }
+        }
+        SDL_AtomicUnlock(&tls_lock);
+    }
+    return SDL_AtomicIncRef(&tls_id)+1;
+}
+
+void *
+SDL_TLSGet(SDL_TLSID id)
+{
+    SDL_TLSData *data;
+
+    data = (SDL_TLSData *)TlsGetValue(thread_local_storage);
+    if (!data || id <= 0 || id > data->limit) {
+        return NULL;
+    }
+    return data->data[id-1];
+}
+
+int
+SDL_TLSSet(SDL_TLSID id, const void *value)
+{
+    SDL_TLSData *data;
+
+    if (thread_local_storage == TLS_OUT_OF_INDEXES || id <= 0) {
+        return SDL_InvalidParamError(id);
+    }
+
+    data = (SDL_TLSData *)TlsGetValue(thread_local_storage);
+    if (!data || id > data->limit) {
+        int i, oldlimit, newlimit;
+
+        oldlimit = data ? data->limit : 0;
+        newlimit = (id + TLS_ALLOC_CHUNKSIZE);
+        data = (SDL_TLSData *)SDL_realloc(data, sizeof(*data)+(newlimit-1)*sizeof(void*));
+        if (!data) {
+            return SDL_OutOfMemory();
+        }
+        data->limit = newlimit;
+        for (i = oldlimit; i < newlimit; ++i) {
+            data->data[i] = NULL;
+        }
+        if (!TlsSetValue(thread_local_storage, data)) {
+            return SDL_SetError("TlsSetValue() failed");
+        }
+    }
+
+    data->data[id-1] = SDL_const_cast(void*, value);
+    return 0;
+}
+
+#endif /* SDL_THREAD_WINDOWS */
+
+/* vi: set ts=4 sw=4 expandtab: */
diff --git a/test/testthread.c b/test/testthread.c
index 21509ff1d..b8f18dc06 100644
--- a/test/testthread.c
+++ b/test/testthread.c
@@ -19,6 +19,7 @@
 #include "SDL.h"
 #include "SDL_thread.h"
 
+static SDL_TLSID tls;
 static int alive = 0;
 
 /* Call this instead of exit(), so we can clean up SDL: atexit() is evil. */
@@ -32,8 +33,9 @@ quit(int rc)
 int SDLCALL
 ThreadFunc(void *data)
 {
-    printf("Started thread %s: My thread id is %lu\n",
-           (char *) data, SDL_ThreadID());
+    SDL_TLSSet(tls, "baby thread");
+    printf("Started thread %s: My thread id is %lu, thread data = %s\n",
+           (char *) data, SDL_ThreadID(), (const char *)SDL_TLSGet(tls));
     while (alive) {
         printf("Thread '%s' is alive!\n", (char *) data);
         SDL_Delay(1 * 1000);
@@ -62,6 +64,11 @@ main(int argc, char *argv[])
         return (1);
     }
 
+    tls = SDL_TLSCreate();
+    SDL_assert(tls);
+    SDL_TLSSet(tls, "main thread");
+    printf("Main thread data initially: %s\n", (const char *)SDL_TLSGet(tls));
+
     alive = 1;
     thread = SDL_CreateThread(ThreadFunc, "One", "#1");
     if (thread == NULL) {
@@ -73,6 +80,8 @@ main(int argc, char *argv[])
     alive = 0;
     SDL_WaitThread(thread, NULL);
 
+    printf("Main thread data finally: %s\n", (const char *)SDL_TLSGet(tls));
+
     alive = 1;
     signal(SIGTERM, killed);
     thread = SDL_CreateThread(ThreadFunc, "Two", "#2");

From 086ecc9949e7f04ab57ff039a372da30e1110406 Mon Sep 17 00:00:00 2001
From: Sam Lantinga 
Date: Wed, 10 Jul 2013 02:37:57 -0700
Subject: [PATCH 305/542] Fixed Haiku build

---
 src/thread/beos/SDL_systls.c | 4 +---
 1 file changed, 1 insertion(+), 3 deletions(-)

diff --git a/src/thread/beos/SDL_systls.c b/src/thread/beos/SDL_systls.c
index fb7130f40..f71a7e9b7 100644
--- a/src/thread/beos/SDL_systls.c
+++ b/src/thread/beos/SDL_systls.c
@@ -92,9 +92,7 @@ SDL_TLSSet(SDL_TLSID id, const void *value)
         for (i = oldlimit; i < newlimit; ++i) {
             data->data[i] = NULL;
         }
-        if (!tls_set(thread_local_storage, data)) {
-            return SDL_SetError("TlsSetValue() failed");
-        }
+        tls_set(thread_local_storage, data);
     }
 
     data->data[id-1] = SDL_const_cast(void*, value);

From 557bbf3fe6f588ca7831678a364ec80bb71e51d3 Mon Sep 17 00:00:00 2001
From: Sam Lantinga 
Date: Wed, 10 Jul 2013 18:31:17 -0700
Subject: [PATCH 306/542] Added release/acquire memory barriers to the atomic
 API * Added a destructor to clean up TLS memory at thread shutdown *
 Refactored the TLS code to have platform independent code and a small
 platform dependent core with a fallback to generic code if platform dependent
 functions fail. * Fixed recursion issues with SDL_GetErrBuf()

---
 include/SDL_atomic.h            |  27 +++++
 include/SDL_thread.h            |   7 +-
 src/thread/SDL_systhread.h      |   6 +
 src/thread/SDL_thread.c         | 202 ++++++++++++++++++++++++++++++--
 src/thread/SDL_thread_c.h       |  24 ++++
 src/thread/beos/SDL_systls.c    |  80 ++++---------
 src/thread/generic/SDL_systls.c | 137 +---------------------
 src/thread/pthread/SDL_systls.c |  84 ++++---------
 src/thread/windows/SDL_systls.c |  82 ++++---------
 test/testthread.c               |   4 +-
 10 files changed, 334 insertions(+), 319 deletions(-)

diff --git a/include/SDL_atomic.h b/include/SDL_atomic.h
index 78498ff9d..65c3b6dfe 100644
--- a/include/SDL_atomic.h
+++ b/include/SDL_atomic.h
@@ -45,6 +45,7 @@
  *
  * There's also lots of good information here:
  * http://www.1024cores.net/home/lock-free-algorithms
+ * http://preshing.com/
  *
  * These operations may or may not actually be implemented using
  * processor specific atomic operations. When possible they are
@@ -135,6 +136,32 @@ void _ReadWriteBarrier(void);
 { SDL_SpinLock _tmp = 0; SDL_AtomicLock(&_tmp); SDL_AtomicUnlock(&_tmp); }
 #endif
 
+/**
+ * Memory barriers are designed to prevent reads and writes from being
+ * reordered by the compiler and being seen out of order on multi-core CPUs.
+ *
+ * A typical pattern would be for thread A to write some data and a flag,
+ * and for thread B to read the flag and get the data. In this case you
+ * would insert a release barrier between writing the data and the flag,
+ * guaranteeing that the data write completes no later than the flag is
+ * written, and you would insert an acquire barrier between reading the
+ * flag and reading the data, to ensure that all the reads associated
+ * with the flag have completed.
+ *
+ * In this pattern you should always see a release barrier paired with
+ * an acquire barrier and you should gate the data reads/writes with a
+ * single flag variable.
+ *
+ * For more information on these semantics, take a look at the blog post:
+ * http://preshing.com/20120913/acquire-and-release-semantics
+ */
+/* FIXME: This is correct for x86 and x64 but not other CPUs
+   For PPC we need the lwsync instruction, and on ARM some variant of dmb
+ */
+#define SDL_MemoryBarrierRelease()  SDL_CompilerBarrier()
+#define SDL_MemoryBarrierAcquire()  SDL_CompilerBarrier()
+
+
 /* Platform specific optimized versions of the atomic functions,
  * you can disable these by defining SDL_DISABLE_ATOMIC_INLINE
  */
diff --git a/include/SDL_thread.h b/include/SDL_thread.h
index b1ebe22da..8bc3e7f8d 100644
--- a/include/SDL_thread.h
+++ b/include/SDL_thread.h
@@ -48,8 +48,8 @@ typedef struct SDL_Thread SDL_Thread;
 /* The SDL thread ID */
 typedef unsigned long SDL_threadID;
 
-/* Thread local storage ID */
-typedef int SDL_TLSID;
+/* Thread local storage ID, 0 is the invalid ID */
+typedef unsigned SDL_TLSID;
 
 /* The SDL thread priority
  *
@@ -219,13 +219,14 @@ extern DECLSPEC void * SDLCALL SDL_TLSGet(SDL_TLSID id);
  *
  *  \param id The thread local storage ID
  *  \param value The value to associate with the ID for the current thread
+ *  \param destructor A function called when the thread exits, to free the value.
  *
  *  \return 0 on success, -1 on error
  *
  *  \sa SDL_TLSCreate()
  *  \sa SDL_TLSGet()
  */
-extern DECLSPEC int SDLCALL SDL_TLSSet(SDL_TLSID id, const void *value);
+extern DECLSPEC int SDLCALL SDL_TLSSet(SDL_TLSID id, const void *value, void (*destructor)(void*));
 
 
 /* Ends C function definitions when using C++ */
diff --git a/src/thread/SDL_systhread.h b/src/thread/SDL_systhread.h
index 694ea7f27..738ea27b0 100644
--- a/src/thread/SDL_systhread.h
+++ b/src/thread/SDL_systhread.h
@@ -50,6 +50,12 @@ extern int SDL_SYS_SetThreadPriority(SDL_ThreadPriority priority);
  */
 extern void SDL_SYS_WaitThread(SDL_Thread * thread);
 
+/* Get the thread local storage for this thread */
+extern SDL_TLSData *SDL_SYS_GetTLSData();
+
+/* Set the thread local storage for this thread */
+extern int SDL_SYS_SetTLSData(SDL_TLSData *data);
+
 #endif /* _SDL_systhread_h */
 
 /* vi: set ts=4 sw=4 expandtab: */
diff --git a/src/thread/SDL_thread.c b/src/thread/SDL_thread.c
index 0cfd90f31..e0bac7e77 100644
--- a/src/thread/SDL_thread.c
+++ b/src/thread/SDL_thread.c
@@ -28,38 +28,219 @@
 #include "../SDL_error_c.h"
 
 
+SDL_TLSID
+SDL_TLSCreate()
+{
+    static SDL_atomic_t SDL_tls_id;
+    return SDL_AtomicIncRef(&SDL_tls_id)+1;
+}
+
+void *
+SDL_TLSGet(SDL_TLSID id)
+{
+    SDL_TLSData *storage;
+
+    storage = SDL_SYS_GetTLSData();
+    if (!storage || id == 0 || id > storage->limit) {
+        return NULL;
+    }
+    return storage->array[id-1].data;
+}
+
+int
+SDL_TLSSet(SDL_TLSID id, const void *value, void (*destructor)(void *))
+{
+    SDL_TLSData *storage;
+
+    if (id == 0) {
+        return SDL_InvalidParamError("id");
+    }
+
+    storage = SDL_SYS_GetTLSData();
+    if (!storage || id > storage->limit) {
+        int i, oldlimit, newlimit;
+
+        oldlimit = storage ? storage->limit : 0;
+        newlimit = (id + TLS_ALLOC_CHUNKSIZE);
+        storage = (SDL_TLSData *)SDL_realloc(storage, sizeof(*storage)+(newlimit-1)*sizeof(storage->array[0]));
+        if (!storage) {
+            return SDL_OutOfMemory();
+        }
+        storage->limit = newlimit;
+        for (i = oldlimit; i < newlimit; ++i) {
+            storage->array[i].data = NULL;
+            storage->array[i].destructor = NULL;
+        }
+        if (SDL_SYS_SetTLSData(storage) != 0) {
+            return -1;
+        }
+    }
+
+    storage->array[id-1].data = SDL_const_cast(void*, value);
+    storage->array[id-1].destructor = destructor;
+    return 0;
+}
+
+static void
+SDL_TLSCleanup()
+{
+    SDL_TLSData *storage;
+
+    storage = SDL_SYS_GetTLSData();
+    if (storage) {
+        int i;
+        for (i = 0; i < storage->limit; ++i) {
+            if (storage->array[i].destructor) {
+                storage->array[i].destructor(storage->array[i].data);
+            }
+        }
+        SDL_SYS_SetTLSData(NULL);
+        SDL_free(storage);
+    }
+}
+
+
+/* This is a generic implementation of thread-local storage which doesn't
+   require additional OS support.
+
+   It is not especially efficient and doesn't clean up thread-local storage
+   as threads exit.  If there is a real OS that doesn't support thread-local
+   storage this implementation should be improved to be production quality.
+*/
+
+typedef struct SDL_TLSEntry {
+    SDL_threadID thread;
+    SDL_TLSData *storage;
+    struct SDL_TLSEntry *next;
+} SDL_TLSEntry;
+
+static SDL_mutex *SDL_generic_TLS_mutex;
+static SDL_TLSEntry *SDL_generic_TLS;
+
+
+SDL_TLSData *
+SDL_Generic_GetTLSData()
+{
+    SDL_threadID thread = SDL_ThreadID();
+    SDL_TLSEntry *entry;
+    SDL_TLSData *storage = NULL;
+
+    if (!SDL_generic_TLS_mutex) {
+        static SDL_SpinLock tls_lock;
+        SDL_AtomicLock(&tls_lock);
+        if (!SDL_generic_TLS_mutex) {
+            SDL_mutex *mutex = SDL_CreateMutex();
+            SDL_MemoryBarrierRelease();
+            SDL_generic_TLS_mutex = mutex;
+            if (!SDL_generic_TLS_mutex) {
+                SDL_AtomicUnlock(&tls_lock);
+                return NULL;
+            }
+        }
+        SDL_AtomicUnlock(&tls_lock);
+    }
+
+    SDL_MemoryBarrierAcquire();
+    SDL_LockMutex(SDL_generic_TLS_mutex);
+    for (entry = SDL_generic_TLS; entry; entry = entry->next) {
+        if (entry->thread == thread) {
+            storage = entry->storage;
+            break;
+        }
+    }
+    SDL_UnlockMutex(SDL_generic_TLS_mutex);
+
+    return storage;
+}
+
+int
+SDL_Generic_SetTLSData(SDL_TLSData *storage)
+{
+    SDL_threadID thread = SDL_ThreadID();
+    SDL_TLSEntry *prev, *entry;
+
+    /* SDL_Generic_GetTLSData() is always called first, so we can assume SDL_generic_TLS_mutex */
+    SDL_LockMutex(SDL_generic_TLS_mutex);
+    prev = NULL;
+    for (entry = SDL_generic_TLS; entry; entry = entry->next) {
+        if (entry->thread == thread) {
+            if (storage) {
+                entry->storage = storage;
+            } else {
+                if (prev) {
+                    prev->next = entry->next;
+                } else {
+                    SDL_generic_TLS = entry->next;
+                }
+                SDL_free(entry);
+            }
+            break;
+        }
+        prev = entry;
+    }
+    if (!entry) {
+        entry = (SDL_TLSEntry *)SDL_malloc(sizeof(*entry));
+        if (entry) {
+            entry->thread = thread;
+            entry->storage = storage;
+            entry->next = SDL_generic_TLS;
+            SDL_generic_TLS = entry;
+        }
+    }
+    SDL_UnlockMutex(SDL_generic_TLS_mutex);
+
+    if (!entry) {
+        return SDL_OutOfMemory();
+    }
+    return 0;
+}
+
 /* Routine to get the thread-specific error variable */
 SDL_error *
 SDL_GetErrBuf(void)
 {
-    static SDL_SpinLock spinlock;
+    static SDL_SpinLock tls_lock;
     static SDL_bool tls_being_created;
     static SDL_TLSID tls_errbuf;
     static SDL_error SDL_global_errbuf;
+    const SDL_error *ALLOCATION_IN_PROGRESS = (SDL_error *)-1;
     SDL_error *errbuf;
 
+    /* tls_being_created is there simply to prevent recursion if SDL_TLSCreate() fails.
+       It also means it's possible for another thread to also use SDL_global_errbuf,
+       but that's very unlikely and hopefully won't cause issues.
+     */
     if (!tls_errbuf && !tls_being_created) {
-        SDL_AtomicLock(&spinlock);
+        SDL_AtomicLock(&tls_lock);
         if (!tls_errbuf) {
-            /* SDL_TLSCreate() could fail and call SDL_SetError() */
+            SDL_TLSID slot;
             tls_being_created = SDL_TRUE;
-            tls_errbuf = SDL_TLSCreate();
+            slot = SDL_TLSCreate();
             tls_being_created = SDL_FALSE;
+            SDL_MemoryBarrierRelease();
+            tls_errbuf = slot;
         }
-        SDL_AtomicUnlock(&spinlock);
+        SDL_AtomicUnlock(&tls_lock);
     }
     if (!tls_errbuf) {
         return &SDL_global_errbuf;
     }
 
-    errbuf = SDL_TLSGet(tls_errbuf);
+    SDL_MemoryBarrierAcquire();
+    errbuf = (SDL_error *)SDL_TLSGet(tls_errbuf);
+    if (errbuf == ALLOCATION_IN_PROGRESS) {
+        return &SDL_global_errbuf;
+    }
     if (!errbuf) {
+        /* Mark that we're in the middle of allocating our buffer */
+        SDL_TLSSet(tls_errbuf, ALLOCATION_IN_PROGRESS, NULL);
         errbuf = (SDL_error *)SDL_malloc(sizeof(*errbuf));
         if (!errbuf) {
+            SDL_TLSSet(tls_errbuf, NULL, NULL);
             return &SDL_global_errbuf;
         }
         SDL_zerop(errbuf);
-        SDL_TLSSet(tls_errbuf, errbuf);
+        SDL_TLSSet(tls_errbuf, errbuf, SDL_free);
     }
     return errbuf;
 }
@@ -82,9 +263,7 @@ SDL_RunThread(void *data)
     void *userdata = args->data;
     int *statusloc = &args->info->status;
 
-    /* Perform any system-dependent setup
-       - this function cannot fail, and cannot use SDL_SetError()
-     */
+    /* Perform any system-dependent setup - this function may not fail */
     SDL_SYS_SetupThread(args->info->name);
 
     /* Get the thread id */
@@ -95,6 +274,9 @@ SDL_RunThread(void *data)
 
     /* Run the function */
     *statusloc = userfunc(userdata);
+
+    /* Clean up thread-local storage */
+    SDL_TLSCleanup();
 }
 
 #ifdef SDL_PASSED_BEGINTHREAD_ENDTHREAD
diff --git a/src/thread/SDL_thread_c.h b/src/thread/SDL_thread_c.h
index 64fb77894..da3a165fb 100644
--- a/src/thread/SDL_thread_c.h
+++ b/src/thread/SDL_thread_c.h
@@ -56,6 +56,30 @@ struct SDL_Thread
 /* This is the function called to run a thread */
 extern void SDL_RunThread(void *data);
 
+/* This is the system-independent thread local storage structure */
+typedef struct {
+    int limit;
+    struct {
+        void *data;
+        void (*destructor)(void*);
+    } array[1];
+} SDL_TLSData;
+
+/* This is how many TLS entries we allocate at once */
+#define TLS_ALLOC_CHUNKSIZE 4
+
+/* Get cross-platform, slow, thread local storage for this thread.
+   This is only intended as a fallback if getting real thread-local
+   storage fails or isn't supported on this platform.
+ */
+extern SDL_TLSData *SDL_Generic_GetTLSData();
+
+/* Set cross-platform, slow, thread local storage for this thread.
+   This is only intended as a fallback if getting real thread-local
+   storage fails or isn't supported on this platform.
+ */
+extern int SDL_Generic_SetTLSData(SDL_TLSData *data);
+
 #endif /* _SDL_thread_c_h */
 
 /* vi: set ts=4 sw=4 expandtab: */
diff --git a/src/thread/beos/SDL_systls.c b/src/thread/beos/SDL_systls.c
index f71a7e9b7..8e941289a 100644
--- a/src/thread/beos/SDL_systls.c
+++ b/src/thread/beos/SDL_systls.c
@@ -21,81 +21,47 @@
 
 #include "SDL_config.h"
 #include "SDL_thread.h"
+#include "../SDL_thread_c.h"
 
 #if SDL_THREAD_BEOS
 
 #include 
 
 
-#define TLS_ALLOC_CHUNKSIZE 8
-
-typedef struct {
-    int limit;
-    void *data[1];
-} SDL_TLSData;
-
-static SDL_SpinLock tls_lock;
 static int32 thread_local_storage = B_NO_MEMORY;
-static SDL_atomic_t tls_id;
+static SDL_bool generic_local_storage = SDL_FALSE;
 
-
-SDL_TLSID
-SDL_TLSCreate()
+SDL_TLSData *
+SDL_SYS_GetTLSData()
 {
-    if (thread_local_storage == B_NO_MEMORY) {
-        SDL_AtomicLock(&tls_lock);
-        if (thread_local_storage == B_NO_MEMORY) {
-            thread_local_storage = tls_allocate();
-            if (thread_local_storage == B_NO_MEMORY) {
-                SDL_SetError("tls_allocate() failed");
-                SDL_AtomicUnlock(&tls_lock);
-                return 0;
+    if (thread_local_storage == B_NO_MEMORY && !generic_local_storage) {
+        static SDL_SpinLock lock;
+        SDL_AtomicLock(&lock);
+        if (thread_local_storage == B_NO_MEMORY && !generic_local_storage) {
+            int32 storage = tls_allocate();
+            if (storage != B_NO_MEMORY) {
+                SDL_MemoryBarrierRelease();
+                thread_local_storage = storage;
+            } else {
+                generic_local_storage = SDL_TRUE;
             }
         }
-        SDL_AtomicUnlock(&tls_lock);
+        SDL_AtomicUnlock(&lock);
     }
-    return SDL_AtomicIncRef(&tls_id)+1;
-}
-
-void *
-SDL_TLSGet(SDL_TLSID id)
-{
-    SDL_TLSData *data;
-
-    data = (SDL_TLSData *)tls_get(thread_local_storage);
-    if (!data || id <= 0 || id > data->limit) {
-        return NULL;
+    if (generic_local_storage) {
+        return SDL_Generic_GetTLSData();
     }
-    return data->data[id-1];
+    SDL_MemoryBarrierAcquire();
+    return (SDL_TLSData *)tls_get(thread_local_storage);
 }
 
 int
-SDL_TLSSet(SDL_TLSID id, const void *value)
+SDL_SYS_SetTLSData(SDL_TLSData *data)
 {
-    SDL_TLSData *data;
-
-    if (thread_local_storage == B_NO_MEMORY || id <= 0) {
-        return SDL_InvalidParamError(id);
+    if (generic_local_storage) {
+        return SDL_Generic_SetTLSData(data);
     }
-
-    data = (SDL_TLSData *)tls_get(thread_local_storage);
-    if (!data || id > data->limit) {
-        int i, oldlimit, newlimit;
-
-        oldlimit = data ? data->limit : 0;
-        newlimit = (id + TLS_ALLOC_CHUNKSIZE);
-        data = (SDL_TLSData *)SDL_realloc(data, sizeof(*data)+(newlimit-1)*sizeof(void*));
-        if (!data) {
-            return SDL_OutOfMemory();
-        }
-        data->limit = newlimit;
-        for (i = oldlimit; i < newlimit; ++i) {
-            data->data[i] = NULL;
-        }
-        tls_set(thread_local_storage, data);
-    }
-
-    data->data[id-1] = SDL_const_cast(void*, value);
+    tls_set(thread_local_storage, data);
     return 0;
 }
 
diff --git a/src/thread/generic/SDL_systls.c b/src/thread/generic/SDL_systls.c
index febc63e45..bdb83dbf9 100644
--- a/src/thread/generic/SDL_systls.c
+++ b/src/thread/generic/SDL_systls.c
@@ -20,144 +20,19 @@
 */
 
 #include "SDL_config.h"
-#include "SDL_thread.h"
-
-/* This is a generic implementation of thread-local storage which doesn't
-   require additional OS support.
-
-   It is not especially efficient and doesn't clean up thread-local storage
-   as threads exit.  If there is a real OS that doesn't support thread-local
-   storage this implementation should be improved to be production quality.
-*/
-
-#define TLS_ALLOC_CHUNKSIZE 8
-
-typedef struct {
-    int limit;
-    void *data[1];
-} SDL_TLSData;
-
-typedef struct SDL_TLSEntry {
-    SDL_threadID thread;
-    SDL_TLSData *data;
-    struct SDL_TLSEntry *next;
-} SDL_TLSEntry;
-
-static SDL_SpinLock tls_lock;
-static SDL_mutex *tls_mutex;
-static SDL_TLSEntry *thread_local_storage;
-static SDL_atomic_t tls_id;
+#include "../SDL_thread_c.h"
 
 
-static SDL_TLSData *GetTLSData()
+SDL_TLSData *
+SDL_SYS_GetTLSData()
 {
-    SDL_threadID thread = SDL_ThreadID();
-    SDL_TLSEntry *entry;
-    SDL_TLSData *data = NULL;
-
-    if (!tls_mutex) {
-        SDL_AtomicLock(&tls_lock);
-        if (!tls_mutex) {
-            tls_mutex = SDL_CreateMutex();
-            if (!tls_mutex) {
-                SDL_AtomicUnlock(&tls_lock);
-                return NULL;
-            }
-        }
-        SDL_AtomicUnlock(&tls_lock);
-    }
-
-    SDL_LockMutex(tls_mutex);
-    for (entry = thread_local_storage; entry; entry = entry->next) {
-        if (entry->thread == thread) {
-            data = entry->data;
-            break;
-        }
-    }
-    SDL_UnlockMutex(tls_mutex);
-
-    return data;
-}
-
-static int SetTLSData(SDL_TLSData *data)
-{
-    SDL_threadID thread = SDL_ThreadID();
-    SDL_TLSEntry *entry;
-
-    /* GetTLSData() is always called first, so we can assume tls_mutex */
-    SDL_LockMutex(tls_mutex);
-    for (entry = thread_local_storage; entry; entry = entry->next) {
-        if (entry->thread == thread) {
-            entry->data = data;
-            break;
-        }
-    }
-    if (!entry) {
-        entry = (SDL_TLSEntry *)SDL_malloc(sizeof(*entry));
-        if (entry) {
-            entry->thread = thread;
-            entry->data = data;
-            entry->next = thread_local_storage;
-            thread_local_storage = entry;
-        }
-    }
-    SDL_UnlockMutex(tls_mutex);
-
-    if (!entry) {
-        return SDL_OutOfMemory();
-    }
-    return 0;
-}
-
-
-SDL_TLSID
-SDL_TLSCreate()
-{
-    return SDL_AtomicIncRef(&tls_id)+1;
-}
-
-void *
-SDL_TLSGet(SDL_TLSID id)
-{
-    SDL_TLSData *data;
-
-    data = GetTLSData();
-    if (!data || id <= 0 || id > data->limit) {
-        return NULL;
-    }
-    return data->data[id-1];
+    return SDL_Generic_GetTLSData();
 }
 
 int
-SDL_TLSSet(SDL_TLSID id, const void *value)
+SDL_SYS_SetTLSData(SDL_TLSData *data)
 {
-    SDL_TLSData *data;
-
-    if (id <= 0) {
-        return SDL_InvalidParamError(id);
-    }
-
-    data = GetTLSData();
-    if (!data || id > data->limit) {
-        int i, oldlimit, newlimit;
-
-        oldlimit = data ? data->limit : 0;
-        newlimit = (id + TLS_ALLOC_CHUNKSIZE);
-        data = (SDL_TLSData *)SDL_realloc(data, sizeof(*data)+(newlimit-1)*sizeof(void*));
-        if (!data) {
-            return SDL_OutOfMemory();
-        }
-        data->limit = newlimit;
-        for (i = oldlimit; i < newlimit; ++i) {
-            data->data[i] = NULL;
-        }
-        if (SetTLSData(data) != 0) {
-            return -1;
-        }
-    }
-
-    data->data[id-1] = SDL_const_cast(void*, value);
-    return 0;
+    return SDL_Generic_SetTLSData(data);
 }
 
 /* vi: set ts=4 sw=4 expandtab: */
diff --git a/src/thread/pthread/SDL_systls.c b/src/thread/pthread/SDL_systls.c
index 5cbaa1b77..9ef6e51ac 100644
--- a/src/thread/pthread/SDL_systls.c
+++ b/src/thread/pthread/SDL_systls.c
@@ -18,83 +18,51 @@
      misrepresented as being the original software.
   3. This notice may not be removed or altered from any source distribution.
 */
-
 #include "SDL_config.h"
 #include "SDL_thread.h"
+#include "../SDL_thread_c.h"
 
 #include 
 
 
-#define TLS_ALLOC_CHUNKSIZE 8
+#define INVALID_PTHREAD_KEY ((pthread_key_t)-1)
 
-typedef struct {
-    int limit;
-    void *data[1];
-} SDL_TLSData;
+static pthread_key_t thread_local_storage = INVALID_PTHREAD_KEY;
+static SDL_bool generic_local_storage = SDL_FALSE;
 
-static SDL_SpinLock tls_lock;
-static pthread_key_t thread_local_storage;
-static SDL_atomic_t tls_id;
-
-
-SDL_TLSID
-SDL_TLSCreate()
+SDL_TLSData *
+SDL_SYS_GetTLSData()
 {
-    if (!thread_local_storage) {
-        SDL_AtomicLock(&tls_lock);
-        if (!thread_local_storage) {
-            if (pthread_key_create(&thread_local_storage, NULL) != 0) {
-                SDL_SetError("pthread_key_create() failed");
-                SDL_AtomicUnlock(&tls_lock);
-                return 0;
+    if (thread_local_storage == INVALID_PTHREAD_KEY && !generic_local_storage) {
+        static SDL_SpinLock lock;
+        SDL_AtomicLock(&lock);
+        if (thread_local_storage == INVALID_PTHREAD_KEY && !generic_local_storage) {
+            pthread_key_t storage;
+            if (pthread_key_create(&storage, NULL) == 0) {
+                SDL_MemoryBarrierRelease();
+                thread_local_storage = storage;
+            } else {
+                generic_local_storage = SDL_TRUE;
             }
         }
-        SDL_AtomicUnlock(&tls_lock);
+        SDL_AtomicUnlock(&lock);
     }
-    return SDL_AtomicIncRef(&tls_id)+1;
-}
-
-void *
-SDL_TLSGet(SDL_TLSID id)
-{
-    SDL_TLSData *data;
-
-    data = (SDL_TLSData *)pthread_getspecific(thread_local_storage);
-    if (!data || id <= 0 || id > data->limit) {
-        return NULL;
+    if (generic_local_storage) {
+        return SDL_Generic_GetTLSData();
     }
-    return data->data[id-1];
+    SDL_MemoryBarrierAcquire();
+    return (SDL_TLSData *)pthread_getspecific(thread_local_storage);
 }
 
 int
-SDL_TLSSet(SDL_TLSID id, const void *value)
+SDL_SYS_SetTLSData(SDL_TLSData *data)
 {
-    SDL_TLSData *data;
-
-    if (!thread_local_storage || id <= 0) {
-        return SDL_InvalidParamError(id);
+    if (generic_local_storage) {
+        return SDL_Generic_SetTLSData(data);
     }
-
-    data = (SDL_TLSData *)pthread_getspecific(thread_local_storage);
-    if (!data || id > data->limit) {
-        int i, oldlimit, newlimit;
-
-        oldlimit = data ? data->limit : 0;
-        newlimit = (id + TLS_ALLOC_CHUNKSIZE);
-        data = (SDL_TLSData *)SDL_realloc(data, sizeof(*data)+(newlimit-1)*sizeof(void*));
-        if (!data) {
-            return SDL_OutOfMemory();
-        }
-        data->limit = newlimit;
-        for (i = oldlimit; i < newlimit; ++i) {
-            data->data[i] = NULL;
-        }
-        if (pthread_setspecific(thread_local_storage, data) != 0) {
-            return SDL_SetError("pthread_setspecific() failed");
-        }
+    if (pthread_setspecific(thread_local_storage, data) != 0) {
+        return SDL_SetError("pthread_setspecific() failed");
     }
-
-    data->data[id-1] = SDL_const_cast(void*, value);
     return 0;
 }
 
diff --git a/src/thread/windows/SDL_systls.c b/src/thread/windows/SDL_systls.c
index 2b7b39488..0ece77dd0 100644
--- a/src/thread/windows/SDL_systls.c
+++ b/src/thread/windows/SDL_systls.c
@@ -21,83 +21,49 @@
 
 #include "SDL_config.h"
 #include "SDL_thread.h"
+#include "../SDL_thread_c.h"
 
 #if SDL_THREAD_WINDOWS
 
 #include "../../core/windows/SDL_windows.h"
 
 
-#define TLS_ALLOC_CHUNKSIZE 8
-
-typedef struct {
-    int limit;
-    void *data[1];
-} SDL_TLSData;
-
-static SDL_SpinLock tls_lock;
 static DWORD thread_local_storage = TLS_OUT_OF_INDEXES;
-static SDL_atomic_t tls_id;
+static SDL_bool generic_local_storage = SDL_FALSE;
 
-
-SDL_TLSID
-SDL_TLSCreate()
+SDL_TLSData *
+SDL_SYS_GetTLSData()
 {
-    if (thread_local_storage == TLS_OUT_OF_INDEXES) {
-        SDL_AtomicLock(&tls_lock);
-        if (thread_local_storage == TLS_OUT_OF_INDEXES) {
-            thread_local_storage = TlsAlloc();
-            if (thread_local_storage == TLS_OUT_OF_INDEXES) {
-                SDL_SetError("TlsAlloc() failed");
-                SDL_AtomicUnlock(&tls_lock);
-                return 0;
+    if (thread_local_storage == TLS_OUT_OF_INDEXES && !generic_local_storage) {
+        static SDL_SpinLock lock;
+        SDL_AtomicLock(&lock);
+        if (thread_local_storage == TLS_OUT_OF_INDEXES && !generic_local_storage) {
+            DWORD storage = TlsAlloc();
+            if (storage != TLS_OUT_OF_INDEXES) {
+                SDL_MemoryBarrierRelease();
+                thread_local_storage = storage;
+            } else {
+                generic_local_storage = SDL_TRUE;
             }
         }
-        SDL_AtomicUnlock(&tls_lock);
+        SDL_AtomicUnlock(&lock);
     }
-    return SDL_AtomicIncRef(&tls_id)+1;
-}
-
-void *
-SDL_TLSGet(SDL_TLSID id)
-{
-    SDL_TLSData *data;
-
-    data = (SDL_TLSData *)TlsGetValue(thread_local_storage);
-    if (!data || id <= 0 || id > data->limit) {
-        return NULL;
+    if (generic_local_storage) {
+        return SDL_Generic_GetTLSData();
     }
-    return data->data[id-1];
+    SDL_MemoryBarrierAcquire();
+    return (SDL_TLSData *)TlsGetValue(thread_local_storage);
 }
 
 int
-SDL_TLSSet(SDL_TLSID id, const void *value)
+SDL_SYS_SetTLSData(SDL_TLSData *data)
 {
-    SDL_TLSData *data;
-
-    if (thread_local_storage == TLS_OUT_OF_INDEXES || id <= 0) {
-        return SDL_InvalidParamError(id);
+    if (generic_local_storage) {
+        return SDL_Generic_SetTLSData(data);
     }
-
-    data = (SDL_TLSData *)TlsGetValue(thread_local_storage);
-    if (!data || id > data->limit) {
-        int i, oldlimit, newlimit;
-
-        oldlimit = data ? data->limit : 0;
-        newlimit = (id + TLS_ALLOC_CHUNKSIZE);
-        data = (SDL_TLSData *)SDL_realloc(data, sizeof(*data)+(newlimit-1)*sizeof(void*));
-        if (!data) {
-            return SDL_OutOfMemory();
-        }
-        data->limit = newlimit;
-        for (i = oldlimit; i < newlimit; ++i) {
-            data->data[i] = NULL;
-        }
-        if (!TlsSetValue(thread_local_storage, data)) {
-            return SDL_SetError("TlsSetValue() failed");
-        }
+    if (!TlsSetValue(thread_local_storage, data)) {
+        return SDL_SetError("TlsSetValue() failed");
     }
-
-    data->data[id-1] = SDL_const_cast(void*, value);
     return 0;
 }
 
diff --git a/test/testthread.c b/test/testthread.c
index b8f18dc06..47c1b57f0 100644
--- a/test/testthread.c
+++ b/test/testthread.c
@@ -33,7 +33,7 @@ quit(int rc)
 int SDLCALL
 ThreadFunc(void *data)
 {
-    SDL_TLSSet(tls, "baby thread");
+    SDL_TLSSet(tls, "baby thread", NULL);
     printf("Started thread %s: My thread id is %lu, thread data = %s\n",
            (char *) data, SDL_ThreadID(), (const char *)SDL_TLSGet(tls));
     while (alive) {
@@ -66,7 +66,7 @@ main(int argc, char *argv[])
 
     tls = SDL_TLSCreate();
     SDL_assert(tls);
-    SDL_TLSSet(tls, "main thread");
+    SDL_TLSSet(tls, "main thread", NULL);
     printf("Main thread data initially: %s\n", (const char *)SDL_TLSGet(tls));
 
     alive = 1;

From f80a6e7ee5220e9c74ade692499058d80debfa66 Mon Sep 17 00:00:00 2001
From: Sam Lantinga 
Date: Wed, 10 Jul 2013 20:17:20 -0700
Subject: [PATCH 307/542] Added PowerPC and ARM versions of the memory barrier
 functions.

---
 include/SDL_atomic.h    | 26 +++++++++++++++++++++++---
 src/atomic/SDL_atomic.c | 14 ++++++++++++++
 2 files changed, 37 insertions(+), 3 deletions(-)

diff --git a/include/SDL_atomic.h b/include/SDL_atomic.h
index 65c3b6dfe..7bd669d1a 100644
--- a/include/SDL_atomic.h
+++ b/include/SDL_atomic.h
@@ -155,11 +155,31 @@ void _ReadWriteBarrier(void);
  * For more information on these semantics, take a look at the blog post:
  * http://preshing.com/20120913/acquire-and-release-semantics
  */
-/* FIXME: This is correct for x86 and x64 but not other CPUs
-   For PPC we need the lwsync instruction, and on ARM some variant of dmb
- */
+#if defined(__GNUC__) && (defined(__powerpc__) || defined(__ppc__))
+#define SDL_MemoryBarrierRelease()   __asm__ __volatile__ ("lwsync" : : : "memory")
+#define SDL_MemoryBarrierAcquire()   __asm__ __volatile__ ("lwsync" : : : "memory")
+#elif defined(__GNUC__) && defined(__arm__)
+#if defined(__ARM_ARCH_7__) || defined(__ARM_ARCH_7A__) || defined(__ARM_ARCH_7EM__) || defined(__ARM_ARCH_7R__) || defined(__ARM_ARCH_7M__) || defined(__ARM_ARCH_7S__)
+#define SDL_MemoryBarrierRelease()   __asm__ __volatile__ ("dmb ish" : : : "memory")
+#define SDL_MemoryBarrierAcquire()   __asm__ __volatile__ ("dmb ish" : : : "memory")
+#elif defined(__ARM_ARCH_6__) || defined(__ARM_ARCH_6J__) || defined(__ARM_ARCH_6K__) || defined(__ARM_ARCH_6T2__) || defined(__ARM_ARCH_6Z__) || defined(__ARM_ARCH_6ZK__)
+#ifdef __thumb__
+/* The mcr instruction isn't available in thumb mode, use real functions */
+extern DECLSPEC void SDLCALL SDL_MemoryBarrierRelease();
+extern DECLSPEC void SDLCALL SDL_MemoryBarrierAcquire();
+#else
+#define SDL_MemoryBarrierRelease()   __asm__ __volatile__ ("mcr p15, 0, %0, c7, c10, 5" : : "r"(0) : "memory")
+#define SDL_MemoryBarrierAcquire()   __asm__ __volatile__ ("mcr p15, 0, %0, c7, c10, 5" : : "r"(0) : "memory")
+#endif /* __thumb__ */
+#else
+#define SDL_MemoryBarrierRelease()   __asm__ __volatile__ ("" : : : "memory")
+#define SDL_MemoryBarrierAcquire()   __asm__ __volatile__ ("" : : : "memory")
+#endif /* __GNUC__ && __arm__ */
+#else
+/* This is correct for the x86 and x64 CPUs, and we'll expand this over time. */
 #define SDL_MemoryBarrierRelease()  SDL_CompilerBarrier()
 #define SDL_MemoryBarrierAcquire()  SDL_CompilerBarrier()
+#endif
 
 
 /* Platform specific optimized versions of the atomic functions,
diff --git a/src/atomic/SDL_atomic.c b/src/atomic/SDL_atomic.c
index cd799dea7..c747b12aa 100644
--- a/src/atomic/SDL_atomic.c
+++ b/src/atomic/SDL_atomic.c
@@ -101,4 +101,18 @@ SDL_AtomicCASPtr(void **a, void *oldval, void *newval)
     return retval;
 }
 
+#if defined(__GNUC__) && defined(__arm__) && \
+   (defined(__ARM_ARCH_6__) || defined(__ARM_ARCH_6J__) || defined(__ARM_ARCH_6K__) || defined(__ARM_ARCH_6T2__) || defined(__ARM_ARCH_6Z__) || defined(__ARM_ARCH_6ZK__))
+__asm__(
+"   .align 2\n"
+"   .globl _SDL_MemoryBarrierRelease\n"
+"   .globl _SDL_MemoryBarrierAcquire\n"
+"_SDL_MemoryBarrierRelease:\n"
+"_SDL_MemoryBarrierAcquire:\n"
+"   mov r0, #0\n"
+"   mcr p15, 0, r0, c7, c10, 5\n"
+"   bx lr\n"
+);
+#endif /* __GNUC__ && __arm__ && ARMV6 */
+
 /* vi: set ts=4 sw=4 expandtab: */

From fcc6274a81890c20d8cebe50449cd06622f912e4 Mon Sep 17 00:00:00 2001
From: "Ryan C. Gordon" 
Date: Wed, 10 Jul 2013 23:43:35 -0400
Subject: [PATCH 308/542] Added src/thread/windows/SDL_systls.c to
 CMakeLists.txt (thanks, Charles!).

Fixes Bugzilla #1955.
---
 CMakeLists.txt | 1 +
 1 file changed, 1 insertion(+)

diff --git a/CMakeLists.txt b/CMakeLists.txt
index a649fb7a0..25be443c4 100644
--- a/CMakeLists.txt
+++ b/CMakeLists.txt
@@ -795,6 +795,7 @@ elseif(WINDOWS)
       ${SDL2_SOURCE_DIR}/src/thread/windows/SDL_sysmutex.c
       ${SDL2_SOURCE_DIR}/src/thread/windows/SDL_syssem.c
       ${SDL2_SOURCE_DIR}/src/thread/windows/SDL_systhread.c
+      ${SDL2_SOURCE_DIR}/src/thread/windows/SDL_systls.c
       ${SDL2_SOURCE_DIR}/src/thread/generic/SDL_syscond.c)
     set(HAVE_SDL_THREADS TRUE)
   endif(SDL_THREADS)

From 5b03803ab3892681cff3556017f5f7a9de62c94d Mon Sep 17 00:00:00 2001
From: Sam Lantinga 
Date: Wed, 10 Jul 2013 21:57:31 -0700
Subject: [PATCH 309/542] Fixed bug 1953 - Crash at memcpy
 X11_DispatchEvent(_THIS) Function

Nitz

In Function X11_DispatchEvent(_THIS), case SelectionNotify :
static void
X11_DispatchEvent(_THIS)
{
 // Some Code
  case SelectionNotify: {
  //Some Code
  SDL_bool expect_lf = SDL_FALSE;
                    char *start = NULL; // Initialised with NULL
                    char *scan = (char*)p.data;
                    char *fn;
                    char *uri;
                    int length = 0;
                    while (p.count--) {
                        if (!expect_lf) {
                            if (*scan==0x0D) {
                                expect_lf = SDL_TRUE;
                            } else if(start == NULL) {
                                start = scan;
                                length = 0;
                            }
                            length++;
                        } else {
                            if (*scan==0x0A && length>0) {
                                uri = malloc(length--);

                                memcpy(uri, start, length); // Problem is Here, start is still NULL if control comes to else statement without initialising the start pointer, which is wrong

                                uri[length] = 0;
                                fn = X11_URIToLocal(uri);
                                if (fn) SDL_SendDropFile(fn);
                                free(uri);
                            }
                            expect_lf = SDL_FALSE;
                            start = NULL;
                        }
                        scan++;
                    }
                }
As shown above how start pointer remains NULL, Patch for this issue would be:
                            if (*scan==0x0D) {
                                expect_lf = SDL_TRUE;
                            }
                            if(start == NULL) {
                                start = scan;
                                length = 0;
                            }
Just replace else if statement with if.
---
 src/video/x11/SDL_x11events.c | 27 ++++++++++++++-------------
 1 file changed, 14 insertions(+), 13 deletions(-)

diff --git a/src/video/x11/SDL_x11events.c b/src/video/x11/SDL_x11events.c
index 025777aee..7fb99818c 100644
--- a/src/video/x11/SDL_x11events.c
+++ b/src/video/x11/SDL_x11events.c
@@ -778,12 +778,11 @@ X11_DispatchEvent(_THIS)
 #endif
             Atom target = xevent.xselection.target;
             if (target == data->xdnd_req) {
-
                 /* read data */
                 SDL_x11Prop p;
                 X11_ReadProperty(&p, display, data->xwindow, videodata->PRIMARY);
 
-                if(p.format==8) {
+                if (p.format == 8) {
                     SDL_bool expect_lf = SDL_FALSE;
                     char *start = NULL;
                     char *scan = (char*)p.data;
@@ -792,21 +791,24 @@ X11_DispatchEvent(_THIS)
                     int length = 0;
                     while (p.count--) {
                         if (!expect_lf) {
-                            if (*scan==0x0D) {
+                            if (*scan == 0x0D) {
                                 expect_lf = SDL_TRUE;
-                            } else if(start == NULL) {
+                            }
+                            if (start == NULL) {
                                 start = scan;
                                 length = 0;
                             }
                             length++;
                         } else {
-                            if (*scan==0x0A && length>0) {
-                                uri = malloc(length--);
-                                memcpy(uri, start, length);
-                                uri[length] = 0;
+                            if (*scan == 0x0A && length > 0) {
+                                uri = SDL_malloc(length--);
+                                SDL_memcpy(uri, start, length);
+                                uri[length] = '\0';
                                 fn = X11_URIToLocal(uri);
-                                if (fn) SDL_SendDropFile(fn);
-                                free(uri);
+                                if (fn) {
+                                    SDL_SendDropFile(fn);
+                                }
+                                SDL_free(uri);
                             }
                             expect_lf = SDL_FALSE;
                             start = NULL;
@@ -819,12 +821,12 @@ X11_DispatchEvent(_THIS)
 
                 /* send reply */
                 XClientMessageEvent m;
-                memset(&m, 0, sizeof(XClientMessageEvent));
+                SDL_memset(&m, 0, sizeof(XClientMessageEvent));
                 m.type = ClientMessage;
                 m.display = display;
                 m.window = data->xdnd_source;
                 m.message_type = videodata->XdndFinished;
-                m.format=32;
+                m.format = 32;
                 m.data.l[0] = data->xwindow;
                 m.data.l[1] = 1;
                 m.data.l[2] = videodata->XdndActionCopy;
@@ -835,7 +837,6 @@ X11_DispatchEvent(_THIS)
             } else {
                 videodata->selection_waiting = SDL_FALSE;
             }
-
         }
         break;
 

From a6d24b3875e98409e75511961f7bbe80462a62b7 Mon Sep 17 00:00:00 2001
From: Sam Lantinga 
Date: Wed, 10 Jul 2013 22:01:24 -0700
Subject: [PATCH 310/542] Fixed bug 1949 - Pulseaudio 32 bit audio formats
 support

Matt Scheirer

Pulse has supported (since version 0.8, at least) 32 bit audio formats that are now becoming available in SDL2. This patch adds those format conversions to the switch clause in the pulseaudio backend.
---
 src/audio/pulseaudio/SDL_pulseaudio.c | 12 ++++++++++++
 1 file changed, 12 insertions(+)

diff --git a/src/audio/pulseaudio/SDL_pulseaudio.c b/src/audio/pulseaudio/SDL_pulseaudio.c
index c8d25a800..1f75b88b3 100644
--- a/src/audio/pulseaudio/SDL_pulseaudio.c
+++ b/src/audio/pulseaudio/SDL_pulseaudio.c
@@ -360,6 +360,18 @@ PULSEAUDIO_OpenDevice(_THIS, const char *devname, int iscapture)
         case AUDIO_S16MSB:
             paspec.format = PA_SAMPLE_S16BE;
             break;
+        case AUDIO_S32LSB:
+            paspec.format = PA_SAMPLE_S32LE;
+            break;
+        case AUDIO_S32MSB:
+            paspec.format = PA_SAMPLE_S32BE;
+            break;
+        case AUDIO_F32LSB:
+            paspec.format = PA_SAMPLE_FLOAT32LE
+            break;
+        case AUDIO_F32MSB:
+            paspec.format = PA_SAMPLE_FLOAT32BE
+            break;
         default:
             paspec.format = PA_SAMPLE_INVALID;
             break;

From 08738a32fbae1c4546c9f0edae1a48f13d3c2749 Mon Sep 17 00:00:00 2001
From: Sam Lantinga 
Date: Wed, 10 Jul 2013 22:06:11 -0700
Subject: [PATCH 311/542] Fixed compile

---
 src/audio/pulseaudio/SDL_pulseaudio.c | 4 ++--
 1 file changed, 2 insertions(+), 2 deletions(-)

diff --git a/src/audio/pulseaudio/SDL_pulseaudio.c b/src/audio/pulseaudio/SDL_pulseaudio.c
index 1f75b88b3..ec8030917 100644
--- a/src/audio/pulseaudio/SDL_pulseaudio.c
+++ b/src/audio/pulseaudio/SDL_pulseaudio.c
@@ -367,10 +367,10 @@ PULSEAUDIO_OpenDevice(_THIS, const char *devname, int iscapture)
             paspec.format = PA_SAMPLE_S32BE;
             break;
         case AUDIO_F32LSB:
-            paspec.format = PA_SAMPLE_FLOAT32LE
+            paspec.format = PA_SAMPLE_FLOAT32LE;
             break;
         case AUDIO_F32MSB:
-            paspec.format = PA_SAMPLE_FLOAT32BE
+            paspec.format = PA_SAMPLE_FLOAT32BE;
             break;
         default:
             paspec.format = PA_SAMPLE_INVALID;

From 8d546288b9be7555560fe8fa53fc2ec37360e241 Mon Sep 17 00:00:00 2001
From: Sam Lantinga 
Date: Wed, 10 Jul 2013 22:13:19 -0700
Subject: [PATCH 312/542] Catch out of memory errors creating a window

---
 src/video/SDL_video.c | 8 ++++++++
 1 file changed, 8 insertions(+)

diff --git a/src/video/SDL_video.c b/src/video/SDL_video.c
index 801fa5e3e..1a3fbda8b 100644
--- a/src/video/SDL_video.c
+++ b/src/video/SDL_video.c
@@ -1212,6 +1212,10 @@ SDL_CreateWindow(const char *title, int x, int y, int w, int h, Uint32 flags)
         }
     }
     window = (SDL_Window *)SDL_calloc(1, sizeof(*window));
+    if (!window) {
+        SDL_OutOfMemory();
+        return NULL;
+    }
     window->magic = &_this->window_magic;
     window->id = _this->next_object_id++;
     window->x = x;
@@ -1267,6 +1271,10 @@ SDL_CreateWindowFrom(const void *data)
         return NULL;
     }
     window = (SDL_Window *)SDL_calloc(1, sizeof(*window));
+    if (!window) {
+        SDL_OutOfMemory();
+        return NULL;
+    }
     window->magic = &_this->window_magic;
     window->id = _this->next_object_id++;
     window->flags = SDL_WINDOW_FOREIGN;

From bcef7dbe16cef717cd7d82a5476485009bc968fb Mon Sep 17 00:00:00 2001
From: "Ryan C. Gordon" 
Date: Thu, 11 Jul 2013 01:09:45 -0400
Subject: [PATCH 313/542] Added src/thread/pthread/SDL_systls.c to the CMake
 scripts.

--HG--
extra : rebase_source : 53362426e55c8271f8ea19d2e74997d1f01ea52b
---
 cmake/sdlchecks.cmake | 1 +
 1 file changed, 1 insertion(+)

diff --git a/cmake/sdlchecks.cmake b/cmake/sdlchecks.cmake
index b2a2ffb2a..fd6853f18 100644
--- a/cmake/sdlchecks.cmake
+++ b/cmake/sdlchecks.cmake
@@ -698,6 +698,7 @@ macro(CheckPTHREAD)
           ${SDL2_SOURCE_DIR}/src/thread/pthread/SDL_systhread.c
           ${SDL2_SOURCE_DIR}/src/thread/pthread/SDL_sysmutex.c   # Can be faked, if necessary
           ${SDL2_SOURCE_DIR}/src/thread/pthread/SDL_syscond.c    # Can be faked, if necessary
+          ${SDL2_SOURCE_DIR}/src/thread/pthread/SDL_systls.c
           )
       if(HAVE_PTHREADS_SEM)
         set(SOURCE_FILES ${SOURCE_FILES}

From ad5f0c68a55ed3571a2363200f7656a86ddf3703 Mon Sep 17 00:00:00 2001
From: "Ryan C. Gordon" 
Date: Thu, 11 Jul 2013 12:17:13 -0400
Subject: [PATCH 314/542] Cleaned up WGL_ACCELERATION_ARB usage.

We now do FULL or NO accel based on the app's preference. If the app didn't
 specify, we do FULL then fall back to NO.

(Not specifying anything--a true "don't care" scenario--breaks some ATI
 drivers, so we try to keep to the spirit of it while forcing a specific
 state.)

Previously, it would always do FULL, and try NO if it failed and the app
 had requested NO or DONTCARE.

This is a transplant of hg changesets a04171d6fa11 and d0b7c45e982e from the
 SDL-1.2 branch.

Fixes Bugzilla #1254.

--HG--
extra : rebase_source : db951d96e685e17a4d71fe2aa3d65043661ccccc
---
 src/video/windows/SDL_windowsopengl.c | 23 +++++++++++++++++------
 1 file changed, 17 insertions(+), 6 deletions(-)

diff --git a/src/video/windows/SDL_windowsopengl.c b/src/video/windows/SDL_windowsopengl.c
index 573b08796..ec9f34a63 100644
--- a/src/video/windows/SDL_windowsopengl.c
+++ b/src/video/windows/SDL_windowsopengl.c
@@ -425,6 +425,7 @@ WIN_GL_SetupWindow(_THIS, SDL_Window * window)
     int pixel_format = 0;
     int iAttribs[64];
     int *iAttr;
+    int *iAccelAttr;
     float fAttribs[1] = { 0 };
 
     WIN_GL_SetupPixelFormat(_this, &pfd);
@@ -492,18 +493,28 @@ WIN_GL_SetupWindow(_THIS, SDL_Window * window)
         *iAttr++ = _this->gl_config.multisamplesamples;
     }
 
+    /* We always choose either FULL or NO accel on Windows, because of flaky
+       drivers. If the app didn't specify, we use FULL, because that's
+       probably what they wanted (and if you didn't care and got FULL, that's
+       a perfectly valid result in any case). */
     *iAttr++ = WGL_ACCELERATION_ARB;
-    *iAttr++ = WGL_FULL_ACCELERATION_ARB;
+    iAccelAttr = iAttr;
+    if (_this->gl_config.accelerated) {
+        *iAttr++ = WGL_FULL_ACCELERATION_ARB;
+    } else {
+        *iAttr++ = WGL_NO_ACCELERATION_ARB;
+    }
 
     *iAttr = 0;
 
     /* Choose and set the closest available pixel format */
-    if (_this->gl_config.accelerated != 0) {
-        pixel_format = WIN_GL_ChoosePixelFormatARB(_this, iAttribs, fAttribs);
-    }
-    if (!pixel_format && _this->gl_config.accelerated != 1) {
-        iAttr[-1] = WGL_NO_ACCELERATION_ARB;
     pixel_format = WIN_GL_ChoosePixelFormatARB(_this, iAttribs, fAttribs);
+
+    /* App said "don't care about accel" and FULL accel failed. Try NO. */
+    if ( ( !pixel_format ) && ( _this->gl_config.accelerated < 0 ) ) {
+        *iAccelAttr = WGL_NO_ACCELERATION_ARB;
+        pixel_format = WIN_GL_ChoosePixelFormatARB(_this, iAttribs, fAttribs);
+        *iAccelAttr = WGL_FULL_ACCELERATION_ARB;  /* if we try again. */
     }
     if (!pixel_format) {
         pixel_format = WIN_GL_ChoosePixelFormat(hdc, &pfd);

From 09d6ed6d881af28529e29a482828ffd20f032425 Mon Sep 17 00:00:00 2001
From: "Ryan C. Gordon" 
Date: Thu, 11 Jul 2013 12:26:18 -0400
Subject: [PATCH 315/542] Fixed compiler warning.

---
 src/video/x11/SDL_x11events.c | 5 +++--
 1 file changed, 3 insertions(+), 2 deletions(-)

diff --git a/src/video/x11/SDL_x11events.c b/src/video/x11/SDL_x11events.c
index 7fb99818c..398b25f60 100644
--- a/src/video/x11/SDL_x11events.c
+++ b/src/video/x11/SDL_x11events.c
@@ -187,8 +187,9 @@ static char* X11_URIToLocal(char* uri) {
 #if SDL_VIDEO_DRIVER_X11_SUPPORTS_GENERIC_EVENTS
 static void X11_HandleGenericEvent(SDL_VideoData *videodata,XEvent event)
 {
-    if (XGetEventData(videodata->display, &event)) {
-        XGenericEventCookie *cookie = &event.xcookie;
+    /* event is a union, so cookie == &event, but this is type safe. */
+    XGenericEventCookie *cookie = &event.xcookie;
+    if (XGetEventData(videodata->display, cookie)) {
         X11_HandleXinput2Event(videodata, cookie);
         XFreeEventData(videodata->display, cookie);
     }

From e46b85c7b11548b04ad270efc168782dc8609683 Mon Sep 17 00:00:00 2001
From: "Ryan C. Gordon" 
Date: Thu, 11 Jul 2013 12:27:39 -0400
Subject: [PATCH 316/542] Removed some unused variables.

---
 test/testautomation_surface.c | 3 +--
 1 file changed, 1 insertion(+), 2 deletions(-)

diff --git a/test/testautomation_surface.c b/test/testautomation_surface.c
index 947c6f25b..3f6c56c9a 100644
--- a/test/testautomation_surface.c
+++ b/test/testautomation_surface.c
@@ -343,8 +343,7 @@ surface_testCompleteSurfaceConversion(void *arg)
     };
     SDL_Surface *face = NULL, *cvt1, *cvt2, *final;
     SDL_PixelFormat *fmt1, *fmt2;
-    Uint32 rgba[4];
-    int bpp, i, j, ret = 0;
+    int i, j, ret = 0;
 
     /* Create sample surface */
     face = SDLTest_ImageFace();

From 8ff1d6b620b727e89640d9cd7c3f16222092c8a6 Mon Sep 17 00:00:00 2001
From: "Ryan C. Gordon" 
Date: Thu, 11 Jul 2013 12:44:03 -0400
Subject: [PATCH 317/542] Fixed compiler warnings on Haiku.

---
 src/libm/math_private.h | 2 ++
 1 file changed, 2 insertions(+)

diff --git a/src/libm/math_private.h b/src/libm/math_private.h
index d61dc2e07..c5ab63d7c 100644
--- a/src/libm/math_private.h
+++ b/src/libm/math_private.h
@@ -25,7 +25,9 @@
 #define libm_hidden_proto(x)
 #define libm_hidden_def(x)
 
+#ifndef __HAIKU__ /* already defined in a system header. */
 typedef unsigned int u_int32_t;
+#endif
 
 #define atan            SDL_uclibc_atan
 #define __ieee754_atan2 SDL_uclibc_atan2

From a5362aa7e7323c90432b4c2149888a9dd2ebe0b7 Mon Sep 17 00:00:00 2001
From: "Ryan C. Gordon" 
Date: Thu, 11 Jul 2013 23:17:52 -0400
Subject: [PATCH 318/542] Attempt to fix a compiler warning on Haiku.

(if this works...Haiku generates no warnings. I know, right?!?)
---
 src/test/SDL_test_log.c | 5 +++--
 1 file changed, 3 insertions(+), 2 deletions(-)

diff --git a/src/test/SDL_test_log.c b/src/test/SDL_test_log.c
index d184396a3..c854c0f7d 100644
--- a/src/test/SDL_test_log.c
+++ b/src/test/SDL_test_log.c
@@ -55,11 +55,12 @@ char *SDLTest_TimestampToString(const time_t timestamp)
     time_t copy;
     static char buffer[64];
     struct tm *local;
+    const char *fmt = "%x %X";
 
-    SDL_memset(buffer, 0, sizeof(buffer));\
+    SDL_memset(buffer, 0, sizeof(buffer));
     copy = timestamp;
     local = localtime(©);
-    strftime(buffer, sizeof(buffer), "%x %X", local);
+    strftime(buffer, sizeof(buffer), fmt, local);
 
     return buffer;
 }

From 37c7e9ad24bec0c9402b52a891e268ecbead45ca Mon Sep 17 00:00:00 2001
From: "Ryan C. Gordon" 
Date: Thu, 11 Jul 2013 23:53:00 -0400
Subject: [PATCH 319/542] Explicitly write silence to the audio device while it
 is paused.

This is what SDL 1.2 did; we'll do this properly (add a method for the target
 driver to pause) when I rewrite all this code after the official 2.0 release.

Fixes Bugzilla #1857.
---
 src/audio/SDL_audio.c | 11 ++++++++---
 1 file changed, 8 insertions(+), 3 deletions(-)

diff --git a/src/audio/SDL_audio.c b/src/audio/SDL_audio.c
index 9f22d09c1..f5d930fb8 100644
--- a/src/audio/SDL_audio.c
+++ b/src/audio/SDL_audio.c
@@ -461,6 +461,7 @@ SDL_RunAudio(void *devicep)
         }
     } else {
         /* Otherwise, do not use the streamer. This is the old code. */
+        const int silence = (int) device->spec.silence;
 
         /* Loop, filling the audio buffers */
         while (device->enabled) {
@@ -484,9 +485,13 @@ SDL_RunAudio(void *devicep)
                 }
             }
 
-            SDL_LockMutex(device->mixer_lock);
-            (*fill) (udata, stream, stream_len);
-            SDL_UnlockMutex(device->mixer_lock);
+            if (device->paused) {
+                SDL_memset(stream, silence, stream_len);
+            } else {
+                SDL_LockMutex(device->mixer_lock);
+                (*fill) (udata, stream, stream_len);
+                SDL_UnlockMutex(device->mixer_lock);
+            }
 
             /* Convert the audio if necessary */
             if (device->convert.needed) {

From ca37b8fd837f1ebd0d41c10b3ee50b6488dc0bd2 Mon Sep 17 00:00:00 2001
From: "Ryan C. Gordon" 
Date: Thu, 11 Jul 2013 23:59:09 -0400
Subject: [PATCH 320/542] Whoops, missed a part of that last commit.

Actually fixes Bugzilla #1857.
---
 src/audio/SDL_audio.c | 5 -----
 1 file changed, 5 deletions(-)

diff --git a/src/audio/SDL_audio.c b/src/audio/SDL_audio.c
index f5d930fb8..ff60e7f7a 100644
--- a/src/audio/SDL_audio.c
+++ b/src/audio/SDL_audio.c
@@ -466,11 +466,6 @@ SDL_RunAudio(void *devicep)
         /* Loop, filling the audio buffers */
         while (device->enabled) {
 
-            if (device->paused) {
-                SDL_Delay(delay);
-                continue;
-            }
-
             /* Fill the current buffer with sound */
             if (device->convert.needed) {
                 if (device->convert.buf) {

From b5145bcf7fd3c69b983cdfdb8002a2fddbf6314f Mon Sep 17 00:00:00 2001
From: Sam Lantinga 
Date: Thu, 11 Jul 2013 21:51:09 -0700
Subject: [PATCH 321/542] Fixed bug 1958 - Cocoa SwapWindow doesn't swap the
 specified window

Ryan C. Gordon

We have this in Cocoa_GL_SwapWindow()...

    /* FIXME: Do we need to get the context for the window? */
    [[NSOpenGLContext currentContext] flushBuffer];

...which means if the current GL context is not the one in (window), we swap a different one than requested.

Right now, we don't store information about which context is assigned to which window, and the OS doesn't give you a way to retrieve it from an NSView. We would have to track this per-window during SDL_GL_MakeCurrent() (and SDL_GL_CreateContext) calls.
---
 src/video/cocoa/SDL_cocoaopengl.m | 7 ++++---
 src/video/cocoa/SDL_cocoawindow.h | 1 +
 2 files changed, 5 insertions(+), 3 deletions(-)

diff --git a/src/video/cocoa/SDL_cocoaopengl.m b/src/video/cocoa/SDL_cocoaopengl.m
index 84f89639d..35e74e328 100644
--- a/src/video/cocoa/SDL_cocoaopengl.m
+++ b/src/video/cocoa/SDL_cocoaopengl.m
@@ -212,6 +212,7 @@ Cocoa_GL_MakeCurrent(_THIS, SDL_Window * window, SDL_GLContext context)
         SDL_WindowData *windowdata = (SDL_WindowData *)window->driverdata;
         NSOpenGLContext *nscontext = (NSOpenGLContext *)context;
 
+        windowdata->nscontext = nscontext;
         if ([nscontext view] != [windowdata->nswindow contentView]) {
             [nscontext setView:[windowdata->nswindow contentView]];
             [nscontext update];
@@ -272,12 +273,12 @@ void
 Cocoa_GL_SwapWindow(_THIS, SDL_Window * window)
 {
     NSAutoreleasePool *pool;
-    NSOpenGLContext *nscontext;
+    SDL_WindowData *windowdata = (SDL_WindowData *)window->driverdata;
+    NSOpenGLContext *nscontext = windowdata->nscontext;
 
     pool = [[NSAutoreleasePool alloc] init];
 
-    /* FIXME: Do we need to get the context for the window? */
-    [[NSOpenGLContext currentContext] flushBuffer];
+    [nscontext flushBuffer];
 
     [pool release];
 }
diff --git a/src/video/cocoa/SDL_cocoawindow.h b/src/video/cocoa/SDL_cocoawindow.h
index 180cd0e3f..d348c34d1 100644
--- a/src/video/cocoa/SDL_cocoawindow.h
+++ b/src/video/cocoa/SDL_cocoawindow.h
@@ -86,6 +86,7 @@ struct SDL_WindowData
 {
     SDL_Window *window;
     NSWindow *nswindow;
+    NSOpenGLContext *nscontext;
     SDL_bool created;
     Cocoa_WindowListener *listener;
     struct SDL_VideoData *videodata;

From 22b55373e7c7005d68c759fb0468f25712220b84 Mon Sep 17 00:00:00 2001
From: Sam Lantinga 
Date: Thu, 11 Jul 2013 22:04:16 -0700
Subject: [PATCH 322/542] Check the parameters to SDL_UpdateTexture()

---
 src/render/SDL_render.c | 7 +++++++
 1 file changed, 7 insertions(+)

diff --git a/src/render/SDL_render.c b/src/render/SDL_render.c
index 274645ab2..d9bc0f34f 100644
--- a/src/render/SDL_render.c
+++ b/src/render/SDL_render.c
@@ -764,6 +764,13 @@ SDL_UpdateTexture(SDL_Texture * texture, const SDL_Rect * rect,
 
     CHECK_TEXTURE_MAGIC(texture, -1);
 
+    if (!pixels) {
+        return SDL_InvalidParamError("pixels");
+    }
+    if (!pitch) {
+        return SDL_InvalidParamError("pitch");
+    }
+
     if (!rect) {
         full_rect.x = 0;
         full_rect.y = 0;

From de2ec2b4435ba0c458bd64a1c58c41c5a3a81b99 Mon Sep 17 00:00:00 2001
From: "Ryan C. Gordon" 
Date: Fri, 12 Jul 2013 01:26:43 -0400
Subject: [PATCH 323/542] Fixed off-by-one error in SDL_ConvertStereo().

Fixes Bugzilla #561.

--HG--
extra : rebase_source : a21159567a0a8a9485c46d4c67e57224948952a0
---
 src/audio/SDL_audiocvt.c | 3 +--
 1 file changed, 1 insertion(+), 2 deletions(-)

diff --git a/src/audio/SDL_audiocvt.c b/src/audio/SDL_audiocvt.c
index 1ccd83d74..fc23b5d58 100644
--- a/src/audio/SDL_audiocvt.c
+++ b/src/audio/SDL_audiocvt.c
@@ -293,10 +293,9 @@ SDL_ConvertStereo(SDL_AudioCVT * cvt, SDL_AudioFormat format)
         const type *src = (const type *) (cvt->buf + cvt->len_cvt); \
         type *dst = (type *) (cvt->buf + cvt->len_cvt * 2); \
         for (i = cvt->len_cvt / sizeof(type); i; --i) { \
-            const type val = *src; \
             src -= 1; \
             dst -= 2; \
-            dst[0] = dst[1] = val; \
+            dst[0] = dst[1] = *src; \
         } \
     }
 

From 35275fc71433292416f7b830a759ee572b1f8a09 Mon Sep 17 00:00:00 2001
From: Sam Lantinga 
Date: Thu, 11 Jul 2013 22:59:20 -0700
Subject: [PATCH 324/542] Fixed bug 1946 - OpenGL contexts in threads

The SDL OpenGL context code is now properly thread aware.  There are two new functions which return the current OpenGL window and context for the current thread.

There are still places in the cocoa driver where the OpenGL context needs to be updated when the view changes.  These will need a different solution and still use the last globally set context to avoid changing behavior.
---
 include/SDL_video.h                   | 10 +++++
 src/video/SDL_sysvideo.h              |  3 +-
 src/video/SDL_video.c                 | 55 +++++++++++++++++++--------
 src/video/cocoa/SDL_cocoaopengl.m     |  2 +-
 src/video/windows/SDL_windowsopengl.c |  2 +-
 src/video/x11/SDL_x11opengl.c         |  6 +--
 6 files changed, 57 insertions(+), 21 deletions(-)

diff --git a/include/SDL_video.h b/include/SDL_video.h
index 66815197c..39e01c465 100644
--- a/include/SDL_video.h
+++ b/include/SDL_video.h
@@ -889,6 +889,16 @@ extern DECLSPEC SDL_GLContext SDLCALL SDL_GL_CreateContext(SDL_Window *
 extern DECLSPEC int SDLCALL SDL_GL_MakeCurrent(SDL_Window * window,
                                                SDL_GLContext context);
 
+/**
+ *  \brief Get the currently active OpenGL window.
+ */
+extern DECLSPEC SDL_Window* SDLCALL SDL_GL_GetCurrentWindow(void);
+
+/**
+ *  \brief Get the currently active OpenGL context.
+ */
+extern DECLSPEC SDL_GLContext SDLCALL SDL_GL_GetCurrentContext(void);
+
 /**
  *  \brief Set the swap interval for the current OpenGL context.
  *
diff --git a/src/video/SDL_sysvideo.h b/src/video/SDL_sysvideo.h
index cd3fa2717..3020bc773 100644
--- a/src/video/SDL_sysvideo.h
+++ b/src/video/SDL_sysvideo.h
@@ -302,7 +302,8 @@ struct SDL_VideoDevice
     /* Cache current GL context; don't call the OS when it hasn't changed. */
     SDL_Window *current_glwin;
     SDL_GLContext current_glctx;
-    SDL_threadID current_glthread;
+    SDL_TLSID current_glwin_tls;
+    SDL_TLSID current_glctx_tls;
 
     /* * * */
     /* Data private to this driver */
diff --git a/src/video/SDL_video.c b/src/video/SDL_video.c
index 1a3fbda8b..40060237e 100644
--- a/src/video/SDL_video.c
+++ b/src/video/SDL_video.c
@@ -500,6 +500,9 @@ SDL_VideoInit(const char *driver_name)
     _this->gl_config.profile_mask = 0;
     _this->gl_config.share_with_current_context = 0;
 
+    _this->current_glwin_tls = SDL_TLSCreate();
+    _this->current_glctx_tls = SDL_TLSCreate();
+
     /* Initialize the video subsystem */
     if (_this->VideoInit(_this) < 0) {
         SDL_VideoQuit();
@@ -2738,7 +2741,8 @@ SDL_GL_CreateContext(SDL_Window * window)
     /* Creating a context is assumed to make it current in the SDL driver. */
     _this->current_glwin = window;
     _this->current_glctx = ctx;
-    _this->current_glthread = SDL_ThreadID();
+    SDL_TLSSet(_this->current_glwin_tls, window, NULL);
+    SDL_TLSSet(_this->current_glctx_tls, ctx, NULL);
 
     return ctx;
 }
@@ -2747,7 +2751,12 @@ int
 SDL_GL_MakeCurrent(SDL_Window * window, SDL_GLContext ctx)
 {
     int retval;
-    SDL_threadID thread = SDL_ThreadID();
+
+    if (window == SDL_GL_GetCurrentWindow() &&
+        ctx == SDL_GL_GetCurrentContext()) {
+        /* We're already current. */
+        return 0;
+    }
 
     if (!ctx) {
         window = NULL;
@@ -2759,26 +2768,42 @@ SDL_GL_MakeCurrent(SDL_Window * window, SDL_GLContext ctx)
         }
     }
 
-    if ((window == _this->current_glwin) && (ctx == _this->current_glctx) && (thread == _this->current_glthread)) {
-        retval = 0;  /* we're already current. */
-    } else {
-        retval = _this->GL_MakeCurrent(_this, window, ctx);
-        if (retval == 0) {
-            _this->current_glwin = window;
-            _this->current_glctx = ctx;
-            _this->current_glthread = thread;
-        }
+    retval = _this->GL_MakeCurrent(_this, window, ctx);
+    if (retval == 0) {
+        _this->current_glwin = window;
+        _this->current_glctx = ctx;
+        SDL_TLSSet(_this->current_glwin_tls, window, NULL);
+        SDL_TLSSet(_this->current_glctx_tls, ctx, NULL);
     }
-
     return retval;
 }
 
+SDL_Window *
+SDL_GL_GetCurrentWindow(void)
+{
+    if (!_this) {
+        SDL_UninitializedVideo();
+        return NULL;
+    }
+    return (SDL_Window *)SDL_TLSGet(_this->current_glwin_tls);
+}
+
+SDL_GLContext
+SDL_GL_GetCurrentContext(void)
+{
+    if (!_this) {
+        SDL_UninitializedVideo();
+        return NULL;
+    }
+    return (SDL_GLContext)SDL_TLSGet(_this->current_glctx_tls);
+}
+
 int
 SDL_GL_SetSwapInterval(int interval)
 {
     if (!_this) {
         return SDL_UninitializedVideo();
-    } else if (_this->current_glctx == NULL) {
+    } else if (SDL_GL_GetCurrentContext() == NULL) {
         return SDL_SetError("No OpenGL context has been made current");
     } else if (_this->GL_SetSwapInterval) {
         return _this->GL_SetSwapInterval(_this, interval);
@@ -2792,7 +2817,7 @@ SDL_GL_GetSwapInterval(void)
 {
     if (!_this) {
         return 0;
-    } else if (_this->current_glctx == NULL) {
+    } else if (SDL_GL_GetCurrentContext() == NULL) {
         return 0;
     } else if (_this->GL_GetSwapInterval) {
         return _this->GL_GetSwapInterval(_this);
@@ -2820,7 +2845,7 @@ SDL_GL_DeleteContext(SDL_GLContext context)
         return;
     }
 
-    if (_this->current_glctx == context) {
+    if (SDL_GL_GetCurrentContext() == context) {
         SDL_GL_MakeCurrent(NULL, NULL);
     }
 
diff --git a/src/video/cocoa/SDL_cocoaopengl.m b/src/video/cocoa/SDL_cocoaopengl.m
index 35e74e328..8289107e3 100644
--- a/src/video/cocoa/SDL_cocoaopengl.m
+++ b/src/video/cocoa/SDL_cocoaopengl.m
@@ -178,7 +178,7 @@ Cocoa_GL_CreateContext(_THIS, SDL_Window * window)
     }
 
     if (_this->gl_config.share_with_current_context) {
-        share_context = (NSOpenGLContext*)(_this->current_glctx);
+        share_context = (NSOpenGLContext*)SDL_GL_GetCurrentContext();
     }
 
     context = [[NSOpenGLContext alloc] initWithFormat:fmt shareContext:share_context];
diff --git a/src/video/windows/SDL_windowsopengl.c b/src/video/windows/SDL_windowsopengl.c
index ec9f34a63..583220d83 100644
--- a/src/video/windows/SDL_windowsopengl.c
+++ b/src/video/windows/SDL_windowsopengl.c
@@ -535,7 +535,7 @@ WIN_GL_CreateContext(_THIS, SDL_Window * window)
     HGLRC context, share_context;
 
     if (_this->gl_config.share_with_current_context) {
-        share_context = (HGLRC)(_this->current_glctx);
+        share_context = (HGLRC)SDL_GL_GetCurrentContext();
     } else {
         share_context = 0;
     }
diff --git a/src/video/x11/SDL_x11opengl.c b/src/video/x11/SDL_x11opengl.c
index 1e1078eff..c8ef1f156 100644
--- a/src/video/x11/SDL_x11opengl.c
+++ b/src/video/x11/SDL_x11opengl.c
@@ -532,7 +532,7 @@ X11_GL_CreateContext(_THIS, SDL_Window * window)
     GLXContext context = NULL, share_context;
 
     if (_this->gl_config.share_with_current_context) {
-        share_context = (GLXContext)(_this->current_glctx);
+        share_context = SDL_GL_GetCurrentContext();
     } else {
         share_context = NULL;
     }
@@ -683,7 +683,7 @@ X11_GL_SetSwapInterval(_THIS, int interval)
     } else if (_this->gl_data->glXSwapIntervalEXT) {
         Display *display = ((SDL_VideoData *) _this->driverdata)->display;
         const SDL_WindowData *windowdata = (SDL_WindowData *)
-            _this->current_glwin->driverdata;
+            SDL_GL_GetCurrentWindow()->driverdata;
 
         Window drawable = windowdata->xwindow;
 
@@ -727,7 +727,7 @@ X11_GL_GetSwapInterval(_THIS)
     if (_this->gl_data->glXSwapIntervalEXT) {
         Display *display = ((SDL_VideoData *) _this->driverdata)->display;
         const SDL_WindowData *windowdata = (SDL_WindowData *)
-            _this->current_glwin->driverdata;
+            SDL_GL_GetCurrentWindow()->driverdata;
         Window drawable = windowdata->xwindow;
         unsigned int allow_late_swap_tearing = 0;
         unsigned int interval = 0;

From db4086463fe18a582e9f869f4edc5c336be01c7a Mon Sep 17 00:00:00 2001
From: Sam Lantinga 
Date: Thu, 11 Jul 2013 23:05:02 -0700
Subject: [PATCH 325/542] Fixed cast of the OpenGL context type

---
 src/video/x11/SDL_x11opengl.c | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/src/video/x11/SDL_x11opengl.c b/src/video/x11/SDL_x11opengl.c
index c8ef1f156..947000f90 100644
--- a/src/video/x11/SDL_x11opengl.c
+++ b/src/video/x11/SDL_x11opengl.c
@@ -532,7 +532,7 @@ X11_GL_CreateContext(_THIS, SDL_Window * window)
     GLXContext context = NULL, share_context;
 
     if (_this->gl_config.share_with_current_context) {
-        share_context = SDL_GL_GetCurrentContext();
+        share_context = (GLXContext)SDL_GL_GetCurrentContext();
     } else {
         share_context = NULL;
     }

From 8e19a2982dfdcde89b7707e80bb3742beab7c0d8 Mon Sep 17 00:00:00 2001
From: "Azamat H. Hackimov" 
Date: Wed, 5 Jun 2013 12:28:53 +0600
Subject: [PATCH 326/542] Define universal answer of SIZEOF_VOIDP for 32/64-bit
 architectures. This commit makes SDL_config.h universal, so it can be used
 with mixed 32 and 64 enviroment simultaneously.

---
 include/SDL_config.h.cmake | 8 +++++++-
 include/SDL_config.h.in    | 5 +++++
 2 files changed, 12 insertions(+), 1 deletion(-)

diff --git a/include/SDL_config.h.cmake b/include/SDL_config.h.cmake
index 8423be702..12c14fa24 100644
--- a/include/SDL_config.h.cmake
+++ b/include/SDL_config.h.cmake
@@ -37,7 +37,13 @@
 #cmakedefine volatile @HAVE_VOLATILE@
 
 /* C datatypes */
-#cmakedefine SIZEOF_VOIDP @SIZEOF_VOIDP@
+/* Define SIZEOF_VOIDP for 64/32 architectures */
+#ifdef __LP64__
+#define SIZEOF_VOIDP 8
+#else
+#define SIZEOF_VOIDP 4
+#endif
+
 #cmakedefine HAVE_GCC_ATOMICS @HAVE_GCC_ATOMICS@
 #cmakedefine HAVE_GCC_SYNC_LOCK_TEST_AND_SET @HAVE_GCC_SYNC_LOCK_TEST_AND_SET@
 #cmakedefine HAVE_PTHREAD_SPINLOCK @HAVE_PTHREAD_SPINLOCK@
diff --git a/include/SDL_config.h.in b/include/SDL_config.h.in
index 7c5d9bf97..d751d8ed9 100644
--- a/include/SDL_config.h.in
+++ b/include/SDL_config.h.in
@@ -43,6 +43,11 @@
 
 /* C datatypes */
 #undef SIZEOF_VOIDP
+#ifdef __LP64__
+#define SIZEOF_VOID_P 8
+#else
+#define SIZEOF_VOID_P 4
+#endif
 #undef HAVE_GCC_ATOMICS
 #undef HAVE_GCC_SYNC_LOCK_TEST_AND_SET
 #undef HAVE_PTHREAD_SPINLOCK

From 1e21e522e1626732957048a1f5a7b5cece1b6907 Mon Sep 17 00:00:00 2001
From: Sam Lantinga 
Date: Thu, 11 Jul 2013 23:16:47 -0700
Subject: [PATCH 327/542] Fixed Azamat's patch for SIZEOF_VOIDP in
 SDL_config.h.in

---
 include/SDL_config.h.in | 5 ++---
 1 file changed, 2 insertions(+), 3 deletions(-)

diff --git a/include/SDL_config.h.in b/include/SDL_config.h.in
index d751d8ed9..04ee11052 100644
--- a/include/SDL_config.h.in
+++ b/include/SDL_config.h.in
@@ -42,11 +42,10 @@
 #undef volatile
 
 /* C datatypes */
-#undef SIZEOF_VOIDP
 #ifdef __LP64__
-#define SIZEOF_VOID_P 8
+#define SIZEOF_VOIDP 8
 #else
-#define SIZEOF_VOID_P 4
+#define SIZEOF_VOIDP 4
 #endif
 #undef HAVE_GCC_ATOMICS
 #undef HAVE_GCC_SYNC_LOCK_TEST_AND_SET

From 0b2d15eb61670d9c24c70cac7fb94638710b86f6 Mon Sep 17 00:00:00 2001
From: Sam Lantinga 
Date: Thu, 11 Jul 2013 23:20:29 -0700
Subject: [PATCH 328/542] Fixed bug 1853 - Gamecontroller patch to add support
 for Logitech F510 (Linux)

Gerry JJ

Same mapping as for F710. Xinput mode only since I couldn't get Dinput mode to work at all.
---
 src/joystick/SDL_gamecontroller.c | 3 ++-
 1 file changed, 2 insertions(+), 1 deletion(-)

diff --git a/src/joystick/SDL_gamecontroller.c b/src/joystick/SDL_gamecontroller.c
index a9845c016..4d207a5b6 100644
--- a/src/joystick/SDL_gamecontroller.c
+++ b/src/joystick/SDL_gamecontroller.c
@@ -102,7 +102,8 @@ const char *s_ControllerMappings [] =
     "5e040000000000008e02000000000000,X360 Controller,a:b0,b:b1,y:b3,x:b2,start:b8,guide:b10,back:b9,dpup:b11,dpleft:b13,dpdown:b12,dpright:b14,leftshoulder:b4,rightshoulder:b5,leftstick:b6,rightstick:b7,leftx:a0,lefty:a1,rightx:a3,righty:a4,lefttrigger:a2,righttrigger:a5",
     "4c050000000000006802000000000000,PS3 Controller,a:b14,b:b13,x:b15,y:b12,start:b3,guide:b16,back:b0,leftstick:b1,rightstick:b2,leftshoulder:b10,rightshoulder:b11,dpup:b4,dpleft:b7,dpdown:b6,dpright:b5,leftx:a0,lefty:a1,rightx:a2,righty:a3,lefttrigger:b8,righttrigger:b9",
     "0500000047532047616d657061640000,GameStop Gamepad,a:b0,b:b1,y:b3,x:b2,start:b9,guide:,back:b8,leftstick:b10,rightstick:b11,leftshoulder:b4,rightshoulder:b5,dpup:h0.1,dpleft:h0.8,dpdown:h0.4,dpright:h0.2,leftx:a0,lefty:a1,rightx:a2,righty:a3,lefttrigger:b6,righttrigger:b7,",
-    "6d040000000000001fc2000000000000,Logitech F710 Gamepad (XInput),a:b0,b:b1,y:b3,x:b2,start:b8,guide:b10,back:b9,leftstick:b6,rightstick:b7,leftshoulder:b4,rightshoulder:b5,dpup:b11,dpleft:b13,dpdown:b12,dpright:b14,leftx:a0,lefty:a1,rightx:a3,righty:a4,lefttrigger:a2,righttrigger:a5,",
+    "6d040000000000001fc2000000000000,Logitech F 10 Gamepad (XInput),a:b0,b:b1,y:b3,x:b2,start:b8,guide:b10,back:b9,leftstick:b6,rightstick:b7,leftshoulder:b4,rightshoulder:b5,dpup:b11,dpleft:b13,dpdown:b12,dpright:b14,leftx:a0,lefty:a1,rightx:a3,righty:a4,lefttrigger:a2,righttrigger:a5,",
+    "030000006d0400001ec2000020200000,Logitech F510 Gamepad (XInput),a:b0,b:b1,y:b3,x:b2,start:b7,guide:b8,back:b6,leftstick:b9,rightstick:b10,leftshoulder:b4,rightshoulder:b5,dpup:h0.1,dpleft:h0.8,dpdown:h0.4,dpright:h0.2,leftx:a0,lefty:a1,rightx:a3,righty:a4,lefttrigger:a2,righttrigger:a5,",
     "6d0400000000000016c2000000000000,Logitech F310 Gamepad (DInput),a:b1,b:b2,y:b3,x:b0,start:b9,back:b8,leftstick:b10,rightstick:b11,leftshoulder:b4,rightshoulder:b5,dpup:h0.1,dpleft:h0.8,dpdown:h0.4,dpright:h0.2,leftx:a0,lefty:a1,rightx:a2,righty:a3,lefttrigger:b6,righttrigger:b7,", /* Guide button doesn't seem to be sent in DInput mode. */
     "6d0400000000000019c2000000000000,Logitech Wireless Gamepad (DInput),a:b1,b:b2,y:b3,x:b0,start:b9,back:b8,leftstick:b10,rightstick:b11,leftshoulder:b4,rightshoulder:b5,dpup:h0.1,dpleft:h0.8,dpdown:h0.4,dpright:h0.2,leftx:a0,lefty:a1,rightx:a2,righty:a3,lefttrigger:b6,righttrigger:b7,", /* This includes F710 in DInput mode and the "Logitech Cordless RumblePad 2", at the very least. */
     "6d0400000000000018c2000000000000,Logitech Rumble Gamepad F510(DInput),a:b1,b:b2,y:b3,x:b0,start:b9,back:b8,leftstick:b10,rightstick:b11,leftshoulder:b4,rightshoulder:b5,dpup:h0.1,dpleft:h0.8,dpdown:h0.4,dpright:h0.2,leftx:a0,rightx:a2,lefty:a1,righty:a3,lefttrigger:b6,righttrigger:b7,",

From 8522bf8e3814b7f8447d4d05a957fa77524e578a Mon Sep 17 00:00:00 2001
From: Sam Lantinga 
Date: Thu, 11 Jul 2013 23:21:09 -0700
Subject: [PATCH 329/542] Fixed name of the Logitech F710 controller

---
 src/joystick/SDL_gamecontroller.c | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/src/joystick/SDL_gamecontroller.c b/src/joystick/SDL_gamecontroller.c
index 4d207a5b6..aed554f6e 100644
--- a/src/joystick/SDL_gamecontroller.c
+++ b/src/joystick/SDL_gamecontroller.c
@@ -102,7 +102,7 @@ const char *s_ControllerMappings [] =
     "5e040000000000008e02000000000000,X360 Controller,a:b0,b:b1,y:b3,x:b2,start:b8,guide:b10,back:b9,dpup:b11,dpleft:b13,dpdown:b12,dpright:b14,leftshoulder:b4,rightshoulder:b5,leftstick:b6,rightstick:b7,leftx:a0,lefty:a1,rightx:a3,righty:a4,lefttrigger:a2,righttrigger:a5",
     "4c050000000000006802000000000000,PS3 Controller,a:b14,b:b13,x:b15,y:b12,start:b3,guide:b16,back:b0,leftstick:b1,rightstick:b2,leftshoulder:b10,rightshoulder:b11,dpup:b4,dpleft:b7,dpdown:b6,dpright:b5,leftx:a0,lefty:a1,rightx:a2,righty:a3,lefttrigger:b8,righttrigger:b9",
     "0500000047532047616d657061640000,GameStop Gamepad,a:b0,b:b1,y:b3,x:b2,start:b9,guide:,back:b8,leftstick:b10,rightstick:b11,leftshoulder:b4,rightshoulder:b5,dpup:h0.1,dpleft:h0.8,dpdown:h0.4,dpright:h0.2,leftx:a0,lefty:a1,rightx:a2,righty:a3,lefttrigger:b6,righttrigger:b7,",
-    "6d040000000000001fc2000000000000,Logitech F 10 Gamepad (XInput),a:b0,b:b1,y:b3,x:b2,start:b8,guide:b10,back:b9,leftstick:b6,rightstick:b7,leftshoulder:b4,rightshoulder:b5,dpup:b11,dpleft:b13,dpdown:b12,dpright:b14,leftx:a0,lefty:a1,rightx:a3,righty:a4,lefttrigger:a2,righttrigger:a5,",
+    "6d040000000000001fc2000000000000,Logitech F710 Gamepad (XInput),a:b0,b:b1,y:b3,x:b2,start:b8,guide:b10,back:b9,leftstick:b6,rightstick:b7,leftshoulder:b4,rightshoulder:b5,dpup:b11,dpleft:b13,dpdown:b12,dpright:b14,leftx:a0,lefty:a1,rightx:a3,righty:a4,lefttrigger:a2,righttrigger:a5,",
     "030000006d0400001ec2000020200000,Logitech F510 Gamepad (XInput),a:b0,b:b1,y:b3,x:b2,start:b7,guide:b8,back:b6,leftstick:b9,rightstick:b10,leftshoulder:b4,rightshoulder:b5,dpup:h0.1,dpleft:h0.8,dpdown:h0.4,dpright:h0.2,leftx:a0,lefty:a1,rightx:a3,righty:a4,lefttrigger:a2,righttrigger:a5,",
     "6d0400000000000016c2000000000000,Logitech F310 Gamepad (DInput),a:b1,b:b2,y:b3,x:b0,start:b9,back:b8,leftstick:b10,rightstick:b11,leftshoulder:b4,rightshoulder:b5,dpup:h0.1,dpleft:h0.8,dpdown:h0.4,dpright:h0.2,leftx:a0,lefty:a1,rightx:a2,righty:a3,lefttrigger:b6,righttrigger:b7,", /* Guide button doesn't seem to be sent in DInput mode. */
     "6d0400000000000019c2000000000000,Logitech Wireless Gamepad (DInput),a:b1,b:b2,y:b3,x:b0,start:b9,back:b8,leftstick:b10,rightstick:b11,leftshoulder:b4,rightshoulder:b5,dpup:h0.1,dpleft:h0.8,dpdown:h0.4,dpright:h0.2,leftx:a0,lefty:a1,rightx:a2,righty:a3,lefttrigger:b6,righttrigger:b7,", /* This includes F710 in DInput mode and the "Logitech Cordless RumblePad 2", at the very least. */

From 852321d7a28e86fac3b872cceb1615db2fb41f05 Mon Sep 17 00:00:00 2001
From: Dimitris Zenios 
Date: Fri, 12 Jul 2013 09:55:58 +0300
Subject: [PATCH 330/542] Fixed gcc warnings for apps using SDL headers with
 -Wstrict-prototypes flag.

---
 include/SDL_thread.h | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/include/SDL_thread.h b/include/SDL_thread.h
index 8bc3e7f8d..ba5af31e2 100644
--- a/include/SDL_thread.h
+++ b/include/SDL_thread.h
@@ -200,7 +200,7 @@ extern DECLSPEC void SDLCALL SDL_WaitThread(SDL_Thread * thread, int *status);
  *  \sa SDL_TLSGet()
  *  \sa SDL_TLSSet()
  */
-extern DECLSPEC SDL_TLSID SDLCALL SDL_TLSCreate();
+extern DECLSPEC SDL_TLSID SDLCALL SDL_TLSCreate(void);
 
 /**
  *  \brief Get the value associated with a thread local storage ID for the current thread.

From 1bcb90ff25d507c60fc401b67ee6a7e0e40f7053 Mon Sep 17 00:00:00 2001
From: Sam Lantinga 
Date: Fri, 12 Jul 2013 00:43:16 -0700
Subject: [PATCH 331/542] Don't crash if the current render target is
 destroyed.

---
 src/render/SDL_render.c | 7 ++++++-
 1 file changed, 6 insertions(+), 1 deletion(-)

diff --git a/src/render/SDL_render.c b/src/render/SDL_render.c
index d9bc0f34f..7f91e4510 100644
--- a/src/render/SDL_render.c
+++ b/src/render/SDL_render.c
@@ -1691,9 +1691,14 @@ SDL_DestroyTexture(SDL_Texture * texture)
     SDL_Renderer *renderer;
 
     CHECK_TEXTURE_MAGIC(texture, );
-    texture->magic = NULL;
 
     renderer = texture->renderer;
+    if (texture == renderer->target) {
+        SDL_SetRenderTarget(renderer, NULL);
+    }
+
+    texture->magic = NULL;
+
     if (texture->next) {
         texture->next->prev = texture->prev;
     }

From ee12cc8585dd3147376c734fd5c6b736f5c85dfe Mon Sep 17 00:00:00 2001
From: Sam Lantinga 
Date: Fri, 12 Jul 2013 00:55:04 -0700
Subject: [PATCH 332/542] Fixed bug 1810 - xxx_RenderReadPixels - incorrect
 behaviour in certain conditions

PoopiSan

GLES2_RenderReadPixels, GLES_RenderReadPixels, GL_RenderReadPixels and possibly other backends is incorrectly implemented.

If the current target viewport is different than window size the function is reading garbage and according to the function documentation should work with any rendering target "Read pixels from the current rendering target.".

this seems to be caused by this line:

...
SDL_GetWindowSize(window, &w, &h);
---
 src/render/opengl/SDL_render_gl.c       | 3 +--
 src/render/opengles/SDL_render_gles.c   | 3 +--
 src/render/opengles2/SDL_render_gles2.c | 3 +--
 3 files changed, 3 insertions(+), 6 deletions(-)

diff --git a/src/render/opengl/SDL_render_gl.c b/src/render/opengl/SDL_render_gl.c
index 77248e421..279652f12 100644
--- a/src/render/opengl/SDL_render_gl.c
+++ b/src/render/opengl/SDL_render_gl.c
@@ -1233,7 +1233,6 @@ GL_RenderReadPixels(SDL_Renderer * renderer, const SDL_Rect * rect,
                     Uint32 pixel_format, void * pixels, int pitch)
 {
     GL_RenderData *data = (GL_RenderData *) renderer->driverdata;
-    SDL_Window *window = renderer->window;
     Uint32 temp_format = SDL_PIXELFORMAT_ARGB8888;
     void *temp_pixels;
     int temp_pitch;
@@ -1253,7 +1252,7 @@ GL_RenderReadPixels(SDL_Renderer * renderer, const SDL_Rect * rect,
 
     convert_format(data, temp_format, &internalFormat, &format, &type);
 
-    SDL_GetWindowSize(window, &w, &h);
+    SDL_GetRendererOutputSize(renderer, &w, &h);
 
     data->glPixelStorei(GL_PACK_ALIGNMENT, 1);
     data->glPixelStorei(GL_PACK_ROW_LENGTH,
diff --git a/src/render/opengles/SDL_render_gles.c b/src/render/opengles/SDL_render_gles.c
index 920b35fb0..0ec21da07 100644
--- a/src/render/opengles/SDL_render_gles.c
+++ b/src/render/opengles/SDL_render_gles.c
@@ -1006,7 +1006,6 @@ GLES_RenderReadPixels(SDL_Renderer * renderer, const SDL_Rect * rect,
                     Uint32 pixel_format, void * pixels, int pitch)
 {
     GLES_RenderData *data = (GLES_RenderData *) renderer->driverdata;
-    SDL_Window *window = renderer->window;
     Uint32 temp_format = SDL_PIXELFORMAT_ABGR8888;
     void *temp_pixels;
     int temp_pitch;
@@ -1022,7 +1021,7 @@ GLES_RenderReadPixels(SDL_Renderer * renderer, const SDL_Rect * rect,
         return SDL_OutOfMemory();
     }
 
-    SDL_GetWindowSize(window, &w, &h);
+    SDL_GetRendererOutputSize(renderer, &w, &h);
 
     data->glPixelStorei(GL_PACK_ALIGNMENT, 1);
 
diff --git a/src/render/opengles2/SDL_render_gles2.c b/src/render/opengles2/SDL_render_gles2.c
index f52afc15a..fafc9da59 100644
--- a/src/render/opengles2/SDL_render_gles2.c
+++ b/src/render/opengles2/SDL_render_gles2.c
@@ -1508,7 +1508,6 @@ GLES2_RenderReadPixels(SDL_Renderer * renderer, const SDL_Rect * rect,
                     Uint32 pixel_format, void * pixels, int pitch)
 {
     GLES2_DriverContext *rdata = (GLES2_DriverContext *)renderer->driverdata;
-    SDL_Window *window = renderer->window;
     Uint32 temp_format = SDL_PIXELFORMAT_ABGR8888;
     void *temp_pixels;
     int temp_pitch;
@@ -1524,7 +1523,7 @@ GLES2_RenderReadPixels(SDL_Renderer * renderer, const SDL_Rect * rect,
         return SDL_OutOfMemory();
     }
 
-    SDL_GetWindowSize(window, &w, &h);
+    SDL_GetRendererOutputSize(renderer, &w, &h);
 
     rdata->glPixelStorei(GL_PACK_ALIGNMENT, 1);
 

From 22aec9f62551a101b517e0f1bc58d92140d0214d Mon Sep 17 00:00:00 2001
From: Sam Lantinga 
Date: Fri, 12 Jul 2013 08:21:28 -0700
Subject: [PATCH 333/542] Oops, that was supposed to be in the Linux section.

---
 src/joystick/SDL_gamecontroller.c | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/src/joystick/SDL_gamecontroller.c b/src/joystick/SDL_gamecontroller.c
index aed554f6e..00e7b1d94 100644
--- a/src/joystick/SDL_gamecontroller.c
+++ b/src/joystick/SDL_gamecontroller.c
@@ -103,7 +103,6 @@ const char *s_ControllerMappings [] =
     "4c050000000000006802000000000000,PS3 Controller,a:b14,b:b13,x:b15,y:b12,start:b3,guide:b16,back:b0,leftstick:b1,rightstick:b2,leftshoulder:b10,rightshoulder:b11,dpup:b4,dpleft:b7,dpdown:b6,dpright:b5,leftx:a0,lefty:a1,rightx:a2,righty:a3,lefttrigger:b8,righttrigger:b9",
     "0500000047532047616d657061640000,GameStop Gamepad,a:b0,b:b1,y:b3,x:b2,start:b9,guide:,back:b8,leftstick:b10,rightstick:b11,leftshoulder:b4,rightshoulder:b5,dpup:h0.1,dpleft:h0.8,dpdown:h0.4,dpright:h0.2,leftx:a0,lefty:a1,rightx:a2,righty:a3,lefttrigger:b6,righttrigger:b7,",
     "6d040000000000001fc2000000000000,Logitech F710 Gamepad (XInput),a:b0,b:b1,y:b3,x:b2,start:b8,guide:b10,back:b9,leftstick:b6,rightstick:b7,leftshoulder:b4,rightshoulder:b5,dpup:b11,dpleft:b13,dpdown:b12,dpright:b14,leftx:a0,lefty:a1,rightx:a3,righty:a4,lefttrigger:a2,righttrigger:a5,",
-    "030000006d0400001ec2000020200000,Logitech F510 Gamepad (XInput),a:b0,b:b1,y:b3,x:b2,start:b7,guide:b8,back:b6,leftstick:b9,rightstick:b10,leftshoulder:b4,rightshoulder:b5,dpup:h0.1,dpleft:h0.8,dpdown:h0.4,dpright:h0.2,leftx:a0,lefty:a1,rightx:a3,righty:a4,lefttrigger:a2,righttrigger:a5,",
     "6d0400000000000016c2000000000000,Logitech F310 Gamepad (DInput),a:b1,b:b2,y:b3,x:b0,start:b9,back:b8,leftstick:b10,rightstick:b11,leftshoulder:b4,rightshoulder:b5,dpup:h0.1,dpleft:h0.8,dpdown:h0.4,dpright:h0.2,leftx:a0,lefty:a1,rightx:a2,righty:a3,lefttrigger:b6,righttrigger:b7,", /* Guide button doesn't seem to be sent in DInput mode. */
     "6d0400000000000019c2000000000000,Logitech Wireless Gamepad (DInput),a:b1,b:b2,y:b3,x:b0,start:b9,back:b8,leftstick:b10,rightstick:b11,leftshoulder:b4,rightshoulder:b5,dpup:h0.1,dpleft:h0.8,dpdown:h0.4,dpright:h0.2,leftx:a0,lefty:a1,rightx:a2,righty:a3,lefttrigger:b6,righttrigger:b7,", /* This includes F710 in DInput mode and the "Logitech Cordless RumblePad 2", at the very least. */
     "6d0400000000000018c2000000000000,Logitech Rumble Gamepad F510(DInput),a:b1,b:b2,y:b3,x:b0,start:b9,back:b8,leftstick:b10,rightstick:b11,leftshoulder:b4,rightshoulder:b5,dpup:h0.1,dpleft:h0.8,dpdown:h0.4,dpright:h0.2,leftx:a0,rightx:a2,lefty:a1,righty:a3,lefttrigger:b6,righttrigger:b7,",
@@ -114,6 +113,7 @@ const char *s_ControllerMappings [] =
     "030000004c0500006802000011010000,PS3 Controller,a:b14,b:b13,x:b15,y:b12,start:b3,guide:b16,back:b0,leftstick:b1,rightstick:b2,leftshoulder:b10,rightshoulder:b11,dpup:b4,dpleft:b7,dpdown:b6,dpright:b5,leftx:a0,lefty:a1,rightx:a2,righty:a3,lefttrigger:b8,righttrigger:b9",
     "030000006d0400001fc2000005030000,Logitech F710 Gamepad (XInput),a:b0,b:b1,y:b3,x:b2,start:b7,guide:b8,back:b6,leftstick:b9,rightstick:b10,leftshoulder:b4,rightshoulder:b5,dpup:h0.1,dpleft:h0.8,dpdown:h0.4,dpright:h0.2,leftx:a0,lefty:a1,rightx:a3,righty:a4,lefttrigger:a2,righttrigger:a5,",
     "030000006d04000019c2000011010000,Logitech F710 Gamepad (DInput),a:b1,b:b2,y:b3,x:b0,start:b9,back:b8,leftstick:b10,rightstick:b11,leftshoulder:b4,rightshoulder:b5,dpup:h0.1,dpleft:h0.8,dpdown:h0.4,dpright:h0.2,leftx:a0,lefty:a1,rightx:a2,righty:a3,lefttrigger:b6,righttrigger:b7,", /* Guide button doesn't seem to be sent in DInput mode. */
+    "030000006d0400001ec2000020200000,Logitech F510 Gamepad (XInput),a:b0,b:b1,y:b3,x:b2,start:b7,guide:b8,back:b6,leftstick:b9,rightstick:b10,leftshoulder:b4,rightshoulder:b5,dpup:h0.1,dpleft:h0.8,dpdown:h0.4,dpright:h0.2,leftx:a0,lefty:a1,rightx:a3,righty:a4,lefttrigger:a2,righttrigger:a5,",
     "030000006d0400001dc2000014400000,Logitech F310 Gamepad (XInput),a:b0,b:b1,y:b3,x:b2,start:b7,guide:b8,back:b6,leftstick:b9,rightstick:b10,leftshoulder:b4,rightshoulder:b5,dpup:h0.1,dpleft:h0.8,dpdown:h0.4,dpright:h0.2,leftx:a0,lefty:a1,rightx:a3,righty:a4,lefttrigger:a2,righttrigger:a5,",
     "030000006d04000019c2000010010000,Logitech Cordless RumblePad 2,a:b1,b:b2,y:b3,x:b0,start:b9,guide:,back:b8,leftstick:b10,rightstick:b11,leftshoulder:b4,rightshoulder:b5,dpup:h0.1,dpleft:h0.8,dpdown:h0.4,dpright:h0.2,leftx:a0,lefty:a1,rightx:a2,righty:a3,lefttrigger:b6,righttrigger:b7,",
     "0500000047532047616d657061640000,GameStop Gamepad,a:b0,b:b1,y:b3,x:b2,start:b9,guide:,back:b8,leftstick:b10,rightstick:b11,leftshoulder:b4,rightshoulder:b5,dpup:h0.1,dpleft:h0.8,dpdown:h0.4,dpright:h0.2,leftx:a0,lefty:a1,rightx:a2,righty:a3,lefttrigger:b6,righttrigger:b7,",

From 06741a5761eae72a5b64026bd24c97f19dbbf845 Mon Sep 17 00:00:00 2001
From: Sam Lantinga 
Date: Fri, 12 Jul 2013 10:44:55 -0700
Subject: [PATCH 334/542] Moved the game controller database to a separate file
 and added a script to sort the entries so we can easily check for duplicates

---
 src/joystick/SDL_gamecontroller.c   | 39 +----------------
 src/joystick/SDL_gamecontrollerdb.h | 65 +++++++++++++++++++++++++++++
 src/joystick/sort_controllers.py    | 61 +++++++++++++++++++++++++++
 3 files changed, 127 insertions(+), 38 deletions(-)
 create mode 100644 src/joystick/SDL_gamecontrollerdb.h
 create mode 100755 src/joystick/sort_controllers.py

diff --git a/src/joystick/SDL_gamecontroller.c b/src/joystick/SDL_gamecontroller.c
index 00e7b1d94..912be0524 100644
--- a/src/joystick/SDL_gamecontroller.c
+++ b/src/joystick/SDL_gamecontroller.c
@@ -26,6 +26,7 @@
 #include "SDL_assert.h"
 #include "SDL_sysjoystick.h"
 #include "SDL_hints.h"
+#include "SDL_gamecontrollerdb.h"
 
 #if !SDL_EVENTS_DISABLED
 #include "../events/SDL_events_c.h"
@@ -85,44 +86,6 @@ typedef struct _ControllerMapping_t
     struct _ControllerMapping_t *next;
 } ControllerMapping_t;
 
-
-/* default mappings we support */
-const char *s_ControllerMappings [] =
-{
-#ifdef SDL_JOYSTICK_DINPUT
-    "xinput,X360 Controller,a:b10,b:b11,y:b13,x:b12,start:b4,guide:b14,back:b5,dpup:b0,dpleft:b2,dpdown:b1,dpright:b3,leftshoulder:b8,rightshoulder:b9,leftstick:b6,rightstick:b7,leftx:a0,lefty:a1,rightx:a2,righty:a3,lefttrigger:a4,righttrigger:a5",
-    "341a3608000000000000504944564944,Afterglow PS3 Controller,a:b1,b:b2,y:b3,x:b0,start:b9,guide:b12,back:b8,dpup:h0.1,dpleft:h0.8,dpdown:h0.4,dpright:h0.2,leftshoulder:b4,rightshoulder:b5,leftstick:b10,rightstick:b11,leftx:a0,lefty:a1,rightx:a2,righty:a3,lefttrigger:b6,righttrigger:b7",
-    "88880803000000000000504944564944,PS3 Controller,a:b2,b:b1,x:b0,y:b3,start:b11,back:b8,leftstick:b9,rightstick:b10,leftshoulder:b4,rightshoulder:b5,dpup:h0.1,dpleft:h0.4,dpdown:h0.8,dpright:h0.2,leftx:a0,lefty:a1,rightx:a3,righty:a4,lefttrigger:b6,righttrigger:b7,guide:b12",
-    "4c056802000000000000504944564944,PS3 Controller,a:b14,b:b13,y:b12,x:b15,start:b3,guide:b16,back:b0,leftstick:b1,rightstick:b2,leftshoulder:b10,rightshoulder:b11,dpup:b4,dpleft:b7,dpdown:b6,dpright:b5,leftx:a0,lefty:a1,rightx:a2,righty:a3,lefttrigger:b8,righttrigger:b9,",
-    "25090500000000000000504944564944,PS3 DualShock,a:b2,b:b1,x:b0,y:b3,start:b8,guide:,back:b9,leftstick:b10,rightstick:b11,leftshoulder:b6,rightshoulder:b7,dpup:h0.1,dpleft:h0.4,dpdown:h0.8,dpright:h0.2,leftx:a0,lefty:a1,rightx:a2,righty:a3,lefttrigger:b4,righttrigger:b5",
-    "ffff0000000000000000504944564944,GameStop Gamepad,a:b0,b:b1,y:b3,x:b2,start:b9,guide:,back:b8,leftstick:b10,rightstick:b11,leftshoulder:b4,rightshoulder:b5,dpup:h0.1,dpleft:h0.8,dpdown:h0.4,dpright:h0.2,leftx:a0,lefty:a1,rightx:a2,righty:a3,lefttrigger:b6,righttrigger:b7,",
-	"6d0419c2000000000000504944564944,Logitech F710 Gamepad,a:b1,b:b2,y:b3,x:b0,start:b9,back:b8,leftstick:b10,rightstick:b11,leftshoulder:b4,rightshoulder:b5,dpup:h0.1,dpleft:h0.8,dpdown:h0.4,dpright:h0.2,leftx:a0,lefty:a1,rightx:a2,righty:a3,lefttrigger:b6,righttrigger:b7,", /* Guide button doesn't seem to be sent in DInput mode. */
-    "6d0416c2000000000000504944564944,Generic DirectInput Controller,a:b1,b:b2,y:b3,x:b0,start:b9,back:b8,leftstick:b10,rightstick:b11,leftshoulder:b4,rightshoulder:b5,dpup:h0.1,dpleft:h0.8,dpdown:h0.4,dpright:h0.2,leftx:a0,lefty:a1,rightx:a2,righty:a3,lefttrigger:b6,righttrigger:b7,",
-#elif defined(__MACOSX__)
-    "5e040000000000008e02000000000000,X360 Controller,a:b0,b:b1,y:b3,x:b2,start:b8,guide:b10,back:b9,dpup:b11,dpleft:b13,dpdown:b12,dpright:b14,leftshoulder:b4,rightshoulder:b5,leftstick:b6,rightstick:b7,leftx:a0,lefty:a1,rightx:a3,righty:a4,lefttrigger:a2,righttrigger:a5",
-    "4c050000000000006802000000000000,PS3 Controller,a:b14,b:b13,x:b15,y:b12,start:b3,guide:b16,back:b0,leftstick:b1,rightstick:b2,leftshoulder:b10,rightshoulder:b11,dpup:b4,dpleft:b7,dpdown:b6,dpright:b5,leftx:a0,lefty:a1,rightx:a2,righty:a3,lefttrigger:b8,righttrigger:b9",
-    "0500000047532047616d657061640000,GameStop Gamepad,a:b0,b:b1,y:b3,x:b2,start:b9,guide:,back:b8,leftstick:b10,rightstick:b11,leftshoulder:b4,rightshoulder:b5,dpup:h0.1,dpleft:h0.8,dpdown:h0.4,dpright:h0.2,leftx:a0,lefty:a1,rightx:a2,righty:a3,lefttrigger:b6,righttrigger:b7,",
-    "6d040000000000001fc2000000000000,Logitech F710 Gamepad (XInput),a:b0,b:b1,y:b3,x:b2,start:b8,guide:b10,back:b9,leftstick:b6,rightstick:b7,leftshoulder:b4,rightshoulder:b5,dpup:b11,dpleft:b13,dpdown:b12,dpright:b14,leftx:a0,lefty:a1,rightx:a3,righty:a4,lefttrigger:a2,righttrigger:a5,",
-    "6d0400000000000016c2000000000000,Logitech F310 Gamepad (DInput),a:b1,b:b2,y:b3,x:b0,start:b9,back:b8,leftstick:b10,rightstick:b11,leftshoulder:b4,rightshoulder:b5,dpup:h0.1,dpleft:h0.8,dpdown:h0.4,dpright:h0.2,leftx:a0,lefty:a1,rightx:a2,righty:a3,lefttrigger:b6,righttrigger:b7,", /* Guide button doesn't seem to be sent in DInput mode. */
-    "6d0400000000000019c2000000000000,Logitech Wireless Gamepad (DInput),a:b1,b:b2,y:b3,x:b0,start:b9,back:b8,leftstick:b10,rightstick:b11,leftshoulder:b4,rightshoulder:b5,dpup:h0.1,dpleft:h0.8,dpdown:h0.4,dpright:h0.2,leftx:a0,lefty:a1,rightx:a2,righty:a3,lefttrigger:b6,righttrigger:b7,", /* This includes F710 in DInput mode and the "Logitech Cordless RumblePad 2", at the very least. */
-    "6d0400000000000018c2000000000000,Logitech Rumble Gamepad F510(DInput),a:b1,b:b2,y:b3,x:b0,start:b9,back:b8,leftstick:b10,rightstick:b11,leftshoulder:b4,rightshoulder:b5,dpup:h0.1,dpleft:h0.8,dpdown:h0.4,dpright:h0.2,leftx:a0,rightx:a2,lefty:a1,righty:a3,lefttrigger:b6,righttrigger:b7,",
-#elif defined(__LINUX__)
-    "030000005e0400008e02000014010000,X360 Controller,a:b0,b:b1,y:b3,x:b2,start:b7,guide:b8,back:b6,dpup:h0.1,dpleft:h0.8,dpdown:h0.4,dpright:h0.2,leftshoulder:b4,rightshoulder:b5,leftstick:b9,rightstick:b10,leftx:a0,lefty:a1,rightx:a3,righty:a4,lefttrigger:a2,righttrigger:a5",
-    "030000005e0400008e02000010010000,X360 Controller,a:b0,b:b1,y:b3,x:b2,start:b7,guide:b8,back:b6,leftstick:b9,rightstick:b10,leftshoulder:b4,rightshoulder:b5,dpup:h0.1,dpleft:h0.8,dpdown:h0.4,dpright:h0.2,leftx:a0,lefty:a1,rightx:a3,righty:a4,lefttrigger:a2,righttrigger:a5,",
-    "030000005e0400001907000000010000,X360 Wireless Controller,a:b0,b:b1,y:b3,x:b2,start:b7,guide:b8,back:b6,leftstick:b9,rightstick:b10,leftshoulder:b4,rightshoulder:b5,dpup:b13,dpleft:b11,dpdown:b14,dpright:b12,leftx:a0,lefty:a1,rightx:a3,righty:a4,lefttrigger:a2,righttrigger:a5,",
-    "030000004c0500006802000011010000,PS3 Controller,a:b14,b:b13,x:b15,y:b12,start:b3,guide:b16,back:b0,leftstick:b1,rightstick:b2,leftshoulder:b10,rightshoulder:b11,dpup:b4,dpleft:b7,dpdown:b6,dpright:b5,leftx:a0,lefty:a1,rightx:a2,righty:a3,lefttrigger:b8,righttrigger:b9",
-    "030000006d0400001fc2000005030000,Logitech F710 Gamepad (XInput),a:b0,b:b1,y:b3,x:b2,start:b7,guide:b8,back:b6,leftstick:b9,rightstick:b10,leftshoulder:b4,rightshoulder:b5,dpup:h0.1,dpleft:h0.8,dpdown:h0.4,dpright:h0.2,leftx:a0,lefty:a1,rightx:a3,righty:a4,lefttrigger:a2,righttrigger:a5,",
-    "030000006d04000019c2000011010000,Logitech F710 Gamepad (DInput),a:b1,b:b2,y:b3,x:b0,start:b9,back:b8,leftstick:b10,rightstick:b11,leftshoulder:b4,rightshoulder:b5,dpup:h0.1,dpleft:h0.8,dpdown:h0.4,dpright:h0.2,leftx:a0,lefty:a1,rightx:a2,righty:a3,lefttrigger:b6,righttrigger:b7,", /* Guide button doesn't seem to be sent in DInput mode. */
-    "030000006d0400001ec2000020200000,Logitech F510 Gamepad (XInput),a:b0,b:b1,y:b3,x:b2,start:b7,guide:b8,back:b6,leftstick:b9,rightstick:b10,leftshoulder:b4,rightshoulder:b5,dpup:h0.1,dpleft:h0.8,dpdown:h0.4,dpright:h0.2,leftx:a0,lefty:a1,rightx:a3,righty:a4,lefttrigger:a2,righttrigger:a5,",
-    "030000006d0400001dc2000014400000,Logitech F310 Gamepad (XInput),a:b0,b:b1,y:b3,x:b2,start:b7,guide:b8,back:b6,leftstick:b9,rightstick:b10,leftshoulder:b4,rightshoulder:b5,dpup:h0.1,dpleft:h0.8,dpdown:h0.4,dpright:h0.2,leftx:a0,lefty:a1,rightx:a3,righty:a4,lefttrigger:a2,righttrigger:a5,",
-    "030000006d04000019c2000010010000,Logitech Cordless RumblePad 2,a:b1,b:b2,y:b3,x:b0,start:b9,guide:,back:b8,leftstick:b10,rightstick:b11,leftshoulder:b4,rightshoulder:b5,dpup:h0.1,dpleft:h0.8,dpdown:h0.4,dpright:h0.2,leftx:a0,lefty:a1,rightx:a2,righty:a3,lefttrigger:b6,righttrigger:b7,",
-    "0500000047532047616d657061640000,GameStop Gamepad,a:b0,b:b1,y:b3,x:b2,start:b9,guide:,back:b8,leftstick:b10,rightstick:b11,leftshoulder:b4,rightshoulder:b5,dpup:h0.1,dpleft:h0.8,dpdown:h0.4,dpright:h0.2,leftx:a0,lefty:a1,rightx:a2,righty:a3,lefttrigger:b6,righttrigger:b7,",
-    "03000000ba2200002010000001010000,Jess Technology USB Game Controller,start:b9,a:b2,b:b1,x:b3,y:b0,dpup:h0.1,dpleft:h0.8,dpdown:h0.4,dpright:h0.2,leftx:a0,lefty:a1,rightx:a3,righty:a2,lefttrigger:b6,righttrigger:b7,leftshoulder:b4,rightshoulder:b5,guide:,back:b8",
-    "030000006d0400001ec2000020200000,Logitech Rumble Gamepad F510 (XInput),a:b0,b:b1,x:b2,y:b3,start:b7,back:b6,guide:b8,leftstick:b9,rightstick:b10,leftshoulder:b4,rightshoulder:b5,dpup:h0.1,dpleft:h0.8,dpdown:h0.4,dpright:h0.2,leftx:a0,lefty:a1,rightx:a3,righty:a4,lefttrigger:a2,righttrigger:a5,",
-#endif
-    NULL
-};
-
 static ControllerMapping_t *s_pSupportedControllers = NULL;
 #ifdef SDL_JOYSTICK_DINPUT
 static ControllerMapping_t *s_pXInputMapping = NULL;
diff --git a/src/joystick/SDL_gamecontrollerdb.h b/src/joystick/SDL_gamecontrollerdb.h
new file mode 100644
index 000000000..7f6c7b29f
--- /dev/null
+++ b/src/joystick/SDL_gamecontrollerdb.h
@@ -0,0 +1,65 @@
+/*
+  Simple DirectMedia Layer
+  Copyright (C) 1997-2013 Sam Lantinga 
+
+  This software is provided 'as-is', without any express or implied
+  warranty.  In no event will the authors be held liable for any damages
+  arising from the use of this software.
+
+  Permission is granted to anyone to use this software for any purpose,
+  including commercial applications, and to alter it and redistribute it
+  freely, subject to the following restrictions:
+
+  1. The origin of this software must not be misrepresented; you must not
+     claim that you wrote the original software. If you use this software
+     in a product, an acknowledgment in the product documentation would be
+     appreciated but is not required.
+  2. Altered source versions must be plainly marked as such, and must not be
+     misrepresented as being the original software.
+  3. This notice may not be removed or altered from any source distribution.
+*/
+#include "SDL_config.h"
+
+
+/* Default mappings we support
+
+   The easiest way to generate a new mapping is to start Steam in Big Picture
+   mode, configure your joystick and then look in config/config.vdf in your
+   Steam installation directory for the "SDL_GamepadBind" entry.
+ */
+static const char *s_ControllerMappings [] =
+{
+#ifdef SDL_JOYSTICK_DINPUT
+    "341a3608000000000000504944564944,Afterglow PS3 Controller,a:b1,b:b2,back:b8,dpdown:h0.4,dpleft:h0.8,dpright:h0.2,dpup:h0.1,guide:b12,leftshoulder:b4,leftstick:b10,lefttrigger:b6,leftx:a0,lefty:a1,rightshoulder:b5,rightstick:b11,righttrigger:b7,rightx:a2,righty:a3,start:b9,x:b0,y:b3,",
+    "ffff0000000000000000504944564944,GameStop Gamepad,a:b0,b:b1,back:b8,dpdown:h0.4,dpleft:h0.8,dpright:h0.2,dpup:h0.1,guide:,leftshoulder:b4,leftstick:b10,lefttrigger:b6,leftx:a0,lefty:a1,rightshoulder:b5,rightstick:b11,righttrigger:b7,rightx:a2,righty:a3,start:b9,x:b2,y:b3,",
+    "6d0416c2000000000000504944564944,Generic DirectInput Controller,a:b1,b:b2,back:b8,dpdown:h0.4,dpleft:h0.8,dpright:h0.2,dpup:h0.1,leftshoulder:b4,leftstick:b10,lefttrigger:b6,leftx:a0,lefty:a1,rightshoulder:b5,rightstick:b11,righttrigger:b7,rightx:a2,righty:a3,start:b9,x:b0,y:b3,",
+	"6d0419c2000000000000504944564944,Logitech F710 Gamepad,a:b1,b:b2,back:b8,dpdown:h0.4,dpleft:h0.8,dpright:h0.2,dpup:h0.1,leftshoulder:b4,leftstick:b10,lefttrigger:b6,leftx:a0,lefty:a1,rightshoulder:b5,rightstick:b11,righttrigger:b7,rightx:a2,righty:a3,start:b9,x:b0,y:b3,", /* Guide button doesn't seem to be sent in DInput mode. */
+    "88880803000000000000504944564944,PS3 Controller,a:b2,b:b1,back:b8,dpdown:h0.8,dpleft:h0.4,dpright:h0.2,dpup:h0.1,guide:b12,leftshoulder:b4,leftstick:b9,lefttrigger:b6,leftx:a0,lefty:a1,rightshoulder:b5,rightstick:b10,righttrigger:b7,rightx:a3,righty:a4,start:b11,x:b0,y:b3,",
+    "4c056802000000000000504944564944,PS3 Controller,a:b14,b:b13,back:b0,dpdown:b6,dpleft:b7,dpright:b5,dpup:b4,guide:b16,leftshoulder:b10,leftstick:b1,lefttrigger:b8,leftx:a0,lefty:a1,rightshoulder:b11,rightstick:b2,righttrigger:b9,rightx:a2,righty:a3,start:b3,x:b15,y:b12,",
+    "25090500000000000000504944564944,PS3 DualShock,a:b2,b:b1,back:b9,dpdown:h0.8,dpleft:h0.4,dpright:h0.2,dpup:h0.1,guide:,leftshoulder:b6,leftstick:b10,lefttrigger:b4,leftx:a0,lefty:a1,rightshoulder:b7,rightstick:b11,righttrigger:b5,rightx:a2,righty:a3,start:b8,x:b0,y:b3,",
+    "xinput,X360 Controller,a:b10,b:b11,back:b5,dpdown:b1,dpleft:b2,dpright:b3,dpup:b0,guide:b14,leftshoulder:b8,leftstick:b6,lefttrigger:a4,leftx:a0,lefty:a1,rightshoulder:b9,rightstick:b7,righttrigger:a5,rightx:a2,righty:a3,start:b4,x:b12,y:b13,",
+#elif defined(__MACOSX__)
+    "0500000047532047616d657061640000,GameStop Gamepad,a:b0,b:b1,back:b8,dpdown:h0.4,dpleft:h0.8,dpright:h0.2,dpup:h0.1,guide:,leftshoulder:b4,leftstick:b10,lefttrigger:b6,leftx:a0,lefty:a1,rightshoulder:b5,rightstick:b11,righttrigger:b7,rightx:a2,righty:a3,start:b9,x:b2,y:b3,",
+    "6d0400000000000016c2000000000000,Logitech F310 Gamepad (DInput),a:b1,b:b2,back:b8,dpdown:h0.4,dpleft:h0.8,dpright:h0.2,dpup:h0.1,leftshoulder:b4,leftstick:b10,lefttrigger:b6,leftx:a0,lefty:a1,rightshoulder:b5,rightstick:b11,righttrigger:b7,rightx:a2,righty:a3,start:b9,x:b0,y:b3,", /* Guide button doesn't seem to be sent in DInput mode. */
+    "6d0400000000000018c2000000000000,Logitech F510 Gamepad (DInput),a:b1,b:b2,back:b8,dpdown:h0.4,dpleft:h0.8,dpright:h0.2,dpup:h0.1,leftshoulder:b4,leftstick:b10,lefttrigger:b6,leftx:a0,lefty:a1,rightshoulder:b5,rightstick:b11,righttrigger:b7,rightx:a2,righty:a3,start:b9,x:b0,y:b3,",
+    "6d040000000000001fc2000000000000,Logitech F710 Gamepad (XInput),a:b0,b:b1,back:b9,dpdown:b12,dpleft:b13,dpright:b14,dpup:b11,guide:b10,leftshoulder:b4,leftstick:b6,lefttrigger:a2,leftx:a0,lefty:a1,rightshoulder:b5,rightstick:b7,righttrigger:a5,rightx:a3,righty:a4,start:b8,x:b2,y:b3,",
+    "6d0400000000000019c2000000000000,Logitech Wireless Gamepad (DInput),a:b1,b:b2,back:b8,dpdown:h0.4,dpleft:h0.8,dpright:h0.2,dpup:h0.1,leftshoulder:b4,leftstick:b10,lefttrigger:b6,leftx:a0,lefty:a1,rightshoulder:b5,rightstick:b11,righttrigger:b7,rightx:a2,righty:a3,start:b9,x:b0,y:b3,", /* This includes F710 in DInput mode and the "Logitech Cordless RumblePad 2", at the very least. */
+    "4c050000000000006802000000000000,PS3 Controller,a:b14,b:b13,back:b0,dpdown:b6,dpleft:b7,dpright:b5,dpup:b4,guide:b16,leftshoulder:b10,leftstick:b1,lefttrigger:b8,leftx:a0,lefty:a1,rightshoulder:b11,rightstick:b2,righttrigger:b9,rightx:a2,righty:a3,start:b3,x:b15,y:b12,",
+    "5e040000000000008e02000000000000,X360 Controller,a:b0,b:b1,back:b9,dpdown:b12,dpleft:b13,dpright:b14,dpup:b11,guide:b10,leftshoulder:b4,leftstick:b6,lefttrigger:a2,leftx:a0,lefty:a1,rightshoulder:b5,rightstick:b7,righttrigger:a5,rightx:a3,righty:a4,start:b8,x:b2,y:b3,",
+#elif defined(__LINUX__)
+    "0500000047532047616d657061640000,GameStop Gamepad,a:b0,b:b1,back:b8,dpdown:h0.4,dpleft:h0.8,dpright:h0.2,dpup:h0.1,guide:,leftshoulder:b4,leftstick:b10,lefttrigger:b6,leftx:a0,lefty:a1,rightshoulder:b5,rightstick:b11,righttrigger:b7,rightx:a2,righty:a3,start:b9,x:b2,y:b3,",
+    "03000000ba2200002010000001010000,Jess Technology USB Game Controller,a:b2,b:b1,back:b8,dpdown:h0.4,dpleft:h0.8,dpright:h0.2,dpup:h0.1,guide:,leftshoulder:b4,lefttrigger:b6,leftx:a0,lefty:a1,rightshoulder:b5,righttrigger:b7,rightx:a3,righty:a2,start:b9,x:b3,y:b0,",
+    "030000006d04000019c2000010010000,Logitech Cordless RumblePad 2,a:b1,b:b2,back:b8,dpdown:h0.4,dpleft:h0.8,dpright:h0.2,dpup:h0.1,guide:,leftshoulder:b4,leftstick:b10,lefttrigger:b6,leftx:a0,lefty:a1,rightshoulder:b5,rightstick:b11,righttrigger:b7,rightx:a2,righty:a3,start:b9,x:b0,y:b3,",
+    "030000006d0400001dc2000014400000,Logitech F310 Gamepad (XInput),a:b0,b:b1,back:b6,dpdown:h0.4,dpleft:h0.8,dpright:h0.2,dpup:h0.1,guide:b8,leftshoulder:b4,leftstick:b9,lefttrigger:a2,leftx:a0,lefty:a1,rightshoulder:b5,rightstick:b10,righttrigger:a5,rightx:a3,righty:a4,start:b7,x:b2,y:b3,",
+    "030000006d0400001ec2000020200000,Logitech F510 Gamepad (XInput),a:b0,b:b1,back:b6,dpdown:h0.4,dpleft:h0.8,dpright:h0.2,dpup:h0.1,guide:b8,leftshoulder:b4,leftstick:b9,lefttrigger:a2,leftx:a0,lefty:a1,rightshoulder:b5,rightstick:b10,righttrigger:a5,rightx:a3,righty:a4,start:b7,x:b2,y:b3,",
+    "030000006d04000019c2000011010000,Logitech F710 Gamepad (DInput),a:b1,b:b2,back:b8,dpdown:h0.4,dpleft:h0.8,dpright:h0.2,dpup:h0.1,leftshoulder:b4,leftstick:b10,lefttrigger:b6,leftx:a0,lefty:a1,rightshoulder:b5,rightstick:b11,righttrigger:b7,rightx:a2,righty:a3,start:b9,x:b0,y:b3,", /* Guide button doesn't seem to be sent in DInput mode. */
+    "030000006d0400001fc2000005030000,Logitech F710 Gamepad (XInput),a:b0,b:b1,back:b6,dpdown:h0.4,dpleft:h0.8,dpright:h0.2,dpup:h0.1,guide:b8,leftshoulder:b4,leftstick:b9,lefttrigger:a2,leftx:a0,lefty:a1,rightshoulder:b5,rightstick:b10,righttrigger:a5,rightx:a3,righty:a4,start:b7,x:b2,y:b3,",
+    "030000004c0500006802000011010000,PS3 Controller,a:b14,b:b13,back:b0,dpdown:b6,dpleft:b7,dpright:b5,dpup:b4,guide:b16,leftshoulder:b10,leftstick:b1,lefttrigger:b8,leftx:a0,lefty:a1,rightshoulder:b11,rightstick:b2,righttrigger:b9,rightx:a2,righty:a3,start:b3,x:b15,y:b12,",
+    "030000005e0400008e02000014010000,X360 Controller,a:b0,b:b1,back:b6,dpdown:h0.4,dpleft:h0.8,dpright:h0.2,dpup:h0.1,guide:b8,leftshoulder:b4,leftstick:b9,lefttrigger:a2,leftx:a0,lefty:a1,rightshoulder:b5,rightstick:b10,righttrigger:a5,rightx:a3,righty:a4,start:b7,x:b2,y:b3,",
+    "030000005e0400008e02000010010000,X360 Controller,a:b0,b:b1,back:b6,dpdown:h0.4,dpleft:h0.8,dpright:h0.2,dpup:h0.1,guide:b8,leftshoulder:b4,leftstick:b9,lefttrigger:a2,leftx:a0,lefty:a1,rightshoulder:b5,rightstick:b10,righttrigger:a5,rightx:a3,righty:a4,start:b7,x:b2,y:b3,",
+    "030000005e0400001907000000010000,X360 Wireless Controller,a:b0,b:b1,back:b6,dpdown:b14,dpleft:b11,dpright:b12,dpup:b13,guide:b8,leftshoulder:b4,leftstick:b9,lefttrigger:a2,leftx:a0,lefty:a1,rightshoulder:b5,rightstick:b10,righttrigger:a5,rightx:a3,righty:a4,start:b7,x:b2,y:b3,",
+#endif
+    NULL
+};
+
+/* vi: set ts=4 sw=4 expandtab: */
diff --git a/src/joystick/sort_controllers.py b/src/joystick/sort_controllers.py
new file mode 100755
index 000000000..344a42328
--- /dev/null
+++ b/src/joystick/sort_controllers.py
@@ -0,0 +1,61 @@
+#!/usr/bin/env python
+#
+# Script to sort the game controller database entries in SDL_gamecontroller.c
+
+import re
+
+
+filename = "SDL_gamecontrollerdb.h"
+input = open(filename)
+output = open(filename + ".new", "w")
+parsing_controllers = False
+controllers = []
+controller_guids = {}
+split_pattern = re.compile(r'([^"]*")([^,]*,)([^,]*,)([^"]*)(".*)')
+
+def save_controller(line):
+    global controllers
+    match = split_pattern.match(line)
+    entry = [ match.group(1), match.group(2), match.group(3) ]
+    bindings = sorted(match.group(4).split(","))
+    if (bindings[0] == ""):
+        bindings.pop(0)
+    entry.extend(",".join(bindings) + ",")
+    entry.append(match.group(5))
+    controllers.append(entry)
+
+def write_controllers():
+    global controllers
+    global controller_guids
+    for entry in sorted(controllers, key=lambda entry: entry[2]):
+        line = "".join(entry) + "\n"
+        if (entry[1] in controller_guids):
+            print "Warning: entry '%s' is duplicate of entry '%s'" % (entry[2], controller_guids[entry[1]][2])
+        controller_guids[entry[1]] = entry
+
+        output.write(line)
+    controllers = []
+    controller_guids = {}
+
+for line in input:
+    if ( parsing_controllers ):
+        if (line.startswith("{")):
+            output.write(line)
+        elif (line.startswith("#endif")):
+            parsing_controllers = False
+            write_controllers()
+            output.write(line)
+        elif (line.startswith("#")):
+            print "Parsing " + line.strip()
+            write_controllers()
+            output.write(line)
+        else:
+            save_controller(line)
+    else:
+        if (line.startswith("static const char *s_ControllerMappings")):
+            parsing_controllers = True
+
+        output.write(line)
+
+output.close()
+print "Finished writing %s.new" % filename

From 3d9b82d9f87ad8f6a14675a0ed2ca644f47df45c Mon Sep 17 00:00:00 2001
From: "Ryan C. Gordon" 
Date: Fri, 12 Jul 2013 23:30:26 -0400
Subject: [PATCH 335/542] Implement SDL_GL_SHARE_WITH_CURRENT_CONTEXT for iOS.

Fixes Bugzilla #1947.
---
 src/video/uikit/SDL_uikitopengles.m   | 8 +++++++-
 src/video/uikit/SDL_uikitopenglview.h | 3 ++-
 src/video/uikit/SDL_uikitopenglview.m | 5 +++--
 3 files changed, 12 insertions(+), 4 deletions(-)

diff --git a/src/video/uikit/SDL_uikitopengles.m b/src/video/uikit/SDL_uikitopengles.m
index b27b3ca93..0401ff8e5 100644
--- a/src/video/uikit/SDL_uikitopengles.m
+++ b/src/video/uikit/SDL_uikitopengles.m
@@ -104,6 +104,11 @@ SDL_GLContext UIKit_GL_CreateContext(_THIS, SDL_Window * window)
     SDL_DisplayData *displaydata = display->driverdata;
     SDL_DisplayModeData *displaymodedata = display->current_mode.driverdata;
     UIWindow *uiwindow = data->uiwindow;
+    EAGLSharegroup *share_group = nil;
+
+    if (_this->gl_config.share_with_current_context) {
+        share_group = [((SDL_uikitopenglview *) SDL_GL_GetCurrentContext() sharegroup];
+    }
 
     /* construct our view, passing in SDL's OpenGL configuration data */
     CGRect frame;
@@ -121,7 +126,8 @@ SDL_GLContext UIKit_GL_CreateContext(_THIS, SDL_Window * window)
                                     aBits: _this->gl_config.alpha_size
                                     depthBits: _this->gl_config.depth_size
                                     stencilBits: _this->gl_config.stencil_size
-                                    majorVersion: _this->gl_config.major_version];
+                                    majorVersion: _this->gl_config.major_version
+                                    shareGroup: share_group];
     if (!view) {
         return NULL;
     }
diff --git a/src/video/uikit/SDL_uikitopenglview.h b/src/video/uikit/SDL_uikitopenglview.h
index b29cca2c5..344ad6a5e 100644
--- a/src/video/uikit/SDL_uikitopenglview.h
+++ b/src/video/uikit/SDL_uikitopenglview.h
@@ -67,7 +67,8 @@
     aBits:(int)aBits
     depthBits:(int)depthBits
     stencilBits:(int)stencilBits
-    majorVersion:(int)majorVersion;
+    majorVersion:(int)majorVersion
+    shareGroup:(EAGLSharegroup*)shareGroup;
 
 - (void)updateFrame;
 
diff --git a/src/video/uikit/SDL_uikitopenglview.m b/src/video/uikit/SDL_uikitopenglview.m
index 6ca5162d9..9f3dc136a 100644
--- a/src/video/uikit/SDL_uikitopenglview.m
+++ b/src/video/uikit/SDL_uikitopenglview.m
@@ -47,6 +47,7 @@
       depthBits:(int)depthBits
       stencilBits:(int)stencilBits
       majorVersion:(int)majorVersion
+      shareGroup:(EAGLSharegroup*)shareGroup
 {
     depthBufferFormat = 0;
 
@@ -71,9 +72,9 @@
                                         [NSNumber numberWithBool: retained], kEAGLDrawablePropertyRetainedBacking, colorFormat, kEAGLDrawablePropertyColorFormat, nil];
 
         if (majorVersion > 1) {
-            context = [[EAGLContext alloc] initWithAPI: kEAGLRenderingAPIOpenGLES2];
+            context = [[EAGLContext alloc] initWithAPI:kEAGLRenderingAPIOpenGLES2 sharegroup:shareGroup];
         } else {
-            context = [[EAGLContext alloc] initWithAPI: kEAGLRenderingAPIOpenGLES1];
+            context = [[EAGLContext alloc] initWithAPI:kEAGLRenderingAPIOpenGLES1 sharegroup:shareGroup];
         }
         if (!context || ![EAGLContext setCurrentContext:context]) {
             [self release];

From ae7a409acf8eef1b6cef886768d96fbb102c9377 Mon Sep 17 00:00:00 2001
From: "Ryan C. Gordon" 
Date: Fri, 12 Jul 2013 23:32:54 -0400
Subject: [PATCH 336/542] Patched to compile.

---
 src/video/uikit/SDL_uikitopengles.m | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/src/video/uikit/SDL_uikitopengles.m b/src/video/uikit/SDL_uikitopengles.m
index 0401ff8e5..8be0babbc 100644
--- a/src/video/uikit/SDL_uikitopengles.m
+++ b/src/video/uikit/SDL_uikitopengles.m
@@ -107,7 +107,7 @@ SDL_GLContext UIKit_GL_CreateContext(_THIS, SDL_Window * window)
     EAGLSharegroup *share_group = nil;
 
     if (_this->gl_config.share_with_current_context) {
-        share_group = [((SDL_uikitopenglview *) SDL_GL_GetCurrentContext() sharegroup];
+        share_group = [((SDL_uikitopenglview *) SDL_GL_GetCurrentContext()) sharegroup];
     }
 
     /* construct our view, passing in SDL's OpenGL configuration data */

From f8be9c4907402ce6bb8cd73fdc8a710f44da0c56 Mon Sep 17 00:00:00 2001
From: "Ryan C. Gordon" 
Date: Fri, 12 Jul 2013 23:38:44 -0400
Subject: [PATCH 337/542] Fixed iOS context sharing again.

I suck at Objective-C.
---
 src/video/uikit/SDL_uikitopengles.m | 3 ++-
 1 file changed, 2 insertions(+), 1 deletion(-)

diff --git a/src/video/uikit/SDL_uikitopengles.m b/src/video/uikit/SDL_uikitopengles.m
index 8be0babbc..d1cb20745 100644
--- a/src/video/uikit/SDL_uikitopengles.m
+++ b/src/video/uikit/SDL_uikitopengles.m
@@ -107,7 +107,8 @@ SDL_GLContext UIKit_GL_CreateContext(_THIS, SDL_Window * window)
     EAGLSharegroup *share_group = nil;
 
     if (_this->gl_config.share_with_current_context) {
-        share_group = [((SDL_uikitopenglview *) SDL_GL_GetCurrentContext()) sharegroup];
+        SDL_uikitopenglview *view = (SDL_uikitopenglview *) SDL_GL_GetCurrentContext();
+        share_group = [view.context sharegroup];
     }
 
     /* construct our view, passing in SDL's OpenGL configuration data */

From b2849474ac64f398a3fdb4b249aceadb67e62a70 Mon Sep 17 00:00:00 2001
From: "Ryan C. Gordon" 
Date: Sat, 13 Jul 2013 00:07:34 -0400
Subject: [PATCH 338/542] CMake project should enable pthreads for Mac OS X by
 default.

---
 CMakeLists.txt | 8 +++++++-
 1 file changed, 7 insertions(+), 1 deletion(-)

diff --git a/CMakeLists.txt b/CMakeLists.txt
index 25be443c4..38c139e47 100644
--- a/CMakeLists.txt
+++ b/CMakeLists.txt
@@ -104,6 +104,12 @@ else()
   set(UNIX_SYS OFF)
 endif(UNIX AND NOT APPLE)
 
+if(UNIX OR APPLE)
+  set(UNIX_OR_MAC_SYS ON)
+else()
+  set(UNIX_OR_MAC_SYS OFF)
+endif(UNIX OR APPLE)
+
 # Default option knobs
 if(APPLE OR ARCH_64)
   set(OPT_DEF_SSEMATH ON)
@@ -190,7 +196,7 @@ dep_option(FUSIONSOUND_SHARED  "Dynamically load fusionsound audio support" ON "
 set_option(VIDEO_DUMMY         "Use dummy video driver" ON)
 set_option(VIDEO_OPENGL        "Include OpenGL support" ON)
 set_option(VIDEO_OPENGLES      "Include OpenGL ES support" ON)
-set_option(PTHREADS            "Use POSIX threads for multi-threading" ${UNIX_SYS})
+set_option(PTHREADS            "Use POSIX threads for multi-threading" ${UNIX_OR_MAC_SYS})
 dep_option(PTHREADS_SEM        "Use pthread semaphores" ON "PTHREADS" OFF)
 set_option(SDL_DLOPEN          "Use dlopen for shared object loading" ON)
 set_option(OSS                 "Support the OSS audio API" ${UNIX_SYS})

From 7b6a3813691c4f9b71c83b5bbbf11872483b5824 Mon Sep 17 00:00:00 2001
From: "Ryan C. Gordon" 
Date: Sat, 13 Jul 2013 00:10:25 -0400
Subject: [PATCH 339/542] CMake project should install sdl2.m4.

Fixes Bugzilla #1809.
---
 CMakeLists.txt | 1 +
 1 file changed, 1 insertion(+)

diff --git a/CMakeLists.txt b/CMakeLists.txt
index 38c139e47..4e002778c 100644
--- a/CMakeLists.txt
+++ b/CMakeLists.txt
@@ -1184,4 +1184,5 @@ if(NOT WINDOWS OR CYGWIN)
   endif(FREEBSD)
   install(PROGRAMS ${SDL2_BINARY_DIR}/sdl2-config DESTINATION bin)
   # TODO: what about the .spec file? Is it only needed for RPM creation?
+  install(FILES "${SDL2_SOURCE_DIR}/sdl2.m4" DESTINATION "share/aclocal")
 endif(NOT WINDOWS OR CYGWIN)

From 7b620e00acc683ba054d3edb0d0f25a94a7fc5db Mon Sep 17 00:00:00 2001
From: Sam Lantinga 
Date: Fri, 12 Jul 2013 23:16:11 -0700
Subject: [PATCH 340/542] Updated supported iOS version.

---
 README-platforms.txt | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/README-platforms.txt b/README-platforms.txt
index 700664dc3..f30c45a8b 100644
--- a/README-platforms.txt
+++ b/README-platforms.txt
@@ -8,7 +8,7 @@ Officially supported platforms
 Windows XP/Vista/7/8
 Mac OS X 10.5+
 Linux 2.6+
-iOS 4.0.1+
+iOS 5.1.1+
 Android 2.3.3+
 
 Unofficially supported platforms

From 2468df6e5a7f687d2bd71d0444e031fa74320d6c Mon Sep 17 00:00:00 2001
From: Sam Lantinga 
Date: Fri, 12 Jul 2013 23:28:34 -0700
Subject: [PATCH 341/542] Don't set the current OpenGL window if the context
 creation fails.

---
 src/video/SDL_video.c | 11 ++++++-----
 1 file changed, 6 insertions(+), 5 deletions(-)

diff --git a/src/video/SDL_video.c b/src/video/SDL_video.c
index 40060237e..988d49c3f 100644
--- a/src/video/SDL_video.c
+++ b/src/video/SDL_video.c
@@ -2739,11 +2739,12 @@ SDL_GL_CreateContext(SDL_Window * window)
     ctx = _this->GL_CreateContext(_this, window);
 
     /* Creating a context is assumed to make it current in the SDL driver. */
-    _this->current_glwin = window;
-    _this->current_glctx = ctx;
-    SDL_TLSSet(_this->current_glwin_tls, window, NULL);
-    SDL_TLSSet(_this->current_glctx_tls, ctx, NULL);
-
+    if (ctx) {
+        _this->current_glwin = window;
+        _this->current_glctx = ctx;
+        SDL_TLSSet(_this->current_glwin_tls, window, NULL);
+        SDL_TLSSet(_this->current_glctx_tls, ctx, NULL);
+    }
     return ctx;
 }
 

From 228bafa134e74c2ce8a1afe207e623fcc80d5d49 Mon Sep 17 00:00:00 2001
From: Sam Lantinga 
Date: Fri, 12 Jul 2013 23:45:12 -0700
Subject: [PATCH 342/542] Fixed bug 1938 - Buffer overflows in the Windows IME
 code

norfanin

There are a few potential buffer overflows in the Windows IME code located in the SDL_windowskeyboard.c file. [1] They mainly happen because the code passes the number of bytes instead of the number of characters to the wide-character string functions wcslcpy and wcslcat. In another place, the code assumes that the composition cursor position can never go beyond the size of the composition string buffer.

Some of these overflows and overruns can occur with the Japanese IME on Vista and simplified Chinese IME on XP. I don't actually speak those languages and it's my first time using the IMEs, so I probably pushed them to the limit where nobody would still be compositing proper words. They don't cause any immediate access violation, although the possibility of trashing the SDL_VideoData structure is never good.

I've attached a patch that fixes those I found, but because I'm very new to the code it may be worthwhile if someone else also has a look over the code.

I'll go over the changes in my patch and explain what, why and how.

In the function IME_GetReadingString, there is a wcslcpy to copy the reading string from the IMC memory to the SDL reading string buffer. [2] This assumes that the length of the reading string never exceeds the SDL buffer size. I guess that is possible and I wasn't able to get a long reading string in my tests, but the patch adds a simple check anyway.

In the function IME_GetCompositionString, the first line calls ImmGetCompositionStringW to get the composition string. [3] The Microsoft documentation states that the fourth argument is for the destination buffer size in bytes (even with unicode) and the code correctly passes the value of sizeof. However, at the end of IME_GetCompositionString, the string is terminated by setting the element at index 'length' to 0. 'length' is calculated by dividing the number of bytes (those written by ImmGetCompositionStringW) by 2. If it managed to write 64 bytes, the code sets element 32 to 0, which would be the beginning of the reading string if the alignment places it there. My patch adds a subtraction to the fourth argument, essentially making it always pass 62 instead.

In the same function, the code assumes that the composition cursor position doesn't go beyond the buffer size. [4] My patch adds a simple range check in front of the indirection.

In the function IME_SendEditingEvent, the size for the wide-character string functions is passed in bytes instead of characters. [5] Oddly, the current code subtracts 'len' from the size in one function call. This results in truncation in certain situations as the third argument is the number of characters available in the destination buffer. If I'm understanding it correctly, this is supposed to copy x characters of the composition buffer, then concatenate the whole reading string buffer, and then the rest of the composition buffer (where x is the composition cursor position). I don't see how a truncation of the rest would be helpful here. Perhaps this is just an error? My patch removes the subtraction.

In the function UIElementSink_UpdateUIElement, bytes instead of characters is used again for a wcslcpy call. [6]
---
 src/video/windows/SDL_windowskeyboard.c | 19 +++++++++++--------
 1 file changed, 11 insertions(+), 8 deletions(-)

diff --git a/src/video/windows/SDL_windowskeyboard.c b/src/video/windows/SDL_windowskeyboard.c
index b9b342df0..de5848043 100644
--- a/src/video/windows/SDL_windowskeyboard.c
+++ b/src/video/windows/SDL_windowskeyboard.c
@@ -466,8 +466,10 @@ IME_GetReadingString(SDL_VideoData *videodata, HWND hwnd)
             s = (WCHAR *)(p + 1*4 + (16*2+2*4) + 5*4);
             break;
         }
-        if (s)
-            SDL_wcslcpy(videodata->ime_readingstring, s, len + 1);
+        if (s) {
+            size_t size = SDL_min((size_t)(len + 1), SDL_arraysize(videodata->ime_readingstring));
+            SDL_wcslcpy(videodata->ime_readingstring, s, size);
+        }
 
         videodata->ImmUnlockIMCC(lpimc->hPrivate);
         videodata->ImmUnlockIMC(himc);
@@ -673,13 +675,13 @@ IME_ClearComposition(SDL_VideoData *videodata)
 static void
 IME_GetCompositionString(SDL_VideoData *videodata, HIMC himc, DWORD string)
 {
-    LONG length = ImmGetCompositionStringW(himc, string, videodata->ime_composition, sizeof(videodata->ime_composition));
+    LONG length = ImmGetCompositionStringW(himc, string, videodata->ime_composition, sizeof(videodata->ime_composition) - sizeof(videodata->ime_composition[0]));
     if (length < 0)
         length = 0;
 
     length /= sizeof(videodata->ime_composition[0]);
     videodata->ime_cursor = LOWORD(ImmGetCompositionStringW(himc, GCS_CURSORPOS, 0, 0));
-    if (videodata->ime_composition[videodata->ime_cursor] == 0x3000) {
+    if (videodata->ime_cursor < SDL_arraysize(videodata->ime_composition) && videodata->ime_composition[videodata->ime_cursor] == 0x3000) {
         int i;
         for (i = videodata->ime_cursor + 1; i < length; ++i)
             videodata->ime_composition[i - 1] = videodata->ime_composition[i];
@@ -707,15 +709,16 @@ IME_SendEditingEvent(SDL_VideoData *videodata)
 {
     char *s = 0;
     WCHAR buffer[SDL_TEXTEDITINGEVENT_TEXT_SIZE];
+    const size_t size = SDL_arraysize(buffer);
     buffer[0] = 0;
     if (videodata->ime_readingstring[0]) {
         size_t len = SDL_min(SDL_wcslen(videodata->ime_composition), (size_t)videodata->ime_cursor);
         SDL_wcslcpy(buffer, videodata->ime_composition, len + 1);
-        SDL_wcslcat(buffer, videodata->ime_readingstring, sizeof(buffer));
-        SDL_wcslcat(buffer, &videodata->ime_composition[len], sizeof(buffer) - len);
+        SDL_wcslcat(buffer, videodata->ime_readingstring, size);
+        SDL_wcslcat(buffer, &videodata->ime_composition[len], size);
     }
     else {
-        SDL_wcslcpy(buffer, videodata->ime_composition, sizeof(videodata->ime_composition));
+        SDL_wcslcpy(buffer, videodata->ime_composition, size);
     }
     s = WIN_StringToUTF8(buffer);
     SDL_SendEditingText(s, videodata->ime_cursor + SDL_wcslen(videodata->ime_readingstring), 0);
@@ -1052,7 +1055,7 @@ STDMETHODIMP UIElementSink_UpdateUIElement(TSFSink *sink, DWORD dwUIElementId)
         BSTR bstr;
         if (SUCCEEDED(preading->lpVtbl->GetString(preading, &bstr)) && bstr) {
             WCHAR *s = (WCHAR *)bstr;
-            SDL_wcslcpy(videodata->ime_readingstring, s, sizeof(videodata->ime_readingstring));
+            SDL_wcslcpy(videodata->ime_readingstring, s, SDL_arraysize(videodata->ime_readingstring));
             IME_SendEditingEvent(videodata);
             SysFreeString(bstr);
         }

From 9102ff84ca86213521ccca907accc0ae02378e00 Mon Sep 17 00:00:00 2001
From: David Gow 
Date: Sat, 13 Jul 2013 11:06:34 +0800
Subject: [PATCH 343/542] Only get desktop modes from Xinerama if we can't use
 XRandR (fix #1956)

---
 src/video/x11/SDL_x11modes.c | 4 ++--
 1 file changed, 2 insertions(+), 2 deletions(-)

diff --git a/src/video/x11/SDL_x11modes.c b/src/video/x11/SDL_x11modes.c
index ea2cb46ad..c2103467d 100644
--- a/src/video/x11/SDL_x11modes.c
+++ b/src/video/x11/SDL_x11modes.c
@@ -704,9 +704,9 @@ X11_GetDisplayModes(_THIS, SDL_VideoDisplay * sdl_display)
             mode.driverdata = modedata;
             SDL_AddDisplayMode(sdl_display, &mode);
         }
-        else
+        else if (!data->use_xrandr)
         {
-            /* Add the current mode of each monitor otherwise */
+            /* Add the current mode of each monitor otherwise if we can't get them from xrandr */
             mode.w = data->xinerama_info.width;
             mode.h = data->xinerama_info.height;
             mode.refresh_rate = 0;

From 6956070880d463997b40d20fc23923000f697ccf Mon Sep 17 00:00:00 2001
From: Sam Lantinga 
Date: Sat, 13 Jul 2013 03:13:41 -0700
Subject: [PATCH 344/542] Added a hint to control the Windows timer resolution:
 SDL_HINT_TIMER_RESOLUTION Added an API to watch hint changes:
 SDL_AddHintCallback(), SDL_DelHintCallback() You can now dynamically set the
 joystick background event hint.

---
 Xcode-iOS/SDL/SDL.xcodeproj/project.pbxproj |   4 -
 include/SDL_hints.h                         |  45 ++++++-
 src/SDL_hints.c                             | 137 ++++++++++++++++----
 src/SDL_hints_c.h                           |  34 -----
 src/joystick/SDL_joystick.c                 |  19 ++-
 src/timer/windows/SDL_systimer.c            |  50 +++++--
 src/video/uikit/SDL_uikitappdelegate.m      |  12 +-
 7 files changed, 212 insertions(+), 89 deletions(-)
 delete mode 100644 src/SDL_hints_c.h

diff --git a/Xcode-iOS/SDL/SDL.xcodeproj/project.pbxproj b/Xcode-iOS/SDL/SDL.xcodeproj/project.pbxproj
index bdad57c6a..08109d084 100755
--- a/Xcode-iOS/SDL/SDL.xcodeproj/project.pbxproj
+++ b/Xcode-iOS/SDL/SDL.xcodeproj/project.pbxproj
@@ -67,7 +67,6 @@
 		04F7808512FB753F00FC43C0 /* SDL_nullframebuffer.c in Sources */ = {isa = PBXBuildFile; fileRef = 04F7808312FB753F00FC43C0 /* SDL_nullframebuffer.c */; };
 		04FFAB8B12E23B8D00BA343D /* SDL_atomic.c in Sources */ = {isa = PBXBuildFile; fileRef = 04FFAB8912E23B8D00BA343D /* SDL_atomic.c */; };
 		04FFAB8C12E23B8D00BA343D /* SDL_spinlock.c in Sources */ = {isa = PBXBuildFile; fileRef = 04FFAB8A12E23B8D00BA343D /* SDL_spinlock.c */; };
-		22C905CD13A22646003FE4E4 /* SDL_hints_c.h in Headers */ = {isa = PBXBuildFile; fileRef = 22C905CC13A22646003FE4E4 /* SDL_hints_c.h */; };
 		56EA86FB13E9EC2B002E47EB /* SDL_coreaudio.c in Sources */ = {isa = PBXBuildFile; fileRef = 56EA86F913E9EC2B002E47EB /* SDL_coreaudio.c */; };
 		56EA86FC13E9EC2B002E47EB /* SDL_coreaudio.h in Headers */ = {isa = PBXBuildFile; fileRef = 56EA86FA13E9EC2B002E47EB /* SDL_coreaudio.h */; };
 		56ED04E1118A8EE200A56AA6 /* SDL_power.c in Sources */ = {isa = PBXBuildFile; fileRef = 56ED04E0118A8EE200A56AA6 /* SDL_power.c */; };
@@ -260,7 +259,6 @@
 		04F7808312FB753F00FC43C0 /* SDL_nullframebuffer.c */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.c; path = SDL_nullframebuffer.c; sourceTree = ""; };
 		04FFAB8912E23B8D00BA343D /* SDL_atomic.c */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.c; path = SDL_atomic.c; sourceTree = ""; };
 		04FFAB8A12E23B8D00BA343D /* SDL_spinlock.c */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.c; path = SDL_spinlock.c; sourceTree = ""; };
-		22C905CC13A22646003FE4E4 /* SDL_hints_c.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; name = SDL_hints_c.h; path = ../../src/SDL_hints_c.h; sourceTree = ""; };
 		56EA86F913E9EC2B002E47EB /* SDL_coreaudio.c */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.c; name = SDL_coreaudio.c; path = coreaudio/SDL_coreaudio.c; sourceTree = ""; };
 		56EA86FA13E9EC2B002E47EB /* SDL_coreaudio.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; name = SDL_coreaudio.h; path = coreaudio/SDL_coreaudio.h; sourceTree = ""; };
 		56ED04E0118A8EE200A56AA6 /* SDL_power.c */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.c; name = SDL_power.c; path = ../../src/power/SDL_power.c; sourceTree = SOURCE_ROOT; };
@@ -747,7 +745,6 @@
 				FD99B9D60DD52EDC00FB1D6B /* SDL_fatal.c */,
 				FD99B9D70DD52EDC00FB1D6B /* SDL_fatal.h */,
 				0442EC5412FE1C3F004C9285 /* SDL_hints.c */,
-				22C905CC13A22646003FE4E4 /* SDL_hints_c.h */,
 				04BAC09B1300C1290055DE28 /* SDL_log.c */,
 				FD99B9D80DD52EDC00FB1D6B /* SDL.c */,
 			);
@@ -967,7 +964,6 @@
 				0442EC5012FE1C1E004C9285 /* SDL_render_sw_c.h in Headers */,
 				0402A85A12FE70C600CECEE3 /* SDL_shaders_gles2.h in Headers */,
 				04BAC09C1300C1290055DE28 /* SDL_assert_c.h in Headers */,
-				22C905CD13A22646003FE4E4 /* SDL_hints_c.h in Headers */,
 				56EA86FC13E9EC2B002E47EB /* SDL_coreaudio.h in Headers */,
 				93CB792313FC5E5200BD3E05 /* SDL_uikitviewcontroller.h in Headers */,
 				AA628ADC159369E3005138DD /* SDL_rotate.h in Headers */,
diff --git a/include/SDL_hints.h b/include/SDL_hints.h
index ac6bf4cff..f27769953 100644
--- a/include/SDL_hints.h
+++ b/include/SDL_hints.h
@@ -218,13 +218,13 @@ extern "C" {
 /**
  *  \brief  A variable that lets you enable joystick (and gamecontroller) events even when your app is in the background.
  *
- * The default value is "0".
- *
  *  The variable can be set to the following values:
  *    "0"       - Disable joystick & gamecontroller input events when the
  *                application is in the background.
  *    "1"       - Enable joystick & gamecontroller input events when the
  *                application is in the backgroumd.
+ *
+ *  The default value is "0".  This hint may be set at any time.
  */
 #define SDL_HINT_JOYSTICK_ALLOW_BACKGROUND_EVENTS "SDL_JOYSTICK_ALLOW_BACKGROUND_EVENTS"
 
@@ -240,6 +240,23 @@ extern "C" {
 #define SDL_HINT_ALLOW_TOPMOST "SDL_ALLOW_TOPMOST"
 
 
+/**
+ *  \brief A variable that controls the timer resolution, in milliseconds.
+ *
+ *  The higher resolution the timer, the more frequently the CPU services
+ *  timer interrupts, and the more precise delays are, but this takes up
+ *  power and CPU time.  This hint is only used on Windows 7 and earlier.
+ *
+ *  See this blog post for more information:
+ *  http://randomascii.wordpress.com/2013/07/08/windows-timer-resolution-megawatts-wasted/
+ *
+ *  If this variable is set to "0", the system timer resolution is not set.
+ *
+ *  The default value is "1". This hint may be set at any time.
+ */
+#define SDL_HINT_TIMER_RESOLUTION "SDL_TIMER_RESOLUTION"
+
+
 
 /**
  *  \brief  An enumeration of hint priorities
@@ -273,7 +290,6 @@ extern DECLSPEC SDL_bool SDLCALL SDL_SetHintWithPriority(const char *name,
 extern DECLSPEC SDL_bool SDLCALL SDL_SetHint(const char *name,
                                              const char *value);
 
-
 /**
  *  \brief Get a hint
  *
@@ -281,6 +297,29 @@ extern DECLSPEC SDL_bool SDLCALL SDL_SetHint(const char *name,
  */
 extern DECLSPEC const char * SDLCALL SDL_GetHint(const char *name);
 
+/**
+ *  \brief Add a function to watch a particular hint
+ *
+ *  \param name The hint to watch
+ *  \param callback The function to call when the hint value changes
+ *  \param userdata A pointer to pass to the callback function
+ */
+typedef void (*SDL_HintCallback)(void *userdata, const char *name, const char *oldValue, const char *newValue);
+extern DECLSPEC void SDLCALL SDL_AddHintCallback(const char *name,
+                                                 SDL_HintCallback callback,
+                                                 void *userdata);
+
+/**
+ *  \brief Remove a function watching a particular hint
+ *
+ *  \param name The hint being watched
+ *  \param callback The function being called when the hint value changes
+ *  \param userdata A pointer being passed to the callback function
+ */
+extern DECLSPEC void SDLCALL SDL_DelHintCallback(const char *name,
+                                                 SDL_HintCallback callback,
+                                                 void *userdata);
+
 /**
  *  \brief  Clear all hints
  *
diff --git a/src/SDL_hints.c b/src/SDL_hints.c
index bd9404d46..b00e961cc 100644
--- a/src/SDL_hints.c
+++ b/src/SDL_hints.c
@@ -21,43 +21,35 @@
 #include "SDL_config.h"
 
 #include "SDL_hints.h"
-#include "SDL_hints_c.h"
+#include "SDL_error.h"
 
 
 /* Assuming there aren't many hints set and they aren't being queried in
-   critical performance paths, we'll just use a linked list here.
+   critical performance paths, we'll just use linked lists here.
  */
+typedef struct SDL_HintWatch {
+    SDL_HintCallback callback;
+    void *userdata;
+    struct SDL_HintWatch *next;
+} SDL_HintWatch;
+
 typedef struct SDL_Hint {
     char *name;
     char *value;
     SDL_HintPriority priority;
-    SDL_HintChangedCb callback;
+    SDL_HintWatch *callbacks;
     struct SDL_Hint *next;
 } SDL_Hint;
 
 static SDL_Hint *SDL_hints;
 
-SDL_bool
-SDL_RegisterHintChangedCb(const char *name, SDL_HintChangedCb hintCb)
-{
-    SDL_Hint *hint;
-
-    for (hint = SDL_hints; hint; hint = hint->next) {
-        if (SDL_strcmp(name, hint->name) == 0) {
-            hint->callback = hintCb;
-            return SDL_TRUE;
-        }
-    }
-
-    return SDL_FALSE;
-}
-
 SDL_bool
 SDL_SetHintWithPriority(const char *name, const char *value,
                         SDL_HintPriority priority)
 {
     const char *env;
     SDL_Hint *hint;
+    SDL_HintWatch *entry;
 
     if (!name || !value) {
         return SDL_FALSE;
@@ -73,12 +65,21 @@ SDL_SetHintWithPriority(const char *name, const char *value,
             if (priority < hint->priority) {
                 return SDL_FALSE;
             }
-            if (SDL_strcmp(hint->value, value) != 0) {
-                if (hint->callback != NULL) {
-                    (*hint->callback)(name, hint->value, value);
+            if (!hint->value || !value || SDL_strcmp(hint->value, value) != 0) {
+                for (entry = hint->callbacks; entry; ) {
+                    /* Save the next entry in case this one is deleted */
+                    SDL_HintWatch *next = entry->next;
+                    entry->callback(entry->userdata, name, hint->value, value);
+                    entry = next;
+                }
+                if (hint->value) {
+                    SDL_free(hint->value);
+                }
+                if (value) {
+                    hint->value = SDL_strdup(value);
+                } else {
+                    hint->value = NULL;
                 }
-                SDL_free(hint->value);
-                hint->value = SDL_strdup(value);
             }
             hint->priority = priority;
             return SDL_TRUE;
@@ -91,9 +92,9 @@ SDL_SetHintWithPriority(const char *name, const char *value,
         return SDL_FALSE;
     }
     hint->name = SDL_strdup(name);
-    hint->value = SDL_strdup(value);
+    hint->value = value ? SDL_strdup(value) : NULL;
     hint->priority = priority;
-    hint->callback = NULL;
+    hint->callbacks = NULL;
     hint->next = SDL_hints;
     SDL_hints = hint;
     return SDL_TRUE;
@@ -123,16 +124,100 @@ SDL_GetHint(const char *name)
     return env;
 }
 
+void
+SDL_AddHintCallback(const char *name, SDL_HintCallback callback, void *userdata)
+{
+    SDL_Hint *hint;
+    SDL_HintWatch *entry;
+    const char *value;
+
+    if (!name || !*name) {
+        SDL_InvalidParamError("name");
+        return;
+    }
+    if (!callback) {
+        SDL_InvalidParamError("callback");
+        return;
+    }
+
+    SDL_DelHintCallback(name, callback, userdata);
+
+    entry = (SDL_HintWatch *)SDL_malloc(sizeof(*entry));
+    entry->callback = callback;
+    entry->userdata = userdata;
+
+    for (hint = SDL_hints; hint; hint = hint->next) {
+        if (SDL_strcmp(name, hint->name) == 0) {
+            break;
+        }
+    }
+    if (!hint) {
+        /* Need to add a hint entry for this watcher */
+        hint = (SDL_Hint *)SDL_malloc(sizeof(*hint));
+        if (!hint) {
+            return;
+        }
+        hint->name = SDL_strdup(name);
+        hint->value = NULL;
+        hint->priority = SDL_HINT_DEFAULT;
+        hint->callbacks = NULL;
+        hint->next = SDL_hints;
+        SDL_hints = hint;
+    }
+
+    /* Add it to the callbacks for this hint */
+    entry->next = hint->callbacks;
+    hint->callbacks = entry;
+
+    /* Now call it with the current value */
+    value = SDL_GetHint(name);
+    callback(userdata, name, value, value);
+}
+
+void
+SDL_DelHintCallback(const char *name, SDL_HintCallback callback, void *userdata)
+{
+    SDL_Hint *hint;
+    SDL_HintWatch *entry, *prev;
+
+    for (hint = SDL_hints; hint; hint = hint->next) {
+        if (SDL_strcmp(name, hint->name) == 0) {
+            prev = NULL;
+            for (entry = hint->callbacks; entry; entry = entry->next) {
+                if (callback == entry->callback && userdata == entry->userdata) {
+                    if (prev) {
+                        prev->next = entry->next;
+                    } else {
+                        hint->callbacks = entry->next;
+                    }
+                    SDL_free(entry);
+                    break;
+                }
+                prev = entry;
+            }
+            return;
+        }
+    }
+}
+
 void SDL_ClearHints(void)
 {
     SDL_Hint *hint;
+    SDL_HintWatch *entry;
 
     while (SDL_hints) {
         hint = SDL_hints;
         SDL_hints = hint->next;
 
         SDL_free(hint->name);
-        SDL_free(hint->value);
+        if (hint->value) {
+            SDL_free(hint->value);
+        }
+        for (entry = hint->callbacks; entry; ) {
+            SDL_HintWatch *freeable = entry;
+            entry = entry->next;
+            SDL_free(freeable);
+        }
         SDL_free(hint);
     }
 }
diff --git a/src/SDL_hints_c.h b/src/SDL_hints_c.h
deleted file mode 100644
index 232e26384..000000000
--- a/src/SDL_hints_c.h
+++ /dev/null
@@ -1,34 +0,0 @@
-/*
- Simple DirectMedia Layer
- Copyright (C) 1997-2013 Sam Lantinga 
-
- This software is provided 'as-is', without any express or implied
- warranty.  In no event will the authors be held liable for any damages
- arising from the use of this software.
-
- Permission is granted to anyone to use this software for any purpose,
- including commercial applications, and to alter it and redistribute it
- freely, subject to the following restrictions:
-
- 1. The origin of this software must not be misrepresented; you must not
- claim that you wrote the original software. If you use this software
- in a product, an acknowledgment in the product documentation would be
- appreciated but is not required.
- 2. Altered source versions must be plainly marked as such, and must not be
- misrepresented as being the original software.
- 3. This notice may not be removed or altered from any source distribution.
- */
-
-#ifndef _SDL_hints_c_h
-#define _SDL_hints_c_h
-
-/**
- *  \brief  A callback function that is optionally called when a hint changes
- */
-typedef void (*SDL_HintChangedCb)(const char *name, const char *oldValue, const char *newValue);
-
-extern SDL_bool SDL_RegisterHintChangedCb(const char *name, SDL_HintChangedCb hintCb);
-
-#endif /* _SDL_hints_c_h */
-
-/* vi: set ts=4 sw=4 expandtab: */
diff --git a/src/joystick/SDL_joystick.c b/src/joystick/SDL_joystick.c
index 5380acf80..d2eeb6ab6 100644
--- a/src/joystick/SDL_joystick.c
+++ b/src/joystick/SDL_joystick.c
@@ -36,17 +36,24 @@ static SDL_bool SDL_joystick_allows_background_events = SDL_FALSE;
 static SDL_Joystick *SDL_joysticks = NULL;
 static SDL_Joystick *SDL_updating_joystick = NULL;
 
+static void
+SDL_JoystickAllowBackgroundEventsChanged(void *userdata, const char *name, const char *oldValue, const char *hint)
+{
+    if (hint && *hint == '1') {
+        SDL_joystick_allows_background_events = SDL_TRUE;
+    } else {
+        SDL_joystick_allows_background_events = SDL_FALSE;
+    }
+}
+
 int
 SDL_JoystickInit(void)
 {
-    const char *hint;
     int status;
 	
-    /* Check to see if we should allow joystick events while in the background */
-    hint = SDL_GetHint(SDL_HINT_JOYSTICK_ALLOW_BACKGROUND_EVENTS);
-    if (hint && *hint == '1') {
-        SDL_joystick_allows_background_events = SDL_TRUE;
-    }
+    /* See if we should allow joystick events while in the background */
+    SDL_AddHintCallback(SDL_HINT_JOYSTICK_ALLOW_BACKGROUND_EVENTS,
+                        SDL_JoystickAllowBackgroundEventsChanged, NULL);
 
 #if !SDL_EVENTS_DISABLED
     if (SDL_InitSubSystem(SDL_INIT_EVENTS) < 0) {
diff --git a/src/timer/windows/SDL_systimer.c b/src/timer/windows/SDL_systimer.c
index 33097634e..ce6bd7a70 100644
--- a/src/timer/windows/SDL_systimer.c
+++ b/src/timer/windows/SDL_systimer.c
@@ -26,8 +26,8 @@
 #include 
 
 #include "SDL_timer.h"
+#include "SDL_hints.h"
 
-#define TIME_WRAP_VALUE (~(DWORD)0)
 
 /* The first (low-resolution) ticks value of the application */
 static DWORD start;
@@ -41,6 +41,40 @@ static LARGE_INTEGER hires_start_ticks;
 static LARGE_INTEGER hires_ticks_per_second;
 #endif
 
+static void
+timeSetPeriod(UINT uPeriod)
+{
+    static UINT timer_period = 0;
+
+    if (uPeriod != timer_period) {
+        if (timer_period) {
+            timeEndPeriod(timer_period);
+        }
+
+        timer_period = uPeriod;
+
+        if (timer_period) {
+            timeBeginPeriod(timer_period);
+        }
+    }
+}
+
+static void
+SDL_TimerResolutionChanged(void *userdata, const char *name, const char *oldValue, const char *hint)
+{
+    UINT uPeriod;
+
+    /* Unless the hint says otherwise, let's have good sleep precision */
+    if (hint && *hint) {
+        uPeriod = SDL_atoi(hint);
+    } else {
+        uPeriod = 1;
+    }
+    if (uPeriod || oldValue != hint) {
+        timeSetPeriod(uPeriod);
+    }
+}
+
 void
 SDL_StartTicks(void)
 {
@@ -56,16 +90,19 @@ SDL_StartTicks(void)
         QueryPerformanceCounter(&hires_start_ticks);
     } else {
         hires_timer_available = FALSE;
-        timeBeginPeriod(1);     /* use 1 ms timer precision */
+        timeSetPeriod(1);     /* use 1 ms timer precision */
         start = timeGetTime();
     }
 #endif
+
+    SDL_AddHintCallback(SDL_HINT_TIMER_RESOLUTION,
+                        SDL_TimerResolutionChanged, NULL);
 }
 
 Uint32
 SDL_GetTicks(void)
 {
-    DWORD now, ticks;
+    DWORD now;
 #ifndef USE_GETTICKCOUNT
     LARGE_INTEGER hires_now;
 #endif
@@ -86,12 +123,7 @@ SDL_GetTicks(void)
     }
 #endif
 
-    if (now < start) {
-        ticks = (TIME_WRAP_VALUE - start) + now;
-    } else {
-        ticks = (now - start);
-    }
-    return (ticks);
+    return (now - start);
 }
 
 Uint64
diff --git a/src/video/uikit/SDL_uikitappdelegate.m b/src/video/uikit/SDL_uikitappdelegate.m
index d37a09124..4a3232005 100644
--- a/src/video/uikit/SDL_uikitappdelegate.m
+++ b/src/video/uikit/SDL_uikitappdelegate.m
@@ -25,7 +25,6 @@
 #include "../SDL_sysvideo.h"
 #include "SDL_assert.h"
 #include "SDL_hints.h"
-#include "../../SDL_hints_c.h"
 #include "SDL_system.h"
 #include "SDL_main.h"
 
@@ -69,11 +68,10 @@ int main(int argc, char **argv)
     return exit_status;
 }
 
-static void SDL_IdleTimerDisabledChanged(const char *name, const char *oldValue, const char *newValue)
+static void
+SDL_IdleTimerDisabledChanged(void *userdata, const char *name, const char *oldValue, const char *hint)
 {
-    SDL_assert(SDL_strcmp(name, SDL_HINT_IDLE_TIMER_DISABLED) == 0);
-
-    BOOL disable = (*newValue != '0');
+    BOOL disable = (hint && *hint != '0');
     [UIApplication sharedApplication].idleTimerDisabled = disable;
 }
 
@@ -218,8 +216,8 @@ static void SDL_IdleTimerDisabledChanged(const char *name, const char *oldValue,
     [[NSFileManager defaultManager] changeCurrentDirectoryPath: [[NSBundle mainBundle] resourcePath]];
 
     /* register a callback for the idletimer hint */
-    SDL_SetHint(SDL_HINT_IDLE_TIMER_DISABLED, "0");
-    SDL_RegisterHintChangedCb(SDL_HINT_IDLE_TIMER_DISABLED, &SDL_IdleTimerDisabledChanged);
+    SDL_AddHintCallback(SDL_HINT_IDLE_TIMER_DISABLED,
+                        SDL_IdleTimerDisabledChanged, NULL);
 
     SDL_SetMainReady();
     [self performSelector:@selector(postFinishLaunch) withObject:nil afterDelay:0.0];

From 0eb5308b0f38fd01d6a47d7e129d079ff40d26a4 Mon Sep 17 00:00:00 2001
From: Sam Lantinga 
Date: Sat, 13 Jul 2013 10:41:57 -0700
Subject: [PATCH 345/542] Added a configure check for Xext.h

---
 configure    | 17 +++++++++++++++++
 configure.in | 12 ++++++++++++
 2 files changed, 29 insertions(+)

diff --git a/configure b/configure
index 8d824ecca..4edad7539 100755
--- a/configure
+++ b/configure
@@ -19539,6 +19539,23 @@ fi
             CFLAGS="$CFLAGS $X_CFLAGS"
             LDFLAGS="$LDFLAGS $X_LIBS"
 
+            ac_fn_c_check_header_compile "$LINENO" "X11/extensions/Xext.h" "ac_cv_header_X11_extensions_Xext_h" "#include 
+                             #include 
+
+"
+if test "x$ac_cv_header_X11_extensions_Xext_h" = xyes; then :
+  have_xext_h_hdr=yes
+else
+  have_xext_h_hdr=no
+fi
+
+
+            if test x$have_xext_h_hdr != xyes; then
+               as_fn_error $? "
+*** Missing Xext.h, maybe you need to install the libxext-dev package?
+               " "$LINENO" 5
+            fi
+
 
 $as_echo "#define SDL_VIDEO_DRIVER_X11 1" >>confdefs.h
 
diff --git a/configure.in b/configure.in
index b795bcda5..5098c3466 100644
--- a/configure.in
+++ b/configure.in
@@ -1157,6 +1157,18 @@ AC_HELP_STRING([--enable-x11-shared], [dynamically load X11 support [[default=ma
             CFLAGS="$CFLAGS $X_CFLAGS"
             LDFLAGS="$LDFLAGS $X_LIBS"
 
+            AC_CHECK_HEADER(X11/extensions/Xext.h,
+                            have_xext_h_hdr=yes,
+                            have_xext_h_hdr=no,
+                            [#include 
+                             #include 
+                            ])
+            if test x$have_xext_h_hdr != xyes; then
+               AC_MSG_ERROR([
+*** Missing Xext.h, maybe you need to install the libxext-dev package?
+               ])
+            fi
+
             AC_DEFINE(SDL_VIDEO_DRIVER_X11, 1, [ ])
             SOURCES="$SOURCES $srcdir/src/video/x11/*.c"
             EXTRA_CFLAGS="$EXTRA_CFLAGS $X_CFLAGS"

From 396bc93955694eaf493f53e5e123d3396d1b76b0 Mon Sep 17 00:00:00 2001
From: Philipp Wiesemann 
Date: Sat, 13 Jul 2013 21:02:23 +0200
Subject: [PATCH 346/542] Fixed printf() usage in test program. Found by
 Cppcheck.

---
 test/testaudioinfo.c | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/test/testaudioinfo.c b/test/testaudioinfo.c
index ff7c25b7f..a39811a2b 100644
--- a/test/testaudioinfo.c
+++ b/test/testaudioinfo.c
@@ -21,7 +21,7 @@ print_devices(int iscapture)
     printf("%s devices:\n", typestr);
 
     if (n == -1)
-        printf("  Driver can't detect specific devices.\n\n", typestr);
+        printf("  Driver can't detect specific %s devices.\n\n", typestr);
     else if (n == 0)
         printf("  No %s devices found.\n\n", typestr);
     else {

From 884898cbfc337548d5304655f9de4523c7cb6535 Mon Sep 17 00:00:00 2001
From: Philipp Wiesemann 
Date: Sat, 13 Jul 2013 21:05:13 +0200
Subject: [PATCH 347/542] Removed unused variable and not needed assignment in
 test program. Found by Cppcheck.

---
 test/testatomic.c | 1 -
 1 file changed, 1 deletion(-)

diff --git a/test/testatomic.c b/test/testatomic.c
index 143d707c0..2edcd994f 100644
--- a/test/testatomic.c
+++ b/test/testatomic.c
@@ -498,7 +498,6 @@ static int FIFO_Writer(void* _data)
 {
     WriterData *data = (WriterData *)_data;
     SDL_EventQueue *queue = data->queue;
-    int index = data->index;
     int i;
     SDL_Event event;
 

From f158b5f47e44b4bca2808a3c356fb7deda0b6d2e Mon Sep 17 00:00:00 2001
From: Philipp Wiesemann 
Date: Sat, 13 Jul 2013 21:06:56 +0200
Subject: [PATCH 348/542] Added missing fclose() in test program. Found by
 Cppcheck.

---
 test/testiconv.c | 1 +
 1 file changed, 1 insertion(+)

diff --git a/test/testiconv.c b/test/testiconv.c
index 3da5a6f8a..85c2e4871 100644
--- a/test/testiconv.c
+++ b/test/testiconv.c
@@ -84,5 +84,6 @@ main(int argc, char *argv[])
         fputs(test[0], stdout);
         SDL_free(test[0]);
     }
+    fclose(file);
     return (errors ? errors + 1 : 0);
 }

From 59401ae635f607fa7fcb07e54c4f32adef21a0d4 Mon Sep 17 00:00:00 2001
From: Philipp Wiesemann 
Date: Sat, 13 Jul 2013 21:13:09 +0200
Subject: [PATCH 349/542] Fixed compiler warnings in test programs.

---
 test/testiconv.c         | 2 +-
 test/testintersections.c | 1 -
 test/testloadso.c        | 2 +-
 test/testrumble.c        | 6 +-----
 4 files changed, 3 insertions(+), 8 deletions(-)

diff --git a/test/testiconv.c b/test/testiconv.c
index 85c2e4871..d6738df44 100644
--- a/test/testiconv.c
+++ b/test/testiconv.c
@@ -45,7 +45,7 @@ main(int argc, char *argv[])
     char buffer[BUFSIZ];
     char *ucs4;
     char *test[2];
-    int i, index = 0;
+    int i;
     FILE *file;
     int errors = 0;
 
diff --git a/test/testintersections.c b/test/testintersections.c
index c93f04ed9..638c399c8 100644
--- a/test/testintersections.c
+++ b/test/testintersections.c
@@ -98,7 +98,6 @@ void
 DrawLines(SDL_Renderer * renderer)
 {
     int i;
-    int x1, y1, x2, y2;
     SDL_Rect viewport;
 
     /* Query the sizes */
diff --git a/test/testloadso.c b/test/testloadso.c
index 8a46bd2cb..0dde5f0d0 100644
--- a/test/testloadso.c
+++ b/test/testloadso.c
@@ -78,5 +78,5 @@ main(int argc, char *argv[])
         SDL_UnloadObject(lib);
     }
     SDL_Quit();
-    return (0);
+    return retval;
 }
diff --git a/test/testrumble.c b/test/testrumble.c
index 6efc42c2b..b200345bd 100644
--- a/test/testrumble.c
+++ b/test/testrumble.c
@@ -50,10 +50,6 @@ main(int argc, char **argv)
     int i;
     char *name;
     int index;
-    SDL_HapticEffect efx[5];
-    int id[5];
-    int nefx;
-    unsigned int supported;
 
     name = NULL;
     index = -1;
@@ -130,7 +126,7 @@ main(int argc, char **argv)
     SDL_HapticRumbleStop(haptic);
     SDL_Delay(2000);
     printf("Playing 2 second rumble at 0.3 magnitude.\n");
-    if (SDL_HapticRumblePlay(haptic, 0.3, 5000) != 0) {
+    if (SDL_HapticRumblePlay(haptic, 0.3f, 5000) != 0) {
        printf("\nFailed to play rumble: %s\n", SDL_GetError() );
        return 1;
     }

From 7f4744bf03930b348511e298292c0b293bf75dee Mon Sep 17 00:00:00 2001
From: "Ryan C. Gordon" 
Date: Sat, 13 Jul 2013 20:24:09 -0400
Subject: [PATCH 350/542] Explicitly check for Xext.h in the CMake project,
 fail if missing.

Added to match configure script change in hg changeset 8f118396264b.
---
 cmake/sdlchecks.cmake | 5 +++++
 1 file changed, 5 insertions(+)

diff --git a/cmake/sdlchecks.cmake b/cmake/sdlchecks.cmake
index fd6853f18..7cabbc60c 100644
--- a/cmake/sdlchecks.cmake
+++ b/cmake/sdlchecks.cmake
@@ -312,8 +312,13 @@ macro(CheckX11)
     check_include_file(X11/extensions/scrnsaver.h HAVE_XSS_H)
     check_include_file(X11/extensions/shape.h HAVE_XSHAPE_H)
     check_include_files("X11/Xlib.h;X11/extensions/xf86vmode.h" HAVE_XF86VM_H)
+    check_include_files("X11/Xlib.h;X11/Xproto.h;X11/extensions/Xext.h" HAVE_XEXT_H)
 
     if(X11_LIB)
+      if(NOT HAVE_XEXT_H)
+        message_error("Missing Xext.h, maybe you need to install the libxext-dev package?")
+      endif()
+
       set(HAVE_VIDEO_X11 TRUE)
       set(HAVE_SDL_VIDEO TRUE)
 

From 0df5b7f912f6af35e2c4619c92eca1c7938b53f5 Mon Sep 17 00:00:00 2001
From: "Ryan C. Gordon" 
Date: Sat, 13 Jul 2013 21:42:57 -0400
Subject: [PATCH 351/542] Don't use SDL_memcmp() on modes to check if they've
 already been added.

They might have different driverdata values and thus not match.

Fixes Bugzilla #1407.
---
 src/video/SDL_video.c | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/src/video/SDL_video.c b/src/video/SDL_video.c
index 988d49c3f..4d32d77b5 100644
--- a/src/video/SDL_video.c
+++ b/src/video/SDL_video.c
@@ -667,7 +667,7 @@ SDL_AddDisplayMode(SDL_VideoDisplay * display,  const SDL_DisplayMode * mode)
     modes = display->display_modes;
     nmodes = display->num_display_modes;
     for (i = nmodes; i--;) {
-        if (SDL_memcmp(mode, &modes[i], sizeof(*mode)) == 0) {
+        if (cmpmodes(mode, &modes[i]) == 0) {
             return SDL_FALSE;
         }
     }

From 3137c0fc687b808c26e5a5ae87d9aea1bbe2d8a5 Mon Sep 17 00:00:00 2001
From: "Ryan C. Gordon" 
Date: Sat, 13 Jul 2013 21:50:40 -0400
Subject: [PATCH 352/542] Don't copy structs to stack in cmpmodes(), use const
 pointers instead.

(and return 0 immediately if the pointers are the same.)
---
 src/video/SDL_video.c | 31 ++++++++++++++-----------------
 1 file changed, 14 insertions(+), 17 deletions(-)

diff --git a/src/video/SDL_video.c b/src/video/SDL_video.c
index 4d32d77b5..b71b73446 100644
--- a/src/video/SDL_video.c
+++ b/src/video/SDL_video.c
@@ -360,23 +360,20 @@ SDL_DestroyWindowTexture(_THIS, SDL_Window * window)
 static int
 cmpmodes(const void *A, const void *B)
 {
-    SDL_DisplayMode a = *(const SDL_DisplayMode *) A;
-    SDL_DisplayMode b = *(const SDL_DisplayMode *) B;
-
-    if (a.w != b.w) {
-        return b.w - a.w;
-    }
-    if (a.h != b.h) {
-        return b.h - a.h;
-    }
-    if (SDL_BITSPERPIXEL(a.format) != SDL_BITSPERPIXEL(b.format)) {
-        return SDL_BITSPERPIXEL(b.format) - SDL_BITSPERPIXEL(a.format);
-    }
-    if (SDL_PIXELLAYOUT(a.format) != SDL_PIXELLAYOUT(b.format)) {
-        return SDL_PIXELLAYOUT(b.format) - SDL_PIXELLAYOUT(a.format);
-    }
-    if (a.refresh_rate != b.refresh_rate) {
-        return b.refresh_rate - a.refresh_rate;
+    const SDL_DisplayMode *a = (const SDL_DisplayMode *) A;
+    const SDL_DisplayMode *b = (const SDL_DisplayMode *) B;
+    if (a == b) {
+        return 0;
+    } else if (a->w != b->w) {
+        return b->w - a->w;
+    } else if (a->h != b->h) {
+        return b->h - a->h;
+    } else if (SDL_BITSPERPIXEL(a->format) != SDL_BITSPERPIXEL(b->format)) {
+        return SDL_BITSPERPIXEL(b->format) - SDL_BITSPERPIXEL(a->format);
+    } else if (SDL_PIXELLAYOUT(a->format) != SDL_PIXELLAYOUT(b->format)) {
+        return SDL_PIXELLAYOUT(b->format) - SDL_PIXELLAYOUT(a->format);
+    } else if (a->refresh_rate != b->refresh_rate) {
+        return b->refresh_rate - a->refresh_rate;
     }
     return 0;
 }

From dbb91faaf9ea0ae0c040391b1af4ea9e65c0e3ad Mon Sep 17 00:00:00 2001
From: "Ryan C. Gordon" 
Date: Sat, 13 Jul 2013 21:56:31 -0400
Subject: [PATCH 353/542] Changed some for-loops to be a bit more clear.

---
 src/video/SDL_video.c | 4 ++--
 1 file changed, 2 insertions(+), 2 deletions(-)

diff --git a/src/video/SDL_video.c b/src/video/SDL_video.c
index b71b73446..afa00db95 100644
--- a/src/video/SDL_video.c
+++ b/src/video/SDL_video.c
@@ -663,7 +663,7 @@ SDL_AddDisplayMode(SDL_VideoDisplay * display,  const SDL_DisplayMode * mode)
     /* Make sure we don't already have the mode in the list */
     modes = display->display_modes;
     nmodes = display->num_display_modes;
-    for (i = nmodes; i--;) {
+    for (i = 0; i < nmodes; ++i) {
         if (cmpmodes(mode, &modes[i]) == 0) {
             return SDL_FALSE;
         }
@@ -2253,7 +2253,7 @@ SDL_VideoQuit(void)
     }
     _this->VideoQuit(_this);
 
-    for (i = _this->num_displays; i--;) {
+    for (i = 0; i < _this->num_displays; ++i) {
         SDL_VideoDisplay *display = &_this->displays[i];
         for (j = display->num_display_modes; j--;) {
             if (display->display_modes[j].driverdata) {

From 7ca8149a59cdf3911ae7f28d5bd91345381a8dd6 Mon Sep 17 00:00:00 2001
From: Philipp Wiesemann 
Date: Sun, 14 Jul 2013 13:27:19 +0200
Subject: [PATCH 354/542] Fixed compiler warnings in test programs by adding
 includes directives.

---
 test/testlock.c   | 1 +
 test/testnative.c | 2 ++
 test/testshader.c | 1 +
 3 files changed, 4 insertions(+)

diff --git a/test/testlock.c b/test/testlock.c
index e77a2c42d..c8b6579c5 100644
--- a/test/testlock.c
+++ b/test/testlock.c
@@ -16,6 +16,7 @@
 
 #include 
 #include 
+#include  /* for atexit() */
 
 #include "SDL.h"
 #include "SDL_mutex.h"
diff --git a/test/testnative.c b/test/testnative.c
index 2579b18b9..3434dc2a9 100644
--- a/test/testnative.c
+++ b/test/testnative.c
@@ -12,6 +12,8 @@
 /* Simple program:  Create a native window and attach an SDL renderer */
 
 #include 
+#include  /* for srand() */
+#include  /* for time() */
 
 #include "testnative.h"
 
diff --git a/test/testshader.c b/test/testshader.c
index 4aabd5d65..95ce2b97a 100644
--- a/test/testshader.c
+++ b/test/testshader.c
@@ -11,6 +11,7 @@
 */
 /* This is a simple example of using GLSL shaders with SDL */
 
+#include  /* for printf() */
 #include "SDL.h"
 
 #ifdef HAVE_OPENGL

From 5aeed40282e5a779dfb6cf3ccb9347bf95ef3b6c Mon Sep 17 00:00:00 2001
From: Philipp Wiesemann 
Date: Sun, 14 Jul 2013 13:30:26 +0200
Subject: [PATCH 355/542] Fixed compiler warnings in test programs by adding
 return statements.

---
 test/testnative.c        | 2 ++
 test/testspriteminimal.c | 2 ++
 2 files changed, 4 insertions(+)

diff --git a/test/testnative.c b/test/testnative.c
index 3434dc2a9..5af1c49e2 100644
--- a/test/testnative.c
+++ b/test/testnative.c
@@ -227,6 +227,8 @@ main(int argc, char *argv[])
     }
 
     quit(0);
+
+    return 0; /* to prevent compiler warning */
 }
 
 /* vi: set ts=4 sw=4 expandtab: */
diff --git a/test/testspriteminimal.c b/test/testspriteminimal.c
index 76244c282..b0b5f4e77 100644
--- a/test/testspriteminimal.c
+++ b/test/testspriteminimal.c
@@ -162,6 +162,8 @@ main(int argc, char *argv[])
     }
 
     quit(0);
+
+    return 0; /* to prevent compiler warning */
 }
 
 /* vi: set ts=4 sw=4 expandtab: */

From 4405163127d88ddb11c28666e76eb4d38c84b159 Mon Sep 17 00:00:00 2001
From: Philipp Wiesemann 
Date: Sun, 14 Jul 2013 13:33:54 +0200
Subject: [PATCH 356/542] Fixed compiler warnings in test program by using
 wrapped functions.

---
 test/testresample.c | 14 +++++++-------
 1 file changed, 7 insertions(+), 7 deletions(-)

diff --git a/test/testresample.c b/test/testresample.c
index 80733c305..5dd55800f 100644
--- a/test/testresample.c
+++ b/test/testresample.c
@@ -30,7 +30,7 @@ main(int argc, char **argv)
         return 1;
     }
 
-    cvtfreq = atoi(argv[3]);
+    cvtfreq = SDL_atoi(argv[3]);
 
     if (SDL_Init(SDL_INIT_AUDIO) == -1) {
         fprintf(stderr, "SDL_Init() failed: %s\n", SDL_GetError());
@@ -52,18 +52,18 @@ main(int argc, char **argv)
     }
 
     cvt.len = len;
-    cvt.buf = (Uint8 *) malloc(len * cvt.len_mult);
+    cvt.buf = (Uint8 *) SDL_malloc(len * cvt.len_mult);
     if (cvt.buf == NULL) {
         fprintf(stderr, "Out of memory.\n");
         SDL_FreeWAV(data);
         SDL_Quit();
         return 5;
     }
-    memcpy(cvt.buf, data, len);
+    SDL_memcpy(cvt.buf, data, len);
 
     if (SDL_ConvertAudio(&cvt) == -1) {
         fprintf(stderr, "Conversion failed: %s\n", SDL_GetError());
-        free(cvt.buf);
+        SDL_free(cvt.buf);
         SDL_FreeWAV(data);
         SDL_Quit();
         return 6;
@@ -73,7 +73,7 @@ main(int argc, char **argv)
     io = SDL_RWFromFile(argv[2], "wb");
     if (io == NULL) {
         fprintf(stderr, "fopen('%s') failed: %s\n", argv[2], SDL_GetError());
-        free(cvt.buf);
+        SDL_free(cvt.buf);
         SDL_FreeWAV(data);
         SDL_Quit();
         return 7;
@@ -100,13 +100,13 @@ main(int argc, char **argv)
 
     if (SDL_RWclose(io) == -1) {
         fprintf(stderr, "fclose('%s') failed: %s\n", argv[2], SDL_GetError());
-        free(cvt.buf);
+        SDL_free(cvt.buf);
         SDL_FreeWAV(data);
         SDL_Quit();
         return 8;
     }                           // if
 
-    free(cvt.buf);
+    SDL_free(cvt.buf);
     SDL_FreeWAV(data);
     SDL_Quit();
     return 0;

From a05aecab3b23b36292781157f5f4c60751b42bbc Mon Sep 17 00:00:00 2001
From: Philipp Wiesemann 
Date: Sun, 14 Jul 2013 14:32:26 +0200
Subject: [PATCH 357/542] Removed unused internal function. Found by Cppcheck.

---
 src/video/x11/SDL_x11window.c | 7 -------
 1 file changed, 7 deletions(-)

diff --git a/src/video/x11/SDL_x11window.c b/src/video/x11/SDL_x11window.c
index eda47f7ef..3e9062b50 100644
--- a/src/video/x11/SDL_x11window.c
+++ b/src/video/x11/SDL_x11window.c
@@ -1031,13 +1031,6 @@ X11_SetWindowFullscreenViaWM(_THIS, SDL_Window * window, SDL_VideoDisplay * _dis
     XFlush(display);
 }
 
-static __inline__ int
-maxint(const int a, const int b)
-{
-    return (a > b ? a : b);
-}
-
-
 /* This handles fullscreen itself, outside the Window Manager. */
 static void
 X11_BeginWindowFullscreenLegacy(_THIS, SDL_Window * window, SDL_VideoDisplay * _display)

From e5c1f21fae1b0d5ecf96989b56b3e2e225bdb565 Mon Sep 17 00:00:00 2001
From: "Ryan C. Gordon" 
Date: Sun, 14 Jul 2013 11:28:18 -0400
Subject: [PATCH 358/542] Fixed off-by-one error in SDL_AudioQuit() (thanks,
 Rainer!).

Audio Devices IDs are offset by one.

Fixes Bugzilla #1971.
---
 src/audio/SDL_audio.c | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/src/audio/SDL_audio.c b/src/audio/SDL_audio.c
index ff60e7f7a..29ae10044 100644
--- a/src/audio/SDL_audio.c
+++ b/src/audio/SDL_audio.c
@@ -1184,7 +1184,7 @@ SDL_AudioQuit(void)
 
     for (i = 0; i < SDL_arraysize(open_devices); i++) {
         if (open_devices[i] != NULL) {
-            SDL_CloseAudioDevice(i);
+            SDL_CloseAudioDevice(i+1);
         }
     }
 

From 37bb3c53541840dca155e768b9ca99cf6d6daef3 Mon Sep 17 00:00:00 2001
From: "Ryan C. Gordon" 
Date: Sun, 14 Jul 2013 12:42:12 -0400
Subject: [PATCH 359/542] Protect SDL_PauseAudio*() with the audio callback
 lock.

Otherwise, you can pause audio and still have the callback running, or run
 one more time. This makes sure the callback is definitely stopped by the
 time you return from SDL_PauseAudio().
---
 src/audio/SDL_audio.c | 6 ++++--
 1 file changed, 4 insertions(+), 2 deletions(-)

diff --git a/src/audio/SDL_audio.c b/src/audio/SDL_audio.c
index 29ae10044..a9c54b440 100644
--- a/src/audio/SDL_audio.c
+++ b/src/audio/SDL_audio.c
@@ -480,13 +480,13 @@ SDL_RunAudio(void *devicep)
                 }
             }
 
+            SDL_LockMutex(device->mixer_lock);
             if (device->paused) {
                 SDL_memset(stream, silence, stream_len);
             } else {
-                SDL_LockMutex(device->mixer_lock);
                 (*fill) (udata, stream, stream_len);
-                SDL_UnlockMutex(device->mixer_lock);
             }
+            SDL_UnlockMutex(device->mixer_lock);
 
             /* Convert the audio if necessary */
             if (device->convert.needed) {
@@ -1114,7 +1114,9 @@ SDL_PauseAudioDevice(SDL_AudioDeviceID devid, int pause_on)
 {
     SDL_AudioDevice *device = get_audio_device(devid);
     if (device) {
+        current_audio.impl.LockDevice(device);
         device->paused = pause_on;
+        current_audio.impl.UnlockDevice(device);
     }
 }
 

From 4e5bd8491fbba3ff0ed18f5f18e0b8b46de07234 Mon Sep 17 00:00:00 2001
From: "Ryan C. Gordon" 
Date: Sun, 14 Jul 2013 13:25:49 -0400
Subject: [PATCH 360/542] Fixed compiler warning in testtimer.c

---
 test/testtimer.c | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/test/testtimer.c b/test/testtimer.c
index 87264b19d..e0d0c3e61 100644
--- a/test/testtimer.c
+++ b/test/testtimer.c
@@ -105,7 +105,7 @@ main(int argc, char *argv[])
     now = SDL_GetPerformanceCounter();
     printf("1 million iterations of ticktock took %f ms\n", (double)((now - start)*1000) / SDL_GetPerformanceFrequency());
 
-    printf("Performance counter frequency: %lld\n", SDL_GetPerformanceFrequency());
+    printf("Performance counter frequency: %llu\n", (unsigned long long) SDL_GetPerformanceFrequency());
     start32 = SDL_GetTicks();
     start = SDL_GetPerformanceCounter();
     SDL_Delay(1000);

From c944a4fdf96d406a957a823489ffac9331262523 Mon Sep 17 00:00:00 2001
From: "Ryan C. Gordon" 
Date: Sun, 14 Jul 2013 13:27:54 -0400
Subject: [PATCH 361/542] Implement float32 support for winmm and directsound
 targets (Thanks, John!).

Fixes Bugzilla #1657.
---
 src/audio/directsound/SDL_directsound.c | 12 +++++++++++-
 src/audio/winmm/SDL_winmm.c             | 12 +++++++++++-
 2 files changed, 22 insertions(+), 2 deletions(-)

diff --git a/src/audio/directsound/SDL_directsound.c b/src/audio/directsound/SDL_directsound.c
index e320056b5..f08204494 100644
--- a/src/audio/directsound/SDL_directsound.c
+++ b/src/audio/directsound/SDL_directsound.c
@@ -30,6 +30,10 @@
 #include "../SDL_audio_c.h"
 #include "SDL_directsound.h"
 
+#ifndef WAVE_FORMAT_IEEE_FLOAT
+#define WAVE_FORMAT_IEEE_FLOAT 0x0003
+#endif
+
 /* DirectX function pointers for audio */
 static void* DSoundDLL = NULL;
 typedef HRESULT(WINAPI*fnDirectSoundCreate8)(LPGUID,LPDIRECTSOUND*,LPUNKNOWN);
@@ -466,6 +470,7 @@ DSOUND_OpenDevice(_THIS, const char *devname, int iscapture)
         case AUDIO_U8:
         case AUDIO_S16:
         case AUDIO_S32:
+        case AUDIO_F32:
             this->spec.format = test_format;
             valid_format = 1;
             break;
@@ -479,7 +484,12 @@ DSOUND_OpenDevice(_THIS, const char *devname, int iscapture)
     }
 
     SDL_memset(&waveformat, 0, sizeof(waveformat));
-    waveformat.wFormatTag = WAVE_FORMAT_PCM;
+
+    if (SDL_AUDIO_ISFLOAT(this->spec.format))
+        waveformat.wFormatTag = WAVE_FORMAT_IEEE_FLOAT;
+    else
+        waveformat.wFormatTag = WAVE_FORMAT_PCM;
+
     waveformat.wBitsPerSample = SDL_AUDIO_BITSIZE(this->spec.format);
     waveformat.nChannels = this->spec.channels;
     waveformat.nSamplesPerSec = this->spec.freq;
diff --git a/src/audio/winmm/SDL_winmm.c b/src/audio/winmm/SDL_winmm.c
index 00a6245ad..dc7336b2b 100644
--- a/src/audio/winmm/SDL_winmm.c
+++ b/src/audio/winmm/SDL_winmm.c
@@ -32,6 +32,10 @@
 #include "../SDL_audio_c.h"
 #include "SDL_winmm.h"
 
+#ifndef WAVE_FORMAT_IEEE_FLOAT
+#define WAVE_FORMAT_IEEE_FLOAT 0x0003
+#endif
+
 #define DETECT_DEV_IMPL(typ, capstyp) \
 static void DetectWave##typ##Devs(SDL_AddAudioDevice addfn) { \
     const UINT devcount = wave##typ##GetNumDevs(); \
@@ -257,6 +261,7 @@ WINMM_OpenDevice(_THIS, const char *devname, int iscapture)
         case AUDIO_U8:
         case AUDIO_S16:
         case AUDIO_S32:
+        case AUDIO_F32:
             break;              /* valid. */
 
         default:
@@ -273,7 +278,12 @@ WINMM_OpenDevice(_THIS, const char *devname, int iscapture)
 
     /* Set basic WAVE format parameters */
     SDL_memset(&waveformat, '\0', sizeof(waveformat));
-    waveformat.wFormatTag = WAVE_FORMAT_PCM;
+
+    if (SDL_AUDIO_ISFLOAT(this->spec.format))
+        waveformat.wFormatTag = WAVE_FORMAT_IEEE_FLOAT;
+    else
+        waveformat.wFormatTag = WAVE_FORMAT_PCM;
+
     waveformat.wBitsPerSample = SDL_AUDIO_BITSIZE(this->spec.format);
 
     if (this->spec.channels > 2)

From 1603534707364c18361a06314960539a26f7c660 Mon Sep 17 00:00:00 2001
From: Philipp Wiesemann 
Date: Sun, 14 Jul 2013 19:53:50 +0200
Subject: [PATCH 362/542] Changed use of isspace() to SDL_isspace().

---
 src/main/windows/SDL_windows_main.c | 4 ++--
 1 file changed, 2 insertions(+), 2 deletions(-)

diff --git a/src/main/windows/SDL_windows_main.c b/src/main/windows/SDL_windows_main.c
index 5e7af35ec..519ce14b8 100644
--- a/src/main/windows/SDL_windows_main.c
+++ b/src/main/windows/SDL_windows_main.c
@@ -54,7 +54,7 @@ ParseCommandLine(char *cmdline, char **argv)
     argc = last_argc = 0;
     for (bufp = cmdline; *bufp;) {
         /* Skip leading whitespace */
-        while (isspace(*bufp)) {
+        while (SDL_isspace(*bufp)) {
             ++bufp;
         }
         /* Skip over argument */
@@ -80,7 +80,7 @@ ParseCommandLine(char *cmdline, char **argv)
                 ++argc;
             }
             /* Skip over word */
-            while (*bufp && !isspace(*bufp)) {
+            while (*bufp && !SDL_isspace(*bufp)) {
                 ++bufp;
             }
         }

From 991e2fb26cf777642f2942b77ebc15558471272f Mon Sep 17 00:00:00 2001
From: Philipp Wiesemann 
Date: Sun, 14 Jul 2013 19:56:22 +0200
Subject: [PATCH 363/542] Fixed compiler warnings in test program by using
 wrapped functions.

---
 test/testgesture.c | 4 ++--
 1 file changed, 2 insertions(+), 2 deletions(-)

diff --git a/test/testgesture.c b/test/testgesture.c
index 0f5356191..9b506ead3 100644
--- a/test/testgesture.c
+++ b/test/testgesture.c
@@ -141,8 +141,8 @@ void drawCircle(SDL_Surface* screen,float x,float y,float r,unsigned int c)
 
 void drawKnob(SDL_Surface* screen,Knob k) {
   drawCircle(screen,k.p.x*screen->w,k.p.y*screen->h,k.r*screen->w,0xFFFFFF);
-  drawCircle(screen,(k.p.x+k.r/2*cosf(k.ang))*screen->w,
-                (k.p.y+k.r/2*sinf(k.ang))*screen->h,k.r/4*screen->w,0);
+  drawCircle(screen,(k.p.x+k.r/2*SDL_cosf(k.ang))*screen->w,
+                (k.p.y+k.r/2*SDL_sinf(k.ang))*screen->h,k.r/4*screen->w,0);
 }
 
 void DrawScreen(SDL_Surface* screen)

From 73cb183fdb892c8e03c35cacd6413e8ff0fe1437 Mon Sep 17 00:00:00 2001
From: Sam Lantinga 
Date: Sun, 14 Jul 2013 11:11:42 -0700
Subject: [PATCH 364/542] If the video system has been initialized, only use
 that message box system. Don't pass a window from one video driver to the
 messagebox function of another video driver.  This makes bad things happen.
 :)

---
 src/video/SDL_video.c | 70 +++++++++++++++++++++++--------------------
 1 file changed, 38 insertions(+), 32 deletions(-)

diff --git a/src/video/SDL_video.c b/src/video/SDL_video.c
index afa00db95..c0a24e09e 100644
--- a/src/video/SDL_video.c
+++ b/src/video/SDL_video.c
@@ -3057,48 +3057,54 @@ SDL_ShowMessageBox(const SDL_MessageBoxData *messageboxdata, int *buttonid)
 {
     int dummybutton;
     int retval = -1;
-    SDL_bool relative_mode = SDL_GetRelativeMouseMode();
-    int show_cursor_prev = SDL_ShowCursor( 1 );
+    SDL_bool relative_mode;
+    int show_cursor_prev;
 
-    SDL_SetRelativeMouseMode( SDL_FALSE );
+    if (!messageboxdata) {
+        return SDL_InvalidParamError("messageboxdata");
+    }
+
+    relative_mode = SDL_GetRelativeMouseMode();
+    SDL_SetRelativeMouseMode(SDL_FALSE);
+    show_cursor_prev = SDL_ShowCursor(1);
 
     if (!buttonid) {
         buttonid = &dummybutton;
     }
     if (_this && _this->ShowMessageBox) {
-        if (_this->ShowMessageBox(_this, messageboxdata, buttonid) == 0) {
-            retval = 0;
+        retval = _this->ShowMessageBox(_this, messageboxdata, buttonid);
+    } else {
+        /* It's completely fine to call this function before video is initialized */
+        if (messageboxdata->window == NULL) {
+#if SDL_VIDEO_DRIVER_WINDOWS
+            if ((retval == -1) && (WIN_ShowMessageBox(messageboxdata, buttonid) == 0)) {
+                retval = 0;
+            }
+#endif
+#if SDL_VIDEO_DRIVER_COCOA
+            if ((retval == -1) && (Cocoa_ShowMessageBox(messageboxdata, buttonid) == 0)) {
+                retval = 0;
+            }
+#endif
+#if SDL_VIDEO_DRIVER_UIKIT
+            if ((retval == -1) && (UIKit_ShowMessageBox(messageboxdata, buttonid) == 0)) {
+                retval = 0;
+            }
+#endif
+#if SDL_VIDEO_DRIVER_X11
+            if ((retval == -1) && (X11_ShowMessageBox(messageboxdata, buttonid) == 0)) {
+                retval = 0;
+            }
+#endif
+        }
+        if (retval == -1) {
+            SDL_SetError("No message system available");
         }
     }
 
-    /* It's completely fine to call this function before video is initialized */
-#if SDL_VIDEO_DRIVER_WINDOWS
-    if ((retval == -1) && (WIN_ShowMessageBox(messageboxdata, buttonid) == 0)) {
-        retval = 0;
-    }
-#endif
-#if SDL_VIDEO_DRIVER_COCOA
-    if ((retval == -1) && (Cocoa_ShowMessageBox(messageboxdata, buttonid) == 0)) {
-        retval = 0;
-    }
-#endif
-#if SDL_VIDEO_DRIVER_UIKIT
-    if ((retval == -1) && (UIKit_ShowMessageBox(messageboxdata, buttonid) == 0)) {
-        retval = 0;
-    }
-#endif
-#if SDL_VIDEO_DRIVER_X11
-    if ((retval == -1) && (X11_ShowMessageBox(messageboxdata, buttonid) == 0)) {
-        retval = 0;
-    }
-#endif
+    SDL_ShowCursor(show_cursor_prev);
+    SDL_SetRelativeMouseMode(relative_mode);
 
-    SDL_ShowCursor( show_cursor_prev );
-    SDL_SetRelativeMouseMode( relative_mode );
-
-    if(retval == -1) {
-        SDL_SetError("No message system available");
-    }
     return retval;
 }
 

From 284b7113ad9d3a93b47066afa5d81a48d0373f10 Mon Sep 17 00:00:00 2001
From: Sam Lantinga 
Date: Sun, 14 Jul 2013 11:41:57 -0700
Subject: [PATCH 365/542] Make sure a window is valid for a subsystem before
 using it in a messagebox

---
 src/video/SDL_video.c | 59 +++++++++++++++++++++++++++++--------------
 1 file changed, 40 insertions(+), 19 deletions(-)

diff --git a/src/video/SDL_video.c b/src/video/SDL_video.c
index c0a24e09e..8b3c2f073 100644
--- a/src/video/SDL_video.c
+++ b/src/video/SDL_video.c
@@ -3052,6 +3052,20 @@ SDL_IsScreenKeyboardShown(SDL_Window *window)
 #include "x11/SDL_x11messagebox.h"
 #endif
 
+static SDL_bool SDL_MessageboxValidForDriver(const SDL_MessageBoxData *messageboxdata, SDL_SYSWM_TYPE drivertype)
+{
+    SDL_SysWMinfo info;
+    SDL_Window *window = messageboxdata->window;
+
+    if (!window) {
+        return SDL_TRUE;
+    }
+
+    SDL_VERSION(&info.version);
+    SDL_GetWindowWMInfo(window, &info);
+    return (info.subsystem == drivertype);
+}
+
 int
 SDL_ShowMessageBox(const SDL_MessageBoxData *messageboxdata, int *buttonid)
 {
@@ -3071,35 +3085,42 @@ SDL_ShowMessageBox(const SDL_MessageBoxData *messageboxdata, int *buttonid)
     if (!buttonid) {
         buttonid = &dummybutton;
     }
+
     if (_this && _this->ShowMessageBox) {
         retval = _this->ShowMessageBox(_this, messageboxdata, buttonid);
-    } else {
-        /* It's completely fine to call this function before video is initialized */
-        if (messageboxdata->window == NULL) {
+    }
+
+    /* It's completely fine to call this function before video is initialized */
 #if SDL_VIDEO_DRIVER_WINDOWS
-            if ((retval == -1) && (WIN_ShowMessageBox(messageboxdata, buttonid) == 0)) {
-                retval = 0;
-            }
+    if (retval == -1 &&
+        SDL_MessageboxValidForDriver(messageboxdata, SDL_SYSWM_WINDOWS) &&
+        WIN_ShowMessageBox(messageboxdata, buttonid) == 0) {
+        retval = 0;
+    }
 #endif
 #if SDL_VIDEO_DRIVER_COCOA
-            if ((retval == -1) && (Cocoa_ShowMessageBox(messageboxdata, buttonid) == 0)) {
-                retval = 0;
-            }
+    if (retval == -1 &&
+        SDL_MessageboxValidForDriver(messageboxdata, SDL_SYSWM_COCOA) &&
+        Cocoa_ShowMessageBox(messageboxdata, buttonid) == 0) {
+        retval = 0;
+    }
 #endif
 #if SDL_VIDEO_DRIVER_UIKIT
-            if ((retval == -1) && (UIKit_ShowMessageBox(messageboxdata, buttonid) == 0)) {
-                retval = 0;
-            }
+    if (retval == -1 &&
+        SDL_MessageboxValidForDriver(messageboxdata, SDL_SYSWM_UIKIT) &&
+        UIKit_ShowMessageBox(messageboxdata, buttonid) == 0) {
+        retval = 0;
+    }
 #endif
 #if SDL_VIDEO_DRIVER_X11
-            if ((retval == -1) && (X11_ShowMessageBox(messageboxdata, buttonid) == 0)) {
-                retval = 0;
-            }
+    if (retval == -1 &&
+        SDL_MessageboxValidForDriver(messageboxdata, SDL_SYSWM_X11) &&
+        X11_ShowMessageBox(messageboxdata, buttonid) == 0) {
+        retval = 0;
+    }
 #endif
-        }
-        if (retval == -1) {
-            SDL_SetError("No message system available");
-        }
+    if (retval == -1) {
+        SDL_SetError("No message system available");
     }
 
     SDL_ShowCursor(show_cursor_prev);

From 3d97a0a1bb1a50e985c85a407f4828da37c818b5 Mon Sep 17 00:00:00 2001
From: Sam Lantinga 
Date: Sun, 14 Jul 2013 11:43:25 -0700
Subject: [PATCH 366/542] Removed obsolete assertion code

---
 src/video/cocoa/SDL_cocoavideo.m | 53 --------------------------------
 1 file changed, 53 deletions(-)

diff --git a/src/video/cocoa/SDL_cocoavideo.m b/src/video/cocoa/SDL_cocoavideo.m
index 5600222ae..849915247 100644
--- a/src/video/cocoa/SDL_cocoavideo.m
+++ b/src/video/cocoa/SDL_cocoavideo.m
@@ -232,59 +232,6 @@ void SDL_NSLog(const char *text)
     NSLog(@"%s", text);
 }
 
-/*
- * Mac OS X assertion support.
- *
- * This doesn't really have aything to do with the interfaces of the SDL video
- *  subsystem, but we need to stuff this into an Objective-C source code file.
- */
-
-SDL_assert_state
-SDL_PromptAssertion_cocoa(const SDL_assert_data *data)
-{
-    const int initialized = (SDL_WasInit(SDL_INIT_VIDEO) != 0);
-    if (!initialized) {
-        if (SDL_InitSubSystem(SDL_INIT_VIDEO) == -1) {
-            fprintf(stderr, "Assertion failed AND couldn't init video mode!\n");
-            return SDL_ASSERTION_BREAK;  /* oh well, crash hard. */
-        }
-    }
-
-    NSAutoreleasePool *pool = [[NSAutoreleasePool alloc] init];
-
-    NSString *msg = [NSString stringWithFormat:
-            @"Assertion failure at %s (%s:%d), triggered %u time%s:\n  '%s'",
-                data->function, data->filename, data->linenum,
-                data->trigger_count, (data->trigger_count == 1) ? "" : "s",
-                data->condition];
-
-    NSLog(@"%@", msg);
-
-    /*
-     * !!! FIXME: this code needs to deal with fullscreen modes:
-     * !!! FIXME:  reset to default desktop, runModal, reset to current?
-     */
-
-    NSAlert* alert = [[NSAlert alloc] init];
-    [alert setAlertStyle:NSCriticalAlertStyle];
-    [alert setMessageText:msg];
-    [alert addButtonWithTitle:@"Retry"];
-    [alert addButtonWithTitle:@"Break"];
-    [alert addButtonWithTitle:@"Abort"];
-    [alert addButtonWithTitle:@"Ignore"];
-    [alert addButtonWithTitle:@"Always Ignore"];
-    const NSInteger clicked = [alert runModal];
-    [alert release];
-
-    [pool release];
-
-    if (!initialized) {
-        SDL_QuitSubSystem(SDL_INIT_VIDEO);
-    }
-
-    return (SDL_assert_state) (clicked - NSAlertFirstButtonReturn);
-}
-
 #endif /* SDL_VIDEO_DRIVER_COCOA */
 
 /* vim: set ts=4 sw=4 expandtab: */

From c43e19485bb0e7d697a4445d9ee385e7d82f838f Mon Sep 17 00:00:00 2001
From: Sam Lantinga 
Date: Sun, 14 Jul 2013 11:57:01 -0700
Subject: [PATCH 367/542] Fixed code example for SDL_GetWindowWMInfo()

---
 include/SDL_syswm.h | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/include/SDL_syswm.h b/include/SDL_syswm.h
index 3ea026b44..5e4454f86 100644
--- a/include/SDL_syswm.h
+++ b/include/SDL_syswm.h
@@ -219,7 +219,7 @@ typedef struct SDL_SysWMinfo SDL_SysWMinfo;
  *  \code
  *  SDL_SysWMinfo info;
  *  SDL_VERSION(&info.version);
- *  if ( SDL_GetWindowWMInfo(&info) ) { ... }
+ *  if ( SDL_GetWindowWMInfo(window, &info) ) { ... }
  *  \endcode
  */
 extern DECLSPEC SDL_bool SDLCALL SDL_GetWindowWMInfo(SDL_Window * window,

From 26c456e4ffdfcf84ab2717f9b58f73c9b3406bfc Mon Sep 17 00:00:00 2001
From: Sam Lantinga 
Date: Sun, 14 Jul 2013 11:57:45 -0700
Subject: [PATCH 368/542] Added testing of messagebox with a parent window

---
 test/testmessage.c | 28 +++++++++++++++++++++++++---
 1 file changed, 25 insertions(+), 3 deletions(-)

diff --git a/test/testmessage.c b/test/testmessage.c
index 51aefce64..8ac427097 100644
--- a/test/testmessage.c
+++ b/test/testmessage.c
@@ -94,6 +94,7 @@ main(int argc, char *argv[])
         return (1);
     }
 
+#if 0
     success = SDL_ShowSimpleMessageBox(SDL_MESSAGEBOX_ERROR,
                 "Simple MessageBox",
                 "This is a simple error MessageBox",
@@ -134,9 +135,7 @@ main(int argc, char *argv[])
 
     button_messagebox(NULL);
 
-    /* Technically this isn't a supported operation for the API, but it doesn't
-     * hurt for it to work.
-     */
+    /* Test showing a message box from a background thread */
     {
         int status = 0;
         SDL_Event event;
@@ -154,6 +153,29 @@ main(int argc, char *argv[])
 
         printf("Message box thread return %i\n", status);
     }
+#endif
+
+    /* Test showing a message box with a parent window */
+    {
+        SDL_Event event;
+        SDL_Window *window = SDL_CreateWindow("Test", SDL_WINDOWPOS_CENTERED, SDL_WINDOWPOS_CENTERED, 640, 480, SDL_WINDOW_SHOWN);
+
+        success = SDL_ShowSimpleMessageBox(SDL_MESSAGEBOX_ERROR,
+                    "Simple MessageBox",
+                    "This is a simple error MessageBox with a parent window",
+                    window);
+        if (success == -1) {
+            printf("Error Presenting MessageBox: %s\n", SDL_GetError());
+            quit(1);
+        }
+
+        while (SDL_WaitEvent(&event))
+        {
+            if (event.type == SDL_QUIT || event.type == SDL_KEYUP) {
+                break;
+            }
+        }
+    }
 
     SDL_Quit();
     return (0);

From 7bc74ebaa47a1fbcceee76e79b1dacf5de91787f Mon Sep 17 00:00:00 2001
From: Sam Lantinga 
Date: Sun, 14 Jul 2013 11:58:57 -0700
Subject: [PATCH 369/542] Fixed bug 1970 - Cocoa message boxes ignore parent
 window requests

Ryan C. Gordon

Cocoa_ShowMessageBox() ignores the "window" field of SDL_MessageBoxData, which means you can't assign a parent window to a message box. This is particularly egregious on Mac OS X, because it'll actually make the NSAlert visually part of the parent window instead of just concerning itself with window focus.
---
 src/video/cocoa/SDL_cocoamessagebox.m | 33 ++++++++++++++++++++++++---
 1 file changed, 30 insertions(+), 3 deletions(-)

diff --git a/src/video/cocoa/SDL_cocoamessagebox.m b/src/video/cocoa/SDL_cocoamessagebox.m
index ec4c55f61..78b80ae69 100644
--- a/src/video/cocoa/SDL_cocoamessagebox.m
+++ b/src/video/cocoa/SDL_cocoamessagebox.m
@@ -29,21 +29,33 @@
 #undef pixel
 #endif
 
+#include "SDL_events.h"
+#include "SDL_timer.h"
 #include "SDL_messagebox.h"
 #include "SDL_cocoavideo.h"
 
 @interface SDLMessageBoxPresenter : NSObject {
 @public
     NSInteger clicked;
+    NSWindow *nswindow;
 }
+- (id) initWithParentWindow:(SDL_Window *)window;
+- (void) alertDidEnd:(NSAlert *)alert returnCode:(NSInteger)returnCode contextInfo:(void *)contextInfo;
 @end
 
 @implementation SDLMessageBoxPresenter
-- (id)init
+- (id) initWithParentWindow:(SDL_Window *)window
 {
     self = [super init];
     if (self) {
         clicked = -1;
+
+        /* Retain the NSWindow because we'll show the alert later on the main thread */
+        if (window) {
+            nswindow = [((SDL_WindowData *) window->driverdata)->nswindow retain];
+        } else {
+            nswindow = NULL;
+        }
     }
 
     return self;
@@ -51,8 +63,23 @@
 
 - (void)showAlert:(NSAlert*)alert
 {
-    clicked = [alert runModal];
+    if (nswindow) {
+        [alert beginSheetModalForWindow:nswindow modalDelegate:self didEndSelector:@selector(alertDidEnd:returnCode:contextInfo:) contextInfo:nil];
+        while (clicked < 0) {
+            SDL_PumpEvents();
+            SDL_Delay(100);
+        }
+        [nswindow release];
+    } else {
+        clicked = [alert runModal];
+    }
 }
+
+- (void) alertDidEnd:(NSAlert *)alert returnCode:(NSInteger)returnCode contextInfo:(void *)contextInfo
+{
+    clicked = returnCode;
+}
+
 @end
 
 
@@ -90,7 +117,7 @@ Cocoa_ShowMessageBox(const SDL_MessageBoxData *messageboxdata, int *buttonid)
         }
     }
 
-    SDLMessageBoxPresenter* presenter = [[[SDLMessageBoxPresenter alloc] init] autorelease];
+    SDLMessageBoxPresenter* presenter = [[[SDLMessageBoxPresenter alloc] initWithParentWindow:messageboxdata->window] autorelease];
 
     [presenter performSelectorOnMainThread:@selector(showAlert:)
                                 withObject:alert

From 87baf66d180dcd5c17a255a331eda2b5e311aee4 Mon Sep 17 00:00:00 2001
From: Sam Lantinga 
Date: Sun, 14 Jul 2013 12:16:10 -0700
Subject: [PATCH 370/542] Re-enabled other messagebox tests, moved the
 SDL_Init() call as late as possible to show the circumstances where it's
 needed.

---
 test/testmessage.c | 21 +++++++++++----------
 1 file changed, 11 insertions(+), 10 deletions(-)

diff --git a/test/testmessage.c b/test/testmessage.c
index 8ac427097..7e4c561f7 100644
--- a/test/testmessage.c
+++ b/test/testmessage.c
@@ -60,7 +60,7 @@ button_messagebox(void *eventNumber)
         data.message = "This is a custom messagebox from a background thread.";
     }
 
-    success =SDL_ShowMessageBox(&data, &button);
+    success = SDL_ShowMessageBox(&data, &button);
     if (success == -1) {
         printf("Error Presenting MessageBox: %s\n", SDL_GetError());
         if (eventNumber) {
@@ -88,13 +88,6 @@ main(int argc, char *argv[])
 {
     int success;
 
-    /* Load the SDL library */
-    if (SDL_Init(SDL_INIT_VIDEO) < 0) {
-        fprintf(stderr, "Couldn't initialize SDL: %s\n", SDL_GetError());
-        return (1);
-    }
-
-#if 0
     success = SDL_ShowSimpleMessageBox(SDL_MESSAGEBOX_ERROR,
                 "Simple MessageBox",
                 "This is a simple error MessageBox",
@@ -135,7 +128,16 @@ main(int argc, char *argv[])
 
     button_messagebox(NULL);
 
-    /* Test showing a message box from a background thread */
+    /* Test showing a message box from a background thread.
+
+       On Mac OS X, the video subsystem needs to be initialized for this
+       to work, since the message box events are dispatched by the Cocoa
+       subsystem on the main thread.
+     */
+    if (SDL_Init(SDL_INIT_VIDEO) < 0) {
+        fprintf(stderr, "Couldn't initialize SDL video subsystem: %s\n", SDL_GetError());
+        return (1);
+    }
     {
         int status = 0;
         SDL_Event event;
@@ -153,7 +155,6 @@ main(int argc, char *argv[])
 
         printf("Message box thread return %i\n", status);
     }
-#endif
 
     /* Test showing a message box with a parent window */
     {

From e5ffe6b63311b1e970fa219c4f12cd4b1551d990 Mon Sep 17 00:00:00 2001
From: =?UTF-8?q?J=C3=B8rgen=20P=2E=20Tjern=C3=B8?=
 
Date: Sun, 14 Jul 2013 15:46:43 -0700
Subject: [PATCH 371/542] Fix #1667: Docs about SDL_CreateWindow and flags.

Updates the docs to say you can use SDL_WINDOW_HIDDEN, instead of (the ignored)
SDL_WINDOW_SHOWN.
---
 include/SDL_video.h | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/include/SDL_video.h b/include/SDL_video.h
index 39e01c465..f3a961977 100644
--- a/include/SDL_video.h
+++ b/include/SDL_video.h
@@ -394,7 +394,7 @@ extern DECLSPEC Uint32 SDLCALL SDL_GetWindowPixelFormat(SDL_Window * window);
  *  \param h     The height of the window.
  *  \param flags The flags for the window, a mask of any of the following:
  *               ::SDL_WINDOW_FULLSCREEN, ::SDL_WINDOW_OPENGL,
- *               ::SDL_WINDOW_SHOWN,      ::SDL_WINDOW_BORDERLESS,
+ *               ::SDL_WINDOW_HIDDEN,     ::SDL_WINDOW_BORDERLESS,
  *               ::SDL_WINDOW_RESIZABLE,  ::SDL_WINDOW_MAXIMIZED,
  *               ::SDL_WINDOW_MINIMIZED,  ::SDL_WINDOW_INPUT_GRABBED.
  *

From 901d874a2b35f43146ae7577bb88620e7982357e Mon Sep 17 00:00:00 2001
From: =?UTF-8?q?J=C3=B8rgen=20P=2E=20Tjern=C3=B8?=
 
Date: Sun, 14 Jul 2013 15:55:34 -0700
Subject: [PATCH 372/542] Fix #1445: Use xcrun to find CpMac

This should make the DMG building step more reliable on all current and future
Xcodes, by using xcrun to find the path to CpMac.
---
 Xcode/SDL/SDL.xcodeproj/project.pbxproj | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/Xcode/SDL/SDL.xcodeproj/project.pbxproj b/Xcode/SDL/SDL.xcodeproj/project.pbxproj
index c2552eff4..09631ea5a 100755
--- a/Xcode/SDL/SDL.xcodeproj/project.pbxproj
+++ b/Xcode/SDL/SDL.xcodeproj/project.pbxproj
@@ -2290,7 +2290,7 @@
 			);
 			runOnlyForDeploymentPostprocessing = 0;
 			shellPath = /bin/sh;
-			shellScript = "# clean up the framework, remove headers, extra files\nmkdir -p build/dmg-tmp\n`xcode-select -print-path`/Tools/CpMac -r $TARGET_BUILD_DIR/SDL2.framework build/dmg-tmp/\n\ncp pkg-support/resources/License.txt build/dmg-tmp\ncp pkg-support/resources/ReadMe.txt build/dmg-tmp\n\n# remove the .DS_Store files if any (we may want to provide one in the future for fancy .dmgs)\nfind build/dmg-tmp -name .DS_Store -exec rm -f \"{}\" \\;\n\n# for fancy .dmg\nmkdir -p build/dmg-tmp/.logo\ncp pkg-support/resources/SDL_DS_Store build/dmg-tmp/.DS_Store\ncp pkg-support/sdl_logo.pdf build/dmg-tmp/.logo\n\n# create the dmg\nhdiutil create -ov -fs HFS+ -volname SDL2 -srcfolder build/dmg-tmp build/SDL2.dmg\n\n# clean up\nrm -rf build/dmg-tmp";
+			shellScript = "# clean up the framework, remove headers, extra files\nmkdir -p build/dmg-tmp\nxcrun CpMac -r $TARGET_BUILD_DIR/SDL2.framework build/dmg-tmp/\n\ncp pkg-support/resources/License.txt build/dmg-tmp\ncp pkg-support/resources/ReadMe.txt build/dmg-tmp\n\n# remove the .DS_Store files if any (we may want to provide one in the future for fancy .dmgs)\nfind build/dmg-tmp -name .DS_Store -exec rm -f \"{}\" \\;\n\n# for fancy .dmg\nmkdir -p build/dmg-tmp/.logo\ncp pkg-support/resources/SDL_DS_Store build/dmg-tmp/.DS_Store\ncp pkg-support/sdl_logo.pdf build/dmg-tmp/.logo\n\n# create the dmg\nhdiutil create -ov -fs HFS+ -volname SDL2 -srcfolder build/dmg-tmp build/SDL2.dmg\n\n# clean up\nrm -rf build/dmg-tmp";
 		};
 /* End PBXShellScriptBuildPhase section */
 

From 8f4fb24e2d2aa433035269fa84695e35149df2dd Mon Sep 17 00:00:00 2001
From: "Ryan C. Gordon" 
Date: Sun, 14 Jul 2013 21:30:16 -0400
Subject: [PATCH 373/542] Make winmm and directsound audio targets robust
 against unsupported formats.

It now tries to make sure the hardware can support a given format, and if it
 can't, it carries on to the next best format instead of failing completely.

--HG--
extra : rebase_source : 7b4e61c8030d1e1ce4c926bc0abc9b4d4af11dd9
---
 src/audio/directsound/SDL_directsound.c | 92 ++++++++++++-------------
 src/audio/winmm/SDL_winmm.c             | 66 ++++++++++--------
 2 files changed, 84 insertions(+), 74 deletions(-)

diff --git a/src/audio/directsound/SDL_directsound.c b/src/audio/directsound/SDL_directsound.c
index f08204494..686d46615 100644
--- a/src/audio/directsound/SDL_directsound.c
+++ b/src/audio/directsound/SDL_directsound.c
@@ -346,7 +346,7 @@ DSOUND_CloseDevice(_THIS)
    number of audio chunks available in the created buffer.
 */
 static int
-CreateSecondary(_THIS, HWND focus, WAVEFORMATEX * wavefmt)
+CreateSecondary(_THIS, HWND focus)
 {
     LPDIRECTSOUND sndObj = this->hidden->sound;
     LPDIRECTSOUNDBUFFER *sndbuf = &this->hidden->mixbuf;
@@ -356,6 +356,24 @@ CreateSecondary(_THIS, HWND focus, WAVEFORMATEX * wavefmt)
     DSBUFFERDESC format;
     LPVOID pvAudioPtr1, pvAudioPtr2;
     DWORD dwAudioBytes1, dwAudioBytes2;
+    WAVEFORMATEX wfmt;
+
+    SDL_zero(wfmt);
+
+    if (SDL_AUDIO_ISFLOAT(this->spec.format)) {
+        wfmt.wFormatTag = WAVE_FORMAT_IEEE_FLOAT;
+    } else {
+        wfmt.wFormatTag = WAVE_FORMAT_PCM;
+    }
+
+    wfmt.wBitsPerSample = SDL_AUDIO_BITSIZE(this->spec.format);
+    wfmt.nChannels = this->spec.channels;
+    wfmt.nSamplesPerSec = this->spec.freq;
+    wfmt.nBlockAlign = wfmt.nChannels * (wfmt.wBitsPerSample / 8);
+    wfmt.nAvgBytesPerSec = wfmt.nSamplesPerSec * wfmt.nBlockAlign;
+
+    /* Update the fragment size as size in bytes */
+    SDL_CalculateAudioSpec(&this->spec);
 
     /* Try to set primary mixing privileges */
     if (focus) {
@@ -371,7 +389,7 @@ CreateSecondary(_THIS, HWND focus, WAVEFORMATEX * wavefmt)
     }
 
     /* Try to create the secondary buffer */
-    SDL_memset(&format, 0, sizeof(format));
+    SDL_zero(format);
     format.dwSize = sizeof(format);
     format.dwFlags = DSBCAPS_GETCURRENTPOSITION2;
     if (!focus) {
@@ -386,12 +404,12 @@ CreateSecondary(_THIS, HWND focus, WAVEFORMATEX * wavefmt)
                             DSBSIZE_MIN / numchunks, DSBSIZE_MAX / numchunks);
     }
     format.dwReserved = 0;
-    format.lpwfxFormat = wavefmt;
+    format.lpwfxFormat = &wfmt;
     result = IDirectSound_CreateSoundBuffer(sndObj, &format, sndbuf, NULL);
     if (result != DS_OK) {
         return SetDSerror("DirectSound CreateSoundBuffer", result);
     }
-    IDirectSoundBuffer_SetFormat(*sndbuf, wavefmt);
+    IDirectSoundBuffer_SetFormat(*sndbuf, &wfmt);
 
     /* Silence the initial audio buffer */
     result = IDirectSoundBuffer_Lock(*sndbuf, 0, format.dwBufferBytes,
@@ -437,8 +455,8 @@ static int
 DSOUND_OpenDevice(_THIS, const char *devname, int iscapture)
 {
     HRESULT result;
-    WAVEFORMATEX waveformat;
-    int valid_format = 0;
+    SDL_bool valid_format = SDL_FALSE;
+    SDL_bool tried_format = SDL_FALSE;
     SDL_AudioFormat test_format = SDL_FirstAudioFormat(this->spec.format);
     FindDevGUIDData devguid;
     LPGUID guid = NULL;
@@ -465,42 +483,6 @@ DSOUND_OpenDevice(_THIS, const char *devname, int iscapture)
     }
     SDL_memset(this->hidden, 0, (sizeof *this->hidden));
 
-    while ((!valid_format) && (test_format)) {
-        switch (test_format) {
-        case AUDIO_U8:
-        case AUDIO_S16:
-        case AUDIO_S32:
-        case AUDIO_F32:
-            this->spec.format = test_format;
-            valid_format = 1;
-            break;
-        }
-        test_format = SDL_NextAudioFormat();
-    }
-
-    if (!valid_format) {
-        DSOUND_CloseDevice(this);
-        return SDL_SetError("DirectSound: Unsupported audio format");
-    }
-
-    SDL_memset(&waveformat, 0, sizeof(waveformat));
-
-    if (SDL_AUDIO_ISFLOAT(this->spec.format))
-        waveformat.wFormatTag = WAVE_FORMAT_IEEE_FLOAT;
-    else
-        waveformat.wFormatTag = WAVE_FORMAT_PCM;
-
-    waveformat.wBitsPerSample = SDL_AUDIO_BITSIZE(this->spec.format);
-    waveformat.nChannels = this->spec.channels;
-    waveformat.nSamplesPerSec = this->spec.freq;
-    waveformat.nBlockAlign =
-        waveformat.nChannels * (waveformat.wBitsPerSample / 8);
-    waveformat.nAvgBytesPerSec =
-        waveformat.nSamplesPerSec * waveformat.nBlockAlign;
-
-    /* Update the fragment size as size in bytes */
-    SDL_CalculateAudioSpec(&this->spec);
-
     /* Open the audio device */
     result = pDirectSoundCreate8(guid, &this->hidden->sound, NULL);
     if (result != DS_OK) {
@@ -508,11 +490,29 @@ DSOUND_OpenDevice(_THIS, const char *devname, int iscapture)
         return SetDSerror("DirectSoundCreate", result);
     }
 
-    /* Create the audio buffer to which we write */
-    this->hidden->num_buffers = CreateSecondary(this, NULL, &waveformat);
-    if (this->hidden->num_buffers < 0) {
+    while ((!valid_format) && (test_format)) {
+        switch (test_format) {
+        case AUDIO_U8:
+        case AUDIO_S16:
+        case AUDIO_S32:
+        case AUDIO_F32:
+            tried_format = SDL_TRUE;
+            this->spec.format = test_format;
+            this->hidden->num_buffers = CreateSecondary(this, NULL);
+            if (this->hidden->num_buffers > 0) {
+                valid_format = SDL_TRUE;
+            }
+            break;
+        }
+        test_format = SDL_NextAudioFormat();
+    }
+
+    if (!valid_format) {
         DSOUND_CloseDevice(this);
-        return -1;
+        if (tried_format) {
+            return -1;  // CreateSecondary() should have called SDL_SetError().
+        }
+        return SDL_SetError("DirectSound: Unsupported audio format");
     }
 
     /* The buffer will auto-start playing in DSOUND_WaitDevice() */
diff --git a/src/audio/winmm/SDL_winmm.c b/src/audio/winmm/SDL_winmm.c
index dc7336b2b..9c8da7ae2 100644
--- a/src/audio/winmm/SDL_winmm.c
+++ b/src/audio/winmm/SDL_winmm.c
@@ -197,6 +197,30 @@ WINMM_CloseDevice(_THIS)
     }
 }
 
+static SDL_bool
+PrepWaveFormat(_THIS, UINT_PTR devId, WAVEFORMATEX *pfmt, const int iscapture)
+{
+    SDL_zerop(pfmt);
+
+    if (SDL_AUDIO_ISFLOAT(this->spec.format)) {
+        pfmt->wFormatTag = WAVE_FORMAT_IEEE_FLOAT;
+    } else {
+        pfmt->wFormatTag = WAVE_FORMAT_PCM;
+    }
+    pfmt->wBitsPerSample = SDL_AUDIO_BITSIZE(this->spec.format);
+
+    pfmt->nChannels = this->spec.channels;
+    pfmt->nSamplesPerSec = this->spec.freq;
+    pfmt->nBlockAlign = pfmt->nChannels * (pfmt->wBitsPerSample / 8);
+    pfmt->nAvgBytesPerSec = pfmt->nSamplesPerSec * pfmt->nBlockAlign;
+
+    if (iscapture) {
+        return (waveInOpen(0, devId, pfmt, 0, 0, WAVE_FORMAT_QUERY) == 0);
+    } else {
+        return (waveOutOpen(0, devId, pfmt, 0, 0, WAVE_FORMAT_QUERY) == 0);
+    }
+}
+
 static int
 WINMM_OpenDevice(_THIS, const char *devname, int iscapture)
 {
@@ -254,18 +278,28 @@ WINMM_OpenDevice(_THIS, const char *devname, int iscapture)
     for (i = 0; i < NUM_BUFFERS; ++i)
         this->hidden->wavebuf[i].dwUser = 0xFFFF;
 
+    if (this->spec.channels > 2)
+        this->spec.channels = 2;        /* !!! FIXME: is this right? */
+
+    /* Check the buffer size -- minimum of 1/4 second (word aligned) */
+    if (this->spec.samples < (this->spec.freq / 4))
+        this->spec.samples = ((this->spec.freq / 4) + 3) & ~3;
+
     while ((!valid_datatype) && (test_format)) {
-        valid_datatype = 1;
-        this->spec.format = test_format;
         switch (test_format) {
         case AUDIO_U8:
         case AUDIO_S16:
         case AUDIO_S32:
         case AUDIO_F32:
-            break;              /* valid. */
+            this->spec.format = test_format;
+            if (PrepWaveFormat(this, devId, &waveformat, iscapture)) {
+                valid_datatype = 1;
+            } else {
+                test_format = SDL_NextAudioFormat();
+            }
+            break;
 
         default:
-            valid_datatype = 0;
             test_format = SDL_NextAudioFormat();
             break;
         }
@@ -276,30 +310,6 @@ WINMM_OpenDevice(_THIS, const char *devname, int iscapture)
         return SDL_SetError("Unsupported audio format");
     }
 
-    /* Set basic WAVE format parameters */
-    SDL_memset(&waveformat, '\0', sizeof(waveformat));
-
-    if (SDL_AUDIO_ISFLOAT(this->spec.format))
-        waveformat.wFormatTag = WAVE_FORMAT_IEEE_FLOAT;
-    else
-        waveformat.wFormatTag = WAVE_FORMAT_PCM;
-
-    waveformat.wBitsPerSample = SDL_AUDIO_BITSIZE(this->spec.format);
-
-    if (this->spec.channels > 2)
-        this->spec.channels = 2;        /* !!! FIXME: is this right? */
-
-    waveformat.nChannels = this->spec.channels;
-    waveformat.nSamplesPerSec = this->spec.freq;
-    waveformat.nBlockAlign =
-        waveformat.nChannels * (waveformat.wBitsPerSample / 8);
-    waveformat.nAvgBytesPerSec =
-        waveformat.nSamplesPerSec * waveformat.nBlockAlign;
-
-    /* Check the buffer size -- minimum of 1/4 second (word aligned) */
-    if (this->spec.samples < (this->spec.freq / 4))
-        this->spec.samples = ((this->spec.freq / 4) + 3) & ~3;
-
     /* Update the fragment size as size in bytes */
     SDL_CalculateAudioSpec(&this->spec);
 

From 52b4a550494259167149604bcbe3fe4654d0191f Mon Sep 17 00:00:00 2001
From: "Ryan C. Gordon" 
Date: Mon, 15 Jul 2013 01:12:15 -0400
Subject: [PATCH 374/542] Minor indentation clean up.

---
 src/video/x11/SDL_x11opengl.c | 12 +++++++-----
 1 file changed, 7 insertions(+), 5 deletions(-)

diff --git a/src/video/x11/SDL_x11opengl.c b/src/video/x11/SDL_x11opengl.c
index 947000f90..1ccc66c4e 100644
--- a/src/video/x11/SDL_x11opengl.c
+++ b/src/video/x11/SDL_x11opengl.c
@@ -383,7 +383,7 @@ X11_GL_GetAttributes(_THIS, Display * display, int screen, int * attribs, int si
     /* Setup our GLX attributes according to the gl_config. */
     if( for_FBConfig ) {
         attribs[i++] = GLX_RENDER_TYPE;
-    attribs[i++] = GLX_RGBA_BIT;
+        attribs[i++] = GLX_RGBA_BIT;
     } else {
         attribs[i++] = GLX_RGBA;
     }
@@ -401,8 +401,9 @@ X11_GL_GetAttributes(_THIS, Display * display, int screen, int * attribs, int si
 
     if (_this->gl_config.double_buffer) {
         attribs[i++] = GLX_DOUBLEBUFFER;
-    if( for_FBConfig )
-        attribs[i++] = True;
+        if( for_FBConfig ) {
+            attribs[i++] = True;
+        }
     }
 
     attribs[i++] = GLX_DEPTH_SIZE;
@@ -435,8 +436,9 @@ X11_GL_GetAttributes(_THIS, Display * display, int screen, int * attribs, int si
 
     if (_this->gl_config.stereo) {
         attribs[i++] = GLX_STEREO;
-    if( for_FBConfig )
-        attribs[i++] = True;
+        if( for_FBConfig ) {
+            attribs[i++] = True;
+        }
     }
 
     if (_this->gl_config.multisamplebuffers) {

From 5772df05d2e5374fd12d697c34ac198d0e4d2a90 Mon Sep 17 00:00:00 2001
From: "Ryan C. Gordon" 
Date: Mon, 15 Jul 2013 14:38:19 -0400
Subject: [PATCH 375/542] Turn the system mouse cursor back on before
 VideoQuit().

This is good policy, so it doesn't have a chance to leave it hidden on targets
 that wouldn't necessarily reset it by default, but it also fixes a crash if
 you try to use a message box after SDL_Quit() is called.

Fixes Bugzilla #1969.
---
 src/video/SDL_video.c | 2 ++
 1 file changed, 2 insertions(+)

diff --git a/src/video/SDL_video.c b/src/video/SDL_video.c
index 8b3c2f073..d2b94898c 100644
--- a/src/video/SDL_video.c
+++ b/src/video/SDL_video.c
@@ -2247,6 +2247,8 @@ SDL_VideoQuit(void)
 
     SDL_EnableScreenSaver();
 
+    SDL_ShowCursor(1);
+
     /* Clean up the system video */
     while (_this->windows) {
         SDL_DestroyWindow(_this->windows);

From 2bfb40265926e684e9dbc40dc88d970361352a8c Mon Sep 17 00:00:00 2001
From: =?UTF-8?q?J=C3=B8rgen=20P=2E=20Tjern=C3=B8?=
 
Date: Mon, 15 Jul 2013 11:57:18 -0700
Subject: [PATCH 376/542] Mac: Fix SDL_WarpMouseInWindow in fullscreen.

If you switched from a window to fullscreen, your SDL_WarpMouseInWindow
calls would be offset by the x and y coordinates of the original window.
---
 src/video/cocoa/SDL_cocoamouse.m | 9 ++++++---
 1 file changed, 6 insertions(+), 3 deletions(-)

diff --git a/src/video/cocoa/SDL_cocoamouse.m b/src/video/cocoa/SDL_cocoamouse.m
index 58b666f03..b79663b25 100644
--- a/src/video/cocoa/SDL_cocoamouse.m
+++ b/src/video/cocoa/SDL_cocoamouse.m
@@ -201,10 +201,13 @@ static void
 Cocoa_WarpMouse(SDL_Window * window, int x, int y)
 {
     SDL_Mouse *mouse = SDL_GetMouse();
-    CGPoint point;
+    CGPoint point = CGMakePoint(x, y);
 
-    point.x = (float)window->x + x;
-    point.y = (float)window->y + y;
+    if (!(window->flags & SDL_WINDOW_FULLSCREEN))
+    {
+        point.x += window->x;
+        point.y += window->y;
+    }
 
     {
         /* This makes Cocoa_HandleMouseEvent ignore this delta in the next

From 7aa0cf9eaaec7f4cf335db2c48765d8b5080b259 Mon Sep 17 00:00:00 2001
From: =?UTF-8?q?J=C3=B8rgen=20P=2E=20Tjern=C3=B8?=
 
Date: Mon, 15 Jul 2013 11:58:45 -0700
Subject: [PATCH 377/542] Mac: CGMakePoint -> CGPointMake in previous change.

---
 src/video/cocoa/SDL_cocoamouse.m | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/src/video/cocoa/SDL_cocoamouse.m b/src/video/cocoa/SDL_cocoamouse.m
index b79663b25..12e755cf9 100644
--- a/src/video/cocoa/SDL_cocoamouse.m
+++ b/src/video/cocoa/SDL_cocoamouse.m
@@ -201,7 +201,7 @@ static void
 Cocoa_WarpMouse(SDL_Window * window, int x, int y)
 {
     SDL_Mouse *mouse = SDL_GetMouse();
-    CGPoint point = CGMakePoint(x, y);
+    CGPoint point = CGPointMake(x, y);
 
     if (!(window->flags & SDL_WINDOW_FULLSCREEN))
     {

From 074edba0c11fcde0ba0e0ec903637ca6a54e76dc Mon Sep 17 00:00:00 2001
From: =?UTF-8?q?J=C3=B8rgen=20P=2E=20Tjern=C3=B8?=
 
Date: Mon, 15 Jul 2013 11:58:49 -0700
Subject: [PATCH 378/542] Mac: Bring back FS windows when appropriate

This automatically restores FS windows when the application is made
active (Cmd-Tab, you click the Dock icon, or you launch the .app again).
---
 src/video/cocoa/SDL_cocoaevents.m | 28 ++++++++++++++++++++++++++++
 1 file changed, 28 insertions(+)

diff --git a/src/video/cocoa/SDL_cocoaevents.m b/src/video/cocoa/SDL_cocoaevents.m
index e952a9e9f..19bd6f7fc 100644
--- a/src/video/cocoa/SDL_cocoaevents.m
+++ b/src/video/cocoa/SDL_cocoaevents.m
@@ -43,6 +43,7 @@
 
 @interface SDLAppDelegate : NSObject
 - (NSApplicationTerminateReply)applicationShouldTerminate:(NSApplication *)sender;
+- (void)applicationDidBecomeActive:(NSNotification *)aNotification;
 @end
 
 @implementation SDLAppDelegate : NSObject
@@ -52,6 +53,33 @@
     return NSTerminateCancel;
 }
 
+- (void)applicationDidBecomeActive:(NSNotification *)aNotification
+{
+    SDL_VideoDevice *device = SDL_GetVideoDevice();
+    if (device && device->windows)
+    {
+        SDL_Window *window = device->windows;
+        int i;
+        for (i = 0; i < device->num_displays; ++i)
+        {
+            SDL_Window *fullscreen_window = device->displays[i].fullscreen_window;
+            if (fullscreen_window)
+            {
+                if (fullscreen_window->flags & SDL_WINDOW_MINIMIZED) {
+                    SDL_RestoreWindow(fullscreen_window);
+                }
+                return;
+            }
+        }
+
+        if (window->flags & SDL_WINDOW_MINIMIZED) {
+            SDL_RestoreWindow(window);
+        } else {
+            SDL_RaiseWindow(window);
+        }
+    }
+}
+
 - (BOOL)application:(NSApplication *)theApplication openFile:(NSString *)filename
 {
     return (BOOL)SDL_SendDropFile([filename UTF8String]);

From 74e135563774de463ef0604de86ee561f10ccb99 Mon Sep 17 00:00:00 2001
From: Philipp Wiesemann 
Date: Mon, 15 Jul 2013 23:00:47 +0200
Subject: [PATCH 379/542] Changed strdup() to SDL_strdup().

---
 src/main/android/SDL_android_main.cpp | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/src/main/android/SDL_android_main.cpp b/src/main/android/SDL_android_main.cpp
index 5f3abbab8..48e220f19 100644
--- a/src/main/android/SDL_android_main.cpp
+++ b/src/main/android/SDL_android_main.cpp
@@ -25,7 +25,7 @@ extern "C" void Java_org_libsdl_app_SDLActivity_nativeInit(JNIEnv* env, jclass c
     /* Run the application code! */
     int status;
     char *argv[2];
-    argv[0] = strdup("SDL_app");
+    argv[0] = SDL_strdup("SDL_app");
     argv[1] = NULL;
     status = SDL_main(1, argv);
 

From 5256d2e392c43a371491cd9b46a2f794b1cad097 Mon Sep 17 00:00:00 2001
From: "Ryan C. Gordon" 
Date: Mon, 15 Jul 2013 20:30:04 -0400
Subject: [PATCH 380/542] Made PND_setwindowgrab() a no-op. It was a cut/paste
 of PND_destroywindow().

This looks like the rest of the code doesn't deal with windows, and probably
 just deals with a single fullscreen GLES context, like a console would, so
 making setwindowgrab a no-op makes sense in this case; it's already "grabbed."

Fixes Bugzilla #1850.

--HG--
extra : rebase_source : 29b07b9c8378f69fb8b5f201584befd8d7f005dd
---
 src/video/pandora/SDL_pandora.c | 2 --
 1 file changed, 2 deletions(-)

diff --git a/src/video/pandora/SDL_pandora.c b/src/video/pandora/SDL_pandora.c
index 17c761bd6..1ebf82952 100644
--- a/src/video/pandora/SDL_pandora.c
+++ b/src/video/pandora/SDL_pandora.c
@@ -294,8 +294,6 @@ PND_restorewindow(_THIS, SDL_Window * window)
 void
 PND_setwindowgrab(_THIS, SDL_Window * window)
 {
-    SDL_VideoData *phdata = (SDL_VideoData *) _this->driverdata;
-    eglTerminate(phdata->egl_display);
 }
 void
 PND_destroywindow(_THIS, SDL_Window * window)

From 3f15d37da207fed2c710b3e7fe14d0aaee887d4c Mon Sep 17 00:00:00 2001
From: =?UTF-8?q?J=C3=B8rgen=20P=2E=20Tjern=C3=B8?=
 
Date: Tue, 16 Jul 2013 01:02:51 -0700
Subject: [PATCH 381/542] Mac: Handle SDL_CreateWindow with
 SDL_WINDOW_MINIMZED.

This fixes bug #1446. You can now create a window with SDL_CreateWindow(...,
SDL_WINDOW_MINIMIZED), and not have it immediately restore itself.

It also changes SDL_RaiseWindow() to be a no-op on minimized or hidden windows,
which is how it behaves on Windows.
---
 src/video/cocoa/SDL_cocoaevents.m | 27 ++++++++++++++++++++++++++-
 src/video/cocoa/SDL_cocoawindow.m |  6 +++++-
 2 files changed, 31 insertions(+), 2 deletions(-)

diff --git a/src/video/cocoa/SDL_cocoaevents.m b/src/video/cocoa/SDL_cocoaevents.m
index 19bd6f7fc..61d6e1596 100644
--- a/src/video/cocoa/SDL_cocoaevents.m
+++ b/src/video/cocoa/SDL_cocoaevents.m
@@ -41,12 +41,27 @@
 - (void)setAppleMenu:(NSMenu *)menu;
 @end
 
-@interface SDLAppDelegate : NSObject
+@interface SDLAppDelegate : NSObject {
+    BOOL seenFirstActivate;
+}
+
+- (id)init;
 - (NSApplicationTerminateReply)applicationShouldTerminate:(NSApplication *)sender;
 - (void)applicationDidBecomeActive:(NSNotification *)aNotification;
 @end
 
 @implementation SDLAppDelegate : NSObject
+- (id)init
+{
+    self = [super init];
+
+    if (self) {
+        seenFirstActivate = NO;
+    }
+
+    return self;
+}
+
 - (NSApplicationTerminateReply)applicationShouldTerminate:(NSApplication *)sender
 {
     SDL_SendQuit();
@@ -55,6 +70,16 @@
 
 - (void)applicationDidBecomeActive:(NSNotification *)aNotification
 {
+    /* HACK: Ignore the first call. The application gets a
+     * applicationDidBecomeActive: a little bit after the first window is
+     * created, and if we don't ignore it, a window that has been created with
+     * SDL_WINDOW_MINIZED will ~immediately be restored.
+     */
+    if (!seenFirstActivate) {
+        seenFirstActivate = YES;
+        return;
+    }
+
     SDL_VideoDevice *device = SDL_GetVideoDevice();
     if (device && device->windows)
     {
diff --git a/src/video/cocoa/SDL_cocoawindow.m b/src/video/cocoa/SDL_cocoawindow.m
index df3881407..a48a074ea 100644
--- a/src/video/cocoa/SDL_cocoawindow.m
+++ b/src/video/cocoa/SDL_cocoawindow.m
@@ -866,8 +866,12 @@ Cocoa_RaiseWindow(_THIS, SDL_Window * window)
     SDL_WindowData *windowData = ((SDL_WindowData *) window->driverdata);
     NSWindow *nswindow = windowData->nswindow;
 
+    // makeKeyAndOrderFront: has the side-effect of deminiaturizing and showing
+    // a minimized or hidden window, so check for that before showing it.
     [windowData->listener pauseVisibleObservation];
-    [nswindow makeKeyAndOrderFront:nil];
+    if (![nswindow isMiniaturized] && [nswindow isVisible]) {
+        [nswindow makeKeyAndOrderFront:nil];
+    }
     [windowData->listener resumeVisibleObservation];
 
     [pool release];

From 600c62cf3030ed28c12390b5f3c34746e7358657 Mon Sep 17 00:00:00 2001
From: "Ryan C. Gordon" 
Date: Thu, 18 Jul 2013 22:20:09 -0400
Subject: [PATCH 382/542] Added finger events to SDLTest_PrintEvent().

--HG--
extra : amend_source : 8e28c43eebf02b49e3f4502311a089090e65f2a6
---
 src/test/SDL_test_common.c | 14 ++++++++++++--
 1 file changed, 12 insertions(+), 2 deletions(-)

diff --git a/src/test/SDL_test_common.c b/src/test/SDL_test_common.c
index 35d177e0e..f89db234b 100644
--- a/src/test/SDL_test_common.c
+++ b/src/test/SDL_test_common.c
@@ -930,8 +930,8 @@ SDLTest_CommonInit(SDLTest_CommonState * state)
 static void
 SDLTest_PrintEvent(SDL_Event * event)
 {
-    if (event->type == SDL_MOUSEMOTION) {
-        /* Mouse motion is really spammy */
+    if ((event->type == SDL_MOUSEMOTION) || (event->type == SDL_FINGERMOTION)) {
+        /* Mouse and finger motion are really spammy */
         return;
     }
 
@@ -1089,6 +1089,16 @@ SDLTest_PrintEvent(SDL_Event * event)
     case SDL_CLIPBOARDUPDATE:
         fprintf(stderr, "Clipboard updated");
         break;
+
+    case SDL_FINGERDOWN:
+    case SDL_FINGERUP:
+        fprintf(stderr, "Finger: %s touch=%lld, finger=%lld, x=%f, y=%f, dx=%f, dy=%f, pressure=%f",
+                (event->type == SDL_FINGERDOWN) ? "down" : "up",
+                event->tfinger.touchId, event->tfinger.fingerId,
+                event->tfinger.x, event->tfinger.y,
+                event->tfinger.dx, event->tfinger.dy, event->tfinger.pressure);
+        break;
+
     case SDL_QUIT:
         fprintf(stderr, "Quit requested");
         break;

From 93f82137fd96afa079d0e763a7bf173387547838 Mon Sep 17 00:00:00 2001
From: "Ryan C. Gordon" 
Date: Fri, 19 Jul 2013 00:22:57 -0400
Subject: [PATCH 383/542] Fixed wrong type being passed to eglGetConfigAttrib()
 (thanks, Alexander!).

This wanted an EGLint*, not a VisualID* cast to an EGLint*.

Without this, 64-bit X11 fails here, because the datatype sizes are different.

Fixes Bugzilla 1686.
---
 src/video/x11/SDL_x11opengles.c | 4 ++--
 1 file changed, 2 insertions(+), 2 deletions(-)

diff --git a/src/video/x11/SDL_x11opengles.c b/src/video/x11/SDL_x11opengles.c
index 218421b32..ba72aff17 100644
--- a/src/video/x11/SDL_x11opengles.c
+++ b/src/video/x11/SDL_x11opengles.c
@@ -212,7 +212,7 @@ X11_GLES_GetVisual(_THIS, Display * display, int screen)
     /* 64 seems nice. */
     EGLint attribs[64];
     EGLint found_configs = 0;
-    VisualID visual_id;
+    EGLint visual_id;
     int i;
 
     if (!_this->gles_data) {
@@ -277,7 +277,7 @@ X11_GLES_GetVisual(_THIS, Display * display, int screen)
     if (_this->gles_data->eglGetConfigAttrib(_this->gles_data->egl_display,
                                              _this->gles_data->egl_config,
                                              EGL_NATIVE_VISUAL_ID,
-                                             (EGLint *) & visual_id) ==
+                                             &visual_id) ==
         EGL_FALSE || !visual_id) {
         /* Use the default visual when all else fails */
         XVisualInfo vi_in;

From a663b9c637fa7e3726e5bf524f863ef3b155b59a Mon Sep 17 00:00:00 2001
From: Sam Lantinga 
Date: Fri, 19 Jul 2013 22:43:14 -0700
Subject: [PATCH 384/542] Fixed bug 1977 - D3D_UpdateClipRect() sets the wrong
 width for the clip rect

Bithika Mookherjee

SDL_RenderSetClipRect() calls into renderer->UpdateClipRect(renderer).

I am not sure if UpdateClipRect() can point to a number of clip rect update functions, but on my platform it calls D3D_UpdateClipRect().

In that function, the rect to pass to IDirect3DDevice9_SetScissorRect() has it's right field set as:

    r.right = rect->w + rect->w;

But actually, this should be:

    r.right = rect->x + rect->w;
---
 src/render/direct3d/SDL_render_d3d.c | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/src/render/direct3d/SDL_render_d3d.c b/src/render/direct3d/SDL_render_d3d.c
index a16c111eb..7ace3eed5 100644
--- a/src/render/direct3d/SDL_render_d3d.c
+++ b/src/render/direct3d/SDL_render_d3d.c
@@ -902,7 +902,7 @@ D3D_UpdateClipRect(SDL_Renderer * renderer)
         IDirect3DDevice9_SetRenderState(data->device, D3DRS_SCISSORTESTENABLE, TRUE);
         r.left = rect->x;
         r.top = rect->y;
-        r.right = rect->w + rect->w;
+        r.right = rect->x + rect->w;
         r.bottom = rect->y + rect->h;
 
         result = IDirect3DDevice9_SetScissorRect(data->device, &r);

From 905c71baec1f5a9d32ed3da9e250d3611ee023ed Mon Sep 17 00:00:00 2001
From: Philipp Wiesemann 
Date: Sat, 20 Jul 2013 11:01:03 +0200
Subject: [PATCH 385/542] Changed return value of internal function to shorten
 generic haptic source.

---
 src/haptic/dummy/SDL_syshaptic.c | 41 ++++++++++----------------------
 1 file changed, 13 insertions(+), 28 deletions(-)

diff --git a/src/haptic/dummy/SDL_syshaptic.c b/src/haptic/dummy/SDL_syshaptic.c
index c34081968..29084eb17 100644
--- a/src/haptic/dummy/SDL_syshaptic.c
+++ b/src/haptic/dummy/SDL_syshaptic.c
@@ -29,8 +29,7 @@
 static int
 SDL_SYS_LogicError(void)
 {
-    SDL_SetError("Logic error: No haptic devices available.");
-    return 0;
+    return SDL_SetError("Logic error: No haptic devices available.");
 }
 
 
@@ -52,8 +51,7 @@ SDL_SYS_HapticName(int index)
 int
 SDL_SYS_HapticOpen(SDL_Haptic * haptic)
 {
-    SDL_SYS_LogicError();
-    return -1;
+    return SDL_SYS_LogicError();
 }
 
 
@@ -74,8 +72,7 @@ SDL_SYS_JoystickIsHaptic(SDL_Joystick * joystick)
 int
 SDL_SYS_HapticOpenFromJoystick(SDL_Haptic * haptic, SDL_Joystick * joystick)
 {
-    SDL_SYS_LogicError();
-    return -1;
+    return SDL_SYS_LogicError();
 }
 
 
@@ -104,8 +101,7 @@ int
 SDL_SYS_HapticNewEffect(SDL_Haptic * haptic,
                         struct haptic_effect *effect, SDL_HapticEffect * base)
 {
-    SDL_SYS_LogicError();
-    return -1;
+    return SDL_SYS_LogicError();
 }
 
 
@@ -114,8 +110,7 @@ SDL_SYS_HapticUpdateEffect(SDL_Haptic * haptic,
                            struct haptic_effect *effect,
                            SDL_HapticEffect * data)
 {
-    SDL_SYS_LogicError();
-    return -1;
+    return SDL_SYS_LogicError();
 }
 
 
@@ -123,16 +118,14 @@ int
 SDL_SYS_HapticRunEffect(SDL_Haptic * haptic, struct haptic_effect *effect,
                         Uint32 iterations)
 {
-    SDL_SYS_LogicError();
-    return -1;
+    return SDL_SYS_LogicError();
 }
 
 
 int
 SDL_SYS_HapticStopEffect(SDL_Haptic * haptic, struct haptic_effect *effect)
 {
-    SDL_SYS_LogicError();
-    return -1;
+    return SDL_SYS_LogicError();
 }
 
 
@@ -148,47 +141,39 @@ int
 SDL_SYS_HapticGetEffectStatus(SDL_Haptic * haptic,
                               struct haptic_effect *effect)
 {
-    SDL_SYS_LogicError();
-    return -1;
+    return SDL_SYS_LogicError();
 }
 
 
 int
 SDL_SYS_HapticSetGain(SDL_Haptic * haptic, int gain)
 {
-    SDL_SYS_LogicError();
-    return -1;
+    return SDL_SYS_LogicError();
 }
 
 
 int
 SDL_SYS_HapticSetAutocenter(SDL_Haptic * haptic, int autocenter)
 {
-    SDL_SYS_LogicError();
-    return -1;
+    return SDL_SYS_LogicError();
 }
 
 int
 SDL_SYS_HapticPause(SDL_Haptic * haptic)
 {
-    SDL_SYS_LogicError();
-    return -1;
+    return SDL_SYS_LogicError();
 }
 
 int
 SDL_SYS_HapticUnpause(SDL_Haptic * haptic)
 {
-    SDL_SYS_LogicError();
-    return -1;
+    return SDL_SYS_LogicError();
 }
 
 int
 SDL_SYS_HapticStopAll(SDL_Haptic * haptic)
 {
-    SDL_SYS_LogicError();
-    return -1;
+    return SDL_SYS_LogicError();
 }
 
-
-
 #endif /* SDL_HAPTIC_DUMMY || SDL_HAPTIC_DISABLED */

From 6fc856ae8a63d599488ecec0e66ff0140fb3a8d9 Mon Sep 17 00:00:00 2001
From: Philipp Wiesemann 
Date: Sat, 20 Jul 2013 11:16:50 +0200
Subject: [PATCH 386/542] Corrected comments in test library source.

---
 src/test/SDL_test_common.c | 6 +++---
 1 file changed, 3 insertions(+), 3 deletions(-)

diff --git a/src/test/SDL_test_common.c b/src/test/SDL_test_common.c
index f89db234b..e53123948 100644
--- a/src/test/SDL_test_common.c
+++ b/src/test/SDL_test_common.c
@@ -1208,7 +1208,7 @@ SDLTest_CommonEvent(SDLTest_CommonState * state, SDL_Event * event, int *done)
             break;
         case SDLK_EQUALS:
             if (event->key.keysym.mod & KMOD_CTRL) {
-                /* Ctrt-+ double the size of the window */
+                /* Ctrl-+ double the size of the window */
                 SDL_Window *window = SDL_GetWindowFromID(event->key.windowID);
                 if (window) {
                     int w, h;
@@ -1219,7 +1219,7 @@ SDLTest_CommonEvent(SDLTest_CommonState * state, SDL_Event * event, int *done)
             break;
         case SDLK_MINUS:
             if (event->key.keysym.mod & KMOD_CTRL) {
-                /* Ctrt-- double the size of the window */
+                /* Ctrl-- half the size of the window */
                 SDL_Window *window = SDL_GetWindowFromID(event->key.windowID);
                 if (window) {
                     int w, h;
@@ -1318,7 +1318,7 @@ SDLTest_CommonEvent(SDLTest_CommonState * state, SDL_Event * event, int *done)
                     }
                 }
             } else if (event->key.keysym.mod & KMOD_ALT) {
-                /* Ctrl-Enter toggle fullscreen desktop */
+                /* Alt-Enter toggle fullscreen desktop */
                 SDL_Window *window = SDL_GetWindowFromID(event->key.windowID);
                 if (window) {
                     Uint32 flags = SDL_GetWindowFlags(window);

From d92ced54a04b7c1b268be8f978bb623a73e78634 Mon Sep 17 00:00:00 2001
From: "Ryan C. Gordon" 
Date: Sat, 20 Jul 2013 13:11:40 -0400
Subject: [PATCH 387/542] Workaround crash bug in libXi <= 1.4.1 (thanks,
 Steve!).

Fixes Bugzilla #1812.
---
 src/video/x11/SDL_x11events.c | 56 ++++++++++++++++++++++++-----------
 1 file changed, 38 insertions(+), 18 deletions(-)

diff --git a/src/video/x11/SDL_x11events.c b/src/video/x11/SDL_x11events.c
index 398b25f60..a9a3ac996 100644
--- a/src/video/x11/SDL_x11events.c
+++ b/src/video/x11/SDL_x11events.c
@@ -99,37 +99,60 @@ static Atom X11_PickTargetFromAtoms(Display *disp, Atom a0, Atom a1, Atom a2)
 }
 /*#define DEBUG_XEVENTS*/
 
+struct KeyRepeatCheckData
+{
+    XEvent *event;
+    SDL_bool found;
+};
+
+static Bool X11_KeyRepeatCheckIfEvent(Display *display, XEvent *chkev,
+    XPointer arg)
+{
+    struct KeyRepeatCheckData *d = (struct KeyRepeatCheckData *) arg;
+    if (chkev->type == KeyPress &&
+        chkev->xkey.keycode == d->event->xkey.keycode &&
+        chkev->xkey.time - d->event->xkey.time < 2)
+        d->found = SDL_TRUE;
+    return False;
+}
+
 /* Check to see if this is a repeated key.
    (idea shamelessly lifted from GII -- thanks guys! :)
  */
 static SDL_bool X11_KeyRepeat(Display *display, XEvent *event)
 {
-    XEvent peekevent;
+    XEvent dummyev;
+    struct KeyRepeatCheckData d;
+    d.event = event;
+    d.found = SDL_FALSE;
+    if (XPending(display))
+        XCheckIfEvent(display, &dummyev, X11_KeyRepeatCheckIfEvent,
+            (XPointer) &d);
+    return d.found;
+}
 
-    if (XPending(display)) {
-        XPeekEvent(display, &peekevent);
-        if ((peekevent.type == KeyPress) &&
-            (peekevent.xkey.keycode == event->xkey.keycode) &&
-            ((peekevent.xkey.time-event->xkey.time) < 2)) {
-            return SDL_TRUE;
-        }
-    }
-    return SDL_FALSE;
+static Bool X11_IsWheelCheckIfEvent(Display *display, XEvent *chkev,
+    XPointer arg)
+{
+    XEvent *event = (XEvent *) arg;
+    if (chkev->type == ButtonRelease &&
+        chkev->xbutton.button == event->xbutton.button &&
+        chkev->xbutton.time == event->xbutton.time)
+        return True;
+    return False;
 }
 
 static SDL_bool X11_IsWheelEvent(Display * display,XEvent * event,int * ticks)
 {
-    XEvent peekevent;
+    XEvent relevent;
     if (XPending(display)) {
         /* according to the xlib docs, no specific mouse wheel events exist.
            however, mouse wheel events trigger a button press and a button release
            immediately. thus, checking if the same button was released at the same
            time as it was pressed, should be an adequate hack to derive a mouse
            wheel event. */
-        XPeekEvent(display,&peekevent);
-        if ((peekevent.type           == ButtonRelease) &&
-            (peekevent.xbutton.button == event->xbutton.button) &&
-            (peekevent.xbutton.time   == event->xbutton.time)) {
+        if (XCheckIfEvent(display, &relevent, X11_IsWheelCheckIfEvent,
+            (XPointer) event)) {
 
             /* by default, X11 only knows 5 buttons. on most 3 button + wheel mouse,
                Button4 maps to wheel up, Button5 maps to wheel down. */
@@ -139,9 +162,6 @@ static SDL_bool X11_IsWheelEvent(Display * display,XEvent * event,int * ticks)
             else if (event->xbutton.button == Button5) {
                 *ticks = -1;
             }
-
-            /* remove the following release event, as this is now a wheel event */
-            XNextEvent(display,&peekevent);
             return SDL_TRUE;
         }
     }

From e96e39d53bc574ff7c7fe2aa8b14177ee2c75592 Mon Sep 17 00:00:00 2001
From: Philipp Wiesemann 
Date: Sat, 20 Jul 2013 21:35:26 +0200
Subject: [PATCH 388/542] Removed not needed variable and work in standard
 library. Found by Cppcheck (that variable's value was never used).

---
 src/stdlib/SDL_string.c | 4 ----
 1 file changed, 4 deletions(-)

diff --git a/src/stdlib/SDL_string.c b/src/stdlib/SDL_string.c
index 82d5232fc..fd3fba3f7 100644
--- a/src/stdlib/SDL_string.c
+++ b/src/stdlib/SDL_string.c
@@ -1357,7 +1357,6 @@ SDL_PrintFloat(char *text, size_t maxlen, SDL_FormatInfo *info, double arg)
 
     if (arg) {
         /* This isn't especially accurate, but hey, it's easy. :) */
-        double precision = 1.0;
         unsigned long value;
 
         if (arg < 0) {
@@ -1386,9 +1385,6 @@ SDL_PrintFloat(char *text, size_t maxlen, SDL_FormatInfo *info, double arg)
         if (info->precision < 0) {
             info->precision = 6;
         }
-        for (i = 0; i < info->precision; ++i) {
-            precision *= 0.1;
-        }
         if (info->force_type || info->precision > 0) {
             int mult = 10;
             if (left > 1) {

From 74e5c8cffdc66461ac512ca80d77f244e8c38e5b Mon Sep 17 00:00:00 2001
From: Philipp Wiesemann 
Date: Sat, 20 Jul 2013 21:39:54 +0200
Subject: [PATCH 389/542] Replaced use of strcmp() with SDL_strcmp() in tests.

---
 test/testautomation_clipboard.c | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/test/testautomation_clipboard.c b/test/testautomation_clipboard.c
index cc112f9a6..92aec7d03 100644
--- a/test/testautomation_clipboard.c
+++ b/test/testautomation_clipboard.c
@@ -140,7 +140,7 @@ clipboard_testClipboardTextFunctions(void *arg)
     charResult = SDL_GetClipboardText();
     SDLTest_AssertPass("Call to SDL_GetClipboardText succeeded");
     SDLTest_AssertCheck(
-        strcmp(textRef, charResult) == 0,
+        SDL_strcmp(textRef, charResult) == 0,
         "Verify SDL_GetClipboardText returned correct string, expected '%s', got '%s'",
         textRef, charResult);
 

From 62c31ff5c3def979ca89e911118a2b4069ca9241 Mon Sep 17 00:00:00 2001
From: Philipp Wiesemann 
Date: Sat, 20 Jul 2013 21:47:16 +0200
Subject: [PATCH 390/542] Removed not needed SDL_WINDOW_SHOWN from test
 programs. See bug #1667.

---
 test/testgamecontroller.c | 2 +-
 test/testjoystick.c       | 2 +-
 test/testmessage.c        | 2 +-
 test/testoverlay2.c       | 2 +-
 test/testshape.c          | 2 +-
 test/teststreaming.c      | 2 +-
 6 files changed, 6 insertions(+), 6 deletions(-)

diff --git a/test/testgamecontroller.c b/test/testgamecontroller.c
index 0ca424627..e5e1538ba 100644
--- a/test/testgamecontroller.c
+++ b/test/testgamecontroller.c
@@ -105,7 +105,7 @@ WatchGameController(SDL_GameController * gamecontroller)
     /* Create a window to display controller axis position */
     window = SDL_CreateWindow(title, SDL_WINDOWPOS_CENTERED,
                               SDL_WINDOWPOS_CENTERED, SCREEN_WIDTH,
-                              SCREEN_HEIGHT, SDL_WINDOW_SHOWN);
+                              SCREEN_HEIGHT, 0);
     if (window == NULL) {
         fprintf(stderr, "Couldn't create window: %s\n", SDL_GetError());
         return;
diff --git a/test/testjoystick.c b/test/testjoystick.c
index 7132e667a..d6dfee6d9 100644
--- a/test/testjoystick.c
+++ b/test/testjoystick.c
@@ -50,7 +50,7 @@ WatchJoystick(SDL_Joystick * joystick)
     /* Create a window to display joystick axis position */
     window = SDL_CreateWindow("Joystick Test", SDL_WINDOWPOS_CENTERED,
                               SDL_WINDOWPOS_CENTERED, SCREEN_WIDTH,
-                              SCREEN_HEIGHT, SDL_WINDOW_SHOWN);
+                              SCREEN_HEIGHT, 0);
     if (window == NULL) {
         fprintf(stderr, "Couldn't create window: %s\n", SDL_GetError());
         return SDL_FALSE;
diff --git a/test/testmessage.c b/test/testmessage.c
index 7e4c561f7..8fd290d08 100644
--- a/test/testmessage.c
+++ b/test/testmessage.c
@@ -159,7 +159,7 @@ main(int argc, char *argv[])
     /* Test showing a message box with a parent window */
     {
         SDL_Event event;
-        SDL_Window *window = SDL_CreateWindow("Test", SDL_WINDOWPOS_CENTERED, SDL_WINDOWPOS_CENTERED, 640, 480, SDL_WINDOW_SHOWN);
+        SDL_Window *window = SDL_CreateWindow("Test", SDL_WINDOWPOS_CENTERED, SDL_WINDOWPOS_CENTERED, 640, 480, 0);
 
         success = SDL_ShowSimpleMessageBox(SDL_MESSAGEBOX_ERROR,
                     "Simple MessageBox",
diff --git a/test/testoverlay2.c b/test/testoverlay2.c
index f8d36945f..477720930 100644
--- a/test/testoverlay2.c
+++ b/test/testoverlay2.c
@@ -496,7 +496,7 @@ main(int argc, char **argv)
                               SDL_WINDOWPOS_UNDEFINED,
                               SDL_WINDOWPOS_UNDEFINED,
                               window_w, window_h,
-                              SDL_WINDOW_SHOWN|SDL_WINDOW_RESIZABLE);
+                              SDL_WINDOW_RESIZABLE);
     if (!window) {
         fprintf(stderr, "Couldn't set create window: %s\n", SDL_GetError());
         free(RawMooseData);
diff --git a/test/testshape.c b/test/testshape.c
index 7eb8d9c75..ab2a9bbca 100644
--- a/test/testshape.c
+++ b/test/testshape.c
@@ -106,7 +106,7 @@ int main(int argc,char** argv)
         }
     }
 
-    window = SDL_CreateShapedWindow("SDL_Shape test",SHAPED_WINDOW_X,SHAPED_WINDOW_Y,SHAPED_WINDOW_DIMENSION,SHAPED_WINDOW_DIMENSION,SDL_WINDOW_RESIZABLE | SDL_WINDOW_SHOWN);
+    window = SDL_CreateShapedWindow("SDL_Shape test",SHAPED_WINDOW_X,SHAPED_WINDOW_Y,SHAPED_WINDOW_DIMENSION,SHAPED_WINDOW_DIMENSION,SDL_WINDOW_RESIZABLE);
     if(window == NULL) {
         for(i=0;i
Date: Sat, 20 Jul 2013 21:51:53 +0200
Subject: [PATCH 391/542] Replaced use of malloc()/free() with
 SDL_malloc()/SDL_free() in test program.

---
 test/testshape.c | 12 ++++++------
 1 file changed, 6 insertions(+), 6 deletions(-)

diff --git a/test/testshape.c b/test/testshape.c
index ab2a9bbca..bd5d351f4 100644
--- a/test/testshape.c
+++ b/test/testshape.c
@@ -79,7 +79,7 @@ int main(int argc,char** argv)
     }
 
     num_pictures = argc - 1;
-    pictures = (LoadedPicture *)malloc(sizeof(LoadedPicture)*num_pictures);
+    pictures = (LoadedPicture *)SDL_malloc(sizeof(LoadedPicture)*num_pictures);
     for(i=0;i
Date: Sat, 20 Jul 2013 21:55:15 +0200
Subject: [PATCH 392/542] Changed documentation comment for
 SDL_CreateShapedWindow(). See bug #1667.

---
 include/SDL_shape.h | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/include/SDL_shape.h b/include/SDL_shape.h
index 8aee96c85..63f850c94 100644
--- a/include/SDL_shape.h
+++ b/include/SDL_shape.h
@@ -55,7 +55,7 @@ extern "C" {
  *  \param h     The height of the window.
  *  \param flags The flags for the window, a mask of SDL_WINDOW_BORDERLESS with any of the following:
  *               ::SDL_WINDOW_OPENGL,     ::SDL_WINDOW_INPUT_GRABBED,
- *               ::SDL_WINDOW_SHOWN,      ::SDL_WINDOW_RESIZABLE,
+ *               ::SDL_WINDOW_HIDDEN,     ::SDL_WINDOW_RESIZABLE,
  *               ::SDL_WINDOW_MAXIMIZED,  ::SDL_WINDOW_MINIMIZED,
  *       ::SDL_WINDOW_BORDERLESS is always set, and ::SDL_WINDOW_FULLSCREEN is always unset.
  *

From 8328f339478349401c784754439971775f6b799c Mon Sep 17 00:00:00 2001
From: "Ryan C. Gordon" 
Date: Sat, 20 Jul 2013 18:51:49 -0400
Subject: [PATCH 393/542] Make XInput haptic code respect effect timeouts.

This is really just a hack until this code expands to be a robust haptic mixer.

(This is also untested, beyond compiling. Sorry!)

--HG--
extra : rebase_source : 1ea0101273d96c6d82db9b603a575e265d4ee426
---
 src/haptic/windows/SDL_syshaptic.c | 91 ++++++++++++++++++++++++++++--
 1 file changed, 87 insertions(+), 4 deletions(-)

diff --git a/src/haptic/windows/SDL_syshaptic.c b/src/haptic/windows/SDL_syshaptic.c
index ed20841dc..fcb4e2411 100644
--- a/src/haptic/windows/SDL_syshaptic.c
+++ b/src/haptic/windows/SDL_syshaptic.c
@@ -23,6 +23,9 @@
 #ifdef SDL_HAPTIC_DINPUT
 
 #include "SDL_assert.h"
+#include "SDL_thread.h"
+#include "SDL_mutex.h"
+#include "SDL_timer.h"
 #include "SDL_hints.h"
 #include "SDL_haptic.h"
 #include "../SDL_syshaptic.h"
@@ -56,6 +59,10 @@ struct haptic_hwdata
     SDL_bool is_joystick;       /* Device is loaded as joystick. */
     Uint8 bXInputHaptic; /* Supports force feedback via XInput. */
     Uint8 userid; /* XInput userid index for this joystick */
+    SDL_Thread *thread;
+    SDL_mutex *mutex;
+    volatile Uint32 stopTicks;
+    volatile int stopThread;
 };
 
 
@@ -102,6 +109,8 @@ static int SDL_SYS_ToDIEFFECT(SDL_Haptic * haptic, DIEFFECT * dest,
                               SDL_HapticEffect * src);
 static void SDL_SYS_HapticFreeDIEFFECT(DIEFFECT * effect, int type);
 static REFGUID SDL_SYS_HapticEffectType(SDL_HapticEffect * effect);
+static int SDLCALL SDL_RunXInputHaptic(void *arg);
+
 /* Callbacks. */
 static BOOL CALLBACK EnumHapticsCallback(const DIDEVICEINSTANCE *
                                          pdidInstance, VOID * pContext);
@@ -376,6 +385,7 @@ SDL_SYS_HapticOpenFromInstance(SDL_Haptic * haptic, DIDEVICEINSTANCE instance)
 static int
 SDL_SYS_HapticOpenFromXInput(SDL_Haptic * haptic, Uint8 userid)
 {
+    char threadName[32];
     XINPUT_VIBRATION vibration = { 0, 0 };  /* stop any current vibration */
     XINPUTSETSTATE(userid, &vibration);
 
@@ -406,6 +416,30 @@ SDL_SYS_HapticOpenFromXInput(SDL_Haptic * haptic, Uint8 userid)
     haptic->hwdata->bXInputHaptic = 1;
     haptic->hwdata->userid = userid;
 
+    haptic->hwdata->mutex = SDL_CreateMutex();
+    if (haptic->hwdata->mutex == NULL) {
+        SDL_free(haptic->effects);
+        SDL_free(haptic->hwdata);
+        haptic->effects = NULL;
+        return SDL_SetError("Couldn't create XInput haptic mutex");
+    }
+
+    SDL_snprintf(threadName, sizeof (threadName), "SDLXInputDev%d", (int) userid);
+
+#if defined(__WIN32__) && !defined(HAVE_LIBC)  /* !!! FIXME: this is nasty. */
+    #undef SDL_CreateThread
+    haptic->hwdata->thread = SDL_CreateThread(SDL_RunXInputHaptic, threadName, haptic->hwdata, NULL, NULL);
+#else
+    haptic->hwdata->thread = SDL_CreateThread(SDL_RunXInputHaptic, threadName, haptic->hwdata);
+#endif
+    if (haptic->hwdata->thread == NULL) {
+        SDL_DestroyMutex(haptic->hwdata->mutex);
+        SDL_free(haptic->effects);
+        SDL_free(haptic->hwdata);
+        haptic->effects = NULL;
+        return SDL_SetError("Couldn't create XInput haptic thread");
+    }
+
     return 0;
  }
 
@@ -684,7 +718,11 @@ SDL_SYS_HapticClose(SDL_Haptic * haptic)
         haptic->neffects = 0;
 
         /* Clean up */
-        if (!haptic->hwdata->bXInputHaptic) {
+        if (haptic->hwdata->bXInputHaptic) {
+            haptic->hwdata->stopThread = 1;
+            SDL_WaitThread(haptic->hwdata->thread, NULL);
+            SDL_DestroyMutex(haptic->hwdata->mutex);
+        } else {
             IDirectInputDevice8_Unacquire(haptic->hwdata->device);
             /* Only release if isn't grabbed by a joystick. */
             if (haptic->hwdata->is_joystick == 0) {
@@ -1295,7 +1333,11 @@ SDL_SYS_HapticRunEffect(SDL_Haptic * haptic, struct haptic_effect *effect,
 
     if (haptic->hwdata->bXInputHaptic) {
         XINPUT_VIBRATION *vib = &effect->hweffect->vibration;
-        return (XINPUTSETSTATE(haptic->hwdata->userid, vib) == ERROR_SUCCESS);
+        SDL_assert(effect->effect.type == SDL_HAPTIC_SINE);  /* should catch this at higher level */
+        SDL_LockMutex(haptic->hwdata->mutex);
+        haptic->hwdata->stopTicks = SDL_GetTicks() + (effect->effect.periodic.length * iterations);
+        SDL_UnlockMutex(haptic->hwdata->mutex);
+        return (XINPUTSETSTATE(haptic->hwdata->userid, vib) == ERROR_SUCCESS) ? 0 : -1;
     }
 
     /* Check if it's infinite. */
@@ -1324,7 +1366,10 @@ SDL_SYS_HapticStopEffect(SDL_Haptic * haptic, struct haptic_effect *effect)
 
     if (haptic->hwdata->bXInputHaptic) {
         XINPUT_VIBRATION vibration = { 0, 0 };
-        return (XINPUTSETSTATE(haptic->hwdata->userid, &vibration) == ERROR_SUCCESS);
+        SDL_LockMutex(haptic->hwdata->mutex);
+        haptic->hwdata->stopTicks = 0;
+        SDL_UnlockMutex(haptic->hwdata->mutex);
+        return (XINPUTSETSTATE(haptic->hwdata->userid, &vibration) == ERROR_SUCCESS) ? 0 : -1;
     }
 
     ret = IDirectInputEffect_Stop(effect->hweffect->ref);
@@ -1483,7 +1528,10 @@ SDL_SYS_HapticStopAll(SDL_Haptic * haptic)
 
     if (haptic->hwdata->bXInputHaptic) {
         XINPUT_VIBRATION vibration = { 0, 0 };
-        return (XINPUTSETSTATE(haptic->hwdata->userid, &vibration) == ERROR_SUCCESS);
+        SDL_LockMutex(haptic->hwdata->mutex);
+        haptic->hwdata->stopTicks = 0;
+        SDL_UnlockMutex(haptic->hwdata->mutex);
+        return (XINPUTSETSTATE(haptic->hwdata->userid, &vibration) == ERROR_SUCCESS) ? 0 : -1;
     }
 
     /* Try to stop the effects. */
@@ -1496,6 +1544,41 @@ SDL_SYS_HapticStopAll(SDL_Haptic * haptic)
     return 0;
 }
 
+
+/* !!! FIXME: this is a hack, remove this later. */
+/* Since XInput doesn't offer a way to vibrate for X time, we hook into
+ *  SDL_PumpEvents() to check if it's time to stop vibrating with some
+ *  frequency.
+ * In practice, this works for 99% of use cases. But in an ideal world,
+ *  we do this in a separate thread so that:
+ *    - we aren't bound to when the app chooses to pump the event queue.
+ *    - we aren't adding more polling to the event queue
+ *    - we can emulate all the haptic effects correctly (start on a delay,
+ *      mix multiple effects, etc).
+ *
+ * Mostly, this is here to get rumbling to work, and all the other features
+ *  are absent in the XInput path for now.  :(
+ */
+static int SDLCALL
+SDL_RunXInputHaptic(void *arg)
+{
+    struct haptic_hwdata *hwdata = (struct haptic_hwdata *) arg;
+
+    while (!hwdata->stopThread) {
+        SDL_Delay(50);
+        SDL_LockMutex(hwdata->mutex);
+        /* If we're currently running and need to stop... */
+        if ((hwdata->stopTicks) && (hwdata->stopTicks < SDL_GetTicks())) {
+            XINPUT_VIBRATION vibration = { 0, 0 };
+            hwdata->stopTicks = 0;
+            XINPUTSETSTATE(hwdata->userid, &vibration);
+        }
+        SDL_UnlockMutex(hwdata->mutex);
+    }
+
+    return 0;
+}
+
 #endif /* SDL_HAPTIC_DINPUT */
 
 /* vi: set ts=4 sw=4 expandtab: */

From 30b6bedb576f3d6dbd8ed3c05e5149bd8be0d745 Mon Sep 17 00:00:00 2001
From: "Ryan C. Gordon" 
Date: Sat, 20 Jul 2013 19:51:51 -0400
Subject: [PATCH 394/542] Fixed some compiler warnings that Visual Studio
 reported.

---
 include/SDL_thread.h      | 2 +-
 src/stdlib/SDL_string.c   | 2 +-
 src/thread/SDL_thread.c   | 4 ++--
 src/thread/SDL_thread_c.h | 2 +-
 src/video/SDL_surface.c   | 2 +-
 5 files changed, 6 insertions(+), 6 deletions(-)

diff --git a/include/SDL_thread.h b/include/SDL_thread.h
index ba5af31e2..e480a773b 100644
--- a/include/SDL_thread.h
+++ b/include/SDL_thread.h
@@ -49,7 +49,7 @@ typedef struct SDL_Thread SDL_Thread;
 typedef unsigned long SDL_threadID;
 
 /* Thread local storage ID, 0 is the invalid ID */
-typedef unsigned SDL_TLSID;
+typedef unsigned int SDL_TLSID;
 
 /* The SDL thread priority
  *
diff --git a/src/stdlib/SDL_string.c b/src/stdlib/SDL_string.c
index fd3fba3f7..93bb056ad 100644
--- a/src/stdlib/SDL_string.c
+++ b/src/stdlib/SDL_string.c
@@ -1350,7 +1350,7 @@ SDL_PrintUnsignedLongLong(char *text, size_t maxlen, SDL_FormatInfo *info, Uint6
 static size_t
 SDL_PrintFloat(char *text, size_t maxlen, SDL_FormatInfo *info, double arg)
 {
-    int i, width;
+    int width;
     size_t len;
     size_t left = maxlen;
     char *textstart = text;
diff --git a/src/thread/SDL_thread.c b/src/thread/SDL_thread.c
index e0bac7e77..6b9fa1894 100644
--- a/src/thread/SDL_thread.c
+++ b/src/thread/SDL_thread.c
@@ -57,8 +57,8 @@ SDL_TLSSet(SDL_TLSID id, const void *value, void (*destructor)(void *))
     }
 
     storage = SDL_SYS_GetTLSData();
-    if (!storage || id > storage->limit) {
-        int i, oldlimit, newlimit;
+    if (!storage || (id > storage->limit)) {
+        unsigned int i, oldlimit, newlimit;
 
         oldlimit = storage ? storage->limit : 0;
         newlimit = (id + TLS_ALLOC_CHUNKSIZE);
diff --git a/src/thread/SDL_thread_c.h b/src/thread/SDL_thread_c.h
index da3a165fb..1971ded24 100644
--- a/src/thread/SDL_thread_c.h
+++ b/src/thread/SDL_thread_c.h
@@ -58,7 +58,7 @@ extern void SDL_RunThread(void *data);
 
 /* This is the system-independent thread local storage structure */
 typedef struct {
-    int limit;
+    unsigned int limit;
     struct {
         void *data;
         void (*destructor)(void*);
diff --git a/src/video/SDL_surface.c b/src/video/SDL_surface.c
index 2544462ba..17f253c2c 100644
--- a/src/video/SDL_surface.c
+++ b/src/video/SDL_surface.c
@@ -178,7 +178,7 @@ SDL_SetColorKey(SDL_Surface * surface, int flag, Uint32 key)
         return SDL_InvalidParamError("surface");
     }
 
-    if (surface->format->palette && key >= surface->format->palette->ncolors) {
+    if (surface->format->palette && key >= ((Uint32) surface->format->palette->ncolors)) {
         return SDL_InvalidParamError("key");
     }
 

From 3a261795eddabae645c96d19f352d538813d86a8 Mon Sep 17 00:00:00 2001
From: "Ryan C. Gordon" 
Date: Sat, 20 Jul 2013 19:58:17 -0400
Subject: [PATCH 395/542] More compiler warning fixes.

---
 src/test/SDL_test_common.c | 3 ++-
 1 file changed, 2 insertions(+), 1 deletion(-)

diff --git a/src/test/SDL_test_common.c b/src/test/SDL_test_common.c
index e53123948..14add55b2 100644
--- a/src/test/SDL_test_common.c
+++ b/src/test/SDL_test_common.c
@@ -1094,7 +1094,8 @@ SDLTest_PrintEvent(SDL_Event * event)
     case SDL_FINGERUP:
         fprintf(stderr, "Finger: %s touch=%lld, finger=%lld, x=%f, y=%f, dx=%f, dy=%f, pressure=%f",
                 (event->type == SDL_FINGERDOWN) ? "down" : "up",
-                event->tfinger.touchId, event->tfinger.fingerId,
+                (long long) event->tfinger.touchId,
+                (long long) event->tfinger.fingerId,
                 event->tfinger.x, event->tfinger.y,
                 event->tfinger.dx, event->tfinger.dy, event->tfinger.pressure);
         break;

From bc019db86e028f05b2c36d0f090c7667cc112516 Mon Sep 17 00:00:00 2001
From: "Ryan C. Gordon" 
Date: Sat, 20 Jul 2013 19:59:31 -0400
Subject: [PATCH 396/542] One more compiler warning.

---
 src/thread/SDL_thread.c | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/src/thread/SDL_thread.c b/src/thread/SDL_thread.c
index 6b9fa1894..7dc182865 100644
--- a/src/thread/SDL_thread.c
+++ b/src/thread/SDL_thread.c
@@ -88,7 +88,7 @@ SDL_TLSCleanup()
 
     storage = SDL_SYS_GetTLSData();
     if (storage) {
-        int i;
+        unsigned int i;
         for (i = 0; i < storage->limit; ++i) {
             if (storage->array[i].destructor) {
                 storage->array[i].destructor(storage->array[i].data);

From f2029f2af8e25f629a477ad629d017e75f9f049d Mon Sep 17 00:00:00 2001
From: "Ryan C. Gordon" 
Date: Sat, 20 Jul 2013 20:12:36 -0400
Subject: [PATCH 397/542] Fixed another compiler warning.

This one is compliments of the FreeBSD buildbot finally having the
 X11 libraries installed.  :)

--HG--
extra : amend_source : f57bb1d54a19cb773358f8caefd40d477c01b05f
---
 src/video/x11/SDL_x11modes.c | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/src/video/x11/SDL_x11modes.c b/src/video/x11/SDL_x11modes.c
index c2103467d..b66b94b1a 100644
--- a/src/video/x11/SDL_x11modes.c
+++ b/src/video/x11/SDL_x11modes.c
@@ -860,7 +860,6 @@ X11_QuitModes(_THIS)
 int
 X11_GetDisplayBounds(_THIS, SDL_VideoDisplay * sdl_display, SDL_Rect * rect)
 {
-    Display *display = ((SDL_VideoData *) _this->driverdata)->display;
     SDL_DisplayData *data = (SDL_DisplayData *) sdl_display->driverdata;
 
     rect->x = data->x;
@@ -871,6 +870,7 @@ X11_GetDisplayBounds(_THIS, SDL_VideoDisplay * sdl_display, SDL_Rect * rect)
 #if SDL_VIDEO_DRIVER_X11_XINERAMA
     /* Get the real current bounds of the display */
     if (data->use_xinerama) {
+        Display *display = ((SDL_VideoData *) _this->driverdata)->display;
         int screencount;
         XineramaScreenInfo *xinerama = XineramaQueryScreens(display, &screencount);
         if (xinerama) {

From 51ba788d0da8a30b9d8bb795d4eff23ad3273f91 Mon Sep 17 00:00:00 2001
From: "Ryan C. Gordon" 
Date: Sat, 20 Jul 2013 21:10:05 -0400
Subject: [PATCH 398/542] Don't try to clear errors in GL_ActivateRenderer()
 before we MakeCurrent.

Otherwise, if we destroyed a different renderer, next time this one draws,
it'll clear errors forever (GL_INVALID_OPERATION for having no current
context, at least on Windows), hanging up the program in an infinite loop.

Fixes Bugzilla #1775.
---
 src/render/opengl/SDL_render_gl.c | 4 +++-
 1 file changed, 3 insertions(+), 1 deletion(-)

diff --git a/src/render/opengl/SDL_render_gl.c b/src/render/opengl/SDL_render_gl.c
index 279652f12..4d0ef4aaa 100644
--- a/src/render/opengl/SDL_render_gl.c
+++ b/src/render/opengl/SDL_render_gl.c
@@ -277,7 +277,6 @@ GL_ActivateRenderer(SDL_Renderer * renderer)
 {
     GL_RenderData *data = (GL_RenderData *) renderer->driverdata;
 
-    GL_ClearErrors(renderer);
     if (SDL_CurrentContext != data->context) {
         if (SDL_GL_MakeCurrent(renderer->window, data->context) < 0) {
             return -1;
@@ -286,6 +285,9 @@ GL_ActivateRenderer(SDL_Renderer * renderer)
 
         GL_UpdateViewport(renderer);
     }
+
+    GL_ClearErrors(renderer);
+
     return 0;
 }
 

From 20b4bd0c6aeb3568aa227f81f6fbc195ffee447a Mon Sep 17 00:00:00 2001
From: "Ryan C. Gordon" 
Date: Sat, 20 Jul 2013 21:19:20 -0400
Subject: [PATCH 399/542] Don't allocate memory if we're just going to fail
 when checking parameters.

---
 src/render/SDL_yuv_sw.c | 15 +++++++--------
 1 file changed, 7 insertions(+), 8 deletions(-)

diff --git a/src/render/SDL_yuv_sw.c b/src/render/SDL_yuv_sw.c
index 3319fe4c2..5dd3ff0c7 100644
--- a/src/render/SDL_yuv_sw.c
+++ b/src/render/SDL_yuv_sw.c
@@ -1029,12 +1029,6 @@ SDL_SW_CreateYUVTexture(Uint32 format, int w, int h)
     int i;
     int CR, CB;
 
-    swdata = (SDL_SW_YUVTexture *) SDL_calloc(1, sizeof(*swdata));
-    if (!swdata) {
-        SDL_OutOfMemory();
-        return NULL;
-    }
-
     switch (format) {
     case SDL_PIXELFORMAT_YV12:
     case SDL_PIXELFORMAT_IYUV:
@@ -1043,11 +1037,16 @@ SDL_SW_CreateYUVTexture(Uint32 format, int w, int h)
     case SDL_PIXELFORMAT_YVYU:
         break;
     default:
-        SDL_SW_DestroyYUVTexture(swdata);
         SDL_SetError("Unsupported YUV format");
         return NULL;
     }
 
+    swdata = (SDL_SW_YUVTexture *) SDL_calloc(1, sizeof(*swdata));
+    if (!swdata) {
+        SDL_OutOfMemory();
+        return NULL;
+    }
+
     swdata->format = format;
     swdata->target_format = SDL_PIXELFORMAT_UNKNOWN;
     swdata->w = w;
@@ -1095,7 +1094,7 @@ SDL_SW_CreateYUVTexture(Uint32 format, int w, int h)
         swdata->planes[0] = swdata->pixels;
         break;
     default:
-        /* We should never get here (caught above) */
+        SDL_assert(0 && "We should never get here (caught above)");
         break;
     }
 

From 0002acb77564bfb0aa15ce9a221241a2f141b9f9 Mon Sep 17 00:00:00 2001
From: "Ryan C. Gordon" 
Date: Sat, 20 Jul 2013 21:22:37 -0400
Subject: [PATCH 400/542] Include SDL_assert.h to fix broken build.

---
 src/render/SDL_yuv_sw.c | 1 +
 1 file changed, 1 insertion(+)

diff --git a/src/render/SDL_yuv_sw.c b/src/render/SDL_yuv_sw.c
index 5dd3ff0c7..bb235b0a2 100644
--- a/src/render/SDL_yuv_sw.c
+++ b/src/render/SDL_yuv_sw.c
@@ -82,6 +82,7 @@
  * SUPPORT, UPDATES, ENHANCEMENTS, OR MODIFICATIONS.
  */
 
+#include "SDL_assert.h"
 #include "SDL_video.h"
 #include "SDL_cpuinfo.h"
 #include "SDL_yuv_sw_c.h"

From 44a6ab168b90a0f3b2e41233795981c67bd564b3 Mon Sep 17 00:00:00 2001
From: "Ryan C. Gordon" 
Date: Sun, 21 Jul 2013 00:07:43 -0400
Subject: [PATCH 401/542] Cursor mask was uninitialized data, causing problems.

Fixes Bugzilla #1461.
---
 src/video/windows/SDL_windowsmouse.c | 18 +++++++++++++++++-
 1 file changed, 17 insertions(+), 1 deletion(-)

diff --git a/src/video/windows/SDL_windowsmouse.c b/src/video/windows/SDL_windowsmouse.c
index d61c8b6bb..f50a8724b 100644
--- a/src/video/windows/SDL_windowsmouse.c
+++ b/src/video/windows/SDL_windowsmouse.c
@@ -49,11 +49,16 @@ WIN_CreateDefaultCursor()
 static SDL_Cursor *
 WIN_CreateCursor(SDL_Surface * surface, int hot_x, int hot_y)
 {
+    /* msdn says cursor mask has to be padded out to word alignment. Not sure
+        if that means machine word or WORD, but this handles either case. */
+    const size_t pad = (sizeof (size_t) * 8);  /* 32 or 64, or whatever. */
     SDL_Cursor *cursor;
     HICON hicon;
     HDC hdc;
     BITMAPV4HEADER bmh;
     LPVOID pixels;
+    LPVOID maskbits;
+    size_t maskbitslen;
     ICONINFO ii;
 
     SDL_zero(bmh);
@@ -68,14 +73,25 @@ WIN_CreateCursor(SDL_Surface * surface, int hot_x, int hot_y)
     bmh.bV4GreenMask = 0x0000FF00;
     bmh.bV4BlueMask  = 0x000000FF;
 
+    maskbitslen = ((surface->w + (pad - (surface->w % pad))) / 8) * surface->h;
+    maskbits = SDL_stack_alloc(Uint8,maskbitslen);
+    if (maskbits == NULL) {
+        SDL_OutOfMemory();
+        return NULL;
+    }
+
+    /* AND the cursor against full bits: no change. We already have alpha. */
+    SDL_memset(maskbits, 0xFF, maskbitslen);
+
     hdc = GetDC(NULL);
     SDL_zero(ii);
     ii.fIcon = FALSE;
     ii.xHotspot = (DWORD)hot_x;
     ii.yHotspot = (DWORD)hot_y;
     ii.hbmColor = CreateDIBSection(hdc, (BITMAPINFO*)&bmh, DIB_RGB_COLORS, &pixels, NULL, 0);
-    ii.hbmMask = CreateBitmap(surface->w, surface->h, 1, 1, NULL);
+    ii.hbmMask = CreateBitmap(surface->w, surface->h, 1, 1, maskbits);
     ReleaseDC(NULL, hdc);
+    SDL_stack_free(maskbits);
 
     SDL_assert(surface->format->format == SDL_PIXELFORMAT_ARGB8888);
     SDL_assert(surface->pitch == surface->w * 4);

From 223c2cfbd741c07744cdedab4501dc1981d9edcd Mon Sep 17 00:00:00 2001
From: "Jasper St. Pierre" 
Date: Sun, 21 Jul 2013 00:57:31 -0400
Subject: [PATCH 402/542] Add support for the _NET_WM_BYPASS_COMPOSITOR hint

This hints to window managers to unredirect the window to improve
performance.
---
 src/video/x11/SDL_x11window.c | 6 ++++++
 1 file changed, 6 insertions(+)

diff --git a/src/video/x11/SDL_x11window.c b/src/video/x11/SDL_x11window.c
index 3e9062b50..5bf6ee43a 100644
--- a/src/video/x11/SDL_x11window.c
+++ b/src/video/x11/SDL_x11window.c
@@ -339,6 +339,8 @@ X11_CreateWindow(_THIS, SDL_Window * window)
     XSizeHints *sizehints;
     XWMHints *wmhints;
     XClassHint *classhints;
+    const long _NET_WM_BYPASS_COMPOSITOR_HINT_ON = 1;
+    Atom _NET_WM_BYPASS_COMPOSITOR;
     Atom _NET_WM_WINDOW_TYPE;
     Atom _NET_WM_WINDOW_TYPE_NORMAL;
     Atom _NET_WM_PID;
@@ -532,6 +534,10 @@ X11_CreateWindow(_THIS, SDL_Window * window)
                     PropModeReplace,
                     (unsigned char *)&_NET_WM_WINDOW_TYPE_NORMAL, 1);
 
+    _NET_WM_BYPASS_COMPOSITOR = XInternAtom(display, "_NET_WM_BYPASS_COMPOSITOR", False);
+    XChangeProperty(display, w, _NET_WM_BYPASS_COMPOSITOR, XA_CARDINAL, 32,
+                    PropModeReplace,
+                    (unsigned char *)&_NET_WM_BYPASS_COMPOSITOR_HINT_ON, 1);
 
     {
         Atom protocols[] = {

From 958740dffc14b7111670f2b580987101e7d189c9 Mon Sep 17 00:00:00 2001
From: Sam Lantinga 
Date: Sun, 21 Jul 2013 11:52:16 -0700
Subject: [PATCH 403/542] Fixed bug 1976 - SDL2.m4 shares same variables as
 SDL.m4 so they cache values

Edgar Simo

So basically the issue is that:

AC_PATH_PROG(SDL_CONFIG, sdl2-config, no, [$PATH])

in sdl2.m4 shares the same variable (SDL_CONFIG) as sdl.m4:

AC_PATH_PROG(SDL_CONFIG, sdl-config, no, [$PATH])

What happens is if you run the AM_PATH_SDL2 and then AM_PATH_SDL to say fall back on SDL if SDL2 isn't found, the AM_PATH_PROG command gets cached (ac_cv_path_SDL_CONFIG) so that unless you unset this cache variable, the result for AM_PATH_SDL will be EXACTLY the same as for AM_PATH_SDL2.

To fix I would recommend renaming SDL_CONFIG to SDL2_CONFIG in sdl2.m4, replacing all instances so it won't cache to the same variable.
---
 sdl2.m4 | 32 ++++++++++++++++----------------
 1 file changed, 16 insertions(+), 16 deletions(-)

diff --git a/sdl2.m4 b/sdl2.m4
index 4c89fc4b5..a03b2d270 100644
--- a/sdl2.m4
+++ b/sdl2.m4
@@ -31,42 +31,42 @@ AC_ARG_ENABLE(sdltest, [  --disable-sdltest       Do not try to compile and run
     sdl_pc=no
     if test x$sdl_exec_prefix != x ; then
       sdl_config_args="$sdl_config_args --exec-prefix=$sdl_exec_prefix"
-      if test x${SDL_CONFIG+set} != xset ; then
-        SDL_CONFIG=$sdl_exec_prefix/bin/sdl2-config
+      if test x${SDL2_CONFIG+set} != xset ; then
+        SDL2_CONFIG=$sdl_exec_prefix/bin/sdl2-config
       fi
     fi
     if test x$sdl_prefix != x ; then
       sdl_config_args="$sdl_config_args --prefix=$sdl_prefix"
-      if test x${SDL_CONFIG+set} != xset ; then
-        SDL_CONFIG=$sdl_prefix/bin/sdl2-config
+      if test x${SDL2_CONFIG+set} != xset ; then
+        SDL2_CONFIG=$sdl_prefix/bin/sdl2-config
       fi
     fi
   fi
 
   if test "x$sdl_pc" = xyes ; then
     no_sdl=""
-    SDL_CONFIG="pkg-config sdl2"
+    SDL2_CONFIG="pkg-config sdl2"
   else
     as_save_PATH="$PATH"
     if test "x$prefix" != xNONE && test "$cross_compiling" != yes; then
       PATH="$prefix/bin:$prefix/usr/bin:$PATH"
     fi
-    AC_PATH_PROG(SDL_CONFIG, sdl2-config, no, [$PATH])
+    AC_PATH_PROG(SDL2_CONFIG, sdl2-config, no, [$PATH])
     PATH="$as_save_PATH"
     AC_MSG_CHECKING(for SDL - version >= $min_sdl_version)
     no_sdl=""
 
-    if test "$SDL_CONFIG" = "no" ; then
+    if test "$SDL2_CONFIG" = "no" ; then
       no_sdl=yes
     else
-      SDL_CFLAGS=`$SDL_CONFIG $sdl_config_args --cflags`
-      SDL_LIBS=`$SDL_CONFIG $sdl_config_args --libs`
+      SDL_CFLAGS=`$SDL2_CONFIG $sdl_config_args --cflags`
+      SDL_LIBS=`$SDL2_CONFIG $sdl_config_args --libs`
 
-      sdl_major_version=`$SDL_CONFIG $sdl_config_args --version | \
+      sdl_major_version=`$SDL2_CONFIG $sdl_config_args --version | \
              sed 's/\([[0-9]]*\).\([[0-9]]*\).\([[0-9]]*\)/\1/'`
-      sdl_minor_version=`$SDL_CONFIG $sdl_config_args --version | \
+      sdl_minor_version=`$SDL2_CONFIG $sdl_config_args --version | \
              sed 's/\([[0-9]]*\).\([[0-9]]*\).\([[0-9]]*\)/\2/'`
-      sdl_micro_version=`$SDL_CONFIG $sdl_config_args --version | \
+      sdl_micro_version=`$SDL2_CONFIG $sdl_config_args --version | \
              sed 's/\([[0-9]]*\).\([[0-9]]*\).\([[0-9]]*\)/\3/'`
       if test "x$enable_sdltest" = "xyes" ; then
         ac_save_CFLAGS="$CFLAGS"
@@ -130,7 +130,7 @@ int main (int argc, char *argv[])
       printf("\n*** 'sdl2-config --version' returned %d.%d.%d, but the minimum version\n", $sdl_major_version, $sdl_minor_version, $sdl_micro_version);
       printf("*** of SDL required is %d.%d.%d. If sdl2-config is correct, then it is\n", major, minor, micro);
       printf("*** best to upgrade to the required version.\n");
-      printf("*** If sdl2-config was wrong, set the environment variable SDL_CONFIG\n");
+      printf("*** If sdl2-config was wrong, set the environment variable SDL2_CONFIG\n");
       printf("*** to point to the correct copy of sdl2-config, and remove the file\n");
       printf("*** config.cache before re-running configure\n");
       return 1;
@@ -152,10 +152,10 @@ int main (int argc, char *argv[])
   if test "x$no_sdl" = x ; then
      ifelse([$2], , :, [$2])
   else
-     if test "$SDL_CONFIG" = "no" ; then
+     if test "$SDL2_CONFIG" = "no" ; then
        echo "*** The sdl2-config script installed by SDL could not be found"
        echo "*** If SDL was installed in PREFIX, make sure PREFIX/bin is in"
-       echo "*** your path, or set the SDL_CONFIG environment variable to the"
+       echo "*** your path, or set the SDL2_CONFIG environment variable to the"
        echo "*** full path to sdl2-config."
      else
        if test -f conf.sdltest ; then
@@ -186,7 +186,7 @@ int main(int argc, char *argv[])
         [ echo "*** The test program failed to compile or link. See the file config.log for the"
           echo "*** exact error that occured. This usually means SDL was incorrectly installed"
           echo "*** or that you have moved SDL since it was installed. In the latter case, you"
-          echo "*** may want to edit the sdl2-config script: $SDL_CONFIG" ])
+          echo "*** may want to edit the sdl2-config script: $SDL2_CONFIG" ])
           CFLAGS="$ac_save_CFLAGS"
           CXXFLAGS="$ac_save_CXXFLAGS"
           LIBS="$ac_save_LIBS"

From 080517ecba32513cca29425f2d6670be8cec3570 Mon Sep 17 00:00:00 2001
From: Sam Lantinga 
Date: Sun, 21 Jul 2013 12:21:22 -0700
Subject: [PATCH 404/542] Fixed cursor leak when quitting the mouse subsystem

---
 src/events/SDL_mouse.c | 17 +++++++++++++++++
 src/video/SDL_video.c  |  2 --
 2 files changed, 17 insertions(+), 2 deletions(-)

diff --git a/src/events/SDL_mouse.c b/src/events/SDL_mouse.c
index 5536ab73b..e9404f057 100644
--- a/src/events/SDL_mouse.c
+++ b/src/events/SDL_mouse.c
@@ -361,6 +361,23 @@ SDL_SendMouseWheel(SDL_Window * window, SDL_MouseID mouseID, int x, int y)
 void
 SDL_MouseQuit(void)
 {
+    SDL_Cursor *cursor, *next;
+    SDL_Mouse *mouse = SDL_GetMouse();
+
+    SDL_ShowCursor(1);
+
+    cursor = mouse->cursors;
+    while (cursor) {
+        next = cursor->next;
+        SDL_FreeCursor(cursor);
+        cursor = next;
+    }
+
+    if (mouse->def_cursor && mouse->FreeCursor) {
+        mouse->FreeCursor(mouse->def_cursor);
+    }
+
+    SDL_zerop(mouse);
 }
 
 Uint32
diff --git a/src/video/SDL_video.c b/src/video/SDL_video.c
index d2b94898c..8b3c2f073 100644
--- a/src/video/SDL_video.c
+++ b/src/video/SDL_video.c
@@ -2247,8 +2247,6 @@ SDL_VideoQuit(void)
 
     SDL_EnableScreenSaver();
 
-    SDL_ShowCursor(1);
-
     /* Clean up the system video */
     while (_this->windows) {
         SDL_DestroyWindow(_this->windows);

From 5ed40dea700d830e9575477fa70bc97fe7af4171 Mon Sep 17 00:00:00 2001
From: Sam Lantinga 
Date: Sun, 21 Jul 2013 12:37:43 -0700
Subject: [PATCH 405/542] Added X include path so SDL_syswm.h works correctly
 on systems with X11 in a non-standard directory.

---
 configure    | 3 +++
 configure.in | 3 +++
 2 files changed, 6 insertions(+)

diff --git a/configure b/configure
index 4edad7539..134136f66 100755
--- a/configure
+++ b/configure
@@ -19562,6 +19562,9 @@ $as_echo "#define SDL_VIDEO_DRIVER_X11 1" >>confdefs.h
             SOURCES="$SOURCES $srcdir/src/video/x11/*.c"
             EXTRA_CFLAGS="$EXTRA_CFLAGS $X_CFLAGS"
 
+            # Needed so SDL applications can include SDL_syswm.h
+            SDL_CFLAGS="$SDL_CFLAGS $X_CFLAGS"
+
             if test x$enable_x11_shared = xmaybe; then
                 enable_x11_shared=$x11_symbols_private
             fi
diff --git a/configure.in b/configure.in
index 5098c3466..018a58aef 100644
--- a/configure.in
+++ b/configure.in
@@ -1173,6 +1173,9 @@ AC_HELP_STRING([--enable-x11-shared], [dynamically load X11 support [[default=ma
             SOURCES="$SOURCES $srcdir/src/video/x11/*.c"
             EXTRA_CFLAGS="$EXTRA_CFLAGS $X_CFLAGS"
 
+            # Needed so SDL applications can include SDL_syswm.h
+            SDL_CFLAGS="$SDL_CFLAGS $X_CFLAGS"
+
             if test x$enable_x11_shared = xmaybe; then
                 enable_x11_shared=$x11_symbols_private
             fi

From fe2bb8805ea89f5e7190814aa08e03f159171192 Mon Sep 17 00:00:00 2001
From: Sam Lantinga 
Date: Sun, 21 Jul 2013 12:47:47 -0700
Subject: [PATCH 406/542] Fixed bug 1973 - test/Makefile.in fails on Mac OS X
 with X11 enabled...

Ryan C. Gordon

If you have the X11 SDK installed on Mac OS X, you'll build with X11 support, but the Makefile doesn't build anything but the Cocoa testnative code for Mac OS X, which is fine, but then testnative fails to link because testnative.h enables the X11 support based on the SDL config header.

Building the testnativex11.c code on Mac OS X doesn't work because you need to explicitly link with "-L/usr/X11/lib -lX11" if this code is enabled, but you can't link with that by default because the X11 SDK might be missing.

So this needs a little configure magic to do the right thing (or forcibly disabling X11 support on Mac OS X in testnative.h).
---
 test/Makefile.in  | 7 ++++---
 test/configure    | 3 +++
 test/configure.in | 2 ++
 3 files changed, 9 insertions(+), 3 deletions(-)

diff --git a/test/Makefile.in b/test/Makefile.in
index d7386992b..073d20100 100644
--- a/test/Makefile.in
+++ b/test/Makefile.in
@@ -150,8 +150,9 @@ testlock$(EXE): $(srcdir)/testlock.c
 
 ifeq (@ISMACOSX@,true)
 testnative$(EXE): $(srcdir)/testnative.c \
-			$(srcdir)/testnativecocoa.m
-	$(CC) -o $@ $^ $(CFLAGS) $(LIBS) -framework Cocoa
+			$(srcdir)/testnativecocoa.m \
+			$(srcdir)/testnativex11.c
+	$(CC) -o $@ $^ $(CFLAGS) $(LIBS) -framework Cocoa @XLIB@
 endif
 
 ifeq (@ISWINDOWS@,true)
@@ -163,7 +164,7 @@ endif
 ifeq (@ISUNIX@,true)
 testnative$(EXE): $(srcdir)/testnative.c \
 			$(srcdir)/testnativex11.c
-	$(CC) -o $@ $^ $(CFLAGS) $(LIBS) -L/usr/X11/lib -lX11
+	$(CC) -o $@ $^ $(CFLAGS) $(LIBS) @XLIB@
 endif
 
 testoverlay2$(EXE): $(srcdir)/testoverlay2.c
diff --git a/test/configure b/test/configure
index f91d30d9a..319c03298 100755
--- a/test/configure
+++ b/test/configure
@@ -585,6 +585,7 @@ ac_unique_file="README"
 ac_subst_vars='LTLIBOBJS
 LIBOBJS
 SDL_TTF_LIB
+XLIB
 GLLIB
 CPP
 XMKMF
@@ -3793,6 +3794,7 @@ if test x$have_x = xyes; then
         :
     else
         XPATH="-L$ac_x_libraries"
+        XLIB="-L$ac_x_libraries -lX11"
     fi
 fi
 
@@ -3865,6 +3867,7 @@ fi
 
 
 
+
 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for TTF_Init in -lSDL2_ttf" >&5
 $as_echo_n "checking for TTF_Init in -lSDL2_ttf... " >&6; }
 if ${ac_cv_lib_SDL2_ttf_TTF_Init+:} false; then :
diff --git a/test/configure.in b/test/configure.in
index b89b4617d..b74800758 100644
--- a/test/configure.in
+++ b/test/configure.in
@@ -100,6 +100,7 @@ if test x$have_x = xyes; then
         :
     else
         XPATH="-L$ac_x_libraries"
+        XLIB="-L$ac_x_libraries -lX11"
     fi
 fi
 
@@ -141,6 +142,7 @@ else
 fi
 
 AC_SUBST(GLLIB)
+AC_SUBST(XLIB)
 
 dnl Check for SDL_ttf
 AC_CHECK_LIB(SDL2_ttf, TTF_Init, have_SDL_ttf=yes)

From 188729834c089f6731974658a633beaa21dd7d50 Mon Sep 17 00:00:00 2001
From: Sam Lantinga 
Date: Sun, 21 Jul 2013 12:54:27 -0700
Subject: [PATCH 407/542] Fixed bug 1813 - MouseMotion relative values do not
 respect renderer LogicalSize

driedfruit

A trivial issue, the xrel and yrel values of MouseMotion event struct are not adjusted to renderer logical size.
---
 src/render/SDL_render.c | 10 ++++++++++
 1 file changed, 10 insertions(+)

diff --git a/src/render/SDL_render.c b/src/render/SDL_render.c
index 7f91e4510..c87ba2f14 100644
--- a/src/render/SDL_render.c
+++ b/src/render/SDL_render.c
@@ -151,6 +151,16 @@ SDL_RendererEventWatch(void *userdata, SDL_Event *event)
             event->motion.y -= renderer->viewport.y;
             event->motion.x = (int)(event->motion.x / renderer->scale.x);
             event->motion.y = (int)(event->motion.y / renderer->scale.y);
+            if (event->motion.xrel > 0) {
+                event->motion.xrel = SDL_max(1, (int)(event->motion.xrel / renderer->scale.x));
+            } else if (event->motion.xrel < 0) {
+                event->motion.xrel = SDL_min(-1, (int)(event->motion.xrel / renderer->scale.x));
+            }
+            if (event->motion.yrel > 0) {
+                event->motion.yrel = SDL_max(1, (int)(event->motion.yrel / renderer->scale.y));
+            } else if (event->motion.yrel < 0) {
+                event->motion.yrel = SDL_min(-1, (int)(event->motion.yrel / renderer->scale.y));
+            }
         }
     } else if (event->type == SDL_MOUSEBUTTONDOWN ||
                event->type == SDL_MOUSEBUTTONUP) {

From 588e67304c73977442535a5aa99f6fbc414b9e8d Mon Sep 17 00:00:00 2001
From: Philipp Wiesemann 
Date: Sun, 21 Jul 2013 22:09:00 +0200
Subject: [PATCH 408/542] Removed not needed SDL_WINDOW_SHOWN from iOS example
 programs. See bug #1667.

---
 Xcode-iOS/Demos/src/accelerometer.c           | 2 +-
 Xcode-iOS/Demos/src/fireworks.c               | 2 +-
 Xcode-iOS/Demos/src/happy.c                   | 2 +-
 Xcode-iOS/Demos/src/rectangles.c              | 2 +-
 Xcode-iOS/Demos/src/touch.c                   | 2 +-
 Xcode-iOS/Template/SDL iOS Application/main.c | 2 +-
 6 files changed, 6 insertions(+), 6 deletions(-)

diff --git a/Xcode-iOS/Demos/src/accelerometer.c b/Xcode-iOS/Demos/src/accelerometer.c
index 78d42041b..115de627f 100644
--- a/Xcode-iOS/Demos/src/accelerometer.c
+++ b/Xcode-iOS/Demos/src/accelerometer.c
@@ -172,7 +172,7 @@ main(int argc, char *argv[])
 
     /* create main window and renderer */
     window = SDL_CreateWindow(NULL, 0, 0, SCREEN_WIDTH, SCREEN_HEIGHT,
-                                SDL_WINDOW_OPENGL | SDL_WINDOW_SHOWN |
+                                SDL_WINDOW_OPENGL |
                                 SDL_WINDOW_BORDERLESS);
     renderer = SDL_CreateRenderer(window, 0, 0);
 
diff --git a/Xcode-iOS/Demos/src/fireworks.c b/Xcode-iOS/Demos/src/fireworks.c
index 5b4c4118c..b2a4d095d 100644
--- a/Xcode-iOS/Demos/src/fireworks.c
+++ b/Xcode-iOS/Demos/src/fireworks.c
@@ -389,7 +389,7 @@ main(int argc, char *argv[])
 
     /* create main window and renderer */
     window = SDL_CreateWindow(NULL, 0, 0, SCREEN_WIDTH, SCREEN_HEIGHT,
-                                SDL_WINDOW_OPENGL | SDL_WINDOW_SHOWN |
+                                SDL_WINDOW_OPENGL |
                                 SDL_WINDOW_BORDERLESS);
     context = SDL_GL_CreateContext(window);
 
diff --git a/Xcode-iOS/Demos/src/happy.c b/Xcode-iOS/Demos/src/happy.c
index 7a524c0e4..ce661d958 100644
--- a/Xcode-iOS/Demos/src/happy.c
+++ b/Xcode-iOS/Demos/src/happy.c
@@ -136,7 +136,7 @@ main(int argc, char *argv[])
         fatalError("Could not initialize SDL");
     }
     window = SDL_CreateWindow(NULL, 0, 0, SCREEN_WIDTH, SCREEN_HEIGHT,
-                                SDL_WINDOW_OPENGL | SDL_WINDOW_SHOWN |
+                                SDL_WINDOW_OPENGL |
                                 SDL_WINDOW_BORDERLESS);
 
     renderer = SDL_CreateRenderer(window, -1, 0);
diff --git a/Xcode-iOS/Demos/src/rectangles.c b/Xcode-iOS/Demos/src/rectangles.c
index 391d9b093..035e4f982 100644
--- a/Xcode-iOS/Demos/src/rectangles.c
+++ b/Xcode-iOS/Demos/src/rectangles.c
@@ -68,7 +68,7 @@ main(int argc, char *argv[])
     _sdl_window = SDL_CreateWindow("fred",
                                    0, 0,
                                    sx, sy,
-                                   SDL_WINDOW_OPENGL | SDL_WINDOW_SHOWN | SDL_WINDOW_BORDERLESS);
+                                   SDL_WINDOW_OPENGL | SDL_WINDOW_BORDERLESS);
     
     SDL_SetHint("SDL_HINT_ORIENTATIONS", "LandscapeLeft LandscapeRight");
     
diff --git a/Xcode-iOS/Demos/src/touch.c b/Xcode-iOS/Demos/src/touch.c
index b5065b10a..e811967b1 100644
--- a/Xcode-iOS/Demos/src/touch.c
+++ b/Xcode-iOS/Demos/src/touch.c
@@ -88,7 +88,7 @@ main(int argc, char *argv[])
 
     /* create main window and renderer */
     window = SDL_CreateWindow(NULL, 0, 0, SCREEN_WIDTH, SCREEN_HEIGHT,
-                                SDL_WINDOW_OPENGL | SDL_WINDOW_SHOWN |
+                                SDL_WINDOW_OPENGL |
                                 SDL_WINDOW_BORDERLESS);
     renderer = SDL_CreateRenderer(window, 0, 0);
 
diff --git a/Xcode-iOS/Template/SDL iOS Application/main.c b/Xcode-iOS/Template/SDL iOS Application/main.c
index ca05e0083..8dc00706f 100644
--- a/Xcode-iOS/Template/SDL iOS Application/main.c	
+++ b/Xcode-iOS/Template/SDL iOS Application/main.c	
@@ -67,7 +67,7 @@ main(int argc, char *argv[])
     /* create window and renderer */
     window =
         SDL_CreateWindow(NULL, 0, 0, SCREEN_WIDTH, SCREEN_HEIGHT,
-                         SDL_WINDOW_OPENGL | SDL_WINDOW_SHOWN);
+                         SDL_WINDOW_OPENGL);
     if (!window) {
         printf("Could not initialize Window\n");
         return 1;

From ef291a943ff937c29ef56758df3c2a4d7c1bc91a Mon Sep 17 00:00:00 2001
From: Sam Lantinga 
Date: Sun, 21 Jul 2013 23:01:01 -0700
Subject: [PATCH 409/542] Fixed building with cygwin Note that building with
 cygwin gcc results in a DLL that depends on cygwin1.dll

---
 configure                          | 86 +++++++++++++++++++++++++++---
 configure.in                       | 37 ++++++++++---
 include/SDL_platform.h             |  2 +-
 src/thread/windows/SDL_systhread.c |  6 +++
 4 files changed, 116 insertions(+), 15 deletions(-)
 mode change 100644 => 100755 src/thread/windows/SDL_systhread.c

diff --git a/configure b/configure
index 134136f66..ff1702ed5 100755
--- a/configure
+++ b/configure
@@ -15802,15 +15802,45 @@ elif test -d .hg; then
     separate directory so you don't clobber SDL_config.h, SDL_revision.h
 " "$LINENO" 5
 fi
+BASE_CFLAGS=""
+BASE_LDFLAGS=""
 case "$host" in
     *-*-cygwin*)
         # We build SDL on cygwin without the UNIX emulation layer
-        BASE_CFLAGS="-I/usr/include/mingw -mno-cygwin"
-        BASE_LDFLAGS="-mno-cygwin"
-        ;;
-    *)
-        BASE_CFLAGS=""
-        BASE_LDFLAGS=""
+        save_CFLAGS="$CFLAGS"
+        have_no_cygwin=no
+        { $as_echo "$as_me:${as_lineno-$LINENO}: checking for GCC -mno-cygwin option" >&5
+$as_echo_n "checking for GCC -mno-cygwin option... " >&6; }
+        CFLAGS="$save_CFLAGS -mno-cygwin"
+
+        cat confdefs.h - <<_ACEOF >conftest.$ac_ext
+/* end confdefs.h.  */
+
+
+int
+main ()
+{
+
+
+  ;
+  return 0;
+}
+_ACEOF
+if ac_fn_c_try_compile "$LINENO"; then :
+
+        have_no_cygwin=yes
+
+fi
+rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
+        { $as_echo "$as_me:${as_lineno-$LINENO}: result: $have_no_cygwin" >&5
+$as_echo "$have_no_cygwin" >&6; }
+        CFLAGS="$save_CFLAGS"
+
+        if test x$have_no_cygwin = xyes; then
+            BASE_CFLAGS="-mno-cygwin"
+            BASE_LDFLAGS="-mno-cygwin"
+        fi
+        BASE_CFLAGS="$BASE_CFLAGS -I/usr/include/mingw"
         ;;
 esac
 # Uncomment the following line if you want to force SDL and applications
@@ -22428,7 +22458,49 @@ $as_echo "#define SDL_LOADSO_WINDOWS 1" >>confdefs.h
         VERSION_SOURCES="$srcdir/src/main/windows/*.rc"
         SDLMAIN_SOURCES="$srcdir/src/main/windows/*.c"
         SDL_CFLAGS="$SDL_CFLAGS -Dmain=SDL_main"
-        SDL_LIBS="-lmingw32 -lSDL2main $SDL_LIBS -mwindows"
+        SDL_LIBS="-lSDL2main $SDL_LIBS -mwindows"
+
+        # Check to see if this is a mingw or cygwin build
+        have_mingw32=
+        { $as_echo "$as_me:${as_lineno-$LINENO}: checking for main in -lmingw32" >&5
+$as_echo_n "checking for main in -lmingw32... " >&6; }
+if ${ac_cv_lib_mingw32_main+:} false; then :
+  $as_echo_n "(cached) " >&6
+else
+  ac_check_lib_save_LIBS=$LIBS
+LIBS="-lmingw32  $LIBS"
+cat confdefs.h - <<_ACEOF >conftest.$ac_ext
+/* end confdefs.h.  */
+
+
+int
+main ()
+{
+return main ();
+  ;
+  return 0;
+}
+_ACEOF
+if ac_fn_c_try_link "$LINENO"; then :
+  ac_cv_lib_mingw32_main=yes
+else
+  ac_cv_lib_mingw32_main=no
+fi
+rm -f core conftest.err conftest.$ac_objext \
+    conftest$ac_exeext conftest.$ac_ext
+LIBS=$ac_check_lib_save_LIBS
+fi
+{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_mingw32_main" >&5
+$as_echo "$ac_cv_lib_mingw32_main" >&6; }
+if test "x$ac_cv_lib_mingw32_main" = xyes; then :
+  have_mingw32=yes
+fi
+
+        if test x$have_mingw32 = xyes; then
+            SDL_LIBS="-lmingw32 $SDL_LIBS"
+        else
+            SDL_LIBS="-lcygwin $SDL_LIBS"
+        fi
         ;;
     *-*-beos* | *-*-haiku*)
         ARCH=beos
diff --git a/configure.in b/configure.in
index 018a58aef..3346985ea 100644
--- a/configure.in
+++ b/configure.in
@@ -70,15 +70,29 @@ elif test -d .hg; then
     separate directory so you don't clobber SDL_config.h, SDL_revision.h
 ])
 fi
+BASE_CFLAGS=""
+BASE_LDFLAGS=""
 case "$host" in
     *-*-cygwin*)
         # We build SDL on cygwin without the UNIX emulation layer
-        BASE_CFLAGS="-I/usr/include/mingw -mno-cygwin"
-        BASE_LDFLAGS="-mno-cygwin"
-        ;;
-    *)
-        BASE_CFLAGS=""
-        BASE_LDFLAGS=""
+        save_CFLAGS="$CFLAGS"
+        have_no_cygwin=no
+        AC_MSG_CHECKING(for GCC -mno-cygwin option)
+        CFLAGS="$save_CFLAGS -mno-cygwin"
+
+        AC_TRY_COMPILE([
+        ],[
+        ],[
+        have_no_cygwin=yes
+        ])
+        AC_MSG_RESULT($have_no_cygwin)
+        CFLAGS="$save_CFLAGS"
+
+        if test x$have_no_cygwin = xyes; then
+            BASE_CFLAGS="-mno-cygwin"
+            BASE_LDFLAGS="-mno-cygwin"
+        fi
+        BASE_CFLAGS="$BASE_CFLAGS -I/usr/include/mingw"
         ;;
 esac
 # Uncomment the following line if you want to force SDL and applications
@@ -2511,7 +2525,16 @@ AC_HELP_STRING([--enable-render-d3d], [enable the Direct3D render driver [[defau
         VERSION_SOURCES="$srcdir/src/main/windows/*.rc"
         SDLMAIN_SOURCES="$srcdir/src/main/windows/*.c"
         SDL_CFLAGS="$SDL_CFLAGS -Dmain=SDL_main"
-        SDL_LIBS="-lmingw32 -lSDL2main $SDL_LIBS -mwindows"
+        SDL_LIBS="-lSDL2main $SDL_LIBS -mwindows"
+
+        # Check to see if this is a mingw or cygwin build
+        have_mingw32=
+        AC_CHECK_LIB(mingw32, main, [have_mingw32=yes])
+        if test x$have_mingw32 = xyes; then
+            SDL_LIBS="-lmingw32 $SDL_LIBS"
+        else
+            SDL_LIBS="-lcygwin $SDL_LIBS"
+        fi
         ;;
     *-*-beos* | *-*-haiku*)
         ARCH=beos
diff --git a/include/SDL_platform.h b/include/SDL_platform.h
index 77ee437cb..f4f23c41a 100644
--- a/include/SDL_platform.h
+++ b/include/SDL_platform.h
@@ -114,7 +114,7 @@
 #undef __SOLARIS__
 #define __SOLARIS__ 1
 #endif
-#if defined(WIN32) || defined(_WIN32)
+#if defined(WIN32) || defined(_WIN32) || defined(__CYGWIN__)
 #undef __WIN32__
 #define __WIN32__   1
 #endif
diff --git a/src/thread/windows/SDL_systhread.c b/src/thread/windows/SDL_systhread.c
old mode 100644
new mode 100755
index ada365413..6cf826ec7
--- a/src/thread/windows/SDL_systhread.c
+++ b/src/thread/windows/SDL_systhread.c
@@ -106,6 +106,12 @@ SDL_SYS_CreateThread(SDL_Thread * thread, void *args,
                      pfnSDL_CurrentBeginThread pfnBeginThread,
                      pfnSDL_CurrentEndThread pfnEndThread)
 {
+#elif defined(__CYGWIN__)
+int
+SDL_SYS_CreateThread(SDL_Thread * thread, void *args)
+{
+    pfnSDL_CurrentBeginThread pfnBeginThread = NULL;
+    pfnSDL_CurrentEndThread pfnEndThread = NULL;
 #else
 int
 SDL_SYS_CreateThread(SDL_Thread * thread, void *args)

From a74537a5a94c1c4ac07ffff7958e98cad79e27db Mon Sep 17 00:00:00 2001
From: Andreas Schiffler 
Date: Mon, 22 Jul 2013 06:00:41 -0700
Subject: [PATCH 410/542] Fix bug 1494: add missing test projects to
 VS2010/VS2010 solution

---
 VisualC/SDL_VS2010.sln                        |  48 ++
 VisualC/SDL_VS2010EE.sln                      |  45 ++
 VisualC/SDL_VS2012.sln                        |  32 ++
 VisualC/SDL_VS2012EE.sln                      |  45 ++
 .../testgesture/testgesture_VS2010.vcxproj    | 361 ++++++++------
 .../testgesture/testgesture_VS2012.vcxproj    | 231 +++++++++
 .../testjoystick/testjoystick_VS2010.vcxproj  | 454 +++++++++---------
 .../testjoystick/testjoystick_VS2012.vcxproj  | 231 +++++++++
 .../testoverlay2/testoverlay2_VS2010.vcxproj  |  27 +-
 .../testoverlay2/testoverlay2_VS2012.vcxproj  | 235 +++++++++
 10 files changed, 1334 insertions(+), 375 deletions(-)
 create mode 100644 VisualC/tests/testgesture/testgesture_VS2012.vcxproj
 create mode 100644 VisualC/tests/testjoystick/testjoystick_VS2012.vcxproj
 create mode 100644 VisualC/tests/testoverlay2/testoverlay2_VS2012.vcxproj

diff --git a/VisualC/SDL_VS2010.sln b/VisualC/SDL_VS2010.sln
index 9128a2f21..d3274dada 100644
--- a/VisualC/SDL_VS2010.sln
+++ b/VisualC/SDL_VS2010.sln
@@ -35,6 +35,27 @@ Project("{8BC9CEB8-8B4A-11D0-8D11-00A0C91BC942}") = "testscale", "tests\testscal
 EndProject
 Project("{8BC9CEB8-8B4A-11D0-8D11-00A0C91BC942}") = "testrendertarget", "tests\testrendertarget\testrendertarget_VS2010.vcxproj", "{43A06713-A52D-4008-AD7E-A69DF3FCFFA8}"
 EndProject
+Project("{8BC9CEB8-8B4A-11D0-8D11-00A0C91BC942}") = "testgamecontroller", "tests\testgamecontroller\testgamecontroller_VS2010.vcxproj", "{55812185-D13C-4022-9C81-32E0F4A08336}"
+	ProjectSection(ProjectDependencies) = postProject
+		{81CE8DAF-EBB2-4761-8E45-B71ABCCA8C68} = {81CE8DAF-EBB2-4761-8E45-B71ABCCA8C68}
+		{DA956FD3-E142-46F2-9DD5-C78BEBB56B7A} = {DA956FD3-E142-46F2-9DD5-C78BEBB56B7A}
+		{DA956FD3-E143-46F2-9FE5-C77BEBC56B1A} = {DA956FD3-E143-46F2-9FE5-C77BEBC56B1A}
+	EndProjectSection
+EndProject
+Project("{8BC9CEB8-8B4A-11D0-8D11-00A0C91BC942}") = "testgesture", "tests\testgesture\testgesture_VS2010.vcxproj", "{55812185-D13C-4022-9C81-32E0F4A08996}"
+	ProjectSection(ProjectDependencies) = postProject
+		{81CE8DAF-EBB2-4761-8E45-B71ABCCA8C68} = {81CE8DAF-EBB2-4761-8E45-B71ABCCA8C68}
+		{DA956FD3-E142-46F2-9DD5-C78BEBB56B7A} = {DA956FD3-E142-46F2-9DD5-C78BEBB56B7A}
+		{DA956FD3-E143-46F2-9FE5-C77BEBC56B1A} = {DA956FD3-E143-46F2-9FE5-C77BEBC56B1A}
+	EndProjectSection
+EndProject
+Project("{8BC9CEB8-8B4A-11D0-8D11-00A0C91BC942}") = "testjoystick", "tests\testjoystick\testjoystick_VS2010.vcxproj", "{55812185-D13C-4022-9C81-32E0F4A08BCC}"
+	ProjectSection(ProjectDependencies) = postProject
+		{81CE8DAF-EBB2-4761-8E45-B71ABCCA8C68} = {81CE8DAF-EBB2-4761-8E45-B71ABCCA8C68}
+		{DA956FD3-E142-46F2-9DD5-C78BEBB56B7A} = {DA956FD3-E142-46F2-9DD5-C78BEBB56B7A}
+		{DA956FD3-E143-46F2-9FE5-C77BEBC56B1A} = {DA956FD3-E143-46F2-9FE5-C77BEBC56B1A}
+	EndProjectSection
+EndProject
 Global
 	GlobalSection(SolutionConfigurationPlatforms) = preSolution
 		Debug|Win32 = Debug|Win32
@@ -169,6 +190,30 @@ Global
 		{43A06713-A52D-4008-AD7E-A69DF3FCFFA8}.Release|Win32.Build.0 = Release|Win32
 		{43A06713-A52D-4008-AD7E-A69DF3FCFFA8}.Release|x64.ActiveCfg = Release|x64
 		{43A06713-A52D-4008-AD7E-A69DF3FCFFA8}.Release|x64.Build.0 = Release|x64
+		{55812185-D13C-4022-9C81-32E0F4A08336}.Debug|Win32.ActiveCfg = Debug|Win32
+		{55812185-D13C-4022-9C81-32E0F4A08336}.Debug|Win32.Build.0 = Debug|Win32
+		{55812185-D13C-4022-9C81-32E0F4A08336}.Debug|x64.ActiveCfg = Debug|x64
+		{55812185-D13C-4022-9C81-32E0F4A08336}.Debug|x64.Build.0 = Debug|x64
+		{55812185-D13C-4022-9C81-32E0F4A08336}.Release|Win32.ActiveCfg = Release|Win32
+		{55812185-D13C-4022-9C81-32E0F4A08336}.Release|Win32.Build.0 = Release|Win32
+		{55812185-D13C-4022-9C81-32E0F4A08336}.Release|x64.ActiveCfg = Release|x64
+		{55812185-D13C-4022-9C81-32E0F4A08336}.Release|x64.Build.0 = Release|x64
+		{55812185-D13C-4022-9C81-32E0F4A08996}.Debug|Win32.ActiveCfg = Debug|Win32
+		{55812185-D13C-4022-9C81-32E0F4A08996}.Debug|Win32.Build.0 = Debug|Win32
+		{55812185-D13C-4022-9C81-32E0F4A08996}.Debug|x64.ActiveCfg = Debug|x64
+		{55812185-D13C-4022-9C81-32E0F4A08996}.Debug|x64.Build.0 = Debug|x64
+		{55812185-D13C-4022-9C81-32E0F4A08996}.Release|Win32.ActiveCfg = Release|Win32
+		{55812185-D13C-4022-9C81-32E0F4A08996}.Release|Win32.Build.0 = Release|Win32
+		{55812185-D13C-4022-9C81-32E0F4A08996}.Release|x64.ActiveCfg = Release|x64
+		{55812185-D13C-4022-9C81-32E0F4A08996}.Release|x64.Build.0 = Release|x64
+		{55812185-D13C-4022-9C81-32E0F4A08BCC}.Debug|Win32.ActiveCfg = Debug|Win32
+		{55812185-D13C-4022-9C81-32E0F4A08BCC}.Debug|Win32.Build.0 = Debug|Win32
+		{55812185-D13C-4022-9C81-32E0F4A08BCC}.Debug|x64.ActiveCfg = Debug|x64
+		{55812185-D13C-4022-9C81-32E0F4A08BCC}.Debug|x64.Build.0 = Debug|x64
+		{55812185-D13C-4022-9C81-32E0F4A08BCC}.Release|Win32.ActiveCfg = Release|Win32
+		{55812185-D13C-4022-9C81-32E0F4A08BCC}.Release|Win32.Build.0 = Release|Win32
+		{55812185-D13C-4022-9C81-32E0F4A08BCC}.Release|x64.ActiveCfg = Release|x64
+		{55812185-D13C-4022-9C81-32E0F4A08BCC}.Release|x64.Build.0 = Release|x64
 	EndGlobalSection
 	GlobalSection(SolutionProperties) = preSolution
 		HideSolutionNode = FALSE
@@ -187,5 +232,8 @@ Global
 		{2271060E-98B4-4596-8172-A041E4B2EC7A} = {CE748C1F-3C21-4825-AA6A-F895A023F7E7}
 		{E7A6C41C-E059-4C9C-8CCC-73586A540B62} = {CE748C1F-3C21-4825-AA6A-F895A023F7E7}
 		{43A06713-A52D-4008-AD7E-A69DF3FCFFA8} = {CE748C1F-3C21-4825-AA6A-F895A023F7E7}
+		{55812185-D13C-4022-9C81-32E0F4A08336} = {CE748C1F-3C21-4825-AA6A-F895A023F7E7}
+		{55812185-D13C-4022-9C81-32E0F4A08996} = {CE748C1F-3C21-4825-AA6A-F895A023F7E7}
+		{55812185-D13C-4022-9C81-32E0F4A08BCC} = {CE748C1F-3C21-4825-AA6A-F895A023F7E7}
 	EndGlobalSection
 EndGlobal
diff --git a/VisualC/SDL_VS2010EE.sln b/VisualC/SDL_VS2010EE.sln
index d9915f253..d5213da46 100644
--- a/VisualC/SDL_VS2010EE.sln
+++ b/VisualC/SDL_VS2010EE.sln
@@ -33,6 +33,27 @@ Project("{8BC9CEB8-8B4A-11D0-8D11-00A0C91BC942}") = "testscale", "tests\testscal
 EndProject
 Project("{8BC9CEB8-8B4A-11D0-8D11-00A0C91BC942}") = "testrendertarget", "tests\testrendertarget\testrendertarget_VS2010.vcxproj", "{43A06713-A52D-4008-AD7E-A69DF3FCFFA8}"
 EndProject
+Project("{8BC9CEB8-8B4A-11D0-8D11-00A0C91BC942}") = "testgamecontroller", "tests\testgamecontroller\testgamecontroller_VS2010.vcxproj", "{55812185-D13C-4022-9C81-32E0F4A08336}"
+	ProjectSection(ProjectDependencies) = postProject
+		{81CE8DAF-EBB2-4761-8E45-B71ABCCA8C68} = {81CE8DAF-EBB2-4761-8E45-B71ABCCA8C68}
+		{DA956FD3-E142-46F2-9DD5-C78BEBB56B7A} = {DA956FD3-E142-46F2-9DD5-C78BEBB56B7A}
+		{DA956FD3-E143-46F2-9FE5-C77BEBC56B1A} = {DA956FD3-E143-46F2-9FE5-C77BEBC56B1A}
+	EndProjectSection
+EndProject
+Project("{8BC9CEB8-8B4A-11D0-8D11-00A0C91BC942}") = "testgesture", "tests\testgesture\testgesture_VS2010.vcxproj", "{55812185-D13C-4022-9C81-32E0F4A08996}"
+	ProjectSection(ProjectDependencies) = postProject
+		{81CE8DAF-EBB2-4761-8E45-B71ABCCA8C68} = {81CE8DAF-EBB2-4761-8E45-B71ABCCA8C68}
+		{DA956FD3-E142-46F2-9DD5-C78BEBB56B7A} = {DA956FD3-E142-46F2-9DD5-C78BEBB56B7A}
+		{DA956FD3-E143-46F2-9FE5-C77BEBC56B1A} = {DA956FD3-E143-46F2-9FE5-C77BEBC56B1A}
+	EndProjectSection
+EndProject
+Project("{8BC9CEB8-8B4A-11D0-8D11-00A0C91BC942}") = "testjoystick", "tests\testjoystick\testjoystick_VS2010.vcxproj", "{55812185-D13C-4022-9C81-32E0F4A08BCC}"
+	ProjectSection(ProjectDependencies) = postProject
+		{81CE8DAF-EBB2-4761-8E45-B71ABCCA8C68} = {81CE8DAF-EBB2-4761-8E45-B71ABCCA8C68}
+		{DA956FD3-E142-46F2-9DD5-C78BEBB56B7A} = {DA956FD3-E142-46F2-9DD5-C78BEBB56B7A}
+		{DA956FD3-E143-46F2-9FE5-C77BEBC56B1A} = {DA956FD3-E143-46F2-9FE5-C77BEBC56B1A}
+	EndProjectSection
+EndProject
 Global
 	GlobalSection(SolutionConfigurationPlatforms) = preSolution
 		Debug|Win32 = Debug|Win32
@@ -167,6 +188,30 @@ Global
 		{43A06713-A52D-4008-AD7E-A69DF3FCFFA8}.Release|Win32.Build.0 = Release|Win32
 		{43A06713-A52D-4008-AD7E-A69DF3FCFFA8}.Release|x64.ActiveCfg = Release|x64
 		{43A06713-A52D-4008-AD7E-A69DF3FCFFA8}.Release|x64.Build.0 = Release|x64
+		{55812185-D13C-4022-9C81-32E0F4A08336}.Debug|Win32.ActiveCfg = Debug|Win32
+		{55812185-D13C-4022-9C81-32E0F4A08336}.Debug|Win32.Build.0 = Debug|Win32
+		{55812185-D13C-4022-9C81-32E0F4A08336}.Debug|x64.ActiveCfg = Debug|x64
+		{55812185-D13C-4022-9C81-32E0F4A08336}.Debug|x64.Build.0 = Debug|x64
+		{55812185-D13C-4022-9C81-32E0F4A08336}.Release|Win32.ActiveCfg = Release|Win32
+		{55812185-D13C-4022-9C81-32E0F4A08336}.Release|Win32.Build.0 = Release|Win32
+		{55812185-D13C-4022-9C81-32E0F4A08336}.Release|x64.ActiveCfg = Release|x64
+		{55812185-D13C-4022-9C81-32E0F4A08336}.Release|x64.Build.0 = Release|x64
+		{55812185-D13C-4022-9C81-32E0F4A08996}.Debug|Win32.ActiveCfg = Debug|Win32
+		{55812185-D13C-4022-9C81-32E0F4A08996}.Debug|Win32.Build.0 = Debug|Win32
+		{55812185-D13C-4022-9C81-32E0F4A08996}.Debug|x64.ActiveCfg = Debug|x64
+		{55812185-D13C-4022-9C81-32E0F4A08996}.Debug|x64.Build.0 = Debug|x64
+		{55812185-D13C-4022-9C81-32E0F4A08996}.Release|Win32.ActiveCfg = Release|Win32
+		{55812185-D13C-4022-9C81-32E0F4A08996}.Release|Win32.Build.0 = Release|Win32
+		{55812185-D13C-4022-9C81-32E0F4A08996}.Release|x64.ActiveCfg = Release|x64
+		{55812185-D13C-4022-9C81-32E0F4A08996}.Release|x64.Build.0 = Release|x64
+		{55812185-D13C-4022-9C81-32E0F4A08BCC}.Debug|Win32.ActiveCfg = Debug|Win32
+		{55812185-D13C-4022-9C81-32E0F4A08BCC}.Debug|Win32.Build.0 = Debug|Win32
+		{55812185-D13C-4022-9C81-32E0F4A08BCC}.Debug|x64.ActiveCfg = Debug|x64
+		{55812185-D13C-4022-9C81-32E0F4A08BCC}.Debug|x64.Build.0 = Debug|x64
+		{55812185-D13C-4022-9C81-32E0F4A08BCC}.Release|Win32.ActiveCfg = Release|Win32
+		{55812185-D13C-4022-9C81-32E0F4A08BCC}.Release|Win32.Build.0 = Release|Win32
+		{55812185-D13C-4022-9C81-32E0F4A08BCC}.Release|x64.ActiveCfg = Release|x64
+		{55812185-D13C-4022-9C81-32E0F4A08BCC}.Release|x64.Build.0 = Release|x64
 	EndGlobalSection
 	GlobalSection(SolutionProperties) = preSolution
 		HideSolutionNode = FALSE
diff --git a/VisualC/SDL_VS2012.sln b/VisualC/SDL_VS2012.sln
index cd15c6095..3ac7b68f2 100644
--- a/VisualC/SDL_VS2012.sln
+++ b/VisualC/SDL_VS2012.sln
@@ -89,6 +89,20 @@ Project("{8BC9CEB8-8B4A-11D0-8D11-00A0C91BC942}") = "testgamecontroller", "tests
 		{DA956FD3-E143-46F2-9FE5-C77BEBC56B1A} = {DA956FD3-E143-46F2-9FE5-C77BEBC56B1A}
 	EndProjectSection
 EndProject
+Project("{8BC9CEB8-8B4A-11D0-8D11-00A0C91BC942}") = "testgesture", "tests\testgesture\testgesture_VS2012.vcxproj", "{55812185-D13C-4022-9C81-32E0F4A08996}"
+	ProjectSection(ProjectDependencies) = postProject
+		{81CE8DAF-EBB2-4761-8E45-B71ABCCA8C68} = {81CE8DAF-EBB2-4761-8E45-B71ABCCA8C68}
+		{DA956FD3-E142-46F2-9DD5-C78BEBB56B7A} = {DA956FD3-E142-46F2-9DD5-C78BEBB56B7A}
+		{DA956FD3-E143-46F2-9FE5-C77BEBC56B1A} = {DA956FD3-E143-46F2-9FE5-C77BEBC56B1A}
+	EndProjectSection
+EndProject
+Project("{8BC9CEB8-8B4A-11D0-8D11-00A0C91BC942}") = "testjoystick", "tests\testjoystick\testjoystick_VS2012.vcxproj", "{55812185-D13C-4022-9C81-32E0F4A08BCC}"
+	ProjectSection(ProjectDependencies) = postProject
+		{81CE8DAF-EBB2-4761-8E45-B71ABCCA8C68} = {81CE8DAF-EBB2-4761-8E45-B71ABCCA8C68}
+		{DA956FD3-E142-46F2-9DD5-C78BEBB56B7A} = {DA956FD3-E142-46F2-9DD5-C78BEBB56B7A}
+		{DA956FD3-E143-46F2-9FE5-C77BEBC56B1A} = {DA956FD3-E143-46F2-9FE5-C77BEBC56B1A}
+	EndProjectSection
+EndProject
 Global
 	GlobalSection(SolutionConfigurationPlatforms) = preSolution
 		Debug|Win32 = Debug|Win32
@@ -223,6 +237,22 @@ Global
 		{55812185-D13C-4022-9C81-32E0F4A08336}.Release|Win32.Build.0 = Release|Win32
 		{55812185-D13C-4022-9C81-32E0F4A08336}.Release|x64.ActiveCfg = Release|x64
 		{55812185-D13C-4022-9C81-32E0F4A08336}.Release|x64.Build.0 = Release|x64
+		{55812185-D13C-4022-9C81-32E0F4A08996}.Debug|Win32.ActiveCfg = Debug|Win32
+		{55812185-D13C-4022-9C81-32E0F4A08996}.Debug|Win32.Build.0 = Debug|Win32
+		{55812185-D13C-4022-9C81-32E0F4A08996}.Debug|x64.ActiveCfg = Debug|x64
+		{55812185-D13C-4022-9C81-32E0F4A08996}.Debug|x64.Build.0 = Debug|x64
+		{55812185-D13C-4022-9C81-32E0F4A08996}.Release|Win32.ActiveCfg = Release|Win32
+		{55812185-D13C-4022-9C81-32E0F4A08996}.Release|Win32.Build.0 = Release|Win32
+		{55812185-D13C-4022-9C81-32E0F4A08996}.Release|x64.ActiveCfg = Release|x64
+		{55812185-D13C-4022-9C81-32E0F4A08996}.Release|x64.Build.0 = Release|x64
+		{55812185-D13C-4022-9C81-32E0F4A08BCC}.Debug|Win32.ActiveCfg = Debug|Win32
+		{55812185-D13C-4022-9C81-32E0F4A08BCC}.Debug|Win32.Build.0 = Debug|Win32
+		{55812185-D13C-4022-9C81-32E0F4A08BCC}.Debug|x64.ActiveCfg = Debug|x64
+		{55812185-D13C-4022-9C81-32E0F4A08BCC}.Debug|x64.Build.0 = Debug|x64
+		{55812185-D13C-4022-9C81-32E0F4A08BCC}.Release|Win32.ActiveCfg = Release|Win32
+		{55812185-D13C-4022-9C81-32E0F4A08BCC}.Release|Win32.Build.0 = Release|Win32
+		{55812185-D13C-4022-9C81-32E0F4A08BCC}.Release|x64.ActiveCfg = Release|x64
+		{55812185-D13C-4022-9C81-32E0F4A08BCC}.Release|x64.Build.0 = Release|x64
 	EndGlobalSection
 	GlobalSection(SolutionProperties) = preSolution
 		HideSolutionNode = FALSE
@@ -242,5 +272,7 @@ Global
 		{E7A6C41C-E059-4C9C-8CCC-73586A540B62} = {CE748C1F-3C21-4825-AA6A-F895A023F7E7}
 		{43A06713-A52D-4008-AD7E-A69DF3FCFFA8} = {CE748C1F-3C21-4825-AA6A-F895A023F7E7}
 		{55812185-D13C-4022-9C81-32E0F4A08336} = {CE748C1F-3C21-4825-AA6A-F895A023F7E7}
+		{55812185-D13C-4022-9C81-32E0F4A08996} = {CE748C1F-3C21-4825-AA6A-F895A023F7E7}
+		{55812185-D13C-4022-9C81-32E0F4A08BCC} = {CE748C1F-3C21-4825-AA6A-F895A023F7E7}
 	EndGlobalSection
 EndGlobal
diff --git a/VisualC/SDL_VS2012EE.sln b/VisualC/SDL_VS2012EE.sln
index 816fdcd4f..456f69982 100644
--- a/VisualC/SDL_VS2012EE.sln
+++ b/VisualC/SDL_VS2012EE.sln
@@ -80,6 +80,27 @@ Project("{8BC9CEB8-8B4A-11D0-8D11-00A0C91BC942}") = "testscale", "tests\testscal
 EndProject
 Project("{8BC9CEB8-8B4A-11D0-8D11-00A0C91BC942}") = "testrendertarget", "tests\testrendertarget\testrendertarget_VS2012.vcxproj", "{43A06713-A52D-4008-AD7E-A69DF3FCFFA8}"
 EndProject
+Project("{8BC9CEB8-8B4A-11D0-8D11-00A0C91BC942}") = "testgamecontroller", "tests\testgamecontroller\testgamecontroller_VS2012.vcxproj", "{55812185-D13C-4022-9C81-32E0F4A08336}"
+	ProjectSection(ProjectDependencies) = postProject
+		{81CE8DAF-EBB2-4761-8E45-B71ABCCA8C68} = {81CE8DAF-EBB2-4761-8E45-B71ABCCA8C68}
+		{DA956FD3-E142-46F2-9DD5-C78BEBB56B7A} = {DA956FD3-E142-46F2-9DD5-C78BEBB56B7A}
+		{DA956FD3-E143-46F2-9FE5-C77BEBC56B1A} = {DA956FD3-E143-46F2-9FE5-C77BEBC56B1A}
+	EndProjectSection
+EndProject
+Project("{8BC9CEB8-8B4A-11D0-8D11-00A0C91BC942}") = "testgesture", "tests\testgesture\testgesture_VS2012.vcxproj", "{55812185-D13C-4022-9C81-32E0F4A08996}"
+	ProjectSection(ProjectDependencies) = postProject
+		{81CE8DAF-EBB2-4761-8E45-B71ABCCA8C68} = {81CE8DAF-EBB2-4761-8E45-B71ABCCA8C68}
+		{DA956FD3-E142-46F2-9DD5-C78BEBB56B7A} = {DA956FD3-E142-46F2-9DD5-C78BEBB56B7A}
+		{DA956FD3-E143-46F2-9FE5-C77BEBC56B1A} = {DA956FD3-E143-46F2-9FE5-C77BEBC56B1A}
+	EndProjectSection
+EndProject
+Project("{8BC9CEB8-8B4A-11D0-8D11-00A0C91BC942}") = "testjoystick", "tests\testjoystick\testjoystick_VS2012.vcxproj", "{55812185-D13C-4022-9C81-32E0F4A08BCC}"
+	ProjectSection(ProjectDependencies) = postProject
+		{81CE8DAF-EBB2-4761-8E45-B71ABCCA8C68} = {81CE8DAF-EBB2-4761-8E45-B71ABCCA8C68}
+		{DA956FD3-E142-46F2-9DD5-C78BEBB56B7A} = {DA956FD3-E142-46F2-9DD5-C78BEBB56B7A}
+		{DA956FD3-E143-46F2-9FE5-C77BEBC56B1A} = {DA956FD3-E143-46F2-9FE5-C77BEBC56B1A}
+	EndProjectSection
+EndProject
 Global
 	GlobalSection(SolutionConfigurationPlatforms) = preSolution
 		Debug|Win32 = Debug|Win32
@@ -206,6 +227,30 @@ Global
 		{43A06713-A52D-4008-AD7E-A69DF3FCFFA8}.Release|Win32.Build.0 = Release|Win32
 		{43A06713-A52D-4008-AD7E-A69DF3FCFFA8}.Release|x64.ActiveCfg = Release|x64
 		{43A06713-A52D-4008-AD7E-A69DF3FCFFA8}.Release|x64.Build.0 = Release|x64
+		{55812185-D13C-4022-9C81-32E0F4A08336}.Debug|Win32.ActiveCfg = Debug|Win32
+		{55812185-D13C-4022-9C81-32E0F4A08336}.Debug|Win32.Build.0 = Debug|Win32
+		{55812185-D13C-4022-9C81-32E0F4A08336}.Debug|x64.ActiveCfg = Debug|x64
+		{55812185-D13C-4022-9C81-32E0F4A08336}.Debug|x64.Build.0 = Debug|x64
+		{55812185-D13C-4022-9C81-32E0F4A08336}.Release|Win32.ActiveCfg = Release|Win32
+		{55812185-D13C-4022-9C81-32E0F4A08336}.Release|Win32.Build.0 = Release|Win32
+		{55812185-D13C-4022-9C81-32E0F4A08336}.Release|x64.ActiveCfg = Release|x64
+		{55812185-D13C-4022-9C81-32E0F4A08336}.Release|x64.Build.0 = Release|x64
+		{55812185-D13C-4022-9C81-32E0F4A08996}.Debug|Win32.ActiveCfg = Debug|Win32
+		{55812185-D13C-4022-9C81-32E0F4A08996}.Debug|Win32.Build.0 = Debug|Win32
+		{55812185-D13C-4022-9C81-32E0F4A08996}.Debug|x64.ActiveCfg = Debug|x64
+		{55812185-D13C-4022-9C81-32E0F4A08996}.Debug|x64.Build.0 = Debug|x64
+		{55812185-D13C-4022-9C81-32E0F4A08996}.Release|Win32.ActiveCfg = Release|Win32
+		{55812185-D13C-4022-9C81-32E0F4A08996}.Release|Win32.Build.0 = Release|Win32
+		{55812185-D13C-4022-9C81-32E0F4A08996}.Release|x64.ActiveCfg = Release|x64
+		{55812185-D13C-4022-9C81-32E0F4A08996}.Release|x64.Build.0 = Release|x64
+		{55812185-D13C-4022-9C81-32E0F4A08BCC}.Debug|Win32.ActiveCfg = Debug|Win32
+		{55812185-D13C-4022-9C81-32E0F4A08BCC}.Debug|Win32.Build.0 = Debug|Win32
+		{55812185-D13C-4022-9C81-32E0F4A08BCC}.Debug|x64.ActiveCfg = Debug|x64
+		{55812185-D13C-4022-9C81-32E0F4A08BCC}.Debug|x64.Build.0 = Debug|x64
+		{55812185-D13C-4022-9C81-32E0F4A08BCC}.Release|Win32.ActiveCfg = Release|Win32
+		{55812185-D13C-4022-9C81-32E0F4A08BCC}.Release|Win32.Build.0 = Release|Win32
+		{55812185-D13C-4022-9C81-32E0F4A08BCC}.Release|x64.ActiveCfg = Release|x64
+		{55812185-D13C-4022-9C81-32E0F4A08BCC}.Release|x64.Build.0 = Release|x64
 	EndGlobalSection
 	GlobalSection(SolutionProperties) = preSolution
 		HideSolutionNode = FALSE
diff --git a/VisualC/tests/testgesture/testgesture_VS2010.vcxproj b/VisualC/tests/testgesture/testgesture_VS2010.vcxproj
index 4dc2be9ef..63adbf085 100644
--- a/VisualC/tests/testgesture/testgesture_VS2010.vcxproj
+++ b/VisualC/tests/testgesture/testgesture_VS2010.vcxproj
@@ -1,134 +1,227 @@
-
-
-  
-    
-      Debug
-      Win32
-    
-    
-      Release
-      Win32
-    
-  
-  
-    testgesture
-    {C4E04D18-EF76-4B42-B4C2-16A1BACDC0A3}
-    testgesture
-  
-  
-  
-    Application
-    false
-  
-  
-    Application
-    false
-  
-  
-  
-  
-  
-    
-    
-  
-  
-    
-    
-  
-  
-  
-    <_ProjectFileVersion>10.0.30319.1
-    .\Debug\
-    .\Debug\
-    true
-    .\Release\
-    .\Release\
-    false
-  
-  
-    
-      _DEBUG;%(PreprocessorDefinitions)
-      true
-      true
-      Win32
-      .\Debug/testgesture.tlb
-    
-    
-      Disabled
-      ..\..\..\include;%(AdditionalIncludeDirectories)
-      WIN32;_DEBUG;_WINDOWS;%(PreprocessorDefinitions)
-      MultiThreadedDLL
-      
-      
-      .\Debug/testgesture.pch
-      .\Debug/
-      .\Debug/
-      .\Debug/
-      Level3
-      true
-      EditAndContinue
-      Default
-    
-    
-      _DEBUG;%(PreprocessorDefinitions)
-      0x0409
-    
-    
-      /MACHINE:I386 %(AdditionalOptions)
-      .\Debug/testgesture.exe
-      true
-      true
-      .\Debug/testgesture.pdb
-      Windows
-    
-  
-  
-    
-      NDEBUG;%(PreprocessorDefinitions)
-      true
-      true
-      Win32
-      .\Release/testgesture.tlb
-    
-    
-      OnlyExplicitInline
-      ..\..\..\include;%(AdditionalIncludeDirectories)
-      WIN32;NDEBUG;_WINDOWS;%(PreprocessorDefinitions)
-      true
-      MultiThreadedDLL
-      true
-      
-      
-      .\Release/testgesture.pch
-      .\Release/
-      .\Release/
-      .\Release/
-      Level3
-      true
-      Default
-    
-    
-      NDEBUG;%(PreprocessorDefinitions)
-      0x0409
-    
-    
-      /MACHINE:I386 %(AdditionalOptions)
-      .\Release/testgesture.exe
-      true
-      .\Release/testgesture.pdb
-      Windows
-    
-  
-  
-    
-    
-  
-  
-    
-      .\Debug/testgesture.pch
-    
-  
-  
-  
-  
-
+
+
+  
+    
+      Debug
+      Win32
+    
+    
+      Debug
+      x64
+    
+    
+      Release
+      Win32
+    
+    
+      Release
+      x64
+    
+  
+  
+    testgesture
+    testgesture
+    {55812185-D13C-4022-9C81-32E0F4A08996}
+  
+  
+  
+    Application
+    false
+  
+  
+    Application
+    false
+    MultiByte
+  
+  
+    Application
+    false
+  
+  
+    Application
+    false
+  
+  
+  
+  
+  
+    
+    
+  
+  
+    
+    
+  
+  
+    
+    
+  
+  
+    
+    
+  
+  
+  
+    <_ProjectFileVersion>10.0.30319.1
+    $(Platform)\$(Configuration)\
+    $(Platform)\$(Configuration)\
+    $(Platform)\$(Configuration)\
+    $(Platform)\$(Configuration)\
+    false
+    false
+    $(Platform)\$(Configuration)\
+    $(Platform)\$(Configuration)\
+    $(Platform)\$(Configuration)\
+    $(Platform)\$(Configuration)\
+    true
+    true
+  
+  
+    
+      NDEBUG;%(PreprocessorDefinitions)
+      true
+      true
+      Win32
+    
+    
+      OnlyExplicitInline
+      ..\..\..\include;%(AdditionalIncludeDirectories)
+      WIN32;NDEBUG;_WINDOWS;%(PreprocessorDefinitions)
+      true
+      MultiThreadedDLL
+      true
+      
+      
+      Level3
+      true
+      Default
+    
+    
+      NDEBUG;%(PreprocessorDefinitions)
+      0x0409
+    
+    
+      true
+      Windows
+    
+    
+      copy "$(SolutionDir)\SDL\$(Platform)\$(Configuration)\SDL2.dll" "$(TargetDir)\SDL2.dll"
+    
+    
+      Copy SDL
+    
+  
+  
+    
+      NDEBUG;%(PreprocessorDefinitions)
+      true
+      true
+    
+    
+      OnlyExplicitInline
+      ..\..\..\include;%(AdditionalIncludeDirectories)
+      WIN32;NDEBUG;_WINDOWS;%(PreprocessorDefinitions)
+      true
+      MultiThreadedDLL
+      true
+      
+      
+      Level3
+      true
+      Default
+    
+    
+      NDEBUG;%(PreprocessorDefinitions)
+      0x0409
+    
+    
+      true
+      Windows
+    
+    
+      copy "$(SolutionDir)\SDL\$(Platform)\$(Configuration)\SDL2.dll" "$(TargetDir)\SDL2.dll"
+    
+    
+      Copy SDL
+    
+  
+  
+    
+      _DEBUG;%(PreprocessorDefinitions)
+      true
+      true
+      Win32
+    
+    
+      Disabled
+      ..\..\..\include;%(AdditionalIncludeDirectories)
+      WIN32;_DEBUG;_WINDOWS;%(PreprocessorDefinitions)
+      MultiThreadedDebugDLL
+      
+      
+      Level3
+      true
+      EditAndContinue
+      Default
+    
+    
+      _DEBUG;%(PreprocessorDefinitions)
+      0x0409
+    
+    
+      true
+      true
+      Windows
+    
+    
+      copy "$(SolutionDir)\SDL\$(Platform)\$(Configuration)\SDL2.dll" "$(TargetDir)\SDL2.dll"
+    
+    
+      Copy SDL
+    
+  
+  
+    
+      _DEBUG;%(PreprocessorDefinitions)
+      true
+      true
+    
+    
+      Disabled
+      ..\..\..\include;%(AdditionalIncludeDirectories)
+      WIN32;_DEBUG;_WINDOWS;%(PreprocessorDefinitions)
+      MultiThreadedDebugDLL
+      
+      
+      Level3
+      true
+      ProgramDatabase
+      Default
+    
+    
+      _DEBUG;%(PreprocessorDefinitions)
+      0x0409
+    
+    
+      true
+      true
+      Windows
+    
+    
+      copy "$(SolutionDir)\SDL\$(Platform)\$(Configuration)\SDL2.dll" "$(TargetDir)\SDL2.dll"
+    
+    
+      Copy SDL
+    
+  
+  
+    
+    
+  
+  
+    
+  
+  
+  
+  
+
\ No newline at end of file
diff --git a/VisualC/tests/testgesture/testgesture_VS2012.vcxproj b/VisualC/tests/testgesture/testgesture_VS2012.vcxproj
new file mode 100644
index 000000000..ef7182011
--- /dev/null
+++ b/VisualC/tests/testgesture/testgesture_VS2012.vcxproj
@@ -0,0 +1,231 @@
+
+
+  
+    
+      Debug
+      Win32
+    
+    
+      Debug
+      x64
+    
+    
+      Release
+      Win32
+    
+    
+      Release
+      x64
+    
+  
+  
+    testgesture
+    testgesture
+    {55812185-D13C-4022-9C81-32E0F4A08996}
+  
+  
+  
+    Application
+    false
+    v110
+  
+  
+    Application
+    false
+    MultiByte
+    v110
+  
+  
+    Application
+    false
+    v110
+  
+  
+    Application
+    false
+    v110
+  
+  
+  
+  
+  
+    
+    
+  
+  
+    
+    
+  
+  
+    
+    
+  
+  
+    
+    
+  
+  
+  
+    <_ProjectFileVersion>10.0.30319.1
+    $(Platform)\$(Configuration)\
+    $(Platform)\$(Configuration)\
+    $(Platform)\$(Configuration)\
+    $(Platform)\$(Configuration)\
+    false
+    false
+    $(Platform)\$(Configuration)\
+    $(Platform)\$(Configuration)\
+    $(Platform)\$(Configuration)\
+    $(Platform)\$(Configuration)\
+    true
+    true
+  
+  
+    
+      NDEBUG;%(PreprocessorDefinitions)
+      true
+      true
+      Win32
+    
+    
+      OnlyExplicitInline
+      ..\..\..\include;%(AdditionalIncludeDirectories)
+      WIN32;NDEBUG;_WINDOWS;%(PreprocessorDefinitions)
+      true
+      MultiThreadedDLL
+      true
+      
+      
+      Level3
+      true
+      Default
+    
+    
+      NDEBUG;%(PreprocessorDefinitions)
+      0x0409
+    
+    
+      true
+      Windows
+    
+    
+      copy "$(SolutionDir)\SDL\$(Platform)\$(Configuration)\SDL2.dll" "$(TargetDir)\SDL2.dll"
+    
+    
+      Copy SDL
+    
+  
+  
+    
+      NDEBUG;%(PreprocessorDefinitions)
+      true
+      true
+    
+    
+      OnlyExplicitInline
+      ..\..\..\include;%(AdditionalIncludeDirectories)
+      WIN32;NDEBUG;_WINDOWS;%(PreprocessorDefinitions)
+      true
+      MultiThreadedDLL
+      true
+      
+      
+      Level3
+      true
+      Default
+    
+    
+      NDEBUG;%(PreprocessorDefinitions)
+      0x0409
+    
+    
+      true
+      Windows
+    
+    
+      copy "$(SolutionDir)\SDL\$(Platform)\$(Configuration)\SDL2.dll" "$(TargetDir)\SDL2.dll"
+    
+    
+      Copy SDL
+    
+  
+  
+    
+      _DEBUG;%(PreprocessorDefinitions)
+      true
+      true
+      Win32
+    
+    
+      Disabled
+      ..\..\..\include;%(AdditionalIncludeDirectories)
+      WIN32;_DEBUG;_WINDOWS;%(PreprocessorDefinitions)
+      MultiThreadedDebugDLL
+      
+      
+      Level3
+      true
+      EditAndContinue
+      Default
+    
+    
+      _DEBUG;%(PreprocessorDefinitions)
+      0x0409
+    
+    
+      true
+      true
+      Windows
+    
+    
+      copy "$(SolutionDir)\SDL\$(Platform)\$(Configuration)\SDL2.dll" "$(TargetDir)\SDL2.dll"
+    
+    
+      Copy SDL
+    
+  
+  
+    
+      _DEBUG;%(PreprocessorDefinitions)
+      true
+      true
+    
+    
+      Disabled
+      ..\..\..\include;%(AdditionalIncludeDirectories)
+      WIN32;_DEBUG;_WINDOWS;%(PreprocessorDefinitions)
+      MultiThreadedDebugDLL
+      
+      
+      Level3
+      true
+      ProgramDatabase
+      Default
+    
+    
+      _DEBUG;%(PreprocessorDefinitions)
+      0x0409
+    
+    
+      true
+      true
+      Windows
+    
+    
+      copy "$(SolutionDir)\SDL\$(Platform)\$(Configuration)\SDL2.dll" "$(TargetDir)\SDL2.dll"
+    
+    
+      Copy SDL
+    
+  
+  
+    
+    
+  
+  
+    
+  
+  
+  
+  
+
\ No newline at end of file
diff --git a/VisualC/tests/testjoystick/testjoystick_VS2010.vcxproj b/VisualC/tests/testjoystick/testjoystick_VS2010.vcxproj
index 56cff76c1..41c98e425 100644
--- a/VisualC/tests/testjoystick/testjoystick_VS2010.vcxproj
+++ b/VisualC/tests/testjoystick/testjoystick_VS2010.vcxproj
@@ -1,227 +1,227 @@
-
-
-  
-    
-      Debug
-      Win32
-    
-    
-      Debug
-      x64
-    
-    
-      Release
-      Win32
-    
-    
-      Release
-      x64
-    
-  
-  
-    testjoystick
-    testjoystick
-    {55812185-D13C-4022-9C81-32E0F4A08304}
-  
-  
-  
-    Application
-    false
-  
-  
-    Application
-    false
-    MultiByte
-  
-  
-    Application
-    false
-  
-  
-    Application
-    false
-  
-  
-  
-  
-  
-    
-    
-  
-  
-    
-    
-  
-  
-    
-    
-  
-  
-    
-    
-  
-  
-  
-    <_ProjectFileVersion>10.0.30319.1
-    $(Platform)\$(Configuration)\
-    $(Platform)\$(Configuration)\
-    $(Platform)\$(Configuration)\
-    $(Platform)\$(Configuration)\
-    false
-    false
-    $(Platform)\$(Configuration)\
-    $(Platform)\$(Configuration)\
-    $(Platform)\$(Configuration)\
-    $(Platform)\$(Configuration)\
-    true
-    true
-  
-  
-    
-      NDEBUG;%(PreprocessorDefinitions)
-      true
-      true
-      Win32
-    
-    
-      OnlyExplicitInline
-      ..\..\..\include;%(AdditionalIncludeDirectories)
-      WIN32;NDEBUG;_WINDOWS;%(PreprocessorDefinitions)
-      true
-      MultiThreadedDLL
-      true
-      
-      
-      Level3
-      true
-      Default
-    
-    
-      NDEBUG;%(PreprocessorDefinitions)
-      0x0409
-    
-    
-      true
-      Windows
-    
-    
-      copy "$(SolutionDir)\SDL\$(Platform)\$(Configuration)\SDL2.dll" "$(TargetDir)\SDL2.dll"
-    
-    
-      Copy SDL
-    
-  
-  
-    
-      NDEBUG;%(PreprocessorDefinitions)
-      true
-      true
-    
-    
-      OnlyExplicitInline
-      ..\..\..\include;%(AdditionalIncludeDirectories)
-      WIN32;NDEBUG;_WINDOWS;%(PreprocessorDefinitions)
-      true
-      MultiThreadedDLL
-      true
-      
-      
-      Level3
-      true
-      Default
-    
-    
-      NDEBUG;%(PreprocessorDefinitions)
-      0x0409
-    
-    
-      true
-      Windows
-    
-    
-      copy "$(SolutionDir)\SDL\$(Platform)\$(Configuration)\SDL2.dll" "$(TargetDir)\SDL2.dll"
-    
-    
-      Copy SDL
-    
-  
-  
-    
-      _DEBUG;%(PreprocessorDefinitions)
-      true
-      true
-      Win32
-    
-    
-      Disabled
-      ..\..\..\include;%(AdditionalIncludeDirectories)
-      WIN32;_DEBUG;_WINDOWS;%(PreprocessorDefinitions)
-      MultiThreadedDebugDLL
-      
-      
-      Level3
-      true
-      EditAndContinue
-      Default
-    
-    
-      _DEBUG;%(PreprocessorDefinitions)
-      0x0409
-    
-    
-      true
-      true
-      Windows
-    
-    
-      copy "$(SolutionDir)\SDL\$(Platform)\$(Configuration)\SDL2.dll" "$(TargetDir)\SDL2.dll"
-    
-    
-      Copy SDL
-    
-  
-  
-    
-      _DEBUG;%(PreprocessorDefinitions)
-      true
-      true
-    
-    
-      Disabled
-      ..\..\..\include;%(AdditionalIncludeDirectories)
-      WIN32;_DEBUG;_WINDOWS;%(PreprocessorDefinitions)
-      MultiThreadedDebugDLL
-      
-      
-      Level3
-      true
-      ProgramDatabase
-      Default
-    
-    
-      _DEBUG;%(PreprocessorDefinitions)
-      0x0409
-    
-    
-      true
-      true
-      Windows
-    
-    
-      copy "$(SolutionDir)\SDL\$(Platform)\$(Configuration)\SDL2.dll" "$(TargetDir)\SDL2.dll"
-    
-    
-      Copy SDL
-    
-  
-  
-    
-    
-  
-  
-    
-  
-  
-  
-  
-
+
+
+  
+    
+      Debug
+      Win32
+    
+    
+      Debug
+      x64
+    
+    
+      Release
+      Win32
+    
+    
+      Release
+      x64
+    
+  
+  
+    testjoystick
+    testjoystick
+    {55812185-D13C-4022-9C81-32E0F4A08BCC}
+  
+  
+  
+    Application
+    false
+  
+  
+    Application
+    false
+    MultiByte
+  
+  
+    Application
+    false
+  
+  
+    Application
+    false
+  
+  
+  
+  
+  
+    
+    
+  
+  
+    
+    
+  
+  
+    
+    
+  
+  
+    
+    
+  
+  
+  
+    <_ProjectFileVersion>10.0.30319.1
+    $(Platform)\$(Configuration)\
+    $(Platform)\$(Configuration)\
+    $(Platform)\$(Configuration)\
+    $(Platform)\$(Configuration)\
+    false
+    false
+    $(Platform)\$(Configuration)\
+    $(Platform)\$(Configuration)\
+    $(Platform)\$(Configuration)\
+    $(Platform)\$(Configuration)\
+    true
+    true
+  
+  
+    
+      NDEBUG;%(PreprocessorDefinitions)
+      true
+      true
+      Win32
+    
+    
+      OnlyExplicitInline
+      ..\..\..\include;%(AdditionalIncludeDirectories)
+      WIN32;NDEBUG;_WINDOWS;%(PreprocessorDefinitions)
+      true
+      MultiThreadedDLL
+      true
+      
+      
+      Level3
+      true
+      Default
+    
+    
+      NDEBUG;%(PreprocessorDefinitions)
+      0x0409
+    
+    
+      true
+      Windows
+    
+    
+      copy "$(SolutionDir)\SDL\$(Platform)\$(Configuration)\SDL2.dll" "$(TargetDir)\SDL2.dll"
+    
+    
+      Copy SDL
+    
+  
+  
+    
+      NDEBUG;%(PreprocessorDefinitions)
+      true
+      true
+    
+    
+      OnlyExplicitInline
+      ..\..\..\include;%(AdditionalIncludeDirectories)
+      WIN32;NDEBUG;_WINDOWS;%(PreprocessorDefinitions)
+      true
+      MultiThreadedDLL
+      true
+      
+      
+      Level3
+      true
+      Default
+    
+    
+      NDEBUG;%(PreprocessorDefinitions)
+      0x0409
+    
+    
+      true
+      Windows
+    
+    
+      copy "$(SolutionDir)\SDL\$(Platform)\$(Configuration)\SDL2.dll" "$(TargetDir)\SDL2.dll"
+    
+    
+      Copy SDL
+    
+  
+  
+    
+      _DEBUG;%(PreprocessorDefinitions)
+      true
+      true
+      Win32
+    
+    
+      Disabled
+      ..\..\..\include;%(AdditionalIncludeDirectories)
+      WIN32;_DEBUG;_WINDOWS;%(PreprocessorDefinitions)
+      MultiThreadedDebugDLL
+      
+      
+      Level3
+      true
+      EditAndContinue
+      Default
+    
+    
+      _DEBUG;%(PreprocessorDefinitions)
+      0x0409
+    
+    
+      true
+      true
+      Windows
+    
+    
+      copy "$(SolutionDir)\SDL\$(Platform)\$(Configuration)\SDL2.dll" "$(TargetDir)\SDL2.dll"
+    
+    
+      Copy SDL
+    
+  
+  
+    
+      _DEBUG;%(PreprocessorDefinitions)
+      true
+      true
+    
+    
+      Disabled
+      ..\..\..\include;%(AdditionalIncludeDirectories)
+      WIN32;_DEBUG;_WINDOWS;%(PreprocessorDefinitions)
+      MultiThreadedDebugDLL
+      
+      
+      Level3
+      true
+      ProgramDatabase
+      Default
+    
+    
+      _DEBUG;%(PreprocessorDefinitions)
+      0x0409
+    
+    
+      true
+      true
+      Windows
+    
+    
+      copy "$(SolutionDir)\SDL\$(Platform)\$(Configuration)\SDL2.dll" "$(TargetDir)\SDL2.dll"
+    
+    
+      Copy SDL
+    
+  
+  
+    
+    
+  
+  
+    
+  
+  
+  
+  
+
\ No newline at end of file
diff --git a/VisualC/tests/testjoystick/testjoystick_VS2012.vcxproj b/VisualC/tests/testjoystick/testjoystick_VS2012.vcxproj
new file mode 100644
index 000000000..9730432dd
--- /dev/null
+++ b/VisualC/tests/testjoystick/testjoystick_VS2012.vcxproj
@@ -0,0 +1,231 @@
+
+
+  
+    
+      Debug
+      Win32
+    
+    
+      Debug
+      x64
+    
+    
+      Release
+      Win32
+    
+    
+      Release
+      x64
+    
+  
+  
+    testjoystick
+    testjoystick
+    {55812185-D13C-4022-9C81-32E0F4A08BCC}
+  
+  
+  
+    Application
+    false
+    v110
+  
+  
+    Application
+    false
+    MultiByte
+    v110
+  
+  
+    Application
+    false
+    v110
+  
+  
+    Application
+    false
+    v110
+  
+  
+  
+  
+  
+    
+    
+  
+  
+    
+    
+  
+  
+    
+    
+  
+  
+    
+    
+  
+  
+  
+    <_ProjectFileVersion>10.0.30319.1
+    $(Platform)\$(Configuration)\
+    $(Platform)\$(Configuration)\
+    $(Platform)\$(Configuration)\
+    $(Platform)\$(Configuration)\
+    false
+    false
+    $(Platform)\$(Configuration)\
+    $(Platform)\$(Configuration)\
+    $(Platform)\$(Configuration)\
+    $(Platform)\$(Configuration)\
+    true
+    true
+  
+  
+    
+      NDEBUG;%(PreprocessorDefinitions)
+      true
+      true
+      Win32
+    
+    
+      OnlyExplicitInline
+      ..\..\..\include;%(AdditionalIncludeDirectories)
+      WIN32;NDEBUG;_WINDOWS;%(PreprocessorDefinitions)
+      true
+      MultiThreadedDLL
+      true
+      
+      
+      Level3
+      true
+      Default
+    
+    
+      NDEBUG;%(PreprocessorDefinitions)
+      0x0409
+    
+    
+      true
+      Windows
+    
+    
+      copy "$(SolutionDir)\SDL\$(Platform)\$(Configuration)\SDL2.dll" "$(TargetDir)\SDL2.dll"
+    
+    
+      Copy SDL
+    
+  
+  
+    
+      NDEBUG;%(PreprocessorDefinitions)
+      true
+      true
+    
+    
+      OnlyExplicitInline
+      ..\..\..\include;%(AdditionalIncludeDirectories)
+      WIN32;NDEBUG;_WINDOWS;%(PreprocessorDefinitions)
+      true
+      MultiThreadedDLL
+      true
+      
+      
+      Level3
+      true
+      Default
+    
+    
+      NDEBUG;%(PreprocessorDefinitions)
+      0x0409
+    
+    
+      true
+      Windows
+    
+    
+      copy "$(SolutionDir)\SDL\$(Platform)\$(Configuration)\SDL2.dll" "$(TargetDir)\SDL2.dll"
+    
+    
+      Copy SDL
+    
+  
+  
+    
+      _DEBUG;%(PreprocessorDefinitions)
+      true
+      true
+      Win32
+    
+    
+      Disabled
+      ..\..\..\include;%(AdditionalIncludeDirectories)
+      WIN32;_DEBUG;_WINDOWS;%(PreprocessorDefinitions)
+      MultiThreadedDebugDLL
+      
+      
+      Level3
+      true
+      EditAndContinue
+      Default
+    
+    
+      _DEBUG;%(PreprocessorDefinitions)
+      0x0409
+    
+    
+      true
+      true
+      Windows
+    
+    
+      copy "$(SolutionDir)\SDL\$(Platform)\$(Configuration)\SDL2.dll" "$(TargetDir)\SDL2.dll"
+    
+    
+      Copy SDL
+    
+  
+  
+    
+      _DEBUG;%(PreprocessorDefinitions)
+      true
+      true
+    
+    
+      Disabled
+      ..\..\..\include;%(AdditionalIncludeDirectories)
+      WIN32;_DEBUG;_WINDOWS;%(PreprocessorDefinitions)
+      MultiThreadedDebugDLL
+      
+      
+      Level3
+      true
+      ProgramDatabase
+      Default
+    
+    
+      _DEBUG;%(PreprocessorDefinitions)
+      0x0409
+    
+    
+      true
+      true
+      Windows
+    
+    
+      copy "$(SolutionDir)\SDL\$(Platform)\$(Configuration)\SDL2.dll" "$(TargetDir)\SDL2.dll"
+    
+    
+      Copy SDL
+    
+  
+  
+    
+    
+  
+  
+    
+  
+  
+  
+  
+
\ No newline at end of file
diff --git a/VisualC/tests/testoverlay2/testoverlay2_VS2010.vcxproj b/VisualC/tests/testoverlay2/testoverlay2_VS2010.vcxproj
index 812c4ecc9..201e32570 100644
--- a/VisualC/tests/testoverlay2/testoverlay2_VS2010.vcxproj
+++ b/VisualC/tests/testoverlay2/testoverlay2_VS2010.vcxproj
@@ -21,7 +21,7 @@
   
     testoverlay2
     testoverlay2
-    {B51E0D74-F0A2-45A2-BD2A-8B7D95B8204A}
+    {55812185-D13C-4022-9C81-32E0F4A08AAD}
   
   
   
@@ -105,11 +105,11 @@
       Windows
     
     
-      copy "$(SolutionDir)\SDL\$(Platform)\$(Configuration)\SDL2.dll" "$(TargetDir)\SDL2.dll"
+      copy "$(SolutionDir)\SDL\$(Platform)\$(Configuration)\SDL2.dll" "$(TargetDir)\SDL2.dll"
 copy "$(SolutionDir)\..\test\moose.dat" "$(TargetDir)\moose.dat"
     
     
-      Copy SDL and data files
+      Copy SDL
     
   
   
@@ -140,11 +140,11 @@ copy "$(SolutionDir)\..\test\moose.dat" "$(TargetDir)\moose.dat"
       Windows
     
     
-      copy "$(SolutionDir)\SDL\$(Platform)\$(Configuration)\SDL2.dll" "$(TargetDir)\SDL2.dll"
+      copy "$(SolutionDir)\SDL\$(Platform)\$(Configuration)\SDL2.dll" "$(TargetDir)\SDL2.dll"
 copy "$(SolutionDir)\..\test\moose.dat" "$(TargetDir)\moose.dat"
     
     
-      Copy SDL and data files
+      Copy SDL
     
   
   
@@ -176,11 +176,11 @@ copy "$(SolutionDir)\..\test\moose.dat" "$(TargetDir)\moose.dat"
       Windows
     
     
-      copy "$(SolutionDir)\SDL\$(Platform)\$(Configuration)\SDL2.dll" "$(TargetDir)\SDL2.dll"
+      copy "$(SolutionDir)\SDL\$(Platform)\$(Configuration)\SDL2.dll" "$(TargetDir)\SDL2.dll"
 copy "$(SolutionDir)\..\test\moose.dat" "$(TargetDir)\moose.dat"
     
     
-      Copy SDL and data files
+      Copy SDL
     
   
   
@@ -211,17 +211,16 @@ copy "$(SolutionDir)\..\test\moose.dat" "$(TargetDir)\moose.dat"
       Windows
     
     
-      
-        copy "$(SolutionDir)\SDL\$(Platform)\$(Configuration)\SDL2.dll" "$(TargetDir)\SDL2.dll"
-        copy "$(SolutionDir)\..\test\moose.dat" "$(TargetDir)\moose.dat"
+      copy "$(SolutionDir)\SDL\$(Platform)\$(Configuration)\SDL2.dll" "$(TargetDir)\SDL2.dll"
+copy "$(SolutionDir)\..\test\moose.dat" "$(TargetDir)\moose.dat"
     
     
-      Copy SDL and data files
+      Copy SDL
     
   
   
-    
-    
+    
+    
   
   
     
@@ -229,4 +228,4 @@ copy "$(SolutionDir)\..\test\moose.dat" "$(TargetDir)\moose.dat"
   
   
   
-
+
\ No newline at end of file
diff --git a/VisualC/tests/testoverlay2/testoverlay2_VS2012.vcxproj b/VisualC/tests/testoverlay2/testoverlay2_VS2012.vcxproj
new file mode 100644
index 000000000..d51d495e9
--- /dev/null
+++ b/VisualC/tests/testoverlay2/testoverlay2_VS2012.vcxproj
@@ -0,0 +1,235 @@
+
+
+  
+    
+      Debug
+      Win32
+    
+    
+      Debug
+      x64
+    
+    
+      Release
+      Win32
+    
+    
+      Release
+      x64
+    
+  
+  
+    testoverlay2
+    testoverlay2
+    {55812185-D13C-4022-9C81-32E0F4A08AAD}
+  
+  
+  
+    Application
+    false
+    v110
+  
+  
+    Application
+    false
+    MultiByte
+    v110
+  
+  
+    Application
+    false
+    v110
+  
+  
+    Application
+    false
+    v110
+  
+  
+  
+  
+  
+    
+    
+  
+  
+    
+    
+  
+  
+    
+    
+  
+  
+    
+    
+  
+  
+  
+    <_ProjectFileVersion>10.0.30319.1
+    $(Platform)\$(Configuration)\
+    $(Platform)\$(Configuration)\
+    $(Platform)\$(Configuration)\
+    $(Platform)\$(Configuration)\
+    false
+    false
+    $(Platform)\$(Configuration)\
+    $(Platform)\$(Configuration)\
+    $(Platform)\$(Configuration)\
+    $(Platform)\$(Configuration)\
+    true
+    true
+  
+  
+    
+      NDEBUG;%(PreprocessorDefinitions)
+      true
+      true
+      Win32
+    
+    
+      OnlyExplicitInline
+      ..\..\..\include;%(AdditionalIncludeDirectories)
+      WIN32;NDEBUG;_WINDOWS;%(PreprocessorDefinitions)
+      true
+      MultiThreadedDLL
+      true
+      
+      
+      Level3
+      true
+      Default
+    
+    
+      NDEBUG;%(PreprocessorDefinitions)
+      0x0409
+    
+    
+      true
+      Windows
+    
+    
+      copy "$(SolutionDir)\SDL\$(Platform)\$(Configuration)\SDL2.dll" "$(TargetDir)\SDL2.dll"
+copy "$(SolutionDir)\..\test\moose.dat" "$(TargetDir)\moose.dat"
+    
+    
+      Copy SDL
+    
+  
+  
+    
+      NDEBUG;%(PreprocessorDefinitions)
+      true
+      true
+    
+    
+      OnlyExplicitInline
+      ..\..\..\include;%(AdditionalIncludeDirectories)
+      WIN32;NDEBUG;_WINDOWS;%(PreprocessorDefinitions)
+      true
+      MultiThreadedDLL
+      true
+      
+      
+      Level3
+      true
+      Default
+    
+    
+      NDEBUG;%(PreprocessorDefinitions)
+      0x0409
+    
+    
+      true
+      Windows
+    
+    
+      copy "$(SolutionDir)\SDL\$(Platform)\$(Configuration)\SDL2.dll" "$(TargetDir)\SDL2.dll"
+copy "$(SolutionDir)\..\test\moose.dat" "$(TargetDir)\moose.dat"
+    
+    
+      Copy SDL
+    
+  
+  
+    
+      _DEBUG;%(PreprocessorDefinitions)
+      true
+      true
+      Win32
+    
+    
+      Disabled
+      ..\..\..\include;%(AdditionalIncludeDirectories)
+      WIN32;_DEBUG;_WINDOWS;%(PreprocessorDefinitions)
+      MultiThreadedDebugDLL
+      
+      
+      Level3
+      true
+      EditAndContinue
+      Default
+    
+    
+      _DEBUG;%(PreprocessorDefinitions)
+      0x0409
+    
+    
+      true
+      true
+      Windows
+    
+    
+      copy "$(SolutionDir)\SDL\$(Platform)\$(Configuration)\SDL2.dll" "$(TargetDir)\SDL2.dll"
+copy "$(SolutionDir)\..\test\moose.dat" "$(TargetDir)\moose.dat"
+    
+    
+      Copy SDL
+    
+  
+  
+    
+      _DEBUG;%(PreprocessorDefinitions)
+      true
+      true
+    
+    
+      Disabled
+      ..\..\..\include;%(AdditionalIncludeDirectories)
+      WIN32;_DEBUG;_WINDOWS;%(PreprocessorDefinitions)
+      MultiThreadedDebugDLL
+      
+      
+      Level3
+      true
+      ProgramDatabase
+      Default
+    
+    
+      _DEBUG;%(PreprocessorDefinitions)
+      0x0409
+    
+    
+      true
+      true
+      Windows
+    
+    
+      copy "$(SolutionDir)\SDL\$(Platform)\$(Configuration)\SDL2.dll" "$(TargetDir)\SDL2.dll"
+copy "$(SolutionDir)\..\test\moose.dat" "$(TargetDir)\moose.dat"
+    
+    
+      Copy SDL
+    
+  
+  
+    
+    
+  
+  
+    
+  
+  
+  
+  
+
\ No newline at end of file

From e3b9fb7542700907e65d8fc770811e188a9df5b9 Mon Sep 17 00:00:00 2001
From: Philipp Wiesemann 
Date: Mon, 22 Jul 2013 22:54:00 +0200
Subject: [PATCH 411/542] Corrected internal documentation in source.

---
 src/joystick/SDL_joystick.c | 4 ++--
 1 file changed, 2 insertions(+), 2 deletions(-)

diff --git a/src/joystick/SDL_joystick.c b/src/joystick/SDL_joystick.c
index d2eeb6ab6..bb8652f4d 100644
--- a/src/joystick/SDL_joystick.c
+++ b/src/joystick/SDL_joystick.c
@@ -50,7 +50,7 @@ int
 SDL_JoystickInit(void)
 {
     int status;
-	
+
     /* See if we should allow joystick events while in the background */
     SDL_AddHintCallback(SDL_HINT_JOYSTICK_ALLOW_BACKGROUND_EVENTS,
                         SDL_JoystickAllowBackgroundEventsChanged, NULL);
@@ -353,7 +353,7 @@ SDL_JoystickGetButton(SDL_Joystick * joystick, int button)
 
 /*
  * Return if the joystick in question is currently attached to the system,
- *  \return 0 if not plugged in, 1 if still present.
+ *  \return SDL_FALSE if not plugged in, SDL_TRUE if still present.
  */
 SDL_bool
 SDL_JoystickGetAttached(SDL_Joystick * joystick)

From a99edf3519b0d0c321c970e69639434a1994cfde Mon Sep 17 00:00:00 2001
From: Eric Wing 
Date: Mon, 22 Jul 2013 02:51:45 -0700
Subject: [PATCH 412/542] Android: Removed all unnecessary dependencies on C++.

C++ is a bit of a minefield on Android. Much functionality still doesn't work, and Android can't decide on which C++ standard library to use, so it provides 3 different ones, all of which are incompatible with each other. (It looks like clang is coming too which will add a new compiler and a 4th standard library.)

As middleware, SDL might be distributed as a binary and intermixed with other projects already using C++. If C++ is intermixed in a bad way, bad things will happen. Removing dependencies on C++ will avoid this problem and downstream users won't have to worry/care.

--HG--
rename : src/core/android/SDL_android.cpp => src/core/android/SDL_android.c
rename : src/main/android/SDL_android_main.cpp => src/main/android/SDL_android_main.c
---
 Android.mk                                    |   2 +-
 README-android.txt                            |   4 +-
 android-project/jni/src/Android.mk            |   2 +-
 .../{SDL_android.cpp => SDL_android.c}        | 616 ++++++++++--------
 ...DL_android_main.cpp => SDL_android_main.c} |   4 +-
 5 files changed, 343 insertions(+), 285 deletions(-)
 rename src/core/android/{SDL_android.cpp => SDL_android.c} (59%)
 rename src/main/android/{SDL_android_main.cpp => SDL_android_main.c} (85%)

diff --git a/Android.mk b/Android.mk
index 8fb4cfc7d..3230f9fea 100755
--- a/Android.mk
+++ b/Android.mk
@@ -22,7 +22,7 @@ LOCAL_SRC_FILES := \
 	$(wildcard $(LOCAL_PATH)/src/audio/dummy/*.c) \
 	$(LOCAL_PATH)/src/atomic/SDL_atomic.c \
 	$(LOCAL_PATH)/src/atomic/SDL_spinlock.c.arm \
-	$(wildcard $(LOCAL_PATH)/src/core/android/*.cpp) \
+	$(wildcard $(LOCAL_PATH)/src/core/android/*.c) \
 	$(wildcard $(LOCAL_PATH)/src/cpuinfo/*.c) \
 	$(wildcard $(LOCAL_PATH)/src/events/*.c) \
 	$(wildcard $(LOCAL_PATH)/src/file/*.c) \
diff --git a/README-android.txt b/README-android.txt
index fa0f470b9..ecd31ae1b 100644
--- a/README-android.txt
+++ b/README-android.txt
@@ -28,10 +28,10 @@ android-project/src/org/libsdl/app/SDLActivity.java
 
 The Java code loads your game code, the SDL shared library, and
 dispatches to native functions implemented in the SDL library:
-src/SDL_android.cpp
+src/SDL_android.c
 
 Your project must include some glue code that starts your main() routine:
-src/main/android/SDL_android_main.cpp
+src/main/android/SDL_android_main.c
 
 
 ================================================================================
diff --git a/android-project/jni/src/Android.mk b/android-project/jni/src/Android.mk
index 948be96e5..70ca7dc35 100644
--- a/android-project/jni/src/Android.mk
+++ b/android-project/jni/src/Android.mk
@@ -9,7 +9,7 @@ SDL_PATH := ../SDL
 LOCAL_C_INCLUDES := $(LOCAL_PATH)/$(SDL_PATH)/include
 
 # Add your application source files here...
-LOCAL_SRC_FILES := $(SDL_PATH)/src/main/android/SDL_android_main.cpp \
+LOCAL_SRC_FILES := $(SDL_PATH)/src/main/android/SDL_android_main.c \
 	YourSourceHere.c
 
 LOCAL_SHARED_LIBRARIES := SDL2
diff --git a/src/core/android/SDL_android.cpp b/src/core/android/SDL_android.c
similarity index 59%
rename from src/core/android/SDL_android.cpp
rename to src/core/android/SDL_android.c
index 9023df51a..74a41607a 100644
--- a/src/core/android/SDL_android.cpp
+++ b/src/core/android/SDL_android.c
@@ -29,7 +29,6 @@
 #include "SDL_android.h"
 #include 
 
-extern "C" {
 #include "../../events/SDL_events_c.h"
 #include "../../video/android/SDL_androidkeyboard.h"
 #include "../../video/android/SDL_androidtouch.h"
@@ -52,13 +51,13 @@ extern "C" {
 extern void Android_RunAudioThread();
 
 static void Android_JNI_ThreadDestroyed(void*);
-} // C
 
 /*******************************************************************************
  This file links the Java side of Android with libsdl
 *******************************************************************************/
 #include 
 #include 
+#include 
 
 
 /*******************************************************************************
@@ -87,12 +86,12 @@ static bool bHasNewData;
 *******************************************************************************/
 
 // Library init
-extern "C" jint JNI_OnLoad(JavaVM* vm, void* reserved)
+jint JNI_OnLoad(JavaVM* vm, void* reserved)
 {
     JNIEnv *env;
     mJavaVM = vm;
     LOGI("JNI_OnLoad called");
-    if (mJavaVM->GetEnv((void**) &env, JNI_VERSION_1_4) != JNI_OK) {
+    if ((*mJavaVM)->GetEnv(mJavaVM, (void**) &env, JNI_VERSION_1_4) != JNI_OK) {
         LOGE("Failed to get the environment using GetEnv()");
         return -1;
     }
@@ -111,25 +110,25 @@ extern "C" jint JNI_OnLoad(JavaVM* vm, void* reserved)
 }
 
 // Called before SDL_main() to initialize JNI bindings
-extern "C" void SDL_Android_Init(JNIEnv* mEnv, jclass cls)
+void SDL_Android_Init(JNIEnv* mEnv, jclass cls)
 {
     __android_log_print(ANDROID_LOG_INFO, "SDL", "SDL_Android_Init()");
 
     Android_JNI_SetupThread();
 
-    mActivityClass = (jclass)mEnv->NewGlobalRef(cls);
+    mActivityClass = (jclass)((*mEnv)->NewGlobalRef(mEnv, cls));
 
-    midCreateGLContext = mEnv->GetStaticMethodID(mActivityClass,
+    midCreateGLContext = (*mEnv)->GetStaticMethodID(mEnv, mActivityClass,
                                 "createGLContext","(II[I)Z");
-    midFlipBuffers = mEnv->GetStaticMethodID(mActivityClass,
+    midFlipBuffers = (*mEnv)->GetStaticMethodID(mEnv, mActivityClass,
                                 "flipBuffers","()V");
-    midAudioInit = mEnv->GetStaticMethodID(mActivityClass,
+    midAudioInit = (*mEnv)->GetStaticMethodID(mEnv, mActivityClass,
                                 "audioInit", "(IZZI)V");
-    midAudioWriteShortBuffer = mEnv->GetStaticMethodID(mActivityClass,
+    midAudioWriteShortBuffer = (*mEnv)->GetStaticMethodID(mEnv, mActivityClass,
                                 "audioWriteShortBuffer", "([S)V");
-    midAudioWriteByteBuffer = mEnv->GetStaticMethodID(mActivityClass,
+    midAudioWriteByteBuffer = (*mEnv)->GetStaticMethodID(mEnv, mActivityClass,
                                 "audioWriteByteBuffer", "([B)V");
-    midAudioQuit = mEnv->GetStaticMethodID(mActivityClass,
+    midAudioQuit = (*mEnv)->GetStaticMethodID(mEnv, mActivityClass,
                                 "audioQuit", "()V");
 
     bHasNewData = false;
@@ -142,7 +141,7 @@ extern "C" void SDL_Android_Init(JNIEnv* mEnv, jclass cls)
 }
 
 // Resize
-extern "C" void Java_org_libsdl_app_SDLActivity_onNativeResize(
+void Java_org_libsdl_app_SDLActivity_onNativeResize(
                                     JNIEnv* env, jclass jcls,
                                     jint width, jint height, jint format)
 {
@@ -150,21 +149,21 @@ extern "C" void Java_org_libsdl_app_SDLActivity_onNativeResize(
 }
 
 // Keydown
-extern "C" void Java_org_libsdl_app_SDLActivity_onNativeKeyDown(
+void Java_org_libsdl_app_SDLActivity_onNativeKeyDown(
                                     JNIEnv* env, jclass jcls, jint keycode)
 {
     Android_OnKeyDown(keycode);
 }
 
 // Keyup
-extern "C" void Java_org_libsdl_app_SDLActivity_onNativeKeyUp(
+void Java_org_libsdl_app_SDLActivity_onNativeKeyUp(
                                     JNIEnv* env, jclass jcls, jint keycode)
 {
     Android_OnKeyUp(keycode);
 }
 
 // Touch
-extern "C" void Java_org_libsdl_app_SDLActivity_onNativeTouch(
+void Java_org_libsdl_app_SDLActivity_onNativeTouch(
                                     JNIEnv* env, jclass jcls,
                                     jint touch_device_id_in, jint pointer_finger_id_in,
                                     jint action, jfloat x, jfloat y, jfloat p)
@@ -173,7 +172,7 @@ extern "C" void Java_org_libsdl_app_SDLActivity_onNativeTouch(
 }
 
 // Accelerometer
-extern "C" void Java_org_libsdl_app_SDLActivity_onNativeAccel(
+void Java_org_libsdl_app_SDLActivity_onNativeAccel(
                                     JNIEnv* env, jclass jcls,
                                     jfloat x, jfloat y, jfloat z)
 {
@@ -184,14 +183,14 @@ extern "C" void Java_org_libsdl_app_SDLActivity_onNativeAccel(
 }
 
 // Low memory
-extern "C" void Java_org_libsdl_app_SDLActivity_nativeLowMemory(
+void Java_org_libsdl_app_SDLActivity_nativeLowMemory(
                                     JNIEnv* env, jclass cls)
 {
     SDL_SendAppEvent(SDL_APP_LOWMEMORY);
 }
 
 // Quit
-extern "C" void Java_org_libsdl_app_SDLActivity_nativeQuit(
+void Java_org_libsdl_app_SDLActivity_nativeQuit(
                                     JNIEnv* env, jclass cls)
 {
     // Inject a SDL_QUIT event
@@ -200,7 +199,7 @@ extern "C" void Java_org_libsdl_app_SDLActivity_nativeQuit(
 }
 
 // Pause
-extern "C" void Java_org_libsdl_app_SDLActivity_nativePause(
+void Java_org_libsdl_app_SDLActivity_nativePause(
                                     JNIEnv* env, jclass cls)
 {
     if (Android_Window) {
@@ -216,7 +215,7 @@ extern "C" void Java_org_libsdl_app_SDLActivity_nativePause(
 }
 
 // Resume
-extern "C" void Java_org_libsdl_app_SDLActivity_nativeResume(
+void Java_org_libsdl_app_SDLActivity_nativeResume(
                                     JNIEnv* env, jclass cls)
 {
     __android_log_print(ANDROID_LOG_VERBOSE, "SDL", "nativeResume()");
@@ -234,7 +233,7 @@ extern "C" void Java_org_libsdl_app_SDLActivity_nativeResume(
     }
 }
 
-extern "C" void Java_org_libsdl_app_SDLActivity_nativeRunAudioThread(
+void Java_org_libsdl_app_SDLActivity_nativeRunAudioThread(
                                     JNIEnv* env, jclass cls)
 {
     /* This is the audio thread, with a different environment */
@@ -243,26 +242,26 @@ extern "C" void Java_org_libsdl_app_SDLActivity_nativeRunAudioThread(
     Android_RunAudioThread();
 }
 
-extern "C" void Java_org_libsdl_app_SDLInputConnection_nativeCommitText(
+void Java_org_libsdl_app_SDLInputConnection_nativeCommitText(
                                     JNIEnv* env, jclass cls,
                                     jstring text, jint newCursorPosition)
 {
-    const char *utftext = env->GetStringUTFChars(text, NULL);
+    const char *utftext = (*env)->GetStringUTFChars(env, text, NULL);
 
     SDL_SendKeyboardText(utftext);
 
-    env->ReleaseStringUTFChars(text, utftext);
+    (*env)->ReleaseStringUTFChars(env, text, utftext);
 }
 
-extern "C" void Java_org_libsdl_app_SDLInputConnection_nativeSetComposingText(
+void Java_org_libsdl_app_SDLInputConnection_nativeSetComposingText(
                                     JNIEnv* env, jclass cls,
                                     jstring text, jint newCursorPosition)
 {
-    const char *utftext = env->GetStringUTFChars(text, NULL);
+    const char *utftext = (*env)->GetStringUTFChars(env, text, NULL);
 
     SDL_SendEditingText(utftext, 0, 0);
 
-    env->ReleaseStringUTFChars(text, utftext);
+    (*env)->ReleaseStringUTFChars(env, text, utftext);
 }
 
 
@@ -271,49 +270,55 @@ extern "C" void Java_org_libsdl_app_SDLInputConnection_nativeSetComposingText(
              Functions called by SDL into Java
 *******************************************************************************/
 
-class LocalReferenceHolder
+static int s_active = 0;
+struct LocalReferenceHolder
 {
-private:
-    static int s_active;
-
-public:
-    static bool IsActive() {
-        return s_active > 0;
-    }
-
-public:
-    LocalReferenceHolder(const char *func) : m_env(NULL), m_func(func) {
-#ifdef DEBUG_JNI
-        SDL_Log("Entering function %s", m_func);
-#endif
-    }
-    ~LocalReferenceHolder() {
-#ifdef DEBUG_JNI
-        SDL_Log("Leaving function %s", m_func);
-#endif
-        if (m_env) {
-            m_env->PopLocalFrame(NULL);
-            --s_active;
-        }
-    }
-
-    bool init(JNIEnv *env, jint capacity = 16) {
-        if (env->PushLocalFrame(capacity) < 0) {
-            SDL_SetError("Failed to allocate enough JVM local references");
-            return false;
-        }
-        ++s_active;
-        m_env = env;
-        return true;
-    }
-
-protected:
     JNIEnv *m_env;
     const char *m_func;
 };
-int LocalReferenceHolder::s_active;
 
-extern "C" SDL_bool Android_JNI_CreateContext(int majorVersion, int minorVersion,
+static struct LocalReferenceHolder LocalReferenceHolder_Setup(const char *func)
+{
+    struct LocalReferenceHolder refholder;
+    refholder.m_env = NULL;
+    refholder.m_func = func;
+#ifdef DEBUG_JNI
+    SDL_Log("Entering function %s", func);
+#endif
+    return refholder;
+}
+
+static SDL_bool LocalReferenceHolder_Init(struct LocalReferenceHolder *refholder, JNIEnv *env)
+{
+    const int capacity = 16;
+    if ((*env)->PushLocalFrame(env, capacity) < 0) {
+        SDL_SetError("Failed to allocate enough JVM local references");
+        return false;
+    }
+    ++s_active;
+    refholder->m_env = env;
+    return SDL_TRUE;
+}
+
+static void LocalReferenceHolder_Cleanup(struct LocalReferenceHolder *refholder)
+{
+#ifdef DEBUG_JNI
+    SDL_Log("Leaving function %s", refholder->m_func);
+#endif
+    if (refholder->m_env) {
+        JNIEnv* env = refholder->m_env;
+        (*env)->PopLocalFrame(env, NULL);
+        --s_active;
+    }
+}
+
+static SDL_bool LocalReferenceHolder_IsActive()
+{
+    return s_active > 0;    
+}
+
+
+SDL_bool Android_JNI_CreateContext(int majorVersion, int minorVersion,
                                 int red, int green, int blue, int alpha,
                                 int buffer, int depth, int stencil,
                                 int buffers, int samples)
@@ -337,35 +342,35 @@ extern "C" SDL_bool Android_JNI_CreateContext(int majorVersion, int minorVersion
 
     jintArray array;
 
-    array = env->NewIntArray(len);
-    env->SetIntArrayRegion(array, 0, len, attribs);
+    array = (*env)->NewIntArray(env, len);
+    (*env)->SetIntArrayRegion(env, array, 0, len, attribs);
 
-    jboolean success = env->CallStaticBooleanMethod(mActivityClass, midCreateGLContext, majorVersion, minorVersion, array);
+    jboolean success = (*env)->CallStaticBooleanMethod(env, mActivityClass, midCreateGLContext, majorVersion, minorVersion, array);
 
-    env->DeleteLocalRef(array);
+    (*env)->DeleteLocalRef(env, array);
 
     return success ? SDL_TRUE : SDL_FALSE;
 }
 
-extern "C" void Android_JNI_SwapWindow()
+void Android_JNI_SwapWindow()
 {
     JNIEnv *mEnv = Android_JNI_GetEnv();
-    mEnv->CallStaticVoidMethod(mActivityClass, midFlipBuffers);
+    (*mEnv)->CallStaticVoidMethod(mEnv, mActivityClass, midFlipBuffers);
 }
 
-extern "C" void Android_JNI_SetActivityTitle(const char *title)
+void Android_JNI_SetActivityTitle(const char *title)
 {
     jmethodID mid;
     JNIEnv *mEnv = Android_JNI_GetEnv();
-    mid = mEnv->GetStaticMethodID(mActivityClass,"setActivityTitle","(Ljava/lang/String;)Z");
+    mid = (*mEnv)->GetStaticMethodID(mEnv, mActivityClass,"setActivityTitle","(Ljava/lang/String;)Z");
     if (mid) {
-        jstring jtitle = reinterpret_cast(mEnv->NewStringUTF(title));
-        mEnv->CallStaticBooleanMethod(mActivityClass, mid, jtitle);
-        mEnv->DeleteLocalRef(jtitle);
+        jstring jtitle = (jstring)((*mEnv)->NewStringUTF(mEnv, title));
+        (*mEnv)->CallStaticBooleanMethod(mEnv, mActivityClass, mid, jtitle);
+        (*mEnv)->DeleteLocalRef(mEnv, jtitle);
     }
 }
 
-extern "C" SDL_bool Android_JNI_GetAccelerometerValues(float values[3])
+SDL_bool Android_JNI_GetAccelerometerValues(float values[3])
 {
     int i;
     SDL_bool retval = SDL_FALSE;
@@ -385,7 +390,7 @@ static void Android_JNI_ThreadDestroyed(void* value) {
     /* The thread is being destroyed, detach it from the Java VM and set the mThreadKey value to NULL as required */
     JNIEnv *env = (JNIEnv*) value;
     if (env != NULL) {
-        mJavaVM->DetachCurrentThread();
+        (*mJavaVM)->DetachCurrentThread(mJavaVM);
         pthread_setspecific(mThreadKey, NULL);
     }
 }
@@ -404,7 +409,7 @@ JNIEnv* Android_JNI_GetEnv(void) {
      */
 
     JNIEnv *env;
-    int status = mJavaVM->AttachCurrentThread(&env, NULL);
+    int status = (*mJavaVM)->AttachCurrentThread(mJavaVM, &env, NULL);
     if(status < 0) {
         LOGE("failed to attach current thread");
         return 0;
@@ -436,7 +441,7 @@ static jboolean audioBufferStereo = JNI_FALSE;
 static jobject audioBuffer = NULL;
 static void* audioBufferPinned = NULL;
 
-extern "C" int Android_JNI_OpenAudioDevice(int sampleRate, int is16Bit, int channelCount, int desiredBufferFrames)
+int Android_JNI_OpenAudioDevice(int sampleRate, int is16Bit, int channelCount, int desiredBufferFrames)
 {
     int audioBufferFrames;
 
@@ -451,23 +456,23 @@ extern "C" int Android_JNI_OpenAudioDevice(int sampleRate, int is16Bit, int chan
     audioBuffer16Bit = is16Bit;
     audioBufferStereo = channelCount > 1;
 
-    env->CallStaticVoidMethod(mActivityClass, midAudioInit, sampleRate, audioBuffer16Bit, audioBufferStereo, desiredBufferFrames);
+    (*env)->CallStaticVoidMethod(env, mActivityClass, midAudioInit, sampleRate, audioBuffer16Bit, audioBufferStereo, desiredBufferFrames);
 
     /* Allocating the audio buffer from the Java side and passing it as the return value for audioInit no longer works on
      * Android >= 4.2 due to a "stale global reference" error. So now we allocate this buffer directly from this side. */
 
     if (is16Bit) {
-        jshortArray audioBufferLocal = env->NewShortArray(desiredBufferFrames * (audioBufferStereo ? 2 : 1));
+        jshortArray audioBufferLocal = (*env)->NewShortArray(env, desiredBufferFrames * (audioBufferStereo ? 2 : 1));
         if (audioBufferLocal) {
-            audioBuffer = env->NewGlobalRef(audioBufferLocal);
-            env->DeleteLocalRef(audioBufferLocal);
+            audioBuffer = (*env)->NewGlobalRef(env, audioBufferLocal);
+            (*env)->DeleteLocalRef(env, audioBufferLocal);
         }
     }
     else {
-        jbyteArray audioBufferLocal = env->NewByteArray(desiredBufferFrames * (audioBufferStereo ? 2 : 1));
+        jbyteArray audioBufferLocal = (*env)->NewByteArray(env, desiredBufferFrames * (audioBufferStereo ? 2 : 1));
         if (audioBufferLocal) {
-            audioBuffer = env->NewGlobalRef(audioBufferLocal);
-            env->DeleteLocalRef(audioBufferLocal);
+            audioBuffer = (*env)->NewGlobalRef(env, audioBufferLocal);
+            (*env)->DeleteLocalRef(env, audioBufferLocal);
         }
     }
 
@@ -478,11 +483,11 @@ extern "C" int Android_JNI_OpenAudioDevice(int sampleRate, int is16Bit, int chan
 
     jboolean isCopy = JNI_FALSE;
     if (audioBuffer16Bit) {
-        audioBufferPinned = env->GetShortArrayElements((jshortArray)audioBuffer, &isCopy);
-        audioBufferFrames = env->GetArrayLength((jshortArray)audioBuffer);
+        audioBufferPinned = (*env)->GetShortArrayElements(env, (jshortArray)audioBuffer, &isCopy);
+        audioBufferFrames = (*env)->GetArrayLength(env, (jshortArray)audioBuffer);
     } else {
-        audioBufferPinned = env->GetByteArrayElements((jbyteArray)audioBuffer, &isCopy);
-        audioBufferFrames = env->GetArrayLength((jbyteArray)audioBuffer);
+        audioBufferPinned = (*env)->GetByteArrayElements(env, (jbyteArray)audioBuffer, &isCopy);
+        audioBufferFrames = (*env)->GetArrayLength(env, (jbyteArray)audioBuffer);
     }
     if (audioBufferStereo) {
         audioBufferFrames /= 2;
@@ -491,34 +496,34 @@ extern "C" int Android_JNI_OpenAudioDevice(int sampleRate, int is16Bit, int chan
     return audioBufferFrames;
 }
 
-extern "C" void * Android_JNI_GetAudioBuffer()
+void * Android_JNI_GetAudioBuffer()
 {
     return audioBufferPinned;
 }
 
-extern "C" void Android_JNI_WriteAudioBuffer()
+void Android_JNI_WriteAudioBuffer()
 {
     JNIEnv *mAudioEnv = Android_JNI_GetEnv();
 
     if (audioBuffer16Bit) {
-        mAudioEnv->ReleaseShortArrayElements((jshortArray)audioBuffer, (jshort *)audioBufferPinned, JNI_COMMIT);
-        mAudioEnv->CallStaticVoidMethod(mActivityClass, midAudioWriteShortBuffer, (jshortArray)audioBuffer);
+        (*mAudioEnv)->ReleaseShortArrayElements(mAudioEnv, (jshortArray)audioBuffer, (jshort *)audioBufferPinned, JNI_COMMIT);
+        (*mAudioEnv)->CallStaticVoidMethod(mAudioEnv, mActivityClass, midAudioWriteShortBuffer, (jshortArray)audioBuffer);
     } else {
-        mAudioEnv->ReleaseByteArrayElements((jbyteArray)audioBuffer, (jbyte *)audioBufferPinned, JNI_COMMIT);
-        mAudioEnv->CallStaticVoidMethod(mActivityClass, midAudioWriteByteBuffer, (jbyteArray)audioBuffer);
+        (*mAudioEnv)->ReleaseByteArrayElements(mAudioEnv, (jbyteArray)audioBuffer, (jbyte *)audioBufferPinned, JNI_COMMIT);
+        (*mAudioEnv)->CallStaticVoidMethod(mAudioEnv, mActivityClass, midAudioWriteByteBuffer, (jbyteArray)audioBuffer);
     }
 
     /* JNI_COMMIT means the changes are committed to the VM but the buffer remains pinned */
 }
 
-extern "C" void Android_JNI_CloseAudioDevice()
+void Android_JNI_CloseAudioDevice()
 {
     JNIEnv *env = Android_JNI_GetEnv();
 
-    env->CallStaticVoidMethod(mActivityClass, midAudioQuit);
+    (*env)->CallStaticVoidMethod(env, mActivityClass, midAudioQuit);
 
     if (audioBuffer) {
-        env->DeleteGlobalRef(audioBuffer);
+        (*env)->DeleteGlobalRef(env, audioBuffer);
         audioBuffer = NULL;
         audioBufferPinned = NULL;
     }
@@ -526,38 +531,38 @@ extern "C" void Android_JNI_CloseAudioDevice()
 
 // Test for an exception and call SDL_SetError with its detail if one occurs
 // If optional parameter silent is truthy then SDL_SetError() is not called.
-static bool Android_JNI_ExceptionOccurred(bool silent = false)
+static bool Android_JNI_ExceptionOccurred(bool silent)
 {
-    SDL_assert(LocalReferenceHolder::IsActive());
+    SDL_assert(LocalReferenceHolder_IsActive());
     JNIEnv *mEnv = Android_JNI_GetEnv();
 
-    jthrowable exception = mEnv->ExceptionOccurred();
+    jthrowable exception = (*mEnv)->ExceptionOccurred(mEnv);
     if (exception != NULL) {
         jmethodID mid;
 
         // Until this happens most JNI operations have undefined behaviour
-        mEnv->ExceptionClear();
+        (*mEnv)->ExceptionClear(mEnv);
 
         if (!silent) {
-            jclass exceptionClass = mEnv->GetObjectClass(exception);
-            jclass classClass = mEnv->FindClass("java/lang/Class");
+            jclass exceptionClass = (*mEnv)->GetObjectClass(mEnv, exception);
+            jclass classClass = (*mEnv)->FindClass(mEnv, "java/lang/Class");
 
-            mid = mEnv->GetMethodID(classClass, "getName", "()Ljava/lang/String;");
-            jstring exceptionName = (jstring)mEnv->CallObjectMethod(exceptionClass, mid);
-            const char* exceptionNameUTF8 = mEnv->GetStringUTFChars(exceptionName, 0);
+            mid = (*mEnv)->GetMethodID(mEnv, classClass, "getName", "()Ljava/lang/String;");
+            jstring exceptionName = (jstring)(*mEnv)->CallObjectMethod(mEnv, exceptionClass, mid);
+            const char* exceptionNameUTF8 = (*mEnv)->GetStringUTFChars(mEnv, exceptionName, 0);
 
-            mid = mEnv->GetMethodID(exceptionClass, "getMessage", "()Ljava/lang/String;");
-            jstring exceptionMessage = (jstring)mEnv->CallObjectMethod(exception, mid);
+            mid = (*mEnv)->GetMethodID(mEnv, exceptionClass, "getMessage", "()Ljava/lang/String;");
+            jstring exceptionMessage = (jstring)(*mEnv)->CallObjectMethod(mEnv, exception, mid);
 
             if (exceptionMessage != NULL) {
-                const char* exceptionMessageUTF8 = mEnv->GetStringUTFChars(exceptionMessage, 0);
+                const char* exceptionMessageUTF8 = (*mEnv)->GetStringUTFChars(mEnv, exceptionMessage, 0);
                 SDL_SetError("%s: %s", exceptionNameUTF8, exceptionMessageUTF8);
-                mEnv->ReleaseStringUTFChars(exceptionMessage, exceptionMessageUTF8);
+                (*mEnv)->ReleaseStringUTFChars(mEnv, exceptionMessage, exceptionMessageUTF8);
             } else {
                 SDL_SetError("%s", exceptionNameUTF8);
             }
 
-            mEnv->ReleaseStringUTFChars(exceptionName, exceptionNameUTF8);
+            (*mEnv)->ReleaseStringUTFChars(mEnv, exceptionName, exceptionNameUTF8);
         }
 
         return true;
@@ -566,9 +571,10 @@ static bool Android_JNI_ExceptionOccurred(bool silent = false)
     return false;
 }
 
-static int Android_JNI_FileOpen(SDL_RWops* ctx)
+static int Internal_Android_JNI_FileOpen(SDL_RWops* ctx)
 {
-    LocalReferenceHolder refs(__FUNCTION__);
+    struct LocalReferenceHolder refs = LocalReferenceHolder_Setup(__FUNCTION__);
+
     int result = 0;
 
     jmethodID mid;
@@ -583,7 +589,7 @@ static int Android_JNI_FileOpen(SDL_RWops* ctx)
     jfieldID descriptor;
 
     JNIEnv *mEnv = Android_JNI_GetEnv();
-    if (!refs.init(mEnv)) {
+    if (!LocalReferenceHolder_Init(&refs, mEnv)) {
         goto failure;
     }
 
@@ -591,43 +597,43 @@ static int Android_JNI_FileOpen(SDL_RWops* ctx)
     ctx->hidden.androidio.position = 0;
 
     // context = SDLActivity.getContext();
-    mid = mEnv->GetStaticMethodID(mActivityClass,
+    mid = (*mEnv)->GetStaticMethodID(mEnv, mActivityClass,
             "getContext","()Landroid/content/Context;");
-    context = mEnv->CallStaticObjectMethod(mActivityClass, mid);
+    context = (*mEnv)->CallStaticObjectMethod(mEnv, mActivityClass, mid);
 
 
     // assetManager = context.getAssets();
-    mid = mEnv->GetMethodID(mEnv->GetObjectClass(context),
+    mid = (*mEnv)->GetMethodID(mEnv, (*mEnv)->GetObjectClass(mEnv, context),
             "getAssets", "()Landroid/content/res/AssetManager;");
-    assetManager = mEnv->CallObjectMethod(context, mid);
+    assetManager = (*mEnv)->CallObjectMethod(mEnv, context, mid);
 
     /* First let's try opening the file to obtain an AssetFileDescriptor.
     * This method reads the files directly from the APKs using standard *nix calls
     */
-    mid = mEnv->GetMethodID(mEnv->GetObjectClass(assetManager), "openFd", "(Ljava/lang/String;)Landroid/content/res/AssetFileDescriptor;");
-    inputStream = mEnv->CallObjectMethod(assetManager, mid, fileNameJString);
+    mid = (*mEnv)->GetMethodID(mEnv, (*mEnv)->GetObjectClass(mEnv, assetManager), "openFd", "(Ljava/lang/String;)Landroid/content/res/AssetFileDescriptor;");
+    inputStream = (*mEnv)->CallObjectMethod(mEnv, assetManager, mid, fileNameJString);
     if (Android_JNI_ExceptionOccurred(true)) {
         goto fallback;
     }
 
-    mid = mEnv->GetMethodID(mEnv->GetObjectClass(inputStream), "getStartOffset", "()J");
-    ctx->hidden.androidio.offset = mEnv->CallLongMethod(inputStream, mid);
+    mid = (*mEnv)->GetMethodID(mEnv, (*mEnv)->GetObjectClass(mEnv, inputStream), "getStartOffset", "()J");
+    ctx->hidden.androidio.offset = (*mEnv)->CallLongMethod(mEnv, inputStream, mid);
     if (Android_JNI_ExceptionOccurred(true)) {
         goto fallback;
     }
 
-    mid = mEnv->GetMethodID(mEnv->GetObjectClass(inputStream), "getDeclaredLength", "()J");
-    ctx->hidden.androidio.size = mEnv->CallLongMethod(inputStream, mid);
+    mid = (*mEnv)->GetMethodID(mEnv, (*mEnv)->GetObjectClass(mEnv, inputStream), "getDeclaredLength", "()J");
+    ctx->hidden.androidio.size = (*mEnv)->CallLongMethod(mEnv, inputStream, mid);
     if (Android_JNI_ExceptionOccurred(true)) {
         goto fallback;
     }
 
-    mid = mEnv->GetMethodID(mEnv->GetObjectClass(inputStream), "getFileDescriptor", "()Ljava/io/FileDescriptor;");
-    fd = mEnv->CallObjectMethod(inputStream, mid);
-    fdCls = mEnv->GetObjectClass(fd);
-    descriptor = mEnv->GetFieldID(fdCls, "descriptor", "I");
-    ctx->hidden.androidio.fd = mEnv->GetIntField(fd, descriptor);
-    ctx->hidden.androidio.assetFileDescriptorRef = mEnv->NewGlobalRef(inputStream);
+    mid = (*mEnv)->GetMethodID(mEnv, (*mEnv)->GetObjectClass(mEnv, inputStream), "getFileDescriptor", "()Ljava/io/FileDescriptor;");
+    fd = (*mEnv)->CallObjectMethod(mEnv, inputStream, mid);
+    fdCls = (*mEnv)->GetObjectClass(mEnv, fd);
+    descriptor = (*mEnv)->GetFieldID(mEnv, fdCls, "descriptor", "I");
+    ctx->hidden.androidio.fd = (*mEnv)->GetIntField(mEnv, fd, descriptor);
+    ctx->hidden.androidio.assetFileDescriptorRef = (*mEnv)->NewGlobalRef(mEnv, inputStream);
 
     // Seek to the correct offset in the file.
     lseek(ctx->hidden.androidio.fd, (off_t)ctx->hidden.androidio.offset, SEEK_SET);
@@ -641,14 +647,14 @@ fallback:
         ctx->hidden.androidio.assetFileDescriptorRef = NULL;
 
         // inputStream = assetManager.open();
-        mid = mEnv->GetMethodID(mEnv->GetObjectClass(assetManager),
+        mid = (*mEnv)->GetMethodID(mEnv, (*mEnv)->GetObjectClass(mEnv, assetManager),
                 "open", "(Ljava/lang/String;I)Ljava/io/InputStream;");
-        inputStream = mEnv->CallObjectMethod(assetManager, mid, fileNameJString, 1 /*ACCESS_RANDOM*/);
-        if (Android_JNI_ExceptionOccurred()) {
+        inputStream = (*mEnv)->CallObjectMethod(mEnv, assetManager, mid, fileNameJString, 1 /*ACCESS_RANDOM*/);
+        if (Android_JNI_ExceptionOccurred(false)) {
             goto failure;
         }
 
-        ctx->hidden.androidio.inputStreamRef = mEnv->NewGlobalRef(inputStream);
+        ctx->hidden.androidio.inputStreamRef = (*mEnv)->NewGlobalRef(mEnv, inputStream);
 
         // Despite all the visible documentation on [Asset]InputStream claiming
         // that the .available() method is not guaranteed to return the entire file
@@ -657,29 +663,29 @@ fallback:
         // AssetInputStream.available() /will/ always return the total file size
 
         // size = inputStream.available();
-        mid = mEnv->GetMethodID(mEnv->GetObjectClass(inputStream),
+        mid = (*mEnv)->GetMethodID(mEnv, (*mEnv)->GetObjectClass(mEnv, inputStream),
                 "available", "()I");
-        ctx->hidden.androidio.size = (long)mEnv->CallIntMethod(inputStream, mid);
-        if (Android_JNI_ExceptionOccurred()) {
+        ctx->hidden.androidio.size = (long)(*mEnv)->CallIntMethod(mEnv, inputStream, mid);
+        if (Android_JNI_ExceptionOccurred(false)) {
             goto failure;
         }
 
         // readableByteChannel = Channels.newChannel(inputStream);
-        channels = mEnv->FindClass("java/nio/channels/Channels");
-        mid = mEnv->GetStaticMethodID(channels,
+        channels = (*mEnv)->FindClass(mEnv, "java/nio/channels/Channels");
+        mid = (*mEnv)->GetStaticMethodID(mEnv, channels,
                 "newChannel",
                 "(Ljava/io/InputStream;)Ljava/nio/channels/ReadableByteChannel;");
-        readableByteChannel = mEnv->CallStaticObjectMethod(
-                channels, mid, inputStream);
-        if (Android_JNI_ExceptionOccurred()) {
+        readableByteChannel = (*mEnv)->CallStaticObjectMethod(
+                mEnv, channels, mid, inputStream);
+        if (Android_JNI_ExceptionOccurred(false)) {
             goto failure;
         }
 
         ctx->hidden.androidio.readableByteChannelRef =
-            mEnv->NewGlobalRef(readableByteChannel);
+            (*mEnv)->NewGlobalRef(mEnv, readableByteChannel);
 
         // Store .read id for reading purposes
-        mid = mEnv->GetMethodID(mEnv->GetObjectClass(readableByteChannel),
+        mid = (*mEnv)->GetMethodID(mEnv, (*mEnv)->GetObjectClass(mEnv, readableByteChannel),
                 "read", "(Ljava/nio/ByteBuffer;)I");
         ctx->hidden.androidio.readMethod = mid;
     }
@@ -688,53 +694,59 @@ fallback:
 failure:
         result = -1;
 
-        mEnv->DeleteGlobalRef((jobject)ctx->hidden.androidio.fileNameRef);
+        (*mEnv)->DeleteGlobalRef(mEnv, (jobject)ctx->hidden.androidio.fileNameRef);
 
         if(ctx->hidden.androidio.inputStreamRef != NULL) {
-            mEnv->DeleteGlobalRef((jobject)ctx->hidden.androidio.inputStreamRef);
+            (*mEnv)->DeleteGlobalRef(mEnv, (jobject)ctx->hidden.androidio.inputStreamRef);
         }
 
         if(ctx->hidden.androidio.readableByteChannelRef != NULL) {
-            mEnv->DeleteGlobalRef((jobject)ctx->hidden.androidio.readableByteChannelRef);
+            (*mEnv)->DeleteGlobalRef(mEnv, (jobject)ctx->hidden.androidio.readableByteChannelRef);
         }
 
         if(ctx->hidden.androidio.assetFileDescriptorRef != NULL) {
-            mEnv->DeleteGlobalRef((jobject)ctx->hidden.androidio.assetFileDescriptorRef);
+            (*mEnv)->DeleteGlobalRef(mEnv, (jobject)ctx->hidden.androidio.assetFileDescriptorRef);
         }
 
     }
-
+    
+    LocalReferenceHolder_Cleanup(&refs);
     return result;
 }
 
-extern "C" int Android_JNI_FileOpen(SDL_RWops* ctx,
-        const char* fileName, const char*)
+int Android_JNI_FileOpen(SDL_RWops* ctx,
+        const char* fileName, const char* mode)
 {
-    LocalReferenceHolder refs(__FUNCTION__);
+    struct LocalReferenceHolder refs = LocalReferenceHolder_Setup(__FUNCTION__);
     JNIEnv *mEnv = Android_JNI_GetEnv();
+    int retval;
 
-    if (!refs.init(mEnv)) {
+    if (!LocalReferenceHolder_Init(&refs, mEnv)) {
+        LocalReferenceHolder_Cleanup(&refs);        
         return -1;
     }
 
     if (!ctx) {
+        LocalReferenceHolder_Cleanup(&refs);
         return -1;
     }
 
-    jstring fileNameJString = mEnv->NewStringUTF(fileName);
-    ctx->hidden.androidio.fileNameRef = mEnv->NewGlobalRef(fileNameJString);
+    jstring fileNameJString = (*mEnv)->NewStringUTF(mEnv, fileName);
+    ctx->hidden.androidio.fileNameRef = (*mEnv)->NewGlobalRef(mEnv, fileNameJString);
     ctx->hidden.androidio.inputStreamRef = NULL;
     ctx->hidden.androidio.readableByteChannelRef = NULL;
     ctx->hidden.androidio.readMethod = NULL;
     ctx->hidden.androidio.assetFileDescriptorRef = NULL;
 
-    return Android_JNI_FileOpen(ctx);
+    retval = Internal_Android_JNI_FileOpen(ctx);
+    LocalReferenceHolder_Cleanup(&refs);
+    return retval;
 }
 
-extern "C" size_t Android_JNI_FileRead(SDL_RWops* ctx, void* buffer,
+size_t Android_JNI_FileRead(SDL_RWops* ctx, void* buffer,
         size_t size, size_t maxnum)
 {
-    LocalReferenceHolder refs(__FUNCTION__);
+    struct LocalReferenceHolder refs = LocalReferenceHolder_Setup(__FUNCTION__);
 
     if (ctx->hidden.androidio.assetFileDescriptorRef) {
         size_t bytesMax = size * maxnum;
@@ -744,8 +756,10 @@ extern "C" size_t Android_JNI_FileRead(SDL_RWops* ctx, void* buffer,
         size_t result = read(ctx->hidden.androidio.fd, buffer, bytesMax );
         if (result > 0) {
             ctx->hidden.androidio.position += result;
+            LocalReferenceHolder_Cleanup(&refs);
             return result / size;
         }
+        LocalReferenceHolder_Cleanup(&refs);
         return 0;
     } else {
         jlong bytesRemaining = (jlong) (size * maxnum);
@@ -756,19 +770,21 @@ extern "C" size_t Android_JNI_FileRead(SDL_RWops* ctx, void* buffer,
         if (bytesRemaining >  bytesMax) bytesRemaining = bytesMax;
 
         JNIEnv *mEnv = Android_JNI_GetEnv();
-        if (!refs.init(mEnv)) {
+        if (!LocalReferenceHolder_Init(&refs, mEnv)) {
+            LocalReferenceHolder_Cleanup(&refs);            
             return 0;
         }
 
         jobject readableByteChannel = (jobject)ctx->hidden.androidio.readableByteChannelRef;
         jmethodID readMethod = (jmethodID)ctx->hidden.androidio.readMethod;
-        jobject byteBuffer = mEnv->NewDirectByteBuffer(buffer, bytesRemaining);
+        jobject byteBuffer = (*mEnv)->NewDirectByteBuffer(mEnv, buffer, bytesRemaining);
 
         while (bytesRemaining > 0) {
             // result = readableByteChannel.read(...);
-            int result = mEnv->CallIntMethod(readableByteChannel, readMethod, byteBuffer);
+            int result = (*mEnv)->CallIntMethod(mEnv, readableByteChannel, readMethod, byteBuffer);
 
-            if (Android_JNI_ExceptionOccurred()) {
+            if (Android_JNI_ExceptionOccurred(false)) {
+                LocalReferenceHolder_Cleanup(&refs);            
                 return 0;
             }
 
@@ -780,39 +796,43 @@ extern "C" size_t Android_JNI_FileRead(SDL_RWops* ctx, void* buffer,
             bytesRead += result;
             ctx->hidden.androidio.position += result;
         }
+        LocalReferenceHolder_Cleanup(&refs);                    
         return bytesRead / size;
     }
+    LocalReferenceHolder_Cleanup(&refs);            
 }
 
-extern "C" size_t Android_JNI_FileWrite(SDL_RWops* ctx, const void* buffer,
+size_t Android_JNI_FileWrite(SDL_RWops* ctx, const void* buffer,
         size_t size, size_t num)
 {
     SDL_SetError("Cannot write to Android package filesystem");
     return 0;
 }
 
-static int Android_JNI_FileClose(SDL_RWops* ctx, bool release)
+static int Internal_Android_JNI_FileClose(SDL_RWops* ctx, bool release)
 {
-    LocalReferenceHolder refs(__FUNCTION__);
+    struct LocalReferenceHolder refs = LocalReferenceHolder_Setup(__FUNCTION__);
+
     int result = 0;
     JNIEnv *mEnv = Android_JNI_GetEnv();
 
-    if (!refs.init(mEnv)) {
+    if (!LocalReferenceHolder_Init(&refs, mEnv)) {
+        LocalReferenceHolder_Cleanup(&refs);
         return SDL_SetError("Failed to allocate enough JVM local references");
     }
 
     if (ctx) {
         if (release) {
-            mEnv->DeleteGlobalRef((jobject)ctx->hidden.androidio.fileNameRef);
+            (*mEnv)->DeleteGlobalRef(mEnv, (jobject)ctx->hidden.androidio.fileNameRef);
         }
 
         if (ctx->hidden.androidio.assetFileDescriptorRef) {
             jobject inputStream = (jobject)ctx->hidden.androidio.assetFileDescriptorRef;
-            jmethodID mid = mEnv->GetMethodID(mEnv->GetObjectClass(inputStream),
+            jmethodID mid = (*mEnv)->GetMethodID(mEnv, (*mEnv)->GetObjectClass(mEnv, inputStream),
                     "close", "()V");
-            mEnv->CallVoidMethod(inputStream, mid);
-            mEnv->DeleteGlobalRef((jobject)ctx->hidden.androidio.assetFileDescriptorRef);
-            if (Android_JNI_ExceptionOccurred()) {
+            (*mEnv)->CallVoidMethod(mEnv, inputStream, mid);
+            (*mEnv)->DeleteGlobalRef(mEnv, (jobject)ctx->hidden.androidio.assetFileDescriptorRef);
+            if (Android_JNI_ExceptionOccurred(false)) {
                 result = -1;
             }
         }
@@ -820,12 +840,12 @@ static int Android_JNI_FileClose(SDL_RWops* ctx, bool release)
             jobject inputStream = (jobject)ctx->hidden.androidio.inputStreamRef;
 
             // inputStream.close();
-            jmethodID mid = mEnv->GetMethodID(mEnv->GetObjectClass(inputStream),
+            jmethodID mid = (*mEnv)->GetMethodID(mEnv, (*mEnv)->GetObjectClass(mEnv, inputStream),
                     "close", "()V");
-            mEnv->CallVoidMethod(inputStream, mid);
-            mEnv->DeleteGlobalRef((jobject)ctx->hidden.androidio.inputStreamRef);
-            mEnv->DeleteGlobalRef((jobject)ctx->hidden.androidio.readableByteChannelRef);
-            if (Android_JNI_ExceptionOccurred()) {
+            (*mEnv)->CallVoidMethod(mEnv, inputStream, mid);
+            (*mEnv)->DeleteGlobalRef(mEnv, (jobject)ctx->hidden.androidio.inputStreamRef);
+            (*mEnv)->DeleteGlobalRef(mEnv, (jobject)ctx->hidden.androidio.readableByteChannelRef);
+            if (Android_JNI_ExceptionOccurred(false)) {
                 result = -1;
             }
         }
@@ -835,16 +855,17 @@ static int Android_JNI_FileClose(SDL_RWops* ctx, bool release)
         }
     }
 
+    LocalReferenceHolder_Cleanup(&refs);
     return result;
 }
 
 
-extern "C" Sint64 Android_JNI_FileSize(SDL_RWops* ctx)
+Sint64 Android_JNI_FileSize(SDL_RWops* ctx)
 {
     return ctx->hidden.androidio.size;
 }
 
-extern "C" Sint64 Android_JNI_FileSeek(SDL_RWops* ctx, Sint64 offset, int whence)
+Sint64 Android_JNI_FileSeek(SDL_RWops* ctx, Sint64 offset, int whence)
 {
     if (ctx->hidden.androidio.assetFileDescriptorRef) {
         switch (whence) {
@@ -915,8 +936,8 @@ extern "C" Sint64 Android_JNI_FileSeek(SDL_RWops* ctx, Sint64 offset, int whence
         } else if (movement < 0) {
             // We can't seek backwards so we have to reopen the file and seek
             // forwards which obviously isn't very efficient
-            Android_JNI_FileClose(ctx, false);
-            Android_JNI_FileOpen(ctx);
+            Internal_Android_JNI_FileClose(ctx, false);
+            Internal_Android_JNI_FileOpen(ctx);
             Android_JNI_FileSeek(ctx, newPosition, RW_SEEK_SET);
         }
     }
@@ -925,85 +946,107 @@ extern "C" Sint64 Android_JNI_FileSeek(SDL_RWops* ctx, Sint64 offset, int whence
 
 }
 
-extern "C" int Android_JNI_FileClose(SDL_RWops* ctx)
+int Android_JNI_FileClose(SDL_RWops* ctx)
 {
-    return Android_JNI_FileClose(ctx, true);
+    return Internal_Android_JNI_FileClose(ctx, true);
 }
 
 // returns a new global reference which needs to be released later
 static jobject Android_JNI_GetSystemServiceObject(const char* name)
 {
-    LocalReferenceHolder refs(__FUNCTION__);
+    struct LocalReferenceHolder refs = LocalReferenceHolder_Setup(__FUNCTION__);
     JNIEnv* env = Android_JNI_GetEnv();
-    if (!refs.init(env)) {
+    jobject retval = NULL;
+
+    if (!LocalReferenceHolder_Init(&refs, env)) {
+        LocalReferenceHolder_Cleanup(&refs);
         return NULL;
     }
 
-    jstring service = env->NewStringUTF(name);
+    jstring service = (*env)->NewStringUTF(env, name);
 
     jmethodID mid;
 
-    mid = env->GetStaticMethodID(mActivityClass, "getContext", "()Landroid/content/Context;");
-    jobject context = env->CallStaticObjectMethod(mActivityClass, mid);
+    mid = (*env)->GetStaticMethodID(env, mActivityClass, "getContext", "()Landroid/content/Context;");
+    jobject context = (*env)->CallStaticObjectMethod(env, mActivityClass, mid);
 
-    mid = env->GetMethodID(mActivityClass, "getSystemService", "(Ljava/lang/String;)Ljava/lang/Object;");
-    jobject manager = env->CallObjectMethod(context, mid, service);
+    mid = (*env)->GetMethodID(env, mActivityClass, "getSystemService", "(Ljava/lang/String;)Ljava/lang/Object;");
+    jobject manager = (*env)->CallObjectMethod(env, context, mid, service);
 
-    env->DeleteLocalRef(service);
+    (*env)->DeleteLocalRef(env, service);
 
-    return manager ? env->NewGlobalRef(manager) : NULL;
+    retval = manager ? (*env)->NewGlobalRef(env, manager) : NULL;
+    LocalReferenceHolder_Cleanup(&refs);
+    return retval;
 }
 
 #define SETUP_CLIPBOARD(error) \
-    LocalReferenceHolder refs(__FUNCTION__); \
+    struct LocalReferenceHolder refs = LocalReferenceHolder_Setup(__FUNCTION__); \
     JNIEnv* env = Android_JNI_GetEnv(); \
-    if (!refs.init(env)) { \
+    if (!LocalReferenceHolder_Init(&refs, env)) { \
+        LocalReferenceHolder_Cleanup(&refs); \
         return error; \
     } \
     jobject clipboard = Android_JNI_GetSystemServiceObject("clipboard"); \
     if (!clipboard) { \
+        LocalReferenceHolder_Cleanup(&refs); \
         return error; \
     }
 
-extern "C" int Android_JNI_SetClipboardText(const char* text)
+#define CLEANUP_CLIPBOARD() \
+    LocalReferenceHolder_Cleanup(&refs);
+
+int Android_JNI_SetClipboardText(const char* text)
 {
     SETUP_CLIPBOARD(-1)
 
-    jmethodID mid = env->GetMethodID(env->GetObjectClass(clipboard), "setText", "(Ljava/lang/CharSequence;)V");
-    jstring string = env->NewStringUTF(text);
-    env->CallVoidMethod(clipboard, mid, string);
-    env->DeleteGlobalRef(clipboard);
-    env->DeleteLocalRef(string);
+    jmethodID mid = (*env)->GetMethodID(env, (*env)->GetObjectClass(env, clipboard), "setText", "(Ljava/lang/CharSequence;)V");
+    jstring string = (*env)->NewStringUTF(env, text);
+    (*env)->CallVoidMethod(env, clipboard, mid, string);
+    (*env)->DeleteGlobalRef(env, clipboard);
+    (*env)->DeleteLocalRef(env, string);
+
+    CLEANUP_CLIPBOARD();
+
     return 0;
 }
 
-extern "C" char* Android_JNI_GetClipboardText()
+char* Android_JNI_GetClipboardText()
 {
     SETUP_CLIPBOARD(SDL_strdup(""))
 
-    jmethodID mid = env->GetMethodID(env->GetObjectClass(clipboard), "getText", "()Ljava/lang/CharSequence;");
-    jobject sequence = env->CallObjectMethod(clipboard, mid);
-    env->DeleteGlobalRef(clipboard);
+    jmethodID mid = (*env)->GetMethodID(env, (*env)->GetObjectClass(env, clipboard), "getText", "()Ljava/lang/CharSequence;");
+    jobject sequence = (*env)->CallObjectMethod(env, clipboard, mid);
+    (*env)->DeleteGlobalRef(env, clipboard);
     if (sequence) {
-        mid = env->GetMethodID(env->GetObjectClass(sequence), "toString", "()Ljava/lang/String;");
-        jstring string = reinterpret_cast(env->CallObjectMethod(sequence, mid));
-        const char* utf = env->GetStringUTFChars(string, 0);
+        mid = (*env)->GetMethodID(env, (*env)->GetObjectClass(env, sequence), "toString", "()Ljava/lang/String;");
+        jstring string = (jstring)((*env)->CallObjectMethod(env, sequence, mid));
+        const char* utf = (*env)->GetStringUTFChars(env, string, 0);
         if (utf) {
             char* text = SDL_strdup(utf);
-            env->ReleaseStringUTFChars(string, utf);
+            (*env)->ReleaseStringUTFChars(env, string, utf);
+
+            CLEANUP_CLIPBOARD();
+
             return text;
         }
     }
+
+    CLEANUP_CLIPBOARD();    
+
     return SDL_strdup("");
 }
 
-extern "C" SDL_bool Android_JNI_HasClipboardText()
+SDL_bool Android_JNI_HasClipboardText()
 {
     SETUP_CLIPBOARD(SDL_FALSE)
 
-    jmethodID mid = env->GetMethodID(env->GetObjectClass(clipboard), "hasText", "()Z");
-    jboolean has = env->CallBooleanMethod(clipboard, mid);
-    env->DeleteGlobalRef(clipboard);
+    jmethodID mid = (*env)->GetMethodID(env, (*env)->GetObjectClass(env, clipboard), "hasText", "()Z");
+    jboolean has = (*env)->CallBooleanMethod(env, clipboard, mid);
+    (*env)->DeleteGlobalRef(env, clipboard);
+
+    CLEANUP_CLIPBOARD();
+    
     return has ? SDL_TRUE : SDL_FALSE;
 }
 
@@ -1011,54 +1054,56 @@ extern "C" SDL_bool Android_JNI_HasClipboardText()
 // returns 0 on success or -1 on error (others undefined then)
 // returns truthy or falsy value in plugged, charged and battery
 // returns the value in seconds and percent or -1 if not available
-extern "C" int Android_JNI_GetPowerInfo(int* plugged, int* charged, int* battery, int* seconds, int* percent)
+int Android_JNI_GetPowerInfo(int* plugged, int* charged, int* battery, int* seconds, int* percent)
 {
-    LocalReferenceHolder refs(__FUNCTION__);
+    struct LocalReferenceHolder refs = LocalReferenceHolder_Setup(__FUNCTION__);
     JNIEnv* env = Android_JNI_GetEnv();
-    if (!refs.init(env)) {
+    if (!LocalReferenceHolder_Init(&refs, env)) {
+        LocalReferenceHolder_Cleanup(&refs);
         return -1;
     }
 
     jmethodID mid;
 
-    mid = env->GetStaticMethodID(mActivityClass, "getContext", "()Landroid/content/Context;");
-    jobject context = env->CallStaticObjectMethod(mActivityClass, mid);
+    mid = (*env)->GetStaticMethodID(env, mActivityClass, "getContext", "()Landroid/content/Context;");
+    jobject context = (*env)->CallStaticObjectMethod(env, mActivityClass, mid);
 
-    jstring action = env->NewStringUTF("android.intent.action.BATTERY_CHANGED");
+    jstring action = (*env)->NewStringUTF(env, "android.intent.action.BATTERY_CHANGED");
 
-    jclass cls = env->FindClass("android/content/IntentFilter");
+    jclass cls = (*env)->FindClass(env, "android/content/IntentFilter");
 
-    mid = env->GetMethodID(cls, "", "(Ljava/lang/String;)V");
-    jobject filter = env->NewObject(cls, mid, action);
+    mid = (*env)->GetMethodID(env, cls, "", "(Ljava/lang/String;)V");
+    jobject filter = (*env)->NewObject(env, cls, mid, action);
 
-    env->DeleteLocalRef(action);
+    (*env)->DeleteLocalRef(env, action);
 
-    mid = env->GetMethodID(mActivityClass, "registerReceiver", "(Landroid/content/BroadcastReceiver;Landroid/content/IntentFilter;)Landroid/content/Intent;");
-    jobject intent = env->CallObjectMethod(context, mid, NULL, filter);
+    mid = (*env)->GetMethodID(env, mActivityClass, "registerReceiver", "(Landroid/content/BroadcastReceiver;Landroid/content/IntentFilter;)Landroid/content/Intent;");
+    jobject intent = (*env)->CallObjectMethod(env, context, mid, NULL, filter);
 
-    env->DeleteLocalRef(filter);
+    (*env)->DeleteLocalRef(env, filter);
 
-    cls = env->GetObjectClass(intent);
+    cls = (*env)->GetObjectClass(env, intent);
 
     jstring iname;
-    jmethodID imid = env->GetMethodID(cls, "getIntExtra", "(Ljava/lang/String;I)I");
+    jmethodID imid = (*env)->GetMethodID(env, cls, "getIntExtra", "(Ljava/lang/String;I)I");
 
 #define GET_INT_EXTRA(var, key) \
-    iname = env->NewStringUTF(key); \
-    int var = env->CallIntMethod(intent, imid, iname, -1); \
-    env->DeleteLocalRef(iname);
+    iname = (*env)->NewStringUTF(env, key); \
+    int var = (*env)->CallIntMethod(env, intent, imid, iname, -1); \
+    (*env)->DeleteLocalRef(env, iname);
 
     jstring bname;
-    jmethodID bmid = env->GetMethodID(cls, "getBooleanExtra", "(Ljava/lang/String;Z)Z");
+    jmethodID bmid = (*env)->GetMethodID(env, cls, "getBooleanExtra", "(Ljava/lang/String;Z)Z");
 
 #define GET_BOOL_EXTRA(var, key) \
-    bname = env->NewStringUTF(key); \
-    int var = env->CallBooleanMethod(intent, bmid, bname, JNI_FALSE); \
-    env->DeleteLocalRef(bname);
+    bname = (*env)->NewStringUTF(env, key); \
+    int var = (*env)->CallBooleanMethod(env, intent, bmid, bname, JNI_FALSE); \
+    (*env)->DeleteLocalRef(env, bname);
 
     if (plugged) {
         GET_INT_EXTRA(plug, "plugged") // == BatteryManager.EXTRA_PLUGGED (API 5)
         if (plug == -1) {
+            LocalReferenceHolder_Cleanup(&refs);
             return -1;
         }
         // 1 == BatteryManager.BATTERY_PLUGGED_AC
@@ -1069,6 +1114,7 @@ extern "C" int Android_JNI_GetPowerInfo(int* plugged, int* charged, int* battery
     if (charged) {
         GET_INT_EXTRA(status, "status") // == BatteryManager.EXTRA_STATUS (API 5)
         if (status == -1) {
+            LocalReferenceHolder_Cleanup(&refs);
             return -1;
         }
         // 5 == BatteryManager.BATTERY_STATUS_FULL
@@ -1088,50 +1134,52 @@ extern "C" int Android_JNI_GetPowerInfo(int* plugged, int* charged, int* battery
         GET_INT_EXTRA(level, "level") // == BatteryManager.EXTRA_LEVEL (API 5)
         GET_INT_EXTRA(scale, "scale") // == BatteryManager.EXTRA_SCALE (API 5)
         if ((level == -1) || (scale == -1)) {
+            LocalReferenceHolder_Cleanup(&refs);
             return -1;
         }
         *percent = level * 100 / scale;
     }
 
-    env->DeleteLocalRef(intent);
+    (*env)->DeleteLocalRef(env, intent);
 
+    LocalReferenceHolder_Cleanup(&refs);
     return 0;
 }
 
 // sends message to be handled on the UI event dispatch thread
-extern "C" int Android_JNI_SendMessage(int command, int param)
+int Android_JNI_SendMessage(int command, int param)
 {
     JNIEnv *env = Android_JNI_GetEnv();
     if (!env) {
         return -1;
     }
-    jmethodID mid = env->GetStaticMethodID(mActivityClass, "sendMessage", "(II)Z");
+    jmethodID mid = (*env)->GetStaticMethodID(env, mActivityClass, "sendMessage", "(II)Z");
     if (!mid) {
         return -1;
     }
-    jboolean success = env->CallStaticBooleanMethod(mActivityClass, mid, command, param);
+    jboolean success = (*env)->CallStaticBooleanMethod(env, mActivityClass, mid, command, param);
     return success ? 0 : -1;
 }
 
-extern "C" void Android_JNI_ShowTextInput(SDL_Rect *inputRect)
+void Android_JNI_ShowTextInput(SDL_Rect *inputRect)
 {
     JNIEnv *env = Android_JNI_GetEnv();
     if (!env) {
         return;
     }
 
-    jmethodID mid = env->GetStaticMethodID(mActivityClass, "showTextInput", "(IIII)Z");
+    jmethodID mid = (*env)->GetStaticMethodID(env, mActivityClass, "showTextInput", "(IIII)Z");
     if (!mid) {
         return;
     }
-    env->CallStaticBooleanMethod( mActivityClass, mid,
+    (*env)->CallStaticBooleanMethod(env, mActivityClass, mid,
                                inputRect->x,
                                inputRect->y,
                                inputRect->w,
                                inputRect->h );
 }
 
-extern "C" void Android_JNI_HideTextInput()
+void Android_JNI_HideTextInput()
 {
     // has to match Activity constant
     const int COMMAND_TEXTEDIT_HIDE = 3;
@@ -1143,14 +1191,14 @@ extern "C" void Android_JNI_HideTextInput()
 // Functions exposed to SDL applications in SDL_system.h
 //
 
-extern "C" void *SDL_AndroidGetJNIEnv()
+void *SDL_AndroidGetJNIEnv()
 {
     return Android_JNI_GetEnv();
 }
 
 
 
-extern "C" void *SDL_AndroidGetActivity()
+void *SDL_AndroidGetActivity()
 {
     /* See SDL_system.h for caveats on using this function. */
 
@@ -1162,17 +1210,17 @@ extern "C" void *SDL_AndroidGetActivity()
     }
 
     // return SDLActivity.getContext();
-    mid = env->GetStaticMethodID(mActivityClass,
+    mid = (*env)->GetStaticMethodID(env, mActivityClass,
             "getContext","()Landroid/content/Context;");
-    return env->CallStaticObjectMethod(mActivityClass, mid);
+    return (*env)->CallStaticObjectMethod(env, mActivityClass, mid);
 }
 
-extern "C" const char * SDL_AndroidGetInternalStoragePath()
+const char * SDL_AndroidGetInternalStoragePath()
 {
     static char *s_AndroidInternalFilesPath = NULL;
 
     if (!s_AndroidInternalFilesPath) {
-        LocalReferenceHolder refs(__FUNCTION__);
+        struct LocalReferenceHolder refs = LocalReferenceHolder_Setup(__FUNCTION__);
         jmethodID mid;
         jobject context;
         jobject fileObject;
@@ -1180,39 +1228,43 @@ extern "C" const char * SDL_AndroidGetInternalStoragePath()
         const char *path;
 
         JNIEnv *env = Android_JNI_GetEnv();
-        if (!refs.init(env)) {
+        if (!LocalReferenceHolder_Init(&refs, env)) {
+            LocalReferenceHolder_Cleanup(&refs);
             return NULL;
         }
 
         // context = SDLActivity.getContext();
-        mid = env->GetStaticMethodID(mActivityClass,
+        mid = (*env)->GetStaticMethodID(env, mActivityClass,
                 "getContext","()Landroid/content/Context;");
-        context = env->CallStaticObjectMethod(mActivityClass, mid);
+        context = (*env)->CallStaticObjectMethod(env, mActivityClass, mid);
 
         // fileObj = context.getFilesDir();
-        mid = env->GetMethodID(env->GetObjectClass(context),
+        mid = (*env)->GetMethodID(env, (*env)->GetObjectClass(env, context),
                 "getFilesDir", "()Ljava/io/File;");
-        fileObject = env->CallObjectMethod(context, mid);
+        fileObject = (*env)->CallObjectMethod(env, context, mid);
         if (!fileObject) {
             SDL_SetError("Couldn't get internal directory");
+            LocalReferenceHolder_Cleanup(&refs);
             return NULL;
         }
 
         // path = fileObject.getAbsolutePath();
-        mid = env->GetMethodID(env->GetObjectClass(fileObject),
+        mid = (*env)->GetMethodID(env, (*env)->GetObjectClass(env, fileObject),
                 "getAbsolutePath", "()Ljava/lang/String;");
-        pathString = (jstring)env->CallObjectMethod(fileObject, mid);
+        pathString = (jstring)(*env)->CallObjectMethod(env, fileObject, mid);
 
-        path = env->GetStringUTFChars(pathString, NULL);
+        path = (*env)->GetStringUTFChars(env, pathString, NULL);
         s_AndroidInternalFilesPath = SDL_strdup(path);
-        env->ReleaseStringUTFChars(pathString, path);
+        (*env)->ReleaseStringUTFChars(env, pathString, path);
+
+        LocalReferenceHolder_Cleanup(&refs);
     }
     return s_AndroidInternalFilesPath;
 }
 
-extern "C" int SDL_AndroidGetExternalStorageState()
+int SDL_AndroidGetExternalStorageState()
 {
-    LocalReferenceHolder refs(__FUNCTION__);
+    struct LocalReferenceHolder refs = LocalReferenceHolder_Setup(__FUNCTION__);
     jmethodID mid;
     jclass cls;
     jstring stateString;
@@ -1220,16 +1272,17 @@ extern "C" int SDL_AndroidGetExternalStorageState()
     int stateFlags;
 
     JNIEnv *env = Android_JNI_GetEnv();
-    if (!refs.init(env)) {
+    if (!LocalReferenceHolder_Init(&refs, env)) {
+        LocalReferenceHolder_Cleanup(&refs);
         return 0;
     }
 
-    cls = env->FindClass("android/os/Environment");
-    mid = env->GetStaticMethodID(cls,
+    cls = (*env)->FindClass(env, "android/os/Environment");
+    mid = (*env)->GetStaticMethodID(env, cls,
             "getExternalStorageState", "()Ljava/lang/String;");
-    stateString = (jstring)env->CallStaticObjectMethod(cls, mid);
+    stateString = (jstring)(*env)->CallStaticObjectMethod(env, cls, mid);
 
-    state = env->GetStringUTFChars(stateString, NULL);
+    state = (*env)->GetStringUTFChars(env, stateString, NULL);
 
     // Print an info message so people debugging know the storage state
     __android_log_print(ANDROID_LOG_INFO, "SDL", "external storage state: %s", state);
@@ -1242,17 +1295,18 @@ extern "C" int SDL_AndroidGetExternalStorageState()
     } else {
         stateFlags = 0;
     }
-    env->ReleaseStringUTFChars(stateString, state);
+    (*env)->ReleaseStringUTFChars(env, stateString, state);
 
+    LocalReferenceHolder_Cleanup(&refs);
     return stateFlags;
 }
 
-extern "C" const char * SDL_AndroidGetExternalStoragePath()
+const char * SDL_AndroidGetExternalStoragePath()
 {
     static char *s_AndroidExternalFilesPath = NULL;
 
     if (!s_AndroidExternalFilesPath) {
-        LocalReferenceHolder refs(__FUNCTION__);
+        struct LocalReferenceHolder refs = LocalReferenceHolder_Setup(__FUNCTION__);
         jmethodID mid;
         jobject context;
         jobject fileObject;
@@ -1260,32 +1314,36 @@ extern "C" const char * SDL_AndroidGetExternalStoragePath()
         const char *path;
 
         JNIEnv *env = Android_JNI_GetEnv();
-        if (!refs.init(env)) {
+        if (!LocalReferenceHolder_Init(&refs, env)) {
+            LocalReferenceHolder_Cleanup(&refs);
             return NULL;
         }
 
         // context = SDLActivity.getContext();
-        mid = env->GetStaticMethodID(mActivityClass,
+        mid = (*env)->GetStaticMethodID(env, mActivityClass,
                 "getContext","()Landroid/content/Context;");
-        context = env->CallStaticObjectMethod(mActivityClass, mid);
+        context = (*env)->CallStaticObjectMethod(env, mActivityClass, mid);
 
         // fileObj = context.getExternalFilesDir();
-        mid = env->GetMethodID(env->GetObjectClass(context),
+        mid = (*env)->GetMethodID(env, (*env)->GetObjectClass(env, context),
                 "getExternalFilesDir", "(Ljava/lang/String;)Ljava/io/File;");
-        fileObject = env->CallObjectMethod(context, mid, NULL);
+        fileObject = (*env)->CallObjectMethod(env, context, mid, NULL);
         if (!fileObject) {
             SDL_SetError("Couldn't get external directory");
+            LocalReferenceHolder_Cleanup(&refs);
             return NULL;
         }
 
         // path = fileObject.getAbsolutePath();
-        mid = env->GetMethodID(env->GetObjectClass(fileObject),
+        mid = (*env)->GetMethodID(env, (*env)->GetObjectClass(env, fileObject),
                 "getAbsolutePath", "()Ljava/lang/String;");
-        pathString = (jstring)env->CallObjectMethod(fileObject, mid);
+        pathString = (jstring)(*env)->CallObjectMethod(env, fileObject, mid);
 
-        path = env->GetStringUTFChars(pathString, NULL);
+        path = (*env)->GetStringUTFChars(env, pathString, NULL);
         s_AndroidExternalFilesPath = SDL_strdup(path);
-        env->ReleaseStringUTFChars(pathString, path);
+        (*env)->ReleaseStringUTFChars(env, pathString, path);
+
+        LocalReferenceHolder_Cleanup(&refs);
     }
     return s_AndroidExternalFilesPath;
 }
diff --git a/src/main/android/SDL_android_main.cpp b/src/main/android/SDL_android_main.c
similarity index 85%
rename from src/main/android/SDL_android_main.cpp
rename to src/main/android/SDL_android_main.c
index 48e220f19..0622a12c4 100644
--- a/src/main/android/SDL_android_main.cpp
+++ b/src/main/android/SDL_android_main.c
@@ -12,10 +12,10 @@
 #include 
 
 // Called before SDL_main() to initialize JNI bindings in SDL library
-extern "C" void SDL_Android_Init(JNIEnv* env, jclass cls);
+extern void SDL_Android_Init(JNIEnv* env, jclass cls);
 
 // Start up the SDL app
-extern "C" void Java_org_libsdl_app_SDLActivity_nativeInit(JNIEnv* env, jclass cls, jobject obj)
+void Java_org_libsdl_app_SDLActivity_nativeInit(JNIEnv* env, jclass cls, jobject obj)
 {
     /* This interface could expand with ABI negotiation, calbacks, etc. */
     SDL_Android_Init(env, cls);

From 32188834b58ef8e634ecde351f39f0625930721a Mon Sep 17 00:00:00 2001
From: Sam Lantinga 
Date: Tue, 23 Jul 2013 08:06:49 -0700
Subject: [PATCH 413/542] Updated blend semantics so blending uses the
 following formula:     dstRGB = (srcRGB * srcA) + (dstRGB * (1-srcA))    
 dstA = srcA + (dstA * (1-srcA)) This allows proper compositing semantics
 without requiring premultiplied alpha.

Needs full unit test coverage and bug fixes!
---
 include/SDL_blendmode.h                 |  15 +-
 include/SDL_surface.h                   |  30 +-
 src/render/direct3d/SDL_render_d3d.c    |  27 +
 src/render/opengl/SDL_glfuncs.h         |   1 +
 src/render/opengl/SDL_render_gl.c       |   6 +-
 src/render/opengles/SDL_glesfuncs.h     |   1 +
 src/render/opengles/SDL_render_gles.c   |  23 +-
 src/render/opengles2/SDL_gles2funcs.h   |   2 +-
 src/render/opengles2/SDL_render_gles2.c |   6 +-
 src/video/SDL_blit.h                    |  20 +-
 src/video/SDL_blit_0.c                  |  28 +-
 src/video/SDL_blit_1.c                  |  52 +-
 src/video/SDL_blit_A.c                  | 959 ++----------------------
 src/video/SDL_blit_auto.c               |  72 ++
 src/video/sdlgenblit.pl                 |   3 +-
 test/testrendertarget.c                 | 108 ++-
 test/testsprite2.c                      |  10 +-
 17 files changed, 362 insertions(+), 1001 deletions(-)

diff --git a/include/SDL_blendmode.h b/include/SDL_blendmode.h
index 37c475aef..85aa47459 100644
--- a/include/SDL_blendmode.h
+++ b/include/SDL_blendmode.h
@@ -39,10 +39,17 @@ extern "C" {
  */
 typedef enum
 {
-    SDL_BLENDMODE_NONE = 0x00000000,     /**< No blending */
-    SDL_BLENDMODE_BLEND = 0x00000001,    /**< dst = (src * A) + (dst * (1-A)) */
-    SDL_BLENDMODE_ADD = 0x00000002,      /**< dst = (src * A) + dst */
-    SDL_BLENDMODE_MOD = 0x00000004       /**< dst = src * dst */
+    SDL_BLENDMODE_NONE = 0x00000000,     /**< no blending
+                                              dstRGBA = srcRGBA */
+    SDL_BLENDMODE_BLEND = 0x00000001,    /**< alpha blending
+                                              dstRGB = (srcRGB * srcA) + (dstRGB * (1-srcA))
+                                              dstA = srcA + (dstA * (1-srcA)) */
+    SDL_BLENDMODE_ADD = 0x00000002,      /**< additive blending
+                                              dstRGB = (srcRGB * srcA) + dstRGB
+                                              dstA = dstA */
+    SDL_BLENDMODE_MOD = 0x00000004       /**< color modulate
+                                              dstRGB = srcRGB * dstRGB
+                                              dstA = dstA */
 } SDL_BlendMode;
 
 /* Ends C function definitions when using C++ */
diff --git a/include/SDL_surface.h b/include/SDL_surface.h
index 76fcfde32..fece79743 100644
--- a/include/SDL_surface.h
+++ b/include/SDL_surface.h
@@ -399,44 +399,42 @@ extern DECLSPEC int SDLCALL SDL_FillRects
  *
  *  The blit function should not be called on a locked surface.
  *
- *  The blit semantics for surfaces with and without alpha and colorkey
+ *  The blit semantics for surfaces with and without blending and colorkey
  *  are defined as follows:
  *  \verbatim
     RGBA->RGB:
-      SDL_SRCALPHA set:
-        alpha-blend (using alpha-channel).
+      Source surface blend mode set to SDL_BLENDMODE_BLEND:
+        alpha-blend (using the source alpha-channel and per-surface alpha)
         SDL_SRCCOLORKEY ignored.
-      SDL_SRCALPHA not set:
+      Source surface blend mode set to SDL_BLENDMODE_NONE:
         copy RGB.
         if SDL_SRCCOLORKEY set, only copy the pixels matching the
         RGB values of the source color key, ignoring alpha in the
         comparison.
 
     RGB->RGBA:
-      SDL_SRCALPHA set:
-        alpha-blend (using the source per-surface alpha value);
-        set destination alpha to opaque.
-      SDL_SRCALPHA not set:
+      Source surface blend mode set to SDL_BLENDMODE_BLEND:
+        alpha-blend (using the source per-surface alpha)
+      Source surface blend mode set to SDL_BLENDMODE_NONE:
         copy RGB, set destination alpha to source per-surface alpha value.
       both:
         if SDL_SRCCOLORKEY set, only copy the pixels matching the
         source color key.
 
     RGBA->RGBA:
-      SDL_SRCALPHA set:
-        alpha-blend (using the source alpha channel) the RGB values;
-        leave destination alpha untouched. [Note: is this correct?]
+      Source surface blend mode set to SDL_BLENDMODE_BLEND:
+        alpha-blend (using the source alpha-channel and per-surface alpha)
         SDL_SRCCOLORKEY ignored.
-      SDL_SRCALPHA not set:
+      Source surface blend mode set to SDL_BLENDMODE_NONE:
         copy all of RGBA to the destination.
         if SDL_SRCCOLORKEY set, only copy the pixels matching the
         RGB values of the source color key, ignoring alpha in the
-       comparison.
+        comparison.
 
     RGB->RGB:
-      SDL_SRCALPHA set:
-        alpha-blend (using the source per-surface alpha value).
-      SDL_SRCALPHA not set:
+      Source surface blend mode set to SDL_BLENDMODE_BLEND:
+        alpha-blend (using the source per-surface alpha)
+      Source surface blend mode set to SDL_BLENDMODE_NONE:
         copy RGB.
       both:
         if SDL_SRCCOLORKEY set, only copy the pixels matching the
diff --git a/src/render/direct3d/SDL_render_d3d.c b/src/render/direct3d/SDL_render_d3d.c
index 7ace3eed5..1c3abc1d7 100644
--- a/src/render/direct3d/SDL_render_d3d.c
+++ b/src/render/direct3d/SDL_render_d3d.c
@@ -227,6 +227,7 @@ typedef struct
     D3DPRESENT_PARAMETERS pparams;
     SDL_bool updateSize;
     SDL_bool beginScene;
+    SDL_bool enableSeparateAlphaBlend;
     D3DTEXTUREFILTERTYPE scaleMode;
     IDirect3DSurface9 *defaultRenderTarget;
     IDirect3DSurface9 *currentRenderTarget;
@@ -615,6 +616,10 @@ D3D_CreateRenderer(SDL_Window * window, Uint32 flags)
         renderer->info.flags |= SDL_RENDERER_TARGETTEXTURE;
     }
 
+    if (caps.PrimitiveMiscCaps & D3DPMISCCAPS_SEPARATEALPHABLEND) {
+        data->enableSeparateAlphaBlend = SDL_TRUE;
+    }
+
     /* Set up parameters for rendering */
     IDirect3DDevice9_SetVertexShader(data->device, NULL);
     IDirect3DDevice9_SetFVF(data->device,
@@ -637,6 +642,10 @@ D3D_CreateRenderer(SDL_Window * window, Uint32 flags)
                                           D3DTA_TEXTURE);
     IDirect3DDevice9_SetTextureStageState(data->device, 0, D3DTSS_ALPHAARG2,
                                           D3DTA_DIFFUSE);
+    /* Enable separate alpha blend function, if possible */
+    if (data->enableSeparateAlphaBlend) {
+        IDirect3DDevice9_SetRenderState(data->device, D3DRS_SEPARATEALPHABLENDENABLE, TRUE);
+    }
     /* Disable second texture stage, since we're done */
     IDirect3DDevice9_SetTextureStageState(data->device, 1, D3DTSS_COLOROP,
                                           D3DTOP_DISABLE);
@@ -979,6 +988,12 @@ D3D_SetBlendMode(D3D_RenderData * data, int blendMode)
                                         D3DBLEND_SRCALPHA);
         IDirect3DDevice9_SetRenderState(data->device, D3DRS_DESTBLEND,
                                         D3DBLEND_INVSRCALPHA);
+        if (data->enableSeparateAlphaBlend) {
+            IDirect3DDevice9_SetRenderState(data->device, D3DRS_SRCBLENDALPHA,
+                                            D3DBLEND_ONE);
+            IDirect3DDevice9_SetRenderState(data->device, D3DRS_DESTBLENDALPHA,
+                                            D3DBLEND_INVSRCALPHA);
+        }
         break;
     case SDL_BLENDMODE_ADD:
         IDirect3DDevice9_SetRenderState(data->device, D3DRS_ALPHABLENDENABLE,
@@ -987,6 +1002,12 @@ D3D_SetBlendMode(D3D_RenderData * data, int blendMode)
                                         D3DBLEND_SRCALPHA);
         IDirect3DDevice9_SetRenderState(data->device, D3DRS_DESTBLEND,
                                         D3DBLEND_ONE);
+        if (data->enableSeparateAlphaBlend) {
+            IDirect3DDevice9_SetRenderState(data->device, D3DRS_SRCBLENDALPHA,
+                                            D3DBLEND_ZERO);
+            IDirect3DDevice9_SetRenderState(data->device, D3DRS_DESTBLENDALPHA,
+                                            D3DBLEND_ONE);
+        }
         break;
     case SDL_BLENDMODE_MOD:
         IDirect3DDevice9_SetRenderState(data->device, D3DRS_ALPHABLENDENABLE,
@@ -995,6 +1016,12 @@ D3D_SetBlendMode(D3D_RenderData * data, int blendMode)
                                         D3DBLEND_ZERO);
         IDirect3DDevice9_SetRenderState(data->device, D3DRS_DESTBLEND,
                                         D3DBLEND_SRCCOLOR);
+        if (data->enableSeparateAlphaBlend) {
+            IDirect3DDevice9_SetRenderState(data->device, D3DRS_SRCBLENDALPHA,
+                                            D3DBLEND_ZERO);
+            IDirect3DDevice9_SetRenderState(data->device, D3DRS_DESTBLENDALPHA,
+                                            D3DBLEND_ONE);
+        }
         break;
     }
 }
diff --git a/src/render/opengl/SDL_glfuncs.h b/src/render/opengl/SDL_glfuncs.h
index 1fff29717..7544929fc 100644
--- a/src/render/opengl/SDL_glfuncs.h
+++ b/src/render/opengl/SDL_glfuncs.h
@@ -15,6 +15,7 @@ SDL_PROC_UNUSED(void, glBitmap,
                 (GLsizei, GLsizei, GLfloat, GLfloat, GLfloat, GLfloat,
                  const GLubyte *))
 SDL_PROC(void, glBlendFunc, (GLenum, GLenum))
+SDL_PROC(void, glBlendFuncSeparate, (GLenum, GLenum, GLenum, GLenum))
 SDL_PROC_UNUSED(void, glCallList, (GLuint))
 SDL_PROC_UNUSED(void, glCallLists, (GLsizei, GLenum, const GLvoid *))
 SDL_PROC(void, glClear, (GLbitfield))
diff --git a/src/render/opengl/SDL_render_gl.c b/src/render/opengl/SDL_render_gl.c
index 4d0ef4aaa..0094d84ec 100644
--- a/src/render/opengl/SDL_render_gl.c
+++ b/src/render/opengl/SDL_render_gl.c
@@ -924,17 +924,17 @@ GL_SetBlendMode(GL_RenderData * data, int blendMode)
         case SDL_BLENDMODE_BLEND:
             data->glTexEnvf(GL_TEXTURE_ENV, GL_TEXTURE_ENV_MODE, GL_MODULATE);
             data->glEnable(GL_BLEND);
-            data->glBlendFunc(GL_SRC_ALPHA, GL_ONE_MINUS_SRC_ALPHA);
+            data->glBlendFuncSeparate(GL_SRC_ALPHA, GL_ONE_MINUS_SRC_ALPHA, GL_ONE, GL_ONE_MINUS_SRC_ALPHA);
             break;
         case SDL_BLENDMODE_ADD:
             data->glTexEnvf(GL_TEXTURE_ENV, GL_TEXTURE_ENV_MODE, GL_MODULATE);
             data->glEnable(GL_BLEND);
-            data->glBlendFunc(GL_SRC_ALPHA, GL_ONE);
+            data->glBlendFuncSeparate(GL_SRC_ALPHA, GL_ONE, GL_ZERO, GL_ONE);
             break;
         case SDL_BLENDMODE_MOD:
             data->glTexEnvf(GL_TEXTURE_ENV, GL_TEXTURE_ENV_MODE, GL_MODULATE);
             data->glEnable(GL_BLEND);
-            data->glBlendFunc(GL_ZERO, GL_SRC_COLOR);
+            data->glBlendFuncSeparate(GL_ZERO, GL_SRC_COLOR, GL_ZERO, GL_ONE);
             break;
         }
         data->current.blendMode = blendMode;
diff --git a/src/render/opengles/SDL_glesfuncs.h b/src/render/opengles/SDL_glesfuncs.h
index 36f6fe7b6..4a6384da6 100644
--- a/src/render/opengles/SDL_glesfuncs.h
+++ b/src/render/opengles/SDL_glesfuncs.h
@@ -1,5 +1,6 @@
 SDL_PROC(void, glBindTexture, (GLenum, GLuint))
 SDL_PROC(void, glBlendFunc, (GLenum, GLenum))
+SDL_PROC(void, glBlendFuncSeparateOES, (GLenum, GLenum, GLenum, GLenum))
 SDL_PROC(void, glClear, (GLbitfield))
 SDL_PROC(void, glClearColor, (GLclampf, GLclampf, GLclampf, GLclampf))
 SDL_PROC(void, glColor4f, (GLfloat, GLfloat, GLfloat, GLfloat))
diff --git a/src/render/opengles/SDL_render_gles.c b/src/render/opengles/SDL_render_gles.c
index 0ec21da07..cbbdd0da3 100644
--- a/src/render/opengles/SDL_render_gles.c
+++ b/src/render/opengles/SDL_render_gles.c
@@ -121,6 +121,7 @@ typedef struct
 
     SDL_bool useDrawTexture;
     SDL_bool GL_OES_draw_texture_supported;
+    SDL_bool GL_OES_blend_func_separate_supported;
 } GLES_RenderData;
 
 typedef struct
@@ -376,6 +377,10 @@ GLES_CreateRenderer(SDL_Window * window, Uint32 flags)
     }
     data->framebuffers = NULL;
 
+    if (SDL_GL_ExtensionSupported("GL_OES_blend_func_separate")) {
+        data->GL_OES_blend_func_separate_supported = SDL_TRUE;
+    }
+
     /* Set up parameters for rendering */
     GLES_ResetState(renderer);
 
@@ -680,17 +685,29 @@ GLES_SetBlendMode(GLES_RenderData * data, int blendMode)
         case SDL_BLENDMODE_BLEND:
             data->glTexEnvf(GL_TEXTURE_ENV, GL_TEXTURE_ENV_MODE, GL_MODULATE);
             data->glEnable(GL_BLEND);
-            data->glBlendFunc(GL_SRC_ALPHA, GL_ONE_MINUS_SRC_ALPHA);
+            if (data->GL_OES_blend_func_separate_supported) {
+                data->glBlendFuncSeparateOES(GL_SRC_ALPHA, GL_ONE_MINUS_SRC_ALPHA, GL_ONE, GL_ONE_MINUS_SRC_ALPHA);
+            } else {
+                data->glBlendFunc(GL_SRC_ALPHA, GL_ONE_MINUS_SRC_ALPHA);
+            }
             break;
         case SDL_BLENDMODE_ADD:
             data->glTexEnvf(GL_TEXTURE_ENV, GL_TEXTURE_ENV_MODE, GL_MODULATE);
             data->glEnable(GL_BLEND);
-            data->glBlendFunc(GL_SRC_ALPHA, GL_ONE);
+            if (data->GL_OES_blend_func_separate_supported) {
+                data->glBlendFuncSeparateOES(GL_SRC_ALPHA, GL_ONE, GL_ZERO, GL_ONE);
+            } else {
+                data->glBlendFunc(GL_SRC_ALPHA, GL_ONE);
+            }
             break;
         case SDL_BLENDMODE_MOD:
             data->glTexEnvf(GL_TEXTURE_ENV, GL_TEXTURE_ENV_MODE, GL_MODULATE);
             data->glEnable(GL_BLEND);
-            data->glBlendFunc(GL_ZERO, GL_SRC_COLOR);
+            if (data->GL_OES_blend_func_separate_supported) {
+                data->glBlendFuncSeparateOES(GL_ZERO, GL_SRC_COLOR, GL_ZERO, GL_ONE);
+            } else {
+                data->glBlendFunc(GL_ZERO, GL_SRC_COLOR);
+            }
             break;
         }
         data->current.blendMode = blendMode;
diff --git a/src/render/opengles2/SDL_gles2funcs.h b/src/render/opengles2/SDL_gles2funcs.h
index d7cd1d515..b201bdfd1 100644
--- a/src/render/opengles2/SDL_gles2funcs.h
+++ b/src/render/opengles2/SDL_gles2funcs.h
@@ -2,7 +2,7 @@ SDL_PROC(void, glActiveTexture, (GLenum))
 SDL_PROC(void, glAttachShader, (GLuint, GLuint))
 SDL_PROC(void, glBindAttribLocation, (GLuint, GLuint, const char *))
 SDL_PROC(void, glBindTexture, (GLenum, GLuint))
-SDL_PROC(void, glBlendFunc, (GLenum, GLenum))
+SDL_PROC(void, glBlendFuncSeparate, (GLenum, GLenum, GLenum, GLenum))
 SDL_PROC(void, glClear, (GLbitfield))
 SDL_PROC(void, glClearColor, (GLclampf, GLclampf, GLclampf, GLclampf))
 SDL_PROC(void, glCompileShader, (GLuint))
diff --git a/src/render/opengles2/SDL_render_gles2.c b/src/render/opengles2/SDL_render_gles2.c
index fafc9da59..339579a78 100644
--- a/src/render/opengles2/SDL_render_gles2.c
+++ b/src/render/opengles2/SDL_render_gles2.c
@@ -994,15 +994,15 @@ GLES2_SetBlendMode(GLES2_DriverContext *rdata, int blendMode)
             break;
         case SDL_BLENDMODE_BLEND:
             rdata->glEnable(GL_BLEND);
-            rdata->glBlendFunc(GL_SRC_ALPHA, GL_ONE_MINUS_SRC_ALPHA);
+            rdata->glBlendFuncSeparate(GL_SRC_ALPHA, GL_ONE_MINUS_SRC_ALPHA, GL_ONE, GL_ONE_MINUS_SRC_ALPHA);
             break;
         case SDL_BLENDMODE_ADD:
             rdata->glEnable(GL_BLEND);
-            rdata->glBlendFunc(GL_SRC_ALPHA, GL_ONE);
+            rdata->glBlendFuncSeparate(GL_SRC_ALPHA, GL_ONE, GL_ZERO, GL_ONE);
             break;
         case SDL_BLENDMODE_MOD:
             rdata->glEnable(GL_BLEND);
-            rdata->glBlendFunc(GL_ZERO, GL_SRC_COLOR);
+            rdata->glBlendFuncSeparate(GL_ZERO, GL_SRC_COLOR, GL_ZERO, GL_ONE);
             break;
         }
         rdata->current.blendMode = blendMode;
diff --git a/src/video/SDL_blit.h b/src/video/SDL_blit.h
index 413483496..3e05bafd9 100644
--- a/src/video/SDL_blit.h
+++ b/src/video/SDL_blit.h
@@ -440,12 +440,22 @@ do {                                                                    \
     }                                                                   \
 }
 
-/* Blend the RGB values of two Pixels based on a source alpha value */
-#define ALPHA_BLEND(sR, sG, sB, A, dR, dG, dB)                          \
+/* Blend the RGB values of two pixels with an alpha value */
+#define ALPHA_BLEND_RGB(sR, sG, sB, A, dR, dG, dB)                      \
 do {                                                                    \
-    dR = ((((int)(sR-dR)*(int)A)/255)+dR);                              \
-    dG = ((((int)(sG-dG)*(int)A)/255)+dG);                              \
-    dB = ((((int)(sB-dB)*(int)A)/255)+dB);                              \
+    dR = ((((unsigned)(sR-dR)*(unsigned)A)/255)+dR);                    \
+    dG = ((((unsigned)(sG-dG)*(unsigned)A)/255)+dG);                    \
+    dB = ((((unsigned)(sB-dB)*(unsigned)A)/255)+dB);                    \
+} while(0)
+
+
+/* Blend the RGBA values of two pixels */
+#define ALPHA_BLEND_RGBA(sR, sG, sB, sA, dR, dG, dB, dA)                \
+do {                                                                    \
+    dR = ((((unsigned)(sR-dR)*(unsigned)sA)/255)+dR);                   \
+    dG = ((((unsigned)(sG-dG)*(unsigned)sA)/255)+dG);                   \
+    dB = ((((unsigned)(sB-dB)*(unsigned)sA)/255)+dB);                   \
+    dA = ((unsigned)sA+(unsigned)dA-((unsigned)sA*dA)/255);             \
 } while(0)
 
 
diff --git a/src/video/SDL_blit_0.c b/src/video/SDL_blit_0.c
index 12cf8607b..ba709745e 100644
--- a/src/video/SDL_blit_0.c
+++ b/src/video/SDL_blit_0.c
@@ -363,7 +363,10 @@ BlitBtoNAlpha(SDL_BlitInfo * info)
     SDL_PixelFormat *dstfmt = info->dst_fmt;
     int dstbpp;
     int c;
-    const int A = info->a;
+    Uint32 pixel;
+    unsigned sR, sG, sB;
+    unsigned dR, dG, dB, dA;
+    const unsigned A = info->a;
 
     /* Set up some basic variables */
     dstbpp = dstfmt->BytesPerPixel;
@@ -377,15 +380,12 @@ BlitBtoNAlpha(SDL_BlitInfo * info)
             }
             bit = (byte & 0x80) >> 7;
             if (1) {
-                Uint32 pixel;
-                unsigned sR, sG, sB;
-                unsigned dR, dG, dB;
                 sR = srcpal[bit].r;
                 sG = srcpal[bit].g;
                 sB = srcpal[bit].b;
-                DISEMBLE_RGB(dst, dstbpp, dstfmt, pixel, dR, dG, dB);
-                ALPHA_BLEND(sR, sG, sB, A, dR, dG, dB);
-                ASSEMBLE_RGB(dst, dstbpp, dstfmt, dR, dG, dB);
+                DISEMBLE_RGBA(dst, dstbpp, dstfmt, pixel, dR, dG, dB, dA);
+                ALPHA_BLEND_RGBA(sR, sG, sB, A, dR, dG, dB, dA);
+                ASSEMBLE_RGBA(dst, dstbpp, dstfmt, dR, dG, dB, dA);
             }
             byte <<= 1;
             dst += dstbpp;
@@ -409,7 +409,10 @@ BlitBtoNAlphaKey(SDL_BlitInfo * info)
     const SDL_Color *srcpal = srcfmt->palette->colors;
     int dstbpp;
     int c;
-    const int A = info->a;
+    Uint32 pixel;
+    unsigned sR, sG, sB;
+    unsigned dR, dG, dB, dA;
+    const unsigned A = info->a;
     Uint32 ckey = info->colorkey;
 
     /* Set up some basic variables */
@@ -424,15 +427,12 @@ BlitBtoNAlphaKey(SDL_BlitInfo * info)
             }
             bit = (byte & 0x80) >> 7;
             if (bit != ckey) {
-                int sR, sG, sB;
-                int dR, dG, dB;
-                Uint32 pixel;
                 sR = srcpal[bit].r;
                 sG = srcpal[bit].g;
                 sB = srcpal[bit].b;
-                DISEMBLE_RGB(dst, dstbpp, dstfmt, pixel, dR, dG, dB);
-                ALPHA_BLEND(sR, sG, sB, A, dR, dG, dB);
-                ASSEMBLE_RGB(dst, dstbpp, dstfmt, dR, dG, dB);
+                DISEMBLE_RGBA(dst, dstbpp, dstfmt, pixel, dR, dG, dB, dA);
+                ALPHA_BLEND_RGBA(sR, sG, sB, A, dR, dG, dB, dA);
+                ASSEMBLE_RGBA(dst, dstbpp, dstfmt, dR, dG, dB, dA);
             }
             byte <<= 1;
             dst += dstbpp;
diff --git a/src/video/SDL_blit_1.c b/src/video/SDL_blit_1.c
index 514edab01..67503e879 100644
--- a/src/video/SDL_blit_1.c
+++ b/src/video/SDL_blit_1.c
@@ -437,30 +437,29 @@ Blit1toNAlpha(SDL_BlitInfo * info)
     SDL_PixelFormat *dstfmt = info->dst_fmt;
     const SDL_Color *srcpal = info->src_fmt->palette->colors;
     int dstbpp;
-    const int A = info->a;
+    Uint32 pixel;
+    unsigned sR, sG, sB;
+    unsigned dR, dG, dB, dA;
+    const unsigned A = info->a;
 
     /* Set up some basic variables */
     dstbpp = dstfmt->BytesPerPixel;
 
     while (height--) {
-        int sR, sG, sB;
-        int dR, dG, dB;
-	    	/* *INDENT-OFF* */
-	    	DUFFS_LOOP4(
-			{
-			        Uint32 pixel;
-				sR = srcpal[*src].r;
-				sG = srcpal[*src].g;
-				sB = srcpal[*src].b;
-				DISEMBLE_RGB(dst, dstbpp, dstfmt,
-					     pixel, dR, dG, dB);
-				ALPHA_BLEND(sR, sG, sB, A, dR, dG, dB);
-			  	ASSEMBLE_RGB(dst, dstbpp, dstfmt, dR, dG, dB);
-				src++;
-				dst += dstbpp;
-			},
-			width);
-	    	/* *INDENT-ON* */
+        /* *INDENT-OFF* */
+        DUFFS_LOOP4(
+        {
+            sR = srcpal[*src].r;
+            sG = srcpal[*src].g;
+            sB = srcpal[*src].b;
+            DISEMBLE_RGBA(dst, dstbpp, dstfmt, pixel, dR, dG, dB, dA);
+            ALPHA_BLEND_RGBA(sR, sG, sB, A, dR, dG, dB, dA);
+            ASSEMBLE_RGBA(dst, dstbpp, dstfmt, dR, dG, dB, dA);
+            src++;
+            dst += dstbpp;
+        },
+        width);
+        /* *INDENT-ON* */
         src += srcskip;
         dst += dstskip;
     }
@@ -479,26 +478,25 @@ Blit1toNAlphaKey(SDL_BlitInfo * info)
     const SDL_Color *srcpal = info->src_fmt->palette->colors;
     Uint32 ckey = info->colorkey;
     int dstbpp;
-    const int A = info->a;
+    Uint32 pixel;
+    unsigned sR, sG, sB;
+    unsigned dR, dG, dB, dA;
+    const unsigned A = info->a;
 
     /* Set up some basic variables */
     dstbpp = dstfmt->BytesPerPixel;
 
     while (height--) {
-        int sR, sG, sB;
-        int dR, dG, dB;
 		/* *INDENT-OFF* */
 		DUFFS_LOOP(
 		{
 			if ( *src != ckey ) {
-			        Uint32 pixel;
 				sR = srcpal[*src].r;
 				sG = srcpal[*src].g;
 				sB = srcpal[*src].b;
-				DISEMBLE_RGB(dst, dstbpp, dstfmt,
-							pixel, dR, dG, dB);
-				ALPHA_BLEND(sR, sG, sB, A, dR, dG, dB);
-			  	ASSEMBLE_RGB(dst, dstbpp, dstfmt, dR, dG, dB);
+				DISEMBLE_RGBA(dst, dstbpp, dstfmt, pixel, dR, dG, dB, dA);
+				ALPHA_BLEND_RGBA(sR, sG, sB, A, dR, dG, dB, dA);
+			  	ASSEMBLE_RGBA(dst, dstbpp, dstfmt, dR, dG, dB, dA);
 			}
 			src++;
 			dst += dstbpp;
diff --git a/src/video/SDL_blit_A.c b/src/video/SDL_blit_A.c
index 002a1af92..3fb89c061 100644
--- a/src/video/SDL_blit_A.c
+++ b/src/video/SDL_blit_A.c
@@ -39,37 +39,28 @@ BlitNto1SurfaceAlpha(SDL_BlitInfo * info)
     SDL_PixelFormat *srcfmt = info->src_fmt;
     SDL_PixelFormat *dstfmt = info->dst_fmt;
     int srcbpp = srcfmt->BytesPerPixel;
-
+    Uint32 Pixel;
+    unsigned sR, sG, sB;
+    unsigned dR, dG, dB;
     const unsigned A = info->a;
 
     while (height--) {
 	    /* *INDENT-OFF* */
 	    DUFFS_LOOP4(
 	    {
-		Uint32 Pixel;
-		unsigned sR;
-		unsigned sG;
-		unsigned sB;
-		unsigned dR;
-		unsigned dG;
-		unsigned dB;
 		DISEMBLE_RGB(src, srcbpp, srcfmt, Pixel, sR, sG, sB);
 		dR = dstfmt->palette->colors[*dst].r;
 		dG = dstfmt->palette->colors[*dst].g;
 		dB = dstfmt->palette->colors[*dst].b;
-		ALPHA_BLEND(sR, sG, sB, A, dR, dG, dB);
+		ALPHA_BLEND_RGB(sR, sG, sB, A, dR, dG, dB);
 		dR &= 0xff;
 		dG &= 0xff;
 		dB &= 0xff;
 		/* Pack RGB into 8bit pixel */
 		if ( palmap == NULL ) {
-		    *dst =((dR>>5)<<(3+2))|
-			  ((dG>>5)<<(2))|
-			  ((dB>>6)<<(0));
+		    *dst =((dR>>5)<<(3+2))|((dG>>5)<<(2))|((dB>>6)<<(0));
 		} else {
-		    *dst = palmap[((dR>>5)<<(3+2))|
-				  ((dG>>5)<<(2))  |
-				  ((dB>>6)<<(0))];
+		    *dst = palmap[((dR>>5)<<(3+2))|((dG>>5)<<(2))|((dB>>6)<<(0))];
 		}
 		dst++;
 		src += srcbpp;
@@ -95,36 +86,27 @@ BlitNto1PixelAlpha(SDL_BlitInfo * info)
     SDL_PixelFormat *srcfmt = info->src_fmt;
     SDL_PixelFormat *dstfmt = info->dst_fmt;
     int srcbpp = srcfmt->BytesPerPixel;
+    Uint32 Pixel;
+    unsigned sR, sG, sB, sA;
+    unsigned dR, dG, dB;
 
     while (height--) {
 	    /* *INDENT-OFF* */
 	    DUFFS_LOOP4(
 	    {
-		Uint32 Pixel;
-		unsigned sR;
-		unsigned sG;
-		unsigned sB;
-		unsigned sA;
-		unsigned dR;
-		unsigned dG;
-		unsigned dB;
 		DISEMBLE_RGBA(src,srcbpp,srcfmt,Pixel,sR,sG,sB,sA);
 		dR = dstfmt->palette->colors[*dst].r;
 		dG = dstfmt->palette->colors[*dst].g;
 		dB = dstfmt->palette->colors[*dst].b;
-		ALPHA_BLEND(sR, sG, sB, sA, dR, dG, dB);
+		ALPHA_BLEND_RGB(sR, sG, sB, sA, dR, dG, dB);
 		dR &= 0xff;
 		dG &= 0xff;
 		dB &= 0xff;
 		/* Pack RGB into 8bit pixel */
 		if ( palmap == NULL ) {
-		    *dst =((dR>>5)<<(3+2))|
-			  ((dG>>5)<<(2))|
-			  ((dB>>6)<<(0));
+		    *dst =((dR>>5)<<(3+2))|((dG>>5)<<(2))|((dB>>6)<<(0));
 		} else {
-		    *dst = palmap[((dR>>5)<<(3+2))|
-				  ((dG>>5)<<(2))  |
-				  ((dB>>6)<<(0))  ];
+		    *dst = palmap[((dR>>5)<<(3+2))|((dG>>5)<<(2))|((dB>>6)<<(0))];
 		}
 		dst++;
 		src += srcbpp;
@@ -151,38 +133,29 @@ BlitNto1SurfaceAlphaKey(SDL_BlitInfo * info)
     SDL_PixelFormat *dstfmt = info->dst_fmt;
     int srcbpp = srcfmt->BytesPerPixel;
     Uint32 ckey = info->colorkey;
-
-    const int A = info->a;
+    Uint32 Pixel;
+    unsigned sR, sG, sB;
+    unsigned dR, dG, dB;
+    const unsigned A = info->a;
 
     while (height--) {
 	    /* *INDENT-OFF* */
 	    DUFFS_LOOP(
 	    {
-		Uint32 Pixel;
-		unsigned sR;
-		unsigned sG;
-		unsigned sB;
-		unsigned dR;
-		unsigned dG;
-		unsigned dB;
 		DISEMBLE_RGB(src, srcbpp, srcfmt, Pixel, sR, sG, sB);
 		if ( Pixel != ckey ) {
 		    dR = dstfmt->palette->colors[*dst].r;
 		    dG = dstfmt->palette->colors[*dst].g;
 		    dB = dstfmt->palette->colors[*dst].b;
-		    ALPHA_BLEND(sR, sG, sB, A, dR, dG, dB);
+		    ALPHA_BLEND_RGB(sR, sG, sB, A, dR, dG, dB);
 		    dR &= 0xff;
 		    dG &= 0xff;
 		    dB &= 0xff;
 		    /* Pack RGB into 8bit pixel */
 		    if ( palmap == NULL ) {
-			*dst =((dR>>5)<<(3+2))|
-			      ((dG>>5)<<(2)) |
-			      ((dB>>6)<<(0));
+                *dst =((dR>>5)<<(3+2))|((dG>>5)<<(2))|((dB>>6)<<(0));
 		    } else {
-			*dst = palmap[((dR>>5)<<(3+2))|
-				      ((dG>>5)<<(2))  |
-				      ((dB>>6)<<(0))  ];
+                *dst = palmap[((dR>>5)<<(3+2))|((dG>>5)<<(2))|((dB>>6)<<(0))];
 		    }
 		}
 		dst++;
@@ -417,807 +390,6 @@ BlitRGBtoRGBPixelAlphaMMX(SDL_BlitInfo * info)
 
 #endif /* __MMX__ */
 
-#if SDL_ALTIVEC_BLITTERS
-#if __MWERKS__
-#pragma altivec_model on
-#endif
-#if HAVE_ALTIVEC_H
-#include 
-#endif
-
-#if (defined(__MACOSX__) && (__GNUC__ < 4))
-#define VECUINT8_LITERAL(a,b,c,d,e,f,g,h,i,j,k,l,m,n,o,p) \
-        (vector unsigned char) ( a,b,c,d,e,f,g,h,i,j,k,l,m,n,o,p )
-#define VECUINT16_LITERAL(a,b,c,d,e,f,g,h) \
-        (vector unsigned short) ( a,b,c,d,e,f,g,h )
-#else
-#define VECUINT8_LITERAL(a,b,c,d,e,f,g,h,i,j,k,l,m,n,o,p) \
-        (vector unsigned char) { a,b,c,d,e,f,g,h,i,j,k,l,m,n,o,p }
-#define VECUINT16_LITERAL(a,b,c,d,e,f,g,h) \
-        (vector unsigned short) { a,b,c,d,e,f,g,h }
-#endif
-
-#define UNALIGNED_PTR(x) (((size_t) x) & 0x0000000F)
-#define VECPRINT(msg, v) do { \
-    vector unsigned int tmpvec = (vector unsigned int)(v); \
-    unsigned int *vp = (unsigned int *)&tmpvec; \
-    printf("%s = %08X %08X %08X %08X\n", msg, vp[0], vp[1], vp[2], vp[3]); \
-} while (0)
-
-/* the permuation vector that takes the high bytes out of all the appropriate shorts 
-    (vector unsigned char)(
-        0x00, 0x10, 0x02, 0x12,
-        0x04, 0x14, 0x06, 0x16,
-        0x08, 0x18, 0x0A, 0x1A,
-        0x0C, 0x1C, 0x0E, 0x1E );
-*/
-#define VEC_MERGE_PERMUTE() (vec_add(vec_lvsl(0, (int*)NULL), (vector unsigned char)vec_splat_u16(0x0F)))
-#define VEC_U32_24() (vec_add(vec_splat_u32(12), vec_splat_u32(12)))
-#define VEC_ALPHA_MASK() ((vector unsigned char)vec_sl((vector unsigned int)vec_splat_s8(-1), VEC_U32_24()))
-#define VEC_ALIGNER(src) ((UNALIGNED_PTR(src)) \
-    ? vec_lvsl(0, src) \
-    : vec_add(vec_lvsl(8, src), vec_splat_u8(8)))
-
-
-#define VEC_MULTIPLY_ALPHA(vs, vd, valpha, mergePermute, v1_16, v8_16) do { \
-    /* vtemp1 contains source AAGGAAGGAAGGAAGG */ \
-    vector unsigned short vtemp1 = vec_mule(vs, valpha); \
-    /* vtemp2 contains source RRBBRRBBRRBBRRBB */ \
-    vector unsigned short vtemp2 = vec_mulo(vs, valpha); \
-    /* valpha2 is 255-alpha */ \
-    vector unsigned char valpha2 = vec_nor(valpha, valpha); \
-    /* vtemp3 contains dest AAGGAAGGAAGGAAGG */ \
-    vector unsigned short vtemp3 = vec_mule(vd, valpha2); \
-    /* vtemp4 contains dest RRBBRRBBRRBBRRBB */ \
-    vector unsigned short vtemp4 = vec_mulo(vd, valpha2); \
-    /* add source and dest */ \
-    vtemp1 = vec_add(vtemp1, vtemp3); \
-    vtemp2 = vec_add(vtemp2, vtemp4); \
-    /* vtemp1 = (vtemp1 + 1) + ((vtemp1 + 1) >> 8) */ \
-    vtemp1 = vec_add(vtemp1, v1_16); \
-    vtemp3 = vec_sr(vtemp1, v8_16); \
-    vtemp1 = vec_add(vtemp1, vtemp3); \
-    /* vtemp2 = (vtemp2 + 1) + ((vtemp2 + 1) >> 8) */ \
-    vtemp2 = vec_add(vtemp2, v1_16); \
-    vtemp4 = vec_sr(vtemp2, v8_16); \
-    vtemp2 = vec_add(vtemp2, vtemp4); \
-    /* (>>8) and get ARGBARGBARGBARGB */ \
-    vd = (vector unsigned char)vec_perm(vtemp1, vtemp2, mergePermute); \
-} while (0)
-
-/* Calculate the permute vector used for 32->32 swizzling */
-static vector unsigned char
-calc_swizzle32(const SDL_PixelFormat * srcfmt, const SDL_PixelFormat * dstfmt)
-{
-    /*
-     * We have to assume that the bits that aren't used by other
-     *  colors is alpha, and it's one complete byte, since some formats
-     *  leave alpha with a zero mask, but we should still swizzle the bits.
-     */
-    /* ARGB */
-    const static struct SDL_PixelFormat default_pixel_format = {
-        0, NULL, 0, 0,
-        {0, 0},
-        0x00FF0000, 0x0000FF00, 0x000000FF, 0xFF000000,
-        0, 0, 0, 0,
-        16, 8, 0, 24,
-        0, NULL
-    };
-    if (!srcfmt) {
-        srcfmt = &default_pixel_format;
-    }
-    if (!dstfmt) {
-        dstfmt = &default_pixel_format;
-    }
-    const vector unsigned char plus = VECUINT8_LITERAL(0x00, 0x00, 0x00, 0x00,
-                                                       0x04, 0x04, 0x04, 0x04,
-                                                       0x08, 0x08, 0x08, 0x08,
-                                                       0x0C, 0x0C, 0x0C,
-                                                       0x0C);
-    vector unsigned char vswiz;
-    vector unsigned int srcvec;
-#define RESHIFT(X) (3 - ((X) >> 3))
-    Uint32 rmask = RESHIFT(srcfmt->Rshift) << (dstfmt->Rshift);
-    Uint32 gmask = RESHIFT(srcfmt->Gshift) << (dstfmt->Gshift);
-    Uint32 bmask = RESHIFT(srcfmt->Bshift) << (dstfmt->Bshift);
-    Uint32 amask;
-    /* Use zero for alpha if either surface doesn't have alpha */
-    if (dstfmt->Amask) {
-        amask =
-            ((srcfmt->Amask) ? RESHIFT(srcfmt->
-                                       Ashift) : 0x10) << (dstfmt->Ashift);
-    } else {
-        amask =
-            0x10101010 & ((dstfmt->Rmask | dstfmt->Gmask | dstfmt->Bmask) ^
-                          0xFFFFFFFF);
-    }
-#undef RESHIFT
-    ((unsigned int *) (char *) &srcvec)[0] = (rmask | gmask | bmask | amask);
-    vswiz = vec_add(plus, (vector unsigned char) vec_splat(srcvec, 0));
-    return (vswiz);
-}
-
-static void
-Blit32to565PixelAlphaAltivec(SDL_BlitInfo * info)
-{
-    int height = info->dst_h;
-    Uint8 *src = (Uint8 *) info->src;
-    int srcskip = info->src_skip;
-    Uint8 *dst = (Uint8 *) info->dst;
-    int dstskip = info->dst_skip;
-    SDL_PixelFormat *srcfmt = info->src_fmt;
-
-    vector unsigned char v0 = vec_splat_u8(0);
-    vector unsigned short v8_16 = vec_splat_u16(8);
-    vector unsigned short v1_16 = vec_splat_u16(1);
-    vector unsigned short v2_16 = vec_splat_u16(2);
-    vector unsigned short v3_16 = vec_splat_u16(3);
-    vector unsigned int v8_32 = vec_splat_u32(8);
-    vector unsigned int v16_32 = vec_add(v8_32, v8_32);
-    vector unsigned short v3f =
-        VECUINT16_LITERAL(0x003f, 0x003f, 0x003f, 0x003f,
-                          0x003f, 0x003f, 0x003f, 0x003f);
-    vector unsigned short vfc =
-        VECUINT16_LITERAL(0x00fc, 0x00fc, 0x00fc, 0x00fc,
-                          0x00fc, 0x00fc, 0x00fc, 0x00fc);
-
-    /* 
-       0x10 - 0x1f is the alpha
-       0x00 - 0x0e evens are the red
-       0x01 - 0x0f odds are zero
-     */
-    vector unsigned char vredalpha1 = VECUINT8_LITERAL(0x10, 0x00, 0x01, 0x01,
-                                                       0x10, 0x02, 0x01, 0x01,
-                                                       0x10, 0x04, 0x01, 0x01,
-                                                       0x10, 0x06, 0x01,
-                                                       0x01);
-    vector unsigned char vredalpha2 =
-        (vector unsigned char) (vec_add((vector unsigned int) vredalpha1,
-                                        vec_sl(v8_32, v16_32))
-        );
-    /*
-       0x00 - 0x0f is ARxx ARxx ARxx ARxx
-       0x11 - 0x0f odds are blue
-     */
-    vector unsigned char vblue1 = VECUINT8_LITERAL(0x00, 0x01, 0x02, 0x11,
-                                                   0x04, 0x05, 0x06, 0x13,
-                                                   0x08, 0x09, 0x0a, 0x15,
-                                                   0x0c, 0x0d, 0x0e, 0x17);
-    vector unsigned char vblue2 =
-        (vector unsigned char) (vec_add((vector unsigned int) vblue1, v8_32)
-        );
-    /*
-       0x00 - 0x0f is ARxB ARxB ARxB ARxB
-       0x10 - 0x0e evens are green
-     */
-    vector unsigned char vgreen1 = VECUINT8_LITERAL(0x00, 0x01, 0x10, 0x03,
-                                                    0x04, 0x05, 0x12, 0x07,
-                                                    0x08, 0x09, 0x14, 0x0b,
-                                                    0x0c, 0x0d, 0x16, 0x0f);
-    vector unsigned char vgreen2 =
-        (vector unsigned
-         char) (vec_add((vector unsigned int) vgreen1, vec_sl(v8_32, v8_32))
-        );
-    vector unsigned char vgmerge = VECUINT8_LITERAL(0x00, 0x02, 0x00, 0x06,
-                                                    0x00, 0x0a, 0x00, 0x0e,
-                                                    0x00, 0x12, 0x00, 0x16,
-                                                    0x00, 0x1a, 0x00, 0x1e);
-    vector unsigned char mergePermute = VEC_MERGE_PERMUTE();
-    vector unsigned char vpermute = calc_swizzle32(srcfmt, NULL);
-    vector unsigned char valphaPermute =
-        vec_and(vec_lvsl(0, (int *) NULL), vec_splat_u8(0xC));
-
-    vector unsigned short vf800 = (vector unsigned short) vec_splat_u8(-7);
-    vf800 = vec_sl(vf800, vec_splat_u16(8));
-
-    while (height--) {
-        int extrawidth;
-        vector unsigned char valigner;
-        vector unsigned char vsrc;
-        vector unsigned char voverflow;
-        int width = info->dst_w;
-
-#define ONE_PIXEL_BLEND(condition, widthvar) \
-        while (condition) { \
-            Uint32 Pixel; \
-            unsigned sR, sG, sB, dR, dG, dB, sA; \
-            DISEMBLE_RGBA(src, 4, srcfmt, Pixel, sR, sG, sB, sA); \
-            if(sA) { \
-                unsigned short dstpixel = *((unsigned short *)dst); \
-                dR = (dstpixel >> 8) & 0xf8; \
-                dG = (dstpixel >> 3) & 0xfc; \
-                dB = (dstpixel << 3) & 0xf8; \
-                ALPHA_BLEND(sR, sG, sB, sA, dR, dG, dB); \
-                *((unsigned short *)dst) = ( \
-                    ((dR & 0xf8) << 8) | ((dG & 0xfc) << 3) | (dB >> 3) \
-                ); \
-            } \
-            src += 4; \
-            dst += 2; \
-            widthvar--; \
-        }
-        ONE_PIXEL_BLEND((UNALIGNED_PTR(dst)) && (width), width);
-        extrawidth = (width % 8);
-        valigner = VEC_ALIGNER(src);
-        vsrc = (vector unsigned char) vec_ld(0, src);
-        width -= extrawidth;
-        while (width) {
-            vector unsigned char valpha;
-            vector unsigned char vsrc1, vsrc2;
-            vector unsigned char vdst1, vdst2;
-            vector unsigned short vR, vG, vB;
-            vector unsigned short vpixel, vrpixel, vgpixel, vbpixel;
-
-            /* Load 8 pixels from src as ARGB */
-            voverflow = (vector unsigned char) vec_ld(15, src);
-            vsrc = vec_perm(vsrc, voverflow, valigner);
-            vsrc1 = vec_perm(vsrc, vsrc, vpermute);
-            src += 16;
-            vsrc = (vector unsigned char) vec_ld(15, src);
-            voverflow = vec_perm(voverflow, vsrc, valigner);
-            vsrc2 = vec_perm(voverflow, voverflow, vpermute);
-            src += 16;
-
-            /* Load 8 pixels from dst as XRGB */
-            voverflow = vec_ld(0, dst);
-            vR = vec_and((vector unsigned short) voverflow, vf800);
-            vB = vec_sl((vector unsigned short) voverflow, v3_16);
-            vG = vec_sl(vB, v2_16);
-            vdst1 =
-                (vector unsigned char) vec_perm((vector unsigned char) vR,
-                                                (vector unsigned char) vR,
-                                                vredalpha1);
-            vdst1 = vec_perm(vdst1, (vector unsigned char) vB, vblue1);
-            vdst1 = vec_perm(vdst1, (vector unsigned char) vG, vgreen1);
-            vdst2 =
-                (vector unsigned char) vec_perm((vector unsigned char) vR,
-                                                (vector unsigned char) vR,
-                                                vredalpha2);
-            vdst2 = vec_perm(vdst2, (vector unsigned char) vB, vblue2);
-            vdst2 = vec_perm(vdst2, (vector unsigned char) vG, vgreen2);
-
-            /* Alpha blend 8 pixels as ARGB */
-            valpha = vec_perm(vsrc1, v0, valphaPermute);
-            VEC_MULTIPLY_ALPHA(vsrc1, vdst1, valpha, mergePermute, v1_16,
-                               v8_16);
-            valpha = vec_perm(vsrc2, v0, valphaPermute);
-            VEC_MULTIPLY_ALPHA(vsrc2, vdst2, valpha, mergePermute, v1_16,
-                               v8_16);
-
-            /* Convert 8 pixels to 565 */
-            vpixel = (vector unsigned short) vec_packpx((vector unsigned int)
-                                                        vdst1,
-                                                        (vector unsigned int)
-                                                        vdst2);
-            vgpixel = (vector unsigned short) vec_perm(vdst1, vdst2, vgmerge);
-            vgpixel = vec_and(vgpixel, vfc);
-            vgpixel = vec_sl(vgpixel, v3_16);
-            vrpixel = vec_sl(vpixel, v1_16);
-            vrpixel = vec_and(vrpixel, vf800);
-            vbpixel = vec_and(vpixel, v3f);
-            vdst1 =
-                vec_or((vector unsigned char) vrpixel,
-                       (vector unsigned char) vgpixel);
-            vdst1 = vec_or(vdst1, (vector unsigned char) vbpixel);
-
-            /* Store 8 pixels */
-            vec_st(vdst1, 0, dst);
-
-            width -= 8;
-            dst += 16;
-        }
-        ONE_PIXEL_BLEND((extrawidth), extrawidth);
-#undef ONE_PIXEL_BLEND
-        src += srcskip;
-        dst += dstskip;
-    }
-}
-
-static void
-Blit32to32SurfaceAlphaKeyAltivec(SDL_BlitInfo * info)
-{
-    int height = info->dst_h;
-    Uint32 *srcp = (Uint32 *) info->src;
-    int srcskip = info->src_skip >> 2;
-    Uint32 *dstp = (Uint32 *) info->dst;
-    int dstskip = info->dst_skip >> 2;
-    SDL_PixelFormat *srcfmt = info->src_fmt;
-    SDL_PixelFormat *dstfmt = info->dst_fmt;
-    unsigned sA = info->a;
-    unsigned dA = dstfmt->Amask ? SDL_ALPHA_OPAQUE : 0;
-    Uint32 rgbmask = srcfmt->Rmask | srcfmt->Gmask | srcfmt->Bmask;
-    Uint32 ckey = info->colorkey;
-    vector unsigned char mergePermute;
-    vector unsigned char vsrcPermute;
-    vector unsigned char vdstPermute;
-    vector unsigned char vsdstPermute;
-    vector unsigned char valpha;
-    vector unsigned char valphamask;
-    vector unsigned char vbits;
-    vector unsigned char v0;
-    vector unsigned short v1;
-    vector unsigned short v8;
-    vector unsigned int vckey;
-    vector unsigned int vrgbmask;
-
-    mergePermute = VEC_MERGE_PERMUTE();
-    v0 = vec_splat_u8(0);
-    v1 = vec_splat_u16(1);
-    v8 = vec_splat_u16(8);
-
-    /* set the alpha to 255 on the destination surf */
-    valphamask = VEC_ALPHA_MASK();
-
-    vsrcPermute = calc_swizzle32(srcfmt, NULL);
-    vdstPermute = calc_swizzle32(NULL, dstfmt);
-    vsdstPermute = calc_swizzle32(dstfmt, NULL);
-
-    /* set a vector full of alpha and 255-alpha */
-    ((unsigned char *) &valpha)[0] = sA;
-    valpha = vec_splat(valpha, 0);
-    vbits = (vector unsigned char) vec_splat_s8(-1);
-
-    ckey &= rgbmask;
-    ((unsigned int *) (char *) &vckey)[0] = ckey;
-    vckey = vec_splat(vckey, 0);
-    ((unsigned int *) (char *) &vrgbmask)[0] = rgbmask;
-    vrgbmask = vec_splat(vrgbmask, 0);
-
-    while (height--) {
-        int width = info->dst_w;
-#define ONE_PIXEL_BLEND(condition, widthvar) \
-        while (condition) { \
-            Uint32 Pixel; \
-            unsigned sR, sG, sB, dR, dG, dB; \
-            RETRIEVE_RGB_PIXEL(((Uint8 *)srcp), 4, Pixel); \
-            if(sA && Pixel != ckey) { \
-                RGB_FROM_PIXEL(Pixel, srcfmt, sR, sG, sB); \
-                DISEMBLE_RGB(((Uint8 *)dstp), 4, dstfmt, Pixel, dR, dG, dB); \
-                ALPHA_BLEND(sR, sG, sB, sA, dR, dG, dB); \
-                ASSEMBLE_RGBA(((Uint8 *)dstp), 4, dstfmt, dR, dG, dB, dA); \
-            } \
-            dstp++; \
-            srcp++; \
-            widthvar--; \
-        }
-        ONE_PIXEL_BLEND((UNALIGNED_PTR(dstp)) && (width), width);
-        if (width > 0) {
-            int extrawidth = (width % 4);
-            vector unsigned char valigner = VEC_ALIGNER(srcp);
-            vector unsigned char vs = (vector unsigned char) vec_ld(0, srcp);
-            width -= extrawidth;
-            while (width) {
-                vector unsigned char vsel;
-                vector unsigned char voverflow;
-                vector unsigned char vd;
-                vector unsigned char vd_orig;
-
-                /* s = *srcp */
-                voverflow = (vector unsigned char) vec_ld(15, srcp);
-                vs = vec_perm(vs, voverflow, valigner);
-
-                /* vsel is set for items that match the key */
-                vsel =
-                    (vector unsigned char) vec_and((vector unsigned int) vs,
-                                                   vrgbmask);
-                vsel = (vector unsigned char) vec_cmpeq((vector unsigned int)
-                                                        vsel, vckey);
-
-                /* permute to source format */
-                vs = vec_perm(vs, valpha, vsrcPermute);
-
-                /* d = *dstp */
-                vd = (vector unsigned char) vec_ld(0, dstp);
-                vd_orig = vd = vec_perm(vd, v0, vsdstPermute);
-
-                VEC_MULTIPLY_ALPHA(vs, vd, valpha, mergePermute, v1, v8);
-
-                /* set the alpha channel to full on */
-                vd = vec_or(vd, valphamask);
-
-                /* mask out color key */
-                vd = vec_sel(vd, vd_orig, vsel);
-
-                /* permute to dest format */
-                vd = vec_perm(vd, vbits, vdstPermute);
-
-                /* *dstp = res */
-                vec_st((vector unsigned int) vd, 0, dstp);
-
-                srcp += 4;
-                dstp += 4;
-                width -= 4;
-                vs = voverflow;
-            }
-            ONE_PIXEL_BLEND((extrawidth), extrawidth);
-        }
-#undef ONE_PIXEL_BLEND
-
-        srcp += srcskip;
-        dstp += dstskip;
-    }
-}
-
-
-static void
-Blit32to32PixelAlphaAltivec(SDL_BlitInfo * info)
-{
-    int width = info->dst_w;
-    int height = info->dst_h;
-    Uint32 *srcp = (Uint32 *) info->src;
-    int srcskip = info->src_skip >> 2;
-    Uint32 *dstp = (Uint32 *) info->dst;
-    int dstskip = info->dst_skip >> 2;
-    SDL_PixelFormat *srcfmt = info->src_fmt;
-    SDL_PixelFormat *dstfmt = info->dst_fmt;
-    vector unsigned char mergePermute;
-    vector unsigned char valphaPermute;
-    vector unsigned char vsrcPermute;
-    vector unsigned char vdstPermute;
-    vector unsigned char vsdstPermute;
-    vector unsigned char valphamask;
-    vector unsigned char vpixelmask;
-    vector unsigned char v0;
-    vector unsigned short v1;
-    vector unsigned short v8;
-
-    v0 = vec_splat_u8(0);
-    v1 = vec_splat_u16(1);
-    v8 = vec_splat_u16(8);
-    mergePermute = VEC_MERGE_PERMUTE();
-    valphamask = VEC_ALPHA_MASK();
-    valphaPermute = vec_and(vec_lvsl(0, (int *) NULL), vec_splat_u8(0xC));
-    vpixelmask = vec_nor(valphamask, v0);
-    vsrcPermute = calc_swizzle32(srcfmt, NULL);
-    vdstPermute = calc_swizzle32(NULL, dstfmt);
-    vsdstPermute = calc_swizzle32(dstfmt, NULL);
-
-    while (height--) {
-        width = info->dst_w;
-#define ONE_PIXEL_BLEND(condition, widthvar) while ((condition)) { \
-            Uint32 Pixel; \
-            unsigned sR, sG, sB, dR, dG, dB, sA, dA; \
-            DISEMBLE_RGBA((Uint8 *)srcp, 4, srcfmt, Pixel, sR, sG, sB, sA); \
-            if(sA) { \
-              DISEMBLE_RGBA((Uint8 *)dstp, 4, dstfmt, Pixel, dR, dG, dB, dA); \
-              ALPHA_BLEND(sR, sG, sB, sA, dR, dG, dB); \
-              ASSEMBLE_RGBA((Uint8 *)dstp, 4, dstfmt, dR, dG, dB, dA); \
-            } \
-            ++srcp; \
-            ++dstp; \
-            widthvar--; \
-        }
-        ONE_PIXEL_BLEND((UNALIGNED_PTR(dstp)) && (width), width);
-        if (width > 0) {
-            /* vsrcPermute */
-            /* vdstPermute */
-            int extrawidth = (width % 4);
-            vector unsigned char valigner = VEC_ALIGNER(srcp);
-            vector unsigned char vs = (vector unsigned char) vec_ld(0, srcp);
-            width -= extrawidth;
-            while (width) {
-                vector unsigned char voverflow;
-                vector unsigned char vd;
-                vector unsigned char valpha;
-                vector unsigned char vdstalpha;
-                /* s = *srcp */
-                voverflow = (vector unsigned char) vec_ld(15, srcp);
-                vs = vec_perm(vs, voverflow, valigner);
-                vs = vec_perm(vs, v0, vsrcPermute);
-
-                valpha = vec_perm(vs, v0, valphaPermute);
-
-                /* d = *dstp */
-                vd = (vector unsigned char) vec_ld(0, dstp);
-                vd = vec_perm(vd, v0, vsdstPermute);
-                vdstalpha = vec_and(vd, valphamask);
-
-                VEC_MULTIPLY_ALPHA(vs, vd, valpha, mergePermute, v1, v8);
-
-                /* set the alpha to the dest alpha */
-                vd = vec_and(vd, vpixelmask);
-                vd = vec_or(vd, vdstalpha);
-                vd = vec_perm(vd, v0, vdstPermute);
-
-                /* *dstp = res */
-                vec_st((vector unsigned int) vd, 0, dstp);
-
-                srcp += 4;
-                dstp += 4;
-                width -= 4;
-                vs = voverflow;
-
-            }
-            ONE_PIXEL_BLEND((extrawidth), extrawidth);
-        }
-        srcp += srcskip;
-        dstp += dstskip;
-#undef ONE_PIXEL_BLEND
-    }
-}
-
-/* fast ARGB888->(A)RGB888 blending with pixel alpha */
-static void
-BlitRGBtoRGBPixelAlphaAltivec(SDL_BlitInfo * info)
-{
-    int width = info->dst_w;
-    int height = info->dst_h;
-    Uint32 *srcp = (Uint32 *) info->src;
-    int srcskip = info->src_skip >> 2;
-    Uint32 *dstp = (Uint32 *) info->dst;
-    int dstskip = info->dst_skip >> 2;
-    vector unsigned char mergePermute;
-    vector unsigned char valphaPermute;
-    vector unsigned char valphamask;
-    vector unsigned char vpixelmask;
-    vector unsigned char v0;
-    vector unsigned short v1;
-    vector unsigned short v8;
-    v0 = vec_splat_u8(0);
-    v1 = vec_splat_u16(1);
-    v8 = vec_splat_u16(8);
-    mergePermute = VEC_MERGE_PERMUTE();
-    valphamask = VEC_ALPHA_MASK();
-    valphaPermute = vec_and(vec_lvsl(0, (int *) NULL), vec_splat_u8(0xC));
-
-
-    vpixelmask = vec_nor(valphamask, v0);
-    while (height--) {
-        width = info->dst_w;
-#define ONE_PIXEL_BLEND(condition, widthvar) \
-        while ((condition)) { \
-            Uint32 dalpha; \
-            Uint32 d; \
-            Uint32 s1; \
-            Uint32 d1; \
-            Uint32 s = *srcp; \
-            Uint32 alpha = s >> 24; \
-            if(alpha) { \
-              if(alpha == SDL_ALPHA_OPAQUE) { \
-                *dstp = (s & 0x00ffffff) | (*dstp & 0xff000000); \
-              } else { \
-                d = *dstp; \
-                dalpha = d & 0xff000000; \
-                s1 = s & 0xff00ff; \
-                d1 = d & 0xff00ff; \
-                d1 = (d1 + ((s1 - d1) * alpha >> 8)) & 0xff00ff; \
-                s &= 0xff00; \
-                d &= 0xff00; \
-                d = (d + ((s - d) * alpha >> 8)) & 0xff00; \
-                *dstp = d1 | d | dalpha; \
-              } \
-            } \
-            ++srcp; \
-            ++dstp; \
-            widthvar--; \
-	    }
-        ONE_PIXEL_BLEND((UNALIGNED_PTR(dstp)) && (width), width);
-        if (width > 0) {
-            int extrawidth = (width % 4);
-            vector unsigned char valigner = VEC_ALIGNER(srcp);
-            vector unsigned char vs = (vector unsigned char) vec_ld(0, srcp);
-            width -= extrawidth;
-            while (width) {
-                vector unsigned char voverflow;
-                vector unsigned char vd;
-                vector unsigned char valpha;
-                vector unsigned char vdstalpha;
-                /* s = *srcp */
-                voverflow = (vector unsigned char) vec_ld(15, srcp);
-                vs = vec_perm(vs, voverflow, valigner);
-
-                valpha = vec_perm(vs, v0, valphaPermute);
-
-                /* d = *dstp */
-                vd = (vector unsigned char) vec_ld(0, dstp);
-                vdstalpha = vec_and(vd, valphamask);
-
-                VEC_MULTIPLY_ALPHA(vs, vd, valpha, mergePermute, v1, v8);
-
-                /* set the alpha to the dest alpha */
-                vd = vec_and(vd, vpixelmask);
-                vd = vec_or(vd, vdstalpha);
-
-                /* *dstp = res */
-                vec_st((vector unsigned int) vd, 0, dstp);
-
-                srcp += 4;
-                dstp += 4;
-                width -= 4;
-                vs = voverflow;
-            }
-            ONE_PIXEL_BLEND((extrawidth), extrawidth);
-        }
-        srcp += srcskip;
-        dstp += dstskip;
-    }
-#undef ONE_PIXEL_BLEND
-}
-
-static void
-Blit32to32SurfaceAlphaAltivec(SDL_BlitInfo * info)
-{
-    /* XXX : 6 */
-    int height = info->dst_h;
-    Uint32 *srcp = (Uint32 *) info->src;
-    int srcskip = info->src_skip >> 2;
-    Uint32 *dstp = (Uint32 *) info->dst;
-    int dstskip = info->dst_skip >> 2;
-    SDL_PixelFormat *srcfmt = info->src_fmt;
-    SDL_PixelFormat *dstfmt = info->dst_fmt;
-    unsigned sA = info->a;
-    unsigned dA = dstfmt->Amask ? SDL_ALPHA_OPAQUE : 0;
-    vector unsigned char mergePermute;
-    vector unsigned char vsrcPermute;
-    vector unsigned char vdstPermute;
-    vector unsigned char vsdstPermute;
-    vector unsigned char valpha;
-    vector unsigned char valphamask;
-    vector unsigned char vbits;
-    vector unsigned short v1;
-    vector unsigned short v8;
-
-    mergePermute = VEC_MERGE_PERMUTE();
-    v1 = vec_splat_u16(1);
-    v8 = vec_splat_u16(8);
-
-    /* set the alpha to 255 on the destination surf */
-    valphamask = VEC_ALPHA_MASK();
-
-    vsrcPermute = calc_swizzle32(srcfmt, NULL);
-    vdstPermute = calc_swizzle32(NULL, dstfmt);
-    vsdstPermute = calc_swizzle32(dstfmt, NULL);
-
-    /* set a vector full of alpha and 255-alpha */
-    ((unsigned char *) &valpha)[0] = sA;
-    valpha = vec_splat(valpha, 0);
-    vbits = (vector unsigned char) vec_splat_s8(-1);
-
-    while (height--) {
-        int width = info->dst_w;
-#define ONE_PIXEL_BLEND(condition, widthvar) while ((condition)) { \
-            Uint32 Pixel; \
-            unsigned sR, sG, sB, dR, dG, dB; \
-            DISEMBLE_RGB(((Uint8 *)srcp), 4, srcfmt, Pixel, sR, sG, sB); \
-            DISEMBLE_RGB(((Uint8 *)dstp), 4, dstfmt, Pixel, dR, dG, dB); \
-            ALPHA_BLEND(sR, sG, sB, sA, dR, dG, dB); \
-            ASSEMBLE_RGBA(((Uint8 *)dstp), 4, dstfmt, dR, dG, dB, dA); \
-            ++srcp; \
-            ++dstp; \
-            widthvar--; \
-        }
-        ONE_PIXEL_BLEND((UNALIGNED_PTR(dstp)) && (width), width);
-        if (width > 0) {
-            int extrawidth = (width % 4);
-            vector unsigned char valigner = VEC_ALIGNER(srcp);
-            vector unsigned char vs = (vector unsigned char) vec_ld(0, srcp);
-            width -= extrawidth;
-            while (width) {
-                vector unsigned char voverflow;
-                vector unsigned char vd;
-
-                /* s = *srcp */
-                voverflow = (vector unsigned char) vec_ld(15, srcp);
-                vs = vec_perm(vs, voverflow, valigner);
-                vs = vec_perm(vs, valpha, vsrcPermute);
-
-                /* d = *dstp */
-                vd = (vector unsigned char) vec_ld(0, dstp);
-                vd = vec_perm(vd, vd, vsdstPermute);
-
-                VEC_MULTIPLY_ALPHA(vs, vd, valpha, mergePermute, v1, v8);
-
-                /* set the alpha channel to full on */
-                vd = vec_or(vd, valphamask);
-                vd = vec_perm(vd, vbits, vdstPermute);
-
-                /* *dstp = res */
-                vec_st((vector unsigned int) vd, 0, dstp);
-
-                srcp += 4;
-                dstp += 4;
-                width -= 4;
-                vs = voverflow;
-            }
-            ONE_PIXEL_BLEND((extrawidth), extrawidth);
-        }
-#undef ONE_PIXEL_BLEND
-
-        srcp += srcskip;
-        dstp += dstskip;
-    }
-
-}
-
-
-/* fast RGB888->(A)RGB888 blending */
-static void
-BlitRGBtoRGBSurfaceAlphaAltivec(SDL_BlitInfo * info)
-{
-    unsigned alpha = info->a;
-    int height = info->dst_h;
-    Uint32 *srcp = (Uint32 *) info->src;
-    int srcskip = info->src_skip >> 2;
-    Uint32 *dstp = (Uint32 *) info->dst;
-    int dstskip = info->dst_skip >> 2;
-    vector unsigned char mergePermute;
-    vector unsigned char valpha;
-    vector unsigned char valphamask;
-    vector unsigned short v1;
-    vector unsigned short v8;
-
-    mergePermute = VEC_MERGE_PERMUTE();
-    v1 = vec_splat_u16(1);
-    v8 = vec_splat_u16(8);
-
-    /* set the alpha to 255 on the destination surf */
-    valphamask = VEC_ALPHA_MASK();
-
-    /* set a vector full of alpha and 255-alpha */
-    ((unsigned char *) &valpha)[0] = alpha;
-    valpha = vec_splat(valpha, 0);
-
-    while (height--) {
-        int width = info->dst_w;
-#define ONE_PIXEL_BLEND(condition, widthvar) while ((condition)) { \
-            Uint32 s = *srcp; \
-            Uint32 d = *dstp; \
-            Uint32 s1 = s & 0xff00ff; \
-            Uint32 d1 = d & 0xff00ff; \
-            d1 = (d1 + ((s1 - d1) * alpha >> 8)) \
-                 & 0xff00ff; \
-            s &= 0xff00; \
-            d &= 0xff00; \
-            d = (d + ((s - d) * alpha >> 8)) & 0xff00; \
-            *dstp = d1 | d | 0xff000000; \
-            ++srcp; \
-            ++dstp; \
-            widthvar--; \
-        }
-        ONE_PIXEL_BLEND((UNALIGNED_PTR(dstp)) && (width), width);
-        if (width > 0) {
-            int extrawidth = (width % 4);
-            vector unsigned char valigner = VEC_ALIGNER(srcp);
-            vector unsigned char vs = (vector unsigned char) vec_ld(0, srcp);
-            width -= extrawidth;
-            while (width) {
-                vector unsigned char voverflow;
-                vector unsigned char vd;
-
-                /* s = *srcp */
-                voverflow = (vector unsigned char) vec_ld(15, srcp);
-                vs = vec_perm(vs, voverflow, valigner);
-
-                /* d = *dstp */
-                vd = (vector unsigned char) vec_ld(0, dstp);
-
-                VEC_MULTIPLY_ALPHA(vs, vd, valpha, mergePermute, v1, v8);
-
-                /* set the alpha channel to full on */
-                vd = vec_or(vd, valphamask);
-
-                /* *dstp = res */
-                vec_st((vector unsigned int) vd, 0, dstp);
-
-                srcp += 4;
-                dstp += 4;
-                width -= 4;
-                vs = voverflow;
-            }
-            ONE_PIXEL_BLEND((extrawidth), extrawidth);
-        }
-#undef ONE_PIXEL_BLEND
-
-        srcp += srcskip;
-        dstp += dstskip;
-    }
-}
-
-#if __MWERKS__
-#pragma altivec_model off
-#endif
-#endif /* SDL_ALTIVEC_BLITTERS */
-
 /* fast RGB888->(A)RGB888 blending with surface alpha=128 special case */
 static void
 BlitRGBtoRGBSurfaceAlpha128(SDL_BlitInfo * info)
@@ -1984,24 +1156,19 @@ BlitNtoNSurfaceAlpha(SDL_BlitInfo * info)
     SDL_PixelFormat *dstfmt = info->dst_fmt;
     int srcbpp = srcfmt->BytesPerPixel;
     int dstbpp = dstfmt->BytesPerPixel;
-    unsigned sA = info->a;
-    unsigned dA = dstfmt->Amask ? SDL_ALPHA_OPAQUE : 0;
+    Uint32 Pixel;
+    unsigned sR, sG, sB;
+    unsigned dR, dG, dB, dA;
+    const unsigned sA = info->a;
 
     if (sA) {
         while (height--) {
 	    /* *INDENT-OFF* */
 	    DUFFS_LOOP4(
 	    {
-		Uint32 Pixel;
-		unsigned sR;
-		unsigned sG;
-		unsigned sB;
-		unsigned dR;
-		unsigned dG;
-		unsigned dB;
 		DISEMBLE_RGB(src, srcbpp, srcfmt, Pixel, sR, sG, sB);
-		DISEMBLE_RGB(dst, dstbpp, dstfmt, Pixel, dR, dG, dB);
-		ALPHA_BLEND(sR, sG, sB, sA, dR, dG, dB);
+		DISEMBLE_RGBA(dst, dstbpp, dstfmt, Pixel, dR, dG, dB, dA);
+		ALPHA_BLEND_RGBA(sR, sG, sB, sA, dR, dG, dB, dA);
 		ASSEMBLE_RGBA(dst, dstbpp, dstfmt, dR, dG, dB, dA);
 		src += srcbpp;
 		dst += dstbpp;
@@ -2029,25 +1196,20 @@ BlitNtoNSurfaceAlphaKey(SDL_BlitInfo * info)
     Uint32 ckey = info->colorkey;
     int srcbpp = srcfmt->BytesPerPixel;
     int dstbpp = dstfmt->BytesPerPixel;
-    unsigned sA = info->a;
-    unsigned dA = dstfmt->Amask ? SDL_ALPHA_OPAQUE : 0;
+    Uint32 Pixel;
+    unsigned sR, sG, sB;
+    unsigned dR, dG, dB, dA;
+    const unsigned sA = info->a;
 
     while (height--) {
 	    /* *INDENT-OFF* */
 	    DUFFS_LOOP4(
 	    {
-		Uint32 Pixel;
-		unsigned sR;
-		unsigned sG;
-		unsigned sB;
-		unsigned dR;
-		unsigned dG;
-		unsigned dB;
 		RETRIEVE_RGB_PIXEL(src, srcbpp, Pixel);
 		if(sA && Pixel != ckey) {
 		    RGB_FROM_PIXEL(Pixel, srcfmt, sR, sG, sB);
-		    DISEMBLE_RGB(dst, dstbpp, dstfmt, Pixel, dR, dG, dB);
-		    ALPHA_BLEND(sR, sG, sB, sA, dR, dG, dB);
+		    DISEMBLE_RGBA(dst, dstbpp, dstfmt, Pixel, dR, dG, dB, dA);
+		    ALPHA_BLEND_RGBA(sR, sG, sB, sA, dR, dG, dB, dA);
 		    ASSEMBLE_RGBA(dst, dstbpp, dstfmt, dR, dG, dB, dA);
 		}
 		src += srcbpp;
@@ -2072,9 +1234,11 @@ BlitNtoNPixelAlpha(SDL_BlitInfo * info)
     int dstskip = info->dst_skip;
     SDL_PixelFormat *srcfmt = info->src_fmt;
     SDL_PixelFormat *dstfmt = info->dst_fmt;
-
     int srcbpp;
     int dstbpp;
+    Uint32 Pixel;
+    unsigned sR, sG, sB, sA;
+    unsigned dR, dG, dB, dA;
 
     /* Set up some basic variables */
     srcbpp = srcfmt->BytesPerPixel;
@@ -2084,20 +1248,11 @@ BlitNtoNPixelAlpha(SDL_BlitInfo * info)
 	    /* *INDENT-OFF* */
 	    DUFFS_LOOP4(
 	    {
-		Uint32 Pixel;
-		unsigned sR;
-		unsigned sG;
-		unsigned sB;
-		unsigned dR;
-		unsigned dG;
-		unsigned dB;
-		unsigned sA;
-		unsigned dA;
 		DISEMBLE_RGBA(src, srcbpp, srcfmt, Pixel, sR, sG, sB, sA);
 		if(sA) {
-		  DISEMBLE_RGBA(dst, dstbpp, dstfmt, Pixel, dR, dG, dB, dA);
-		  ALPHA_BLEND(sR, sG, sB, sA, dR, dG, dB);
-		  ASSEMBLE_RGBA(dst, dstbpp, dstfmt, dR, dG, dB, dA);
+		    DISEMBLE_RGBA(dst, dstbpp, dstfmt, Pixel, dR, dG, dB, dA);
+		    ALPHA_BLEND_RGBA(sR, sG, sB, sA, dR, dG, dB, dA);
+		    ASSEMBLE_RGBA(dst, dstbpp, dstfmt, dR, dG, dB, dA);
 		}
 		src += srcbpp;
 		dst += dstbpp;
@@ -2124,13 +1279,6 @@ SDL_CalculateBlitA(SDL_Surface * surface)
             return BlitNto1PixelAlpha;
 
         case 2:
-#if SDL_ALTIVEC_BLITTERS
-            if (sf->BytesPerPixel == 4
-                && df->Gmask == 0x7e0 && df->Bmask == 0x1f
-                && SDL_HasAltiVec())
-                return Blit32to565PixelAlphaAltivec;
-            else
-#endif
                 if (sf->BytesPerPixel == 4 && sf->Amask == 0xff000000
                     && sf->Gmask == 0xff00
                     && ((sf->Rmask == 0xff && df->Rmask == 0x1f)
@@ -2162,19 +1310,10 @@ SDL_CalculateBlitA(SDL_Surface * surface)
                 }
 #endif /* __MMX__ || __3dNOW__ */
                 if (sf->Amask == 0xff000000) {
-#if SDL_ALTIVEC_BLITTERS
-                    if (SDL_HasAltiVec())
-                        return BlitRGBtoRGBPixelAlphaAltivec;
-#endif
                     return BlitRGBtoRGBPixelAlpha;
                 }
             }
-#if SDL_ALTIVEC_BLITTERS
-            if (sf->Amask && sf->BytesPerPixel == 4 && SDL_HasAltiVec())
-                return Blit32to32PixelAlphaAltivec;
-            else
-#endif
-                return BlitNtoNPixelAlpha;
+            return BlitNtoNPixelAlpha;
 
         case 3:
         default:
@@ -2220,19 +1359,10 @@ SDL_CalculateBlitA(SDL_Surface * surface)
                         return BlitRGBtoRGBSurfaceAlphaMMX;
 #endif
                     if ((sf->Rmask | sf->Gmask | sf->Bmask) == 0xffffff) {
-#if SDL_ALTIVEC_BLITTERS
-                        if (SDL_HasAltiVec())
-                            return BlitRGBtoRGBSurfaceAlphaAltivec;
-#endif
                         return BlitRGBtoRGBSurfaceAlpha;
                     }
                 }
-#if SDL_ALTIVEC_BLITTERS
-                if ((sf->BytesPerPixel == 4) && SDL_HasAltiVec())
-                    return Blit32to32SurfaceAlphaAltivec;
-                else
-#endif
-                    return BlitNtoNSurfaceAlpha;
+                return BlitNtoNSurfaceAlpha;
 
             case 3:
             default:
@@ -2243,16 +1373,11 @@ SDL_CalculateBlitA(SDL_Surface * surface)
 
     case SDL_COPY_COLORKEY | SDL_COPY_MODULATE_ALPHA | SDL_COPY_BLEND:
         if (sf->Amask == 0) {
-            if (df->BytesPerPixel == 1)
+            if (df->BytesPerPixel == 1) {
                 return BlitNto1SurfaceAlphaKey;
-            else
-#if SDL_ALTIVEC_BLITTERS
-            if (sf->BytesPerPixel == 4 && df->BytesPerPixel == 4 &&
-                    SDL_HasAltiVec())
-                return Blit32to32SurfaceAlphaKeyAltivec;
-            else
-#endif
+            } else {
                 return BlitNtoNSurfaceAlphaKey;
+            }
         }
         break;
     }
diff --git a/src/video/SDL_blit_auto.c b/src/video/SDL_blit_auto.c
index f6a5284f9..251c5fe80 100644
--- a/src/video/SDL_blit_auto.c
+++ b/src/video/SDL_blit_auto.c
@@ -95,6 +95,7 @@ static void SDL_Blit_RGB888_RGB888_Blend(SDL_BlitInfo *info)
                 dstR = srcR + ((255 - srcA) * dstR) / 255;
                 dstG = srcG + ((255 - srcA) * dstG) / 255;
                 dstB = srcB + ((255 - srcA) * dstB) / 255;
+                dstA = srcA + ((255 - srcA) * dstA) / 255;
                 break;
             case SDL_COPY_ADD:
                 dstR = srcR + dstR; if (dstR > 255) dstR = 255;
@@ -168,6 +169,7 @@ static void SDL_Blit_RGB888_RGB888_Blend_Scale(SDL_BlitInfo *info)
                 dstR = srcR + ((255 - srcA) * dstR) / 255;
                 dstG = srcG + ((255 - srcA) * dstG) / 255;
                 dstB = srcB + ((255 - srcA) * dstB) / 255;
+                dstA = srcA + ((255 - srcA) * dstA) / 255;
                 break;
             case SDL_COPY_ADD:
                 dstR = srcR + dstR; if (dstR > 255) dstR = 255;
@@ -323,6 +325,7 @@ static void SDL_Blit_RGB888_RGB888_Modulate_Blend(SDL_BlitInfo *info)
                 dstR = srcR + ((255 - srcA) * dstR) / 255;
                 dstG = srcG + ((255 - srcA) * dstG) / 255;
                 dstB = srcB + ((255 - srcA) * dstB) / 255;
+                dstA = srcA + ((255 - srcA) * dstA) / 255;
                 break;
             case SDL_COPY_ADD:
                 dstR = srcR + dstR; if (dstR > 255) dstR = 255;
@@ -408,6 +411,7 @@ static void SDL_Blit_RGB888_RGB888_Modulate_Blend_Scale(SDL_BlitInfo *info)
                 dstR = srcR + ((255 - srcA) * dstR) / 255;
                 dstG = srcG + ((255 - srcA) * dstG) / 255;
                 dstB = srcB + ((255 - srcA) * dstB) / 255;
+                dstA = srcA + ((255 - srcA) * dstA) / 255;
                 break;
             case SDL_COPY_ADD:
                 dstR = srcR + dstR; if (dstR > 255) dstR = 255;
@@ -503,6 +507,7 @@ static void SDL_Blit_RGB888_BGR888_Blend(SDL_BlitInfo *info)
                 dstR = srcR + ((255 - srcA) * dstR) / 255;
                 dstG = srcG + ((255 - srcA) * dstG) / 255;
                 dstB = srcB + ((255 - srcA) * dstB) / 255;
+                dstA = srcA + ((255 - srcA) * dstA) / 255;
                 break;
             case SDL_COPY_ADD:
                 dstR = srcR + dstR; if (dstR > 255) dstR = 255;
@@ -576,6 +581,7 @@ static void SDL_Blit_RGB888_BGR888_Blend_Scale(SDL_BlitInfo *info)
                 dstR = srcR + ((255 - srcA) * dstR) / 255;
                 dstG = srcG + ((255 - srcA) * dstG) / 255;
                 dstB = srcB + ((255 - srcA) * dstB) / 255;
+                dstA = srcA + ((255 - srcA) * dstA) / 255;
                 break;
             case SDL_COPY_ADD:
                 dstR = srcR + dstR; if (dstR > 255) dstR = 255;
@@ -731,6 +737,7 @@ static void SDL_Blit_RGB888_BGR888_Modulate_Blend(SDL_BlitInfo *info)
                 dstR = srcR + ((255 - srcA) * dstR) / 255;
                 dstG = srcG + ((255 - srcA) * dstG) / 255;
                 dstB = srcB + ((255 - srcA) * dstB) / 255;
+                dstA = srcA + ((255 - srcA) * dstA) / 255;
                 break;
             case SDL_COPY_ADD:
                 dstR = srcR + dstR; if (dstR > 255) dstR = 255;
@@ -816,6 +823,7 @@ static void SDL_Blit_RGB888_BGR888_Modulate_Blend_Scale(SDL_BlitInfo *info)
                 dstR = srcR + ((255 - srcA) * dstR) / 255;
                 dstG = srcG + ((255 - srcA) * dstG) / 255;
                 dstB = srcB + ((255 - srcA) * dstB) / 255;
+                dstA = srcA + ((255 - srcA) * dstA) / 255;
                 break;
             case SDL_COPY_ADD:
                 dstR = srcR + dstR; if (dstR > 255) dstR = 255;
@@ -911,6 +919,7 @@ static void SDL_Blit_RGB888_ARGB8888_Blend(SDL_BlitInfo *info)
                 dstR = srcR + ((255 - srcA) * dstR) / 255;
                 dstG = srcG + ((255 - srcA) * dstG) / 255;
                 dstB = srcB + ((255 - srcA) * dstB) / 255;
+                dstA = srcA + ((255 - srcA) * dstA) / 255;
                 break;
             case SDL_COPY_ADD:
                 dstR = srcR + dstR; if (dstR > 255) dstR = 255;
@@ -984,6 +993,7 @@ static void SDL_Blit_RGB888_ARGB8888_Blend_Scale(SDL_BlitInfo *info)
                 dstR = srcR + ((255 - srcA) * dstR) / 255;
                 dstG = srcG + ((255 - srcA) * dstG) / 255;
                 dstB = srcB + ((255 - srcA) * dstB) / 255;
+                dstA = srcA + ((255 - srcA) * dstA) / 255;
                 break;
             case SDL_COPY_ADD:
                 dstR = srcR + dstR; if (dstR > 255) dstR = 255;
@@ -1139,6 +1149,7 @@ static void SDL_Blit_RGB888_ARGB8888_Modulate_Blend(SDL_BlitInfo *info)
                 dstR = srcR + ((255 - srcA) * dstR) / 255;
                 dstG = srcG + ((255 - srcA) * dstG) / 255;
                 dstB = srcB + ((255 - srcA) * dstB) / 255;
+                dstA = srcA + ((255 - srcA) * dstA) / 255;
                 break;
             case SDL_COPY_ADD:
                 dstR = srcR + dstR; if (dstR > 255) dstR = 255;
@@ -1224,6 +1235,7 @@ static void SDL_Blit_RGB888_ARGB8888_Modulate_Blend_Scale(SDL_BlitInfo *info)
                 dstR = srcR + ((255 - srcA) * dstR) / 255;
                 dstG = srcG + ((255 - srcA) * dstG) / 255;
                 dstB = srcB + ((255 - srcA) * dstB) / 255;
+                dstA = srcA + ((255 - srcA) * dstA) / 255;
                 break;
             case SDL_COPY_ADD:
                 dstR = srcR + dstR; if (dstR > 255) dstR = 255;
@@ -1319,6 +1331,7 @@ static void SDL_Blit_BGR888_RGB888_Blend(SDL_BlitInfo *info)
                 dstR = srcR + ((255 - srcA) * dstR) / 255;
                 dstG = srcG + ((255 - srcA) * dstG) / 255;
                 dstB = srcB + ((255 - srcA) * dstB) / 255;
+                dstA = srcA + ((255 - srcA) * dstA) / 255;
                 break;
             case SDL_COPY_ADD:
                 dstR = srcR + dstR; if (dstR > 255) dstR = 255;
@@ -1392,6 +1405,7 @@ static void SDL_Blit_BGR888_RGB888_Blend_Scale(SDL_BlitInfo *info)
                 dstR = srcR + ((255 - srcA) * dstR) / 255;
                 dstG = srcG + ((255 - srcA) * dstG) / 255;
                 dstB = srcB + ((255 - srcA) * dstB) / 255;
+                dstA = srcA + ((255 - srcA) * dstA) / 255;
                 break;
             case SDL_COPY_ADD:
                 dstR = srcR + dstR; if (dstR > 255) dstR = 255;
@@ -1547,6 +1561,7 @@ static void SDL_Blit_BGR888_RGB888_Modulate_Blend(SDL_BlitInfo *info)
                 dstR = srcR + ((255 - srcA) * dstR) / 255;
                 dstG = srcG + ((255 - srcA) * dstG) / 255;
                 dstB = srcB + ((255 - srcA) * dstB) / 255;
+                dstA = srcA + ((255 - srcA) * dstA) / 255;
                 break;
             case SDL_COPY_ADD:
                 dstR = srcR + dstR; if (dstR > 255) dstR = 255;
@@ -1632,6 +1647,7 @@ static void SDL_Blit_BGR888_RGB888_Modulate_Blend_Scale(SDL_BlitInfo *info)
                 dstR = srcR + ((255 - srcA) * dstR) / 255;
                 dstG = srcG + ((255 - srcA) * dstG) / 255;
                 dstB = srcB + ((255 - srcA) * dstB) / 255;
+                dstA = srcA + ((255 - srcA) * dstA) / 255;
                 break;
             case SDL_COPY_ADD:
                 dstR = srcR + dstR; if (dstR > 255) dstR = 255;
@@ -1722,6 +1738,7 @@ static void SDL_Blit_BGR888_BGR888_Blend(SDL_BlitInfo *info)
                 dstR = srcR + ((255 - srcA) * dstR) / 255;
                 dstG = srcG + ((255 - srcA) * dstG) / 255;
                 dstB = srcB + ((255 - srcA) * dstB) / 255;
+                dstA = srcA + ((255 - srcA) * dstA) / 255;
                 break;
             case SDL_COPY_ADD:
                 dstR = srcR + dstR; if (dstR > 255) dstR = 255;
@@ -1795,6 +1812,7 @@ static void SDL_Blit_BGR888_BGR888_Blend_Scale(SDL_BlitInfo *info)
                 dstR = srcR + ((255 - srcA) * dstR) / 255;
                 dstG = srcG + ((255 - srcA) * dstG) / 255;
                 dstB = srcB + ((255 - srcA) * dstB) / 255;
+                dstA = srcA + ((255 - srcA) * dstA) / 255;
                 break;
             case SDL_COPY_ADD:
                 dstR = srcR + dstR; if (dstR > 255) dstR = 255;
@@ -1950,6 +1968,7 @@ static void SDL_Blit_BGR888_BGR888_Modulate_Blend(SDL_BlitInfo *info)
                 dstR = srcR + ((255 - srcA) * dstR) / 255;
                 dstG = srcG + ((255 - srcA) * dstG) / 255;
                 dstB = srcB + ((255 - srcA) * dstB) / 255;
+                dstA = srcA + ((255 - srcA) * dstA) / 255;
                 break;
             case SDL_COPY_ADD:
                 dstR = srcR + dstR; if (dstR > 255) dstR = 255;
@@ -2035,6 +2054,7 @@ static void SDL_Blit_BGR888_BGR888_Modulate_Blend_Scale(SDL_BlitInfo *info)
                 dstR = srcR + ((255 - srcA) * dstR) / 255;
                 dstG = srcG + ((255 - srcA) * dstG) / 255;
                 dstB = srcB + ((255 - srcA) * dstB) / 255;
+                dstA = srcA + ((255 - srcA) * dstA) / 255;
                 break;
             case SDL_COPY_ADD:
                 dstR = srcR + dstR; if (dstR > 255) dstR = 255;
@@ -2130,6 +2150,7 @@ static void SDL_Blit_BGR888_ARGB8888_Blend(SDL_BlitInfo *info)
                 dstR = srcR + ((255 - srcA) * dstR) / 255;
                 dstG = srcG + ((255 - srcA) * dstG) / 255;
                 dstB = srcB + ((255 - srcA) * dstB) / 255;
+                dstA = srcA + ((255 - srcA) * dstA) / 255;
                 break;
             case SDL_COPY_ADD:
                 dstR = srcR + dstR; if (dstR > 255) dstR = 255;
@@ -2203,6 +2224,7 @@ static void SDL_Blit_BGR888_ARGB8888_Blend_Scale(SDL_BlitInfo *info)
                 dstR = srcR + ((255 - srcA) * dstR) / 255;
                 dstG = srcG + ((255 - srcA) * dstG) / 255;
                 dstB = srcB + ((255 - srcA) * dstB) / 255;
+                dstA = srcA + ((255 - srcA) * dstA) / 255;
                 break;
             case SDL_COPY_ADD:
                 dstR = srcR + dstR; if (dstR > 255) dstR = 255;
@@ -2358,6 +2380,7 @@ static void SDL_Blit_BGR888_ARGB8888_Modulate_Blend(SDL_BlitInfo *info)
                 dstR = srcR + ((255 - srcA) * dstR) / 255;
                 dstG = srcG + ((255 - srcA) * dstG) / 255;
                 dstB = srcB + ((255 - srcA) * dstB) / 255;
+                dstA = srcA + ((255 - srcA) * dstA) / 255;
                 break;
             case SDL_COPY_ADD:
                 dstR = srcR + dstR; if (dstR > 255) dstR = 255;
@@ -2443,6 +2466,7 @@ static void SDL_Blit_BGR888_ARGB8888_Modulate_Blend_Scale(SDL_BlitInfo *info)
                 dstR = srcR + ((255 - srcA) * dstR) / 255;
                 dstG = srcG + ((255 - srcA) * dstG) / 255;
                 dstB = srcB + ((255 - srcA) * dstB) / 255;
+                dstA = srcA + ((255 - srcA) * dstA) / 255;
                 break;
             case SDL_COPY_ADD:
                 dstR = srcR + dstR; if (dstR > 255) dstR = 255;
@@ -2538,6 +2562,7 @@ static void SDL_Blit_ARGB8888_RGB888_Blend(SDL_BlitInfo *info)
                 dstR = srcR + ((255 - srcA) * dstR) / 255;
                 dstG = srcG + ((255 - srcA) * dstG) / 255;
                 dstB = srcB + ((255 - srcA) * dstB) / 255;
+                dstA = srcA + ((255 - srcA) * dstA) / 255;
                 break;
             case SDL_COPY_ADD:
                 dstR = srcR + dstR; if (dstR > 255) dstR = 255;
@@ -2611,6 +2636,7 @@ static void SDL_Blit_ARGB8888_RGB888_Blend_Scale(SDL_BlitInfo *info)
                 dstR = srcR + ((255 - srcA) * dstR) / 255;
                 dstG = srcG + ((255 - srcA) * dstG) / 255;
                 dstB = srcB + ((255 - srcA) * dstB) / 255;
+                dstA = srcA + ((255 - srcA) * dstA) / 255;
                 break;
             case SDL_COPY_ADD:
                 dstR = srcR + dstR; if (dstR > 255) dstR = 255;
@@ -2766,6 +2792,7 @@ static void SDL_Blit_ARGB8888_RGB888_Modulate_Blend(SDL_BlitInfo *info)
                 dstR = srcR + ((255 - srcA) * dstR) / 255;
                 dstG = srcG + ((255 - srcA) * dstG) / 255;
                 dstB = srcB + ((255 - srcA) * dstB) / 255;
+                dstA = srcA + ((255 - srcA) * dstA) / 255;
                 break;
             case SDL_COPY_ADD:
                 dstR = srcR + dstR; if (dstR > 255) dstR = 255;
@@ -2851,6 +2878,7 @@ static void SDL_Blit_ARGB8888_RGB888_Modulate_Blend_Scale(SDL_BlitInfo *info)
                 dstR = srcR + ((255 - srcA) * dstR) / 255;
                 dstG = srcG + ((255 - srcA) * dstG) / 255;
                 dstB = srcB + ((255 - srcA) * dstB) / 255;
+                dstA = srcA + ((255 - srcA) * dstA) / 255;
                 break;
             case SDL_COPY_ADD:
                 dstR = srcR + dstR; if (dstR > 255) dstR = 255;
@@ -2946,6 +2974,7 @@ static void SDL_Blit_ARGB8888_BGR888_Blend(SDL_BlitInfo *info)
                 dstR = srcR + ((255 - srcA) * dstR) / 255;
                 dstG = srcG + ((255 - srcA) * dstG) / 255;
                 dstB = srcB + ((255 - srcA) * dstB) / 255;
+                dstA = srcA + ((255 - srcA) * dstA) / 255;
                 break;
             case SDL_COPY_ADD:
                 dstR = srcR + dstR; if (dstR > 255) dstR = 255;
@@ -3019,6 +3048,7 @@ static void SDL_Blit_ARGB8888_BGR888_Blend_Scale(SDL_BlitInfo *info)
                 dstR = srcR + ((255 - srcA) * dstR) / 255;
                 dstG = srcG + ((255 - srcA) * dstG) / 255;
                 dstB = srcB + ((255 - srcA) * dstB) / 255;
+                dstA = srcA + ((255 - srcA) * dstA) / 255;
                 break;
             case SDL_COPY_ADD:
                 dstR = srcR + dstR; if (dstR > 255) dstR = 255;
@@ -3174,6 +3204,7 @@ static void SDL_Blit_ARGB8888_BGR888_Modulate_Blend(SDL_BlitInfo *info)
                 dstR = srcR + ((255 - srcA) * dstR) / 255;
                 dstG = srcG + ((255 - srcA) * dstG) / 255;
                 dstB = srcB + ((255 - srcA) * dstB) / 255;
+                dstA = srcA + ((255 - srcA) * dstA) / 255;
                 break;
             case SDL_COPY_ADD:
                 dstR = srcR + dstR; if (dstR > 255) dstR = 255;
@@ -3259,6 +3290,7 @@ static void SDL_Blit_ARGB8888_BGR888_Modulate_Blend_Scale(SDL_BlitInfo *info)
                 dstR = srcR + ((255 - srcA) * dstR) / 255;
                 dstG = srcG + ((255 - srcA) * dstG) / 255;
                 dstB = srcB + ((255 - srcA) * dstB) / 255;
+                dstA = srcA + ((255 - srcA) * dstA) / 255;
                 break;
             case SDL_COPY_ADD:
                 dstR = srcR + dstR; if (dstR > 255) dstR = 255;
@@ -3349,6 +3381,7 @@ static void SDL_Blit_ARGB8888_ARGB8888_Blend(SDL_BlitInfo *info)
                 dstR = srcR + ((255 - srcA) * dstR) / 255;
                 dstG = srcG + ((255 - srcA) * dstG) / 255;
                 dstB = srcB + ((255 - srcA) * dstB) / 255;
+                dstA = srcA + ((255 - srcA) * dstA) / 255;
                 break;
             case SDL_COPY_ADD:
                 dstR = srcR + dstR; if (dstR > 255) dstR = 255;
@@ -3422,6 +3455,7 @@ static void SDL_Blit_ARGB8888_ARGB8888_Blend_Scale(SDL_BlitInfo *info)
                 dstR = srcR + ((255 - srcA) * dstR) / 255;
                 dstG = srcG + ((255 - srcA) * dstG) / 255;
                 dstB = srcB + ((255 - srcA) * dstB) / 255;
+                dstA = srcA + ((255 - srcA) * dstA) / 255;
                 break;
             case SDL_COPY_ADD:
                 dstR = srcR + dstR; if (dstR > 255) dstR = 255;
@@ -3577,6 +3611,7 @@ static void SDL_Blit_ARGB8888_ARGB8888_Modulate_Blend(SDL_BlitInfo *info)
                 dstR = srcR + ((255 - srcA) * dstR) / 255;
                 dstG = srcG + ((255 - srcA) * dstG) / 255;
                 dstB = srcB + ((255 - srcA) * dstB) / 255;
+                dstA = srcA + ((255 - srcA) * dstA) / 255;
                 break;
             case SDL_COPY_ADD:
                 dstR = srcR + dstR; if (dstR > 255) dstR = 255;
@@ -3662,6 +3697,7 @@ static void SDL_Blit_ARGB8888_ARGB8888_Modulate_Blend_Scale(SDL_BlitInfo *info)
                 dstR = srcR + ((255 - srcA) * dstR) / 255;
                 dstG = srcG + ((255 - srcA) * dstG) / 255;
                 dstB = srcB + ((255 - srcA) * dstB) / 255;
+                dstA = srcA + ((255 - srcA) * dstA) / 255;
                 break;
             case SDL_COPY_ADD:
                 dstR = srcR + dstR; if (dstR > 255) dstR = 255;
@@ -3757,6 +3793,7 @@ static void SDL_Blit_RGBA8888_RGB888_Blend(SDL_BlitInfo *info)
                 dstR = srcR + ((255 - srcA) * dstR) / 255;
                 dstG = srcG + ((255 - srcA) * dstG) / 255;
                 dstB = srcB + ((255 - srcA) * dstB) / 255;
+                dstA = srcA + ((255 - srcA) * dstA) / 255;
                 break;
             case SDL_COPY_ADD:
                 dstR = srcR + dstR; if (dstR > 255) dstR = 255;
@@ -3830,6 +3867,7 @@ static void SDL_Blit_RGBA8888_RGB888_Blend_Scale(SDL_BlitInfo *info)
                 dstR = srcR + ((255 - srcA) * dstR) / 255;
                 dstG = srcG + ((255 - srcA) * dstG) / 255;
                 dstB = srcB + ((255 - srcA) * dstB) / 255;
+                dstA = srcA + ((255 - srcA) * dstA) / 255;
                 break;
             case SDL_COPY_ADD:
                 dstR = srcR + dstR; if (dstR > 255) dstR = 255;
@@ -3985,6 +4023,7 @@ static void SDL_Blit_RGBA8888_RGB888_Modulate_Blend(SDL_BlitInfo *info)
                 dstR = srcR + ((255 - srcA) * dstR) / 255;
                 dstG = srcG + ((255 - srcA) * dstG) / 255;
                 dstB = srcB + ((255 - srcA) * dstB) / 255;
+                dstA = srcA + ((255 - srcA) * dstA) / 255;
                 break;
             case SDL_COPY_ADD:
                 dstR = srcR + dstR; if (dstR > 255) dstR = 255;
@@ -4070,6 +4109,7 @@ static void SDL_Blit_RGBA8888_RGB888_Modulate_Blend_Scale(SDL_BlitInfo *info)
                 dstR = srcR + ((255 - srcA) * dstR) / 255;
                 dstG = srcG + ((255 - srcA) * dstG) / 255;
                 dstB = srcB + ((255 - srcA) * dstB) / 255;
+                dstA = srcA + ((255 - srcA) * dstA) / 255;
                 break;
             case SDL_COPY_ADD:
                 dstR = srcR + dstR; if (dstR > 255) dstR = 255;
@@ -4165,6 +4205,7 @@ static void SDL_Blit_RGBA8888_BGR888_Blend(SDL_BlitInfo *info)
                 dstR = srcR + ((255 - srcA) * dstR) / 255;
                 dstG = srcG + ((255 - srcA) * dstG) / 255;
                 dstB = srcB + ((255 - srcA) * dstB) / 255;
+                dstA = srcA + ((255 - srcA) * dstA) / 255;
                 break;
             case SDL_COPY_ADD:
                 dstR = srcR + dstR; if (dstR > 255) dstR = 255;
@@ -4238,6 +4279,7 @@ static void SDL_Blit_RGBA8888_BGR888_Blend_Scale(SDL_BlitInfo *info)
                 dstR = srcR + ((255 - srcA) * dstR) / 255;
                 dstG = srcG + ((255 - srcA) * dstG) / 255;
                 dstB = srcB + ((255 - srcA) * dstB) / 255;
+                dstA = srcA + ((255 - srcA) * dstA) / 255;
                 break;
             case SDL_COPY_ADD:
                 dstR = srcR + dstR; if (dstR > 255) dstR = 255;
@@ -4393,6 +4435,7 @@ static void SDL_Blit_RGBA8888_BGR888_Modulate_Blend(SDL_BlitInfo *info)
                 dstR = srcR + ((255 - srcA) * dstR) / 255;
                 dstG = srcG + ((255 - srcA) * dstG) / 255;
                 dstB = srcB + ((255 - srcA) * dstB) / 255;
+                dstA = srcA + ((255 - srcA) * dstA) / 255;
                 break;
             case SDL_COPY_ADD:
                 dstR = srcR + dstR; if (dstR > 255) dstR = 255;
@@ -4478,6 +4521,7 @@ static void SDL_Blit_RGBA8888_BGR888_Modulate_Blend_Scale(SDL_BlitInfo *info)
                 dstR = srcR + ((255 - srcA) * dstR) / 255;
                 dstG = srcG + ((255 - srcA) * dstG) / 255;
                 dstB = srcB + ((255 - srcA) * dstB) / 255;
+                dstA = srcA + ((255 - srcA) * dstA) / 255;
                 break;
             case SDL_COPY_ADD:
                 dstR = srcR + dstR; if (dstR > 255) dstR = 255;
@@ -4573,6 +4617,7 @@ static void SDL_Blit_RGBA8888_ARGB8888_Blend(SDL_BlitInfo *info)
                 dstR = srcR + ((255 - srcA) * dstR) / 255;
                 dstG = srcG + ((255 - srcA) * dstG) / 255;
                 dstB = srcB + ((255 - srcA) * dstB) / 255;
+                dstA = srcA + ((255 - srcA) * dstA) / 255;
                 break;
             case SDL_COPY_ADD:
                 dstR = srcR + dstR; if (dstR > 255) dstR = 255;
@@ -4646,6 +4691,7 @@ static void SDL_Blit_RGBA8888_ARGB8888_Blend_Scale(SDL_BlitInfo *info)
                 dstR = srcR + ((255 - srcA) * dstR) / 255;
                 dstG = srcG + ((255 - srcA) * dstG) / 255;
                 dstB = srcB + ((255 - srcA) * dstB) / 255;
+                dstA = srcA + ((255 - srcA) * dstA) / 255;
                 break;
             case SDL_COPY_ADD:
                 dstR = srcR + dstR; if (dstR > 255) dstR = 255;
@@ -4801,6 +4847,7 @@ static void SDL_Blit_RGBA8888_ARGB8888_Modulate_Blend(SDL_BlitInfo *info)
                 dstR = srcR + ((255 - srcA) * dstR) / 255;
                 dstG = srcG + ((255 - srcA) * dstG) / 255;
                 dstB = srcB + ((255 - srcA) * dstB) / 255;
+                dstA = srcA + ((255 - srcA) * dstA) / 255;
                 break;
             case SDL_COPY_ADD:
                 dstR = srcR + dstR; if (dstR > 255) dstR = 255;
@@ -4886,6 +4933,7 @@ static void SDL_Blit_RGBA8888_ARGB8888_Modulate_Blend_Scale(SDL_BlitInfo *info)
                 dstR = srcR + ((255 - srcA) * dstR) / 255;
                 dstG = srcG + ((255 - srcA) * dstG) / 255;
                 dstB = srcB + ((255 - srcA) * dstB) / 255;
+                dstA = srcA + ((255 - srcA) * dstA) / 255;
                 break;
             case SDL_COPY_ADD:
                 dstR = srcR + dstR; if (dstR > 255) dstR = 255;
@@ -4981,6 +5029,7 @@ static void SDL_Blit_ABGR8888_RGB888_Blend(SDL_BlitInfo *info)
                 dstR = srcR + ((255 - srcA) * dstR) / 255;
                 dstG = srcG + ((255 - srcA) * dstG) / 255;
                 dstB = srcB + ((255 - srcA) * dstB) / 255;
+                dstA = srcA + ((255 - srcA) * dstA) / 255;
                 break;
             case SDL_COPY_ADD:
                 dstR = srcR + dstR; if (dstR > 255) dstR = 255;
@@ -5054,6 +5103,7 @@ static void SDL_Blit_ABGR8888_RGB888_Blend_Scale(SDL_BlitInfo *info)
                 dstR = srcR + ((255 - srcA) * dstR) / 255;
                 dstG = srcG + ((255 - srcA) * dstG) / 255;
                 dstB = srcB + ((255 - srcA) * dstB) / 255;
+                dstA = srcA + ((255 - srcA) * dstA) / 255;
                 break;
             case SDL_COPY_ADD:
                 dstR = srcR + dstR; if (dstR > 255) dstR = 255;
@@ -5209,6 +5259,7 @@ static void SDL_Blit_ABGR8888_RGB888_Modulate_Blend(SDL_BlitInfo *info)
                 dstR = srcR + ((255 - srcA) * dstR) / 255;
                 dstG = srcG + ((255 - srcA) * dstG) / 255;
                 dstB = srcB + ((255 - srcA) * dstB) / 255;
+                dstA = srcA + ((255 - srcA) * dstA) / 255;
                 break;
             case SDL_COPY_ADD:
                 dstR = srcR + dstR; if (dstR > 255) dstR = 255;
@@ -5294,6 +5345,7 @@ static void SDL_Blit_ABGR8888_RGB888_Modulate_Blend_Scale(SDL_BlitInfo *info)
                 dstR = srcR + ((255 - srcA) * dstR) / 255;
                 dstG = srcG + ((255 - srcA) * dstG) / 255;
                 dstB = srcB + ((255 - srcA) * dstB) / 255;
+                dstA = srcA + ((255 - srcA) * dstA) / 255;
                 break;
             case SDL_COPY_ADD:
                 dstR = srcR + dstR; if (dstR > 255) dstR = 255;
@@ -5389,6 +5441,7 @@ static void SDL_Blit_ABGR8888_BGR888_Blend(SDL_BlitInfo *info)
                 dstR = srcR + ((255 - srcA) * dstR) / 255;
                 dstG = srcG + ((255 - srcA) * dstG) / 255;
                 dstB = srcB + ((255 - srcA) * dstB) / 255;
+                dstA = srcA + ((255 - srcA) * dstA) / 255;
                 break;
             case SDL_COPY_ADD:
                 dstR = srcR + dstR; if (dstR > 255) dstR = 255;
@@ -5462,6 +5515,7 @@ static void SDL_Blit_ABGR8888_BGR888_Blend_Scale(SDL_BlitInfo *info)
                 dstR = srcR + ((255 - srcA) * dstR) / 255;
                 dstG = srcG + ((255 - srcA) * dstG) / 255;
                 dstB = srcB + ((255 - srcA) * dstB) / 255;
+                dstA = srcA + ((255 - srcA) * dstA) / 255;
                 break;
             case SDL_COPY_ADD:
                 dstR = srcR + dstR; if (dstR > 255) dstR = 255;
@@ -5617,6 +5671,7 @@ static void SDL_Blit_ABGR8888_BGR888_Modulate_Blend(SDL_BlitInfo *info)
                 dstR = srcR + ((255 - srcA) * dstR) / 255;
                 dstG = srcG + ((255 - srcA) * dstG) / 255;
                 dstB = srcB + ((255 - srcA) * dstB) / 255;
+                dstA = srcA + ((255 - srcA) * dstA) / 255;
                 break;
             case SDL_COPY_ADD:
                 dstR = srcR + dstR; if (dstR > 255) dstR = 255;
@@ -5702,6 +5757,7 @@ static void SDL_Blit_ABGR8888_BGR888_Modulate_Blend_Scale(SDL_BlitInfo *info)
                 dstR = srcR + ((255 - srcA) * dstR) / 255;
                 dstG = srcG + ((255 - srcA) * dstG) / 255;
                 dstB = srcB + ((255 - srcA) * dstB) / 255;
+                dstA = srcA + ((255 - srcA) * dstA) / 255;
                 break;
             case SDL_COPY_ADD:
                 dstR = srcR + dstR; if (dstR > 255) dstR = 255;
@@ -5797,6 +5853,7 @@ static void SDL_Blit_ABGR8888_ARGB8888_Blend(SDL_BlitInfo *info)
                 dstR = srcR + ((255 - srcA) * dstR) / 255;
                 dstG = srcG + ((255 - srcA) * dstG) / 255;
                 dstB = srcB + ((255 - srcA) * dstB) / 255;
+                dstA = srcA + ((255 - srcA) * dstA) / 255;
                 break;
             case SDL_COPY_ADD:
                 dstR = srcR + dstR; if (dstR > 255) dstR = 255;
@@ -5870,6 +5927,7 @@ static void SDL_Blit_ABGR8888_ARGB8888_Blend_Scale(SDL_BlitInfo *info)
                 dstR = srcR + ((255 - srcA) * dstR) / 255;
                 dstG = srcG + ((255 - srcA) * dstG) / 255;
                 dstB = srcB + ((255 - srcA) * dstB) / 255;
+                dstA = srcA + ((255 - srcA) * dstA) / 255;
                 break;
             case SDL_COPY_ADD:
                 dstR = srcR + dstR; if (dstR > 255) dstR = 255;
@@ -6025,6 +6083,7 @@ static void SDL_Blit_ABGR8888_ARGB8888_Modulate_Blend(SDL_BlitInfo *info)
                 dstR = srcR + ((255 - srcA) * dstR) / 255;
                 dstG = srcG + ((255 - srcA) * dstG) / 255;
                 dstB = srcB + ((255 - srcA) * dstB) / 255;
+                dstA = srcA + ((255 - srcA) * dstA) / 255;
                 break;
             case SDL_COPY_ADD:
                 dstR = srcR + dstR; if (dstR > 255) dstR = 255;
@@ -6110,6 +6169,7 @@ static void SDL_Blit_ABGR8888_ARGB8888_Modulate_Blend_Scale(SDL_BlitInfo *info)
                 dstR = srcR + ((255 - srcA) * dstR) / 255;
                 dstG = srcG + ((255 - srcA) * dstG) / 255;
                 dstB = srcB + ((255 - srcA) * dstB) / 255;
+                dstA = srcA + ((255 - srcA) * dstA) / 255;
                 break;
             case SDL_COPY_ADD:
                 dstR = srcR + dstR; if (dstR > 255) dstR = 255;
@@ -6205,6 +6265,7 @@ static void SDL_Blit_BGRA8888_RGB888_Blend(SDL_BlitInfo *info)
                 dstR = srcR + ((255 - srcA) * dstR) / 255;
                 dstG = srcG + ((255 - srcA) * dstG) / 255;
                 dstB = srcB + ((255 - srcA) * dstB) / 255;
+                dstA = srcA + ((255 - srcA) * dstA) / 255;
                 break;
             case SDL_COPY_ADD:
                 dstR = srcR + dstR; if (dstR > 255) dstR = 255;
@@ -6278,6 +6339,7 @@ static void SDL_Blit_BGRA8888_RGB888_Blend_Scale(SDL_BlitInfo *info)
                 dstR = srcR + ((255 - srcA) * dstR) / 255;
                 dstG = srcG + ((255 - srcA) * dstG) / 255;
                 dstB = srcB + ((255 - srcA) * dstB) / 255;
+                dstA = srcA + ((255 - srcA) * dstA) / 255;
                 break;
             case SDL_COPY_ADD:
                 dstR = srcR + dstR; if (dstR > 255) dstR = 255;
@@ -6433,6 +6495,7 @@ static void SDL_Blit_BGRA8888_RGB888_Modulate_Blend(SDL_BlitInfo *info)
                 dstR = srcR + ((255 - srcA) * dstR) / 255;
                 dstG = srcG + ((255 - srcA) * dstG) / 255;
                 dstB = srcB + ((255 - srcA) * dstB) / 255;
+                dstA = srcA + ((255 - srcA) * dstA) / 255;
                 break;
             case SDL_COPY_ADD:
                 dstR = srcR + dstR; if (dstR > 255) dstR = 255;
@@ -6518,6 +6581,7 @@ static void SDL_Blit_BGRA8888_RGB888_Modulate_Blend_Scale(SDL_BlitInfo *info)
                 dstR = srcR + ((255 - srcA) * dstR) / 255;
                 dstG = srcG + ((255 - srcA) * dstG) / 255;
                 dstB = srcB + ((255 - srcA) * dstB) / 255;
+                dstA = srcA + ((255 - srcA) * dstA) / 255;
                 break;
             case SDL_COPY_ADD:
                 dstR = srcR + dstR; if (dstR > 255) dstR = 255;
@@ -6613,6 +6677,7 @@ static void SDL_Blit_BGRA8888_BGR888_Blend(SDL_BlitInfo *info)
                 dstR = srcR + ((255 - srcA) * dstR) / 255;
                 dstG = srcG + ((255 - srcA) * dstG) / 255;
                 dstB = srcB + ((255 - srcA) * dstB) / 255;
+                dstA = srcA + ((255 - srcA) * dstA) / 255;
                 break;
             case SDL_COPY_ADD:
                 dstR = srcR + dstR; if (dstR > 255) dstR = 255;
@@ -6686,6 +6751,7 @@ static void SDL_Blit_BGRA8888_BGR888_Blend_Scale(SDL_BlitInfo *info)
                 dstR = srcR + ((255 - srcA) * dstR) / 255;
                 dstG = srcG + ((255 - srcA) * dstG) / 255;
                 dstB = srcB + ((255 - srcA) * dstB) / 255;
+                dstA = srcA + ((255 - srcA) * dstA) / 255;
                 break;
             case SDL_COPY_ADD:
                 dstR = srcR + dstR; if (dstR > 255) dstR = 255;
@@ -6841,6 +6907,7 @@ static void SDL_Blit_BGRA8888_BGR888_Modulate_Blend(SDL_BlitInfo *info)
                 dstR = srcR + ((255 - srcA) * dstR) / 255;
                 dstG = srcG + ((255 - srcA) * dstG) / 255;
                 dstB = srcB + ((255 - srcA) * dstB) / 255;
+                dstA = srcA + ((255 - srcA) * dstA) / 255;
                 break;
             case SDL_COPY_ADD:
                 dstR = srcR + dstR; if (dstR > 255) dstR = 255;
@@ -6926,6 +6993,7 @@ static void SDL_Blit_BGRA8888_BGR888_Modulate_Blend_Scale(SDL_BlitInfo *info)
                 dstR = srcR + ((255 - srcA) * dstR) / 255;
                 dstG = srcG + ((255 - srcA) * dstG) / 255;
                 dstB = srcB + ((255 - srcA) * dstB) / 255;
+                dstA = srcA + ((255 - srcA) * dstA) / 255;
                 break;
             case SDL_COPY_ADD:
                 dstR = srcR + dstR; if (dstR > 255) dstR = 255;
@@ -7021,6 +7089,7 @@ static void SDL_Blit_BGRA8888_ARGB8888_Blend(SDL_BlitInfo *info)
                 dstR = srcR + ((255 - srcA) * dstR) / 255;
                 dstG = srcG + ((255 - srcA) * dstG) / 255;
                 dstB = srcB + ((255 - srcA) * dstB) / 255;
+                dstA = srcA + ((255 - srcA) * dstA) / 255;
                 break;
             case SDL_COPY_ADD:
                 dstR = srcR + dstR; if (dstR > 255) dstR = 255;
@@ -7094,6 +7163,7 @@ static void SDL_Blit_BGRA8888_ARGB8888_Blend_Scale(SDL_BlitInfo *info)
                 dstR = srcR + ((255 - srcA) * dstR) / 255;
                 dstG = srcG + ((255 - srcA) * dstG) / 255;
                 dstB = srcB + ((255 - srcA) * dstB) / 255;
+                dstA = srcA + ((255 - srcA) * dstA) / 255;
                 break;
             case SDL_COPY_ADD:
                 dstR = srcR + dstR; if (dstR > 255) dstR = 255;
@@ -7249,6 +7319,7 @@ static void SDL_Blit_BGRA8888_ARGB8888_Modulate_Blend(SDL_BlitInfo *info)
                 dstR = srcR + ((255 - srcA) * dstR) / 255;
                 dstG = srcG + ((255 - srcA) * dstG) / 255;
                 dstB = srcB + ((255 - srcA) * dstB) / 255;
+                dstA = srcA + ((255 - srcA) * dstA) / 255;
                 break;
             case SDL_COPY_ADD:
                 dstR = srcR + dstR; if (dstR > 255) dstR = 255;
@@ -7334,6 +7405,7 @@ static void SDL_Blit_BGRA8888_ARGB8888_Modulate_Blend_Scale(SDL_BlitInfo *info)
                 dstR = srcR + ((255 - srcA) * dstR) / 255;
                 dstG = srcG + ((255 - srcA) * dstG) / 255;
                 dstB = srcB + ((255 - srcA) * dstB) / 255;
+                dstA = srcA + ((255 - srcA) * dstA) / 255;
                 break;
             case SDL_COPY_ADD:
                 dstR = srcR + dstR; if (dstR > 255) dstR = 255;
diff --git a/src/video/sdlgenblit.pl b/src/video/sdlgenblit.pl
index 3a0561476..1097488f5 100755
--- a/src/video/sdlgenblit.pl
+++ b/src/video/sdlgenblit.pl
@@ -82,7 +82,7 @@ sub open_file {
 /* DO NOT EDIT!  This file is generated by sdlgenblit.pl */
 /*
   Simple DirectMedia Layer
-  Copyright (C) 1997-2013 Sam Lantinga 
+  Copyright (C) 1997-2013 Sam Lantinga 
 
   This software is provided 'as-is', without any express or implied
   warranty.  In no event will the authors be held liable for any damages
@@ -241,6 +241,7 @@ __EOF__
                 ${d}R = ${s}R + ((255 - ${s}A) * ${d}R) / 255;
                 ${d}G = ${s}G + ((255 - ${s}A) * ${d}G) / 255;
                 ${d}B = ${s}B + ((255 - ${s}A) * ${d}B) / 255;
+                ${d}A = ${s}A + ((255 - ${s}A) * ${d}A) / 255;
                 break;
             case SDL_COPY_ADD:
                 ${d}R = ${s}R + ${d}R; if (${d}R > 255) ${d}R = 255;
diff --git a/test/testrendertarget.c b/test/testrendertarget.c
index b7fd11c88..34c7703a4 100644
--- a/test/testrendertarget.c
+++ b/test/testrendertarget.c
@@ -87,6 +87,88 @@ LoadTexture(SDL_Renderer *renderer, char *file, SDL_bool transparent)
     return texture;
 }
 
+void
+DrawComposite(DrawState *s)
+{
+    SDL_Rect viewport, R;
+    SDL_Texture *target, *A, *B;
+
+    static SDL_bool blend_tested = SDL_FALSE;
+    if (!blend_tested) {
+        SDL_Texture *A, *B;
+        Uint32 P;
+
+        A = SDL_CreateTexture(s->renderer, SDL_PIXELFORMAT_ARGB8888, SDL_TEXTUREACCESS_TARGET, 1, 1);
+        SDL_SetTextureBlendMode(A, SDL_BLENDMODE_BLEND);
+
+        B = SDL_CreateTexture(s->renderer, SDL_PIXELFORMAT_ARGB8888, SDL_TEXTUREACCESS_TARGET, 1, 1);
+        SDL_SetTextureBlendMode(B, SDL_BLENDMODE_BLEND);
+
+        SDL_SetRenderTarget(s->renderer, A);
+        SDL_SetRenderDrawColor(s->renderer, 0x00, 0x00, 0x00, 0x80);
+        SDL_RenderFillRect(s->renderer, NULL);
+
+        SDL_SetRenderTarget(s->renderer, B);
+        SDL_SetRenderDrawColor(s->renderer, 0x00, 0x00, 0x00, 0x00);
+        SDL_RenderFillRect(s->renderer, NULL);
+        SDL_RenderCopy(s->renderer, A, NULL, NULL);
+        SDL_RenderReadPixels(s->renderer, NULL, SDL_PIXELFORMAT_ARGB8888, &P, sizeof(P));
+
+        printf("Blended pixel: 0x%8.8X\n", P);
+
+        SDL_DestroyTexture(A);
+        SDL_DestroyTexture(B);
+        blend_tested = SDL_TRUE;
+    }
+
+    SDL_RenderGetViewport(s->renderer, &viewport);
+
+    target = SDL_CreateTexture(s->renderer, SDL_PIXELFORMAT_ARGB8888, SDL_TEXTUREACCESS_TARGET, viewport.w, viewport.h);
+    SDL_SetTextureBlendMode(target, SDL_BLENDMODE_BLEND);
+    SDL_SetRenderTarget(s->renderer, target);
+
+    /* Draw the background.
+       This is solid black so when the sprite is copied to it, any per-pixel alpha will be blended through.
+     */
+    SDL_SetRenderDrawColor(s->renderer, 0x00, 0x00, 0x00, 0x00);
+    SDL_RenderFillRect(s->renderer, NULL);
+
+    /* Scale and draw the sprite */
+    s->sprite_rect.w += s->scale_direction;
+    s->sprite_rect.h += s->scale_direction;
+    if (s->scale_direction > 0) {
+        if (s->sprite_rect.w >= viewport.w || s->sprite_rect.h >= viewport.h) {
+            s->scale_direction = -1;
+        }
+    } else {
+        if (s->sprite_rect.w <= 1 || s->sprite_rect.h <= 1) {
+            s->scale_direction = 1;
+        }
+    }
+    s->sprite_rect.x = (viewport.w - s->sprite_rect.w) / 2;
+    s->sprite_rect.y = (viewport.h - s->sprite_rect.h) / 2;
+
+    SDL_RenderCopy(s->renderer, s->sprite, NULL, &s->sprite_rect);
+
+    SDL_SetRenderTarget(s->renderer, NULL);
+    SDL_RenderCopy(s->renderer, s->background, NULL, NULL);
+
+    SDL_SetRenderDrawBlendMode(s->renderer, SDL_BLENDMODE_BLEND);
+    SDL_SetRenderDrawColor(s->renderer, 0xff, 0x00, 0x00, 0x80);
+    R.x = 0;
+    R.y = 0;
+    R.w = 100;
+    R.h = 100;
+    SDL_RenderFillRect(s->renderer, &R);
+    SDL_SetRenderDrawBlendMode(s->renderer, SDL_BLENDMODE_NONE);
+
+    SDL_RenderCopy(s->renderer, target, NULL, NULL);
+    SDL_DestroyTexture(target);
+
+    /* Update the screen! */
+    SDL_RenderPresent(s->renderer);
+}
+
 void
 Draw(DrawState *s)
 {
@@ -134,6 +216,7 @@ main(int argc, char *argv[])
     SDL_Event event;
     int frames;
     Uint32 then, now;
+    SDL_bool test_composite = SDL_FALSE;
 
     /* Initialize test framework */
     state = SDLTest_CommonCreateState(argv, SDL_INIT_VIDEO);
@@ -145,8 +228,17 @@ main(int argc, char *argv[])
 
         consumed = SDLTest_CommonArg(state, i);
         if (consumed == 0) {
-            fprintf(stderr, "Usage: %s %s\n", argv[0], SDLTest_CommonUsage(state));
-            return 1;
+            consumed = -1;
+            if (SDL_strcasecmp(argv[i], "--composite") == 0) {
+                test_composite = SDL_TRUE;
+                consumed = 1;
+            }
+        }
+        if (consumed < 0) {
+            fprintf(stderr,
+                    "Usage: %s %s [--composite]\n",
+                    argv[0], SDLTest_CommonUsage(state));
+            quit(1);
         }
         i += consumed;
     }
@@ -160,7 +252,11 @@ main(int argc, char *argv[])
 
         drawstate->window = state->windows[i];
         drawstate->renderer = state->renderers[i];
-        drawstate->sprite = LoadTexture(drawstate->renderer, "icon.bmp", SDL_TRUE);
+        if (test_composite) {
+            drawstate->sprite = LoadTexture(drawstate->renderer, "icon-alpha.bmp", SDL_TRUE);
+        } else {
+            drawstate->sprite = LoadTexture(drawstate->renderer, "icon.bmp", SDL_TRUE);
+        }
         drawstate->background = LoadTexture(drawstate->renderer, "sample.bmp", SDL_FALSE);
         if (!drawstate->sprite || !drawstate->background) {
             quit(2);
@@ -181,7 +277,11 @@ main(int argc, char *argv[])
             SDLTest_CommonEvent(state, &event, &done);
         }
         for (i = 0; i < state->num_windows; ++i) {
-            Draw(&drawstates[i]);
+            if (test_composite) {
+                DrawComposite(&drawstates[i]);
+            } else {
+                Draw(&drawstates[i]);
+            }
         }
     }
 
diff --git a/test/testsprite2.c b/test/testsprite2.c
index a4d8aa0d5..09748209a 100644
--- a/test/testsprite2.c
+++ b/test/testsprite2.c
@@ -56,7 +56,7 @@ quit(int rc)
 }
 
 int
-LoadSprite(char *file)
+LoadSprite(const char *file)
 {
     int i;
     SDL_Surface *temp;
@@ -243,6 +243,7 @@ main(int argc, char *argv[])
     SDL_Event event;
     Uint32 then, now, frames;
 	Uint64 seed;
+    const char *icon = "icon.bmp";
 
     /* Initialize parameters */
     num_sprites = NUM_SPRITES;
@@ -292,11 +293,14 @@ main(int argc, char *argv[])
             } else if (SDL_isdigit(*argv[i])) {
                 num_sprites = SDL_atoi(argv[i]);
                 consumed = 1;
+            } else if (argv[i][0] != '-') {
+                icon = argv[i];
+                consumed = 1;
             }
         }
         if (consumed < 0) {
             fprintf(stderr,
-                    "Usage: %s %s [--blend none|blend|add|mod] [--cyclecolor] [--cyclealpha] [--iterations N]\n",
+                    "Usage: %s %s [--blend none|blend|add|mod] [--cyclecolor] [--cyclealpha] [--iterations N] [num_sprites] [icon.bmp]\n",
                     argv[0], SDLTest_CommonUsage(state));
             quit(1);
         }
@@ -318,7 +322,7 @@ main(int argc, char *argv[])
         SDL_SetRenderDrawColor(renderer, 0xA0, 0xA0, 0xA0, 0xFF);
         SDL_RenderClear(renderer);
     }
-    if (LoadSprite("icon.bmp") < 0) {
+    if (LoadSprite(icon) < 0) {
         quit(2);
     }
 

From a7954b42d060a25205241ff810d1f694a3a5ac7f Mon Sep 17 00:00:00 2001
From: Sam Lantinga 
Date: Tue, 23 Jul 2013 12:44:14 -0700
Subject: [PATCH 414/542] Fixed SDL printf output for 0x%.8x

---
 src/stdlib/SDL_string.c | 26 +++++++++++++++++++-------
 1 file changed, 19 insertions(+), 7 deletions(-)

diff --git a/src/stdlib/SDL_string.c b/src/stdlib/SDL_string.c
index 93bb056ad..89f5f358e 100644
--- a/src/stdlib/SDL_string.c
+++ b/src/stdlib/SDL_string.c
@@ -1308,7 +1308,24 @@ typedef struct
 static size_t
 SDL_PrintString(char *text, size_t maxlen, SDL_FormatInfo *info, const char *string)
 {
-    return SDL_strlcpy(text, string, maxlen);
+    size_t length = 0;
+
+    if (info && info->width && (size_t)info->width > SDL_strlen(string)) {
+        char fill = info->pad_zeroes ? '0' : ' ';
+        size_t width = info->width - SDL_strlen(string);
+        while (width-- > 0 && maxlen > 0) {
+            *text++ = fill;
+            ++length;
+            --maxlen;
+        }
+    }
+
+    length += SDL_strlcpy(text, string, maxlen);
+
+    if (info && info->do_lowercase) {
+        SDL_strlwr(text);
+    }
+    return length;
 }
 
 static size_t
@@ -1572,6 +1589,7 @@ SDL_vsnprintf(char *text, size_t maxlen, const char *fmt, va_list ap)
                     }
                     /* Fall through to unsigned handling */
                 case 'u':
+                    info.pad_zeroes = SDL_TRUE;
                     switch (inttype) {
                     case DO_INT:
                         len = SDL_PrintUnsignedLong(text, left, &info,
@@ -1587,12 +1605,6 @@ SDL_vsnprintf(char *text, size_t maxlen, const char *fmt, va_list ap)
                                                         va_arg(ap, Uint64));
                         break;
                     }
-                    if (info.do_lowercase) {
-                        size_t i;
-                        for (i = 0; i < len && i < left; ++i) {
-                            text[i] = SDL_tolower((unsigned char)text[i]);
-                        }
-                    }
                     done = SDL_TRUE;
                     break;
                 case 'f':

From 6f83bd0e2a9a56b78d7d74c3be28c46b96ff459d Mon Sep 17 00:00:00 2001
From: Sam Lantinga 
Date: Tue, 23 Jul 2013 12:46:22 -0700
Subject: [PATCH 415/542] Finished updating testoverlay2 for the new API and
 added it to the Visual Studio 2010 projects

---
 VisualC/SDL/SDL_VS2010.vcxproj                | 932 +++++++++---------
 VisualC/SDL_VS2010.sln                        |  16 +
 .../testoverlay2/testoverlay2_VS2010.vcxproj  |   6 +-
 test/testoverlay2.c                           | 168 +---
 4 files changed, 488 insertions(+), 634 deletions(-)

diff --git a/VisualC/SDL/SDL_VS2010.vcxproj b/VisualC/SDL/SDL_VS2010.vcxproj
index 72b111c71..5d576b8b9 100644
--- a/VisualC/SDL/SDL_VS2010.vcxproj
+++ b/VisualC/SDL/SDL_VS2010.vcxproj
@@ -1,466 +1,466 @@
-
-
-  
-    
-      Debug
-      Win32
-    
-    
-      Debug
-      x64
-    
-    
-      Release
-      Win32
-    
-    
-      Release
-      x64
-    
-  
-  
-    SDL2
-    {81CE8DAF-EBB2-4761-8E45-B71ABCCA8C68}
-    SDL
-  
-  
-  
-    DynamicLibrary
-    false
-  
-  
-    DynamicLibrary
-    false
-  
-  
-    DynamicLibrary
-    false
-  
-  
-    DynamicLibrary
-    false
-    MultiByte
-  
-  
-  
-  
-  
-    
-    
-  
-  
-    
-    
-  
-  
-    
-    
-  
-  
-    
-    
-  
-  
-  
-    <_ProjectFileVersion>10.0.30319.1
-    $(Platform)\$(Configuration)\
-    $(Platform)\$(Configuration)\
-    $(Platform)\$(Configuration)\
-    $(Platform)\$(Configuration)\
-    $(Platform)\$(Configuration)\
-    $(Platform)\$(Configuration)\
-    $(Platform)\$(Configuration)\
-    $(Platform)\$(Configuration)\
-  
-  
-    
-    
-      _DEBUG;%(PreprocessorDefinitions)
-      true
-      true
-      Win32
-    
-    
-      Disabled
-      ..\..\include;%(AdditionalIncludeDirectories);"$(DXSDK_DIR)\Include";
-      _DEBUG;_WINDOWS;%(PreprocessorDefinitions)
-      MultiThreadedDebugDLL
-      false
-      
-      
-      Level3
-      true
-      EditAndContinue
-      Default
-      false
-    
-    
-      _DEBUG;%(PreprocessorDefinitions)
-      0x0409
-    
-    
-      winmm.lib;imm32.lib;oleaut32.lib;version.lib;%(AdditionalDependencies)
-      true
-      true
-      Windows
-      false
-      $(DXSDK_DIR)\lib\x86
-    
-  
-  
-    
-      _DEBUG;%(PreprocessorDefinitions)
-      true
-      true
-      X64
-    
-    
-      Disabled
-      ..\..\include;%(AdditionalIncludeDirectories);"$(DXSDK_DIR)\Include";
-      _DEBUG;_WINDOWS;%(PreprocessorDefinitions)
-      MultiThreadedDebugDLL
-      false
-      
-      
-      Level3
-      EditAndContinue
-      false
-    
-    
-      _DEBUG;%(PreprocessorDefinitions)
-      0x0409
-    
-    
-      winmm.lib;imm32.lib;oleaut32.lib;version.lib;%(AdditionalDependencies)
-      true
-      true
-      Windows
-      false
-      $(DXSDK_DIR)\lib\x64
-    
-  
-  
-    
-    
-      NDEBUG;%(PreprocessorDefinitions)
-      true
-      true
-      Win32
-    
-    
-      OnlyExplicitInline
-      false
-      ..\..\include;%(AdditionalIncludeDirectories);"$(DXSDK_DIR)\Include";
-      NDEBUG;_WINDOWS;%(PreprocessorDefinitions)
-      true
-      MultiThreadedDLL
-      false
-      true
-      
-      
-      Level3
-      true
-      Default
-      false
-      ProgramDatabase
-    
-    
-      NDEBUG;%(PreprocessorDefinitions)
-      0x0409
-    
-    
-      winmm.lib;imm32.lib;oleaut32.lib;version.lib;%(AdditionalDependencies)
-      true
-      Windows
-      $(DXSDK_DIR)\lib\x86
-      true
-      true
-      true
-    
-  
-  
-    
-      NDEBUG;%(PreprocessorDefinitions)
-      true
-      true
-      X64
-    
-    
-      OnlyExplicitInline
-      false
-      ..\..\include;%(AdditionalIncludeDirectories);"$(DXSDK_DIR)\Include";
-      NDEBUG;_WINDOWS;%(PreprocessorDefinitions)
-      true
-      MultiThreadedDLL
-      false
-      true
-      
-      
-      Level3
-      false
-      ProgramDatabase
-    
-    
-      NDEBUG;%(PreprocessorDefinitions)
-      0x0409
-    
-    
-      winmm.lib;imm32.lib;oleaut32.lib;version.lib;%(AdditionalDependencies)
-      true
-      Windows
-      $(DXSDK_DIR)\lib\x64
-      true
-      true
-      true
-    
-  
-  
-    
-    
-    
-    
-    
-    
-    
-    
-    
-    
-    
-    
-    
-    
-    
-    
-    
-    
-    
-    
-    
-    
-    
-    
-    
-    
-    
-    
-    
-    
-    
-    
-    
-    
-    
-    
-    
-    
-    
-    
-    
-    
-    
-    
-    
-    
-    
-    
-    
-    
-    
-    
-    
-    
-    
-    
-    
-    
-    
-    
-    
-    
-    
-    
-    
-    
-    
-    
-    
-    
-    
-    
-    
-    
-    
-    
-    
-    
-    
-    
-    
-    
-    
-    
-    
-    
-    
-    
-    
-    
-    
-    
-    
-    
-    
-    
-    
-    
-    
-    
-    
-    
-    
-    
-    
-    
-    
-    
-    
-    
-    
-    
-    
-    
-    
-    
-    
-    
-    
-    
-    
-    
-    
-    
-    
-  
-  
-    
-    
-    
-    
-    
-    
-    
-    
-    
-    
-    
-    
-    
-    
-    
-    
-    
-    
-    
-    
-    
-    
-    
-    
-    
-    
-    
-    
-    
-    
-    
-    
-    
-    
-    
-    
-    
-    
-    
-    
-    
-    
-    
-    
-    
-    
-    
-    
-    
-    
-    
-    
-    
-    
-    
-    
-    
-    
-    
-    
-    
-    
-    
-    
-    
-    
-    
-    
-    
-    
-    
-    
-    
-    
-    
-    
-    
-    
-    
-    
-    
-    
-    
-    
-    
-    
-    
-    
-    
-    
-    
-    
-    
-    
-    
-    
-    
-    
-    
-    
-    
-    
-    
-    
-    
-    
-    
-    
-    
-    
-    
-    
-    
-    
-  
-  
-    
-  
-  
-  
-  
-
+
+
+  
+    
+      Debug
+      Win32
+    
+    
+      Debug
+      x64
+    
+    
+      Release
+      Win32
+    
+    
+      Release
+      x64
+    
+  
+  
+    SDL2
+    {81CE8DAF-EBB2-4761-8E45-B71ABCCA8C68}
+    SDL
+  
+  
+  
+    DynamicLibrary
+    false
+  
+  
+    DynamicLibrary
+    false
+  
+  
+    DynamicLibrary
+    false
+  
+  
+    DynamicLibrary
+    false
+    MultiByte
+  
+  
+  
+  
+  
+    
+    
+  
+  
+    
+    
+  
+  
+    
+    
+  
+  
+    
+    
+  
+  
+  
+    <_ProjectFileVersion>10.0.30319.1
+    $(Platform)\$(Configuration)\
+    $(Platform)\$(Configuration)\
+    $(Platform)\$(Configuration)\
+    $(Platform)\$(Configuration)\
+    $(Platform)\$(Configuration)\
+    $(Platform)\$(Configuration)\
+    $(Platform)\$(Configuration)\
+    $(Platform)\$(Configuration)\
+  
+  
+    
+    
+      _DEBUG;%(PreprocessorDefinitions)
+      true
+      true
+      Win32
+    
+    
+      Disabled
+      ..\..\include;%(AdditionalIncludeDirectories);"$(DXSDK_DIR)\Include";
+      _DEBUG;_WINDOWS;%(PreprocessorDefinitions)
+      MultiThreadedDebugDLL
+      false
+      
+      
+      Level3
+      true
+      EditAndContinue
+      Default
+      false
+    
+    
+      _DEBUG;%(PreprocessorDefinitions)
+      0x0409
+    
+    
+      winmm.lib;imm32.lib;oleaut32.lib;version.lib;%(AdditionalDependencies)
+      true
+      true
+      Windows
+      false
+      $(DXSDK_DIR)\lib\x86
+    
+  
+  
+    
+      _DEBUG;%(PreprocessorDefinitions)
+      true
+      true
+      X64
+    
+    
+      Disabled
+      ..\..\include;%(AdditionalIncludeDirectories);"$(DXSDK_DIR)\Include";
+      _DEBUG;_WINDOWS;%(PreprocessorDefinitions)
+      MultiThreadedDebugDLL
+      false
+      
+      
+      Level3
+      EditAndContinue
+      false
+    
+    
+      _DEBUG;%(PreprocessorDefinitions)
+      0x0409
+    
+    
+      winmm.lib;imm32.lib;oleaut32.lib;version.lib;%(AdditionalDependencies)
+      true
+      true
+      Windows
+      false
+      $(DXSDK_DIR)\lib\x64
+    
+  
+  
+    
+    
+      NDEBUG;%(PreprocessorDefinitions)
+      true
+      true
+      Win32
+    
+    
+      OnlyExplicitInline
+      false
+      ..\..\include;%(AdditionalIncludeDirectories);"$(DXSDK_DIR)\Include";
+      NDEBUG;_WINDOWS;%(PreprocessorDefinitions)
+      true
+      MultiThreadedDLL
+      false
+      true
+      
+      
+      Level3
+      true
+      Default
+      false
+      ProgramDatabase
+    
+    
+      NDEBUG;%(PreprocessorDefinitions)
+      0x0409
+    
+    
+      winmm.lib;imm32.lib;oleaut32.lib;version.lib;%(AdditionalDependencies)
+      true
+      Windows
+      $(DXSDK_DIR)\lib\x86
+      true
+      true
+      true
+    
+  
+  
+    
+      NDEBUG;%(PreprocessorDefinitions)
+      true
+      true
+      X64
+    
+    
+      OnlyExplicitInline
+      false
+      ..\..\include;%(AdditionalIncludeDirectories);"$(DXSDK_DIR)\Include";
+      NDEBUG;_WINDOWS;%(PreprocessorDefinitions)
+      true
+      MultiThreadedDLL
+      false
+      true
+      
+      
+      Level3
+      false
+      ProgramDatabase
+    
+    
+      NDEBUG;%(PreprocessorDefinitions)
+      0x0409
+    
+    
+      winmm.lib;imm32.lib;oleaut32.lib;version.lib;%(AdditionalDependencies)
+      true
+      Windows
+      $(DXSDK_DIR)\lib\x64
+      true
+      true
+      true
+    
+  
+  
+    
+    
+    
+    
+    
+    
+    
+    
+    
+    
+    
+    
+    
+    
+    
+    
+    
+    
+    
+    
+    
+    
+    
+    
+    
+    
+    
+    
+    
+    
+    
+    
+    
+    
+    
+    
+    
+    
+    
+    
+    
+    
+    
+    
+    
+    
+    
+    
+    
+    
+    
+    
+    
+    
+    
+    
+    
+    
+    
+    
+    
+    
+    
+    
+    
+    
+    
+    
+    
+    
+    
+    
+    
+    
+    
+    
+    
+    
+    
+    
+    
+    
+    
+    
+    
+    
+    
+    
+    
+    
+    
+    
+    
+    
+    
+    
+    
+    
+    
+    
+    
+    
+    
+    
+    
+    
+    
+    
+    
+    
+    
+    
+    
+    
+    
+    
+    
+    
+    
+    
+    
+    
+    
+    
+    
+  
+  
+    
+    
+    
+    
+    
+    
+    
+    
+    
+    
+    
+    
+    
+    
+    
+    
+    
+    
+    
+    
+    
+    
+    
+    
+    
+    
+    
+    
+    
+    
+    
+    
+    
+    
+    
+    
+    
+    
+    
+    
+    
+    
+    
+    
+    
+    
+    
+    
+    
+    
+    
+    
+    
+    
+    
+    
+    
+    
+    
+    
+    
+    
+    
+    
+    
+    
+    
+    
+    
+    
+    
+    
+    
+    
+    
+    
+    
+    
+    
+    
+    
+    
+    
+    
+    
+    
+    
+    
+    
+    
+    
+    
+    
+    
+    
+    
+    
+    
+    
+    
+    
+    
+    
+    
+    
+    
+    
+    
+    
+    
+    
+    
+    
+    
+  
+  
+    
+  
+  
+  
+  
+
\ No newline at end of file
diff --git a/VisualC/SDL_VS2010.sln b/VisualC/SDL_VS2010.sln
index d3274dada..fb5d873f2 100644
--- a/VisualC/SDL_VS2010.sln
+++ b/VisualC/SDL_VS2010.sln
@@ -56,6 +56,13 @@ Project("{8BC9CEB8-8B4A-11D0-8D11-00A0C91BC942}") = "testjoystick", "tests\testj
 		{DA956FD3-E143-46F2-9FE5-C77BEBC56B1A} = {DA956FD3-E143-46F2-9FE5-C77BEBC56B1A}
 	EndProjectSection
 EndProject
+Project("{8BC9CEB8-8B4A-11D0-8D11-00A0C91BC942}") = "testoverlay2", "tests\testoverlay2\testoverlay2_VS2010.vcxproj", "{55812185-D13C-4022-9C81-32E0F4A08AAD}"
+	ProjectSection(ProjectDependencies) = postProject
+		{81CE8DAF-EBB2-4761-8E45-B71ABCCA8C68} = {81CE8DAF-EBB2-4761-8E45-B71ABCCA8C68}
+		{DA956FD3-E142-46F2-9DD5-C78BEBB56B7A} = {DA956FD3-E142-46F2-9DD5-C78BEBB56B7A}
+		{DA956FD3-E143-46F2-9FE5-C77BEBC56B1A} = {DA956FD3-E143-46F2-9FE5-C77BEBC56B1A}
+	EndProjectSection
+EndProject
 Global
 	GlobalSection(SolutionConfigurationPlatforms) = preSolution
 		Debug|Win32 = Debug|Win32
@@ -214,6 +221,14 @@ Global
 		{55812185-D13C-4022-9C81-32E0F4A08BCC}.Release|Win32.Build.0 = Release|Win32
 		{55812185-D13C-4022-9C81-32E0F4A08BCC}.Release|x64.ActiveCfg = Release|x64
 		{55812185-D13C-4022-9C81-32E0F4A08BCC}.Release|x64.Build.0 = Release|x64
+		{55812185-D13C-4022-9C81-32E0F4A08AAD}.Debug|Win32.ActiveCfg = Debug|Win32
+		{55812185-D13C-4022-9C81-32E0F4A08AAD}.Debug|Win32.Build.0 = Debug|Win32
+		{55812185-D13C-4022-9C81-32E0F4A08AAD}.Debug|x64.ActiveCfg = Debug|x64
+		{55812185-D13C-4022-9C81-32E0F4A08AAD}.Debug|x64.Build.0 = Debug|x64
+		{55812185-D13C-4022-9C81-32E0F4A08AAD}.Release|Win32.ActiveCfg = Release|Win32
+		{55812185-D13C-4022-9C81-32E0F4A08AAD}.Release|Win32.Build.0 = Release|Win32
+		{55812185-D13C-4022-9C81-32E0F4A08AAD}.Release|x64.ActiveCfg = Release|x64
+		{55812185-D13C-4022-9C81-32E0F4A08AAD}.Release|x64.Build.0 = Release|x64
 	EndGlobalSection
 	GlobalSection(SolutionProperties) = preSolution
 		HideSolutionNode = FALSE
@@ -235,5 +250,6 @@ Global
 		{55812185-D13C-4022-9C81-32E0F4A08336} = {CE748C1F-3C21-4825-AA6A-F895A023F7E7}
 		{55812185-D13C-4022-9C81-32E0F4A08996} = {CE748C1F-3C21-4825-AA6A-F895A023F7E7}
 		{55812185-D13C-4022-9C81-32E0F4A08BCC} = {CE748C1F-3C21-4825-AA6A-F895A023F7E7}
+		{55812185-D13C-4022-9C81-32E0F4A08AAD} = {CE748C1F-3C21-4825-AA6A-F895A023F7E7}
 	EndGlobalSection
 EndGlobal
diff --git a/VisualC/tests/testoverlay2/testoverlay2_VS2010.vcxproj b/VisualC/tests/testoverlay2/testoverlay2_VS2010.vcxproj
index 201e32570..86a73edb9 100644
--- a/VisualC/tests/testoverlay2/testoverlay2_VS2010.vcxproj
+++ b/VisualC/tests/testoverlay2/testoverlay2_VS2010.vcxproj
@@ -109,7 +109,7 @@
 copy "$(SolutionDir)\..\test\moose.dat" "$(TargetDir)\moose.dat"
     
     
-      Copy SDL
+      Copy SDL and data files
     
   
   
@@ -180,7 +180,7 @@ copy "$(SolutionDir)\..\test\moose.dat" "$(TargetDir)\moose.dat"
 copy "$(SolutionDir)\..\test\moose.dat" "$(TargetDir)\moose.dat"
     
     
-      Copy SDL
+      Copy SDL and data files
     
   
   
@@ -215,7 +215,7 @@ copy "$(SolutionDir)\..\test\moose.dat" "$(TargetDir)\moose.dat"
 copy "$(SolutionDir)\..\test\moose.dat" "$(TargetDir)\moose.dat"
     
     
-      Copy SDL
+      Copy SDL and data files
     
   
   
diff --git a/test/testoverlay2.c b/test/testoverlay2.c
index 477720930..9d3cf1bf2 100644
--- a/test/testoverlay2.c
+++ b/test/testoverlay2.c
@@ -16,15 +16,6 @@
  *                                                                              *
  ********************************************************************************/
 
-#if 1 /* FIXME: Rework this using the 2.0 API */
-#include 
-
-int main(int argc, char *argv[])
-{
-    printf("FIXME\n");
-    return 0;
-}
-#else
 #include 
 #include 
 #include 
@@ -215,135 +206,6 @@ ConvertRGBtoYV12(Uint8 *rgb, Uint8 *out, int w, int h,
     }
 }
 
-void
-ConvertRGBtoIYUV(SDL_Surface * s, SDL_Overlay * o, int monochrome,
-                 int luminance)
-{
-    int x, y;
-    int yuv[3];
-    Uint8 *p, *op[3];
-
-    SDL_LockSurface(s);
-    SDL_LockYUVOverlay(o);
-
-    /* Convert */
-    for (y = 0; y < s->h && y < o->h; y++) {
-        p = ((Uint8 *) s->pixels) + s->pitch * y;
-        op[0] = o->pixels[0] + o->pitches[0] * y;
-        op[1] = o->pixels[1] + o->pitches[1] * (y / 2);
-        op[2] = o->pixels[2] + o->pitches[2] * (y / 2);
-        for (x = 0; x < s->w && x < o->w; x++) {
-            RGBtoYUV(p, yuv, monochrome, luminance);
-            *(op[0]++) = yuv[0];
-            if (x % 2 == 0 && y % 2 == 0) {
-                *(op[1]++) = yuv[1];
-                *(op[2]++) = yuv[2];
-            }
-            p += s->format->BytesPerPixel;
-        }
-    }
-
-    SDL_UnlockYUVOverlay(o);
-    SDL_UnlockSurface(s);
-}
-
-void
-ConvertRGBtoUYVY(SDL_Surface * s, SDL_Overlay * o, int monochrome,
-                 int luminance)
-{
-    int x, y;
-    int yuv[3];
-    Uint8 *p, *op;
-
-    SDL_LockSurface(s);
-    SDL_LockYUVOverlay(o);
-
-    for (y = 0; y < s->h && y < o->h; y++) {
-        p = ((Uint8 *) s->pixels) + s->pitch * y;
-        op = o->pixels[0] + o->pitches[0] * y;
-        for (x = 0; x < s->w && x < o->w; x++) {
-            RGBtoYUV(p, yuv, monochrome, luminance);
-            if (x % 2 == 0) {
-                *(op++) = yuv[1];
-                *(op++) = yuv[0];
-                *(op++) = yuv[2];
-            } else
-                *(op++) = yuv[0];
-
-            p += s->format->BytesPerPixel;
-        }
-    }
-
-    SDL_UnlockYUVOverlay(o);
-    SDL_UnlockSurface(s);
-}
-
-void
-ConvertRGBtoYVYU(SDL_Surface * s, SDL_Overlay * o, int monochrome,
-                 int luminance)
-{
-    int x, y;
-    int yuv[3];
-    Uint8 *p, *op;
-
-    SDL_LockSurface(s);
-    SDL_LockYUVOverlay(o);
-
-    for (y = 0; y < s->h && y < o->h; y++) {
-        p = ((Uint8 *) s->pixels) + s->pitch * y;
-        op = o->pixels[0] + o->pitches[0] * y;
-        for (x = 0; x < s->w && x < o->w; x++) {
-            RGBtoYUV(p, yuv, monochrome, luminance);
-            if (x % 2 == 0) {
-                *(op++) = yuv[0];
-                *(op++) = yuv[2];
-                op[1] = yuv[1];
-            } else {
-                *op = yuv[0];
-                op += 2;
-            }
-
-            p += s->format->BytesPerPixel;
-        }
-    }
-
-    SDL_UnlockYUVOverlay(o);
-    SDL_UnlockSurface(s);
-}
-
-void
-ConvertRGBtoYUY2(SDL_Surface * s, SDL_Overlay * o, int monochrome,
-                 int luminance)
-{
-    int x, y;
-    int yuv[3];
-    Uint8 *p, *op;
-
-    SDL_LockSurface(s);
-    SDL_LockYUVOverlay(o);
-
-    for (y = 0; y < s->h && y < o->h; y++) {
-        p = ((Uint8 *) s->pixels) + s->pitch * y;
-        op = o->pixels[0] + o->pitches[0] * y;
-        for (x = 0; x < s->w && x < o->w; x++) {
-            RGBtoYUV(p, yuv, monochrome, luminance);
-            if (x % 2 == 0) {
-                *(op++) = yuv[0];
-                *(op++) = yuv[1];
-                op[1] = yuv[2];
-            } else {
-                *op = yuv[0];
-                op += 2;
-            }
-
-            p += s->format->BytesPerPixel;
-        }
-    }
-
-    SDL_UnlockYUVOverlay(o);
-    SDL_UnlockSurface(s);
-}
-
 static void
 PrintUsage(char *argv0)
 {
@@ -384,7 +246,7 @@ main(int argc, char **argv)
     int scale = 5;
     SDL_bool done = SDL_FALSE;
 
-    if (SDL_Init(SDL_INIT_VIDEO | SDL_INIT_NOPARACHUTE) < 0) {
+    if (SDL_Init(SDL_INIT_VIDEO) < 0) {
         fprintf(stderr, "Couldn't initialize SDL: %s\n", SDL_GetError());
         return 3;
     }
@@ -414,31 +276,6 @@ main(int argc, char **argv)
             nodelay = 1;
             argv += 1;
             argc -= 1;
-        } else if (strcmp(argv[1], "-format") == 0) {
-            if (argv[2]) {
-                if (!strcmp(argv[2], "YV12"))
-                    pixel_format = SDL_PIXELFORMAT_YV12;
-                else if (!strcmp(argv[2], "IYUV"))
-                    pixel_format = SDL_PIXELFORMAT_IYUV;
-                else if (!strcmp(argv[2], "YUY2"))
-                    pixel_format = SDL_PIXELFORMAT_YUY2;
-                else if (!strcmp(argv[2], "UYVY"))
-                    pixel_format = SDL_PIXELFORMAT_UYVY;
-                else if (!strcmp(argv[2], "YVYU"))
-                    pixel_format = SDL_PIXELFORMAT_YVYU;
-                else {
-                    fprintf(stderr,
-                            "The -format option %s is not recognized, see help for info.\n",
-                            argv[2]);
-                    quit(10);
-                }
-                argv += 2;
-                argc -= 2;
-            } else {
-                fprintf(stderr,
-                        "The -format option requires an argument, default is YUY2.\n");
-                quit(10);
-            }
         } else if (strcmp(argv[1], "-scale") == 0) {
             if (argv[2]) {
                 scale = atoi(argv[2]);
@@ -516,6 +353,8 @@ main(int argc, char **argv)
         free(RawMooseData);
         quit(5);
     }
+    /* Uncomment this to check vertex color with a YUV texture */
+    /*SDL_SetTextureColorMod(MooseTexture, 0xff, 0x80, 0x80);*/
 
     for (i = 0; i < MOOSEFRAMES_COUNT; i++) {
         Uint8 MooseFrameRGB[MOOSEFRAME_SIZE*3];
@@ -600,6 +439,5 @@ main(int argc, char **argv)
     quit(0);
     return 0;
 }
-#endif
 
 /* vi: set ts=4 sw=4 expandtab: */

From 08e8f26d6211aee0526a45de9147939520b272c0 Mon Sep 17 00:00:00 2001
From: Sam Lantinga 
Date: Tue, 23 Jul 2013 12:55:19 -0700
Subject: [PATCH 416/542] Added Direct3D shader to hardware accelerate YV12 and
 IYUV textures.

---
 src/render/direct3d/SDL_render_d3d.c | 409 +++++++++++++++++++++++----
 1 file changed, 353 insertions(+), 56 deletions(-)

diff --git a/src/render/direct3d/SDL_render_d3d.c b/src/render/direct3d/SDL_render_d3d.c
index 1c3abc1d7..95a3d742d 100644
--- a/src/render/direct3d/SDL_render_d3d.c
+++ b/src/render/direct3d/SDL_render_d3d.c
@@ -169,6 +169,32 @@ HRESULT WINAPI
         LPD3DXBUFFER*                   ppShader,
         LPD3DXBUFFER*                   ppErrorMsgs);
 
+static void PrintShaderData(LPDWORD shader_data, DWORD shader_size)
+{
+    OutputDebugStringA("const DWORD shader_data[] = {\n\t");
+    {
+        SDL_bool newline = SDL_FALSE;
+        unsigned i;
+        for (i = 0; i < shader_size / sizeof(DWORD); ++i) {
+            char dword[11];
+            if (i > 0) {
+                if ((i%6) == 0) {
+                    newline = SDL_TRUE;
+                }
+                if (newline) {
+                    OutputDebugStringA(",\n    ");
+                    newline = SDL_FALSE;
+                } else {
+                    OutputDebugStringA(", ");
+                }
+            }
+            SDL_snprintf(dword, sizeof(dword), "0x%8.8x", shader_data[i]);
+            OutputDebugStringA(dword);
+        }
+        OutputDebugStringA("\n};\n");
+    }
+}
+
 #endif /* ASSEMBLE_SHADER */
 
 
@@ -228,17 +254,26 @@ typedef struct
     SDL_bool updateSize;
     SDL_bool beginScene;
     SDL_bool enableSeparateAlphaBlend;
-    D3DTEXTUREFILTERTYPE scaleMode;
+    D3DTEXTUREFILTERTYPE scaleMode[8];
     IDirect3DSurface9 *defaultRenderTarget;
     IDirect3DSurface9 *currentRenderTarget;
     void* d3dxDLL;
     ID3DXMatrixStack *matrixStack;
+    LPDIRECT3DPIXELSHADER9 ps_yuv;
 } D3D_RenderData;
 
 typedef struct
 {
     IDirect3DTexture9 *texture;
     D3DTEXTUREFILTERTYPE scaleMode;
+
+    /* YV12 texture support */
+    SDL_bool yuv;
+    IDirect3DTexture9 *utexture;
+    IDirect3DTexture9 *vtexture;
+    Uint8 *pixels;
+    int pitch;
+    SDL_Rect locked_rect;
 } D3D_TextureData;
 
 typedef struct
@@ -337,6 +372,9 @@ PixelFormatToD3DFMT(Uint32 format)
         return D3DFMT_X8R8G8B8;
     case SDL_PIXELFORMAT_ARGB8888:
         return D3DFMT_A8R8G8B8;
+    case SDL_PIXELFORMAT_YV12:
+    case SDL_PIXELFORMAT_IYUV:
+        return D3DFMT_L8;
     default:
         return D3DFMT_UNKNOWN;
     }
@@ -385,7 +423,7 @@ D3D_Reset(SDL_Renderer * renderer)
                                     D3DCULL_NONE);
     IDirect3DDevice9_SetRenderState(data->device, D3DRS_LIGHTING, FALSE);
     IDirect3DDevice9_GetRenderTarget(data->device, 0, &data->defaultRenderTarget);
-    data->scaleMode = D3DTEXF_FORCE_DWORD;
+    SDL_memset(data->scaleMode, 0xFF, sizeof(data->scaleMode));
     return 0;
 }
 
@@ -587,7 +625,7 @@ D3D_CreateRenderer(SDL_Window * window, Uint32 flags)
         return NULL;
     }
     data->beginScene = SDL_TRUE;
-    data->scaleMode = D3DTEXF_FORCE_DWORD;
+    SDL_memset(data->scaleMode, 0xFF, sizeof(data->scaleMode));
 
     /* Get presentation parameters to fill info */
     result = IDirect3DDevice9_GetSwapChain(data->device, 0, &chain);
@@ -676,6 +714,136 @@ D3D_CreateRenderer(SDL_Window * window, Uint32 flags)
     IDirect3DDevice9_SetTransform(data->device, D3DTS_WORLD, &matrix);
     IDirect3DDevice9_SetTransform(data->device, D3DTS_VIEW, &matrix);
 
+    if (caps.MaxSimultaneousTextures >= 3)
+    {
+#ifdef ASSEMBLE_SHADER
+        /* This shader was created by running the following HLSL through the fxc compiler
+           and then tuning the generated assembly.
+
+           fxc /T fx_4_0 /O3 /Gfa /Fc yuv.fxc yuv.fx
+
+           --- yuv.fx ---
+           Texture2D g_txY;
+           Texture2D g_txU;
+           Texture2D g_txV;
+
+           SamplerState samLinear
+           {
+               Filter = ANISOTROPIC;
+               AddressU = Clamp;
+               AddressV = Clamp;
+               MaxAnisotropy = 1;
+           };
+
+           struct VS_OUTPUT
+           {
+                float2 TextureUV  : TEXCOORD0;
+           };
+
+           struct PS_OUTPUT
+           {
+                float4 RGBAColor : SV_Target;
+           };
+
+           PS_OUTPUT YUV420( VS_OUTPUT In ) 
+           {
+               const float3 offset = {-0.0625, -0.5, -0.5};
+               const float3 Rcoeff = {1.164,  0.000,  1.596};
+               const float3 Gcoeff = {1.164, -0.391, -0.813};
+               const float3 Bcoeff = {1.164,  2.018,  0.000};
+
+               PS_OUTPUT Output;
+               float2 TextureUV = In.TextureUV;
+
+               float3 yuv;
+               yuv.x = g_txY.Sample( samLinear, TextureUV ).r;
+               yuv.y = g_txU.Sample( samLinear, TextureUV ).r;
+               yuv.z = g_txV.Sample( samLinear, TextureUV ).r;
+
+               yuv += offset;
+               Output.RGBAColor.r = dot(yuv, Rcoeff);
+               Output.RGBAColor.g = dot(yuv, Gcoeff);
+               Output.RGBAColor.b = dot(yuv, Bcoeff);
+               Output.RGBAColor.a = 1.0f;
+
+               return Output;
+           }
+
+           technique10 RenderYUV420
+           {
+               pass P0
+               {
+                    SetPixelShader( CompileShader( ps_4_0_level_9_0, YUV420() ) );
+               }
+           }
+        */
+        const char *shader_text =
+            "ps_2_0\n"
+            "def c0, -0.0625, -0.5, -0.5, 1\n"
+            "def c1, 1.16400003, 0, 1.59599996, 0\n"
+            "def c2, 1.16400003, -0.391000003, -0.813000023, 0\n"
+            "def c3, 1.16400003, 2.01799989, 0, 0\n"
+            "dcl t0.xy\n"
+            "dcl v0.xyzw\n"
+            "dcl_2d s0\n"
+            "dcl_2d s1\n"
+            "dcl_2d s2\n"
+            "texld r0, t0, s0\n"
+            "texld r1, t0, s1\n"
+            "texld r2, t0, s2\n"
+            "mov r0.y, r1.x\n"
+            "mov r0.z, r2.x\n"
+            "add r0.xyz, r0, c0\n"
+            "dp3 r1.x, r0, c1\n"
+            "dp3 r1.y, r0, c2\n"
+            "dp2add r1.z, r0, c3, c3.z\n"   /* Logically this is "dp3 r1.z, r0, c3" but the optimizer did its magic */
+            "mov r1.w, c0.w\n"
+            "mul r0, r1, v0\n"              /* Not in the HLSL, multiply by vertex color */
+            "mov oC0, r0\n"
+        ;
+        LPD3DXBUFFER pCode;
+        LPD3DXBUFFER pErrorMsgs;
+        LPDWORD shader_data = NULL;
+        DWORD   shader_size = 0;
+        result = D3DXAssembleShader(shader_text, SDL_strlen(shader_text), NULL, NULL, 0, &pCode, &pErrorMsgs);
+        if (!FAILED(result)) {
+            shader_data = (DWORD*)pCode->lpVtbl->GetBufferPointer(pCode);
+            shader_size = pCode->lpVtbl->GetBufferSize(pCode);
+            PrintShaderData(shader_data, shader_size);
+        } else {
+            const char *error = (const char *)pErrorMsgs->lpVtbl->GetBufferPointer(pErrorMsgs);
+            SDL_SetError("Couldn't assemble shader: %s", error);
+        }
+#else
+        const DWORD shader_data[] = {
+            0xffff0200, 0x05000051, 0xa00f0000, 0xbd800000, 0xbf000000, 0xbf000000,
+            0x3f800000, 0x05000051, 0xa00f0001, 0x3f94fdf4, 0x00000000, 0x3fcc49ba,
+            0x00000000, 0x05000051, 0xa00f0002, 0x3f94fdf4, 0xbec83127, 0xbf5020c5,
+            0x00000000, 0x05000051, 0xa00f0003, 0x3f94fdf4, 0x400126e9, 0x00000000,
+            0x00000000, 0x0200001f, 0x80000000, 0xb0030000, 0x0200001f, 0x80000000,
+            0x900f0000, 0x0200001f, 0x90000000, 0xa00f0800, 0x0200001f, 0x90000000,
+            0xa00f0801, 0x0200001f, 0x90000000, 0xa00f0802, 0x03000042, 0x800f0000,
+            0xb0e40000, 0xa0e40800, 0x03000042, 0x800f0001, 0xb0e40000, 0xa0e40801,
+            0x03000042, 0x800f0002, 0xb0e40000, 0xa0e40802, 0x02000001, 0x80020000,
+            0x80000001, 0x02000001, 0x80040000, 0x80000002, 0x03000002, 0x80070000,
+            0x80e40000, 0xa0e40000, 0x03000008, 0x80010001, 0x80e40000, 0xa0e40001,
+            0x03000008, 0x80020001, 0x80e40000, 0xa0e40002, 0x0400005a, 0x80040001,
+            0x80e40000, 0xa0e40003, 0xa0aa0003, 0x02000001, 0x80080001, 0xa0ff0000,
+            0x03000005, 0x800f0000, 0x80e40001, 0x90e40000, 0x02000001, 0x800f0800,
+            0x80e40000, 0x0000ffff
+        };
+#endif
+        if (shader_data) {
+            result = IDirect3DDevice9_CreatePixelShader(data->device, shader_data, &data->ps_yuv);
+            if (!FAILED(result)) {
+                renderer->info.texture_formats[renderer->info.num_texture_formats++] = SDL_PIXELFORMAT_YV12;
+                renderer->info.texture_formats[renderer->info.num_texture_formats++] = SDL_PIXELFORMAT_IYUV;
+            } else {
+                D3D_SetError("CreatePixelShader()", result);
+            }
+        }
+    }
+
     return renderer;
 }
 
@@ -744,6 +912,70 @@ D3D_CreateTexture(SDL_Renderer * renderer, SDL_Texture * texture)
         return D3D_SetError("CreateTexture()", result);
     }
 
+    if (texture->format == SDL_PIXELFORMAT_YV12 ||
+        texture->format == SDL_PIXELFORMAT_IYUV) {
+        data->yuv = SDL_TRUE;
+
+        result =
+            IDirect3DDevice9_CreateTexture(renderdata->device, texture->w / 2,
+                                           texture->h / 2, 1, usage,
+                                           PixelFormatToD3DFMT(texture->format),
+                                           pool, &data->utexture, NULL);
+        if (FAILED(result)) {
+            return D3D_SetError("CreateTexture()", result);
+        }
+
+        result =
+            IDirect3DDevice9_CreateTexture(renderdata->device, texture->w / 2,
+                                           texture->h / 2, 1, usage,
+                                           PixelFormatToD3DFMT(texture->format),
+                                           pool, &data->vtexture, NULL);
+        if (FAILED(result)) {
+            return D3D_SetError("CreateTexture()", result);
+        }
+    }
+
+    return 0;
+}
+
+static int
+D3D_UpdateTextureInternal(IDirect3DTexture9 *texture, Uint32 format, SDL_bool full_texture, int x, int y, int w, int h, const void *pixels, int pitch)
+{
+    RECT d3drect;
+    D3DLOCKED_RECT locked;
+    const Uint8 *src;
+    Uint8 *dst;
+    int row, length;
+    HRESULT result;
+
+    if (full_texture) {
+        result = IDirect3DTexture9_LockRect(texture, 0, &locked, NULL, D3DLOCK_DISCARD);
+    } else {
+        d3drect.left = x;
+        d3drect.right = x + w;
+        d3drect.top = y;
+        d3drect.bottom = y + h;
+        result = IDirect3DTexture9_LockRect(texture, 0, &locked, &d3drect, 0);
+    }
+
+    if (FAILED(result)) {
+        return D3D_SetError("LockRect()", result);
+    }
+
+    src = (const Uint8 *)pixels;
+    dst = locked.pBits;
+    length = w * SDL_BYTESPERPIXEL(format);
+    if (length == pitch && length == locked.Pitch) {
+        SDL_memcpy(dst, src, length*h);
+    } else {
+        for (row = 0; row < h; ++row) {
+            SDL_memcpy(dst, src, length);
+            src += pitch;
+            dst += locked.Pitch;
+        }
+    }
+    IDirect3DTexture9_UnlockRect(texture, 0);
+
     return 0;
 }
 
@@ -752,46 +984,34 @@ D3D_UpdateTexture(SDL_Renderer * renderer, SDL_Texture * texture,
                   const SDL_Rect * rect, const void *pixels, int pitch)
 {
     D3D_TextureData *data = (D3D_TextureData *) texture->driverdata;
-    RECT d3drect;
-    D3DLOCKED_RECT locked;
-    const Uint8 *src;
-    Uint8 *dst;
-    int row, length;
-    HRESULT result;
+    SDL_bool full_texture = SDL_FALSE;
 
 #ifdef USE_DYNAMIC_TEXTURE
     if (texture->access == SDL_TEXTUREACCESS_STREAMING &&
         rect->x == 0 && rect->y == 0 &&
         rect->w == texture->w && rect->h == texture->h) {
-        result = IDirect3DTexture9_LockRect(data->texture, 0, &locked, NULL, D3DLOCK_DISCARD);
-    } else
+        full_texture = SDL_TRUE;
+    }
 #endif
-    {
-        d3drect.left = rect->x;
-        d3drect.right = rect->x + rect->w;
-        d3drect.top = rect->y;
-        d3drect.bottom = rect->y + rect->h;
-        result = IDirect3DTexture9_LockRect(data->texture, 0, &locked, &d3drect, 0);
+
+    if (D3D_UpdateTextureInternal(data->texture, texture->format, full_texture, rect->x, rect->y, rect->w, rect->h, pixels, pitch) < 0) {
+        return -1;
     }
 
-    if (FAILED(result)) {
-        return D3D_SetError("LockRect()", result);
-    }
+    if (data->yuv) {
+        /* Skip to the correct offset into the next texture */
+        pixels = (const void*)((const Uint8*)pixels + rect->h * pitch);
 
-    src = pixels;
-    dst = locked.pBits;
-    length = rect->w * SDL_BYTESPERPIXEL(texture->format);
-    if (length == pitch && length == locked.Pitch) {
-        SDL_memcpy(dst, src, length*rect->h);
-    } else {
-        for (row = 0; row < rect->h; ++row) {
-            SDL_memcpy(dst, src, length);
-            src += pitch;
-            dst += locked.Pitch;
+        if (D3D_UpdateTextureInternal(texture->format == SDL_PIXELFORMAT_YV12 ? data->vtexture : data->utexture, texture->format, full_texture, rect->x / 2, rect->y / 2, rect->w / 2, rect->h / 2, pixels, pitch / 2) < 0) {
+            return -1;
+        }
+
+        /* Skip to the correct offset into the next texture */
+        pixels = (const void*)((const Uint8*)pixels + (rect->h * pitch)/4);
+        if (D3D_UpdateTextureInternal(texture->format == SDL_PIXELFORMAT_YV12 ? data->utexture : data->vtexture, texture->format, full_texture, rect->x / 2, rect->y / 2, rect->w / 2, rect->h / 2, pixels, pitch / 2) < 0) {
+            return -1;
         }
     }
-    IDirect3DTexture9_UnlockRect(data->texture, 0);
-
     return 0;
 }
 
@@ -804,17 +1024,33 @@ D3D_LockTexture(SDL_Renderer * renderer, SDL_Texture * texture,
     D3DLOCKED_RECT locked;
     HRESULT result;
 
-    d3drect.left = rect->x;
-    d3drect.right = rect->x + rect->w;
-    d3drect.top = rect->y;
-    d3drect.bottom = rect->y + rect->h;
+    if (data->yuv) {
+        // It's more efficient to upload directly...
+        if (!data->pixels) {
+            data->pitch = texture->w;
+            data->pixels = (Uint8 *)SDL_malloc((texture->h * data->pitch * 3) / 2);
+            if (!data->pixels) {
+                return SDL_OutOfMemory();
+            }
+        }
+        data->locked_rect = *rect;
+        *pixels =
+            (void *) ((Uint8 *) data->pixels + rect->y * data->pitch +
+                      rect->x * SDL_BYTESPERPIXEL(texture->format));
+        *pitch = data->pitch;
+    } else {
+        d3drect.left = rect->x;
+        d3drect.right = rect->x + rect->w;
+        d3drect.top = rect->y;
+        d3drect.bottom = rect->y + rect->h;
 
-    result = IDirect3DTexture9_LockRect(data->texture, 0, &locked, &d3drect, 0);
-    if (FAILED(result)) {
-        return D3D_SetError("LockRect()", result);
+        result = IDirect3DTexture9_LockRect(data->texture, 0, &locked, &d3drect, 0);
+        if (FAILED(result)) {
+            return D3D_SetError("LockRect()", result);
+        }
+        *pixels = locked.pBits;
+        *pitch = locked.Pitch;
     }
-    *pixels = locked.pBits;
-    *pitch = locked.Pitch;
     return 0;
 }
 
@@ -823,7 +1059,15 @@ D3D_UnlockTexture(SDL_Renderer * renderer, SDL_Texture * texture)
 {
     D3D_TextureData *data = (D3D_TextureData *) texture->driverdata;
 
-    IDirect3DTexture9_UnlockRect(data->texture, 0);
+    if (data->yuv) {
+        const SDL_Rect *rect = &data->locked_rect;
+        void *pixels =
+            (void *) ((Uint8 *) data->pixels + rect->y * data->pitch +
+                      rect->x * SDL_BYTESPERPIXEL(texture->format));
+        D3D_UpdateTexture(renderer, texture, rect, pixels, data->pitch);
+    } else {
+        IDirect3DTexture9_UnlockRect(data->texture, 0);
+    }
 }
 
 static int
@@ -1196,6 +1440,18 @@ D3D_RenderFillRects(SDL_Renderer * renderer, const SDL_FRect * rects,
     return 0;
 }
 
+static void
+D3D_UpdateTextureScaleMode(D3D_RenderData *data, D3D_TextureData *texturedata, unsigned index)
+{
+    if (texturedata->scaleMode != data->scaleMode[index]) {
+        IDirect3DDevice9_SetSamplerState(data->device, index, D3DSAMP_MINFILTER,
+                                         texturedata->scaleMode);
+        IDirect3DDevice9_SetSamplerState(data->device, index, D3DSAMP_MAGFILTER,
+                                         texturedata->scaleMode);
+        data->scaleMode[index] = texturedata->scaleMode;
+    }
+}
+
 static int
 D3D_RenderCopy(SDL_Renderer * renderer, SDL_Texture * texture,
                const SDL_Rect * srcrect, const SDL_FRect * dstrect)
@@ -1255,13 +1511,7 @@ D3D_RenderCopy(SDL_Renderer * renderer, SDL_Texture * texture,
 
     D3D_SetBlendMode(data, texture->blendMode);
 
-    if (texturedata->scaleMode != data->scaleMode) {
-        IDirect3DDevice9_SetSamplerState(data->device, 0, D3DSAMP_MINFILTER,
-                                         texturedata->scaleMode);
-        IDirect3DDevice9_SetSamplerState(data->device, 0, D3DSAMP_MAGFILTER,
-                                         texturedata->scaleMode);
-        data->scaleMode = texturedata->scaleMode;
-    }
+    D3D_UpdateTextureScaleMode(data, texturedata, 0);
 
     result =
         IDirect3DDevice9_SetTexture(data->device, 0, (IDirect3DBaseTexture9 *)
@@ -1269,6 +1519,28 @@ D3D_RenderCopy(SDL_Renderer * renderer, SDL_Texture * texture,
     if (FAILED(result)) {
         return D3D_SetError("SetTexture()", result);
     }
+
+    if (texturedata->yuv) {
+        shader = data->ps_yuv;
+
+        D3D_UpdateTextureScaleMode(data, texturedata, 1);
+        D3D_UpdateTextureScaleMode(data, texturedata, 2);
+
+        result =
+            IDirect3DDevice9_SetTexture(data->device, 1, (IDirect3DBaseTexture9 *)
+                                        texturedata->utexture);
+        if (FAILED(result)) {
+            return D3D_SetError("SetTexture()", result);
+        }
+
+        result =
+            IDirect3DDevice9_SetTexture(data->device, 2, (IDirect3DBaseTexture9 *)
+                                        texturedata->vtexture);
+        if (FAILED(result)) {
+            return D3D_SetError("SetTexture()", result);
+        }
+    }
+
     if (shader) {
         result = IDirect3DDevice9_SetPixelShader(data->device, shader);
         if (FAILED(result)) {
@@ -1375,13 +1647,7 @@ D3D_RenderCopyEx(SDL_Renderer * renderer, SDL_Texture * texture,
     ID3DXMatrixStack_Translate(data->matrixStack, (float)dstrect->x + centerx, (float)dstrect->y + centery, (float)0.0);
     IDirect3DDevice9_SetTransform(data->device, D3DTS_VIEW, (D3DMATRIX*)ID3DXMatrixStack_GetTop(data->matrixStack));
 
-    if (texturedata->scaleMode != data->scaleMode) {
-        IDirect3DDevice9_SetSamplerState(data->device, 0, D3DSAMP_MINFILTER,
-                                         texturedata->scaleMode);
-        IDirect3DDevice9_SetSamplerState(data->device, 0, D3DSAMP_MAGFILTER,
-                                         texturedata->scaleMode);
-        data->scaleMode = texturedata->scaleMode;
-    }
+    D3D_UpdateTextureScaleMode(data, texturedata, 0);
 
     result =
         IDirect3DDevice9_SetTexture(data->device, 0, (IDirect3DBaseTexture9 *)
@@ -1389,6 +1655,28 @@ D3D_RenderCopyEx(SDL_Renderer * renderer, SDL_Texture * texture,
     if (FAILED(result)) {
         return D3D_SetError("SetTexture()", result);
     }
+
+    if (texturedata->yuv) {
+        shader = data->ps_yuv;
+
+        D3D_UpdateTextureScaleMode(data, texturedata, 1);
+        D3D_UpdateTextureScaleMode(data, texturedata, 2);
+
+        result =
+            IDirect3DDevice9_SetTexture(data->device, 1, (IDirect3DBaseTexture9 *)
+                                        texturedata->utexture);
+        if (FAILED(result)) {
+            return D3D_SetError("SetTexture()", result);
+        }
+
+        result =
+            IDirect3DDevice9_SetTexture(data->device, 2, (IDirect3DBaseTexture9 *)
+                                        texturedata->vtexture);
+        if (FAILED(result)) {
+            return D3D_SetError("SetTexture()", result);
+        }
+    }
+
     if (shader) {
         result = IDirect3DDevice9_SetPixelShader(data->device, shader);
         if (FAILED(result)) {
@@ -1511,6 +1799,15 @@ D3D_DestroyTexture(SDL_Renderer * renderer, SDL_Texture * texture)
     if (data->texture) {
         IDirect3DTexture9_Release(data->texture);
     }
+    if (data->utexture) {
+        IDirect3DTexture9_Release(data->utexture);
+    }
+    if (data->vtexture) {
+        IDirect3DTexture9_Release(data->vtexture);
+    }
+    if (data->pixels) {
+        SDL_free(data->pixels);
+    }
     SDL_free(data);
     texture->driverdata = NULL;
 }

From defb16763dc252a50e6b6832e1888146986b891c Mon Sep 17 00:00:00 2001
From: Sam Lantinga 
Date: Tue, 23 Jul 2013 12:59:29 -0700
Subject: [PATCH 417/542] Add a timeout to the clipboard code to avoid hangs
 when using synergy. When a timeout is detected we set the clipboard so that
 we own it so that future timeouts are avoided. Testing has confirmed that
 this timeout and setting only occurs when the clipboard contains text from my
 Windows machine.

That is, if you copy from the Windows clipboard and then launch Dota and then repeatedly paste to a terminal window then the text will disappear when Dota hits the timeout. If you then select on the Linux side you can repeatedly paste. If you select again on Windows then the text will get cleared again.

Note that Dota only looks at the clipboard when it has focus.

CR: Saml
---
 src/thread/windows/SDL_systhread.c |  0
 src/video/x11/SDL_x11clipboard.c   | 20 ++++++++++++++++++--
 2 files changed, 18 insertions(+), 2 deletions(-)
 mode change 100755 => 100644 src/thread/windows/SDL_systhread.c

diff --git a/src/thread/windows/SDL_systhread.c b/src/thread/windows/SDL_systhread.c
old mode 100755
new mode 100644
diff --git a/src/video/x11/SDL_x11clipboard.c b/src/video/x11/SDL_x11clipboard.c
index bdeb4da8a..54b5eb602 100644
--- a/src/video/x11/SDL_x11clipboard.c
+++ b/src/video/x11/SDL_x11clipboard.c
@@ -26,6 +26,7 @@
 
 #include "SDL_events.h"
 #include "SDL_x11video.h"
+#include "SDL_timer.h"
 
 
 /* If you don't support UTF-8, you might use XA_STRING here */
@@ -94,10 +95,12 @@ X11_GetClipboardText(_THIS)
     unsigned long overflow;
     unsigned char *src;
     char *text;
+    Uint32 waitStart;
+    Uint32 waitElapsed;
     Atom XA_CLIPBOARD = XInternAtom(display, "CLIPBOARD", 0);
     if (XA_CLIPBOARD == None) {
         SDL_SetError("Couldn't access X clipboard");
-        return NULL;
+        return SDL_strdup("");
     }
 
     text = NULL;
@@ -116,10 +119,23 @@ X11_GetClipboardText(_THIS)
         XConvertSelection(display, XA_CLIPBOARD, format, selection, owner,
             CurrentTime);
 
-        /* FIXME: Should we have a timeout here? */
+        /* When using synergy on Linux and when data has been put in the clipboard
+           on the remote (Windows anyway) machine then selection_waiting may never
+           be set to False. Time out after a while. */
+        waitStart = SDL_GetTicks();
         videodata->selection_waiting = SDL_TRUE;
         while (videodata->selection_waiting) {
             SDL_PumpEvents();
+            waitElapsed = SDL_GetTicks() - waitStart;
+            /* Wait one second for a clipboard response. */
+            if (waitElapsed > 1000) {
+                videodata->selection_waiting = SDL_FALSE;
+                SDL_SetError("Clipboard timeout");
+                /* We need to set the clipboard text so that next time we won't
+                   timeout, otherwise we will hang on every call to this function. */
+                X11_SetClipboardText(_this, "");
+                return SDL_strdup("");
+            }
         }
     }
 

From b01b128353abca9bd2d12b15473532f91c56f38b Mon Sep 17 00:00:00 2001
From: =?UTF-8?q?J=C3=B8rgen=20P=2E=20Tjern=C3=B8?=
 
Date: Tue, 23 Jul 2013 17:38:59 -0700
Subject: [PATCH 418/542] Mac: Codify SDK and OS requirements, and clean up.

This #errors if you're using an SDK or deployment target that is less
than 10.6 and 10.5, respectively, and cleans up uses of
MAC_OS_X_VERSION_MIN_REQUIRED and MAC_OS_X_VERSION_MAX_ALLOWED according
to those requirements.
---
 build-scripts/g++-fat.sh             |  6 +--
 build-scripts/gcc-fat.sh             |  7 ++-
 cmake/sdlchecks.cmake                |  8 +--
 configure.in                         |  5 +-
 include/SDL_config_macosx.h          |  3 --
 include/SDL_platform.h               |  6 +++
 src/audio/coreaudio/SDL_coreaudio.h  |  3 --
 src/video/cocoa/SDL_cocoaclipboard.m |  4 --
 src/video/cocoa/SDL_cocoakeyboard.m  | 74 ++--------------------------
 src/video/cocoa/SDL_cocoamodes.m     | 43 ++--------------
 src/video/cocoa/SDL_cocoashape.m     |  8 +--
 src/video/cocoa/SDL_cocoavideo.h     | 10 ----
 src/video/cocoa/SDL_cocoawindow.h    |  5 --
 src/video/cocoa/SDL_cocoawindow.m    |  7 ---
 14 files changed, 30 insertions(+), 159 deletions(-)

diff --git a/build-scripts/g++-fat.sh b/build-scripts/g++-fat.sh
index 3c4cab717..6e4f53e7c 100755
--- a/build-scripts/g++-fat.sh
+++ b/build-scripts/g++-fat.sh
@@ -7,15 +7,13 @@
 DEVELOPER="`xcode-select -print-path`/Platforms/MacOSX.platform/Developer"
 
 # Intel 32-bit compiler flags (10.6 runtime compatibility)
-GCC_COMPILE_X86="g++ -arch i386 -mmacosx-version-min=10.6 \
--DMAC_OS_X_VERSION_MIN_REQUIRED=1040 \
+GCC_COMPILE_X86="g++ -arch i386 -mmacosx-version-min=10.5 \
 -I/usr/local/include"
 
-GCC_LINK_X86="-mmacosx-version-min=10.6"
+GCC_LINK_X86="-mmacosx-version-min=10.5"
 
 # Intel 64-bit compiler flags (10.6 runtime compatibility)
 GCC_COMPILE_X64="g++ -arch x86_64 -mmacosx-version-min=10.6 \
--DMAC_OS_X_VERSION_MIN_REQUIRED=1050 \
 -I/usr/local/include"
 
 GCC_LINK_X64="-mmacosx-version-min=10.6"
diff --git a/build-scripts/gcc-fat.sh b/build-scripts/gcc-fat.sh
index 1601c9db8..edabb0d87 100755
--- a/build-scripts/gcc-fat.sh
+++ b/build-scripts/gcc-fat.sh
@@ -6,12 +6,11 @@
 
 DEVELOPER="`xcode-select -print-path`/Platforms/MacOSX.platform/Developer"
 
-# Intel 32-bit compiler flags (10.6 runtime compatibility)
-GCC_COMPILE_X86="gcc -arch i386 -mmacosx-version-min=10.6 \
--DMAC_OS_X_VERSION_MIN_REQUIRED=1040 \
+# Intel 32-bit compiler flags (10.5 runtime compatibility)
+GCC_COMPILE_X86="gcc -arch i386 -mmacosx-version-min=10.5 \
 -I/usr/local/include"
 
-GCC_LINK_X86="-mmacosx-version-min=10.6"
+GCC_LINK_X86="-mmacosx-version-min=10.5"
 
 # Intel 64-bit compiler flags (10.6 runtime compatibility)
 GCC_COMPILE_X64="gcc -arch x86_64 -mmacosx-version-min=10.6 \
diff --git a/cmake/sdlchecks.cmake b/cmake/sdlchecks.cmake
index 7cabbc60c..4d7e34d4e 100644
--- a/cmake/sdlchecks.cmake
+++ b/cmake/sdlchecks.cmake
@@ -18,10 +18,10 @@ macro(CheckDLOPEN)
     endif()
     check_c_source_compiles("
        #include 
-       #if defined(MAC_OS_X_VERSION_MIN_REQUIRED) && MAC_OS_X_VERSION_MIN_REQUIRED <= 1020
-       #error Use dlcompat for Mac OS X 10.2 compatibility
-       #endif
-       int main(int argc, char **argv) {}" HAVE_DLOPEN)
+       int main(int argc, char **argv) {
+         void *handle = dlopen("", RTLD_NOW);
+         const char *loaderror = (char *) dlerror();
+       }" HAVE_DLOPEN)
     set(CMAKE_REQUIRED_LIBRARIES)
   endif()
 
diff --git a/configure.in b/configure.in
index 3346985ea..d2bd7a3d5 100644
--- a/configure.in
+++ b/configure.in
@@ -2129,9 +2129,8 @@ AC_HELP_STRING([--enable-sdl-dlopen], [use dlopen for shared object loading [[de
         AC_TRY_COMPILE([
          #include 
         ],[
-         #if defined(MAC_OS_X_VERSION_MIN_REQUIRED) && MAC_OS_X_VERSION_MIN_REQUIRED <= 1020
-         #error Use dlcompat for Mac OS X 10.2 compatibility
-         #endif
+         void *handle = dlopen("", RTLD_NOW);
+         const char *loaderror = (char *) dlerror();
         ],[
         have_dlopen=yes
         ])
diff --git a/include/SDL_config_macosx.h b/include/SDL_config_macosx.h
index a2d227478..68a0ebb9b 100644
--- a/include/SDL_config_macosx.h
+++ b/include/SDL_config_macosx.h
@@ -36,10 +36,7 @@
 #endif
 
 /* Useful headers */
-/* If we specified an SDK or have a post-PowerPC chip, then alloca.h exists. */
-#if ( (MAC_OS_X_VERSION_MIN_REQUIRED >= 1030) || (!defined(__POWERPC__)) )
 #define HAVE_ALLOCA_H       1
-#endif
 #define HAVE_SYS_TYPES_H    1
 #define HAVE_STDIO_H    1
 #define STDC_HEADERS    1
diff --git a/include/SDL_platform.h b/include/SDL_platform.h
index f4f23c41a..1e8e0d9f4 100644
--- a/include/SDL_platform.h
+++ b/include/SDL_platform.h
@@ -83,6 +83,12 @@
 /* if not compiling for iPhone */
 #undef __MACOSX__
 #define __MACOSX__  1
+#if MAC_OS_X_VERSION_MIN_REQUIRED < 1050
+# error SDL for Mac OS X only supports deploying on 10.5 and above.
+#endif /* MAC_OS_X_VERSION_MIN_REQUIRED < 1050 */
+#if MAC_OS_X_VERSION_MAX_ALLOWED < 1060
+# error SDL for Mac OS X must be built with a 10.6 SDK or above.
+#endif /* MAC_OS_X_VERSION_MAX_ALLOWED < 1060 */
 #endif /* TARGET_OS_IPHONE */
 #endif /* defined(__APPLE__) */
 
diff --git a/src/audio/coreaudio/SDL_coreaudio.h b/src/audio/coreaudio/SDL_coreaudio.h
index a05d4504f..2f0db5ba8 100644
--- a/src/audio/coreaudio/SDL_coreaudio.h
+++ b/src/audio/coreaudio/SDL_coreaudio.h
@@ -32,9 +32,6 @@
 #if MACOSX_COREAUDIO
 #include 
 #include 
-#if MAC_OS_X_VERSION_MAX_ALLOWED <= 1050
-#include 
-#endif
 #else
 #include 
 #endif
diff --git a/src/video/cocoa/SDL_cocoaclipboard.m b/src/video/cocoa/SDL_cocoaclipboard.m
index 27d222769..ab31031b4 100644
--- a/src/video/cocoa/SDL_cocoaclipboard.m
+++ b/src/video/cocoa/SDL_cocoaclipboard.m
@@ -28,7 +28,6 @@
 static NSString *
 GetTextFormat(_THIS)
 {
-#if MAC_OS_X_VERSION_MAX_ALLOWED >= 1060
     SDL_VideoData *data = (SDL_VideoData *) _this->driverdata;
 
     if (data->osversion >= 0x1060) {
@@ -36,9 +35,6 @@ GetTextFormat(_THIS)
     } else {
         return NSStringPboardType;
     }
-#else
-    return NSStringPboardType;
-#endif
 }
 
 int
diff --git a/src/video/cocoa/SDL_cocoakeyboard.m b/src/video/cocoa/SDL_cocoakeyboard.m
index 705b0358d..698343058 100644
--- a/src/video/cocoa/SDL_cocoakeyboard.m
+++ b/src/video/cocoa/SDL_cocoakeyboard.m
@@ -172,14 +172,9 @@
     return nil;
 }
 
-/* Needs long instead of NSInteger for compilation on Mac OS X 10.4 */
-#if MAC_OS_X_VERSION_MIN_REQUIRED < 1050
-- (long) conversationIdentifier
-#else
 - (NSInteger) conversationIdentifier
-#endif
 {
-    return (long) self;
+    return (NSInteger) self;
 }
 
 /* This method returns the index for character that is
@@ -486,22 +481,14 @@ HandleModifiers(_THIS, unsigned short scancode, unsigned int modifierFlags)
 static void
 UpdateKeymap(SDL_VideoData *data)
 {
-#if MAC_OS_X_VERSION_MAX_ALLOWED >= 1050
     TISInputSourceRef key_layout;
-#else
-    KeyboardLayoutRef key_layout;
-#endif
     const void *chr_data;
     int i;
     SDL_Scancode scancode;
     SDL_Keycode keymap[SDL_NUM_SCANCODES];
 
     /* See if the keymap needs to be updated */
-#if MAC_OS_X_VERSION_MAX_ALLOWED >= 1050
     key_layout = TISCopyCurrentKeyboardLayoutInputSource();
-#else
-    KLGetCurrentKeyboardLayout(&key_layout);
-#endif
     if (key_layout == data->key_layout) {
         return;
     }
@@ -509,16 +496,13 @@ UpdateKeymap(SDL_VideoData *data)
 
     SDL_GetDefaultKeymap(keymap);
 
-    /* Try Unicode data first (preferred as of Mac OS X 10.5) */
-#if MAC_OS_X_VERSION_MAX_ALLOWED >= 1050
+    /* Try Unicode data first */
     CFDataRef uchrDataRef = TISGetInputSourceProperty(key_layout, kTISPropertyUnicodeKeyLayoutData);
     if (uchrDataRef)
         chr_data = CFDataGetBytePtr(uchrDataRef);
     else
         goto cleanup;
-#else
-    KLGetKeyboardLayoutProperty(key_layout, kKLuchrData, &chr_data);
-#endif
+
     if (chr_data) {
         UInt32 keyboard_type = LMGetKbdType();
         OSStatus err;
@@ -552,60 +536,8 @@ UpdateKeymap(SDL_VideoData *data)
         return;
     }
 
-#if MAC_OS_X_VERSION_MAX_ALLOWED >= 1050
 cleanup:
     CFRelease(key_layout);
-#else
-    /* Fall back to older style key map data */
-    KLGetKeyboardLayoutProperty(key_layout, kKLKCHRData, &chr_data);
-    if (chr_data) {
-        for (i = 0; i < 128; i++) {
-            UInt32 c, state = 0;
-
-            /* Make sure this scancode is a valid character scancode */
-            scancode = darwin_scancode_table[i];
-            if (scancode == SDL_SCANCODE_UNKNOWN ||
-                (keymap[scancode] & SDLK_SCANCODE_MASK)) {
-                continue;
-            }
-
-            c = KeyTranslate (chr_data, i, &state) & 255;
-            if (state) {
-                /* Dead key, process key up */
-                c = KeyTranslate (chr_data, i | 128, &state) & 255;
-            }
-
-            if (c != 0 && c != 0x10) {
-                /* MacRoman to Unicode table, taken from X.org sources */
-                static const unsigned short macroman_table[128] = {
-                    0xc4, 0xc5, 0xc7, 0xc9, 0xd1, 0xd6, 0xdc, 0xe1,
-                    0xe0, 0xe2, 0xe4, 0xe3, 0xe5, 0xe7, 0xe9, 0xe8,
-                    0xea, 0xeb, 0xed, 0xec, 0xee, 0xef, 0xf1, 0xf3,
-                    0xf2, 0xf4, 0xf6, 0xf5, 0xfa, 0xf9, 0xfb, 0xfc,
-                    0x2020, 0xb0, 0xa2, 0xa3, 0xa7, 0x2022, 0xb6, 0xdf,
-                    0xae, 0xa9, 0x2122, 0xb4, 0xa8, 0x2260, 0xc6, 0xd8,
-                    0x221e, 0xb1, 0x2264, 0x2265, 0xa5, 0xb5, 0x2202, 0x2211,
-                    0x220f, 0x3c0, 0x222b, 0xaa, 0xba, 0x3a9, 0xe6, 0xf8,
-                    0xbf, 0xa1, 0xac, 0x221a, 0x192, 0x2248, 0x2206, 0xab,
-                    0xbb, 0x2026, 0xa0, 0xc0, 0xc3, 0xd5, 0x152, 0x153,
-                    0x2013, 0x2014, 0x201c, 0x201d, 0x2018, 0x2019, 0xf7, 0x25ca,
-                    0xff, 0x178, 0x2044, 0x20ac, 0x2039, 0x203a, 0xfb01, 0xfb02,
-                    0x2021, 0xb7, 0x201a, 0x201e, 0x2030, 0xc2, 0xca, 0xc1,
-                    0xcb, 0xc8, 0xcd, 0xce, 0xcf, 0xcc, 0xd3, 0xd4,
-                    0xf8ff, 0xd2, 0xda, 0xdb, 0xd9, 0x131, 0x2c6, 0x2dc,
-                    0xaf, 0x2d8, 0x2d9, 0x2da, 0xb8, 0x2dd, 0x2db, 0x2c7,
-                };
-
-                if (c >= 128) {
-                    c = macroman_table[c - 128];
-                }
-                keymap[scancode] = c;
-            }
-        }
-        SDL_SetKeymap(0, keymap, SDL_NUM_SCANCODES);
-        return;
-    }
-#endif
 }
 
 void
diff --git a/src/video/cocoa/SDL_cocoamodes.m b/src/video/cocoa/SDL_cocoamodes.m
index ad6ece279..f10e7ee20 100644
--- a/src/video/cocoa/SDL_cocoamodes.m
+++ b/src/video/cocoa/SDL_cocoamodes.m
@@ -30,6 +30,9 @@
 /* we need this for ShowMenuBar() and HideMenuBar(). */
 #include 
 
+/* This gets us MAC_OS_X_VERSION_MIN_REQUIRED... */
+#include 
+
 static inline void Cocoa_ToggleMenuBar(const BOOL show)
 {
     /* !!! FIXME: keep an eye on this.
@@ -47,33 +50,13 @@ static inline void Cocoa_ToggleMenuBar(const BOOL show)
 
 
 /* !!! FIXME: clean out the pre-10.6 code when it makes sense to do so. */
-#define FORCE_OLD_API 0 || (MAC_OS_X_VERSION_MAX_ALLOWED < 1060)
+#define FORCE_OLD_API 0
 
 #if FORCE_OLD_API
 #undef MAC_OS_X_VERSION_MIN_REQUIRED
 #define MAC_OS_X_VERSION_MIN_REQUIRED 1050
 #endif
 
-#if MAC_OS_X_VERSION_MAX_ALLOWED < 1050
-/*
-    Add methods to get at private members of NSScreen.
-    Since there is a bug in Apple's screen switching code
-    that does not update this variable when switching
-    to fullscreen, we'll set it manually (but only for the
-    main screen).
-*/
-@interface NSScreen (NSScreenAccess)
-- (void) setFrame:(NSRect)frame;
-@end
-
-@implementation NSScreen (NSScreenAccess)
-- (void) setFrame:(NSRect)frame;
-{
-    _frame = frame;
-}
-@end
-#endif
-
 static inline BOOL
 IS_SNOW_LEOPARD_OR_LATER(_THIS)
 {
@@ -142,7 +125,6 @@ GetDisplayMode(_THIS, const void *moderef, SDL_DisplayMode *mode)
     }
     data->moderef = moderef;
 
-    #if MAC_OS_X_VERSION_MAX_ALLOWED >= 1060
     if (IS_SNOW_LEOPARD_OR_LATER(_this)) {
         CGDisplayModeRef vidmode = (CGDisplayModeRef) moderef;
         CFStringRef fmt = CGDisplayModeCopyPixelEncoding(vidmode);
@@ -162,7 +144,6 @@ GetDisplayMode(_THIS, const void *moderef, SDL_DisplayMode *mode)
 
         CFRelease(fmt);
     }
-    #endif
 
     #if MAC_OS_X_VERSION_MIN_REQUIRED < 1060
     if (!IS_SNOW_LEOPARD_OR_LATER(_this)) {
@@ -201,23 +182,17 @@ GetDisplayMode(_THIS, const void *moderef, SDL_DisplayMode *mode)
 static inline void
 Cocoa_ReleaseDisplayMode(_THIS, const void *moderef)
 {
-    /* We don't own moderef unless we use the 10.6+ APIs. */
-    #if MAC_OS_X_VERSION_MAX_ALLOWED >= 1060
     if (IS_SNOW_LEOPARD_OR_LATER(_this)) {
         CGDisplayModeRelease((CGDisplayModeRef) moderef);  /* NULL is ok */
     }
-    #endif
 }
 
 static inline void
 Cocoa_ReleaseDisplayModeList(_THIS, CFArrayRef modelist)
 {
-    /* We don't own modelis unless we use the 10.6+ APIs. */
-    #if MAC_OS_X_VERSION_MAX_ALLOWED >= 1060
     if (IS_SNOW_LEOPARD_OR_LATER(_this)) {
         CFRelease(modelist);  /* NULL is ok */
     }
-    #endif
 }
 
 static const char *
@@ -280,11 +255,9 @@ Cocoa_InitModes(_THIS)
                 continue;
             }
 
-            #if MAC_OS_X_VERSION_MAX_ALLOWED >= 1060
             if (IS_SNOW_LEOPARD_OR_LATER(_this)) {
                 moderef = CGDisplayCopyDisplayMode(displays[i]);
             }
-            #endif
 
             #if MAC_OS_X_VERSION_MIN_REQUIRED < 1060
             if (!IS_SNOW_LEOPARD_OR_LATER(_this)) {
@@ -344,11 +317,9 @@ Cocoa_GetDisplayModes(_THIS, SDL_VideoDisplay * display)
     SDL_DisplayData *data = (SDL_DisplayData *) display->driverdata;
     CFArrayRef modes = NULL;
 
-    #if MAC_OS_X_VERSION_MAX_ALLOWED >= 1060
     if (IS_SNOW_LEOPARD_OR_LATER(_this)) {
         modes = CGDisplayCopyAllDisplayModes(data->display, NULL);
     }
-    #endif
 
     #if MAC_OS_X_VERSION_MIN_REQUIRED < 1060
     if (!IS_SNOW_LEOPARD_OR_LATER(_this)) {
@@ -364,11 +335,9 @@ Cocoa_GetDisplayModes(_THIS, SDL_VideoDisplay * display)
             const void *moderef = CFArrayGetValueAtIndex(modes, i);
             SDL_DisplayMode mode;
             if (GetDisplayMode(_this, moderef, &mode)) {
-                #if MAC_OS_X_VERSION_MAX_ALLOWED >= 1060
                 if (IS_SNOW_LEOPARD_OR_LATER(_this)) {
                     CGDisplayModeRetain((CGDisplayModeRef) moderef);
                 }
-                #endif
                 SDL_AddDisplayMode(display, &mode);
             }
         }
@@ -380,12 +349,10 @@ Cocoa_GetDisplayModes(_THIS, SDL_VideoDisplay * display)
 static CGError
 Cocoa_SwitchMode(_THIS, CGDirectDisplayID display, const void *mode)
 {
-    #if MAC_OS_X_VERSION_MAX_ALLOWED >= 1060
     if (IS_SNOW_LEOPARD_OR_LATER(_this)) {
         return CGDisplaySetDisplayMode(display, (CGDisplayModeRef) mode, NULL);
     }
-    #endif
-
+ 
     #if MAC_OS_X_VERSION_MIN_REQUIRED < 1060
     if (!IS_SNOW_LEOPARD_OR_LATER(_this)) {
         return CGDisplaySwitchToMode(display, (CFDictionaryRef) mode);
diff --git a/src/video/cocoa/SDL_cocoashape.m b/src/video/cocoa/SDL_cocoashape.m
index 3cde7d048..1be93dedb 100644
--- a/src/video/cocoa/SDL_cocoashape.m
+++ b/src/video/cocoa/SDL_cocoashape.m
@@ -33,9 +33,11 @@ SDL_WindowShaper*
 Cocoa_CreateShaper(SDL_Window* window) {
     SDL_WindowData* windata = (SDL_WindowData*)window->driverdata;
     [windata->nswindow setOpaque:NO];
-#if MAC_OS_X_VERSION_MIN_REQUIRED >= 1060
-    [windata->nswindow setStyleMask:NSBorderlessWindowMask];
-#endif
+
+    if ([windata->nswindow respondsToSelector:@selector(setStyleMask:)]) {
+        [windata->nswindow setStyleMask:NSBorderlessWindowMask];
+    }
+
     SDL_WindowShaper* result = result = malloc(sizeof(SDL_WindowShaper));
     result->window = window;
     result->mode.mode = ShapeModeDefault;
diff --git a/src/video/cocoa/SDL_cocoavideo.h b/src/video/cocoa/SDL_cocoavideo.h
index cde0a38cf..5f8be5316 100644
--- a/src/video/cocoa/SDL_cocoavideo.h
+++ b/src/video/cocoa/SDL_cocoavideo.h
@@ -39,16 +39,6 @@
 #include "SDL_cocoaopengl.h"
 #include "SDL_cocoawindow.h"
 
-#if MAC_OS_X_VERSION_MAX_ALLOWED < 1050
-#if __LP64__
-typedef long NSInteger;
-typedef unsigned long NSUInteger;
-#else
-typedef int NSInteger;
-typedef unsigned int NSUInteger;
-#endif
-#endif
-
 /* Private display data */
 
 @class SDLTranslatorResponder;
diff --git a/src/video/cocoa/SDL_cocoawindow.h b/src/video/cocoa/SDL_cocoawindow.h
index d348c34d1..01ff63880 100644
--- a/src/video/cocoa/SDL_cocoawindow.h
+++ b/src/video/cocoa/SDL_cocoawindow.h
@@ -27,12 +27,7 @@
 
 typedef struct SDL_WindowData SDL_WindowData;
 
-/* *INDENT-OFF* */
-#if MAC_OS_X_VERSION_MIN_REQUIRED >= 1060
 @interface Cocoa_WindowListener : NSResponder  {
-#else
-@interface Cocoa_WindowListener : NSResponder {
-#endif
     SDL_WindowData *_data;
     BOOL observingVisible;
     BOOL wasVisible;
diff --git a/src/video/cocoa/SDL_cocoawindow.m b/src/video/cocoa/SDL_cocoawindow.m
index a48a074ea..d94c56744 100644
--- a/src/video/cocoa/SDL_cocoawindow.m
+++ b/src/video/cocoa/SDL_cocoawindow.m
@@ -81,11 +81,9 @@ static __inline__ void ConvertNSRect(NSRect *r)
 
     [view setNextResponder:self];
 
-#if MAC_OS_X_VERSION_MAX_ALLOWED >= 1060
     if ([view respondsToSelector:@selector(setAcceptsTouchEvents:)]) {
         [view setAcceptsTouchEvents:YES];
     }
-#endif
 }
 
 - (void)observeValueForKeyPath:(NSString *)keyPath
@@ -450,7 +448,6 @@ static __inline__ void ConvertNSRect(NSRect *r)
 
 - (void)handleTouches:(cocoaTouchType)type withEvent:(NSEvent *)event
 {
-#if MAC_OS_X_VERSION_MAX_ALLOWED >= 1060
     NSSet *touches = 0;
     NSEnumerator *enumerator;
     NSTouch *touch;
@@ -499,7 +496,6 @@ static __inline__ void ConvertNSRect(NSRect *r)
 
         touch = (NSTouch*)[enumerator nextObject];
     }
-#endif /* MAC_OS_X_VERSION_MAX_ALLOWED >= 1060 */
 }
 
 @end
@@ -939,8 +935,6 @@ Cocoa_RebuildWindow(SDL_WindowData * data, NSWindow * nswindow, unsigned style)
 void
 Cocoa_SetWindowBordered(_THIS, SDL_Window * window, SDL_bool bordered)
 {
-    /* this message arrived in 10.6. You're out of luck on older OSes. */
-#if MAC_OS_X_VERSION_MAX_ALLOWED >= 1060
     NSAutoreleasePool *pool = [[NSAutoreleasePool alloc] init];
     NSWindow *nswindow = ((SDL_WindowData *) window->driverdata)->nswindow;
     if ([nswindow respondsToSelector:@selector(setStyleMask:)]) {
@@ -950,7 +944,6 @@ Cocoa_SetWindowBordered(_THIS, SDL_Window * window, SDL_bool bordered)
         }
     }
     [pool release];
-#endif
 }
 
 void

From e007150b450c49ddd10c3ea99790e9bb03254194 Mon Sep 17 00:00:00 2001
From: =?UTF-8?q?J=C3=B8rgen=20P=2E=20Tjern=C3=B8?=
 
Date: Tue, 23 Jul 2013 17:40:13 -0700
Subject: [PATCH 419/542] Fix some clang analyzer warnings.

This fixes some analyzer warnings and a couple of minor memory leaks.
---
 src/events/SDL_gesture.c          | 2 +-
 src/render/SDL_render.c           | 2 +-
 src/video/SDL_surface.c           | 2 ++
 src/video/SDL_video.c             | 7 +++++--
 src/video/cocoa/SDL_cocoaevents.m | 6 +++++-
 src/video/cocoa/SDL_cocoashape.m  | 1 +
 6 files changed, 15 insertions(+), 5 deletions(-)

diff --git a/src/events/SDL_gesture.c b/src/events/SDL_gesture.c
index 8e764318a..f0a62c002 100644
--- a/src/events/SDL_gesture.c
+++ b/src/events/SDL_gesture.c
@@ -392,7 +392,7 @@ static int dollarNormalize(const SDL_DollarPath *path,SDL_FloatPoint *points)
 static float dollarRecognize(const SDL_DollarPath *path,int *bestTempl,SDL_GestureTouch* touch)
 {
 
-    SDL_FloatPoint points[DOLLARNPOINTS];
+    SDL_FloatPoint points[DOLLARNPOINTS] = {};
     int i;
     float bestDiff = 10000;
 
diff --git a/src/render/SDL_render.c b/src/render/SDL_render.c
index c87ba2f14..383ba456e 100644
--- a/src/render/SDL_render.c
+++ b/src/render/SDL_render.c
@@ -1467,7 +1467,7 @@ SDL_RenderDrawRects(SDL_Renderer * renderer,
 int
 SDL_RenderFillRect(SDL_Renderer * renderer, const SDL_Rect * rect)
 {
-    SDL_Rect full_rect;
+    SDL_Rect full_rect = {};
 
     CHECK_RENDERER_MAGIC(renderer, -1);
 
diff --git a/src/video/SDL_surface.c b/src/video/SDL_surface.c
index 17f253c2c..594964181 100644
--- a/src/video/SDL_surface.c
+++ b/src/video/SDL_surface.c
@@ -619,6 +619,8 @@ SDL_UpperBlitScaled(SDL_Surface * src, const SDL_Rect * srcrect,
     /* If the destination rectangle is NULL, use the entire dest surface */
     if (dstrect == NULL) {
         fulldst.x = fulldst.y = 0;
+        fulldst.w = dst->w;
+        fulldst.h = dst->h;
         dstrect = &fulldst;
     }
 
diff --git a/src/video/SDL_video.c b/src/video/SDL_video.c
index 8b3c2f073..21b46523b 100644
--- a/src/video/SDL_video.c
+++ b/src/video/SDL_video.c
@@ -3062,8 +3062,11 @@ static SDL_bool SDL_MessageboxValidForDriver(const SDL_MessageBoxData *messagebo
     }
 
     SDL_VERSION(&info.version);
-    SDL_GetWindowWMInfo(window, &info);
-    return (info.subsystem == drivertype);
+    if (!SDL_GetWindowWMInfo(window, &info)) {
+        return SDL_TRUE;
+    } else {
+        return (info.subsystem == drivertype);
+    }
 }
 
 int
diff --git a/src/video/cocoa/SDL_cocoaevents.m b/src/video/cocoa/SDL_cocoaevents.m
index 61d6e1596..c1d40c0f2 100644
--- a/src/video/cocoa/SDL_cocoaevents.m
+++ b/src/video/cocoa/SDL_cocoaevents.m
@@ -138,6 +138,10 @@ CreateApplicationMenus(void)
     NSMenu *windowMenu;
     NSMenuItem *menuItem;
 
+    if (!NSApp) {
+        return;
+    }
+    
     /* Create the main menu bar */
     [NSApp setMainMenu:[[NSMenu alloc] init]];
 
@@ -228,7 +232,7 @@ Cocoa_RegisterApp(void)
         }
         [NSApp finishLaunching];
     }
-    if ([NSApp delegate] == nil) {
+    if (NSApp && ![NSApp delegate]) {
         [NSApp setDelegate:[[SDLAppDelegate alloc] init]];
     }
     [pool release];
diff --git a/src/video/cocoa/SDL_cocoashape.m b/src/video/cocoa/SDL_cocoashape.m
index 1be93dedb..71085261a 100644
--- a/src/video/cocoa/SDL_cocoashape.m
+++ b/src/video/cocoa/SDL_cocoashape.m
@@ -96,6 +96,7 @@ Cocoa_SetWindowShape(SDL_WindowShaper *shaper,SDL_Surface *shape,SDL_WindowShape
     closure.window = shaper->window;
     SDL_TraverseShapeTree(data->shape,&ConvertRects,&closure);
     [closure.path addClip];
+    [pool release];
 
     return 0;
 }

From 8c0d5be080068abd1d6b339ae6d3492ce2bb2282 Mon Sep 17 00:00:00 2001
From: =?UTF-8?q?J=C3=B8rgen=20P=2E=20Tjern=C3=B8?=
 
Date: Tue, 23 Jul 2013 17:40:16 -0700
Subject: [PATCH 420/542] Fix build errors from last change.

---
 src/events/SDL_gesture.c | 2 +-
 src/render/SDL_render.c  | 2 +-
 2 files changed, 2 insertions(+), 2 deletions(-)

diff --git a/src/events/SDL_gesture.c b/src/events/SDL_gesture.c
index f0a62c002..020b36388 100644
--- a/src/events/SDL_gesture.c
+++ b/src/events/SDL_gesture.c
@@ -392,7 +392,7 @@ static int dollarNormalize(const SDL_DollarPath *path,SDL_FloatPoint *points)
 static float dollarRecognize(const SDL_DollarPath *path,int *bestTempl,SDL_GestureTouch* touch)
 {
 
-    SDL_FloatPoint points[DOLLARNPOINTS] = {};
+    SDL_FloatPoint points[DOLLARNPOINTS] = {{0}};
     int i;
     float bestDiff = 10000;
 
diff --git a/src/render/SDL_render.c b/src/render/SDL_render.c
index 383ba456e..410ee8928 100644
--- a/src/render/SDL_render.c
+++ b/src/render/SDL_render.c
@@ -1467,7 +1467,7 @@ SDL_RenderDrawRects(SDL_Renderer * renderer,
 int
 SDL_RenderFillRect(SDL_Renderer * renderer, const SDL_Rect * rect)
 {
-    SDL_Rect full_rect = {};
+    SDL_Rect full_rect = {0};
 
     CHECK_RENDERER_MAGIC(renderer, -1);
 

From aa5f318964d860b2bbad09316b836b58127543cc Mon Sep 17 00:00:00 2001
From: =?UTF-8?q?J=C3=B8rgen=20P=2E=20Tjern=C3=B8?=
 
Date: Tue, 23 Jul 2013 17:40:18 -0700
Subject: [PATCH 421/542] = {{0}} generates a memset() in MSVC, which isn't
 linked. Whoops!

---
 src/events/SDL_gesture.c | 5 +++--
 1 file changed, 3 insertions(+), 2 deletions(-)

diff --git a/src/events/SDL_gesture.c b/src/events/SDL_gesture.c
index 020b36388..e987fcfbf 100644
--- a/src/events/SDL_gesture.c
+++ b/src/events/SDL_gesture.c
@@ -391,11 +391,12 @@ static int dollarNormalize(const SDL_DollarPath *path,SDL_FloatPoint *points)
 
 static float dollarRecognize(const SDL_DollarPath *path,int *bestTempl,SDL_GestureTouch* touch)
 {
-
-    SDL_FloatPoint points[DOLLARNPOINTS] = {{0}};
+    SDL_FloatPoint points[DOLLARNPOINTS];
     int i;
     float bestDiff = 10000;
 
+    SDL_memset(points, 0, sizeof(points));
+
     dollarNormalize(path,points);
 
     //PrintPath(points);

From ccb139c73aaa119b31fc83096d65cad3d6d51069 Mon Sep 17 00:00:00 2001
From: Sam Lantinga 
Date: Tue, 23 Jul 2013 19:18:01 -0700
Subject: [PATCH 422/542] A little cleanup on the cleanup, just for
 consistency.

---
 src/render/SDL_render.c           | 2 +-
 src/video/SDL_surface.c           | 2 ++
 src/video/cocoa/SDL_cocoaevents.m | 2 +-
 3 files changed, 4 insertions(+), 2 deletions(-)

diff --git a/src/render/SDL_render.c b/src/render/SDL_render.c
index 410ee8928..3cf467d64 100644
--- a/src/render/SDL_render.c
+++ b/src/render/SDL_render.c
@@ -1467,7 +1467,7 @@ SDL_RenderDrawRects(SDL_Renderer * renderer,
 int
 SDL_RenderFillRect(SDL_Renderer * renderer, const SDL_Rect * rect)
 {
-    SDL_Rect full_rect = {0};
+    SDL_Rect full_rect = { 0, 0, 0, 0 };
 
     CHECK_RENDERER_MAGIC(renderer, -1);
 
diff --git a/src/video/SDL_surface.c b/src/video/SDL_surface.c
index 594964181..ea7168865 100644
--- a/src/video/SDL_surface.c
+++ b/src/video/SDL_surface.c
@@ -529,6 +529,8 @@ SDL_UpperBlit(SDL_Surface * src, const SDL_Rect * srcrect,
     /* If the destination rectangle is NULL, use the entire dest surface */
     if (dstrect == NULL) {
         fulldst.x = fulldst.y = 0;
+        fulldst.w = dst->w;
+        fulldst.h = dst->h;
         dstrect = &fulldst;
     }
 
diff --git a/src/video/cocoa/SDL_cocoaevents.m b/src/video/cocoa/SDL_cocoaevents.m
index c1d40c0f2..f0a65e322 100644
--- a/src/video/cocoa/SDL_cocoaevents.m
+++ b/src/video/cocoa/SDL_cocoaevents.m
@@ -138,7 +138,7 @@ CreateApplicationMenus(void)
     NSMenu *windowMenu;
     NSMenuItem *menuItem;
 
-    if (!NSApp) {
+    if (NSApp == nil) {
         return;
     }
     

From 9583071066a0b06e31399c053888bfc648631218 Mon Sep 17 00:00:00 2001
From: Sam Lantinga 
Date: Tue, 23 Jul 2013 19:20:03 -0700
Subject: [PATCH 423/542] Fix for recent GLX error bug

Lee Salzman

I messed up in the patch I sent you regarding gobbling up the GLX error codes signaled when trying to create a context. After reading the spec I realized those error codes are relative to a base error that needs to be queried when setting up the GLX extension...

So I have made a patch that fixes it for a user I had who was still getting the bug with my old patch.

Without this patch my previous one won't work, so it is recommended to merge this...
---
 src/video/x11/SDL_x11opengl.c | 23 +++++++++++++++++++----
 src/video/x11/SDL_x11opengl.h |  3 +++
 2 files changed, 22 insertions(+), 4 deletions(-)

diff --git a/src/video/x11/SDL_x11opengl.c b/src/video/x11/SDL_x11opengl.c
index 1ccc66c4e..2eaed8698 100644
--- a/src/video/x11/SDL_x11opengl.c
+++ b/src/video/x11/SDL_x11opengl.c
@@ -133,6 +133,7 @@ static void X11_GL_InitExtensions(_THIS);
 int
 X11_GL_LoadLibrary(_THIS, const char *path)
 {
+    Display *display;
     void *handle;
 
     if (_this->gl_data) {
@@ -186,6 +187,9 @@ X11_GL_LoadLibrary(_THIS, const char *path)
 
     /* Load function pointers */
     handle = _this->gl_config.dll_handle;
+    _this->gl_data->glXQueryExtension =
+        (Bool (*)(Display *, int *, int *))
+            GL_LoadFunction(handle, "glXQueryExtension");
     _this->gl_data->glXGetProcAddress =
         (void *(*)(const GLubyte *))
             GL_LoadFunction(handle, "glXGetProcAddressARB");
@@ -208,7 +212,8 @@ X11_GL_LoadLibrary(_THIS, const char *path)
         (void (*)(Display*,GLXDrawable,int,unsigned int*))
             X11_GL_GetProcAddress(_this, "glXQueryDrawable");
 
-    if (!_this->gl_data->glXChooseVisual ||
+    if (!_this->gl_data->glXQueryExtension ||
+        !_this->gl_data->glXChooseVisual ||
         !_this->gl_data->glXCreateContext ||
         !_this->gl_data->glXDestroyContext ||
         !_this->gl_data->glXMakeCurrent ||
@@ -216,6 +221,11 @@ X11_GL_LoadLibrary(_THIS, const char *path)
         return SDL_SetError("Could not retrieve OpenGL functions");
     }
 
+    display = ((SDL_VideoData *) _this->driverdata)->display;
+    if (!_this->gl_data->glXQueryExtension(display, &_this->gl_data->errorBase, &_this->gl_data->eventBase)) {
+        return SDL_SetError("GLX is not supported");
+    }
+
     /* Initialize extensions */
     X11_GL_InitExtensions(_this);
 
@@ -504,19 +514,23 @@ X11_GL_GetVisual(_THIS, Display * display, int screen)
 #define GLXBadProfileARB 13
 #endif
 static int (*handler) (Display *, XErrorEvent *) = NULL;
+static int errorBase = 0;
 static int
 X11_GL_CreateContextErrorHandler(Display * d, XErrorEvent * e)
 {
     switch (e->error_code) {
-    case GLXBadContext:
-    case GLXBadFBConfig:
-    case GLXBadProfileARB:
     case BadRequest:
     case BadMatch:
     case BadValue:
     case BadAlloc:
         return (0);
     default:
+        if (errorBase && 
+            (e->error_code == errorBase + GLXBadContext ||
+             e->error_code == errorBase + GLXBadFBConfig ||
+             e->error_code == errorBase + GLXBadProfileARB)) {
+            return (0);
+        }
         return (handler(d, e));
     }
 }
@@ -541,6 +555,7 @@ X11_GL_CreateContext(_THIS, SDL_Window * window)
 
     /* We do this to create a clean separation between X and GLX errors. */
     XSync(display, False);
+    errorBase = _this->gl_data->errorBase;
     handler = XSetErrorHandler(X11_GL_CreateContextErrorHandler);
     XGetWindowAttributes(display, data->xwindow, &xattr);
     v.screen = screen;
diff --git a/src/video/x11/SDL_x11opengl.h b/src/video/x11/SDL_x11opengl.h
index 69ad1c2b9..db1b3152e 100644
--- a/src/video/x11/SDL_x11opengl.h
+++ b/src/video/x11/SDL_x11opengl.h
@@ -29,10 +29,13 @@
 
 struct SDL_GLDriverData
 {
+    int errorBase, eventBase;
+
     SDL_bool HAS_GLX_EXT_visual_rating;
     SDL_bool HAS_GLX_EXT_visual_info;
     SDL_bool HAS_GLX_EXT_swap_control_tear;
 
+    Bool (*glXQueryExtension) (Display*,int*,int*);
     void *(*glXGetProcAddress) (const GLubyte*);
     XVisualInfo *(*glXChooseVisual) (Display*,int,int*);
     GLXContext (*glXCreateContext) (Display*,XVisualInfo*,GLXContext,Bool);

From e44d24ff29d09af6c0f236bb1150367d8d775a70 Mon Sep 17 00:00:00 2001
From: Philipp Wiesemann 
Date: Wed, 24 Jul 2013 22:19:01 +0200
Subject: [PATCH 424/542] Removed unused variables to fix warnings in test
 program.

---
 test/testrendertarget.c | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/test/testrendertarget.c b/test/testrendertarget.c
index 34c7703a4..903d60c2a 100644
--- a/test/testrendertarget.c
+++ b/test/testrendertarget.c
@@ -91,7 +91,7 @@ void
 DrawComposite(DrawState *s)
 {
     SDL_Rect viewport, R;
-    SDL_Texture *target, *A, *B;
+    SDL_Texture *target;
 
     static SDL_bool blend_tested = SDL_FALSE;
     if (!blend_tested) {

From e722fd86e9455dbf40e8368042d7223788a78437 Mon Sep 17 00:00:00 2001
From: Philipp Wiesemann 
Date: Wed, 24 Jul 2013 22:20:03 +0200
Subject: [PATCH 425/542] Removed unreachable code.

---
 src/core/android/SDL_android.c | 1 -
 1 file changed, 1 deletion(-)

diff --git a/src/core/android/SDL_android.c b/src/core/android/SDL_android.c
index 74a41607a..3dbafebd4 100644
--- a/src/core/android/SDL_android.c
+++ b/src/core/android/SDL_android.c
@@ -799,7 +799,6 @@ size_t Android_JNI_FileRead(SDL_RWops* ctx, void* buffer,
         LocalReferenceHolder_Cleanup(&refs);                    
         return bytesRead / size;
     }
-    LocalReferenceHolder_Cleanup(&refs);            
 }
 
 size_t Android_JNI_FileWrite(SDL_RWops* ctx, const void* buffer,

From adce8bf505977c2d6301193e588e85183b4c58be Mon Sep 17 00:00:00 2001
From: Philipp Wiesemann 
Date: Wed, 24 Jul 2013 22:23:19 +0200
Subject: [PATCH 426/542] Corrected internal documentation in source. The
 parameter silent is no longer optional.

---
 src/core/android/SDL_android.c | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/src/core/android/SDL_android.c b/src/core/android/SDL_android.c
index 3dbafebd4..06713b099 100644
--- a/src/core/android/SDL_android.c
+++ b/src/core/android/SDL_android.c
@@ -530,7 +530,7 @@ void Android_JNI_CloseAudioDevice()
 }
 
 // Test for an exception and call SDL_SetError with its detail if one occurs
-// If optional parameter silent is truthy then SDL_SetError() is not called.
+// If the parameter silent is truthy then SDL_SetError() will not be called.
 static bool Android_JNI_ExceptionOccurred(bool silent)
 {
     SDL_assert(LocalReferenceHolder_IsActive());

From 5cdb605a4113c97e29831e6acf3b38988bb7f9a7 Mon Sep 17 00:00:00 2001
From: Philipp Wiesemann 
Date: Wed, 24 Jul 2013 22:25:17 +0200
Subject: [PATCH 427/542] Corrected return value to be of correct type.

---
 src/core/android/SDL_android.c | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/src/core/android/SDL_android.c b/src/core/android/SDL_android.c
index 06713b099..922deaa8e 100644
--- a/src/core/android/SDL_android.c
+++ b/src/core/android/SDL_android.c
@@ -293,7 +293,7 @@ static SDL_bool LocalReferenceHolder_Init(struct LocalReferenceHolder *refholder
     const int capacity = 16;
     if ((*env)->PushLocalFrame(env, capacity) < 0) {
         SDL_SetError("Failed to allocate enough JVM local references");
-        return false;
+        return SDL_FALSE;
     }
     ++s_active;
     refholder->m_env = env;

From e2a14cf5ddf922b7bcf39211f0ee76b5b4dd6480 Mon Sep 17 00:00:00 2001
From: Sam Lantinga 
Date: Thu, 25 Jul 2013 09:51:21 -0700
Subject: [PATCH 428/542] Updated the copyright year for the test programs

---
 test/checkkeys.c          | 2 +-
 test/loopwave.c           | 2 +-
 test/testatomic.c         | 2 +-
 test/testaudioinfo.c      | 2 +-
 test/testautomation.c     | 2 +-
 test/testdraw2.c          | 2 +-
 test/testerror.c          | 2 +-
 test/testfile.c           | 2 +-
 test/testgamecontroller.c | 2 +-
 test/testgesture.c        | 2 +-
 test/testgl2.c            | 2 +-
 test/testgles.c           | 2 +-
 test/testhaptic.c         | 2 +-
 test/testiconv.c          | 2 +-
 test/testime.c            | 2 +-
 test/testintersections.c  | 2 +-
 test/testjoystick.c       | 2 +-
 test/testkeys.c           | 2 +-
 test/testloadso.c         | 2 +-
 test/testlock.c           | 2 +-
 test/testmessage.c        | 2 +-
 test/testmultiaudio.c     | 2 +-
 test/testnative.c         | 2 +-
 test/testnativew32.c      | 2 +-
 test/testnativex11.c      | 2 +-
 test/testoverlay2.c       | 2 +-
 test/testplatform.c       | 2 +-
 test/testpower.c          | 2 +-
 test/testrelative.c       | 2 +-
 test/testrendercopyex.c   | 2 +-
 test/testrendertarget.c   | 2 +-
 test/testresample.c       | 2 +-
 test/testrumble.c         | 2 +-
 test/testscale.c          | 2 +-
 test/testsem.c            | 2 +-
 test/testshader.c         | 2 +-
 test/testshape.c          | 2 +-
 test/testsprite2.c        | 2 +-
 test/testspriteminimal.c  | 2 +-
 test/teststreaming.c      | 2 +-
 test/testthread.c         | 2 +-
 test/testtimer.c          | 2 +-
 test/testver.c            | 2 +-
 test/testwm2.c            | 2 +-
 test/torturethread.c      | 2 +-
 45 files changed, 45 insertions(+), 45 deletions(-)

diff --git a/test/checkkeys.c b/test/checkkeys.c
index 99a7bfce3..61e8be043 100644
--- a/test/checkkeys.c
+++ b/test/checkkeys.c
@@ -1,5 +1,5 @@
 /*
-  Copyright (C) 1997-2011 Sam Lantinga 
+  Copyright (C) 1997-2013 Sam Lantinga 
 
   This software is provided 'as-is', without any express or implied
   warranty.  In no event will the authors be held liable for any damages
diff --git a/test/loopwave.c b/test/loopwave.c
index 11c0f1b41..22b0559de 100644
--- a/test/loopwave.c
+++ b/test/loopwave.c
@@ -1,5 +1,5 @@
 /*
-  Copyright (C) 1997-2011 Sam Lantinga 
+  Copyright (C) 1997-2013 Sam Lantinga 
 
   This software is provided 'as-is', without any express or implied
   warranty.  In no event will the authors be held liable for any damages
diff --git a/test/testatomic.c b/test/testatomic.c
index 2edcd994f..7205c0274 100644
--- a/test/testatomic.c
+++ b/test/testatomic.c
@@ -1,5 +1,5 @@
 /*
-  Copyright (C) 1997-2011 Sam Lantinga 
+  Copyright (C) 1997-2013 Sam Lantinga 
 
   This software is provided 'as-is', without any express or implied
   warranty.  In no event will the authors be held liable for any damages
diff --git a/test/testaudioinfo.c b/test/testaudioinfo.c
index a39811a2b..c1d7fa389 100644
--- a/test/testaudioinfo.c
+++ b/test/testaudioinfo.c
@@ -1,5 +1,5 @@
 /*
-  Copyright (C) 1997-2011 Sam Lantinga 
+  Copyright (C) 1997-2013 Sam Lantinga 
 
   This software is provided 'as-is', without any express or implied
   warranty.  In no event will the authors be held liable for any damages
diff --git a/test/testautomation.c b/test/testautomation.c
index be3bd7ff8..5eea7ec6f 100644
--- a/test/testautomation.c
+++ b/test/testautomation.c
@@ -1,5 +1,5 @@
 /*
-  Copyright (C) 1997-2011 Sam Lantinga 
+  Copyright (C) 1997-2013 Sam Lantinga 
 
   This software is provided 'as-is', without any express or implied
   warranty.  In no event will the authors be held liable for any damages
diff --git a/test/testdraw2.c b/test/testdraw2.c
index 272c5067b..a4509fe74 100644
--- a/test/testdraw2.c
+++ b/test/testdraw2.c
@@ -1,5 +1,5 @@
 /*
-  Copyright (C) 1997-2011 Sam Lantinga 
+  Copyright (C) 1997-2013 Sam Lantinga 
 
   This software is provided 'as-is', without any express or implied
   warranty.  In no event will the authors be held liable for any damages
diff --git a/test/testerror.c b/test/testerror.c
index d96fcc59b..e7356c06b 100644
--- a/test/testerror.c
+++ b/test/testerror.c
@@ -1,5 +1,5 @@
 /*
-  Copyright (C) 1997-2011 Sam Lantinga 
+  Copyright (C) 1997-2013 Sam Lantinga 
 
   This software is provided 'as-is', without any express or implied
   warranty.  In no event will the authors be held liable for any damages
diff --git a/test/testfile.c b/test/testfile.c
index 6496eccd3..1aaa3a8db 100644
--- a/test/testfile.c
+++ b/test/testfile.c
@@ -1,5 +1,5 @@
 /*
-  Copyright (C) 1997-2011 Sam Lantinga 
+  Copyright (C) 1997-2013 Sam Lantinga 
 
   This software is provided 'as-is', without any express or implied
   warranty.  In no event will the authors be held liable for any damages
diff --git a/test/testgamecontroller.c b/test/testgamecontroller.c
index e5e1538ba..cd18aa5cc 100644
--- a/test/testgamecontroller.c
+++ b/test/testgamecontroller.c
@@ -1,5 +1,5 @@
 /*
-  Copyright (C) 1997-2011 Sam Lantinga 
+  Copyright (C) 1997-2013 Sam Lantinga 
 
   This software is provided 'as-is', without any express or implied
   warranty.  In no event will the authors be held liable for any damages
diff --git a/test/testgesture.c b/test/testgesture.c
index 9b506ead3..e2a9694ae 100644
--- a/test/testgesture.c
+++ b/test/testgesture.c
@@ -1,5 +1,5 @@
 /*
-  Copyright (C) 1997-2011 Sam Lantinga 
+  Copyright (C) 1997-2013 Sam Lantinga 
 
   This software is provided 'as-is', without any express or implied
   warranty.  In no event will the authors be held liable for any damages
diff --git a/test/testgl2.c b/test/testgl2.c
index f01bbd806..eb1a245e3 100644
--- a/test/testgl2.c
+++ b/test/testgl2.c
@@ -1,5 +1,5 @@
 /*
-  Copyright (C) 1997-2011 Sam Lantinga 
+  Copyright (C) 1997-2013 Sam Lantinga 
 
   This software is provided 'as-is', without any express or implied
   warranty.  In no event will the authors be held liable for any damages
diff --git a/test/testgles.c b/test/testgles.c
index 6a4a6deae..41312a8bb 100644
--- a/test/testgles.c
+++ b/test/testgles.c
@@ -1,5 +1,5 @@
 /*
-  Copyright (C) 1997-2011 Sam Lantinga 
+  Copyright (C) 1997-2013 Sam Lantinga 
 
   This software is provided 'as-is', without any express or implied
   warranty.  In no event will the authors be held liable for any damages
diff --git a/test/testhaptic.c b/test/testhaptic.c
index e832815b7..524554db7 100644
--- a/test/testhaptic.c
+++ b/test/testhaptic.c
@@ -1,5 +1,5 @@
 /*
-  Copyright (C) 1997-2011 Sam Lantinga 
+  Copyright (C) 1997-2013 Sam Lantinga 
 
   This software is provided 'as-is', without any express or implied
   warranty.  In no event will the authors be held liable for any damages
diff --git a/test/testiconv.c b/test/testiconv.c
index d6738df44..d2081995d 100644
--- a/test/testiconv.c
+++ b/test/testiconv.c
@@ -1,5 +1,5 @@
 /*
-  Copyright (C) 1997-2011 Sam Lantinga 
+  Copyright (C) 1997-2013 Sam Lantinga 
 
   This software is provided 'as-is', without any express or implied
   warranty.  In no event will the authors be held liable for any damages
diff --git a/test/testime.c b/test/testime.c
index 2fa65e6e1..ce9f02b1f 100644
--- a/test/testime.c
+++ b/test/testime.c
@@ -1,5 +1,5 @@
 /*
-  Copyright (C) 1997-2011 Sam Lantinga 
+  Copyright (C) 1997-2013 Sam Lantinga 
 
   This software is provided 'as-is', without any express or implied
   warranty.  In no event will the authors be held liable for any damages
diff --git a/test/testintersections.c b/test/testintersections.c
index 638c399c8..d858717e5 100644
--- a/test/testintersections.c
+++ b/test/testintersections.c
@@ -1,5 +1,5 @@
 /*
-  Copyright (C) 1997-2011 Sam Lantinga 
+  Copyright (C) 1997-2013 Sam Lantinga 
 
   This software is provided 'as-is', without any express or implied
   warranty.  In no event will the authors be held liable for any damages
diff --git a/test/testjoystick.c b/test/testjoystick.c
index d6dfee6d9..da307ed29 100644
--- a/test/testjoystick.c
+++ b/test/testjoystick.c
@@ -1,5 +1,5 @@
 /*
-  Copyright (C) 1997-2011 Sam Lantinga 
+  Copyright (C) 1997-2013 Sam Lantinga 
 
   This software is provided 'as-is', without any express or implied
   warranty.  In no event will the authors be held liable for any damages
diff --git a/test/testkeys.c b/test/testkeys.c
index 763ee3b29..71f895602 100644
--- a/test/testkeys.c
+++ b/test/testkeys.c
@@ -1,5 +1,5 @@
 /*
-  Copyright (C) 1997-2011 Sam Lantinga 
+  Copyright (C) 1997-2013 Sam Lantinga 
 
   This software is provided 'as-is', without any express or implied
   warranty.  In no event will the authors be held liable for any damages
diff --git a/test/testloadso.c b/test/testloadso.c
index 0dde5f0d0..4bf7bf654 100644
--- a/test/testloadso.c
+++ b/test/testloadso.c
@@ -1,5 +1,5 @@
 /*
-  Copyright (C) 1997-2011 Sam Lantinga 
+  Copyright (C) 1997-2013 Sam Lantinga 
 
   This software is provided 'as-is', without any express or implied
   warranty.  In no event will the authors be held liable for any damages
diff --git a/test/testlock.c b/test/testlock.c
index c8b6579c5..fcfeb8bc8 100644
--- a/test/testlock.c
+++ b/test/testlock.c
@@ -1,5 +1,5 @@
 /*
-  Copyright (C) 1997-2011 Sam Lantinga 
+  Copyright (C) 1997-2013 Sam Lantinga 
 
   This software is provided 'as-is', without any express or implied
   warranty.  In no event will the authors be held liable for any damages
diff --git a/test/testmessage.c b/test/testmessage.c
index 8fd290d08..f76b7ebac 100644
--- a/test/testmessage.c
+++ b/test/testmessage.c
@@ -1,5 +1,5 @@
 /*
-  Copyright (C) 1997-2011 Sam Lantinga 
+  Copyright (C) 1997-2013 Sam Lantinga 
 
   This software is provided 'as-is', without any express or implied
   warranty.  In no event will the authors be held liable for any damages
diff --git a/test/testmultiaudio.c b/test/testmultiaudio.c
index 049073906..47a95e344 100644
--- a/test/testmultiaudio.c
+++ b/test/testmultiaudio.c
@@ -1,5 +1,5 @@
 /*
-  Copyright (C) 1997-2011 Sam Lantinga 
+  Copyright (C) 1997-2013 Sam Lantinga 
 
   This software is provided 'as-is', without any express or implied
   warranty.  In no event will the authors be held liable for any damages
diff --git a/test/testnative.c b/test/testnative.c
index 5af1c49e2..63cba29c3 100644
--- a/test/testnative.c
+++ b/test/testnative.c
@@ -1,5 +1,5 @@
 /*
-  Copyright (C) 1997-2011 Sam Lantinga 
+  Copyright (C) 1997-2013 Sam Lantinga 
 
   This software is provided 'as-is', without any express or implied
   warranty.  In no event will the authors be held liable for any damages
diff --git a/test/testnativew32.c b/test/testnativew32.c
index c57c4921a..2cb57ddeb 100644
--- a/test/testnativew32.c
+++ b/test/testnativew32.c
@@ -1,5 +1,5 @@
 /*
-  Copyright (C) 1997-2011 Sam Lantinga 
+  Copyright (C) 1997-2013 Sam Lantinga 
 
   This software is provided 'as-is', without any express or implied
   warranty.  In no event will the authors be held liable for any damages
diff --git a/test/testnativex11.c b/test/testnativex11.c
index 74e8b7f0d..9f4150c49 100644
--- a/test/testnativex11.c
+++ b/test/testnativex11.c
@@ -1,5 +1,5 @@
 /*
-  Copyright (C) 1997-2011 Sam Lantinga 
+  Copyright (C) 1997-2013 Sam Lantinga 
 
   This software is provided 'as-is', without any express or implied
   warranty.  In no event will the authors be held liable for any damages
diff --git a/test/testoverlay2.c b/test/testoverlay2.c
index 9d3cf1bf2..e071614ad 100644
--- a/test/testoverlay2.c
+++ b/test/testoverlay2.c
@@ -1,5 +1,5 @@
 /*
-  Copyright (C) 1997-2011 Sam Lantinga 
+  Copyright (C) 1997-2013 Sam Lantinga 
 
   This software is provided 'as-is', without any express or implied
   warranty.  In no event will the authors be held liable for any damages
diff --git a/test/testplatform.c b/test/testplatform.c
index 5317b56f9..326b6f7e4 100644
--- a/test/testplatform.c
+++ b/test/testplatform.c
@@ -1,5 +1,5 @@
 /*
-  Copyright (C) 1997-2011 Sam Lantinga 
+  Copyright (C) 1997-2013 Sam Lantinga 
 
   This software is provided 'as-is', without any express or implied
   warranty.  In no event will the authors be held liable for any damages
diff --git a/test/testpower.c b/test/testpower.c
index 6e6832a39..3e13d0ac1 100644
--- a/test/testpower.c
+++ b/test/testpower.c
@@ -1,5 +1,5 @@
 /*
-  Copyright (C) 1997-2011 Sam Lantinga 
+  Copyright (C) 1997-2013 Sam Lantinga 
 
   This software is provided 'as-is', without any express or implied
   warranty.  In no event will the authors be held liable for any damages
diff --git a/test/testrelative.c b/test/testrelative.c
index 6cb9d364e..fa5bda660 100644
--- a/test/testrelative.c
+++ b/test/testrelative.c
@@ -1,5 +1,5 @@
 /*
-  Copyright (C) 1997-2011 Sam Lantinga 
+  Copyright (C) 1997-2013 Sam Lantinga 
 
   This software is provided 'as-is', without any express or implied
   warranty.  In no event will the authors be held liable for any damages
diff --git a/test/testrendercopyex.c b/test/testrendercopyex.c
index dca3ee172..6dd59c0ac 100644
--- a/test/testrendercopyex.c
+++ b/test/testrendercopyex.c
@@ -1,5 +1,5 @@
 /*
-  Copyright (C) 1997-2011 Sam Lantinga 
+  Copyright (C) 1997-2013 Sam Lantinga 
 
   This software is provided 'as-is', without any express or implied
   warranty.  In no event will the authors be held liable for any damages
diff --git a/test/testrendertarget.c b/test/testrendertarget.c
index 903d60c2a..bc3104825 100644
--- a/test/testrendertarget.c
+++ b/test/testrendertarget.c
@@ -1,5 +1,5 @@
 /*
-  Copyright (C) 1997-2011 Sam Lantinga 
+  Copyright (C) 1997-2013 Sam Lantinga 
 
   This software is provided 'as-is', without any express or implied
   warranty.  In no event will the authors be held liable for any damages
diff --git a/test/testresample.c b/test/testresample.c
index 5dd55800f..d79f1ac8a 100644
--- a/test/testresample.c
+++ b/test/testresample.c
@@ -1,5 +1,5 @@
 /*
-  Copyright (C) 1997-2011 Sam Lantinga 
+  Copyright (C) 1997-2013 Sam Lantinga 
 
   This software is provided 'as-is', without any express or implied
   warranty.  In no event will the authors be held liable for any damages
diff --git a/test/testrumble.c b/test/testrumble.c
index b200345bd..e5b5424d4 100644
--- a/test/testrumble.c
+++ b/test/testrumble.c
@@ -1,5 +1,5 @@
 /*
-  Copyright (C) 1997-2011 Sam Lantinga 
+  Copyright (C) 1997-2013 Sam Lantinga 
 
   This software is provided 'as-is', without any express or implied
   warranty.  In no event will the authors be held liable for any damages
diff --git a/test/testscale.c b/test/testscale.c
index 42b21bc5d..0f0096c6e 100644
--- a/test/testscale.c
+++ b/test/testscale.c
@@ -1,5 +1,5 @@
 /*
-  Copyright (C) 1997-2011 Sam Lantinga 
+  Copyright (C) 1997-2013 Sam Lantinga 
 
   This software is provided 'as-is', without any express or implied
   warranty.  In no event will the authors be held liable for any damages
diff --git a/test/testsem.c b/test/testsem.c
index 6f463747a..eab280e1d 100644
--- a/test/testsem.c
+++ b/test/testsem.c
@@ -1,5 +1,5 @@
 /*
-  Copyright (C) 1997-2011 Sam Lantinga 
+  Copyright (C) 1997-2013 Sam Lantinga 
 
   This software is provided 'as-is', without any express or implied
   warranty.  In no event will the authors be held liable for any damages
diff --git a/test/testshader.c b/test/testshader.c
index 95ce2b97a..376b445e7 100644
--- a/test/testshader.c
+++ b/test/testshader.c
@@ -1,5 +1,5 @@
 /*
-  Copyright (C) 1997-2011 Sam Lantinga 
+  Copyright (C) 1997-2013 Sam Lantinga 
 
   This software is provided 'as-is', without any express or implied
   warranty.  In no event will the authors be held liable for any damages
diff --git a/test/testshape.c b/test/testshape.c
index bd5d351f4..59dfb9fc2 100644
--- a/test/testshape.c
+++ b/test/testshape.c
@@ -1,5 +1,5 @@
 /*
-  Copyright (C) 1997-2011 Sam Lantinga 
+  Copyright (C) 1997-2013 Sam Lantinga 
 
   This software is provided 'as-is', without any express or implied
   warranty.  In no event will the authors be held liable for any damages
diff --git a/test/testsprite2.c b/test/testsprite2.c
index 09748209a..f77296960 100644
--- a/test/testsprite2.c
+++ b/test/testsprite2.c
@@ -1,5 +1,5 @@
 /*
-  Copyright (C) 1997-2011 Sam Lantinga 
+  Copyright (C) 1997-2013 Sam Lantinga 
 
   This software is provided 'as-is', without any express or implied
   warranty.  In no event will the authors be held liable for any damages
diff --git a/test/testspriteminimal.c b/test/testspriteminimal.c
index b0b5f4e77..7ecc98874 100644
--- a/test/testspriteminimal.c
+++ b/test/testspriteminimal.c
@@ -1,5 +1,5 @@
 /*
-  Copyright (C) 1997-2011 Sam Lantinga 
+  Copyright (C) 1997-2013 Sam Lantinga 
 
   This software is provided 'as-is', without any express or implied
   warranty.  In no event will the authors be held liable for any damages
diff --git a/test/teststreaming.c b/test/teststreaming.c
index 964e62ef0..ea3ac2d61 100644
--- a/test/teststreaming.c
+++ b/test/teststreaming.c
@@ -1,5 +1,5 @@
 /*
-  Copyright (C) 1997-2011 Sam Lantinga 
+  Copyright (C) 1997-2013 Sam Lantinga 
 
   This software is provided 'as-is', without any express or implied
   warranty.  In no event will the authors be held liable for any damages
diff --git a/test/testthread.c b/test/testthread.c
index 47c1b57f0..949e44e3a 100644
--- a/test/testthread.c
+++ b/test/testthread.c
@@ -1,5 +1,5 @@
 /*
-  Copyright (C) 1997-2011 Sam Lantinga 
+  Copyright (C) 1997-2013 Sam Lantinga 
 
   This software is provided 'as-is', without any express or implied
   warranty.  In no event will the authors be held liable for any damages
diff --git a/test/testtimer.c b/test/testtimer.c
index e0d0c3e61..ebc655d10 100644
--- a/test/testtimer.c
+++ b/test/testtimer.c
@@ -1,5 +1,5 @@
 /*
-  Copyright (C) 1997-2011 Sam Lantinga 
+  Copyright (C) 1997-2013 Sam Lantinga 
 
   This software is provided 'as-is', without any express or implied
   warranty.  In no event will the authors be held liable for any damages
diff --git a/test/testver.c b/test/testver.c
index 7f2a52b95..ecfcdf35e 100644
--- a/test/testver.c
+++ b/test/testver.c
@@ -1,5 +1,5 @@
 /*
-  Copyright (C) 1997-2011 Sam Lantinga 
+  Copyright (C) 1997-2013 Sam Lantinga 
 
   This software is provided 'as-is', without any express or implied
   warranty.  In no event will the authors be held liable for any damages
diff --git a/test/testwm2.c b/test/testwm2.c
index 1abc8164e..efe6ea4dd 100644
--- a/test/testwm2.c
+++ b/test/testwm2.c
@@ -1,5 +1,5 @@
 /*
-  Copyright (C) 1997-2011 Sam Lantinga 
+  Copyright (C) 1997-2013 Sam Lantinga 
 
   This software is provided 'as-is', without any express or implied
   warranty.  In no event will the authors be held liable for any damages
diff --git a/test/torturethread.c b/test/torturethread.c
index fb003d499..795b60b93 100644
--- a/test/torturethread.c
+++ b/test/torturethread.c
@@ -1,5 +1,5 @@
 /*
-  Copyright (C) 1997-2011 Sam Lantinga 
+  Copyright (C) 1997-2013 Sam Lantinga 
 
   This software is provided 'as-is', without any express or implied
   warranty.  In no event will the authors be held liable for any damages

From 5623b2c61d8c2070486c6c4cca7abc8f8fba3893 Mon Sep 17 00:00:00 2001
From: Sam Lantinga 
Date: Thu, 25 Jul 2013 18:11:09 -0700
Subject: [PATCH 429/542] Fixed crash and garbled output when converting from
 F32 to S16 audio.

---
 src/audio/SDL_audio.c | 22 ++++++++++++----------
 1 file changed, 12 insertions(+), 10 deletions(-)

diff --git a/src/audio/SDL_audio.c b/src/audio/SDL_audio.c
index a9c54b440..4d53e82b1 100644
--- a/src/audio/SDL_audio.c
+++ b/src/audio/SDL_audio.c
@@ -360,9 +360,7 @@ SDL_RunAudio(void *devicep)
                 device->convert.len_mult;
         }
 #endif
-
-        /* stream_len = device->convert.len; */
-        stream_len = device->spec.size;
+        stream_len = device->convert.len;
     } else {
         stream_len = device->spec.size;
     }
@@ -958,12 +956,6 @@ open_audio_device(const char *devname, int iscapture,
         return 0;
     }
 
-    /* If the audio driver changes the buffer size, accept it */
-    if (device->spec.samples != obtained->samples) {
-        obtained->samples = device->spec.samples;
-        SDL_CalculateAudioSpec(obtained);
-    }
-
     /* See if we need to do any conversion */
     build_cvt = SDL_FALSE;
     if (obtained->freq != device->spec.freq) {
@@ -987,6 +979,16 @@ open_audio_device(const char *devname, int iscapture,
             build_cvt = SDL_TRUE;
         }
     }
+
+    /* If the audio driver changes the buffer size, accept it.
+       This needs to be done after the format is modified above,
+       otherwise it might not have the correct buffer size.
+     */
+    if (device->spec.samples != obtained->samples) {
+        obtained->samples = device->spec.samples;
+        SDL_CalculateAudioSpec(obtained);
+    }
+
     if (build_cvt) {
         /* Build an audio conversion block */
         if (SDL_BuildAudioCVT(&device->convert,
@@ -998,7 +1000,7 @@ open_audio_device(const char *devname, int iscapture,
             return 0;
         }
         if (device->convert.needed) {
-            device->convert.len = (int) (((double) obtained->size) /
+            device->convert.len = (int) (((double) device->spec.size) /
                                          device->convert.len_ratio);
 
             device->convert.buf =

From c73a37ac6fe59030c79fc9f0f4b2557a227c0f4f Mon Sep 17 00:00:00 2001
From: Gabriel Jacobo 
Date: Fri, 26 Jul 2013 12:22:40 -0300
Subject: [PATCH 430/542] [Android] Bug 1827, select the best matching config
 provided by eglChooseConfig

---
 .../src/org/libsdl/app/SDLActivity.java       | 38 ++++++++++++++++++-
 1 file changed, 36 insertions(+), 2 deletions(-)

diff --git a/android-project/src/org/libsdl/app/SDLActivity.java b/android-project/src/org/libsdl/app/SDLActivity.java
index e67bff68a..d43cb138f 100644
--- a/android-project/src/org/libsdl/app/SDLActivity.java
+++ b/android-project/src/org/libsdl/app/SDLActivity.java
@@ -323,13 +323,47 @@ public class SDLActivity extends Activity {
                 int[] version = new int[2];
                 egl.eglInitialize(dpy, version);
 
-                EGLConfig[] configs = new EGLConfig[1];
+                EGLConfig[] configs = new EGLConfig[128];
                 int[] num_config = new int[1];
                 if (!egl.eglChooseConfig(dpy, attribs, configs, 1, num_config) || num_config[0] == 0) {
                     Log.e("SDL", "No EGL config available");
                     return false;
                 }
-                EGLConfig config = configs[0];
+                EGLConfig config = null;
+                int bestdiff = -1, bitdiff;
+                int[] value = new int[1];
+                
+                // eglChooseConfig returns a number of configurations that match or exceed the requested attribs.
+                // From those, we select the one that matches our requirements more closely
+                Log.v("SDL", "Got " + num_config[0] + " valid modes from egl");
+                for(int i = 0; i < num_config[0]; i++) {
+                    bitdiff = 0;
+                    // Go through some of the attributes and compute the bit difference between what we want and what we get.
+                    for (int j = 0; ; j += 2) {
+                        if (attribs[j] == EGL10.EGL_NONE)
+                            break;
+
+                        if (attribs[j] == EGL10.EGL_RED_SIZE ||
+                            attribs[j] == EGL10.EGL_GREEN_SIZE ||
+                            attribs[j] == EGL10.EGL_BLUE_SIZE ||
+                            attribs[j] == EGL10.EGL_ALPHA_SIZE ||
+                            attribs[j] == EGL10.EGL_DEPTH_SIZE ||
+                            attribs[j] == EGL10.EGL_STENCIL_SIZE) {
+                            egl.eglGetConfigAttrib(dpy, configs[i], attribs[j], value);
+                            bitdiff += value[0] - attribs[j + 1]; // value is always >= attrib
+                        }
+                    }
+                    
+                    if (bitdiff < bestdiff || bestdiff == -1) {
+                        config = configs[i];
+                        bestdiff = bitdiff;
+                    }
+                    
+                    if (bitdiff == 0) break; // we found an exact match!
+                }
+                
+                Log.d("SDL", "Selected mode with a total bit difference of " + bestdiff);
+               
 
                 SDLActivity.mEGLDisplay = dpy;
                 SDLActivity.mEGLConfig = config;

From 7c9692c8c5c476aa89529cf40207521345895613 Mon Sep 17 00:00:00 2001
From: Gabriel Jacobo 
Date: Fri, 26 Jul 2013 12:37:36 -0300
Subject: [PATCH 431/542] Consider the case where an attribute is set to
 EGL_DONT_CARE in eglChooseConfig SDL doesn't currently use EGL_DONT_CARE, but
 it doesn' hurt to future proof.

---
 android-project/src/org/libsdl/app/SDLActivity.java | 4 ++--
 1 file changed, 2 insertions(+), 2 deletions(-)

diff --git a/android-project/src/org/libsdl/app/SDLActivity.java b/android-project/src/org/libsdl/app/SDLActivity.java
index d43cb138f..edee6254d 100644
--- a/android-project/src/org/libsdl/app/SDLActivity.java
+++ b/android-project/src/org/libsdl/app/SDLActivity.java
@@ -343,12 +343,12 @@ public class SDLActivity extends Activity {
                         if (attribs[j] == EGL10.EGL_NONE)
                             break;
 
-                        if (attribs[j] == EGL10.EGL_RED_SIZE ||
+                        if (attribs[j+1] != EGL10.EGL_DONT_CARE && (attribs[j] == EGL10.EGL_RED_SIZE ||
                             attribs[j] == EGL10.EGL_GREEN_SIZE ||
                             attribs[j] == EGL10.EGL_BLUE_SIZE ||
                             attribs[j] == EGL10.EGL_ALPHA_SIZE ||
                             attribs[j] == EGL10.EGL_DEPTH_SIZE ||
-                            attribs[j] == EGL10.EGL_STENCIL_SIZE) {
+                            attribs[j] == EGL10.EGL_STENCIL_SIZE)) {
                             egl.eglGetConfigAttrib(dpy, configs[i], attribs[j], value);
                             bitdiff += value[0] - attribs[j + 1]; // value is always >= attrib
                         }

From 089081d173e8eb114da92472a76b0a0405fdf2e3 Mon Sep 17 00:00:00 2001
From: =?UTF-8?q?J=C3=B8rgen=20P=2E=20Tjern=C3=B8?=
 
Date: Fri, 26 Jul 2013 13:30:24 -0700
Subject: [PATCH 432/542] Fix cmake breakage (thanks Marcus)

My recent change broke the sdlcheck.cmake by not escaping some quotes properly.
Thanks to Marcus von Appen for pointing it out and providing the patch.
---
 cmake/sdlchecks.cmake | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/cmake/sdlchecks.cmake b/cmake/sdlchecks.cmake
index 4d7e34d4e..14fb327b1 100644
--- a/cmake/sdlchecks.cmake
+++ b/cmake/sdlchecks.cmake
@@ -19,7 +19,7 @@ macro(CheckDLOPEN)
     check_c_source_compiles("
        #include 
        int main(int argc, char **argv) {
-         void *handle = dlopen("", RTLD_NOW);
+         void *handle = dlopen(\"\", RTLD_NOW);
          const char *loaderror = (char *) dlerror();
        }" HAVE_DLOPEN)
     set(CMAKE_REQUIRED_LIBRARIES)

From f1886b3c364589070626eacee9d24426f833425e Mon Sep 17 00:00:00 2001
From: Sam Lantinga 
Date: Sat, 27 Jul 2013 00:49:34 -0700
Subject: [PATCH 433/542] Fixed bug 1526 - X11 - XUnmapWindow should not be
 called directly

driedfruit

In X11_HideWindow, we call XUnmapWindow to unmap. According to ICCCN2.0, this should never happen, and XWithdrawWindow should be called instead.

http://www.tronche.com/gui/x/icccm/sec-4.html#s-4.1.4

"The reason for requiring the client to send a synthetic UnmapNotify event is to ensure that the window manager gets some notification of the client's desire to change state, ***even though the window may already be unmapped when the desire is expressed***."

Additionally, this can be observed at http://cgit.freedesktop.org/xorg/lib/libX11/tree/src/Withdraw.c#n65

Failure to comply leads to "MapNotify" event never appearing on non-reparenting WMs after subsequent show-hide-show requests. (I'm currently observing this behavior, thus my bug report).
---
 src/video/x11/SDL_x11messagebox.c | 26 ++++++++++++++++----------
 src/video/x11/SDL_x11sym.h        |  2 +-
 src/video/x11/SDL_x11window.c     |  5 +++--
 3 files changed, 20 insertions(+), 13 deletions(-)

diff --git a/src/video/x11/SDL_x11messagebox.c b/src/video/x11/SDL_x11messagebox.c
index 38867f06a..f938ded8b 100644
--- a/src/video/x11/SDL_x11messagebox.c
+++ b/src/video/x11/SDL_x11messagebox.c
@@ -78,11 +78,11 @@ typedef struct TextLineData {
     const char *text;                   /* Text for this line */
 } TextLineData;
 
-typedef struct SDL_MessageBoxDataX11 {
-    XFontSet font_set;                  /* for UTF-8 systems */
-    XFontStruct *font_struct;            /* Latin1 (ASCII) fallback. */
-    Window window;
+typedef struct SDL_MessageBoxDataX11
+{
     Display *display;
+    int screen;
+    Window window;
     long event_mask;
     Atom wm_protocols;
     Atom wm_delete_message;
@@ -90,6 +90,8 @@ typedef struct SDL_MessageBoxDataX11 {
     int dialog_width;                   /* Dialog box width. */
     int dialog_height;                  /* Dialog box height. */
 
+    XFontSet font_set;                  /* for UTF-8 systems */
+    XFontStruct *font_struct;           /* Latin1 (ASCII) fallback. */
     int xtext, ytext;                   /* Text position to start drawing at. */
     int numlines;                       /* Count of Text lines. */
     int text_height;                    /* Height for text lines. */
@@ -347,7 +349,7 @@ X11_MessageBoxShutdown( SDL_MessageBoxDataX11 *data )
 
     if ( data->display ) {
         if ( data->window != None ) {
-            XUnmapWindow( data->display, data->window );
+            XWithdrawWindow( data->display, data->window, data->screen );
             XDestroyWindow( data->display, data->window );
             data->window = None;
         }
@@ -369,7 +371,12 @@ X11_MessageBoxCreateWindow( SDL_MessageBoxDataX11 *data )
     const SDL_MessageBoxData *messageboxdata = data->messageboxdata;
 
     if ( messageboxdata->window ) {
+        SDL_DisplayData *displaydata =
+            (SDL_DisplayData *) SDL_GetDisplayForWindow(messageboxdata->window)->driverdata;
         windowdata = (SDL_WindowData *)messageboxdata->window->driverdata;
+        data->screen = displaydata->screen;
+    } else {
+        data->screen = DefaultScreen( display );
     }
 
     data->event_mask = ExposureMask |
@@ -378,7 +385,7 @@ X11_MessageBoxCreateWindow( SDL_MessageBoxDataX11 *data )
     wnd_attr.event_mask = data->event_mask;
 
     data->window = XCreateWindow(
-                       display, DefaultRootWindow( display ),
+                       display, RootWindow(display, data->screen),
                        0, 0,
                        data->dialog_width, data->dialog_height,
                        0, CopyFromParent, InputOutput, CopyFromParent,
@@ -406,11 +413,10 @@ X11_MessageBoxCreateWindow( SDL_MessageBoxDataX11 *data )
         XGetWindowAttributes(display, windowdata->xwindow, &attrib);
         x = attrib.x + ( attrib.width - data->dialog_width ) / 2;
         y = attrib.y + ( attrib.height - data->dialog_height ) / 3 ;
-        XTranslateCoordinates(display, windowdata->xwindow, DefaultRootWindow( display ), x, y, &x, &y, &dummy);
+        XTranslateCoordinates(display, windowdata->xwindow, RootWindow(display, data->screen), x, y, &x, &y, &dummy);
     } else {
-        int screen = DefaultScreen( display );
-        x = ( DisplayWidth( display, screen ) - data->dialog_width ) / 2;
-        y = ( DisplayHeight( display, screen ) - data->dialog_height ) / 3 ;
+        x = ( DisplayWidth( display, data->screen ) - data->dialog_width ) / 2;
+        y = ( DisplayHeight( display, data->screen ) - data->dialog_height ) / 3 ;
     }
     XMoveWindow( display, data->window, x, y );
 
diff --git a/src/video/x11/SDL_x11sym.h b/src/video/x11/SDL_x11sym.h
index 24ad5097f..79f61e0fb 100644
--- a/src/video/x11/SDL_x11sym.h
+++ b/src/video/x11/SDL_x11sym.h
@@ -125,9 +125,9 @@ SDL_X11_SYM(int,XUngrabPointer,(Display* a,Time b),(a,b),return)
 SDL_X11_SYM(int,XUngrabServer,(Display* a),(a),return)
 SDL_X11_SYM(int,XUninstallColormap,(Display* a,Colormap b),(a,b),return)
 SDL_X11_SYM(int,XUnloadFont,(Display* a,Font b),(a,b),return)
-SDL_X11_SYM(int,XUnmapWindow,(Display* a,Window b),(a,b),return)
 SDL_X11_SYM(int,XWarpPointer,(Display* a,Window b,Window c,int d,int e,unsigned int f,unsigned int g,int h,int i),(a,b,c,d,e,f,g,h,i),return)
 SDL_X11_SYM(int,XWindowEvent,(Display* a,Window b,long c,XEvent* d),(a,b,c,d),return)
+SDL_X11_SYM(Status,XWithdrawWindow,(Display* a,Window b,int c),(a,b,c),return)
 SDL_X11_SYM(VisualID,XVisualIDFromVisual,(Visual* a),(a),return)
 #if SDL_VIDEO_DRIVER_X11_CONST_PARAM_XEXTADDDISPLAY
 SDL_X11_SYM(XExtDisplayInfo*,XextAddDisplay,(XExtensionInfo* a,Display* b,_Xconst char* c,XExtensionHooks* d,int e,XPointer f),(a,b,c,d,e,f),return)
diff --git a/src/video/x11/SDL_x11window.c b/src/video/x11/SDL_x11window.c
index 5bf6ee43a..f48496f1a 100644
--- a/src/video/x11/SDL_x11window.c
+++ b/src/video/x11/SDL_x11window.c
@@ -853,11 +853,12 @@ void
 X11_HideWindow(_THIS, SDL_Window * window)
 {
     SDL_WindowData *data = (SDL_WindowData *) window->driverdata;
+    SDL_DisplayData *displaydata = (SDL_DisplayData *) SDL_GetDisplayForWindow(window)->driverdata;
     Display *display = data->videodata->display;
     XEvent event;
 
     if (X11_IsWindowMapped(_this, window)) {
-        XUnmapWindow(display, data->xwindow);
+        XWithdrawWindow(display, data->xwindow, displaydata->screen);
         /* Blocking wait for "UnmapNotify" event */
         XIfEvent(display, &event, &isUnmapNotify, (XPointer)&data->xwindow);
         XFlush(display);
@@ -1146,7 +1147,7 @@ X11_EndWindowFullscreenLegacy(_THIS, SDL_Window * window, SDL_VideoDisplay * _di
     SetWindowBordered(display, screen, data->xwindow,
                       (window->flags & SDL_WINDOW_BORDERLESS) == 0);
 
-    XUnmapWindow(display, fswindow);
+    XWithdrawWindow(display, fswindow, screen);
 
     /* Wait to be unmapped. */
     XIfEvent(display, &ev, &isUnmapNotify, (XPointer)&fswindow);

From ec67327c73e1e23591e68f8cfb91e63052f83391 Mon Sep 17 00:00:00 2001
From: Sam Lantinga 
Date: Sun, 14 Jul 2013 18:17:28 -0700
Subject: [PATCH 434/542] Fixed bug 1919 - Window icon disappears as soon as a
 renderer is created

Sebastian

Setting a window icon works just fine until a renderer is added to the window.
After adding the renderer the icon disappears.

Reproduce by:
- Take the example code from the wiki: http://wiki.libsdl.org/moin.fcg/SDL_SetWindowIcon

- Add the following two lines after  SDL_FreeSurface(surface);
  SDL_Delay(1000);
  SDL_Renderer* ren = SDL_CreateRenderer(window, -1, SDL_RENDERER_ACCELERATED);

-compile and run

You will see the window icon correctly at first. After the Delay the Icon will disappear.
---
 src/video/SDL_sysvideo.h              |  1 +
 src/video/SDL_video.c                 | 21 ++++++++++++++++++++-
 src/video/windows/SDL_windowswindow.c | 23 ++++++++++-------------
 src/video/x11/SDL_x11window.c         | 14 +++-----------
 4 files changed, 34 insertions(+), 25 deletions(-)

diff --git a/src/video/SDL_sysvideo.h b/src/video/SDL_sysvideo.h
index 3020bc773..598782833 100644
--- a/src/video/SDL_sysvideo.h
+++ b/src/video/SDL_sysvideo.h
@@ -73,6 +73,7 @@ struct SDL_Window
     const void *magic;
     Uint32 id;
     char *title;
+    SDL_Surface *icon;
     int x, y;
     int w, h;
     int min_w, min_h;
diff --git a/src/video/SDL_video.c b/src/video/SDL_video.c
index 21b46523b..f96539dfa 100644
--- a/src/video/SDL_video.c
+++ b/src/video/SDL_video.c
@@ -1297,6 +1297,7 @@ int
 SDL_RecreateWindow(SDL_Window * window, Uint32 flags)
 {
     char *title = window->title;
+    SDL_Surface *icon = window->icon;
 
     if ((flags & SDL_WINDOW_OPENGL) && !_this->GL_CreateContext) {
         return SDL_SetError("No OpenGL support in video driver");
@@ -1335,6 +1336,7 @@ SDL_RecreateWindow(SDL_Window * window, Uint32 flags)
     }
 
     window->title = NULL;
+    window->icon = NULL;
     window->flags = ((flags & CREATE_FLAGS) | SDL_WINDOW_HIDDEN);
 
     if (_this->CreateWindow && !(flags & SDL_WINDOW_FOREIGN)) {
@@ -1350,6 +1352,10 @@ SDL_RecreateWindow(SDL_Window * window, Uint32 flags)
         SDL_SetWindowTitle(window, title);
         SDL_free(title);
     }
+    if (icon) {
+        SDL_SetWindowIcon(window, icon);
+        SDL_FreeSurface(icon);
+    }
     SDL_FinishWindowCreation(window, flags);
 
     return 0;
@@ -1426,8 +1432,18 @@ SDL_SetWindowIcon(SDL_Window * window, SDL_Surface * icon)
         return;
     }
 
+    if (window->icon) {
+        SDL_FreeSurface(window->icon);
+    }
+
+    /* Convert the icon into ARGB8888 */
+    window->icon = SDL_ConvertSurfaceFormat(icon, SDL_PIXELFORMAT_ARGB8888, 0);
+    if (!window->icon) {
+        return;
+    }
+
     if (_this->SetWindowIcon) {
-        _this->SetWindowIcon(_this, window, icon);
+        _this->SetWindowIcon(_this, window, window->icon);
     }
 }
 
@@ -2167,6 +2183,9 @@ SDL_DestroyWindow(SDL_Window * window)
     if (window->title) {
         SDL_free(window->title);
     }
+    if (window->icon) {
+        SDL_FreeSurface(window->icon);
+    }
     if (window->gamma) {
         SDL_free(window->gamma);
     }
diff --git a/src/video/windows/SDL_windowswindow.c b/src/video/windows/SDL_windowswindow.c
index 1e41182e4..e89f3f60d 100644
--- a/src/video/windows/SDL_windowswindow.c
+++ b/src/video/windows/SDL_windowswindow.c
@@ -22,6 +22,7 @@
 
 #if SDL_VIDEO_DRIVER_WINDOWS
 
+#include "SDL_assert.h"
 #include "../SDL_sysvideo.h"
 #include "../SDL_pixels_c.h"
 #include "../../events/SDL_keyboard_c.h"
@@ -292,7 +293,6 @@ WIN_SetWindowIcon(_THIS, SDL_Window * window, SDL_Surface * icon)
     BYTE *icon_bmp;
     int icon_len;
     SDL_RWops *dst;
-    SDL_Surface *surface;
 
     /* Create temporary bitmap buffer */
     icon_len = 40 + icon->h * icon->w * 4;
@@ -316,19 +316,16 @@ WIN_SetWindowIcon(_THIS, SDL_Window * window, SDL_Surface * icon)
     SDL_WriteLE32(dst, 0);
     SDL_WriteLE32(dst, 0);
 
-    /* Convert the icon to a 32-bit surface with alpha channel */
-    surface = SDL_ConvertSurfaceFormat(icon, SDL_PIXELFORMAT_ARGB8888, 0);
-    if (surface) {
-        /* Write the pixels upside down into the bitmap buffer */
-        int y = surface->h;
-        while (y--) {
-            Uint8 *src = (Uint8 *) surface->pixels + y * surface->pitch;
-            SDL_RWwrite(dst, src, surface->pitch, 1);
-        }
-        SDL_FreeSurface(surface);
-
-        hicon = CreateIconFromResource(icon_bmp, icon_len, TRUE, 0x00030000);
+    /* Write the pixels upside down into the bitmap buffer */
+    SDL_assert(icon->format->format == SDL_PIXELFORMAT_ARGB8888);
+    int y = icon->h;
+    while (y--) {
+        Uint8 *src = (Uint8 *) icon->pixels + y * icon->pitch;
+        SDL_RWwrite(dst, src, icon->pitch, 1);
     }
+
+    hicon = CreateIconFromResource(icon_bmp, icon_len, TRUE, 0x00030000);
+
     SDL_RWclose(dst);
     SDL_stack_free(icon_bmp);
 
diff --git a/src/video/x11/SDL_x11window.c b/src/video/x11/SDL_x11window.c
index f48496f1a..07a836dcf 100644
--- a/src/video/x11/SDL_x11window.c
+++ b/src/video/x11/SDL_x11window.c
@@ -22,6 +22,7 @@
 
 #if SDL_VIDEO_DRIVER_X11
 
+#include "SDL_assert.h"
 #include "SDL_hints.h"
 #include "../SDL_sysvideo.h"
 #include "../SDL_pixels_c.h"
@@ -698,19 +699,11 @@ X11_SetWindowIcon(_THIS, SDL_Window * window, SDL_Surface * icon)
     Atom _NET_WM_ICON = data->videodata->_NET_WM_ICON;
 
     if (icon) {
-        SDL_PixelFormat format;
-        SDL_Surface *surface;
         int propsize;
         long *propdata;
 
-        /* Convert the icon to ARGB for modern window managers */
-        SDL_InitFormat(&format, SDL_PIXELFORMAT_ARGB8888);
-        surface = SDL_ConvertSurface(icon, &format, 0);
-        if (!surface) {
-            return;
-        }
-
         /* Set the _NET_WM_ICON property */
+        SDL_assert(icon->format->format == SDL_PIXELFORMAT_ARGB8888);
         propsize = 2 + (icon->w * icon->h);
         propdata = SDL_malloc(propsize * sizeof(long));
         if (propdata) {
@@ -722,7 +715,7 @@ X11_SetWindowIcon(_THIS, SDL_Window * window, SDL_Surface * icon)
             propdata[1] = icon->h;
             dst = &propdata[2];
             for (y = 0; y < icon->h; ++y) {
-                src = (Uint32*)((Uint8*)surface->pixels + y * surface->pitch);
+                src = (Uint32*)((Uint8*)icon->pixels + y * icon->pitch);
                 for (x = 0; x < icon->w; ++x) {
                     *dst++ = *src++;
                 }
@@ -732,7 +725,6 @@ X11_SetWindowIcon(_THIS, SDL_Window * window, SDL_Surface * icon)
                             propsize);
         }
         SDL_free(propdata);
-        SDL_FreeSurface(surface);
     } else {
         XDeleteProperty(display, data->xwindow, _NET_WM_ICON);
     }

From dae53a0790b3765bd63eb6b209a2d8cdecb48b25 Mon Sep 17 00:00:00 2001
From: Sam Lantinga 
Date: Sat, 27 Jul 2013 02:45:26 -0700
Subject: [PATCH 435/542] Improved error checking in the haptic system,
 preventing crashes in some cases.

Edgar Simo 2012-05-06 02:33:39 EDT

I recall that driver being buggy back in the day, but looking over the code there's a number of things being done wrong which I've fixed and it should now properly error out instead of crashing. Also make sure you initialize the haptic subsystem before using haptic commands (which I now more explicitly try to enforce).
---
 src/haptic/SDL_haptic.c | 44 +++++++++++++++++++++++++++++++++--------
 1 file changed, 36 insertions(+), 8 deletions(-)

diff --git a/src/haptic/SDL_haptic.c b/src/haptic/SDL_haptic.c
index d0b6bd25d..c1b8d74bb 100644
--- a/src/haptic/SDL_haptic.c
+++ b/src/haptic/SDL_haptic.c
@@ -149,18 +149,23 @@ SDL_HapticOpen(int device_index)
         return NULL;
     }
 
+    /* Add haptic to list */
+    for (i = 0; SDL_haptics[i]; i++)
+        /* Skip to next haptic */ ;
+    if (i >= SDL_numhaptics) {
+        SDL_free(haptic);
+        SDL_SetError("Haptic: Trying to add device past the number originally detected");
+        return NULL;
+    }
+    SDL_haptics[i] = haptic;
+    ++haptic->ref_count;
+
     /* Disable autocenter and set gain to max. */
     if (haptic->supported & SDL_HAPTIC_GAIN)
         SDL_HapticSetGain(haptic, 100);
     if (haptic->supported & SDL_HAPTIC_AUTOCENTER)
         SDL_HapticSetAutocenter(haptic, 0);
 
-    /* Add haptic to list */
-    ++haptic->ref_count;
-    for (i = 0; SDL_haptics[i]; i++)
-        /* Skip to next haptic */ ;
-    SDL_haptics[i] = haptic;
-
     return haptic;
 }
 
@@ -173,6 +178,13 @@ SDL_HapticOpened(int device_index)
 {
     int i, opened;
 
+    /* Make sure it's valid. */
+    if ((device_index < 0) || (device_index >= SDL_numhaptics)) {
+        SDL_SetError("Haptic: There are %d haptic devices available",
+                     SDL_numhaptics);
+        return -1;
+    }
+
     opened = 0;
     for (i = 0; SDL_haptics[i]; i++) {
         if (SDL_haptics[i]->index == (Uint8) device_index) {
@@ -262,6 +274,13 @@ SDL_HapticOpenFromJoystick(SDL_Joystick * joystick)
     int i;
     SDL_Haptic *haptic;
 
+    /* Make sure there is room. */
+    if (SDL_numhaptics <= 0) {
+        SDL_SetError("Haptic: There are %d haptic devices available",
+                     SDL_numhaptics);
+        return NULL;
+    }
+
     /* Must be a valid joystick */
     if (!SDL_PrivateJoystickValid(joystick)) {
         SDL_SetError("Haptic: Joystick isn't valid.");
@@ -299,10 +318,15 @@ SDL_HapticOpenFromJoystick(SDL_Joystick * joystick)
     }
 
     /* Add haptic to list */
-    ++haptic->ref_count;
     for (i = 0; SDL_haptics[i]; i++)
         /* Skip to next haptic */ ;
+    if (i >= SDL_numhaptics) {
+        SDL_free(haptic);
+        SDL_SetError("Haptic: Trying to add device past the number originally detected");
+        return NULL;
+    }
     SDL_haptics[i] = haptic;
+    ++haptic->ref_count;
 
     return haptic;
 }
@@ -757,6 +781,7 @@ SDL_HapticRumbleInit(SDL_Haptic * haptic)
 int
 SDL_HapticRumblePlay(SDL_Haptic * haptic, float strength, Uint32 length)
 {
+    int ret;
     SDL_HapticPeriodic *efx;
 
     if (!ValidHaptic(haptic)) {
@@ -779,7 +804,10 @@ SDL_HapticRumblePlay(SDL_Haptic * haptic, float strength, Uint32 length)
     efx = &haptic->rumble_effect.periodic;
     efx->magnitude = (Sint16)(32767.0f*strength);
     efx->length = length;
-    SDL_HapticUpdateEffect(haptic, haptic->rumble_id, &haptic->rumble_effect);
+    ret = SDL_HapticUpdateEffect(haptic, haptic->rumble_id, &haptic->rumble_effect);
+    if (ret) {
+        return ret;
+    }
 
     return SDL_HapticRunEffect(haptic, haptic->rumble_id, 1);
 }

From 02cf3236ca25145ee65784f8f3e5dff76b3003bc Mon Sep 17 00:00:00 2001
From: Sam Lantinga 
Date: Sat, 27 Jul 2013 02:50:19 -0700
Subject: [PATCH 436/542] Fixed bug 1743 - CMake produces libraries with wrong
 filename/SONAME

David Gow

As discussed on the list, the autotools build backend uses libtool's "release" option, giving us the SONAME libSDL2-2.0.so.0, whereas CMake doesn't, giving us libSDL2.so.0

While libSDL2.so.0 has some small advantages (being simpler and matching the names on some other OSes better), many products have already been developed expecting libSDL2-2.0.so.0, which better matches SDL 1.2's SONAME. It seems clear, therefore, that most developers prefer this name.

This patch emulates libtool's functionality, making libSDL2-2.0.so.0 the name of the shared library, while leaving libSDL2.a as the filename of the static library. Unlike with libtool, no libSDL2.so symlink is yet made. I also haven't tested this on anything but Linux, so it might break other platforms. :/
---
 CMakeLists.txt | 23 ++++++++++++++++++++---
 1 file changed, 20 insertions(+), 3 deletions(-)

diff --git a/CMakeLists.txt b/CMakeLists.txt
index 4e002778c..925392ebb 100644
--- a/CMakeLists.txt
+++ b/CMakeLists.txt
@@ -38,6 +38,8 @@ set(SDL_VERSION "${SDL_MAJOR_VERSION}.${SDL_MINOR_VERSION}.${SDL_MICRO_VERSION}"
 math(EXPR LT_CURRENT "${SDL_MICRO_VERSION} - ${SDL_INTERFACE_AGE}")
 math(EXPR LT_AGE "${SDL_BINARY_AGE} - ${SDL_INTERFACE_AGE}")
 set(LT_REVISION "${SDL_INTERFACE_AGE}")
+set(LT_RELEASE "${SDL_MAJOR_VERSION}.${SDL_MINOR_VERSION}")
+set(LT_VERSION "${LT_CURRENT}.${LT_REVISION}.${LT_AGE}")
 
 # General settings & flags
 set(LIBRARY_OUTPUT_DIRECTORY "build")
@@ -1144,9 +1146,17 @@ set(_INSTALL_LIBS "SDL2main")
 
 if(SDL_SHARED)
   add_library(SDL2 SHARED ${SOURCE_FILES})
-  set_target_properties(SDL2 PROPERTIES
-    VERSION ${SDL_VERSION}
-    SOVERSION ${LT_CURRENT})
+  if(UNIX)
+    set_target_properties(SDL2 PROPERTIES
+      VERSION ${LT_VERSION}
+      SOVERSION ${LT_CURRENT}
+      OUTPUT_NAME "SDL2-${LT_RELEASE}")
+  else(UNIX)
+    set_target_properties(SDL2 PROPERTIES
+      VERSION ${SDL_VERSION}
+      SOVERSION ${LT_CURRENT}
+      OUTPUT_NAME "SDL2")
+  endif(UNIX)
  set(_INSTALL_LIBS "SDL2" ${_INSTALL_LIBS})
  target_link_libraries(SDL2 ${EXTRA_LIBS} ${EXTRA_LDFLAGS})
 endif(SDL_SHARED)
@@ -1174,6 +1184,13 @@ endforeach()
 list(APPEND INCLUDE_FILES ${BIN_INCLUDE_FILES})
 install(FILES ${INCLUDE_FILES} DESTINATION include/SDL2)
 
+if(SDL_SHARED)
+  install(CODE "
+    execute_process(COMMAND ${CMAKE_COMMAND} -E create_symlink
+    \"libSDL2-2.0.so\" \"libSDL2.so\")")
+  install(FILES ${SDL2_BINARY_DIR}/libSDL2.so DESTINATION "lib${LIB_SUFFIX}")
+endif(SDL_SHARED)
+
 if(NOT WINDOWS OR CYGWIN)
   if(FREEBSD)
     # FreeBSD uses ${PREFIX}/libdata/pkgconfig

From 95b452107c08d4450d82b771f93d088671e212af Mon Sep 17 00:00:00 2001
From: Sam Lantinga 
Date: Sat, 27 Jul 2013 03:20:09 -0700
Subject: [PATCH 437/542] Fixed bug 1272 - Bogus numlock key up/down events
 being reported on MacOS X
MIME-Version: 1.0
Content-Type: text/plain; charset=UTF-8
Content-Transfer-Encoding: 8bit

Vern Jensen

The problem is that in certain situations I'm getting THREE keyUp/keyDown events when I push certain keys.

In my event code I added:

case SDL_KEYUP:

printf("SDL KeyScanCode for KEYUP event: %d\n", event->key.keysym.scancode );
…

and

case SDL_KEYDOWN:

printf("SDL KeyScanCode for KEYDOWN event: %d\n", event->key.keysym.scancode );
…

The result of one test run where I push 2 keys and then release them is this:

SDL KeyScanCode for KEYDOWN event: 92   // Pushed keypad 4
SDL KeyScanCode for KEYDOWN event: 83   // Pushed left shift
SDL KeyScanCode for KEYUP event: 83
SDL KeyScanCode for KEYDOWN event: 225
SDL KeyScanCode for KEYUP event: 92     // Released keypad 4
SDL KeyScanCode for KEYDOWN event: 83
SDL KeyScanCode for KEYUP event: 83
SDL KeyScanCode for KEYUP event: 225    // Released left shift

There *should* be only a total of 4 events above… 2 for each key being pushed, and 2 for each being released. But instead some bogus events for numlock being pushed/released are sent from SDL. These events did not occur. I did not push numlock. The value above for numlock is 83. Comments above show when I pushed each key. As you can see, when I push left shift, THREE events are instantly sent to my application, keyDown and then keyUp for numlock, and then the valid event for left shift (the key that was actually pushed).

You could replace keypad 4 with pretty much any keyPad key and it'll still happen. You can also replace it with any arrow key and it'll happen. However, when trying it with normal letter keys on the main keyboard it didn't.

It happens with other modifier keys too, not just left shift.

The order in which the keys are pressed matter. For instance, if I do:

1) keypad 4
2) left shift
3) release left shift
4) release keypad 4

Then at step 2, I get the 3 events above (when there should be only one), but steps 3 and 4 work properly… I don't get extra keyUp/keyDown events for steps 3 or 4. Thereas if the order of steps 3 and 4 are reversed, I get the bogus extra events for numlock.

Also, the problem can occur even when pushing just a single key by itself. If I push left shift, then keypad 4, then release left shift, then release keypad 4, then the following push of left shift will cause the bug. If I continue pushing and releasing left shift though, it won't happen again until I again involve keypad keys.

---

Sam Lantinga

According to the Apple documentation, NSNumericPadKeyMask is set for any arrow or numeric keypad event. Indeed this is what's happening.

I verified that we get the correct events for the numlock key and the mod state gets set correcly, so it should be safe to remove this bogus code.
---
 src/video/cocoa/SDL_cocoakeyboard.m | 8 --------
 1 file changed, 8 deletions(-)

diff --git a/src/video/cocoa/SDL_cocoakeyboard.m b/src/video/cocoa/SDL_cocoakeyboard.m
index 698343058..8a6b87422 100644
--- a/src/video/cocoa/SDL_cocoakeyboard.m
+++ b/src/video/cocoa/SDL_cocoakeyboard.m
@@ -390,14 +390,6 @@ HandleCapsLock(unsigned short scancode,
         SDL_SendKeyboardKey(SDL_PRESSED, SDL_SCANCODE_CAPSLOCK);
         SDL_SendKeyboardKey(SDL_RELEASED, SDL_SCANCODE_CAPSLOCK);
     }
-
-    oldMask = oldMods & NSNumericPadKeyMask;
-    newMask = newMods & NSNumericPadKeyMask;
-
-    if (oldMask != newMask) {
-        SDL_SendKeyboardKey(SDL_PRESSED, SDL_SCANCODE_NUMLOCKCLEAR);
-        SDL_SendKeyboardKey(SDL_RELEASED, SDL_SCANCODE_NUMLOCKCLEAR);
-    }
 }
 
 /* This function will handle the modifier keys and also determine the

From ff8077550e52472c1535c801297e74885263c8af Mon Sep 17 00:00:00 2001
From: Sam Lantinga 
Date: Sat, 27 Jul 2013 03:22:37 -0700
Subject: [PATCH 438/542] Fixed variable scoping for Windows build

---
 src/video/windows/SDL_windowswindow.c | 4 ++--
 1 file changed, 2 insertions(+), 2 deletions(-)

diff --git a/src/video/windows/SDL_windowswindow.c b/src/video/windows/SDL_windowswindow.c
index e89f3f60d..f40323ea6 100644
--- a/src/video/windows/SDL_windowswindow.c
+++ b/src/video/windows/SDL_windowswindow.c
@@ -291,7 +291,7 @@ WIN_SetWindowIcon(_THIS, SDL_Window * window, SDL_Surface * icon)
     HWND hwnd = ((SDL_WindowData *) window->driverdata)->hwnd;
     HICON hicon = NULL;
     BYTE *icon_bmp;
-    int icon_len;
+    int icon_len, y;
     SDL_RWops *dst;
 
     /* Create temporary bitmap buffer */
@@ -318,7 +318,7 @@ WIN_SetWindowIcon(_THIS, SDL_Window * window, SDL_Surface * icon)
 
     /* Write the pixels upside down into the bitmap buffer */
     SDL_assert(icon->format->format == SDL_PIXELFORMAT_ARGB8888);
-    int y = icon->h;
+    y = icon->h;
     while (y--) {
         Uint8 *src = (Uint8 *) icon->pixels + y * icon->pitch;
         SDL_RWwrite(dst, src, icon->pitch, 1);

From 0754901ca93b7d6814c021706a69024f5da3e461 Mon Sep 17 00:00:00 2001
From: Sam Lantinga 
Date: Sat, 27 Jul 2013 03:44:03 -0700
Subject: [PATCH 439/542] Fixed bug 1983 - SDL_thread.h broken under MinGW
 crosscompiling environment

q66

after updating SDL2 to the latest RC I'm unable to build my game engine under mingw crosscompiling environment for Windows (32bit, hosted on freebsd 64bit).

The error is in SDL_thread.h with messages like this: http://codepad.org/jEQXd3Yq

The problem is, while _beginthreadex return type is correctly mapped to uintptr_t (as specified by Microsoft), the return type under mingw is unsigned long int (same size, different signature), resulting in the error above.

The reason it didn't error before is this: http://codepad.org/8FAbKAxz

You can see the _beginthreadex case is only used without HAVE_LIBC defined; at one point though, SDL_config_windows.h was changed like this:

-/* Enabled for SDL 1.2 (binary compatibility) */
-#define HAVE_LIBC     1
+/* This is disabled by default to avoid C runtime dependencies and manifest requirements */

resulting in these errors.
---
 include/SDL_thread.h | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/include/SDL_thread.h b/include/SDL_thread.h
index e480a773b..c878c3ab9 100644
--- a/include/SDL_thread.h
+++ b/include/SDL_thread.h
@@ -109,7 +109,7 @@ SDL_CreateThread(SDL_ThreadFunction fn, const char *name, void *data,
 /**
  *  Create a thread.
  */
-#define SDL_CreateThread(fn, name, data) SDL_CreateThread(fn, name, data, _beginthreadex, _endthreadex)
+#define SDL_CreateThread(fn, name, data) SDL_CreateThread(fn, name, data, (pfnSDL_CurrentBeginThread)_beginthreadex, (pfnSDL_CurrentEndThread)_endthreadex)
 
 #else
 

From 17482012afb31d98695830afe16da5f64afbcf40 Mon Sep 17 00:00:00 2001
From: Sam Lantinga 
Date: Sat, 27 Jul 2013 03:48:23 -0700
Subject: [PATCH 440/542] Added example of using the software renderer and
 window surface API, contributed by Nitin Jain.

---
 test/Makefile.in          |   4 ++
 test/testdrawchessboard.c | 105 ++++++++++++++++++++++++++++++++++++++
 2 files changed, 109 insertions(+)
 create mode 100644 test/testdrawchessboard.c

diff --git a/test/Makefile.in b/test/Makefile.in
index 073d20100..2a39afc6b 100644
--- a/test/Makefile.in
+++ b/test/Makefile.in
@@ -13,6 +13,7 @@ TARGETS = \
 	testaudioinfo$(EXE) \
 	testautomation$(EXE) \
 	testdraw2$(EXE) \
+	testdrawchessboard$(EXE) \
 	testerror$(EXE) \
 	testfile$(EXE) \
 	testgamecontroller$(EXE) \
@@ -103,6 +104,9 @@ testrelative$(EXE): $(srcdir)/testrelative.c
 testdraw2$(EXE): $(srcdir)/testdraw2.c
 	$(CC) -o $@ $^ $(CFLAGS) $(LIBS)
 
+testdrawchessboard$(EXE): $(srcdir)/testdrawchessboard.c
+	$(CC) -o $@ $^ $(CFLAGS) $(LIBS)
+
 testerror$(EXE): $(srcdir)/testerror.c
 	$(CC) -o $@ $^ $(CFLAGS) $(LIBS)
 
diff --git a/test/testdrawchessboard.c b/test/testdrawchessboard.c
new file mode 100644
index 000000000..a48f57087
--- /dev/null
+++ b/test/testdrawchessboard.c
@@ -0,0 +1,105 @@
+/*
+   Copyright (C) 1997-2013 Sam Lantinga 
+
+   This software is provided 'as-is', without any express or implied
+   warranty.  In no event will the authors be held liable for any damages
+   arising from the use of this software.
+
+   Permission is granted to anyone to use this software for any purpose,
+   including commercial applications, and to alter it and redistribute it
+   freely.
+
+   This file is created by : Nitin Jain (nitin.j4@samsung.com)
+*/
+
+/* Sample program:  Draw a Chess Board  by using SDL_CreateSoftwareRenderer API */
+
+#include 
+#include 
+
+#include "SDL.h"
+
+void
+DrawChessBoard(SDL_Renderer * renderer)
+{
+	int row = 0,coloum = 0,x = 0;
+	SDL_Rect rect, darea;
+
+	/* Get the Size of drawing surface */
+	SDL_RenderGetViewport(renderer, &darea);
+
+	for(row; row < 8; row++)
+	{
+		coloum = row%2;
+		x = x + coloum;
+		for(coloum; coloum < 4+(row%2); coloum++)
+		{
+			SDL_SetRenderDrawColor(renderer, 0, 0, 0, 0);
+
+			rect.w = darea.w/8;
+			rect.h = darea.h/8;
+			rect.x = x * rect.w;
+			rect.y = row * rect.h;
+			x = x + 2;
+			SDL_RenderFillRect(renderer, &rect);
+		}
+		x=0;
+	}
+}
+
+int
+main(int argc, char *argv[])
+{
+	SDL_Event event;
+
+	/* Initialize SDL */
+	if(SDL_Init(SDL_INIT_VIDEO) != 0)
+	{
+		fprintf(stderr,"SDL_Init fail : %s\n", SDL_GetError());
+		return 1;
+	}
+
+
+	/* Create window and renderer for given surface */
+	SDL_Window *window = SDL_CreateWindow("Chess Board",SDL_WINDOWPOS_UNDEFINED,SDL_WINDOWPOS_UNDEFINED,640,480,SDL_WINDOW_SHOWN);
+	if(!window)
+	{
+		fprintf(stderr,"Window creation fail : %s\n",SDL_GetError());
+		return 1;
+	}	
+	SDL_Surface *surface = SDL_GetWindowSurface(window);
+	SDL_Renderer *renderer = SDL_CreateSoftwareRenderer(surface);
+	if(!renderer)
+	{
+		fprintf(stderr,"Render creation for surface fail : %s\n",SDL_GetError());
+		return 1;
+	}
+
+	/* Clear the rendering surface with the specidfied colour */
+	SDL_SetRenderDrawColor(renderer, 0xFF, 0xFF, 0xFF, 0);
+	SDL_RenderClear(renderer);
+
+
+	/* Draw the Image on rendering surface */
+	while(1)
+	{
+		SDL_Event e;
+		if (SDL_PollEvent(&e)) {
+			if (e.type == SDL_QUIT) 
+				break;
+
+			if(e.key.keysym.sym == SDLK_ESCAPE)
+				break;
+		}
+		
+		DrawChessBoard(renderer);
+		
+		/* Got everything on redering surface,
+ 		   now Update the drawing image on window screen */
+		SDL_UpdateWindowSurface(window);
+
+	}
+
+	return 0;
+}
+

From eab7f43fc2bdaae00bff89873b83cc0af2fa4a52 Mon Sep 17 00:00:00 2001
From: Philipp Wiesemann 
Date: Sat, 27 Jul 2013 13:39:43 +0200
Subject: [PATCH 441/542] Corrected SDL_HapticUpdateEffect() returning 0
 instead of index of effect. According to documentation in header and wiki the
 index should be returned. This change may break existing programs which
 assume only 0 means a success.

---
 src/haptic/SDL_haptic.c | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/src/haptic/SDL_haptic.c b/src/haptic/SDL_haptic.c
index c1b8d74bb..1c677b14a 100644
--- a/src/haptic/SDL_haptic.c
+++ b/src/haptic/SDL_haptic.c
@@ -530,7 +530,7 @@ SDL_HapticUpdateEffect(SDL_Haptic * haptic, int effect,
 
     SDL_memcpy(&haptic->effects[effect].effect, data,
                sizeof(SDL_HapticEffect));
-    return 0;
+    return effect;
 }
 
 

From c2d852cb799e17357f79e1015209e8a0b540214a Mon Sep 17 00:00:00 2001
From: Philipp Wiesemann 
Date: Sat, 27 Jul 2013 13:52:16 +0200
Subject: [PATCH 442/542] Fixed SDL_HapticRumblePlay() maybe working because of
 SDL_HapticUpdateEffect().

---
 src/haptic/SDL_haptic.c | 6 ++----
 1 file changed, 2 insertions(+), 4 deletions(-)

diff --git a/src/haptic/SDL_haptic.c b/src/haptic/SDL_haptic.c
index 1c677b14a..2d23e41ed 100644
--- a/src/haptic/SDL_haptic.c
+++ b/src/haptic/SDL_haptic.c
@@ -781,7 +781,6 @@ SDL_HapticRumbleInit(SDL_Haptic * haptic)
 int
 SDL_HapticRumblePlay(SDL_Haptic * haptic, float strength, Uint32 length)
 {
-    int ret;
     SDL_HapticPeriodic *efx;
 
     if (!ValidHaptic(haptic)) {
@@ -804,9 +803,8 @@ SDL_HapticRumblePlay(SDL_Haptic * haptic, float strength, Uint32 length)
     efx = &haptic->rumble_effect.periodic;
     efx->magnitude = (Sint16)(32767.0f*strength);
     efx->length = length;
-    ret = SDL_HapticUpdateEffect(haptic, haptic->rumble_id, &haptic->rumble_effect);
-    if (ret) {
-        return ret;
+    if (SDL_HapticUpdateEffect(haptic, haptic->rumble_id, &haptic->rumble_effect) < 0) {
+        return -1;
     }
 
     return SDL_HapticRunEffect(haptic, haptic->rumble_id, 1);

From dc646c6468ae1a99490f29be9c802ecc61fb611b Mon Sep 17 00:00:00 2001
From: Philipp Wiesemann 
Date: Sat, 27 Jul 2013 14:06:06 +0200
Subject: [PATCH 443/542] Removed C++ macro setup in internal header for
 Android port which is only C now.

---
 src/core/android/SDL_android.h | 14 --------------
 1 file changed, 14 deletions(-)

diff --git a/src/core/android/SDL_android.h b/src/core/android/SDL_android.h
index d53652f88..9045eb5df 100644
--- a/src/core/android/SDL_android.h
+++ b/src/core/android/SDL_android.h
@@ -20,13 +20,6 @@
 */
 #include "SDL_config.h"
 
-/* Set up for C function definitions, even when using C++ */
-#ifdef __cplusplus
-/* *INDENT-OFF* */
-extern "C" {
-/* *INDENT-ON* */
-#endif
-
 #include "SDL_rect.h"
 
 /* Interface from the SDL library into the Android Java activity */
@@ -68,11 +61,4 @@ int Android_JNI_SetupThread(void);
 /* Generic messages */
 int Android_JNI_SendMessage(int command, int param);
 
-/* Ends C function definitions when using C++ */
-#ifdef __cplusplus
-/* *INDENT-OFF* */
-}
-/* *INDENT-ON* */
-#endif
-
 /* vi: set ts=4 sw=4 expandtab: */

From 41edaa9b20833698038298f6a04dfeb9ed740034 Mon Sep 17 00:00:00 2001
From: Philipp Wiesemann 
Date: Sat, 27 Jul 2013 14:22:52 +0200
Subject: [PATCH 444/542] Fixed SDL_HapticOpened() returning -1 instead of 0.
 According to header file it should only return 0 or 1.

---
 src/haptic/SDL_haptic.c | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/src/haptic/SDL_haptic.c b/src/haptic/SDL_haptic.c
index 2d23e41ed..83cdb9b39 100644
--- a/src/haptic/SDL_haptic.c
+++ b/src/haptic/SDL_haptic.c
@@ -182,7 +182,7 @@ SDL_HapticOpened(int device_index)
     if ((device_index < 0) || (device_index >= SDL_numhaptics)) {
         SDL_SetError("Haptic: There are %d haptic devices available",
                      SDL_numhaptics);
-        return -1;
+        return 0;
     }
 
     opened = 0;

From 0c7cb878bdcf81f62d0823107d371571b3191085 Mon Sep 17 00:00:00 2001
From: "Ryan C. Gordon" 
Date: Mon, 22 Jul 2013 20:55:07 -0400
Subject: [PATCH 445/542] Cocoa: Make the next-highest window gain focus when a
 window is closing.

(if the closed window wasn't the foreground, this is effectively a no-op.)

--HG--
extra : rebase_source : e87546ce8bcfc1b3e21631b8ef6a1264d3f499d6
---
 src/video/cocoa/SDL_cocoawindow.m | 9 +++++++++
 1 file changed, 9 insertions(+)

diff --git a/src/video/cocoa/SDL_cocoawindow.m b/src/video/cocoa/SDL_cocoawindow.m
index d94c56744..427409c72 100644
--- a/src/video/cocoa/SDL_cocoawindow.m
+++ b/src/video/cocoa/SDL_cocoawindow.m
@@ -131,6 +131,7 @@ static __inline__ void ConvertNSRect(NSRect *r)
     NSNotificationCenter *center;
     NSWindow *window = _data->nswindow;
     NSView *view = [window contentView];
+    NSArray *windows = nil;
 
     center = [NSNotificationCenter defaultCenter];
 
@@ -155,6 +156,14 @@ static __inline__ void ConvertNSRect(NSRect *r)
     if ([view nextResponder] == self) {
         [view setNextResponder:nil];
     }
+
+    /* Make the next window in the z-order Key. If we weren't the foreground
+       when closed, this is a no-op. */
+    windows = [NSApp orderedWindows];
+    if ([windows count] > 0) {
+        NSWindow *win = (NSWindow *) [windows objectAtIndex:0];
+        [win makeKeyAndOrderFront:self];
+    }
 }
 
 - (BOOL)windowShouldClose:(id)sender

From 546bedb8367116105d8362ca4578f2a591bb74e2 Mon Sep 17 00:00:00 2001
From: "Ryan C. Gordon" 
Date: Sat, 27 Jul 2013 13:09:15 -0400
Subject: [PATCH 446/542] Added a FIXME discussion to last commit.

---
 src/video/cocoa/SDL_cocoawindow.m | 9 ++++++++-
 1 file changed, 8 insertions(+), 1 deletion(-)

diff --git a/src/video/cocoa/SDL_cocoawindow.m b/src/video/cocoa/SDL_cocoawindow.m
index 427409c72..ccb7d7fef 100644
--- a/src/video/cocoa/SDL_cocoawindow.m
+++ b/src/video/cocoa/SDL_cocoawindow.m
@@ -158,7 +158,14 @@ static __inline__ void ConvertNSRect(NSRect *r)
     }
 
     /* Make the next window in the z-order Key. If we weren't the foreground
-       when closed, this is a no-op. */
+       when closed, this is a no-op.
+       !!! FIXME: Note that this is a hack, and there are corner cases where
+       !!! FIXME:  this fails (such as the About box). The typical nib+RunLoop
+       !!! FIXME:  handles this for Cocoa apps, but we bypass all that in SDL.
+       !!! FIXME:  We should remove this code when we find a better way to
+       !!! FIXME:  have the system do this for us. See discussion in
+       !!! FIXME:   http://bugzilla.libsdl.org/show_bug.cgi?id=1825
+    */
     windows = [NSApp orderedWindows];
     if ([windows count] > 0) {
         NSWindow *win = (NSWindow *) [windows objectAtIndex:0];

From dd410376709b57d27953f8cb381aa8a829f9958f Mon Sep 17 00:00:00 2001
From: "Ryan C. Gordon" 
Date: Sat, 27 Jul 2013 13:13:57 -0400
Subject: [PATCH 447/542] Backed out hg changeset 7f26fd1df927; docs were
 wrong, not the code.

---
 src/haptic/SDL_haptic.c | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/src/haptic/SDL_haptic.c b/src/haptic/SDL_haptic.c
index 83cdb9b39..d5e2bdd51 100644
--- a/src/haptic/SDL_haptic.c
+++ b/src/haptic/SDL_haptic.c
@@ -530,7 +530,7 @@ SDL_HapticUpdateEffect(SDL_Haptic * haptic, int effect,
 
     SDL_memcpy(&haptic->effects[effect].effect, data,
                sizeof(SDL_HapticEffect));
-    return effect;
+    return 0;
 }
 
 

From fac63fa2e4a1913b59991cf88ca903ba40fa0d1a Mon Sep 17 00:00:00 2001
From: "Ryan C. Gordon" 
Date: Sat, 27 Jul 2013 13:18:54 -0400
Subject: [PATCH 448/542] Fixed return value documentation for
 SDL_HapticUpdateEffect().

It was a cut-and-paste error from SDL_HapticNewEffect(), right above it.
---
 include/SDL_haptic.h | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/include/SDL_haptic.h b/include/SDL_haptic.h
index 56af6a614..8bc726d41 100644
--- a/include/SDL_haptic.h
+++ b/include/SDL_haptic.h
@@ -986,7 +986,7 @@ extern DECLSPEC int SDLCALL SDL_HapticNewEffect(SDL_Haptic * haptic,
  *  \param haptic Haptic device that has the effect.
  *  \param effect Effect to update.
  *  \param data New effect properties to use.
- *  \return The id of the effect on success or -1 on error.
+ *  \return 0 on success or -1 on error.
  *
  *  \sa SDL_HapticNewEffect
  *  \sa SDL_HapticRunEffect

From c03703d90d76d88341c20056fe0c62cce97a7deb Mon Sep 17 00:00:00 2001
From: Philipp Wiesemann 
Date: Sat, 27 Jul 2013 21:02:50 +0200
Subject: [PATCH 449/542] Corrected words in comments of test programs.

---
 test/testatomic.c         | 2 +-
 test/testdrawchessboard.c | 4 ++--
 test/testfile.c           | 4 ++--
 3 files changed, 5 insertions(+), 5 deletions(-)

diff --git a/test/testatomic.c b/test/testatomic.c
index 7205c0274..be60a611b 100644
--- a/test/testatomic.c
+++ b/test/testatomic.c
@@ -91,7 +91,7 @@ void RunBasicTest()
 /* Tests semantics of atomic operations.  Also a stress test
  * to see if they are really atomic.
  *
- * Serveral threads adding to the same variable.
+ * Several threads adding to the same variable.
  * at the end the value is compared with the expected
  * and with a non-atomic counter.
  */
diff --git a/test/testdrawchessboard.c b/test/testdrawchessboard.c
index a48f57087..8217c93b4 100644
--- a/test/testdrawchessboard.c
+++ b/test/testdrawchessboard.c
@@ -75,7 +75,7 @@ main(int argc, char *argv[])
 		return 1;
 	}
 
-	/* Clear the rendering surface with the specidfied colour */
+	/* Clear the rendering surface with the specified color */
 	SDL_SetRenderDrawColor(renderer, 0xFF, 0xFF, 0xFF, 0);
 	SDL_RenderClear(renderer);
 
@@ -94,7 +94,7 @@ main(int argc, char *argv[])
 		
 		DrawChessBoard(renderer);
 		
-		/* Got everything on redering surface,
+		/* Got everything on rendering surface,
  		   now Update the drawing image on window screen */
 		SDL_UpdateWindowSurface(window);
 
diff --git a/test/testfile.c b/test/testfile.c
index 1aaa3a8db..d82d0eb7c 100644
--- a/test/testfile.c
+++ b/test/testfile.c
@@ -92,8 +92,8 @@ main(int argc, char *argv[])
         RWOP_ERR_QUIT(rwops);
     printf("test1 OK\n");
 
-/* test 2 : check that inexistant file is not successfully opened/created when required */
-/* modes : r, r+ implie that file MUST exist
+/* test 2 : check that inexistent file is not successfully opened/created when required */
+/* modes : r, r+ imply that file MUST exist
    modes : a, a+, w, w+ checks that it succeeds (file may not exists)
 
  */

From 69e8c3f95072219d8bf109682a7939e4f88687c8 Mon Sep 17 00:00:00 2001
From: Philipp Wiesemann 
Date: Sat, 27 Jul 2013 21:05:04 +0200
Subject: [PATCH 450/542] Removed unused parameter in test program.

---
 test/testspriteminimal.c | 4 ++--
 1 file changed, 2 insertions(+), 2 deletions(-)

diff --git a/test/testspriteminimal.c b/test/testspriteminimal.c
index 7ecc98874..6f3ac25c0 100644
--- a/test/testspriteminimal.c
+++ b/test/testspriteminimal.c
@@ -84,7 +84,7 @@ LoadSprite(char *file, SDL_Renderer *renderer)
 }
 
 void
-MoveSprites(SDL_Window * window, SDL_Renderer * renderer, SDL_Texture * sprite)
+MoveSprites(SDL_Renderer * renderer, SDL_Texture * sprite)
 {
     int i;
     int window_w = WINDOW_WIDTH;
@@ -158,7 +158,7 @@ main(int argc, char *argv[])
                 done = 1;
             }
         }
-        MoveSprites(window, renderer, sprite);
+        MoveSprites(renderer, sprite);
     }
 
     quit(0);

From 6b494e5eeb6baa12e1f809e7a3e55f49b18195b2 Mon Sep 17 00:00:00 2001
From: Philipp Wiesemann 
Date: Sat, 27 Jul 2013 21:07:07 +0200
Subject: [PATCH 451/542] Removed unused variable from test program.

---
 test/testdrawchessboard.c | 1 -
 1 file changed, 1 deletion(-)

diff --git a/test/testdrawchessboard.c b/test/testdrawchessboard.c
index 8217c93b4..7fea4c965 100644
--- a/test/testdrawchessboard.c
+++ b/test/testdrawchessboard.c
@@ -50,7 +50,6 @@ DrawChessBoard(SDL_Renderer * renderer)
 int
 main(int argc, char *argv[])
 {
-	SDL_Event event;
 
 	/* Initialize SDL */
 	if(SDL_Init(SDL_INIT_VIDEO) != 0)

From 1baa9e9bdacefecfeef05c7db4e3a66436f2c099 Mon Sep 17 00:00:00 2001
From: Philipp Wiesemann 
Date: Sat, 27 Jul 2013 21:11:12 +0200
Subject: [PATCH 452/542] Changed test program to be more compatible C.

---
 test/testdrawchessboard.c | 9 ++++++---
 1 file changed, 6 insertions(+), 3 deletions(-)

diff --git a/test/testdrawchessboard.c b/test/testdrawchessboard.c
index 7fea4c965..002d8d717 100644
--- a/test/testdrawchessboard.c
+++ b/test/testdrawchessboard.c
@@ -50,6 +50,9 @@ DrawChessBoard(SDL_Renderer * renderer)
 int
 main(int argc, char *argv[])
 {
+	SDL_Window *window;
+	SDL_Surface *surface;
+	SDL_Renderer *renderer;
 
 	/* Initialize SDL */
 	if(SDL_Init(SDL_INIT_VIDEO) != 0)
@@ -60,14 +63,14 @@ main(int argc, char *argv[])
 
 
 	/* Create window and renderer for given surface */
-	SDL_Window *window = SDL_CreateWindow("Chess Board",SDL_WINDOWPOS_UNDEFINED,SDL_WINDOWPOS_UNDEFINED,640,480,SDL_WINDOW_SHOWN);
+	window = SDL_CreateWindow("Chess Board", SDL_WINDOWPOS_UNDEFINED, SDL_WINDOWPOS_UNDEFINED, 640, 480, SDL_WINDOW_SHOWN);
 	if(!window)
 	{
 		fprintf(stderr,"Window creation fail : %s\n",SDL_GetError());
 		return 1;
 	}	
-	SDL_Surface *surface = SDL_GetWindowSurface(window);
-	SDL_Renderer *renderer = SDL_CreateSoftwareRenderer(surface);
+	surface = SDL_GetWindowSurface(window);
+	renderer = SDL_CreateSoftwareRenderer(surface);
 	if(!renderer)
 	{
 		fprintf(stderr,"Render creation for surface fail : %s\n",SDL_GetError());

From 56c6743a1b257964b799382aa6a874b7ef71883b Mon Sep 17 00:00:00 2001
From: Sam Lantinga 
Date: Sun, 28 Jul 2013 11:24:16 -0700
Subject: [PATCH 453/542] Added documentation saying the render API isn't for
 multi-threading.

---
 include/SDL_render.h | 5 ++++-
 1 file changed, 4 insertions(+), 1 deletion(-)

diff --git a/include/SDL_render.h b/include/SDL_render.h
index 2551f3a69..1e24619f0 100644
--- a/include/SDL_render.h
+++ b/include/SDL_render.h
@@ -37,9 +37,12 @@
  *  them, and may also be stretched with linear interpolation.
  *
  *  This API is designed to accelerate simple 2D operations. You may
- *  want more functionality such as rotation and particle effects and
+ *  want more functionality such as polygons and particle effects and
  *  in that case you should use SDL's OpenGL/Direct3D support or one
  *  of the many good 3D engines.
+ *
+ *  These functions must be called from the main thread.
+ *  See this bug for details: http://bugzilla.libsdl.org/show_bug.cgi?id=1995
  */
 
 #ifndef _SDL_render_h

From b8198f3b2a8f6e45925d67e7cef6b2add264a26b Mon Sep 17 00:00:00 2001
From: "Ryan C. Gordon" 
Date: Tue, 30 Jul 2013 00:17:44 -0400
Subject: [PATCH 454/542] Attempt to fix compiler warning.

Fixes Bugzilla #1784. (or at least the only part of it that was a real bug.)
---
 src/video/windows/SDL_windowsevents.c | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/src/video/windows/SDL_windowsevents.c b/src/video/windows/SDL_windowsevents.c
index ca799ff80..78d31d54e 100644
--- a/src/video/windows/SDL_windowsevents.c
+++ b/src/video/windows/SDL_windowsevents.c
@@ -701,7 +701,7 @@ WIN_WindowProc(HWND hwnd, UINT msg, WPARAM wParam, LPARAM lParam)
                 for (i = 0; i < num_inputs; ++i) {
                     PTOUCHINPUT input = &inputs[i];
 
-                    const SDL_TouchID touchId = (SDL_TouchID)input->hSource;
+                    const SDL_TouchID touchId = (SDL_TouchID)((size_t)input->hSource);
                     if (!SDL_GetTouch(touchId)) {
                         if (SDL_AddTouch(touchId, "") < 0) {
                             continue;

From fe98dc3642016e3d3df7afb51b17b0988c5b3b9d Mon Sep 17 00:00:00 2001
From: "Ryan C. Gordon" 
Date: Tue, 30 Jul 2013 01:30:32 -0400
Subject: [PATCH 455/542] These should be __inline__, not inline.

---
 src/audio/pulseaudio/SDL_pulseaudio.c | 4 ++--
 1 file changed, 2 insertions(+), 2 deletions(-)

diff --git a/src/audio/pulseaudio/SDL_pulseaudio.c b/src/audio/pulseaudio/SDL_pulseaudio.c
index ec8030917..fe19dccbd 100644
--- a/src/audio/pulseaudio/SDL_pulseaudio.c
+++ b/src/audio/pulseaudio/SDL_pulseaudio.c
@@ -49,7 +49,7 @@
 
 #if (PA_API_VERSION < 12)
 /** Return non-zero if the passed state is one of the connected states */
-static inline int PA_CONTEXT_IS_GOOD(pa_context_state_t x) {
+static __inline__ int PA_CONTEXT_IS_GOOD(pa_context_state_t x) {
     return
         x == PA_CONTEXT_CONNECTING ||
         x == PA_CONTEXT_AUTHORIZING ||
@@ -57,7 +57,7 @@ static inline int PA_CONTEXT_IS_GOOD(pa_context_state_t x) {
         x == PA_CONTEXT_READY;
 }
 /** Return non-zero if the passed state is one of the connected states */
-static inline int PA_STREAM_IS_GOOD(pa_stream_state_t x) {
+static __inline__ int PA_STREAM_IS_GOOD(pa_stream_state_t x) {
     return
         x == PA_STREAM_CREATING ||
         x == PA_STREAM_READY;

From 9694301e04161e029061c2df54a0e825125683a8 Mon Sep 17 00:00:00 2001
From: "Ryan C. Gordon" 
Date: Tue, 30 Jul 2013 01:32:26 -0400
Subject: [PATCH 456/542] Workaround older libpulse that fails in
 pa_context_new() with a NULL appname.

Newer libpulses do sane defaults if you pass a NULL there. In lieu of a
proper way to specify this in SDL at the moment, this will do.

Fixes Bugzilla #1119.
---
 src/audio/pulseaudio/SDL_pulseaudio.c | 26 +++++++++++++++++++++++++-
 1 file changed, 25 insertions(+), 1 deletion(-)

diff --git a/src/audio/pulseaudio/SDL_pulseaudio.c b/src/audio/pulseaudio/SDL_pulseaudio.c
index fe19dccbd..46269d177 100644
--- a/src/audio/pulseaudio/SDL_pulseaudio.c
+++ b/src/audio/pulseaudio/SDL_pulseaudio.c
@@ -65,6 +65,7 @@ static __inline__ int PA_STREAM_IS_GOOD(pa_stream_state_t x) {
 #endif /* pulseaudio <= 0.9.10 */
 
 
+static const char *(*PULSEAUDIO_pa_get_library_version) (void);
 static pa_simple *(*PULSEAUDIO_pa_simple_new) (const char *, const char *,
     pa_stream_direction_t, const char *, const char *, const pa_sample_spec *,
     const pa_channel_map *, const pa_buffer_attr *, int *);
@@ -177,6 +178,7 @@ LoadPulseAudioLibrary(void)
 static int
 load_pulseaudio_syms(void)
 {
+    SDL_PULSEAUDIO_SYM(pa_get_library_version);
     SDL_PULSEAUDIO_SYM(pa_simple_new);
     SDL_PULSEAUDIO_SYM(pa_simple_free);
     SDL_PULSEAUDIO_SYM(pa_mainloop_new);
@@ -322,6 +324,28 @@ PULSEAUDIO_CloseDevice(_THIS)
 }
 
 
+static __inline__ int
+squashVersion(const int major, const int minor, const int patch)
+{
+    return ((major & 0xFF) << 16) | ((minor & 0xFF) << 8) | (patch & 0xFF);
+}
+
+/* Workaround for older pulse: pa_context_new() must have non-NULL appname */
+static const char *
+getAppName(void)
+{
+    const char *verstr = PULSEAUDIO_pa_get_library_version();
+    if (verstr != NULL) {
+        int maj, min, patch;
+        if (SDL_sscanf(verstr, "%d.%d.%d", &maj, &min, &patch) == 3) {
+            if (squashVersion(maj, min, patch) >= squashVersion(0, 9, 15)) {
+                return NULL;  /* 0.9.15+ handles NULL correctly. */
+            }
+        }
+    }
+    return "SDL Application";  /* oh well. */
+}
+
 static int
 PULSEAUDIO_OpenDevice(_THIS, const char *devname, int iscapture)
 {
@@ -432,7 +456,7 @@ PULSEAUDIO_OpenDevice(_THIS, const char *devname, int iscapture)
     }
 
     h->mainloop_api = PULSEAUDIO_pa_mainloop_get_api(h->mainloop);
-    h->context = PULSEAUDIO_pa_context_new(h->mainloop_api, NULL);
+    h->context = PULSEAUDIO_pa_context_new(h->mainloop_api, getAppName());
     if (!h->context) {
         PULSEAUDIO_CloseDevice(this);
         return SDL_SetError("pa_context_new() failed");

From 3b4b3c17ea3ce1d013fa768f79291a969c737b90 Mon Sep 17 00:00:00 2001
From: Sam Lantinga 
Date: Mon, 29 Jul 2013 23:28:25 -0700
Subject: [PATCH 457/542] Fixed stack smashing crash when using the GCC
 compiled DLL with Visual Studio.

---
 include/SDL_audio.h | 13 ++++++++++++-
 1 file changed, 12 insertions(+), 1 deletion(-)

diff --git a/include/SDL_audio.h b/include/SDL_audio.h
index 9e5a997ae..97f7a87c1 100644
--- a/include/SDL_audio.h
+++ b/include/SDL_audio.h
@@ -183,6 +183,17 @@ typedef void (SDLCALL * SDL_AudioFilter) (struct SDL_AudioCVT * cvt,
 /**
  *  A structure to hold a set of audio conversion filters and buffers.
  */
+#ifdef __GNUC__
+/* This structure is 84 bytes on 32-bit architectures, make sure GCC doesn't
+   pad it out to 88 bytes to guarantee ABI compatibility between compilers.
+   vvv
+   The next time we rev the ABI, make sure to size the ints and add padding.
+*/
+#define SDL_AUDIOCVT_PACKED __attribute__((packed))
+#else
+#define SDL_AUDIOCVT_PACKED
+#endif
+/* */
 typedef struct SDL_AudioCVT
 {
     int needed;                 /**< Set to 1 if conversion possible */
@@ -196,7 +207,7 @@ typedef struct SDL_AudioCVT
     double len_ratio;           /**< Given len, final size is len*len_ratio */
     SDL_AudioFilter filters[10];        /**< Filter list */
     int filter_index;           /**< Current audio conversion function */
-} SDL_AudioCVT;
+} SDL_AUDIOCVT_PACKED SDL_AudioCVT;
 
 
 /* Function prototypes */

From 3334092bdcc18852ec35fc69dfac28edc6fb9341 Mon Sep 17 00:00:00 2001
From: Sam Lantinga 
Date: Tue, 30 Jul 2013 00:02:45 -0700
Subject: [PATCH 458/542] Fixed compiler warning with gcc

---
 src/render/direct3d/SDL_render_d3d.c | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/src/render/direct3d/SDL_render_d3d.c b/src/render/direct3d/SDL_render_d3d.c
index 95a3d742d..bfabd6545 100644
--- a/src/render/direct3d/SDL_render_d3d.c
+++ b/src/render/direct3d/SDL_render_d3d.c
@@ -833,7 +833,7 @@ D3D_CreateRenderer(SDL_Window * window, Uint32 flags)
             0x80e40000, 0x0000ffff
         };
 #endif
-        if (shader_data) {
+        if (shader_data != NULL) {
             result = IDirect3DDevice9_CreatePixelShader(data->device, shader_data, &data->ps_yuv);
             if (!FAILED(result)) {
                 renderer->info.texture_formats[renderer->info.num_texture_formats++] = SDL_PIXELFORMAT_YV12;

From 058120689b4da43aa9a8b857b32db0d6603b9dd4 Mon Sep 17 00:00:00 2001
From: Philipp Wiesemann 
Date: Tue, 30 Jul 2013 23:24:23 +0200
Subject: [PATCH 459/542] Added support for the two new key codes from Android
 4.3.

---
 src/video/android/SDL_androidkeyboard.c | 2 ++
 1 file changed, 2 insertions(+)

diff --git a/src/video/android/SDL_androidkeyboard.c b/src/video/android/SDL_androidkeyboard.c
index 512007a2f..5381de64d 100644
--- a/src/video/android/SDL_androidkeyboard.c
+++ b/src/video/android/SDL_androidkeyboard.c
@@ -260,6 +260,8 @@ static SDL_Scancode Android_Keycodes[] = {
     SDL_SCANCODE_UNKNOWN, /* AKEYCODE_RO */
     SDL_SCANCODE_UNKNOWN, /* AKEYCODE_KANA */
     SDL_SCANCODE_UNKNOWN, /* AKEYCODE_ASSIST */
+    SDL_SCANCODE_BRIGHTNESSDOWN, /* AKEYCODE_BRIGHTNESS_DOWN */
+    SDL_SCANCODE_BRIGHTNESSUP, /* AKEYCODE_BRIGHTNESS_UP */
 };
 
 static SDL_Scancode

From 35628ecbc443f47b2d9cfce362cf626df352651d Mon Sep 17 00:00:00 2001
From: Sam Lantinga 
Date: Tue, 30 Jul 2013 20:57:26 -0700
Subject: [PATCH 460/542] Check for negative source rectangle in SDL_SoftBlit()
 (thanks John!)

---
 src/video/SDL_blit.c | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/src/video/SDL_blit.c b/src/video/SDL_blit.c
index 78e449dd0..7b4f9edc9 100644
--- a/src/video/SDL_blit.c
+++ b/src/video/SDL_blit.c
@@ -61,7 +61,7 @@ SDL_SoftBlit(SDL_Surface * src, SDL_Rect * srcrect,
     }
 
     /* Set up source and destination buffer pointers, and BLIT! */
-    if (okay && srcrect->w && srcrect->h) {
+    if (okay && !SDL_RectEmpty(srcrect)) {
         SDL_BlitFunc RunBlit;
         SDL_BlitInfo *info = &src->map->info;
 

From e062de97c1e829ef0975f99a03c0ce605dc2b8a7 Mon Sep 17 00:00:00 2001
From: Sam Lantinga 
Date: Tue, 30 Jul 2013 21:39:38 -0700
Subject: [PATCH 461/542] Added code signature step to Framework build process

---
 Xcode/SDL/SDL.xcodeproj/project.pbxproj      | 15 +++++++
 Xcode/SDL/pkg-support/codesign-frameworks.sh | 43 ++++++++++++++++++++
 2 files changed, 58 insertions(+)
 create mode 100755 Xcode/SDL/pkg-support/codesign-frameworks.sh

diff --git a/Xcode/SDL/SDL.xcodeproj/project.pbxproj b/Xcode/SDL/SDL.xcodeproj/project.pbxproj
index 09631ea5a..494340bcb 100755
--- a/Xcode/SDL/SDL.xcodeproj/project.pbxproj
+++ b/Xcode/SDL/SDL.xcodeproj/project.pbxproj
@@ -2155,6 +2155,7 @@
 				BECDF62A0761BA81005FE872 /* Resources */,
 				BECDF62C0761BA81005FE872 /* Sources */,
 				BECDF6680761BA81005FE872 /* Frameworks */,
+				AA5C3FDC17A8C58600D6C8A1 /* Sign Frameworks */,
 			);
 			buildRules = (
 			);
@@ -2283,6 +2284,20 @@
 /* End PBXRezBuildPhase section */
 
 /* Begin PBXShellScriptBuildPhase section */
+		AA5C3FDC17A8C58600D6C8A1 /* Sign Frameworks */ = {
+			isa = PBXShellScriptBuildPhase;
+			buildActionMask = 2147483647;
+			files = (
+			);
+			inputPaths = (
+			);
+			name = "Sign Frameworks";
+			outputPaths = (
+			);
+			runOnlyForDeploymentPostprocessing = 0;
+			shellPath = /bin/sh;
+			shellScript = "if [ \"$USER\" = \"slouken\" ]; then\n    CODE_SIGN_IDENTITY=\"Mac Developer: Sam Lantinga (84TP7N5TA4)\" pkg-support/codesign-frameworks.sh || exit 1\nfi";
+		};
 		BECDF6BD0761BA81005FE872 /* ShellScript */ = {
 			isa = PBXShellScriptBuildPhase;
 			buildActionMask = 12;
diff --git a/Xcode/SDL/pkg-support/codesign-frameworks.sh b/Xcode/SDL/pkg-support/codesign-frameworks.sh
new file mode 100755
index 000000000..16dea2519
--- /dev/null
+++ b/Xcode/SDL/pkg-support/codesign-frameworks.sh
@@ -0,0 +1,43 @@
+#!/bin/sh
+
+# WARNING: You may have to run Clean in Xcode after changing CODE_SIGN_IDENTITY! 
+
+# Verify that $CODE_SIGN_IDENTITY is set
+if [ -z "$CODE_SIGN_IDENTITY" ] ; then
+    echo "CODE_SIGN_IDENTITY needs to be non-empty for codesigning frameworks!"
+
+    if [ "$CONFIGURATION" = "Release" ] ; then
+        exit 1
+    else
+        # Codesigning is optional for non-release builds.
+        exit 0
+    fi
+fi
+
+SAVEIFS=$IFS
+IFS=$(echo -en "\n\b")
+
+FRAMEWORK_DIR="${TARGET_BUILD_DIR}"
+
+# Loop through all frameworks
+FRAMEWORKS=`find "${FRAMEWORK_DIR}" -type d -name "*.framework" | sed -e "s/\(.*\)/\1\/Versions\/A\//"`
+RESULT=$?
+if [[ $RESULT != 0 ]] ; then
+    exit 1
+fi
+
+echo "Found:"
+echo "${FRAMEWORKS}"
+
+for FRAMEWORK in $FRAMEWORKS;
+do
+    echo "Signing '${FRAMEWORK}'"
+    `codesign -f -v -s "${CODE_SIGN_IDENTITY}" "${FRAMEWORK}"`
+    RESULT=$?
+    if [[ $RESULT != 0 ]] ; then
+        exit 1
+    fi
+done
+
+# restore $IFS
+IFS=$SAVEIFS

From 2f7e78480d17af65d848b815cf85dd476060191f Mon Sep 17 00:00:00 2001
From: Sam Lantinga 
Date: Tue, 30 Jul 2013 23:33:32 -0700
Subject: [PATCH 462/542] Fixed bug 2000 - The framework INSTALL_PATH still
 uses @executable_path

dak180

Since the MACOSX_DEPLOYMENT_TARGET is 10.5; INSTALL_PATH should use @rpath.

See http://www.dribin.org/dave/blog/archives/2009/11/15/rpath/ for the details on why this is a good idea.
---
 Xcode/SDL/SDL.xcodeproj/project.pbxproj | 4 ++--
 1 file changed, 2 insertions(+), 2 deletions(-)

diff --git a/Xcode/SDL/SDL.xcodeproj/project.pbxproj b/Xcode/SDL/SDL.xcodeproj/project.pbxproj
index 494340bcb..245378d59 100755
--- a/Xcode/SDL/SDL.xcodeproj/project.pbxproj
+++ b/Xcode/SDL/SDL.xcodeproj/project.pbxproj
@@ -2697,7 +2697,7 @@
 				FRAMEWORK_VERSION = A;
 				HEADER_SEARCH_PATHS = /usr/X11R6/include;
 				INFOPLIST_FILE = "Info-Framework.plist";
-				INSTALL_PATH = "@executable_path/../Frameworks";
+				INSTALL_PATH = "@rpath";
 				OTHER_LDFLAGS = "-liconv";
 				PRODUCT_NAME = SDL2;
 				WRAPPER_EXTENSION = framework;
@@ -2751,7 +2751,7 @@
 				FRAMEWORK_VERSION = A;
 				HEADER_SEARCH_PATHS = /usr/X11R6/include;
 				INFOPLIST_FILE = "Info-Framework.plist";
-				INSTALL_PATH = "@executable_path/../Frameworks";
+				INSTALL_PATH = "@rpath";
 				OTHER_LDFLAGS = "-liconv";
 				PRODUCT_NAME = SDL2;
 				WRAPPER_EXTENSION = framework;

From 512f5dfc213683b1ab34937beebf955fe914c3ec Mon Sep 17 00:00:00 2001
From: Gabriel Jacobo 
Date: Wed, 31 Jul 2013 10:04:59 -0300
Subject: [PATCH 463/542] Fix for bug 2001, verify that the AudioTrack is
 properly initialized

...and fail to initialize the audio backend if it's not!
---
 android-project/src/org/libsdl/app/SDLActivity.java | 13 ++++++++++++-
 src/core/android/SDL_android.c                      |  8 ++++++--
 2 files changed, 18 insertions(+), 3 deletions(-)

diff --git a/android-project/src/org/libsdl/app/SDLActivity.java b/android-project/src/org/libsdl/app/SDLActivity.java
index edee6254d..0f64f18c3 100644
--- a/android-project/src/org/libsdl/app/SDLActivity.java
+++ b/android-project/src/org/libsdl/app/SDLActivity.java
@@ -452,7 +452,7 @@ public class SDLActivity extends Activity {
     }
 
     // Audio
-    public static void audioInit(int sampleRate, boolean is16Bit, boolean isStereo, int desiredFrames) {
+    public static int audioInit(int sampleRate, boolean is16Bit, boolean isStereo, int desiredFrames) {
         int channelConfig = isStereo ? AudioFormat.CHANNEL_CONFIGURATION_STEREO : AudioFormat.CHANNEL_CONFIGURATION_MONO;
         int audioFormat = is16Bit ? AudioFormat.ENCODING_PCM_16BIT : AudioFormat.ENCODING_PCM_8BIT;
         int frameSize = (isStereo ? 2 : 1) * (is16Bit ? 2 : 1);
@@ -467,9 +467,20 @@ public class SDLActivity extends Activity {
         mAudioTrack = new AudioTrack(AudioManager.STREAM_MUSIC, sampleRate,
                 channelConfig, audioFormat, desiredFrames * frameSize, AudioTrack.MODE_STREAM);
         
+        // Instantiating AudioTrack can "succeed" without an exception and the track may still be invalid
+        // Ref: https://android.googlesource.com/platform/frameworks/base/+/refs/heads/master/media/java/android/media/AudioTrack.java
+        // Ref: http://developer.android.com/reference/android/media/AudioTrack.html#getState()
+        
+        if (mAudioTrack.getState() != AudioTrack.STATE_INITIALIZED) {
+            Log.e("SDL", "Failed during initialization of Audio Track");
+            return -1;
+        }
+        
         audioStartThread();
         
         Log.v("SDL", "SDL audio: got " + ((mAudioTrack.getChannelCount() >= 2) ? "stereo" : "mono") + " " + ((mAudioTrack.getAudioFormat() == AudioFormat.ENCODING_PCM_16BIT) ? "16-bit" : "8-bit") + " " + (mAudioTrack.getSampleRate() / 1000f) + "kHz, " + desiredFrames + " frames buffer");
+        
+        return 0;
     }
     
     public static void audioStartThread() {
diff --git a/src/core/android/SDL_android.c b/src/core/android/SDL_android.c
index 922deaa8e..7a008ff84 100644
--- a/src/core/android/SDL_android.c
+++ b/src/core/android/SDL_android.c
@@ -123,7 +123,7 @@ void SDL_Android_Init(JNIEnv* mEnv, jclass cls)
     midFlipBuffers = (*mEnv)->GetStaticMethodID(mEnv, mActivityClass,
                                 "flipBuffers","()V");
     midAudioInit = (*mEnv)->GetStaticMethodID(mEnv, mActivityClass,
-                                "audioInit", "(IZZI)V");
+                                "audioInit", "(IZZI)I");
     midAudioWriteShortBuffer = (*mEnv)->GetStaticMethodID(mEnv, mActivityClass,
                                 "audioWriteShortBuffer", "([S)V");
     midAudioWriteByteBuffer = (*mEnv)->GetStaticMethodID(mEnv, mActivityClass,
@@ -456,7 +456,11 @@ int Android_JNI_OpenAudioDevice(int sampleRate, int is16Bit, int channelCount, i
     audioBuffer16Bit = is16Bit;
     audioBufferStereo = channelCount > 1;
 
-    (*env)->CallStaticVoidMethod(env, mActivityClass, midAudioInit, sampleRate, audioBuffer16Bit, audioBufferStereo, desiredBufferFrames);
+    if ((*env)->CallStaticIntMethod(env, mActivityClass, midAudioInit, sampleRate, audioBuffer16Bit, audioBufferStereo, desiredBufferFrames) != 0) {
+        /* Error during audio initialization */
+        __android_log_print(ANDROID_LOG_WARN, "SDL", "SDL audio: error on AudioTrack initialization!");
+        return 0;
+    }
 
     /* Allocating the audio buffer from the Java side and passing it as the return value for audioInit no longer works on
      * Android >= 4.2 due to a "stale global reference" error. So now we allocate this buffer directly from this side. */

From 15997f221a71be544de51b4c6d35c1f41cd89345 Mon Sep 17 00:00:00 2001
From: "Ryan C. Gordon" 
Date: Wed, 31 Jul 2013 11:00:23 -0400
Subject: [PATCH 464/542] Workaround some Windows OpenGL drivers mishandling
 wglMakeCurrent().

You should be able to do wglMakeCurrent(NULL, NULL), according to MSDN, since
the first parameter is ignored if the second is NULL, but this causes problems
on some drivers, so make sure we always have a valid HDC in the first
parameter (and exit early if we already have no current context in the
NULL, NULL case).
---
 src/video/windows/SDL_windowsopengl.c | 22 +++++++++++++++++-----
 1 file changed, 17 insertions(+), 5 deletions(-)

diff --git a/src/video/windows/SDL_windowsopengl.c b/src/video/windows/SDL_windowsopengl.c
index 583220d83..f33f5c358 100644
--- a/src/video/windows/SDL_windowsopengl.c
+++ b/src/video/windows/SDL_windowsopengl.c
@@ -22,6 +22,7 @@
 
 #if SDL_VIDEO_DRIVER_WINDOWS
 
+#include "SDL_assert.h"
 #include "SDL_windowsvideo.h"
 
 /* WGL implementation of SDL OpenGL support */
@@ -407,7 +408,7 @@ WIN_GL_ChoosePixelFormatARB(_THIS, int *iAttribs, float *fAttribs)
                                                     &matching);
         }
 
-        _this->gl_data->wglMakeCurrent(NULL, NULL);
+        _this->gl_data->wglMakeCurrent(hdc, NULL);
         _this->gl_data->wglDeleteContext(hglrc);
     }
     ReleaseDC(hwnd, hdc);
@@ -622,11 +623,22 @@ WIN_GL_MakeCurrent(_THIS, SDL_Window * window, SDL_GLContext context)
         return SDL_SetError("OpenGL not initialized");
     }
 
-    if (window) {
-        hdc = ((SDL_WindowData *) window->driverdata)->hdc;
-    } else {
-        hdc = NULL;
+    /* sanity check that higher level handled this. */
+    SDL_assert(window || (!window && !context));
+
+    /* Some Windows drivers freak out if hdc is NULL, even when context is
+       NULL, against spec. Since hdc is _supposed_ to be ignored if context
+       is NULL, we either use the current GL window, or do nothing if we
+       already have no current context. */
+    if (!window) {
+        window = SDL_GL_GetCurrentWindow();
+        if (!window) {
+            SDL_assert(SDL_GL_GetCurrentContext() == NULL);
+            return 0;  /* already done. */
+        }
     }
+
+    hdc = ((SDL_WindowData *) window->driverdata)->hdc;
     if (!_this->gl_data->wglMakeCurrent(hdc, (HGLRC) context)) {
         return WIN_SetError("wglMakeCurrent()");
     }

From df2892774f2fa4d25944e6c6eda7054daf1f55d9 Mon Sep 17 00:00:00 2001
From: Edward Rudd 
Date: Wed, 31 Jul 2013 12:13:26 -0400
Subject: [PATCH 465/542] Further fix SIZEOF_VOIDP in SDL_config.h.in

The configure script was still overwriting SIZEOF_VOIDP so both ended up as either 4 or 8 depending on the arch.  This simply removes the check from configure.in
---
 configure    | 33 ---------------------------------
 configure.in |  2 +-
 2 files changed, 1 insertion(+), 34 deletions(-)

diff --git a/configure b/configure
index ff1702ed5..de41b5d54 100755
--- a/configure
+++ b/configure
@@ -16853,39 +16853,6 @@ fi
 
 fi
 
-# The cast to long int works around a bug in the HP C Compiler
-# version HP92453-01 B.11.11.23709.GP, which incorrectly rejects
-# declarations like `int a3[[(sizeof (unsigned char)) >= 0]];'.
-# This bug is HP SR number 8606223364.
-{ $as_echo "$as_me:${as_lineno-$LINENO}: checking size of void*" >&5
-$as_echo_n "checking size of void*... " >&6; }
-if ${ac_cv_sizeof_voidp+:} false; then :
-  $as_echo_n "(cached) " >&6
-else
-  if ac_fn_c_compute_int "$LINENO" "(long int) (sizeof (void*))" "ac_cv_sizeof_voidp"        "$ac_includes_default"; then :
-
-else
-  if test "$ac_cv_type_voidp" = yes; then
-     { { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5
-$as_echo "$as_me: error: in \`$ac_pwd':" >&2;}
-as_fn_error 77 "cannot compute sizeof (void*)
-See \`config.log' for more details" "$LINENO" 5; }
-   else
-     ac_cv_sizeof_voidp=0
-   fi
-fi
-
-fi
-{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_sizeof_voidp" >&5
-$as_echo "$ac_cv_sizeof_voidp" >&6; }
-
-
-
-cat >>confdefs.h <<_ACEOF
-#define SIZEOF_VOIDP $ac_cv_sizeof_voidp
-_ACEOF
-
-
 
 # Check whether --enable-gcc-atomics was given.
 if test "${enable_gcc_atomics+set}" = set; then :
diff --git a/configure.in b/configure.in
index d2bd7a3d5..d1cf8e152 100644
--- a/configure.in
+++ b/configure.in
@@ -265,7 +265,7 @@ if test x$enable_libc = xyes; then
     AC_CHECK_MEMBER(struct sigaction.sa_sigaction,[AC_DEFINE(HAVE_SA_SIGACTION)], ,[#include ])
 fi
 
-AC_CHECK_SIZEOF(void*)
+dnl AC_CHECK_SIZEOF(void*)
 
 dnl See whether we can use gcc atomic operations on this architecture
 AC_ARG_ENABLE(gcc-atomics,

From 51f5bfbc4b41fb721e9e55c3f14c696e1784b53a Mon Sep 17 00:00:00 2001
From: Gabriel Jacobo 
Date: Wed, 31 Jul 2013 16:25:50 -0300
Subject: [PATCH 466/542] Set mAudioTrack to null when AudioTrack
 initialization fails

Prevents potential problems when stopping the app.
---
 android-project/src/org/libsdl/app/SDLActivity.java | 1 +
 1 file changed, 1 insertion(+)

diff --git a/android-project/src/org/libsdl/app/SDLActivity.java b/android-project/src/org/libsdl/app/SDLActivity.java
index 0f64f18c3..0b90967cd 100644
--- a/android-project/src/org/libsdl/app/SDLActivity.java
+++ b/android-project/src/org/libsdl/app/SDLActivity.java
@@ -473,6 +473,7 @@ public class SDLActivity extends Activity {
         
         if (mAudioTrack.getState() != AudioTrack.STATE_INITIALIZED) {
             Log.e("SDL", "Failed during initialization of Audio Track");
+            mAudioTrack = null;
             return -1;
         }
         

From 8ed3858721255f4179c53ddf68579f5510db1fd0 Mon Sep 17 00:00:00 2001
From: "Ryan C. Gordon" 
Date: Thu, 1 Aug 2013 00:01:57 -0400
Subject: [PATCH 467/542] Windows: Don't lose the existing current GL context
 in SDL_CreateWindow().

Fixes Bugzilla #1395.
---
 src/video/windows/SDL_windowswindow.c | 5 +++++
 1 file changed, 5 insertions(+)

diff --git a/src/video/windows/SDL_windowswindow.c b/src/video/windows/SDL_windowswindow.c
index f40323ea6..c1ef463e6 100644
--- a/src/video/windows/SDL_windowswindow.c
+++ b/src/video/windows/SDL_windowswindow.c
@@ -231,10 +231,15 @@ WIN_CreateWindow(_THIS, SDL_Window * window)
     }
 #if SDL_VIDEO_OPENGL_WGL
     if (window->flags & SDL_WINDOW_OPENGL) {
+        /* The current context is lost in SDL_GL_SetupWindow; recover it. */
+        SDL_Window *current_win = SDL_GL_GetCurrentWindow();
+        SDL_GLContext current_ctx = SDL_GL_GetCurrentContext();
         if (WIN_GL_SetupWindow(_this, window) < 0) {
             WIN_DestroyWindow(_this, window);
+            WIN_GL_MakeCurrent(_this, current_win, current_ctx);
             return -1;
         }
+        WIN_GL_MakeCurrent(_this, current_win, current_ctx);
     }
 #endif
     return 0;

From 9943bac533b6831f6b1abc880cc310615fc123a4 Mon Sep 17 00:00:00 2001
From: Sam Lantinga 
Date: Wed, 31 Jul 2013 21:08:22 -0700
Subject: [PATCH 468/542] Fixed bug 1569 - Android volume keys not honoured
 inside SDL
MIME-Version: 1.0
Content-Type: text/plain; charset=UTF-8
Content-Transfer-Encoding: 8bit

Joseba García Echebarria

The current version of SDL HG in Android doesn't do anything when volume keys are pressed.
The change makes SDL ignore volume keys so that they're handled by the OS and the sound volume can be changed within an app.
---
 android-project/src/org/libsdl/app/SDLActivity.java | 6 ++++++
 1 file changed, 6 insertions(+)

diff --git a/android-project/src/org/libsdl/app/SDLActivity.java b/android-project/src/org/libsdl/app/SDLActivity.java
index 0b90967cd..48b371adb 100644
--- a/android-project/src/org/libsdl/app/SDLActivity.java
+++ b/android-project/src/org/libsdl/app/SDLActivity.java
@@ -711,6 +711,12 @@ class SDLSurface extends SurfaceView implements SurfaceHolder.Callback,
     @Override
     public boolean onKey(View  v, int keyCode, KeyEvent event) {
 
+        // Ignore volume keys so they're handled by Android
+        if (keyCode == KeyEvent.KEYCODE_VOLUME_DOWN ||
+            keyCode == KeyEvent.KEYCODE_VOLUME_UP) {
+            return false;
+        }
+        
         if (event.getAction() == KeyEvent.ACTION_DOWN) {
             //Log.v("SDL", "key down: " + keyCode);
             SDLActivity.onNativeKeyDown(keyCode);

From 44c4197243444c39935b94fcb43319c98eabdfcf Mon Sep 17 00:00:00 2001
From: Sam Lantinga 
Date: Wed, 31 Jul 2013 21:22:09 -0700
Subject: [PATCH 469/542] Documented why we have global and thread-local
 variables for the GL context.

---
 src/video/SDL_sysvideo.h | 3 +++
 1 file changed, 3 insertions(+)

diff --git a/src/video/SDL_sysvideo.h b/src/video/SDL_sysvideo.h
index 598782833..4973648c7 100644
--- a/src/video/SDL_sysvideo.h
+++ b/src/video/SDL_sysvideo.h
@@ -301,6 +301,9 @@ struct SDL_VideoDevice
 
     /* * * */
     /* Cache current GL context; don't call the OS when it hasn't changed. */
+    /* We have the global pointers here so Cocoa continues to work the way
+       it always has, and the thread-local storage for the general case.
+     */
     SDL_Window *current_glwin;
     SDL_GLContext current_glctx;
     SDL_TLSID current_glwin_tls;

From 3d680115c7f7e38916d231c135ff02b4a2bed04c Mon Sep 17 00:00:00 2001
From: "Ryan C. Gordon" 
Date: Thu, 1 Aug 2013 00:27:22 -0400
Subject: [PATCH 470/542] Move the fix for Bugzilla #1395 into
 WIN_GL_SetupWindow() directly.

It's a cleaner solution.

--HG--
extra : rebase_source : efd29bea6e39b6aed73f78a0f119b3b4c2bbd498
---
 src/video/windows/SDL_windowsopengl.c | 16 ++++++++++++++--
 src/video/windows/SDL_windowswindow.c |  5 -----
 2 files changed, 14 insertions(+), 7 deletions(-)

diff --git a/src/video/windows/SDL_windowsopengl.c b/src/video/windows/SDL_windowsopengl.c
index f33f5c358..9cda41596 100644
--- a/src/video/windows/SDL_windowsopengl.c
+++ b/src/video/windows/SDL_windowsopengl.c
@@ -418,8 +418,9 @@ WIN_GL_ChoosePixelFormatARB(_THIS, int *iAttribs, float *fAttribs)
     return pixel_format;
 }
 
-int
-WIN_GL_SetupWindow(_THIS, SDL_Window * window)
+/* actual work of WIN_GL_SetupWindow() happens here. */
+static int
+WIN_GL_SetupWindowInternal(_THIS, SDL_Window * window)
 {
     HDC hdc = ((SDL_WindowData *) window->driverdata)->hdc;
     PIXELFORMATDESCRIPTOR pfd;
@@ -529,6 +530,17 @@ WIN_GL_SetupWindow(_THIS, SDL_Window * window)
     return 0;
 }
 
+int
+WIN_GL_SetupWindow(_THIS, SDL_Window * window)
+{
+    /* The current context is lost in here; save it and reset it. */
+    SDL_Window *current_win = SDL_GL_GetCurrentWindow();
+    SDL_GLContext current_ctx = SDL_GL_GetCurrentContext();
+    const int retval = WIN_GL_SetupWindowInternal(_this, window);
+    WIN_GL_MakeCurrent(_this, current_win, current_ctx);
+    return retval;
+}
+
 SDL_GLContext
 WIN_GL_CreateContext(_THIS, SDL_Window * window)
 {
diff --git a/src/video/windows/SDL_windowswindow.c b/src/video/windows/SDL_windowswindow.c
index c1ef463e6..f40323ea6 100644
--- a/src/video/windows/SDL_windowswindow.c
+++ b/src/video/windows/SDL_windowswindow.c
@@ -231,15 +231,10 @@ WIN_CreateWindow(_THIS, SDL_Window * window)
     }
 #if SDL_VIDEO_OPENGL_WGL
     if (window->flags & SDL_WINDOW_OPENGL) {
-        /* The current context is lost in SDL_GL_SetupWindow; recover it. */
-        SDL_Window *current_win = SDL_GL_GetCurrentWindow();
-        SDL_GLContext current_ctx = SDL_GL_GetCurrentContext();
         if (WIN_GL_SetupWindow(_this, window) < 0) {
             WIN_DestroyWindow(_this, window);
-            WIN_GL_MakeCurrent(_this, current_win, current_ctx);
             return -1;
         }
-        WIN_GL_MakeCurrent(_this, current_win, current_ctx);
     }
 #endif
     return 0;

From 9b622dc41ebe2992dfd80788afdb42c73fde0341 Mon Sep 17 00:00:00 2001
From: Sam Lantinga 
Date: Wed, 31 Jul 2013 21:31:23 -0700
Subject: [PATCH 471/542] More work on bug 1999, added missing
 CFBundleExecutable key to Info.plist

---
 Xcode/SDL/Info-Framework.plist | 2 ++
 1 file changed, 2 insertions(+)

diff --git a/Xcode/SDL/Info-Framework.plist b/Xcode/SDL/Info-Framework.plist
index 544baa635..0ab4b25e3 100644
--- a/Xcode/SDL/Info-Framework.plist
+++ b/Xcode/SDL/Info-Framework.plist
@@ -22,5 +22,7 @@
 	SDLX
 	CFBundleVersion
 	2.0.0
+    CFBundleExecutable
+    ${EXECUTABLE_NAME}
 
 

From 72d8cda7bbf5ec5fac042c55778adb2115b8b544 Mon Sep 17 00:00:00 2001
From: "Ryan C. Gordon" 
Date: Thu, 1 Aug 2013 01:50:02 -0400
Subject: [PATCH 472/542] Windows: Unstick shift keys in a timely manner when
 the OS loses a KEYUP event.

Fixes Bugzilla #1959.
---
 src/video/windows/SDL_windowsevents.c | 13 +++++++++++++
 1 file changed, 13 insertions(+)

diff --git a/src/video/windows/SDL_windowsevents.c b/src/video/windows/SDL_windowsevents.c
index 78d31d54e..3e79d69cd 100644
--- a/src/video/windows/SDL_windowsevents.c
+++ b/src/video/windows/SDL_windowsevents.c
@@ -766,11 +766,24 @@ WIN_WindowProc(HWND hwnd, UINT msg, WPARAM wParam, LPARAM lParam)
 void
 WIN_PumpEvents(_THIS)
 {
+    const Uint8 *keystate;
     MSG msg;
     while (PeekMessage(&msg, NULL, 0, 0, PM_REMOVE)) {
         TranslateMessage(&msg);
         DispatchMessage(&msg);
     }
+
+    /* Windows loses a shift KEYUP event when you have both pressed at once and let go of one.
+       You won't get a KEYUP until both are released, and that keyup will only be for the second
+       key you released. Take heroic measures and check the keystate as of the last handled event,
+       and if we think a key is pressed when Windows doesn't, unstick it in SDL's state. */
+    keystate = SDL_GetKeyboardState(NULL);
+    if ((keystate[SDL_SCANCODE_LSHIFT] == SDL_PRESSED) && !(GetKeyState(VK_LSHIFT) & 0x8000)) {
+        SDL_SendKeyboardKey(SDL_RELEASED, SDL_SCANCODE_LSHIFT);
+    }
+    if ((keystate[SDL_SCANCODE_RSHIFT] == SDL_PRESSED) && !(GetKeyState(VK_RSHIFT) & 0x8000)) {
+        SDL_SendKeyboardKey(SDL_RELEASED, SDL_SCANCODE_RSHIFT);
+    }
 }
 
 static int app_registered = 0;

From da00f7ef51bad6558f502cfe1487f56e886f3c8a Mon Sep 17 00:00:00 2001
From: Sam Lantinga 
Date: Thu, 1 Aug 2013 01:29:07 -0700
Subject: [PATCH 473/542] Fixed bug 1638 - Blit Alpha surface bug

The DUFFS_LOOP_124() macro was trying to be too clever and wasn't doing the right thing, it was checking n & 4 instead of width.
I'm not sure how we didn't catch this before, but it should be fixed now.
---
 src/video/SDL_blit.h | 14 ++++++++------
 1 file changed, 8 insertions(+), 6 deletions(-)

diff --git a/src/video/SDL_blit.h b/src/video/SDL_blit.h
index 3e05bafd9..07d3af703 100644
--- a/src/video/SDL_blit.h
+++ b/src/video/SDL_blit.h
@@ -510,13 +510,15 @@ do {                                                                    \
     if (n & 2) {                                                        \
         pixel_copy_increment2; n -= 2;                                  \
     }                                                                   \
+    if (n & 4) {                                                        \
+        pixel_copy_increment4; n -= 4;                                  \
+    }                                                                   \
     if (n) {                                                            \
-        n = (n+7)/ 8;                                                   \
-        switch (n & 4) {                                                \
-        case 0: do {    pixel_copy_increment4;                          \
-        case 4:     pixel_copy_increment4;                              \
-            } while (--n > 0);                                          \
-        }                                                               \
+        n /= 8;                                                         \
+        do {                                                            \
+            pixel_copy_increment4;                                      \
+            pixel_copy_increment4;                                      \
+        } while (--n > 0);                                              \
     }                                                                   \
 }
 

From 8ee3d7a554f612df87ab5e560aa4d98d5d47fd58 Mon Sep 17 00:00:00 2001
From: Sam Lantinga 
Date: Thu, 1 Aug 2013 09:15:36 -0700
Subject: [PATCH 474/542] Fixed bug 1968 - SDL_RenderCopy stretch loses
 proportion on viewport boundaries for 3D renderers

driedfruit

SDL_RenderCopy clips dstrect against the viewport. Then it adjusts the
srcrect by "appropriate" amount of pixels. This amount is actually
wrong, quite a lot, because of the rounding errors introduced in the "*
factor / factor" scale.

            real_srcrect.x += (deltax * real_srcrect.w) / dstrect->w;
            real_srcrect.w += (deltaw * real_srcrect.w) / dstrect->w;

For example:

I have a 32 x 32 srcrect and a 64 x 64 dstrect. So far the
stretching is done perfectly, by a factor of 2.

Now, consider dstrect being clipped against the viewport, so it becomes
56 x 64. Now, the factor becomes 1.75 ! The adjustment to "srcrect"
can't handle this, cause srcrect is in integers.

And thus we now have incorrect mapping, with dstrect not being in the
right proportion to srcrect.

The problem is most evident when upscaling stuff, like displaying a 8x8
texture with a zoom of 64 or more, and moving it beyond the corners of
the screen. It *looks* really really bad.

Note: RenderCopyEX does no such clipping, and is right to do so. The fix would be to remove any such clipping from RenderCopy too. And then fix the software renderer, because it has the same fault, independently of RenderCopy.

[attached patch]
this leaves Software Renderer buggy, as it does it's own clipping later on
---
 src/render/SDL_render.c | 16 ++--------------
 1 file changed, 2 insertions(+), 14 deletions(-)

diff --git a/src/render/SDL_render.c b/src/render/SDL_render.c
index 3cf467d64..5dfc38dcb 100644
--- a/src/render/SDL_render.c
+++ b/src/render/SDL_render.c
@@ -1549,22 +1549,10 @@ SDL_RenderCopy(SDL_Renderer * renderer, SDL_Texture * texture,
     real_dstrect.x = 0;
     real_dstrect.y = 0;
     if (dstrect) {
-        if (!SDL_IntersectRect(dstrect, &real_dstrect, &real_dstrect)) {
+        if (!SDL_HasIntersection(dstrect, &real_dstrect)) {
             return 0;
         }
-        /* Clip srcrect by the same amount as dstrect was clipped */
-        if (dstrect->w != real_dstrect.w) {
-            int deltax = (real_dstrect.x - dstrect->x);
-            int deltaw = (real_dstrect.w - dstrect->w);
-            real_srcrect.x += (deltax * real_srcrect.w) / dstrect->w;
-            real_srcrect.w += (deltaw * real_srcrect.w) / dstrect->w;
-        }
-        if (dstrect->h != real_dstrect.h) {
-            int deltay = (real_dstrect.y - dstrect->y);
-            int deltah = (real_dstrect.h - dstrect->h);
-            real_srcrect.y += (deltay * real_srcrect.h) / dstrect->h;
-            real_srcrect.h += (deltah * real_srcrect.h) / dstrect->h;
-        }
+        real_dstrect = *dstrect;
     }
 
     if (texture->native) {

From ab545a05b965208032fc2251333b9bb00a83745b Mon Sep 17 00:00:00 2001
From: Gabriel Jacobo 
Date: Fri, 2 Aug 2013 12:38:39 -0300
Subject: [PATCH 475/542] Temporary fix for bug #1639 SDL does not message back
 closing of screen keyboard

See FIXME notes on patch for details.
---
 .../src/org/libsdl/app/SDLActivity.java        | 18 ++++++++++++++++++
 src/core/android/SDL_android.c                 |  9 +++++++++
 2 files changed, 27 insertions(+)

diff --git a/android-project/src/org/libsdl/app/SDLActivity.java b/android-project/src/org/libsdl/app/SDLActivity.java
index 48b371adb..62a3be1ba 100644
--- a/android-project/src/org/libsdl/app/SDLActivity.java
+++ b/android-project/src/org/libsdl/app/SDLActivity.java
@@ -236,6 +236,7 @@ public class SDLActivity extends Activity {
     public static native void onNativeResize(int x, int y, int format);
     public static native void onNativeKeyDown(int keycode);
     public static native void onNativeKeyUp(int keycode);
+    public static native void onNativeKeyboardFocusLost();
     public static native void onNativeTouch(int touchDevId, int pointerFingerId,
                                             int action, float x, 
                                             float y, float p);
@@ -829,6 +830,23 @@ class DummyEdit extends View implements View.OnKeyListener {
 
         return false;
     }
+        
+    //
+    @Override
+    public boolean onKeyPreIme (int keyCode, KeyEvent event) {
+        // As seen on StackOverflow: http://stackoverflow.com/questions/7634346/keyboard-hide-event
+        // FIXME: Discussion at http://bugzilla.libsdl.org/show_bug.cgi?id=1639
+        // FIXME: This is not a 100% effective solution to the problem of detecting if the keyboard is showing or not
+        // FIXME: A more effective solution would be to change our Layout from AbsoluteLayout to Relative or Linear
+        // FIXME: And determine the keyboard presence doing this: http://stackoverflow.com/questions/2150078/how-to-check-visibility-of-software-keyboard-in-android
+        // FIXME: An even more effective way would be if Android provided this out of the box, but where would the fun be in that :)
+        if (event.getAction()==KeyEvent.ACTION_UP && keyCode == KeyEvent.KEYCODE_BACK) {
+            if (SDLActivity.mTextEdit != null && SDLActivity.mTextEdit.getVisibility() == View.VISIBLE) {
+                SDLActivity.onNativeKeyboardFocusLost();
+            }
+        }
+        return super.onKeyPreIme(keyCode, event);
+    }
 
     @Override
     public InputConnection onCreateInputConnection(EditorInfo outAttrs) {
diff --git a/src/core/android/SDL_android.c b/src/core/android/SDL_android.c
index 7a008ff84..0d47b4bae 100644
--- a/src/core/android/SDL_android.c
+++ b/src/core/android/SDL_android.c
@@ -162,6 +162,15 @@ void Java_org_libsdl_app_SDLActivity_onNativeKeyUp(
     Android_OnKeyUp(keycode);
 }
 
+// Keyboard Focus Lost
+void Java_org_libsdl_app_SDLActivity_onNativeKeyboardFocusLost(
+                                    JNIEnv* env, jclass jcls)
+{
+    /* Calling SDL_StopTextInput will take care of hiding the keyboard and cleaning up the DummyText widget */
+    SDL_StopTextInput();
+}
+
+
 // Touch
 void Java_org_libsdl_app_SDLActivity_onNativeTouch(
                                     JNIEnv* env, jclass jcls,

From a60814585d8840caf6891fb8a562f2cd3b8d6552 Mon Sep 17 00:00:00 2001
From: "Ryan C. Gordon" 
Date: Fri, 2 Aug 2013 18:25:20 -0400
Subject: [PATCH 476/542] Fixed some whitespace.

--HG--
extra : rebase_source : f10a447a25fafe9bc7a56dba0e6ebc74a3804063
---
 src/video/SDL_video.c | 4 ++--
 1 file changed, 2 insertions(+), 2 deletions(-)

diff --git a/src/video/SDL_video.c b/src/video/SDL_video.c
index f96539dfa..b02aad86f 100644
--- a/src/video/SDL_video.c
+++ b/src/video/SDL_video.c
@@ -2111,8 +2111,8 @@ SDL_OnWindowFocusLost(SDL_Window * window)
     SDL_UpdateWindowGrab(window);
 
     /* If we're fullscreen and lose focus, minimize unless the hint tells us otherwise */
-     if ((window->flags & SDL_WINDOW_FULLSCREEN) && ShouldMinimizeOnFocusLoss() ) {
-            SDL_MinimizeWindow(window);
+    if ((window->flags & SDL_WINDOW_FULLSCREEN) && ShouldMinimizeOnFocusLoss()) {
+        SDL_MinimizeWindow(window);
     }
 }
 

From a99dfca578b18dd8a9cc2d092638f484b49b4a37 Mon Sep 17 00:00:00 2001
From: "Ryan C. Gordon" 
Date: Sat, 3 Aug 2013 02:20:00 -0400
Subject: [PATCH 477/542] Some fixes for SDL_MaximizeWindow().

Fixes Bugzilla #1441.
---
 src/video/SDL_video.c             |  2 ++
 src/video/cocoa/SDL_cocoawindow.m |  7 +++++++
 src/video/x11/SDL_x11window.c     | 16 +++++++---------
 3 files changed, 16 insertions(+), 9 deletions(-)

diff --git a/src/video/SDL_video.c b/src/video/SDL_video.c
index b02aad86f..a78104c54 100644
--- a/src/video/SDL_video.c
+++ b/src/video/SDL_video.c
@@ -1756,6 +1756,8 @@ SDL_MaximizeWindow(SDL_Window * window)
         return;
     }
 
+    // !!! FIXME: should this check if the window is resizable?
+
     if (_this->MaximizeWindow) {
         _this->MaximizeWindow(_this, window);
     }
diff --git a/src/video/cocoa/SDL_cocoawindow.m b/src/video/cocoa/SDL_cocoawindow.m
index ccb7d7fef..28a58e4e6 100644
--- a/src/video/cocoa/SDL_cocoawindow.m
+++ b/src/video/cocoa/SDL_cocoawindow.m
@@ -239,6 +239,13 @@ static __inline__ void ConvertNSRect(NSRect *r)
        or resizing from a corner */
     SDL_SendWindowEvent(_data->window, SDL_WINDOWEVENT_MOVED, x, y);
     SDL_SendWindowEvent(_data->window, SDL_WINDOWEVENT_RESIZED, w, h);
+
+    const BOOL zoomed = [_data->nswindow isZoomed];
+    if (!zoomed) {
+        SDL_SendWindowEvent(_data->window, SDL_WINDOWEVENT_RESTORED, 0, 0);
+    } else if (zoomed) {
+        SDL_SendWindowEvent(_data->window, SDL_WINDOWEVENT_MAXIMIZED, 0, 0);
+    }
 }
 
 - (void)windowDidMiniaturize:(NSNotification *)aNotification
diff --git a/src/video/x11/SDL_x11window.c b/src/video/x11/SDL_x11window.c
index 07a836dcf..078ca3014 100644
--- a/src/video/x11/SDL_x11window.c
+++ b/src/video/x11/SDL_x11window.c
@@ -878,6 +878,12 @@ SetWindowMaximized(_THIS, SDL_Window * window, SDL_bool maximized)
     Atom _NET_WM_STATE_MAXIMIZED_VERT = data->videodata->_NET_WM_STATE_MAXIMIZED_VERT;
     Atom _NET_WM_STATE_MAXIMIZED_HORZ = data->videodata->_NET_WM_STATE_MAXIMIZED_HORZ;
 
+    if (maximized) {
+        window->flags |= SDL_WINDOW_MAXIMIZED;
+    } else {
+        window->flags &= ~SDL_WINDOW_MAXIMIZED;
+    }
+
     if (X11_IsWindowMapped(_this, window)) {
         XEvent e;
 
@@ -895,15 +901,7 @@ SetWindowMaximized(_THIS, SDL_Window * window, SDL_bool maximized)
         XSendEvent(display, RootWindow(display, displaydata->screen), 0,
                    SubstructureNotifyMask | SubstructureRedirectMask, &e);
     } else {
-        Uint32 flags;
-
-        flags = window->flags;
-        if (maximized) {
-            flags |= SDL_WINDOW_MAXIMIZED;
-        } else {
-            flags &= ~SDL_WINDOW_MAXIMIZED;
-        }
-        X11_SetNetWMState(_this, data->xwindow, flags);
+        X11_SetNetWMState(_this, data->xwindow, window->flags);
     }
     XFlush(display);
 }

From 2a6b2351908170bc7e34832b508280f43f732463 Mon Sep 17 00:00:00 2001
From: Gabriel Jacobo 
Date: Sat, 3 Aug 2013 12:54:39 -0300
Subject: [PATCH 478/542] Fixes bug #1889, allows for GL Context
 deletion/recreation on Android Thanks ny00!

---
 .../src/org/libsdl/app/SDLActivity.java       | 41 +++++++++++++------
 src/core/android/SDL_android.c                | 10 +++++
 src/video/android/SDL_androidgl.c             |  4 +-
 3 files changed, 41 insertions(+), 14 deletions(-)

diff --git a/android-project/src/org/libsdl/app/SDLActivity.java b/android-project/src/org/libsdl/app/SDLActivity.java
index 62a3be1ba..9d57ef30f 100644
--- a/android-project/src/org/libsdl/app/SDLActivity.java
+++ b/android-project/src/org/libsdl/app/SDLActivity.java
@@ -72,6 +72,7 @@ public class SDLActivity extends Activity {
         // Set up the surface
         mEGLSurface = EGL10.EGL_NO_SURFACE;
         mSurface = new SDLSurface(getApplication());
+        mEGLContext = EGL10.EGL_NO_CONTEXT;
 
         mLayout = new AbsoluteLayout(this);
         mLayout.addView(mSurface);
@@ -249,6 +250,20 @@ public class SDLActivity extends Activity {
     public static boolean createGLContext(int majorVersion, int minorVersion, int[] attribs) {
         return initEGL(majorVersion, minorVersion, attribs);
     }
+    
+    public static void deleteGLContext() {
+        if (SDLActivity.mEGLDisplay != null && SDLActivity.mEGLContext != EGL10.EGL_NO_CONTEXT) {
+            EGL10 egl = (EGL10)EGLContext.getEGL();
+            egl.eglMakeCurrent(SDLActivity.mEGLDisplay, EGL10.EGL_NO_SURFACE, EGL10.EGL_NO_SURFACE, EGL10.EGL_NO_CONTEXT);
+            egl.eglDestroyContext(SDLActivity.mEGLDisplay, SDLActivity.mEGLContext);
+            SDLActivity.mEGLContext = EGL10.EGL_NO_CONTEXT;
+
+            if (SDLActivity.mEGLSurface != EGL10.EGL_NO_SURFACE) {
+                egl.eglDestroySurface(SDLActivity.mEGLDisplay, SDLActivity.mEGLSurface);
+                SDLActivity.mEGLSurface = EGL10.EGL_NO_SURFACE;
+            }
+        }
+    }
 
     public static void flipBuffers() {
         flipEGL();
@@ -314,19 +329,20 @@ public class SDLActivity extends Activity {
     // EGL functions
     public static boolean initEGL(int majorVersion, int minorVersion, int[] attribs) {
         try {
+            EGL10 egl = (EGL10)EGLContext.getEGL();
+            
             if (SDLActivity.mEGLDisplay == null) {
-                Log.v("SDL", "Starting up OpenGL ES " + majorVersion + "." + minorVersion);
-
-                EGL10 egl = (EGL10)EGLContext.getEGL();
-
-                EGLDisplay dpy = egl.eglGetDisplay(EGL10.EGL_DEFAULT_DISPLAY);
-
+                SDLActivity.mEGLDisplay = egl.eglGetDisplay(EGL10.EGL_DEFAULT_DISPLAY);
                 int[] version = new int[2];
-                egl.eglInitialize(dpy, version);
-
+                egl.eglInitialize(SDLActivity.mEGLDisplay, version);
+            }
+            
+            if (SDLActivity.mEGLDisplay != null && SDLActivity.mEGLContext == EGL10.EGL_NO_CONTEXT) {
+                // No current GL context exists, we will create a new one.
+                Log.v("SDL", "Starting up OpenGL ES " + majorVersion + "." + minorVersion);
                 EGLConfig[] configs = new EGLConfig[128];
                 int[] num_config = new int[1];
-                if (!egl.eglChooseConfig(dpy, attribs, configs, 1, num_config) || num_config[0] == 0) {
+                if (!egl.eglChooseConfig(SDLActivity.mEGLDisplay, attribs, configs, 1, num_config) || num_config[0] == 0) {
                     Log.e("SDL", "No EGL config available");
                     return false;
                 }
@@ -350,7 +366,7 @@ public class SDLActivity extends Activity {
                             attribs[j] == EGL10.EGL_ALPHA_SIZE ||
                             attribs[j] == EGL10.EGL_DEPTH_SIZE ||
                             attribs[j] == EGL10.EGL_STENCIL_SIZE)) {
-                            egl.eglGetConfigAttrib(dpy, configs[i], attribs[j], value);
+                            egl.eglGetConfigAttrib(SDLActivity.mEGLDisplay, configs[i], attribs[j], value);
                             bitdiff += value[0] - attribs[j + 1]; // value is always >= attrib
                         }
                     }
@@ -364,13 +380,12 @@ public class SDLActivity extends Activity {
                 }
                 
                 Log.d("SDL", "Selected mode with a total bit difference of " + bestdiff);
-               
 
-                SDLActivity.mEGLDisplay = dpy;
                 SDLActivity.mEGLConfig = config;
                 SDLActivity.mGLMajor = majorVersion;
                 SDLActivity.mGLMinor = minorVersion;
             }
+            
             return SDLActivity.createEGLSurface();
 
         } catch(Exception e) {
@@ -397,7 +412,7 @@ public class SDLActivity extends Activity {
     public static boolean createEGLSurface() {
         if (SDLActivity.mEGLDisplay != null && SDLActivity.mEGLConfig != null) {
             EGL10 egl = (EGL10)EGLContext.getEGL();
-            if (SDLActivity.mEGLContext == null) createEGLContext();
+            if (SDLActivity.mEGLContext == EGL10.EGL_NO_CONTEXT) createEGLContext();
 
             if (SDLActivity.mEGLSurface == EGL10.EGL_NO_SURFACE) {
                 Log.v("SDL", "Creating new EGL Surface");
diff --git a/src/core/android/SDL_android.c b/src/core/android/SDL_android.c
index 0d47b4bae..598e4095b 100644
--- a/src/core/android/SDL_android.c
+++ b/src/core/android/SDL_android.c
@@ -71,6 +71,7 @@ static jclass mActivityClass;
 
 // method signatures
 static jmethodID midCreateGLContext;
+static jmethodID midDeleteGLContext;
 static jmethodID midFlipBuffers;
 static jmethodID midAudioInit;
 static jmethodID midAudioWriteShortBuffer;
@@ -120,6 +121,8 @@ void SDL_Android_Init(JNIEnv* mEnv, jclass cls)
 
     midCreateGLContext = (*mEnv)->GetStaticMethodID(mEnv, mActivityClass,
                                 "createGLContext","(II[I)Z");
+    midDeleteGLContext = (*mEnv)->GetStaticMethodID(mEnv, mActivityClass,
+                                "deleteGLContext","()V");
     midFlipBuffers = (*mEnv)->GetStaticMethodID(mEnv, mActivityClass,
                                 "flipBuffers","()V");
     midAudioInit = (*mEnv)->GetStaticMethodID(mEnv, mActivityClass,
@@ -361,6 +364,13 @@ SDL_bool Android_JNI_CreateContext(int majorVersion, int minorVersion,
     return success ? SDL_TRUE : SDL_FALSE;
 }
 
+SDL_bool Android_JNI_DeleteContext(SDL_GLContext context) 
+{
+    /* There's only one context, so the parameter is ignored for now */
+    JNIEnv *env = Android_JNI_GetEnv();
+    (*env)->CallStaticBooleanMethod(env, mActivityClass, midDeleteGLContext);
+}
+
 void Android_JNI_SwapWindow()
 {
     JNIEnv *mEnv = Android_JNI_GetEnv();
diff --git a/src/video/android/SDL_androidgl.c b/src/video/android/SDL_androidgl.c
index 1382b8878..f4fe55233 100644
--- a/src/video/android/SDL_androidgl.c
+++ b/src/video/android/SDL_androidgl.c
@@ -119,7 +119,9 @@ Android_GL_SwapWindow(_THIS, SDL_Window * window)
 void
 Android_GL_DeleteContext(_THIS, SDL_GLContext context)
 {
-    __android_log_print(ANDROID_LOG_INFO, "SDL", "[STUB] GL_DeleteContext\n");
+    if (context) {
+        Android_JNI_DeleteContext(context);
+    }
 }
 
 #endif /* SDL_VIDEO_DRIVER_ANDROID */

From ea1040111aaa000c066d3fc116d6f88d2d8314e2 Mon Sep 17 00:00:00 2001
From: Philipp Wiesemann 
Date: Sat, 3 Aug 2013 23:36:07 +0200
Subject: [PATCH 479/542] Fixed calling JNI method in a wrong way. Method is
 void and does not return bool.

---
 src/core/android/SDL_android.c | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/src/core/android/SDL_android.c b/src/core/android/SDL_android.c
index 598e4095b..b5f4ea908 100644
--- a/src/core/android/SDL_android.c
+++ b/src/core/android/SDL_android.c
@@ -368,7 +368,7 @@ SDL_bool Android_JNI_DeleteContext(SDL_GLContext context)
 {
     /* There's only one context, so the parameter is ignored for now */
     JNIEnv *env = Android_JNI_GetEnv();
-    (*env)->CallStaticBooleanMethod(env, mActivityClass, midDeleteGLContext);
+    (*env)->CallStaticVoidMethod(env, mActivityClass, midDeleteGLContext);
 }
 
 void Android_JNI_SwapWindow()

From 1e3605c00f9787a968c905beb544956df1553a2d Mon Sep 17 00:00:00 2001
From: Philipp Wiesemann 
Date: Sat, 3 Aug 2013 23:40:28 +0200
Subject: [PATCH 480/542] Added missing return statement.

---
 src/core/android/SDL_android.c | 1 +
 1 file changed, 1 insertion(+)

diff --git a/src/core/android/SDL_android.c b/src/core/android/SDL_android.c
index b5f4ea908..18b700b67 100644
--- a/src/core/android/SDL_android.c
+++ b/src/core/android/SDL_android.c
@@ -369,6 +369,7 @@ SDL_bool Android_JNI_DeleteContext(SDL_GLContext context)
     /* There's only one context, so the parameter is ignored for now */
     JNIEnv *env = Android_JNI_GetEnv();
     (*env)->CallStaticVoidMethod(env, mActivityClass, midDeleteGLContext);
+    return SDL_TRUE;
 }
 
 void Android_JNI_SwapWindow()

From 12b0ad39fcc24a3a084da68b12ecb38a05cd73dc Mon Sep 17 00:00:00 2001
From: Sam Lantinga 
Date: Sun, 4 Aug 2013 09:23:55 -0700
Subject: [PATCH 481/542] Allow C++ code to include SDL_android.h

Alexey Petruchik

Although SDL_android.h is not intended to be included by client code sometimes it needed. For example you need JNIEnv pointer to make JNI calls to modified SDLActivity.java (video playback, facebook integration, in-apps). It seems a bit weird to write:

extern "C" {
#include "SDL_android.h"
}

in my AndroidJNI.cpp file.
---
 src/core/android/SDL_android.h | 14 ++++++++++++++
 1 file changed, 14 insertions(+)

diff --git a/src/core/android/SDL_android.h b/src/core/android/SDL_android.h
index 9045eb5df..d53652f88 100644
--- a/src/core/android/SDL_android.h
+++ b/src/core/android/SDL_android.h
@@ -20,6 +20,13 @@
 */
 #include "SDL_config.h"
 
+/* Set up for C function definitions, even when using C++ */
+#ifdef __cplusplus
+/* *INDENT-OFF* */
+extern "C" {
+/* *INDENT-ON* */
+#endif
+
 #include "SDL_rect.h"
 
 /* Interface from the SDL library into the Android Java activity */
@@ -61,4 +68,11 @@ int Android_JNI_SetupThread(void);
 /* Generic messages */
 int Android_JNI_SendMessage(int command, int param);
 
+/* Ends C function definitions when using C++ */
+#ifdef __cplusplus
+/* *INDENT-OFF* */
+}
+/* *INDENT-ON* */
+#endif
+
 /* vi: set ts=4 sw=4 expandtab: */

From 073d059fc94e7773f4ae040eeebbab446526dc2a Mon Sep 17 00:00:00 2001
From: Sam Lantinga 
Date: Sun, 4 Aug 2013 09:26:45 -0700
Subject: [PATCH 482/542] Fixed bug 2008 - error typos in gles2 renderer

Martin Gerhardy

The attached patch fixes some typos in the SDL_SetError calls that are a little bit misleading.
---
 src/render/opengles2/SDL_render_gles2.c | 4 ++--
 1 file changed, 2 insertions(+), 2 deletions(-)

diff --git a/src/render/opengles2/SDL_render_gles2.c b/src/render/opengles2/SDL_render_gles2.c
index 339579a78..e34cd1b7c 100644
--- a/src/render/opengles2/SDL_render_gles2.c
+++ b/src/render/opengles2/SDL_render_gles2.c
@@ -1086,7 +1086,7 @@ GLES2_RenderDrawPoints(SDL_Renderer *renderer, const SDL_FPoint *points, int cou
     rdata->glDrawArrays(GL_POINTS, 0, count);
     SDL_stack_free(vertices);
     if (rdata->glGetError() != GL_NO_ERROR) {
-        return SDL_SetError("Failed to render lines");
+        return SDL_SetError("Failed to render points");
     }
     return 0;
 }
@@ -1160,7 +1160,7 @@ GLES2_RenderFillRects(SDL_Renderer *renderer, const SDL_FRect *rects, int count)
         rdata->glDrawArrays(GL_TRIANGLE_STRIP, 0, 4);
     }
     if (rdata->glGetError() != GL_NO_ERROR) {
-        return SDL_SetError("Failed to render lines");
+        return SDL_SetError("Failed to render filled rects");
     }
     return 0;
 }

From dedde96b9fb051bb9a8b6ef89b6e0c6faed41ed2 Mon Sep 17 00:00:00 2001
From: Sam Lantinga 
Date: Sun, 4 Aug 2013 09:35:35 -0700
Subject: [PATCH 483/542] Added extra Visual C++ files to the ignore list

---
 .hgignore | 1 +
 1 file changed, 1 insertion(+)

diff --git a/.hgignore b/.hgignore
index ed369a331..b6c427f82 100644
--- a/.hgignore
+++ b/.hgignore
@@ -38,6 +38,7 @@ Release
 *.user
 *.ncb
 *.suo
+*.sdf
 
 # for Android
 android-project/local.properties

From 2e934dbde6a7b6fc403a427374372d234da25ad9 Mon Sep 17 00:00:00 2001
From: Sam Lantinga 
Date: Sun, 4 Aug 2013 09:37:27 -0700
Subject: [PATCH 484/542] Fixed bug 1972 - Changeset 7379 (b27c778a2bdb) breaks
 make process with msys+mingw (make 3.82.90)

Andreas

With the patch applied, make is not able to find the rule for Makefile.in anymore. Removing the patch resolves the issue.

The path is in fact correct (in my case: /c/external/SDL64/SDL). But it seems the windows build of GNU Make doesn't work well with pathnames in rules. Both the dependencies in "$(srcdir)/configure: $(srcdir)/configure.in" and "Makefile: $(srcdir)/Makefile.in" will cause rules not to be found when srcdir is defined.

The same problem occurs if the patch is removed and I supply configure with a srcdir manually.
---
 configure    | 9 ++++++++-
 configure.in | 9 ++++++++-
 2 files changed, 16 insertions(+), 2 deletions(-)

diff --git a/configure b/configure
index de41b5d54..12e47b468 100755
--- a/configure
+++ b/configure
@@ -15791,7 +15791,14 @@ else
 fi
 
 
-srcdir=`cd $srcdir && pwd`
+case "$host" in
+    *-*-mingw32*)
+        # Except on msys, where make can't handle full pathnames (bug 1972)
+        ;;
+    *)
+        srcdir=`cd $srcdir && pwd`
+        ;;
+esac
 
 INCLUDE="-I$srcdir/include"
 if test x$srcdir != x.; then
diff --git a/configure.in b/configure.in
index d1cf8e152..252efe4be 100644
--- a/configure.in
+++ b/configure.in
@@ -58,7 +58,14 @@ AC_PROG_MAKE_SET
 AC_CHECK_TOOL(WINDRES, [windres], [:])
 
 dnl Make sure that srcdir is a full pathname
-srcdir=`cd $srcdir && pwd`
+case "$host" in
+    *-*-mingw32*)
+        # Except on msys, where make can't handle full pathnames (bug 1972)
+        ;;
+    *)
+        srcdir=`cd $srcdir && pwd`
+        ;;
+esac
 
 dnl Set up the compiler and linker flags
 INCLUDE="-I$srcdir/include"

From 2ec969cb57f0f847d682881c29e65513c5f34bcb Mon Sep 17 00:00:00 2001
From: Philipp Wiesemann 
Date: Sun, 4 Aug 2013 23:28:34 +0200
Subject: [PATCH 485/542] Fixed volume keys not being handled by Android if
 screen keyboard is visible. See bug #1569.

---
 .../src/org/libsdl/app/SDLActivity.java          | 16 ++++++++++------
 1 file changed, 10 insertions(+), 6 deletions(-)

diff --git a/android-project/src/org/libsdl/app/SDLActivity.java b/android-project/src/org/libsdl/app/SDLActivity.java
index 9d57ef30f..7d70240da 100644
--- a/android-project/src/org/libsdl/app/SDLActivity.java
+++ b/android-project/src/org/libsdl/app/SDLActivity.java
@@ -134,6 +134,16 @@ public class SDLActivity extends Activity {
         }
     }
 
+    @Override
+    public boolean dispatchKeyEvent(KeyEvent event) {
+        int keyCode = event.getKeyCode();
+        // Ignore volume keys so they're handled by Android
+        if (keyCode == KeyEvent.KEYCODE_VOLUME_DOWN ||
+            keyCode == KeyEvent.KEYCODE_VOLUME_UP) {
+            return false;
+        }
+        return super.dispatchKeyEvent(event);
+    }
 
     /** Called by onPause or surfaceDestroyed. Even if surfaceDestroyed
      *  is the first to be called, mIsSurfaceReady should still be set
@@ -726,12 +736,6 @@ class SDLSurface extends SurfaceView implements SurfaceHolder.Callback,
     // Key events
     @Override
     public boolean onKey(View  v, int keyCode, KeyEvent event) {
-
-        // Ignore volume keys so they're handled by Android
-        if (keyCode == KeyEvent.KEYCODE_VOLUME_DOWN ||
-            keyCode == KeyEvent.KEYCODE_VOLUME_UP) {
-            return false;
-        }
         
         if (event.getAction() == KeyEvent.ACTION_DOWN) {
             //Log.v("SDL", "key down: " + keyCode);

From 7e69cee4c5b11b1a1e0d97f8d51bda8f29514c95 Mon Sep 17 00:00:00 2001
From: Philipp Wiesemann 
Date: Sun, 4 Aug 2013 23:38:25 +0200
Subject: [PATCH 486/542] Added missing function prototype and changed its
 signature. Signature was changed to prevent a header for SDL_GLContext.

---
 src/core/android/SDL_android.c    | 4 ++--
 src/core/android/SDL_android.h    | 1 +
 src/video/android/SDL_androidgl.c | 2 +-
 3 files changed, 4 insertions(+), 3 deletions(-)

diff --git a/src/core/android/SDL_android.c b/src/core/android/SDL_android.c
index 18b700b67..059a2291f 100644
--- a/src/core/android/SDL_android.c
+++ b/src/core/android/SDL_android.c
@@ -364,9 +364,9 @@ SDL_bool Android_JNI_CreateContext(int majorVersion, int minorVersion,
     return success ? SDL_TRUE : SDL_FALSE;
 }
 
-SDL_bool Android_JNI_DeleteContext(SDL_GLContext context) 
+SDL_bool Android_JNI_DeleteContext(void)
 {
-    /* There's only one context, so the parameter is ignored for now */
+    /* There's only one context, so no parameter for now */
     JNIEnv *env = Android_JNI_GetEnv();
     (*env)->CallStaticVoidMethod(env, mActivityClass, midDeleteGLContext);
     return SDL_TRUE;
diff --git a/src/core/android/SDL_android.h b/src/core/android/SDL_android.h
index d53652f88..973f5881f 100644
--- a/src/core/android/SDL_android.h
+++ b/src/core/android/SDL_android.h
@@ -31,6 +31,7 @@ extern "C" {
 
 /* Interface from the SDL library into the Android Java activity */
 extern SDL_bool Android_JNI_CreateContext(int majorVersion, int minorVersion, int red, int green, int blue, int alpha, int buffer, int depth, int stencil, int buffers, int samples);
+extern SDL_bool Android_JNI_DeleteContext(void);
 extern void Android_JNI_SwapWindow();
 extern void Android_JNI_SetActivityTitle(const char *title);
 extern SDL_bool Android_JNI_GetAccelerometerValues(float values[3]);
diff --git a/src/video/android/SDL_androidgl.c b/src/video/android/SDL_androidgl.c
index f4fe55233..6902bc1d0 100644
--- a/src/video/android/SDL_androidgl.c
+++ b/src/video/android/SDL_androidgl.c
@@ -120,7 +120,7 @@ void
 Android_GL_DeleteContext(_THIS, SDL_GLContext context)
 {
     if (context) {
-        Android_JNI_DeleteContext(context);
+        Android_JNI_DeleteContext();
     }
 }
 

From ecbffe9660338e36f82c5c0755063b5b43accc52 Mon Sep 17 00:00:00 2001
From: Sam Lantinga 
Date: Mon, 5 Aug 2013 11:45:51 -0700
Subject: [PATCH 487/542] Added scancodes for F13-F19 from a Mac USB keyboard

---
 src/events/scancodes_windows.h | 12 ++++++------
 1 file changed, 6 insertions(+), 6 deletions(-)

diff --git a/src/events/scancodes_windows.h b/src/events/scancodes_windows.h
index 221d1cfcf..1034b1b57 100644
--- a/src/events/scancodes_windows.h
+++ b/src/events/scancodes_windows.h
@@ -38,18 +38,18 @@ static const SDL_Scancode windows_scancode_table[] =
 	SDL_SCANCODE_APOSTROPHE,	SDL_SCANCODE_GRAVE,			SDL_SCANCODE_LSHIFT,		SDL_SCANCODE_BACKSLASH,		SDL_SCANCODE_Z,			SDL_SCANCODE_X,				SDL_SCANCODE_C,				SDL_SCANCODE_V,			// 2 
 
 	SDL_SCANCODE_B,				SDL_SCANCODE_N,				SDL_SCANCODE_M,				SDL_SCANCODE_COMMA,			SDL_SCANCODE_PERIOD,	SDL_SCANCODE_SLASH,			SDL_SCANCODE_RSHIFT,		SDL_SCANCODE_PRINTSCREEN,// 3
-	SDL_SCANCODE_LALT,			SDL_SCANCODE_SPACE,			SDL_SCANCODE_CAPSLOCK,		SDL_SCANCODE_F1,			SDL_SCANCODE_F2,		SDL_SCANCODE_F3,			SDL_SCANCODE_F4,			SDL_SCANCODE_F5,			// 3 
+	SDL_SCANCODE_LALT,			SDL_SCANCODE_SPACE,			SDL_SCANCODE_CAPSLOCK,		SDL_SCANCODE_F1,			SDL_SCANCODE_F2,		SDL_SCANCODE_F3,			SDL_SCANCODE_F4,			SDL_SCANCODE_F5,		// 3 
 
 	SDL_SCANCODE_F6,			SDL_SCANCODE_F7,			SDL_SCANCODE_F8,			SDL_SCANCODE_F9,			SDL_SCANCODE_F10,		SDL_SCANCODE_NUMLOCKCLEAR,	SDL_SCANCODE_SCROLLLOCK,	SDL_SCANCODE_HOME,		// 4
 	SDL_SCANCODE_UP,			SDL_SCANCODE_PAGEUP,		SDL_SCANCODE_KP_MINUS,		SDL_SCANCODE_LEFT,			SDL_SCANCODE_KP_5,		SDL_SCANCODE_RIGHT,			SDL_SCANCODE_KP_PLUS,		SDL_SCANCODE_END,		// 4 
 
 	SDL_SCANCODE_DOWN,			SDL_SCANCODE_PAGEDOWN,		SDL_SCANCODE_INSERT,		SDL_SCANCODE_DELETE,		SDL_SCANCODE_UNKNOWN,	SDL_SCANCODE_UNKNOWN,		SDL_SCANCODE_NONUSBACKSLASH,SDL_SCANCODE_F11,		// 5
-	SDL_SCANCODE_F12,			SDL_SCANCODE_PAUSE,			SDL_SCANCODE_UNKNOWN,		SDL_SCANCODE_LGUI,			SDL_SCANCODE_RGUI,		SDL_SCANCODE_APPLICATION,	SDL_SCANCODE_UNKNOWN,		SDL_SCANCODE_UNKNOWN,		// 5
+	SDL_SCANCODE_F12,			SDL_SCANCODE_PAUSE,			SDL_SCANCODE_UNKNOWN,		SDL_SCANCODE_LGUI,			SDL_SCANCODE_RGUI,		SDL_SCANCODE_APPLICATION,	SDL_SCANCODE_UNKNOWN,		SDL_SCANCODE_UNKNOWN,	// 5
 
-	SDL_SCANCODE_UNKNOWN,		SDL_SCANCODE_UNKNOWN,		SDL_SCANCODE_UNKNOWN,		SDL_SCANCODE_UNKNOWN,		SDL_SCANCODE_UNKNOWN,	SDL_SCANCODE_UNKNOWN,		SDL_SCANCODE_UNKNOWN,		SDL_SCANCODE_UNKNOWN,		// 6
-	SDL_SCANCODE_UNKNOWN,		SDL_SCANCODE_UNKNOWN,		SDL_SCANCODE_UNKNOWN,		SDL_SCANCODE_UNKNOWN,		SDL_SCANCODE_UNKNOWN,	SDL_SCANCODE_UNKNOWN,		SDL_SCANCODE_UNKNOWN,		SDL_SCANCODE_UNKNOWN,		// 6 
+	SDL_SCANCODE_UNKNOWN,		SDL_SCANCODE_UNKNOWN,		SDL_SCANCODE_UNKNOWN,		SDL_SCANCODE_UNKNOWN,		SDL_SCANCODE_F13,		SDL_SCANCODE_F14,			SDL_SCANCODE_F15,			SDL_SCANCODE_F16,		// 6
+	SDL_SCANCODE_F17,			SDL_SCANCODE_F18,			SDL_SCANCODE_F19,			SDL_SCANCODE_UNKNOWN,		SDL_SCANCODE_UNKNOWN,	SDL_SCANCODE_UNKNOWN,		SDL_SCANCODE_UNKNOWN,		SDL_SCANCODE_UNKNOWN,	// 6 
 	
-	SDL_SCANCODE_UNKNOWN,		SDL_SCANCODE_UNKNOWN,		SDL_SCANCODE_UNKNOWN,		SDL_SCANCODE_UNKNOWN,		SDL_SCANCODE_UNKNOWN,	SDL_SCANCODE_UNKNOWN,		SDL_SCANCODE_UNKNOWN,		SDL_SCANCODE_UNKNOWN,		// 7
-	SDL_SCANCODE_UNKNOWN,		SDL_SCANCODE_UNKNOWN,		SDL_SCANCODE_UNKNOWN,		SDL_SCANCODE_UNKNOWN,		SDL_SCANCODE_UNKNOWN,	SDL_SCANCODE_UNKNOWN,		SDL_SCANCODE_UNKNOWN,		SDL_SCANCODE_UNKNOWN		// 7 
+	SDL_SCANCODE_UNKNOWN,		SDL_SCANCODE_UNKNOWN,		SDL_SCANCODE_UNKNOWN,		SDL_SCANCODE_UNKNOWN,		SDL_SCANCODE_UNKNOWN,	SDL_SCANCODE_UNKNOWN,		SDL_SCANCODE_UNKNOWN,		SDL_SCANCODE_UNKNOWN,	// 7
+	SDL_SCANCODE_UNKNOWN,		SDL_SCANCODE_UNKNOWN,		SDL_SCANCODE_UNKNOWN,		SDL_SCANCODE_UNKNOWN,		SDL_SCANCODE_UNKNOWN,	SDL_SCANCODE_UNKNOWN,		SDL_SCANCODE_UNKNOWN,		SDL_SCANCODE_UNKNOWN	// 7 
 };
 /* *INDENT-ON* */

From a052fa0ae8fd523362cd21050c51b6783b967739 Mon Sep 17 00:00:00 2001
From: "Ryan C. Gordon" 
Date: Tue, 6 Aug 2013 00:23:04 -0400
Subject: [PATCH 488/542] Removed anisotropic option from
 SDL_HINT_RENDER_SCALE_QUALITY.

Anisotropic filtering is meant to be used for textures at a stark
 angle, not perpendicular to the camera.

--HG--
extra : rebase_source : e01c4da3bae7f1628de7c049f31f1208dbbbb24c
---
 include/SDL_hints.h                  | 2 +-
 src/render/direct3d/SDL_render_d3d.c | 4 +---
 2 files changed, 2 insertions(+), 4 deletions(-)

diff --git a/include/SDL_hints.h b/include/SDL_hints.h
index f27769953..74b63ee09 100644
--- a/include/SDL_hints.h
+++ b/include/SDL_hints.h
@@ -100,7 +100,7 @@ extern "C" {
  *  This variable can be set to the following values:
  *    "0" or "nearest" - Nearest pixel sampling
  *    "1" or "linear"  - Linear filtering (supported by OpenGL and Direct3D)
- *    "2" or "best"    - Anisotropic filtering (supported by Direct3D)
+ *    "2" or "best"    - Currently this is the same as "linear"
  *
  *  By default nearest pixel sampling is used
  */
diff --git a/src/render/direct3d/SDL_render_d3d.c b/src/render/direct3d/SDL_render_d3d.c
index bfabd6545..05df45e4a 100644
--- a/src/render/direct3d/SDL_render_d3d.c
+++ b/src/render/direct3d/SDL_render_d3d.c
@@ -864,10 +864,8 @@ GetScaleQuality(void)
 
     if (!hint || *hint == '0' || SDL_strcasecmp(hint, "nearest") == 0) {
         return D3DTEXF_POINT;
-    } else if (*hint == '1' || SDL_strcasecmp(hint, "linear") == 0) {
+    } else /*if (*hint == '1' || SDL_strcasecmp(hint, "linear") == 0)*/ {
         return D3DTEXF_LINEAR;
-    } else {
-        return D3DTEXF_ANISOTROPIC;
     }
 }
 

From a50db2d74eb5b437af7b794fb91970e23fdceac3 Mon Sep 17 00:00:00 2001
From: Sam Lantinga 
Date: Tue, 6 Aug 2013 01:19:23 -0700
Subject: [PATCH 489/542] Added tag macosx_10_4_supported for changeset
 ccf5fbfa2afa

---
 .hgtags | 1 +
 1 file changed, 1 insertion(+)

diff --git a/.hgtags b/.hgtags
index e96564c2d..d5c2200b9 100644
--- a/.hgtags
+++ b/.hgtags
@@ -13,3 +13,4 @@ cfcb2e1c36ebe9809577adf768b0ec53e8768af9 release-1.2.8
 e044e7c70a50a2f54d14ee20d0933e904e5853b6 release-1.2.9
 f14cf9d71233934811774f941d0de121d5f96ccf release-1.2.14
 39c22a953456f6c9e2c8993c8ff973824104102a pre-touch-removal
+ccf5fbfa2afabab429ad911308f362201a94d810 macosx_10_4_supported

From 8005b8d6137ec287659be1fb1097f7207c3fb704 Mon Sep 17 00:00:00 2001
From: Sam Lantinga 
Date: Tue, 6 Aug 2013 12:56:47 -0700
Subject: [PATCH 490/542] Added scancodes for F17, F18, F19 on a Mac keyboard

---
 src/events/scancodes_darwin.h | 6 +++---
 1 file changed, 3 insertions(+), 3 deletions(-)

diff --git a/src/events/scancodes_darwin.h b/src/events/scancodes_darwin.h
index 1935c16e4..77c728bc7 100644
--- a/src/events/scancodes_darwin.h
+++ b/src/events/scancodes_darwin.h
@@ -91,7 +91,7 @@ static const SDL_Scancode darwin_scancode_table[] = {
     /*  61 */   SDL_SCANCODE_RALT,
     /*  62 */   SDL_SCANCODE_RCTRL,
     /*  63 */   SDL_SCANCODE_RGUI, /* fn on portables, acts as a hardware-level modifier already, so we don't generate events for it, also XK_Meta_R */
-    /*  64 */   SDL_SCANCODE_UNKNOWN, /* unknown (unused?) */
+    /*  64 */   SDL_SCANCODE_F17,
     /*  65 */   SDL_SCANCODE_KP_PERIOD,
     /*  66 */   SDL_SCANCODE_UNKNOWN, /* unknown (unused?) */
     /*  67 */   SDL_SCANCODE_KP_MULTIPLY,
@@ -106,8 +106,8 @@ static const SDL_Scancode darwin_scancode_table[] = {
     /*  76 */   SDL_SCANCODE_KP_ENTER, /* keypad enter on external keyboards, fn-return on portables */
     /*  77 */   SDL_SCANCODE_UNKNOWN, /* unknown (unused?) */
     /*  78 */   SDL_SCANCODE_KP_MINUS,
-    /*  79 */   SDL_SCANCODE_UNKNOWN, /* unknown (unused?) */
-    /*  80 */   SDL_SCANCODE_UNKNOWN, /* unknown (unused?) */
+    /*  79 */   SDL_SCANCODE_F18,
+    /*  80 */   SDL_SCANCODE_F19,
     /*  81 */   SDL_SCANCODE_KP_EQUALS,
     /*  82 */   SDL_SCANCODE_KP_0,
     /*  83 */   SDL_SCANCODE_KP_1,

From 330f7e1be354db83cdad431cbdc9240bc9f6cccd Mon Sep 17 00:00:00 2001
From: Sam Lantinga 
Date: Tue, 6 Aug 2013 18:19:34 -0700
Subject: [PATCH 491/542] Fixed a number of missing keys in the X11 keyboard
 mapping.

---
 src/events/scancodes_xfree86.h  |  28 ++--
 src/video/x11/SDL_x11keyboard.c | 257 +++++++++++++++++---------------
 2 files changed, 152 insertions(+), 133 deletions(-)

diff --git a/src/events/scancodes_xfree86.h b/src/events/scancodes_xfree86.h
index bf958a685..fadcfbfd9 100644
--- a/src/events/scancodes_xfree86.h
+++ b/src/events/scancodes_xfree86.h
@@ -141,8 +141,8 @@ static const SDL_Scancode xfree86_scancode_table[] = {
     /*  112 */  SDL_SCANCODE_F15,
     /*  113 */  SDL_SCANCODE_F16,
     /*  114 */  SDL_SCANCODE_F17,
-    /*  115 */	SDL_SCANCODE_UNKNOWN,
-    /*	116 */  SDL_SCANCODE_UNKNOWN, /* is translated to XK_ISO_Level3_Shift by my X server, but I have no keyboard that generates this code, so I don't know what the correct SDL_SCANCODE_* for it is */
+    /*  115 */  SDL_SCANCODE_UNKNOWN,
+    /*  116 */  SDL_SCANCODE_UNKNOWN, /* is translated to XK_ISO_Level3_Shift by my X server, but I have no keyboard that generates this code, so I don't know what the correct SDL_SCANCODE_* for it is */
     /*  117 */  SDL_SCANCODE_UNKNOWN,
     /*  118 */  SDL_SCANCODE_KP_EQUALS,
     /*  119 */  SDL_SCANCODE_UNKNOWN,
@@ -298,7 +298,7 @@ static const SDL_Scancode xfree86_scancode_table2[] = {
     /* 118 */   SDL_SCANCODE_UNKNOWN,   /* plusminus */
     /* 119 */   SDL_SCANCODE_PAUSE,
     /* 120 */   SDL_SCANCODE_UNKNOWN,   /* XF86LaunchA */
-    /* 121 */   SDL_SCANCODE_UNKNOWN,	/* KP_Decimal */
+    /* 121 */   SDL_SCANCODE_UNKNOWN,   /* KP_Decimal */
     /* 122 */   SDL_SCANCODE_UNKNOWN,   /* Hangul */
     /* 123 */   SDL_SCANCODE_UNKNOWN,   /* Hangul_Hanja */
     /* 124 */   SDL_SCANCODE_UNKNOWN,
@@ -325,15 +325,15 @@ static const SDL_Scancode xfree86_scancode_table2[] = {
     /* 145 */   SDL_SCANCODE_UNKNOWN,   /* XF86Send */
     /* 146 */   SDL_SCANCODE_UNKNOWN,
     /* 147 */   SDL_SCANCODE_UNKNOWN,   /* XF86Xfer */
-    /* 148 */   SDL_SCANCODE_UNKNOWN,   /* XF86Launch1 */
-    /* 149 */   SDL_SCANCODE_UNKNOWN,   /* XF86Launch2 */
+    /* 148 */   SDL_SCANCODE_APP1,      /* XF86Launch1 */
+    /* 149 */   SDL_SCANCODE_APP2,      /* XF86Launch2 */
     /* 150 */   SDL_SCANCODE_WWW,
     /* 151 */   SDL_SCANCODE_UNKNOWN,   /* XF86DOS */
     /* 152 */   SDL_SCANCODE_UNKNOWN,   /* XF86ScreenSaver */
     /* 153 */   SDL_SCANCODE_UNKNOWN,
     /* 154 */   SDL_SCANCODE_UNKNOWN,   /* XF86RotateWindows */
     /* 155 */   SDL_SCANCODE_MAIL,
-    /* 156 */   SDL_SCANCODE_UNKNOWN,   /* XF86Favorites */
+    /* 156 */   SDL_SCANCODE_AC_BOOKMARKS,   /* XF86Favorites */
     /* 157 */   SDL_SCANCODE_COMPUTER,
     /* 158 */   SDL_SCANCODE_AC_BACK,
     /* 159 */   SDL_SCANCODE_AC_FORWARD,
@@ -348,7 +348,7 @@ static const SDL_Scancode xfree86_scancode_table2[] = {
     /* 168 */   SDL_SCANCODE_UNKNOWN,   /* XF86AudioRewind */
     /* 169 */   SDL_SCANCODE_UNKNOWN,   /* XF86Phone */
     /* 170 */   SDL_SCANCODE_UNKNOWN,
-    /* 171 */   SDL_SCANCODE_UNKNOWN,   /* XF86Tools */
+    /* 171 */   SDL_SCANCODE_F13,       /* XF86Tools */
     /* 172 */   SDL_SCANCODE_AC_HOME,
     /* 173 */   SDL_SCANCODE_AC_REFRESH,
     /* 174 */   SDL_SCANCODE_UNKNOWN,   /* XF86Close */
@@ -360,13 +360,13 @@ static const SDL_Scancode xfree86_scancode_table2[] = {
     /* 180 */   SDL_SCANCODE_UNKNOWN,   /* parenright */
     /* 181 */   SDL_SCANCODE_UNKNOWN,   /* XF86New */
     /* 182 */   SDL_SCANCODE_AGAIN,
-    /* 183 */   SDL_SCANCODE_UNKNOWN,   /* XF86Tools */
-    /* 184 */   SDL_SCANCODE_UNKNOWN,   /* XF86Launch5 */
-    /* 185 */   SDL_SCANCODE_UNKNOWN,   /* XF86MenuKB */
-    /* 186 */   SDL_SCANCODE_UNKNOWN,
-    /* 187 */   SDL_SCANCODE_UNKNOWN,
-    /* 188 */   SDL_SCANCODE_UNKNOWN,
-    /* 189 */   SDL_SCANCODE_UNKNOWN,
+    /* 183 */   SDL_SCANCODE_F13,       /* XF86Tools */
+    /* 184 */   SDL_SCANCODE_F14,       /* XF86Launch5 */
+    /* 185 */   SDL_SCANCODE_F15,       /* XF86Launch6 */
+    /* 186 */   SDL_SCANCODE_F16,       /* XF86Launch7 */
+    /* 187 */   SDL_SCANCODE_F17,       /* XF86Launch8 */
+    /* 188 */   SDL_SCANCODE_F18,       /* XF86Launch9 */
+    /* 189 */   SDL_SCANCODE_F19,       /* null keysym */
     /* 190 */   SDL_SCANCODE_UNKNOWN,
     /* 191 */   SDL_SCANCODE_UNKNOWN,
     /* 192 */   SDL_SCANCODE_UNKNOWN,   /* XF86TouchpadToggle */
diff --git a/src/video/x11/SDL_x11keyboard.c b/src/video/x11/SDL_x11keyboard.c
index eae2f3d0f..81d64b2df 100644
--- a/src/video/x11/SDL_x11keyboard.c
+++ b/src/video/x11/SDL_x11keyboard.c
@@ -35,102 +35,102 @@
 /* *INDENT-OFF* */
 static const struct {
     KeySym keysym;
-    SDL_Keycode sdlkey;
-} KeySymToSDLKey[] = {
-    { XK_Return, SDLK_RETURN },
-    { XK_Escape, SDLK_ESCAPE },
-    { XK_BackSpace, SDLK_BACKSPACE },
-    { XK_Tab, SDLK_TAB },
-    { XK_Caps_Lock, SDLK_CAPSLOCK },
-    { XK_F1, SDLK_F1 },
-    { XK_F2, SDLK_F2 },
-    { XK_F3, SDLK_F3 },
-    { XK_F4, SDLK_F4 },
-    { XK_F5, SDLK_F5 },
-    { XK_F6, SDLK_F6 },
-    { XK_F7, SDLK_F7 },
-    { XK_F8, SDLK_F8 },
-    { XK_F9, SDLK_F9 },
-    { XK_F10, SDLK_F10 },
-    { XK_F11, SDLK_F11 },
-    { XK_F12, SDLK_F12 },
-    { XK_Print, SDLK_PRINTSCREEN },
-    { XK_Scroll_Lock, SDLK_SCROLLLOCK },
-    { XK_Pause, SDLK_PAUSE },
-    { XK_Insert, SDLK_INSERT },
-    { XK_Home, SDLK_HOME },
-    { XK_Prior, SDLK_PAGEUP },
-    { XK_Delete, SDLK_DELETE },
-    { XK_End, SDLK_END },
-    { XK_Next, SDLK_PAGEDOWN },
-    { XK_Right, SDLK_RIGHT },
-    { XK_Left, SDLK_LEFT },
-    { XK_Down, SDLK_DOWN },
-    { XK_Up, SDLK_UP },
-    { XK_Num_Lock, SDLK_NUMLOCKCLEAR },
-    { XK_KP_Divide, SDLK_KP_DIVIDE },
-    { XK_KP_Multiply, SDLK_KP_MULTIPLY },
-    { XK_KP_Subtract, SDLK_KP_MINUS },
-    { XK_KP_Add, SDLK_KP_PLUS },
-    { XK_KP_Enter, SDLK_KP_ENTER },
-    { XK_KP_Delete, SDLK_KP_PERIOD },
-    { XK_KP_End, SDLK_KP_1 },
-    { XK_KP_Down, SDLK_KP_2 },
-    { XK_KP_Next, SDLK_KP_3 },
-    { XK_KP_Left, SDLK_KP_4 },
-    { XK_KP_Begin, SDLK_KP_5 },
-    { XK_KP_Right, SDLK_KP_6 },
-    { XK_KP_Home, SDLK_KP_7 },
-    { XK_KP_Up, SDLK_KP_8 },
-    { XK_KP_Prior, SDLK_KP_9 },
-    { XK_KP_Insert, SDLK_KP_0 },
-    { XK_KP_Decimal, SDLK_KP_PERIOD },
-    { XK_KP_1, SDLK_KP_1 },
-    { XK_KP_2, SDLK_KP_2 },
-    { XK_KP_3, SDLK_KP_3 },
-    { XK_KP_4, SDLK_KP_4 },
-    { XK_KP_5, SDLK_KP_5 },
-    { XK_KP_6, SDLK_KP_6 },
-    { XK_KP_7, SDLK_KP_7 },
-    { XK_KP_8, SDLK_KP_8 },
-    { XK_KP_9, SDLK_KP_9 },
-    { XK_KP_0, SDLK_KP_0 },
-    { XK_KP_Decimal, SDLK_KP_PERIOD },
-    { XK_Hyper_R, SDLK_APPLICATION },
-    { XK_KP_Equal, SDLK_KP_EQUALS },
-    { XK_F13, SDLK_F13 },
-    { XK_F14, SDLK_F14 },
-    { XK_F15, SDLK_F15 },
-    { XK_F16, SDLK_F16 },
-    { XK_F17, SDLK_F17 },
-    { XK_F18, SDLK_F18 },
-    { XK_F19, SDLK_F19 },
-    { XK_F20, SDLK_F20 },
-    { XK_F21, SDLK_F21 },
-    { XK_F22, SDLK_F22 },
-    { XK_F23, SDLK_F23 },
-    { XK_F24, SDLK_F24 },
-    { XK_Execute, SDLK_EXECUTE },
-    { XK_Help, SDLK_HELP },
-    { XK_Menu, SDLK_MENU },
-    { XK_Select, SDLK_SELECT },
-    { XK_Cancel, SDLK_STOP },
-    { XK_Redo, SDLK_AGAIN },
-    { XK_Undo, SDLK_UNDO },
-    { XK_Find, SDLK_FIND },
-    { XK_KP_Separator, SDLK_KP_COMMA },
-    { XK_Sys_Req, SDLK_SYSREQ },
-    { XK_Control_L, SDLK_LCTRL },
-    { XK_Shift_L, SDLK_LSHIFT },
-    { XK_Alt_L, SDLK_LALT },
-    { XK_Meta_L, SDLK_LGUI },
-    { XK_Super_L, SDLK_LGUI },
-    { XK_Control_R, SDLK_RCTRL },
-    { XK_Shift_R, SDLK_RSHIFT },
-    { XK_Alt_R, SDLK_RALT },
-    { XK_Meta_R, SDLK_RGUI },
-    { XK_Super_R, SDLK_RGUI },
-    { XK_Mode_switch, SDLK_MODE },
+    SDL_Scancode scancode;
+} KeySymToSDLScancode[] = {
+    { XK_Return, SDL_SCANCODE_RETURN },
+    { XK_Escape, SDL_SCANCODE_ESCAPE },
+    { XK_BackSpace, SDL_SCANCODE_BACKSPACE },
+    { XK_Tab, SDL_SCANCODE_TAB },
+    { XK_Caps_Lock, SDL_SCANCODE_CAPSLOCK },
+    { XK_F1, SDL_SCANCODE_F1 },
+    { XK_F2, SDL_SCANCODE_F2 },
+    { XK_F3, SDL_SCANCODE_F3 },
+    { XK_F4, SDL_SCANCODE_F4 },
+    { XK_F5, SDL_SCANCODE_F5 },
+    { XK_F6, SDL_SCANCODE_F6 },
+    { XK_F7, SDL_SCANCODE_F7 },
+    { XK_F8, SDL_SCANCODE_F8 },
+    { XK_F9, SDL_SCANCODE_F9 },
+    { XK_F10, SDL_SCANCODE_F10 },
+    { XK_F11, SDL_SCANCODE_F11 },
+    { XK_F12, SDL_SCANCODE_F12 },
+    { XK_Print, SDL_SCANCODE_PRINTSCREEN },
+    { XK_Scroll_Lock, SDL_SCANCODE_SCROLLLOCK },
+    { XK_Pause, SDL_SCANCODE_PAUSE },
+    { XK_Insert, SDL_SCANCODE_INSERT },
+    { XK_Home, SDL_SCANCODE_HOME },
+    { XK_Prior, SDL_SCANCODE_PAGEUP },
+    { XK_Delete, SDL_SCANCODE_DELETE },
+    { XK_End, SDL_SCANCODE_END },
+    { XK_Next, SDL_SCANCODE_PAGEDOWN },
+    { XK_Right, SDL_SCANCODE_RIGHT },
+    { XK_Left, SDL_SCANCODE_LEFT },
+    { XK_Down, SDL_SCANCODE_DOWN },
+    { XK_Up, SDL_SCANCODE_UP },
+    { XK_Num_Lock, SDL_SCANCODE_NUMLOCKCLEAR },
+    { XK_KP_Divide, SDL_SCANCODE_KP_DIVIDE },
+    { XK_KP_Multiply, SDL_SCANCODE_KP_MULTIPLY },
+    { XK_KP_Subtract, SDL_SCANCODE_KP_MINUS },
+    { XK_KP_Add, SDL_SCANCODE_KP_PLUS },
+    { XK_KP_Enter, SDL_SCANCODE_KP_ENTER },
+    { XK_KP_Delete, SDL_SCANCODE_KP_PERIOD },
+    { XK_KP_End, SDL_SCANCODE_KP_1 },
+    { XK_KP_Down, SDL_SCANCODE_KP_2 },
+    { XK_KP_Next, SDL_SCANCODE_KP_3 },
+    { XK_KP_Left, SDL_SCANCODE_KP_4 },
+    { XK_KP_Begin, SDL_SCANCODE_KP_5 },
+    { XK_KP_Right, SDL_SCANCODE_KP_6 },
+    { XK_KP_Home, SDL_SCANCODE_KP_7 },
+    { XK_KP_Up, SDL_SCANCODE_KP_8 },
+    { XK_KP_Prior, SDL_SCANCODE_KP_9 },
+    { XK_KP_Insert, SDL_SCANCODE_KP_0 },
+    { XK_KP_Decimal, SDL_SCANCODE_KP_PERIOD },
+    { XK_KP_1, SDL_SCANCODE_KP_1 },
+    { XK_KP_2, SDL_SCANCODE_KP_2 },
+    { XK_KP_3, SDL_SCANCODE_KP_3 },
+    { XK_KP_4, SDL_SCANCODE_KP_4 },
+    { XK_KP_5, SDL_SCANCODE_KP_5 },
+    { XK_KP_6, SDL_SCANCODE_KP_6 },
+    { XK_KP_7, SDL_SCANCODE_KP_7 },
+    { XK_KP_8, SDL_SCANCODE_KP_8 },
+    { XK_KP_9, SDL_SCANCODE_KP_9 },
+    { XK_KP_0, SDL_SCANCODE_KP_0 },
+    { XK_KP_Decimal, SDL_SCANCODE_KP_PERIOD },
+    { XK_Hyper_R, SDL_SCANCODE_APPLICATION },
+    { XK_KP_Equal, SDL_SCANCODE_KP_EQUALS },
+    { XK_F13, SDL_SCANCODE_F13 },
+    { XK_F14, SDL_SCANCODE_F14 },
+    { XK_F15, SDL_SCANCODE_F15 },
+    { XK_F16, SDL_SCANCODE_F16 },
+    { XK_F17, SDL_SCANCODE_F17 },
+    { XK_F18, SDL_SCANCODE_F18 },
+    { XK_F19, SDL_SCANCODE_F19 },
+    { XK_F20, SDL_SCANCODE_F20 },
+    { XK_F21, SDL_SCANCODE_F21 },
+    { XK_F22, SDL_SCANCODE_F22 },
+    { XK_F23, SDL_SCANCODE_F23 },
+    { XK_F24, SDL_SCANCODE_F24 },
+    { XK_Execute, SDL_SCANCODE_EXECUTE },
+    { XK_Help, SDL_SCANCODE_HELP },
+    { XK_Menu, SDL_SCANCODE_MENU },
+    { XK_Select, SDL_SCANCODE_SELECT },
+    { XK_Cancel, SDL_SCANCODE_STOP },
+    { XK_Redo, SDL_SCANCODE_AGAIN },
+    { XK_Undo, SDL_SCANCODE_UNDO },
+    { XK_Find, SDL_SCANCODE_FIND },
+    { XK_KP_Separator, SDL_SCANCODE_KP_COMMA },
+    { XK_Sys_Req, SDL_SCANCODE_SYSREQ },
+    { XK_Control_L, SDL_SCANCODE_LCTRL },
+    { XK_Shift_L, SDL_SCANCODE_LSHIFT },
+    { XK_Alt_L, SDL_SCANCODE_LALT },
+    { XK_Meta_L, SDL_SCANCODE_LGUI },
+    { XK_Super_L, SDL_SCANCODE_LGUI },
+    { XK_Control_R, SDL_SCANCODE_RCTRL },
+    { XK_Shift_R, SDL_SCANCODE_RSHIFT },
+    { XK_Alt_R, SDL_SCANCODE_RALT },
+    { XK_Meta_R, SDL_SCANCODE_RGUI },
+    { XK_Super_R, SDL_SCANCODE_RGUI },
+    { XK_Mode_switch, SDL_SCANCODE_MODE },
 };
 
 static const struct
@@ -144,11 +144,11 @@ static const struct
 };
 /* *INDENT-OFF* */
 
-static SDL_Keycode
-X11_KeyCodeToSDLKey(Display *display, KeyCode keycode)
+/* This function only works for keyboards in US QWERTY layout */
+static SDL_Scancode
+X11_KeyCodeToSDLScancode(Display *display, KeyCode keycode)
 {
     KeySym keysym;
-    unsigned int ucs4;
     int i;
 
 #if SDL_VIDEO_DRIVER_X11_HAS_XKBKEYCODETOKEYSYM
@@ -157,20 +157,40 @@ X11_KeyCodeToSDLKey(Display *display, KeyCode keycode)
     keysym = XKeycodeToKeysym(display, keycode, 0);
 #endif
     if (keysym == NoSymbol) {
-        return SDLK_UNKNOWN;
+        return SDL_SCANCODE_UNKNOWN;
     }
 
-    ucs4 = X11_KeySymToUcs4(keysym);
-    if (ucs4) {
-        return (SDL_Keycode) ucs4;
+    if (keysym >= XK_A && keysym <= XK_Z) {
+        return SDL_SCANCODE_A + (keysym - XK_A);
     }
 
-    for (i = 0; i < SDL_arraysize(KeySymToSDLKey); ++i) {
-        if (keysym == KeySymToSDLKey[i].keysym) {
-            return KeySymToSDLKey[i].sdlkey;
+    if (keysym >= XK_0 && keysym <= XK_9) {
+        return SDL_SCANCODE_0 + (keysym - XK_0);
+    }
+
+    for (i = 0; i < SDL_arraysize(KeySymToSDLScancode); ++i) {
+        if (keysym == KeySymToSDLScancode[i].keysym) {
+            return KeySymToSDLScancode[i].scancode;
         }
     }
-    return SDLK_UNKNOWN;
+    return SDL_SCANCODE_UNKNOWN;
+}
+
+static Uint32
+X11_KeyCodeToUcs4(Display *display, KeyCode keycode)
+{
+    KeySym keysym;
+
+#if SDL_VIDEO_DRIVER_X11_HAS_XKBKEYCODETOKEYSYM
+    keysym = XkbKeycodeToKeysym(display, keycode, 0, 0);
+#else
+    keysym = XKeycodeToKeysym(display, keycode, 0);
+#endif
+    if (keysym == NoSymbol) {
+        return 0;
+    }
+
+    return X11_KeySymToUcs4(keysym);
 }
 
 int
@@ -242,17 +262,12 @@ X11_InitKeyboard(_THIS)
             sym = XKeycodeToKeysym(data->display, i, 0);
 #endif
             if (sym != NoSymbol) {
-                SDL_Keycode key;
+                SDL_Scancode scancode;
                 printf("code = %d, sym = 0x%X (%s) ", i - min_keycode,
                        (unsigned int) sym, XKeysymToString(sym));
-                key = X11_KeyCodeToSDLKey(data->display, i);
-                for (j = 0; j < SDL_arraysize(keymap); ++j) {
-                    if (keymap[j] == key) {
-                        data->key_layout[i] = (SDL_Scancode) j;
-                        break;
-                    }
-                }
-                if (j == SDL_arraysize(keymap)) {
+                scancode = X11_KeyCodeToSDLScancode(data->display, i);
+                data->key_layout[i] = scancode;
+                if (scancode == SDL_SCANCODE_UNKNOWN) {
                     printf("scancode not found\n");
                 } else {
                     printf("scancode = %d (%s)\n", j, SDL_GetScancodeName(j));
@@ -276,9 +291,9 @@ X11_UpdateKeymap(_THIS)
     SDL_Scancode scancode;
     SDL_Keycode keymap[SDL_NUM_SCANCODES];
 
-    SDL_zero(keymap);
-
+    SDL_GetDefaultKeymap(keymap);
     for (i = 0; i < SDL_arraysize(data->key_layout); i++) {
+        Uint32 key;
 
         /* Make sure this is a valid scancode */
         scancode = data->key_layout[i];
@@ -286,7 +301,11 @@ X11_UpdateKeymap(_THIS)
             continue;
         }
 
-        keymap[scancode] = X11_KeyCodeToSDLKey(data->display, (KeyCode)i);
+        /* See if there is a UCS keycode for this scancode */
+        key = X11_KeyCodeToUcs4(data->display, (KeyCode)i);
+        if (key) {
+            keymap[scancode] = key;
+        }
     }
     SDL_SetKeymap(0, keymap, SDL_NUM_SCANCODES);
 }

From 6b504a4f0142b38327a71e7b0d656f5a47913a8c Mon Sep 17 00:00:00 2001
From: "Ryan C. Gordon" 
Date: Tue, 6 Aug 2013 18:23:46 -0700
Subject: [PATCH 492/542] Removed function signature that doesn't actually
 exist yet.

--HG--
extra : rebase_source : ffcdb6b32d54d18c3eb02f0dd46adcdac7e7bb4a
---
 include/SDL_audio.h | 6 ------
 1 file changed, 6 deletions(-)

diff --git a/include/SDL_audio.h b/include/SDL_audio.h
index 97f7a87c1..0b6f28af6 100644
--- a/include/SDL_audio.h
+++ b/include/SDL_audio.h
@@ -495,12 +495,6 @@ extern DECLSPEC void SDLCALL SDL_UnlockAudioDevice(SDL_AudioDeviceID dev);
 extern DECLSPEC void SDLCALL SDL_CloseAudio(void);
 extern DECLSPEC void SDLCALL SDL_CloseAudioDevice(SDL_AudioDeviceID dev);
 
-/**
- * \return 1 if audio device is still functioning, zero if not, -1 on error.
- */
-extern DECLSPEC int SDLCALL SDL_AudioDeviceConnected(SDL_AudioDeviceID dev);
-
-
 /* Ends C function definitions when using C++ */
 #ifdef __cplusplus
 }

From 3f1d72a71c518db48c41a10d2c4ecc8c7fa07d86 Mon Sep 17 00:00:00 2001
From: Sam Lantinga 
Date: Tue, 6 Aug 2013 22:31:11 -0700
Subject: [PATCH 493/542] Fixed clobbering viewport when window is resized when
 using the software renderer.  The viewport adjustment is already handled in
 the top level rendering code.

---
 src/render/software/SDL_render_sw.c | 2 --
 1 file changed, 2 deletions(-)

diff --git a/src/render/software/SDL_render_sw.c b/src/render/software/SDL_render_sw.c
index f1feee307..78f6ca1e9 100644
--- a/src/render/software/SDL_render_sw.c
+++ b/src/render/software/SDL_render_sw.c
@@ -114,8 +114,6 @@ SW_ActivateRenderer(SDL_Renderer * renderer)
         SDL_Surface *surface = SDL_GetWindowSurface(renderer->window);
         if (surface) {
             data->surface = data->window = surface;
-            renderer->viewport.w = surface->w;
-            renderer->viewport.h = surface->h;
 
             SW_UpdateViewport(renderer);
             SW_UpdateClipRect(renderer);

From 73a2e37abba54a9edfb4f2401d87ee70e86cb39f Mon Sep 17 00:00:00 2001
From: Sam Lantinga 
Date: Tue, 6 Aug 2013 22:55:55 -0700
Subject: [PATCH 494/542] Fixed bug 1848 - SDL_SetWindowSize cannot set sizes
 larger than desktop resolution in Windows

---
 src/video/windows/SDL_windowswindow.c | 11 +++++++++--
 1 file changed, 9 insertions(+), 2 deletions(-)

diff --git a/src/video/windows/SDL_windowswindow.c b/src/video/windows/SDL_windowswindow.c
index f40323ea6..156d0f445 100644
--- a/src/video/windows/SDL_windowswindow.c
+++ b/src/video/windows/SDL_windowswindow.c
@@ -131,8 +131,15 @@ SetupWindowData(_THIS, SDL_Window * window, HWND hwnd, SDL_bool created)
     {
         RECT rect;
         if (GetClientRect(hwnd, &rect)) {
-            window->w = rect.right;
-            window->h = rect.bottom;
+            int w = rect.right;
+            int h = rect.bottom;
+            if ((window->w && window->w != w) || (window->h && window->h != h)) {
+                // We tried to create a window larger than the desktop and Windows didn't allow it.  Override!
+                SetWindowPos(hwnd, NULL, 0, 0, window->w, window->h, SWP_NOCOPYBITS | SWP_NOZORDER | SWP_NOMOVE | SWP_NOACTIVATE);
+            } else {
+                window->w = w;
+                window->h = h;
+            }
         }
     }
     {

From 40b7af63999addc56e7d44ba10349817fcaaf2c6 Mon Sep 17 00:00:00 2001
From: Sam Lantinga 
Date: Wed, 7 Aug 2013 00:10:31 -0700
Subject: [PATCH 495/542] Fixed incorrect window state if the window is created
 grabbed.  We don't want to activate the window if it isn't shown yet.

---
 src/video/windows/SDL_windowswindow.c | 6 +++++-
 1 file changed, 5 insertions(+), 1 deletion(-)

diff --git a/src/video/windows/SDL_windowswindow.c b/src/video/windows/SDL_windowswindow.c
index 156d0f445..d11a6c0e0 100644
--- a/src/video/windows/SDL_windowswindow.c
+++ b/src/video/windows/SDL_windowswindow.c
@@ -559,7 +559,7 @@ WIN_SetWindowGrab(_THIS, SDL_Window * window, SDL_bool grabbed)
         HWND top;
         SDL_WindowData *data = (SDL_WindowData *) window->driverdata;
         HWND hwnd = data->hwnd;
-        UINT flags = SWP_NOMOVE | SWP_NOSIZE;
+        UINT flags = SWP_NOCOPYBITS | SWP_NOMOVE | SWP_NOSIZE;
 
         if ( SDL_ShouldAllowTopmost() && (window->flags & SDL_WINDOW_INPUT_FOCUS ) ) {
             top = HWND_TOPMOST;
@@ -568,6 +568,10 @@ WIN_SetWindowGrab(_THIS, SDL_Window * window, SDL_bool grabbed)
             flags |= SWP_NOZORDER;
         }
 
+        if (!(window->flags & SDL_WINDOW_SHOWN)) {
+            flags |= SWP_NOACTIVATE;
+        }
+
         SetWindowPos(hwnd, top, 0, 0, 0, 0, flags);
     }
 }

From cdcee9a5816d51e97c9f0717eaf436cff0b50ef5 Mon Sep 17 00:00:00 2001
From: Sam Lantinga 
Date: Wed, 7 Aug 2013 00:46:42 -0700
Subject: [PATCH 496/542] Unify the SetWindowPos() calls so that they all set
 the window state based on SDL state. This prevents a rogue call to
 SetWindowPos() from changing the state unexpectedly. Also moved the size
 correction code above the window position query, because the initial window
 size can affect the positioning.

---
 src/video/windows/SDL_windowswindow.c | 114 +++++++++++---------------
 1 file changed, 47 insertions(+), 67 deletions(-)

diff --git a/src/video/windows/SDL_windowswindow.c b/src/video/windows/SDL_windowswindow.c
index d11a6c0e0..e83115f00 100644
--- a/src/video/windows/SDL_windowswindow.c
+++ b/src/video/windows/SDL_windowswindow.c
@@ -74,6 +74,38 @@ GetWindowStyle(SDL_Window * window)
     return style;
 }
 
+static void
+WIN_SetWindowPositionInternal(_THIS, SDL_Window * window, UINT flags)
+{
+    HWND hwnd = ((SDL_WindowData *) window->driverdata)->hwnd;
+    RECT rect;
+    DWORD style;
+    HWND top;
+    BOOL menu;
+    int x, y;
+    int w, h;
+
+    /* Figure out what the window area will be */
+    if (SDL_ShouldAllowTopmost() && (window->flags & (SDL_WINDOW_FULLSCREEN|SDL_WINDOW_INPUT_FOCUS)) == (SDL_WINDOW_FULLSCREEN|SDL_WINDOW_INPUT_FOCUS)) {
+        top = HWND_TOPMOST;
+    } else {
+        top = HWND_NOTOPMOST;
+    }
+    style = GetWindowLong(hwnd, GWL_STYLE);
+    rect.left = 0;
+    rect.top = 0;
+    rect.right = window->w;
+    rect.bottom = window->h;
+    menu = (style & WS_CHILDWINDOW) ? FALSE : (GetMenu(hwnd) != NULL);
+    AdjustWindowRectEx(&rect, style, menu, 0);
+    w = (rect.right - rect.left);
+    h = (rect.bottom - rect.top);
+    x = window->x + rect.left;
+    y = window->y + rect.top;
+
+    SetWindowPos(hwnd, top, x, y, w, h, flags);
+}
+
 static int
 SetupWindowData(_THIS, SDL_Window * window, HWND hwnd, SDL_bool created)
 {
@@ -119,15 +151,6 @@ SetupWindowData(_THIS, SDL_Window * window, HWND hwnd, SDL_bool created)
 #endif
 
     /* Fill in the SDL window with the window data */
-    {
-        POINT point;
-        point.x = 0;
-        point.y = 0;
-        if (ClientToScreen(hwnd, &point)) {
-            window->x = point.x;
-            window->y = point.y;
-        }
-    }
     {
         RECT rect;
         if (GetClientRect(hwnd, &rect)) {
@@ -135,13 +158,22 @@ SetupWindowData(_THIS, SDL_Window * window, HWND hwnd, SDL_bool created)
             int h = rect.bottom;
             if ((window->w && window->w != w) || (window->h && window->h != h)) {
                 // We tried to create a window larger than the desktop and Windows didn't allow it.  Override!
-                SetWindowPos(hwnd, NULL, 0, 0, window->w, window->h, SWP_NOCOPYBITS | SWP_NOZORDER | SWP_NOMOVE | SWP_NOACTIVATE);
+                WIN_SetWindowPositionInternal(_this, window, SWP_NOCOPYBITS | SWP_NOZORDER | SWP_NOACTIVATE);
             } else {
                 window->w = w;
                 window->h = h;
             }
         }
     }
+    {
+        POINT point;
+        point.x = 0;
+        point.y = 0;
+        if (ClientToScreen(hwnd, &point)) {
+            window->x = point.x;
+            window->y = point.y;
+        }
+    }
     {
         DWORD style = GetWindowLong(hwnd, GWL_STYLE);
         if (style & WS_VISIBLE) {
@@ -343,38 +375,6 @@ WIN_SetWindowIcon(_THIS, SDL_Window * window, SDL_Surface * icon)
     SendMessage(hwnd, WM_SETICON, ICON_BIG, (LPARAM) hicon);
 }
 
-static void
-WIN_SetWindowPositionInternal(_THIS, SDL_Window * window, UINT flags)
-{
-    HWND hwnd = ((SDL_WindowData *) window->driverdata)->hwnd;
-    RECT rect;
-    DWORD style;
-    HWND top;
-    BOOL menu;
-    int x, y;
-    int w, h;
-
-    /* Figure out what the window area will be */
-    if ( SDL_ShouldAllowTopmost() && (window->flags & (SDL_WINDOW_FULLSCREEN|SDL_WINDOW_INPUT_FOCUS)) == (SDL_WINDOW_FULLSCREEN|SDL_WINDOW_INPUT_FOCUS )) {
-        top = HWND_TOPMOST;
-    } else {
-        top = HWND_NOTOPMOST;
-    }
-    style = GetWindowLong(hwnd, GWL_STYLE);
-    rect.left = 0;
-    rect.top = 0;
-    rect.right = window->w;
-    rect.bottom = window->h;
-    menu = (style & WS_CHILDWINDOW) ? FALSE : (GetMenu(hwnd) != NULL);
-    AdjustWindowRectEx(&rect, style, menu, 0);
-    w = (rect.right - rect.left);
-    h = (rect.bottom - rect.top);
-    x = window->x + rect.left;
-    y = window->y + rect.top;
-
-    SetWindowPos(hwnd, top, x, y, w, h, flags);
-}
-
 void
 WIN_SetWindowPosition(_THIS, SDL_Window * window)
 {
@@ -404,15 +404,7 @@ WIN_HideWindow(_THIS, SDL_Window * window)
 void
 WIN_RaiseWindow(_THIS, SDL_Window * window)
 {
-    HWND hwnd = ((SDL_WindowData *) window->driverdata)->hwnd;
-    HWND top;
-
-    if ( SDL_ShouldAllowTopmost() && (window->flags & (SDL_WINDOW_FULLSCREEN|SDL_WINDOW_INPUT_FOCUS)) == (SDL_WINDOW_FULLSCREEN|SDL_WINDOW_INPUT_FOCUS )) {
-        top = HWND_TOPMOST;
-    } else {
-        top = HWND_NOTOPMOST;
-    }
-    SetWindowPos(hwnd, top, 0, 0, 0, 0, (SWP_NOMOVE | SWP_NOSIZE));
+    WIN_SetWindowPositionInternal(_this, window, SWP_NOCOPYBITS | SWP_NOMOVE | SWP_NOSIZE);
 }
 
 void
@@ -444,7 +436,7 @@ WIN_SetWindowBordered(_THIS, SDL_Window * window, SDL_bool bordered)
     }
 
     SetWindowLong(hwnd, GWL_STYLE, style);
-    SetWindowPos(hwnd, hwnd, window->x, window->y, window->w, window->h, SWP_FRAMECHANGED | SWP_NOREPOSITION | SWP_NOZORDER |SWP_NOACTIVATE | SWP_NOSENDCHANGING);
+    WIN_SetWindowPositionInternal(_this, window, SWP_NOCOPYBITS | SWP_FRAMECHANGED | SWP_NOREPOSITION | SWP_NOZORDER |SWP_NOACTIVATE | SWP_NOSENDCHANGING);
 }
 
 void
@@ -468,7 +460,7 @@ WIN_SetWindowFullscreen(_THIS, SDL_Window * window, SDL_VideoDisplay * display,
     int x, y;
     int w, h;
 
-    if ( SDL_ShouldAllowTopmost() && (window->flags & (SDL_WINDOW_FULLSCREEN|SDL_WINDOW_INPUT_FOCUS)) == (SDL_WINDOW_FULLSCREEN|SDL_WINDOW_INPUT_FOCUS )) {
+    if (SDL_ShouldAllowTopmost() && (window->flags & (SDL_WINDOW_FULLSCREEN|SDL_WINDOW_INPUT_FOCUS)) == (SDL_WINDOW_FULLSCREEN|SDL_WINDOW_INPUT_FOCUS)) {
         top = HWND_TOPMOST;
     } else {
         top = HWND_NOTOPMOST;
@@ -554,25 +546,13 @@ WIN_SetWindowGrab(_THIS, SDL_Window * window, SDL_bool grabbed)
         ClipCursor(NULL);
     }
 
-    if ( window->flags & SDL_WINDOW_FULLSCREEN )
-    {
-        HWND top;
-        SDL_WindowData *data = (SDL_WindowData *) window->driverdata;
-        HWND hwnd = data->hwnd;
+    if (window->flags & SDL_WINDOW_FULLSCREEN) {
         UINT flags = SWP_NOCOPYBITS | SWP_NOMOVE | SWP_NOSIZE;
 
-        if ( SDL_ShouldAllowTopmost() && (window->flags & SDL_WINDOW_INPUT_FOCUS ) ) {
-            top = HWND_TOPMOST;
-        } else {
-            top = HWND_NOTOPMOST;
-            flags |= SWP_NOZORDER;
-        }
-
         if (!(window->flags & SDL_WINDOW_SHOWN)) {
             flags |= SWP_NOACTIVATE;
         }
-
-        SetWindowPos(hwnd, top, 0, 0, 0, 0, flags);
+        WIN_SetWindowPositionInternal(_this, window, flags);
     }
 }
 

From 89c3ac1eab7dc3128f43551b48e6b13a393a7ec0 Mon Sep 17 00:00:00 2001
From: Sam Lantinga 
Date: Wed, 7 Aug 2013 01:14:04 -0700
Subject: [PATCH 497/542] Reset the viewport when we reset the other D3D state.

From Sythical:

Hello, I've created a simple SDL2 application which draws a texture on the screen. The problem I'm having is that if I launch another program which loads the UAC popup or if I lock my PC and then login again, the application stops drawing the texture. I tried adding SDL_Delay(10000) after SDL_RenderPresent(renderer). This made the texture stay on the screen for a little bit but the texture wasn't drawn again after the delay. Here's my code:

#include "SDL.h"

int main(int argc, char *argv[])
{
    SDL_Renderer *renderer;
    SDL_Window *window;
    SDL_Surface *surface;
    SDL_Texture *rect_texture;
    SDL_Event main_event;
    SDL_Rect rect_data;
    int enable_vsync = 1;

    if(SDL_Init(SDL_INIT_VIDEO) < 0) return 1;

    window = SDL_CreateWindow("SDL2 Application", SDL_WINDOWPOS_CENTERED, SDL_WINDOWPOS_CENTERED, 600, 600, SDL_WINDOW_RESIZABLE);

    renderer = SDL_CreateRenderer(window, -1, enable_vsync ? SDL_RENDERER_ACCELERATED | SDL_RENDERER_PRESENTVSYNC : SDL_RENDERER_ACCELERATED);
    SDL_SetRenderDrawColor(renderer, 20, 20, 30, 255);

    surface = SDL_LoadBMP("icon.bmp");
    rect_texture = SDL_CreateTextureFromSurface(renderer, surface);

    rect_data.w = 32; rect_data.h = 32;
    rect_data.x = 300; rect_data.y = 300;

    while(main_event.type != SDL_QUIT)
    {
        SDL_PollEvent(&main_event);

        SDL_RenderClear(renderer);
        SDL_RenderCopy(renderer, rect_texture, NULL, &rect_data);
        SDL_RenderPresent(renderer);
    }

    SDL_DestroyTexture(rect_texture);
    SDL_DestroyRenderer(renderer);
    SDL_DestroyWindow(window);
    SDL_Quit();

    return 0;
}
---
 src/render/direct3d/SDL_render_d3d.c | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/src/render/direct3d/SDL_render_d3d.c b/src/render/direct3d/SDL_render_d3d.c
index 05df45e4a..e9fc0ce04 100644
--- a/src/render/direct3d/SDL_render_d3d.c
+++ b/src/render/direct3d/SDL_render_d3d.c
@@ -424,6 +424,7 @@ D3D_Reset(SDL_Renderer * renderer)
     IDirect3DDevice9_SetRenderState(data->device, D3DRS_LIGHTING, FALSE);
     IDirect3DDevice9_GetRenderTarget(data->device, 0, &data->defaultRenderTarget);
     SDL_memset(data->scaleMode, 0xFF, sizeof(data->scaleMode));
+    D3D_UpdateViewport(renderer);
     return 0;
 }
 
@@ -449,7 +450,6 @@ D3D_ActivateRenderer(SDL_Renderer * renderer)
         if (D3D_Reset(renderer) < 0) {
             return -1;
         }
-        D3D_UpdateViewport(renderer);
 
         data->updateSize = SDL_FALSE;
     }

From 2e821930a3d107224fe82b86e37fa329f030c502 Mon Sep 17 00:00:00 2001
From: Sam Lantinga 
Date: Wed, 7 Aug 2013 09:20:41 -0700
Subject: [PATCH 498/542] Fix building the tests with Visual Studio 2012
 (thanks Isaac!)

---
 VisualC/tests/testatomic/testatomic_VS2012.vcxproj          | 4 ++--
 .../tests/testrendertarget/testrendertarget_VS2012.vcxproj  | 6 +++---
 VisualC/tests/testscale/testscale_VS2012.vcxproj            | 6 +++---
 3 files changed, 8 insertions(+), 8 deletions(-)

diff --git a/VisualC/tests/testatomic/testatomic_VS2012.vcxproj b/VisualC/tests/testatomic/testatomic_VS2012.vcxproj
index 9cd90ca73..8e908f01b 100644
--- a/VisualC/tests/testatomic/testatomic_VS2012.vcxproj
+++ b/VisualC/tests/testatomic/testatomic_VS2012.vcxproj
@@ -222,10 +222,10 @@
     
   
   
-    
+    
       {da956fd3-e142-46f2-9dd5-c78bebb56b7a}
     
-    
+    
       {81ce8daf-ebb2-4761-8e45-b71abcca8c68}
     
   
diff --git a/VisualC/tests/testrendertarget/testrendertarget_VS2012.vcxproj b/VisualC/tests/testrendertarget/testrendertarget_VS2012.vcxproj
index 4a3cb077b..b85c066c2 100644
--- a/VisualC/tests/testrendertarget/testrendertarget_VS2012.vcxproj
+++ b/VisualC/tests/testrendertarget/testrendertarget_VS2012.vcxproj
@@ -229,13 +229,13 @@ copy "$(SolutionDir)\..\test\sample.bmp" "$(TargetDir)\sample.bmp"
     
   
   
-    
+    
       {da956fd3-e142-46f2-9dd5-c78bebb56b7a}
     
-    
+    
       {da956fd3-e143-46f2-9fe5-c77bebc56b1a}
     
-    
+    
       {81ce8daf-ebb2-4761-8e45-b71abcca8c68}
     
     
diff --git a/VisualC/tests/testscale/testscale_VS2012.vcxproj b/VisualC/tests/testscale/testscale_VS2012.vcxproj
index 6eb222896..1419804b2 100644
--- a/VisualC/tests/testscale/testscale_VS2012.vcxproj
+++ b/VisualC/tests/testscale/testscale_VS2012.vcxproj
@@ -230,13 +230,13 @@ copy "$(SolutionDir)\..\test\sample.bmp" "$(TargetDir)\sample.bmp"
     
   
   
-    
+    
       {da956fd3-e142-46f2-9dd5-c78bebb56b7a}
     
-    
+    
       {da956fd3-e143-46f2-9fe5-c77bebc56b1a}
     
-    
+    
       {81ce8daf-ebb2-4761-8e45-b71abcca8c68}
     
     

From 8c143ffe40aea924e9ca9c3215a3d7067cf143dc Mon Sep 17 00:00:00 2001
From: "Ryan C. Gordon" 
Date: Wed, 7 Aug 2013 11:00:44 -0700
Subject: [PATCH 499/542] Removed SDL_AssertionsInit(). It's a no-op, let's
 keep it that way.  :)

---
 src/SDL.c          | 4 ----
 src/SDL_assert.c   | 6 ------
 src/SDL_assert_c.h | 1 -
 3 files changed, 11 deletions(-)

diff --git a/src/SDL.c b/src/SDL.c
index 567cc0785..f73bdb59b 100644
--- a/src/SDL.c
+++ b/src/SDL.c
@@ -226,10 +226,6 @@ SDL_InitSubSystem(Uint32 flags)
 int
 SDL_Init(Uint32 flags)
 {
-    if (SDL_AssertionsInit() < 0) {
-        return -1;
-    }
-
     /* Clear the error message */
     SDL_ClearError();
 
diff --git a/src/SDL_assert.c b/src/SDL_assert.c
index f1eb25597..a4cf6434f 100644
--- a/src/SDL_assert.c
+++ b/src/SDL_assert.c
@@ -325,12 +325,6 @@ SDL_ReportAssertion(SDL_assert_data *data, const char *func, const char *file,
 }
 
 
-int SDL_AssertionsInit(void)
-{
-    /* this is a no-op at the moment. */
-    return 0;
-}
-
 void SDL_AssertionsQuit(void)
 {
     SDL_GenerateAssertionReport();
diff --git a/src/SDL_assert_c.h b/src/SDL_assert_c.h
index 12b1aa5e9..29802c04e 100644
--- a/src/SDL_assert_c.h
+++ b/src/SDL_assert_c.h
@@ -19,7 +19,6 @@
   3. This notice may not be removed or altered from any source distribution.
 */
 
-extern int SDL_AssertionsInit(void);
 extern void SDL_AssertionsQuit(void);
 
 /* vi: set ts=4 sw=4 expandtab: */

From d99a4adff93421e321440a7c51d544d313f9f0a6 Mon Sep 17 00:00:00 2001
From: "Ryan C. Gordon" 
Date: Wed, 7 Aug 2013 11:12:11 -0700
Subject: [PATCH 500/542] SDL_*Parachute() are no-ops, remove them.

---
 Makefile.psp                                |  1 -
 VisualC/SDL/SDL_VS2008.vcproj               |  8 -----
 VisualC/SDL/SDL_VS2010.vcxproj              |  2 --
 VisualC/SDL/SDL_VS2012.vcxproj              |  2 --
 Xcode-iOS/SDL/SDL.xcodeproj/project.pbxproj |  6 ----
 Xcode/SDL/SDL.xcodeproj/project.pbxproj     | 16 ---------
 src/SDL.c                                   |  6 ----
 src/SDL_fatal.c                             | 36 ---------------------
 src/SDL_fatal.h                             | 27 ----------------
 9 files changed, 104 deletions(-)
 delete mode 100644 src/SDL_fatal.c
 delete mode 100644 src/SDL_fatal.h

diff --git a/Makefile.psp b/Makefile.psp
index ec137806d..8bcdcb927 100644
--- a/Makefile.psp
+++ b/Makefile.psp
@@ -2,7 +2,6 @@ TARGET_LIB = libSDL2.a
 OBJS= src/SDL.o \
       src/SDL_assert.o \
       src/SDL_error.o \
-      src/SDL_fatal.o \
       src/SDL_hints.o \
       src/SDL_log.o \
       src/atomic/SDL_atomic.o \
diff --git a/VisualC/SDL/SDL_VS2008.vcproj b/VisualC/SDL/SDL_VS2008.vcproj
index 9481c6380..72eb2d4c9 100644
--- a/VisualC/SDL/SDL_VS2008.vcproj
+++ b/VisualC/SDL/SDL_VS2008.vcproj
@@ -864,14 +864,6 @@
 			RelativePath="..\..\src\events\SDL_events_c.h"
 			>
 		
-		
-		
-		
-		
 		
diff --git a/VisualC/SDL/SDL_VS2010.vcxproj b/VisualC/SDL/SDL_VS2010.vcxproj
index 5d576b8b9..4fa9111d2 100644
--- a/VisualC/SDL/SDL_VS2010.vcxproj
+++ b/VisualC/SDL/SDL_VS2010.vcxproj
@@ -302,7 +302,6 @@
     
     
     
-    
     
     
     
@@ -406,7 +405,6 @@
     
     
     
-    
     
     
     
diff --git a/VisualC/SDL/SDL_VS2012.vcxproj b/VisualC/SDL/SDL_VS2012.vcxproj
index 74e470051..213c10cef 100644
--- a/VisualC/SDL/SDL_VS2012.vcxproj
+++ b/VisualC/SDL/SDL_VS2012.vcxproj
@@ -306,7 +306,6 @@
     
     
     
-    
     
     
     
@@ -410,7 +409,6 @@
     
     
     
-    
     
     
     
diff --git a/Xcode-iOS/SDL/SDL.xcodeproj/project.pbxproj b/Xcode-iOS/SDL/SDL.xcodeproj/project.pbxproj
index 08109d084..f3122ecba 100755
--- a/Xcode-iOS/SDL/SDL.xcodeproj/project.pbxproj
+++ b/Xcode-iOS/SDL/SDL.xcodeproj/project.pbxproj
@@ -159,7 +159,6 @@
 		FD6526750DE8FCDD002AD96B /* SDL_windowevents.c in Sources */ = {isa = PBXBuildFile; fileRef = FD99B99B0DD52EDC00FB1D6B /* SDL_windowevents.c */; };
 		FD6526760DE8FCDD002AD96B /* SDL_rwops.c in Sources */ = {isa = PBXBuildFile; fileRef = FD99B99E0DD52EDC00FB1D6B /* SDL_rwops.c */; };
 		FD6526780DE8FCDD002AD96B /* SDL_error.c in Sources */ = {isa = PBXBuildFile; fileRef = FD99B9D50DD52EDC00FB1D6B /* SDL_error.c */; };
-		FD6526790DE8FCDD002AD96B /* SDL_fatal.c in Sources */ = {isa = PBXBuildFile; fileRef = FD99B9D60DD52EDC00FB1D6B /* SDL_fatal.c */; };
 		FD65267A0DE8FCDD002AD96B /* SDL.c in Sources */ = {isa = PBXBuildFile; fileRef = FD99B9D80DD52EDC00FB1D6B /* SDL.c */; };
 		FD65267B0DE8FCDD002AD96B /* SDL_syscond.c in Sources */ = {isa = PBXBuildFile; fileRef = FD99BA070DD52EDC00FB1D6B /* SDL_syscond.c */; };
 		FD65267C0DE8FCDD002AD96B /* SDL_sysmutex.c in Sources */ = {isa = PBXBuildFile; fileRef = FD99BA080DD52EDC00FB1D6B /* SDL_sysmutex.c */; };
@@ -386,8 +385,6 @@
 		FD99B99E0DD52EDC00FB1D6B /* SDL_rwops.c */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.c; path = SDL_rwops.c; sourceTree = ""; };
 		FD99B9D40DD52EDC00FB1D6B /* SDL_error_c.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; name = SDL_error_c.h; path = ../../src/SDL_error_c.h; sourceTree = ""; };
 		FD99B9D50DD52EDC00FB1D6B /* SDL_error.c */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.c; name = SDL_error.c; path = ../../src/SDL_error.c; sourceTree = ""; };
-		FD99B9D60DD52EDC00FB1D6B /* SDL_fatal.c */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.c; name = SDL_fatal.c; path = ../../src/SDL_fatal.c; sourceTree = ""; };
-		FD99B9D70DD52EDC00FB1D6B /* SDL_fatal.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; name = SDL_fatal.h; path = ../../src/SDL_fatal.h; sourceTree = ""; };
 		FD99B9D80DD52EDC00FB1D6B /* SDL.c */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.c; name = SDL.c; path = ../../src/SDL.c; sourceTree = ""; };
 		FD99BA070DD52EDC00FB1D6B /* SDL_syscond.c */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.c; path = SDL_syscond.c; sourceTree = ""; };
 		FD99BA080DD52EDC00FB1D6B /* SDL_sysmutex.c */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.c; path = SDL_sysmutex.c; sourceTree = ""; };
@@ -742,8 +739,6 @@
 				04BAC09A1300C1290055DE28 /* SDL_assert_c.h */,
 				FD99B9D40DD52EDC00FB1D6B /* SDL_error_c.h */,
 				FD99B9D50DD52EDC00FB1D6B /* SDL_error.c */,
-				FD99B9D60DD52EDC00FB1D6B /* SDL_fatal.c */,
-				FD99B9D70DD52EDC00FB1D6B /* SDL_fatal.h */,
 				0442EC5412FE1C3F004C9285 /* SDL_hints.c */,
 				04BAC09B1300C1290055DE28 /* SDL_log.c */,
 				FD99B9D80DD52EDC00FB1D6B /* SDL.c */,
@@ -1112,7 +1107,6 @@
 				FD6526750DE8FCDD002AD96B /* SDL_windowevents.c in Sources */,
 				FD6526760DE8FCDD002AD96B /* SDL_rwops.c in Sources */,
 				FD6526780DE8FCDD002AD96B /* SDL_error.c in Sources */,
-				FD6526790DE8FCDD002AD96B /* SDL_fatal.c in Sources */,
 				FD65267A0DE8FCDD002AD96B /* SDL.c in Sources */,
 				FD65267B0DE8FCDD002AD96B /* SDL_syscond.c in Sources */,
 				FD65267C0DE8FCDD002AD96B /* SDL_sysmutex.c in Sources */,
diff --git a/Xcode/SDL/SDL.xcodeproj/project.pbxproj b/Xcode/SDL/SDL.xcodeproj/project.pbxproj
index 245378d59..2fccf0f7c 100755
--- a/Xcode/SDL/SDL.xcodeproj/project.pbxproj
+++ b/Xcode/SDL/SDL.xcodeproj/project.pbxproj
@@ -113,8 +113,6 @@
 		04BD009C12E6671800899322 /* SDL_assert.c in Sources */ = {isa = PBXBuildFile; fileRef = 04BDFE5612E6671700899322 /* SDL_assert.c */; };
 		04BD009E12E6671800899322 /* SDL_error_c.h in Headers */ = {isa = PBXBuildFile; fileRef = 04BDFE5812E6671700899322 /* SDL_error_c.h */; };
 		04BD009F12E6671800899322 /* SDL_error.c in Sources */ = {isa = PBXBuildFile; fileRef = 04BDFE5912E6671700899322 /* SDL_error.c */; };
-		04BD00A012E6671800899322 /* SDL_fatal.c in Sources */ = {isa = PBXBuildFile; fileRef = 04BDFE5A12E6671700899322 /* SDL_fatal.c */; };
-		04BD00A112E6671800899322 /* SDL_fatal.h in Headers */ = {isa = PBXBuildFile; fileRef = 04BDFE5B12E6671700899322 /* SDL_fatal.h */; };
 		04BD00A212E6671800899322 /* SDL.c in Sources */ = {isa = PBXBuildFile; fileRef = 04BDFE5C12E6671700899322 /* SDL.c */; };
 		04BD00A312E6671800899322 /* SDL_getenv.c in Sources */ = {isa = PBXBuildFile; fileRef = 04BDFE5E12E6671700899322 /* SDL_getenv.c */; };
 		04BD00A412E6671800899322 /* SDL_iconv.c in Sources */ = {isa = PBXBuildFile; fileRef = 04BDFE5F12E6671700899322 /* SDL_iconv.c */; };
@@ -269,8 +267,6 @@
 		04BD02B612E6671800899322 /* SDL_assert.c in Sources */ = {isa = PBXBuildFile; fileRef = 04BDFE5612E6671700899322 /* SDL_assert.c */; };
 		04BD02B812E6671800899322 /* SDL_error_c.h in Headers */ = {isa = PBXBuildFile; fileRef = 04BDFE5812E6671700899322 /* SDL_error_c.h */; };
 		04BD02B912E6671800899322 /* SDL_error.c in Sources */ = {isa = PBXBuildFile; fileRef = 04BDFE5912E6671700899322 /* SDL_error.c */; };
-		04BD02BA12E6671800899322 /* SDL_fatal.c in Sources */ = {isa = PBXBuildFile; fileRef = 04BDFE5A12E6671700899322 /* SDL_fatal.c */; };
-		04BD02BB12E6671800899322 /* SDL_fatal.h in Headers */ = {isa = PBXBuildFile; fileRef = 04BDFE5B12E6671700899322 /* SDL_fatal.h */; };
 		04BD02BC12E6671800899322 /* SDL.c in Sources */ = {isa = PBXBuildFile; fileRef = 04BDFE5C12E6671700899322 /* SDL.c */; };
 		04BD02BD12E6671800899322 /* SDL_getenv.c in Sources */ = {isa = PBXBuildFile; fileRef = 04BDFE5E12E6671700899322 /* SDL_getenv.c */; };
 		04BD02BE12E6671800899322 /* SDL_iconv.c in Sources */ = {isa = PBXBuildFile; fileRef = 04BDFE5F12E6671700899322 /* SDL_iconv.c */; };
@@ -549,7 +545,6 @@
 		DB313F8E17554B71006C0E22 /* SDL_sysjoystick.h in Headers */ = {isa = PBXBuildFile; fileRef = 04BDFE1812E6671700899322 /* SDL_sysjoystick.h */; };
 		DB313F8F17554B71006C0E22 /* SDL_assert_c.h in Headers */ = {isa = PBXBuildFile; fileRef = 04BDFE5512E6671700899322 /* SDL_assert_c.h */; };
 		DB313F9017554B71006C0E22 /* SDL_error_c.h in Headers */ = {isa = PBXBuildFile; fileRef = 04BDFE5812E6671700899322 /* SDL_error_c.h */; };
-		DB313F9117554B71006C0E22 /* SDL_fatal.h in Headers */ = {isa = PBXBuildFile; fileRef = 04BDFE5B12E6671700899322 /* SDL_fatal.h */; };
 		DB313F9217554B71006C0E22 /* SDL_sysmutex_c.h in Headers */ = {isa = PBXBuildFile; fileRef = 04BDFE8012E6671800899322 /* SDL_sysmutex_c.h */; };
 		DB313F9317554B71006C0E22 /* SDL_systhread_c.h in Headers */ = {isa = PBXBuildFile; fileRef = 04BDFE8312E6671800899322 /* SDL_systhread_c.h */; };
 		DB313F9417554B71006C0E22 /* SDL_systhread.h in Headers */ = {isa = PBXBuildFile; fileRef = 04BDFE8B12E6671800899322 /* SDL_systhread.h */; };
@@ -690,7 +685,6 @@
 		DB31401C17554B71006C0E22 /* SDL_power.c in Sources */ = {isa = PBXBuildFile; fileRef = 04BDFE4E12E6671700899322 /* SDL_power.c */; };
 		DB31401D17554B71006C0E22 /* SDL_assert.c in Sources */ = {isa = PBXBuildFile; fileRef = 04BDFE5612E6671700899322 /* SDL_assert.c */; };
 		DB31401E17554B71006C0E22 /* SDL_error.c in Sources */ = {isa = PBXBuildFile; fileRef = 04BDFE5912E6671700899322 /* SDL_error.c */; };
-		DB31401F17554B71006C0E22 /* SDL_fatal.c in Sources */ = {isa = PBXBuildFile; fileRef = 04BDFE5A12E6671700899322 /* SDL_fatal.c */; };
 		DB31402017554B71006C0E22 /* SDL.c in Sources */ = {isa = PBXBuildFile; fileRef = 04BDFE5C12E6671700899322 /* SDL.c */; };
 		DB31402117554B71006C0E22 /* SDL_getenv.c in Sources */ = {isa = PBXBuildFile; fileRef = 04BDFE5E12E6671700899322 /* SDL_getenv.c */; };
 		DB31402217554B71006C0E22 /* SDL_iconv.c in Sources */ = {isa = PBXBuildFile; fileRef = 04BDFE5F12E6671700899322 /* SDL_iconv.c */; };
@@ -875,8 +869,6 @@
 		04BDFE5612E6671700899322 /* SDL_assert.c */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.c; name = SDL_assert.c; path = ../../src/SDL_assert.c; sourceTree = SOURCE_ROOT; };
 		04BDFE5812E6671700899322 /* SDL_error_c.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; name = SDL_error_c.h; path = ../../src/SDL_error_c.h; sourceTree = SOURCE_ROOT; };
 		04BDFE5912E6671700899322 /* SDL_error.c */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.c; name = SDL_error.c; path = ../../src/SDL_error.c; sourceTree = SOURCE_ROOT; };
-		04BDFE5A12E6671700899322 /* SDL_fatal.c */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.c; name = SDL_fatal.c; path = ../../src/SDL_fatal.c; sourceTree = SOURCE_ROOT; };
-		04BDFE5B12E6671700899322 /* SDL_fatal.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; name = SDL_fatal.h; path = ../../src/SDL_fatal.h; sourceTree = SOURCE_ROOT; };
 		04BDFE5C12E6671700899322 /* SDL.c */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.c; name = SDL.c; path = ../../src/SDL.c; sourceTree = SOURCE_ROOT; };
 		04BDFE5E12E6671700899322 /* SDL_getenv.c */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.c; path = SDL_getenv.c; sourceTree = ""; };
 		04BDFE5F12E6671700899322 /* SDL_iconv.c */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.c; path = SDL_iconv.c; sourceTree = ""; };
@@ -1650,8 +1642,6 @@
 				04BDFE5612E6671700899322 /* SDL_assert.c */,
 				04BDFE5812E6671700899322 /* SDL_error_c.h */,
 				04BDFE5912E6671700899322 /* SDL_error.c */,
-				04BDFE5A12E6671700899322 /* SDL_fatal.c */,
-				04BDFE5B12E6671700899322 /* SDL_fatal.h */,
 				0442EC5E12FE1C75004C9285 /* SDL_hints.c */,
 				04BAC0C71300C2160055DE28 /* SDL_log.c */,
 				04BDFE5C12E6671700899322 /* SDL.c */,
@@ -1795,7 +1785,6 @@
 				04BD007212E6671800899322 /* SDL_sysjoystick.h in Headers */,
 				04BD009B12E6671800899322 /* SDL_assert_c.h in Headers */,
 				04BD009E12E6671800899322 /* SDL_error_c.h in Headers */,
-				04BD00A112E6671800899322 /* SDL_fatal.h in Headers */,
 				04BD00BF12E6671800899322 /* SDL_sysmutex_c.h in Headers */,
 				04BD00C212E6671800899322 /* SDL_systhread_c.h in Headers */,
 				04BD00C912E6671800899322 /* SDL_systhread.h in Headers */,
@@ -1889,7 +1878,6 @@
 				04BD028D12E6671800899322 /* SDL_sysjoystick.h in Headers */,
 				04BD02B512E6671800899322 /* SDL_assert_c.h in Headers */,
 				04BD02B812E6671800899322 /* SDL_error_c.h in Headers */,
-				04BD02BB12E6671800899322 /* SDL_fatal.h in Headers */,
 				04BD02D912E6671800899322 /* SDL_sysmutex_c.h in Headers */,
 				04BD02DC12E6671800899322 /* SDL_systhread_c.h in Headers */,
 				04BD02E312E6671800899322 /* SDL_systhread.h in Headers */,
@@ -2033,7 +2021,6 @@
 				DB313F8E17554B71006C0E22 /* SDL_sysjoystick.h in Headers */,
 				DB313F8F17554B71006C0E22 /* SDL_assert_c.h in Headers */,
 				DB313F9017554B71006C0E22 /* SDL_error_c.h in Headers */,
-				DB313F9117554B71006C0E22 /* SDL_fatal.h in Headers */,
 				DB313F9217554B71006C0E22 /* SDL_sysmutex_c.h in Headers */,
 				DB313F9317554B71006C0E22 /* SDL_systhread_c.h in Headers */,
 				DB313F9417554B71006C0E22 /* SDL_systhread.h in Headers */,
@@ -2345,7 +2332,6 @@
 				04BD009612E6671800899322 /* SDL_power.c in Sources */,
 				04BD009C12E6671800899322 /* SDL_assert.c in Sources */,
 				04BD009F12E6671800899322 /* SDL_error.c in Sources */,
-				04BD00A012E6671800899322 /* SDL_fatal.c in Sources */,
 				04BD00A212E6671800899322 /* SDL.c in Sources */,
 				04BD00A312E6671800899322 /* SDL_getenv.c in Sources */,
 				04BD00A412E6671800899322 /* SDL_iconv.c in Sources */,
@@ -2464,7 +2450,6 @@
 				04BD02B012E6671800899322 /* SDL_power.c in Sources */,
 				04BD02B612E6671800899322 /* SDL_assert.c in Sources */,
 				04BD02B912E6671800899322 /* SDL_error.c in Sources */,
-				04BD02BA12E6671800899322 /* SDL_fatal.c in Sources */,
 				04BD02BC12E6671800899322 /* SDL.c in Sources */,
 				04BD02BD12E6671800899322 /* SDL_getenv.c in Sources */,
 				04BD02BE12E6671800899322 /* SDL_iconv.c in Sources */,
@@ -2581,7 +2566,6 @@
 				DB31401C17554B71006C0E22 /* SDL_power.c in Sources */,
 				DB31401D17554B71006C0E22 /* SDL_assert.c in Sources */,
 				DB31401E17554B71006C0E22 /* SDL_error.c in Sources */,
-				DB31401F17554B71006C0E22 /* SDL_fatal.c in Sources */,
 				DB31402017554B71006C0E22 /* SDL.c in Sources */,
 				DB31402117554B71006C0E22 /* SDL_getenv.c in Sources */,
 				DB31402217554B71006C0E22 /* SDL_iconv.c in Sources */,
diff --git a/src/SDL.c b/src/SDL.c
index f73bdb59b..2fdefd9d2 100644
--- a/src/SDL.c
+++ b/src/SDL.c
@@ -25,7 +25,6 @@
 #include "SDL.h"
 #include "SDL_bits.h"
 #include "SDL_revision.h"
-#include "SDL_fatal.h"
 #include "SDL_assert_c.h"
 #include "events/SDL_events_c.h"
 #include "haptic/SDL_haptic_c.h"
@@ -240,11 +239,6 @@ SDL_Init(Uint32 flags)
         return (-1);
     }
 
-    /* Everything is initialized */
-    if (!(flags & SDL_INIT_NOPARACHUTE)) {
-        SDL_InstallParachute();
-    }
-
     return (0);
 }
 
diff --git a/src/SDL_fatal.c b/src/SDL_fatal.c
deleted file mode 100644
index 6600df506..000000000
--- a/src/SDL_fatal.c
+++ /dev/null
@@ -1,36 +0,0 @@
-/*
-  Simple DirectMedia Layer
-  Copyright (C) 1997-2013 Sam Lantinga 
-
-  This software is provided 'as-is', without any express or implied
-  warranty.  In no event will the authors be held liable for any damages
-  arising from the use of this software.
-
-  Permission is granted to anyone to use this software for any purpose,
-  including commercial applications, and to alter it and redistribute it
-  freely, subject to the following restrictions:
-
-  1. The origin of this software must not be misrepresented; you must not
-     claim that you wrote the original software. If you use this software
-     in a product, an acknowledgment in the product documentation would be
-     appreciated but is not required.
-  2. Altered source versions must be plainly marked as such, and must not be
-     misrepresented as being the original software.
-  3. This notice may not be removed or altered from any source distribution.
-*/
-#include "SDL_config.h"
-
-
-void
-SDL_InstallParachute(void)
-{
-    return;
-}
-
-void
-SDL_UninstallParachute(void)
-{
-    return;
-}
-
-/* vi: set ts=4 sw=4 expandtab: */
diff --git a/src/SDL_fatal.h b/src/SDL_fatal.h
deleted file mode 100644
index 3a81689b9..000000000
--- a/src/SDL_fatal.h
+++ /dev/null
@@ -1,27 +0,0 @@
-/*
-  Simple DirectMedia Layer
-  Copyright (C) 1997-2013 Sam Lantinga 
-
-  This software is provided 'as-is', without any express or implied
-  warranty.  In no event will the authors be held liable for any damages
-  arising from the use of this software.
-
-  Permission is granted to anyone to use this software for any purpose,
-  including commercial applications, and to alter it and redistribute it
-  freely, subject to the following restrictions:
-
-  1. The origin of this software must not be misrepresented; you must not
-     claim that you wrote the original software. If you use this software
-     in a product, an acknowledgment in the product documentation would be
-     appreciated but is not required.
-  2. Altered source versions must be plainly marked as such, and must not be
-     misrepresented as being the original software.
-  3. This notice may not be removed or altered from any source distribution.
-*/
-#include "SDL_config.h"
-
-/* General fatal signal handling code for SDL */
-
-extern void SDL_InstallParachute(void);
-extern void SDL_UninstallParachute(void);
-/* vi: set ts=4 sw=4 expandtab: */

From 009e12858bf07373f25141e06110057a29b00404 Mon Sep 17 00:00:00 2001
From: "Ryan C. Gordon" 
Date: Wed, 7 Aug 2013 11:14:16 -0700
Subject: [PATCH 501/542] SDL_Init() is now just a wrapper around
 SDL_InitSubSystem().

---
 src/SDL.c | 25 ++++++++++---------------
 1 file changed, 10 insertions(+), 15 deletions(-)

diff --git a/src/SDL.c b/src/SDL.c
index 2fdefd9d2..ea5806de9 100644
--- a/src/SDL.c
+++ b/src/SDL.c
@@ -107,6 +107,15 @@ SDL_InitSubSystem(Uint32 flags)
         return -1;
     }
 
+    /* Clear the error message */
+    SDL_ClearError();
+
+#if SDL_VIDEO_DRIVER_WINDOWS
+    if (SDL_HelperWindowCreate() < 0) {
+        return -1;
+    }
+#endif
+
 #if !SDL_TIMERS_DISABLED
     SDL_InitTicks();
 #endif
@@ -225,21 +234,7 @@ SDL_InitSubSystem(Uint32 flags)
 int
 SDL_Init(Uint32 flags)
 {
-    /* Clear the error message */
-    SDL_ClearError();
-
-#if SDL_VIDEO_DRIVER_WINDOWS
-    if (SDL_HelperWindowCreate() < 0) {
-        return -1;
-    }
-#endif
-
-    /* Initialize the desired subsystems */
-    if (SDL_InitSubSystem(flags) < 0) {
-        return (-1);
-    }
-
-    return (0);
+    return SDL_InitSubSystem(flags);
 }
 
 void

From ff5cf270490258a4af67f2b50801ac429f3c5609 Mon Sep 17 00:00:00 2001
From: "Ryan C. Gordon" 
Date: Wed, 7 Aug 2013 12:17:33 -0700
Subject: [PATCH 502/542] Whoops, forgot to commit this piece.

---
 src/SDL.c | 3 ---
 1 file changed, 3 deletions(-)

diff --git a/src/SDL.c b/src/SDL.c
index ea5806de9..281710b45 100644
--- a/src/SDL.c
+++ b/src/SDL.c
@@ -349,9 +349,6 @@ SDL_Quit(void)
 #endif
     SDL_QuitSubSystem(SDL_INIT_EVERYTHING);
 
-    /* Uninstall any parachute signal handlers */
-    SDL_UninstallParachute();
-
     SDL_ClearHints();
     SDL_AssertionsQuit();
     SDL_LogResetPriorities();

From b03f072d95eb9297d98764ed071a0b39d820d19a Mon Sep 17 00:00:00 2001
From: Sam Lantinga 
Date: Wed, 7 Aug 2013 14:00:41 -0700
Subject: [PATCH 503/542] Updated the name of the iOS platform

---
 src/SDL.c | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/src/SDL.c b/src/SDL.c
index 281710b45..d8c05fb5b 100644
--- a/src/SDL.c
+++ b/src/SDL.c
@@ -429,7 +429,7 @@ SDL_GetPlatform()
 #elif __WIN32__
     return "Windows";
 #elif __IPHONEOS__
-    return "iPhone OS";
+    return "iOS";
 #elif __PSP__
     return "PlayStation Portable";
 #else

From 8d8238f8aec106dc82a23cdaa5429a9b0832b59a Mon Sep 17 00:00:00 2001
From: =?UTF-8?q?J=C3=B8rgen=20P=2E=20Tjern=C3=B8?=
 
Date: Wed, 7 Aug 2013 16:29:15 -0700
Subject: [PATCH 504/542] Mac: Better mouse-grab if you define
 SDL_MAC_NO_SANDBOX.

This uses a better mouse grab if you define SDL_MAC_NO_SANDBOX. This
mouse grab uses CGEventTapCreate, which you cannot access if you have
sandboxing enabled.
---
 Xcode/SDL/SDL.xcodeproj/project.pbxproj |  19 ++
 src/video/cocoa/SDL_cocoamouse.h        |   1 +
 src/video/cocoa/SDL_cocoamouse.m        |   9 +
 src/video/cocoa/SDL_cocoamousetap.h     |  33 ++++
 src/video/cocoa/SDL_cocoamousetap.m     | 252 ++++++++++++++++++++++++
 src/video/cocoa/SDL_cocoawindow.m       |   6 +
 6 files changed, 320 insertions(+)
 create mode 100644 src/video/cocoa/SDL_cocoamousetap.h
 create mode 100644 src/video/cocoa/SDL_cocoamousetap.m

diff --git a/Xcode/SDL/SDL.xcodeproj/project.pbxproj b/Xcode/SDL/SDL.xcodeproj/project.pbxproj
index 2fccf0f7c..fd91642c7 100755
--- a/Xcode/SDL/SDL.xcodeproj/project.pbxproj
+++ b/Xcode/SDL/SDL.xcodeproj/project.pbxproj
@@ -516,6 +516,12 @@
 		AADA5B8716CCAB3000107CF7 /* SDL_bits.h in Headers */ = {isa = PBXBuildFile; fileRef = AADA5B8616CCAB3000107CF7 /* SDL_bits.h */; };
 		AADA5B8816CCAB3000107CF7 /* SDL_bits.h in Headers */ = {isa = PBXBuildFile; fileRef = AADA5B8616CCAB3000107CF7 /* SDL_bits.h */; };
 		BBFC088D164C6647003E6A99 /* SDL_gamecontroller.c in Sources */ = {isa = PBXBuildFile; fileRef = BBFC088A164C6514003E6A99 /* SDL_gamecontroller.c */; };
+		D55A1B81179F262300625D7C /* SDL_cocoamousetap.h in Headers */ = {isa = PBXBuildFile; fileRef = D55A1B7F179F262300625D7C /* SDL_cocoamousetap.h */; };
+		D55A1B82179F262300625D7C /* SDL_cocoamousetap.m in Sources */ = {isa = PBXBuildFile; fileRef = D55A1B80179F262300625D7C /* SDL_cocoamousetap.m */; };
+		D55A1B83179F263500625D7C /* SDL_cocoamousetap.m in Sources */ = {isa = PBXBuildFile; fileRef = D55A1B80179F262300625D7C /* SDL_cocoamousetap.m */; };
+		D55A1B84179F263600625D7C /* SDL_cocoamousetap.m in Sources */ = {isa = PBXBuildFile; fileRef = D55A1B80179F262300625D7C /* SDL_cocoamousetap.m */; };
+		D55A1B85179F278E00625D7C /* SDL_cocoamousetap.h in Headers */ = {isa = PBXBuildFile; fileRef = D55A1B7F179F262300625D7C /* SDL_cocoamousetap.h */; };
+		D55A1B86179F278F00625D7C /* SDL_cocoamousetap.h in Headers */ = {isa = PBXBuildFile; fileRef = D55A1B7F179F262300625D7C /* SDL_cocoamousetap.h */; };
 		DB313F7417554B71006C0E22 /* SDL_diskaudio.h in Headers */ = {isa = PBXBuildFile; fileRef = 04BDFD8912E6671700899322 /* SDL_diskaudio.h */; };
 		DB313F7517554B71006C0E22 /* SDL_dummyaudio.h in Headers */ = {isa = PBXBuildFile; fileRef = 04BDFD9512E6671700899322 /* SDL_dummyaudio.h */; };
 		DB313F7617554B71006C0E22 /* SDL_coreaudio.h in Headers */ = {isa = PBXBuildFile; fileRef = 04BDFDA112E6671700899322 /* SDL_coreaudio.h */; };
@@ -1044,6 +1050,8 @@
 		BECDF66C0761BA81005FE872 /* SDL2.framework */ = {isa = PBXFileReference; explicitFileType = wrapper.framework; includeInIndex = 0; path = SDL2.framework; sourceTree = BUILT_PRODUCTS_DIR; };
 		BECDF6B30761BA81005FE872 /* libSDL2.a */ = {isa = PBXFileReference; explicitFileType = archive.ar; includeInIndex = 0; path = libSDL2.a; sourceTree = BUILT_PRODUCTS_DIR; };
 		BECDF6BE0761BA81005FE872 /* Standard DMG */ = {isa = PBXFileReference; explicitFileType = "compiled.mach-o.executable"; includeInIndex = 0; path = "Standard DMG"; sourceTree = BUILT_PRODUCTS_DIR; };
+		D55A1B7F179F262300625D7C /* SDL_cocoamousetap.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = SDL_cocoamousetap.h; sourceTree = ""; };
+		D55A1B80179F262300625D7C /* SDL_cocoamousetap.m */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.objc; path = SDL_cocoamousetap.m; sourceTree = ""; };
 		DB31407717554B71006C0E22 /* libSDL2.dylib */ = {isa = PBXFileReference; explicitFileType = "compiled.mach-o.dylib"; includeInIndex = 0; path = libSDL2.dylib; sourceTree = BUILT_PRODUCTS_DIR; };
 		F59C70FF00D5CB5801000001 /* ReadMe.txt */ = {isa = PBXFileReference; fileEncoding = 30; lastKnownFileType = text; path = ReadMe.txt; sourceTree = ""; };
 		F59C710000D5CB5801000001 /* Welcome.txt */ = {isa = PBXFileReference; fileEncoding = 30; lastKnownFileType = text; path = Welcome.txt; sourceTree = ""; };
@@ -1534,6 +1542,8 @@
 				04BDFEC912E6671800899322 /* SDL_cocoamodes.m */,
 				04BDFECA12E6671800899322 /* SDL_cocoamouse.h */,
 				04BDFECB12E6671800899322 /* SDL_cocoamouse.m */,
+				D55A1B7F179F262300625D7C /* SDL_cocoamousetap.h */,
+				D55A1B80179F262300625D7C /* SDL_cocoamousetap.m */,
 				04BDFECC12E6671800899322 /* SDL_cocoaopengl.h */,
 				04BDFECD12E6671800899322 /* SDL_cocoaopengl.m */,
 				04BDFECE12E6671800899322 /* SDL_cocoashape.h */,
@@ -1611,8 +1621,11 @@
 				BEC562FE0761C0E800A33029 /* Linked Frameworks */,
 			);
 			comments = "To build Universal Binaries, we have experimented with a variety of different options.\nThe complication is that we must retain compatibility with at least 10.2. \nThe Universal Binary defaults only work for > 10.3.9\n\nSo far, we have found:\ngcc 4.0.0 with Xcode 2.1 always links against libgcc_s. gcc 4.0.1 from Xcode 2.2 fixes this problem.\n\nBut gcc 4.0 will not work with < 10.3.9 because we continue to get an undefined symbol to _fprintf$LDBL128.\nSo we must use gcc 3.3 on PPC to accomplish 10.2 support. (But 4.0 is required for i386.)\n\nSetting the deployment target to 10.4 will disable prebinding, so for PPC, we set it less than 10.4 to preserve prebinding for legacy support.\n\nSetting the PPC SDKROOT to /Developers/SDKs/MacOSX10.2.8.sdk will link to 63.0.0 libSystem.B.dylib. Leaving it at current or 10.4u links to 88.1.2. However, as long as we are using gcc 3.3, it doesn't seem to matter as testing has demonstrated both will run. We have decided not to invoke the 10.2.8 SDK because it is not a default installed component with Xcode which will probably cause most people problems. However, rather than deleting the SDKROOT_ppc entry entirely, we have mapped it to 10.4u in case we decide we need to change this setting.\n\nTo use Altivec or SSE, we needed architecture specific flags:\nOTHER_CFLAGS_ppc\nOTHER_CFLAGS_i386\nOTHER_CFLAGS=$(OTHER_CFLAGS_($CURRENT_ARCH))\n\nThe general OTHER_CFLAGS needed to be manually mapped to architecture specific options because Xcode didn't do this automatically for us.\n\n\n";
+			indentWidth = 4;
 			name = SDLFramework;
 			sourceTree = "";
+			tabWidth = 4;
+			usesTabs = 0;
 		};
 		089C1665FE841158C02AAC07 /* Resources */ = {
 			isa = PBXGroup;
@@ -1842,6 +1855,7 @@
 				AA628AD3159367F2005138DD /* SDL_x11xinput2.h in Headers */,
 				AABCC38D164063D200AB8930 /* SDL_cocoamessagebox.h in Headers */,
 				AADA5B8716CCAB3000107CF7 /* SDL_bits.h in Headers */,
+				D55A1B81179F262300625D7C /* SDL_cocoamousetap.h in Headers */,
 			);
 			runOnlyForDeploymentPostprocessing = 0;
 		};
@@ -1985,6 +1999,7 @@
 				AABCC38E164063D200AB8930 /* SDL_cocoamessagebox.h in Headers */,
 				A77E6EB5167AB0A90010E40B /* SDL_gamecontroller.h in Headers */,
 				AADA5B8816CCAB3000107CF7 /* SDL_bits.h in Headers */,
+				D55A1B85179F278E00625D7C /* SDL_cocoamousetap.h in Headers */,
 			);
 			runOnlyForDeploymentPostprocessing = 0;
 		};
@@ -2128,6 +2143,7 @@
 				DB313FFA17554B71006C0E22 /* SDL_cocoamessagebox.h in Headers */,
 				DB313FFB17554B71006C0E22 /* SDL_gamecontroller.h in Headers */,
 				DB313FFC17554B71006C0E22 /* SDL_bits.h in Headers */,
+				D55A1B86179F278F00625D7C /* SDL_cocoamousetap.h in Headers */,
 			);
 			runOnlyForDeploymentPostprocessing = 0;
 		};
@@ -2410,6 +2426,7 @@
 				AABCC38F164063D200AB8930 /* SDL_cocoamessagebox.m in Sources */,
 				AA0AD09D16648D1700CE5896 /* SDL_gamecontroller.c in Sources */,
 				AA0F8491178D5ECC00823F9D /* SDL_systls.c in Sources */,
+				D55A1B82179F262300625D7C /* SDL_cocoamousetap.m in Sources */,
 			);
 			runOnlyForDeploymentPostprocessing = 0;
 		};
@@ -2526,6 +2543,7 @@
 				AA9E4094163BE51E007A2AD0 /* SDL_x11messagebox.c in Sources */,
 				AABCC390164063D200AB8930 /* SDL_cocoamessagebox.m in Sources */,
 				AA0F8492178D5ECC00823F9D /* SDL_systls.c in Sources */,
+				D55A1B84179F263600625D7C /* SDL_cocoamousetap.m in Sources */,
 			);
 			runOnlyForDeploymentPostprocessing = 0;
 		};
@@ -2642,6 +2660,7 @@
 				DB31406917554B71006C0E22 /* SDL_x11messagebox.c in Sources */,
 				DB31406A17554B71006C0E22 /* SDL_cocoamessagebox.m in Sources */,
 				AA0F8493178D5ECC00823F9D /* SDL_systls.c in Sources */,
+				D55A1B83179F263500625D7C /* SDL_cocoamousetap.m in Sources */,
 			);
 			runOnlyForDeploymentPostprocessing = 0;
 		};
diff --git a/src/video/cocoa/SDL_cocoamouse.h b/src/video/cocoa/SDL_cocoamouse.h
index bff8ef6dd..eb6f5891f 100644
--- a/src/video/cocoa/SDL_cocoamouse.h
+++ b/src/video/cocoa/SDL_cocoamouse.h
@@ -33,6 +33,7 @@ extern void Cocoa_QuitMouse(_THIS);
 typedef struct {
     int deltaXOffset;
     int deltaYOffset;
+    void *tapdata;
 } SDL_MouseData;
 
 @interface NSCursor (InvisibleCursor)
diff --git a/src/video/cocoa/SDL_cocoamouse.m b/src/video/cocoa/SDL_cocoamouse.m
index 12e755cf9..faba9618e 100644
--- a/src/video/cocoa/SDL_cocoamouse.m
+++ b/src/video/cocoa/SDL_cocoamouse.m
@@ -25,6 +25,7 @@
 #include "SDL_assert.h"
 #include "SDL_events.h"
 #include "SDL_cocoamouse.h"
+#include "SDL_cocoamousetap.h"
 
 #include "../../events/SDL_mouse_c.h"
 
@@ -94,6 +95,8 @@ Cocoa_CreateCursor(SDL_Surface * surface, int hot_x, int hot_y)
         cursor = SDL_calloc(1, sizeof(*cursor));
         if (cursor) {
             cursor->driverdata = nscursor;
+        } else {
+            [nscursor release];
         }
     }
 
@@ -266,6 +269,8 @@ Cocoa_InitMouse(_THIS)
     mouse->SetRelativeMouseMode = Cocoa_SetRelativeMouseMode;
 
     SDL_SetDefaultCursor(Cocoa_CreateDefaultCursor());
+
+    Cocoa_InitMouseEventTap(mouse->driverdata);
 }
 
 void
@@ -313,6 +318,10 @@ Cocoa_QuitMouse(_THIS)
 {
     SDL_Mouse *mouse = SDL_GetMouse();
     if (mouse) {
+        if (mouse->driverdata) {
+            Cocoa_QuitMouseEventTap(((SDL_MouseData*)mouse->driverdata));
+        }
+
         SDL_free(mouse->driverdata);
     }
 }
diff --git a/src/video/cocoa/SDL_cocoamousetap.h b/src/video/cocoa/SDL_cocoamousetap.h
new file mode 100644
index 000000000..a13d97bb5
--- /dev/null
+++ b/src/video/cocoa/SDL_cocoamousetap.h
@@ -0,0 +1,33 @@
+/*
+  Simple DirectMedia Layer
+  Copyright (C) 1997-2013 Sam Lantinga 
+
+  This software is provided 'as-is', without any express or implied
+  warranty.  In no event will the authors be held liable for any damages
+  arising from the use of this software.
+
+  Permission is granted to anyone to use this software for any purpose,
+  including commercial applications, and to alter it and redistribute it
+  freely, subject to the following restrictions:
+
+  1. The origin of this software must not be misrepresented; you must not
+     claim that you wrote the original software. If you use this software
+     in a product, an acknowledgment in the product documentation would be
+     appreciated but is not required.
+  2. Altered source versions must be plainly marked as such, and must not be
+     misrepresented as being the original software.
+  3. This notice may not be removed or altered from any source distribution.
+*/
+#include "SDL_config.h"
+
+#ifndef _SDL_cocoamousetap_h
+#define _SDL_cocoamousetap_h
+
+#include "SDL_cocoamouse.h"
+
+extern void Cocoa_InitMouseEventTap(SDL_MouseData *driverdata);
+extern void Cocoa_QuitMouseEventTap(SDL_MouseData *driverdata);
+
+#endif /* _SDL_cocoamousetap_h */
+
+/* vi: set ts=4 sw=4 expandtab: */
diff --git a/src/video/cocoa/SDL_cocoamousetap.m b/src/video/cocoa/SDL_cocoamousetap.m
new file mode 100644
index 000000000..01769b321
--- /dev/null
+++ b/src/video/cocoa/SDL_cocoamousetap.m
@@ -0,0 +1,252 @@
+/*
+  Simple DirectMedia Layer
+  Copyright (C) 1997-2013 Sam Lantinga 
+
+  This software is provided 'as-is', without any express or implied
+  warranty.  In no event will the authors be held liable for any damages
+  arising from the use of this software.
+
+  Permission is granted to anyone to use this software for any purpose,
+  including commercial applications, and to alter it and redistribute it
+  freely, subject to the following restrictions:
+
+  1. The origin of this software must not be misrepresented; you must not
+     claim that you wrote the original software. If you use this software
+     in a product, an acknowledgment in the product documentation would be
+     appreciated but is not required.
+  2. Altered source versions must be plainly marked as such, and must not be
+     misrepresented as being the original software.
+  3. This notice may not be removed or altered from any source distribution.
+*/
+#include "SDL_config.h"
+
+#if SDL_VIDEO_DRIVER_COCOA
+
+#define SDL_MAC_NO_SANDBOX 1
+
+#include "SDL_cocoamousetap.h"
+
+/* Event taps are forbidden in the Mac App Store, so we can only enable this
+ * code if your app doesn't need to ship through the app store.
+ * This code makes it so that a grabbed cursor cannot "leak" a mouse click
+ * past the edge of the window if moving the cursor too fast.
+ */
+#if SDL_MAC_NO_SANDBOX
+
+#include "SDL_keyboard.h"
+#include "SDL_thread.h"
+#include "SDL_cocoavideo.h"
+
+#include "../../events/SDL_mouse_c.h"
+
+typedef struct {
+    CFMachPortRef tap;
+    CFRunLoopRef runloop;
+    CFRunLoopSourceRef runloopSource;
+    SDL_Thread *thread;
+    SDL_sem *runloopStartedSemaphore;
+} SDL_MouseEventTapData;
+
+static const CGEventMask movementEventsMask =
+      CGEventMaskBit(kCGEventLeftMouseDragged)
+    | CGEventMaskBit(kCGEventRightMouseDragged)
+    | CGEventMaskBit(kCGEventMouseMoved);
+
+static const CGEventMask allGrabbedEventsMask =
+      CGEventMaskBit(kCGEventLeftMouseDown)    | CGEventMaskBit(kCGEventLeftMouseUp)
+    | CGEventMaskBit(kCGEventRightMouseDown)   | CGEventMaskBit(kCGEventRightMouseUp)
+    | CGEventMaskBit(kCGEventOtherMouseDown)   | CGEventMaskBit(kCGEventOtherMouseUp)
+    | CGEventMaskBit(kCGEventLeftMouseDragged) | CGEventMaskBit(kCGEventRightMouseDragged)
+    | CGEventMaskBit(kCGEventMouseMoved);
+
+static CGEventRef
+Cocoa_MouseTapCallback(CGEventTapProxy proxy, CGEventType type, CGEventRef event, void *refcon)
+{
+    SDL_MouseData *driverdata = (SDL_MouseData*)refcon;
+    SDL_Mouse *mouse = SDL_GetMouse();
+    SDL_Window *window = SDL_GetKeyboardFocus();
+    NSRect windowRect;
+    CGPoint eventLocation;
+
+    switch (type)
+    {
+        case kCGEventTapDisabledByTimeout:
+        case kCGEventTapDisabledByUserInput:
+            {
+                CGEventTapEnable(((SDL_MouseEventTapData*)(driverdata->tapdata))->tap, true);
+                return NULL;
+            }
+        default:
+            break;
+    }
+
+
+    if (!window || !mouse) {
+        return event;
+    }
+
+    if (mouse->relative_mode) {
+        return event;
+    }
+
+    if (!(window->flags & SDL_WINDOW_INPUT_GRABBED)) {
+        return event;
+    }
+
+    /* This is the same coordinate system as Cocoa uses. */
+    eventLocation = CGEventGetUnflippedLocation(event);
+    windowRect = [((SDL_WindowData *) window->driverdata)->nswindow frame];
+
+    if (!NSPointInRect(NSPointFromCGPoint(eventLocation), windowRect)) {
+
+        /* This is in CGs global screenspace coordinate system, which has a
+         * flipped Y.
+         */
+        CGPoint newLocation = CGEventGetLocation(event);
+
+        if (eventLocation.x < NSMinX(windowRect)) {
+            newLocation.x = NSMinX(windowRect);
+        } else if (eventLocation.x >= NSMaxX(windowRect)) {
+            newLocation.x = NSMaxX(windowRect) - 1.0;
+        }
+
+        if (eventLocation.y < NSMinY(windowRect)) {
+            newLocation.y -= (NSMinY(windowRect) - eventLocation.y + 1);
+        } else if (eventLocation.y >= NSMaxY(windowRect)) {
+            newLocation.y += (eventLocation.y - NSMaxY(windowRect) + 1);
+        }
+
+        CGSetLocalEventsSuppressionInterval(0);
+        CGWarpMouseCursorPosition(newLocation);
+        CGSetLocalEventsSuppressionInterval(0.25);
+
+        if ((CGEventMaskBit(type) & movementEventsMask) == 0) {
+            /* For click events, we just constrain the event to the window, so
+             * no other app receives the click event. We can't due the same to
+             * movement events, since they mean that our warp cursor above
+             * behaves strangely.
+             */
+            CGEventSetLocation(event, newLocation);
+        }
+    }
+
+    return event;
+}
+
+static int
+Cocoa_MouseTapThread(void *data)
+{
+    SDL_MouseEventTapData *tapdata = (SDL_MouseEventTapData*)data;
+
+    /* Create a tap. */
+    CFMachPortRef eventTap = CGEventTapCreate(kCGSessionEventTap, kCGHeadInsertEventTap,
+                                              kCGEventTapOptionDefault, allGrabbedEventsMask,
+                                              &Cocoa_MouseTapCallback, tapdata);
+    if (eventTap) {
+        /* Try to create a runloop source we can schedule. */
+        CFRunLoopSourceRef runloopSource = CFMachPortCreateRunLoopSource(kCFAllocatorDefault, eventTap, 0);
+        if  (runloopSource) {
+            tapdata->tap = eventTap;
+            tapdata->runloopSource = runloopSource;
+        } else {
+            CFRelease(eventTap);
+            SDL_SemPost(tapdata->runloopStartedSemaphore);
+            /* TODO: Both here and in the return below, set some state in
+             * tapdata to indicate that initialization failed, which we should
+             * check in InitMouseEventTap, after we move the semaphore check
+             * from Quit to Init.
+             */
+            return 1;
+        }
+    } else {
+        SDL_SemPost(tapdata->runloopStartedSemaphore);
+        return 1;
+    }
+
+    tapdata->runloop = CFRunLoopGetCurrent();
+    CFRunLoopAddSource(tapdata->runloop, tapdata->runloopSource, kCFRunLoopCommonModes);
+    CFRunLoopPerformBlock(tapdata->runloop, kCFRunLoopCommonModes, ^{
+        /* We signal this *after* the run loop has started, indicating it's safe to CFRunLoopStop it. */
+        SDL_SemPost(tapdata->runloopStartedSemaphore);
+    });
+
+    /* Run the event loop to handle events in the event tap. */
+    CFRunLoopRun();
+    /* Make sure this is signaled so that SDL_QuitMouseEventTap knows it can safely SDL_WaitThread for us. */
+    if (SDL_SemValue(tapdata->runloopStartedSemaphore) < 1) {
+        SDL_SemPost(tapdata->runloopStartedSemaphore);
+    }
+    CFRunLoopRemoveSource(tapdata->runloop, tapdata->runloopSource, kCFRunLoopCommonModes);
+
+    /* Clean up. */
+    CGEventTapEnable(tapdata->tap, false);
+    CFRelease(tapdata->runloopSource);
+    CFRelease(tapdata->tap);
+    tapdata->runloopSource = NULL;
+    tapdata->tap = NULL;
+
+    return 0;
+}
+
+void
+Cocoa_InitMouseEventTap(SDL_MouseData* driverdata)
+{
+    SDL_MouseEventTapData *tapdata;
+    driverdata->tapdata = SDL_calloc(1, sizeof(SDL_MouseEventTapData));
+    tapdata = (SDL_MouseEventTapData*)driverdata->tapdata;
+
+    tapdata->runloopStartedSemaphore = SDL_CreateSemaphore(0);
+    if (tapdata->runloopStartedSemaphore) {
+        tapdata->thread = SDL_CreateThread(&Cocoa_MouseTapThread, "Event Tap Loop", tapdata);
+        if (!tapdata->thread) {
+            SDL_DestroySemaphore(tapdata->runloopStartedSemaphore);
+        }
+    }
+
+    if (!tapdata->thread) {
+        SDL_free(driverdata->tapdata);
+        driverdata->tapdata = NULL;
+    }
+}
+
+void
+Cocoa_QuitMouseEventTap(SDL_MouseData *driverdata)
+{
+    SDL_MouseEventTapData *tapdata = (SDL_MouseEventTapData*)driverdata->tapdata;
+    int status;
+
+    /* Ensure that the runloop has been started first.
+     * TODO: Move this to InitMouseEventTap, check for error conditions that can
+     * happen in Cocoa_MouseTapThread, and fall back to the non-EventTap way of
+     * grabbing the mouse if it fails to Init.
+     */
+    status = SDL_SemWaitTimeout(tapdata->runloopStartedSemaphore, 5000);
+    if (status > -1) {
+        /* Then stop it, which will cause Cocoa_MouseTapThread to return. */
+        CFRunLoopStop(tapdata->runloop);
+        /* And then wait for Cocoa_MouseTapThread to finish cleaning up. It
+         * releases some of the pointers in tapdata. */
+        SDL_WaitThread(tapdata->thread, &status);
+    }
+
+    SDL_free(driverdata->tapdata);
+    driverdata->tapdata = NULL;
+}
+
+#else /* SDL_MAC_NO_SANDBOX */
+
+void
+Cocoa_InitMouseEventTap(SDL_MouseData *unused)
+{
+}
+
+void
+Cocoa_QuitMouseEventTap(SDL_MouseData *driverdata)
+{
+}
+
+#endif /* !SDL_MAC_NO_SANDBOX */
+
+#endif /* SDL_VIDEO_DRIVER_COCOA */
+
+/* vi: set ts=4 sw=4 expandtab: */
diff --git a/src/video/cocoa/SDL_cocoawindow.m b/src/video/cocoa/SDL_cocoawindow.m
index 28a58e4e6..0c37f4de0 100644
--- a/src/video/cocoa/SDL_cocoawindow.m
+++ b/src/video/cocoa/SDL_cocoawindow.m
@@ -414,6 +414,11 @@ static __inline__ void ConvertNSRect(NSRect *r)
                 y = window->h - 1;
             }
 
+#if !SDL_MAC_NO_SANDBOX
+            /* When SDL_MAC_NO_SANDBOX is set, this is handled by
+             * SDL_cocoamousetap.m.
+             */
+
             cgpoint.x = window->x + x;
             cgpoint.y = window->y + y;
 
@@ -424,6 +429,7 @@ static __inline__ void ConvertNSRect(NSRect *r)
             CGSetLocalEventsSuppressionInterval(0.0);
             CGDisplayMoveCursorToPoint(kCGDirectMainDisplay, cgpoint);
             CGSetLocalEventsSuppressionInterval(0.25);
+#endif
         }
     }
     SDL_SendMouseMotion(window, 0, 0, x, y);

From 20c8287efc82413b5d926143c19f564b3bbc6847 Mon Sep 17 00:00:00 2001
From: =?UTF-8?q?J=C3=B8rgen=20P=2E=20Tjern=C3=B8?=
 
Date: Wed, 7 Aug 2013 16:29:21 -0700
Subject: [PATCH 505/542] Mac: Don't -[NSOpenGLContext update] on (potentially)
 the wrong thread.

If the user is using their context from a non-main thread, we could be
calling -[NSOpenGLContext update] on our thread, while they were
accessing it on their thread.

With this change, we schedule updates when the event comes in on the
main thread, and act on them when the user calls SDL_GL_MakeCurrent or
SDL_GL_SwapWindow.
---
 src/video/cocoa/SDL_cocoaopengl.h | 15 +++++++++
 src/video/cocoa/SDL_cocoaopengl.m | 53 ++++++++++++++++++++++++++-----
 src/video/cocoa/SDL_cocoawindow.h |  4 ++-
 src/video/cocoa/SDL_cocoawindow.m | 33 +++++++------------
 4 files changed, 74 insertions(+), 31 deletions(-)

diff --git a/src/video/cocoa/SDL_cocoaopengl.h b/src/video/cocoa/SDL_cocoaopengl.h
index 77bdf4449..9a20b4a6a 100644
--- a/src/video/cocoa/SDL_cocoaopengl.h
+++ b/src/video/cocoa/SDL_cocoaopengl.h
@@ -25,11 +25,26 @@
 
 #if SDL_VIDEO_OPENGL_CGL
 
+#include "SDL_atomic.h"
+#import 
+
 struct SDL_GLDriverData
 {
     int initialized;
 };
 
+@interface SDLOpenGLContext : NSOpenGLContext {
+    SDL_atomic_t dirty;
+}
+
+- (id)initWithFormat:(NSOpenGLPixelFormat *)format
+        shareContext:(NSOpenGLContext *)share;
+- (void)scheduleUpdate;
+- (void)updateIfNeeded;
+
+@end
+
+
 /* OpenGL functions */
 extern int Cocoa_GL_LoadLibrary(_THIS, const char *path);
 extern void *Cocoa_GL_GetProcAddress(_THIS, const char *proc);
diff --git a/src/video/cocoa/SDL_cocoaopengl.m b/src/video/cocoa/SDL_cocoaopengl.m
index 8289107e3..43af675f4 100644
--- a/src/video/cocoa/SDL_cocoaopengl.m
+++ b/src/video/cocoa/SDL_cocoaopengl.m
@@ -24,6 +24,7 @@
 
 #if SDL_VIDEO_OPENGL_CGL
 #include "SDL_cocoavideo.h"
+#include "SDL_cocoaopengl.h"
 
 #include 
 #include 
@@ -45,6 +46,40 @@
 #define kCGLOGLPVersion_3_2_Core 0x3200
 #endif
 
+@implementation SDLOpenGLContext : NSOpenGLContext
+
+- (id)initWithFormat:(NSOpenGLPixelFormat *)format
+        shareContext:(NSOpenGLContext *)share
+{
+    SDL_AtomicSet(&self->dirty, 0);
+    return [super initWithFormat:format shareContext:share];
+}
+
+- (void)scheduleUpdate
+{
+    SDL_AtomicAdd(&self->dirty, 1);
+}
+
+/* This should only be called on the thread on which a user is using the context. */
+- (void)updateIfNeeded
+{
+    int value = SDL_AtomicSet(&self->dirty, 0);
+    if (value > 0) {
+        /* We call the real underlying update here, since -[SDLOpenGLContext update] just calls us. */
+        [super update];
+    }
+}
+
+/* This should only be called on the thread on which a user is using the context. */
+- (void)update
+{
+    /* This ensures that regular 'update' calls clear the atomic dirty flag. */
+    [self scheduleUpdate];
+    [self updateIfNeeded];
+}
+
+@end
+
 
 int
 Cocoa_GL_LoadLibrary(_THIS, const char *path)
@@ -89,7 +124,7 @@ Cocoa_GL_CreateContext(_THIS, SDL_Window * window)
     SDL_DisplayData *displaydata = (SDL_DisplayData *)display->driverdata;
     NSOpenGLPixelFormatAttribute attr[32];
     NSOpenGLPixelFormat *fmt;
-    NSOpenGLContext *context;
+    SDLOpenGLContext *context;
     NSOpenGLContext *share_context = nil;
     int i = 0;
 
@@ -181,7 +216,7 @@ Cocoa_GL_CreateContext(_THIS, SDL_Window * window)
         share_context = (NSOpenGLContext*)SDL_GL_GetCurrentContext();
     }
 
-    context = [[NSOpenGLContext alloc] initWithFormat:fmt shareContext:share_context];
+    context = [[SDLOpenGLContext alloc] initWithFormat:fmt shareContext:share_context];
 
     [fmt release];
 
@@ -210,13 +245,14 @@ Cocoa_GL_MakeCurrent(_THIS, SDL_Window * window, SDL_GLContext context)
 
     if (context) {
         SDL_WindowData *windowdata = (SDL_WindowData *)window->driverdata;
-        NSOpenGLContext *nscontext = (NSOpenGLContext *)context;
-
+        SDLOpenGLContext *nscontext = (SDLOpenGLContext *)context;
         windowdata->nscontext = nscontext;
         if ([nscontext view] != [windowdata->nswindow contentView]) {
             [nscontext setView:[windowdata->nswindow contentView]];
-            [nscontext update];
+            [nscontext scheduleUpdate];
         }
+
+        [nscontext updateIfNeeded];
         [nscontext makeCurrentContext];
     } else {
         [NSOpenGLContext clearCurrentContext];
@@ -236,7 +272,7 @@ Cocoa_GL_SetSwapInterval(_THIS, int interval)
 
     pool = [[NSAutoreleasePool alloc] init];
 
-    nscontext = [NSOpenGLContext currentContext];
+    nscontext = (NSOpenGLContext*)SDL_GL_GetCurrentContext();
     if (nscontext != nil) {
         value = interval;
         [nscontext setValues:&value forParameter:NSOpenGLCPSwapInterval];
@@ -259,7 +295,7 @@ Cocoa_GL_GetSwapInterval(_THIS)
 
     pool = [[NSAutoreleasePool alloc] init];
 
-    nscontext = [NSOpenGLContext currentContext];
+    nscontext = (NSOpenGLContext*)SDL_GL_GetCurrentContext();
     if (nscontext != nil) {
         [nscontext getValues:&value forParameter:NSOpenGLCPSwapInterval];
         status = (int)value;
@@ -274,11 +310,12 @@ Cocoa_GL_SwapWindow(_THIS, SDL_Window * window)
 {
     NSAutoreleasePool *pool;
     SDL_WindowData *windowdata = (SDL_WindowData *)window->driverdata;
-    NSOpenGLContext *nscontext = windowdata->nscontext;
+    SDLOpenGLContext *nscontext = windowdata->nscontext;
 
     pool = [[NSAutoreleasePool alloc] init];
 
     [nscontext flushBuffer];
+    [nscontext updateIfNeeded];
 
     [pool release];
 }
diff --git a/src/video/cocoa/SDL_cocoawindow.h b/src/video/cocoa/SDL_cocoawindow.h
index 01ff63880..50a741de9 100644
--- a/src/video/cocoa/SDL_cocoawindow.h
+++ b/src/video/cocoa/SDL_cocoawindow.h
@@ -77,11 +77,13 @@ typedef enum {
 @end
 /* *INDENT-ON* */
 
+@class SDLOpenGLContext;
+
 struct SDL_WindowData
 {
     SDL_Window *window;
     NSWindow *nswindow;
-    NSOpenGLContext *nscontext;
+    SDLOpenGLContext *nscontext;
     SDL_bool created;
     Cocoa_WindowListener *listener;
     struct SDL_VideoData *videodata;
diff --git a/src/video/cocoa/SDL_cocoawindow.m b/src/video/cocoa/SDL_cocoawindow.m
index 0c37f4de0..530d6bb11 100644
--- a/src/video/cocoa/SDL_cocoawindow.m
+++ b/src/video/cocoa/SDL_cocoawindow.m
@@ -32,6 +32,7 @@
 #include "SDL_cocoavideo.h"
 #include "SDL_cocoashape.h"
 #include "SDL_cocoamouse.h"
+#include "SDL_cocoaopengl.h"
 
 
 static Uint32 s_moveHack;
@@ -187,7 +188,6 @@ static __inline__ void ConvertNSRect(NSRect *r)
 - (void)windowDidMove:(NSNotification *)aNotification
 {
     int x, y;
-    SDL_VideoDevice *device = SDL_GetVideoDevice();
     SDL_Window *window = _data->window;
     NSWindow *nswindow = _data->nswindow;
     NSRect rect = [nswindow contentRectForFrameRect:[nswindow frame]];
@@ -211,16 +211,13 @@ static __inline__ void ConvertNSRect(NSRect *r)
     x = (int)rect.origin.x;
     y = (int)rect.origin.y;
 
-    if (window == device->current_glwin) {
-        [((NSOpenGLContext *) device->current_glctx) update];
-    }
+    [_data->nscontext scheduleUpdate];
 
     SDL_SendWindowEvent(window, SDL_WINDOWEVENT_MOVED, x, y);
 }
 
 - (void)windowDidResize:(NSNotification *)aNotification
 {
-    SDL_VideoDevice *device = SDL_GetVideoDevice();
     int x, y, w, h;
     NSRect rect = [_data->nswindow contentRectForFrameRect:[_data->nswindow frame]];
     ConvertNSRect(&rect);
@@ -231,9 +228,7 @@ static __inline__ void ConvertNSRect(NSRect *r)
     if (SDL_IsShapedWindow(_data->window))
         Cocoa_ResizeWindowShape(_data->window);
 
-    if (_data->window == device->current_glwin) {
-        [((NSOpenGLContext *) device->current_glctx) update];
-    }
+    [_data->nscontext scheduleUpdate];
 
     /* The window can move during a resize event, such as when maximizing
        or resizing from a corner */
@@ -788,7 +783,8 @@ void
 Cocoa_SetWindowPosition(_THIS, SDL_Window * window)
 {
     NSAutoreleasePool *pool = [[NSAutoreleasePool alloc] init];
-    NSWindow *nswindow = ((SDL_WindowData *) window->driverdata)->nswindow;
+    SDL_WindowData *windata = (SDL_WindowData *) window->driverdata;
+    NSWindow *nswindow = windata->nswindow;
     NSRect rect;
     Uint32 moveHack;
 
@@ -803,9 +799,7 @@ Cocoa_SetWindowPosition(_THIS, SDL_Window * window)
     [nswindow setFrameOrigin:rect.origin];
     s_moveHack = moveHack;
 
-    if (window == _this->current_glwin) {
-        [((NSOpenGLContext *) _this->current_glctx) update];
-    }
+    [windata->nscontext scheduleUpdate];
 
     [pool release];
 }
@@ -822,9 +816,7 @@ Cocoa_SetWindowSize(_THIS, SDL_Window * window)
     size.height = window->h;
     [nswindow setContentSize:size];
 
-    if (window == _this->current_glwin) {
-        [((NSOpenGLContext *) _this->current_glctx) update];
-    }
+    [windata->nscontext scheduleUpdate];
 
     [pool release];
 }
@@ -906,13 +898,12 @@ void
 Cocoa_MaximizeWindow(_THIS, SDL_Window * window)
 {
     NSAutoreleasePool *pool = [[NSAutoreleasePool alloc] init];
-    NSWindow *nswindow = ((SDL_WindowData *) window->driverdata)->nswindow;
+    SDL_WindowData *windata = (SDL_WindowData *) window->driverdata;
+    NSWindow *nswindow = windata->nswindow;
 
     [nswindow zoom:nil];
 
-    if (window == _this->current_glwin) {
-        [((NSOpenGLContext *) _this->current_glctx) update];
-    }
+    [windata->nscontext scheduleUpdate];
 
     [pool release];
 }
@@ -1049,9 +1040,7 @@ Cocoa_SetWindowFullscreen(_THIS, SDL_Window * window, SDL_VideoDisplay * display
     [nswindow makeKeyAndOrderFront:nil];
     [data->listener resumeVisibleObservation];
 
-    if (window == _this->current_glwin) {
-        [((NSOpenGLContext *) _this->current_glctx) update];
-    }
+    [data->nscontext scheduleUpdate];
 
     [pool release];
 }

From 9fb9406bbccaf3efbdc41f8aaeb4a04389cacdca Mon Sep 17 00:00:00 2001
From: =?UTF-8?q?J=C3=B8rgen=20P=2E=20Tjern=C3=B8?=
 
Date: Wed, 7 Aug 2013 16:29:25 -0700
Subject: [PATCH 506/542] Mac: Support for multiple contexts per SDL_Window.

---
 src/video/cocoa/SDL_cocoaopengl.h |  2 ++
 src/video/cocoa/SDL_cocoaopengl.m | 57 ++++++++++++++++++++++++-------
 src/video/cocoa/SDL_cocoawindow.h |  2 +-
 src/video/cocoa/SDL_cocoawindow.m | 31 +++++++++++++----
 4 files changed, 72 insertions(+), 20 deletions(-)

diff --git a/src/video/cocoa/SDL_cocoaopengl.h b/src/video/cocoa/SDL_cocoaopengl.h
index 9a20b4a6a..2d06700b6 100644
--- a/src/video/cocoa/SDL_cocoaopengl.h
+++ b/src/video/cocoa/SDL_cocoaopengl.h
@@ -35,12 +35,14 @@ struct SDL_GLDriverData
 
 @interface SDLOpenGLContext : NSOpenGLContext {
     SDL_atomic_t dirty;
+    SDL_Window *window;
 }
 
 - (id)initWithFormat:(NSOpenGLPixelFormat *)format
         shareContext:(NSOpenGLContext *)share;
 - (void)scheduleUpdate;
 - (void)updateIfNeeded;
+- (void)setWindow:(SDL_Window *)window;
 
 @end
 
diff --git a/src/video/cocoa/SDL_cocoaopengl.m b/src/video/cocoa/SDL_cocoaopengl.m
index 43af675f4..0d49ba0cc 100644
--- a/src/video/cocoa/SDL_cocoaopengl.m
+++ b/src/video/cocoa/SDL_cocoaopengl.m
@@ -51,8 +51,12 @@
 - (id)initWithFormat:(NSOpenGLPixelFormat *)format
         shareContext:(NSOpenGLContext *)share
 {
-    SDL_AtomicSet(&self->dirty, 0);
-    return [super initWithFormat:format shareContext:share];
+    self = [super initWithFormat:format shareContext:share];
+    if (self) {
+        SDL_AtomicSet(&self->dirty, 0);
+        self->window = NULL;
+    }
+    return self;
 }
 
 - (void)scheduleUpdate
@@ -78,6 +82,40 @@
     [self updateIfNeeded];
 }
 
+/* Updates the drawable for the contexts and manages related state. */
+- (void)setWindow:(SDL_Window *)newWindow
+{
+    if (self->window) {
+        SDL_WindowData *oldwindowdata = (SDL_WindowData *)self->window->driverdata;
+
+        /* Make sure to remove us from the old window's context list, or we'll get scheduled updates from it too. */
+        NSMutableArray *contexts = oldwindowdata->nscontexts;
+        @synchronized (contexts) {
+            [contexts removeObject:self];
+        }
+    }
+
+    self->window = newWindow;
+
+    if (newWindow) {
+        SDL_WindowData *windowdata = (SDL_WindowData *)newWindow->driverdata;
+
+        /* Now sign up for scheduled updates for the new window. */
+        NSMutableArray *contexts = windowdata->nscontexts;
+        @synchronized (contexts) {
+            [contexts addObject:self];
+        }
+
+        if ([self view] != [windowdata->nswindow contentView]) {
+            [self setView:[windowdata->nswindow contentView]];
+            [self scheduleUpdate];
+        }
+    } else {
+        [self clearDrawable];
+        [self scheduleUpdate];
+    }
+}
+
 @end
 
 
@@ -244,14 +282,8 @@ Cocoa_GL_MakeCurrent(_THIS, SDL_Window * window, SDL_GLContext context)
     pool = [[NSAutoreleasePool alloc] init];
 
     if (context) {
-        SDL_WindowData *windowdata = (SDL_WindowData *)window->driverdata;
         SDLOpenGLContext *nscontext = (SDLOpenGLContext *)context;
-        windowdata->nscontext = nscontext;
-        if ([nscontext view] != [windowdata->nswindow contentView]) {
-            [nscontext setView:[windowdata->nswindow contentView]];
-            [nscontext scheduleUpdate];
-        }
-
+        [nscontext setWindow:window];
         [nscontext updateIfNeeded];
         [nscontext makeCurrentContext];
     } else {
@@ -309,11 +341,10 @@ void
 Cocoa_GL_SwapWindow(_THIS, SDL_Window * window)
 {
     NSAutoreleasePool *pool;
-    SDL_WindowData *windowdata = (SDL_WindowData *)window->driverdata;
-    SDLOpenGLContext *nscontext = windowdata->nscontext;
 
     pool = [[NSAutoreleasePool alloc] init];
 
+    SDLOpenGLContext* nscontext = (NSOpenGLContext*)SDL_GL_GetCurrentContext();
     [nscontext flushBuffer];
     [nscontext updateIfNeeded];
 
@@ -324,11 +355,11 @@ void
 Cocoa_GL_DeleteContext(_THIS, SDL_GLContext context)
 {
     NSAutoreleasePool *pool;
-    NSOpenGLContext *nscontext = (NSOpenGLContext *)context;
+    SDLOpenGLContext *nscontext = (SDLOpenGLContext *)context;
 
     pool = [[NSAutoreleasePool alloc] init];
 
-    [nscontext clearDrawable];
+    [nscontext setWindow:NULL];
     [nscontext release];
 
     [pool release];
diff --git a/src/video/cocoa/SDL_cocoawindow.h b/src/video/cocoa/SDL_cocoawindow.h
index 50a741de9..022694f52 100644
--- a/src/video/cocoa/SDL_cocoawindow.h
+++ b/src/video/cocoa/SDL_cocoawindow.h
@@ -83,7 +83,7 @@ struct SDL_WindowData
 {
     SDL_Window *window;
     NSWindow *nswindow;
-    SDLOpenGLContext *nscontext;
+    NSMutableArray *nscontexts;
     SDL_bool created;
     Cocoa_WindowListener *listener;
     struct SDL_VideoData *videodata;
diff --git a/src/video/cocoa/SDL_cocoawindow.m b/src/video/cocoa/SDL_cocoawindow.m
index 530d6bb11..9cee4d3ba 100644
--- a/src/video/cocoa/SDL_cocoawindow.m
+++ b/src/video/cocoa/SDL_cocoawindow.m
@@ -42,6 +42,16 @@ static __inline__ void ConvertNSRect(NSRect *r)
     r->origin.y = CGDisplayPixelsHigh(kCGDirectMainDisplay) - r->origin.y - r->size.height;
 }
 
+static void ScheduleContextUpdates(SDL_WindowData *data)
+{
+    NSMutableArray *contexts = data->nscontexts;
+    @synchronized (contexts) {
+        for (SDLOpenGLContext *context in contexts) {
+            [context scheduleUpdate];
+        }
+    }
+}
+
 @implementation Cocoa_WindowListener
 
 - (void)listen:(SDL_WindowData *)data
@@ -211,7 +221,7 @@ static __inline__ void ConvertNSRect(NSRect *r)
     x = (int)rect.origin.x;
     y = (int)rect.origin.y;
 
-    [_data->nscontext scheduleUpdate];
+    ScheduleContextUpdates(_data);
 
     SDL_SendWindowEvent(window, SDL_WINDOWEVENT_MOVED, x, y);
 }
@@ -228,7 +238,7 @@ static __inline__ void ConvertNSRect(NSRect *r)
     if (SDL_IsShapedWindow(_data->window))
         Cocoa_ResizeWindowShape(_data->window);
 
-    [_data->nscontext scheduleUpdate];
+    ScheduleContextUpdates(_data);
 
     /* The window can move during a resize event, such as when maximizing
        or resizing from a corner */
@@ -605,6 +615,7 @@ SetupWindowData(_THIS, SDL_Window * window, NSWindow *nswindow, SDL_bool created
     data->nswindow = nswindow;
     data->created = created;
     data->videodata = videodata;
+    data->nscontexts = [[NSMutableArray alloc] init];
 
     pool = [[NSAutoreleasePool alloc] init];
 
@@ -799,7 +810,7 @@ Cocoa_SetWindowPosition(_THIS, SDL_Window * window)
     [nswindow setFrameOrigin:rect.origin];
     s_moveHack = moveHack;
 
-    [windata->nscontext scheduleUpdate];
+    ScheduleContextUpdates(windata);
 
     [pool release];
 }
@@ -816,7 +827,7 @@ Cocoa_SetWindowSize(_THIS, SDL_Window * window)
     size.height = window->h;
     [nswindow setContentSize:size];
 
-    [windata->nscontext scheduleUpdate];
+    ScheduleContextUpdates(windata);
 
     [pool release];
 }
@@ -903,7 +914,7 @@ Cocoa_MaximizeWindow(_THIS, SDL_Window * window)
 
     [nswindow zoom:nil];
 
-    [windata->nscontext scheduleUpdate];
+    ScheduleContextUpdates(windata);
 
     [pool release];
 }
@@ -1040,7 +1051,7 @@ Cocoa_SetWindowFullscreen(_THIS, SDL_Window * window, SDL_VideoDisplay * display
     [nswindow makeKeyAndOrderFront:nil];
     [data->listener resumeVisibleObservation];
 
-    [data->nscontext scheduleUpdate];
+    ScheduleContextUpdates(data);
 
     [pool release];
 }
@@ -1133,6 +1144,14 @@ Cocoa_DestroyWindow(_THIS, SDL_Window * window)
         if (data->created) {
             [data->nswindow close];
         }
+
+        NSArray *contexts = [[data->nscontexts copy] autorelease];
+        for (SDLOpenGLContext *context in contexts) {
+            /* Calling setWindow:NULL causes the context to remove itself from the context list. */            
+            [context setWindow:NULL];
+        }
+        [data->nscontexts release];
+
         SDL_free(data);
     }
     [pool release];

From 5d1bee0f17351218b24ba0ff1e7267041fc3204e Mon Sep 17 00:00:00 2001
From: =?UTF-8?q?J=C3=B8rgen=20P=2E=20Tjern=C3=B8?=
 
Date: Wed, 7 Aug 2013 16:29:28 -0700
Subject: [PATCH 507/542] Ensure that the right window is current in
 SDL_GL_SwapWindow.

---
 src/video/SDL_video.c | 6 ++++++
 1 file changed, 6 insertions(+)

diff --git a/src/video/SDL_video.c b/src/video/SDL_video.c
index a78104c54..bab6c6cb9 100644
--- a/src/video/SDL_video.c
+++ b/src/video/SDL_video.c
@@ -2854,6 +2854,12 @@ SDL_GL_SwapWindow(SDL_Window * window)
         SDL_SetError("The specified window isn't an OpenGL window");
         return;
     }
+
+    if (SDL_GL_GetCurrentWindow() != window) {
+        SDL_SetError("The specified window has not been made current");
+        return;
+    }
+
     _this->GL_SwapWindow(_this, window);
 }
 

From da3326eb95ee2101331d7a2559b25502fb75fd59 Mon Sep 17 00:00:00 2001
From: Sam Lantinga 
Date: Wed, 7 Aug 2013 16:32:51 -0700
Subject: [PATCH 508/542] The return value of SDL_MostSignificantBitIndex32(0)
 is defined as -1.

--HG--
extra : rebase_source : b9f0ed0a769617991e6eadf9d6a3efa17112d1a4
---
 include/SDL_bits.h | 19 +++++++++++++------
 1 file changed, 13 insertions(+), 6 deletions(-)

diff --git a/include/SDL_bits.h b/include/SDL_bits.h
index 942bc1744..4da2188db 100644
--- a/include/SDL_bits.h
+++ b/include/SDL_bits.h
@@ -45,15 +45,18 @@ extern "C" {
  *  with 0. This operation can also be stated as "count leading zeroes" and
  *  "log base 2".
  *
- *  \return Index of the most significant bit.
+ *  \return Index of the most significant bit, or -1 if the value is 0.
  */
-SDL_FORCE_INLINE Sint8
+SDL_FORCE_INLINE int
 SDL_MostSignificantBitIndex32(Uint32 x)
 {
 #if defined(__GNUC__) && __GNUC__ >= 4
     /* Count Leading Zeroes builtin in GCC.
      * http://gcc.gnu.org/onlinedocs/gcc-4.3.4/gcc/Other-Builtins.html
-     */
+	 */
+	if (x == 0) {
+		return -1;
+	}
     return 31 - __builtin_clz(x);
 #else
     /* Based off of Bit Twiddling Hacks by Sean Eron Anderson
@@ -61,10 +64,14 @@ SDL_MostSignificantBitIndex32(Uint32 x)
      * http://graphics.stanford.edu/~seander/bithacks.html#IntegerLog
      */
     const Uint32 b[] = {0x2, 0xC, 0xF0, 0xFF00, 0xFFFF0000};
-    const Uint8  S[] = {1, 2, 4, 8, 16};
+    const int    S[] = {1, 2, 4, 8, 16};
 
-    Uint8 msbIndex = 0;
-    int i;
+    int msbIndex = 0;
+	int i;
+
+	if (x == 0) {
+		return -1;
+	}
 
     for (i = 4; i >= 0; i--)
     {

From 88b0f422814c9ee1f7c0f66f9ad692a07d26e007 Mon Sep 17 00:00:00 2001
From: Sam Lantinga 
Date: Wed, 7 Aug 2013 17:26:28 -0700
Subject: [PATCH 509/542] Explicitly use the RTLD_LOCAL flag since that's the
 behavior we want. The default on Linux is RTLD_LOCAL, the default on Mac OS X
 is RTLD_GLOBAL.

---
 src/loadso/dlopen/SDL_sysloadso.c | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/src/loadso/dlopen/SDL_sysloadso.c b/src/loadso/dlopen/SDL_sysloadso.c
index 429727cc5..c2cbdd4c0 100644
--- a/src/loadso/dlopen/SDL_sysloadso.c
+++ b/src/loadso/dlopen/SDL_sysloadso.c
@@ -33,7 +33,7 @@
 void *
 SDL_LoadObject(const char *sofile)
 {
-    void *handle = dlopen(sofile, RTLD_NOW);
+    void *handle = dlopen(sofile, RTLD_NOW|RTLD_LOCAL);
     const char *loaderror = (char *) dlerror();
     if (handle == NULL) {
         SDL_SetError("Failed loading %s: %s", sofile, loaderror);

From 0df5870993260d277520bbbbe46d2abb7dc666c8 Mon Sep 17 00:00:00 2001
From: Sam Lantinga 
Date: Thu, 8 Aug 2013 01:59:19 -0700
Subject: [PATCH 510/542] Updated README to match new website description

---
 README.txt | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/README.txt b/README.txt
index 95f026d02..343f365e0 100644
--- a/README.txt
+++ b/README.txt
@@ -10,7 +10,7 @@ http://www.libsdl.org/
 
 Simple DirectMedia Layer is a cross-platform development library designed
 to provide low level access to audio, keyboard, mouse, joystick, and graphics
-hardware via OpenGL and DirectX. It is used by video playback software,
+hardware via OpenGL and Direct3D. It is used by video playback software,
 emulators, and popular games including Valve's award winning catalog
 and many Humble Bundle games.
 

From a2e47469fc2877ad15f24358ef969523af4fabda Mon Sep 17 00:00:00 2001
From: Sam Lantinga 
Date: Thu, 8 Aug 2013 01:59:36 -0700
Subject: [PATCH 511/542] autogen.sh on development system

---
 configure | 188 +-----------------------------------------------------
 1 file changed, 2 insertions(+), 186 deletions(-)

diff --git a/configure b/configure
index 12e47b468..38084c272 100755
--- a/configure
+++ b/configure
@@ -2259,189 +2259,6 @@ $as_echo "$ac_res" >&6; }
   eval $as_lineno_stack; ${as_lineno_stack:+:} unset as_lineno
 
 } # ac_fn_c_check_member
-
-# ac_fn_c_compute_int LINENO EXPR VAR INCLUDES
-# --------------------------------------------
-# Tries to find the compile-time value of EXPR in a program that includes
-# INCLUDES, setting VAR accordingly. Returns whether the value could be
-# computed
-ac_fn_c_compute_int ()
-{
-  as_lineno=${as_lineno-"$1"} as_lineno_stack=as_lineno_stack=$as_lineno_stack
-  if test "$cross_compiling" = yes; then
-    # Depending upon the size, compute the lo and hi bounds.
-cat confdefs.h - <<_ACEOF >conftest.$ac_ext
-/* end confdefs.h.  */
-$4
-int
-main ()
-{
-static int test_array [1 - 2 * !(($2) >= 0)];
-test_array [0] = 0;
-return test_array [0];
-
-  ;
-  return 0;
-}
-_ACEOF
-if ac_fn_c_try_compile "$LINENO"; then :
-  ac_lo=0 ac_mid=0
-  while :; do
-    cat confdefs.h - <<_ACEOF >conftest.$ac_ext
-/* end confdefs.h.  */
-$4
-int
-main ()
-{
-static int test_array [1 - 2 * !(($2) <= $ac_mid)];
-test_array [0] = 0;
-return test_array [0];
-
-  ;
-  return 0;
-}
-_ACEOF
-if ac_fn_c_try_compile "$LINENO"; then :
-  ac_hi=$ac_mid; break
-else
-  as_fn_arith $ac_mid + 1 && ac_lo=$as_val
-			if test $ac_lo -le $ac_mid; then
-			  ac_lo= ac_hi=
-			  break
-			fi
-			as_fn_arith 2 '*' $ac_mid + 1 && ac_mid=$as_val
-fi
-rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
-  done
-else
-  cat confdefs.h - <<_ACEOF >conftest.$ac_ext
-/* end confdefs.h.  */
-$4
-int
-main ()
-{
-static int test_array [1 - 2 * !(($2) < 0)];
-test_array [0] = 0;
-return test_array [0];
-
-  ;
-  return 0;
-}
-_ACEOF
-if ac_fn_c_try_compile "$LINENO"; then :
-  ac_hi=-1 ac_mid=-1
-  while :; do
-    cat confdefs.h - <<_ACEOF >conftest.$ac_ext
-/* end confdefs.h.  */
-$4
-int
-main ()
-{
-static int test_array [1 - 2 * !(($2) >= $ac_mid)];
-test_array [0] = 0;
-return test_array [0];
-
-  ;
-  return 0;
-}
-_ACEOF
-if ac_fn_c_try_compile "$LINENO"; then :
-  ac_lo=$ac_mid; break
-else
-  as_fn_arith '(' $ac_mid ')' - 1 && ac_hi=$as_val
-			if test $ac_mid -le $ac_hi; then
-			  ac_lo= ac_hi=
-			  break
-			fi
-			as_fn_arith 2 '*' $ac_mid && ac_mid=$as_val
-fi
-rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
-  done
-else
-  ac_lo= ac_hi=
-fi
-rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
-fi
-rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
-# Binary search between lo and hi bounds.
-while test "x$ac_lo" != "x$ac_hi"; do
-  as_fn_arith '(' $ac_hi - $ac_lo ')' / 2 + $ac_lo && ac_mid=$as_val
-  cat confdefs.h - <<_ACEOF >conftest.$ac_ext
-/* end confdefs.h.  */
-$4
-int
-main ()
-{
-static int test_array [1 - 2 * !(($2) <= $ac_mid)];
-test_array [0] = 0;
-return test_array [0];
-
-  ;
-  return 0;
-}
-_ACEOF
-if ac_fn_c_try_compile "$LINENO"; then :
-  ac_hi=$ac_mid
-else
-  as_fn_arith '(' $ac_mid ')' + 1 && ac_lo=$as_val
-fi
-rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
-done
-case $ac_lo in #((
-?*) eval "$3=\$ac_lo"; ac_retval=0 ;;
-'') ac_retval=1 ;;
-esac
-  else
-    cat confdefs.h - <<_ACEOF >conftest.$ac_ext
-/* end confdefs.h.  */
-$4
-static long int longval () { return $2; }
-static unsigned long int ulongval () { return $2; }
-#include 
-#include 
-int
-main ()
-{
-
-  FILE *f = fopen ("conftest.val", "w");
-  if (! f)
-    return 1;
-  if (($2) < 0)
-    {
-      long int i = longval ();
-      if (i != ($2))
-	return 1;
-      fprintf (f, "%ld", i);
-    }
-  else
-    {
-      unsigned long int i = ulongval ();
-      if (i != ($2))
-	return 1;
-      fprintf (f, "%lu", i);
-    }
-  /* Do not output a trailing newline, as this causes \r\n confusion
-     on some platforms.  */
-  return ferror (f) || fclose (f) != 0;
-
-  ;
-  return 0;
-}
-_ACEOF
-if ac_fn_c_try_run "$LINENO"; then :
-  echo >>conftest.val; read $3 config.log <<_ACEOF
 This file contains any messages produced by compilers while
 running configure, to aid debugging if configure makes a mistake.
@@ -21608,9 +21425,8 @@ int
 main ()
 {
 
-         #if defined(MAC_OS_X_VERSION_MIN_REQUIRED) && MAC_OS_X_VERSION_MIN_REQUIRED <= 1020
-         #error Use dlcompat for Mac OS X 10.2 compatibility
-         #endif
+         void *handle = dlopen("", RTLD_NOW);
+         const char *loaderror = (char *) dlerror();
 
   ;
   return 0;

From 780f3a273dd9ac9dcbc46f25111eba69e7f01f2a Mon Sep 17 00:00:00 2001
From: Sam Lantinga 
Date: Thu, 8 Aug 2013 02:30:32 -0700
Subject: [PATCH 512/542] Fixed bug 2009 - Creating texture from 32-bit surface
 with colorkey and per-surface alpha ignores the colorkey

To fix this we need to ignore the alpha channel in the colorkey comparison, which is the way colorkey comparisons are defined in SDL.

We also need to reset the alpha and color modulation when converting a surface.
---
 src/video/SDL_surface.c | 30 +++++++++++++++++++++++++-----
 1 file changed, 25 insertions(+), 5 deletions(-)

diff --git a/src/video/SDL_surface.c b/src/video/SDL_surface.c
index ea7168865..1d98244bb 100644
--- a/src/video/SDL_surface.c
+++ b/src/video/SDL_surface.c
@@ -255,11 +255,13 @@ SDL_ConvertColorkeyToAlpha(SDL_Surface * surface)
             Uint16 ckey = (Uint16) surface->map->info.colorkey;
             Uint16 mask = (Uint16) (~surface->format->Amask);
 
+            /* Ignore alpha in colorkey comparison */
+            ckey &= mask;
             row = (Uint16 *) surface->pixels;
             for (y = surface->h; y--;) {
                 spot = row;
                 for (x = surface->w; x--;) {
-                    if (*spot == ckey) {
+                    if ((*spot & mask) == ckey) {
                         *spot &= mask;
                     }
                     ++spot;
@@ -277,10 +279,13 @@ SDL_ConvertColorkeyToAlpha(SDL_Surface * surface)
             Uint32 ckey = surface->map->info.colorkey;
             Uint32 mask = ~surface->format->Amask;
 
+            /* Ignore alpha in colorkey comparison */
+            ckey &= mask;
             row = (Uint32 *) surface->pixels;
             for (y = surface->h; y--;) {
                 spot = row;
                 for (x = surface->w; x--;) {
+                    if ((*spot & mask) == ckey) {
                     if (*spot == ckey) {
                         *spot &= mask;
                     }
@@ -802,6 +807,7 @@ SDL_ConvertSurface(SDL_Surface * surface, SDL_PixelFormat * format,
 {
     SDL_Surface *convert;
     Uint32 copy_flags;
+    SDL_Color copy_color;
     SDL_Rect bounds;
 
     /* Check for empty destination palette! (results in empty image) */
@@ -838,7 +844,16 @@ SDL_ConvertSurface(SDL_Surface * surface, SDL_PixelFormat * format,
 
     /* Save the original copy flags */
     copy_flags = surface->map->info.flags;
+    copy_color.r = surface->map->info.r;
+    copy_color.g = surface->map->info.g;
+    copy_color.b = surface->map->info.b;
+    copy_color.a = surface->map->info.a;
+    surface->map->info.r = 0xFF;
+    surface->map->info.g = 0xFF;
+    surface->map->info.b = 0xFF;
+    surface->map->info.a = 0xFF;
     surface->map->info.flags = 0;
+    SDL_InvalidateMap(surface->map);
 
     /* Copy over the image data */
     bounds.x = 0;
@@ -848,16 +863,21 @@ SDL_ConvertSurface(SDL_Surface * surface, SDL_PixelFormat * format,
     SDL_LowerBlit(surface, &bounds, convert, &bounds);
 
     /* Clean up the original surface, and update converted surface */
-    convert->map->info.r = surface->map->info.r;
-    convert->map->info.g = surface->map->info.g;
-    convert->map->info.b = surface->map->info.b;
-    convert->map->info.a = surface->map->info.a;
+    convert->map->info.r = copy_color.r;
+    convert->map->info.g = copy_color.g;
+    convert->map->info.b = copy_color.b;
+    convert->map->info.a = copy_color.a;
     convert->map->info.flags =
         (copy_flags &
          ~(SDL_COPY_COLORKEY | SDL_COPY_BLEND
            | SDL_COPY_RLE_DESIRED | SDL_COPY_RLE_COLORKEY |
            SDL_COPY_RLE_ALPHAKEY));
+    surface->map->info.r = copy_color.r;
+    surface->map->info.g = copy_color.g;
+    surface->map->info.b = copy_color.b;
+    surface->map->info.a = copy_color.a;
     surface->map->info.flags = copy_flags;
+    SDL_InvalidateMap(surface->map);
     if (copy_flags & SDL_COPY_COLORKEY) {
         SDL_bool set_colorkey_by_color = SDL_FALSE;
 

From 5a167e03cd28afa5a76223b16cafbdf245e2260e Mon Sep 17 00:00:00 2001
From: Sam Lantinga 
Date: Thu, 8 Aug 2013 02:34:21 -0700
Subject: [PATCH 513/542] Fixed compile error

---
 src/video/SDL_surface.c | 1 -
 1 file changed, 1 deletion(-)

diff --git a/src/video/SDL_surface.c b/src/video/SDL_surface.c
index 1d98244bb..460d53bc3 100644
--- a/src/video/SDL_surface.c
+++ b/src/video/SDL_surface.c
@@ -286,7 +286,6 @@ SDL_ConvertColorkeyToAlpha(SDL_Surface * surface)
                 spot = row;
                 for (x = surface->w; x--;) {
                     if ((*spot & mask) == ckey) {
-                    if (*spot == ckey) {
                         *spot &= mask;
                     }
                     ++spot;

From 29c4f05ed5f428b13a6acfff0c9252fa122ad50a Mon Sep 17 00:00:00 2001
From: Gabriel Jacobo 
Date: Thu, 8 Aug 2013 09:47:42 -0300
Subject: [PATCH 514/542] Add some protection against double init of the
 Android audio backend

---
 .../src/org/libsdl/app/SDLActivity.java       | 48 ++++++++++---------
 1 file changed, 26 insertions(+), 22 deletions(-)

diff --git a/android-project/src/org/libsdl/app/SDLActivity.java b/android-project/src/org/libsdl/app/SDLActivity.java
index 7d70240da..b740d3f46 100644
--- a/android-project/src/org/libsdl/app/SDLActivity.java
+++ b/android-project/src/org/libsdl/app/SDLActivity.java
@@ -490,17 +490,19 @@ public class SDLActivity extends Activity {
         // latency already
         desiredFrames = Math.max(desiredFrames, (AudioTrack.getMinBufferSize(sampleRate, channelConfig, audioFormat) + frameSize - 1) / frameSize);
         
-        mAudioTrack = new AudioTrack(AudioManager.STREAM_MUSIC, sampleRate,
-                channelConfig, audioFormat, desiredFrames * frameSize, AudioTrack.MODE_STREAM);
-        
-        // Instantiating AudioTrack can "succeed" without an exception and the track may still be invalid
-        // Ref: https://android.googlesource.com/platform/frameworks/base/+/refs/heads/master/media/java/android/media/AudioTrack.java
-        // Ref: http://developer.android.com/reference/android/media/AudioTrack.html#getState()
-        
-        if (mAudioTrack.getState() != AudioTrack.STATE_INITIALIZED) {
-            Log.e("SDL", "Failed during initialization of Audio Track");
-            mAudioTrack = null;
-            return -1;
+        if (mAudioTrack == null) {
+            mAudioTrack = new AudioTrack(AudioManager.STREAM_MUSIC, sampleRate,
+                    channelConfig, audioFormat, desiredFrames * frameSize, AudioTrack.MODE_STREAM);
+            
+            // Instantiating AudioTrack can "succeed" without an exception and the track may still be invalid
+            // Ref: https://android.googlesource.com/platform/frameworks/base/+/refs/heads/master/media/java/android/media/AudioTrack.java
+            // Ref: http://developer.android.com/reference/android/media/AudioTrack.html#getState()
+            
+            if (mAudioTrack.getState() != AudioTrack.STATE_INITIALIZED) {
+                Log.e("SDL", "Failed during initialization of Audio Track");
+                mAudioTrack = null;
+                return -1;
+            }
         }
         
         audioStartThread();
@@ -511,17 +513,19 @@ public class SDLActivity extends Activity {
     }
     
     public static void audioStartThread() {
-        mAudioThread = new Thread(new Runnable() {
-            @Override
-            public void run() {
-                mAudioTrack.play();
-                nativeRunAudioThread();
-            }
-        });
-        
-        // I'd take REALTIME if I could get it!
-        mAudioThread.setPriority(Thread.MAX_PRIORITY);
-        mAudioThread.start();
+        if (mAudioThread == null) {
+            mAudioThread = new Thread(new Runnable() {
+                @Override
+                public void run() {
+                    mAudioTrack.play();
+                    nativeRunAudioThread();
+                }
+            });
+            
+            // I'd take REALTIME if I could get it!
+            mAudioThread.setPriority(Thread.MAX_PRIORITY);
+            mAudioThread.start();
+        }
     }
     
     public static void audioWriteShortBuffer(short[] buffer) {

From 396c5b8e79bed327f8f4a6c0e44289108586c862 Mon Sep 17 00:00:00 2001
From: Edward Rudd 
Date: Thu, 8 Aug 2013 11:41:35 -0400
Subject: [PATCH 515/542] use @rpath for OS X Shared Library as well

---
 Xcode/SDL/SDL.xcodeproj/project.pbxproj       |  4 +-
 .../SDLTest/SDLTest.xcodeproj/project.pbxproj | 54 +++++++------------
 2 files changed, 22 insertions(+), 36 deletions(-)

diff --git a/Xcode/SDL/SDL.xcodeproj/project.pbxproj b/Xcode/SDL/SDL.xcodeproj/project.pbxproj
index fd91642c7..3757efde0 100755
--- a/Xcode/SDL/SDL.xcodeproj/project.pbxproj
+++ b/Xcode/SDL/SDL.xcodeproj/project.pbxproj
@@ -2798,7 +2798,7 @@
 				);
 				GCC_SYMBOLS_PRIVATE_EXTERN = YES;
 				HEADER_SEARCH_PATHS = /usr/X11R6/include;
-				INSTALL_PATH = "@loader_path";
+				INSTALL_PATH = "@rpath";
 				PRODUCT_NAME = SDL2;
 				SKIP_INSTALL = YES;
 			};
@@ -2817,7 +2817,7 @@
 				);
 				GCC_SYMBOLS_PRIVATE_EXTERN = YES;
 				HEADER_SEARCH_PATHS = /usr/X11R6/include;
-				INSTALL_PATH = "@loader_path";
+				INSTALL_PATH = "@rpath";
 				PRODUCT_NAME = SDL2;
 				SKIP_INSTALL = YES;
 			};
diff --git a/Xcode/SDLTest/SDLTest.xcodeproj/project.pbxproj b/Xcode/SDLTest/SDLTest.xcodeproj/project.pbxproj
index 78e73b472..bb4714de2 100755
--- a/Xcode/SDLTest/SDLTest.xcodeproj/project.pbxproj
+++ b/Xcode/SDLTest/SDLTest.xcodeproj/project.pbxproj
@@ -780,20 +780,6 @@
 			remoteGlobalIDString = BECDF6BE0761BA81005FE872;
 			remoteInfo = "Standard DMG";
 		};
-		003FA64A093FFD41000C53B3 /* PBXContainerItemProxy */ = {
-			isa = PBXContainerItemProxy;
-			containerPortal = 003FA63A093FFD41000C53B3 /* SDL.xcodeproj */;
-			proxyType = 2;
-			remoteGlobalIDString = BECDF6C30761BA81005FE872;
-			remoteInfo = "Devel Extras Package";
-		};
-		4537747F120914AE002F0F45 /* PBXContainerItemProxy */ = {
-			isa = PBXContainerItemProxy;
-			containerPortal = 003FA63A093FFD41000C53B3 /* SDL.xcodeproj */;
-			proxyType = 2;
-			remoteGlobalIDString = 00D8D9EF1195090700638393;
-			remoteInfo = testsdl;
-		};
 		DB166D6D16A1CEAA00A1396C /* PBXContainerItemProxy */ = {
 			isa = PBXContainerItemProxy;
 			containerPortal = 08FB7793FE84155DC02AAC07 /* Project object */;
@@ -878,6 +864,13 @@
 			remoteGlobalIDString = DB166E8016A1D78C00A1396C;
 			remoteInfo = teststreaming;
 		};
+		DB1D40D617B3F30D00D74CFC /* PBXContainerItemProxy */ = {
+			isa = PBXContainerItemProxy;
+			containerPortal = 003FA63A093FFD41000C53B3 /* SDL.xcodeproj */;
+			proxyType = 2;
+			remoteGlobalIDString = DB31407717554B71006C0E22;
+			remoteInfo = "Shared Library";
+		};
 /* End PBXContainerItemProxy section */
 
 /* Begin PBXCopyFilesBuildPhase section */
@@ -991,13 +984,13 @@
 		0017958F1074216E00F5D044 /* testatomic.c */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.c; name = testatomic.c; path = ../../test/testatomic.c; sourceTree = SOURCE_ROOT; };
 		001795AD107421BF00F5D044 /* testaudioinfo */ = {isa = PBXFileReference; includeInIndex = 0; lastKnownFileType = text; path = testaudioinfo; sourceTree = BUILT_PRODUCTS_DIR; };
 		001795B01074222D00F5D044 /* testaudioinfo.c */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.c; name = testaudioinfo.c; path = ../../test/testaudioinfo.c; sourceTree = SOURCE_ROOT; };
-		0017972110742F3200F5D044 /* testgl2 */ = {isa = PBXFileReference; includeInIndex = 0; lastKnownFileType = text; path = testgl2; sourceTree = BUILT_PRODUCTS_DIR; };
+		0017972110742F3200F5D044 /* testgl2 */ = {isa = PBXFileReference; includeInIndex = 0; lastKnownFileType = "compiled.mach-o.executable"; path = testgl2; sourceTree = BUILT_PRODUCTS_DIR; };
 		0017972710742FB900F5D044 /* testgl2.c */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.c; name = testgl2.c; path = ../../test/testgl2.c; sourceTree = SOURCE_ROOT; };
-		00179748107430D600F5D044 /* testhaptic */ = {isa = PBXFileReference; includeInIndex = 0; lastKnownFileType = text; path = testhaptic; sourceTree = BUILT_PRODUCTS_DIR; };
+		00179748107430D600F5D044 /* testhaptic */ = {isa = PBXFileReference; includeInIndex = 0; lastKnownFileType = "compiled.mach-o.executable"; path = testhaptic; sourceTree = BUILT_PRODUCTS_DIR; };
 		0017974E1074315700F5D044 /* testhaptic.c */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.c; name = testhaptic.c; path = ../../test/testhaptic.c; sourceTree = SOURCE_ROOT; };
 		0017976E107431B300F5D044 /* testdraw2 */ = {isa = PBXFileReference; includeInIndex = 0; lastKnownFileType = text; path = testdraw2; sourceTree = BUILT_PRODUCTS_DIR; };
 		001797711074320D00F5D044 /* testdraw2.c */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.c; name = testdraw2.c; path = ../../test/testdraw2.c; sourceTree = SOURCE_ROOT; };
-		0017978E107432AE00F5D044 /* testime */ = {isa = PBXFileReference; includeInIndex = 0; lastKnownFileType = text; path = testime; sourceTree = BUILT_PRODUCTS_DIR; };
+		0017978E107432AE00F5D044 /* testime */ = {isa = PBXFileReference; includeInIndex = 0; lastKnownFileType = "compiled.mach-o.executable"; path = testime; sourceTree = BUILT_PRODUCTS_DIR; };
 		00179791107432FA00F5D044 /* testime.c */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.c; name = testime.c; path = ../../test/testime.c; sourceTree = SOURCE_ROOT; };
 		001797AE1074334C00F5D044 /* testintersections */ = {isa = PBXFileReference; includeInIndex = 0; lastKnownFileType = text; path = testintersections; sourceTree = BUILT_PRODUCTS_DIR; };
 		001797B31074339C00F5D044 /* testintersections.c */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.c; name = testintersections.c; path = ../../test/testintersections.c; sourceTree = SOURCE_ROOT; };
@@ -1056,13 +1049,13 @@
 		4537749212091504002F0F45 /* testshape */ = {isa = PBXFileReference; explicitFileType = "compiled.mach-o.executable"; includeInIndex = 0; path = testshape; sourceTree = BUILT_PRODUCTS_DIR; };
 		453774A4120915E3002F0F45 /* testshape.c */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.c; name = testshape.c; path = ../../test/testshape.c; sourceTree = SOURCE_ROOT; };
 		BBFC088E164C6820003E6A99 /* testgamecontroller.c */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.c; name = testgamecontroller.c; path = ../../test/testgamecontroller.c; sourceTree = ""; };
-		BBFC08CD164C6862003E6A99 /* testgamecontroller */ = {isa = PBXFileReference; includeInIndex = 0; lastKnownFileType = text; path = testgamecontroller; sourceTree = BUILT_PRODUCTS_DIR; };
-		BEC566B60761D90300A33029 /* checkkeys */ = {isa = PBXFileReference; includeInIndex = 0; lastKnownFileType = text; path = checkkeys; sourceTree = BUILT_PRODUCTS_DIR; };
+		BBFC08CD164C6862003E6A99 /* testgamecontroller */ = {isa = PBXFileReference; includeInIndex = 0; lastKnownFileType = "compiled.mach-o.executable"; path = testgamecontroller; sourceTree = BUILT_PRODUCTS_DIR; };
+		BEC566B60761D90300A33029 /* checkkeys */ = {isa = PBXFileReference; includeInIndex = 0; lastKnownFileType = "compiled.mach-o.executable"; path = checkkeys; sourceTree = BUILT_PRODUCTS_DIR; };
 		BEC566D10761D90300A33029 /* loopwave */ = {isa = PBXFileReference; includeInIndex = 0; lastKnownFileType = text; path = loopwave; sourceTree = BUILT_PRODUCTS_DIR; };
 		BEC567060761D90400A33029 /* testerror */ = {isa = PBXFileReference; includeInIndex = 0; lastKnownFileType = text; path = testerror; sourceTree = BUILT_PRODUCTS_DIR; };
 		BEC5672E0761D90400A33029 /* testthread */ = {isa = PBXFileReference; includeInIndex = 0; lastKnownFileType = text; path = testthread; sourceTree = BUILT_PRODUCTS_DIR; };
-		BEC5673B0761D90400A33029 /* testjoystick */ = {isa = PBXFileReference; includeInIndex = 0; lastKnownFileType = text; path = testjoystick; sourceTree = BUILT_PRODUCTS_DIR; };
-		BEC567480761D90400A33029 /* testkeys */ = {isa = PBXFileReference; includeInIndex = 0; lastKnownFileType = text; path = testkeys; sourceTree = BUILT_PRODUCTS_DIR; };
+		BEC5673B0761D90400A33029 /* testjoystick */ = {isa = PBXFileReference; includeInIndex = 0; lastKnownFileType = "compiled.mach-o.executable"; path = testjoystick; sourceTree = BUILT_PRODUCTS_DIR; };
+		BEC567480761D90400A33029 /* testkeys */ = {isa = PBXFileReference; includeInIndex = 0; lastKnownFileType = "compiled.mach-o.executable"; path = testkeys; sourceTree = BUILT_PRODUCTS_DIR; };
 		BEC567550761D90400A33029 /* testlock */ = {isa = PBXFileReference; includeInIndex = 0; lastKnownFileType = text; path = testlock; sourceTree = BUILT_PRODUCTS_DIR; };
 		BEC5677D0761D90500A33029 /* testsem */ = {isa = PBXFileReference; includeInIndex = 0; lastKnownFileType = text; path = testsem; sourceTree = BUILT_PRODUCTS_DIR; };
 		BEC567980761D90500A33029 /* testtimer */ = {isa = PBXFileReference; includeInIndex = 0; lastKnownFileType = text; path = testtimer; sourceTree = BUILT_PRODUCTS_DIR; };
@@ -1848,9 +1841,8 @@
 			children = (
 				003FA643093FFD41000C53B3 /* SDL2.framework */,
 				003FA645093FFD41000C53B3 /* libSDL2.a */,
+				DB1D40D717B3F30D00D74CFC /* libSDL2.dylib */,
 				003FA649093FFD41000C53B3 /* Standard DMG */,
-				003FA64B093FFD41000C53B3 /* Developer Extras Package */,
-				45377480120914AE002F0F45 /* testsdl.app */,
 			);
 			name = Products;
 			sourceTree = "";
@@ -2800,18 +2792,11 @@
 			remoteRef = 003FA648093FFD41000C53B3 /* PBXContainerItemProxy */;
 			sourceTree = BUILT_PRODUCTS_DIR;
 		};
-		003FA64B093FFD41000C53B3 /* Developer Extras Package */ = {
+		DB1D40D717B3F30D00D74CFC /* libSDL2.dylib */ = {
 			isa = PBXReferenceProxy;
-			fileType = "compiled.mach-o.executable";
-			path = "Developer Extras Package";
-			remoteRef = 003FA64A093FFD41000C53B3 /* PBXContainerItemProxy */;
-			sourceTree = BUILT_PRODUCTS_DIR;
-		};
-		45377480120914AE002F0F45 /* testsdl.app */ = {
-			isa = PBXReferenceProxy;
-			fileType = wrapper.application;
-			path = testsdl.app;
-			remoteRef = 4537747F120914AE002F0F45 /* PBXContainerItemProxy */;
+			fileType = "compiled.mach-o.dylib";
+			path = libSDL2.dylib;
+			remoteRef = DB1D40D617B3F30D00D74CFC /* PBXContainerItemProxy */;
 			sourceTree = BUILT_PRODUCTS_DIR;
 		};
 /* End PBXReferenceProxy section */
@@ -4323,6 +4308,7 @@
 				DB166D8216A1D12400A1396C /* Release */,
 			);
 			defaultConfigurationIsVisible = 0;
+			defaultConfigurationName = Debug;
 		};
 		DB166DBC16A1D2F600A1396C /* Build configuration list for PBXNativeTarget "testgesture" */ = {
 			isa = XCConfigurationList;

From b47f785f57b242a714144903c2cbeee4c36b6558 Mon Sep 17 00:00:00 2001
From: Sam Lantinga 
Date: Thu, 8 Aug 2013 12:20:22 -0700
Subject: [PATCH 516/542] Fixed whitespace

---
 include/SDL_bits.h | 16 ++++++++--------
 1 file changed, 8 insertions(+), 8 deletions(-)

diff --git a/include/SDL_bits.h b/include/SDL_bits.h
index 4da2188db..b1ed20bf7 100644
--- a/include/SDL_bits.h
+++ b/include/SDL_bits.h
@@ -53,10 +53,10 @@ SDL_MostSignificantBitIndex32(Uint32 x)
 #if defined(__GNUC__) && __GNUC__ >= 4
     /* Count Leading Zeroes builtin in GCC.
      * http://gcc.gnu.org/onlinedocs/gcc-4.3.4/gcc/Other-Builtins.html
-	 */
-	if (x == 0) {
-		return -1;
-	}
+     */
+    if (x == 0) {
+        return -1;
+    }
     return 31 - __builtin_clz(x);
 #else
     /* Based off of Bit Twiddling Hacks by Sean Eron Anderson
@@ -67,11 +67,11 @@ SDL_MostSignificantBitIndex32(Uint32 x)
     const int    S[] = {1, 2, 4, 8, 16};
 
     int msbIndex = 0;
-	int i;
+    int i;
 
-	if (x == 0) {
-		return -1;
-	}
+    if (x == 0) {
+        return -1;
+    }
 
     for (i = 4; i >= 0; i--)
     {

From 9f90ffbc9fea70ddb7440e1a301d320146f79c60 Mon Sep 17 00:00:00 2001
From: Sam Lantinga 
Date: Thu, 8 Aug 2013 12:21:26 -0700
Subject: [PATCH 517/542] Fixed crash if SDL_GetThreadName() is passed a NULL
 thread.

---
 src/thread/SDL_thread.c | 22 +++++++++++++++++-----
 1 file changed, 17 insertions(+), 5 deletions(-)

diff --git a/src/thread/SDL_thread.c b/src/thread/SDL_thread.c
index 7dc182865..5eaed0c0c 100644
--- a/src/thread/SDL_thread.c
+++ b/src/thread/SDL_thread.c
@@ -319,7 +319,9 @@ SDL_CreateThread(int (SDLCALL * fn) (void *),
     args = (thread_args *) SDL_malloc(sizeof(*args));
     if (args == NULL) {
         SDL_OutOfMemory();
-        SDL_free(thread->name);
+        if (thread->name) {
+            SDL_free(thread->name);
+        }
         SDL_free(thread);
         return (NULL);
     }
@@ -328,7 +330,9 @@ SDL_CreateThread(int (SDLCALL * fn) (void *),
     args->info = thread;
     args->wait = SDL_CreateSemaphore(0);
     if (args->wait == NULL) {
-        SDL_free(thread->name);
+        if (thread->name) {
+            SDL_free(thread->name);
+        }
         SDL_free(thread);
         SDL_free(args);
         return (NULL);
@@ -345,7 +349,9 @@ SDL_CreateThread(int (SDLCALL * fn) (void *),
         SDL_SemWait(args->wait);
     } else {
         /* Oops, failed.  Gotta free everything */
-        SDL_free(thread->name);
+        if (thread->name) {
+            SDL_free(thread->name);
+        }
         SDL_free(thread);
         thread = NULL;
     }
@@ -372,7 +378,11 @@ SDL_GetThreadID(SDL_Thread * thread)
 const char *
 SDL_GetThreadName(SDL_Thread * thread)
 {
-    return thread->name;
+    if (thread) {
+        return thread->name;
+    } else {
+        return NULL;
+    }
 }
 
 int
@@ -389,7 +399,9 @@ SDL_WaitThread(SDL_Thread * thread, int *status)
         if (status) {
             *status = thread->status;
         }
-        SDL_free(thread->name);
+        if (thread->name) {
+            SDL_free(thread->name);
+        }
         SDL_free(thread);
     }
 }

From cf76f366602253f76afe47d24fa8b4f027467a51 Mon Sep 17 00:00:00 2001
From: =?UTF-8?q?J=C3=B8rgen=20P=2E=20Tjern=C3=B8?=
 
Date: Thu, 8 Aug 2013 12:48:37 -0700
Subject: [PATCH 518/542] Mac: Don't enable SDL_MAC_NO_SANDBOX by default.

To get this functionality, you need to use -DSDL_MAC_NO_SANDBOX=1 in
your CFLAGS.
---
 src/video/cocoa/SDL_cocoamousetap.m | 2 --
 1 file changed, 2 deletions(-)

diff --git a/src/video/cocoa/SDL_cocoamousetap.m b/src/video/cocoa/SDL_cocoamousetap.m
index 01769b321..7f2d6e4c8 100644
--- a/src/video/cocoa/SDL_cocoamousetap.m
+++ b/src/video/cocoa/SDL_cocoamousetap.m
@@ -22,8 +22,6 @@
 
 #if SDL_VIDEO_DRIVER_COCOA
 
-#define SDL_MAC_NO_SANDBOX 1
-
 #include "SDL_cocoamousetap.h"
 
 /* Event taps are forbidden in the Mac App Store, so we can only enable this

From f3280d289ae056e072714e598711031c60b3c5ac Mon Sep 17 00:00:00 2001
From: "Ryan C. Gordon" 
Date: Thu, 8 Aug 2013 12:49:29 -0700
Subject: [PATCH 519/542] Send the SDL_QUIT when last window is destroyed, not
 during its close event.

--HG--
extra : rebase_source : 1a30ff486e98282c7d6a05d64eea0c4f3e026c41
---
 src/events/SDL_windowevents.c | 7 -------
 src/video/SDL_video.c         | 5 +++++
 2 files changed, 5 insertions(+), 7 deletions(-)

diff --git a/src/events/SDL_windowevents.c b/src/events/SDL_windowevents.c
index 9011f68e1..b80afdc87 100644
--- a/src/events/SDL_windowevents.c
+++ b/src/events/SDL_windowevents.c
@@ -197,13 +197,6 @@ SDL_SendWindowEvent(SDL_Window * window, Uint8 windowevent, int data1,
         posted = (SDL_PushEvent(&event) > 0);
     }
 
-    if (windowevent == SDL_WINDOWEVENT_CLOSE) {
-        if ( !window->prev && !window->next ) {
-            /* This is the last window in the list so send the SDL_QUIT event */
-            SDL_SendQuit();
-        }
-    }
-
     return (posted);
 }
 
diff --git a/src/video/SDL_video.c b/src/video/SDL_video.c
index bab6c6cb9..8acf3c6c5 100644
--- a/src/video/SDL_video.c
+++ b/src/video/SDL_video.c
@@ -2210,6 +2210,11 @@ SDL_DestroyWindow(SDL_Window * window)
     }
 
     SDL_free(window);
+
+    if (_this->windows == NULL) {
+        /* This is the last window in the list so send the SDL_QUIT event */
+        SDL_SendQuit();
+    }
 }
 
 SDL_bool

From f43141b2898fc3e466f8857860bd042de90ecd72 Mon Sep 17 00:00:00 2001
From: "Ryan C. Gordon" 
Date: Thu, 8 Aug 2013 13:22:21 -0700
Subject: [PATCH 520/542] Backed out changeset 3f487d7d2d1d

This breaks applications.
---
 src/events/SDL_windowevents.c | 7 +++++++
 src/video/SDL_video.c         | 5 -----
 2 files changed, 7 insertions(+), 5 deletions(-)

diff --git a/src/events/SDL_windowevents.c b/src/events/SDL_windowevents.c
index b80afdc87..9011f68e1 100644
--- a/src/events/SDL_windowevents.c
+++ b/src/events/SDL_windowevents.c
@@ -197,6 +197,13 @@ SDL_SendWindowEvent(SDL_Window * window, Uint8 windowevent, int data1,
         posted = (SDL_PushEvent(&event) > 0);
     }
 
+    if (windowevent == SDL_WINDOWEVENT_CLOSE) {
+        if ( !window->prev && !window->next ) {
+            /* This is the last window in the list so send the SDL_QUIT event */
+            SDL_SendQuit();
+        }
+    }
+
     return (posted);
 }
 
diff --git a/src/video/SDL_video.c b/src/video/SDL_video.c
index 8acf3c6c5..bab6c6cb9 100644
--- a/src/video/SDL_video.c
+++ b/src/video/SDL_video.c
@@ -2210,11 +2210,6 @@ SDL_DestroyWindow(SDL_Window * window)
     }
 
     SDL_free(window);
-
-    if (_this->windows == NULL) {
-        /* This is the last window in the list so send the SDL_QUIT event */
-        SDL_SendQuit();
-    }
 }
 
 SDL_bool

From 4f1c2fd2c3a4600914ea6f0da2610d05066d9691 Mon Sep 17 00:00:00 2001
From: =?UTF-8?q?J=C3=B8rgen=20P=2E=20Tjern=C3=B8?=
 
Date: Thu, 8 Aug 2013 13:29:44 -0700
Subject: [PATCH 521/542] Mac: Fix mouse tap on 10.5.

There's no Block support in the runtime on 10.5, so the old code
wouldn't work.
---
 src/video/cocoa/SDL_cocoamousetap.m | 15 +++++++++++----
 1 file changed, 11 insertions(+), 4 deletions(-)

diff --git a/src/video/cocoa/SDL_cocoamousetap.m b/src/video/cocoa/SDL_cocoamousetap.m
index 7f2d6e4c8..5879d49bf 100644
--- a/src/video/cocoa/SDL_cocoamousetap.m
+++ b/src/video/cocoa/SDL_cocoamousetap.m
@@ -131,6 +131,12 @@ Cocoa_MouseTapCallback(CGEventTapProxy proxy, CGEventType type, CGEventRef event
     return event;
 }
 
+static void
+SemaphorePostCallback(CFRunLoopTimerRef timer, void *info)
+{
+    SDL_SemPost((SDL_sem*)info);
+}
+
 static int
 Cocoa_MouseTapThread(void *data)
 {
@@ -163,10 +169,11 @@ Cocoa_MouseTapThread(void *data)
 
     tapdata->runloop = CFRunLoopGetCurrent();
     CFRunLoopAddSource(tapdata->runloop, tapdata->runloopSource, kCFRunLoopCommonModes);
-    CFRunLoopPerformBlock(tapdata->runloop, kCFRunLoopCommonModes, ^{
-        /* We signal this *after* the run loop has started, indicating it's safe to CFRunLoopStop it. */
-        SDL_SemPost(tapdata->runloopStartedSemaphore);
-    });
+    CFRunLoopTimerContext context = {.info = tapdata->runloopStartedSemaphore};
+    /* We signal the runloop started semaphore *after* the run loop has started, indicating it's safe to CFRunLoopStop it. */
+    CFRunLoopTimerRef timer = CFRunLoopTimerCreate(kCFAllocatorDefault, CFAbsoluteTimeGetCurrent(), 0, 0, 0, &SemaphorePostCallback, &context);
+    CFRunLoopAddTimer(tapdata->runloop, timer, kCFRunLoopCommonModes);
+    CFRelease(timer);
 
     /* Run the event loop to handle events in the event tap. */
     CFRunLoopRun();

From 98a222e9747714be085b4f568614264743ec748f Mon Sep 17 00:00:00 2001
From: "Ryan C. Gordon" 
Date: Thu, 8 Aug 2013 15:04:30 -0700
Subject: [PATCH 522/542] SDL_RegisterEvents() now rejects requests for
 numevents <= 0.

--HG--
extra : rebase_source : b45e0465ab759f92595b8cb0cbcad22d429f27f7
---
 src/events/SDL_events.c | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/src/events/SDL_events.c b/src/events/SDL_events.c
index 9a067c232..06cb0f2e7 100644
--- a/src/events/SDL_events.c
+++ b/src/events/SDL_events.c
@@ -599,7 +599,7 @@ SDL_RegisterEvents(int numevents)
 {
     Uint32 event_base;
 
-    if (SDL_userevents+numevents <= SDL_LASTEVENT) {
+    if ((numevents > 0) && (SDL_userevents+numevents <= SDL_LASTEVENT)) {
         event_base = SDL_userevents;
         SDL_userevents += numevents;
     } else {

From 610264fb0b094e400c7944f9d63cc14033e39ed8 Mon Sep 17 00:00:00 2001
From: Gabriel Jacobo 
Date: Thu, 8 Aug 2013 21:25:09 -0300
Subject: [PATCH 523/542] Start Android Audio Thread after audio buffer and
 AudioTrack are ready.

Also, it starts the Audio Thread from the native side, putting the code in line
with other backends.
---
 .../src/org/libsdl/app/SDLActivity.java       | 36 +++----------------
 src/audio/android/SDL_androidaudio.c          | 21 ++++++-----
 src/audio/android/SDL_androidaudio.h          |  2 ++
 src/core/android/SDL_android.c                | 13 +------
 4 files changed, 20 insertions(+), 52 deletions(-)

diff --git a/android-project/src/org/libsdl/app/SDLActivity.java b/android-project/src/org/libsdl/app/SDLActivity.java
index b740d3f46..ed6f4ef32 100644
--- a/android-project/src/org/libsdl/app/SDLActivity.java
+++ b/android-project/src/org/libsdl/app/SDLActivity.java
@@ -252,8 +252,6 @@ public class SDLActivity extends Activity {
                                             int action, float x, 
                                             float y, float p);
     public static native void onNativeAccel(float x, float y, float z);
-    public static native void nativeRunAudioThread();
-
 
     // Java functions called from C
 
@@ -503,31 +501,15 @@ public class SDLActivity extends Activity {
                 mAudioTrack = null;
                 return -1;
             }
+            
+            mAudioTrack.play();
         }
-        
-        audioStartThread();
-        
+       
         Log.v("SDL", "SDL audio: got " + ((mAudioTrack.getChannelCount() >= 2) ? "stereo" : "mono") + " " + ((mAudioTrack.getAudioFormat() == AudioFormat.ENCODING_PCM_16BIT) ? "16-bit" : "8-bit") + " " + (mAudioTrack.getSampleRate() / 1000f) + "kHz, " + desiredFrames + " frames buffer");
         
         return 0;
     }
     
-    public static void audioStartThread() {
-        if (mAudioThread == null) {
-            mAudioThread = new Thread(new Runnable() {
-                @Override
-                public void run() {
-                    mAudioTrack.play();
-                    nativeRunAudioThread();
-                }
-            });
-            
-            // I'd take REALTIME if I could get it!
-            mAudioThread.setPriority(Thread.MAX_PRIORITY);
-            mAudioThread.start();
-        }
-    }
-    
     public static void audioWriteShortBuffer(short[] buffer) {
         for (int i = 0; i < buffer.length; ) {
             int result = mAudioTrack.write(buffer, i, buffer.length - i);
@@ -565,17 +547,6 @@ public class SDLActivity extends Activity {
     }
 
     public static void audioQuit() {
-        if (mAudioThread != null) {
-            try {
-                mAudioThread.join();
-            } catch(Exception e) {
-                Log.v("SDL", "Problem stopping audio thread: " + e);
-            }
-            mAudioThread = null;
-
-            //Log.v("SDL", "Finished waiting for audio thread");
-        }
-
         if (mAudioTrack != null) {
             mAudioTrack.stop();
             mAudioTrack = null;
@@ -932,3 +903,4 @@ class SDLInputConnection extends BaseInputConnection {
     public native void nativeSetComposingText(String text, int newCursorPosition);
 
 }
+
diff --git a/src/audio/android/SDL_androidaudio.c b/src/audio/android/SDL_androidaudio.c
index 45c128282..ea8301bdf 100644
--- a/src/audio/android/SDL_androidaudio.c
+++ b/src/audio/android/SDL_androidaudio.c
@@ -50,7 +50,7 @@ AndroidAUD_OpenDevice(_THIS, const char *devname, int iscapture)
 
     audioDevice = this;
 
-    this->hidden = SDL_malloc(sizeof(*(this->hidden)));
+    this->hidden = (struct SDL_PrivateAudioData *) SDL_malloc(sizeof(*(this->hidden)));
     if (!this->hidden) {
         return SDL_OutOfMemory();
     }
@@ -91,6 +91,13 @@ AndroidAUD_OpenDevice(_THIS, const char *devname, int iscapture)
         /* Init failed? */
         return SDL_SetError("Java-side initialization failed!");
     }
+    
+    /* Audio thread is started here, after audio buffers and Java's AudioTrack are in place and ready to go */
+    this->thread = SDL_CreateThread(SDL_RunAudio, "AndroidAudioThread", this);
+    if (this->thread == NULL) {
+        AndroidAUD_CloseDevice(this);
+        return SDL_SetError("Couldn't create audio thread");
+    }
 
     return 0;
 }
@@ -110,6 +117,10 @@ AndroidAUD_GetDeviceBuf(_THIS)
 static void
 AndroidAUD_CloseDevice(_THIS)
 {
+    /* At this point SDL_CloseAudioDevice via close_audio_device took care of terminating the audio thread
+       so it's safe to terminate the Java side buffer and AudioTrack
+     */
+   
     if (this->hidden != NULL) {
         SDL_free(this->hidden);
         this->hidden = NULL;
@@ -143,13 +154,7 @@ AudioBootStrap ANDROIDAUD_bootstrap = {
     "android", "SDL Android audio driver", AndroidAUD_Init, 0
 };
 
-/* Called by the Java code to start the audio processing on a thread */
-void
-Android_RunAudioThread()
-{
-    SDL_RunAudio(audioDevice);
-}
-
 #endif /* SDL_AUDIO_DRIVER_ANDROID */
 
 /* vi: set ts=4 sw=4 expandtab: */
+
diff --git a/src/audio/android/SDL_androidaudio.h b/src/audio/android/SDL_androidaudio.h
index 383c708b7..c02ad1a7a 100644
--- a/src/audio/android/SDL_androidaudio.h
+++ b/src/audio/android/SDL_androidaudio.h
@@ -32,6 +32,8 @@ struct SDL_PrivateAudioData
 {
 };
 
+static void AndroidAUD_CloseDevice(_THIS);
+
 #endif /* _SDL_androidaudio_h */
 
 /* vi: set ts=4 sw=4 expandtab: */
diff --git a/src/core/android/SDL_android.c b/src/core/android/SDL_android.c
index 059a2291f..b7d1ff6d1 100644
--- a/src/core/android/SDL_android.c
+++ b/src/core/android/SDL_android.c
@@ -47,9 +47,6 @@
 /* Uncomment this to log messages entering and exiting methods in this file */
 //#define DEBUG_JNI
 
-/* Implemented in audio/android/SDL_androidaudio.c */
-extern void Android_RunAudioThread();
-
 static void Android_JNI_ThreadDestroyed(void*);
 
 /*******************************************************************************
@@ -245,15 +242,6 @@ void Java_org_libsdl_app_SDLActivity_nativeResume(
     }
 }
 
-void Java_org_libsdl_app_SDLActivity_nativeRunAudioThread(
-                                    JNIEnv* env, jclass cls)
-{
-    /* This is the audio thread, with a different environment */
-    Android_JNI_SetupThread();
-
-    Android_RunAudioThread();
-}
-
 void Java_org_libsdl_app_SDLInputConnection_nativeCommitText(
                                     JNIEnv* env, jclass cls,
                                     jstring text, jint newCursorPosition)
@@ -1374,3 +1362,4 @@ const char * SDL_AndroidGetExternalStoragePath()
 #endif /* __ANDROID__ */
 
 /* vi: set ts=4 sw=4 expandtab: */
+

From 58eedbb27e9a27598fa5a4c5ea4a42a2cc40109d Mon Sep 17 00:00:00 2001
From: Sam Lantinga 
Date: Thu, 8 Aug 2013 21:16:29 -0700
Subject: [PATCH 524/542] Removed unneeded Android audio code

---
 src/audio/android/SDL_androidaudio.c | 19 -------------------
 1 file changed, 19 deletions(-)

diff --git a/src/audio/android/SDL_androidaudio.c b/src/audio/android/SDL_androidaudio.c
index ea8301bdf..94e27f32f 100644
--- a/src/audio/android/SDL_androidaudio.c
+++ b/src/audio/android/SDL_androidaudio.c
@@ -50,12 +50,6 @@ AndroidAUD_OpenDevice(_THIS, const char *devname, int iscapture)
 
     audioDevice = this;
 
-    this->hidden = (struct SDL_PrivateAudioData *) SDL_malloc(sizeof(*(this->hidden)));
-    if (!this->hidden) {
-        return SDL_OutOfMemory();
-    }
-    SDL_memset(this->hidden, 0, (sizeof *this->hidden));
-
     test_format = SDL_FirstAudioFormat(this->spec.format);
     while (test_format != 0) { /* no "UNKNOWN" constant */
         if ((test_format == AUDIO_U8) || (test_format == AUDIO_S16LSB)) {
@@ -91,13 +85,6 @@ AndroidAUD_OpenDevice(_THIS, const char *devname, int iscapture)
         /* Init failed? */
         return SDL_SetError("Java-side initialization failed!");
     }
-    
-    /* Audio thread is started here, after audio buffers and Java's AudioTrack are in place and ready to go */
-    this->thread = SDL_CreateThread(SDL_RunAudio, "AndroidAudioThread", this);
-    if (this->thread == NULL) {
-        AndroidAUD_CloseDevice(this);
-        return SDL_SetError("Couldn't create audio thread");
-    }
 
     return 0;
 }
@@ -120,11 +107,6 @@ AndroidAUD_CloseDevice(_THIS)
     /* At this point SDL_CloseAudioDevice via close_audio_device took care of terminating the audio thread
        so it's safe to terminate the Java side buffer and AudioTrack
      */
-   
-    if (this->hidden != NULL) {
-        SDL_free(this->hidden);
-        this->hidden = NULL;
-    }
     Android_JNI_CloseAudioDevice();
 
     if (audioDevice == this) {
@@ -142,7 +124,6 @@ AndroidAUD_Init(SDL_AudioDriverImpl * impl)
     impl->CloseDevice = AndroidAUD_CloseDevice;
 
     /* and the capabilities */
-    impl->ProvidesOwnCallbackThread = 1;
     impl->HasCaptureSupport = 0; /* TODO */
     impl->OnlyHasDefaultOutputDevice = 1;
     impl->OnlyHasDefaultInputDevice = 1;

From 7067bff4700b626cc72246a8f35c71779f7fc931 Mon Sep 17 00:00:00 2001
From: Andreas Schiffler 
Date: Thu, 8 Aug 2013 21:29:30 -0700
Subject: [PATCH 525/542] Fix Bug 2021: Win32: Stack overflow due to recursive
 SDL_LogOutput on SDL_LogError without console; fix off-by-one error in
 SDLtest test suite

---
 src/SDL_log.c                 | 11 ++++++-----
 test/testautomation_sdltest.c |  6 +++---
 2 files changed, 9 insertions(+), 8 deletions(-)

diff --git a/src/SDL_log.c b/src/SDL_log.c
index c48f9ab8f..2245946c6 100644
--- a/src/SDL_log.c
+++ b/src/SDL_log.c
@@ -317,6 +317,7 @@ SDL_LogOutput(void *userdata, int category, SDL_LogPriority priority,
 {
 #if defined(__WIN32__)
     /* Way too many allocations here, urgh */
+    /* Note: One can't call SDL_SetError here, since that function itself logs. */
     {
         char *output;
         size_t length;
@@ -331,16 +332,16 @@ SDL_LogOutput(void *userdata, int category, SDL_LogPriority priority,
             if (!attachResult) {
                     attachError = GetLastError();
                     if (attachError == ERROR_INVALID_HANDLE) {
-                        SDL_SetError("Parent process has no console");
+                        OutputDebugString(TEXT("Parent process has no console"));
                         consoleAttached = -1;
                     } else if (attachError == ERROR_GEN_FAILURE) {
-                         SDL_SetError("Could not attach to console of parent process");
+                         OutputDebugString(TEXT("Could not attach to console of parent process"));
                          consoleAttached = -1;
                     } else if (attachError == ERROR_ACCESS_DENIED) {  
                          /* Already attached */
                         consoleAttached = 1;
                     } else {
-                        SDL_SetError("Error %d attaching console", attachError);
+                        OutputDebugString(TEXT("Error attaching console"));
                         consoleAttached = -1;
                     }
                 } else {
@@ -364,10 +365,10 @@ SDL_LogOutput(void *userdata, int category, SDL_LogPriority priority,
         /* Screen output to stderr, if console was attached. */
         if (consoleAttached == 1) {
                 if (!WriteConsole(stderrHandle, tstr, lstrlen(tstr), &charsWritten, NULL)) {
-                    SDL_SetError("Error %d calling WriteConsole", GetLastError());
+                    OutputDebugString(TEXT("Error calling WriteConsole"));
                 }
                 if (charsWritten == ERROR_NOT_ENOUGH_MEMORY) {
-                    SDL_SetError("Insufficient heap memory to write message of size %d", length);
+                    OutputDebugString(TEXT("Insufficient heap memory to write message"));
                 }
         }
 
diff --git a/test/testautomation_sdltest.c b/test/testautomation_sdltest.c
index b8bc326a7..e0d921b49 100644
--- a/test/testautomation_sdltest.c
+++ b/test/testautomation_sdltest.c
@@ -63,7 +63,7 @@ sdltest_randomNumber(void *arg)
   SDLTest_AssertCheck(result >= 0 && result <= (Sint64)umax, "Verify result value, expected: [0,%llu], got: %lld", umax, result);
 
   result = (Sint64)SDLTest_RandomSint8();
-  min = 1 - (1 << 7);
+  min = 0 - (1 << 7);
   max =     (1 << 7) - 1;
   SDLTest_AssertPass("Call to SDLTest_RandomSint8");
   SDLTest_AssertCheck(result >= min && result <= max, "Verify result value, expected: [%lld,%lld], got: %lld", min, max, result);
@@ -74,7 +74,7 @@ sdltest_randomNumber(void *arg)
   SDLTest_AssertCheck(result >= 0 && result <= (Sint64)umax, "Verify result value, expected: [0,%llu], got: %lld", umax, result);
 
   result = (Sint64)SDLTest_RandomSint16();
-  min = 1 - (1 << 15);
+  min = 0 - (1 << 15);
   max =     (1 << 15) - 1;
   SDLTest_AssertPass("Call to SDLTest_RandomSint16");
   SDLTest_AssertCheck(result >= min && result <= max, "Verify result value, expected: [%lld,%lld], got: %lld", min, max, result);
@@ -85,7 +85,7 @@ sdltest_randomNumber(void *arg)
   SDLTest_AssertCheck(result >= 0 && result <= (Sint64)umax, "Verify result value, expected: [0,%llu], got: %lld", umax, result);
 
   result = (Sint64)SDLTest_RandomSint32();
-  min = 1 - ((Sint64)1 << 31);
+  min = 0 - ((Sint64)1 << 31);
   max =     ((Sint64)1 << 31) - 1;
   SDLTest_AssertPass("Call to SDLTest_RandomSint32");
   SDLTest_AssertCheck(result >= min && result <= max, "Verify result value, expected: [%lld,%lld], got: %lld", min, max, result);

From 84e088407799d9a37b149451dba978b51b10922e Mon Sep 17 00:00:00 2001
From: Andreas Schiffler 
Date: Thu, 8 Aug 2013 22:10:00 -0700
Subject: [PATCH 526/542] Update video_getSetWindowSize for windows

---
 test/testautomation_video.c | 31 +++++++++++++++++++++++++------
 1 file changed, 25 insertions(+), 6 deletions(-)

diff --git a/test/testautomation_video.c b/test/testautomation_video.c
index f35e06392..46061090e 100644
--- a/test/testautomation_video.c
+++ b/test/testautomation_video.c
@@ -1081,6 +1081,7 @@ video_getSetWindowSize(void *arg)
   SDL_Window* window;
   int result;
   SDL_Rect display;
+  int maxwVariation, maxhVariation;
   int wVariation, hVariation;
   int referenceW, referenceH;
   int currentW, currentH;
@@ -1096,8 +1097,18 @@ video_getSetWindowSize(void *arg)
   window = _createVideoSuiteTestWindow(title);
   if (window == NULL) return TEST_ABORTED;
 
-  for (wVariation = 0; wVariation < 4; wVariation++) {
-   for (hVariation = 0; hVariation < 4; hVariation++) {
+#ifdef __WIN32__
+  /* Platform clips window size to screen size */
+  maxwVariation = 4;
+  maxhVariation = 4;
+#else
+  /* Platform allows window size >= screen size */
+  maxwVariation = 5;
+  maxhVariation = 5;
+#endif
+  
+  for (wVariation = 0; wVariation < maxwVariation; wVariation++) {
+   for (hVariation = 0; hVariation < maxhVariation; hVariation++) {
     switch(wVariation) {
      case 0:
       /* 1 Pixel Wide */
@@ -1108,10 +1119,14 @@ video_getSetWindowSize(void *arg)
       desiredW = SDLTest_RandomIntegerInRange(1, 100);
       break;
      case 2:
+      /* Width 1 pixel smaller than screen */
+      desiredW = display.w - 1;
+      break;
+     case 3:
       /* Width at screen size */
       desiredW = display.w;
       break;
-     case 3:
+     case 4:
       /* Width 1 pixel larger than screen */
       desiredW = display.w + 1;
       break;
@@ -1127,10 +1142,14 @@ video_getSetWindowSize(void *arg)
       desiredH = SDLTest_RandomIntegerInRange(1, 100);
       break;
      case 2:
+      /* Height 1 pixel smaller than screen */
+      desiredH = display.h - 1;
+      break;
+     case 3:
       /* Height at screen size */
       desiredH = display.h;
       break;
-     case 3:
+     case 4:
       /* Height 1 pixel larger than screen */
       desiredH = display.h + 1;
       break;
@@ -1152,13 +1171,13 @@ video_getSetWindowSize(void *arg)
     currentW = desiredW + 1;
     SDL_GetWindowSize(window, ¤tW, NULL);
     SDLTest_AssertPass("Call to SDL_GetWindowSize(&h=NULL)");
-    SDLTest_AssertCheck(desiredW == currentW, "Verify returned width; expected: %d, got: %d", desiredW, currentH);
+    SDLTest_AssertCheck(desiredW == currentW, "Verify returned width; expected: %d, got: %d", desiredW, currentW);
 
     /* Get just height */
     currentH = desiredH + 1;
     SDL_GetWindowSize(window, NULL, ¤tH);
     SDLTest_AssertPass("Call to SDL_GetWindowSize(&w=NULL)");
-    SDLTest_AssertCheck(desiredH == currentH, "Verify returned height; expected: %d, got: %d", desiredW, currentH);
+    SDLTest_AssertCheck(desiredH == currentH, "Verify returned height; expected: %d, got: %d", desiredH, currentH);
    }
   }
 

From bcee442188243e435227bd484ce628a4fa1a4980 Mon Sep 17 00:00:00 2001
From: Sam Lantinga 
Date: Fri, 9 Aug 2013 21:09:49 -0700
Subject: [PATCH 527/542] Better wording suggested by the community

---
 README.txt | 9 ++++-----
 1 file changed, 4 insertions(+), 5 deletions(-)

diff --git a/README.txt b/README.txt
index 343f365e0..681f4a33c 100644
--- a/README.txt
+++ b/README.txt
@@ -14,12 +14,11 @@ hardware via OpenGL and Direct3D. It is used by video playback software,
 emulators, and popular games including Valve's award winning catalog
 and many Humble Bundle games.
 
-The current version supports Windows, Mac OS X, Linux, iOS, and Android.
-The code contains support for other operating systems but those are not
-officially supported.
+SDL officially supports Windows, Mac OS X, Linux, iOS, and Android.
+Support for other platforms may be found in the source code.
 
-SDL is written in C, but works with C++ natively, and has bindings to
-several other languages, including C#, Python and more in progress.
+SDL is written in C, works natively with C++, and there are bindings 
+available for several other languages, including C# and Python.
 
 This library is distributed under the zlib license, which can be found
 in the file "COPYING.txt".

From 9444c11e99f3e480e006e6f37acf43f97932bbb3 Mon Sep 17 00:00:00 2001
From: Sam Lantinga 
Date: Fri, 9 Aug 2013 23:13:52 -0700
Subject: [PATCH 528/542] Fixed bug 2007 - SDL_SetWindowMinimumSize() not
 implemented on X11 (thanks Rainer!)

---
 src/video/x11/SDL_x11video.c  |  2 ++
 src/video/x11/SDL_x11window.c | 59 +++++++++++++++++++++++++++++++++++
 src/video/x11/SDL_x11window.h |  2 ++
 3 files changed, 63 insertions(+)

diff --git a/src/video/x11/SDL_x11video.c b/src/video/x11/SDL_x11video.c
index d12f87a7b..86597ecf2 100644
--- a/src/video/x11/SDL_x11video.c
+++ b/src/video/x11/SDL_x11video.c
@@ -362,6 +362,8 @@ X11_CreateDevice(int devindex)
     device->SetWindowIcon = X11_SetWindowIcon;
     device->SetWindowPosition = X11_SetWindowPosition;
     device->SetWindowSize = X11_SetWindowSize;
+    device->SetWindowMinimumSize = X11_SetWindowMinimumSize;
+    device->SetWindowMaximumSize = X11_SetWindowMaximumSize;
     device->ShowWindow = X11_ShowWindow;
     device->HideWindow = X11_HideWindow;
     device->RaiseWindow = X11_RaiseWindow;
diff --git a/src/video/x11/SDL_x11window.c b/src/video/x11/SDL_x11window.c
index 078ca3014..e101bec0c 100644
--- a/src/video/x11/SDL_x11window.c
+++ b/src/video/x11/SDL_x11window.c
@@ -741,6 +741,64 @@ X11_SetWindowPosition(_THIS, SDL_Window * window)
     XFlush(display);
 }
 
+void
+X11_SetWindowMinimumSize(_THIS, SDL_Window * window)
+{
+    SDL_WindowData *data = (SDL_WindowData *) window->driverdata;
+    Display *display = data->videodata->display;
+
+    if (window->flags & SDL_WINDOW_RESIZABLE) {
+         XSizeHints *sizehints = XAllocSizeHints();
+         long userhints;
+
+         XGetWMNormalHints(display, data->xwindow, sizehints, &userhints);
+
+         sizehints->min_width = window->min_w;
+         sizehints->min_height = window->min_h;
+         sizehints->flags |= PMinSize;
+
+         XSetWMNormalHints(display, data->xwindow, sizehints);
+
+         XFree(sizehints);
+
+        /* See comment in X11_SetWindowSize. */
+        XResizeWindow(display, data->xwindow, window->w, window->h);
+        XMoveWindow(display, data->xwindow, window->x, window->y);
+        XRaiseWindow(display, data->xwindow);
+    }
+
+    XFlush(display);
+}
+
+void
+X11_SetWindowMaximumSize(_THIS, SDL_Window * window)
+{
+    SDL_WindowData *data = (SDL_WindowData *) window->driverdata;
+    Display *display = data->videodata->display;
+
+    if (window->flags & SDL_WINDOW_RESIZABLE) {
+         XSizeHints *sizehints = XAllocSizeHints();
+         long userhints;
+
+         XGetWMNormalHints(display, data->xwindow, sizehints, &userhints);
+
+         sizehints->max_width = window->max_w;
+         sizehints->max_height = window->max_h;
+         sizehints->flags |= PMaxSize;
+
+         XSetWMNormalHints(display, data->xwindow, sizehints);
+
+         XFree(sizehints);
+
+        /* See comment in X11_SetWindowSize. */
+        XResizeWindow(display, data->xwindow, window->w, window->h);
+        XMoveWindow(display, data->xwindow, window->x, window->y);
+        XRaiseWindow(display, data->xwindow);
+    }
+
+    XFlush(display);
+}
+
 void
 X11_SetWindowSize(_THIS, SDL_Window * window)
 {
@@ -760,6 +818,7 @@ X11_SetWindowSize(_THIS, SDL_Window * window)
 
          sizehints->min_width = sizehints->max_width = window->w;
          sizehints->min_height = sizehints->max_height = window->h;
+         sizehints->flags |= PMinSize | PMaxSize;
 
          XSetWMNormalHints(display, data->xwindow, sizehints);
 
diff --git a/src/video/x11/SDL_x11window.h b/src/video/x11/SDL_x11window.h
index b9cb750b6..f53fd8aa2 100644
--- a/src/video/x11/SDL_x11window.h
+++ b/src/video/x11/SDL_x11window.h
@@ -70,6 +70,8 @@ extern char *X11_GetWindowTitle(_THIS, Window xwindow);
 extern void X11_SetWindowTitle(_THIS, SDL_Window * window);
 extern void X11_SetWindowIcon(_THIS, SDL_Window * window, SDL_Surface * icon);
 extern void X11_SetWindowPosition(_THIS, SDL_Window * window);
+extern void X11_SetWindowMinimumSize(_THIS, SDL_Window * window);
+extern void X11_SetWindowMaximumSize(_THIS, SDL_Window * window);
 extern void X11_SetWindowSize(_THIS, SDL_Window * window);
 extern void X11_ShowWindow(_THIS, SDL_Window * window);
 extern void X11_HideWindow(_THIS, SDL_Window * window);

From c4a3df6938fa99488f6ddded6c79a0480fd2ede5 Mon Sep 17 00:00:00 2001
From: Sam Lantinga 
Date: Fri, 9 Aug 2013 23:43:14 -0700
Subject: [PATCH 529/542] Updated the credits for SDL 2.0. Thank you everyone!

---
 CREDITS.txt | 62 ++++++++++++++++-------------------------------------
 1 file changed, 18 insertions(+), 44 deletions(-)

diff --git a/CREDITS.txt b/CREDITS.txt
index 6b983f4b0..30cac50d7 100644
--- a/CREDITS.txt
+++ b/CREDITS.txt
@@ -5,10 +5,23 @@ Thanks to everyone who made this possible, including:
 * Cliff Matthews, for giving me a reason to start this project. :)
  -- Executor rocks!  *grin*
 
-* The Linux Fund, C Magazine, Educational Technology Resources Inc.,
-  Gareth Noyce, Jesse Pavel, Keith Kitchin, Jeremy Horvath, Thomas Nicholson,
-  Hans-Peter Gygax, the Eternal Lands Development Team, Lars Brubaker,
-  and Phoenix Kokido for financial contributions
+* Ryan Gordon for helping everybody out and keeping the dream alive. :)
+
+* Gabriel Jacobo for his work on the Android port and generally helping out all around
+ 
+* Philipp Wiesemann for his attention to detail reviewing the entire SDL code base and proposes patches
+
+* Andreas Schiffler for his dedication to unit tests, Visual Studio projects, and managing the Google Summer of Code
+
+* Mike Sartain for incorporating SDL into Team Fortress 2 and cheering me on at Valve
+
+* Alfred Reynolds for the game controller API and general (in)sanity
+
+* Jørgen Tjernø for numerous magical Mac OS X fixes
+
+* Pierre-Loup Griffais for his deep knowledge of OpenGL drivers
+ 
+* Sheena Smith for many months of great work on the SDL wiki creating the API documentation and style guides
 
 * Edgar "bobbens" Simo for his force feedback API development during the
   Google Summer of Code 2008
@@ -19,50 +32,11 @@ Thanks to everyone who made this possible, including:
 * Holmes Futrell for port of SDL to the iPhone and iPod Touch during the
   Google Summer of Code 2008
 
-* Szymon "Wilku" Wilczek for adding support for multiple mice and tablets
-  during the Google Summer of Code 2008
-
-* Marty Leisner, Andrew, Will, Edgar Simo, Donny Viszneki, Andrea Mazzoleni,
-  Dmytro Bogovych, and Couriersud for helping find SDL 1.3 bugs in the great
-  SDL Bug Hunt of January 2009!
-
-* Donny Viszneki for helping fix SDL 1.3 bugs in the great SDL Bug Hunt of
-  January 2009!
-
-* Luke Benstead for OpenGL 3.0 support
-
-* Gaëtan de Menten for writing the PHP and SQL behind the SDL website
-
-* Tim Jones for the new look of the SDL website
-
-* Ryan Gordon for helping everybody out and keeping the dream alive. :)
-
-* Mattias Engdegård, for help with the Solaris port and lots of other help
-
-* Eric Wing, Max Horn, and Darrell Walisser for unflagging work on the Mac OS X port
-
-* David Carré, for the Pandora port
-
-* Couriersud for the DirectFB driver
-
 * Jon Atkins for SDL_image, SDL_mixer and SDL_net documentation
 
-* Arne Claus, for the 2004 winning SDL logo,
-  and Shandy Brown, Jac, Alex Lyman, Mikkel Gjoel, #Guy, Jonas Hartmann,
-  Daniel Liljeberg,  Ronald Sowa, DocD, Pekka Jaervinen, Patrick Avella,
-  Erkki Kontilla, Levon Gavalian, Hal Emerich, David Wiktorsson,
-  S. Schury and F. Hufsky, Ciska de Ruyver, Shredweat, Tyler Montbriand,
-  Martin Andersson, Merlyn Wysard, Fernando Ibanez, David Miller,
-  Andre Bommele, lovesby.com, Francisco Camenforte Torres, and David Igreja
-  for other logo entries.
-
-* Bob Pendleton and David Olofson for being long time contributors to
-  the SDL mailing list.
-
 * Everybody at Loki Software, Inc. for their great contributions!
 
- And a big hand to everyone else who gave me appreciation, advice,
- and suggestions, especially the good folks on the SDL mailing list.
+ And a big hand to everyone else who has contributed over the years.
 
 THANKS! :)
 

From aabc0fcc3b2232a8ec8350326ca2531f4c415521 Mon Sep 17 00:00:00 2001
From: Sam Lantinga 
Date: Fri, 9 Aug 2013 23:58:33 -0700
Subject: [PATCH 530/542] Added the Google Summer of Code students from 2010

---
 CREDITS.txt | 31 +++++++++++++++++++------------
 1 file changed, 19 insertions(+), 12 deletions(-)

diff --git a/CREDITS.txt b/CREDITS.txt
index 30cac50d7..a1c2cdcb0 100644
--- a/CREDITS.txt
+++ b/CREDITS.txt
@@ -7,32 +7,39 @@ Thanks to everyone who made this possible, including:
 
 * Ryan Gordon for helping everybody out and keeping the dream alive. :)
 
-* Gabriel Jacobo for his work on the Android port and generally helping out all around
+* Gabriel Jacobo for his work on the Android port and generally helping out all around.
  
-* Philipp Wiesemann for his attention to detail reviewing the entire SDL code base and proposes patches
+* Philipp Wiesemann for his attention to detail reviewing the entire SDL code base and proposes patches.
 
-* Andreas Schiffler for his dedication to unit tests, Visual Studio projects, and managing the Google Summer of Code
+* Andreas Schiffler for his dedication to unit tests, Visual Studio projects, and managing the Google Summer of Code.
 
-* Mike Sartain for incorporating SDL into Team Fortress 2 and cheering me on at Valve
+* Mike Sartain for incorporating SDL into Team Fortress 2 and cheering me on at Valve.
 
 * Alfred Reynolds for the game controller API and general (in)sanity
 
-* Jørgen Tjernø for numerous magical Mac OS X fixes
+* Jørgen Tjernø for numerous magical Mac OS X fixes.
 
-* Pierre-Loup Griffais for his deep knowledge of OpenGL drivers
+* Pierre-Loup Griffais for his deep knowledge of OpenGL drivers.
  
-* Sheena Smith for many months of great work on the SDL wiki creating the API documentation and style guides
+* Sheena Smith for many months of great work on the SDL wiki creating the API documentation and style guides.
+
+* Paul Hunkin for his port of SDL to Android during the Google Summer of Code 2010.
+
+* Eli Gottlieb for his work on shaped windows during the Google Summer of Code 2010.
+
+* Jim Grandpre for his work on multi-touch and gesture recognition during
+  the Google Summer of Code 2010.
 
 * Edgar "bobbens" Simo for his force feedback API development during the
-  Google Summer of Code 2008
+  Google Summer of Code 2008.
 
 * Aaron Wishnick for his work on audio resampling and pitch shifting during
-  the Google Summer of Code 2008
+  the Google Summer of Code 2008.
 
-* Holmes Futrell for port of SDL to the iPhone and iPod Touch during the
-  Google Summer of Code 2008
+* Holmes Futrell for his port of SDL to the iPhone and iPod Touch during the
+  Google Summer of Code 2008.
 
-* Jon Atkins for SDL_image, SDL_mixer and SDL_net documentation
+* Jon Atkins for SDL_image, SDL_mixer and SDL_net documentation.
 
 * Everybody at Loki Software, Inc. for their great contributions!
 

From 24097af6ac6b9a40b257a7f24f74349bf206e826 Mon Sep 17 00:00:00 2001
From: "Ryan C. Gordon" 
Date: Sat, 10 Aug 2013 13:20:45 -0400
Subject: [PATCH 531/542] Fixed some typos in the headers.

---
 include/SDL_haptic.h | 4 ++--
 1 file changed, 2 insertions(+), 2 deletions(-)

diff --git a/include/SDL_haptic.h b/include/SDL_haptic.h
index 8bc726d41..1ea791428 100644
--- a/include/SDL_haptic.h
+++ b/include/SDL_haptic.h
@@ -926,7 +926,7 @@ extern DECLSPEC int SDLCALL SDL_HapticNumEffectsPlaying(SDL_Haptic * haptic);
  *
  *  Example:
  *  \code
- *  if (SDL_HapticQueryEffects(haptic) & SDL_HAPTIC_CONSTANT) {
+ *  if (SDL_HapticQuery(haptic) & SDL_HAPTIC_CONSTANT) {
  *      printf("We have constant haptic effect!");
  *  }
  *  \endcode
@@ -1132,7 +1132,7 @@ extern DECLSPEC int SDLCALL SDL_HapticUnpause(SDL_Haptic * haptic);
 extern DECLSPEC int SDLCALL SDL_HapticStopAll(SDL_Haptic * haptic);
 
 /**
- *  \brief Checks to see if rumble is supported on a haptic device..
+ *  \brief Checks to see if rumble is supported on a haptic device.
  *
  *  \param haptic Haptic device to check to see if it supports rumble.
  *  \return SDL_TRUE if effect is supported, SDL_FALSE if it isn't or -1 on error.

From c35c4a6f188fa60449a19ee1e37936ed21fb4a9a Mon Sep 17 00:00:00 2001
From: "Ryan C. Gordon" 
Date: Sat, 10 Aug 2013 13:38:09 -0400
Subject: [PATCH 532/542] Replaced SDL_HAPTIC_SQUARE with SDL_HAPTIC_LEFTRIGHT.

We needed a bit, so we're hoping no one needs this effect, especially when
it's fairly close to SDL_HAPTIC_SINE, we hope.

SDL_HAPTIC_LEFTRIGHT maps to XInput's functionality, so this removes the SINE
code for the XInput driver to keep things clean.

This also makes the simplified Rumble API use SDL_HAPTIC_LEFTRIGHT if
SDL_HAPTIC_SINE isn't available, to keep XInput working.

When we break the ABI, and can extend the supported capabilities field from
a Uint16, we'll add SDL_HAPTIC_SQUARE back in.

This patch is based on work by Ethan Lee.
---
 include/SDL_haptic.h               | 42 +++++++++++++++++---
 src/haptic/SDL_haptic.c            | 64 +++++++++++++++++-------------
 src/haptic/darwin/SDL_syshaptic.c  | 11 +++--
 src/haptic/linux/SDL_syshaptic.c   | 34 ++++++++++++++--
 src/haptic/windows/SDL_syshaptic.c | 34 +++++++---------
 test/testhaptic.c                  | 23 ++++++++++-
 6 files changed, 146 insertions(+), 62 deletions(-)

diff --git a/include/SDL_haptic.h b/include/SDL_haptic.h
index 1ea791428..8c91d1b1f 100644
--- a/include/SDL_haptic.h
+++ b/include/SDL_haptic.h
@@ -166,13 +166,18 @@ typedef struct _SDL_Haptic SDL_Haptic;
 #define SDL_HAPTIC_SINE       (1<<1)
 
 /**
- *  \brief Square wave effect supported.
+ *  \brief Left/Right effect supported.
  *
- *  Periodic haptic effect that simulates square waves.
+ *  Haptic effect for direct control over high/low frequency motors.
  *
- *  \sa SDL_HapticPeriodic
+ *  \sa SDL_HapticLeftRight
+ * \warning this value was SDL_HAPTIC_SQUARE right before 2.0.0 shipped. Sorry,
+ *          we ran out of bits, and this is important for XInput devices.
  */
-#define SDL_HAPTIC_SQUARE     (1<<2)
+#define SDL_HAPTIC_LEFTRIGHT     (1<<2)
+
+/* !!! FIXME: put this back when we have more bits in 2.1 */
+/*#define SDL_HAPTIC_SQUARE     (1<<2)*/
 
 /**
  *  \brief Triangle wave effect supported.
@@ -645,6 +650,31 @@ typedef struct SDL_HapticRamp
     Uint16 fade_level;      /**< Level at the end of the fade. */
 } SDL_HapticRamp;
 
+/**
+ * \brief A structure containing a template for a Left/Right effect.
+ *
+ * This struct is exclusively for the ::SDL_HAPTIC_LEFTRIGHT effect.
+ *
+ * The Left/Right effect is used to explicitly control the large and small
+ * motors, commonly found in modern game controllers. One motor is high
+ * frequency, the other is low frequency.
+ *
+ * \sa SDL_HAPTIC_LEFTRIGHT
+ * \sa SDL_HapticEffect
+ */
+typedef struct SDL_HapticLeftRight
+{
+    /* Header */
+    Uint16 type;            /**< ::SDL_HAPTIC_LEFTRIGHT */
+
+    /* Replay */
+    Uint32 length;          /**< Duration of the effect. */
+
+    /* Rumble */
+    Uint16 large_magnitude; /**< Control of the large controller motor. */
+    Uint16 small_magnitude; /**< Control of the small controller motor. */
+} SDL_HapticLeftRight;
+
 /**
  *  \brief A structure containing a template for the ::SDL_HAPTIC_CUSTOM effect.
  *
@@ -751,6 +781,7 @@ typedef struct SDL_HapticCustom
  *  \sa SDL_HapticPeriodic
  *  \sa SDL_HapticCondition
  *  \sa SDL_HapticRamp
+ *  \sa SDL_HapticLeftRight
  *  \sa SDL_HapticCustom
  */
 typedef union SDL_HapticEffect
@@ -761,6 +792,7 @@ typedef union SDL_HapticEffect
     SDL_HapticPeriodic periodic;    /**< Periodic effect. */
     SDL_HapticCondition condition;  /**< Condition effect. */
     SDL_HapticRamp ramp;            /**< Ramp effect. */
+    SDL_HapticLeftRight leftright;  /**< Left/Right effect. */
     SDL_HapticCustom custom;        /**< Custom effect. */
 } SDL_HapticEffect;
 
@@ -1182,8 +1214,6 @@ extern DECLSPEC int SDLCALL SDL_HapticRumblePlay(SDL_Haptic * haptic, float stre
  */
 extern DECLSPEC int SDLCALL SDL_HapticRumbleStop(SDL_Haptic * haptic);
 
-
-
 /* Ends C function definitions when using C++ */
 #ifdef __cplusplus
 }
diff --git a/src/haptic/SDL_haptic.c b/src/haptic/SDL_haptic.c
index d5e2bdd51..d7e1c5062 100644
--- a/src/haptic/SDL_haptic.c
+++ b/src/haptic/SDL_haptic.c
@@ -23,7 +23,7 @@
 #include "SDL_syshaptic.h"
 #include "SDL_haptic_c.h"
 #include "../joystick/SDL_joystick_c.h" /* For SDL_PrivateJoystickValid */
-
+#include "SDL_assert.h"
 
 Uint8 SDL_numhaptics = 0;
 SDL_Haptic **SDL_haptics = NULL;
@@ -723,32 +723,18 @@ SDL_HapticStopAll(SDL_Haptic * haptic)
     return SDL_SYS_HapticStopAll(haptic);
 }
 
-static void
-SDL_HapticRumbleCreate(SDL_HapticEffect * efx)
-{
-   SDL_memset(efx, 0, sizeof(SDL_HapticEffect));
-   efx->type = SDL_HAPTIC_SINE;
-   efx->periodic.period = 1000;
-   efx->periodic.magnitude = 0x4000;
-   efx->periodic.length = 5000;
-   efx->periodic.attack_length = 0;
-   efx->periodic.fade_length = 0;
-}
-
 /*
  * Checks to see if rumble is supported.
  */
 int
 SDL_HapticRumbleSupported(SDL_Haptic * haptic)
 {
-    SDL_HapticEffect efx;
-
     if (!ValidHaptic(haptic)) {
         return -1;
     }
 
-    SDL_HapticRumbleCreate(&efx);
-    return SDL_HapticEffectSupported(haptic, &efx);
+    /* Most things can use SINE, but XInput only has LEFTRIGHT. */
+    return ((haptic->supported & (SDL_HAPTIC_SINE|SDL_HAPTIC_LEFTRIGHT)) != 0);
 }
 
 /*
@@ -757,6 +743,8 @@ SDL_HapticRumbleSupported(SDL_Haptic * haptic)
 int
 SDL_HapticRumbleInit(SDL_Haptic * haptic)
 {
+    SDL_HapticEffect *efx = &haptic->rumble_effect;
+
     if (!ValidHaptic(haptic)) {
         return -1;
     }
@@ -766,8 +754,23 @@ SDL_HapticRumbleInit(SDL_Haptic * haptic)
         return 0;
     }
 
-    /* Copy over. */
-    SDL_HapticRumbleCreate(&haptic->rumble_effect);
+    SDL_zerop(efx);
+    if (haptic->supported & SDL_HAPTIC_SINE) {
+        efx->type = SDL_HAPTIC_SINE;
+        efx->periodic.period = 1000;
+        efx->periodic.magnitude = 0x4000;
+        efx->periodic.length = 5000;
+        efx->periodic.attack_length = 0;
+        efx->periodic.fade_length = 0;
+    } else if (haptic->supported & SDL_HAPTIC_LEFTRIGHT) {  /* XInput? */
+        efx->type = SDL_HAPTIC_LEFTRIGHT;
+        efx->leftright.length = 5000;
+        efx->leftright.large_magnitude = 0x4000;
+        efx->leftright.small_magnitude = 0x4000;
+    } else {
+        return SDL_SetError("Device doesn't support rumble");
+    }
+
     haptic->rumble_id = SDL_HapticNewEffect(haptic, &haptic->rumble_effect);
     if (haptic->rumble_id >= 0) {
         return 0;
@@ -781,7 +784,8 @@ SDL_HapticRumbleInit(SDL_Haptic * haptic)
 int
 SDL_HapticRumblePlay(SDL_Haptic * haptic, float strength, Uint32 length)
 {
-    SDL_HapticPeriodic *efx;
+    SDL_HapticEffect *efx;
+    Sint16 magnitude;
 
     if (!ValidHaptic(haptic)) {
         return -1;
@@ -794,15 +798,22 @@ SDL_HapticRumblePlay(SDL_Haptic * haptic, float strength, Uint32 length)
     /* Clamp strength. */
     if (strength > 1.0f) {
         strength = 1.0f;
-    }
-    else if (strength < 0.0f) {
+    } else if (strength < 0.0f) {
         strength = 0.0f;
     }
+    magnitude = (Sint16)(32767.0f*strength);
+
+    efx = &haptic->rumble_effect;
+    if (efx->type == SDL_HAPTIC_SINE) {
+        efx->periodic.magnitude = magnitude;
+        efx->periodic.length = length;
+    } else if (efx->type == SDL_HAPTIC_LEFTRIGHT) {
+        efx->leftright.small_magnitude = efx->leftright.large_magnitude = magnitude;
+        efx->leftright.length = length;
+    } else {
+        SDL_assert(0 && "This should have been caught elsewhere");
+    }
 
-    /* New effect. */
-    efx = &haptic->rumble_effect.periodic;
-    efx->magnitude = (Sint16)(32767.0f*strength);
-    efx->length = length;
     if (SDL_HapticUpdateEffect(haptic, haptic->rumble_id, &haptic->rumble_effect) < 0) {
         return -1;
     }
@@ -827,4 +838,3 @@ SDL_HapticRumbleStop(SDL_Haptic * haptic)
     return SDL_HapticStopEffect(haptic, haptic->rumble_id);
 }
 
-
diff --git a/src/haptic/darwin/SDL_syshaptic.c b/src/haptic/darwin/SDL_syshaptic.c
index 53c5acddd..ec889041c 100644
--- a/src/haptic/darwin/SDL_syshaptic.c
+++ b/src/haptic/darwin/SDL_syshaptic.c
@@ -342,7 +342,8 @@ GetSupportedFeatures(SDL_Haptic * haptic)
     /* Test for effects. */
     FF_TEST(FFCAP_ET_CONSTANTFORCE, SDL_HAPTIC_CONSTANT);
     FF_TEST(FFCAP_ET_RAMPFORCE, SDL_HAPTIC_RAMP);
-    FF_TEST(FFCAP_ET_SQUARE, SDL_HAPTIC_SQUARE);
+    /* !!! FIXME: put this back when we have more bits in 2.1 */
+    /*FF_TEST(FFCAP_ET_SQUARE, SDL_HAPTIC_SQUARE);*/
     FF_TEST(FFCAP_ET_SINE, SDL_HAPTIC_SINE);
     FF_TEST(FFCAP_ET_TRIANGLE, SDL_HAPTIC_TRIANGLE);
     FF_TEST(FFCAP_ET_SAWTOOTHUP, SDL_HAPTIC_SAWTOOTHUP);
@@ -750,7 +751,8 @@ SDL_SYS_ToFFEFFECT(SDL_Haptic * haptic, FFEFFECT * dest,
         break;
 
     case SDL_HAPTIC_SINE:
-    case SDL_HAPTIC_SQUARE:
+    /* !!! FIXME: put this back when we have more bits in 2.1 */
+    /*case SDL_HAPTIC_SQUARE:*/
     case SDL_HAPTIC_TRIANGLE:
     case SDL_HAPTIC_SAWTOOTHUP:
     case SDL_HAPTIC_SAWTOOTHDOWN:
@@ -978,8 +980,9 @@ SDL_SYS_HapticEffectType(Uint16 type)
     case SDL_HAPTIC_RAMP:
         return kFFEffectType_RampForce_ID;
 
-    case SDL_HAPTIC_SQUARE:
-        return kFFEffectType_Square_ID;
+    /* !!! FIXME: put this back when we have more bits in 2.1 */
+    /*case SDL_HAPTIC_SQUARE:
+        return kFFEffectType_Square_ID;*/
 
     case SDL_HAPTIC_SINE:
         return kFFEffectType_Sine_ID;
diff --git a/src/haptic/linux/SDL_syshaptic.c b/src/haptic/linux/SDL_syshaptic.c
index 92705320a..ad34fc27f 100644
--- a/src/haptic/linux/SDL_syshaptic.c
+++ b/src/haptic/linux/SDL_syshaptic.c
@@ -99,7 +99,8 @@ EV_IsHaptic(int fd)
     /* Convert supported features to SDL_HAPTIC platform-neutral features. */
     EV_TEST(FF_CONSTANT, SDL_HAPTIC_CONSTANT);
     EV_TEST(FF_SINE, SDL_HAPTIC_SINE);
-    EV_TEST(FF_SQUARE, SDL_HAPTIC_SQUARE);
+    /* !!! FIXME: put this back when we have more bits in 2.1 */
+    /*EV_TEST(FF_SQUARE, SDL_HAPTIC_SQUARE);*/
     EV_TEST(FF_TRIANGLE, SDL_HAPTIC_TRIANGLE);
     EV_TEST(FF_SAW_UP, SDL_HAPTIC_SAWTOOTHUP);
     EV_TEST(FF_SAW_DOWN, SDL_HAPTIC_SAWTOOTHDOWN);
@@ -111,6 +112,7 @@ EV_IsHaptic(int fd)
     EV_TEST(FF_CUSTOM, SDL_HAPTIC_CUSTOM);
     EV_TEST(FF_GAIN, SDL_HAPTIC_GAIN);
     EV_TEST(FF_AUTOCENTER, SDL_HAPTIC_AUTOCENTER);
+    EV_TEST(FF_RUMBLE, SDL_HAPTIC_LEFTRIGHT);
 
     /* Return what it supports. */
     return ret;
@@ -559,6 +561,7 @@ SDL_SYS_ToFFEffect(struct ff_effect *dest, SDL_HapticEffect * src)
     SDL_HapticPeriodic *periodic;
     SDL_HapticCondition *condition;
     SDL_HapticRamp *ramp;
+    SDL_HapticLeftRight *leftright;
 
     /* Clear up */
     SDL_memset(dest, 0, sizeof(struct ff_effect));
@@ -596,7 +599,8 @@ SDL_SYS_ToFFEffect(struct ff_effect *dest, SDL_HapticEffect * src)
         break;
 
     case SDL_HAPTIC_SINE:
-    case SDL_HAPTIC_SQUARE:
+    /* !!! FIXME: put this back when we have more bits in 2.1 */
+    /*case SDL_HAPTIC_SQUARE:*/
     case SDL_HAPTIC_TRIANGLE:
     case SDL_HAPTIC_SAWTOOTHUP:
     case SDL_HAPTIC_SAWTOOTHDOWN:
@@ -620,8 +624,9 @@ SDL_SYS_ToFFEffect(struct ff_effect *dest, SDL_HapticEffect * src)
         /* Periodic */
         if (periodic->type == SDL_HAPTIC_SINE)
             dest->u.periodic.waveform = FF_SINE;
-        else if (periodic->type == SDL_HAPTIC_SQUARE)
-            dest->u.periodic.waveform = FF_SQUARE;
+        /* !!! FIXME: put this back when we have more bits in 2.1 */
+        /*else if (periodic->type == SDL_HAPTIC_SQUARE)
+            dest->u.periodic.waveform = FF_SQUARE;*/
         else if (periodic->type == SDL_HAPTIC_TRIANGLE)
             dest->u.periodic.waveform = FF_TRIANGLE;
         else if (periodic->type == SDL_HAPTIC_SAWTOOTHUP)
@@ -725,6 +730,27 @@ SDL_SYS_ToFFEffect(struct ff_effect *dest, SDL_HapticEffect * src)
 
         break;
 
+    case SDL_HAPTIC_LEFTRIGHT:
+        leftright = &src->leftright;
+
+        /* Header */
+        dest->type = FF_RUMBLE;
+        dest->direction = 0;
+
+        /* Replay */
+        dest->replay.length = (leftright->length == SDL_HAPTIC_INFINITY) ?
+            0 : CLAMP(leftright->length);
+
+        /* Trigger */
+        dest->trigger.button = 0;
+        dest->trigger.interval = 0;
+
+        /* Rumble */
+        dest->u.rumble.strong_magnitude = leftright->large_magnitude;
+        dest->u.rumble.weak_magnitude = leftright->small_magnitude;
+
+	break;
+
 
     default:
         return SDL_SetError("Haptic: Unknown effect type.");
diff --git a/src/haptic/windows/SDL_syshaptic.c b/src/haptic/windows/SDL_syshaptic.c
index fcb4e2411..e86211de1 100644
--- a/src/haptic/windows/SDL_syshaptic.c
+++ b/src/haptic/windows/SDL_syshaptic.c
@@ -303,7 +303,8 @@ DI_EffectCallback(LPCDIEFFECTINFO pei, LPVOID pv)
     EFFECT_TEST(GUID_ConstantForce, SDL_HAPTIC_CONSTANT);
     EFFECT_TEST(GUID_CustomForce, SDL_HAPTIC_CUSTOM);
     EFFECT_TEST(GUID_Sine, SDL_HAPTIC_SINE);
-    EFFECT_TEST(GUID_Square, SDL_HAPTIC_SQUARE);
+    /* !!! FIXME: put this back when we have more bits in 2.1 */
+    /*EFFECT_TEST(GUID_Square, SDL_HAPTIC_SQUARE);*/
     EFFECT_TEST(GUID_Triangle, SDL_HAPTIC_TRIANGLE);
     EFFECT_TEST(GUID_SawtoothUp, SDL_HAPTIC_SAWTOOTHUP);
     EFFECT_TEST(GUID_SawtoothDown, SDL_HAPTIC_SAWTOOTHDOWN);
@@ -389,8 +390,7 @@ SDL_SYS_HapticOpenFromXInput(SDL_Haptic * haptic, Uint8 userid)
     XINPUT_VIBRATION vibration = { 0, 0 };  /* stop any current vibration */
     XINPUTSETSTATE(userid, &vibration);
 
-    /* !!! FIXME: we can probably do more than SINE if we figure out how to set up the left and right motors properly. */
-    haptic->supported = SDL_HAPTIC_SINE;
+    haptic->supported = SDL_HAPTIC_LEFTRIGHT;
 
     haptic->neffects = 1;
     haptic->nplaying = 1;
@@ -935,7 +935,8 @@ SDL_SYS_ToDIEFFECT(SDL_Haptic * haptic, DIEFFECT * dest,
         break;
 
     case SDL_HAPTIC_SINE:
-    case SDL_HAPTIC_SQUARE:
+    /* !!! FIXME: put this back when we have more bits in 2.1 */
+    /*case SDL_HAPTIC_SQUARE:*/
     case SDL_HAPTIC_TRIANGLE:
     case SDL_HAPTIC_SAWTOOTHUP:
     case SDL_HAPTIC_SAWTOOTHDOWN:
@@ -1163,8 +1164,9 @@ SDL_SYS_HapticEffectType(SDL_HapticEffect * effect)
     case SDL_HAPTIC_RAMP:
         return &GUID_RampForce;
 
-    case SDL_HAPTIC_SQUARE:
-        return &GUID_Square;
+    /* !!! FIXME: put this back when we have more bits in 2.1 */
+    /*case SDL_HAPTIC_SQUARE:
+        return &GUID_Square;*/
 
     case SDL_HAPTIC_SINE:
         return &GUID_Sine;
@@ -1210,7 +1212,7 @@ SDL_SYS_HapticNewEffect(SDL_Haptic * haptic, struct haptic_effect *effect,
     HRESULT ret;
     REFGUID type = SDL_SYS_HapticEffectType(base);
 
-    if (type == NULL) {
+    if ((type == NULL) && (!haptic->hwdata->bXInputHaptic)) {
         goto err_hweffect;
     }
 
@@ -1225,7 +1227,7 @@ SDL_SYS_HapticNewEffect(SDL_Haptic * haptic, struct haptic_effect *effect,
     SDL_zerop(effect->hweffect);
 
     if (haptic->hwdata->bXInputHaptic) {
-        SDL_assert(base->type == SDL_HAPTIC_SINE);  /* should catch this at higher level */
+        SDL_assert(base->type == SDL_HAPTIC_LEFTRIGHT);  /* should catch this at higher level */
         return SDL_SYS_HapticUpdateEffect(haptic, effect, base);
     }
 
@@ -1269,20 +1271,14 @@ SDL_SYS_HapticUpdateEffect(SDL_Haptic * haptic,
     DIEFFECT temp;
 
     if (haptic->hwdata->bXInputHaptic) {
-        /* !!! FIXME: this isn't close to right. We only support "sine" effects,
-         * !!! FIXME:  we ignore most of the parameters, and we probably get
-         * !!! FIXME:  the ones we don't ignore wrong, too.
-         * !!! FIXME: if I had a better understanding of how the two motors
-         * !!! FIXME:  could be used in unison, perhaps I could implement other
-         * !!! FIXME:  effect types?
-         */
         /* From MSDN:
             "Note that the right motor is the high-frequency motor, the left
              motor is the low-frequency motor. They do not always need to be
              set to the same amount, as they provide different effects." */
         XINPUT_VIBRATION *vib = &effect->hweffect->vibration;
-        SDL_assert(data->type == SDL_HAPTIC_SINE);
-        vib->wLeftMotorSpeed = vib->wRightMotorSpeed = data->periodic.magnitude * 2;
+        SDL_assert(data->type == SDL_HAPTIC_LEFTRIGHT);
+        vib->wLeftMotorSpeed = data->leftright.large_magnitude;
+        vib->wRightMotorSpeed = data->leftright.small_magnitude;
         return 0;
     }
 
@@ -1333,9 +1329,9 @@ SDL_SYS_HapticRunEffect(SDL_Haptic * haptic, struct haptic_effect *effect,
 
     if (haptic->hwdata->bXInputHaptic) {
         XINPUT_VIBRATION *vib = &effect->hweffect->vibration;
-        SDL_assert(effect->effect.type == SDL_HAPTIC_SINE);  /* should catch this at higher level */
+        SDL_assert(effect->effect.type == SDL_HAPTIC_LEFTRIGHT);  /* should catch this at higher level */
         SDL_LockMutex(haptic->hwdata->mutex);
-        haptic->hwdata->stopTicks = SDL_GetTicks() + (effect->effect.periodic.length * iterations);
+        haptic->hwdata->stopTicks = SDL_GetTicks() + (effect->effect.leftright.length * iterations);
         SDL_UnlockMutex(haptic->hwdata->mutex);
         return (XINPUTSETSTATE(haptic->hwdata->userid, vib) == ERROR_SUCCESS) ? 0 : -1;
     }
diff --git a/test/testhaptic.c b/test/testhaptic.c
index 524554db7..b993d5191 100644
--- a/test/testhaptic.c
+++ b/test/testhaptic.c
@@ -213,6 +213,22 @@ main(int argc, char **argv)
         nefx++;
     }
 
+    /* First we'll try a SINE effect. */
+    if (supported & SDL_HAPTIC_LEFTRIGHT) {
+        printf("   effect %d: Left/Right\n", nefx);
+        efx[nefx].type = SDL_HAPTIC_LEFTRIGHT;
+        efx[nefx].leftright.length = 5000;
+        efx[nefx].leftright.large_magnitude = 0x3000;
+        efx[nefx].leftright.small_magnitude = 0xFFFF;
+        id[nefx] = SDL_HapticNewEffect(haptic, &efx[nefx]);
+        if (id[nefx] < 0) {
+            printf("UPLOADING EFFECT ERROR: %s\n", SDL_GetError());
+            abort_execution();
+        }
+        nefx++;
+    }
+
+
     printf
         ("\nNow playing effects for 5 seconds each with 1 second delay between\n");
     for (i = 0; i < nefx; i++) {
@@ -260,8 +276,9 @@ HapticPrintSupported(SDL_Haptic * haptic)
         printf("      constant\n");
     if (supported & SDL_HAPTIC_SINE)
         printf("      sine\n");
-    if (supported & SDL_HAPTIC_SQUARE)
-        printf("      square\n");
+    /* !!! FIXME: put this back when we have more bits in 2.1 */
+    /*if (supported & SDL_HAPTIC_SQUARE)
+        printf("      square\n");*/
     if (supported & SDL_HAPTIC_TRIANGLE)
         printf("      triangle\n");
     if (supported & SDL_HAPTIC_SAWTOOTHUP)
@@ -280,6 +297,8 @@ HapticPrintSupported(SDL_Haptic * haptic)
         printf("      intertia\n");
     if (supported & SDL_HAPTIC_CUSTOM)
         printf("      custom\n");
+    if (supported & SDL_HAPTIC_LEFTRIGHT)
+        printf("      left/right\n");
     printf("   Supported capabilities:\n");
     if (supported & SDL_HAPTIC_GAIN)
         printf("      gain\n");

From de6d6a5554a8599cea6f0d2d4f71c0806960440d Mon Sep 17 00:00:00 2001
From: "Ryan C. Gordon" 
Date: Sat, 10 Aug 2013 13:40:08 -0400
Subject: [PATCH 533/542] Removed no-longer-necessary comment.

---
 src/haptic/windows/SDL_syshaptic.c | 4 ----
 1 file changed, 4 deletions(-)

diff --git a/src/haptic/windows/SDL_syshaptic.c b/src/haptic/windows/SDL_syshaptic.c
index e86211de1..99da8ce44 100644
--- a/src/haptic/windows/SDL_syshaptic.c
+++ b/src/haptic/windows/SDL_syshaptic.c
@@ -1271,10 +1271,6 @@ SDL_SYS_HapticUpdateEffect(SDL_Haptic * haptic,
     DIEFFECT temp;
 
     if (haptic->hwdata->bXInputHaptic) {
-        /* From MSDN:
-            "Note that the right motor is the high-frequency motor, the left
-             motor is the low-frequency motor. They do not always need to be
-             set to the same amount, as they provide different effects." */
         XINPUT_VIBRATION *vib = &effect->hweffect->vibration;
         SDL_assert(data->type == SDL_HAPTIC_LEFTRIGHT);
         vib->wLeftMotorSpeed = data->leftright.large_magnitude;

From d4f386f5e3557c9d5b3f205cf11e330d58bd9f4b Mon Sep 17 00:00:00 2001
From: "Ryan C. Gordon" 
Date: Sat, 10 Aug 2013 13:46:19 -0400
Subject: [PATCH 534/542] Haptic: Let XInput update effects while they're still
 running.

---
 src/haptic/windows/SDL_syshaptic.c | 5 +++++
 1 file changed, 5 insertions(+)

diff --git a/src/haptic/windows/SDL_syshaptic.c b/src/haptic/windows/SDL_syshaptic.c
index 99da8ce44..9b1349644 100644
--- a/src/haptic/windows/SDL_syshaptic.c
+++ b/src/haptic/windows/SDL_syshaptic.c
@@ -1275,6 +1275,11 @@ SDL_SYS_HapticUpdateEffect(SDL_Haptic * haptic,
         SDL_assert(data->type == SDL_HAPTIC_LEFTRIGHT);
         vib->wLeftMotorSpeed = data->leftright.large_magnitude;
         vib->wRightMotorSpeed = data->leftright.small_magnitude;
+        SDL_LockMutex(haptic->hwdata->mutex);
+        if (haptic->hwdata->stopTicks) {  /* running right now? Update it. */
+            XINPUTSETSTATE(haptic->hwdata->userid, vib);
+        }
+        SDL_UnlockMutex(haptic->hwdata->mutex);
         return 0;
     }
 

From 42c560b05d1697e1266c7932d52beee625db8591 Mon Sep 17 00:00:00 2001
From: Sam Lantinga 
Date: Sat, 10 Aug 2013 10:49:26 -0700
Subject: [PATCH 535/542] Check the return value of glGenTextures()

--HG--
extra : rebase_source : e079554f253890d862bfd5d51d7b229e3fcff3d9
---
 src/render/opengl/SDL_render_gl.c       | 4 ++++
 src/render/opengles/SDL_render_gles.c   | 5 +++++
 src/render/opengles2/SDL_render_gles2.c | 7 +++++--
 3 files changed, 14 insertions(+), 2 deletions(-)

diff --git a/src/render/opengl/SDL_render_gl.c b/src/render/opengl/SDL_render_gl.c
index 0094d84ec..697a974c5 100644
--- a/src/render/opengl/SDL_render_gl.c
+++ b/src/render/opengl/SDL_render_gl.c
@@ -633,6 +633,10 @@ GL_CreateTexture(SDL_Renderer * renderer, SDL_Texture * texture)
 
     GL_CheckError("", renderer);
     renderdata->glGenTextures(1, &data->texture);
+    if (GL_CheckError("glGenTexures()", renderer) < 0) {
+        SDL_free(data);
+        return -1;
+    }
     if ((renderdata->GL_ARB_texture_rectangle_supported)
         /*&& texture->access != SDL_TEXTUREACCESS_TARGET*/){
         data->type = GL_TEXTURE_RECTANGLE_ARB;
diff --git a/src/render/opengles/SDL_render_gles.c b/src/render/opengles/SDL_render_gles.c
index cbbdd0da3..ab0f01d4e 100644
--- a/src/render/opengles/SDL_render_gles.c
+++ b/src/render/opengles/SDL_render_gles.c
@@ -475,6 +475,11 @@ GLES_CreateTexture(SDL_Renderer * renderer, SDL_Texture * texture)
     renderdata->glGetError();
     renderdata->glEnable(GL_TEXTURE_2D);
     renderdata->glGenTextures(1, &data->texture);
+    result = renderdata->glGetError();
+    if (result != GL_NO_ERROR) {
+        SDL_free(data);
+        return GLES_SetError("glGenTextures()", result);
+    }
 
     data->type = GL_TEXTURE_2D;
     /* no NPOV textures allowed in OpenGL ES (yet) */
diff --git a/src/render/opengles2/SDL_render_gles2.c b/src/render/opengles2/SDL_render_gles2.c
index e34cd1b7c..a0ab94365 100644
--- a/src/render/opengles2/SDL_render_gles2.c
+++ b/src/render/opengles2/SDL_render_gles2.c
@@ -418,6 +418,10 @@ GLES2_CreateTexture(SDL_Renderer *renderer, SDL_Texture *texture)
     /* Allocate the texture */
     rdata->glGetError();
     rdata->glGenTextures(1, &tdata->texture);
+    if (rdata->glGetError() != GL_NO_ERROR) {
+        SDL_free(tdata);
+        return SDL_SetError("Texture creation failed in glGenTextures()");
+    }
     rdata->glActiveTexture(GL_TEXTURE0);
     rdata->glBindTexture(tdata->texture_type, tdata->texture);
     rdata->glTexParameteri(tdata->texture_type, GL_TEXTURE_MIN_FILTER, scaleMode);
@@ -425,8 +429,7 @@ GLES2_CreateTexture(SDL_Renderer *renderer, SDL_Texture *texture)
     rdata->glTexParameteri(tdata->texture_type, GL_TEXTURE_WRAP_S, GL_CLAMP_TO_EDGE);
     rdata->glTexParameteri(tdata->texture_type, GL_TEXTURE_WRAP_T, GL_CLAMP_TO_EDGE);
     rdata->glTexImage2D(tdata->texture_type, 0, format, texture->w, texture->h, 0, format, type, NULL);
-    if (rdata->glGetError() != GL_NO_ERROR)
-    {
+    if (rdata->glGetError() != GL_NO_ERROR) {
         rdata->glDeleteTextures(1, &tdata->texture);
         SDL_free(tdata);
         return SDL_SetError("Texture creation failed");

From e6e79353e8ad879781969dc2bb3092fbf572624c Mon Sep 17 00:00:00 2001
From: Sam Lantinga 
Date: Sat, 10 Aug 2013 10:55:12 -0700
Subject: [PATCH 536/542] Fixed bug 2024 - Update OSX Joystick code to fully
 support Saitek p2500 gamepad

Patrick Maloney

Saitek p2500 (Cyborg Rumble Force Pad) has a D-pad, two analog sticks, and numerous buttons.  SDL 2.x on OSX detected everything except the right-side analog stick.  The right-side stick is considered a 'simulation device' with the axes mapped to throttle and rudder.

The patch adds support for throttle and rudder on the HID simulation page.
---
 src/joystick/darwin/SDL_sysjoystick.c | 16 ++++++++++++++++
 1 file changed, 16 insertions(+)

diff --git a/src/joystick/darwin/SDL_sysjoystick.c b/src/joystick/darwin/SDL_sysjoystick.c
index 97f0e393b..83fcafd04 100644
--- a/src/joystick/darwin/SDL_sysjoystick.c
+++ b/src/joystick/darwin/SDL_sysjoystick.c
@@ -362,6 +362,22 @@ HIDAddElement(CFTypeRef refElement, recDevice * pDevice)
                         }
                     }
                     break;
+                case kHIDPage_Simulation:
+		    switch (usage) {
+			case kHIDUsage_Sim_Rudder:
+			case kHIDUsage_Sim_Throttle:
+                            element = (recElement *)
+                                NewPtrClear(sizeof(recElement));
+                            if (element) {
+                                pDevice->axes++;
+                                headElement = &(pDevice->firstAxis);
+                            }
+			    break;
+
+			default:
+			    break;
+		    }
+                    break;
                 case kHIDPage_Button:
                     element = (recElement *)
                         NewPtrClear(sizeof(recElement));

From df092588e8dee77c4495529d7a37524e049845c8 Mon Sep 17 00:00:00 2001
From: Sam Lantinga 
Date: Sat, 10 Aug 2013 10:57:54 -0700
Subject: [PATCH 537/542] Fixed whitespace

---
 src/joystick/darwin/SDL_sysjoystick.c | 14 +++++++-------
 1 file changed, 7 insertions(+), 7 deletions(-)

diff --git a/src/joystick/darwin/SDL_sysjoystick.c b/src/joystick/darwin/SDL_sysjoystick.c
index 83fcafd04..4e50e4dd6 100644
--- a/src/joystick/darwin/SDL_sysjoystick.c
+++ b/src/joystick/darwin/SDL_sysjoystick.c
@@ -363,20 +363,20 @@ HIDAddElement(CFTypeRef refElement, recDevice * pDevice)
                     }
                     break;
                 case kHIDPage_Simulation:
-		    switch (usage) {
-			case kHIDUsage_Sim_Rudder:
-			case kHIDUsage_Sim_Throttle:
+                    switch (usage) {
+                        case kHIDUsage_Sim_Rudder:
+                        case kHIDUsage_Sim_Throttle:
                             element = (recElement *)
                                 NewPtrClear(sizeof(recElement));
                             if (element) {
                                 pDevice->axes++;
                                 headElement = &(pDevice->firstAxis);
                             }
-			    break;
+                            break;
 
-			default:
-			    break;
-		    }
+                        default:
+                            break;
+                    }
                     break;
                 case kHIDPage_Button:
                     element = (recElement *)

From 28b592cb5df985a272f29e24d0be326a342b5948 Mon Sep 17 00:00:00 2001
From: Sam Lantinga 
Date: Sat, 10 Aug 2013 11:19:30 -0700
Subject: [PATCH 538/542] Fixed bug 1925 - SDL_GetPerformanceFrequency returns
 incorrect value on iOS

PoopiSan

Currently on OSX and iOS simulator the values:
mach_base_info.denom = 1
mach_base_info.numer = 1

but on the real iOS device
mach_base_info.denom = 3
mach_base_info.numer = 125

The calculation is made using following formula
mach_base_info.denom / mach_base_info.numer * 1000000

but all values are int32 and the result is casted to int64.

This solves the problem:

return 1.0 * mach_base_info.denom / mach_base_info.numer * 1000000;
---
 src/timer/unix/SDL_systimer.c | 4 ++--
 1 file changed, 2 insertions(+), 2 deletions(-)

diff --git a/src/timer/unix/SDL_systimer.c b/src/timer/unix/SDL_systimer.c
index 7918cde41..596d749ab 100644
--- a/src/timer/unix/SDL_systimer.c
+++ b/src/timer/unix/SDL_systimer.c
@@ -135,9 +135,9 @@ SDL_GetPerformanceFrequency(void)
 #if HAVE_CLOCK_GETTIME
         return 1000000000;
 #elif defined(__APPLE__)
-        Uint64 freq = mach_base_info.numer;
+        Uint64 freq = mach_base_info.denom;
         freq *= 1000000000;
-        freq /= mach_base_info.denom;
+        freq /= mach_base_info.numer;
         return freq;
 #endif
     } else {

From 0b13b79137eb1c3aec61c7a654d5b6ea059370d1 Mon Sep 17 00:00:00 2001
From: Philipp Wiesemann 
Date: Sat, 10 Aug 2013 23:07:28 +0200
Subject: [PATCH 539/542] Corrected comment in test program.

---
 test/testhaptic.c | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/test/testhaptic.c b/test/testhaptic.c
index b993d5191..13dd19d67 100644
--- a/test/testhaptic.c
+++ b/test/testhaptic.c
@@ -213,7 +213,7 @@ main(int argc, char **argv)
         nefx++;
     }
 
-    /* First we'll try a SINE effect. */
+    /* Finally we'll try a left/right effect. */
     if (supported & SDL_HAPTIC_LEFTRIGHT) {
         printf("   effect %d: Left/Right\n", nefx);
         efx[nefx].type = SDL_HAPTIC_LEFTRIGHT;

From ba31f59f54aa5a1140b909fca32aafc2fa200271 Mon Sep 17 00:00:00 2001
From: Philipp Wiesemann 
Date: Sat, 10 Aug 2013 23:14:20 +0200
Subject: [PATCH 540/542] Removed SDL_HAPTIC_SQUARE from comments in header to
 prevent doxygen confusion.

---
 include/SDL_haptic.h | 6 +++---
 1 file changed, 3 insertions(+), 3 deletions(-)

diff --git a/include/SDL_haptic.h b/include/SDL_haptic.h
index 8c91d1b1f..da555c9c3 100644
--- a/include/SDL_haptic.h
+++ b/include/SDL_haptic.h
@@ -483,7 +483,7 @@ typedef struct SDL_HapticConstant
  *
  *  The struct handles the following effects:
  *   - ::SDL_HAPTIC_SINE
- *   - ::SDL_HAPTIC_SQUARE
+ *   - ::SDL_HAPTIC_LEFTRIGHT
  *   - ::SDL_HAPTIC_TRIANGLE
  *   - ::SDL_HAPTIC_SAWTOOTHUP
  *   - ::SDL_HAPTIC_SAWTOOTHDOWN
@@ -529,7 +529,7 @@ typedef struct SDL_HapticConstant
     \endverbatim
  *
  *  \sa SDL_HAPTIC_SINE
- *  \sa SDL_HAPTIC_SQUARE
+ *  \sa SDL_HAPTIC_LEFTRIGHT
  *  \sa SDL_HAPTIC_TRIANGLE
  *  \sa SDL_HAPTIC_SAWTOOTHUP
  *  \sa SDL_HAPTIC_SAWTOOTHDOWN
@@ -538,7 +538,7 @@ typedef struct SDL_HapticConstant
 typedef struct SDL_HapticPeriodic
 {
     /* Header */
-    Uint16 type;        /**< ::SDL_HAPTIC_SINE, ::SDL_HAPTIC_SQUARE,
+    Uint16 type;        /**< ::SDL_HAPTIC_SINE, ::SDL_HAPTIC_LEFTRIGHT,
                              ::SDL_HAPTIC_TRIANGLE, ::SDL_HAPTIC_SAWTOOTHUP or
                              ::SDL_HAPTIC_SAWTOOTHDOWN */
     SDL_HapticDirection direction;  /**< Direction of the effect. */

From 286dc2e1dc4467c432ef0e21af1eee1a10e94cdc Mon Sep 17 00:00:00 2001
From: Philipp Wiesemann 
Date: Sat, 10 Aug 2013 23:21:06 +0200
Subject: [PATCH 541/542] Added missing call to SDL_stack_free(). On Windows
 this is needed because SDL_stack_alloc() wraps SDL_malloc().

---
 src/video/windows/SDL_windowsevents.c | 3 +++
 1 file changed, 3 insertions(+)

diff --git a/src/video/windows/SDL_windowsevents.c b/src/video/windows/SDL_windowsevents.c
index 3e79d69cd..acf8d5e51 100644
--- a/src/video/windows/SDL_windowsevents.c
+++ b/src/video/windows/SDL_windowsevents.c
@@ -689,6 +689,9 @@ WIN_WindowProc(HWND hwnd, UINT msg, WPARAM wParam, LPARAM lParam)
 
                 if (!GetClientRect(hwnd, &rect) ||
                     (rect.right == rect.left && rect.bottom == rect.top)) {
+                    if (inputs) {
+                        SDL_stack_free(inputs);
+                    }
                     break;
                 }
                 ClientToScreen(hwnd, (LPPOINT) & rect);

From dd7da60a4fae4554d8b0f06fc1258843ac859baa Mon Sep 17 00:00:00 2001
From: Sam Lantinga 
Date: Sun, 11 Aug 2013 19:56:43 -0700
Subject: [PATCH 542/542] Fixed bug 2027 - Full-screen appears to be broken -
 hang in SDL_DestroyWindow()

Rainer Deyke

I'm running Linux Mint 15 with the Cinnamon window manager.  SDL_DestroyWindow consistently locks up for me when the window if fullscreen.
---
 src/video/x11/SDL_x11window.c | 23 +++++++++++++++++++++--
 1 file changed, 21 insertions(+), 2 deletions(-)

diff --git a/src/video/x11/SDL_x11window.c b/src/video/x11/SDL_x11window.c
index e101bec0c..02529e08a 100644
--- a/src/video/x11/SDL_x11window.c
+++ b/src/video/x11/SDL_x11window.c
@@ -59,6 +59,21 @@ static Bool isConfigureNotify(Display *dpy, XEvent *ev, XPointer win)
     return ev->type == ConfigureNotify && ev->xconfigure.window == *((Window*)win);
 }
 
+/*
+static Bool
+XIfEventTimeout(Display *display, XEvent *event_return, Bool (*predicate)(), XPointer arg, int timeoutMS)
+{
+    Uint32 start = SDL_GetTicks();
+
+    while (!XCheckIfEvent(display, event_return, predicate, arg)) {
+        if ((SDL_GetTicks() - start) >= timeoutMS) {
+            return False;
+        }
+    }
+    return True;
+}
+*/
+
 static SDL_bool
 X11_IsWindowLegacyFullscreen(_THIS, SDL_Window * window)
 {
@@ -1150,6 +1165,9 @@ X11_BeginWindowFullscreenLegacy(_THIS, SDL_Window * window, SDL_VideoDisplay * _
     XReparentWindow(display, data->xwindow, data->fswindow,
                     (rect.w - window->w) / 2, (rect.h - window->h) / 2);
 
+    /* Move the mouse to the upper left to make sure it's on-screen */
+    XWarpPointer(display, None, root, 0, 0, 0, 0, rect.x, rect.y);
+
     /* Center mouse in the fullscreen window. */
     rect.x += (rect.w / 2);
     rect.y += (rect.h / 2);
@@ -1190,8 +1208,9 @@ X11_EndWindowFullscreenLegacy(_THIS, SDL_Window * window, SDL_VideoDisplay * _di
     XReparentWindow(display, data->xwindow, root, window->x, window->y);
 
     /* flush these events so they don't confuse normal event handling */
-    XIfEvent(display, &ev, &isUnmapNotify, (XPointer)&data->xwindow);
-    XIfEvent(display, &ev, &isMapNotify, (XPointer)&data->xwindow);
+    XSync(display, False);
+    XCheckIfEvent(display, &ev, &isMapNotify, (XPointer)&data->xwindow);
+    XCheckIfEvent(display, &ev, &isUnmapNotify, (XPointer)&data->xwindow);
 
     SetWindowBordered(display, screen, data->xwindow,
                       (window->flags & SDL_WINDOW_BORDERLESS) == 0);